blob: df3d84b8a3138b7cfc1cf3eb7ca1a5c89aebf096 [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
9083if ac_fn_c_try_compile "$LINENO"
9084then :
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
9093rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9094CPPFLAGS=$cppflags_save
9095
9096{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-wayland argument" >&5
9097printf %s "checking --with-wayland argument... " >&6; }
9098
9099# Check whether --with-wayland was given.
9100if test ${with_wayland+y}
9101then :
9102 withval=$with_wayland;
9103fi
9104
9105
9106test -z "$with_wayland" && with_wayland=yes
9107if test "$with_wayland" = yes; then
9108 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9109printf "%s\n" "yes" >&6; }
Hirohito Higashi73b96502025-06-28 18:18:21 +02009110 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if Wayland client header files can be found" >&5
9111printf %s "checking if Wayland client header files can be found... " >&6; }
Foxe Chenb90c2392025-06-27 21:10:35 +02009112 cppflags_save=$CPPFLAGS
9113 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9115/* end confdefs.h. */
9116#include <wayland-client.h>
9117int
9118main (void)
9119{
9120
9121 ;
9122 return 0;
9123}
9124_ACEOF
9125if ac_fn_c_try_compile "$LINENO"
9126then :
9127 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9128printf "%s\n" "yes" >&6; }
9129else case e in #(
9130 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9131printf "%s\n" "no" >&6; }; no_wl=yes ;;
9132esac
9133fi
9134rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9135 CPPFLAGS=$cppflags_save
9136
9137 if test "$no_wl" = yes; then
9138 with_wayland=no
9139 else
9140 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wl_display_connect in -lwayland-client" >&5
9141printf %s "checking for wl_display_connect in -lwayland-client... " >&6; }
9142if test ${ac_cv_lib_wayland_client_wl_display_connect+y}
9143then :
9144 printf %s "(cached) " >&6
9145else case e in #(
9146 e) ac_check_lib_save_LIBS=$LIBS
9147LIBS="-lwayland-client $LIBS"
9148cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9149/* end confdefs.h. */
9150
9151/* Override any GCC internal prototype to avoid an error.
9152 Use char because int might match the return type of a GCC
9153 builtin and then its argument prototype would still apply.
9154 The 'extern "C"' is for builds by C++ compilers;
9155 although this is not generally supported in C code supporting it here
9156 has little cost and some practical benefit (sr 110532). */
9157#ifdef __cplusplus
9158extern "C"
9159#endif
9160char wl_display_connect (void);
9161int
9162main (void)
9163{
9164return wl_display_connect ();
9165 ;
9166 return 0;
9167}
9168_ACEOF
9169if ac_fn_c_try_link "$LINENO"
9170then :
9171 ac_cv_lib_wayland_client_wl_display_connect=yes
9172else case e in #(
9173 e) ac_cv_lib_wayland_client_wl_display_connect=no ;;
9174esac
9175fi
9176rm -f core conftest.err conftest.$ac_objext conftest.beam \
9177 conftest$ac_exeext conftest.$ac_ext
9178LIBS=$ac_check_lib_save_LIBS ;;
9179esac
9180fi
9181{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wayland_client_wl_display_connect" >&5
9182printf "%s\n" "$ac_cv_lib_wayland_client_wl_display_connect" >&6; }
9183if test "x$ac_cv_lib_wayland_client_wl_display_connect" = xyes
9184then :
9185 no_wl=no
9186fi
9187
9188
9189 if test "$no_wl" = no; then
9190 printf "%s\n" "#define HAVE_WAYLAND 1" >>confdefs.h
9191
9192 WAYLAND_LIBS="-lwayland-client";
9193
9194 WAYLAND_SRC=" \
9195 auto/wayland/wlr-data-control-unstable-v1.c \
9196 auto/wayland/ext-data-control-v1.c \
9197 auto/wayland/xdg-shell.c \
9198 auto/wayland/primary-selection-unstable-v1.c \
9199 wayland.c"
9200
9201 WAYLAND_OBJ=" \
9202 objects/wlr-data-control-unstable-v1.o \
9203 objects/ext-data-control-v1.o \
9204 objects/xdg-shell.o \
9205 objects/primary-selection-unstable-v1.o \
9206 objects/wayland.o"
9207
9208
9209 else
9210 with_wayland=no
9211 fi
9212 fi
9213else
9214 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9215printf "%s\n" "no" >&6; }
9216fi
9217
Bram Moolenaar071d4272004-06-13 20:20:40 +00009218test -z "$with_x" && with_x=yes
Bram Moolenaard0573012017-10-28 21:11:06 +02009219test "${enable_gui-yes}" != no -a "x$MACOS_X" != "xyes" -a "x$QNX" != "xyes" && with_x=yes
Bram Moolenaar071d4272004-06-13 20:20:40 +00009220if test "$with_x" = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009221 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: defaulting to: don't HAVE_X11" >&5
9222printf "%s\n" "defaulting to: don't HAVE_X11" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009223else
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009224
Bram Moolenaar071d4272004-06-13 20:20:40 +00009225 # Extract the first word of "xmkmf", so it can be a program name with args.
9226set dummy xmkmf; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02009227{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9228printf %s "checking for $ac_word... " >&6; }
9229if test ${ac_cv_path_xmkmfpath+y}
9230then :
9231 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02009232else case e in #(
9233 e) case $xmkmfpath in
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009234 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00009235 ac_cv_path_xmkmfpath="$xmkmfpath" # Let the user override the test with a path.
9236 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00009237 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009238 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9239for as_dir in $PATH
9240do
9241 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02009242 case $as_dir in #(((
9243 '') as_dir=./ ;;
9244 */) ;;
9245 *) as_dir=$as_dir/ ;;
9246 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009247 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02009248 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9249 ac_cv_path_xmkmfpath="$as_dir$ac_word$ac_exec_ext"
9250 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009251 break 2
9252 fi
9253done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009254 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00009255IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009256
Bram Moolenaar071d4272004-06-13 20:20:40 +00009257 ;;
Christian Brabandt9670f612025-05-07 21:44:33 +02009258esac ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00009259esac
9260fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009261xmkmfpath=$ac_cv_path_xmkmfpath
Bram Moolenaar071d4272004-06-13 20:20:40 +00009262if test -n "$xmkmfpath"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009263 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xmkmfpath" >&5
9264printf "%s\n" "$xmkmfpath" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009265else
Illia Bobyra96d5442023-08-30 16:30:15 +02009266 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9267printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009268fi
9269
9270
Bram Moolenaar446cb832008-06-24 21:56:24 +00009271
Illia Bobyra96d5442023-08-30 16:30:15 +02009272 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for X" >&5
9273printf %s "checking for X... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009274
Bram Moolenaar071d4272004-06-13 20:20:40 +00009275
Bram Moolenaar446cb832008-06-24 21:56:24 +00009276# Check whether --with-x was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02009277if test ${with_x+y}
9278then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00009279 withval=$with_x;
9280fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00009281
Christian Brabandt9670f612025-05-07 21:44:33 +02009282# $have_x is 'yes', 'no', 'disabled', or empty when we do not yet know.
Bram Moolenaar071d4272004-06-13 20:20:40 +00009283if test "x$with_x" = xno; then
9284 # The user explicitly disabled X.
9285 have_x=disabled
9286else
Bram Moolenaar446cb832008-06-24 21:56:24 +00009287 case $x_includes,$x_libraries in #(
Bram Moolenaar7db77842014-03-27 17:40:59 +01009288 *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
Illia Bobyra96d5442023-08-30 16:30:15 +02009289 *,NONE | NONE,*) if test ${ac_cv_have_x+y}
9290then :
9291 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02009292else case e in #(
9293 e) # One or both of the vars are not set, and there is no cached value.
Illia Bobyra96d5442023-08-30 16:30:15 +02009294ac_x_includes=no
9295ac_x_libraries=no
9296# Do we need to do anything special at all?
9297ac_save_LIBS=$LIBS
9298LIBS="-lX11 $LIBS"
9299cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9300/* end confdefs.h. */
9301#include <X11/Xlib.h>
9302int
9303main (void)
9304{
9305XrmInitialize ()
9306 ;
9307 return 0;
9308}
9309_ACEOF
9310if ac_fn_c_try_link "$LINENO"
9311then :
9312 # We can compile and link X programs with no special options.
9313 ac_x_includes=
9314 ac_x_libraries=
9315fi
9316rm -f core conftest.err conftest.$ac_objext conftest.beam \
9317 conftest$ac_exeext conftest.$ac_ext
9318LIBS="$ac_save_LIBS"
9319# If that didn't work, only try xmkmf and file system searches
9320# for native compilation.
9321if test x"$ac_x_includes" = xno && test "$cross_compiling" = no
9322then :
9323 rm -f -r conftest.dir
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009324if mkdir conftest.dir; then
9325 cd conftest.dir
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009326 cat >Imakefile <<'_ACEOF'
Bram Moolenaar446cb832008-06-24 21:56:24 +00009327incroot:
9328 @echo incroot='${INCROOT}'
9329usrlibdir:
9330 @echo usrlibdir='${USRLIBDIR}'
9331libdir:
9332 @echo libdir='${LIBDIR}'
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009333_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +00009334 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01009335 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
Bram Moolenaar446cb832008-06-24 21:56:24 +00009336 for ac_var in incroot usrlibdir libdir; do
9337 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
9338 done
Bram Moolenaar071d4272004-06-13 20:20:40 +00009339 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
Bram Moolenaar446cb832008-06-24 21:56:24 +00009340 for ac_extension in a so sl dylib la dll; do
9341 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
9342 test -f "$ac_im_libdir/libX11.$ac_extension"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009343 ac_im_usrlibdir=$ac_im_libdir; break
Bram Moolenaar071d4272004-06-13 20:20:40 +00009344 fi
9345 done
9346 # Screen out bogus values from the imake configuration. They are
9347 # bogus both because they are the default anyway, and because
9348 # using them would break gcc on systems where it needs fixed includes.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009349 case $ac_im_incroot in
Bram Moolenaar446cb832008-06-24 21:56:24 +00009350 /usr/include) ac_x_includes= ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009351 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00009352 esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009353 case $ac_im_usrlibdir in
Bram Moolenaar32f31b12009-05-21 13:20:59 +00009354 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009355 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00009356 esac
9357 fi
9358 cd ..
Bram Moolenaar446cb832008-06-24 21:56:24 +00009359 rm -f -r conftest.dir
Bram Moolenaar071d4272004-06-13 20:20:40 +00009360fi
9361
Illia Bobyra96d5442023-08-30 16:30:15 +02009362 # Standard set of common directories for X headers.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009363# Check X11 before X11Rn because it is often a symlink to the current release.
9364ac_x_header_dirs='
9365/usr/X11/include
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009366/usr/X11R7/include
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009367/usr/X11R6/include
9368/usr/X11R5/include
9369/usr/X11R4/include
Bram Moolenaar071d4272004-06-13 20:20:40 +00009370
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009371/usr/include/X11
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009372/usr/include/X11R7
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009373/usr/include/X11R6
9374/usr/include/X11R5
9375/usr/include/X11R4
9376
9377/usr/local/X11/include
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009378/usr/local/X11R7/include
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009379/usr/local/X11R6/include
9380/usr/local/X11R5/include
9381/usr/local/X11R4/include
9382
9383/usr/local/include/X11
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009384/usr/local/include/X11R7
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009385/usr/local/include/X11R6
9386/usr/local/include/X11R5
9387/usr/local/include/X11R4
9388
Illia Bobyra96d5442023-08-30 16:30:15 +02009389/opt/X11/include
9390
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009391/usr/X386/include
9392/usr/x386/include
9393/usr/XFree86/include/X11
9394
9395/usr/include
9396/usr/local/include
9397/usr/unsupported/include
9398/usr/athena/include
9399/usr/local/x11r5/include
9400/usr/lpp/Xamples/include
9401
9402/usr/openwin/include
9403/usr/openwin/share/include'
9404
9405if test "$ac_x_includes" = no; then
Bram Moolenaar446cb832008-06-24 21:56:24 +00009406 # Guess where to find include files, by looking for Xlib.h.
Bram Moolenaar071d4272004-06-13 20:20:40 +00009407 # First, try using that file with no special directory specified.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009409/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +00009410#include <X11/Xlib.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009411_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009412if ac_fn_c_try_cpp "$LINENO"
9413then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009414 # We can compile using X headers with no special include directory.
9415ac_x_includes=
Christian Brabandt9670f612025-05-07 21:44:33 +02009416else case e in #(
9417 e) for ac_dir in $ac_x_header_dirs; do
Bram Moolenaar446cb832008-06-24 21:56:24 +00009418 if test -r "$ac_dir/X11/Xlib.h"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009419 ac_x_includes=$ac_dir
9420 break
9421 fi
Christian Brabandt9670f612025-05-07 21:44:33 +02009422done ;;
9423esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00009424fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01009425rm -f conftest.err conftest.i conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009426fi # $ac_x_includes = no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009427
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009428if test "$ac_x_libraries" = no; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00009429 # Check for the libraries.
Bram Moolenaar071d4272004-06-13 20:20:40 +00009430 # See if we find them without any special options.
9431 # Don't add to $LIBS permanently.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009432 ac_save_LIBS=$LIBS
Bram Moolenaar446cb832008-06-24 21:56:24 +00009433 LIBS="-lX11 $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009434 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009435/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +00009436#include <X11/Xlib.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009437int
Illia Bobyra96d5442023-08-30 16:30:15 +02009438main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009439{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009440XrmInitialize ()
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009441 ;
9442 return 0;
9443}
9444_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009445if ac_fn_c_try_link "$LINENO"
9446then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009447 LIBS=$ac_save_LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009448# We can link X programs with no special library path.
9449ac_x_libraries=
Christian Brabandt9670f612025-05-07 21:44:33 +02009450else case e in #(
9451 e) LIBS=$ac_save_LIBS
Illia Bobyra96d5442023-08-30 16:30:15 +02009452for 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 +00009453do
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009454 # Don't even attempt the hair of trying to link an X program!
Bram Moolenaar446cb832008-06-24 21:56:24 +00009455 for ac_extension in a so sl dylib la dll; do
9456 if test -r "$ac_dir/libX11.$ac_extension"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00009457 ac_x_libraries=$ac_dir
9458 break 2
9459 fi
9460 done
Christian Brabandt9670f612025-05-07 21:44:33 +02009461done ;;
9462esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00009463fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009464rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009465 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009466fi # $ac_x_libraries = no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009467
Illia Bobyra96d5442023-08-30 16:30:15 +02009468fi
9469# Record the results.
Bram Moolenaar446cb832008-06-24 21:56:24 +00009470case $ac_x_includes,$ac_x_libraries in #(
Illia Bobyra96d5442023-08-30 16:30:15 +02009471 no,* | *,no | *\'*) :
Bram Moolenaar446cb832008-06-24 21:56:24 +00009472 # Didn't find X, or a directory has "'" in its name.
Illia Bobyra96d5442023-08-30 16:30:15 +02009473 ac_cv_have_x="have_x=no" ;; #(
9474 *) :
Bram Moolenaar446cb832008-06-24 21:56:24 +00009475 # Record where we found X for the cache.
9476 ac_cv_have_x="have_x=yes\
9477 ac_x_includes='$ac_x_includes'\
Illia Bobyra96d5442023-08-30 16:30:15 +02009478 ac_x_libraries='$ac_x_libraries'" ;;
Christian Brabandt9670f612025-05-07 21:44:33 +02009479esac ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +00009480esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00009481fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00009482;; #(
9483 *) have_x=yes;;
9484 esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00009485 eval "$ac_cv_have_x"
9486fi # $with_x != no
9487
9488if test "$have_x" != yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009489 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
9490printf "%s\n" "$have_x" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009491 no_x=yes
9492else
9493 # If each of the values was on the command line, it overrides each guess.
9494 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9495 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9496 # Update the cache value to reflect the command line values.
Bram Moolenaar446cb832008-06-24 21:56:24 +00009497 ac_cv_have_x="have_x=yes\
9498 ac_x_includes='$x_includes'\
9499 ac_x_libraries='$x_libraries'"
Illia Bobyra96d5442023-08-30 16:30:15 +02009500 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
9501printf "%s\n" "libraries $x_libraries, headers $x_includes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009502fi
9503
9504if test "$no_x" = yes; then
9505 # Not all programs may use this symbol, but it does not hurt to define it.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009506
Illia Bobyra96d5442023-08-30 16:30:15 +02009507printf "%s\n" "#define X_DISPLAY_MISSING 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00009508
9509 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
9510else
9511 if test -n "$x_includes"; then
9512 X_CFLAGS="$X_CFLAGS -I$x_includes"
9513 fi
9514
9515 # It would also be nice to do this for all -L options, not just this one.
9516 if test -n "$x_libraries"; then
9517 X_LIBS="$X_LIBS -L$x_libraries"
9518 # For Solaris; some versions of Sun CC require a space after -R and
9519 # others require no space. Words are not sufficient . . . .
Illia Bobyra96d5442023-08-30 16:30:15 +02009520 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
9521printf %s "checking whether -R must be followed by a space... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00009522 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
9523 ac_xsave_c_werror_flag=$ac_c_werror_flag
9524 ac_c_werror_flag=yes
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009526/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00009527
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009528int
Illia Bobyra96d5442023-08-30 16:30:15 +02009529main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009530{
Bram Moolenaar071d4272004-06-13 20:20:40 +00009531
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009532 ;
9533 return 0;
9534}
9535_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009536if ac_fn_c_try_link "$LINENO"
9537then :
9538 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9539printf "%s\n" "no" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00009540 X_LIBS="$X_LIBS -R$x_libraries"
Christian Brabandt9670f612025-05-07 21:44:33 +02009541else case e in #(
9542 e) LIBS="$ac_xsave_LIBS -R $x_libraries"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009543 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009544/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00009545
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009546int
Illia Bobyra96d5442023-08-30 16:30:15 +02009547main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009548{
Bram Moolenaar071d4272004-06-13 20:20:40 +00009549
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009550 ;
9551 return 0;
9552}
9553_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009554if ac_fn_c_try_link "$LINENO"
9555then :
9556 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9557printf "%s\n" "yes" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00009558 X_LIBS="$X_LIBS -R $x_libraries"
Christian Brabandt9670f612025-05-07 21:44:33 +02009559else case e in #(
9560 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
9561printf "%s\n" "neither works" >&6; } ;;
9562esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00009563fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009564rm -f core conftest.err conftest.$ac_objext conftest.beam \
Christian Brabandt9670f612025-05-07 21:44:33 +02009565 conftest$ac_exeext conftest.$ac_ext ;;
9566esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00009567fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009568rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009569 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +00009570 ac_c_werror_flag=$ac_xsave_c_werror_flag
9571 LIBS=$ac_xsave_LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009572 fi
9573
9574 # Check for system-dependent libraries X programs must link with.
9575 # Do this before checking for the system-independent R6 libraries
9576 # (-lICE), since we may need -lsocket or whatever for X linking.
9577
9578 if test "$ISC" = yes; then
9579 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
9580 else
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009581 # Martyn Johnson says this is needed for Ultrix, if the X
9582 # libraries were built with DECnet support. And Karl Berry says
Bram Moolenaar071d4272004-06-13 20:20:40 +00009583 # the Alpha needs dnet_stub (dnet does not exist).
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009584 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009586/* end confdefs.h. */
9587
Bram Moolenaar446cb832008-06-24 21:56:24 +00009588/* Override any GCC internal prototype to avoid an error.
9589 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +02009590 builtin and then its argument prototype would still apply.
9591 The 'extern "C"' is for builds by C++ compilers;
9592 although this is not generally supported in C code supporting it here
9593 has little cost and some practical benefit (sr 110532). */
9594#ifdef __cplusplus
9595extern "C"
9596#endif
9597char XOpenDisplay (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009598int
Illia Bobyra96d5442023-08-30 16:30:15 +02009599main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009600{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009601return XOpenDisplay ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009602 ;
9603 return 0;
9604}
9605_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009606if ac_fn_c_try_link "$LINENO"
9607then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009608
Christian Brabandt9670f612025-05-07 21:44:33 +02009609else case e in #(
9610 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +02009611printf %s "checking for dnet_ntoa in -ldnet... " >&6; }
9612if test ${ac_cv_lib_dnet_dnet_ntoa+y}
9613then :
9614 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02009615else case e in #(
9616 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009617LIBS="-ldnet $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009618cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009619/* end confdefs.h. */
9620
Bram Moolenaar446cb832008-06-24 21:56:24 +00009621/* Override any GCC internal prototype to avoid an error.
9622 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +02009623 builtin and then its argument prototype would still apply.
9624 The 'extern "C"' is for builds by C++ compilers;
9625 although this is not generally supported in C code supporting it here
9626 has little cost and some practical benefit (sr 110532). */
9627#ifdef __cplusplus
9628extern "C"
9629#endif
9630char dnet_ntoa (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009631int
Illia Bobyra96d5442023-08-30 16:30:15 +02009632main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009633{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009634return dnet_ntoa ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009635 ;
9636 return 0;
9637}
9638_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009639if ac_fn_c_try_link "$LINENO"
9640then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009641 ac_cv_lib_dnet_dnet_ntoa=yes
Christian Brabandt9670f612025-05-07 21:44:33 +02009642else case e in #(
9643 e) ac_cv_lib_dnet_dnet_ntoa=no ;;
9644esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00009645fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009646rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009647 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +02009648LIBS=$ac_check_lib_save_LIBS ;;
9649esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009650fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009651{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
9652printf "%s\n" "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
9653if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes
9654then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009655 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009656fi
9657
9658 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009659 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
9660printf %s "checking for dnet_ntoa in -ldnet_stub... " >&6; }
9661if test ${ac_cv_lib_dnet_stub_dnet_ntoa+y}
9662then :
9663 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02009664else case e in #(
9665 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009666LIBS="-ldnet_stub $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009667cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009668/* end confdefs.h. */
9669
Bram Moolenaar446cb832008-06-24 21:56:24 +00009670/* Override any GCC internal prototype to avoid an error.
9671 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +02009672 builtin and then its argument prototype would still apply.
9673 The 'extern "C"' is for builds by C++ compilers;
9674 although this is not generally supported in C code supporting it here
9675 has little cost and some practical benefit (sr 110532). */
9676#ifdef __cplusplus
9677extern "C"
9678#endif
9679char dnet_ntoa (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009680int
Illia Bobyra96d5442023-08-30 16:30:15 +02009681main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009682{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009683return dnet_ntoa ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009684 ;
9685 return 0;
9686}
9687_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009688if ac_fn_c_try_link "$LINENO"
9689then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009690 ac_cv_lib_dnet_stub_dnet_ntoa=yes
Christian Brabandt9670f612025-05-07 21:44:33 +02009691else case e in #(
9692 e) ac_cv_lib_dnet_stub_dnet_ntoa=no ;;
9693esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00009694fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009695rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009696 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +02009697LIBS=$ac_check_lib_save_LIBS ;;
9698esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009699fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009700{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
9701printf "%s\n" "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
9702if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes
9703then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009704 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009705fi
9706
Christian Brabandt9670f612025-05-07 21:44:33 +02009707 fi ;;
9708esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009709fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009710rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009711 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009712 LIBS="$ac_xsave_LIBS"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009713
9714 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
9715 # to get the SysV transport functions.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009716 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
Bram Moolenaar071d4272004-06-13 20:20:40 +00009717 # needs -lnsl.
9718 # The nsl library prevents programs from opening the X display
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009719 # on Irix 5.2, according to T.E. Dickey.
9720 # The functions gethostbyname, getservbyname, and inet_addr are
9721 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009722 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Illia Bobyra96d5442023-08-30 16:30:15 +02009723if test "x$ac_cv_func_gethostbyname" = xyes
9724then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009725
Bram Moolenaar071d4272004-06-13 20:20:40 +00009726fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00009727
Bram Moolenaar071d4272004-06-13 20:20:40 +00009728 if test $ac_cv_func_gethostbyname = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009729 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
9730printf %s "checking for gethostbyname in -lnsl... " >&6; }
9731if test ${ac_cv_lib_nsl_gethostbyname+y}
9732then :
9733 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02009734else case e in #(
9735 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009736LIBS="-lnsl $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009737cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009738/* end confdefs.h. */
9739
Bram Moolenaar446cb832008-06-24 21:56:24 +00009740/* Override any GCC internal prototype to avoid an error.
9741 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +02009742 builtin and then its argument prototype would still apply.
9743 The 'extern "C"' is for builds by C++ compilers;
9744 although this is not generally supported in C code supporting it here
9745 has little cost and some practical benefit (sr 110532). */
9746#ifdef __cplusplus
9747extern "C"
9748#endif
9749char gethostbyname (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009750int
Illia Bobyra96d5442023-08-30 16:30:15 +02009751main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009752{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009753return gethostbyname ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009754 ;
9755 return 0;
9756}
9757_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009758if ac_fn_c_try_link "$LINENO"
9759then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009760 ac_cv_lib_nsl_gethostbyname=yes
Christian Brabandt9670f612025-05-07 21:44:33 +02009761else case e in #(
9762 e) ac_cv_lib_nsl_gethostbyname=no ;;
9763esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00009764fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009765rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009766 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +02009767LIBS=$ac_check_lib_save_LIBS ;;
9768esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009769fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009770{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
9771printf "%s\n" "$ac_cv_lib_nsl_gethostbyname" >&6; }
9772if test "x$ac_cv_lib_nsl_gethostbyname" = xyes
9773then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009774 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009775fi
9776
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009777 if test $ac_cv_lib_nsl_gethostbyname = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009778 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
9779printf %s "checking for gethostbyname in -lbsd... " >&6; }
9780if test ${ac_cv_lib_bsd_gethostbyname+y}
9781then :
9782 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02009783else case e in #(
9784 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009785LIBS="-lbsd $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009786cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009787/* end confdefs.h. */
9788
Bram Moolenaar446cb832008-06-24 21:56:24 +00009789/* Override any GCC internal prototype to avoid an error.
9790 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +02009791 builtin and then its argument prototype would still apply.
9792 The 'extern "C"' is for builds by C++ compilers;
9793 although this is not generally supported in C code supporting it here
9794 has little cost and some practical benefit (sr 110532). */
9795#ifdef __cplusplus
9796extern "C"
9797#endif
9798char gethostbyname (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009799int
Illia Bobyra96d5442023-08-30 16:30:15 +02009800main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009801{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009802return gethostbyname ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009803 ;
9804 return 0;
9805}
9806_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009807if ac_fn_c_try_link "$LINENO"
9808then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009809 ac_cv_lib_bsd_gethostbyname=yes
Christian Brabandt9670f612025-05-07 21:44:33 +02009810else case e in #(
9811 e) ac_cv_lib_bsd_gethostbyname=no ;;
9812esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009813fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009814rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009815 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +02009816LIBS=$ac_check_lib_save_LIBS ;;
9817esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009818fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009819{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
9820printf "%s\n" "$ac_cv_lib_bsd_gethostbyname" >&6; }
9821if test "x$ac_cv_lib_bsd_gethostbyname" = xyes
9822then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009823 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
9824fi
9825
9826 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00009827 fi
9828
9829 # lieder@skyler.mavd.honeywell.com says without -lsocket,
9830 # socket/setsockopt and other routines are undefined under SCO ODT
9831 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009832 # on later versions), says Simon Leinen: it contains gethostby*
9833 # variants that don't use the name server (or something). -lsocket
9834 # must be given before -lnsl if both are needed. We assume that
9835 # if connect needs -lnsl, so does gethostbyname.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009836 ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect"
Illia Bobyra96d5442023-08-30 16:30:15 +02009837if test "x$ac_cv_func_connect" = xyes
9838then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009839
Bram Moolenaar071d4272004-06-13 20:20:40 +00009840fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00009841
Bram Moolenaar071d4272004-06-13 20:20:40 +00009842 if test $ac_cv_func_connect = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009843 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
9844printf %s "checking for connect in -lsocket... " >&6; }
9845if test ${ac_cv_lib_socket_connect+y}
9846then :
9847 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02009848else case e in #(
9849 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009850LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009851cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009852/* end confdefs.h. */
9853
Bram Moolenaar446cb832008-06-24 21:56:24 +00009854/* Override any GCC internal prototype to avoid an error.
9855 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +02009856 builtin and then its argument prototype would still apply.
9857 The 'extern "C"' is for builds by C++ compilers;
9858 although this is not generally supported in C code supporting it here
9859 has little cost and some practical benefit (sr 110532). */
9860#ifdef __cplusplus
9861extern "C"
9862#endif
9863char connect (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009864int
Illia Bobyra96d5442023-08-30 16:30:15 +02009865main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009866{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009867return connect ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009868 ;
9869 return 0;
9870}
9871_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009872if ac_fn_c_try_link "$LINENO"
9873then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009874 ac_cv_lib_socket_connect=yes
Christian Brabandt9670f612025-05-07 21:44:33 +02009875else case e in #(
9876 e) ac_cv_lib_socket_connect=no ;;
9877esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00009878fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009879rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009880 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +02009881LIBS=$ac_check_lib_save_LIBS ;;
9882esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009883fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009884{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
9885printf "%s\n" "$ac_cv_lib_socket_connect" >&6; }
9886if test "x$ac_cv_lib_socket_connect" = xyes
9887then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009888 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009889fi
9890
9891 fi
9892
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009893 # Guillermo Gomez says -lposix is necessary on A/UX.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009894 ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove"
Illia Bobyra96d5442023-08-30 16:30:15 +02009895if test "x$ac_cv_func_remove" = xyes
9896then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009897
Bram Moolenaar071d4272004-06-13 20:20:40 +00009898fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00009899
Bram Moolenaar071d4272004-06-13 20:20:40 +00009900 if test $ac_cv_func_remove = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009901 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
9902printf %s "checking for remove in -lposix... " >&6; }
9903if test ${ac_cv_lib_posix_remove+y}
9904then :
9905 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02009906else case e in #(
9907 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009908LIBS="-lposix $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009909cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009910/* end confdefs.h. */
9911
Bram Moolenaar446cb832008-06-24 21:56:24 +00009912/* Override any GCC internal prototype to avoid an error.
9913 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +02009914 builtin and then its argument prototype would still apply.
9915 The 'extern "C"' is for builds by C++ compilers;
9916 although this is not generally supported in C code supporting it here
9917 has little cost and some practical benefit (sr 110532). */
9918#ifdef __cplusplus
9919extern "C"
9920#endif
9921char remove (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009922int
Illia Bobyra96d5442023-08-30 16:30:15 +02009923main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009924{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009925return remove ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009926 ;
9927 return 0;
9928}
9929_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009930if ac_fn_c_try_link "$LINENO"
9931then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009932 ac_cv_lib_posix_remove=yes
Christian Brabandt9670f612025-05-07 21:44:33 +02009933else case e in #(
9934 e) ac_cv_lib_posix_remove=no ;;
9935esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00009936fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009937rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009938 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +02009939LIBS=$ac_check_lib_save_LIBS ;;
9940esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009941fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009942{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
9943printf "%s\n" "$ac_cv_lib_posix_remove" >&6; }
9944if test "x$ac_cv_lib_posix_remove" = xyes
9945then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009946 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009947fi
9948
9949 fi
9950
9951 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009952 ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
Illia Bobyra96d5442023-08-30 16:30:15 +02009953if test "x$ac_cv_func_shmat" = xyes
9954then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009955
Bram Moolenaar071d4272004-06-13 20:20:40 +00009956fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00009957
Bram Moolenaar071d4272004-06-13 20:20:40 +00009958 if test $ac_cv_func_shmat = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009959 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
9960printf %s "checking for shmat in -lipc... " >&6; }
9961if test ${ac_cv_lib_ipc_shmat+y}
9962then :
9963 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02009964else case e in #(
9965 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009966LIBS="-lipc $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009967cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009968/* end confdefs.h. */
9969
Bram Moolenaar446cb832008-06-24 21:56:24 +00009970/* Override any GCC internal prototype to avoid an error.
9971 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +02009972 builtin and then its argument prototype would still apply.
9973 The 'extern "C"' is for builds by C++ compilers;
9974 although this is not generally supported in C code supporting it here
9975 has little cost and some practical benefit (sr 110532). */
9976#ifdef __cplusplus
9977extern "C"
9978#endif
9979char shmat (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009980int
Illia Bobyra96d5442023-08-30 16:30:15 +02009981main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009982{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009983return shmat ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009984 ;
9985 return 0;
9986}
9987_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009988if ac_fn_c_try_link "$LINENO"
9989then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009990 ac_cv_lib_ipc_shmat=yes
Christian Brabandt9670f612025-05-07 21:44:33 +02009991else case e in #(
9992 e) ac_cv_lib_ipc_shmat=no ;;
9993esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00009994fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009995rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009996 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +02009997LIBS=$ac_check_lib_save_LIBS ;;
9998esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009999fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010000{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
10001printf "%s\n" "$ac_cv_lib_ipc_shmat" >&6; }
10002if test "x$ac_cv_lib_ipc_shmat" = xyes
10003then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000010004 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
Bram Moolenaar071d4272004-06-13 20:20:40 +000010005fi
10006
10007 fi
10008 fi
10009
10010 # Check for libraries that X11R6 Xt/Xaw programs need.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010011 ac_save_LDFLAGS=$LDFLAGS
Bram Moolenaar071d4272004-06-13 20:20:40 +000010012 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
10013 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
10014 # check for ICE first), but we must link in the order -lSM -lICE or
10015 # we get undefined symbols. So assume we have SM if we have ICE.
10016 # These have to be linked with before -lX11, unlike the other
10017 # libraries we check for below, so use a different variable.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010018 # John Interrante, Karl Berry
Illia Bobyra96d5442023-08-30 16:30:15 +020010019 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
10020printf %s "checking for IceConnectionNumber in -lICE... " >&6; }
10021if test ${ac_cv_lib_ICE_IceConnectionNumber+y}
10022then :
10023 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020010024else case e in #(
10025 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000010026LIBS="-lICE $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010027cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010028/* end confdefs.h. */
10029
Bram Moolenaar446cb832008-06-24 21:56:24 +000010030/* Override any GCC internal prototype to avoid an error.
10031 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020010032 builtin and then its argument prototype would still apply.
10033 The 'extern "C"' is for builds by C++ compilers;
10034 although this is not generally supported in C code supporting it here
10035 has little cost and some practical benefit (sr 110532). */
10036#ifdef __cplusplus
10037extern "C"
10038#endif
10039char IceConnectionNumber (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010040int
Illia Bobyra96d5442023-08-30 16:30:15 +020010041main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010042{
Bram Moolenaar446cb832008-06-24 21:56:24 +000010043return IceConnectionNumber ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010044 ;
10045 return 0;
10046}
10047_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020010048if ac_fn_c_try_link "$LINENO"
10049then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010050 ac_cv_lib_ICE_IceConnectionNumber=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020010051else case e in #(
10052 e) ac_cv_lib_ICE_IceConnectionNumber=no ;;
10053esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000010054fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010055rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010056 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020010057LIBS=$ac_check_lib_save_LIBS ;;
10058esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010059fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010060{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
10061printf "%s\n" "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
10062if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes
10063then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000010064 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
Bram Moolenaar071d4272004-06-13 20:20:40 +000010065fi
10066
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010067 LDFLAGS=$ac_save_LDFLAGS
Bram Moolenaar071d4272004-06-13 20:20:40 +000010068
10069fi
10070
10071
Bram Moolenaar2c704a72010-06-03 21:17:25 +020010072 if test "$zOSUnix" = "yes"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000010073 CFLAGS="$CFLAGS -W c,dll"
10074 LDFLAGS="$LDFLAGS -W l,dll"
10075 X_EXTRA_LIBS="$X_EXTRA_LIBS -lSM -lICE -lXmu"
10076 fi
10077
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010078
Bram Moolenaar071d4272004-06-13 20:20:40 +000010079 if test -d "$x_includes" && test ! -d "$x_libraries"; then
10080 x_libraries=`echo "$x_includes" | sed s/include/lib/`
Illia Bobyra96d5442023-08-30 16:30:15 +020010081 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Corrected X libraries to $x_libraries" >&5
10082printf "%s\n" "Corrected X libraries to $x_libraries" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010083 X_LIBS="$X_LIBS -L$x_libraries"
Bram Moolenaar6840a0f2021-12-13 20:37:59 +000010084 if test "$vim_cv_uname_output" = SunOS &&
10085 echo $vim_cv_uname_r_output | grep '^5' >/dev/null; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000010086 X_LIBS="$X_LIBS -R $x_libraries"
10087 fi
10088 fi
10089
10090 if test -d "$x_libraries" && test ! -d "$x_includes"; then
10091 x_includes=`echo "$x_libraries" | sed s/lib/include/`
Illia Bobyra96d5442023-08-30 16:30:15 +020010092 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Corrected X includes to $x_includes" >&5
10093printf "%s\n" "Corrected X includes to $x_includes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010094 X_CFLAGS="$X_CFLAGS -I$x_includes"
10095 fi
10096
10097 X_CFLAGS="`echo $X_CFLAGS\ | sed 's%-I/usr/include %%'`"
10098 X_LIBS="`echo $X_LIBS\ | sed 's%-L/usr/lib %%'`"
10099 X_LIBS="`echo $X_LIBS\ | sed -e 's%-R/usr/lib %%' -e 's%-R /usr/lib %%'`"
10100
10101
Illia Bobyra96d5442023-08-30 16:30:15 +020010102 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if X11 header files can be found" >&5
10103printf %s "checking if X11 header files can be found... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010104 cflags_save=$CFLAGS
10105 CFLAGS="$CFLAGS $X_CFLAGS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010107/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000010108#include <X11/Xlib.h>
Bram Moolenaar00ca2842008-06-26 20:14:00 +000010109#include <X11/Intrinsic.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010110int
Illia Bobyra96d5442023-08-30 16:30:15 +020010111main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010112{
Bram Moolenaar071d4272004-06-13 20:20:40 +000010113
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010114 ;
10115 return 0;
10116}
10117_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020010118if ac_fn_c_try_compile "$LINENO"
10119then :
10120 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10121printf "%s\n" "yes" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +020010122else case e in #(
10123 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10124printf "%s\n" "no" >&6; }; no_x=yes ;;
10125esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000010126fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010127rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000010128 CFLAGS=$cflags_save
10129
10130 if test "${no_x-no}" = yes; then
10131 with_x=no
10132 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010133 printf "%s\n" "#define HAVE_X11 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000010134
10135 X_LIB="-lXt -lX11";
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010136
Bram Moolenaar071d4272004-06-13 20:20:40 +000010137
10138 ac_save_LDFLAGS="$LDFLAGS"
10139 LDFLAGS="-L$x_libraries $LDFLAGS"
10140
Illia Bobyra96d5442023-08-30 16:30:15 +020010141 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _XdmcpAuthDoIt in -lXdmcp" >&5
10142printf %s "checking for _XdmcpAuthDoIt in -lXdmcp... " >&6; }
10143if test ${ac_cv_lib_Xdmcp__XdmcpAuthDoIt+y}
10144then :
10145 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020010146else case e in #(
10147 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000010148LIBS="-lXdmcp -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS -lXdmcp $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010149cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010150/* end confdefs.h. */
10151
Bram Moolenaar446cb832008-06-24 21:56:24 +000010152/* Override any GCC internal prototype to avoid an error.
10153 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020010154 builtin and then its argument prototype would still apply.
10155 The 'extern "C"' is for builds by C++ compilers;
10156 although this is not generally supported in C code supporting it here
10157 has little cost and some practical benefit (sr 110532). */
10158#ifdef __cplusplus
10159extern "C"
10160#endif
10161char _XdmcpAuthDoIt (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010162int
Illia Bobyra96d5442023-08-30 16:30:15 +020010163main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010164{
Bram Moolenaar446cb832008-06-24 21:56:24 +000010165return _XdmcpAuthDoIt ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010166 ;
10167 return 0;
10168}
10169_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020010170if ac_fn_c_try_link "$LINENO"
10171then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010172 ac_cv_lib_Xdmcp__XdmcpAuthDoIt=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020010173else case e in #(
10174 e) ac_cv_lib_Xdmcp__XdmcpAuthDoIt=no ;;
10175esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000010176fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010177rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010178 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020010179LIBS=$ac_check_lib_save_LIBS ;;
10180esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010181fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010182{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xdmcp__XdmcpAuthDoIt" >&5
10183printf "%s\n" "$ac_cv_lib_Xdmcp__XdmcpAuthDoIt" >&6; }
10184if test "x$ac_cv_lib_Xdmcp__XdmcpAuthDoIt" = xyes
10185then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000010186 X_EXTRA_LIBS="$X_EXTRA_LIBS -lXdmcp"
Bram Moolenaar071d4272004-06-13 20:20:40 +000010187fi
10188
10189
Illia Bobyra96d5442023-08-30 16:30:15 +020010190 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IceOpenConnection in -lICE" >&5
10191printf %s "checking for IceOpenConnection in -lICE... " >&6; }
10192if test ${ac_cv_lib_ICE_IceOpenConnection+y}
10193then :
10194 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020010195else case e in #(
10196 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000010197LIBS="-lICE $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010198cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010199/* end confdefs.h. */
10200
Bram Moolenaar446cb832008-06-24 21:56:24 +000010201/* Override any GCC internal prototype to avoid an error.
10202 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020010203 builtin and then its argument prototype would still apply.
10204 The 'extern "C"' is for builds by C++ compilers;
10205 although this is not generally supported in C code supporting it here
10206 has little cost and some practical benefit (sr 110532). */
10207#ifdef __cplusplus
10208extern "C"
10209#endif
10210char IceOpenConnection (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010211int
Illia Bobyra96d5442023-08-30 16:30:15 +020010212main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010213{
Bram Moolenaar446cb832008-06-24 21:56:24 +000010214return IceOpenConnection ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010215 ;
10216 return 0;
10217}
10218_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020010219if ac_fn_c_try_link "$LINENO"
10220then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010221 ac_cv_lib_ICE_IceOpenConnection=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020010222else case e in #(
10223 e) ac_cv_lib_ICE_IceOpenConnection=no ;;
10224esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000010225fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010226rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010227 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020010228LIBS=$ac_check_lib_save_LIBS ;;
10229esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010230fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010231{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceOpenConnection" >&5
10232printf "%s\n" "$ac_cv_lib_ICE_IceOpenConnection" >&6; }
10233if test "x$ac_cv_lib_ICE_IceOpenConnection" = xyes
10234then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000010235 X_EXTRA_LIBS="$X_EXTRA_LIBS -lSM -lICE"
Bram Moolenaar071d4272004-06-13 20:20:40 +000010236fi
10237
10238
10239 LDFLAGS="$X_LIBS $ac_save_LDFLAGS"
Illia Bobyra96d5442023-08-30 16:30:15 +020010240 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XpmCreatePixmapFromData in -lXpm" >&5
10241printf %s "checking for XpmCreatePixmapFromData in -lXpm... " >&6; }
10242if test ${ac_cv_lib_Xpm_XpmCreatePixmapFromData+y}
10243then :
10244 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020010245else case e in #(
10246 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000010247LIBS="-lXpm -lXt $X_PRE_LIBS -lXpm -lX11 $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010248cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010249/* end confdefs.h. */
10250
Bram Moolenaar446cb832008-06-24 21:56:24 +000010251/* Override any GCC internal prototype to avoid an error.
10252 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020010253 builtin and then its argument prototype would still apply.
10254 The 'extern "C"' is for builds by C++ compilers;
10255 although this is not generally supported in C code supporting it here
10256 has little cost and some practical benefit (sr 110532). */
10257#ifdef __cplusplus
10258extern "C"
10259#endif
10260char XpmCreatePixmapFromData (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010261int
Illia Bobyra96d5442023-08-30 16:30:15 +020010262main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010263{
Bram Moolenaar446cb832008-06-24 21:56:24 +000010264return XpmCreatePixmapFromData ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010265 ;
10266 return 0;
10267}
10268_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020010269if ac_fn_c_try_link "$LINENO"
10270then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010271 ac_cv_lib_Xpm_XpmCreatePixmapFromData=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020010272else case e in #(
10273 e) ac_cv_lib_Xpm_XpmCreatePixmapFromData=no ;;
10274esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000010275fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010276rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010277 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020010278LIBS=$ac_check_lib_save_LIBS ;;
10279esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010280fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010281{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmCreatePixmapFromData" >&5
10282printf "%s\n" "$ac_cv_lib_Xpm_XpmCreatePixmapFromData" >&6; }
10283if test "x$ac_cv_lib_Xpm_XpmCreatePixmapFromData" = xyes
10284then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000010285 X_PRE_LIBS="$X_PRE_LIBS -lXpm"
Bram Moolenaar071d4272004-06-13 20:20:40 +000010286fi
10287
10288
Illia Bobyra96d5442023-08-30 16:30:15 +020010289 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if X11 header files implicitly declare return values" >&5
10290printf %s "checking if X11 header files implicitly declare return values... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010291 cflags_save=$CFLAGS
Bram Moolenaard1864592013-05-04 04:40:15 +020010292 if test "$GCC" = yes; then
10293 CFLAGS="$CFLAGS $X_CFLAGS -Werror"
10294 else
10295 CFLAGS="$CFLAGS $X_CFLAGS"
10296 fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010298/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000010299#include <X11/Xlib.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010300int
Illia Bobyra96d5442023-08-30 16:30:15 +020010301main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010302{
Bram Moolenaar071d4272004-06-13 20:20:40 +000010303
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010304 ;
10305 return 0;
10306}
10307_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020010308if ac_fn_c_try_compile "$LINENO"
10309then :
10310 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10311printf "%s\n" "no" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +020010312else case e in #(
10313 e) CFLAGS="$CFLAGS -Wno-implicit-int"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010315/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000010316#include <X11/Xlib.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010317int
Illia Bobyra96d5442023-08-30 16:30:15 +020010318main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010319{
Bram Moolenaar071d4272004-06-13 20:20:40 +000010320
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010321 ;
10322 return 0;
10323}
10324_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020010325if ac_fn_c_try_compile "$LINENO"
10326then :
10327 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10328printf "%s\n" "yes" >&6; }; cflags_save="$cflags_save -Wno-implicit-int"
Christian Brabandt9670f612025-05-07 21:44:33 +020010329else case e in #(
10330 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: test failed" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +020010331printf "%s\n" "test failed" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +020010332 ;;
10333esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000010334fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010335rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020010336 ;;
10337esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000010338fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010339rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000010340 CFLAGS=$cflags_save
10341
10342 LDFLAGS="$ac_save_LDFLAGS"
10343
Mike Gilberta055b442023-08-20 19:01:41 +020010344 # The cast to long int works around a bug in the HP C Compiler
10345# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
Christian Brabandt9670f612025-05-07 21:44:33 +020010346# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'.
Mike Gilberta055b442023-08-20 19:01:41 +020010347# This bug is HP SR number 8606223364.
Illia Bobyra96d5442023-08-30 16:30:15 +020010348{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
10349printf %s "checking size of wchar_t... " >&6; }
10350if test ${ac_cv_sizeof_wchar_t+y}
10351then :
10352 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020010353else case e in #(
10354 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 +020010355then :
Bram Moolenaar4bdbbf72009-05-21 21:27:43 +000010356
Christian Brabandt9670f612025-05-07 21:44:33 +020010357else case e in #(
10358 e) if test "$ac_cv_type_wchar_t" = yes; then
10359 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
10360printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
Mike Gilberta055b442023-08-20 19:01:41 +020010361as_fn_error 77 "cannot compute sizeof (wchar_t)
Christian Brabandt9670f612025-05-07 21:44:33 +020010362See 'config.log' for more details" "$LINENO" 5; }
Mike Gilberta055b442023-08-20 19:01:41 +020010363 else
10364 ac_cv_sizeof_wchar_t=0
Christian Brabandt9670f612025-05-07 21:44:33 +020010365 fi ;;
10366esac
Mike Gilberta055b442023-08-20 19:01:41 +020010367fi
Christian Brabandt9670f612025-05-07 21:44:33 +020010368 ;;
10369esac
Mike Gilberta055b442023-08-20 19:01:41 +020010370fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010371{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
10372printf "%s\n" "$ac_cv_sizeof_wchar_t" >&6; }
Mike Gilberta055b442023-08-20 19:01:41 +020010373
10374
10375
Illia Bobyra96d5442023-08-30 16:30:15 +020010376printf "%s\n" "#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t" >>confdefs.h
Bram Moolenaar4bdbbf72009-05-21 21:27:43 +000010377
Bram Moolenaar4bdbbf72009-05-21 21:27:43 +000010378
Mike Gilberta055b442023-08-20 19:01:41 +020010379 if test "$ac_cv_sizeof_wchar_t" -le 2; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010380 printf "%s\n" "#define SMALL_WCHAR_T 1" >>confdefs.h
Bram Moolenaar4bdbbf72009-05-21 21:27:43 +000010381
10382 fi
10383
Bram Moolenaar071d4272004-06-13 20:20:40 +000010384 fi
10385fi
10386
Bram Moolenaard2a05492018-07-27 22:35:15 +020010387if test "x$with_x" = xno -a "x$with_x_arg" = xyes; then
10388 as_fn_error $? "could not configure X" "$LINENO" 5
10389fi
10390
Bram Moolenaarb3f74062020-02-26 16:16:53 +010010391test "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 +000010392
Illia Bobyra96d5442023-08-30 16:30:15 +020010393{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-gui argument" >&5
10394printf %s "checking --enable-gui argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000010395# Check whether --enable-gui was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010396if test ${enable_gui+y}
10397then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000010398 enableval=$enable_gui;
Christian Brabandt9670f612025-05-07 21:44:33 +020010399else case e in #(
10400 e) enable_gui="auto" ;;
10401esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000010402fi
10403
Bram Moolenaar071d4272004-06-13 20:20:40 +000010404
10405enable_gui_canon=`echo "_$enable_gui" | \
10406 sed 's/[ _+-]//g;y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
10407
Bram Moolenaar071d4272004-06-13 20:20:40 +000010408SKIP_GTK2=YES
Bram Moolenaar1858a842016-02-23 22:30:31 +010010409SKIP_GTK3=YES
Bram Moolenaar071d4272004-06-13 20:20:40 +000010410SKIP_GNOME=YES
10411SKIP_MOTIF=YES
Bram Moolenaar071d4272004-06-13 20:20:40 +000010412SKIP_PHOTON=YES
Bram Moolenaarb3f74062020-02-26 16:16:53 +010010413SKIP_HAIKU=YES
Bram Moolenaar071d4272004-06-13 20:20:40 +000010414GUITYPE=NONE
10415
Bram Moolenaarb3f74062020-02-26 16:16:53 +010010416if test "x$HAIKU" = "xyes"; then
10417 SKIP_HAIKU=
10418 case "$enable_gui_canon" in
Illia Bobyra96d5442023-08-30 16:30:15 +020010419 no) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no GUI support" >&5
10420printf "%s\n" "no GUI support" >&6; }
Bram Moolenaarb3f74062020-02-26 16:16:53 +010010421 SKIP_HAIKU=YES ;;
Illia Bobyra96d5442023-08-30 16:30:15 +020010422 yes|"") { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes - automatic GUI support" >&5
10423printf "%s\n" "yes - automatic GUI support" >&6; } ;;
10424 auto) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: auto - automatic GUI support" >&5
10425printf "%s\n" "auto - automatic GUI support" >&6; } ;;
10426 haiku) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Haiku GUI support" >&5
10427printf "%s\n" "Haiku GUI support" >&6; } ;;
10428 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Sorry, $enable_gui GUI is not supported" >&5
10429printf "%s\n" "Sorry, $enable_gui GUI is not supported" >&6; }
Bram Moolenaarb3f74062020-02-26 16:16:53 +010010430 SKIP_HAIKU=YES ;;
10431 esac
10432elif test "x$QNX" = "xyes" -a "x$with_x" = "xno" ; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000010433 SKIP_PHOTON=
10434 case "$enable_gui_canon" in
Illia Bobyra96d5442023-08-30 16:30:15 +020010435 no) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no GUI support" >&5
10436printf "%s\n" "no GUI support" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010437 SKIP_PHOTON=YES ;;
Illia Bobyra96d5442023-08-30 16:30:15 +020010438 yes|""|auto) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: automatic GUI support" >&5
10439printf "%s\n" "automatic GUI support" >&6; }
Bram Moolenaaraf0839a2018-12-30 22:55:47 +010010440 gui_auto=yes ;;
Illia Bobyra96d5442023-08-30 16:30:15 +020010441 photon) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Photon GUI support" >&5
10442printf "%s\n" "Photon GUI support" >&6; } ;;
10443 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Sorry, $enable_gui GUI is not supported" >&5
10444printf "%s\n" "Sorry, $enable_gui GUI is not supported" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010445 SKIP_PHOTON=YES ;;
10446 esac
10447
Bram Moolenaar040f9752020-08-11 23:08:48 +020010448elif test "x$MACOS_X" = "xyes" -a "x$with_x" = "xno" ; then
10449 case "$enable_gui_canon" in
Illia Bobyra96d5442023-08-30 16:30:15 +020010450 no) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no GUI support" >&5
10451printf "%s\n" "no GUI support" >&6; } ;;
10452 yes|"") { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes - automatic GUI support" >&5
10453printf "%s\n" "yes - automatic GUI support" >&6; }
Bram Moolenaar040f9752020-08-11 23:08:48 +020010454 gui_auto=yes ;;
Illia Bobyra96d5442023-08-30 16:30:15 +020010455 auto) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: auto - disable GUI support for Mac OS" >&5
10456printf "%s\n" "auto - disable GUI support for Mac OS" >&6; } ;;
10457 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Sorry, $enable_gui GUI is not supported" >&5
10458printf "%s\n" "Sorry, $enable_gui GUI is not supported" >&6; } ;;
Bram Moolenaar040f9752020-08-11 23:08:48 +020010459 esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000010460else
10461
Bram Moolenaar071d4272004-06-13 20:20:40 +000010462 case "$enable_gui_canon" in
Illia Bobyra96d5442023-08-30 16:30:15 +020010463 no|none) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no GUI support" >&5
10464printf "%s\n" "no GUI support" >&6; } ;;
10465 yes|""|auto) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes/auto - automatic GUI support" >&5
10466printf "%s\n" "yes/auto - automatic GUI support" >&6; }
Bram Moolenaaraf0839a2018-12-30 22:55:47 +010010467 gui_auto=yes
Bram Moolenaar071d4272004-06-13 20:20:40 +000010468 SKIP_GTK2=
Bram Moolenaarf272ae12021-01-31 19:52:50 +010010469 SKIP_GTK3=
Bram Moolenaar071d4272004-06-13 20:20:40 +000010470 SKIP_GNOME=
Bram Moolenaarf52fac22022-03-11 16:01:26 +000010471 SKIP_MOTIF=;;
Illia Bobyra96d5442023-08-30 16:30:15 +020010472 gtk2) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: GTK+ 2.x GUI support" >&5
10473printf "%s\n" "GTK+ 2.x GUI support" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010474 SKIP_GTK2=;;
Illia Bobyra96d5442023-08-30 16:30:15 +020010475 gnome2) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: GNOME 2.x GUI support" >&5
10476printf "%s\n" "GNOME 2.x GUI support" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010477 SKIP_GNOME=
Bram Moolenaar071d4272004-06-13 20:20:40 +000010478 SKIP_GTK2=;;
Illia Bobyra96d5442023-08-30 16:30:15 +020010479 gtk3) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: GTK+ 3.x GUI support" >&5
10480printf "%s\n" "GTK+ 3.x GUI support" >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010481 SKIP_GTK3=;;
Illia Bobyra96d5442023-08-30 16:30:15 +020010482 motif) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Motif GUI support" >&5
10483printf "%s\n" "Motif GUI support" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010484 SKIP_MOTIF=;;
Illia Bobyra96d5442023-08-30 16:30:15 +020010485 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Sorry, $enable_gui GUI is not supported" >&5
10486printf "%s\n" "Sorry, $enable_gui GUI is not supported" >&6; } ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +000010487 esac
10488
10489fi
10490
Bram Moolenaar071d4272004-06-13 20:20:40 +000010491if test "x$SKIP_GTK2" != "xYES" -a "$enable_gui_canon" != "gtk2" \
10492 -a "$enable_gui_canon" != "gnome2"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010493 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether or not to look for GTK+ 2" >&5
10494printf %s "checking whether or not to look for GTK+ 2... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000010495 # Check whether --enable-gtk2-check was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010496if test ${enable_gtk2_check+y}
10497then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000010498 enableval=$enable_gtk2_check;
Christian Brabandt9670f612025-05-07 21:44:33 +020010499else case e in #(
10500 e) enable_gtk2_check="yes" ;;
10501esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000010502fi
10503
Illia Bobyra96d5442023-08-30 16:30:15 +020010504 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_gtk2_check" >&5
10505printf "%s\n" "$enable_gtk2_check" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010506 if test "x$enable_gtk2_check" = "xno"; then
10507 SKIP_GTK2=YES
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010508 SKIP_GNOME=YES
Bram Moolenaar071d4272004-06-13 20:20:40 +000010509 fi
10510fi
10511
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010512if test "x$SKIP_GNOME" != "xYES" -a "$enable_gui_canon" != "gnome2"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010513 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether or not to look for GNOME" >&5
10514printf %s "checking whether or not to look for GNOME... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000010515 # Check whether --enable-gnome-check was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010516if test ${enable_gnome_check+y}
10517then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000010518 enableval=$enable_gnome_check;
Christian Brabandt9670f612025-05-07 21:44:33 +020010519else case e in #(
10520 e) enable_gnome_check="no" ;;
10521esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000010522fi
10523
Illia Bobyra96d5442023-08-30 16:30:15 +020010524 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_gnome_check" >&5
10525printf "%s\n" "$enable_gnome_check" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010526 if test "x$enable_gnome_check" = "xno"; then
10527 SKIP_GNOME=YES
10528 fi
10529fi
10530
Bram Moolenaar98921892016-02-23 17:14:37 +010010531if test "x$SKIP_GTK3" != "xYES" -a "$enable_gui_canon" != "gtk3"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010532 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether or not to look for GTK+ 3" >&5
10533printf %s "checking whether or not to look for GTK+ 3... " >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010534 # Check whether --enable-gtk3-check was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010535if test ${enable_gtk3_check+y}
10536then :
Bram Moolenaar98921892016-02-23 17:14:37 +010010537 enableval=$enable_gtk3_check;
Christian Brabandt9670f612025-05-07 21:44:33 +020010538else case e in #(
10539 e) enable_gtk3_check="yes" ;;
10540esac
Bram Moolenaar98921892016-02-23 17:14:37 +010010541fi
10542
Illia Bobyra96d5442023-08-30 16:30:15 +020010543 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_gtk3_check" >&5
10544printf "%s\n" "$enable_gtk3_check" >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010545 if test "x$enable_gtk3_check" = "xno"; then
10546 SKIP_GTK3=YES
10547 fi
10548fi
10549
Bram Moolenaar071d4272004-06-13 20:20:40 +000010550if test "x$SKIP_MOTIF" != "xYES" -a "$enable_gui_canon" != "motif"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010551 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether or not to look for Motif" >&5
10552printf %s "checking whether or not to look for Motif... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000010553 # Check whether --enable-motif-check was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010554if test ${enable_motif_check+y}
10555then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000010556 enableval=$enable_motif_check;
Christian Brabandt9670f612025-05-07 21:44:33 +020010557else case e in #(
10558 e) enable_motif_check="yes" ;;
10559esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000010560fi
10561
Illia Bobyra96d5442023-08-30 16:30:15 +020010562 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_motif_check" >&5
10563printf "%s\n" "$enable_motif_check" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010564 if test "x$enable_motif_check" = "xno"; then
10565 SKIP_MOTIF=YES
10566 fi
10567fi
10568
Bram Moolenaar071d4272004-06-13 20:20:40 +000010569
10570
10571
10572
10573
10574
Drew Vogel51995672025-05-28 21:13:52 +020010575if test -z "$PKG_CONFIG"; then
Bram Moolenaar427f5b62019-06-09 13:43:51 +020010576 if test -n "$ac_tool_prefix"; then
Bram Moolenaard6d30422018-01-28 22:48:55 +010010577 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10578set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +020010579{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10580printf %s "checking for $ac_word... " >&6; }
10581if test ${ac_cv_path_PKG_CONFIG+y}
10582then :
10583 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020010584else case e in #(
10585 e) case $PKG_CONFIG in
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010586 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +000010587 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10588 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +000010589 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010590 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10591for as_dir in $PATH
10592do
10593 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +020010594 case $as_dir in #(((
10595 '') as_dir=./ ;;
10596 */) ;;
10597 *) as_dir=$as_dir/ ;;
10598 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010599 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +020010600 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10601 ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
10602 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010603 break 2
10604 fi
10605done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010606 done
Bram Moolenaar446cb832008-06-24 21:56:24 +000010607IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010608
Bram Moolenaar071d4272004-06-13 20:20:40 +000010609 ;;
Christian Brabandt9670f612025-05-07 21:44:33 +020010610esac ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +000010611esac
10612fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010613PKG_CONFIG=$ac_cv_path_PKG_CONFIG
Bram Moolenaar071d4272004-06-13 20:20:40 +000010614if test -n "$PKG_CONFIG"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010615 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10616printf "%s\n" "$PKG_CONFIG" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010617else
Illia Bobyra96d5442023-08-30 16:30:15 +020010618 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10619printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010620fi
10621
Bram Moolenaar446cb832008-06-24 21:56:24 +000010622
Bram Moolenaard6d30422018-01-28 22:48:55 +010010623fi
10624if test -z "$ac_cv_path_PKG_CONFIG"; then
10625 ac_pt_PKG_CONFIG=$PKG_CONFIG
10626 # Extract the first word of "pkg-config", so it can be a program name with args.
10627set dummy pkg-config; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +020010628{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10629printf %s "checking for $ac_word... " >&6; }
10630if test ${ac_cv_path_ac_pt_PKG_CONFIG+y}
10631then :
10632 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020010633else case e in #(
10634 e) case $ac_pt_PKG_CONFIG in
Bram Moolenaard6d30422018-01-28 22:48:55 +010010635 [\\/]* | ?:[\\/]*)
10636 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10637 ;;
10638 *)
10639 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10640for as_dir in $PATH
10641do
10642 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +020010643 case $as_dir in #(((
10644 '') as_dir=./ ;;
10645 */) ;;
10646 *) as_dir=$as_dir/ ;;
10647 esac
Bram Moolenaard6d30422018-01-28 22:48:55 +010010648 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +020010649 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10650 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
10651 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaard6d30422018-01-28 22:48:55 +010010652 break 2
10653 fi
10654done
10655 done
10656IFS=$as_save_IFS
10657
10658 ;;
Christian Brabandt9670f612025-05-07 21:44:33 +020010659esac ;;
Bram Moolenaard6d30422018-01-28 22:48:55 +010010660esac
10661fi
10662ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10663if test -n "$ac_pt_PKG_CONFIG"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010664 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10665printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; }
Bram Moolenaard6d30422018-01-28 22:48:55 +010010666else
Illia Bobyra96d5442023-08-30 16:30:15 +020010667 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10668printf "%s\n" "no" >&6; }
Bram Moolenaard6d30422018-01-28 22:48:55 +010010669fi
10670
10671 if test "x$ac_pt_PKG_CONFIG" = x; then
10672 PKG_CONFIG="no"
10673 else
10674 case $cross_compiling:$ac_tool_warned in
10675yes:)
Illia Bobyra96d5442023-08-30 16:30:15 +020010676{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10677printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Bram Moolenaard6d30422018-01-28 22:48:55 +010010678ac_tool_warned=yes ;;
10679esac
10680 PKG_CONFIG=$ac_pt_PKG_CONFIG
10681 fi
10682else
10683 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10684fi
10685
Bram Moolenaar427f5b62019-06-09 13:43:51 +020010686fi
10687
Drew Vogel51995672025-05-28 21:13:52 +020010688if test -z "$SKIP_GTK3"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010689 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-gtktest argument" >&5
10690printf %s "checking --disable-gtktest argument... " >&6; }
Bram Moolenaar427f5b62019-06-09 13:43:51 +020010691 # Check whether --enable-gtktest was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010692if test ${enable_gtktest+y}
10693then :
Bram Moolenaar427f5b62019-06-09 13:43:51 +020010694 enableval=$enable_gtktest;
Christian Brabandt9670f612025-05-07 21:44:33 +020010695else case e in #(
10696 e) enable_gtktest=yes ;;
10697esac
Bram Moolenaar427f5b62019-06-09 13:43:51 +020010698fi
10699
10700 if test "x$enable_gtktest" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010701 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gtk test enabled" >&5
10702printf "%s\n" "gtk test enabled" >&6; }
Bram Moolenaar427f5b62019-06-09 13:43:51 +020010703 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010704 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gtk test disabled" >&5
10705printf "%s\n" "gtk test disabled" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010706 fi
10707
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010708 if test "x$PKG_CONFIG" != "xno"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010709
Drew Vogel51995672025-05-28 21:13:52 +020010710 min_gtk_version="3.0.0"
10711
10712 if test "$PKG_CONFIG" != "no"; then
10713 case $min_gtk_version in #(
10714 2.*) :
10715 gtk_pkg_name="gtk+-2.0" ;; #(
10716 3.*) :
10717 gtk_pkg_name="gtk+-3.0" ;; #(
10718 *) :
10719 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
10720printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
10721as_fn_error $? "The configure script does not know which pkg-config name to use for GTK $min_gtk_version\"
10722See 'config.log' for more details" "$LINENO" 5; } ;;
10723esac
10724
10725 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pkg-config $gtk_pkg_name" >&5
10726printf %s "checking for pkg-config $gtk_pkg_name... " >&6; }
10727 if "$PKG_CONFIG" --exists "$gtk_pkg_name"
10728then :
10729
10730 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found" >&5
10731printf "%s\n" "found" >&6; }
10732 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GTK - version >= $min_gtk_version" >&5
10733printf %s "checking for GTK - version >= $min_gtk_version... " >&6; }
10734 GTK_CFLAGS=`$PKG_CONFIG --cflags $gtk_pkg_name`
10735 GTK_LIBDIR=`$PKG_CONFIG --libs-only-L $gtk_pkg_name`
10736 GTK_LIBS=`$PKG_CONFIG --libs $gtk_pkg_name`
10737 gtk_major_version=`$PKG_CONFIG --modversion $gtk_pkg_name | \
10738 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
10739 gtk_minor_version=`$PKG_CONFIG --modversion $gtk_pkg_name | \
10740 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
10741 gtk_micro_version=`$PKG_CONFIG --modversion $gtk_pkg_name | \
10742 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
10743 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&5
10744printf "%s\n" "yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&6; }
10745
10746else case e in #(
10747 e)
10748 GTK_CFLAGS=""
10749 GTK_LIBDIR=""
10750 GTK_LIBS=""
10751 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no; consider installing your distro GTK -dev package" >&5
10752printf "%s\n" "no; consider installing your distro GTK -dev package" >&6; }
10753 if test "$fail_if_missing" = "yes" -a "$gui_auto" != "yes"; then
10754 as_fn_error $? "pkg-config could not find $gtk_pkg_name" "$LINENO" 5
10755 fi
10756 ;;
10757esac
10758fi
10759 fi
10760
10761 gtktest_success="yes"
10762 if test "$enable_gtktest" = "yes"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000010763 {
Drew Vogel51995672025-05-28 21:13:52 +020010764 ac_save_CFLAGS="$CFLAGS"
10765 ac_save_LIBS="$LIBS"
10766 CFLAGS="$CFLAGS $GTK_CFLAGS"
10767 LIBS="$LIBS $GTK_LIBS"
Bram Moolenaar98921892016-02-23 17:14:37 +010010768
Drew Vogel51995672025-05-28 21:13:52 +020010769 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking ability to compile GTK test program" >&5
10770printf %s "checking ability to compile GTK test program... " >&6; }
10771 if test "$cross_compiling" = yes
Illia Bobyra96d5442023-08-30 16:30:15 +020010772then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000010773 echo $ac_n "cross compiling; assumed OK... $ac_c"
Christian Brabandt9670f612025-05-07 21:44:33 +020010774else case e in #(
10775 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010776/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000010777
10778#include <gtk/gtk.h>
10779#include <stdio.h>
Bram Moolenaar446cb832008-06-24 21:56:24 +000010780#if STDC_HEADERS
10781# include <stdlib.h>
10782# include <stddef.h>
10783#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000010784
10785int
10786main ()
10787{
Drew Vogel51995672025-05-28 21:13:52 +020010788 int ex_major = $gtk_major_version;
10789 int ex_minor = $gtk_minor_version;
10790 int ex_micro = $gtk_micro_version;
Bram Moolenaar071d4272004-06-13 20:20:40 +000010791
Drew Vogel51995672025-05-28 21:13:52 +020010792 #if $gtk_major_version == 2
10793 guint ob_major = gtk_major_version;
10794 guint ob_minor = gtk_minor_version;
10795 guint ob_micro = gtk_micro_version;
10796 #else
10797 guint ob_major = gtk_get_major_version();
10798 guint ob_minor = gtk_get_minor_version();
10799 guint ob_micro = gtk_get_micro_version();
10800 #endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000010801
Drew Vogel51995672025-05-28 21:13:52 +020010802 if ((ob_major > ex_major) ||
10803 ((ob_major == ex_major)
10804 && (ob_minor > ex_minor)) ||
10805 ((ob_major == ex_major)
10806 && (ob_minor == ex_minor)
10807 && (ob_micro >= ex_micro)))
10808 return 0;
10809 else
10810 return 1;
Bram Moolenaar071d4272004-06-13 20:20:40 +000010811}
10812
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010813_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020010814if ac_fn_c_try_run "$LINENO"
10815then :
Drew Vogel51995672025-05-28 21:13:52 +020010816 gtktest_success="yes"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10817printf "%s\n" "yes" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +020010818else case e in #(
Drew Vogel51995672025-05-28 21:13:52 +020010819 e) gtktest_success="no"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10820printf "%s\n" "no" >&6; } ;;
Christian Brabandt9670f612025-05-07 21:44:33 +020010821esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010822fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010823rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
Christian Brabandt9670f612025-05-07 21:44:33 +020010824 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
10825esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010826fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000010827
Drew Vogel51995672025-05-28 21:13:52 +020010828 CFLAGS="$ac_save_CFLAGS"
10829 LIBS="$ac_save_LIBS"
Bram Moolenaar071d4272004-06-13 20:20:40 +000010830 }
Drew Vogel51995672025-05-28 21:13:52 +020010831 fi
10832
10833 if test "$gtktest_success" = "yes"; then
10834 GUI_LIB_LOC="$GTK_LIBDIR"
10835 GTK_LIBNAME="$GTK_LIBS"
10836 GUI_INC_LOC="$GTK_CFLAGS"
Bram Moolenaar071d4272004-06-13 20:20:40 +000010837 else
Drew Vogel51995672025-05-28 21:13:52 +020010838 GTK_CFLAGS=""
10839 GTK_LIBDIR=""
Bram Moolenaar071d4272004-06-13 20:20:40 +000010840 GTK_LIBS=""
Drew Vogel51995672025-05-28 21:13:52 +020010841 if test "$fail_if_missing" = "yes" -a "$gui_auto" != "yes"; then
10842 as_fn_error $? "Failed to compile GTK test program." "$LINENO" 5
10843 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000010844 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010845
10846
Bram Moolenaar071d4272004-06-13 20:20:40 +000010847
Drew Vogel51995672025-05-28 21:13:52 +020010848
10849 if test -n "$GTK_CFLAGS"; then
10850 SKIP_GTK2=YES
10851 SKIP_GNOME=YES
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010852 SKIP_MOTIF=YES
10853 GUITYPE=GTK
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010854
Drew Vogel51995672025-05-28 21:13:52 +020010855 printf "%s\n" "#define USE_GTK3 1" >>confdefs.h
10856
10857 fi
10858 fi
10859fi
10860
10861if test -z "$SKIP_GTK2"; then
10862 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-gtktest argument" >&5
10863printf %s "checking --disable-gtktest argument... " >&6; }
10864 # Check whether --enable-gtktest was given.
10865if test ${enable_gtktest+y}
10866then :
10867 enableval=$enable_gtktest;
10868else case e in #(
10869 e) enable_gtktest=yes ;;
10870esac
10871fi
10872
10873 if test "x$enable_gtktest" = "xyes" ; then
10874 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gtk test enabled" >&5
10875printf "%s\n" "gtk test enabled" >&6; }
10876 else
10877 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gtk test disabled" >&5
10878printf "%s\n" "gtk test disabled" >&6; }
10879 fi
10880
10881 if test "x$PKG_CONFIG" != "xno"; then
10882
10883 min_gtk_version="2.2.0"
10884
10885 if test "$PKG_CONFIG" != "no"; then
10886 case $min_gtk_version in #(
10887 2.*) :
10888 gtk_pkg_name="gtk+-2.0" ;; #(
10889 3.*) :
10890 gtk_pkg_name="gtk+-3.0" ;; #(
10891 *) :
10892 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
10893printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
10894as_fn_error $? "The configure script does not know which pkg-config name to use for GTK $min_gtk_version\"
10895See 'config.log' for more details" "$LINENO" 5; } ;;
10896esac
10897
10898 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pkg-config $gtk_pkg_name" >&5
10899printf %s "checking for pkg-config $gtk_pkg_name... " >&6; }
10900 if "$PKG_CONFIG" --exists "$gtk_pkg_name"
10901then :
10902
10903 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found" >&5
10904printf "%s\n" "found" >&6; }
10905 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GTK - version >= $min_gtk_version" >&5
10906printf %s "checking for GTK - version >= $min_gtk_version... " >&6; }
10907 GTK_CFLAGS=`$PKG_CONFIG --cflags $gtk_pkg_name`
10908 GTK_LIBDIR=`$PKG_CONFIG --libs-only-L $gtk_pkg_name`
10909 GTK_LIBS=`$PKG_CONFIG --libs $gtk_pkg_name`
10910 gtk_major_version=`$PKG_CONFIG --modversion $gtk_pkg_name | \
10911 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
10912 gtk_minor_version=`$PKG_CONFIG --modversion $gtk_pkg_name | \
10913 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
10914 gtk_micro_version=`$PKG_CONFIG --modversion $gtk_pkg_name | \
10915 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
10916 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&5
10917printf "%s\n" "yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&6; }
10918
10919else case e in #(
10920 e)
10921 GTK_CFLAGS=""
10922 GTK_LIBDIR=""
10923 GTK_LIBS=""
10924 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no; consider installing your distro GTK -dev package" >&5
10925printf "%s\n" "no; consider installing your distro GTK -dev package" >&6; }
10926 if test "$fail_if_missing" = "yes" -a "$gui_auto" != "yes"; then
10927 as_fn_error $? "pkg-config could not find $gtk_pkg_name" "$LINENO" 5
10928 fi
10929 ;;
10930esac
10931fi
10932 fi
10933
10934 gtktest_success="yes"
10935 if test "$enable_gtktest" = "yes"; then
10936 {
10937 ac_save_CFLAGS="$CFLAGS"
10938 ac_save_LIBS="$LIBS"
10939 CFLAGS="$CFLAGS $GTK_CFLAGS"
10940 LIBS="$LIBS $GTK_LIBS"
10941
10942 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking ability to compile GTK test program" >&5
10943printf %s "checking ability to compile GTK test program... " >&6; }
10944 if test "$cross_compiling" = yes
10945then :
10946 echo $ac_n "cross compiling; assumed OK... $ac_c"
10947else case e in #(
10948 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10949/* end confdefs.h. */
10950
10951#include <gtk/gtk.h>
10952#include <stdio.h>
10953#if STDC_HEADERS
10954# include <stdlib.h>
10955# include <stddef.h>
10956#endif
10957
10958int
10959main ()
10960{
10961 int ex_major = $gtk_major_version;
10962 int ex_minor = $gtk_minor_version;
10963 int ex_micro = $gtk_micro_version;
10964
10965 #if $gtk_major_version == 2
10966 guint ob_major = gtk_major_version;
10967 guint ob_minor = gtk_minor_version;
10968 guint ob_micro = gtk_micro_version;
10969 #else
10970 guint ob_major = gtk_get_major_version();
10971 guint ob_minor = gtk_get_minor_version();
10972 guint ob_micro = gtk_get_micro_version();
10973 #endif
10974
10975 if ((ob_major > ex_major) ||
10976 ((ob_major == ex_major)
10977 && (ob_minor > ex_minor)) ||
10978 ((ob_major == ex_major)
10979 && (ob_minor == ex_minor)
10980 && (ob_micro >= ex_micro)))
10981 return 0;
10982 else
10983 return 1;
10984}
10985
10986_ACEOF
10987if ac_fn_c_try_run "$LINENO"
10988then :
10989 gtktest_success="yes"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10990printf "%s\n" "yes" >&6; }
10991else case e in #(
10992 e) gtktest_success="no"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10993printf "%s\n" "no" >&6; } ;;
10994esac
10995fi
10996rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10997 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
10998esac
10999fi
11000
11001 CFLAGS="$ac_save_CFLAGS"
11002 LIBS="$ac_save_LIBS"
11003 }
11004 fi
11005
11006 if test "$gtktest_success" = "yes"; then
11007 GUI_LIB_LOC="$GTK_LIBDIR"
11008 GTK_LIBNAME="$GTK_LIBS"
11009 GUI_INC_LOC="$GTK_CFLAGS"
11010 else
11011 GTK_CFLAGS=""
11012 GTK_LIBDIR=""
11013 GTK_LIBS=""
11014 if test "$fail_if_missing" = "yes" -a "$gui_auto" != "yes"; then
11015 as_fn_error $? "Failed to compile GTK test program." "$LINENO" 5
11016 fi
11017 fi
11018
11019
11020
11021
11022 if test -n "$GTK_CFLAGS"; then
11023 SKIP_MOTIF=YES
11024 GUITYPE=GTK
11025
Bram Moolenaar071d4272004-06-13 20:20:40 +000011026 fi
11027 fi
Bram Moolenaar182c5be2010-06-25 05:37:59 +020011028 if test "x$GUITYPE" = "xGTK"; then
Bram Moolenaar182c5be2010-06-25 05:37:59 +020011029 if test -z "$SKIP_GNOME"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000011030 {
Bram Moolenaar071d4272004-06-13 20:20:40 +000011031
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011032
11033
11034
11035
11036
Bram Moolenaar446cb832008-06-24 21:56:24 +000011037# Check whether --with-gnome-includes was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020011038if test ${with_gnome_includes+y}
11039then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000011040 withval=$with_gnome_includes; CFLAGS="$CFLAGS -I$withval"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011041
Bram Moolenaar446cb832008-06-24 21:56:24 +000011042fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000011043
11044
Bram Moolenaar446cb832008-06-24 21:56:24 +000011045
11046# Check whether --with-gnome-libs was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020011047if test ${with_gnome_libs+y}
11048then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000011049 withval=$with_gnome_libs; LDFLAGS="$LDFLAGS -L$withval" gnome_prefix=$withval
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011050
Bram Moolenaar446cb832008-06-24 21:56:24 +000011051fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000011052
11053
Bram Moolenaar446cb832008-06-24 21:56:24 +000011054
11055# Check whether --with-gnome was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020011056if test ${with_gnome+y}
11057then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000011058 withval=$with_gnome; if test x$withval = xyes; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000011059 want_gnome=yes
11060 have_gnome=yes
11061 else
11062 if test "x$withval" = xno; then
11063 want_gnome=no
11064 else
11065 want_gnome=yes
11066 LDFLAGS="$LDFLAGS -L$withval/lib"
11067 CFLAGS="$CFLAGS -I$withval/include"
11068 gnome_prefix=$withval/lib
11069 fi
11070 fi
Christian Brabandt9670f612025-05-07 21:44:33 +020011071else case e in #(
11072 e) want_gnome=yes ;;
11073esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000011074fi
11075
Bram Moolenaar071d4272004-06-13 20:20:40 +000011076
Bram Moolenaar182c5be2010-06-25 05:37:59 +020011077 if test "x$want_gnome" = xyes; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000011078 {
Illia Bobyra96d5442023-08-30 16:30:15 +020011079 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libgnomeui-2.0" >&5
11080printf %s "checking for libgnomeui-2.0... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011081 if $PKG_CONFIG --exists libgnomeui-2.0; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011082 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11083printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011084 GNOME_LIBS=`$PKG_CONFIG --libs-only-l libgnomeui-2.0`
11085 GNOME_LIBDIR=`$PKG_CONFIG --libs-only-L libgnomeui-2.0`
11086 GNOME_INCLUDEDIR=`$PKG_CONFIG --cflags libgnomeui-2.0`
Bram Moolenaar97b2ad32006-03-18 21:40:56 +000011087
Illia Bobyra96d5442023-08-30 16:30:15 +020011088 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FreeBSD" >&5
11089printf %s "checking for FreeBSD... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +000011090 if test "$vim_cv_uname_output" = FreeBSD; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011091 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11092printf "%s\n" "yes" >&6; }
Bram Moolenaarc9b4b052006-04-30 18:54:39 +000011093 GNOME_INCLUDEDIR="$GNOME_INCLUDEDIR -D_THREAD_SAFE"
Bram Moolenaar97b2ad32006-03-18 21:40:56 +000011094 GNOME_LIBS="$GNOME_LIBS -pthread"
11095 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011096 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11097printf "%s\n" "no" >&6; }
Bram Moolenaar97b2ad32006-03-18 21:40:56 +000011098 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000011099 have_gnome=yes
11100 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011101 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11102printf "%s\n" "not found" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011103 if test "x" = xfail; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010011104 as_fn_error $? "Could not find libgnomeui-2.0 via pkg-config" "$LINENO" 5
Bram Moolenaar071d4272004-06-13 20:20:40 +000011105 fi
11106 fi
11107 }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011108 fi
11109
Bram Moolenaar182c5be2010-06-25 05:37:59 +020011110 if test "x$have_gnome" = xyes ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011111 printf "%s\n" "#define FEAT_GUI_GNOME 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000011112
Bram Moolenaar182c5be2010-06-25 05:37:59 +020011113 GUI_INC_LOC="$GUI_INC_LOC $GNOME_INCLUDEDIR"
11114 GTK_LIBNAME="$GTK_LIBNAME $GNOME_LIBDIR $GNOME_LIBS"
Bram Moolenaar071d4272004-06-13 20:20:40 +000011115 fi
11116 }
11117 fi
11118 fi
11119fi
11120
Bram Moolenaar36e294c2015-12-29 18:55:46 +010011121if test "x$GUITYPE" = "xGTK"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011122 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking version of Gdk-Pixbuf" >&5
11123printf %s "checking version of Gdk-Pixbuf... " >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010011124 gdk_pixbuf_version=`$PKG_CONFIG --modversion gdk-pixbuf-2.0`
11125 if test "x$gdk_pixbuf_version" != x ; then
11126 gdk_pixbuf_version_minor=`echo $gdk_pixbuf_version | \
11127 sed -e 's/[0-9][0-9]*\.\([0-9][0-9]*\)\.[0-9][0-9]*/\1/'`
11128 if test "x$gdk_pixbuf_version_minor" != x -a \
Bram Moolenaar33c31d52016-02-22 21:07:06 +010011129 $gdk_pixbuf_version_minor -ge 31 ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011130 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: OK." >&5
11131printf "%s\n" "OK." >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010011132 # Extract the first word of "glib-compile-resources", so it can be a program name with args.
11133set dummy glib-compile-resources; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +020011134{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11135printf %s "checking for $ac_word... " >&6; }
11136if test ${ac_cv_path_GLIB_COMPILE_RESOURCES+y}
11137then :
11138 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020011139else case e in #(
11140 e) case $GLIB_COMPILE_RESOURCES in
Bram Moolenaar36e294c2015-12-29 18:55:46 +010011141 [\\/]* | ?:[\\/]*)
11142 ac_cv_path_GLIB_COMPILE_RESOURCES="$GLIB_COMPILE_RESOURCES" # Let the user override the test with a path.
11143 ;;
11144 *)
11145 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11146for as_dir in $PATH
11147do
11148 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +020011149 case $as_dir in #(((
11150 '') as_dir=./ ;;
11151 */) ;;
11152 *) as_dir=$as_dir/ ;;
11153 esac
Bram Moolenaar36e294c2015-12-29 18:55:46 +010011154 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +020011155 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
11156 ac_cv_path_GLIB_COMPILE_RESOURCES="$as_dir$ac_word$ac_exec_ext"
11157 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar36e294c2015-12-29 18:55:46 +010011158 break 2
11159 fi
11160done
11161 done
11162IFS=$as_save_IFS
11163
11164 test -z "$ac_cv_path_GLIB_COMPILE_RESOURCES" && ac_cv_path_GLIB_COMPILE_RESOURCES="no"
11165 ;;
Christian Brabandt9670f612025-05-07 21:44:33 +020011166esac ;;
Bram Moolenaar36e294c2015-12-29 18:55:46 +010011167esac
11168fi
11169GLIB_COMPILE_RESOURCES=$ac_cv_path_GLIB_COMPILE_RESOURCES
11170if test -n "$GLIB_COMPILE_RESOURCES"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011171 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GLIB_COMPILE_RESOURCES" >&5
11172printf "%s\n" "$GLIB_COMPILE_RESOURCES" >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010011173else
Illia Bobyra96d5442023-08-30 16:30:15 +020011174 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11175printf "%s\n" "no" >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010011176fi
11177
11178
Illia Bobyra96d5442023-08-30 16:30:15 +020011179 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking glib-compile-resources" >&5
11180printf %s "checking glib-compile-resources... " >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010011181 if test "x$GLIB_COMPILE_RESOURCES" = xno ; then
Bram Moolenaar33c31d52016-02-22 21:07:06 +010011182 GLIB_COMPILE_RESOURCES=""
Illia Bobyra96d5442023-08-30 16:30:15 +020011183 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot be found in PATH." >&5
11184printf "%s\n" "cannot be found in PATH." >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010011185 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011186 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: usable." >&5
11187printf "%s\n" "usable." >&6; }
11188 printf "%s\n" "#define USE_GRESOURCE 1" >>confdefs.h
Bram Moolenaar36e294c2015-12-29 18:55:46 +010011189
Bram Moolenaar33c31d52016-02-22 21:07:06 +010011190 GRESOURCE_SRC="auto/gui_gtk_gresources.c"
11191 GRESOURCE_OBJ="objects/gui_gtk_gresources.o"
Bram Moolenaar36e294c2015-12-29 18:55:46 +010011192 fi
11193 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011194 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable." >&5
11195printf "%s\n" "not usable." >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010011196 fi
11197 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011198 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot obtain from pkg_config." >&5
11199printf "%s\n" "cannot obtain from pkg_config." >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010011200 fi
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011201
Illia Bobyra96d5442023-08-30 16:30:15 +020011202 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-icon-cache-update argument" >&5
11203printf %s "checking --disable-icon-cache-update argument... " >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011204 # Check whether --enable-icon_cache_update was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020011205if test ${enable_icon_cache_update+y}
11206then :
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011207 enableval=$enable_icon_cache_update;
Christian Brabandt9670f612025-05-07 21:44:33 +020011208else case e in #(
11209 e) enable_icon_cache_update="yes" ;;
11210esac
Bram Moolenaar36e294c2015-12-29 18:55:46 +010011211fi
11212
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011213 if test "$enable_icon_cache_update" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011214 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not set" >&5
11215printf "%s\n" "not set" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011216 # Extract the first word of "gtk-update-icon-cache", so it can be a program name with args.
11217set dummy gtk-update-icon-cache; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +020011218{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11219printf %s "checking for $ac_word... " >&6; }
11220if test ${ac_cv_path_GTK_UPDATE_ICON_CACHE+y}
11221then :
11222 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020011223else case e in #(
11224 e) case $GTK_UPDATE_ICON_CACHE in
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011225 [\\/]* | ?:[\\/]*)
11226 ac_cv_path_GTK_UPDATE_ICON_CACHE="$GTK_UPDATE_ICON_CACHE" # Let the user override the test with a path.
11227 ;;
11228 *)
11229 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11230for as_dir in $PATH
11231do
11232 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +020011233 case $as_dir in #(((
11234 '') as_dir=./ ;;
11235 */) ;;
11236 *) as_dir=$as_dir/ ;;
11237 esac
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011238 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +020011239 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
11240 ac_cv_path_GTK_UPDATE_ICON_CACHE="$as_dir$ac_word$ac_exec_ext"
11241 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011242 break 2
11243 fi
11244done
11245 done
11246IFS=$as_save_IFS
11247
11248 test -z "$ac_cv_path_GTK_UPDATE_ICON_CACHE" && ac_cv_path_GTK_UPDATE_ICON_CACHE="no"
11249 ;;
Christian Brabandt9670f612025-05-07 21:44:33 +020011250esac ;;
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011251esac
11252fi
11253GTK_UPDATE_ICON_CACHE=$ac_cv_path_GTK_UPDATE_ICON_CACHE
11254if test -n "$GTK_UPDATE_ICON_CACHE"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011255 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GTK_UPDATE_ICON_CACHE" >&5
11256printf "%s\n" "$GTK_UPDATE_ICON_CACHE" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011257else
Illia Bobyra96d5442023-08-30 16:30:15 +020011258 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11259printf "%s\n" "no" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011260fi
11261
11262
11263 if test "x$GTK_UPDATE_ICON_CACHE" = "xno" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011264 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found in PATH." >&5
11265printf "%s\n" "not found in PATH." >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011266 fi
11267 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011268 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: update disabled" >&5
11269printf "%s\n" "update disabled" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011270 fi
11271
Illia Bobyra96d5442023-08-30 16:30:15 +020011272 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-desktop-database-update argument" >&5
11273printf %s "checking --disable-desktop-database-update argument... " >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011274 # Check whether --enable-desktop_database_update was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020011275if test ${enable_desktop_database_update+y}
11276then :
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011277 enableval=$enable_desktop_database_update;
Christian Brabandt9670f612025-05-07 21:44:33 +020011278else case e in #(
11279 e) enable_desktop_database_update="yes" ;;
11280esac
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011281fi
11282
11283 if test "$enable_desktop_database_update" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011284 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not set" >&5
11285printf "%s\n" "not set" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011286 # Extract the first word of "update-desktop-database", so it can be a program name with args.
11287set dummy update-desktop-database; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +020011288{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11289printf %s "checking for $ac_word... " >&6; }
11290if test ${ac_cv_path_UPDATE_DESKTOP_DATABASE+y}
11291then :
11292 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020011293else case e in #(
11294 e) case $UPDATE_DESKTOP_DATABASE in
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011295 [\\/]* | ?:[\\/]*)
11296 ac_cv_path_UPDATE_DESKTOP_DATABASE="$UPDATE_DESKTOP_DATABASE" # Let the user override the test with a path.
11297 ;;
11298 *)
11299 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11300for as_dir in $PATH
11301do
11302 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +020011303 case $as_dir in #(((
11304 '') as_dir=./ ;;
11305 */) ;;
11306 *) as_dir=$as_dir/ ;;
11307 esac
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011308 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +020011309 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
11310 ac_cv_path_UPDATE_DESKTOP_DATABASE="$as_dir$ac_word$ac_exec_ext"
11311 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011312 break 2
11313 fi
11314done
11315 done
11316IFS=$as_save_IFS
11317
11318 test -z "$ac_cv_path_UPDATE_DESKTOP_DATABASE" && ac_cv_path_UPDATE_DESKTOP_DATABASE="no"
11319 ;;
Christian Brabandt9670f612025-05-07 21:44:33 +020011320esac ;;
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011321esac
11322fi
11323UPDATE_DESKTOP_DATABASE=$ac_cv_path_UPDATE_DESKTOP_DATABASE
11324if test -n "$UPDATE_DESKTOP_DATABASE"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011325 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $UPDATE_DESKTOP_DATABASE" >&5
11326printf "%s\n" "$UPDATE_DESKTOP_DATABASE" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011327else
Illia Bobyra96d5442023-08-30 16:30:15 +020011328 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11329printf "%s\n" "no" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011330fi
11331
11332
11333 if test "x$UPDATE_DESKTOP_DATABASE" = "xno" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011334 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found in PATH." >&5
11335printf "%s\n" "not found in PATH." >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011336 fi
11337 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011338 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: update disabled" >&5
11339printf "%s\n" "update disabled" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011340 fi
11341fi
11342
11343
11344
Bram Moolenaar36e294c2015-12-29 18:55:46 +010011345
11346
11347
11348
Bram Moolenaar071d4272004-06-13 20:20:40 +000011349if test -z "$SKIP_MOTIF"; then
11350 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"
11351 GUI_INC_LOC="`echo $GUI_INC_LOC|sed 's%-I%%g'`"
11352
Illia Bobyra96d5442023-08-30 16:30:15 +020011353 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for location of Motif GUI includes" >&5
11354printf %s "checking for location of Motif GUI includes... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011355 gui_includes="`echo $x_includes|sed 's%/^/^/*$%%'` `echo "$gui_XXX" | sed s/XXX/include/g` $GUI_INC_LOC"
11356 GUI_INC_LOC=
11357 for try in $gui_includes; do
11358 if test -f "$try/Xm/Xm.h"; then
11359 GUI_INC_LOC=$try
11360 fi
11361 done
11362 if test -n "$GUI_INC_LOC"; then
11363 if test "$GUI_INC_LOC" = /usr/include; then
11364 GUI_INC_LOC=
Illia Bobyra96d5442023-08-30 16:30:15 +020011365 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: in default path" >&5
11366printf "%s\n" "in default path" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011367 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011368 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GUI_INC_LOC" >&5
11369printf "%s\n" "$GUI_INC_LOC" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011370 fi
11371 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011372 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <not found>" >&5
11373printf "%s\n" "<not found>" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011374 SKIP_MOTIF=YES
11375 fi
11376fi
11377
11378
11379if test -z "$SKIP_MOTIF"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011380 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-motif-lib argument" >&5
11381printf %s "checking --with-motif-lib argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011382
Bram Moolenaar446cb832008-06-24 21:56:24 +000011383# Check whether --with-motif-lib was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020011384if test ${with_motif_lib+y}
11385then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000011386 withval=$with_motif_lib; MOTIF_LIBNAME="${withval}"
11387fi
11388
Bram Moolenaar071d4272004-06-13 20:20:40 +000011389
11390 if test -n "$MOTIF_LIBNAME"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011391 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MOTIF_LIBNAME" >&5
11392printf "%s\n" "$MOTIF_LIBNAME" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011393 GUI_LIB_LOC=
11394 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011395 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11396printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011397
11398 GUI_LIB_LOC="`echo $GUI_LIB_LOC|sed 's%-L%%g'`"
11399
Illia Bobyra96d5442023-08-30 16:30:15 +020011400 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for location of Motif GUI libs" >&5
11401printf %s "checking for location of Motif GUI libs... " >&6; }
Bram Moolenaar01967f52023-04-12 16:24:03 +010011402 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 +000011403 GUI_LIB_LOC=
11404 for try in $gui_libs; do
Kelvin Leeb4716902022-04-04 17:20:01 +010011405 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 +000011406 if test -f "$libtry"; then
11407 GUI_LIB_LOC=$try
11408 fi
11409 done
11410 done
11411 if test -n "$GUI_LIB_LOC"; then
Bram Moolenaar01967f52023-04-12 16:24:03 +010011412 if test "$GUI_LIB_LOC" = /usr/lib \
11413 -o "$GUI_LIB_LOC" = /usr/lib64 \
Bram Moolenaar6324c3b2013-06-17 20:27:18 +020011414 -o "$GUI_LIB_LOC" = /usr/lib/i386-linux-gnu \
11415 -o "$GUI_LIB_LOC" = /usr/lib/x86_64-linux-gnu; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000011416 GUI_LIB_LOC=
Illia Bobyra96d5442023-08-30 16:30:15 +020011417 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: in default path" >&5
11418printf "%s\n" "in default path" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011419 else
11420 if test -n "$GUI_LIB_LOC"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011421 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GUI_LIB_LOC" >&5
11422printf "%s\n" "$GUI_LIB_LOC" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +000011423 if test "$vim_cv_uname_output" = SunOS &&
11424 echo $vim_cv_uname_r_output | grep '^5' >/dev/null; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000011425 GUI_LIB_LOC="$GUI_LIB_LOC -R $GUI_LIB_LOC"
11426 fi
11427 fi
11428 fi
11429 MOTIF_LIBNAME=-lXm
11430 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011431 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <not found>" >&5
11432printf "%s\n" "<not found>" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011433 SKIP_MOTIF=YES
11434 fi
11435 fi
11436fi
11437
11438if test -z "$SKIP_MOTIF"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000011439 GUITYPE=MOTIF
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011440
Bram Moolenaar071d4272004-06-13 20:20:40 +000011441fi
11442
Bram Moolenaare2adcf32022-03-12 11:57:25 +000011443if test -z "$SKIP_MOTIF"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000011444 if test -n "$GUI_INC_LOC"; then
11445 GUI_INC_LOC=-I"`echo $GUI_INC_LOC|sed 's%-I%%'`"
11446 fi
11447 if test -n "$GUI_LIB_LOC"; then
11448 GUI_LIB_LOC=-L"`echo $GUI_LIB_LOC|sed 's%-L%%'`"
11449 fi
11450
11451 ldflags_save=$LDFLAGS
11452 LDFLAGS="$X_LIBS $LDFLAGS"
Illia Bobyra96d5442023-08-30 16:30:15 +020011453 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XShapeQueryExtension in -lXext" >&5
11454printf %s "checking for XShapeQueryExtension in -lXext... " >&6; }
11455if test ${ac_cv_lib_Xext_XShapeQueryExtension+y}
11456then :
11457 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020011458else case e in #(
11459 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000011460LIBS="-lXext -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011461cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011462/* end confdefs.h. */
11463
Bram Moolenaar446cb832008-06-24 21:56:24 +000011464/* Override any GCC internal prototype to avoid an error.
11465 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020011466 builtin and then its argument prototype would still apply.
11467 The 'extern "C"' is for builds by C++ compilers;
11468 although this is not generally supported in C code supporting it here
11469 has little cost and some practical benefit (sr 110532). */
11470#ifdef __cplusplus
11471extern "C"
11472#endif
11473char XShapeQueryExtension (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011474int
Illia Bobyra96d5442023-08-30 16:30:15 +020011475main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011476{
Bram Moolenaar446cb832008-06-24 21:56:24 +000011477return XShapeQueryExtension ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011478 ;
11479 return 0;
11480}
11481_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011482if ac_fn_c_try_link "$LINENO"
11483then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011484 ac_cv_lib_Xext_XShapeQueryExtension=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020011485else case e in #(
11486 e) ac_cv_lib_Xext_XShapeQueryExtension=no ;;
11487esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000011488fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011489rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011490 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020011491LIBS=$ac_check_lib_save_LIBS ;;
11492esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011493fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011494{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
11495printf "%s\n" "$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
11496if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = xyes
11497then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000011498 GUI_X_LIBS="-lXext"
Bram Moolenaar071d4272004-06-13 20:20:40 +000011499fi
11500
Illia Bobyra96d5442023-08-30 16:30:15 +020011501 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wslen in -lw" >&5
11502printf %s "checking for wslen in -lw... " >&6; }
11503if test ${ac_cv_lib_w_wslen+y}
11504then :
11505 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020011506else case e in #(
11507 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000011508LIBS="-lw $GUI_X_LIBS -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011509cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011510/* end confdefs.h. */
11511
Bram Moolenaar446cb832008-06-24 21:56:24 +000011512/* Override any GCC internal prototype to avoid an error.
11513 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020011514 builtin and then its argument prototype would still apply.
11515 The 'extern "C"' is for builds by C++ compilers;
11516 although this is not generally supported in C code supporting it here
11517 has little cost and some practical benefit (sr 110532). */
11518#ifdef __cplusplus
11519extern "C"
11520#endif
11521char wslen (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011522int
Illia Bobyra96d5442023-08-30 16:30:15 +020011523main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011524{
Bram Moolenaar446cb832008-06-24 21:56:24 +000011525return wslen ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011526 ;
11527 return 0;
11528}
11529_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011530if ac_fn_c_try_link "$LINENO"
11531then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011532 ac_cv_lib_w_wslen=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020011533else case e in #(
11534 e) ac_cv_lib_w_wslen=no ;;
11535esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000011536fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011537rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011538 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020011539LIBS=$ac_check_lib_save_LIBS ;;
11540esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011541fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011542{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wslen" >&5
11543printf "%s\n" "$ac_cv_lib_w_wslen" >&6; }
11544if test "x$ac_cv_lib_w_wslen" = xyes
11545then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000011546 X_EXTRA_LIBS="$X_EXTRA_LIBS -lw"
Bram Moolenaar071d4272004-06-13 20:20:40 +000011547fi
11548
Illia Bobyra96d5442023-08-30 16:30:15 +020011549 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlsym in -ldl" >&5
11550printf %s "checking for dlsym in -ldl... " >&6; }
11551if test ${ac_cv_lib_dl_dlsym+y}
11552then :
11553 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020011554else case e in #(
11555 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000011556LIBS="-ldl $GUI_X_LIBS -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011557cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011558/* end confdefs.h. */
11559
Bram Moolenaar446cb832008-06-24 21:56:24 +000011560/* Override any GCC internal prototype to avoid an error.
11561 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020011562 builtin and then its argument prototype would still apply.
11563 The 'extern "C"' is for builds by C++ compilers;
11564 although this is not generally supported in C code supporting it here
11565 has little cost and some practical benefit (sr 110532). */
11566#ifdef __cplusplus
11567extern "C"
11568#endif
11569char dlsym (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011570int
Illia Bobyra96d5442023-08-30 16:30:15 +020011571main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011572{
Bram Moolenaar446cb832008-06-24 21:56:24 +000011573return dlsym ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011574 ;
11575 return 0;
11576}
11577_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011578if ac_fn_c_try_link "$LINENO"
11579then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011580 ac_cv_lib_dl_dlsym=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020011581else case e in #(
11582 e) ac_cv_lib_dl_dlsym=no ;;
11583esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000011584fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011585rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011586 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020011587LIBS=$ac_check_lib_save_LIBS ;;
11588esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011589fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011590{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlsym" >&5
11591printf "%s\n" "$ac_cv_lib_dl_dlsym" >&6; }
11592if test "x$ac_cv_lib_dl_dlsym" = xyes
11593then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000011594 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldl"
Bram Moolenaar071d4272004-06-13 20:20:40 +000011595fi
11596
Illia Bobyra96d5442023-08-30 16:30:15 +020011597 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XmuCreateStippledPixmap in -lXmu" >&5
11598printf %s "checking for XmuCreateStippledPixmap in -lXmu... " >&6; }
11599if test ${ac_cv_lib_Xmu_XmuCreateStippledPixmap+y}
11600then :
11601 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020011602else case e in #(
11603 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000011604LIBS="-lXmu $GUI_X_LIBS -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011605cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011606/* end confdefs.h. */
11607
Bram Moolenaar446cb832008-06-24 21:56:24 +000011608/* Override any GCC internal prototype to avoid an error.
11609 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020011610 builtin and then its argument prototype would still apply.
11611 The 'extern "C"' is for builds by C++ compilers;
11612 although this is not generally supported in C code supporting it here
11613 has little cost and some practical benefit (sr 110532). */
11614#ifdef __cplusplus
11615extern "C"
11616#endif
11617char XmuCreateStippledPixmap (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011618int
Illia Bobyra96d5442023-08-30 16:30:15 +020011619main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011620{
Bram Moolenaar446cb832008-06-24 21:56:24 +000011621return XmuCreateStippledPixmap ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011622 ;
11623 return 0;
11624}
11625_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011626if ac_fn_c_try_link "$LINENO"
11627then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011628 ac_cv_lib_Xmu_XmuCreateStippledPixmap=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020011629else case e in #(
11630 e) ac_cv_lib_Xmu_XmuCreateStippledPixmap=no ;;
11631esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000011632fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011633rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011634 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020011635LIBS=$ac_check_lib_save_LIBS ;;
11636esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011637fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011638{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuCreateStippledPixmap" >&5
11639printf "%s\n" "$ac_cv_lib_Xmu_XmuCreateStippledPixmap" >&6; }
11640if test "x$ac_cv_lib_Xmu_XmuCreateStippledPixmap" = xyes
11641then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000011642 GUI_X_LIBS="-lXmu $GUI_X_LIBS"
Bram Moolenaar071d4272004-06-13 20:20:40 +000011643fi
11644
11645 if test -z "$SKIP_MOTIF"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011646 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XpEndJob in -lXp" >&5
11647printf %s "checking for XpEndJob in -lXp... " >&6; }
11648if test ${ac_cv_lib_Xp_XpEndJob+y}
11649then :
11650 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020011651else case e in #(
11652 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000011653LIBS="-lXp $GUI_X_LIBS -lXm -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011654cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011655/* end confdefs.h. */
11656
Bram Moolenaar446cb832008-06-24 21:56:24 +000011657/* Override any GCC internal prototype to avoid an error.
11658 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020011659 builtin and then its argument prototype would still apply.
11660 The 'extern "C"' is for builds by C++ compilers;
11661 although this is not generally supported in C code supporting it here
11662 has little cost and some practical benefit (sr 110532). */
11663#ifdef __cplusplus
11664extern "C"
11665#endif
11666char XpEndJob (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011667int
Illia Bobyra96d5442023-08-30 16:30:15 +020011668main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011669{
Bram Moolenaar446cb832008-06-24 21:56:24 +000011670return XpEndJob ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011671 ;
11672 return 0;
11673}
11674_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011675if ac_fn_c_try_link "$LINENO"
11676then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011677 ac_cv_lib_Xp_XpEndJob=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020011678else case e in #(
11679 e) ac_cv_lib_Xp_XpEndJob=no ;;
11680esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000011681fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011682rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011683 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020011684LIBS=$ac_check_lib_save_LIBS ;;
11685esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011686fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011687{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpEndJob" >&5
11688printf "%s\n" "$ac_cv_lib_Xp_XpEndJob" >&6; }
11689if test "x$ac_cv_lib_Xp_XpEndJob" = xyes
11690then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000011691 GUI_X_LIBS="-lXp $GUI_X_LIBS"
Bram Moolenaar071d4272004-06-13 20:20:40 +000011692fi
11693
11694 fi
11695 LDFLAGS=$ldflags_save
11696
Illia Bobyra96d5442023-08-30 16:30:15 +020011697 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for extra X11 defines" >&5
11698printf %s "checking for extra X11 defines... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011699 NARROW_PROTO=
11700 rm -fr conftestdir
11701 if mkdir conftestdir; then
11702 cd conftestdir
11703 cat > Imakefile <<'EOF'
11704acfindx:
11705 @echo 'NARROW_PROTO="${PROTO_DEFINES}"'
11706EOF
11707 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
11708 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
11709 fi
11710 cd ..
11711 rm -fr conftestdir
11712 fi
11713 if test -z "$NARROW_PROTO"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011714 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11715printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011716 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011717 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NARROW_PROTO" >&5
11718printf "%s\n" "$NARROW_PROTO" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011719 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011720
Bram Moolenaar071d4272004-06-13 20:20:40 +000011721fi
11722
11723if test "$enable_xsmp" = "yes"; then
11724 cppflags_save=$CPPFLAGS
11725 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
Illia Bobyra96d5442023-08-30 16:30:15 +020011726 ac_fn_c_check_header_compile "$LINENO" "X11/SM/SMlib.h" "ac_cv_header_X11_SM_SMlib_h" "$ac_includes_default"
11727if test "x$ac_cv_header_X11_SM_SMlib_h" = xyes
11728then :
11729 printf "%s\n" "#define HAVE_X11_SM_SMLIB_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011730
11731fi
11732
Bram Moolenaar071d4272004-06-13 20:20:40 +000011733 CPPFLAGS=$cppflags_save
11734fi
11735
11736
Bram Moolenaarf52fac22022-03-11 16:01:26 +000011737if test -z "$SKIP_MOTIF" -o -z "$SKIP_GTK2" -o -z "$SKIP_GTK3"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000011738 cppflags_save=$CPPFLAGS
11739 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
Illia Bobyra96d5442023-08-30 16:30:15 +020011740 ac_fn_c_check_header_compile "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default"
11741if test "x$ac_cv_header_X11_xpm_h" = xyes
11742then :
11743 printf "%s\n" "#define HAVE_X11_XPM_H 1" >>confdefs.h
11744
11745fi
11746ac_fn_c_check_header_compile "$LINENO" "X11/Sunkeysym.h" "ac_cv_header_X11_Sunkeysym_h" "$ac_includes_default"
11747if test "x$ac_cv_header_X11_Sunkeysym_h" = xyes
11748then :
11749 printf "%s\n" "#define HAVE_X11_SUNKEYSYM_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011750
11751fi
11752
Bram Moolenaar071d4272004-06-13 20:20:40 +000011753
11754 if test ! "$enable_xim" = "no"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011755 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XIMText in X11/Xlib.h" >&5
11756printf %s "checking for XIMText in X11/Xlib.h... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011758/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000011759#include <X11/Xlib.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011760_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000011761if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Christian Brabandt9670f612025-05-07 21:44:33 +020011762 $EGREP_TRADITIONAL "XIMText" >/dev/null 2>&1
Illia Bobyra96d5442023-08-30 16:30:15 +020011763then :
11764 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11765printf "%s\n" "yes" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +020011766else case e in #(
11767 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no; xim has been disabled" >&5
11768printf "%s\n" "no; xim has been disabled" >&6; }; enable_xim="no" ;;
11769esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000011770fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011771rm -rf conftest*
Bram Moolenaar071d4272004-06-13 20:20:40 +000011772
11773 fi
11774 CPPFLAGS=$cppflags_save
11775
Bram Moolenaar54612582019-11-21 17:13:31 +010011776 if test "$enable_xim" = "auto" -a "x$GUITYPE" != "xNONE" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011777 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: X GUI selected; xim has been enabled" >&5
11778printf "%s\n" "X GUI selected; xim has been enabled" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011779 enable_xim="yes"
11780 fi
11781fi
11782
Bram Moolenaarf52fac22022-03-11 16:01:26 +000011783if test -z "$SKIP_MOTIF"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000011784 cppflags_save=$CPPFLAGS
11785 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
Illia Bobyra96d5442023-08-30 16:30:15 +020011786 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for X11/Xmu/Editres.h" >&5
11787printf %s "checking for X11/Xmu/Editres.h... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011789/* end confdefs.h. */
Bram Moolenaar2ce06f62005-01-31 19:19:04 +000011790
11791#include <X11/Intrinsic.h>
11792#include <X11/Xmu/Editres.h>
11793int
Illia Bobyra96d5442023-08-30 16:30:15 +020011794main (void)
Bram Moolenaar2ce06f62005-01-31 19:19:04 +000011795{
11796int i; i = 0;
11797 ;
11798 return 0;
11799}
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011800_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011801if ac_fn_c_try_compile "$LINENO"
11802then :
11803 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11804printf "%s\n" "yes" >&6; }
11805 printf "%s\n" "#define HAVE_X11_XMU_EDITRES_H 1" >>confdefs.h
Bram Moolenaar2ce06f62005-01-31 19:19:04 +000011806
Christian Brabandt9670f612025-05-07 21:44:33 +020011807else case e in #(
11808 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11809printf "%s\n" "no" >&6; } ;;
11810esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000011811fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011812rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000011813 CPPFLAGS=$cppflags_save
11814fi
11815
11816if test -z "$SKIP_MOTIF"; then
11817 cppflags_save=$CPPFLAGS
11818 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
Bram Moolenaar77c19352012-06-13 19:19:41 +020011819 if test "$zOSUnix" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011820 ac_fn_c_check_header_compile "$LINENO" "Xm/Xm.h" "ac_cv_header_Xm_Xm_h" "$ac_includes_default"
11821if test "x$ac_cv_header_Xm_Xm_h" = xyes
11822then :
11823 printf "%s\n" "#define HAVE_XM_XM_H 1" >>confdefs.h
Bram Moolenaar1004b3d2022-06-05 19:51:55 +010011824
11825fi
11826
Bram Moolenaar77c19352012-06-13 19:19:41 +020011827 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011828 ac_fn_c_check_header_compile "$LINENO" "Xm/Xm.h" "ac_cv_header_Xm_Xm_h" "$ac_includes_default"
11829if test "x$ac_cv_header_Xm_Xm_h" = xyes
11830then :
11831 printf "%s\n" "#define HAVE_XM_XM_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011832
11833fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011834ac_fn_c_check_header_compile "$LINENO" "Xm/XpmP.h" "ac_cv_header_Xm_XpmP_h" "$ac_includes_default"
11835if test "x$ac_cv_header_Xm_XpmP_h" = xyes
11836then :
11837 printf "%s\n" "#define HAVE_XM_XPMP_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011838
Illia Bobyra96d5442023-08-30 16:30:15 +020011839fi
11840ac_fn_c_check_header_compile "$LINENO" "Xm/JoinSideT.h" "ac_cv_header_Xm_JoinSideT_h" "$ac_includes_default"
11841if test "x$ac_cv_header_Xm_JoinSideT_h" = xyes
11842then :
11843 printf "%s\n" "#define HAVE_XM_JOINSIDET_H 1" >>confdefs.h
11844
11845fi
11846ac_fn_c_check_header_compile "$LINENO" "Xm/TraitP.h" "ac_cv_header_Xm_TraitP_h" "$ac_includes_default"
11847if test "x$ac_cv_header_Xm_TraitP_h" = xyes
11848then :
11849 printf "%s\n" "#define HAVE_XM_TRAITP_H 1" >>confdefs.h
11850
11851fi
11852ac_fn_c_check_header_compile "$LINENO" "Xm/Manager.h" "ac_cv_header_Xm_Manager_h" "$ac_includes_default"
11853if test "x$ac_cv_header_Xm_Manager_h" = xyes
11854then :
11855 printf "%s\n" "#define HAVE_XM_MANAGER_H 1" >>confdefs.h
11856
11857fi
11858ac_fn_c_check_header_compile "$LINENO" "Xm/UnhighlightT.h" "ac_cv_header_Xm_UnhighlightT_h" "$ac_includes_default"
11859if test "x$ac_cv_header_Xm_UnhighlightT_h" = xyes
11860then :
11861 printf "%s\n" "#define HAVE_XM_UNHIGHLIGHTT_H 1" >>confdefs.h
11862
11863fi
11864ac_fn_c_check_header_compile "$LINENO" "Xm/Notebook.h" "ac_cv_header_Xm_Notebook_h" "$ac_includes_default"
11865if test "x$ac_cv_header_Xm_Notebook_h" = xyes
11866then :
11867 printf "%s\n" "#define HAVE_XM_NOTEBOOK_H 1" >>confdefs.h
11868
11869fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000011870
Bram Moolenaar1004b3d2022-06-05 19:51:55 +010011871 fi
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011872
Bram Moolenaar77c19352012-06-13 19:19:41 +020011873 if test "x$ac_cv_header_Xm_XpmP_h" = "xyes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011874 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XpmAttributes_21 in Xm/XpmP.h" >&5
11875printf %s "checking for XpmAttributes_21 in Xm/XpmP.h... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011877/* end confdefs.h. */
11878#include <Xm/XpmP.h>
11879int
Illia Bobyra96d5442023-08-30 16:30:15 +020011880main (void)
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011881{
11882XpmAttributes_21 attr;
11883 ;
11884 return 0;
11885}
11886_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011887if ac_fn_c_try_compile "$LINENO"
11888then :
11889 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11890printf "%s\n" "yes" >&6; }; printf "%s\n" "#define XPMATTRIBUTES_TYPE XpmAttributes_21" >>confdefs.h
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011891
Christian Brabandt9670f612025-05-07 21:44:33 +020011892else case e in #(
11893 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +020011894printf "%s\n" "no" >&6; }; printf "%s\n" "#define XPMATTRIBUTES_TYPE XpmAttributes" >>confdefs.h
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011895
Christian Brabandt9670f612025-05-07 21:44:33 +020011896 ;;
11897esac
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011898fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011899rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011900 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011901 printf "%s\n" "#define XPMATTRIBUTES_TYPE XpmAttributes" >>confdefs.h
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011902
11903 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000011904 CPPFLAGS=$cppflags_save
11905fi
11906
11907if test "x$GUITYPE" = "xNONE" -a "$enable_xim" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011908 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no GUI selected; xim has been disabled" >&5
11909printf "%s\n" "no GUI selected; xim has been disabled" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011910 enable_xim="no"
11911fi
11912if test "x$GUITYPE" = "xNONE" -a "$enable_fontset" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011913 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no GUI selected; fontset has been disabled" >&5
11914printf "%s\n" "no GUI selected; fontset has been disabled" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011915 enable_fontset="no"
11916fi
Bram Moolenaar182c5be2010-06-25 05:37:59 +020011917if test "x$GUITYPE:$enable_fontset" = "xGTK:yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011918 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: GTK+ 2 GUI selected; fontset has been disabled" >&5
11919printf "%s\n" "GTK+ 2 GUI selected; fontset has been disabled" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011920 enable_fontset="no"
11921fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000011922
Bram Moolenaarb3f74062020-02-26 16:16:53 +010011923if test -z "$SKIP_HAIKU"; then
11924 GUITYPE=HAIKUGUI
11925fi
11926
Bram Moolenaar071d4272004-06-13 20:20:40 +000011927if test -z "$SKIP_PHOTON"; then
11928 GUITYPE=PHOTONGUI
11929fi
11930
11931
11932
11933
11934
11935
11936if test "$enable_workshop" = "yes" -a -n "$SKIP_MOTIF"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010011937 as_fn_error $? "cannot use workshop without Motif" "$LINENO" 5
Bram Moolenaar071d4272004-06-13 20:20:40 +000011938fi
11939
11940if test "$enable_xim" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011941 printf "%s\n" "#define FEAT_XIM 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000011942
11943fi
11944if test "$enable_fontset" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011945 printf "%s\n" "#define FEAT_XFONTSET 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000011946
11947fi
11948
11949
11950
Illia Bobyra96d5442023-08-30 16:30:15 +020011951{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for /proc link to executable" >&5
11952printf %s "checking for /proc link to executable... " >&6; }
Bram Moolenaar5f69fee2017-03-09 11:58:40 +010011953if test -L "/proc/self/exe"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011954 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: /proc/self/exe" >&5
11955printf "%s\n" "/proc/self/exe" >&6; }
11956 printf "%s\n" "#define PROC_EXE_LINK \"/proc/self/exe\"" >>confdefs.h
Bram Moolenaarf3757f02017-03-16 15:13:45 +010011957
11958elif test -L "/proc/self/path/a.out"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011959 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: /proc/self/path/a.out" >&5
11960printf "%s\n" "/proc/self/path/a.out" >&6; }
11961 printf "%s\n" "#define PROC_EXE_LINK \"/proc/self/path/a.out\"" >>confdefs.h
Bram Moolenaarf3757f02017-03-16 15:13:45 +010011962
11963elif test -L "/proc/curproc/file"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011964 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: /proc/curproc/file" >&5
11965printf "%s\n" "/proc/curproc/file" >&6; }
11966 printf "%s\n" "#define PROC_EXE_LINK \"/proc/curproc/file\"" >>confdefs.h
Bram Moolenaar5f69fee2017-03-09 11:58:40 +010011967
11968else
Illia Bobyra96d5442023-08-30 16:30:15 +020011969 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11970printf "%s\n" "no" >&6; }
Bram Moolenaar5f69fee2017-03-09 11:58:40 +010011971fi
11972
Illia Bobyra96d5442023-08-30 16:30:15 +020011973{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CYGWIN or MSYS environment" >&5
11974printf %s "checking for CYGWIN or MSYS environment... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +000011975case $vim_cv_uname_output in
Illia Bobyra96d5442023-08-30 16:30:15 +020011976 CYGWIN*|MSYS*) CYGWIN=yes; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11977printf "%s\n" "yes" >&6; }
11978 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CYGWIN clipboard support" >&5
11979printf %s "checking for CYGWIN clipboard support... " >&6; }
Bram Moolenaar693e40c2013-02-26 14:56:42 +010011980 if test "x$with_x" = "xno" ; then
11981 OS_EXTRA_SRC=winclip.c; OS_EXTRA_OBJ=objects/winclip.o
Illia Bobyra96d5442023-08-30 16:30:15 +020011982 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11983printf "%s\n" "yes" >&6; }
11984 printf "%s\n" "#define FEAT_CYGWIN_WIN32_CLIPBOARD 1" >>confdefs.h
Bram Moolenaar693e40c2013-02-26 14:56:42 +010011985
11986 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011987 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no - using X11" >&5
11988printf "%s\n" "no - using X11" >&6; }
Bram Moolenaar693e40c2013-02-26 14:56:42 +010011989 fi ;;
11990
Illia Bobyra96d5442023-08-30 16:30:15 +020011991 *) CYGWIN=no; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11992printf "%s\n" "no" >&6; };;
Bram Moolenaar693e40c2013-02-26 14:56:42 +010011993esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000011994
Bram Moolenaar071d4272004-06-13 20:20:40 +000011995
Illia Bobyra96d5442023-08-30 16:30:15 +020011996{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether toupper is broken" >&5
11997printf %s "checking whether toupper is broken... " >&6; }
11998if test ${vim_cv_toupper_broken+y}
11999then :
12000 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020012001else case e in #(
12002 e)
Illia Bobyra96d5442023-08-30 16:30:15 +020012003 if test "$cross_compiling" = yes
12004then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000012005
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010012006 vim_cv_toupper_broken=no
12007 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cross-compiling: consider setting 'vim_cv_toupper_broken'" >&5
12008printf "%s\n" "$as_me: WARNING: cross-compiling: consider setting 'vim_cv_toupper_broken'" >&2;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000012009
Christian Brabandt9670f612025-05-07 21:44:33 +020012010else case e in #(
12011 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012012/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000012013
12014#include "confdefs.h"
Bram Moolenaar071d4272004-06-13 20:20:40 +000012015#include <ctype.h>
Bram Moolenaar446cb832008-06-24 21:56:24 +000012016#if STDC_HEADERS
12017# include <stdlib.h>
12018# include <stddef.h>
12019#endif
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010012020int main() { exit(toupper('A') == 'A' && tolower('z') == 'z'); }
Bram Moolenaar446cb832008-06-24 21:56:24 +000012021
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012022_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012023if ac_fn_c_try_run "$LINENO"
12024then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000012025
12026 vim_cv_toupper_broken=yes
12027
Christian Brabandt9670f612025-05-07 21:44:33 +020012028else case e in #(
12029 e)
Bram Moolenaar446cb832008-06-24 21:56:24 +000012030 vim_cv_toupper_broken=no
Christian Brabandt9670f612025-05-07 21:44:33 +020012031 ;;
12032esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000012033fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012034rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
Christian Brabandt9670f612025-05-07 21:44:33 +020012035 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
12036esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000012037fi
Christian Brabandt9670f612025-05-07 21:44:33 +020012038 ;;
12039esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000012040fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012041{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_toupper_broken" >&5
12042printf "%s\n" "$vim_cv_toupper_broken" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000012043
12044if test "x$vim_cv_toupper_broken" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012045 printf "%s\n" "#define BROKEN_TOUPPER 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000012046
12047fi
12048
Illia Bobyra96d5442023-08-30 16:30:15 +020012049{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __DATE__ and __TIME__ work" >&5
12050printf %s "checking whether __DATE__ and __TIME__ work... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012051cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012052/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000012053#include <stdio.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012054int
Illia Bobyra96d5442023-08-30 16:30:15 +020012055main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012056{
Bram Moolenaar071d4272004-06-13 20:20:40 +000012057printf("(" __DATE__ " " __TIME__ ")");
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012058 ;
12059 return 0;
12060}
12061_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012062if ac_fn_c_try_compile "$LINENO"
12063then :
12064 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12065printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_DATE_TIME 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000012066
Christian Brabandt9670f612025-05-07 21:44:33 +020012067else case e in #(
12068 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12069printf "%s\n" "no" >&6; } ;;
12070esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000012071fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012072rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000012073
Illia Bobyra96d5442023-08-30 16:30:15 +020012074{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __attribute__((unused)) is allowed" >&5
12075printf %s "checking whether __attribute__((unused)) is allowed... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012076cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar0c094b92009-05-14 20:20:33 +000012077/* end confdefs.h. */
12078#include <stdio.h>
12079int
Illia Bobyra96d5442023-08-30 16:30:15 +020012080main (void)
Bram Moolenaar0c094b92009-05-14 20:20:33 +000012081{
12082int x __attribute__((unused));
12083 ;
12084 return 0;
12085}
12086_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012087if ac_fn_c_try_compile "$LINENO"
12088then :
12089 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12090printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_ATTRIBUTE_UNUSED 1" >>confdefs.h
Bram Moolenaar0c094b92009-05-14 20:20:33 +000012091
Christian Brabandt9670f612025-05-07 21:44:33 +020012092else case e in #(
12093 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12094printf "%s\n" "no" >&6; } ;;
12095esac
Bram Moolenaar0c094b92009-05-14 20:20:33 +000012096fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012097rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0c094b92009-05-14 20:20:33 +000012098
Bram Moolenaar071d4272004-06-13 20:20:40 +000012099ac_header_dirent=no
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012100for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Christian Brabandt9670f612025-05-07 21:44:33 +020012101 as_ac_Header=`printf "%s\n" "ac_cv_header_dirent_$ac_hdr" | sed "$as_sed_sh"`
Illia Bobyra96d5442023-08-30 16:30:15 +020012102{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
12103printf %s "checking for $ac_hdr that defines DIR... " >&6; }
12104if eval test \${$as_ac_Header+y}
12105then :
12106 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020012107else case e in #(
12108 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012109/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012110#include <sys/types.h>
12111#include <$ac_hdr>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012112
12113int
Illia Bobyra96d5442023-08-30 16:30:15 +020012114main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012115{
12116if ((DIR *) 0)
12117return 0;
12118 ;
12119 return 0;
12120}
12121_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012122if ac_fn_c_try_compile "$LINENO"
12123then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012124 eval "$as_ac_Header=yes"
Christian Brabandt9670f612025-05-07 21:44:33 +020012125else case e in #(
12126 e) eval "$as_ac_Header=no" ;;
12127esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000012128fi
Christian Brabandt9670f612025-05-07 21:44:33 +020012129rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
12130esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000012131fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012132eval ac_res=\$$as_ac_Header
Illia Bobyra96d5442023-08-30 16:30:15 +020012133 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12134printf "%s\n" "$ac_res" >&6; }
12135if eval test \"x\$"$as_ac_Header"\" = x"yes"
12136then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012137 cat >>confdefs.h <<_ACEOF
Christian Brabandt9670f612025-05-07 21:44:33 +020012138#define `printf "%s\n" "HAVE_$ac_hdr" | sed "$as_sed_cpp"` 1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012139_ACEOF
12140
12141ac_header_dirent=$ac_hdr; break
Bram Moolenaar071d4272004-06-13 20:20:40 +000012142fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012143
Bram Moolenaar071d4272004-06-13 20:20:40 +000012144done
12145# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
12146if test $ac_header_dirent = dirent.h; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012147 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
12148printf %s "checking for library containing opendir... " >&6; }
12149if test ${ac_cv_search_opendir+y}
12150then :
12151 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020012152else case e in #(
12153 e) ac_func_search_save_LIBS=$LIBS
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012154cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012155/* end confdefs.h. */
12156
Bram Moolenaar446cb832008-06-24 21:56:24 +000012157/* Override any GCC internal prototype to avoid an error.
12158 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020012159 builtin and then its argument prototype would still apply.
12160 The 'extern "C"' is for builds by C++ compilers;
12161 although this is not generally supported in C code supporting it here
12162 has little cost and some practical benefit (sr 110532). */
12163#ifdef __cplusplus
12164extern "C"
12165#endif
12166char opendir (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012167int
Illia Bobyra96d5442023-08-30 16:30:15 +020012168main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012169{
Bram Moolenaar446cb832008-06-24 21:56:24 +000012170return opendir ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012171 ;
12172 return 0;
12173}
12174_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012175for ac_lib in '' dir
12176do
Bram Moolenaar446cb832008-06-24 21:56:24 +000012177 if test -z "$ac_lib"; then
12178 ac_res="none required"
12179 else
12180 ac_res=-l$ac_lib
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012181 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Bram Moolenaar446cb832008-06-24 21:56:24 +000012182 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012183 if ac_fn_c_try_link "$LINENO"
12184then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000012185 ac_cv_search_opendir=$ac_res
Bram Moolenaar071d4272004-06-13 20:20:40 +000012186fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012187rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012188 conftest$ac_exeext
Illia Bobyra96d5442023-08-30 16:30:15 +020012189 if test ${ac_cv_search_opendir+y}
12190then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000012191 break
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012192fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000012193done
Illia Bobyra96d5442023-08-30 16:30:15 +020012194if test ${ac_cv_search_opendir+y}
12195then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012196
Christian Brabandt9670f612025-05-07 21:44:33 +020012197else case e in #(
12198 e) ac_cv_search_opendir=no ;;
12199esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000012200fi
12201rm conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020012202LIBS=$ac_func_search_save_LIBS ;;
12203esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012204fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012205{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
12206printf "%s\n" "$ac_cv_search_opendir" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000012207ac_res=$ac_cv_search_opendir
Illia Bobyra96d5442023-08-30 16:30:15 +020012208if test "$ac_res" != no
12209then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000012210 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012211
12212fi
12213
Bram Moolenaar071d4272004-06-13 20:20:40 +000012214else
Illia Bobyra96d5442023-08-30 16:30:15 +020012215 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
12216printf %s "checking for library containing opendir... " >&6; }
12217if test ${ac_cv_search_opendir+y}
12218then :
12219 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020012220else case e in #(
12221 e) ac_func_search_save_LIBS=$LIBS
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012222cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012223/* end confdefs.h. */
12224
Bram Moolenaar446cb832008-06-24 21:56:24 +000012225/* Override any GCC internal prototype to avoid an error.
12226 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020012227 builtin and then its argument prototype would still apply.
12228 The 'extern "C"' is for builds by C++ compilers;
12229 although this is not generally supported in C code supporting it here
12230 has little cost and some practical benefit (sr 110532). */
12231#ifdef __cplusplus
12232extern "C"
12233#endif
12234char opendir (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012235int
Illia Bobyra96d5442023-08-30 16:30:15 +020012236main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012237{
Bram Moolenaar446cb832008-06-24 21:56:24 +000012238return opendir ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012239 ;
12240 return 0;
12241}
12242_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012243for ac_lib in '' x
12244do
Bram Moolenaar446cb832008-06-24 21:56:24 +000012245 if test -z "$ac_lib"; then
12246 ac_res="none required"
12247 else
12248 ac_res=-l$ac_lib
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012249 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Bram Moolenaar446cb832008-06-24 21:56:24 +000012250 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012251 if ac_fn_c_try_link "$LINENO"
12252then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000012253 ac_cv_search_opendir=$ac_res
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012254fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012255rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012256 conftest$ac_exeext
Illia Bobyra96d5442023-08-30 16:30:15 +020012257 if test ${ac_cv_search_opendir+y}
12258then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000012259 break
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012260fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000012261done
Illia Bobyra96d5442023-08-30 16:30:15 +020012262if test ${ac_cv_search_opendir+y}
12263then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012264
Christian Brabandt9670f612025-05-07 21:44:33 +020012265else case e in #(
12266 e) ac_cv_search_opendir=no ;;
12267esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000012268fi
12269rm conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020012270LIBS=$ac_func_search_save_LIBS ;;
12271esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012272fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012273{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
12274printf "%s\n" "$ac_cv_search_opendir" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000012275ac_res=$ac_cv_search_opendir
Illia Bobyra96d5442023-08-30 16:30:15 +020012276if test "$ac_res" != no
12277then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000012278 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012279
12280fi
12281
12282fi
12283
12284
Bram Moolenaar071d4272004-06-13 20:20:40 +000012285if test $ac_cv_header_sys_wait_h = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012286 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that defines union wait" >&5
12287printf %s "checking for sys/wait.h that defines union wait... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012289/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012290#include <sys/wait.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012291int
Illia Bobyra96d5442023-08-30 16:30:15 +020012292main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012293{
Bram Moolenaar071d4272004-06-13 20:20:40 +000012294union wait xx, yy; xx = yy
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012295 ;
12296 return 0;
12297}
12298_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012299if ac_fn_c_try_compile "$LINENO"
12300then :
12301 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12302printf "%s\n" "yes" >&6; }
12303 printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000012304
Illia Bobyra96d5442023-08-30 16:30:15 +020012305 printf "%s\n" "#define HAVE_UNION_WAIT 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000012306
Christian Brabandt9670f612025-05-07 21:44:33 +020012307else case e in #(
12308 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12309printf "%s\n" "no" >&6; } ;;
12310esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000012311fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012312rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000012313fi
12314
Illia Bobyra96d5442023-08-30 16:30:15 +020012315ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
12316if test "x$ac_cv_header_stdint_h" = xyes
12317then :
12318 printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h
12319
12320fi
12321ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
12322if test "x$ac_cv_header_stdlib_h" = xyes
12323then :
12324 printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h
12325
12326fi
12327ac_fn_c_check_header_compile "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default"
12328if test "x$ac_cv_header_string_h" = xyes
12329then :
12330 printf "%s\n" "#define HAVE_STRING_H 1" >>confdefs.h
12331
12332fi
12333ac_fn_c_check_header_compile "$LINENO" "sys/select.h" "ac_cv_header_sys_select_h" "$ac_includes_default"
12334if test "x$ac_cv_header_sys_select_h" = xyes
12335then :
12336 printf "%s\n" "#define HAVE_SYS_SELECT_H 1" >>confdefs.h
12337
12338fi
12339ac_fn_c_check_header_compile "$LINENO" "sys/utsname.h" "ac_cv_header_sys_utsname_h" "$ac_includes_default"
12340if test "x$ac_cv_header_sys_utsname_h" = xyes
12341then :
12342 printf "%s\n" "#define HAVE_SYS_UTSNAME_H 1" >>confdefs.h
12343
12344fi
12345ac_fn_c_check_header_compile "$LINENO" "termcap.h" "ac_cv_header_termcap_h" "$ac_includes_default"
12346if test "x$ac_cv_header_termcap_h" = xyes
12347then :
12348 printf "%s\n" "#define HAVE_TERMCAP_H 1" >>confdefs.h
12349
12350fi
12351ac_fn_c_check_header_compile "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default"
12352if test "x$ac_cv_header_fcntl_h" = xyes
12353then :
12354 printf "%s\n" "#define HAVE_FCNTL_H 1" >>confdefs.h
12355
12356fi
12357ac_fn_c_check_header_compile "$LINENO" "sgtty.h" "ac_cv_header_sgtty_h" "$ac_includes_default"
12358if test "x$ac_cv_header_sgtty_h" = xyes
12359then :
12360 printf "%s\n" "#define HAVE_SGTTY_H 1" >>confdefs.h
12361
12362fi
12363ac_fn_c_check_header_compile "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "$ac_includes_default"
12364if test "x$ac_cv_header_sys_ioctl_h" = xyes
12365then :
12366 printf "%s\n" "#define HAVE_SYS_IOCTL_H 1" >>confdefs.h
12367
12368fi
12369ac_fn_c_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default"
12370if test "x$ac_cv_header_sys_time_h" = xyes
12371then :
12372 printf "%s\n" "#define HAVE_SYS_TIME_H 1" >>confdefs.h
12373
12374fi
12375ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$ac_includes_default"
12376if test "x$ac_cv_header_sys_types_h" = xyes
12377then :
12378 printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h
12379
12380fi
12381ac_fn_c_check_header_compile "$LINENO" "termio.h" "ac_cv_header_termio_h" "$ac_includes_default"
12382if test "x$ac_cv_header_termio_h" = xyes
12383then :
12384 printf "%s\n" "#define HAVE_TERMIO_H 1" >>confdefs.h
12385
12386fi
12387ac_fn_c_check_header_compile "$LINENO" "iconv.h" "ac_cv_header_iconv_h" "$ac_includes_default"
12388if test "x$ac_cv_header_iconv_h" = xyes
12389then :
12390 printf "%s\n" "#define HAVE_ICONV_H 1" >>confdefs.h
12391
12392fi
12393ac_fn_c_check_header_compile "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
12394if test "x$ac_cv_header_inttypes_h" = xyes
12395then :
12396 printf "%s\n" "#define HAVE_INTTYPES_H 1" >>confdefs.h
12397
12398fi
12399ac_fn_c_check_header_compile "$LINENO" "langinfo.h" "ac_cv_header_langinfo_h" "$ac_includes_default"
12400if test "x$ac_cv_header_langinfo_h" = xyes
12401then :
12402 printf "%s\n" "#define HAVE_LANGINFO_H 1" >>confdefs.h
12403
12404fi
12405ac_fn_c_check_header_compile "$LINENO" "math.h" "ac_cv_header_math_h" "$ac_includes_default"
12406if test "x$ac_cv_header_math_h" = xyes
12407then :
12408 printf "%s\n" "#define HAVE_MATH_H 1" >>confdefs.h
12409
12410fi
12411ac_fn_c_check_header_compile "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
12412if test "x$ac_cv_header_unistd_h" = xyes
12413then :
12414 printf "%s\n" "#define HAVE_UNISTD_H 1" >>confdefs.h
12415
12416fi
12417ac_fn_c_check_header_compile "$LINENO" "stropts.h" "ac_cv_header_stropts_h" "$ac_includes_default"
12418if test "x$ac_cv_header_stropts_h" = xyes
12419then :
12420 printf "%s\n" "#define HAVE_STROPTS_H 1" >>confdefs.h
12421
12422fi
12423ac_fn_c_check_header_compile "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default"
12424if test "x$ac_cv_header_errno_h" = xyes
12425then :
12426 printf "%s\n" "#define HAVE_ERRNO_H 1" >>confdefs.h
12427
12428fi
12429ac_fn_c_check_header_compile "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" "$ac_includes_default"
12430if test "x$ac_cv_header_sys_resource_h" = xyes
12431then :
12432 printf "%s\n" "#define HAVE_SYS_RESOURCE_H 1" >>confdefs.h
12433
12434fi
12435ac_fn_c_check_header_compile "$LINENO" "sys/systeminfo.h" "ac_cv_header_sys_systeminfo_h" "$ac_includes_default"
12436if test "x$ac_cv_header_sys_systeminfo_h" = xyes
12437then :
12438 printf "%s\n" "#define HAVE_SYS_SYSTEMINFO_H 1" >>confdefs.h
12439
12440fi
12441ac_fn_c_check_header_compile "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default"
12442if test "x$ac_cv_header_locale_h" = xyes
12443then :
12444 printf "%s\n" "#define HAVE_LOCALE_H 1" >>confdefs.h
12445
12446fi
12447ac_fn_c_check_header_compile "$LINENO" "sys/stream.h" "ac_cv_header_sys_stream_h" "$ac_includes_default"
12448if test "x$ac_cv_header_sys_stream_h" = xyes
12449then :
12450 printf "%s\n" "#define HAVE_SYS_STREAM_H 1" >>confdefs.h
12451
12452fi
12453ac_fn_c_check_header_compile "$LINENO" "termios.h" "ac_cv_header_termios_h" "$ac_includes_default"
12454if test "x$ac_cv_header_termios_h" = xyes
12455then :
12456 printf "%s\n" "#define HAVE_TERMIOS_H 1" >>confdefs.h
12457
12458fi
12459ac_fn_c_check_header_compile "$LINENO" "libc.h" "ac_cv_header_libc_h" "$ac_includes_default"
12460if test "x$ac_cv_header_libc_h" = xyes
12461then :
12462 printf "%s\n" "#define HAVE_LIBC_H 1" >>confdefs.h
12463
12464fi
12465ac_fn_c_check_header_compile "$LINENO" "sys/statfs.h" "ac_cv_header_sys_statfs_h" "$ac_includes_default"
12466if test "x$ac_cv_header_sys_statfs_h" = xyes
12467then :
12468 printf "%s\n" "#define HAVE_SYS_STATFS_H 1" >>confdefs.h
12469
12470fi
12471ac_fn_c_check_header_compile "$LINENO" "poll.h" "ac_cv_header_poll_h" "$ac_includes_default"
12472if test "x$ac_cv_header_poll_h" = xyes
12473then :
12474 printf "%s\n" "#define HAVE_POLL_H 1" >>confdefs.h
12475
12476fi
12477ac_fn_c_check_header_compile "$LINENO" "sys/poll.h" "ac_cv_header_sys_poll_h" "$ac_includes_default"
12478if test "x$ac_cv_header_sys_poll_h" = xyes
12479then :
12480 printf "%s\n" "#define HAVE_SYS_POLL_H 1" >>confdefs.h
12481
12482fi
12483ac_fn_c_check_header_compile "$LINENO" "pwd.h" "ac_cv_header_pwd_h" "$ac_includes_default"
12484if test "x$ac_cv_header_pwd_h" = xyes
12485then :
12486 printf "%s\n" "#define HAVE_PWD_H 1" >>confdefs.h
12487
12488fi
12489ac_fn_c_check_header_compile "$LINENO" "utime.h" "ac_cv_header_utime_h" "$ac_includes_default"
12490if test "x$ac_cv_header_utime_h" = xyes
12491then :
12492 printf "%s\n" "#define HAVE_UTIME_H 1" >>confdefs.h
12493
12494fi
12495ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
12496if test "x$ac_cv_header_sys_param_h" = xyes
12497then :
12498 printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h
12499
12500fi
12501ac_fn_c_check_header_compile "$LINENO" "sys/ptms.h" "ac_cv_header_sys_ptms_h" "$ac_includes_default"
12502if test "x$ac_cv_header_sys_ptms_h" = xyes
12503then :
12504 printf "%s\n" "#define HAVE_SYS_PTMS_H 1" >>confdefs.h
12505
12506fi
12507ac_fn_c_check_header_compile "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
12508if test "x$ac_cv_header_libintl_h" = xyes
12509then :
12510 printf "%s\n" "#define HAVE_LIBINTL_H 1" >>confdefs.h
12511
12512fi
12513ac_fn_c_check_header_compile "$LINENO" "libgen.h" "ac_cv_header_libgen_h" "$ac_includes_default"
12514if test "x$ac_cv_header_libgen_h" = xyes
12515then :
12516 printf "%s\n" "#define HAVE_LIBGEN_H 1" >>confdefs.h
12517
12518fi
12519ac_fn_c_check_header_compile "$LINENO" "util/debug.h" "ac_cv_header_util_debug_h" "$ac_includes_default"
12520if test "x$ac_cv_header_util_debug_h" = xyes
12521then :
12522 printf "%s\n" "#define HAVE_UTIL_DEBUG_H 1" >>confdefs.h
12523
12524fi
12525ac_fn_c_check_header_compile "$LINENO" "util/msg18n.h" "ac_cv_header_util_msg18n_h" "$ac_includes_default"
12526if test "x$ac_cv_header_util_msg18n_h" = xyes
12527then :
12528 printf "%s\n" "#define HAVE_UTIL_MSG18N_H 1" >>confdefs.h
12529
12530fi
12531ac_fn_c_check_header_compile "$LINENO" "frame.h" "ac_cv_header_frame_h" "$ac_includes_default"
12532if test "x$ac_cv_header_frame_h" = xyes
12533then :
12534 printf "%s\n" "#define HAVE_FRAME_H 1" >>confdefs.h
12535
12536fi
12537ac_fn_c_check_header_compile "$LINENO" "sys/acl.h" "ac_cv_header_sys_acl_h" "$ac_includes_default"
12538if test "x$ac_cv_header_sys_acl_h" = xyes
12539then :
12540 printf "%s\n" "#define HAVE_SYS_ACL_H 1" >>confdefs.h
12541
12542fi
12543ac_fn_c_check_header_compile "$LINENO" "sys/access.h" "ac_cv_header_sys_access_h" "$ac_includes_default"
12544if test "x$ac_cv_header_sys_access_h" = xyes
12545then :
12546 printf "%s\n" "#define HAVE_SYS_ACCESS_H 1" >>confdefs.h
12547
12548fi
12549ac_fn_c_check_header_compile "$LINENO" "sys/sysinfo.h" "ac_cv_header_sys_sysinfo_h" "$ac_includes_default"
12550if test "x$ac_cv_header_sys_sysinfo_h" = xyes
12551then :
12552 printf "%s\n" "#define HAVE_SYS_SYSINFO_H 1" >>confdefs.h
12553
12554fi
12555ac_fn_c_check_header_compile "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
12556if test "x$ac_cv_header_wchar_h" = xyes
12557then :
12558 printf "%s\n" "#define HAVE_WCHAR_H 1" >>confdefs.h
12559
12560fi
12561ac_fn_c_check_header_compile "$LINENO" "wctype.h" "ac_cv_header_wctype_h" "$ac_includes_default"
12562if test "x$ac_cv_header_wctype_h" = xyes
12563then :
12564 printf "%s\n" "#define HAVE_WCTYPE_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012565
12566fi
12567
Bram Moolenaar071d4272004-06-13 20:20:40 +000012568
Illia Bobyra96d5442023-08-30 16:30:15 +020012569ac_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 +000012570# include <sys/stream.h>
12571#endif
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012572"
Illia Bobyra96d5442023-08-30 16:30:15 +020012573if test "x$ac_cv_header_sys_ptem_h" = xyes
12574then :
12575 printf "%s\n" "#define HAVE_SYS_PTEM_H 1" >>confdefs.h
Bram Moolenaar32f31b12009-05-21 13:20:59 +000012576
12577fi
12578
Bram Moolenaar32f31b12009-05-21 13:20:59 +000012579
Illia Bobyra96d5442023-08-30 16:30:15 +020012580ac_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 +000012581# include <sys/param.h>
12582#endif
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012583"
Illia Bobyra96d5442023-08-30 16:30:15 +020012584if test "x$ac_cv_header_sys_sysctl_h" = xyes
12585then :
12586 printf "%s\n" "#define HAVE_SYS_SYSCTL_H 1" >>confdefs.h
Bram Moolenaar00ca2842008-06-26 20:14:00 +000012587
12588fi
12589
Bram Moolenaar00ca2842008-06-26 20:14:00 +000012590
12591
Illia Bobyra96d5442023-08-30 16:30:15 +020012592{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_np.h" >&5
12593printf %s "checking for pthread_np.h... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012594cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012595/* end confdefs.h. */
12596
12597#include <pthread.h>
12598#include <pthread_np.h>
12599int
Illia Bobyra96d5442023-08-30 16:30:15 +020012600main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012601{
12602int i; i = 0;
12603 ;
12604 return 0;
12605}
12606_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012607if ac_fn_c_try_compile "$LINENO"
12608then :
12609 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12610printf "%s\n" "yes" >&6; }
12611 printf "%s\n" "#define HAVE_PTHREAD_NP_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012612
Christian Brabandt9670f612025-05-07 21:44:33 +020012613else case e in #(
12614 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12615printf "%s\n" "no" >&6; } ;;
12616esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012617fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012618rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012619
Illia Bobyra96d5442023-08-30 16:30:15 +020012620ac_fn_c_check_header_compile "$LINENO" "strings.h" "ac_cv_header_strings_h" "$ac_includes_default"
12621if test "x$ac_cv_header_strings_h" = xyes
12622then :
12623 printf "%s\n" "#define HAVE_STRINGS_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012624
12625fi
12626
Bram Moolenaard0573012017-10-28 21:11:06 +020012627if test "x$MACOS_X" = "xyes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012628 printf "%s\n" "#define NO_STRINGS_WITH_STRING_H 1" >>confdefs.h
Bram Moolenaar9372a112005-12-06 19:59:18 +000012629
12630else
Bram Moolenaar071d4272004-06-13 20:20:40 +000012631
Illia Bobyra96d5442023-08-30 16:30:15 +020012632{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strings.h can be included after string.h" >&5
12633printf %s "checking if strings.h can be included after string.h... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012634cppflags_save=$CPPFLAGS
12635CPPFLAGS="$CPPFLAGS $X_CFLAGS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012636cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012637/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012638
12639#if defined(_AIX) && !defined(_AIX51) && !defined(_NO_PROTO)
12640# define _NO_PROTO /* like in os_unix.h, causes conflict for AIX (Winn) */
12641 /* but don't do it on AIX 5.1 (Uribarri) */
12642#endif
12643#ifdef HAVE_XM_XM_H
12644# include <Xm/Xm.h> /* This breaks it for HP-UX 11 (Squassabia) */
12645#endif
12646#ifdef HAVE_STRING_H
12647# include <string.h>
12648#endif
12649#if defined(HAVE_STRINGS_H)
12650# include <strings.h>
12651#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000012652
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012653int
Illia Bobyra96d5442023-08-30 16:30:15 +020012654main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012655{
12656int i; i = 0;
12657 ;
12658 return 0;
12659}
12660_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012661if ac_fn_c_try_compile "$LINENO"
12662then :
12663 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12664printf "%s\n" "yes" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +020012665else case e in #(
12666 e) printf "%s\n" "#define NO_STRINGS_WITH_STRING_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012667
Illia Bobyra96d5442023-08-30 16:30:15 +020012668 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
Christian Brabandt9670f612025-05-07 21:44:33 +020012669printf "%s\n" "no" >&6; } ;;
12670esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000012671fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012672rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000012673CPPFLAGS=$cppflags_save
Bram Moolenaar9372a112005-12-06 19:59:18 +000012674fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000012675
Illia Bobyra96d5442023-08-30 16:30:15 +020012676{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12677printf %s "checking for an ANSI C-conforming const... " >&6; }
12678if test ${ac_cv_c_const+y}
12679then :
12680 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020012681else case e in #(
12682 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012683/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012684
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012685int
Illia Bobyra96d5442023-08-30 16:30:15 +020012686main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012687{
Bram Moolenaar7db77842014-03-27 17:40:59 +010012688
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012689#ifndef __cplusplus
Bram Moolenaar7db77842014-03-27 17:40:59 +010012690 /* Ultrix mips cc rejects this sort of thing. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012691 typedef int charset[2];
Bram Moolenaar7db77842014-03-27 17:40:59 +010012692 const charset cs = { 0, 0 };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012693 /* SunOS 4.1.1 cc rejects this. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000012694 char const *const *pcpcc;
12695 char **ppc;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012696 /* NEC SVR4.0.2 mips cc rejects this. */
12697 struct point {int x, y;};
12698 static struct point const zero = {0,0};
Illia Bobyra96d5442023-08-30 16:30:15 +020012699 /* IBM XL C 1.02.0.0 rejects this.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012700 It does not let you subtract one const X* pointer from another in
12701 an arm of an if-expression whose if-part is not a constant
12702 expression */
12703 const char *g = "string";
Bram Moolenaar446cb832008-06-24 21:56:24 +000012704 pcpcc = &g + (g ? g-g : 0);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012705 /* HPUX 7.0 cc rejects these. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000012706 ++pcpcc;
12707 ppc = (char**) pcpcc;
12708 pcpcc = (char const *const *) ppc;
Bram Moolenaar7db77842014-03-27 17:40:59 +010012709 { /* SCO 3.2v4 cc rejects this sort of thing. */
12710 char tx;
12711 char *t = &tx;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012712 char const *s = 0 ? (char *) 0 : (char const *) 0;
Bram Moolenaar071d4272004-06-13 20:20:40 +000012713
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012714 *t++ = 0;
Bram Moolenaar446cb832008-06-24 21:56:24 +000012715 if (s) return 0;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012716 }
12717 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12718 int x[] = {25, 17};
12719 const int *foo = &x[0];
12720 ++foo;
12721 }
12722 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12723 typedef const int *iptr;
12724 iptr p = 0;
12725 ++p;
12726 }
Illia Bobyra96d5442023-08-30 16:30:15 +020012727 { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012728 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Bram Moolenaar7db77842014-03-27 17:40:59 +010012729 struct s { int j; const int *ap[3]; } bx;
12730 struct s *b = &bx; b->j = 5;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012731 }
12732 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12733 const int foo = 10;
Bram Moolenaar446cb832008-06-24 21:56:24 +000012734 if (!foo) return 0;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012735 }
Bram Moolenaar446cb832008-06-24 21:56:24 +000012736 return !cs[0] && !zero.x;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012737#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000012738
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012739 ;
12740 return 0;
Bram Moolenaar071d4272004-06-13 20:20:40 +000012741}
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012742_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012743if ac_fn_c_try_compile "$LINENO"
12744then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012745 ac_cv_c_const=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020012746else case e in #(
12747 e) ac_cv_c_const=no ;;
12748esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012749fi
Christian Brabandt9670f612025-05-07 21:44:33 +020012750rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
12751esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012752fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012753{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12754printf "%s\n" "$ac_cv_c_const" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012755if test $ac_cv_c_const = no; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012756
Illia Bobyra96d5442023-08-30 16:30:15 +020012757printf "%s\n" "#define const /**/" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000012758
12759fi
12760
Illia Bobyra96d5442023-08-30 16:30:15 +020012761{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12762printf %s "checking for working volatile... " >&6; }
12763if test ${ac_cv_c_volatile+y}
12764then :
12765 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020012766else case e in #(
12767 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012768/* end confdefs.h. */
12769
12770int
Illia Bobyra96d5442023-08-30 16:30:15 +020012771main (void)
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012772{
12773
12774volatile int x;
12775int * volatile y = (int *) 0;
12776return !x && !y;
12777 ;
12778 return 0;
12779}
12780_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012781if ac_fn_c_try_compile "$LINENO"
12782then :
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012783 ac_cv_c_volatile=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020012784else case e in #(
12785 e) ac_cv_c_volatile=no ;;
12786esac
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012787fi
Christian Brabandt9670f612025-05-07 21:44:33 +020012788rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
12789esac
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012790fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012791{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5
12792printf "%s\n" "$ac_cv_c_volatile" >&6; }
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012793if test $ac_cv_c_volatile = no; then
12794
Illia Bobyra96d5442023-08-30 16:30:15 +020012795printf "%s\n" "#define volatile /**/" >>confdefs.h
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012796
12797fi
12798
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012799ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Illia Bobyra96d5442023-08-30 16:30:15 +020012800if test "x$ac_cv_type_mode_t" = xyes
12801then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012802
Christian Brabandt9670f612025-05-07 21:44:33 +020012803else case e in #(
12804 e)
Illia Bobyra96d5442023-08-30 16:30:15 +020012805printf "%s\n" "#define mode_t int" >>confdefs.h
Christian Brabandt9670f612025-05-07 21:44:33 +020012806 ;;
12807esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012808fi
12809
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012810ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Illia Bobyra96d5442023-08-30 16:30:15 +020012811if test "x$ac_cv_type_off_t" = xyes
12812then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012813
Christian Brabandt9670f612025-05-07 21:44:33 +020012814else case e in #(
12815 e)
Illia Bobyra96d5442023-08-30 16:30:15 +020012816printf "%s\n" "#define off_t long int" >>confdefs.h
Christian Brabandt9670f612025-05-07 21:44:33 +020012817 ;;
12818esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012819fi
12820
Bram Moolenaar071d4272004-06-13 20:20:40 +000012821
Illia Bobyra96d5442023-08-30 16:30:15 +020012822 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default
12823"
12824if test "x$ac_cv_type_pid_t" = xyes
12825then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012826
Christian Brabandt9670f612025-05-07 21:44:33 +020012827else case e in #(
12828 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Illia Bobyra96d5442023-08-30 16:30:15 +020012829/* end confdefs.h. */
12830
12831 #if defined _WIN64 && !defined __CYGWIN__
12832 LLP64
12833 #endif
12834
12835int
12836main (void)
12837{
12838
12839 ;
12840 return 0;
12841}
12842
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012843_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012844if ac_fn_c_try_compile "$LINENO"
12845then :
12846 ac_pid_type='int'
Christian Brabandt9670f612025-05-07 21:44:33 +020012847else case e in #(
12848 e) ac_pid_type='__int64' ;;
12849esac
Illia Bobyra96d5442023-08-30 16:30:15 +020012850fi
12851rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
12852
12853printf "%s\n" "#define pid_t $ac_pid_type" >>confdefs.h
12854
Christian Brabandt9670f612025-05-07 21:44:33 +020012855 ;;
12856esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012857fi
12858
Illia Bobyra96d5442023-08-30 16:30:15 +020012859
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012860ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Illia Bobyra96d5442023-08-30 16:30:15 +020012861if test "x$ac_cv_type_size_t" = xyes
12862then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012863
Christian Brabandt9670f612025-05-07 21:44:33 +020012864else case e in #(
12865 e)
Illia Bobyra96d5442023-08-30 16:30:15 +020012866printf "%s\n" "#define size_t unsigned int" >>confdefs.h
Christian Brabandt9670f612025-05-07 21:44:33 +020012867 ;;
12868esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012869fi
12870
Christian Brabandt9670f612025-05-07 21:44:33 +020012871ac_fn_c_check_type "$LINENO" "uid_t" "ac_cv_type_uid_t" "$ac_includes_default"
12872if test "x$ac_cv_type_uid_t" = xyes
Illia Bobyra96d5442023-08-30 16:30:15 +020012873then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012874
Christian Brabandt9670f612025-05-07 21:44:33 +020012875else case e in #(
12876 e)
Illia Bobyra96d5442023-08-30 16:30:15 +020012877printf "%s\n" "#define uid_t int" >>confdefs.h
Christian Brabandt9670f612025-05-07 21:44:33 +020012878 ;;
12879esac
12880fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012881
Christian Brabandt9670f612025-05-07 21:44:33 +020012882ac_fn_c_check_type "$LINENO" "gid_t" "ac_cv_type_gid_t" "$ac_includes_default"
12883if test "x$ac_cv_type_gid_t" = xyes
12884then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012885
Christian Brabandt9670f612025-05-07 21:44:33 +020012886else case e in #(
12887 e)
Illia Bobyra96d5442023-08-30 16:30:15 +020012888printf "%s\n" "#define gid_t int" >>confdefs.h
Christian Brabandt9670f612025-05-07 21:44:33 +020012889 ;;
12890esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000012891fi
12892
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012893ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
12894case $ac_cv_c_uint32_t in #(
12895 no|yes) ;; #(
12896 *)
12897
Illia Bobyra96d5442023-08-30 16:30:15 +020012898printf "%s\n" "#define _UINT32_T 1" >>confdefs.h
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012899
12900
Illia Bobyra96d5442023-08-30 16:30:15 +020012901printf "%s\n" "#define uint32_t $ac_cv_c_uint32_t" >>confdefs.h
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012902;;
12903 esac
12904
Bram Moolenaarfa7584c2010-05-19 21:57:45 +020012905
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012906
Illia Bobyrf39842f2023-08-27 18:21:23 +020012907
12908
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012909ac_fn_c_check_type "$LINENO" "ino_t" "ac_cv_type_ino_t" "$ac_includes_default"
Illia Bobyra96d5442023-08-30 16:30:15 +020012910if test "x$ac_cv_type_ino_t" = xyes
12911then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012912
Christian Brabandt9670f612025-05-07 21:44:33 +020012913else case e in #(
12914 e)
Illia Bobyra96d5442023-08-30 16:30:15 +020012915printf "%s\n" "#define ino_t long" >>confdefs.h
Christian Brabandt9670f612025-05-07 21:44:33 +020012916 ;;
12917esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012918fi
12919
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012920ac_fn_c_check_type "$LINENO" "dev_t" "ac_cv_type_dev_t" "$ac_includes_default"
Illia Bobyra96d5442023-08-30 16:30:15 +020012921if test "x$ac_cv_type_dev_t" = xyes
12922then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012923
Christian Brabandt9670f612025-05-07 21:44:33 +020012924else case e in #(
12925 e)
Illia Bobyra96d5442023-08-30 16:30:15 +020012926printf "%s\n" "#define dev_t unsigned" >>confdefs.h
Christian Brabandt9670f612025-05-07 21:44:33 +020012927 ;;
12928esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012929fi
12930
Illia Bobyra96d5442023-08-30 16:30:15 +020012931 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12932printf %s "checking whether byte ordering is bigendian... " >&6; }
12933if test ${ac_cv_c_bigendian+y}
12934then :
12935 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020012936else case e in #(
12937 e) ac_cv_c_bigendian=unknown
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012938 # See if we're dealing with a universal compiler.
12939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12940/* end confdefs.h. */
12941#ifndef __APPLE_CC__
12942 not a universal capable compiler
12943 #endif
12944 typedef int dummy;
12945
12946_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012947if ac_fn_c_try_compile "$LINENO"
12948then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012949
12950 # Check for potential -arch flags. It is not universal unless
12951 # there are at least two -arch flags with different values.
12952 ac_arch=
12953 ac_prev=
12954 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12955 if test -n "$ac_prev"; then
12956 case $ac_word in
12957 i?86 | x86_64 | ppc | ppc64)
12958 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12959 ac_arch=$ac_word
12960 else
12961 ac_cv_c_bigendian=universal
12962 break
12963 fi
12964 ;;
12965 esac
12966 ac_prev=
12967 elif test "x$ac_word" = "x-arch"; then
12968 ac_prev=arch
12969 fi
12970 done
12971fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012972rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012973 if test $ac_cv_c_bigendian = unknown; then
12974 # See if sys/param.h defines the BYTE_ORDER macro.
12975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12976/* end confdefs.h. */
12977#include <sys/types.h>
12978 #include <sys/param.h>
12979
12980int
Illia Bobyra96d5442023-08-30 16:30:15 +020012981main (void)
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012982{
Christian Brabandt9670f612025-05-07 21:44:33 +020012983#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \\
12984 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \\
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012985 && LITTLE_ENDIAN)
12986 bogus endian macros
12987 #endif
12988
12989 ;
12990 return 0;
12991}
12992_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012993if ac_fn_c_try_compile "$LINENO"
12994then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012995 # It does; now see whether it defined to BIG_ENDIAN or not.
12996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12997/* end confdefs.h. */
12998#include <sys/types.h>
12999 #include <sys/param.h>
13000
13001int
Illia Bobyra96d5442023-08-30 16:30:15 +020013002main (void)
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013003{
13004#if BYTE_ORDER != BIG_ENDIAN
13005 not big endian
13006 #endif
13007
13008 ;
13009 return 0;
13010}
13011_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013012if ac_fn_c_try_compile "$LINENO"
13013then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013014 ac_cv_c_bigendian=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020013015else case e in #(
13016 e) ac_cv_c_bigendian=no ;;
13017esac
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013018fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013019rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013020fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013021rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013022 fi
13023 if test $ac_cv_c_bigendian = unknown; then
13024 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13026/* end confdefs.h. */
13027#include <limits.h>
13028
13029int
Illia Bobyra96d5442023-08-30 16:30:15 +020013030main (void)
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013031{
13032#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13033 bogus endian macros
13034 #endif
13035
13036 ;
13037 return 0;
13038}
13039_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013040if ac_fn_c_try_compile "$LINENO"
13041then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013042 # It does; now see whether it defined to _BIG_ENDIAN or not.
13043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13044/* end confdefs.h. */
13045#include <limits.h>
13046
13047int
Illia Bobyra96d5442023-08-30 16:30:15 +020013048main (void)
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013049{
13050#ifndef _BIG_ENDIAN
13051 not big endian
13052 #endif
13053
13054 ;
13055 return 0;
13056}
13057_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013058if ac_fn_c_try_compile "$LINENO"
13059then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013060 ac_cv_c_bigendian=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020013061else case e in #(
13062 e) ac_cv_c_bigendian=no ;;
13063esac
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013064fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013065rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013066fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013067rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013068 fi
13069 if test $ac_cv_c_bigendian = unknown; then
13070 # Compile a test program.
Illia Bobyra96d5442023-08-30 16:30:15 +020013071 if test "$cross_compiling" = yes
13072then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013073 # Try to guess by grepping values from an object file.
13074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13075/* end confdefs.h. */
Illia Bobyra96d5442023-08-30 16:30:15 +020013076unsigned short int ascii_mm[] =
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013077 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
Illia Bobyra96d5442023-08-30 16:30:15 +020013078 unsigned short int ascii_ii[] =
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013079 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13080 int use_ascii (int i) {
13081 return ascii_mm[i] + ascii_ii[i];
13082 }
Illia Bobyra96d5442023-08-30 16:30:15 +020013083 unsigned short int ebcdic_ii[] =
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013084 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
Illia Bobyra96d5442023-08-30 16:30:15 +020013085 unsigned short int ebcdic_mm[] =
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013086 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13087 int use_ebcdic (int i) {
13088 return ebcdic_mm[i] + ebcdic_ii[i];
13089 }
Christian Brabandt9670f612025-05-07 21:44:33 +020013090 int
13091 main (int argc, char **argv)
13092 {
13093 /* Intimidate the compiler so that it does not
13094 optimize the arrays away. */
13095 char *p = argv[0];
13096 ascii_mm[1] = *p++; ebcdic_mm[1] = *p++;
13097 ascii_ii[1] = *p++; ebcdic_ii[1] = *p++;
13098 return use_ascii (argc) == use_ebcdic (*p);
13099 }
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013100_ACEOF
Christian Brabandt9670f612025-05-07 21:44:33 +020013101if ac_fn_c_try_link "$LINENO"
Illia Bobyra96d5442023-08-30 16:30:15 +020013102then :
Christian Brabandt9670f612025-05-07 21:44:33 +020013103 if grep BIGenDianSyS conftest$ac_exeext >/dev/null; then
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013104 ac_cv_c_bigendian=yes
13105 fi
Christian Brabandt9670f612025-05-07 21:44:33 +020013106 if grep LiTTleEnDian conftest$ac_exeext >/dev/null ; then
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013107 if test "$ac_cv_c_bigendian" = unknown; then
13108 ac_cv_c_bigendian=no
13109 else
13110 # finding both strings is unlikely to happen, but who knows?
13111 ac_cv_c_bigendian=unknown
13112 fi
13113 fi
13114fi
Christian Brabandt9670f612025-05-07 21:44:33 +020013115rm -f core conftest.err conftest.$ac_objext conftest.beam \
13116 conftest$ac_exeext conftest.$ac_ext
13117else case e in #(
13118 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013119/* end confdefs.h. */
13120$ac_includes_default
13121int
Illia Bobyra96d5442023-08-30 16:30:15 +020013122main (void)
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013123{
13124
13125 /* Are we little or big endian? From Harbison&Steele. */
13126 union
13127 {
13128 long int l;
13129 char c[sizeof (long int)];
13130 } u;
13131 u.l = 1;
13132 return u.c[sizeof (long int) - 1] == 1;
13133
13134 ;
13135 return 0;
13136}
13137_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013138if ac_fn_c_try_run "$LINENO"
13139then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013140 ac_cv_c_bigendian=no
Christian Brabandt9670f612025-05-07 21:44:33 +020013141else case e in #(
13142 e) ac_cv_c_bigendian=yes ;;
13143esac
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013144fi
13145rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
Christian Brabandt9670f612025-05-07 21:44:33 +020013146 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
13147esac
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013148fi
13149
Christian Brabandt9670f612025-05-07 21:44:33 +020013150 fi ;;
13151esac
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013152fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013153{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13154printf "%s\n" "$ac_cv_c_bigendian" >&6; }
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013155 case $ac_cv_c_bigendian in #(
13156 yes)
Illia Bobyra96d5442023-08-30 16:30:15 +020013157 printf "%s\n" "#define WORDS_BIGENDIAN 1" >>confdefs.h
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013158;; #(
13159 no)
13160 ;; #(
13161 universal)
13162
Illia Bobyra96d5442023-08-30 16:30:15 +020013163printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013164
13165 ;; #(
13166 *)
Bram Moolenaar7db77842014-03-27 17:40:59 +010013167 as_fn_error $? "unknown endianness
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013168 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
13169 esac
13170
Illia Bobyra96d5442023-08-30 16:30:15 +020013171{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
13172printf %s "checking for inline... " >&6; }
13173if test ${ac_cv_c_inline+y}
13174then :
13175 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020013176else case e in #(
13177 e) ac_cv_c_inline=no
Bram Moolenaar136f29a2016-02-27 20:14:15 +010013178for ac_kw in inline __inline__ __inline; do
13179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13180/* end confdefs.h. */
13181#ifndef __cplusplus
13182typedef int foo_t;
Illia Bobyra96d5442023-08-30 16:30:15 +020013183static $ac_kw foo_t static_foo (void) {return 0; }
13184$ac_kw foo_t foo (void) {return 0; }
Bram Moolenaar136f29a2016-02-27 20:14:15 +010013185#endif
13186
13187_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013188if ac_fn_c_try_compile "$LINENO"
13189then :
Bram Moolenaar136f29a2016-02-27 20:14:15 +010013190 ac_cv_c_inline=$ac_kw
13191fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013192rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar136f29a2016-02-27 20:14:15 +010013193 test "$ac_cv_c_inline" != no && break
13194done
Christian Brabandt9670f612025-05-07 21:44:33 +020013195 ;;
13196esac
Bram Moolenaar136f29a2016-02-27 20:14:15 +010013197fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013198{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
13199printf "%s\n" "$ac_cv_c_inline" >&6; }
Bram Moolenaar136f29a2016-02-27 20:14:15 +010013200
13201case $ac_cv_c_inline in
13202 inline | yes) ;;
13203 *)
13204 case $ac_cv_c_inline in
13205 no) ac_val=;;
13206 *) ac_val=$ac_cv_c_inline;;
13207 esac
13208 cat >>confdefs.h <<_ACEOF
13209#ifndef __cplusplus
13210#define inline $ac_val
13211#endif
13212_ACEOF
13213 ;;
13214esac
13215
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013216
Illia Bobyra96d5442023-08-30 16:30:15 +020013217{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for rlim_t" >&5
13218printf %s "checking for rlim_t... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013219if eval "test \"`echo '$''{'ac_cv_type_rlim_t'+set}'`\" = set"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020013220 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: (cached) $ac_cv_type_rlim_t" >&5
13221printf "%s\n" "(cached) $ac_cv_type_rlim_t" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013222else
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013224/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013225
13226#include <sys/types.h>
13227#if STDC_HEADERS
Bram Moolenaar446cb832008-06-24 21:56:24 +000013228# include <stdlib.h>
13229# include <stddef.h>
Bram Moolenaar071d4272004-06-13 20:20:40 +000013230#endif
13231#ifdef HAVE_SYS_RESOURCE_H
Bram Moolenaar446cb832008-06-24 21:56:24 +000013232# include <sys/resource.h>
Bram Moolenaar071d4272004-06-13 20:20:40 +000013233#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013234
13235_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000013236if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Christian Brabandt9670f612025-05-07 21:44:33 +020013237 $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 +020013238then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000013239 ac_cv_type_rlim_t=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020013240else case e in #(
13241 e) ac_cv_type_rlim_t=no ;;
13242esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000013243fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013244rm -rf conftest*
Bram Moolenaar071d4272004-06-13 20:20:40 +000013245
Illia Bobyra96d5442023-08-30 16:30:15 +020013246 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_rlim_t" >&5
13247printf "%s\n" "$ac_cv_type_rlim_t" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013248fi
13249if test $ac_cv_type_rlim_t = no; then
13250 cat >> confdefs.h <<\EOF
13251#define rlim_t unsigned long
13252EOF
13253fi
13254
Illia Bobyra96d5442023-08-30 16:30:15 +020013255{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stack_t" >&5
13256printf %s "checking for stack_t... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013257if eval "test \"`echo '$''{'ac_cv_type_stack_t'+set}'`\" = set"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020013258 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: (cached) $ac_cv_type_stack_t" >&5
13259printf "%s\n" "(cached) $ac_cv_type_stack_t" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013260else
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013262/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013263
13264#include <sys/types.h>
13265#if STDC_HEADERS
Bram Moolenaar446cb832008-06-24 21:56:24 +000013266# include <stdlib.h>
13267# include <stddef.h>
Bram Moolenaar071d4272004-06-13 20:20:40 +000013268#endif
13269#include <signal.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013270
13271_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000013272if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Christian Brabandt9670f612025-05-07 21:44:33 +020013273 $EGREP_TRADITIONAL "stack_t" >/dev/null 2>&1
Illia Bobyra96d5442023-08-30 16:30:15 +020013274then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000013275 ac_cv_type_stack_t=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020013276else case e in #(
13277 e) ac_cv_type_stack_t=no ;;
13278esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000013279fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013280rm -rf conftest*
Bram Moolenaar071d4272004-06-13 20:20:40 +000013281
Illia Bobyra96d5442023-08-30 16:30:15 +020013282 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_stack_t" >&5
13283printf "%s\n" "$ac_cv_type_stack_t" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013284fi
13285if test $ac_cv_type_stack_t = no; then
13286 cat >> confdefs.h <<\EOF
13287#define stack_t struct sigaltstack
13288EOF
13289fi
13290
Illia Bobyra96d5442023-08-30 16:30:15 +020013291{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stack_t has an ss_base field" >&5
13292printf %s "checking whether stack_t has an ss_base field... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013293cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013294/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013295
13296#include <sys/types.h>
13297#if STDC_HEADERS
Bram Moolenaar446cb832008-06-24 21:56:24 +000013298# include <stdlib.h>
13299# include <stddef.h>
Bram Moolenaar071d4272004-06-13 20:20:40 +000013300#endif
13301#include <signal.h>
13302#include "confdefs.h"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013303
13304int
Illia Bobyra96d5442023-08-30 16:30:15 +020013305main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013306{
13307stack_t sigstk; sigstk.ss_base = 0;
13308 ;
13309 return 0;
13310}
13311_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013312if ac_fn_c_try_compile "$LINENO"
13313then :
13314 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13315printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SS_BASE 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013316
Christian Brabandt9670f612025-05-07 21:44:33 +020013317else case e in #(
13318 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13319printf "%s\n" "no" >&6; } ;;
13320esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000013321fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013322rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000013323
13324olibs="$LIBS"
Illia Bobyra96d5442023-08-30 16:30:15 +020013325{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-tlib argument" >&5
13326printf %s "checking --with-tlib argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013327
Bram Moolenaar446cb832008-06-24 21:56:24 +000013328# Check whether --with-tlib was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020013329if test ${with_tlib+y}
13330then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000013331 withval=$with_tlib;
13332fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000013333
13334if test -n "$with_tlib"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020013335 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_tlib" >&5
13336printf "%s\n" "$with_tlib" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013337 LIBS="$LIBS -l$with_tlib"
Illia Bobyra96d5442023-08-30 16:30:15 +020013338 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for linking with $with_tlib library" >&5
13339printf %s "checking for linking with $with_tlib library... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013341/* end confdefs.h. */
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000013342
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013343int
Illia Bobyra96d5442023-08-30 16:30:15 +020013344main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013345{
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000013346
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013347 ;
13348 return 0;
13349}
13350_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013351if ac_fn_c_try_link "$LINENO"
13352then :
13353 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: OK" >&5
13354printf "%s\n" "OK" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +020013355else case e in #(
13356 e) as_fn_error $? "FAILED" "$LINENO" 5 ;;
13357esac
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000013358fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013359rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013360 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000013361 olibs="$LIBS"
13362else
Illia Bobyra96d5442023-08-30 16:30:15 +020013363 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: empty: automatic terminal library selection" >&5
13364printf "%s\n" "empty: automatic terminal library selection" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +000013365 case "$vim_cv_uname_output" in
Bram Moolenaar4e509b62011-02-09 17:42:57 +010013366 OSF1|SCO_SV) tlibs="tinfo ncurses curses termlib termcap";;
13367 *) tlibs="tinfo ncurses termlib termcap curses";;
Bram Moolenaar071d4272004-06-13 20:20:40 +000013368 esac
13369 for libname in $tlibs; do
Christian Brabandt9670f612025-05-07 21:44:33 +020013370 as_ac_Lib=`printf "%s\n" "ac_cv_lib_${libname}""_tgetent" | sed "$as_sed_sh"`
Illia Bobyra96d5442023-08-30 16:30:15 +020013371{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tgetent in -l${libname}" >&5
13372printf %s "checking for tgetent in -l${libname}... " >&6; }
13373if eval test \${$as_ac_Lib+y}
13374then :
13375 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020013376else case e in #(
13377 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000013378LIBS="-l${libname} $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013379cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013380/* end confdefs.h. */
13381
Bram Moolenaar446cb832008-06-24 21:56:24 +000013382/* Override any GCC internal prototype to avoid an error.
13383 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020013384 builtin and then its argument prototype would still apply.
13385 The 'extern "C"' is for builds by C++ compilers;
13386 although this is not generally supported in C code supporting it here
13387 has little cost and some practical benefit (sr 110532). */
13388#ifdef __cplusplus
13389extern "C"
13390#endif
13391char tgetent (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013392int
Illia Bobyra96d5442023-08-30 16:30:15 +020013393main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013394{
Bram Moolenaar446cb832008-06-24 21:56:24 +000013395return tgetent ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013396 ;
13397 return 0;
13398}
13399_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013400if ac_fn_c_try_link "$LINENO"
13401then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013402 eval "$as_ac_Lib=yes"
Christian Brabandt9670f612025-05-07 21:44:33 +020013403else case e in #(
13404 e) eval "$as_ac_Lib=no" ;;
13405esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000013406fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013407rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013408 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020013409LIBS=$ac_check_lib_save_LIBS ;;
13410esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013411fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013412eval ac_res=\$$as_ac_Lib
Illia Bobyra96d5442023-08-30 16:30:15 +020013413 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13414printf "%s\n" "$ac_res" >&6; }
13415if eval test \"x\$"$as_ac_Lib"\" = x"yes"
13416then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013417 cat >>confdefs.h <<_ACEOF
Christian Brabandt9670f612025-05-07 21:44:33 +020013418#define `printf "%s\n" "HAVE_LIB${libname}" | sed "$as_sed_cpp"` 1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013419_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000013420
13421 LIBS="-l${libname} $LIBS"
13422
Bram Moolenaar071d4272004-06-13 20:20:40 +000013423fi
13424
13425 if test "x$olibs" != "x$LIBS"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020013426 if test "$cross_compiling" = yes
13427then :
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010013428 res="OK"
Christian Brabandt9670f612025-05-07 21:44:33 +020013429else case e in #(
13430 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013431/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013432
13433#ifdef HAVE_TERMCAP_H
13434# include <termcap.h>
13435#endif
Bram Moolenaar446cb832008-06-24 21:56:24 +000013436#if STDC_HEADERS
13437# include <stdlib.h>
13438# include <stddef.h>
13439#endif
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010013440int main() {char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(0); }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013441_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013442if ac_fn_c_try_run "$LINENO"
13443then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000013444 res="OK"
Christian Brabandt9670f612025-05-07 21:44:33 +020013445else case e in #(
13446 e) res="FAIL" ;;
13447esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013448fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013449rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
Christian Brabandt9670f612025-05-07 21:44:33 +020013450 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
13451esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013452fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000013453
Bram Moolenaar071d4272004-06-13 20:20:40 +000013454 if test "$res" = "OK"; then
13455 break
13456 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013457 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libname library is not usable" >&5
13458printf "%s\n" "$libname library is not usable" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013459 LIBS="$olibs"
13460 fi
13461 done
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000013462 if test "x$olibs" = "x$LIBS"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020013463 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no terminal library found" >&5
13464printf "%s\n" "no terminal library found" >&6; }
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000013465 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000013466fi
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000013467
13468if test "x$olibs" = "x$LIBS"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020013469 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tgetent()" >&5
13470printf %s "checking for tgetent()... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013472/* end confdefs.h. */
Bram Moolenaarbd7f7c12020-07-28 21:03:37 +020013473int tgetent(char *, const char *);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013474int
Illia Bobyra96d5442023-08-30 16:30:15 +020013475main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013476{
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000013477char s[10000]; int res = tgetent(s, "thisterminaldoesnotexist");
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013478 ;
13479 return 0;
13480}
13481_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013482if ac_fn_c_try_link "$LINENO"
13483then :
13484 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13485printf "%s\n" "yes" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +020013486else case e in #(
13487 e) as_fn_error $? "NOT FOUND!
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000013488 You need to install a terminal library; for example ncurses.
Bram Moolenaar16678eb2021-04-21 11:57:59 +020013489 On Linux that would be the libncurses-dev package.
Christian Brabandt9670f612025-05-07 21:44:33 +020013490 Or specify the name of the library with --with-tlib." "$LINENO" 5 ;;
13491esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013492fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013493rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013494 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000013495fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000013496
Illia Bobyra96d5442023-08-30 16:30:15 +020013497{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we talk terminfo" >&5
13498printf %s "checking whether we talk terminfo... " >&6; }
13499if test ${vim_cv_terminfo+y}
13500then :
13501 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020013502else case e in #(
13503 e)
Illia Bobyra96d5442023-08-30 16:30:15 +020013504 if test "$cross_compiling" = yes
13505then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000013506
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010013507 vim_cv_terminfo=yes
13508 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cross-compiling: consider setting 'vim_cv_terminfo'" >&5
13509printf "%s\n" "$as_me: WARNING: cross-compiling: consider setting 'vim_cv_terminfo'" >&2;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000013510
Christian Brabandt9670f612025-05-07 21:44:33 +020013511else case e in #(
13512 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013513/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013514
Bram Moolenaar446cb832008-06-24 21:56:24 +000013515#include "confdefs.h"
Bram Moolenaar071d4272004-06-13 20:20:40 +000013516#ifdef HAVE_TERMCAP_H
13517# include <termcap.h>
13518#endif
Bram Moolenaar446cb832008-06-24 21:56:24 +000013519#ifdef HAVE_STRING_H
13520# include <string.h>
13521#endif
13522#if STDC_HEADERS
13523# include <stdlib.h>
13524# include <stddef.h>
13525#endif
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010013526int main()
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010013527{char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(!!strcmp(s==0 ? "" : s, "1")); }
Bram Moolenaar446cb832008-06-24 21:56:24 +000013528
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013529_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013530if ac_fn_c_try_run "$LINENO"
13531then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000013532
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010013533 vim_cv_terminfo=yes
Bram Moolenaar446cb832008-06-24 21:56:24 +000013534
Christian Brabandt9670f612025-05-07 21:44:33 +020013535else case e in #(
13536 e)
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010013537 vim_cv_terminfo=no
Christian Brabandt9670f612025-05-07 21:44:33 +020013538 ;;
13539esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000013540fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013541rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
Christian Brabandt9670f612025-05-07 21:44:33 +020013542 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
13543esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000013544fi
13545
Christian Brabandt9670f612025-05-07 21:44:33 +020013546 ;;
13547esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000013548fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013549{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_terminfo" >&5
13550printf "%s\n" "$vim_cv_terminfo" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000013551
13552if test "x$vim_cv_terminfo" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020013553 printf "%s\n" "#define TERMINFO 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013554
13555fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000013556
Illia Bobyra96d5442023-08-30 16:30:15 +020013557{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking what tgetent() returns for an unknown terminal" >&5
13558printf %s "checking what tgetent() returns for an unknown terminal... " >&6; }
13559if test ${vim_cv_tgetent+y}
13560then :
13561 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020013562else case e in #(
13563 e)
Illia Bobyra96d5442023-08-30 16:30:15 +020013564 if test "$cross_compiling" = yes
13565then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000013566
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010013567 vim_cv_tgetent=zero
13568 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cross-compiling: consider setting 'vim_cv_tgetent'" >&5
13569printf "%s\n" "$as_me: WARNING: cross-compiling: consider setting 'vim_cv_tgetent'" >&2;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000013570
Christian Brabandt9670f612025-05-07 21:44:33 +020013571else case e in #(
13572 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013573/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013574
Bram Moolenaar446cb832008-06-24 21:56:24 +000013575#include "confdefs.h"
Bram Moolenaar071d4272004-06-13 20:20:40 +000013576#ifdef HAVE_TERMCAP_H
13577# include <termcap.h>
13578#endif
Bram Moolenaar446cb832008-06-24 21:56:24 +000013579#if STDC_HEADERS
13580# include <stdlib.h>
13581# include <stddef.h>
13582#endif
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010013583int main()
Bram Moolenaar071d4272004-06-13 20:20:40 +000013584{char s[10000]; int res = tgetent(s, "thisterminaldoesnotexist"); exit(res != 0); }
Bram Moolenaar446cb832008-06-24 21:56:24 +000013585
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013586_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013587if ac_fn_c_try_run "$LINENO"
13588then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000013589
Bram Moolenaara88254f2017-11-02 23:04:14 +010013590 vim_cv_tgetent=zero
Bram Moolenaar071d4272004-06-13 20:20:40 +000013591
Christian Brabandt9670f612025-05-07 21:44:33 +020013592else case e in #(
13593 e)
Bram Moolenaara88254f2017-11-02 23:04:14 +010013594 vim_cv_tgetent=non-zero
Christian Brabandt9670f612025-05-07 21:44:33 +020013595 ;;
13596esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000013597fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013598rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
Christian Brabandt9670f612025-05-07 21:44:33 +020013599 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
13600esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000013601fi
13602
Christian Brabandt9670f612025-05-07 21:44:33 +020013603 ;;
13604esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000013605fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013606{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_tgetent" >&5
13607printf "%s\n" "$vim_cv_tgetent" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000013608
Bram Moolenaara88254f2017-11-02 23:04:14 +010013609if test "x$vim_cv_tgetent" = "xzero" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020013610 printf "%s\n" "#define TGETENT_ZERO_ERR 0" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000013611
Bram Moolenaar446cb832008-06-24 21:56:24 +000013612fi
13613
Illia Bobyra96d5442023-08-30 16:30:15 +020013614{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether termcap.h contains ospeed" >&5
13615printf %s "checking whether termcap.h contains ospeed... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013616cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013617/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013618
13619#ifdef HAVE_TERMCAP_H
13620# include <termcap.h>
13621#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013622
13623int
Illia Bobyra96d5442023-08-30 16:30:15 +020013624main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013625{
Bram Moolenaar071d4272004-06-13 20:20:40 +000013626ospeed = 20000
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013627 ;
13628 return 0;
13629}
13630_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013631if ac_fn_c_try_link "$LINENO"
13632then :
13633 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13634printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_OSPEED 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013635
Christian Brabandt9670f612025-05-07 21:44:33 +020013636else case e in #(
13637 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +020013638printf "%s\n" "no" >&6; }
13639 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ospeed can be extern" >&5
13640printf %s "checking whether ospeed can be extern... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013642/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013643
13644#ifdef HAVE_TERMCAP_H
13645# include <termcap.h>
13646#endif
13647extern short ospeed;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013648
13649int
Illia Bobyra96d5442023-08-30 16:30:15 +020013650main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013651{
Bram Moolenaar071d4272004-06-13 20:20:40 +000013652ospeed = 20000
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013653 ;
13654 return 0;
13655}
13656_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013657if ac_fn_c_try_link "$LINENO"
13658then :
13659 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13660printf "%s\n" "yes" >&6; }; printf "%s\n" "#define OSPEED_EXTERN 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013661
Christian Brabandt9670f612025-05-07 21:44:33 +020013662else case e in #(
13663 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13664printf "%s\n" "no" >&6; } ;;
13665esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013666fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013667rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013668 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020013669 ;;
13670esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013671fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013672rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013673 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000013674
Illia Bobyra96d5442023-08-30 16:30:15 +020013675{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether termcap.h contains UP, BC and PC" >&5
13676printf %s "checking whether termcap.h contains UP, BC and PC... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013677cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013678/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013679
13680#ifdef HAVE_TERMCAP_H
13681# include <termcap.h>
13682#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013683
13684int
Illia Bobyra96d5442023-08-30 16:30:15 +020013685main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013686{
Bram Moolenaar071d4272004-06-13 20:20:40 +000013687if (UP == 0 && BC == 0) PC = 1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013688 ;
13689 return 0;
13690}
13691_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013692if ac_fn_c_try_link "$LINENO"
13693then :
13694 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13695printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_UP_BC_PC 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013696
Christian Brabandt9670f612025-05-07 21:44:33 +020013697else case e in #(
13698 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +020013699printf "%s\n" "no" >&6; }
13700 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether UP, BC and PC can be extern" >&5
13701printf %s "checking whether UP, BC and PC can be extern... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013703/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013704
13705#ifdef HAVE_TERMCAP_H
13706# include <termcap.h>
13707#endif
13708extern char *UP, *BC, PC;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013709
13710int
Illia Bobyra96d5442023-08-30 16:30:15 +020013711main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013712{
Bram Moolenaar071d4272004-06-13 20:20:40 +000013713if (UP == 0 && BC == 0) PC = 1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013714 ;
13715 return 0;
13716}
13717_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013718if ac_fn_c_try_link "$LINENO"
13719then :
13720 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13721printf "%s\n" "yes" >&6; }; printf "%s\n" "#define UP_BC_PC_EXTERN 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013722
Christian Brabandt9670f612025-05-07 21:44:33 +020013723else case e in #(
13724 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13725printf "%s\n" "no" >&6; } ;;
13726esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013727fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013728rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013729 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020013730 ;;
13731esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013732fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013733rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013734 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000013735
Illia Bobyra96d5442023-08-30 16:30:15 +020013736{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether tputs() uses outfuntype" >&5
13737printf %s "checking whether tputs() uses outfuntype... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013738cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013739/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013740
13741#ifdef HAVE_TERMCAP_H
13742# include <termcap.h>
13743#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013744
13745int
Illia Bobyra96d5442023-08-30 16:30:15 +020013746main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013747{
Bram Moolenaar071d4272004-06-13 20:20:40 +000013748extern int xx(); tputs("test", 1, (outfuntype)xx)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013749 ;
13750 return 0;
13751}
13752_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013753if ac_fn_c_try_compile "$LINENO"
13754then :
13755 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13756printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_OUTFUNTYPE 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013757
Christian Brabandt9670f612025-05-07 21:44:33 +020013758else case e in #(
13759 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13760printf "%s\n" "no" >&6; } ;;
13761esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013762fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013763rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000013764
Illia Bobyra96d5442023-08-30 16:30:15 +020013765{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether del_curterm() can be used" >&5
13766printf %s "checking whether del_curterm() can be used... " >&6; }
Bram Moolenaarb3a29552021-11-19 11:28:04 +000013767cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13768/* end confdefs.h. */
13769
13770#ifdef HAVE_TERMCAP_H
13771# include <termcap.h>
13772#endif
13773#include <term.h>
13774
13775int
Illia Bobyra96d5442023-08-30 16:30:15 +020013776main (void)
Bram Moolenaarb3a29552021-11-19 11:28:04 +000013777{
13778if (cur_term) del_curterm(cur_term);
13779 ;
13780 return 0;
13781}
13782_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013783if ac_fn_c_try_link "$LINENO"
13784then :
13785 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13786printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_DEL_CURTERM 1" >>confdefs.h
Bram Moolenaarb3a29552021-11-19 11:28:04 +000013787
Christian Brabandt9670f612025-05-07 21:44:33 +020013788else case e in #(
13789 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13790printf "%s\n" "no" >&6; } ;;
13791esac
Bram Moolenaarb3a29552021-11-19 11:28:04 +000013792fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013793rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarb3a29552021-11-19 11:28:04 +000013794 conftest$ac_exeext conftest.$ac_ext
13795
Illia Bobyra96d5442023-08-30 16:30:15 +020013796{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13797printf %s "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013798cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013799/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013800
13801#include <sys/types.h>
13802#include <sys/time.h>
13803#include <sys/select.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013804int
Illia Bobyra96d5442023-08-30 16:30:15 +020013805main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013806{
Bram Moolenaar071d4272004-06-13 20:20:40 +000013807
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013808 ;
13809 return 0;
13810}
13811_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013812if ac_fn_c_try_compile "$LINENO"
13813then :
13814 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13815printf "%s\n" "yes" >&6; }
13816 printf "%s\n" "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013817
Christian Brabandt9670f612025-05-07 21:44:33 +020013818else case e in #(
13819 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13820printf "%s\n" "no" >&6; } ;;
13821esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000013822fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013823rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000013824
Illia Bobyra96d5442023-08-30 16:30:15 +020013825{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13826printf %s "checking for /dev/ptc... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013827if test -r /dev/ptc; then
Illia Bobyra96d5442023-08-30 16:30:15 +020013828 printf "%s\n" "#define HAVE_DEV_PTC 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013829
Illia Bobyra96d5442023-08-30 16:30:15 +020013830 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13831printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013832else
Illia Bobyra96d5442023-08-30 16:30:15 +020013833 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13834printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013835fi
13836
Illia Bobyra96d5442023-08-30 16:30:15 +020013837{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SVR4 ptys" >&5
13838printf %s "checking for SVR4 ptys... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013839if test -c /dev/ptmx ; then
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013841/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013842
Bram Moolenaarce7be3a2020-11-26 20:11:11 +010013843// These should be in stdlib.h, but it depends on _XOPEN_SOURCE.
13844char *ptsname(int);
13845int unlockpt(int);
13846int grantpt(int);
13847
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013848int
Illia Bobyra96d5442023-08-30 16:30:15 +020013849main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013850{
Bram Moolenaarce7be3a2020-11-26 20:11:11 +010013851
13852 ptsname(0);
13853 grantpt(0);
13854 unlockpt(0);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013855 ;
13856 return 0;
13857}
13858_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013859if ac_fn_c_try_link "$LINENO"
13860then :
13861 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13862printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SVR4_PTYS 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013863
Christian Brabandt9670f612025-05-07 21:44:33 +020013864else case e in #(
13865 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13866printf "%s\n" "no" >&6; } ;;
13867esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013868fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013869rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013870 conftest$ac_exeext conftest.$ac_ext
13871else
Illia Bobyra96d5442023-08-30 16:30:15 +020013872 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13873printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013874fi
13875
Illia Bobyra96d5442023-08-30 16:30:15 +020013876{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ptyranges" >&5
13877printf %s "checking for ptyranges... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013878if test -d /dev/ptym ; then
13879 pdir='/dev/ptym'
13880else
13881 pdir='/dev'
13882fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013883cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013884/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013885#ifdef M_UNIX
13886 yes;
13887#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013888
13889_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000013890if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Christian Brabandt9670f612025-05-07 21:44:33 +020013891 $EGREP_TRADITIONAL "yes" >/dev/null 2>&1
Illia Bobyra96d5442023-08-30 16:30:15 +020013892then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000013893 ptys=`echo /dev/ptyp??`
Christian Brabandt9670f612025-05-07 21:44:33 +020013894else case e in #(
13895 e) ptys=`echo $pdir/pty??` ;;
13896esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000013897fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013898rm -rf conftest*
Bram Moolenaar071d4272004-06-13 20:20:40 +000013899
13900if test "$ptys" != "$pdir/pty??" ; then
13901 p0=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\).$/\1/g' | sort -u | tr -d '\012'`
13902 p1=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\)$/\1/g' | sort -u | tr -d '\012'`
Illia Bobyra96d5442023-08-30 16:30:15 +020013903 printf "%s\n" "#define PTYRANGE0 \"$p0\"" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013904
Illia Bobyra96d5442023-08-30 16:30:15 +020013905 printf "%s\n" "#define PTYRANGE1 \"$p1\"" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013906
Illia Bobyra96d5442023-08-30 16:30:15 +020013907 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $p0 / $p1" >&5
13908printf "%s\n" "$p0 / $p1" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013909else
Illia Bobyra96d5442023-08-30 16:30:15 +020013910 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: don't know" >&5
13911printf "%s\n" "don't know" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013912fi
13913
Bram Moolenaar446cb832008-06-24 21:56:24 +000013914
Illia Bobyra96d5442023-08-30 16:30:15 +020013915{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct sigcontext" >&5
13916printf %s "checking for struct sigcontext... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013917cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013918/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013919
13920#include <signal.h>
Sam Jamesf8ea1062022-11-05 15:13:50 +000013921int test_sig()
Bram Moolenaar071d4272004-06-13 20:20:40 +000013922{
13923 struct sigcontext *scont;
13924 scont = (struct sigcontext *)0;
13925 return 1;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013926}
13927int
Illia Bobyra96d5442023-08-30 16:30:15 +020013928main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013929{
Bram Moolenaar071d4272004-06-13 20:20:40 +000013930
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013931 ;
13932 return 0;
13933}
13934_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013935if ac_fn_c_try_compile "$LINENO"
13936then :
13937 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13938printf "%s\n" "yes" >&6; }
13939 printf "%s\n" "#define HAVE_SIGCONTEXT 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013940
Christian Brabandt9670f612025-05-07 21:44:33 +020013941else case e in #(
13942 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13943printf "%s\n" "no" >&6; } ;;
13944esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000013945fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013946rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000013947
Illia Bobyra96d5442023-08-30 16:30:15 +020013948{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking getcwd implementation is broken" >&5
13949printf %s "checking getcwd implementation is broken... " >&6; }
13950if test ${vim_cv_getcwd_broken+y}
13951then :
13952 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020013953else case e in #(
13954 e)
Illia Bobyra96d5442023-08-30 16:30:15 +020013955 if test "$cross_compiling" = yes
13956then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000013957
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010013958 vim_cv_getcwd_broken=no
13959 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cross-compiling: consider setting 'vim_cv_getcwd_broken'" >&5
13960printf "%s\n" "$as_me: WARNING: cross-compiling: consider setting 'vim_cv_getcwd_broken'" >&2;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000013961
Christian Brabandt9670f612025-05-07 21:44:33 +020013962else case e in #(
13963 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013964/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013965
Bram Moolenaar446cb832008-06-24 21:56:24 +000013966#include "confdefs.h"
13967#ifdef HAVE_UNISTD_H
13968#include <unistd.h>
13969#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000013970char *dagger[] = { "IFS=pwd", 0 };
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010013971int main()
Bram Moolenaar071d4272004-06-13 20:20:40 +000013972{
13973 char buffer[500];
13974 extern char **environ;
13975 environ = dagger;
13976 return getcwd(buffer, 500) ? 0 : 1;
13977}
Bram Moolenaar446cb832008-06-24 21:56:24 +000013978
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013979_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013980if ac_fn_c_try_run "$LINENO"
13981then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000013982
13983 vim_cv_getcwd_broken=no
13984
Christian Brabandt9670f612025-05-07 21:44:33 +020013985else case e in #(
13986 e)
Bram Moolenaar446cb832008-06-24 21:56:24 +000013987 vim_cv_getcwd_broken=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020013988 ;;
13989esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000013990fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013991rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
Christian Brabandt9670f612025-05-07 21:44:33 +020013992 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
13993esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000013994fi
13995
Christian Brabandt9670f612025-05-07 21:44:33 +020013996 ;;
13997esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000013998fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013999{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_getcwd_broken" >&5
14000printf "%s\n" "$vim_cv_getcwd_broken" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000014001
14002if test "x$vim_cv_getcwd_broken" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014003 printf "%s\n" "#define BAD_GETCWD 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000014004
Bram Moolenaar63d25552019-05-10 21:28:38 +020014005 ac_fn_c_check_func "$LINENO" "getwd" "ac_cv_func_getwd"
Illia Bobyra96d5442023-08-30 16:30:15 +020014006if test "x$ac_cv_func_getwd" = xyes
14007then :
14008 printf "%s\n" "#define HAVE_GETWD 1" >>confdefs.h
Bram Moolenaar63d25552019-05-10 21:28:38 +020014009
Bram Moolenaar071d4272004-06-13 20:20:40 +000014010fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000014011
Illia Bobyra96d5442023-08-30 16:30:15 +020014012fi
14013
14014ac_fn_c_check_func "$LINENO" "fchdir" "ac_cv_func_fchdir"
14015if test "x$ac_cv_func_fchdir" = xyes
14016then :
14017 printf "%s\n" "#define HAVE_FCHDIR 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014018
Bram Moolenaar071d4272004-06-13 20:20:40 +000014019fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014020ac_fn_c_check_func "$LINENO" "fchown" "ac_cv_func_fchown"
14021if test "x$ac_cv_func_fchown" = xyes
14022then :
14023 printf "%s\n" "#define HAVE_FCHOWN 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000014024
Illia Bobyra96d5442023-08-30 16:30:15 +020014025fi
14026ac_fn_c_check_func "$LINENO" "fchmod" "ac_cv_func_fchmod"
14027if test "x$ac_cv_func_fchmod" = xyes
14028then :
14029 printf "%s\n" "#define HAVE_FCHMOD 1" >>confdefs.h
14030
14031fi
14032ac_fn_c_check_func "$LINENO" "fsync" "ac_cv_func_fsync"
14033if test "x$ac_cv_func_fsync" = xyes
14034then :
14035 printf "%s\n" "#define HAVE_FSYNC 1" >>confdefs.h
14036
14037fi
14038ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
14039if test "x$ac_cv_func_getcwd" = xyes
14040then :
14041 printf "%s\n" "#define HAVE_GETCWD 1" >>confdefs.h
14042
14043fi
14044ac_fn_c_check_func "$LINENO" "getpseudotty" "ac_cv_func_getpseudotty"
14045if test "x$ac_cv_func_getpseudotty" = xyes
14046then :
14047 printf "%s\n" "#define HAVE_GETPSEUDOTTY 1" >>confdefs.h
14048
14049fi
14050ac_fn_c_check_func "$LINENO" "getpwent" "ac_cv_func_getpwent"
14051if test "x$ac_cv_func_getpwent" = xyes
14052then :
14053 printf "%s\n" "#define HAVE_GETPWENT 1" >>confdefs.h
14054
14055fi
14056ac_fn_c_check_func "$LINENO" "getpwnam" "ac_cv_func_getpwnam"
14057if test "x$ac_cv_func_getpwnam" = xyes
14058then :
14059 printf "%s\n" "#define HAVE_GETPWNAM 1" >>confdefs.h
14060
14061fi
14062ac_fn_c_check_func "$LINENO" "getpwuid" "ac_cv_func_getpwuid"
14063if test "x$ac_cv_func_getpwuid" = xyes
14064then :
14065 printf "%s\n" "#define HAVE_GETPWUID 1" >>confdefs.h
14066
14067fi
14068ac_fn_c_check_func "$LINENO" "getrlimit" "ac_cv_func_getrlimit"
14069if test "x$ac_cv_func_getrlimit" = xyes
14070then :
14071 printf "%s\n" "#define HAVE_GETRLIMIT 1" >>confdefs.h
14072
14073fi
14074ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
14075if test "x$ac_cv_func_gettimeofday" = xyes
14076then :
14077 printf "%s\n" "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
14078
14079fi
14080ac_fn_c_check_func "$LINENO" "localtime_r" "ac_cv_func_localtime_r"
14081if test "x$ac_cv_func_localtime_r" = xyes
14082then :
14083 printf "%s\n" "#define HAVE_LOCALTIME_R 1" >>confdefs.h
14084
14085fi
14086ac_fn_c_check_func "$LINENO" "lstat" "ac_cv_func_lstat"
14087if test "x$ac_cv_func_lstat" = xyes
14088then :
14089 printf "%s\n" "#define HAVE_LSTAT 1" >>confdefs.h
14090
14091fi
14092ac_fn_c_check_func "$LINENO" "memset" "ac_cv_func_memset"
14093if test "x$ac_cv_func_memset" = xyes
14094then :
14095 printf "%s\n" "#define HAVE_MEMSET 1" >>confdefs.h
14096
14097fi
14098ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
14099if test "x$ac_cv_func_mkdtemp" = xyes
14100then :
14101 printf "%s\n" "#define HAVE_MKDTEMP 1" >>confdefs.h
14102
14103fi
14104ac_fn_c_check_func "$LINENO" "nanosleep" "ac_cv_func_nanosleep"
14105if test "x$ac_cv_func_nanosleep" = xyes
14106then :
14107 printf "%s\n" "#define HAVE_NANOSLEEP 1" >>confdefs.h
14108
14109fi
14110ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
14111if test "x$ac_cv_func_opendir" = xyes
14112then :
14113 printf "%s\n" "#define HAVE_OPENDIR 1" >>confdefs.h
14114
14115fi
14116ac_fn_c_check_func "$LINENO" "putenv" "ac_cv_func_putenv"
14117if test "x$ac_cv_func_putenv" = xyes
14118then :
14119 printf "%s\n" "#define HAVE_PUTENV 1" >>confdefs.h
14120
14121fi
14122ac_fn_c_check_func "$LINENO" "qsort" "ac_cv_func_qsort"
14123if test "x$ac_cv_func_qsort" = xyes
14124then :
14125 printf "%s\n" "#define HAVE_QSORT 1" >>confdefs.h
14126
14127fi
14128ac_fn_c_check_func "$LINENO" "readlink" "ac_cv_func_readlink"
14129if test "x$ac_cv_func_readlink" = xyes
14130then :
14131 printf "%s\n" "#define HAVE_READLINK 1" >>confdefs.h
14132
14133fi
14134ac_fn_c_check_func "$LINENO" "select" "ac_cv_func_select"
14135if test "x$ac_cv_func_select" = xyes
14136then :
14137 printf "%s\n" "#define HAVE_SELECT 1" >>confdefs.h
14138
14139fi
14140ac_fn_c_check_func "$LINENO" "setenv" "ac_cv_func_setenv"
14141if test "x$ac_cv_func_setenv" = xyes
14142then :
14143 printf "%s\n" "#define HAVE_SETENV 1" >>confdefs.h
14144
14145fi
14146ac_fn_c_check_func "$LINENO" "getpgid" "ac_cv_func_getpgid"
14147if test "x$ac_cv_func_getpgid" = xyes
14148then :
14149 printf "%s\n" "#define HAVE_GETPGID 1" >>confdefs.h
14150
14151fi
14152ac_fn_c_check_func "$LINENO" "setpgid" "ac_cv_func_setpgid"
14153if test "x$ac_cv_func_setpgid" = xyes
14154then :
14155 printf "%s\n" "#define HAVE_SETPGID 1" >>confdefs.h
14156
14157fi
14158ac_fn_c_check_func "$LINENO" "setsid" "ac_cv_func_setsid"
14159if test "x$ac_cv_func_setsid" = xyes
14160then :
14161 printf "%s\n" "#define HAVE_SETSID 1" >>confdefs.h
14162
14163fi
14164ac_fn_c_check_func "$LINENO" "sigaltstack" "ac_cv_func_sigaltstack"
14165if test "x$ac_cv_func_sigaltstack" = xyes
14166then :
14167 printf "%s\n" "#define HAVE_SIGALTSTACK 1" >>confdefs.h
14168
14169fi
14170ac_fn_c_check_func "$LINENO" "sigstack" "ac_cv_func_sigstack"
14171if test "x$ac_cv_func_sigstack" = xyes
14172then :
14173 printf "%s\n" "#define HAVE_SIGSTACK 1" >>confdefs.h
14174
14175fi
14176ac_fn_c_check_func "$LINENO" "sigset" "ac_cv_func_sigset"
14177if test "x$ac_cv_func_sigset" = xyes
14178then :
14179 printf "%s\n" "#define HAVE_SIGSET 1" >>confdefs.h
14180
14181fi
14182ac_fn_c_check_func "$LINENO" "sigsetjmp" "ac_cv_func_sigsetjmp"
14183if test "x$ac_cv_func_sigsetjmp" = xyes
14184then :
14185 printf "%s\n" "#define HAVE_SIGSETJMP 1" >>confdefs.h
14186
14187fi
14188ac_fn_c_check_func "$LINENO" "sigaction" "ac_cv_func_sigaction"
14189if test "x$ac_cv_func_sigaction" = xyes
14190then :
14191 printf "%s\n" "#define HAVE_SIGACTION 1" >>confdefs.h
14192
14193fi
14194ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
14195if test "x$ac_cv_func_sigprocmask" = xyes
14196then :
14197 printf "%s\n" "#define HAVE_SIGPROCMASK 1" >>confdefs.h
14198
14199fi
14200ac_fn_c_check_func "$LINENO" "sigvec" "ac_cv_func_sigvec"
14201if test "x$ac_cv_func_sigvec" = xyes
14202then :
14203 printf "%s\n" "#define HAVE_SIGVEC 1" >>confdefs.h
14204
14205fi
14206ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
14207if test "x$ac_cv_func_strcasecmp" = xyes
14208then :
14209 printf "%s\n" "#define HAVE_STRCASECMP 1" >>confdefs.h
14210
14211fi
14212ac_fn_c_check_func "$LINENO" "strcoll" "ac_cv_func_strcoll"
14213if test "x$ac_cv_func_strcoll" = xyes
14214then :
14215 printf "%s\n" "#define HAVE_STRCOLL 1" >>confdefs.h
14216
14217fi
14218ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror"
14219if test "x$ac_cv_func_strerror" = xyes
14220then :
14221 printf "%s\n" "#define HAVE_STRERROR 1" >>confdefs.h
14222
14223fi
14224ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
14225if test "x$ac_cv_func_strftime" = xyes
14226then :
14227 printf "%s\n" "#define HAVE_STRFTIME 1" >>confdefs.h
14228
14229fi
14230ac_fn_c_check_func "$LINENO" "stricmp" "ac_cv_func_stricmp"
14231if test "x$ac_cv_func_stricmp" = xyes
14232then :
14233 printf "%s\n" "#define HAVE_STRICMP 1" >>confdefs.h
14234
14235fi
14236ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp"
14237if test "x$ac_cv_func_strncasecmp" = xyes
14238then :
14239 printf "%s\n" "#define HAVE_STRNCASECMP 1" >>confdefs.h
14240
14241fi
14242ac_fn_c_check_func "$LINENO" "strnicmp" "ac_cv_func_strnicmp"
14243if test "x$ac_cv_func_strnicmp" = xyes
14244then :
14245 printf "%s\n" "#define HAVE_STRNICMP 1" >>confdefs.h
14246
14247fi
14248ac_fn_c_check_func "$LINENO" "strpbrk" "ac_cv_func_strpbrk"
14249if test "x$ac_cv_func_strpbrk" = xyes
14250then :
14251 printf "%s\n" "#define HAVE_STRPBRK 1" >>confdefs.h
14252
14253fi
14254ac_fn_c_check_func "$LINENO" "strptime" "ac_cv_func_strptime"
14255if test "x$ac_cv_func_strptime" = xyes
14256then :
14257 printf "%s\n" "#define HAVE_STRPTIME 1" >>confdefs.h
14258
14259fi
14260ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol"
14261if test "x$ac_cv_func_strtol" = xyes
14262then :
14263 printf "%s\n" "#define HAVE_STRTOL 1" >>confdefs.h
14264
14265fi
14266ac_fn_c_check_func "$LINENO" "tgetent" "ac_cv_func_tgetent"
14267if test "x$ac_cv_func_tgetent" = xyes
14268then :
14269 printf "%s\n" "#define HAVE_TGETENT 1" >>confdefs.h
14270
14271fi
14272ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
14273if test "x$ac_cv_func_towlower" = xyes
14274then :
14275 printf "%s\n" "#define HAVE_TOWLOWER 1" >>confdefs.h
14276
14277fi
14278ac_fn_c_check_func "$LINENO" "towupper" "ac_cv_func_towupper"
14279if test "x$ac_cv_func_towupper" = xyes
14280then :
14281 printf "%s\n" "#define HAVE_TOWUPPER 1" >>confdefs.h
14282
14283fi
14284ac_fn_c_check_func "$LINENO" "iswupper" "ac_cv_func_iswupper"
14285if test "x$ac_cv_func_iswupper" = xyes
14286then :
14287 printf "%s\n" "#define HAVE_ISWUPPER 1" >>confdefs.h
14288
14289fi
14290ac_fn_c_check_func "$LINENO" "tzset" "ac_cv_func_tzset"
14291if test "x$ac_cv_func_tzset" = xyes
14292then :
14293 printf "%s\n" "#define HAVE_TZSET 1" >>confdefs.h
14294
14295fi
14296ac_fn_c_check_func "$LINENO" "usleep" "ac_cv_func_usleep"
14297if test "x$ac_cv_func_usleep" = xyes
14298then :
14299 printf "%s\n" "#define HAVE_USLEEP 1" >>confdefs.h
14300
14301fi
14302ac_fn_c_check_func "$LINENO" "utime" "ac_cv_func_utime"
14303if test "x$ac_cv_func_utime" = xyes
14304then :
14305 printf "%s\n" "#define HAVE_UTIME 1" >>confdefs.h
14306
14307fi
14308ac_fn_c_check_func "$LINENO" "utimes" "ac_cv_func_utimes"
14309if test "x$ac_cv_func_utimes" = xyes
14310then :
14311 printf "%s\n" "#define HAVE_UTIMES 1" >>confdefs.h
14312
14313fi
14314ac_fn_c_check_func "$LINENO" "mblen" "ac_cv_func_mblen"
14315if test "x$ac_cv_func_mblen" = xyes
14316then :
14317 printf "%s\n" "#define HAVE_MBLEN 1" >>confdefs.h
14318
14319fi
14320ac_fn_c_check_func "$LINENO" "ftruncate" "ac_cv_func_ftruncate"
14321if test "x$ac_cv_func_ftruncate" = xyes
14322then :
14323 printf "%s\n" "#define HAVE_FTRUNCATE 1" >>confdefs.h
14324
14325fi
14326ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
14327if test "x$ac_cv_func_unsetenv" = xyes
14328then :
14329 printf "%s\n" "#define HAVE_UNSETENV 1" >>confdefs.h
14330
14331fi
14332ac_fn_c_check_func "$LINENO" "posix_openpt" "ac_cv_func_posix_openpt"
14333if test "x$ac_cv_func_posix_openpt" = xyes
14334then :
14335 printf "%s\n" "#define HAVE_POSIX_OPENPT 1" >>confdefs.h
14336
14337fi
14338ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
14339if test "x$ac_cv_func_clock_gettime" = xyes
14340then :
14341 printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
Bram Moolenaar643b6142018-09-12 20:29:09 +020014342
14343fi
Jonas Sortie Termansen8bb5eaf2024-11-04 20:32:27 +010014344ac_fn_c_check_func "$LINENO" "sync" "ac_cv_func_sync"
14345if test "x$ac_cv_func_sync" = xyes
14346then :
14347 printf "%s\n" "#define HAVE_SYNC 1" >>confdefs.h
14348
14349fi
Bram Moolenaar643b6142018-09-12 20:29:09 +020014350
Bram Moolenaar643b6142018-09-12 20:29:09 +020014351
Illia Bobyra96d5442023-08-30 16:30:15 +020014352
14353
14354{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking types of arguments for select" >&5
14355printf %s "checking types of arguments for select... " >&6; }
14356if test ${ac_cv_func_select_args+y}
14357then :
14358 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020014359else case e in #(
14360 e) ac_cv_func_select_args='int,int *,struct timeval *'
Illia Bobyra96d5442023-08-30 16:30:15 +020014361for ac_arg234 in 'fd_set *' 'int *' 'void *'; do
Bram Moolenaar643b6142018-09-12 20:29:09 +020014362 for ac_arg1 in 'int' 'size_t' 'unsigned long int' 'unsigned int'; do
14363 for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do
14364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14365/* end confdefs.h. */
14366$ac_includes_default
14367#ifdef HAVE_SYS_SELECT_H
14368# include <sys/select.h>
14369#endif
14370#ifdef HAVE_SYS_SOCKET_H
14371# include <sys/socket.h>
14372#endif
14373
14374int
Illia Bobyra96d5442023-08-30 16:30:15 +020014375main (void)
Bram Moolenaar643b6142018-09-12 20:29:09 +020014376{
14377extern int select ($ac_arg1,
14378 $ac_arg234, $ac_arg234, $ac_arg234,
14379 $ac_arg5);
14380 ;
14381 return 0;
14382}
14383_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014384if ac_fn_c_try_compile "$LINENO"
14385then :
Bram Moolenaar643b6142018-09-12 20:29:09 +020014386 ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3
14387fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014388rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar643b6142018-09-12 20:29:09 +020014389 done
14390 done
14391done
Christian Brabandt9670f612025-05-07 21:44:33 +020014392 ;;
14393esac
Bram Moolenaar643b6142018-09-12 20:29:09 +020014394fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014395{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_select_args" >&5
14396printf "%s\n" "$ac_cv_func_select_args" >&6; }
Bram Moolenaar643b6142018-09-12 20:29:09 +020014397ac_save_IFS=$IFS; IFS=','
14398set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'`
14399IFS=$ac_save_IFS
14400shift
14401
Illia Bobyra96d5442023-08-30 16:30:15 +020014402printf "%s\n" "#define SELECT_TYPE_ARG1 $1" >>confdefs.h
Bram Moolenaar643b6142018-09-12 20:29:09 +020014403
14404
Illia Bobyra96d5442023-08-30 16:30:15 +020014405printf "%s\n" "#define SELECT_TYPE_ARG234 ($2)" >>confdefs.h
Bram Moolenaar643b6142018-09-12 20:29:09 +020014406
14407
Illia Bobyra96d5442023-08-30 16:30:15 +020014408printf "%s\n" "#define SELECT_TYPE_ARG5 ($3)" >>confdefs.h
Bram Moolenaar643b6142018-09-12 20:29:09 +020014409
Illia Bobyra96d5442023-08-30 16:30:15 +020014410rm -rf conftest*
Bram Moolenaar643b6142018-09-12 20:29:09 +020014411
Christian Brabandt9670f612025-05-07 21:44:33 +020014412{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for declarations of fseeko and ftello" >&5
14413printf %s "checking for declarations of fseeko and ftello... " >&6; }
14414if test ${ac_cv_func_fseeko_ftello+y}
Illia Bobyra96d5442023-08-30 16:30:15 +020014415then :
14416 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020014417else case e in #(
14418 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar25153e12010-02-24 14:47:08 +010014419/* end confdefs.h. */
Bram Moolenaar25153e12010-02-24 14:47:08 +010014420
Christian Brabandt9670f612025-05-07 21:44:33 +020014421#if defined __hpux && !defined _LARGEFILE_SOURCE
14422# include <limits.h>
14423# if LONG_MAX >> 31 == 0
14424# error "32-bit HP-UX 11/ia64 needs _LARGEFILE_SOURCE for fseeko in C++"
14425# endif
14426#endif
14427#include <sys/types.h> /* for off_t */
14428#include <stdio.h>
14429
14430int
14431main (void)
14432{
14433
14434 int (*fp1) (FILE *, off_t, int) = fseeko;
14435 off_t (*fp2) (FILE *) = ftello;
14436 return fseeko (stdin, 0, 0)
14437 && fp1 (stdin, 0, 0)
14438 && ftello (stdin) >= 0
14439 && fp2 (stdin) >= 0;
14440
14441 ;
14442 return 0;
14443}
14444_ACEOF
14445if ac_fn_c_try_compile "$LINENO"
14446then :
14447 ac_cv_func_fseeko_ftello=yes
14448else case e in #(
14449 e) ac_save_CPPFLAGS="$CPPFLAGS"
14450 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE=1"
14451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14452/* end confdefs.h. */
14453
14454#if defined __hpux && !defined _LARGEFILE_SOURCE
14455# include <limits.h>
14456# if LONG_MAX >> 31 == 0
14457# error "32-bit HP-UX 11/ia64 needs _LARGEFILE_SOURCE for fseeko in C++"
14458# endif
14459#endif
14460#include <sys/types.h> /* for off_t */
14461#include <stdio.h>
14462
14463int
14464main (void)
14465{
14466
14467 int (*fp1) (FILE *, off_t, int) = fseeko;
14468 off_t (*fp2) (FILE *) = ftello;
14469 return fseeko (stdin, 0, 0)
14470 && fp1 (stdin, 0, 0)
14471 && ftello (stdin) >= 0
14472 && fp2 (stdin) >= 0;
14473
14474 ;
14475 return 0;
14476}
14477_ACEOF
14478if ac_fn_c_try_compile "$LINENO"
14479then :
14480 ac_cv_func_fseeko_ftello="need _LARGEFILE_SOURCE"
14481else case e in #(
14482 e) ac_cv_func_fseeko_ftello=no ;;
14483esac
14484fi
14485rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
14486esac
14487fi
14488rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
14489esac
14490fi
14491{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fseeko_ftello" >&5
14492printf "%s\n" "$ac_cv_func_fseeko_ftello" >&6; }
14493if test "$ac_cv_func_fseeko_ftello" != no
14494then :
Bram Moolenaar25153e12010-02-24 14:47:08 +010014495
Illia Bobyra96d5442023-08-30 16:30:15 +020014496printf "%s\n" "#define HAVE_FSEEKO 1" >>confdefs.h
Bram Moolenaar25153e12010-02-24 14:47:08 +010014497
14498fi
Christian Brabandt9670f612025-05-07 21:44:33 +020014499if test "$ac_cv_func_fseeko_ftello" = "need _LARGEFILE_SOURCE"
14500then :
14501
14502printf "%s\n" "#define _LARGEFILE_SOURCE 1" >>confdefs.h
14503
14504fi
Bram Moolenaar25153e12010-02-24 14:47:08 +010014505
Bram Moolenaar071d4272004-06-13 20:20:40 +000014506
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014507# Check whether --enable-largefile was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020014508if test ${enable_largefile+y}
14509then :
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014510 enableval=$enable_largefile;
14511fi
Christian Brabandt9670f612025-05-07 21:44:33 +020014512if test "$enable_largefile,$enable_year2038" != no,no
14513then :
14514 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable large file support" >&5
14515printf %s "checking for $CC option to enable large file support... " >&6; }
14516if test ${ac_cv_sys_largefile_opts+y}
Illia Bobyra96d5442023-08-30 16:30:15 +020014517then :
14518 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020014519else case e in #(
14520 e) ac_save_CC="$CC"
14521 ac_opt_found=no
14522 for ac_opt in "none needed" "-D_FILE_OFFSET_BITS=64" "-D_LARGE_FILES=1" "-n32"; do
14523 if test x"$ac_opt" != x"none needed"
14524then :
14525 CC="$ac_save_CC $ac_opt"
14526fi
14527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014528/* end confdefs.h. */
14529#include <sys/types.h>
Christian Brabandt9670f612025-05-07 21:44:33 +020014530#ifndef FTYPE
14531# define FTYPE off_t
14532#endif
14533 /* Check that FTYPE can represent 2**63 - 1 correctly.
14534 We can't simply define LARGE_FTYPE to be 9223372036854775807,
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014535 since some C++ compilers masquerading as C compilers
14536 incorrectly reject 9223372036854775807. */
Christian Brabandt9670f612025-05-07 21:44:33 +020014537#define LARGE_FTYPE (((FTYPE) 1 << 31 << 31) - 1 + ((FTYPE) 1 << 31 << 31))
14538 int FTYPE_is_large[(LARGE_FTYPE % 2147483629 == 721
14539 && LARGE_FTYPE % 2147483647 == 1)
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014540 ? 1 : -1];
14541int
Illia Bobyra96d5442023-08-30 16:30:15 +020014542main (void)
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014543{
14544
14545 ;
14546 return 0;
14547}
14548_ACEOF
Christian Brabandt9670f612025-05-07 21:44:33 +020014549if ac_fn_c_try_compile "$LINENO"
14550then :
14551 if test x"$ac_opt" = x"none needed"
14552then :
14553 # GNU/Linux s390x and alpha need _FILE_OFFSET_BITS=64 for wide ino_t.
14554 CC="$CC -DFTYPE=ino_t"
Illia Bobyra96d5442023-08-30 16:30:15 +020014555 if ac_fn_c_try_compile "$LINENO"
14556then :
Christian Brabandt9670f612025-05-07 21:44:33 +020014557
14558else case e in #(
14559 e) CC="$CC -D_FILE_OFFSET_BITS=64"
14560 if ac_fn_c_try_compile "$LINENO"
14561then :
14562 ac_opt='-D_FILE_OFFSET_BITS=64'
14563fi
14564rm -f core conftest.err conftest.$ac_objext conftest.beam ;;
14565esac
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014566fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014567rm -f core conftest.err conftest.$ac_objext conftest.beam
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014568fi
Christian Brabandt9670f612025-05-07 21:44:33 +020014569 ac_cv_sys_largefile_opts=$ac_opt
14570 ac_opt_found=yes
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014571fi
Christian Brabandt9670f612025-05-07 21:44:33 +020014572rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14573 test $ac_opt_found = no || break
14574 done
14575 CC="$ac_save_CC"
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014576
Christian Brabandt9670f612025-05-07 21:44:33 +020014577 test $ac_opt_found = yes || ac_cv_sys_largefile_opts="support not detected" ;;
14578esac
14579fi
14580{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_opts" >&5
14581printf "%s\n" "$ac_cv_sys_largefile_opts" >&6; }
14582
14583ac_have_largefile=yes
14584case $ac_cv_sys_largefile_opts in #(
14585 "none needed") :
14586 ;; #(
14587 "supported through gnulib") :
14588 ;; #(
14589 "support not detected") :
14590 ac_have_largefile=no ;; #(
14591 "-D_FILE_OFFSET_BITS=64") :
14592
14593printf "%s\n" "#define _FILE_OFFSET_BITS 64" >>confdefs.h
14594 ;; #(
14595 "-D_LARGE_FILES=1") :
14596
14597printf "%s\n" "#define _LARGE_FILES 1" >>confdefs.h
14598 ;; #(
14599 "-n32") :
14600 CC="$CC -n32" ;; #(
14601 *) :
14602 as_fn_error $? "internal error: bad value for \$ac_cv_sys_largefile_opts" "$LINENO" 5 ;;
14603esac
14604
14605if test "$enable_year2038" != no
14606then :
14607 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option for timestamps after 2038" >&5
14608printf %s "checking for $CC option for timestamps after 2038... " >&6; }
14609if test ${ac_cv_sys_year2038_opts+y}
Illia Bobyra96d5442023-08-30 16:30:15 +020014610then :
14611 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020014612else case e in #(
14613 e) ac_save_CPPFLAGS="$CPPFLAGS"
14614 ac_opt_found=no
14615 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
14616 if test x"$ac_opt" != x"none needed"
14617then :
14618 CPPFLAGS="$ac_save_CPPFLAGS $ac_opt"
14619fi
14620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014621/* end confdefs.h. */
Christian Brabandt9670f612025-05-07 21:44:33 +020014622
14623 #include <time.h>
14624 /* Check that time_t can represent 2**32 - 1 correctly. */
14625 #define LARGE_TIME_T \\
14626 ((time_t) (((time_t) 1 << 30) - 1 + 3 * ((time_t) 1 << 30)))
14627 int verify_time_t_range[(LARGE_TIME_T / 65537 == 65535
14628 && LARGE_TIME_T % 65537 == 0)
14629 ? 1 : -1];
14630
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014631int
Illia Bobyra96d5442023-08-30 16:30:15 +020014632main (void)
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014633{
14634
14635 ;
14636 return 0;
14637}
14638_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014639if ac_fn_c_try_compile "$LINENO"
14640then :
Christian Brabandt9670f612025-05-07 21:44:33 +020014641 ac_cv_sys_year2038_opts="$ac_opt"
14642 ac_opt_found=yes
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014643fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014644rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020014645 test $ac_opt_found = no || break
14646 done
14647 CPPFLAGS="$ac_save_CPPFLAGS"
14648 test $ac_opt_found = yes || ac_cv_sys_year2038_opts="support not detected" ;;
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014649esac
Christian Brabandt9670f612025-05-07 21:44:33 +020014650fi
14651{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_year2038_opts" >&5
14652printf "%s\n" "$ac_cv_sys_year2038_opts" >&6; }
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014653
Christian Brabandt9670f612025-05-07 21:44:33 +020014654ac_have_year2038=yes
14655case $ac_cv_sys_year2038_opts in #(
14656 "none needed") :
14657 ;; #(
14658 "support not detected") :
14659 ac_have_year2038=no ;; #(
14660 "-D_TIME_BITS=64") :
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014661
Christian Brabandt9670f612025-05-07 21:44:33 +020014662printf "%s\n" "#define _TIME_BITS 64" >>confdefs.h
14663 ;; #(
14664 "-D__MINGW_USE_VC2005_COMPAT") :
14665
14666printf "%s\n" "#define __MINGW_USE_VC2005_COMPAT 1" >>confdefs.h
14667 ;; #(
14668 "-U_USE_32_BIT_TIME_T"*) :
14669 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
14670printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
14671as_fn_error $? "the 'time_t' type is currently forced to be 32-bit. It
14672will stop working after mid-January 2038. Remove
14673_USE_32BIT_TIME_T from the compiler flags.
14674See 'config.log' for more details" "$LINENO" 5; } ;; #(
14675 *) :
14676 as_fn_error $? "internal error: bad value for \$ac_cv_sys_year2038_opts" "$LINENO" 5 ;;
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014677esac
Christian Brabandt9670f612025-05-07 21:44:33 +020014678
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014679fi
14680
Christian Brabandt9670f612025-05-07 21:44:33 +020014681fi
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014682
Illia Bobyra96d5442023-08-30 16:30:15 +020014683{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-canberra argument" >&5
14684printf %s "checking --enable-canberra argument... " >&6; }
Bram Moolenaar21606672019-06-14 20:40:58 +020014685# Check whether --enable-canberra was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020014686if test ${enable_canberra+y}
14687then :
Bram Moolenaar21606672019-06-14 20:40:58 +020014688 enableval=$enable_canberra;
Christian Brabandt9670f612025-05-07 21:44:33 +020014689else case e in #(
14690 e) enable_canberra="maybe" ;;
14691esac
Bram Moolenaar21606672019-06-14 20:40:58 +020014692fi
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014693
Bram Moolenaar21606672019-06-14 20:40:58 +020014694
14695if test "$enable_canberra" = "maybe"; then
Martin Tournoij25f3a142022-10-08 19:26:41 +010014696 if test "$features" = "huge"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014697 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to yes" >&5
14698printf "%s\n" "Defaulting to yes" >&6; }
Bram Moolenaar21606672019-06-14 20:40:58 +020014699 enable_canberra="yes"
14700 else
Illia Bobyra96d5442023-08-30 16:30:15 +020014701 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to no" >&5
14702printf "%s\n" "Defaulting to no" >&6; }
Bram Moolenaar21606672019-06-14 20:40:58 +020014703 enable_canberra="no"
14704 fi
14705else
Bram Moolenaar12471262022-01-18 11:11:25 +000014706 if test "$enable_canberra" = "yes" -a "$has_eval" = "no"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014707 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot use sound with tiny features" >&5
14708printf "%s\n" "cannot use sound with tiny features" >&6; }
Bram Moolenaar12471262022-01-18 11:11:25 +000014709 enable_canberra="no"
14710 else
Illia Bobyra96d5442023-08-30 16:30:15 +020014711 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_canberra" >&5
14712printf "%s\n" "$enable_canberra" >&6; }
Bram Moolenaar12471262022-01-18 11:11:25 +000014713 fi
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014714fi
Bram Moolenaar21606672019-06-14 20:40:58 +020014715if test "$enable_canberra" = "yes"; then
14716 if test "x$PKG_CONFIG" != "xno"; then
14717 canberra_lib=`$PKG_CONFIG --libs libcanberra 2>/dev/null`
14718 canberra_cflags=`$PKG_CONFIG --cflags libcanberra 2>/dev/null`
14719 fi
14720 if test "x$canberra_lib" = "x"; then
14721 canberra_lib=-lcanberra
14722 canberra_cflags=-D_REENTRANT
14723 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014724 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcanberra" >&5
14725printf %s "checking for libcanberra... " >&6; }
Bram Moolenaar21606672019-06-14 20:40:58 +020014726 ac_save_CFLAGS="$CFLAGS"
14727 ac_save_LIBS="$LIBS"
Bram Moolenaar12471262022-01-18 11:11:25 +000014728 if `echo "$CFLAGS" | grep -v "$canberra_cflags" 2>/dev/null`; then
Christian Brabandt6b9efdd2021-09-09 17:14:50 +020014729 CFLAGS="$CFLAGS $canberra_cflags"
14730 fi
Bram Moolenaar21606672019-06-14 20:40:58 +020014731 LIBS="$LIBS $canberra_lib"
14732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014733/* end confdefs.h. */
14734
Bram Moolenaar21606672019-06-14 20:40:58 +020014735 # include <canberra.h>
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014736
14737int
Illia Bobyra96d5442023-08-30 16:30:15 +020014738main (void)
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014739{
14740
Bram Moolenaar21606672019-06-14 20:40:58 +020014741 ca_context *hello;
14742 ca_context_create(&hello);
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014743 ;
14744 return 0;
14745}
14746_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014747if ac_fn_c_try_link "$LINENO"
14748then :
14749 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14750printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_CANBERRA 1" >>confdefs.h
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014751
Christian Brabandt9670f612025-05-07 21:44:33 +020014752else case e in #(
14753 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no; try installing libcanberra-dev" >&5
14754printf "%s\n" "no; try installing libcanberra-dev" >&6; }; CFLAGS="$ac_save_CFLAGS"; LIBS="$ac_save_LIBS" ;;
14755esac
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014756fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014757rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014758 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar21606672019-06-14 20:40:58 +020014759fi
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014760
Illia Bobyra96d5442023-08-30 16:30:15 +020014761{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-libsodium argument" >&5
14762printf %s "checking --enable-libsodium argument... " >&6; }
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014763# Check whether --enable-libsodium was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020014764if test ${enable_libsodium+y}
14765then :
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014766 enableval=$enable_libsodium;
Christian Brabandt9670f612025-05-07 21:44:33 +020014767else case e in #(
14768 e) enable_libsodium="maybe" ;;
14769esac
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014770fi
14771
14772
14773if test "$enable_libsodium" = "maybe"; then
Martin Tournoij25f3a142022-10-08 19:26:41 +010014774 if test "$features" = "huge"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014775 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to yes" >&5
14776printf "%s\n" "Defaulting to yes" >&6; }
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014777 enable_libsodium="yes"
14778 else
Illia Bobyra96d5442023-08-30 16:30:15 +020014779 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to no" >&5
14780printf "%s\n" "Defaulting to no" >&6; }
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014781 enable_libsodium="no"
14782 fi
14783else
Illia Bobyra96d5442023-08-30 16:30:15 +020014784 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_libsodium" >&5
14785printf "%s\n" "$enable_libsodium" >&6; }
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014786fi
14787if test "$enable_libsodium" = "yes"; then
14788 if test "x$PKG_CONFIG" != "xno"; then
14789 libsodium_lib=`$PKG_CONFIG --libs libsodium 2>/dev/null`
14790 libsodium_cflags=`$PKG_CONFIG --cflags libsodium 2>/dev/null`
14791 fi
14792 if test "x$libsodium_lib" = "x"; then
14793 libsodium_lib=-lsodium
14794 libsodium_cflags=
14795 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014796 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libsodium" >&5
14797printf %s "checking for libsodium... " >&6; }
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014798 ac_save_CFLAGS="$CFLAGS"
14799 ac_save_LIBS="$LIBS"
14800 CFLAGS="$CFLAGS $libsodium_cflags"
14801 LIBS="$LIBS $libsodium_lib"
14802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14803/* end confdefs.h. */
14804
14805 # include <sodium.h>
14806
14807int
Illia Bobyra96d5442023-08-30 16:30:15 +020014808main (void)
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014809{
14810
14811 printf("%d", sodium_init());
14812 ;
14813 return 0;
14814}
14815_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014816if ac_fn_c_try_link "$LINENO"
14817then :
14818 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14819printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SODIUM 1" >>confdefs.h
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014820
Christian Brabandt9670f612025-05-07 21:44:33 +020014821else case e in #(
14822 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no; try installing libsodium-dev" >&5
14823printf "%s\n" "no; try installing libsodium-dev" >&6; }; CFLAGS="$ac_save_CFLAGS"; LIBS="$ac_save_LIBS" ;;
14824esac
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014825fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014826rm -f core conftest.err conftest.$ac_objext conftest.beam \
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014827 conftest$ac_exeext conftest.$ac_ext
14828fi
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014829
Illia Bobyra96d5442023-08-30 16:30:15 +020014830{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for st_blksize" >&5
14831printf %s "checking for st_blksize... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014832cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014833/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000014834#include <sys/types.h>
14835#include <sys/stat.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014836int
Illia Bobyra96d5442023-08-30 16:30:15 +020014837main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014838{
Bram Moolenaar071d4272004-06-13 20:20:40 +000014839 struct stat st;
14840 int n;
14841
14842 stat("/", &st);
14843 n = (int)st.st_blksize;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014844 ;
14845 return 0;
14846}
14847_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014848if ac_fn_c_try_compile "$LINENO"
14849then :
14850 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14851printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_ST_BLKSIZE 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000014852
Christian Brabandt9670f612025-05-07 21:44:33 +020014853else case e in #(
14854 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14855printf "%s\n" "no" >&6; } ;;
14856esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000014857fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014858rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000014859
Illia Bobyra96d5442023-08-30 16:30:15 +020014860{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for timer_create without -lrt" >&5
14861printf %s "checking for timer_create without -lrt... " >&6; }
14862if test ${vim_cv_timer_create+y}
14863then :
14864 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020014865else case e in #(
14866 e)
Bram Moolenaarf2ce76a2022-07-02 11:40:40 +010014867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Paul Ollis65745772022-06-05 16:55:54 +010014868/* end confdefs.h. */
14869
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010014870 #include <time.h>
Paul Ollis65745772022-06-05 16:55:54 +010014871
14872int
Illia Bobyra96d5442023-08-30 16:30:15 +020014873main (void)
Paul Ollis65745772022-06-05 16:55:54 +010014874{
14875
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010014876 timer_create(CLOCK_MONOTONIC, NULL, NULL);
Paul Ollis65745772022-06-05 16:55:54 +010014877
14878 ;
14879 return 0;
14880}
14881_ACEOF
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010014882if ac_fn_c_try_compile "$LINENO"
Illia Bobyra96d5442023-08-30 16:30:15 +020014883then :
Richard Purdie509695c2022-07-24 20:48:00 +010014884 vim_cv_timer_create=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020014885else case e in #(
14886 e) vim_cv_timer_create=no
14887 ;;
14888esac
Bram Moolenaarf2ce76a2022-07-02 11:40:40 +010014889fi
Christian Brabandt9670f612025-05-07 21:44:33 +020014890rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
14891esac
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010014892fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014893{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_timer_create" >&5
14894printf "%s\n" "$vim_cv_timer_create" >&6; }
Bram Moolenaarefffa532022-07-28 22:39:54 +010014895
14896if test "x$vim_cv_timer_create" = "xno" ; then
14897 save_LIBS="$LIBS"
14898 LIBS="$LIBS -lrt"
Illia Bobyra96d5442023-08-30 16:30:15 +020014899 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for timer_create with -lrt" >&5
14900printf %s "checking for timer_create with -lrt... " >&6; }
14901if test ${vim_cv_timer_create_with_lrt+y}
14902then :
14903 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020014904else case e in #(
14905 e)
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010014906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14907/* end confdefs.h. */
14908
14909 #include <time.h>
14910
14911int
14912main (void)
14913{
14914
14915 timer_create(CLOCK_MONOTONIC, NULL, NULL);
14916
14917 ;
14918 return 0;
14919}
14920_ACEOF
14921if ac_fn_c_try_compile "$LINENO"
14922then :
14923 vim_cv_timer_create_with_lrt=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020014924else case e in #(
14925 e) vim_cv_timer_create_with_lrt=no
14926 ;;
14927esac
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010014928fi
Christian Brabandt9670f612025-05-07 21:44:33 +020014929rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
14930esac
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010014931fi
14932{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_timer_create_with_lrt" >&5
14933printf "%s\n" "$vim_cv_timer_create_with_lrt" >&6; }
14934 LIBS="$save_LIBS"
14935else
14936 vim_cv_timer_create_with_lrt=no
14937fi
14938
14939if test "x$vim_cv_timer_create" = "xyes" ||
14940 test "x$vim_cv_timer_create_with_lrt" = "xyes"; then
14941 save_LIBS="$LIBS"
Brandon Maiercbdc3c12024-12-18 21:18:01 +010014942 if test "x$vim_cv_timer_create_with_lrt" = "xyes" ; then
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010014943 LIBS="$LIBS -lrt"
14944 fi
14945
14946 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if timer_create works" >&5
14947printf %s "checking if timer_create works... " >&6; }
14948if test ${vim_cv_timer_create_works+y}
14949then :
14950 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020014951else case e in #(
14952 e)
Illia Bobyra96d5442023-08-30 16:30:15 +020014953 if test "$cross_compiling" = yes
14954then :
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010014955 vim_cv_timer_create_works=yes
14956 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cross-compiling: consider setting 'vim_cv_timer_create_works'" >&5
14957printf "%s\n" "$as_me: WARNING: cross-compiling: consider setting 'vim_cv_timer_create_works'" >&2;}
Bram Moolenaarefffa532022-07-28 22:39:54 +010014958
Christian Brabandt9670f612025-05-07 21:44:33 +020014959else case e in #(
14960 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarefffa532022-07-28 22:39:54 +010014961/* end confdefs.h. */
14962
14963 #if STDC_HEADERS
14964 # include <stdlib.h>
14965 # include <stddef.h>
14966 #endif
14967 #include <signal.h>
14968 #include <time.h>
14969 static void set_flag(union sigval sv) {}
14970
14971int
Illia Bobyra96d5442023-08-30 16:30:15 +020014972main (void)
Bram Moolenaarefffa532022-07-28 22:39:54 +010014973{
14974
14975 struct timespec ts;
14976 struct sigevent action = {0};
14977 timer_t timer_id;
14978
14979 action.sigev_notify = SIGEV_THREAD;
14980 action.sigev_notify_function = set_flag;
14981 if (timer_create(CLOCK_MONOTONIC, &action, &timer_id) < 0)
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010014982 exit(1); // cannot create a monotonic timer
Bram Moolenaarefffa532022-07-28 22:39:54 +010014983
14984 ;
14985 return 0;
14986}
14987_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014988if ac_fn_c_try_run "$LINENO"
14989then :
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010014990 vim_cv_timer_create_works=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020014991else case e in #(
14992 e) vim_cv_timer_create_works=no ;;
14993esac
Bram Moolenaarefffa532022-07-28 22:39:54 +010014994fi
Bram Moolenaarf2ce76a2022-07-02 11:40:40 +010014995rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
Christian Brabandt9670f612025-05-07 21:44:33 +020014996 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
14997esac
Bram Moolenaarf2ce76a2022-07-02 11:40:40 +010014998fi
Christian Brabandt9670f612025-05-07 21:44:33 +020014999 ;;
15000esac
Richard Purdie509695c2022-07-24 20:48:00 +010015001fi
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010015002{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_timer_create_works" >&5
15003printf "%s\n" "$vim_cv_timer_create_works" >&6; }
Richard Purdie509695c2022-07-24 20:48:00 +010015004
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010015005 if test "x$vim_cv_timer_create_works" = "xyes" ; then
15006 printf "%s\n" "#define HAVE_TIMER_CREATE 1" >>confdefs.h
Richard Purdie509695c2022-07-24 20:48:00 +010015007
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010015008 else
15009 LIBS="$save_LIBS"
15010 fi
Bram Moolenaarefffa532022-07-28 22:39:54 +010015011fi
Richard Purdie509695c2022-07-24 20:48:00 +010015012
Illia Bobyra96d5442023-08-30 16:30:15 +020015013{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat() ignores a trailing slash" >&5
15014printf %s "checking whether stat() ignores a trailing slash... " >&6; }
15015if test ${vim_cv_stat_ignores_slash+y}
15016then :
15017 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020015018else case e in #(
15019 e)
Illia Bobyra96d5442023-08-30 16:30:15 +020015020 if test "$cross_compiling" = yes
15021then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015022
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010015023 vim_cv_stat_ignores_slash=yes
15024 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cross-compiling: consider setting 'vim_cv_stat_ignores_slash'" >&5
15025printf "%s\n" "$as_me: WARNING: cross-compiling: consider setting 'vim_cv_stat_ignores_slash'" >&2;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000015026
Christian Brabandt9670f612025-05-07 21:44:33 +020015027else case e in #(
15028 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015029/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000015030
15031#include "confdefs.h"
15032#if STDC_HEADERS
15033# include <stdlib.h>
15034# include <stddef.h>
15035#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000015036#include <sys/types.h>
15037#include <sys/stat.h>
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010015038int main() {struct stat st; exit(stat("configure/", &st) != 0); }
Bram Moolenaar446cb832008-06-24 21:56:24 +000015039
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015040_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015041if ac_fn_c_try_run "$LINENO"
15042then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015043
15044 vim_cv_stat_ignores_slash=yes
Bram Moolenaar071d4272004-06-13 20:20:40 +000015045
Christian Brabandt9670f612025-05-07 21:44:33 +020015046else case e in #(
15047 e)
Bram Moolenaar446cb832008-06-24 21:56:24 +000015048 vim_cv_stat_ignores_slash=no
Christian Brabandt9670f612025-05-07 21:44:33 +020015049 ;;
15050esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000015051fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015052rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
Christian Brabandt9670f612025-05-07 21:44:33 +020015053 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
15054esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000015055fi
15056
Christian Brabandt9670f612025-05-07 21:44:33 +020015057 ;;
15058esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000015059fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015060{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_stat_ignores_slash" >&5
15061printf "%s\n" "$vim_cv_stat_ignores_slash" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000015062
15063if test "x$vim_cv_stat_ignores_slash" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015064 printf "%s\n" "#define STAT_IGNORES_SLASH 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000015065
15066fi
15067
Illia Bobyra96d5442023-08-30 16:30:15 +020015068{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nanoseconds field of struct stat" >&5
15069printf %s "checking for nanoseconds field of struct stat... " >&6; }
15070if test ${ac_cv_struct_st_mtim_nsec+y}
15071then :
15072 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020015073else case e in #(
15074 e) ac_save_CPPFLAGS="$CPPFLAGS"
Leah Neukirchen0a7984a2021-10-14 21:27:55 +010015075 ac_cv_struct_st_mtim_nsec=no
15076 # st_mtim.tv_nsec -- the usual case
15077 # st_mtim._tv_nsec -- Solaris 2.6, if
15078 # (defined _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED == 1
15079 # && !defined __EXTENSIONS__)
15080 # st_mtim.st__tim.tv_nsec -- UnixWare 2.1.2
15081 # st_mtime_n -- AIX 5.2 and above
15082 # st_mtimespec.tv_nsec -- Darwin (Mac OSX)
15083 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
15084 CPPFLAGS="$ac_save_CPPFLAGS -DST_MTIM_NSEC=$ac_val"
15085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15086/* end confdefs.h. */
15087#include <sys/types.h>
15088#include <sys/stat.h>
15089int
Illia Bobyra96d5442023-08-30 16:30:15 +020015090main (void)
Leah Neukirchen0a7984a2021-10-14 21:27:55 +010015091{
15092struct stat s; s.ST_MTIM_NSEC;
15093 ;
15094 return 0;
15095}
15096_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015097if ac_fn_c_try_compile "$LINENO"
15098then :
Leah Neukirchen0a7984a2021-10-14 21:27:55 +010015099 ac_cv_struct_st_mtim_nsec=$ac_val; break
15100fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015101rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Leah Neukirchen0a7984a2021-10-14 21:27:55 +010015102 done
15103 CPPFLAGS="$ac_save_CPPFLAGS"
Christian Brabandt9670f612025-05-07 21:44:33 +020015104 ;;
15105esac
Leah Neukirchen0a7984a2021-10-14 21:27:55 +010015106fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015107{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_st_mtim_nsec" >&5
15108printf "%s\n" "$ac_cv_struct_st_mtim_nsec" >&6; }
Leah Neukirchen0a7984a2021-10-14 21:27:55 +010015109if test $ac_cv_struct_st_mtim_nsec != no; then
15110
Illia Bobyra96d5442023-08-30 16:30:15 +020015111printf "%s\n" "#define ST_MTIM_NSEC $ac_cv_struct_st_mtim_nsec" >>confdefs.h
Leah Neukirchen0a7984a2021-10-14 21:27:55 +010015112
15113fi
15114
Illia Bobyra96d5442023-08-30 16:30:15 +020015115{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv_open()" >&5
15116printf %s "checking for iconv_open()... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015117save_LIBS="$LIBS"
15118LIBS="$LIBS -liconv"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015119cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015120/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015121
15122#ifdef HAVE_ICONV_H
15123# include <iconv.h>
15124#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015125
15126int
Illia Bobyra96d5442023-08-30 16:30:15 +020015127main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015128{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015129iconv_open("fr", "to");
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015130 ;
15131 return 0;
15132}
15133_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015134if ac_fn_c_try_link "$LINENO"
15135then :
15136 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes; with -liconv" >&5
15137printf "%s\n" "yes; with -liconv" >&6; }; printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015138
Christian Brabandt9670f612025-05-07 21:44:33 +020015139else case e in #(
15140 e) LIBS="$save_LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015142/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015143
15144#ifdef HAVE_ICONV_H
15145# include <iconv.h>
15146#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015147
15148int
Illia Bobyra96d5442023-08-30 16:30:15 +020015149main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015150{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015151iconv_open("fr", "to");
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015152 ;
15153 return 0;
15154}
15155_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015156if ac_fn_c_try_link "$LINENO"
15157then :
15158 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15159printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015160
Christian Brabandt9670f612025-05-07 21:44:33 +020015161else case e in #(
15162 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15163printf "%s\n" "no" >&6; } ;;
15164esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000015165fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015166rm -f core conftest.err conftest.$ac_objext conftest.beam \
Christian Brabandt9670f612025-05-07 21:44:33 +020015167 conftest$ac_exeext conftest.$ac_ext ;;
15168esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000015169fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015170rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015171 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000015172
15173
Illia Bobyra96d5442023-08-30 16:30:15 +020015174{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo(CODESET)" >&5
15175printf %s "checking for nl_langinfo(CODESET)... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015176cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015177/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015178
15179#ifdef HAVE_LANGINFO_H
15180# include <langinfo.h>
15181#endif
15182
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015183int
Illia Bobyra96d5442023-08-30 16:30:15 +020015184main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015185{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015186char *cs = nl_langinfo(CODESET);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015187 ;
15188 return 0;
15189}
15190_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015191if ac_fn_c_try_link "$LINENO"
15192then :
15193 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15194printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_NL_LANGINFO_CODESET 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015195
Christian Brabandt9670f612025-05-07 21:44:33 +020015196else case e in #(
15197 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15198printf "%s\n" "no" >&6; } ;;
15199esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015200fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015201rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015202 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015203
Illia Bobyra96d5442023-08-30 16:30:15 +020015204{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for strtod in -lm" >&5
15205printf %s "checking for strtod in -lm... " >&6; }
15206if test ${ac_cv_lib_m_strtod+y}
15207then :
15208 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020015209else case e in #(
15210 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar446cb832008-06-24 21:56:24 +000015211LIBS="-lm $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015212cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015213/* end confdefs.h. */
15214
15215/* Override any GCC internal prototype to avoid an error.
15216 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020015217 builtin and then its argument prototype would still apply.
15218 The 'extern "C"' is for builds by C++ compilers;
15219 although this is not generally supported in C code supporting it here
15220 has little cost and some practical benefit (sr 110532). */
15221#ifdef __cplusplus
15222extern "C"
15223#endif
15224char strtod (void);
Bram Moolenaar446cb832008-06-24 21:56:24 +000015225int
Illia Bobyra96d5442023-08-30 16:30:15 +020015226main (void)
Bram Moolenaar446cb832008-06-24 21:56:24 +000015227{
15228return strtod ();
15229 ;
15230 return 0;
15231}
15232_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015233if ac_fn_c_try_link "$LINENO"
15234then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015235 ac_cv_lib_m_strtod=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020015236else case e in #(
15237 e) ac_cv_lib_m_strtod=no ;;
15238esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000015239fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015240rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015241 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020015242LIBS=$ac_check_lib_save_LIBS ;;
15243esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000015244fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015245{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_strtod" >&5
15246printf "%s\n" "$ac_cv_lib_m_strtod" >&6; }
15247if test "x$ac_cv_lib_m_strtod" = xyes
15248then :
15249 printf "%s\n" "#define HAVE_LIBM 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000015250
15251 LIBS="-lm $LIBS"
15252
15253fi
15254
Bram Moolenaar446cb832008-06-24 21:56:24 +000015255
Illia Bobyra96d5442023-08-30 16:30:15 +020015256{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for isinf()" >&5
15257printf %s "checking for isinf()... " >&6; }
Bram Moolenaara6b89762016-02-29 21:38:26 +010015258cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15259/* end confdefs.h. */
15260
15261#ifdef HAVE_MATH_H
15262# include <math.h>
15263#endif
15264#if STDC_HEADERS
15265# include <stdlib.h>
15266# include <stddef.h>
15267#endif
15268
15269int
Illia Bobyra96d5442023-08-30 16:30:15 +020015270main (void)
Bram Moolenaara6b89762016-02-29 21:38:26 +010015271{
15272int r = isinf(1.11);
15273 ;
15274 return 0;
15275}
15276_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015277if ac_fn_c_try_link "$LINENO"
15278then :
15279 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15280printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_ISINF 1" >>confdefs.h
Bram Moolenaara6b89762016-02-29 21:38:26 +010015281
Christian Brabandt9670f612025-05-07 21:44:33 +020015282else case e in #(
15283 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15284printf "%s\n" "no" >&6; } ;;
15285esac
Bram Moolenaara6b89762016-02-29 21:38:26 +010015286fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015287rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaara6b89762016-02-29 21:38:26 +010015288 conftest$ac_exeext conftest.$ac_ext
15289
Illia Bobyra96d5442023-08-30 16:30:15 +020015290{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for isnan()" >&5
15291printf %s "checking for isnan()... " >&6; }
Bram Moolenaara6b89762016-02-29 21:38:26 +010015292cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15293/* end confdefs.h. */
15294
15295#ifdef HAVE_MATH_H
15296# include <math.h>
15297#endif
15298#if STDC_HEADERS
15299# include <stdlib.h>
15300# include <stddef.h>
15301#endif
15302
15303int
Illia Bobyra96d5442023-08-30 16:30:15 +020015304main (void)
Bram Moolenaara6b89762016-02-29 21:38:26 +010015305{
15306int r = isnan(1.11);
15307 ;
15308 return 0;
15309}
15310_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015311if ac_fn_c_try_link "$LINENO"
15312then :
15313 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15314printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_ISNAN 1" >>confdefs.h
Bram Moolenaara6b89762016-02-29 21:38:26 +010015315
Christian Brabandt9670f612025-05-07 21:44:33 +020015316else case e in #(
15317 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15318printf "%s\n" "no" >&6; } ;;
15319esac
Bram Moolenaara6b89762016-02-29 21:38:26 +010015320fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015321rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaara6b89762016-02-29 21:38:26 +010015322 conftest$ac_exeext conftest.$ac_ext
15323
Illia Bobyra96d5442023-08-30 16:30:15 +020015324{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-acl argument" >&5
15325printf %s "checking --disable-acl argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000015326# Check whether --enable-acl was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020015327if test ${enable_acl+y}
15328then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015329 enableval=$enable_acl;
Christian Brabandt9670f612025-05-07 21:44:33 +020015330else case e in #(
15331 e) enable_acl="yes" ;;
15332esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000015333fi
15334
Bram Moolenaar071d4272004-06-13 20:20:40 +000015335if test "$enable_acl" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015336 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15337printf "%s\n" "no" >&6; }
15338 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for acl_get_file in -lposix1e" >&5
15339printf %s "checking for acl_get_file in -lposix1e... " >&6; }
15340if test ${ac_cv_lib_posix1e_acl_get_file+y}
15341then :
15342 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020015343else case e in #(
15344 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000015345LIBS="-lposix1e $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015346cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015347/* end confdefs.h. */
15348
Bram Moolenaar446cb832008-06-24 21:56:24 +000015349/* Override any GCC internal prototype to avoid an error.
15350 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020015351 builtin and then its argument prototype would still apply.
15352 The 'extern "C"' is for builds by C++ compilers;
15353 although this is not generally supported in C code supporting it here
15354 has little cost and some practical benefit (sr 110532). */
15355#ifdef __cplusplus
15356extern "C"
15357#endif
15358char acl_get_file (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015359int
Illia Bobyra96d5442023-08-30 16:30:15 +020015360main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015361{
Bram Moolenaar446cb832008-06-24 21:56:24 +000015362return acl_get_file ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015363 ;
15364 return 0;
15365}
15366_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015367if ac_fn_c_try_link "$LINENO"
15368then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015369 ac_cv_lib_posix1e_acl_get_file=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020015370else case e in #(
15371 e) ac_cv_lib_posix1e_acl_get_file=no ;;
15372esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000015373fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015374rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015375 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020015376LIBS=$ac_check_lib_save_LIBS ;;
15377esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015378fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015379{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix1e_acl_get_file" >&5
15380printf "%s\n" "$ac_cv_lib_posix1e_acl_get_file" >&6; }
15381if test "x$ac_cv_lib_posix1e_acl_get_file" = xyes
15382then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000015383 LIBS="$LIBS -lposix1e"
Christian Brabandt9670f612025-05-07 21:44:33 +020015384else case e in #(
15385 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for acl_get_file in -lacl" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +020015386printf %s "checking for acl_get_file in -lacl... " >&6; }
15387if test ${ac_cv_lib_acl_acl_get_file+y}
15388then :
15389 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020015390else case e in #(
15391 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000015392LIBS="-lacl $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015393cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015394/* end confdefs.h. */
15395
Bram Moolenaar446cb832008-06-24 21:56:24 +000015396/* Override any GCC internal prototype to avoid an error.
15397 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020015398 builtin and then its argument prototype would still apply.
15399 The 'extern "C"' is for builds by C++ compilers;
15400 although this is not generally supported in C code supporting it here
15401 has little cost and some practical benefit (sr 110532). */
15402#ifdef __cplusplus
15403extern "C"
15404#endif
15405char acl_get_file (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015406int
Illia Bobyra96d5442023-08-30 16:30:15 +020015407main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015408{
Bram Moolenaar446cb832008-06-24 21:56:24 +000015409return acl_get_file ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015410 ;
15411 return 0;
15412}
15413_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015414if ac_fn_c_try_link "$LINENO"
15415then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015416 ac_cv_lib_acl_acl_get_file=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020015417else case e in #(
15418 e) ac_cv_lib_acl_acl_get_file=no ;;
15419esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000015420fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015421rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015422 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020015423LIBS=$ac_check_lib_save_LIBS ;;
15424esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015425fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015426{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_acl_acl_get_file" >&5
15427printf "%s\n" "$ac_cv_lib_acl_acl_get_file" >&6; }
15428if test "x$ac_cv_lib_acl_acl_get_file" = xyes
15429then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000015430 LIBS="$LIBS -lacl"
Illia Bobyra96d5442023-08-30 16:30:15 +020015431 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgetxattr in -lattr" >&5
15432printf %s "checking for fgetxattr in -lattr... " >&6; }
15433if test ${ac_cv_lib_attr_fgetxattr+y}
15434then :
15435 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020015436else case e in #(
15437 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000015438LIBS="-lattr $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015439cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015440/* end confdefs.h. */
15441
Bram Moolenaar446cb832008-06-24 21:56:24 +000015442/* Override any GCC internal prototype to avoid an error.
15443 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020015444 builtin and then its argument prototype would still apply.
15445 The 'extern "C"' is for builds by C++ compilers;
15446 although this is not generally supported in C code supporting it here
15447 has little cost and some practical benefit (sr 110532). */
15448#ifdef __cplusplus
15449extern "C"
15450#endif
15451char fgetxattr (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015452int
Illia Bobyra96d5442023-08-30 16:30:15 +020015453main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015454{
Bram Moolenaar446cb832008-06-24 21:56:24 +000015455return fgetxattr ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015456 ;
15457 return 0;
15458}
15459_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015460if ac_fn_c_try_link "$LINENO"
15461then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015462 ac_cv_lib_attr_fgetxattr=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020015463else case e in #(
15464 e) ac_cv_lib_attr_fgetxattr=no ;;
15465esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000015466fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015467rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015468 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020015469LIBS=$ac_check_lib_save_LIBS ;;
15470esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015471fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015472{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_attr_fgetxattr" >&5
15473printf "%s\n" "$ac_cv_lib_attr_fgetxattr" >&6; }
15474if test "x$ac_cv_lib_attr_fgetxattr" = xyes
15475then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000015476 LIBS="$LIBS -lattr"
Bram Moolenaar071d4272004-06-13 20:20:40 +000015477fi
15478
Bram Moolenaar071d4272004-06-13 20:20:40 +000015479fi
Christian Brabandt9670f612025-05-07 21:44:33 +020015480 ;;
15481esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000015482fi
15483
15484
Illia Bobyra96d5442023-08-30 16:30:15 +020015485 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for POSIX ACL support" >&5
15486printf %s "checking for POSIX ACL support... " >&6; }
Bram Moolenaard6d30422018-01-28 22:48:55 +010015487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015488/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015489
15490#include <sys/types.h>
15491#ifdef HAVE_SYS_ACL_H
15492# include <sys/acl.h>
15493#endif
15494acl_t acl;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015495int
Illia Bobyra96d5442023-08-30 16:30:15 +020015496main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015497{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015498acl = acl_get_file("foo", ACL_TYPE_ACCESS);
15499 acl_set_file("foo", ACL_TYPE_ACCESS, acl);
15500 acl_free(acl);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015501 ;
15502 return 0;
15503}
15504_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015505if ac_fn_c_try_link "$LINENO"
15506then :
15507 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15508printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_POSIX_ACL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015509
Christian Brabandt9670f612025-05-07 21:44:33 +020015510else case e in #(
15511 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15512printf "%s\n" "no" >&6; } ;;
15513esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015514fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015515rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015516 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015517
Illia Bobyra96d5442023-08-30 16:30:15 +020015518 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for acl_get in -lsec" >&5
15519printf %s "checking for acl_get in -lsec... " >&6; }
15520if test ${ac_cv_lib_sec_acl_get+y}
15521then :
15522 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020015523else case e in #(
15524 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar8d462f92012-02-05 22:51:33 +010015525LIBS="-lsec $LIBS"
15526cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15527/* end confdefs.h. */
15528
15529/* Override any GCC internal prototype to avoid an error.
15530 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020015531 builtin and then its argument prototype would still apply.
15532 The 'extern "C"' is for builds by C++ compilers;
15533 although this is not generally supported in C code supporting it here
15534 has little cost and some practical benefit (sr 110532). */
15535#ifdef __cplusplus
15536extern "C"
15537#endif
15538char acl_get (void);
Bram Moolenaar8d462f92012-02-05 22:51:33 +010015539int
Illia Bobyra96d5442023-08-30 16:30:15 +020015540main (void)
Bram Moolenaar8d462f92012-02-05 22:51:33 +010015541{
15542return acl_get ();
15543 ;
15544 return 0;
15545}
15546_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015547if ac_fn_c_try_link "$LINENO"
15548then :
Bram Moolenaar8d462f92012-02-05 22:51:33 +010015549 ac_cv_lib_sec_acl_get=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020015550else case e in #(
15551 e) ac_cv_lib_sec_acl_get=no ;;
15552esac
Bram Moolenaar8d462f92012-02-05 22:51:33 +010015553fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015554rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar8d462f92012-02-05 22:51:33 +010015555 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020015556LIBS=$ac_check_lib_save_LIBS ;;
15557esac
Bram Moolenaar8d462f92012-02-05 22:51:33 +010015558fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015559{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sec_acl_get" >&5
15560printf "%s\n" "$ac_cv_lib_sec_acl_get" >&6; }
15561if test "x$ac_cv_lib_sec_acl_get" = xyes
15562then :
15563 LIBS="$LIBS -lsec"; printf "%s\n" "#define HAVE_SOLARIS_ZFS_ACL 1" >>confdefs.h
Bram Moolenaar8d462f92012-02-05 22:51:33 +010015564
Christian Brabandt9670f612025-05-07 21:44:33 +020015565else case e in #(
15566 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Solaris ACL support" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +020015567printf %s "checking for Solaris ACL support... " >&6; }
Bram Moolenaard6d30422018-01-28 22:48:55 +010015568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015569/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015570
15571#ifdef HAVE_SYS_ACL_H
15572# include <sys/acl.h>
15573#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015574int
Illia Bobyra96d5442023-08-30 16:30:15 +020015575main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015576{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015577acl("foo", GETACLCNT, 0, NULL);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015578
15579 ;
15580 return 0;
15581}
15582_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015583if ac_fn_c_try_link "$LINENO"
15584then :
15585 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15586printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SOLARIS_ACL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015587
Christian Brabandt9670f612025-05-07 21:44:33 +020015588else case e in #(
15589 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15590printf "%s\n" "no" >&6; } ;;
15591esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015592fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015593rm -f core conftest.err conftest.$ac_objext conftest.beam \
Christian Brabandt9670f612025-05-07 21:44:33 +020015594 conftest$ac_exeext conftest.$ac_ext ;;
15595esac
Bram Moolenaar8d462f92012-02-05 22:51:33 +010015596fi
15597
Bram Moolenaar446cb832008-06-24 21:56:24 +000015598
Illia Bobyra96d5442023-08-30 16:30:15 +020015599 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for AIX ACL support" >&5
15600printf %s "checking for AIX ACL support... " >&6; }
Bram Moolenaard6d30422018-01-28 22:48:55 +010015601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015602/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015603
Bram Moolenaar446cb832008-06-24 21:56:24 +000015604#if STDC_HEADERS
15605# include <stdlib.h>
15606# include <stddef.h>
15607#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000015608#ifdef HAVE_SYS_ACL_H
15609# include <sys/acl.h>
15610#endif
15611#ifdef HAVE_SYS_ACCESS_H
15612# include <sys/access.h>
15613#endif
15614#define _ALL_SOURCE
15615
15616#include <sys/stat.h>
15617
15618int aclsize;
15619struct acl *aclent;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015620int
Illia Bobyra96d5442023-08-30 16:30:15 +020015621main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015622{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015623aclsize = sizeof(struct acl);
15624 aclent = (void *)malloc(aclsize);
15625 statacl("foo", STX_NORMAL, aclent, aclsize);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015626
15627 ;
15628 return 0;
15629}
15630_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015631if ac_fn_c_try_link "$LINENO"
15632then :
15633 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15634printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_AIX_ACL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015635
Christian Brabandt9670f612025-05-07 21:44:33 +020015636else case e in #(
15637 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15638printf "%s\n" "no" >&6; } ;;
15639esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000015640fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015641rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015642 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000015643else
Illia Bobyra96d5442023-08-30 16:30:15 +020015644 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15645printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015646fi
15647
Bram Moolenaar3cbe0c02015-09-08 20:00:22 +020015648if test "x$GTK_CFLAGS" != "x"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015649 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pango_shape_full" >&5
15650printf %s "checking for pango_shape_full... " >&6; }
Bram Moolenaar3cbe0c02015-09-08 20:00:22 +020015651 ac_save_CFLAGS="$CFLAGS"
15652 ac_save_LIBS="$LIBS"
15653 CFLAGS="$CFLAGS $GTK_CFLAGS"
15654 LIBS="$LIBS $GTK_LIBS"
15655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15656/* end confdefs.h. */
15657#include <gtk/gtk.h>
15658int
Illia Bobyra96d5442023-08-30 16:30:15 +020015659main (void)
Bram Moolenaar3cbe0c02015-09-08 20:00:22 +020015660{
15661 pango_shape_full(NULL, 0, NULL, 0, NULL, NULL);
15662 ;
15663 return 0;
15664}
15665_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015666if ac_fn_c_try_link "$LINENO"
15667then :
15668 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15669printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_PANGO_SHAPE_FULL 1" >>confdefs.h
Bram Moolenaar3cbe0c02015-09-08 20:00:22 +020015670
Christian Brabandt9670f612025-05-07 21:44:33 +020015671else case e in #(
15672 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15673printf "%s\n" "no" >&6; } ;;
15674esac
Bram Moolenaar3cbe0c02015-09-08 20:00:22 +020015675fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015676rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar5325b9b2015-09-09 20:27:02 +020015677 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar3cbe0c02015-09-08 20:00:22 +020015678 CFLAGS="$ac_save_CFLAGS"
15679 LIBS="$ac_save_LIBS"
15680fi
15681
Illia Bobyra96d5442023-08-30 16:30:15 +020015682{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-gpm argument" >&5
15683printf %s "checking --enable-gpm argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000015684# Check whether --enable-gpm was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020015685if test ${enable_gpm+y}
15686then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015687 enableval=$enable_gpm;
Christian Brabandt9670f612025-05-07 21:44:33 +020015688else case e in #(
15689 e) enable_gpm="yes" ;;
15690esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000015691fi
15692
Bram Moolenaar071d4272004-06-13 20:20:40 +000015693
Bram Moolenaar0b40d082022-03-08 13:32:37 +000015694if test "$enable_gpm" = "yes" -o "$enable_gpm" = "dynamic"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015695 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_gpm" >&5
15696printf "%s\n" "$enable_gpm" >&6; }
15697 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gpm" >&5
15698printf %s "checking for gpm... " >&6; }
15699if test ${vi_cv_have_gpm+y}
15700then :
15701 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020015702else case e in #(
15703 e) olibs="$LIBS" ; LIBS="-lgpm"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015704 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015705/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015706#include <gpm.h>
15707 #include <linux/keyboard.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015708int
Illia Bobyra96d5442023-08-30 16:30:15 +020015709main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015710{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015711Gpm_GetLibVersion(NULL);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015712 ;
15713 return 0;
15714}
15715_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015716if ac_fn_c_try_link "$LINENO"
15717then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000015718 vi_cv_have_gpm=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020015719else case e in #(
15720 e) vi_cv_have_gpm=no ;;
15721esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015722fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015723rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015724 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015725 LIBS="$olibs"
Christian Brabandt9670f612025-05-07 21:44:33 +020015726 ;;
15727esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015728fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015729{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_have_gpm" >&5
15730printf "%s\n" "$vi_cv_have_gpm" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015731 if test $vi_cv_have_gpm = yes; then
Bram Moolenaar0b40d082022-03-08 13:32:37 +000015732 if test "$enable_gpm" = "yes"; then
15733 LIBS="$LIBS -lgpm"
15734 else
Illia Bobyra96d5442023-08-30 16:30:15 +020015735 printf "%s\n" "#define DYNAMIC_GPM 1" >>confdefs.h
Bram Moolenaar0b40d082022-03-08 13:32:37 +000015736
15737 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015738 printf "%s\n" "#define HAVE_GPM 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015739
15740 fi
15741else
Illia Bobyra96d5442023-08-30 16:30:15 +020015742 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15743printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015744fi
15745
Illia Bobyra96d5442023-08-30 16:30:15 +020015746{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-sysmouse argument" >&5
15747printf %s "checking --disable-sysmouse argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000015748# Check whether --enable-sysmouse was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020015749if test ${enable_sysmouse+y}
15750then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015751 enableval=$enable_sysmouse;
Christian Brabandt9670f612025-05-07 21:44:33 +020015752else case e in #(
15753 e) enable_sysmouse="yes" ;;
15754esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000015755fi
15756
15757
15758if test "$enable_sysmouse" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015759 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15760printf "%s\n" "no" >&6; }
15761 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysmouse" >&5
15762printf %s "checking for sysmouse... " >&6; }
15763if test ${vi_cv_have_sysmouse+y}
15764then :
15765 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020015766else case e in #(
15767 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015768/* end confdefs.h. */
15769#include <sys/consio.h>
15770 #include <signal.h>
15771 #include <sys/fbio.h>
15772int
Illia Bobyra96d5442023-08-30 16:30:15 +020015773main (void)
Bram Moolenaar446cb832008-06-24 21:56:24 +000015774{
15775struct mouse_info mouse;
15776 mouse.operation = MOUSE_MODE;
15777 mouse.operation = MOUSE_SHOW;
15778 mouse.u.mode.mode = 0;
15779 mouse.u.mode.signal = SIGUSR2;
15780 ;
15781 return 0;
15782}
15783_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015784if ac_fn_c_try_link "$LINENO"
15785then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015786 vi_cv_have_sysmouse=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020015787else case e in #(
15788 e) vi_cv_have_sysmouse=no ;;
15789esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000015790fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015791rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015792 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020015793 ;;
15794esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000015795fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015796{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_have_sysmouse" >&5
15797printf "%s\n" "$vi_cv_have_sysmouse" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000015798 if test $vi_cv_have_sysmouse = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015799 printf "%s\n" "#define HAVE_SYSMOUSE 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000015800
15801 fi
15802else
Illia Bobyra96d5442023-08-30 16:30:15 +020015803 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15804printf "%s\n" "yes" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000015805fi
15806
Illia Bobyra96d5442023-08-30 16:30:15 +020015807{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FD_CLOEXEC" >&5
15808printf %s "checking for FD_CLOEXEC... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015809cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarf05da212009-11-17 16:13:15 +000015810/* end confdefs.h. */
15811#if HAVE_FCNTL_H
15812# include <fcntl.h>
15813#endif
15814int
Illia Bobyra96d5442023-08-30 16:30:15 +020015815main (void)
Bram Moolenaarf05da212009-11-17 16:13:15 +000015816{
15817 int flag = FD_CLOEXEC;
15818 ;
15819 return 0;
15820}
15821_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015822if ac_fn_c_try_compile "$LINENO"
15823then :
15824 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15825printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_FD_CLOEXEC 1" >>confdefs.h
Bram Moolenaarf05da212009-11-17 16:13:15 +000015826
Christian Brabandt9670f612025-05-07 21:44:33 +020015827else case e in #(
15828 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15829printf "%s\n" "not usable" >&6; } ;;
15830esac
Bram Moolenaarf05da212009-11-17 16:13:15 +000015831fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015832rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaarf05da212009-11-17 16:13:15 +000015833
Illia Bobyra96d5442023-08-30 16:30:15 +020015834{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for rename" >&5
15835printf %s "checking for rename... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015836cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015837/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015838#include <stdio.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015839int
Illia Bobyra96d5442023-08-30 16:30:15 +020015840main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015841{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015842rename("this", "that")
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015843 ;
15844 return 0;
15845}
15846_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015847if ac_fn_c_try_link "$LINENO"
15848then :
15849 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15850printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_RENAME 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015851
Christian Brabandt9670f612025-05-07 21:44:33 +020015852else case e in #(
15853 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15854printf "%s\n" "no" >&6; } ;;
15855esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015856fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015857rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015858 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015859
Illia Bobyra96d5442023-08-30 16:30:15 +020015860{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dirfd" >&5
15861printf %s "checking for dirfd... " >&6; }
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015862cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15863/* end confdefs.h. */
15864#include <sys/types.h>
15865#include <dirent.h>
15866int
Illia Bobyra96d5442023-08-30 16:30:15 +020015867main (void)
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015868{
15869DIR * dir=opendir("dirname"); dirfd(dir);
15870 ;
15871 return 0;
15872}
15873_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015874if ac_fn_c_try_link "$LINENO"
15875then :
15876 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15877printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_DIRFD 1" >>confdefs.h
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015878
Christian Brabandt9670f612025-05-07 21:44:33 +020015879else case e in #(
15880 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15881printf "%s\n" "not usable" >&6; } ;;
15882esac
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015883fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015884rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar9d8bfae2020-09-02 21:21:35 +020015885 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015886
Illia Bobyra96d5442023-08-30 16:30:15 +020015887{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for flock" >&5
15888printf %s "checking for flock... " >&6; }
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015889cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15890/* end confdefs.h. */
15891#include <sys/file.h>
15892int
Illia Bobyra96d5442023-08-30 16:30:15 +020015893main (void)
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015894{
15895flock(10, LOCK_SH);
15896 ;
15897 return 0;
15898}
15899_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015900if ac_fn_c_try_link "$LINENO"
15901then :
15902 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15903printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_FLOCK 1" >>confdefs.h
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015904
Christian Brabandt9670f612025-05-07 21:44:33 +020015905else case e in #(
15906 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15907printf "%s\n" "not usable" >&6; } ;;
15908esac
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015909fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015910rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar9d8bfae2020-09-02 21:21:35 +020015911 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015912
Illia Bobyra96d5442023-08-30 16:30:15 +020015913{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysctl" >&5
15914printf %s "checking for sysctl... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015915cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015916/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015917#include <sys/types.h>
15918#include <sys/sysctl.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015919int
Illia Bobyra96d5442023-08-30 16:30:15 +020015920main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015921{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015922 int mib[2], r;
15923 size_t len;
15924
15925 mib[0] = CTL_HW;
15926 mib[1] = HW_USERMEM;
15927 len = sizeof(r);
15928 (void)sysctl(mib, 2, &r, &len, (void *)0, (size_t)0);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015929
15930 ;
15931 return 0;
15932}
15933_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015934if ac_fn_c_try_compile "$LINENO"
15935then :
15936 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15937printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SYSCTL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015938
Christian Brabandt9670f612025-05-07 21:44:33 +020015939else case e in #(
15940 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15941printf "%s\n" "not usable" >&6; } ;;
15942esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015943fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015944rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015945
Illia Bobyra96d5442023-08-30 16:30:15 +020015946{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysinfo" >&5
15947printf %s "checking for sysinfo... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015948cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015949/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015950#include <sys/types.h>
15951#include <sys/sysinfo.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015952int
Illia Bobyra96d5442023-08-30 16:30:15 +020015953main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015954{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015955 struct sysinfo sinfo;
15956 int t;
15957
15958 (void)sysinfo(&sinfo);
15959 t = sinfo.totalram;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015960
15961 ;
15962 return 0;
15963}
15964_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015965if ac_fn_c_try_link "$LINENO"
15966then :
15967 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15968printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SYSINFO 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015969
Christian Brabandt9670f612025-05-07 21:44:33 +020015970else case e in #(
15971 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15972printf "%s\n" "not usable" >&6; } ;;
15973esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015974fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015975rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaare2982d62021-10-06 11:27:21 +010015976 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015977
Illia Bobyra96d5442023-08-30 16:30:15 +020015978{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysinfo.mem_unit" >&5
15979printf %s "checking for sysinfo.mem_unit... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015980cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar914572a2007-05-01 11:37:47 +000015981/* end confdefs.h. */
15982#include <sys/types.h>
15983#include <sys/sysinfo.h>
15984int
Illia Bobyra96d5442023-08-30 16:30:15 +020015985main (void)
Bram Moolenaar914572a2007-05-01 11:37:47 +000015986{
15987 struct sysinfo sinfo;
Bram Moolenaar3c7ad012013-06-11 19:53:45 +020015988 sinfo.mem_unit = 1;
Bram Moolenaar914572a2007-05-01 11:37:47 +000015989
15990 ;
15991 return 0;
15992}
15993_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015994if ac_fn_c_try_compile "$LINENO"
15995then :
15996 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15997printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SYSINFO_MEM_UNIT 1" >>confdefs.h
Bram Moolenaar914572a2007-05-01 11:37:47 +000015998
Christian Brabandt9670f612025-05-07 21:44:33 +020015999else case e in #(
16000 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16001printf "%s\n" "no" >&6; } ;;
16002esac
Bram Moolenaar914572a2007-05-01 11:37:47 +000016003fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016004rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000016005
Illia Bobyra96d5442023-08-30 16:30:15 +020016006{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysinfo.uptime" >&5
16007printf %s "checking for sysinfo.uptime... " >&6; }
Bram Moolenaarf52f0602021-03-10 21:26:37 +010016008cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16009/* end confdefs.h. */
16010#include <sys/types.h>
16011#include <sys/sysinfo.h>
16012int
Illia Bobyra96d5442023-08-30 16:30:15 +020016013main (void)
Bram Moolenaarf52f0602021-03-10 21:26:37 +010016014{
16015 struct sysinfo sinfo;
16016 long ut;
16017
16018 (void)sysinfo(&sinfo);
16019 ut = sinfo.uptime;
16020
16021 ;
16022 return 0;
16023}
16024_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016025if ac_fn_c_try_compile "$LINENO"
16026then :
16027 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16028printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SYSINFO_UPTIME 1" >>confdefs.h
Bram Moolenaarf52f0602021-03-10 21:26:37 +010016029
Christian Brabandt9670f612025-05-07 21:44:33 +020016030else case e in #(
16031 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16032printf "%s\n" "no" >&6; } ;;
16033esac
Bram Moolenaarf52f0602021-03-10 21:26:37 +010016034fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016035rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaarf52f0602021-03-10 21:26:37 +010016036
Illia Bobyra96d5442023-08-30 16:30:15 +020016037{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysconf" >&5
16038printf %s "checking for sysconf... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016039cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016040/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016041#include <unistd.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016042int
Illia Bobyra96d5442023-08-30 16:30:15 +020016043main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016044{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016045 (void)sysconf(_SC_PAGESIZE);
16046 (void)sysconf(_SC_PHYS_PAGES);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016047
16048 ;
16049 return 0;
16050}
16051_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016052if ac_fn_c_try_compile "$LINENO"
16053then :
16054 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16055printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SYSCONF 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016056
Christian Brabandt9670f612025-05-07 21:44:33 +020016057else case e in #(
16058 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
16059printf "%s\n" "not usable" >&6; } ;;
16060esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000016061fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016062rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000016063
Illia Bobyra96d5442023-08-30 16:30:15 +020016064{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _SC_SIGSTKSZ via sysconf()" >&5
16065printf %s "checking for _SC_SIGSTKSZ via sysconf()... " >&6; }
Bram Moolenaar0e62a672021-02-25 17:17:56 +010016066cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16067/* end confdefs.h. */
16068#include <unistd.h>
16069int
Illia Bobyra96d5442023-08-30 16:30:15 +020016070main (void)
Bram Moolenaar0e62a672021-02-25 17:17:56 +010016071{
16072 (void)sysconf(_SC_SIGSTKSZ);
16073
16074 ;
16075 return 0;
16076}
16077_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016078if ac_fn_c_try_compile "$LINENO"
16079then :
16080 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16081printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SYSCONF_SIGSTKSZ 1" >>confdefs.h
Bram Moolenaar0e62a672021-02-25 17:17:56 +010016082
Christian Brabandt9670f612025-05-07 21:44:33 +020016083else case e in #(
16084 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
16085printf "%s\n" "not usable" >&6; } ;;
16086esac
Bram Moolenaar0e62a672021-02-25 17:17:56 +010016087fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016088rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0e62a672021-02-25 17:17:56 +010016089
Bram Moolenaar914703b2010-05-31 21:59:46 +020016090# The cast to long int works around a bug in the HP C Compiler
16091# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
Christian Brabandt9670f612025-05-07 21:44:33 +020016092# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'.
Bram Moolenaar914703b2010-05-31 21:59:46 +020016093# This bug is HP SR number 8606223364.
Illia Bobyra96d5442023-08-30 16:30:15 +020016094{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
16095printf %s "checking size of int... " >&6; }
16096if test ${ac_cv_sizeof_int+y}
16097then :
16098 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020016099else case e in #(
16100 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 +020016101then :
Bram Moolenaar914703b2010-05-31 21:59:46 +020016102
Christian Brabandt9670f612025-05-07 21:44:33 +020016103else case e in #(
16104 e) if test "$ac_cv_type_int" = yes; then
16105 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
16106printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +010016107as_fn_error 77 "cannot compute sizeof (int)
Christian Brabandt9670f612025-05-07 21:44:33 +020016108See 'config.log' for more details" "$LINENO" 5; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020016109 else
16110 ac_cv_sizeof_int=0
Christian Brabandt9670f612025-05-07 21:44:33 +020016111 fi ;;
16112esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000016113fi
Christian Brabandt9670f612025-05-07 21:44:33 +020016114 ;;
16115esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000016116fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016117{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
16118printf "%s\n" "$ac_cv_sizeof_int" >&6; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020016119
16120
16121
Illia Bobyra96d5442023-08-30 16:30:15 +020016122printf "%s\n" "#define SIZEOF_INT $ac_cv_sizeof_int" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016123
16124
Bram Moolenaar914703b2010-05-31 21:59:46 +020016125# The cast to long int works around a bug in the HP C Compiler
16126# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
Christian Brabandt9670f612025-05-07 21:44:33 +020016127# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'.
Bram Moolenaar914703b2010-05-31 21:59:46 +020016128# This bug is HP SR number 8606223364.
Illia Bobyra96d5442023-08-30 16:30:15 +020016129{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
16130printf %s "checking size of long... " >&6; }
16131if test ${ac_cv_sizeof_long+y}
16132then :
16133 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020016134else case e in #(
16135 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 +020016136then :
Bram Moolenaar914703b2010-05-31 21:59:46 +020016137
Christian Brabandt9670f612025-05-07 21:44:33 +020016138else case e in #(
16139 e) if test "$ac_cv_type_long" = yes; then
16140 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
16141printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +010016142as_fn_error 77 "cannot compute sizeof (long)
Christian Brabandt9670f612025-05-07 21:44:33 +020016143See 'config.log' for more details" "$LINENO" 5; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020016144 else
16145 ac_cv_sizeof_long=0
Christian Brabandt9670f612025-05-07 21:44:33 +020016146 fi ;;
16147esac
Bram Moolenaar914703b2010-05-31 21:59:46 +020016148fi
Christian Brabandt9670f612025-05-07 21:44:33 +020016149 ;;
16150esac
Bram Moolenaar914703b2010-05-31 21:59:46 +020016151fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016152{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
16153printf "%s\n" "$ac_cv_sizeof_long" >&6; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020016154
16155
16156
Illia Bobyra96d5442023-08-30 16:30:15 +020016157printf "%s\n" "#define SIZEOF_LONG $ac_cv_sizeof_long" >>confdefs.h
Bram Moolenaar914703b2010-05-31 21:59:46 +020016158
16159
16160# The cast to long int works around a bug in the HP C Compiler
16161# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
Christian Brabandt9670f612025-05-07 21:44:33 +020016162# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'.
Bram Moolenaar914703b2010-05-31 21:59:46 +020016163# This bug is HP SR number 8606223364.
Illia Bobyra96d5442023-08-30 16:30:15 +020016164{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
16165printf %s "checking size of time_t... " >&6; }
16166if test ${ac_cv_sizeof_time_t+y}
16167then :
16168 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020016169else case e in #(
16170 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 +020016171then :
Bram Moolenaar914703b2010-05-31 21:59:46 +020016172
Christian Brabandt9670f612025-05-07 21:44:33 +020016173else case e in #(
16174 e) if test "$ac_cv_type_time_t" = yes; then
16175 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
16176printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +010016177as_fn_error 77 "cannot compute sizeof (time_t)
Christian Brabandt9670f612025-05-07 21:44:33 +020016178See 'config.log' for more details" "$LINENO" 5; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020016179 else
16180 ac_cv_sizeof_time_t=0
Christian Brabandt9670f612025-05-07 21:44:33 +020016181 fi ;;
16182esac
Bram Moolenaar644fdff2010-05-30 13:26:21 +020016183fi
Christian Brabandt9670f612025-05-07 21:44:33 +020016184 ;;
16185esac
Bram Moolenaar644fdff2010-05-30 13:26:21 +020016186fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016187{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
16188printf "%s\n" "$ac_cv_sizeof_time_t" >&6; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020016189
16190
16191
Illia Bobyra96d5442023-08-30 16:30:15 +020016192printf "%s\n" "#define SIZEOF_TIME_T $ac_cv_sizeof_time_t" >>confdefs.h
Bram Moolenaar644fdff2010-05-30 13:26:21 +020016193
16194
Bram Moolenaar914703b2010-05-31 21:59:46 +020016195# The cast to long int works around a bug in the HP C Compiler
16196# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
Christian Brabandt9670f612025-05-07 21:44:33 +020016197# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'.
Bram Moolenaar914703b2010-05-31 21:59:46 +020016198# This bug is HP SR number 8606223364.
Illia Bobyra96d5442023-08-30 16:30:15 +020016199{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
16200printf %s "checking size of off_t... " >&6; }
16201if test ${ac_cv_sizeof_off_t+y}
16202then :
16203 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020016204else case e in #(
16205 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 +020016206then :
Bram Moolenaar914703b2010-05-31 21:59:46 +020016207
Christian Brabandt9670f612025-05-07 21:44:33 +020016208else case e in #(
16209 e) if test "$ac_cv_type_off_t" = yes; then
16210 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
16211printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +010016212as_fn_error 77 "cannot compute sizeof (off_t)
Christian Brabandt9670f612025-05-07 21:44:33 +020016213See 'config.log' for more details" "$LINENO" 5; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020016214 else
16215 ac_cv_sizeof_off_t=0
Christian Brabandt9670f612025-05-07 21:44:33 +020016216 fi ;;
16217esac
Bram Moolenaar914703b2010-05-31 21:59:46 +020016218fi
Christian Brabandt9670f612025-05-07 21:44:33 +020016219 ;;
16220esac
Bram Moolenaar914703b2010-05-31 21:59:46 +020016221fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016222{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
16223printf "%s\n" "$ac_cv_sizeof_off_t" >&6; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020016224
16225
16226
Illia Bobyra96d5442023-08-30 16:30:15 +020016227printf "%s\n" "#define SIZEOF_OFF_T $ac_cv_sizeof_off_t" >>confdefs.h
Bram Moolenaar914703b2010-05-31 21:59:46 +020016228
16229
16230
Illia Bobyra96d5442023-08-30 16:30:15 +020016231printf "%s\n" "#define VIM_SIZEOF_INT $ac_cv_sizeof_int" >>confdefs.h
Bram Moolenaara2aa31a2014-02-23 22:52:40 +010016232
Illia Bobyra96d5442023-08-30 16:30:15 +020016233printf "%s\n" "#define VIM_SIZEOF_LONG $ac_cv_sizeof_long" >>confdefs.h
Bram Moolenaara2aa31a2014-02-23 22:52:40 +010016234
16235
Illia Bobyra96d5442023-08-30 16:30:15 +020016236{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking uint32_t is 32 bits" >&5
16237printf %s "checking uint32_t is 32 bits... " >&6; }
16238if test "$cross_compiling" = yes
16239then :
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010016240 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: assuming uint32_t is correct when cross-compiling" >&5
16241printf "%s\n" "$as_me: WARNING: assuming uint32_t is correct when cross-compiling" >&2;}
Christian Brabandt9670f612025-05-07 21:44:33 +020016242else case e in #(
16243 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarfa7584c2010-05-19 21:57:45 +020016244/* end confdefs.h. */
16245
16246#ifdef HAVE_STDINT_H
16247# include <stdint.h>
16248#endif
16249#ifdef HAVE_INTTYPES_H
16250# include <inttypes.h>
16251#endif
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010016252int main() {
Bram Moolenaarfa7584c2010-05-19 21:57:45 +020016253 uint32_t nr1 = (uint32_t)-1;
16254 uint32_t nr2 = (uint32_t)0xffffffffUL;
Bram Moolenaar52897832020-07-02 22:50:37 +020016255 if (sizeof(uint32_t) != 4 || nr1 != 0xffffffffUL || nr2 + 1 != 0) return 1;
16256 return 0;
Bram Moolenaarfa7584c2010-05-19 21:57:45 +020016257}
16258_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016259if ac_fn_c_try_run "$LINENO"
16260then :
16261 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16262printf "%s\n" "ok" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +020016263else case e in #(
16264 e) as_fn_error $? "WRONG! uint32_t not defined correctly." "$LINENO" 5 ;;
16265esac
Bram Moolenaarfa7584c2010-05-19 21:57:45 +020016266fi
16267rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
Christian Brabandt9670f612025-05-07 21:44:33 +020016268 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
16269esac
Bram Moolenaarfa7584c2010-05-19 21:57:45 +020016270fi
16271
16272
Bram Moolenaar446cb832008-06-24 21:56:24 +000016273
Bram Moolenaar071d4272004-06-13 20:20:40 +000016274bcopy_test_prog='
Bram Moolenaar446cb832008-06-24 21:56:24 +000016275#include "confdefs.h"
16276#ifdef HAVE_STRING_H
16277# include <string.h>
16278#endif
16279#if STDC_HEADERS
16280# include <stdlib.h>
16281# include <stddef.h>
16282#endif
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010016283int main() {
Bram Moolenaar071d4272004-06-13 20:20:40 +000016284 char buf[10];
16285 strcpy(buf, "abcdefghi");
16286 mch_memmove(buf, buf + 2, 3);
16287 if (strncmp(buf, "ababcf", 6))
16288 exit(1);
16289 strcpy(buf, "abcdefghi");
16290 mch_memmove(buf + 2, buf, 3);
16291 if (strncmp(buf, "cdedef", 6))
16292 exit(1);
16293 exit(0); /* libc version works properly. */
16294}'
16295
Illia Bobyra96d5442023-08-30 16:30:15 +020016296{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether memmove handles overlaps" >&5
16297printf %s "checking whether memmove handles overlaps... " >&6; }
16298if test ${vim_cv_memmove_handles_overlap+y}
16299then :
16300 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020016301else case e in #(
16302 e)
Illia Bobyra96d5442023-08-30 16:30:15 +020016303 if test "$cross_compiling" = yes
16304then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000016305
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010016306 vim_cv_memmove_handles_overlap=yes
16307 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cross-compiling: consider setting 'vim_cv_memmove_handles_overlap'" >&5
16308printf "%s\n" "$as_me: WARNING: cross-compiling: consider setting 'vim_cv_memmove_handles_overlap'" >&2;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000016309
Christian Brabandt9670f612025-05-07 21:44:33 +020016310else case e in #(
16311 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016312/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016313#define mch_memmove(s,d,l) memmove(d,s,l) $bcopy_test_prog
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016314_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016315if ac_fn_c_try_run "$LINENO"
16316then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000016317
16318 vim_cv_memmove_handles_overlap=yes
16319
Christian Brabandt9670f612025-05-07 21:44:33 +020016320else case e in #(
16321 e)
Bram Moolenaar446cb832008-06-24 21:56:24 +000016322 vim_cv_memmove_handles_overlap=no
Christian Brabandt9670f612025-05-07 21:44:33 +020016323 ;;
16324esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000016325fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016326rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
Christian Brabandt9670f612025-05-07 21:44:33 +020016327 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
16328esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000016329fi
16330
Christian Brabandt9670f612025-05-07 21:44:33 +020016331 ;;
16332esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000016333fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016334{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_memmove_handles_overlap" >&5
16335printf "%s\n" "$vim_cv_memmove_handles_overlap" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000016336
16337if test "x$vim_cv_memmove_handles_overlap" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016338 printf "%s\n" "#define USEMEMMOVE 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000016339
Bram Moolenaar071d4272004-06-13 20:20:40 +000016340else
Illia Bobyra96d5442023-08-30 16:30:15 +020016341 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether bcopy handles overlaps" >&5
16342printf %s "checking whether bcopy handles overlaps... " >&6; }
16343if test ${vim_cv_bcopy_handles_overlap+y}
16344then :
16345 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020016346else case e in #(
16347 e)
Illia Bobyra96d5442023-08-30 16:30:15 +020016348 if test "$cross_compiling" = yes
16349then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000016350
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010016351 vim_cv_bcopy_handles_overlap=yes
16352 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cross-compiling: consider setting 'vim_cv_bcopy_handles_overlap'" >&5
16353printf "%s\n" "$as_me: WARNING: cross-compiling: consider setting 'vim_cv_bcopy_handles_overlap'" >&2;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000016354
Christian Brabandt9670f612025-05-07 21:44:33 +020016355else case e in #(
16356 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016357/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000016358#define mch_bcopy(s,d,l) bcopy(d,s,l) $bcopy_test_prog
16359_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016360if ac_fn_c_try_run "$LINENO"
16361then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000016362
16363 vim_cv_bcopy_handles_overlap=yes
16364
Christian Brabandt9670f612025-05-07 21:44:33 +020016365else case e in #(
16366 e)
Bram Moolenaar446cb832008-06-24 21:56:24 +000016367 vim_cv_bcopy_handles_overlap=no
Christian Brabandt9670f612025-05-07 21:44:33 +020016368 ;;
16369esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000016370fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016371rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
Christian Brabandt9670f612025-05-07 21:44:33 +020016372 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
16373esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000016374fi
16375
Christian Brabandt9670f612025-05-07 21:44:33 +020016376 ;;
16377esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000016378fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016379{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_bcopy_handles_overlap" >&5
16380printf "%s\n" "$vim_cv_bcopy_handles_overlap" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000016381
16382 if test "x$vim_cv_bcopy_handles_overlap" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016383 printf "%s\n" "#define USEBCOPY 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016384
Bram Moolenaar446cb832008-06-24 21:56:24 +000016385 else
Illia Bobyra96d5442023-08-30 16:30:15 +020016386 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether memcpy handles overlaps" >&5
16387printf %s "checking whether memcpy handles overlaps... " >&6; }
16388if test ${vim_cv_memcpy_handles_overlap+y}
16389then :
16390 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020016391else case e in #(
16392 e)
Illia Bobyra96d5442023-08-30 16:30:15 +020016393 if test "$cross_compiling" = yes
16394then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000016395
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010016396 vim_cv_memcpy_handles_overlap=yes
16397 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cross-compiling: consider setting 'vim_cv_memcpy_handles_overlap'" >&5
16398printf "%s\n" "$as_me: WARNING: cross-compiling: consider setting 'vim_cv_memcpy_handles_overlap'" >&2;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000016399
Christian Brabandt9670f612025-05-07 21:44:33 +020016400else case e in #(
16401 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016402/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000016403#define mch_memcpy(s,d,l) memcpy(d,s,l) $bcopy_test_prog
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016404_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016405if ac_fn_c_try_run "$LINENO"
16406then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000016407
16408 vim_cv_memcpy_handles_overlap=yes
16409
Christian Brabandt9670f612025-05-07 21:44:33 +020016410else case e in #(
16411 e)
Bram Moolenaar446cb832008-06-24 21:56:24 +000016412 vim_cv_memcpy_handles_overlap=no
Christian Brabandt9670f612025-05-07 21:44:33 +020016413 ;;
16414esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000016415fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016416rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
Christian Brabandt9670f612025-05-07 21:44:33 +020016417 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
16418esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000016419fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000016420
Christian Brabandt9670f612025-05-07 21:44:33 +020016421 ;;
16422esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000016423fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016424{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_memcpy_handles_overlap" >&5
16425printf "%s\n" "$vim_cv_memcpy_handles_overlap" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000016426
16427 if test "x$vim_cv_memcpy_handles_overlap" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016428 printf "%s\n" "#define USEMEMCPY 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000016429
16430 fi
16431 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000016432fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000016433
Bram Moolenaar071d4272004-06-13 20:20:40 +000016434
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020016435if test "x$with_x" = "xyes"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000016436 cflags_save=$CFLAGS
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020016437 libs_save=$LIBS
16438 LIBS="$LIBS $X_LIBS $GUI_LIB_LOC $GUI_X_LIBS $X_PRE_LIBS $X_LIB $X_EXTRA_LIBS"
16439 CFLAGS="$CFLAGS $X_CFLAGS"
16440
Illia Bobyra96d5442023-08-30 16:30:15 +020016441 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether X_LOCALE needed" >&5
16442printf %s "checking whether X_LOCALE needed... " >&6; }
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020016443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016444/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016445#include <X11/Xlocale.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016446int
Illia Bobyra96d5442023-08-30 16:30:15 +020016447main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016448{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016449
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016450 ;
16451 return 0;
16452}
16453_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016454if ac_fn_c_try_compile "$LINENO"
16455then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016457/* end confdefs.h. */
16458
Bram Moolenaar446cb832008-06-24 21:56:24 +000016459/* Override any GCC internal prototype to avoid an error.
16460 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020016461 builtin and then its argument prototype would still apply.
16462 The 'extern "C"' is for builds by C++ compilers;
16463 although this is not generally supported in C code supporting it here
16464 has little cost and some practical benefit (sr 110532). */
16465#ifdef __cplusplus
16466extern "C"
16467#endif
16468char _Xsetlocale (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016469int
Illia Bobyra96d5442023-08-30 16:30:15 +020016470main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016471{
Bram Moolenaar446cb832008-06-24 21:56:24 +000016472return _Xsetlocale ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016473 ;
16474 return 0;
16475}
16476_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016477if ac_fn_c_try_link "$LINENO"
16478then :
16479 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16480printf "%s\n" "yes" >&6; }
16481 printf "%s\n" "#define X_LOCALE 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016482
Christian Brabandt9670f612025-05-07 21:44:33 +020016483else case e in #(
16484 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16485printf "%s\n" "no" >&6; } ;;
16486esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000016487fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016488rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016489 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020016490else case e in #(
16491 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16492printf "%s\n" "no" >&6; } ;;
16493esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000016494fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016495rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020016496
Illia Bobyra96d5442023-08-30 16:30:15 +020016497 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether Xutf8SetWMProperties() can be used" >&5
16498printf %s "checking whether Xutf8SetWMProperties() can be used... " >&6; }
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020016499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16500/* end confdefs.h. */
16501
16502/* Override any GCC internal prototype to avoid an error.
16503 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020016504 builtin and then its argument prototype would still apply.
16505 The 'extern "C"' is for builds by C++ compilers;
16506 although this is not generally supported in C code supporting it here
16507 has little cost and some practical benefit (sr 110532). */
16508#ifdef __cplusplus
16509extern "C"
16510#endif
16511char Xutf8SetWMProperties (void);
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020016512int
Illia Bobyra96d5442023-08-30 16:30:15 +020016513main (void)
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020016514{
16515return Xutf8SetWMProperties ();
16516 ;
16517 return 0;
16518}
16519_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016520if ac_fn_c_try_link "$LINENO"
16521then :
16522 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16523printf "%s\n" "yes" >&6; }
16524 printf "%s\n" "#define HAVE_XUTF8SETWMPROPERTIES 1" >>confdefs.h
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020016525
Christian Brabandt9670f612025-05-07 21:44:33 +020016526else case e in #(
16527 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16528printf "%s\n" "no" >&6; } ;;
16529esac
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020016530fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016531rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020016532 conftest$ac_exeext conftest.$ac_ext
16533
Bram Moolenaar071d4272004-06-13 20:20:40 +000016534 CFLAGS=$cflags_save
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020016535 LIBS=$libs_save
Bram Moolenaar071d4272004-06-13 20:20:40 +000016536fi
16537
Illia Bobyra96d5442023-08-30 16:30:15 +020016538{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _xpg4_setrunelocale in -lxpg4" >&5
16539printf %s "checking for _xpg4_setrunelocale in -lxpg4... " >&6; }
16540if test ${ac_cv_lib_xpg4__xpg4_setrunelocale+y}
16541then :
16542 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020016543else case e in #(
16544 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000016545LIBS="-lxpg4 $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016546cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016547/* end confdefs.h. */
16548
Bram Moolenaar446cb832008-06-24 21:56:24 +000016549/* Override any GCC internal prototype to avoid an error.
16550 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020016551 builtin and then its argument prototype would still apply.
16552 The 'extern "C"' is for builds by C++ compilers;
16553 although this is not generally supported in C code supporting it here
16554 has little cost and some practical benefit (sr 110532). */
16555#ifdef __cplusplus
16556extern "C"
16557#endif
16558char _xpg4_setrunelocale (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016559int
Illia Bobyra96d5442023-08-30 16:30:15 +020016560main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016561{
Bram Moolenaar446cb832008-06-24 21:56:24 +000016562return _xpg4_setrunelocale ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016563 ;
16564 return 0;
16565}
16566_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016567if ac_fn_c_try_link "$LINENO"
16568then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016569 ac_cv_lib_xpg4__xpg4_setrunelocale=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020016570else case e in #(
16571 e) ac_cv_lib_xpg4__xpg4_setrunelocale=no ;;
16572esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000016573fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016574rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016575 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020016576LIBS=$ac_check_lib_save_LIBS ;;
16577esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016578fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016579{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xpg4__xpg4_setrunelocale" >&5
16580printf "%s\n" "$ac_cv_lib_xpg4__xpg4_setrunelocale" >&6; }
16581if test "x$ac_cv_lib_xpg4__xpg4_setrunelocale" = xyes
16582then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000016583 LIBS="$LIBS -lxpg4"
Bram Moolenaar071d4272004-06-13 20:20:40 +000016584fi
16585
16586
Illia Bobyra96d5442023-08-30 16:30:15 +020016587{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to create tags" >&5
16588printf %s "checking how to create tags... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000016589test -f tags && mv tags tags.save
Bram Moolenaar5897e0c2011-05-10 15:42:03 +020016590if (eval ctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then
Bram Moolenaar509ff062020-01-02 22:38:49 +010016591 TAGPRG="ctags -I INIT+,INIT2+,INIT3+,INIT4+,INIT5+ --fields=+S"
Bram Moolenaar5897e0c2011-05-10 15:42:03 +020016592elif (eval exctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then
Bram Moolenaar509ff062020-01-02 22:38:49 +010016593 TAGPRG="exctags -I INIT+,INIT2+,INIT3+,INIT4+,INIT5+ --fields=+S"
Bram Moolenaar5897e0c2011-05-10 15:42:03 +020016594elif (eval exuberant-ctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then
Bram Moolenaar509ff062020-01-02 22:38:49 +010016595 TAGPRG="exuberant-ctags -I INIT+,INIT2+,INIT3+,INIT4+,INIT5+ --fields=+S"
Bram Moolenaar071d4272004-06-13 20:20:40 +000016596else
Bram Moolenaar0c7ce772009-05-13 12:49:39 +000016597 TAGPRG="ctags"
Bram Moolenaar071d4272004-06-13 20:20:40 +000016598 (eval etags /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="etags"
16599 (eval etags -c /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="etags -c"
16600 (eval ctags /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags"
16601 (eval ctags -t /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -t"
16602 (eval ctags -ts /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -ts"
16603 (eval ctags -tvs /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -tvs"
16604 (eval ctags -i+m /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -i+m"
16605fi
16606test -f tags.save && mv tags.save tags
Illia Bobyra96d5442023-08-30 16:30:15 +020016607{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $TAGPRG" >&5
16608printf "%s\n" "$TAGPRG" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000016609
Illia Bobyra96d5442023-08-30 16:30:15 +020016610{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run man with a section nr" >&5
16611printf %s "checking how to run man with a section nr... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000016612MANDEF="man"
Bram Moolenaar8b131502008-02-13 09:28:19 +000016613(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 +020016614{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MANDEF" >&5
16615printf "%s\n" "$MANDEF" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000016616if test "$MANDEF" = "man -s"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016617 printf "%s\n" "#define USEMAN_S 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016618
16619fi
16620
Illia Bobyra96d5442023-08-30 16:30:15 +020016621{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-nls argument" >&5
16622printf %s "checking --disable-nls argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000016623# Check whether --enable-nls was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020016624if test ${enable_nls+y}
16625then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000016626 enableval=$enable_nls;
Christian Brabandt9670f612025-05-07 21:44:33 +020016627else case e in #(
16628 e) enable_nls="yes" ;;
16629esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000016630fi
16631
Bram Moolenaar071d4272004-06-13 20:20:40 +000016632
16633if test "$enable_nls" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016634 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16635printf "%s\n" "no" >&6; }
Bram Moolenaar2389c3c2005-05-22 22:07:59 +000016636
16637 INSTALL_LANGS=install-languages
16638
16639 INSTALL_TOOL_LANGS=install-tool-languages
16640
16641
Bram Moolenaar071d4272004-06-13 20:20:40 +000016642 # Extract the first word of "msgfmt", so it can be a program name with args.
16643set dummy msgfmt; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +020016644{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16645printf %s "checking for $ac_word... " >&6; }
16646if test ${ac_cv_prog_MSGFMT+y}
16647then :
16648 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020016649else case e in #(
16650 e) if test -n "$MSGFMT"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000016651 ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
16652else
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016653as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16654for as_dir in $PATH
16655do
16656 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +020016657 case $as_dir in #(((
16658 '') as_dir=./ ;;
16659 */) ;;
16660 *) as_dir=$as_dir/ ;;
16661 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016662 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +020016663 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016664 ac_cv_prog_MSGFMT="msgfmt"
Illia Bobyra96d5442023-08-30 16:30:15 +020016665 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016666 break 2
16667 fi
16668done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016669 done
Bram Moolenaar446cb832008-06-24 21:56:24 +000016670IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016671
Christian Brabandt9670f612025-05-07 21:44:33 +020016672fi ;;
16673esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000016674fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016675MSGFMT=$ac_cv_prog_MSGFMT
Bram Moolenaar071d4272004-06-13 20:20:40 +000016676if test -n "$MSGFMT"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016677 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
16678printf "%s\n" "$MSGFMT" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000016679else
Illia Bobyra96d5442023-08-30 16:30:15 +020016680 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16681printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000016682fi
16683
Bram Moolenaar446cb832008-06-24 21:56:24 +000016684
Illia Bobyra96d5442023-08-30 16:30:15 +020016685 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for NLS" >&5
16686printf %s "checking for NLS... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000016687 if test -f po/Makefile; then
16688 have_gettext="no"
16689 if test -n "$MSGFMT"; then
Bram Moolenaar49b6a572013-11-17 20:32:54 +010016690 olibs=$LIBS
16691 LIBS=""
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016693/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016694#include <libintl.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016695int
Illia Bobyra96d5442023-08-30 16:30:15 +020016696main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016697{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016698gettext("Test");
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016699 ;
16700 return 0;
16701}
16702_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016703if ac_fn_c_try_link "$LINENO"
16704then :
16705 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gettext() works" >&5
16706printf "%s\n" "gettext() works" >&6; }; have_gettext="yes"; LIBS=$olibs
Christian Brabandt9670f612025-05-07 21:44:33 +020016707else case e in #(
16708 e) LIBS="-lintl"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016710/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016711#include <libintl.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016712int
Illia Bobyra96d5442023-08-30 16:30:15 +020016713main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016714{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016715gettext("Test");
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016716 ;
16717 return 0;
16718}
16719_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016720if ac_fn_c_try_link "$LINENO"
16721then :
16722 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gettext() works with -lintl" >&5
16723printf "%s\n" "gettext() works with -lintl" >&6; }; have_gettext="yes";
Bram Moolenaar49b6a572013-11-17 20:32:54 +010016724 LIBS="$olibs -lintl"
Christian Brabandt9670f612025-05-07 21:44:33 +020016725else case e in #(
16726 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gettext() doesn't work" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +020016727printf "%s\n" "gettext() doesn't work" >&6; };
Christian Brabandt9670f612025-05-07 21:44:33 +020016728 LIBS=$olibs ;;
16729esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000016730fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016731rm -f core conftest.err conftest.$ac_objext conftest.beam \
Christian Brabandt9670f612025-05-07 21:44:33 +020016732 conftest$ac_exeext conftest.$ac_ext ;;
16733esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000016734fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016735rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016736 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000016737 else
Illia Bobyra96d5442023-08-30 16:30:15 +020016738 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: msgfmt not found - disabled" >&5
16739printf "%s\n" "msgfmt not found - disabled" >&6; };
Bram Moolenaar071d4272004-06-13 20:20:40 +000016740 fi
Martin Tournoij7904fa42022-10-04 16:28:45 +010016741 if test $have_gettext = "yes" -a "x$features" != "xtiny"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016742 printf "%s\n" "#define HAVE_GETTEXT 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016743
16744 MAKEMO=yes
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016745
Illia Bobyra96d5442023-08-30 16:30:15 +020016746 ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset"
16747if test "x$ac_cv_func_bind_textdomain_codeset" = xyes
16748then :
16749 printf "%s\n" "#define HAVE_BIND_TEXTDOMAIN_CODESET 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016750
Bram Moolenaar071d4272004-06-13 20:20:40 +000016751fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000016752
Christ van Willegence0ef912024-06-20 23:41:59 +020016753 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dgettext" >&5
16754printf %s "checking for dgettext... " >&6; }
16755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16756/* end confdefs.h. */
16757#include <libintl.h>
16758int
16759main (void)
16760{
16761dgettext("Test", "Test");
16762 ;
16763 return 0;
16764}
16765_ACEOF
16766if ac_fn_c_try_link "$LINENO"
16767then :
16768 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16769printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_DGETTEXT 1" >>confdefs.h
16770
Christian Brabandt9670f612025-05-07 21:44:33 +020016771else case e in #(
16772 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dngettext" >&5
Christ van Willegenc0786752025-02-01 15:42:16 +010016773printf %s "checking for dngettext... " >&6; }
16774 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
Christian Brabandt9670f612025-05-07 21:44:33 +020016775printf "%s\n" "no" >&6; } ;;
16776esac
Christ van Willegenc0786752025-02-01 15:42:16 +010016777fi
16778rm -f core conftest.err conftest.$ac_objext conftest.beam \
16779 conftest$ac_exeext conftest.$ac_ext
16780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16781/* end confdefs.h. */
16782#include <libintl.h>
16783int
16784main (void)
16785{
16786dngettext("DOMAIN", "Test single", "Test plural", 1);
16787 ;
16788 return 0;
16789}
16790_ACEOF
16791if ac_fn_c_try_link "$LINENO"
16792then :
16793 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16794printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_DNGETTEXT 1" >>confdefs.h
16795
Christian Brabandt9670f612025-05-07 21:44:33 +020016796else case e in #(
16797 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16798printf "%s\n" "no" >&6; } ;;
16799esac
Christ van Willegence0ef912024-06-20 23:41:59 +020016800fi
16801rm -f core conftest.err conftest.$ac_objext conftest.beam \
16802 conftest$ac_exeext conftest.$ac_ext
Illia Bobyra96d5442023-08-30 16:30:15 +020016803 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _nl_msg_cat_cntr" >&5
16804printf %s "checking for _nl_msg_cat_cntr... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016806/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016807#include <libintl.h>
16808 extern int _nl_msg_cat_cntr;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016809int
Illia Bobyra96d5442023-08-30 16:30:15 +020016810main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016811{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016812++_nl_msg_cat_cntr;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016813 ;
16814 return 0;
16815}
16816_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016817if ac_fn_c_try_link "$LINENO"
16818then :
16819 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16820printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_NL_MSG_CAT_CNTR 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016821
Christian Brabandt9670f612025-05-07 21:44:33 +020016822else case e in #(
16823 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16824printf "%s\n" "no" >&6; } ;;
16825esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000016826fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016827rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016828 conftest$ac_exeext conftest.$ac_ext
Illia Bobyra96d5442023-08-30 16:30:15 +020016829 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if msgfmt supports --desktop" >&5
16830printf %s "checking if msgfmt supports --desktop... " >&6; }
Bram Moolenaar26096cc2019-04-11 15:25:40 +020016831 MSGFMT_DESKTOP=
16832 if "$MSGFMT" --help | grep -e '--desktop' >/dev/null; then
Bram Moolenaar62a88f42019-06-07 20:44:40 +020016833 if "$MSGFMT" --version | grep '0.19.[3-7]$' >/dev/null; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016834 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: broken" >&5
16835printf "%s\n" "broken" >&6; }
Bram Moolenaar62a88f42019-06-07 20:44:40 +020016836 else
Illia Bobyra96d5442023-08-30 16:30:15 +020016837 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16838printf "%s\n" "yes" >&6; }
Bram Moolenaar62a88f42019-06-07 20:44:40 +020016839 MSGFMT_DESKTOP="gvim.desktop vim.desktop"
16840 fi
Bram Moolenaar26096cc2019-04-11 15:25:40 +020016841 else
Illia Bobyra96d5442023-08-30 16:30:15 +020016842 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16843printf "%s\n" "no" >&6; }
Bram Moolenaar26096cc2019-04-11 15:25:40 +020016844 fi
16845
Vladimír Marek87319172024-04-11 21:54:34 +020016846 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $MSGFMT supports --no-convert" >&5
16847printf %s "checking if $MSGFMT supports --no-convert... " >&6; }
RestorerZe498caf2024-03-12 22:11:36 +010016848 if "$MSGFMT" --help | grep -q -- '--no-convert' >/dev/null; then
16849 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16850printf "%s\n" "yes" >&6; }
Vladimír Marek87319172024-04-11 21:54:34 +020016851 MSGFMTCMD="OLD_PO_FILE_INPUT=yes $MSGFMT --no-convert -v"
RestorerZe498caf2024-03-12 22:11:36 +010016852 else
16853 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16854printf "%s\n" "no" >&6; }
Vladimír Marek87319172024-04-11 21:54:34 +020016855 MSGFMTCMD="OLD_PO_FILE_INPUT=yes $MSGFMT -v"
RestorerZe498caf2024-03-12 22:11:36 +010016856 fi
16857
Bram Moolenaar071d4272004-06-13 20:20:40 +000016858 fi
16859 else
Illia Bobyra96d5442023-08-30 16:30:15 +020016860 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no \"po/Makefile\" - disabled" >&5
16861printf "%s\n" "no \"po/Makefile\" - disabled" >&6; };
Bram Moolenaar071d4272004-06-13 20:20:40 +000016862 fi
16863else
Illia Bobyra96d5442023-08-30 16:30:15 +020016864 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16865printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000016866fi
16867
Illia Bobyra96d5442023-08-30 16:30:15 +020016868ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
16869if test "x$ac_cv_header_dlfcn_h" = xyes
16870then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000016871 DLL=dlfcn.h
Christian Brabandt9670f612025-05-07 21:44:33 +020016872else case e in #(
16873 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 +020016874if test "x$ac_cv_header_dl_h" = xyes
16875then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016876 DLL=dl.h
16877fi
Christian Brabandt9670f612025-05-07 21:44:33 +020016878 ;;
16879esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016880fi
16881
Bram Moolenaar071d4272004-06-13 20:20:40 +000016882if test x${DLL} = xdlfcn.h; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016883
Illia Bobyra96d5442023-08-30 16:30:15 +020016884printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016885
Illia Bobyra96d5442023-08-30 16:30:15 +020016886 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen()" >&5
16887printf %s "checking for dlopen()... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016889/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016890
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016891int
Illia Bobyra96d5442023-08-30 16:30:15 +020016892main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016893{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016894
16895 extern void* dlopen();
16896 dlopen();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016897
16898 ;
16899 return 0;
16900}
16901_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016902if ac_fn_c_try_link "$LINENO"
16903then :
16904 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16905printf "%s\n" "yes" >&6; };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016906
Illia Bobyra96d5442023-08-30 16:30:15 +020016907printf "%s\n" "#define HAVE_DLOPEN 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016908
Christian Brabandt9670f612025-05-07 21:44:33 +020016909else case e in #(
16910 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +020016911printf "%s\n" "no" >&6; };
16912 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen() in -ldl" >&5
16913printf %s "checking for dlopen() in -ldl... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000016914 olibs=$LIBS
16915 LIBS="$LIBS -ldl"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016917/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016918
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016919int
Illia Bobyra96d5442023-08-30 16:30:15 +020016920main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016921{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016922
16923 extern void* dlopen();
16924 dlopen();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016925
16926 ;
16927 return 0;
16928}
16929_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016930if ac_fn_c_try_link "$LINENO"
16931then :
16932 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16933printf "%s\n" "yes" >&6; };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016934
Illia Bobyra96d5442023-08-30 16:30:15 +020016935printf "%s\n" "#define HAVE_DLOPEN 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016936
Christian Brabandt9670f612025-05-07 21:44:33 +020016937else case e in #(
16938 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +020016939printf "%s\n" "no" >&6; };
Christian Brabandt9670f612025-05-07 21:44:33 +020016940 LIBS=$olibs ;;
16941esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000016942fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016943rm -f core conftest.err conftest.$ac_objext conftest.beam \
Christian Brabandt9670f612025-05-07 21:44:33 +020016944 conftest$ac_exeext conftest.$ac_ext ;;
16945esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000016946fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016947rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016948 conftest$ac_exeext conftest.$ac_ext
Illia Bobyra96d5442023-08-30 16:30:15 +020016949 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlsym()" >&5
16950printf %s "checking for dlsym()... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016952/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016953
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016954int
Illia Bobyra96d5442023-08-30 16:30:15 +020016955main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016956{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016957
16958 extern void* dlsym();
16959 dlsym();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016960
16961 ;
16962 return 0;
16963}
16964_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016965if ac_fn_c_try_link "$LINENO"
16966then :
16967 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16968printf "%s\n" "yes" >&6; };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016969
Illia Bobyra96d5442023-08-30 16:30:15 +020016970printf "%s\n" "#define HAVE_DLSYM 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016971
Christian Brabandt9670f612025-05-07 21:44:33 +020016972else case e in #(
16973 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +020016974printf "%s\n" "no" >&6; };
16975 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlsym() in -ldl" >&5
16976printf %s "checking for dlsym() in -ldl... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000016977 olibs=$LIBS
16978 LIBS="$LIBS -ldl"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016980/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016981
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016982int
Illia Bobyra96d5442023-08-30 16:30:15 +020016983main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016984{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016985
16986 extern void* dlsym();
16987 dlsym();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016988
16989 ;
16990 return 0;
16991}
16992_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016993if ac_fn_c_try_link "$LINENO"
16994then :
16995 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16996printf "%s\n" "yes" >&6; };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016997
Illia Bobyra96d5442023-08-30 16:30:15 +020016998printf "%s\n" "#define HAVE_DLSYM 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016999
Christian Brabandt9670f612025-05-07 21:44:33 +020017000else case e in #(
17001 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +020017002printf "%s\n" "no" >&6; };
Christian Brabandt9670f612025-05-07 21:44:33 +020017003 LIBS=$olibs ;;
17004esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000017005fi
Illia Bobyra96d5442023-08-30 16:30:15 +020017006rm -f core conftest.err conftest.$ac_objext conftest.beam \
Christian Brabandt9670f612025-05-07 21:44:33 +020017007 conftest$ac_exeext conftest.$ac_ext ;;
17008esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000017009fi
Illia Bobyra96d5442023-08-30 16:30:15 +020017010rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017011 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000017012elif test x${DLL} = xdl.h; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017013
Illia Bobyra96d5442023-08-30 16:30:15 +020017014printf "%s\n" "#define HAVE_DL_H 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000017015
Illia Bobyra96d5442023-08-30 16:30:15 +020017016 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load()" >&5
17017printf %s "checking for shl_load()... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017019/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000017020
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017021int
Illia Bobyra96d5442023-08-30 16:30:15 +020017022main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017023{
Bram Moolenaar071d4272004-06-13 20:20:40 +000017024
17025 extern void* shl_load();
17026 shl_load();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017027
17028 ;
17029 return 0;
17030}
17031_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020017032if ac_fn_c_try_link "$LINENO"
17033then :
17034 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17035printf "%s\n" "yes" >&6; };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017036
Illia Bobyra96d5442023-08-30 16:30:15 +020017037printf "%s\n" "#define HAVE_SHL_LOAD 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000017038
Christian Brabandt9670f612025-05-07 21:44:33 +020017039else case e in #(
17040 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +020017041printf "%s\n" "no" >&6; };
17042 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load() in -ldld" >&5
17043printf %s "checking for shl_load() in -ldld... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000017044 olibs=$LIBS
17045 LIBS="$LIBS -ldld"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017047/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000017048
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017049int
Illia Bobyra96d5442023-08-30 16:30:15 +020017050main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017051{
Bram Moolenaar071d4272004-06-13 20:20:40 +000017052
17053 extern void* shl_load();
17054 shl_load();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017055
17056 ;
17057 return 0;
17058}
17059_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020017060if ac_fn_c_try_link "$LINENO"
17061then :
17062 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17063printf "%s\n" "yes" >&6; };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017064
Illia Bobyra96d5442023-08-30 16:30:15 +020017065printf "%s\n" "#define HAVE_SHL_LOAD 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000017066
Christian Brabandt9670f612025-05-07 21:44:33 +020017067else case e in #(
17068 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +020017069printf "%s\n" "no" >&6; };
Christian Brabandt9670f612025-05-07 21:44:33 +020017070 LIBS=$olibs ;;
17071esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000017072fi
Illia Bobyra96d5442023-08-30 16:30:15 +020017073rm -f core conftest.err conftest.$ac_objext conftest.beam \
Christian Brabandt9670f612025-05-07 21:44:33 +020017074 conftest$ac_exeext conftest.$ac_ext ;;
17075esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000017076fi
Illia Bobyra96d5442023-08-30 16:30:15 +020017077rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017078 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000017079fi
Illia Bobyra96d5442023-08-30 16:30:15 +020017080ac_fn_c_check_header_compile "$LINENO" "setjmp.h" "ac_cv_header_setjmp_h" "$ac_includes_default"
17081if test "x$ac_cv_header_setjmp_h" = xyes
17082then :
17083 printf "%s\n" "#define HAVE_SETJMP_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017084
17085fi
17086
Bram Moolenaar071d4272004-06-13 20:20:40 +000017087
Bram Moolenaard0573012017-10-28 21:11:06 +020017088if test "x$MACOS_X" = "xyes" -a -n "$PERL"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000017089 if echo $LIBS | grep -e '-ldl' >/dev/null; then
17090 LIBS=`echo $LIBS | sed s/-ldl//`
17091 PERL_LIBS="$PERL_LIBS -ldl"
17092 fi
17093fi
17094
Bram Moolenaard0573012017-10-28 21:11:06 +020017095if test "$MACOS_X" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020017096 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need macOS frameworks" >&5
17097printf %s "checking whether we need macOS frameworks... " >&6; }
Bram Moolenaar097148e2020-08-11 21:58:20 +020017098 if test "$MACOS_X_DARWIN" = "yes"; then
Bram Moolenaard0573012017-10-28 21:11:06 +020017099 if test "$features" = "tiny"; then
17100 OS_EXTRA_SRC=`echo "$OS_EXTRA_SRC" | sed -e 's+os_macosx.m++'`
17101 OS_EXTRA_OBJ=`echo "$OS_EXTRA_OBJ" | sed -e 's+objects/os_macosx.o++'`
Illia Bobyra96d5442023-08-30 16:30:15 +020017102 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, we need CoreServices" >&5
17103printf "%s\n" "yes, we need CoreServices" >&6; }
Bram Moolenaar2be7cb72019-01-12 16:10:51 +010017104 LIBS="$LIBS -framework CoreServices"
Bram Moolenaard0573012017-10-28 21:11:06 +020017105 else
Illia Bobyra96d5442023-08-30 16:30:15 +020017106 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, we need AppKit" >&5
17107printf "%s\n" "yes, we need AppKit" >&6; }
Bram Moolenaard0573012017-10-28 21:11:06 +020017108 LIBS="$LIBS -framework AppKit"
Bram Moolenaard0573012017-10-28 21:11:06 +020017109 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000017110 else
Illia Bobyra96d5442023-08-30 16:30:15 +020017111 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17112printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000017113 fi
17114fi
17115
Christian Brabandt6b9efdd2021-09-09 17:14:50 +020017116if `echo "$CFLAGS" | grep -v D_REENTRANT >/dev/null`; then
Bram Moolenaar3ae5fc92021-09-06 18:57:30 +020017117 CFLAGS="$CFLAGS -D_REENTRANT"
17118fi
17119
Bram Moolenaard5cdbeb2005-10-10 20:59:28 +000017120DEPEND_CFLAGS_FILTER=
17121if test "$GCC" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +020017122 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GCC 3 or later" >&5
17123printf %s "checking for GCC 3 or later... " >&6; }
Bram Moolenaar348808f2020-02-07 20:50:07 +010017124 gccmajor=`echo "$gccversion" | sed -e 's/^\([1-9][0-9]*\)\..*$/\1/g'`
Bram Moolenaarf740b292006-02-16 22:11:02 +000017125 if test "$gccmajor" -gt "2"; then
Bram Moolenaard5cdbeb2005-10-10 20:59:28 +000017126 DEPEND_CFLAGS_FILTER="| sed 's+-I */+-isystem /+g'"
Illia Bobyra96d5442023-08-30 16:30:15 +020017127 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17128printf "%s\n" "yes" >&6; }
Bram Moolenaar0cd49302008-11-20 09:37:01 +000017129 else
Illia Bobyra96d5442023-08-30 16:30:15 +020017130 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17131printf "%s\n" "no" >&6; }
Bram Moolenaar0cd49302008-11-20 09:37:01 +000017132 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020017133 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D_FORTIFY_SOURCE=1" >&5
17134printf %s "checking whether we need -D_FORTIFY_SOURCE=1... " >&6; }
Bram Moolenaar0cd49302008-11-20 09:37:01 +000017135 if test "$gccmajor" -gt "3"; then
Zdenek Dohnal42196982023-01-18 16:09:51 +000017136 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/'`
17137 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 +020017138 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17139printf "%s\n" "yes" >&6; }
Bram Moolenaar0cd49302008-11-20 09:37:01 +000017140 else
Illia Bobyra96d5442023-08-30 16:30:15 +020017141 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17142printf "%s\n" "no" >&6; }
Bram Moolenaar0cd49302008-11-20 09:37:01 +000017143 fi
Bram Moolenaara5792f52005-11-23 21:25:05 +000017144fi
Bram Moolenaard5cdbeb2005-10-10 20:59:28 +000017145
Bram Moolenaar071d4272004-06-13 20:20:40 +000017146
Illia Bobyra96d5442023-08-30 16:30:15 +020017147{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need to force -D_FILE_OFFSET_BITS=64" >&5
17148printf %s "checking whether we need to force -D_FILE_OFFSET_BITS=64... " >&6; }
Bram Moolenaar9ce42132018-04-11 22:19:36 +020017149if 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 +020017150 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17151printf "%s\n" "yes" >&6; }
17152 printf "%s\n" "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Bram Moolenaarec0557f2018-01-31 14:41:37 +010017153
17154else
Illia Bobyra96d5442023-08-30 16:30:15 +020017155 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17156printf "%s\n" "no" >&6; }
Bram Moolenaarec0557f2018-01-31 14:41:37 +010017157fi
17158
Bram Moolenaar6cd42db2020-12-04 18:09:54 +010017159LDFLAGS=`echo "$LDFLAGS" | sed -e 's/-L /-L/g'`
17160
Illia Bobyra96d5442023-08-30 16:30:15 +020017161{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking linker --as-needed support" >&5
17162printf %s "checking linker --as-needed support... " >&6; }
Bram Moolenaar22e193d2010-11-03 22:32:24 +010017163LINK_AS_NEEDED=
17164# Check if linker supports --as-needed and --no-as-needed options
17165if $CC -Wl,--help 2>/dev/null | grep as-needed > /dev/null; then
Natanael Copa761ead42021-05-15 14:25:37 +020017166 if ! echo "$LDFLAGS" | grep -q -- '-Wl,[^[:space:]]*--as-needed'; then
17167 LDFLAGS="$LDFLAGS -Wl,--as-needed"
17168 fi
Bram Moolenaar22e193d2010-11-03 22:32:24 +010017169 LINK_AS_NEEDED=yes
17170fi
17171if test "$LINK_AS_NEEDED" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +020017172 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17173printf "%s\n" "yes" >&6; }
Bram Moolenaar22e193d2010-11-03 22:32:24 +010017174else
Illia Bobyra96d5442023-08-30 16:30:15 +020017175 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17176printf "%s\n" "no" >&6; }
Bram Moolenaar22e193d2010-11-03 22:32:24 +010017177fi
17178
17179
Bram Moolenaar77c19352012-06-13 19:19:41 +020017180# IBM z/OS reset CFLAGS for config.mk
17181if test "$zOSUnix" = "yes"; then
17182 CFLAGS="-D_ALL_SOURCE -Wc,float\(ieee\),dll"
17183fi
17184
Bram Moolenaar446cb832008-06-24 21:56:24 +000017185ac_config_files="$ac_config_files auto/config.mk:config.mk.in"
17186
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017187cat >confcache <<\_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000017188# This file is a shell script that caches the results of configure
17189# tests run on this system so they can be shared between configure
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017190# scripts and configure runs, see configure's option --config-cache.
17191# It is not useful on other systems. If it contains results you don't
17192# want to keep, you may remove or edit it.
Bram Moolenaar071d4272004-06-13 20:20:40 +000017193#
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017194# config.status only pays attention to the cache file if you give it
17195# the --recheck option to rerun configure.
Bram Moolenaar071d4272004-06-13 20:20:40 +000017196#
Christian Brabandt9670f612025-05-07 21:44:33 +020017197# 'ac_cv_env_foo' variables (set or unset) will be overridden when
17198# loading this file, other *unset* 'ac_cv_foo' will be assigned the
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017199# following values.
17200
17201_ACEOF
17202
Bram Moolenaar071d4272004-06-13 20:20:40 +000017203# The following way of writing the cache mishandles newlines in values,
17204# but we know of no workaround that is simple, portable, and efficient.
Bram Moolenaar446cb832008-06-24 21:56:24 +000017205# So, we kill variables containing newlines.
Bram Moolenaar071d4272004-06-13 20:20:40 +000017206# Ultrix sh set writes to stderr and can't be redirected directly,
17207# and sets the high bit in the cache file unless we assign to the vars.
Bram Moolenaar446cb832008-06-24 21:56:24 +000017208(
17209 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17210 eval ac_val=\$$ac_var
17211 case $ac_val in #(
17212 *${as_nl}*)
17213 case $ac_var in #(
Illia Bobyra96d5442023-08-30 16:30:15 +020017214 *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17215printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017216 esac
17217 case $ac_var in #(
17218 _ | IFS | as_nl) ;; #(
17219 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017220 *) { eval $ac_var=; unset $ac_var;} ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017221 esac ;;
17222 esac
17223 done
17224
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017225 (set) 2>&1 |
Bram Moolenaar446cb832008-06-24 21:56:24 +000017226 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17227 *${as_nl}ac_space=\ *)
Christian Brabandt9670f612025-05-07 21:44:33 +020017228 # 'set' does not quote correctly, so add quotes: double-quote
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017229 # substitution turns \\\\ into \\, and sed turns \\ into \.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017230 sed -n \
17231 "s/'/'\\\\''/g;
17232 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Bram Moolenaar446cb832008-06-24 21:56:24 +000017233 ;; #(
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017234 *)
Christian Brabandt9670f612025-05-07 21:44:33 +020017235 # 'set' quotes correctly as required by POSIX, so do not add quotes.
Bram Moolenaar446cb832008-06-24 21:56:24 +000017236 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017237 ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017238 esac |
17239 sort
17240) |
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017241 sed '
Bram Moolenaar446cb832008-06-24 21:56:24 +000017242 /^ac_cv_env_/b end
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017243 t clear
Bram Moolenaar446cb832008-06-24 21:56:24 +000017244 :clear
Illia Bobyra96d5442023-08-30 16:30:15 +020017245 s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017246 t end
Bram Moolenaar446cb832008-06-24 21:56:24 +000017247 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17248 :end' >>confcache
17249if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17250 if test -w "$cache_file"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010017251 if test "x$cache_file" != "x/dev/null"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020017252 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17253printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
Bram Moolenaar7db77842014-03-27 17:40:59 +010017254 if test ! -f "$cache_file" || test -h "$cache_file"; then
17255 cat confcache >"$cache_file"
17256 else
17257 case $cache_file in #(
17258 */* | ?:*)
17259 mv -f confcache "$cache_file"$$ &&
17260 mv -f "$cache_file"$$ "$cache_file" ;; #(
17261 *)
17262 mv -f confcache "$cache_file" ;;
17263 esac
17264 fi
17265 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000017266 else
Illia Bobyra96d5442023-08-30 16:30:15 +020017267 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17268printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
Bram Moolenaar071d4272004-06-13 20:20:40 +000017269 fi
17270fi
17271rm -f confcache
17272
Bram Moolenaar071d4272004-06-13 20:20:40 +000017273test "x$prefix" = xNONE && prefix=$ac_default_prefix
17274# Let make expand exec_prefix.
17275test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
17276
Bram Moolenaar071d4272004-06-13 20:20:40 +000017277DEFS=-DHAVE_CONFIG_H
17278
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017279ac_libobjs=
17280ac_ltlibobjs=
Bram Moolenaar7db77842014-03-27 17:40:59 +010017281U=
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017282for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17283 # 1. Remove the extension, and $U if already installed.
Bram Moolenaar446cb832008-06-24 21:56:24 +000017284 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Illia Bobyra96d5442023-08-30 16:30:15 +020017285 ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
Bram Moolenaar446cb832008-06-24 21:56:24 +000017286 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17287 # will be set to the directory where LIBOBJS objects are built.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017288 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17289 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017290done
17291LIBOBJS=$ac_libobjs
17292
17293LTLIBOBJS=$ac_ltlibobjs
17294
17295
17296
Christian Brabandt9670f612025-05-07 21:44:33 +020017297# Check whether --enable-year2038 was given.
17298if test ${enable_year2038+y}
17299then :
17300 enableval=$enable_year2038;
17301fi
17302
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020017303
Bram Moolenaar7db77842014-03-27 17:40:59 +010017304: "${CONFIG_STATUS=./config.status}"
Bram Moolenaar446cb832008-06-24 21:56:24 +000017305ac_write_fail=0
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017306ac_clean_files_save=$ac_clean_files
17307ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Illia Bobyra96d5442023-08-30 16:30:15 +020017308{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17309printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017310as_write_fail=0
17311cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017312#! $SHELL
17313# Generated by $as_me.
Bram Moolenaar071d4272004-06-13 20:20:40 +000017314# Run this file to recreate the current configuration.
Bram Moolenaar071d4272004-06-13 20:20:40 +000017315# Compiler output produced by configure, useful for debugging
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017316# configure, is in config.log if it exists.
Bram Moolenaar071d4272004-06-13 20:20:40 +000017317
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017318debug=false
17319ac_cs_recheck=false
17320ac_cs_silent=false
Bram Moolenaar071d4272004-06-13 20:20:40 +000017321
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017322SHELL=\${CONFIG_SHELL-$SHELL}
17323export SHELL
17324_ASEOF
17325cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17326## -------------------- ##
17327## M4sh Initialization. ##
17328## -------------------- ##
Bram Moolenaar071d4272004-06-13 20:20:40 +000017329
Bram Moolenaar446cb832008-06-24 21:56:24 +000017330# Be more Bourne compatible
17331DUALCASE=1; export DUALCASE # for MKS sh
Illia Bobyra96d5442023-08-30 16:30:15 +020017332if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
17333then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017334 emulate sh
17335 NULLCMD=:
Bram Moolenaar446cb832008-06-24 21:56:24 +000017336 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017337 # is contrary to our usage. Disable this feature.
17338 alias -g '${1+"$@"}'='"$@"'
Bram Moolenaar446cb832008-06-24 21:56:24 +000017339 setopt NO_GLOB_SUBST
Christian Brabandt9670f612025-05-07 21:44:33 +020017340else case e in #(
17341 e) case `(set -o) 2>/dev/null` in #(
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017342 *posix*) :
17343 set -o posix ;; #(
17344 *) :
17345 ;;
Christian Brabandt9670f612025-05-07 21:44:33 +020017346esac ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017347esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000017348fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000017349
17350
Illia Bobyra96d5442023-08-30 16:30:15 +020017351
17352# Reset variables that may have inherited troublesome values from
17353# the environment.
17354
17355# IFS needs to be set, to space, tab, and newline, in precisely that order.
17356# (If _AS_PATH_WALK were called with IFS unset, it would have the
17357# side effect of setting IFS to empty, thus disabling word splitting.)
17358# Quoting is to prevent editors from complaining about space-tab.
Bram Moolenaar446cb832008-06-24 21:56:24 +000017359as_nl='
17360'
17361export as_nl
Illia Bobyra96d5442023-08-30 16:30:15 +020017362IFS=" "" $as_nl"
17363
17364PS1='$ '
17365PS2='> '
17366PS4='+ '
17367
17368# Ensure predictable behavior from utilities with locale-dependent output.
17369LC_ALL=C
17370export LC_ALL
17371LANGUAGE=C
17372export LANGUAGE
17373
17374# We cannot yet rely on "unset" to work, but we need these variables
17375# to be unset--not just set to an empty or harmless value--now, to
17376# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
17377# also avoids known problems related to "unset" and subshell syntax
17378# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
17379for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
17380do eval test \${$as_var+y} \
17381 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
17382done
17383
17384# Ensure that fds 0, 1, and 2 are open.
17385if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
17386if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
17387if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000017388
17389# The user is always right.
Illia Bobyra96d5442023-08-30 16:30:15 +020017390if ${PATH_SEPARATOR+false} :; then
Bram Moolenaar446cb832008-06-24 21:56:24 +000017391 PATH_SEPARATOR=:
17392 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17393 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17394 PATH_SEPARATOR=';'
17395 }
17396fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000017397
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017398
Bram Moolenaar446cb832008-06-24 21:56:24 +000017399# Find who we are. Look in the path if we contain no directory separator.
Bram Moolenaar7db77842014-03-27 17:40:59 +010017400as_myself=
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017401case $0 in #((
Bram Moolenaar446cb832008-06-24 21:56:24 +000017402 *[\\/]* ) as_myself=$0 ;;
17403 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17404for as_dir in $PATH
17405do
17406 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +020017407 case $as_dir in #(((
17408 '') as_dir=./ ;;
17409 */) ;;
17410 *) as_dir=$as_dir/ ;;
17411 esac
17412 test -r "$as_dir$0" && as_myself=$as_dir$0 && break
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017413 done
Bram Moolenaar446cb832008-06-24 21:56:24 +000017414IFS=$as_save_IFS
17415
17416 ;;
17417esac
Christian Brabandt9670f612025-05-07 21:44:33 +020017418# We did not find ourselves, most probably we were run as 'sh COMMAND'
Bram Moolenaar446cb832008-06-24 21:56:24 +000017419# in which case we are not to be found in the path.
17420if test "x$as_myself" = x; then
17421 as_myself=$0
17422fi
17423if test ! -f "$as_myself"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020017424 printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017425 exit 1
Bram Moolenaar446cb832008-06-24 21:56:24 +000017426fi
17427
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017428
17429
Bram Moolenaar7db77842014-03-27 17:40:59 +010017430# as_fn_error STATUS ERROR [LINENO LOG_FD]
17431# ----------------------------------------
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017432# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17433# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Bram Moolenaar7db77842014-03-27 17:40:59 +010017434# script with STATUS, using 1 if that was 0.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017435as_fn_error ()
17436{
Bram Moolenaar7db77842014-03-27 17:40:59 +010017437 as_status=$1; test $as_status -eq 0 && as_status=1
17438 if test "$4"; then
17439 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +020017440 printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017441 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020017442 printf "%s\n" "$as_me: error: $2" >&2
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017443 as_fn_exit $as_status
17444} # as_fn_error
17445
17446
17447# as_fn_set_status STATUS
17448# -----------------------
17449# Set $? to STATUS, without forking.
17450as_fn_set_status ()
17451{
17452 return $1
17453} # as_fn_set_status
17454
17455# as_fn_exit STATUS
17456# -----------------
17457# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17458as_fn_exit ()
17459{
17460 set +e
17461 as_fn_set_status $1
17462 exit $1
17463} # as_fn_exit
17464
17465# as_fn_unset VAR
17466# ---------------
17467# Portably unset VAR.
17468as_fn_unset ()
17469{
17470 { eval $1=; unset $1;}
17471}
17472as_unset=as_fn_unset
Illia Bobyra96d5442023-08-30 16:30:15 +020017473
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017474# as_fn_append VAR VALUE
17475# ----------------------
17476# Append the text in VALUE to the end of the definition contained in VAR. Take
17477# advantage of any shell optimizations that allow amortized linear growth over
17478# repeated appends, instead of the typical quadratic growth present in naive
17479# implementations.
Illia Bobyra96d5442023-08-30 16:30:15 +020017480if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
17481then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017482 eval 'as_fn_append ()
17483 {
17484 eval $1+=\$2
17485 }'
Christian Brabandt9670f612025-05-07 21:44:33 +020017486else case e in #(
17487 e) as_fn_append ()
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017488 {
17489 eval $1=\$$1\$2
Christian Brabandt9670f612025-05-07 21:44:33 +020017490 } ;;
17491esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017492fi # as_fn_append
17493
17494# as_fn_arith ARG...
17495# ------------------
17496# Perform arithmetic evaluation on the ARGs, and store the result in the
17497# global $as_val. Take advantage of shells that can avoid forks. The arguments
17498# must be portable across $(()) and expr.
Illia Bobyra96d5442023-08-30 16:30:15 +020017499if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
17500then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017501 eval 'as_fn_arith ()
17502 {
17503 as_val=$(( $* ))
17504 }'
Christian Brabandt9670f612025-05-07 21:44:33 +020017505else case e in #(
17506 e) as_fn_arith ()
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017507 {
17508 as_val=`expr "$@" || test $? -eq 1`
Christian Brabandt9670f612025-05-07 21:44:33 +020017509 } ;;
17510esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017511fi # as_fn_arith
17512
17513
Bram Moolenaar446cb832008-06-24 21:56:24 +000017514if expr a : '\(a\)' >/dev/null 2>&1 &&
17515 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017516 as_expr=expr
17517else
17518 as_expr=false
17519fi
17520
Bram Moolenaar446cb832008-06-24 21:56:24 +000017521if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017522 as_basename=basename
17523else
17524 as_basename=false
17525fi
17526
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017527if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17528 as_dirname=dirname
17529else
17530 as_dirname=false
17531fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017532
Bram Moolenaar446cb832008-06-24 21:56:24 +000017533as_me=`$as_basename -- "$0" ||
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017534$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17535 X"$0" : 'X\(//\)$' \| \
Bram Moolenaar446cb832008-06-24 21:56:24 +000017536 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Illia Bobyra96d5442023-08-30 16:30:15 +020017537printf "%s\n" X/"$0" |
Bram Moolenaar446cb832008-06-24 21:56:24 +000017538 sed '/^.*\/\([^/][^/]*\)\/*$/{
17539 s//\1/
17540 q
17541 }
17542 /^X\/\(\/\/\)$/{
17543 s//\1/
17544 q
17545 }
17546 /^X\/\(\/\).*/{
17547 s//\1/
17548 q
17549 }
17550 s/.*/./; q'`
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017551
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017552# Avoid depending upon Character Ranges.
17553as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17554as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17555as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17556as_cr_digits='0123456789'
17557as_cr_alnum=$as_cr_Letters$as_cr_digits
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017558
Illia Bobyra96d5442023-08-30 16:30:15 +020017559
17560# Determine whether it's possible to make 'echo' print without a newline.
17561# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
17562# for compatibility with existing Makefiles.
Bram Moolenaar446cb832008-06-24 21:56:24 +000017563ECHO_C= ECHO_N= ECHO_T=
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017564case `echo -n x` in #(((((
Bram Moolenaar446cb832008-06-24 21:56:24 +000017565-n*)
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017566 case `echo 'xy\c'` in
Bram Moolenaar446cb832008-06-24 21:56:24 +000017567 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017568 xy) ECHO_C='\c';;
17569 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17570 ECHO_T=' ';;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017571 esac;;
17572*)
17573 ECHO_N='-n';;
17574esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017575
Illia Bobyra96d5442023-08-30 16:30:15 +020017576# For backward compatibility with old third-party macros, we provide
17577# the shell variables $as_echo and $as_echo_n. New code should use
17578# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
17579as_echo='printf %s\n'
17580as_echo_n='printf %s'
17581
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017582rm -f conf$$ conf$$.exe conf$$.file
Bram Moolenaar446cb832008-06-24 21:56:24 +000017583if test -d conf$$.dir; then
17584 rm -f conf$$.dir/conf$$.file
17585else
17586 rm -f conf$$.dir
17587 mkdir conf$$.dir 2>/dev/null
17588fi
17589if (echo >conf$$.file) 2>/dev/null; then
17590 if ln -s conf$$.file conf$$ 2>/dev/null; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017591 as_ln_s='ln -s'
Bram Moolenaar446cb832008-06-24 21:56:24 +000017592 # ... but there are two gotchas:
Christian Brabandt9670f612025-05-07 21:44:33 +020017593 # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail.
17594 # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable.
17595 # In both cases, we have to default to 'cp -pR'.
Bram Moolenaar446cb832008-06-24 21:56:24 +000017596 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Bram Moolenaar7db77842014-03-27 17:40:59 +010017597 as_ln_s='cp -pR'
Bram Moolenaar446cb832008-06-24 21:56:24 +000017598 elif ln conf$$.file conf$$ 2>/dev/null; then
17599 as_ln_s=ln
17600 else
Bram Moolenaar7db77842014-03-27 17:40:59 +010017601 as_ln_s='cp -pR'
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017602 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017603else
Bram Moolenaar7db77842014-03-27 17:40:59 +010017604 as_ln_s='cp -pR'
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017605fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000017606rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17607rmdir conf$$.dir 2>/dev/null
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017608
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017609
17610# as_fn_mkdir_p
17611# -------------
17612# Create "$as_dir" as a directory, including parents if necessary.
17613as_fn_mkdir_p ()
17614{
17615
17616 case $as_dir in #(
17617 -*) as_dir=./$as_dir;;
17618 esac
17619 test -d "$as_dir" || eval $as_mkdir_p || {
17620 as_dirs=
17621 while :; do
17622 case $as_dir in #(
Illia Bobyra96d5442023-08-30 16:30:15 +020017623 *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017624 *) as_qdir=$as_dir;;
17625 esac
17626 as_dirs="'$as_qdir' $as_dirs"
17627 as_dir=`$as_dirname -- "$as_dir" ||
17628$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17629 X"$as_dir" : 'X\(//\)[^/]' \| \
17630 X"$as_dir" : 'X\(//\)$' \| \
17631 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Illia Bobyra96d5442023-08-30 16:30:15 +020017632printf "%s\n" X"$as_dir" |
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017633 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17634 s//\1/
17635 q
17636 }
17637 /^X\(\/\/\)[^/].*/{
17638 s//\1/
17639 q
17640 }
17641 /^X\(\/\/\)$/{
17642 s//\1/
17643 q
17644 }
17645 /^X\(\/\).*/{
17646 s//\1/
17647 q
17648 }
17649 s/.*/./; q'`
17650 test -d "$as_dir" && break
17651 done
17652 test -z "$as_dirs" || eval "mkdir $as_dirs"
Bram Moolenaar7db77842014-03-27 17:40:59 +010017653 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017654
17655
17656} # as_fn_mkdir_p
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017657if mkdir -p . 2>/dev/null; then
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017658 as_mkdir_p='mkdir -p "$as_dir"'
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017659else
17660 test -d ./-p && rmdir ./-p
17661 as_mkdir_p=false
17662fi
17663
Bram Moolenaar7db77842014-03-27 17:40:59 +010017664
17665# as_fn_executable_p FILE
17666# -----------------------
17667# Test if FILE is an executable regular file.
17668as_fn_executable_p ()
17669{
17670 test -f "$1" && test -x "$1"
17671} # as_fn_executable_p
17672as_test_x='test -x'
17673as_executable_p=as_fn_executable_p
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017674
17675# Sed expression to map a string onto a valid CPP name.
Christian Brabandt9670f612025-05-07 21:44:33 +020017676as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
17677as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017678
17679# Sed expression to map a string onto a valid variable name.
Christian Brabandt9670f612025-05-07 21:44:33 +020017680as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
17681as_tr_sh="eval sed '$as_sed_sh'" # deprecated
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017682
17683
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017684exec 6>&1
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017685## ----------------------------------- ##
17686## Main body of $CONFIG_STATUS script. ##
17687## ----------------------------------- ##
17688_ASEOF
17689test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017690
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017691cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17692# Save the log message, to keep $0 and so on meaningful, and to
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017693# report actual input values of CONFIG_FILES etc. instead of their
Bram Moolenaar446cb832008-06-24 21:56:24 +000017694# values after options handling.
17695ac_log="
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017696This file was extended by $as_me, which was
Christian Brabandt9670f612025-05-07 21:44:33 +020017697generated by GNU Autoconf 2.72. Invocation command line was
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017698
17699 CONFIG_FILES = $CONFIG_FILES
17700 CONFIG_HEADERS = $CONFIG_HEADERS
17701 CONFIG_LINKS = $CONFIG_LINKS
17702 CONFIG_COMMANDS = $CONFIG_COMMANDS
17703 $ $0 $@
17704
Bram Moolenaar446cb832008-06-24 21:56:24 +000017705on `(hostname || uname -n) 2>/dev/null | sed 1q`
17706"
17707
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017708_ACEOF
17709
Bram Moolenaar32f31b12009-05-21 13:20:59 +000017710case $ac_config_files in *"
17711"*) set x $ac_config_files; shift; ac_config_files=$*;;
17712esac
17713
17714case $ac_config_headers in *"
17715"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17716esac
17717
17718
Bram Moolenaar446cb832008-06-24 21:56:24 +000017719cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017720# Files that config.status was made for.
Bram Moolenaar446cb832008-06-24 21:56:24 +000017721config_files="$ac_config_files"
17722config_headers="$ac_config_headers"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017723
Bram Moolenaar446cb832008-06-24 21:56:24 +000017724_ACEOF
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017725
Bram Moolenaar446cb832008-06-24 21:56:24 +000017726cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017727ac_cs_usage="\
Christian Brabandt9670f612025-05-07 21:44:33 +020017728'$as_me' instantiates files and other configuration actions
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017729from templates according to the current configuration. Unless the files
17730and actions are specified as TAGs, all are instantiated by default.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017731
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017732Usage: $0 [OPTION]... [TAG]...
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017733
17734 -h, --help print this help, then exit
Bram Moolenaar446cb832008-06-24 21:56:24 +000017735 -V, --version print version number and configuration settings, then exit
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017736 --config print configuration, then exit
Bram Moolenaar32f31b12009-05-21 13:20:59 +000017737 -q, --quiet, --silent
17738 do not print progress messages
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017739 -d, --debug don't remove temporary files
17740 --recheck update $as_me by reconfiguring in the same conditions
Bram Moolenaar32f31b12009-05-21 13:20:59 +000017741 --file=FILE[:TEMPLATE]
Bram Moolenaar446cb832008-06-24 21:56:24 +000017742 instantiate the configuration file FILE
Bram Moolenaar32f31b12009-05-21 13:20:59 +000017743 --header=FILE[:TEMPLATE]
Bram Moolenaar446cb832008-06-24 21:56:24 +000017744 instantiate the configuration header FILE
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017745
17746Configuration files:
17747$config_files
17748
17749Configuration headers:
17750$config_headers
17751
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017752Report bugs to the package provider."
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017753
Bram Moolenaar446cb832008-06-24 21:56:24 +000017754_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020017755ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
17756ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
Bram Moolenaar446cb832008-06-24 21:56:24 +000017757cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Illia Bobyra96d5442023-08-30 16:30:15 +020017758ac_cs_config='$ac_cs_config_escaped'
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017759ac_cs_version="\\
17760config.status
Christian Brabandt9670f612025-05-07 21:44:33 +020017761configured by $0, generated by GNU Autoconf 2.72,
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017762 with options \\"\$ac_cs_config\\"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017763
Christian Brabandt9670f612025-05-07 21:44:33 +020017764Copyright (C) 2023 Free Software Foundation, Inc.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017765This config.status script is free software; the Free Software Foundation
17766gives unlimited permission to copy, distribute and modify it."
Bram Moolenaar446cb832008-06-24 21:56:24 +000017767
17768ac_pwd='$ac_pwd'
17769srcdir='$srcdir'
17770AWK='$AWK'
17771test -n "\$AWK" || AWK=awk
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017772_ACEOF
17773
Bram Moolenaar446cb832008-06-24 21:56:24 +000017774cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17775# The default lists apply if the user does not specify any file.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017776ac_need_defaults=:
17777while test $# != 0
17778do
17779 case $1 in
Bram Moolenaar7db77842014-03-27 17:40:59 +010017780 --*=?*)
Bram Moolenaar446cb832008-06-24 21:56:24 +000017781 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17782 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017783 ac_shift=:
17784 ;;
Bram Moolenaar7db77842014-03-27 17:40:59 +010017785 --*=)
17786 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17787 ac_optarg=
17788 ac_shift=:
17789 ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017790 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017791 ac_option=$1
17792 ac_optarg=$2
17793 ac_shift=shift
17794 ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017795 esac
17796
17797 case $ac_option in
17798 # Handling of the options.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017799 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17800 ac_cs_recheck=: ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017801 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Illia Bobyra96d5442023-08-30 16:30:15 +020017802 printf "%s\n" "$ac_cs_version"; exit ;;
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017803 --config | --confi | --conf | --con | --co | --c )
Illia Bobyra96d5442023-08-30 16:30:15 +020017804 printf "%s\n" "$ac_cs_config"; exit ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017805 --debug | --debu | --deb | --de | --d | -d )
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017806 debug=: ;;
17807 --file | --fil | --fi | --f )
17808 $ac_shift
Bram Moolenaar446cb832008-06-24 21:56:24 +000017809 case $ac_optarg in
Illia Bobyra96d5442023-08-30 16:30:15 +020017810 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Bram Moolenaar7db77842014-03-27 17:40:59 +010017811 '') as_fn_error $? "missing file argument" ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017812 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017813 as_fn_append CONFIG_FILES " '$ac_optarg'"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017814 ac_need_defaults=false;;
17815 --header | --heade | --head | --hea )
17816 $ac_shift
Bram Moolenaar446cb832008-06-24 21:56:24 +000017817 case $ac_optarg in
Illia Bobyra96d5442023-08-30 16:30:15 +020017818 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017819 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017820 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017821 ac_need_defaults=false;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017822 --he | --h)
17823 # Conflict between --help and --header
Christian Brabandt9670f612025-05-07 21:44:33 +020017824 as_fn_error $? "ambiguous option: '$1'
17825Try '$0 --help' for more information.";;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017826 --help | --hel | -h )
Illia Bobyra96d5442023-08-30 16:30:15 +020017827 printf "%s\n" "$ac_cs_usage"; exit ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017828 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17829 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17830 ac_cs_silent=: ;;
17831
17832 # This is an error.
Christian Brabandt9670f612025-05-07 21:44:33 +020017833 -*) as_fn_error $? "unrecognized option: '$1'
17834Try '$0 --help' for more information." ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017835
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017836 *) as_fn_append ac_config_targets " $1"
Bram Moolenaar446cb832008-06-24 21:56:24 +000017837 ac_need_defaults=false ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017838
17839 esac
17840 shift
17841done
17842
17843ac_configure_extra_args=
17844
17845if $ac_cs_silent; then
17846 exec 6>/dev/null
17847 ac_configure_extra_args="$ac_configure_extra_args --silent"
17848fi
17849
17850_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +000017851cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017852if \$ac_cs_recheck; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010017853 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Bram Moolenaar446cb832008-06-24 21:56:24 +000017854 shift
Illia Bobyra96d5442023-08-30 16:30:15 +020017855 \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
Bram Moolenaar446cb832008-06-24 21:56:24 +000017856 CONFIG_SHELL='$SHELL'
17857 export CONFIG_SHELL
17858 exec "\$@"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017859fi
17860
17861_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +000017862cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17863exec 5>>auto/config.log
17864{
17865 echo
17866 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17867## Running $as_me. ##
17868_ASBOX
Illia Bobyra96d5442023-08-30 16:30:15 +020017869 printf "%s\n" "$ac_log"
Bram Moolenaar446cb832008-06-24 21:56:24 +000017870} >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017871
Bram Moolenaar446cb832008-06-24 21:56:24 +000017872_ACEOF
17873cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17874_ACEOF
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017875
Bram Moolenaar446cb832008-06-24 21:56:24 +000017876cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017877
Bram Moolenaar446cb832008-06-24 21:56:24 +000017878# Handling of arguments.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017879for ac_config_target in $ac_config_targets
17880do
Bram Moolenaar446cb832008-06-24 21:56:24 +000017881 case $ac_config_target in
17882 "auto/config.h") CONFIG_HEADERS="$CONFIG_HEADERS auto/config.h:config.h.in" ;;
17883 "auto/config.mk") CONFIG_FILES="$CONFIG_FILES auto/config.mk:config.mk.in" ;;
17884
Christian Brabandt9670f612025-05-07 21:44:33 +020017885 *) as_fn_error $? "invalid argument: '$ac_config_target'" "$LINENO" 5;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017886 esac
17887done
17888
Bram Moolenaar446cb832008-06-24 21:56:24 +000017889
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017890# If the user did not use the arguments to specify the items to instantiate,
17891# then the envvar interface is used. Set only those that are not.
17892# We use the long form for the default assignment because of an extremely
17893# bizarre bug on SunOS 4.1.3.
17894if $ac_need_defaults; then
Illia Bobyra96d5442023-08-30 16:30:15 +020017895 test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
17896 test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017897fi
17898
17899# Have a temporary directory for convenience. Make it in the build tree
Bram Moolenaar446cb832008-06-24 21:56:24 +000017900# simply because there is no reason against having it here, and in addition,
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017901# creating and moving files from /tmp can sometimes cause problems.
Bram Moolenaar446cb832008-06-24 21:56:24 +000017902# Hook for its removal unless debugging.
17903# Note that there is a small window in which the directory will not be cleaned:
Christian Brabandt9670f612025-05-07 21:44:33 +020017904# after its creation but before its name has been assigned to '$tmp'.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017905$debug ||
17906{
Bram Moolenaar7db77842014-03-27 17:40:59 +010017907 tmp= ac_tmp=
Bram Moolenaar446cb832008-06-24 21:56:24 +000017908 trap 'exit_status=$?
Bram Moolenaar7db77842014-03-27 17:40:59 +010017909 : "${ac_tmp:=$tmp}"
17910 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Bram Moolenaar446cb832008-06-24 21:56:24 +000017911' 0
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017912 trap 'as_fn_exit 1' 1 2 13 15
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017913}
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017914# Create a (secure) tmp directory for tmp files.
17915
17916{
Bram Moolenaar446cb832008-06-24 21:56:24 +000017917 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Bram Moolenaar7db77842014-03-27 17:40:59 +010017918 test -d "$tmp"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017919} ||
17920{
Bram Moolenaar446cb832008-06-24 21:56:24 +000017921 tmp=./conf$$-$RANDOM
17922 (umask 077 && mkdir "$tmp")
Bram Moolenaar7db77842014-03-27 17:40:59 +010017923} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
17924ac_tmp=$tmp
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017925
Bram Moolenaar446cb832008-06-24 21:56:24 +000017926# Set up the scripts for CONFIG_FILES section.
17927# No need to generate them if there are no CONFIG_FILES.
Christian Brabandt9670f612025-05-07 21:44:33 +020017928# This happens for instance with './config.status config.h'.
Bram Moolenaar446cb832008-06-24 21:56:24 +000017929if test -n "$CONFIG_FILES"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017930
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017931
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017932ac_cr=`echo X | tr X '\015'`
17933# On cygwin, bash can eat \r inside `` if the user requested igncr.
17934# But we know of no other shell where ac_cr would be empty at this
17935# point, so we can use a bashism as a fallback.
17936if test "x$ac_cr" = x; then
17937 eval ac_cr=\$\'\\r\'
17938fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000017939ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17940if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010017941 ac_cs_awk_cr='\\r'
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017942else
Bram Moolenaar446cb832008-06-24 21:56:24 +000017943 ac_cs_awk_cr=$ac_cr
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017944fi
17945
Bram Moolenaar7db77842014-03-27 17:40:59 +010017946echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017947_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000017948
Bram Moolenaar446cb832008-06-24 21:56:24 +000017949
17950{
17951 echo "cat >conf$$subs.awk <<_ACEOF" &&
17952 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17953 echo "_ACEOF"
17954} >conf$$subs.sh ||
Bram Moolenaar7db77842014-03-27 17:40:59 +010017955 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17956ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Bram Moolenaar446cb832008-06-24 21:56:24 +000017957ac_delim='%!_!# '
17958for ac_last_try in false false false false false :; do
17959 . ./conf$$subs.sh ||
Bram Moolenaar7db77842014-03-27 17:40:59 +010017960 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017961
Bram Moolenaar32f31b12009-05-21 13:20:59 +000017962 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17963 if test $ac_delim_n = $ac_delim_num; then
Bram Moolenaar446cb832008-06-24 21:56:24 +000017964 break
17965 elif $ac_last_try; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010017966 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017967 else
17968 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17969 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017970done
Bram Moolenaar446cb832008-06-24 21:56:24 +000017971rm -f conf$$subs.sh
17972
17973cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Bram Moolenaar7db77842014-03-27 17:40:59 +010017974cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017975_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +000017976sed -n '
17977h
17978s/^/S["/; s/!.*/"]=/
17979p
17980g
17981s/^[^!]*!//
17982:repl
17983t repl
17984s/'"$ac_delim"'$//
17985t delim
17986:nl
17987h
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017988s/\(.\{148\}\)..*/\1/
Bram Moolenaar446cb832008-06-24 21:56:24 +000017989t more1
17990s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17991p
17992n
17993b repl
17994:more1
17995s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17996p
17997g
17998s/.\{148\}//
17999t nl
18000:delim
18001h
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020018002s/\(.\{148\}\)..*/\1/
Bram Moolenaar446cb832008-06-24 21:56:24 +000018003t more2
18004s/["\\]/\\&/g; s/^/"/; s/$/"/
18005p
18006b
18007:more2
18008s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18009p
18010g
18011s/.\{148\}//
18012t delim
18013' <conf$$subs.awk | sed '
18014/^[^""]/{
18015 N
18016 s/\n//
18017}
18018' >>$CONFIG_STATUS || ac_write_fail=1
18019rm -f conf$$subs.awk
18020cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18021_ACAWK
Bram Moolenaar7db77842014-03-27 17:40:59 +010018022cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Bram Moolenaar446cb832008-06-24 21:56:24 +000018023 for (key in S) S_is_set[key] = 1
18024 FS = ""
Bram Moolenaar071d4272004-06-13 20:20:40 +000018025
Bram Moolenaar446cb832008-06-24 21:56:24 +000018026}
18027{
18028 line = $ 0
18029 nfields = split(line, field, "@")
18030 substed = 0
18031 len = length(field[1])
18032 for (i = 2; i < nfields; i++) {
18033 key = field[i]
18034 keylen = length(key)
18035 if (S_is_set[key]) {
18036 value = S[key]
18037 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18038 len += length(value) + length(field[++i])
18039 substed = 1
18040 } else
18041 len += 1 + keylen
18042 }
Bram Moolenaar071d4272004-06-13 20:20:40 +000018043
Bram Moolenaar446cb832008-06-24 21:56:24 +000018044 print line
18045}
Bram Moolenaar071d4272004-06-13 20:20:40 +000018046
Bram Moolenaar446cb832008-06-24 21:56:24 +000018047_ACAWK
18048_ACEOF
18049cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18050if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18051 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18052else
18053 cat
Bram Moolenaar7db77842014-03-27 17:40:59 +010018054fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
18055 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000018056_ACEOF
18057
Bram Moolenaar7db77842014-03-27 17:40:59 +010018058# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18059# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Bram Moolenaar446cb832008-06-24 21:56:24 +000018060# trailing colons and then remove the whole line if VPATH becomes empty
18061# (actually we leave an empty line to preserve line numbers).
18062if test "x$srcdir" = x.; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010018063 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18064h
18065s///
18066s/^/:/
18067s/[ ]*$/:/
18068s/:\$(srcdir):/:/g
18069s/:\${srcdir}:/:/g
18070s/:@srcdir@:/:/g
18071s/^:*//
Bram Moolenaar446cb832008-06-24 21:56:24 +000018072s/:*$//
Bram Moolenaar7db77842014-03-27 17:40:59 +010018073x
18074s/\(=[ ]*\).*/\1/
18075G
18076s/\n//
Bram Moolenaar446cb832008-06-24 21:56:24 +000018077s/^[^=]*=[ ]*$//
18078}'
18079fi
18080
18081cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18082fi # test -n "$CONFIG_FILES"
18083
18084# Set up the scripts for CONFIG_HEADERS section.
18085# No need to generate them if there are no CONFIG_HEADERS.
Christian Brabandt9670f612025-05-07 21:44:33 +020018086# This happens for instance with './config.status Makefile'.
Bram Moolenaar446cb832008-06-24 21:56:24 +000018087if test -n "$CONFIG_HEADERS"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010018088cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Bram Moolenaar446cb832008-06-24 21:56:24 +000018089BEGIN {
18090_ACEOF
18091
Christian Brabandt9670f612025-05-07 21:44:33 +020018092# Transform confdefs.h into an awk script 'defines.awk', embedded as
Bram Moolenaar446cb832008-06-24 21:56:24 +000018093# here-document in config.status, that substitutes the proper values into
18094# config.h.in to produce config.h.
18095
18096# Create a delimiter string that does not exist in confdefs.h, to ease
18097# handling of long lines.
18098ac_delim='%!_!# '
18099for ac_last_try in false false :; do
Bram Moolenaar7db77842014-03-27 17:40:59 +010018100 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18101 if test -z "$ac_tt"; then
Bram Moolenaar446cb832008-06-24 21:56:24 +000018102 break
18103 elif $ac_last_try; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010018104 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000018105 else
18106 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18107 fi
18108done
18109
18110# For the awk script, D is an array of macro values keyed by name,
18111# likewise P contains macro parameters if any. Preserve backslash
18112# newline sequences.
18113
18114ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18115sed -n '
18116s/.\{148\}/&'"$ac_delim"'/g
18117t rset
18118:rset
18119s/^[ ]*#[ ]*define[ ][ ]*/ /
18120t def
18121d
18122:def
18123s/\\$//
18124t bsnl
18125s/["\\]/\\&/g
18126s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18127D["\1"]=" \3"/p
18128s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18129d
18130:bsnl
18131s/["\\]/\\&/g
18132s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18133D["\1"]=" \3\\\\\\n"\\/p
18134t cont
18135s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18136t cont
18137d
18138:cont
18139n
18140s/.\{148\}/&'"$ac_delim"'/g
18141t clear
18142:clear
18143s/\\$//
18144t bsnlc
18145s/["\\]/\\&/g; s/^/"/; s/$/"/p
18146d
18147:bsnlc
18148s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18149b cont
18150' <confdefs.h | sed '
18151s/'"$ac_delim"'/"\\\
18152"/g' >>$CONFIG_STATUS || ac_write_fail=1
18153
18154cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18155 for (key in D) D_is_set[key] = 1
18156 FS = ""
18157}
18158/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18159 line = \$ 0
18160 split(line, arg, " ")
18161 if (arg[1] == "#") {
18162 defundef = arg[2]
18163 mac1 = arg[3]
18164 } else {
18165 defundef = substr(arg[1], 2)
18166 mac1 = arg[2]
18167 }
18168 split(mac1, mac2, "(") #)
18169 macro = mac2[1]
Bram Moolenaar32f31b12009-05-21 13:20:59 +000018170 prefix = substr(line, 1, index(line, defundef) - 1)
Bram Moolenaar446cb832008-06-24 21:56:24 +000018171 if (D_is_set[macro]) {
18172 # Preserve the white space surrounding the "#".
Bram Moolenaar446cb832008-06-24 21:56:24 +000018173 print prefix "define", macro P[macro] D[macro]
18174 next
18175 } else {
18176 # Replace #undef with comments. This is necessary, for example,
18177 # in the case of _POSIX_SOURCE, which is predefined and required
18178 # on some systems where configure will not decide to define it.
18179 if (defundef == "undef") {
Bram Moolenaar32f31b12009-05-21 13:20:59 +000018180 print "/*", prefix defundef, macro, "*/"
Bram Moolenaar446cb832008-06-24 21:56:24 +000018181 next
18182 }
18183 }
18184}
18185{ print }
18186_ACAWK
18187_ACEOF
18188cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Bram Moolenaar7db77842014-03-27 17:40:59 +010018189 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000018190fi # test -n "$CONFIG_HEADERS"
18191
18192
18193eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
18194shift
18195for ac_tag
18196do
18197 case $ac_tag in
18198 :[FHLC]) ac_mode=$ac_tag; continue;;
18199 esac
18200 case $ac_mode$ac_tag in
18201 :[FHL]*:*);;
Christian Brabandt9670f612025-05-07 21:44:33 +020018202 :L* | :C*:*) as_fn_error $? "invalid tag '$ac_tag'" "$LINENO" 5;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000018203 :[FH]-) ac_tag=-:-;;
18204 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18205 esac
18206 ac_save_IFS=$IFS
18207 IFS=:
18208 set x $ac_tag
18209 IFS=$ac_save_IFS
18210 shift
18211 ac_file=$1
18212 shift
18213
18214 case $ac_mode in
18215 :L) ac_source=$1;;
18216 :[FH])
18217 ac_file_inputs=
18218 for ac_f
18219 do
18220 case $ac_f in
Bram Moolenaar7db77842014-03-27 17:40:59 +010018221 -) ac_f="$ac_tmp/stdin";;
Bram Moolenaar446cb832008-06-24 21:56:24 +000018222 *) # Look for the file first in the build tree, then in the source tree
18223 # (if the path is not absolute). The absolute path cannot be DOS-style,
Christian Brabandt9670f612025-05-07 21:44:33 +020018224 # because $ac_f cannot contain ':'.
Bram Moolenaar446cb832008-06-24 21:56:24 +000018225 test -f "$ac_f" ||
18226 case $ac_f in
18227 [\\/$]*) false;;
18228 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18229 esac ||
Christian Brabandt9670f612025-05-07 21:44:33 +020018230 as_fn_error 1 "cannot find input file: '$ac_f'" "$LINENO" 5;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000018231 esac
Illia Bobyra96d5442023-08-30 16:30:15 +020018232 case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020018233 as_fn_append ac_file_inputs " '$ac_f'"
Bram Moolenaar446cb832008-06-24 21:56:24 +000018234 done
18235
Christian Brabandt9670f612025-05-07 21:44:33 +020018236 # Let's still pretend it is 'configure' which instantiates (i.e., don't
Bram Moolenaar446cb832008-06-24 21:56:24 +000018237 # use $as_me), people would be surprised to read:
18238 # /* config.h. Generated by config.status. */
18239 configure_input='Generated from '`
Illia Bobyra96d5442023-08-30 16:30:15 +020018240 printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
Bram Moolenaar446cb832008-06-24 21:56:24 +000018241 `' by configure.'
18242 if test x"$ac_file" != x-; then
18243 configure_input="$ac_file. $configure_input"
Illia Bobyra96d5442023-08-30 16:30:15 +020018244 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18245printf "%s\n" "$as_me: creating $ac_file" >&6;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000018246 fi
18247 # Neutralize special characters interpreted by sed in replacement strings.
18248 case $configure_input in #(
18249 *\&* | *\|* | *\\* )
Illia Bobyra96d5442023-08-30 16:30:15 +020018250 ac_sed_conf_input=`printf "%s\n" "$configure_input" |
Bram Moolenaar446cb832008-06-24 21:56:24 +000018251 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18252 *) ac_sed_conf_input=$configure_input;;
18253 esac
18254
18255 case $ac_tag in
Bram Moolenaar7db77842014-03-27 17:40:59 +010018256 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18257 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000018258 esac
18259 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +000018260 esac
18261
Bram Moolenaar446cb832008-06-24 21:56:24 +000018262 ac_dir=`$as_dirname -- "$ac_file" ||
Bram Moolenaar495de9c2005-01-25 22:03:25 +000018263$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18264 X"$ac_file" : 'X\(//\)[^/]' \| \
18265 X"$ac_file" : 'X\(//\)$' \| \
Bram Moolenaar446cb832008-06-24 21:56:24 +000018266 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Illia Bobyra96d5442023-08-30 16:30:15 +020018267printf "%s\n" X"$ac_file" |
Bram Moolenaar446cb832008-06-24 21:56:24 +000018268 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18269 s//\1/
18270 q
18271 }
18272 /^X\(\/\/\)[^/].*/{
18273 s//\1/
18274 q
18275 }
18276 /^X\(\/\/\)$/{
18277 s//\1/
18278 q
18279 }
18280 /^X\(\/\).*/{
18281 s//\1/
18282 q
18283 }
18284 s/.*/./; q'`
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020018285 as_dir="$ac_dir"; as_fn_mkdir_p
Bram Moolenaar446cb832008-06-24 21:56:24 +000018286 ac_builddir=.
Bram Moolenaar071d4272004-06-13 20:20:40 +000018287
Bram Moolenaar446cb832008-06-24 21:56:24 +000018288case "$ac_dir" in
18289.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18290*)
Illia Bobyra96d5442023-08-30 16:30:15 +020018291 ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
Bram Moolenaar446cb832008-06-24 21:56:24 +000018292 # A ".." for each directory in $ac_dir_suffix.
Illia Bobyra96d5442023-08-30 16:30:15 +020018293 ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Bram Moolenaar446cb832008-06-24 21:56:24 +000018294 case $ac_top_builddir_sub in
18295 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18296 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18297 esac ;;
18298esac
18299ac_abs_top_builddir=$ac_pwd
18300ac_abs_builddir=$ac_pwd$ac_dir_suffix
18301# for backward compatibility:
18302ac_top_builddir=$ac_top_build_prefix
18303
18304case $srcdir in
18305 .) # We are building in place.
18306 ac_srcdir=.
18307 ac_top_srcdir=$ac_top_builddir_sub
18308 ac_abs_top_srcdir=$ac_pwd ;;
18309 [\\/]* | ?:[\\/]* ) # Absolute name.
18310 ac_srcdir=$srcdir$ac_dir_suffix;
18311 ac_top_srcdir=$srcdir
18312 ac_abs_top_srcdir=$srcdir ;;
18313 *) # Relative name.
18314 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18315 ac_top_srcdir=$ac_top_build_prefix$srcdir
18316 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
18317esac
18318ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
18319
18320
18321 case $ac_mode in
18322 :F)
18323 #
18324 # CONFIG_FILE
18325 #
18326
Bram Moolenaar495de9c2005-01-25 22:03:25 +000018327_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000018328
Bram Moolenaar446cb832008-06-24 21:56:24 +000018329cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18330# If the template does not know about datarootdir, expand it.
18331# FIXME: This hack should be removed a few years after 2.60.
18332ac_datarootdir_hack=; ac_datarootdir_seen=
Bram Moolenaar446cb832008-06-24 21:56:24 +000018333ac_sed_dataroot='
18334/datarootdir/ {
18335 p
18336 q
18337}
18338/@datadir@/p
18339/@docdir@/p
18340/@infodir@/p
18341/@localedir@/p
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020018342/@mandir@/p'
Bram Moolenaar446cb832008-06-24 21:56:24 +000018343case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
18344*datarootdir*) ac_datarootdir_seen=yes;;
18345*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Illia Bobyra96d5442023-08-30 16:30:15 +020018346 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18347printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000018348_ACEOF
18349cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18350 ac_datarootdir_hack='
18351 s&@datadir@&$datadir&g
18352 s&@docdir@&$docdir&g
18353 s&@infodir@&$infodir&g
18354 s&@localedir@&$localedir&g
18355 s&@mandir@&$mandir&g
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020018356 s&\\\${datarootdir}&$datarootdir&g' ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000018357esac
18358_ACEOF
18359
Christian Brabandt9670f612025-05-07 21:44:33 +020018360# Neutralize VPATH when '$srcdir' = '.'.
Bram Moolenaar446cb832008-06-24 21:56:24 +000018361# Shell code in configure.ac might set extrasub.
18362# FIXME: do we really want to maintain this feature?
18363cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18364ac_sed_extra="$ac_vpsub
18365$extrasub
18366_ACEOF
18367cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18368:t
18369/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18370s|@configure_input@|$ac_sed_conf_input|;t t
18371s&@top_builddir@&$ac_top_builddir_sub&;t t
18372s&@top_build_prefix@&$ac_top_build_prefix&;t t
18373s&@srcdir@&$ac_srcdir&;t t
18374s&@abs_srcdir@&$ac_abs_srcdir&;t t
18375s&@top_srcdir@&$ac_top_srcdir&;t t
18376s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18377s&@builddir@&$ac_builddir&;t t
18378s&@abs_builddir@&$ac_abs_builddir&;t t
18379s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18380$ac_datarootdir_hack
18381"
Bram Moolenaar7db77842014-03-27 17:40:59 +010018382eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18383 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000018384
18385test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Bram Moolenaar7db77842014-03-27 17:40:59 +010018386 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18387 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18388 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Christian Brabandt9670f612025-05-07 21:44:33 +020018389 { 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 +010018390which seems to be undefined. Please make sure it is defined" >&5
Christian Brabandt9670f612025-05-07 21:44:33 +020018391printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable 'datarootdir'
Bram Moolenaar7db77842014-03-27 17:40:59 +010018392which seems to be undefined. Please make sure it is defined" >&2;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000018393
Bram Moolenaar7db77842014-03-27 17:40:59 +010018394 rm -f "$ac_tmp/stdin"
Bram Moolenaar446cb832008-06-24 21:56:24 +000018395 case $ac_file in
Bram Moolenaar7db77842014-03-27 17:40:59 +010018396 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18397 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Bram Moolenaar446cb832008-06-24 21:56:24 +000018398 esac \
Bram Moolenaar7db77842014-03-27 17:40:59 +010018399 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000018400 ;;
18401 :H)
18402 #
18403 # CONFIG_HEADER
18404 #
18405 if test x"$ac_file" != x-; then
18406 {
Illia Bobyra96d5442023-08-30 16:30:15 +020018407 printf "%s\n" "/* $configure_input */" >&1 \
Bram Moolenaar7db77842014-03-27 17:40:59 +010018408 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18409 } >"$ac_tmp/config.h" \
18410 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
18411 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Illia Bobyra96d5442023-08-30 16:30:15 +020018412 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18413printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000018414 else
18415 rm -f "$ac_file"
Bram Moolenaar7db77842014-03-27 17:40:59 +010018416 mv "$ac_tmp/config.h" "$ac_file" \
18417 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000018418 fi
18419 else
Illia Bobyra96d5442023-08-30 16:30:15 +020018420 printf "%s\n" "/* $configure_input */" >&1 \
Bram Moolenaar7db77842014-03-27 17:40:59 +010018421 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
18422 || as_fn_error $? "could not create -" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000018423 fi
18424 ;;
18425
18426
18427 esac
18428
18429done # for ac_tag
18430
Bram Moolenaar071d4272004-06-13 20:20:40 +000018431
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020018432as_fn_exit 0
Bram Moolenaar495de9c2005-01-25 22:03:25 +000018433_ACEOF
Bram Moolenaar495de9c2005-01-25 22:03:25 +000018434ac_clean_files=$ac_clean_files_save
18435
Bram Moolenaar446cb832008-06-24 21:56:24 +000018436test $ac_write_fail = 0 ||
Bram Moolenaar7db77842014-03-27 17:40:59 +010018437 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000018438
Bram Moolenaar495de9c2005-01-25 22:03:25 +000018439
18440# configure is writing to config.log, and then calls config.status.
18441# config.status does its own redirection, appending to config.log.
18442# Unfortunately, on DOS this fails, as config.log is still kept open
18443# by configure, so config.status won't be able to write to it; its
18444# output is simply discarded. So we exec the FD to /dev/null,
18445# effectively closing config.log, so it can be properly (re)opened and
18446# appended to by config.status. When coming back to configure, we
18447# need to make the FD available again.
18448if test "$no_create" != yes; then
18449 ac_cs_success=:
18450 ac_config_status_args=
18451 test "$silent" = yes &&
18452 ac_config_status_args="$ac_config_status_args --quiet"
18453 exec 5>/dev/null
18454 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Bram Moolenaarc7453f52006-02-10 23:20:28 +000018455 exec 5>>auto/config.log
Bram Moolenaar495de9c2005-01-25 22:03:25 +000018456 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18457 # would make configure fail if this is the last instruction.
Bram Moolenaar7db77842014-03-27 17:40:59 +010018458 $ac_cs_success || as_fn_exit 1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000018459fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000018460if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
Illia Bobyra96d5442023-08-30 16:30:15 +020018461 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18462printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000018463fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000018464
18465
Illia Bobyra96d5442023-08-30 16:30:15 +020018466