blob: 88d8d0951fbfaefa8b0e2134c3e33a1d3f77a234 [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
Bram Moolenaar823edd12019-10-23 22:35:36 +0200679TERM_TEST
Bram Moolenaare4f25e42017-07-07 11:54:15 +0200680TERM_OBJ
681TERM_SRC
Bram Moolenaare0874f82016-01-24 20:36:41 +0100682CHANNEL_OBJ
683CHANNEL_SRC
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000684NETBEANS_OBJ
685NETBEANS_SRC
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000686RUBY_LIBS
ichizok8bb3fe42021-12-28 15:51:45 +0000687RUBY_CFLAGS_EXTRA
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000688RUBY_CFLAGS
689RUBY_PRO
690RUBY_OBJ
691RUBY_SRC
692vi_cv_path_ruby
693TCL_LIBS
ichizok8bb3fe42021-12-28 15:51:45 +0000694TCL_CFLAGS_EXTRA
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000695TCL_CFLAGS
696TCL_PRO
697TCL_OBJ
698TCL_SRC
699vi_cv_path_tcl
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200700PYTHON3_OBJ
701PYTHON3_SRC
ichizok8bb3fe42021-12-28 15:51:45 +0000702PYTHON3_CFLAGS_EXTRA
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200703PYTHON3_CFLAGS
704PYTHON3_LIBS
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +0200705vi_cv_var_python3_stable_abi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200706vi_cv_path_python3
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000707PYTHON_OBJ
708PYTHON_SRC
ichizok8bb3fe42021-12-28 15:51:45 +0000709PYTHON_CFLAGS_EXTRA
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000710PYTHON_CFLAGS
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000711PYTHON_LIBS
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000712vi_cv_path_python
713PERL_LIBS
ichizok8bb3fe42021-12-28 15:51:45 +0000714PERL_CFLAGS_EXTRA
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000715PERL_CFLAGS
716PERL_PRO
717PERL_OBJ
718PERL_SRC
719shrpenv
Bram Moolenaard5f62b12014-08-17 17:05:44 +0200720vi_cv_perl_xsubpp
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000721vi_cv_perllib
722vi_cv_path_perl
Bram Moolenaar9e70cf12009-05-26 20:59:55 +0000723MZSCHEME_MZC
724MZSCHEME_EXTRA
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000725MZSCHEME_CFLAGS
726MZSCHEME_LIBS
727MZSCHEME_PRO
728MZSCHEME_OBJ
729MZSCHEME_SRC
730vi_cv_path_mzscheme
ichizok8bb3fe42021-12-28 15:51:45 +0000731LUA_CFLAGS_EXTRA
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200732LUA_CFLAGS
733LUA_LIBS
734LUA_PRO
735LUA_OBJ
736LUA_SRC
Bram Moolenaare855ccf2013-07-28 13:32:15 +0200737vi_cv_path_plain_lua
738vi_cv_path_luajit
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200739vi_cv_path_lua
Bram Moolenaar67ffb412022-01-08 13:36:57 +0000740XDIFF_OBJS_USED
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000741compiledby
742dogvimdiff
743dovimdiff
Bram Moolenaar2c704a72010-06-03 21:17:25 +0200744QUOTESED
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000745line_break
746VIEWNAME
747EXNAME
748VIMNAME
749OS_EXTRA_OBJ
750OS_EXTRA_SRC
Bram Moolenaar595a7be2010-03-10 16:28:12 +0100751XCODE_SELECT
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000752CPP_MM
Bram Moolenaar839e9542016-04-14 16:46:02 +0200753CROSS_COMPILING
Bram Moolenaar8f1dde52020-06-05 23:16:29 +0200754BUILD_DATE_MSG
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000755STRIP
756AWK
Bram Moolenaar2bcaec32014-03-27 18:51:11 +0100757FGREP
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000758EGREP
759GREP
760CPP
761OBJEXT
762EXEEXT
763ac_ct_CC
764CPPFLAGS
765LDFLAGS
766CFLAGS
767CC
768SET_MAKE
769target_alias
770host_alias
771build_alias
772LIBS
773ECHO_T
774ECHO_N
775ECHO_C
776DEFS
777mandir
778localedir
779libdir
780psdir
781pdfdir
782dvidir
783htmldir
784infodir
785docdir
786oldincludedir
787includedir
Illia Bobyrf39842f2023-08-27 18:21:23 +0200788runstatedir
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000789localstatedir
790sharedstatedir
791sysconfdir
792datadir
793datarootdir
794libexecdir
795sbindir
796bindir
797program_transform_name
798prefix
799exec_prefix
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200800PACKAGE_URL
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000801PACKAGE_BUGREPORT
802PACKAGE_STRING
803PACKAGE_VERSION
804PACKAGE_TARNAME
805PACKAGE_NAME
806PATH_SEPARATOR
807SHELL'
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000808ac_subst_files=''
Bram Moolenaar446cb832008-06-24 21:56:24 +0000809ac_user_opts='
810enable_option_checking
Bram Moolenaarf788a062011-12-14 20:51:25 +0100811enable_fail_if_missing
Bram Moolenaar446cb832008-06-24 21:56:24 +0000812enable_darwin
813with_mac_arch
Bram Moolenaar595a7be2010-03-10 16:28:12 +0100814with_developer_dir
Bram Moolenaarc236c162008-07-13 17:41:49 +0000815with_local_dir
Bram Moolenaar446cb832008-06-24 21:56:24 +0000816with_vim_name
817with_ex_name
818with_view_name
819with_global_runtime
820with_modified_by
Bram Moolenaar5bd32f42014-04-02 14:05:38 +0200821enable_smack
Bram Moolenaar446cb832008-06-24 21:56:24 +0000822enable_selinux
Christian Brabandte085dfd2023-09-30 12:49:18 +0200823enable_xattr
Bram Moolenaar446cb832008-06-24 21:56:24 +0000824with_features
825with_compiledby
826enable_xsmp
827enable_xsmp_interact
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200828enable_luainterp
829with_lua_prefix
Bram Moolenaare855ccf2013-07-28 13:32:15 +0200830with_luajit
Bram Moolenaar446cb832008-06-24 21:56:24 +0000831enable_mzschemeinterp
832with_plthome
833enable_perlinterp
Zdenek Dohnal1b1c9f22023-11-02 20:19:06 +0100834with_xsubpp
Bram Moolenaar446cb832008-06-24 21:56:24 +0000835enable_pythoninterp
Bram Moolenaare1a32312018-04-15 16:03:25 +0200836with_python_command
Bram Moolenaar446cb832008-06-24 21:56:24 +0000837with_python_config_dir
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200838enable_python3interp
Bram Moolenaare1a32312018-04-15 16:03:25 +0200839with_python3_command
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +0200840with_python3_stable_abi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200841with_python3_config_dir
Bram Moolenaar446cb832008-06-24 21:56:24 +0000842enable_tclinterp
843with_tclsh
844enable_rubyinterp
Bram Moolenaar165641d2010-02-17 16:23:09 +0100845with_ruby_command
Bram Moolenaar446cb832008-06-24 21:56:24 +0000846enable_cscope
Bram Moolenaar446cb832008-06-24 21:56:24 +0000847enable_netbeans
Bram Moolenaare0874f82016-01-24 20:36:41 +0100848enable_channel
Bram Moolenaare4f25e42017-07-07 11:54:15 +0200849enable_terminal
Bram Moolenaare42a6d22017-11-12 19:21:51 +0100850enable_autoservername
Bram Moolenaar446cb832008-06-24 21:56:24 +0000851enable_multibyte
Bram Moolenaar5c5697f2018-12-12 20:34:09 +0100852enable_rightleft
853enable_arabic
854enable_farsi
Bram Moolenaar446cb832008-06-24 21:56:24 +0000855enable_xim
856enable_fontset
857with_x
858enable_gui
Bram Moolenaar446cb832008-06-24 21:56:24 +0000859enable_gtk2_check
860enable_gnome_check
Bram Moolenaar98921892016-02-23 17:14:37 +0100861enable_gtk3_check
Bram Moolenaar446cb832008-06-24 21:56:24 +0000862enable_motif_check
Bram Moolenaar446cb832008-06-24 21:56:24 +0000863enable_gtktest
864with_gnome_includes
865with_gnome_libs
866with_gnome
Bram Moolenaar4adfaab2016-04-21 18:20:11 +0200867enable_icon_cache_update
868enable_desktop_database_update
Bram Moolenaar446cb832008-06-24 21:56:24 +0000869with_motif_lib
870with_tlib
Bram Moolenaar317fd3a2010-05-07 16:05:55 +0200871enable_largefile
Bram Moolenaar21606672019-06-14 20:40:58 +0200872enable_canberra
Christian Brabandtf573c6e2021-06-20 14:02:16 +0200873enable_libsodium
Bram Moolenaar446cb832008-06-24 21:56:24 +0000874enable_acl
875enable_gpm
876enable_sysmouse
877enable_nls
Christian Brabandt9670f612025-05-07 21:44:33 +0200878enable_year2038
Bram Moolenaar446cb832008-06-24 21:56:24 +0000879'
880 ac_precious_vars='build_alias
881host_alias
882target_alias
883CC
884CFLAGS
885LDFLAGS
886LIBS
887CPPFLAGS
888CPP
889XMKMF'
890
Bram Moolenaar071d4272004-06-13 20:20:40 +0000891
892# Initialize some variables set by options.
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000893ac_init_help=
894ac_init_version=false
Bram Moolenaar446cb832008-06-24 21:56:24 +0000895ac_unrecognized_opts=
896ac_unrecognized_sep=
Bram Moolenaar071d4272004-06-13 20:20:40 +0000897# The variables have the same names as the options, with
898# dashes changed to underlines.
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000899cache_file=/dev/null
Bram Moolenaar071d4272004-06-13 20:20:40 +0000900exec_prefix=NONE
Bram Moolenaar071d4272004-06-13 20:20:40 +0000901no_create=
Bram Moolenaar071d4272004-06-13 20:20:40 +0000902no_recursion=
903prefix=NONE
904program_prefix=NONE
905program_suffix=NONE
906program_transform_name=s,x,x,
907silent=
908site=
909srcdir=
Bram Moolenaar071d4272004-06-13 20:20:40 +0000910verbose=
911x_includes=NONE
912x_libraries=NONE
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000913
914# Installation directory options.
915# These are left unexpanded so users can "make install exec_prefix=/foo"
916# and all the variables that are supposed to be based on exec_prefix
917# by default will actually change.
918# Use braces instead of parens because sh, perl, etc. also accept them.
Bram Moolenaar446cb832008-06-24 21:56:24 +0000919# (The list follows the same order as the GNU Coding Standards.)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000920bindir='${exec_prefix}/bin'
921sbindir='${exec_prefix}/sbin'
922libexecdir='${exec_prefix}/libexec'
Bram Moolenaar446cb832008-06-24 21:56:24 +0000923datarootdir='${prefix}/share'
924datadir='${datarootdir}'
Bram Moolenaar071d4272004-06-13 20:20:40 +0000925sysconfdir='${prefix}/etc'
926sharedstatedir='${prefix}/com'
927localstatedir='${prefix}/var'
Illia Bobyrf39842f2023-08-27 18:21:23 +0200928runstatedir='${localstatedir}/run'
Bram Moolenaar071d4272004-06-13 20:20:40 +0000929includedir='${prefix}/include'
930oldincludedir='/usr/include'
Bram Moolenaar446cb832008-06-24 21:56:24 +0000931docdir='${datarootdir}/doc/${PACKAGE}'
932infodir='${datarootdir}/info'
933htmldir='${docdir}'
934dvidir='${docdir}'
935pdfdir='${docdir}'
936psdir='${docdir}'
937libdir='${exec_prefix}/lib'
938localedir='${datarootdir}/locale'
939mandir='${datarootdir}/man'
Bram Moolenaar071d4272004-06-13 20:20:40 +0000940
Bram Moolenaar071d4272004-06-13 20:20:40 +0000941ac_prev=
Bram Moolenaar446cb832008-06-24 21:56:24 +0000942ac_dashdash=
Bram Moolenaar071d4272004-06-13 20:20:40 +0000943for ac_option
944do
Bram Moolenaar071d4272004-06-13 20:20:40 +0000945 # If the previous option needs an argument, assign it.
946 if test -n "$ac_prev"; then
Bram Moolenaar446cb832008-06-24 21:56:24 +0000947 eval $ac_prev=\$ac_option
Bram Moolenaar071d4272004-06-13 20:20:40 +0000948 ac_prev=
949 continue
950 fi
951
Bram Moolenaar446cb832008-06-24 21:56:24 +0000952 case $ac_option in
Bram Moolenaar7db77842014-03-27 17:40:59 +0100953 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
954 *=) ac_optarg= ;;
955 *) ac_optarg=yes ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +0000956 esac
Bram Moolenaar071d4272004-06-13 20:20:40 +0000957
Bram Moolenaar446cb832008-06-24 21:56:24 +0000958 case $ac_dashdash$ac_option in
959 --)
960 ac_dashdash=yes ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +0000961
962 -bindir | --bindir | --bindi | --bind | --bin | --bi)
963 ac_prev=bindir ;;
964 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000965 bindir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +0000966
967 -build | --build | --buil | --bui | --bu)
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000968 ac_prev=build_alias ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +0000969 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000970 build_alias=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +0000971
972 -cache-file | --cache-file | --cache-fil | --cache-fi \
973 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
974 ac_prev=cache_file ;;
975 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
976 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000977 cache_file=$ac_optarg ;;
978
979 --config-cache | -C)
980 cache_file=config.cache ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +0000981
Bram Moolenaar446cb832008-06-24 21:56:24 +0000982 -datadir | --datadir | --datadi | --datad)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000983 ac_prev=datadir ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +0000984 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000985 datadir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +0000986
Bram Moolenaar446cb832008-06-24 21:56:24 +0000987 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
988 | --dataroo | --dataro | --datar)
989 ac_prev=datarootdir ;;
990 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
991 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
992 datarootdir=$ac_optarg ;;
993
Bram Moolenaar071d4272004-06-13 20:20:40 +0000994 -disable-* | --disable-*)
Bram Moolenaar446cb832008-06-24 21:56:24 +0000995 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Bram Moolenaar071d4272004-06-13 20:20:40 +0000996 # Reject names that are not valid shell variable names.
Bram Moolenaar446cb832008-06-24 21:56:24 +0000997 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Christian Brabandt9670f612025-05-07 21:44:33 +0200998 as_fn_error $? "invalid feature name: '$ac_useropt'"
Bram Moolenaar446cb832008-06-24 21:56:24 +0000999 ac_useropt_orig=$ac_useropt
Illia Bobyra96d5442023-08-30 16:30:15 +02001000 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
Bram Moolenaar446cb832008-06-24 21:56:24 +00001001 case $ac_user_opts in
1002 *"
1003"enable_$ac_useropt"
1004"*) ;;
1005 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1006 ac_unrecognized_sep=', ';;
1007 esac
1008 eval enable_$ac_useropt=no ;;
1009
1010 -docdir | --docdir | --docdi | --doc | --do)
1011 ac_prev=docdir ;;
1012 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1013 docdir=$ac_optarg ;;
1014
1015 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1016 ac_prev=dvidir ;;
1017 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1018 dvidir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001019
1020 -enable-* | --enable-*)
Bram Moolenaar446cb832008-06-24 21:56:24 +00001021 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Bram Moolenaar071d4272004-06-13 20:20:40 +00001022 # Reject names that are not valid shell variable names.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001023 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Christian Brabandt9670f612025-05-07 21:44:33 +02001024 as_fn_error $? "invalid feature name: '$ac_useropt'"
Bram Moolenaar446cb832008-06-24 21:56:24 +00001025 ac_useropt_orig=$ac_useropt
Illia Bobyra96d5442023-08-30 16:30:15 +02001026 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
Bram Moolenaar446cb832008-06-24 21:56:24 +00001027 case $ac_user_opts in
1028 *"
1029"enable_$ac_useropt"
1030"*) ;;
1031 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1032 ac_unrecognized_sep=', ';;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001033 esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00001034 eval enable_$ac_useropt=\$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001035
1036 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1037 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1038 | --exec | --exe | --ex)
1039 ac_prev=exec_prefix ;;
1040 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1041 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1042 | --exec=* | --exe=* | --ex=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001043 exec_prefix=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001044
1045 -gas | --gas | --ga | --g)
1046 # Obsolete; use --with-gas.
1047 with_gas=yes ;;
1048
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001049 -help | --help | --hel | --he | -h)
1050 ac_init_help=long ;;
1051 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1052 ac_init_help=recursive ;;
1053 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1054 ac_init_help=short ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001055
1056 -host | --host | --hos | --ho)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001057 ac_prev=host_alias ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001058 -host=* | --host=* | --hos=* | --ho=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001059 host_alias=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001060
Bram Moolenaar446cb832008-06-24 21:56:24 +00001061 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1062 ac_prev=htmldir ;;
1063 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1064 | --ht=*)
1065 htmldir=$ac_optarg ;;
1066
Bram Moolenaar071d4272004-06-13 20:20:40 +00001067 -includedir | --includedir | --includedi | --included | --include \
1068 | --includ | --inclu | --incl | --inc)
1069 ac_prev=includedir ;;
1070 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1071 | --includ=* | --inclu=* | --incl=* | --inc=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001072 includedir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001073
1074 -infodir | --infodir | --infodi | --infod | --info | --inf)
1075 ac_prev=infodir ;;
1076 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001077 infodir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001078
1079 -libdir | --libdir | --libdi | --libd)
1080 ac_prev=libdir ;;
1081 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001082 libdir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001083
1084 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1085 | --libexe | --libex | --libe)
1086 ac_prev=libexecdir ;;
1087 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1088 | --libexe=* | --libex=* | --libe=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001089 libexecdir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001090
Bram Moolenaar446cb832008-06-24 21:56:24 +00001091 -localedir | --localedir | --localedi | --localed | --locale)
1092 ac_prev=localedir ;;
1093 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1094 localedir=$ac_optarg ;;
1095
Bram Moolenaar071d4272004-06-13 20:20:40 +00001096 -localstatedir | --localstatedir | --localstatedi | --localstated \
Bram Moolenaar446cb832008-06-24 21:56:24 +00001097 | --localstate | --localstat | --localsta | --localst | --locals)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001098 ac_prev=localstatedir ;;
1099 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Bram Moolenaar446cb832008-06-24 21:56:24 +00001100 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001101 localstatedir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001102
1103 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1104 ac_prev=mandir ;;
1105 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001106 mandir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001107
1108 -nfp | --nfp | --nf)
1109 # Obsolete; use --without-fp.
1110 with_fp=no ;;
1111
1112 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001113 | --no-cr | --no-c | -n)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001114 no_create=yes ;;
1115
1116 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1117 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1118 no_recursion=yes ;;
1119
1120 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1121 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1122 | --oldin | --oldi | --old | --ol | --o)
1123 ac_prev=oldincludedir ;;
1124 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1125 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1126 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001127 oldincludedir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001128
1129 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1130 ac_prev=prefix ;;
1131 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001132 prefix=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001133
1134 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1135 | --program-pre | --program-pr | --program-p)
1136 ac_prev=program_prefix ;;
1137 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1138 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001139 program_prefix=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001140
1141 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1142 | --program-suf | --program-su | --program-s)
1143 ac_prev=program_suffix ;;
1144 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1145 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001146 program_suffix=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001147
1148 -program-transform-name | --program-transform-name \
1149 | --program-transform-nam | --program-transform-na \
1150 | --program-transform-n | --program-transform- \
1151 | --program-transform | --program-transfor \
1152 | --program-transfo | --program-transf \
1153 | --program-trans | --program-tran \
1154 | --progr-tra | --program-tr | --program-t)
1155 ac_prev=program_transform_name ;;
1156 -program-transform-name=* | --program-transform-name=* \
1157 | --program-transform-nam=* | --program-transform-na=* \
1158 | --program-transform-n=* | --program-transform-=* \
1159 | --program-transform=* | --program-transfor=* \
1160 | --program-transfo=* | --program-transf=* \
1161 | --program-trans=* | --program-tran=* \
1162 | --progr-tra=* | --program-tr=* | --program-t=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001163 program_transform_name=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001164
Bram Moolenaar446cb832008-06-24 21:56:24 +00001165 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1166 ac_prev=pdfdir ;;
1167 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1168 pdfdir=$ac_optarg ;;
1169
1170 -psdir | --psdir | --psdi | --psd | --ps)
1171 ac_prev=psdir ;;
1172 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1173 psdir=$ac_optarg ;;
1174
Bram Moolenaar071d4272004-06-13 20:20:40 +00001175 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1176 | -silent | --silent | --silen | --sile | --sil)
1177 silent=yes ;;
1178
Illia Bobyrf39842f2023-08-27 18:21:23 +02001179 -runstatedir | --runstatedir | --runstatedi | --runstated \
1180 | --runstate | --runstat | --runsta | --runst | --runs \
1181 | --run | --ru | --r)
1182 ac_prev=runstatedir ;;
1183 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1184 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1185 | --run=* | --ru=* | --r=*)
1186 runstatedir=$ac_optarg ;;
1187
Bram Moolenaar071d4272004-06-13 20:20:40 +00001188 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1189 ac_prev=sbindir ;;
1190 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1191 | --sbi=* | --sb=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001192 sbindir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001193
1194 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1195 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1196 | --sharedst | --shareds | --shared | --share | --shar \
1197 | --sha | --sh)
1198 ac_prev=sharedstatedir ;;
1199 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1200 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1201 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1202 | --sha=* | --sh=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001203 sharedstatedir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001204
1205 -site | --site | --sit)
1206 ac_prev=site ;;
1207 -site=* | --site=* | --sit=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001208 site=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001209
1210 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1211 ac_prev=srcdir ;;
1212 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001213 srcdir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001214
1215 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1216 | --syscon | --sysco | --sysc | --sys | --sy)
1217 ac_prev=sysconfdir ;;
1218 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1219 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001220 sysconfdir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001221
1222 -target | --target | --targe | --targ | --tar | --ta | --t)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001223 ac_prev=target_alias ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001224 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001225 target_alias=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001226
1227 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1228 verbose=yes ;;
1229
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001230 -version | --version | --versio | --versi | --vers | -V)
1231 ac_init_version=: ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001232
1233 -with-* | --with-*)
Bram Moolenaar446cb832008-06-24 21:56:24 +00001234 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Bram Moolenaar071d4272004-06-13 20:20:40 +00001235 # Reject names that are not valid shell variable names.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001236 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Christian Brabandt9670f612025-05-07 21:44:33 +02001237 as_fn_error $? "invalid package name: '$ac_useropt'"
Bram Moolenaar446cb832008-06-24 21:56:24 +00001238 ac_useropt_orig=$ac_useropt
Illia Bobyra96d5442023-08-30 16:30:15 +02001239 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
Bram Moolenaar446cb832008-06-24 21:56:24 +00001240 case $ac_user_opts in
1241 *"
1242"with_$ac_useropt"
1243"*) ;;
1244 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1245 ac_unrecognized_sep=', ';;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001246 esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00001247 eval with_$ac_useropt=\$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001248
1249 -without-* | --without-*)
Bram Moolenaar446cb832008-06-24 21:56:24 +00001250 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Bram Moolenaar071d4272004-06-13 20:20:40 +00001251 # Reject names that are not valid shell variable names.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001252 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Christian Brabandt9670f612025-05-07 21:44:33 +02001253 as_fn_error $? "invalid package name: '$ac_useropt'"
Bram Moolenaar446cb832008-06-24 21:56:24 +00001254 ac_useropt_orig=$ac_useropt
Illia Bobyra96d5442023-08-30 16:30:15 +02001255 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
Bram Moolenaar446cb832008-06-24 21:56:24 +00001256 case $ac_user_opts in
1257 *"
1258"with_$ac_useropt"
1259"*) ;;
1260 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1261 ac_unrecognized_sep=', ';;
1262 esac
1263 eval with_$ac_useropt=no ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001264
1265 --x)
1266 # Obsolete; use --with-x.
1267 with_x=yes ;;
1268
1269 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1270 | --x-incl | --x-inc | --x-in | --x-i)
1271 ac_prev=x_includes ;;
1272 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1273 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001274 x_includes=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001275
1276 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1277 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1278 ac_prev=x_libraries ;;
1279 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1280 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001281 x_libraries=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001282
Christian Brabandt9670f612025-05-07 21:44:33 +02001283 -*) as_fn_error $? "unrecognized option: '$ac_option'
1284Try '$0 --help' for more information"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001285 ;;
1286
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001287 *=*)
1288 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1289 # Reject names that are not valid shell variable names.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001290 case $ac_envvar in #(
1291 '' | [0-9]* | *[!_$as_cr_alnum]* )
Christian Brabandt9670f612025-05-07 21:44:33 +02001292 as_fn_error $? "invalid variable name: '$ac_envvar'" ;;
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001293 esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00001294 eval $ac_envvar=\$ac_optarg
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001295 export $ac_envvar ;;
1296
Bram Moolenaar071d4272004-06-13 20:20:40 +00001297 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001298 # FIXME: should be removed in autoconf 3.0.
Illia Bobyra96d5442023-08-30 16:30:15 +02001299 printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001300 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Illia Bobyra96d5442023-08-30 16:30:15 +02001301 printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
Bram Moolenaar7db77842014-03-27 17:40:59 +01001302 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001303 ;;
1304
1305 esac
1306done
1307
1308if test -n "$ac_prev"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001309 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Bram Moolenaar7db77842014-03-27 17:40:59 +01001310 as_fn_error $? "missing argument to $ac_option"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001311fi
1312
Bram Moolenaar446cb832008-06-24 21:56:24 +00001313if test -n "$ac_unrecognized_opts"; then
1314 case $enable_option_checking in
1315 no) ;;
Bram Moolenaar7db77842014-03-27 17:40:59 +01001316 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Illia Bobyra96d5442023-08-30 16:30:15 +02001317 *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001318 esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00001319fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00001320
Bram Moolenaar446cb832008-06-24 21:56:24 +00001321# Check all directory arguments for consistency.
1322for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1323 datadir sysconfdir sharedstatedir localstatedir includedir \
1324 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Illia Bobyrf39842f2023-08-27 18:21:23 +02001325 libdir localedir mandir runstatedir
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001326do
Bram Moolenaar446cb832008-06-24 21:56:24 +00001327 eval ac_val=\$$ac_var
1328 # Remove trailing slashes.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001329 case $ac_val in
Bram Moolenaar446cb832008-06-24 21:56:24 +00001330 */ )
1331 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1332 eval $ac_var=\$ac_val;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001333 esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00001334 # Be sure to have absolute directory names.
1335 case $ac_val in
1336 [\\/$]* | ?:[\\/]* ) continue;;
1337 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1338 esac
Bram Moolenaar7db77842014-03-27 17:40:59 +01001339 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001340done
Bram Moolenaar071d4272004-06-13 20:20:40 +00001341
Christian Brabandt9670f612025-05-07 21:44:33 +02001342# There might be people who depend on the old broken behavior: '$host'
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001343# used to hold the argument of --host etc.
1344# FIXME: To remove some day.
1345build=$build_alias
1346host=$host_alias
1347target=$target_alias
Bram Moolenaar071d4272004-06-13 20:20:40 +00001348
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001349# FIXME: To remove some day.
1350if test "x$host_alias" != x; then
1351 if test "x$build_alias" = x; then
1352 cross_compiling=maybe
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001353 elif test "x$build_alias" != "x$host_alias"; then
1354 cross_compiling=yes
1355 fi
1356fi
1357
1358ac_tool_prefix=
1359test -n "$host_alias" && ac_tool_prefix=$host_alias-
1360
1361test "$silent" = yes && exec 6>/dev/null
1362
Bram Moolenaar071d4272004-06-13 20:20:40 +00001363
Bram Moolenaar446cb832008-06-24 21:56:24 +00001364ac_pwd=`pwd` && test -n "$ac_pwd" &&
1365ac_ls_di=`ls -di .` &&
1366ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Bram Moolenaar7db77842014-03-27 17:40:59 +01001367 as_fn_error $? "working directory cannot be determined"
Bram Moolenaar446cb832008-06-24 21:56:24 +00001368test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Bram Moolenaar7db77842014-03-27 17:40:59 +01001369 as_fn_error $? "pwd does not report name of working directory"
Bram Moolenaar446cb832008-06-24 21:56:24 +00001370
1371
Bram Moolenaar071d4272004-06-13 20:20:40 +00001372# Find the source files, if location was not specified.
1373if test -z "$srcdir"; then
1374 ac_srcdir_defaulted=yes
Bram Moolenaar446cb832008-06-24 21:56:24 +00001375 # Try the directory containing this script, then the parent directory.
1376 ac_confdir=`$as_dirname -- "$as_myself" ||
1377$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1378 X"$as_myself" : 'X\(//\)[^/]' \| \
1379 X"$as_myself" : 'X\(//\)$' \| \
1380 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
Illia Bobyra96d5442023-08-30 16:30:15 +02001381printf "%s\n" X"$as_myself" |
Bram Moolenaar446cb832008-06-24 21:56:24 +00001382 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1383 s//\1/
1384 q
1385 }
1386 /^X\(\/\/\)[^/].*/{
1387 s//\1/
1388 q
1389 }
1390 /^X\(\/\/\)$/{
1391 s//\1/
1392 q
1393 }
1394 /^X\(\/\).*/{
1395 s//\1/
1396 q
1397 }
1398 s/.*/./; q'`
Bram Moolenaar071d4272004-06-13 20:20:40 +00001399 srcdir=$ac_confdir
Bram Moolenaar446cb832008-06-24 21:56:24 +00001400 if test ! -r "$srcdir/$ac_unique_file"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00001401 srcdir=..
1402 fi
1403else
1404 ac_srcdir_defaulted=no
1405fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00001406if test ! -r "$srcdir/$ac_unique_file"; then
1407 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Bram Moolenaar7db77842014-03-27 17:40:59 +01001408 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001409fi
Christian Brabandt9670f612025-05-07 21:44:33 +02001410ac_msg="sources are in $srcdir, but 'cd $srcdir' does not work"
Bram Moolenaar446cb832008-06-24 21:56:24 +00001411ac_abs_confdir=`(
Bram Moolenaar7db77842014-03-27 17:40:59 +01001412 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Bram Moolenaar446cb832008-06-24 21:56:24 +00001413 pwd)`
1414# When building in place, set srcdir=.
1415if test "$ac_abs_confdir" = "$ac_pwd"; then
1416 srcdir=.
1417fi
1418# Remove unnecessary trailing slashes from srcdir.
1419# Double slashes in file names in object file debugging info
1420# mess up M-x gdb in Emacs.
1421case $srcdir in
1422*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1423esac
1424for ac_var in $ac_precious_vars; do
1425 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1426 eval ac_env_${ac_var}_value=\$${ac_var}
1427 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1428 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1429done
Bram Moolenaar071d4272004-06-13 20:20:40 +00001430
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001431#
1432# Report the --help message.
1433#
1434if test "$ac_init_help" = "long"; then
1435 # Omit some internal or obsolete options to make the list less imposing.
1436 # This message is too long to be a string in the A/UX 3.1 sh.
1437 cat <<_ACEOF
Christian Brabandt9670f612025-05-07 21:44:33 +02001438'configure' configures this package to adapt to many kinds of systems.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001439
1440Usage: $0 [OPTION]... [VAR=VALUE]...
1441
1442To assign environment variables (e.g., CC, CFLAGS...), specify them as
1443VAR=VALUE. See below for descriptions of some of the useful variables.
1444
1445Defaults for the options are specified in brackets.
1446
1447Configuration:
1448 -h, --help display this help and exit
1449 --help=short display options specific to this package
1450 --help=recursive display the short help of all the included packages
1451 -V, --version display version information and exit
Christian Brabandt9670f612025-05-07 21:44:33 +02001452 -q, --quiet, --silent do not print 'checking ...' messages
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001453 --cache-file=FILE cache test results in FILE [disabled]
Christian Brabandt9670f612025-05-07 21:44:33 +02001454 -C, --config-cache alias for '--cache-file=config.cache'
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001455 -n, --no-create do not create output files
Christian Brabandt9670f612025-05-07 21:44:33 +02001456 --srcdir=DIR find the sources in DIR [configure dir or '..']
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001457
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001458Installation directories:
1459 --prefix=PREFIX install architecture-independent files in PREFIX
Bram Moolenaar446cb832008-06-24 21:56:24 +00001460 [$ac_default_prefix]
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001461 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Bram Moolenaar446cb832008-06-24 21:56:24 +00001462 [PREFIX]
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001463
Christian Brabandt9670f612025-05-07 21:44:33 +02001464By default, 'make install' will install all the files in
1465'$ac_default_prefix/bin', '$ac_default_prefix/lib' etc. You can specify
1466an installation prefix other than '$ac_default_prefix' using '--prefix',
1467for instance '--prefix=\$HOME'.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001468
1469For better control, use the options below.
1470
1471Fine tuning of the installation directories:
Bram Moolenaar446cb832008-06-24 21:56:24 +00001472 --bindir=DIR user executables [EPREFIX/bin]
1473 --sbindir=DIR system admin executables [EPREFIX/sbin]
1474 --libexecdir=DIR program executables [EPREFIX/libexec]
1475 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1476 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1477 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
Illia Bobyrf39842f2023-08-27 18:21:23 +02001478 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Bram Moolenaar446cb832008-06-24 21:56:24 +00001479 --libdir=DIR object code libraries [EPREFIX/lib]
1480 --includedir=DIR C header files [PREFIX/include]
1481 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1482 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1483 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1484 --infodir=DIR info documentation [DATAROOTDIR/info]
1485 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1486 --mandir=DIR man documentation [DATAROOTDIR/man]
1487 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1488 --htmldir=DIR html documentation [DOCDIR]
1489 --dvidir=DIR dvi documentation [DOCDIR]
1490 --pdfdir=DIR pdf documentation [DOCDIR]
1491 --psdir=DIR ps documentation [DOCDIR]
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001492_ACEOF
1493
1494 cat <<\_ACEOF
1495
1496X features:
1497 --x-includes=DIR X include files are in DIR
1498 --x-libraries=DIR X library files are in DIR
1499_ACEOF
1500fi
1501
1502if test -n "$ac_init_help"; then
1503
1504 cat <<\_ACEOF
1505
1506Optional Features:
Bram Moolenaar446cb832008-06-24 21:56:24 +00001507 --disable-option-checking ignore unrecognized --enable/--with options
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001508 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1509 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Bram Moolenaarf788a062011-12-14 20:51:25 +01001510 --enable-fail-if-missing Fail if dependencies on additional features
1511 specified on the command line are missing.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001512 --disable-darwin Disable Darwin (Mac OS X) support.
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02001513 --disable-smack Do not check for Smack support.
1514 --disable-selinux Do not check for SELinux support.
Christian Brabandte085dfd2023-09-30 12:49:18 +02001515 --disable-xattr Do not check for XATTR support.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001516 --disable-xsmp Disable XSMP session management
1517 --disable-xsmp-interact Disable XSMP interaction
Bram Moolenaar8008b632017-07-18 21:33:20 +02001518 --enable-luainterp=OPTS Include Lua interpreter. default=no OPTS=no/yes/dynamic
1519 --enable-mzschemeinterp Include MzScheme interpreter.
Bram Moolenaare06c1882010-07-21 22:05:20 +02001520 --enable-perlinterp=OPTS Include Perl interpreter. default=no OPTS=no/yes/dynamic
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02001521 --enable-pythoninterp=OPTS Include Python interpreter. default=no OPTS=no/yes/dynamic
Bram Moolenaar8008b632017-07-18 21:33:20 +02001522 --enable-python3interp=OPTS Include Python3 interpreter. default=no OPTS=no/yes/dynamic
Bram Moolenaar8a5115c2016-01-09 19:41:11 +01001523 --enable-tclinterp=OPTS Include Tcl interpreter. default=no OPTS=no/yes/dynamic
Bram Moolenaar3ca71f12010-10-27 16:49:47 +02001524 --enable-rubyinterp=OPTS Include Ruby interpreter. default=no OPTS=no/yes/dynamic
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001525 --enable-cscope Include cscope interface.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001526 --disable-netbeans Disable NetBeans integration support.
Bram Moolenaar8008b632017-07-18 21:33:20 +02001527 --disable-channel Disable process communication support.
1528 --enable-terminal Enable terminal emulation support.
Bram Moolenaare42a6d22017-11-12 19:21:51 +01001529 --enable-autoservername Automatically define servername at vim startup.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001530 --enable-multibyte Include multibyte editing support.
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01001531 --disable-rightleft Do not include Right-to-Left language support.
1532 --disable-arabic Do not include Arabic language support.
Bram Moolenaar14184a32019-02-16 15:10:30 +01001533 --disable-farsi Deprecated.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001534 --enable-xim Include XIM input support.
1535 --enable-fontset Include X fontset output support.
Bram Moolenaarf52fac22022-03-11 16:01:26 +00001536 --enable-gui=OPTS X11 GUI. default=auto OPTS=auto/no/gtk2/gnome2/gtk3/motif/haiku/photon/carbon
Bram Moolenaar182c5be2010-06-25 05:37:59 +02001537 --enable-gtk2-check If auto-select GUI, check for GTK+ 2 default=yes
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001538 --enable-gnome-check If GTK GUI, check for GNOME default=no
Bram Moolenaar98921892016-02-23 17:14:37 +01001539 --enable-gtk3-check If auto-select GUI, check for GTK+ 3 default=yes
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001540 --enable-motif-check If auto-select GUI, check for Motif default=yes
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001541 --disable-gtktest Do not try to compile and run a test GTK program
Bram Moolenaar4adfaab2016-04-21 18:20:11 +02001542 --disable-icon-cache-update update disabled
1543 --disable-desktop-database-update update disabled
Bram Moolenaar317fd3a2010-05-07 16:05:55 +02001544 --disable-largefile omit support for large files
Bram Moolenaar21606672019-06-14 20:40:58 +02001545 --disable-canberra Do not use libcanberra.
Christian Brabandtf573c6e2021-06-20 14:02:16 +02001546 --disable-libsodium Do not use libsodium.
Bram Moolenaard6d30422018-01-28 22:48:55 +01001547 --disable-acl No check for ACL support.
Bram Moolenaar0b40d082022-03-08 13:32:37 +00001548 --enable-gpm=OPTS Use gpm (Linux mouse daemon). default=yes OPTS=yes/no/dynamic
Bram Moolenaar8008b632017-07-18 21:33:20 +02001549 --disable-sysmouse Don't use sysmouse (mouse in *BSD console).
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001550 --disable-nls Don't support NLS (gettext()).
Christian Brabandt9670f612025-05-07 21:44:33 +02001551 --enable-year2038 support timestamps after 2038
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001552
1553Optional Packages:
1554 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1555 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Bram Moolenaar899dddf2006-03-26 21:06:50 +00001556 --with-mac-arch=ARCH current, intel, ppc or both
Bram Moolenaar595a7be2010-03-10 16:28:12 +01001557 --with-developer-dir=PATH use PATH as location for Xcode developer tools
Bram Moolenaarc236c162008-07-13 17:41:49 +00001558 --with-local-dir=PATH search PATH instead of /usr/local for local libraries.
1559 --without-local-dir do not search /usr/local for local libraries.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001560 --with-vim-name=NAME what to call the Vim executable
1561 --with-ex-name=NAME what to call the Ex executable
1562 --with-view-name=NAME what to call the View executable
Bram Moolenaar9d302ad2018-12-21 11:48:51 +01001563 --with-global-runtime=DIR global runtime directory in 'runtimepath', comma-separated for multiple directories
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001564 --with-modified-by=NAME name of who modified a release version
Martin Tournoij25f3a142022-10-08 19:26:41 +01001565 --with-features=TYPE tiny, normal or huge (default: huge)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001566 --with-compiledby=NAME name to show in :version message
Bram Moolenaar0ba04292010-07-14 23:23:17 +02001567 --with-lua-prefix=PFX Prefix where Lua is installed.
Bram Moolenaare855ccf2013-07-28 13:32:15 +02001568 --with-luajit Link with LuaJIT instead of Lua.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001569 --with-plthome=PLTHOME Use PLTHOME.
Zdenek Dohnal1b1c9f22023-11-02 20:19:06 +01001570 --with-xsubpp=PATH path to the xsubpp command
Bram Moolenaare1a32312018-04-15 16:03:25 +02001571 --with-python-command=NAME name of the Python 2 command (default: python2 or python)
1572 --with-python-config-dir=PATH Python's config directory (deprecated)
1573 --with-python3-command=NAME name of the Python 3 command (default: python3 or python)
Ken Takata1c032e32024-08-11 18:41:41 +02001574 --with-python3-stable-abi=VERSION stable ABI version to target (default: 3.8)
Bram Moolenaare1a32312018-04-15 16:03:25 +02001575 --with-python3-config-dir=PATH Python's config directory (deprecated)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001576 --with-tclsh=PATH which tclsh to use (default: tclsh8.0)
Bram Moolenaar165641d2010-02-17 16:23:09 +01001577 --with-ruby-command=RUBY name of the Ruby command (default: ruby)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001578 --with-x use the X Window System
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001579 --with-gnome-includes=DIR Specify location of GNOME headers
1580 --with-gnome-libs=DIR Specify location of GNOME libs
1581 --with-gnome Specify prefix for GNOME files
Bram Moolenaar8008b632017-07-18 21:33:20 +02001582 --with-motif-lib=STRING Library for Motif
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001583 --with-tlib=library terminal library to be used
1584
1585Some influential environment variables:
1586 CC C compiler command
1587 CFLAGS C compiler flags
1588 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1589 nonstandard directory <lib dir>
Bram Moolenaar446cb832008-06-24 21:56:24 +00001590 LIBS libraries to pass to the linker, e.g. -l<library>
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001591 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Bram Moolenaar446cb832008-06-24 21:56:24 +00001592 you have headers in a nonstandard directory <include dir>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001593 CPP C preprocessor
Bram Moolenaar446cb832008-06-24 21:56:24 +00001594 XMKMF Path to xmkmf, Makefile generator for X Window System
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001595
Christian Brabandt9670f612025-05-07 21:44:33 +02001596Use these variables to override the choices made by 'configure' or to help
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001597it to find libraries and programs with nonstandard names/locations.
1598
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001599Report bugs to the package provider.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001600_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +00001601ac_status=$?
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001602fi
1603
1604if test "$ac_init_help" = "recursive"; then
1605 # If there are subdirs, report their specific --help.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001606 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Bram Moolenaar446cb832008-06-24 21:56:24 +00001607 test -d "$ac_dir" ||
1608 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1609 continue
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001610 ac_builddir=.
1611
Bram Moolenaar446cb832008-06-24 21:56:24 +00001612case "$ac_dir" in
1613.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1614*)
Illia Bobyra96d5442023-08-30 16:30:15 +02001615 ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
Bram Moolenaar446cb832008-06-24 21:56:24 +00001616 # A ".." for each directory in $ac_dir_suffix.
Illia Bobyra96d5442023-08-30 16:30:15 +02001617 ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Bram Moolenaar446cb832008-06-24 21:56:24 +00001618 case $ac_top_builddir_sub in
1619 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1620 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1621 esac ;;
1622esac
1623ac_abs_top_builddir=$ac_pwd
1624ac_abs_builddir=$ac_pwd$ac_dir_suffix
1625# for backward compatibility:
1626ac_top_builddir=$ac_top_build_prefix
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001627
1628case $srcdir in
Bram Moolenaar446cb832008-06-24 21:56:24 +00001629 .) # We are building in place.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001630 ac_srcdir=.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001631 ac_top_srcdir=$ac_top_builddir_sub
1632 ac_abs_top_srcdir=$ac_pwd ;;
1633 [\\/]* | ?:[\\/]* ) # Absolute name.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001634 ac_srcdir=$srcdir$ac_dir_suffix;
Bram Moolenaar446cb832008-06-24 21:56:24 +00001635 ac_top_srcdir=$srcdir
1636 ac_abs_top_srcdir=$srcdir ;;
1637 *) # Relative name.
1638 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1639 ac_top_srcdir=$ac_top_build_prefix$srcdir
1640 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001641esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00001642ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001643
Bram Moolenaar446cb832008-06-24 21:56:24 +00001644 cd "$ac_dir" || { ac_status=$?; continue; }
Illia Bobyra96d5442023-08-30 16:30:15 +02001645 # Check for configure.gnu first; this name is used for a wrapper for
1646 # Metaconfig's "Configure" on case-insensitive file systems.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001647 if test -f "$ac_srcdir/configure.gnu"; then
1648 echo &&
1649 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1650 elif test -f "$ac_srcdir/configure"; then
1651 echo &&
1652 $SHELL "$ac_srcdir/configure" --help=recursive
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001653 else
Illia Bobyra96d5442023-08-30 16:30:15 +02001654 printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Bram Moolenaar446cb832008-06-24 21:56:24 +00001655 fi || ac_status=$?
1656 cd "$ac_pwd" || { ac_status=$?; break; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001657 done
1658fi
1659
Bram Moolenaar446cb832008-06-24 21:56:24 +00001660test -n "$ac_init_help" && exit $ac_status
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001661if $ac_init_version; then
1662 cat <<\_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +00001663configure
Christian Brabandt9670f612025-05-07 21:44:33 +02001664generated by GNU Autoconf 2.72
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001665
Christian Brabandt9670f612025-05-07 21:44:33 +02001666Copyright (C) 2023 Free Software Foundation, Inc.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001667This configure script is free software; the Free Software Foundation
1668gives unlimited permission to copy, distribute and modify it.
1669_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +00001670 exit
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001671fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001672
1673## ------------------------ ##
1674## Autoconf initialization. ##
1675## ------------------------ ##
1676
1677# ac_fn_c_try_compile LINENO
1678# --------------------------
1679# Try to compile conftest.$ac_ext, and return whether this succeeded.
1680ac_fn_c_try_compile ()
1681{
1682 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +02001683 rm -f conftest.$ac_objext conftest.beam
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001684 if { { ac_try="$ac_compile"
1685case "(($ac_try" in
1686 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1687 *) ac_try_echo=$ac_try;;
1688esac
1689eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Illia Bobyra96d5442023-08-30 16:30:15 +02001690printf "%s\n" "$ac_try_echo"; } >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001691 (eval "$ac_compile") 2>conftest.err
1692 ac_status=$?
1693 if test -s conftest.err; then
1694 grep -v '^ *+' conftest.err >conftest.er1
1695 cat conftest.er1 >&5
1696 mv -f conftest.er1 conftest.err
1697 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02001698 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001699 test $ac_status = 0; } && {
1700 test -z "$ac_c_werror_flag" ||
1701 test ! -s conftest.err
Illia Bobyra96d5442023-08-30 16:30:15 +02001702 } && test -s conftest.$ac_objext
1703then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001704 ac_retval=0
Christian Brabandt9670f612025-05-07 21:44:33 +02001705else case e in #(
1706 e) printf "%s\n" "$as_me: failed program was:" >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001707sed 's/^/| /' conftest.$ac_ext >&5
1708
Christian Brabandt9670f612025-05-07 21:44:33 +02001709 ac_retval=1 ;;
1710esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001711fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01001712 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001713 as_fn_set_status $ac_retval
1714
1715} # ac_fn_c_try_compile
1716
1717# ac_fn_c_try_cpp LINENO
1718# ----------------------
1719# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1720ac_fn_c_try_cpp ()
1721{
1722 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1723 if { { ac_try="$ac_cpp conftest.$ac_ext"
1724case "(($ac_try" in
1725 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1726 *) ac_try_echo=$ac_try;;
1727esac
1728eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Illia Bobyra96d5442023-08-30 16:30:15 +02001729printf "%s\n" "$ac_try_echo"; } >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001730 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1731 ac_status=$?
1732 if test -s conftest.err; then
1733 grep -v '^ *+' conftest.err >conftest.er1
1734 cat conftest.er1 >&5
1735 mv -f conftest.er1 conftest.err
1736 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02001737 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Bram Moolenaar7db77842014-03-27 17:40:59 +01001738 test $ac_status = 0; } > conftest.i && {
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001739 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1740 test ! -s conftest.err
Illia Bobyra96d5442023-08-30 16:30:15 +02001741 }
1742then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001743 ac_retval=0
Christian Brabandt9670f612025-05-07 21:44:33 +02001744else case e in #(
1745 e) printf "%s\n" "$as_me: failed program was:" >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001746sed 's/^/| /' conftest.$ac_ext >&5
1747
Christian Brabandt9670f612025-05-07 21:44:33 +02001748 ac_retval=1 ;;
1749esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001750fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01001751 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001752 as_fn_set_status $ac_retval
1753
1754} # ac_fn_c_try_cpp
1755
1756# ac_fn_c_try_link LINENO
1757# -----------------------
1758# Try to link conftest.$ac_ext, and return whether this succeeded.
1759ac_fn_c_try_link ()
1760{
1761 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +02001762 rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001763 if { { ac_try="$ac_link"
1764case "(($ac_try" in
1765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1766 *) ac_try_echo=$ac_try;;
1767esac
1768eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Illia Bobyra96d5442023-08-30 16:30:15 +02001769printf "%s\n" "$ac_try_echo"; } >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001770 (eval "$ac_link") 2>conftest.err
1771 ac_status=$?
1772 if test -s conftest.err; then
1773 grep -v '^ *+' conftest.err >conftest.er1
1774 cat conftest.er1 >&5
1775 mv -f conftest.er1 conftest.err
1776 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02001777 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001778 test $ac_status = 0; } && {
1779 test -z "$ac_c_werror_flag" ||
1780 test ! -s conftest.err
1781 } && test -s conftest$ac_exeext && {
1782 test "$cross_compiling" = yes ||
Bram Moolenaar7db77842014-03-27 17:40:59 +01001783 test -x conftest$ac_exeext
Illia Bobyra96d5442023-08-30 16:30:15 +02001784 }
1785then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001786 ac_retval=0
Christian Brabandt9670f612025-05-07 21:44:33 +02001787else case e in #(
1788 e) printf "%s\n" "$as_me: failed program was:" >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001789sed 's/^/| /' conftest.$ac_ext >&5
1790
Christian Brabandt9670f612025-05-07 21:44:33 +02001791 ac_retval=1 ;;
1792esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001793fi
1794 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1795 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1796 # interfere with the next link command; also delete a directory that is
1797 # left behind by Apple's compiler. We do this before executing the actions.
1798 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Bram Moolenaar7db77842014-03-27 17:40:59 +01001799 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001800 as_fn_set_status $ac_retval
1801
1802} # ac_fn_c_try_link
1803
Illia Bobyr0e82b592023-08-29 21:16:29 +02001804# ac_fn_c_try_run LINENO
1805# ----------------------
Illia Bobyra96d5442023-08-30 16:30:15 +02001806# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
1807# executables *can* be run.
Illia Bobyr0e82b592023-08-29 21:16:29 +02001808ac_fn_c_try_run ()
1809{
1810 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1811 if { { ac_try="$ac_link"
1812case "(($ac_try" in
1813 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1814 *) ac_try_echo=$ac_try;;
1815esac
1816eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Illia Bobyra96d5442023-08-30 16:30:15 +02001817printf "%s\n" "$ac_try_echo"; } >&5
Illia Bobyr0e82b592023-08-29 21:16:29 +02001818 (eval "$ac_link") 2>&5
1819 ac_status=$?
Illia Bobyra96d5442023-08-30 16:30:15 +02001820 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Illia Bobyr0e82b592023-08-29 21:16:29 +02001821 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1822 { { case "(($ac_try" in
1823 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1824 *) ac_try_echo=$ac_try;;
1825esac
1826eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Illia Bobyra96d5442023-08-30 16:30:15 +02001827printf "%s\n" "$ac_try_echo"; } >&5
Illia Bobyr0e82b592023-08-29 21:16:29 +02001828 (eval "$ac_try") 2>&5
1829 ac_status=$?
Illia Bobyra96d5442023-08-30 16:30:15 +02001830 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1831 test $ac_status = 0; }; }
1832then :
Illia Bobyr0e82b592023-08-29 21:16:29 +02001833 ac_retval=0
Christian Brabandt9670f612025-05-07 21:44:33 +02001834else case e in #(
1835 e) printf "%s\n" "$as_me: program exited with status $ac_status" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +02001836 printf "%s\n" "$as_me: failed program was:" >&5
Illia Bobyr0e82b592023-08-29 21:16:29 +02001837sed 's/^/| /' conftest.$ac_ext >&5
1838
Christian Brabandt9670f612025-05-07 21:44:33 +02001839 ac_retval=$ac_status ;;
1840esac
Illia Bobyr0e82b592023-08-29 21:16:29 +02001841fi
1842 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1843 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1844 as_fn_set_status $ac_retval
1845
1846} # ac_fn_c_try_run
1847
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001848# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1849# -------------------------------------------------------
1850# Tests whether HEADER exists and can be compiled using the include files in
1851# INCLUDES, setting the cache variable VAR accordingly.
1852ac_fn_c_check_header_compile ()
1853{
1854 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +02001855 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1856printf %s "checking for $2... " >&6; }
1857if eval test \${$3+y}
1858then :
1859 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02001860else case e in #(
1861 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001862/* end confdefs.h. */
1863$4
1864#include <$2>
1865_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02001866if ac_fn_c_try_compile "$LINENO"
1867then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001868 eval "$3=yes"
Christian Brabandt9670f612025-05-07 21:44:33 +02001869else case e in #(
1870 e) eval "$3=no" ;;
1871esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001872fi
Christian Brabandt9670f612025-05-07 21:44:33 +02001873rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
1874esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001875fi
1876eval ac_res=\$$3
Illia Bobyra96d5442023-08-30 16:30:15 +02001877 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1878printf "%s\n" "$ac_res" >&6; }
Bram Moolenaar7db77842014-03-27 17:40:59 +01001879 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001880
1881} # ac_fn_c_check_header_compile
1882
1883# ac_fn_c_check_func LINENO FUNC VAR
1884# ----------------------------------
1885# Tests whether FUNC exists, setting the cache variable VAR accordingly
1886ac_fn_c_check_func ()
1887{
1888 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +02001889 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1890printf %s "checking for $2... " >&6; }
1891if eval test \${$3+y}
1892then :
1893 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02001894else case e in #(
1895 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001896/* end confdefs.h. */
1897/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1898 For example, HP-UX 11i <limits.h> declares gettimeofday. */
1899#define $2 innocuous_$2
1900
1901/* System header to define __stub macros and hopefully few prototypes,
Christian Brabandt9670f612025-05-07 21:44:33 +02001902 which can conflict with char $2 (void); below. */
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001903
Illia Bobyra96d5442023-08-30 16:30:15 +02001904#include <limits.h>
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001905#undef $2
1906
1907/* Override any GCC internal prototype to avoid an error.
1908 Use char because int might match the return type of a GCC
1909 builtin and then its argument prototype would still apply. */
1910#ifdef __cplusplus
1911extern "C"
1912#endif
Christian Brabandt9670f612025-05-07 21:44:33 +02001913char $2 (void);
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001914/* The GNU C library defines this for functions which it implements
1915 to always fail with ENOSYS. Some functions are actually named
1916 something starting with __ and the normal name is an alias. */
1917#if defined __stub_$2 || defined __stub___$2
1918choke me
1919#endif
1920
1921int
Illia Bobyra96d5442023-08-30 16:30:15 +02001922main (void)
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001923{
1924return $2 ();
1925 ;
1926 return 0;
1927}
1928_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02001929if ac_fn_c_try_link "$LINENO"
1930then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001931 eval "$3=yes"
Christian Brabandt9670f612025-05-07 21:44:33 +02001932else case e in #(
1933 e) eval "$3=no" ;;
1934esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001935fi
Illia Bobyra96d5442023-08-30 16:30:15 +02001936rm -f core conftest.err conftest.$ac_objext conftest.beam \
Christian Brabandt9670f612025-05-07 21:44:33 +02001937 conftest$ac_exeext conftest.$ac_ext ;;
1938esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001939fi
1940eval ac_res=\$$3
Illia Bobyra96d5442023-08-30 16:30:15 +02001941 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1942printf "%s\n" "$ac_res" >&6; }
Bram Moolenaar7db77842014-03-27 17:40:59 +01001943 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001944
1945} # ac_fn_c_check_func
1946
Bram Moolenaar914703b2010-05-31 21:59:46 +02001947# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1948# --------------------------------------------
1949# Tries to find the compile-time value of EXPR in a program that includes
1950# INCLUDES, setting VAR accordingly. Returns whether the value could be
1951# computed
1952ac_fn_c_compute_int ()
1953{
1954 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1955 if test "$cross_compiling" = yes; then
1956 # Depending upon the size, compute the lo and hi bounds.
1957cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1958/* end confdefs.h. */
1959$4
1960int
Illia Bobyra96d5442023-08-30 16:30:15 +02001961main (void)
Bram Moolenaar914703b2010-05-31 21:59:46 +02001962{
1963static int test_array [1 - 2 * !(($2) >= 0)];
Bram Moolenaar7db77842014-03-27 17:40:59 +01001964test_array [0] = 0;
1965return test_array [0];
Bram Moolenaar914703b2010-05-31 21:59:46 +02001966
1967 ;
1968 return 0;
1969}
1970_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02001971if ac_fn_c_try_compile "$LINENO"
1972then :
Bram Moolenaar914703b2010-05-31 21:59:46 +02001973 ac_lo=0 ac_mid=0
1974 while :; do
1975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1976/* end confdefs.h. */
1977$4
1978int
Illia Bobyra96d5442023-08-30 16:30:15 +02001979main (void)
Bram Moolenaar914703b2010-05-31 21:59:46 +02001980{
1981static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Bram Moolenaar7db77842014-03-27 17:40:59 +01001982test_array [0] = 0;
1983return test_array [0];
Bram Moolenaar914703b2010-05-31 21:59:46 +02001984
1985 ;
1986 return 0;
1987}
1988_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02001989if ac_fn_c_try_compile "$LINENO"
1990then :
Bram Moolenaar914703b2010-05-31 21:59:46 +02001991 ac_hi=$ac_mid; break
Christian Brabandt9670f612025-05-07 21:44:33 +02001992else case e in #(
1993 e) as_fn_arith $ac_mid + 1 && ac_lo=$as_val
Bram Moolenaar914703b2010-05-31 21:59:46 +02001994 if test $ac_lo -le $ac_mid; then
1995 ac_lo= ac_hi=
1996 break
1997 fi
Christian Brabandt9670f612025-05-07 21:44:33 +02001998 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val ;;
1999esac
Bram Moolenaar914703b2010-05-31 21:59:46 +02002000fi
Illia Bobyra96d5442023-08-30 16:30:15 +02002001rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar914703b2010-05-31 21:59:46 +02002002 done
Christian Brabandt9670f612025-05-07 21:44:33 +02002003else case e in #(
2004 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar914703b2010-05-31 21:59:46 +02002005/* end confdefs.h. */
2006$4
2007int
Illia Bobyra96d5442023-08-30 16:30:15 +02002008main (void)
Bram Moolenaar914703b2010-05-31 21:59:46 +02002009{
2010static int test_array [1 - 2 * !(($2) < 0)];
Bram Moolenaar7db77842014-03-27 17:40:59 +01002011test_array [0] = 0;
2012return test_array [0];
Bram Moolenaar914703b2010-05-31 21:59:46 +02002013
2014 ;
2015 return 0;
2016}
2017_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02002018if ac_fn_c_try_compile "$LINENO"
2019then :
Bram Moolenaar914703b2010-05-31 21:59:46 +02002020 ac_hi=-1 ac_mid=-1
2021 while :; do
2022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2023/* end confdefs.h. */
2024$4
2025int
Illia Bobyra96d5442023-08-30 16:30:15 +02002026main (void)
Bram Moolenaar914703b2010-05-31 21:59:46 +02002027{
2028static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Bram Moolenaar7db77842014-03-27 17:40:59 +01002029test_array [0] = 0;
2030return test_array [0];
Bram Moolenaar914703b2010-05-31 21:59:46 +02002031
2032 ;
2033 return 0;
2034}
2035_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02002036if ac_fn_c_try_compile "$LINENO"
2037then :
Bram Moolenaar914703b2010-05-31 21:59:46 +02002038 ac_lo=$ac_mid; break
Christian Brabandt9670f612025-05-07 21:44:33 +02002039else case e in #(
2040 e) as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
Bram Moolenaar914703b2010-05-31 21:59:46 +02002041 if test $ac_mid -le $ac_hi; then
2042 ac_lo= ac_hi=
2043 break
2044 fi
Christian Brabandt9670f612025-05-07 21:44:33 +02002045 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val ;;
2046esac
Bram Moolenaar914703b2010-05-31 21:59:46 +02002047fi
Illia Bobyra96d5442023-08-30 16:30:15 +02002048rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar914703b2010-05-31 21:59:46 +02002049 done
Christian Brabandt9670f612025-05-07 21:44:33 +02002050else case e in #(
2051 e) ac_lo= ac_hi= ;;
2052esac
Bram Moolenaar914703b2010-05-31 21:59:46 +02002053fi
Christian Brabandt9670f612025-05-07 21:44:33 +02002054rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
2055esac
Bram Moolenaar914703b2010-05-31 21:59:46 +02002056fi
Illia Bobyra96d5442023-08-30 16:30:15 +02002057rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar914703b2010-05-31 21:59:46 +02002058# Binary search between lo and hi bounds.
2059while test "x$ac_lo" != "x$ac_hi"; do
2060 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2062/* end confdefs.h. */
2063$4
2064int
Illia Bobyra96d5442023-08-30 16:30:15 +02002065main (void)
Bram Moolenaar914703b2010-05-31 21:59:46 +02002066{
2067static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Bram Moolenaar7db77842014-03-27 17:40:59 +01002068test_array [0] = 0;
2069return test_array [0];
Bram Moolenaar914703b2010-05-31 21:59:46 +02002070
2071 ;
2072 return 0;
2073}
2074_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02002075if ac_fn_c_try_compile "$LINENO"
2076then :
Bram Moolenaar914703b2010-05-31 21:59:46 +02002077 ac_hi=$ac_mid
Christian Brabandt9670f612025-05-07 21:44:33 +02002078else case e in #(
2079 e) as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val ;;
2080esac
Bram Moolenaar914703b2010-05-31 21:59:46 +02002081fi
Illia Bobyra96d5442023-08-30 16:30:15 +02002082rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar914703b2010-05-31 21:59:46 +02002083done
2084case $ac_lo in #((
2085?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2086'') ac_retval=1 ;;
2087esac
2088 else
2089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2090/* end confdefs.h. */
2091$4
Illia Bobyra96d5442023-08-30 16:30:15 +02002092static long int longval (void) { return $2; }
2093static unsigned long int ulongval (void) { return $2; }
Bram Moolenaar914703b2010-05-31 21:59:46 +02002094#include <stdio.h>
2095#include <stdlib.h>
2096int
Illia Bobyra96d5442023-08-30 16:30:15 +02002097main (void)
Bram Moolenaar914703b2010-05-31 21:59:46 +02002098{
2099
2100 FILE *f = fopen ("conftest.val", "w");
2101 if (! f)
2102 return 1;
2103 if (($2) < 0)
2104 {
2105 long int i = longval ();
2106 if (i != ($2))
2107 return 1;
2108 fprintf (f, "%ld", i);
2109 }
2110 else
2111 {
2112 unsigned long int i = ulongval ();
2113 if (i != ($2))
2114 return 1;
2115 fprintf (f, "%lu", i);
2116 }
2117 /* Do not output a trailing newline, as this causes \r\n confusion
2118 on some platforms. */
2119 return ferror (f) || fclose (f) != 0;
2120
2121 ;
2122 return 0;
2123}
2124_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02002125if ac_fn_c_try_run "$LINENO"
2126then :
Bram Moolenaar914703b2010-05-31 21:59:46 +02002127 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
Christian Brabandt9670f612025-05-07 21:44:33 +02002128else case e in #(
2129 e) ac_retval=1 ;;
2130esac
Bram Moolenaar914703b2010-05-31 21:59:46 +02002131fi
2132rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2133 conftest.$ac_objext conftest.beam conftest.$ac_ext
2134rm -f conftest.val
2135
2136 fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01002137 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Bram Moolenaar914703b2010-05-31 21:59:46 +02002138 as_fn_set_status $ac_retval
2139
2140} # ac_fn_c_compute_int
Mike Gilberta055b442023-08-20 19:01:41 +02002141
2142# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2143# -------------------------------------------
2144# Tests whether TYPE exists after having included INCLUDES, setting cache
2145# variable VAR accordingly.
2146ac_fn_c_check_type ()
2147{
2148 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +02002149 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2150printf %s "checking for $2... " >&6; }
2151if eval test \${$3+y}
2152then :
2153 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02002154else case e in #(
2155 e) eval "$3=no"
Mike Gilberta055b442023-08-20 19:01:41 +02002156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2157/* end confdefs.h. */
2158$4
2159int
Illia Bobyra96d5442023-08-30 16:30:15 +02002160main (void)
Mike Gilberta055b442023-08-20 19:01:41 +02002161{
2162if (sizeof ($2))
2163 return 0;
2164 ;
2165 return 0;
2166}
2167_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02002168if ac_fn_c_try_compile "$LINENO"
2169then :
Mike Gilberta055b442023-08-20 19:01:41 +02002170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2171/* end confdefs.h. */
2172$4
2173int
Illia Bobyra96d5442023-08-30 16:30:15 +02002174main (void)
Mike Gilberta055b442023-08-20 19:01:41 +02002175{
2176if (sizeof (($2)))
2177 return 0;
2178 ;
2179 return 0;
2180}
2181_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02002182if ac_fn_c_try_compile "$LINENO"
2183then :
Mike Gilberta055b442023-08-20 19:01:41 +02002184
Christian Brabandt9670f612025-05-07 21:44:33 +02002185else case e in #(
2186 e) eval "$3=yes" ;;
2187esac
Mike Gilberta055b442023-08-20 19:01:41 +02002188fi
Illia Bobyra96d5442023-08-30 16:30:15 +02002189rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Mike Gilberta055b442023-08-20 19:01:41 +02002190fi
Christian Brabandt9670f612025-05-07 21:44:33 +02002191rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
2192esac
Mike Gilberta055b442023-08-20 19:01:41 +02002193fi
2194eval ac_res=\$$3
Illia Bobyra96d5442023-08-30 16:30:15 +02002195 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2196printf "%s\n" "$ac_res" >&6; }
Mike Gilberta055b442023-08-20 19:01:41 +02002197 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2198
2199} # ac_fn_c_check_type
2200
2201# ac_fn_c_find_uintX_t LINENO BITS VAR
2202# ------------------------------------
2203# Finds an unsigned integer type with width BITS, setting cache variable VAR
2204# accordingly.
2205ac_fn_c_find_uintX_t ()
2206{
2207 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +02002208 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
2209printf %s "checking for uint$2_t... " >&6; }
2210if eval test \${$3+y}
2211then :
2212 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02002213else case e in #(
2214 e) eval "$3=no"
Mike Gilberta055b442023-08-20 19:01:41 +02002215 # Order is important - never check a type that is potentially smaller
2216 # than half of the expected target width.
2217 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
2218 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
2219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2220/* end confdefs.h. */
2221$ac_includes_default
2222int
Illia Bobyra96d5442023-08-30 16:30:15 +02002223main (void)
Mike Gilberta055b442023-08-20 19:01:41 +02002224{
2225static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
2226test_array [0] = 0;
2227return test_array [0];
2228
2229 ;
2230 return 0;
2231}
2232_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02002233if ac_fn_c_try_compile "$LINENO"
2234then :
Mike Gilberta055b442023-08-20 19:01:41 +02002235 case $ac_type in #(
2236 uint$2_t) :
2237 eval "$3=yes" ;; #(
2238 *) :
2239 eval "$3=\$ac_type" ;;
2240esac
2241fi
Illia Bobyra96d5442023-08-30 16:30:15 +02002242rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2243 if eval test \"x\$"$3"\" = x"no"
2244then :
Mike Gilberta055b442023-08-20 19:01:41 +02002245
Christian Brabandt9670f612025-05-07 21:44:33 +02002246else case e in #(
2247 e) break ;;
2248esac
Mike Gilberta055b442023-08-20 19:01:41 +02002249fi
Christian Brabandt9670f612025-05-07 21:44:33 +02002250 done ;;
2251esac
Mike Gilberta055b442023-08-20 19:01:41 +02002252fi
2253eval ac_res=\$$3
Illia Bobyra96d5442023-08-30 16:30:15 +02002254 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2255printf "%s\n" "$ac_res" >&6; }
Mike Gilberta055b442023-08-20 19:01:41 +02002256 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2257
2258} # ac_fn_c_find_uintX_t
Illia Bobyra96d5442023-08-30 16:30:15 +02002259ac_configure_args_raw=
2260for ac_arg
2261do
2262 case $ac_arg in
2263 *\'*)
2264 ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2265 esac
2266 as_fn_append ac_configure_args_raw " '$ac_arg'"
2267done
2268
2269case $ac_configure_args_raw in
2270 *$as_nl*)
2271 ac_safe_unquote= ;;
2272 *)
2273 ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab.
2274 ac_unsafe_a="$ac_unsafe_z#~"
2275 ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
2276 ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
2277esac
2278
Bram Moolenaar446cb832008-06-24 21:56:24 +00002279cat >auto/config.log <<_ACEOF
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002280This file contains any messages produced by compilers while
2281running configure, to aid debugging if configure makes a mistake.
2282
2283It was created by $as_me, which was
Christian Brabandt9670f612025-05-07 21:44:33 +02002284generated by GNU Autoconf 2.72. Invocation command line was
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002285
Illia Bobyra96d5442023-08-30 16:30:15 +02002286 $ $0$ac_configure_args_raw
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002287
2288_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +00002289exec 5>>auto/config.log
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002290{
2291cat <<_ASUNAME
2292## --------- ##
2293## Platform. ##
2294## --------- ##
2295
2296hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2297uname -m = `(uname -m) 2>/dev/null || echo unknown`
2298uname -r = `(uname -r) 2>/dev/null || echo unknown`
2299uname -s = `(uname -s) 2>/dev/null || echo unknown`
2300uname -v = `(uname -v) 2>/dev/null || echo unknown`
2301
2302/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2303/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2304
2305/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2306/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2307/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Bram Moolenaar446cb832008-06-24 21:56:24 +00002308/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002309/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2310/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2311/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2312
2313_ASUNAME
2314
2315as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2316for as_dir in $PATH
2317do
2318 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02002319 case $as_dir in #(((
2320 '') as_dir=./ ;;
2321 */) ;;
2322 *) as_dir=$as_dir/ ;;
2323 esac
2324 printf "%s\n" "PATH: $as_dir"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002325 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00002326IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002327
2328} >&5
2329
2330cat >&5 <<_ACEOF
2331
2332
2333## ----------- ##
2334## Core tests. ##
2335## ----------- ##
2336
2337_ACEOF
2338
2339
2340# Keep a trace of the command line.
2341# Strip out --no-create and --no-recursion so they do not pile up.
2342# Strip out --silent because we don't want to record it for future runs.
2343# Also quote any args containing shell meta-characters.
2344# Make two passes to allow for proper duplicate-argument suppression.
2345ac_configure_args=
2346ac_configure_args0=
2347ac_configure_args1=
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002348ac_must_keep_next=false
2349for ac_pass in 1 2
2350do
2351 for ac_arg
2352 do
2353 case $ac_arg in
2354 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2355 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2356 | -silent | --silent | --silen | --sile | --sil)
2357 continue ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +00002358 *\'*)
Illia Bobyra96d5442023-08-30 16:30:15 +02002359 ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002360 esac
2361 case $ac_pass in
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002362 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002363 2)
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002364 as_fn_append ac_configure_args1 " '$ac_arg'"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002365 if test $ac_must_keep_next = true; then
2366 ac_must_keep_next=false # Got value, back to normal.
2367 else
2368 case $ac_arg in
2369 *=* | --config-cache | -C | -disable-* | --disable-* \
2370 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2371 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2372 | -with-* | --with-* | -without-* | --without-* | --x)
2373 case "$ac_configure_args0 " in
2374 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2375 esac
2376 ;;
2377 -* ) ac_must_keep_next=true ;;
2378 esac
2379 fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002380 as_fn_append ac_configure_args " '$ac_arg'"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002381 ;;
2382 esac
2383 done
2384done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002385{ ac_configure_args0=; unset ac_configure_args0;}
2386{ ac_configure_args1=; unset ac_configure_args1;}
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002387
2388# When interrupted or exit'd, cleanup temporary files, and complete
2389# config.log. We remove comments because anyway the quotes in there
2390# would cause problems or look ugly.
Bram Moolenaar446cb832008-06-24 21:56:24 +00002391# WARNING: Use '\'' to represent an apostrophe within the trap.
2392# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002393trap 'exit_status=$?
Illia Bobyra96d5442023-08-30 16:30:15 +02002394 # Sanitize IFS.
2395 IFS=" "" $as_nl"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002396 # Save into config.log some information that might help in debugging.
2397 {
2398 echo
2399
Illia Bobyra96d5442023-08-30 16:30:15 +02002400 printf "%s\n" "## ---------------- ##
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002401## Cache variables. ##
Bram Moolenaar7db77842014-03-27 17:40:59 +01002402## ---------------- ##"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002403 echo
2404 # The following way of writing the cache mishandles newlines in values,
Bram Moolenaar446cb832008-06-24 21:56:24 +00002405(
2406 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2407 eval ac_val=\$$ac_var
2408 case $ac_val in #(
2409 *${as_nl}*)
2410 case $ac_var in #(
Illia Bobyra96d5442023-08-30 16:30:15 +02002411 *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2412printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +00002413 esac
2414 case $ac_var in #(
2415 _ | IFS | as_nl) ;; #(
2416 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002417 *) { eval $ac_var=; unset $ac_var;} ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +00002418 esac ;;
2419 esac
2420 done
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002421 (set) 2>&1 |
Bram Moolenaar446cb832008-06-24 21:56:24 +00002422 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2423 *${as_nl}ac_space=\ *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002424 sed -n \
Bram Moolenaar446cb832008-06-24 21:56:24 +00002425 "s/'\''/'\''\\\\'\'''\''/g;
2426 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2427 ;; #(
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002428 *)
Bram Moolenaar446cb832008-06-24 21:56:24 +00002429 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002430 ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +00002431 esac |
2432 sort
2433)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002434 echo
2435
Illia Bobyra96d5442023-08-30 16:30:15 +02002436 printf "%s\n" "## ----------------- ##
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002437## Output variables. ##
Bram Moolenaar7db77842014-03-27 17:40:59 +01002438## ----------------- ##"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002439 echo
2440 for ac_var in $ac_subst_vars
2441 do
Bram Moolenaar446cb832008-06-24 21:56:24 +00002442 eval ac_val=\$$ac_var
2443 case $ac_val in
Illia Bobyra96d5442023-08-30 16:30:15 +02002444 *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Bram Moolenaar446cb832008-06-24 21:56:24 +00002445 esac
Illia Bobyra96d5442023-08-30 16:30:15 +02002446 printf "%s\n" "$ac_var='\''$ac_val'\''"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002447 done | sort
2448 echo
2449
2450 if test -n "$ac_subst_files"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02002451 printf "%s\n" "## ------------------- ##
Bram Moolenaar446cb832008-06-24 21:56:24 +00002452## File substitutions. ##
Bram Moolenaar7db77842014-03-27 17:40:59 +01002453## ------------------- ##"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002454 echo
2455 for ac_var in $ac_subst_files
2456 do
Bram Moolenaar446cb832008-06-24 21:56:24 +00002457 eval ac_val=\$$ac_var
2458 case $ac_val in
Illia Bobyra96d5442023-08-30 16:30:15 +02002459 *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Bram Moolenaar446cb832008-06-24 21:56:24 +00002460 esac
Illia Bobyra96d5442023-08-30 16:30:15 +02002461 printf "%s\n" "$ac_var='\''$ac_val'\''"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002462 done | sort
2463 echo
2464 fi
2465
2466 if test -s confdefs.h; then
Illia Bobyra96d5442023-08-30 16:30:15 +02002467 printf "%s\n" "## ----------- ##
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002468## confdefs.h. ##
Bram Moolenaar7db77842014-03-27 17:40:59 +01002469## ----------- ##"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002470 echo
Bram Moolenaar446cb832008-06-24 21:56:24 +00002471 cat confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002472 echo
2473 fi
2474 test "$ac_signal" != 0 &&
Illia Bobyra96d5442023-08-30 16:30:15 +02002475 printf "%s\n" "$as_me: caught signal $ac_signal"
2476 printf "%s\n" "$as_me: exit $exit_status"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002477 } >&5
Bram Moolenaar446cb832008-06-24 21:56:24 +00002478 rm -f core *.core core.conftest.* &&
2479 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002480 exit $exit_status
Bram Moolenaar446cb832008-06-24 21:56:24 +00002481' 0
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002482for ac_signal in 1 2 13 15; do
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002483 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002484done
2485ac_signal=0
2486
2487# confdefs.h avoids OS command line length limits that DEFS can exceed.
Bram Moolenaar446cb832008-06-24 21:56:24 +00002488rm -f -r conftest* confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002489
Illia Bobyra96d5442023-08-30 16:30:15 +02002490printf "%s\n" "/* confdefs.h */" > confdefs.h
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002491
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002492# Predefined preprocessor variables.
2493
Illia Bobyra96d5442023-08-30 16:30:15 +02002494printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002495
Illia Bobyra96d5442023-08-30 16:30:15 +02002496printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002497
Illia Bobyra96d5442023-08-30 16:30:15 +02002498printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002499
Illia Bobyra96d5442023-08-30 16:30:15 +02002500printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002501
Illia Bobyra96d5442023-08-30 16:30:15 +02002502printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002503
Illia Bobyra96d5442023-08-30 16:30:15 +02002504printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002505
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002506
2507# Let the site file select an alternate cache file if it wants to.
Bram Moolenaar446cb832008-06-24 21:56:24 +00002508# Prefer an explicitly selected file to automatically selected ones.
Bram Moolenaar446cb832008-06-24 21:56:24 +00002509if test -n "$CONFIG_SITE"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02002510 ac_site_files="$CONFIG_SITE"
Bram Moolenaar446cb832008-06-24 21:56:24 +00002511elif test "x$prefix" != xNONE; then
Illia Bobyra96d5442023-08-30 16:30:15 +02002512 ac_site_files="$prefix/share/config.site $prefix/etc/config.site"
Bram Moolenaar446cb832008-06-24 21:56:24 +00002513else
Illia Bobyra96d5442023-08-30 16:30:15 +02002514 ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
Bram Moolenaar071d4272004-06-13 20:20:40 +00002515fi
Illia Bobyra96d5442023-08-30 16:30:15 +02002516
2517for ac_site_file in $ac_site_files
Bram Moolenaar446cb832008-06-24 21:56:24 +00002518do
Illia Bobyra96d5442023-08-30 16:30:15 +02002519 case $ac_site_file in #(
2520 */*) :
2521 ;; #(
2522 *) :
2523 ac_site_file=./$ac_site_file ;;
2524esac
2525 if test -f "$ac_site_file" && test -r "$ac_site_file"; then
2526 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2527printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002528 sed 's/^/| /' "$ac_site_file" >&5
Bram Moolenaar7db77842014-03-27 17:40:59 +01002529 . "$ac_site_file" \
Christian Brabandt9670f612025-05-07 21:44:33 +02002530 || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
2531printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +01002532as_fn_error $? "failed to load site script $ac_site_file
Christian Brabandt9670f612025-05-07 21:44:33 +02002533See 'config.log' for more details" "$LINENO" 5; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00002534 fi
2535done
2536
2537if test -r "$cache_file"; then
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002538 # Some versions of bash will fail to source /dev/null (special files
2539 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2540 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02002541 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2542printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002543 case $cache_file in
Bram Moolenaar446cb832008-06-24 21:56:24 +00002544 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2545 *) . "./$cache_file";;
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002546 esac
2547 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00002548else
Illia Bobyra96d5442023-08-30 16:30:15 +02002549 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2550printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002551 >$cache_file
2552fi
2553
Illia Bobyra96d5442023-08-30 16:30:15 +02002554# Test code for whether the C compiler supports C89 (global declarations)
2555ac_c_conftest_c89_globals='
2556/* Does the compiler advertise C89 conformance?
2557 Do not test the value of __STDC__, because some compilers set it to 0
2558 while being otherwise adequately conformant. */
2559#if !defined __STDC__
2560# error "Compiler does not advertise C89 conformance"
Bram Moolenaar071d4272004-06-13 20:20:40 +00002561#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +00002562
Illia Bobyra96d5442023-08-30 16:30:15 +02002563#include <stddef.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002564#include <stdarg.h>
Bram Moolenaar7db77842014-03-27 17:40:59 +01002565struct stat;
Illia Bobyra96d5442023-08-30 16:30:15 +02002566/* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002567struct buf { int x; };
Illia Bobyra96d5442023-08-30 16:30:15 +02002568struct buf * (*rcsopen) (struct buf *, struct stat *, int);
Christian Brabandt9670f612025-05-07 21:44:33 +02002569static char *e (char **p, int i)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002570{
2571 return p[i];
2572}
2573static char *f (char * (*g) (char **, int), char **p, ...)
2574{
2575 char *s;
2576 va_list v;
2577 va_start (v,p);
2578 s = g (p, va_arg (v,int));
2579 va_end (v);
2580 return s;
2581}
2582
Christian Brabandt9670f612025-05-07 21:44:33 +02002583/* C89 style stringification. */
2584#define noexpand_stringify(a) #a
2585const char *stringified = noexpand_stringify(arbitrary+token=sequence);
2586
2587/* C89 style token pasting. Exercises some of the corner cases that
2588 e.g. old MSVC gets wrong, but not very hard. */
2589#define noexpand_concat(a,b) a##b
2590#define expand_concat(a,b) noexpand_concat(a,b)
2591extern int vA;
2592extern int vbee;
2593#define aye A
2594#define bee B
2595int *pvA = &expand_concat(v,aye);
2596int *pvbee = &noexpand_concat(v,bee);
2597
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002598/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
Illia Bobyra96d5442023-08-30 16:30:15 +02002599 function prototypes and stuff, but not \xHH hex character constants.
2600 These do not provoke an error unfortunately, instead are silently treated
2601 as an "x". The following induces an error, until -std is added to get
2602 proper ANSI mode. Curiously \x00 != x always comes out true, for an
2603 array size at least. It is necessary to write \x00 == 0 to get something
2604 that is true only with -std. */
2605int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1];
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002606
Bram Moolenaar446cb832008-06-24 21:56:24 +00002607/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
2608 inside strings and character constants. */
Illia Bobyra96d5442023-08-30 16:30:15 +02002609#define FOO(x) '\''x'\''
2610int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1];
Bram Moolenaar446cb832008-06-24 21:56:24 +00002611
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002612int test (int i, double x);
2613struct s1 {int (*f) (int a);};
2614struct s2 {int (*f) (double a);};
Illia Bobyra96d5442023-08-30 16:30:15 +02002615int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int),
2616 int, int);'
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002617
Illia Bobyra96d5442023-08-30 16:30:15 +02002618# Test code for whether the C compiler supports C89 (body of main).
2619ac_c_conftest_c89_main='
2620ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
2621'
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002622
Illia Bobyra96d5442023-08-30 16:30:15 +02002623# Test code for whether the C compiler supports C99 (global declarations)
2624ac_c_conftest_c99_globals='
Christian Brabandt9670f612025-05-07 21:44:33 +02002625/* Does the compiler advertise C99 conformance? */
Illia Bobyra96d5442023-08-30 16:30:15 +02002626#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
2627# error "Compiler does not advertise C99 conformance"
2628#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002629
Christian Brabandt9670f612025-05-07 21:44:33 +02002630// See if C++-style comments work.
2631
Bram Moolenaar22640082018-04-19 20:39:41 +02002632#include <stdbool.h>
Illia Bobyra96d5442023-08-30 16:30:15 +02002633extern int puts (const char *);
2634extern int printf (const char *, ...);
2635extern int dprintf (int, const char *, ...);
2636extern void *malloc (size_t);
Christian Brabandt9670f612025-05-07 21:44:33 +02002637extern void free (void *);
Bram Moolenaar22640082018-04-19 20:39:41 +02002638
2639// Check varargs macros. These examples are taken from C99 6.10.3.5.
Illia Bobyra96d5442023-08-30 16:30:15 +02002640// dprintf is used instead of fprintf to avoid needing to declare
2641// FILE and stderr.
2642#define debug(...) dprintf (2, __VA_ARGS__)
Bram Moolenaar22640082018-04-19 20:39:41 +02002643#define showlist(...) puts (#__VA_ARGS__)
2644#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
2645static void
2646test_varargs_macros (void)
Bram Moolenaar2e324952018-04-14 14:37:07 +02002647{
Bram Moolenaar22640082018-04-19 20:39:41 +02002648 int x = 1234;
2649 int y = 5678;
2650 debug ("Flag");
2651 debug ("X = %d\n", x);
2652 showlist (The first, second, and third items.);
2653 report (x>y, "x is %d but y is %d", x, y);
Bram Moolenaar2e324952018-04-14 14:37:07 +02002654}
2655
Bram Moolenaar22640082018-04-19 20:39:41 +02002656// Check long long types.
2657#define BIG64 18446744073709551615ull
2658#define BIG32 4294967295ul
2659#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
2660#if !BIG_OK
Illia Bobyra96d5442023-08-30 16:30:15 +02002661 #error "your preprocessor is broken"
Bram Moolenaar22640082018-04-19 20:39:41 +02002662#endif
2663#if BIG_OK
2664#else
Illia Bobyra96d5442023-08-30 16:30:15 +02002665 #error "your preprocessor is broken"
Bram Moolenaar22640082018-04-19 20:39:41 +02002666#endif
2667static long long int bignum = -9223372036854775807LL;
2668static unsigned long long int ubignum = BIG64;
Bram Moolenaar2e324952018-04-14 14:37:07 +02002669
Bram Moolenaar22640082018-04-19 20:39:41 +02002670struct incomplete_array
2671{
2672 int datasize;
2673 double data[];
2674};
Bram Moolenaar2e324952018-04-14 14:37:07 +02002675
Bram Moolenaar22640082018-04-19 20:39:41 +02002676struct named_init {
2677 int number;
2678 const wchar_t *name;
2679 double average;
2680};
2681
2682typedef const char *ccp;
2683
2684static inline int
2685test_restrict (ccp restrict text)
2686{
Bram Moolenaar22640082018-04-19 20:39:41 +02002687 // Iterate through items via the restricted pointer.
2688 // Also check for declarations in for loops.
Illia Bobyra96d5442023-08-30 16:30:15 +02002689 for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
Bram Moolenaar22640082018-04-19 20:39:41 +02002690 continue;
2691 return 0;
2692}
2693
2694// Check varargs and va_copy.
Illia Bobyra96d5442023-08-30 16:30:15 +02002695static bool
Bram Moolenaar22640082018-04-19 20:39:41 +02002696test_varargs (const char *format, ...)
2697{
2698 va_list args;
2699 va_start (args, format);
2700 va_list args_copy;
2701 va_copy (args_copy, args);
2702
Illia Bobyra96d5442023-08-30 16:30:15 +02002703 const char *str = "";
2704 int number = 0;
2705 float fnumber = 0;
Bram Moolenaar22640082018-04-19 20:39:41 +02002706
2707 while (*format)
2708 {
2709 switch (*format++)
2710 {
Illia Bobyra96d5442023-08-30 16:30:15 +02002711 case '\''s'\'': // string
Bram Moolenaar22640082018-04-19 20:39:41 +02002712 str = va_arg (args_copy, const char *);
2713 break;
Illia Bobyra96d5442023-08-30 16:30:15 +02002714 case '\''d'\'': // int
Bram Moolenaar22640082018-04-19 20:39:41 +02002715 number = va_arg (args_copy, int);
2716 break;
Illia Bobyra96d5442023-08-30 16:30:15 +02002717 case '\''f'\'': // float
Bram Moolenaar22640082018-04-19 20:39:41 +02002718 fnumber = va_arg (args_copy, double);
2719 break;
2720 default:
2721 break;
2722 }
2723 }
2724 va_end (args_copy);
2725 va_end (args);
Illia Bobyra96d5442023-08-30 16:30:15 +02002726
2727 return *str && number && fnumber;
Bram Moolenaar22640082018-04-19 20:39:41 +02002728}
Illia Bobyra96d5442023-08-30 16:30:15 +02002729'
Bram Moolenaar22640082018-04-19 20:39:41 +02002730
Illia Bobyra96d5442023-08-30 16:30:15 +02002731# Test code for whether the C compiler supports C99 (body of main).
2732ac_c_conftest_c99_main='
Bram Moolenaar22640082018-04-19 20:39:41 +02002733 // Check bool.
2734 _Bool success = false;
Illia Bobyra96d5442023-08-30 16:30:15 +02002735 success |= (argc != 0);
Bram Moolenaar22640082018-04-19 20:39:41 +02002736
2737 // Check restrict.
2738 if (test_restrict ("String literal") == 0)
2739 success = true;
2740 char *restrict newvar = "Another string";
2741
2742 // Check varargs.
Illia Bobyra96d5442023-08-30 16:30:15 +02002743 success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234);
Bram Moolenaar22640082018-04-19 20:39:41 +02002744 test_varargs_macros ();
2745
2746 // Check flexible array members.
2747 struct incomplete_array *ia =
2748 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
2749 ia->datasize = 10;
2750 for (int i = 0; i < ia->datasize; ++i)
2751 ia->data[i] = i * 1.234;
Christian Brabandt9670f612025-05-07 21:44:33 +02002752 // Work around memory leak warnings.
2753 free (ia);
Bram Moolenaar22640082018-04-19 20:39:41 +02002754
2755 // Check named initializers.
2756 struct named_init ni = {
2757 .number = 34,
2758 .name = L"Test wide string",
2759 .average = 543.34343,
2760 };
2761
2762 ni.number = 58;
2763
2764 int dynamic_array[ni.number];
Illia Bobyra96d5442023-08-30 16:30:15 +02002765 dynamic_array[0] = argv[0][0];
Bram Moolenaar22640082018-04-19 20:39:41 +02002766 dynamic_array[ni.number - 1] = 543;
2767
2768 // work around unused variable warnings
Illia Bobyra96d5442023-08-30 16:30:15 +02002769 ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\''
2770 || dynamic_array[ni.number - 1] != 543);
2771'
2772
2773# Test code for whether the C compiler supports C11 (global declarations)
2774ac_c_conftest_c11_globals='
Christian Brabandt9670f612025-05-07 21:44:33 +02002775/* Does the compiler advertise C11 conformance? */
Illia Bobyra96d5442023-08-30 16:30:15 +02002776#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
2777# error "Compiler does not advertise C11 conformance"
2778#endif
2779
2780// Check _Alignas.
2781char _Alignas (double) aligned_as_double;
2782char _Alignas (0) no_special_alignment;
2783extern char aligned_as_int;
2784char _Alignas (0) _Alignas (int) aligned_as_int;
2785
2786// Check _Alignof.
2787enum
2788{
2789 int_alignment = _Alignof (int),
2790 int_array_alignment = _Alignof (int[100]),
2791 char_alignment = _Alignof (char)
2792};
2793_Static_assert (0 < -_Alignof (int), "_Alignof is signed");
2794
2795// Check _Noreturn.
2796int _Noreturn does_not_return (void) { for (;;) continue; }
2797
2798// Check _Static_assert.
2799struct test_static_assert
2800{
2801 int x;
2802 _Static_assert (sizeof (int) <= sizeof (long int),
2803 "_Static_assert does not work in struct");
2804 long int y;
2805};
2806
2807// Check UTF-8 literals.
2808#define u8 syntax error!
2809char const utf8_literal[] = u8"happens to be ASCII" "another string";
2810
2811// Check duplicate typedefs.
2812typedef long *long_ptr;
2813typedef long int *long_ptr;
2814typedef long_ptr long_ptr;
2815
2816// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
2817struct anonymous
2818{
2819 union {
2820 struct { int i; int j; };
2821 struct { int k; long int l; } w;
2822 };
2823 int m;
2824} v1;
2825'
2826
2827# Test code for whether the C compiler supports C11 (body of main).
2828ac_c_conftest_c11_main='
2829 _Static_assert ((offsetof (struct anonymous, i)
2830 == offsetof (struct anonymous, w.k)),
2831 "Anonymous union alignment botch");
2832 v1.i = 2;
2833 v1.w.k = 5;
2834 ok |= v1.i != 5;
2835'
2836
2837# Test code for whether the C compiler supports C11 (complete).
2838ac_c_conftest_c11_program="${ac_c_conftest_c89_globals}
2839${ac_c_conftest_c99_globals}
2840${ac_c_conftest_c11_globals}
2841
2842int
2843main (int argc, char **argv)
2844{
2845 int ok = 0;
2846 ${ac_c_conftest_c89_main}
2847 ${ac_c_conftest_c99_main}
2848 ${ac_c_conftest_c11_main}
2849 return ok;
2850}
2851"
2852
2853# Test code for whether the C compiler supports C99 (complete).
2854ac_c_conftest_c99_program="${ac_c_conftest_c89_globals}
2855${ac_c_conftest_c99_globals}
2856
2857int
2858main (int argc, char **argv)
2859{
2860 int ok = 0;
2861 ${ac_c_conftest_c89_main}
2862 ${ac_c_conftest_c99_main}
2863 return ok;
2864}
2865"
2866
2867# Test code for whether the C compiler supports C89 (complete).
2868ac_c_conftest_c89_program="${ac_c_conftest_c89_globals}
2869
2870int
2871main (int argc, char **argv)
2872{
2873 int ok = 0;
2874 ${ac_c_conftest_c89_main}
2875 return ok;
2876}
2877"
2878
2879as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H"
2880as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H"
2881as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H"
2882as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
2883as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
2884as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
2885as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
2886as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
2887as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
2888as_fn_append ac_header_c_list " sys/time.h sys_time_h HAVE_SYS_TIME_H"
2889as_fn_append ac_header_c_list " sys/select.h sys_select_h HAVE_SYS_SELECT_H"
2890as_fn_append ac_header_c_list " sys/socket.h sys_socket_h HAVE_SYS_SOCKET_H"
2891# Check that the precious variables saved in the cache have kept the same
2892# value.
2893ac_cache_corrupted=false
2894for ac_var in $ac_precious_vars; do
2895 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2896 eval ac_new_set=\$ac_env_${ac_var}_set
2897 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2898 eval ac_new_val=\$ac_env_${ac_var}_value
2899 case $ac_old_set,$ac_new_set in
2900 set,)
Christian Brabandt9670f612025-05-07 21:44:33 +02002901 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' was set to '$ac_old_val' in the previous run" >&5
2902printf "%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 +02002903 ac_cache_corrupted=: ;;
2904 ,set)
Christian Brabandt9670f612025-05-07 21:44:33 +02002905 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' was not set in the previous run" >&5
2906printf "%s\n" "$as_me: error: '$ac_var' was not set in the previous run" >&2;}
Illia Bobyra96d5442023-08-30 16:30:15 +02002907 ac_cache_corrupted=: ;;
2908 ,);;
2909 *)
2910 if test "x$ac_old_val" != "x$ac_new_val"; then
2911 # differences in whitespace do not lead to failure.
2912 ac_old_val_w=`echo x $ac_old_val`
2913 ac_new_val_w=`echo x $ac_new_val`
2914 if test "$ac_old_val_w" != "$ac_new_val_w"; then
Christian Brabandt9670f612025-05-07 21:44:33 +02002915 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' has changed since the previous run:" >&5
2916printf "%s\n" "$as_me: error: '$ac_var' has changed since the previous run:" >&2;}
Illia Bobyra96d5442023-08-30 16:30:15 +02002917 ac_cache_corrupted=:
2918 else
Christian Brabandt9670f612025-05-07 21:44:33 +02002919 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in '$ac_var' since the previous run:" >&5
2920printf "%s\n" "$as_me: warning: ignoring whitespace changes in '$ac_var' since the previous run:" >&2;}
Illia Bobyra96d5442023-08-30 16:30:15 +02002921 eval $ac_var=\$ac_old_val
2922 fi
Christian Brabandt9670f612025-05-07 21:44:33 +02002923 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: '$ac_old_val'" >&5
2924printf "%s\n" "$as_me: former value: '$ac_old_val'" >&2;}
2925 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: '$ac_new_val'" >&5
2926printf "%s\n" "$as_me: current value: '$ac_new_val'" >&2;}
Illia Bobyra96d5442023-08-30 16:30:15 +02002927 fi;;
2928 esac
2929 # Pass precious variables to config.status.
2930 if test "$ac_new_set" = set; then
2931 case $ac_new_val in
2932 *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2933 *) ac_arg=$ac_var=$ac_new_val ;;
2934 esac
2935 case " $ac_configure_args " in
2936 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2937 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2938 esac
2939 fi
2940done
2941if $ac_cache_corrupted; then
Christian Brabandt9670f612025-05-07 21:44:33 +02002942 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
2943printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
Illia Bobyra96d5442023-08-30 16:30:15 +02002944 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2945printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
Christian Brabandt9670f612025-05-07 21:44:33 +02002946 as_fn_error $? "run '${MAKE-make} distclean' and/or 'rm $cache_file'
Illia Bobyra96d5442023-08-30 16:30:15 +02002947 and start over" "$LINENO" 5
2948fi
2949## -------------------- ##
2950## Main body of script. ##
2951## -------------------- ##
2952
2953ac_ext=c
2954ac_cpp='$CPP $CPPFLAGS'
2955ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2956ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2957ac_compiler_gnu=$ac_cv_c_compiler_gnu
2958
2959
2960
2961ac_config_headers="$ac_config_headers auto/config.h:config.h.in"
2962
2963
2964printf "%s\n" "#define UNIX 1" >>confdefs.h
2965
2966{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
2967printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
2968set x ${MAKE-make}
2969ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
2970if eval test \${ac_cv_prog_make_${ac_make}_set+y}
2971then :
2972 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02002973else case e in #(
2974 e) cat >conftest.make <<\_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02002975SHELL = /bin/sh
2976all:
2977 @echo '@@@%%%=$(MAKE)=@@@%%%'
2978_ACEOF
2979# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
2980case `${MAKE-make} -f conftest.make 2>/dev/null` in
2981 *@@@%%%=?*=@@@%%%*)
2982 eval ac_cv_prog_make_${ac_make}_set=yes;;
2983 *)
2984 eval ac_cv_prog_make_${ac_make}_set=no;;
2985esac
Christian Brabandt9670f612025-05-07 21:44:33 +02002986rm -f conftest.make ;;
2987esac
Illia Bobyra96d5442023-08-30 16:30:15 +02002988fi
2989if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
2990 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
2991printf "%s\n" "yes" >&6; }
2992 SET_MAKE=
2993else
2994 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
2995printf "%s\n" "no" >&6; }
2996 SET_MAKE="MAKE=${MAKE-make}"
2997fi
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009ac_ext=c
3010ac_cpp='$CPP $CPPFLAGS'
3011ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3012ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3013ac_compiler_gnu=$ac_cv_c_compiler_gnu
3014if test -n "$ac_tool_prefix"; then
3015 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3016set dummy ${ac_tool_prefix}gcc; ac_word=$2
3017{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3018printf %s "checking for $ac_word... " >&6; }
3019if test ${ac_cv_prog_CC+y}
3020then :
3021 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02003022else case e in #(
3023 e) if test -n "$CC"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02003024 ac_cv_prog_CC="$CC" # Let the user override the test.
3025else
3026as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3027for as_dir in $PATH
3028do
3029 IFS=$as_save_IFS
3030 case $as_dir in #(((
3031 '') as_dir=./ ;;
3032 */) ;;
3033 *) as_dir=$as_dir/ ;;
3034 esac
3035 for ac_exec_ext in '' $ac_executable_extensions; do
3036 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3037 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3038 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3039 break 2
3040 fi
3041done
3042 done
3043IFS=$as_save_IFS
3044
Christian Brabandt9670f612025-05-07 21:44:33 +02003045fi ;;
3046esac
Illia Bobyra96d5442023-08-30 16:30:15 +02003047fi
3048CC=$ac_cv_prog_CC
3049if test -n "$CC"; then
3050 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3051printf "%s\n" "$CC" >&6; }
3052else
3053 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3054printf "%s\n" "no" >&6; }
3055fi
3056
3057
3058fi
3059if test -z "$ac_cv_prog_CC"; then
3060 ac_ct_CC=$CC
3061 # Extract the first word of "gcc", so it can be a program name with args.
3062set dummy gcc; ac_word=$2
3063{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3064printf %s "checking for $ac_word... " >&6; }
3065if test ${ac_cv_prog_ac_ct_CC+y}
3066then :
3067 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02003068else case e in #(
3069 e) if test -n "$ac_ct_CC"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02003070 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3071else
3072as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3073for as_dir in $PATH
3074do
3075 IFS=$as_save_IFS
3076 case $as_dir in #(((
3077 '') as_dir=./ ;;
3078 */) ;;
3079 *) as_dir=$as_dir/ ;;
3080 esac
3081 for ac_exec_ext in '' $ac_executable_extensions; do
3082 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3083 ac_cv_prog_ac_ct_CC="gcc"
3084 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3085 break 2
3086 fi
3087done
3088 done
3089IFS=$as_save_IFS
3090
Christian Brabandt9670f612025-05-07 21:44:33 +02003091fi ;;
3092esac
Illia Bobyra96d5442023-08-30 16:30:15 +02003093fi
3094ac_ct_CC=$ac_cv_prog_ac_ct_CC
3095if test -n "$ac_ct_CC"; then
3096 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3097printf "%s\n" "$ac_ct_CC" >&6; }
3098else
3099 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3100printf "%s\n" "no" >&6; }
3101fi
3102
3103 if test "x$ac_ct_CC" = x; then
3104 CC=""
3105 else
3106 case $cross_compiling:$ac_tool_warned in
3107yes:)
3108{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3109printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3110ac_tool_warned=yes ;;
3111esac
3112 CC=$ac_ct_CC
3113 fi
3114else
3115 CC="$ac_cv_prog_CC"
3116fi
3117
3118if test -z "$CC"; then
3119 if test -n "$ac_tool_prefix"; then
3120 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3121set dummy ${ac_tool_prefix}cc; ac_word=$2
3122{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3123printf %s "checking for $ac_word... " >&6; }
3124if test ${ac_cv_prog_CC+y}
3125then :
3126 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02003127else case e in #(
3128 e) if test -n "$CC"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02003129 ac_cv_prog_CC="$CC" # Let the user override the test.
3130else
3131as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3132for as_dir in $PATH
3133do
3134 IFS=$as_save_IFS
3135 case $as_dir in #(((
3136 '') as_dir=./ ;;
3137 */) ;;
3138 *) as_dir=$as_dir/ ;;
3139 esac
3140 for ac_exec_ext in '' $ac_executable_extensions; do
3141 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3142 ac_cv_prog_CC="${ac_tool_prefix}cc"
3143 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3144 break 2
3145 fi
3146done
3147 done
3148IFS=$as_save_IFS
3149
Christian Brabandt9670f612025-05-07 21:44:33 +02003150fi ;;
3151esac
Illia Bobyra96d5442023-08-30 16:30:15 +02003152fi
3153CC=$ac_cv_prog_CC
3154if test -n "$CC"; then
3155 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3156printf "%s\n" "$CC" >&6; }
3157else
3158 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3159printf "%s\n" "no" >&6; }
3160fi
3161
3162
3163 fi
3164fi
3165if test -z "$CC"; then
3166 # Extract the first word of "cc", so it can be a program name with args.
3167set dummy cc; ac_word=$2
3168{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3169printf %s "checking for $ac_word... " >&6; }
3170if test ${ac_cv_prog_CC+y}
3171then :
3172 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02003173else case e in #(
3174 e) if test -n "$CC"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02003175 ac_cv_prog_CC="$CC" # Let the user override the test.
3176else
3177 ac_prog_rejected=no
3178as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3179for as_dir in $PATH
3180do
3181 IFS=$as_save_IFS
3182 case $as_dir in #(((
3183 '') as_dir=./ ;;
3184 */) ;;
3185 *) as_dir=$as_dir/ ;;
3186 esac
3187 for ac_exec_ext in '' $ac_executable_extensions; do
3188 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3189 if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3190 ac_prog_rejected=yes
3191 continue
3192 fi
3193 ac_cv_prog_CC="cc"
3194 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3195 break 2
3196 fi
3197done
3198 done
3199IFS=$as_save_IFS
3200
3201if test $ac_prog_rejected = yes; then
3202 # We found a bogon in the path, so make sure we never use it.
3203 set dummy $ac_cv_prog_CC
3204 shift
3205 if test $# != 0; then
3206 # We chose a different compiler from the bogus one.
3207 # However, it has the same basename, so the bogon will be chosen
3208 # first if we set CC to just the basename; use the full file name.
3209 shift
3210 ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
3211 fi
3212fi
Christian Brabandt9670f612025-05-07 21:44:33 +02003213fi ;;
3214esac
Illia Bobyra96d5442023-08-30 16:30:15 +02003215fi
3216CC=$ac_cv_prog_CC
3217if test -n "$CC"; then
3218 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3219printf "%s\n" "$CC" >&6; }
3220else
3221 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3222printf "%s\n" "no" >&6; }
3223fi
3224
3225
3226fi
3227if test -z "$CC"; then
3228 if test -n "$ac_tool_prefix"; then
3229 for ac_prog in cl.exe
3230 do
3231 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3232set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3233{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3234printf %s "checking for $ac_word... " >&6; }
3235if test ${ac_cv_prog_CC+y}
3236then :
3237 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02003238else case e in #(
3239 e) if test -n "$CC"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02003240 ac_cv_prog_CC="$CC" # Let the user override the test.
3241else
3242as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3243for as_dir in $PATH
3244do
3245 IFS=$as_save_IFS
3246 case $as_dir in #(((
3247 '') as_dir=./ ;;
3248 */) ;;
3249 *) as_dir=$as_dir/ ;;
3250 esac
3251 for ac_exec_ext in '' $ac_executable_extensions; do
3252 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3253 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3254 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3255 break 2
3256 fi
3257done
3258 done
3259IFS=$as_save_IFS
3260
Christian Brabandt9670f612025-05-07 21:44:33 +02003261fi ;;
3262esac
Illia Bobyra96d5442023-08-30 16:30:15 +02003263fi
3264CC=$ac_cv_prog_CC
3265if test -n "$CC"; then
3266 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3267printf "%s\n" "$CC" >&6; }
3268else
3269 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3270printf "%s\n" "no" >&6; }
3271fi
3272
3273
3274 test -n "$CC" && break
3275 done
3276fi
3277if test -z "$CC"; then
3278 ac_ct_CC=$CC
3279 for ac_prog in cl.exe
3280do
3281 # Extract the first word of "$ac_prog", so it can be a program name with args.
3282set dummy $ac_prog; ac_word=$2
3283{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3284printf %s "checking for $ac_word... " >&6; }
3285if test ${ac_cv_prog_ac_ct_CC+y}
3286then :
3287 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02003288else case e in #(
3289 e) if test -n "$ac_ct_CC"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02003290 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3291else
3292as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3293for as_dir in $PATH
3294do
3295 IFS=$as_save_IFS
3296 case $as_dir in #(((
3297 '') as_dir=./ ;;
3298 */) ;;
3299 *) as_dir=$as_dir/ ;;
3300 esac
3301 for ac_exec_ext in '' $ac_executable_extensions; do
3302 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3303 ac_cv_prog_ac_ct_CC="$ac_prog"
3304 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3305 break 2
3306 fi
3307done
3308 done
3309IFS=$as_save_IFS
3310
Christian Brabandt9670f612025-05-07 21:44:33 +02003311fi ;;
3312esac
Illia Bobyra96d5442023-08-30 16:30:15 +02003313fi
3314ac_ct_CC=$ac_cv_prog_ac_ct_CC
3315if test -n "$ac_ct_CC"; then
3316 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3317printf "%s\n" "$ac_ct_CC" >&6; }
3318else
3319 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3320printf "%s\n" "no" >&6; }
3321fi
3322
3323
3324 test -n "$ac_ct_CC" && break
3325done
3326
3327 if test "x$ac_ct_CC" = x; then
3328 CC=""
3329 else
3330 case $cross_compiling:$ac_tool_warned in
3331yes:)
3332{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3333printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3334ac_tool_warned=yes ;;
3335esac
3336 CC=$ac_ct_CC
3337 fi
3338fi
3339
3340fi
3341if test -z "$CC"; then
3342 if test -n "$ac_tool_prefix"; then
3343 # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
3344set dummy ${ac_tool_prefix}clang; ac_word=$2
3345{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3346printf %s "checking for $ac_word... " >&6; }
3347if test ${ac_cv_prog_CC+y}
3348then :
3349 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02003350else case e in #(
3351 e) if test -n "$CC"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02003352 ac_cv_prog_CC="$CC" # Let the user override the test.
3353else
3354as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3355for as_dir in $PATH
3356do
3357 IFS=$as_save_IFS
3358 case $as_dir in #(((
3359 '') as_dir=./ ;;
3360 */) ;;
3361 *) as_dir=$as_dir/ ;;
3362 esac
3363 for ac_exec_ext in '' $ac_executable_extensions; do
3364 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3365 ac_cv_prog_CC="${ac_tool_prefix}clang"
3366 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3367 break 2
3368 fi
3369done
3370 done
3371IFS=$as_save_IFS
3372
Christian Brabandt9670f612025-05-07 21:44:33 +02003373fi ;;
3374esac
Illia Bobyra96d5442023-08-30 16:30:15 +02003375fi
3376CC=$ac_cv_prog_CC
3377if test -n "$CC"; then
3378 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3379printf "%s\n" "$CC" >&6; }
3380else
3381 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3382printf "%s\n" "no" >&6; }
3383fi
3384
3385
3386fi
3387if test -z "$ac_cv_prog_CC"; then
3388 ac_ct_CC=$CC
3389 # Extract the first word of "clang", so it can be a program name with args.
3390set dummy clang; ac_word=$2
3391{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3392printf %s "checking for $ac_word... " >&6; }
3393if test ${ac_cv_prog_ac_ct_CC+y}
3394then :
3395 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02003396else case e in #(
3397 e) if test -n "$ac_ct_CC"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02003398 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3399else
3400as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3401for as_dir in $PATH
3402do
3403 IFS=$as_save_IFS
3404 case $as_dir in #(((
3405 '') as_dir=./ ;;
3406 */) ;;
3407 *) as_dir=$as_dir/ ;;
3408 esac
3409 for ac_exec_ext in '' $ac_executable_extensions; do
3410 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3411 ac_cv_prog_ac_ct_CC="clang"
3412 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3413 break 2
3414 fi
3415done
3416 done
3417IFS=$as_save_IFS
3418
Christian Brabandt9670f612025-05-07 21:44:33 +02003419fi ;;
3420esac
Illia Bobyra96d5442023-08-30 16:30:15 +02003421fi
3422ac_ct_CC=$ac_cv_prog_ac_ct_CC
3423if test -n "$ac_ct_CC"; then
3424 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3425printf "%s\n" "$ac_ct_CC" >&6; }
3426else
3427 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3428printf "%s\n" "no" >&6; }
3429fi
3430
3431 if test "x$ac_ct_CC" = x; then
3432 CC=""
3433 else
3434 case $cross_compiling:$ac_tool_warned in
3435yes:)
3436{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3437printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3438ac_tool_warned=yes ;;
3439esac
3440 CC=$ac_ct_CC
3441 fi
3442else
3443 CC="$ac_cv_prog_CC"
3444fi
3445
3446fi
3447
3448
Christian Brabandt9670f612025-05-07 21:44:33 +02003449test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
3450printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
Illia Bobyra96d5442023-08-30 16:30:15 +02003451as_fn_error $? "no acceptable C compiler found in \$PATH
Christian Brabandt9670f612025-05-07 21:44:33 +02003452See 'config.log' for more details" "$LINENO" 5; }
Illia Bobyra96d5442023-08-30 16:30:15 +02003453
3454# Provide some information about the compiler.
3455printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3456set X $ac_compile
3457ac_compiler=$2
3458for ac_option in --version -v -V -qversion -version; do
3459 { { ac_try="$ac_compiler $ac_option >&5"
3460case "(($ac_try" in
3461 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3462 *) ac_try_echo=$ac_try;;
3463esac
3464eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3465printf "%s\n" "$ac_try_echo"; } >&5
3466 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3467 ac_status=$?
3468 if test -s conftest.err; then
3469 sed '10a\
3470... rest of stderr output deleted ...
3471 10q' conftest.err >conftest.er1
3472 cat conftest.er1 >&5
3473 fi
3474 rm -f conftest.er1 conftest.err
3475 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3476 test $ac_status = 0; }
3477done
3478
3479cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3480/* end confdefs.h. */
3481
3482int
3483main (void)
3484{
Bram Moolenaar22640082018-04-19 20:39:41 +02003485
Bram Moolenaar2e324952018-04-14 14:37:07 +02003486 ;
3487 return 0;
3488}
3489_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02003490ac_clean_files_save=$ac_clean_files
3491ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3492# Try to create an executable without -o first, disregard a.out.
3493# It will help us diagnose broken compilers, and finding out an intuition
3494# of exeext.
3495{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3496printf %s "checking whether the C compiler works... " >&6; }
3497ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3498
3499# The possible output files:
3500ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3501
3502ac_rmfiles=
3503for ac_file in $ac_files
3504do
3505 case $ac_file in
3506 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3507 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3508 esac
3509done
3510rm -f $ac_rmfiles
3511
3512if { { ac_try="$ac_link_default"
3513case "(($ac_try" in
3514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3515 *) ac_try_echo=$ac_try;;
3516esac
3517eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3518printf "%s\n" "$ac_try_echo"; } >&5
3519 (eval "$ac_link_default") 2>&5
3520 ac_status=$?
3521 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3522 test $ac_status = 0; }
3523then :
Christian Brabandt9670f612025-05-07 21:44:33 +02003524 # Autoconf-2.13 could set the ac_cv_exeext variable to 'no'.
3525# So ignore a value of 'no', otherwise this would lead to 'EXEEXT = no'
Illia Bobyra96d5442023-08-30 16:30:15 +02003526# in a Makefile. We should not override ac_cv_exeext if it was cached,
3527# so that the user can short-circuit this test for compilers unknown to
3528# Autoconf.
3529for ac_file in $ac_files ''
3530do
3531 test -f "$ac_file" || continue
3532 case $ac_file in
3533 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3534 ;;
3535 [ab].out )
3536 # We found the default executable, but exeext='' is most
3537 # certainly right.
3538 break;;
3539 *.* )
3540 if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
3541 then :; else
3542 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3543 fi
3544 # We set ac_cv_exeext here because the later test for it is not
Christian Brabandt9670f612025-05-07 21:44:33 +02003545 # safe: cross compilers may not add the suffix if given an '-o'
Illia Bobyra96d5442023-08-30 16:30:15 +02003546 # argument, so we may need to know it at that point already.
3547 # Even if this section looks crufty: it has the advantage of
3548 # actually working.
3549 break;;
3550 * )
3551 break;;
3552 esac
3553done
3554test "$ac_cv_exeext" = no && ac_cv_exeext=
3555
Christian Brabandt9670f612025-05-07 21:44:33 +02003556else case e in #(
3557 e) ac_file='' ;;
3558esac
Illia Bobyra96d5442023-08-30 16:30:15 +02003559fi
3560if test -z "$ac_file"
3561then :
3562 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3563printf "%s\n" "no" >&6; }
3564printf "%s\n" "$as_me: failed program was:" >&5
3565sed 's/^/| /' conftest.$ac_ext >&5
3566
Christian Brabandt9670f612025-05-07 21:44:33 +02003567{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
3568printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
Illia Bobyra96d5442023-08-30 16:30:15 +02003569as_fn_error 77 "C compiler cannot create executables
Christian Brabandt9670f612025-05-07 21:44:33 +02003570See 'config.log' for more details" "$LINENO" 5; }
3571else case e in #(
3572 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3573printf "%s\n" "yes" >&6; } ;;
3574esac
Illia Bobyra96d5442023-08-30 16:30:15 +02003575fi
3576{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3577printf %s "checking for C compiler default output file name... " >&6; }
3578{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3579printf "%s\n" "$ac_file" >&6; }
3580ac_exeext=$ac_cv_exeext
3581
3582rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3583ac_clean_files=$ac_clean_files_save
3584{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3585printf %s "checking for suffix of executables... " >&6; }
3586if { { ac_try="$ac_link"
3587case "(($ac_try" in
3588 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3589 *) ac_try_echo=$ac_try;;
3590esac
3591eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3592printf "%s\n" "$ac_try_echo"; } >&5
3593 (eval "$ac_link") 2>&5
3594 ac_status=$?
3595 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3596 test $ac_status = 0; }
3597then :
Christian Brabandt9670f612025-05-07 21:44:33 +02003598 # If both 'conftest.exe' and 'conftest' are 'present' (well, observable)
3599# catch 'conftest.exe'. For instance with Cygwin, 'ls conftest' will
3600# work properly (i.e., refer to 'conftest.exe'), while it won't with
3601# 'rm'.
Illia Bobyra96d5442023-08-30 16:30:15 +02003602for ac_file in conftest.exe conftest conftest.*; do
3603 test -f "$ac_file" || continue
3604 case $ac_file in
3605 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3606 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3607 break;;
3608 * ) break;;
3609 esac
3610done
Christian Brabandt9670f612025-05-07 21:44:33 +02003611else case e in #(
3612 e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
3613printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
Illia Bobyra96d5442023-08-30 16:30:15 +02003614as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Christian Brabandt9670f612025-05-07 21:44:33 +02003615See 'config.log' for more details" "$LINENO" 5; } ;;
3616esac
Illia Bobyra96d5442023-08-30 16:30:15 +02003617fi
3618rm -f conftest conftest$ac_cv_exeext
3619{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3620printf "%s\n" "$ac_cv_exeext" >&6; }
3621
3622rm -f conftest.$ac_ext
3623EXEEXT=$ac_cv_exeext
3624ac_exeext=$EXEEXT
3625cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3626/* end confdefs.h. */
3627#include <stdio.h>
3628int
3629main (void)
3630{
3631FILE *f = fopen ("conftest.out", "w");
Christian Brabandt9670f612025-05-07 21:44:33 +02003632 if (!f)
3633 return 1;
Illia Bobyra96d5442023-08-30 16:30:15 +02003634 return ferror (f) || fclose (f) != 0;
3635
3636 ;
3637 return 0;
3638}
3639_ACEOF
3640ac_clean_files="$ac_clean_files conftest.out"
3641# Check that the compiler produces executables we can run. If not, either
3642# the compiler is broken, or we cross compile.
3643{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3644printf %s "checking whether we are cross compiling... " >&6; }
3645if test "$cross_compiling" != yes; then
3646 { { ac_try="$ac_link"
3647case "(($ac_try" in
3648 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3649 *) ac_try_echo=$ac_try;;
3650esac
3651eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3652printf "%s\n" "$ac_try_echo"; } >&5
3653 (eval "$ac_link") 2>&5
3654 ac_status=$?
3655 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3656 test $ac_status = 0; }
3657 if { ac_try='./conftest$ac_cv_exeext'
3658 { { case "(($ac_try" in
3659 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3660 *) ac_try_echo=$ac_try;;
3661esac
3662eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3663printf "%s\n" "$ac_try_echo"; } >&5
3664 (eval "$ac_try") 2>&5
3665 ac_status=$?
3666 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3667 test $ac_status = 0; }; }; then
3668 cross_compiling=no
3669 else
3670 if test "$cross_compiling" = maybe; then
3671 cross_compiling=yes
3672 else
Christian Brabandt9670f612025-05-07 21:44:33 +02003673 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
3674printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
Illia Bobyra96d5442023-08-30 16:30:15 +02003675as_fn_error 77 "cannot run C compiled programs.
Christian Brabandt9670f612025-05-07 21:44:33 +02003676If you meant to cross compile, use '--host'.
3677See 'config.log' for more details" "$LINENO" 5; }
Illia Bobyra96d5442023-08-30 16:30:15 +02003678 fi
3679 fi
3680fi
3681{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3682printf "%s\n" "$cross_compiling" >&6; }
3683
Christian Brabandt9670f612025-05-07 21:44:33 +02003684rm -f conftest.$ac_ext conftest$ac_cv_exeext \
3685 conftest.o conftest.obj conftest.out
Illia Bobyra96d5442023-08-30 16:30:15 +02003686ac_clean_files=$ac_clean_files_save
3687{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3688printf %s "checking for suffix of object files... " >&6; }
3689if test ${ac_cv_objext+y}
3690then :
3691 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02003692else case e in #(
3693 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Illia Bobyra96d5442023-08-30 16:30:15 +02003694/* end confdefs.h. */
3695
3696int
3697main (void)
3698{
3699
3700 ;
3701 return 0;
3702}
3703_ACEOF
3704rm -f conftest.o conftest.obj
3705if { { ac_try="$ac_compile"
3706case "(($ac_try" in
3707 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3708 *) ac_try_echo=$ac_try;;
3709esac
3710eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3711printf "%s\n" "$ac_try_echo"; } >&5
3712 (eval "$ac_compile") 2>&5
3713 ac_status=$?
3714 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3715 test $ac_status = 0; }
3716then :
3717 for ac_file in conftest.o conftest.obj conftest.*; do
3718 test -f "$ac_file" || continue;
3719 case $ac_file in
3720 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3721 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3722 break;;
3723 esac
3724done
Christian Brabandt9670f612025-05-07 21:44:33 +02003725else case e in #(
3726 e) printf "%s\n" "$as_me: failed program was:" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +02003727sed 's/^/| /' conftest.$ac_ext >&5
3728
Christian Brabandt9670f612025-05-07 21:44:33 +02003729{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
3730printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
Illia Bobyra96d5442023-08-30 16:30:15 +02003731as_fn_error $? "cannot compute suffix of object files: cannot compile
Christian Brabandt9670f612025-05-07 21:44:33 +02003732See 'config.log' for more details" "$LINENO" 5; } ;;
3733esac
Illia Bobyra96d5442023-08-30 16:30:15 +02003734fi
Christian Brabandt9670f612025-05-07 21:44:33 +02003735rm -f conftest.$ac_cv_objext conftest.$ac_ext ;;
3736esac
Illia Bobyra96d5442023-08-30 16:30:15 +02003737fi
3738{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3739printf "%s\n" "$ac_cv_objext" >&6; }
3740OBJEXT=$ac_cv_objext
3741ac_objext=$OBJEXT
3742{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
3743printf %s "checking whether the compiler supports GNU C... " >&6; }
3744if test ${ac_cv_c_compiler_gnu+y}
3745then :
3746 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02003747else case e in #(
3748 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Illia Bobyra96d5442023-08-30 16:30:15 +02003749/* end confdefs.h. */
3750
3751int
3752main (void)
3753{
3754#ifndef __GNUC__
3755 choke me
3756#endif
3757
3758 ;
3759 return 0;
3760}
3761_ACEOF
3762if ac_fn_c_try_compile "$LINENO"
3763then :
3764 ac_compiler_gnu=yes
Christian Brabandt9670f612025-05-07 21:44:33 +02003765else case e in #(
3766 e) ac_compiler_gnu=no ;;
3767esac
Illia Bobyra96d5442023-08-30 16:30:15 +02003768fi
3769rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3770ac_cv_c_compiler_gnu=$ac_compiler_gnu
Christian Brabandt9670f612025-05-07 21:44:33 +02003771 ;;
3772esac
Illia Bobyra96d5442023-08-30 16:30:15 +02003773fi
3774{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3775printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
3776ac_compiler_gnu=$ac_cv_c_compiler_gnu
3777
3778if test $ac_compiler_gnu = yes; then
3779 GCC=yes
3780else
3781 GCC=
3782fi
3783ac_test_CFLAGS=${CFLAGS+y}
3784ac_save_CFLAGS=$CFLAGS
3785{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3786printf %s "checking whether $CC accepts -g... " >&6; }
3787if test ${ac_cv_prog_cc_g+y}
3788then :
3789 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02003790else case e in #(
3791 e) ac_save_c_werror_flag=$ac_c_werror_flag
Illia Bobyra96d5442023-08-30 16:30:15 +02003792 ac_c_werror_flag=yes
3793 ac_cv_prog_cc_g=no
3794 CFLAGS="-g"
3795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3796/* end confdefs.h. */
3797
3798int
3799main (void)
3800{
3801
3802 ;
3803 return 0;
3804}
3805_ACEOF
3806if ac_fn_c_try_compile "$LINENO"
3807then :
3808 ac_cv_prog_cc_g=yes
Christian Brabandt9670f612025-05-07 21:44:33 +02003809else case e in #(
3810 e) CFLAGS=""
Illia Bobyra96d5442023-08-30 16:30:15 +02003811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3812/* end confdefs.h. */
3813
3814int
3815main (void)
3816{
3817
3818 ;
3819 return 0;
3820}
3821_ACEOF
3822if ac_fn_c_try_compile "$LINENO"
3823then :
3824
Christian Brabandt9670f612025-05-07 21:44:33 +02003825else case e in #(
3826 e) ac_c_werror_flag=$ac_save_c_werror_flag
Illia Bobyra96d5442023-08-30 16:30:15 +02003827 CFLAGS="-g"
3828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3829/* end confdefs.h. */
3830
3831int
3832main (void)
3833{
3834
3835 ;
3836 return 0;
3837}
3838_ACEOF
3839if ac_fn_c_try_compile "$LINENO"
3840then :
3841 ac_cv_prog_cc_g=yes
3842fi
Christian Brabandt9670f612025-05-07 21:44:33 +02003843rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
3844esac
3845fi
3846rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
3847esac
Illia Bobyra96d5442023-08-30 16:30:15 +02003848fi
3849rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +02003850 ac_c_werror_flag=$ac_save_c_werror_flag ;;
3851esac
Illia Bobyra96d5442023-08-30 16:30:15 +02003852fi
3853{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3854printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
3855if test $ac_test_CFLAGS; then
3856 CFLAGS=$ac_save_CFLAGS
3857elif test $ac_cv_prog_cc_g = yes; then
3858 if test "$GCC" = yes; then
3859 CFLAGS="-g -O2"
3860 else
3861 CFLAGS="-g"
3862 fi
3863else
3864 if test "$GCC" = yes; then
3865 CFLAGS="-O2"
3866 else
3867 CFLAGS=
3868 fi
3869fi
3870ac_prog_cc_stdc=no
3871if test x$ac_prog_cc_stdc = xno
3872then :
3873 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
3874printf %s "checking for $CC option to enable C11 features... " >&6; }
3875if test ${ac_cv_prog_cc_c11+y}
3876then :
3877 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02003878else case e in #(
3879 e) ac_cv_prog_cc_c11=no
Illia Bobyra96d5442023-08-30 16:30:15 +02003880ac_save_CC=$CC
3881cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3882/* end confdefs.h. */
3883$ac_c_conftest_c11_program
3884_ACEOF
3885for ac_arg in '' -std=gnu11
Bram Moolenaar2e324952018-04-14 14:37:07 +02003886do
3887 CC="$ac_save_CC $ac_arg"
Illia Bobyra96d5442023-08-30 16:30:15 +02003888 if ac_fn_c_try_compile "$LINENO"
3889then :
3890 ac_cv_prog_cc_c11=$ac_arg
3891fi
3892rm -f core conftest.err conftest.$ac_objext conftest.beam
3893 test "x$ac_cv_prog_cc_c11" != "xno" && break
3894done
3895rm -f conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +02003896CC=$ac_save_CC ;;
3897esac
Illia Bobyra96d5442023-08-30 16:30:15 +02003898fi
3899
3900if test "x$ac_cv_prog_cc_c11" = xno
3901then :
3902 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3903printf "%s\n" "unsupported" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +02003904else case e in #(
3905 e) if test "x$ac_cv_prog_cc_c11" = x
Illia Bobyra96d5442023-08-30 16:30:15 +02003906then :
3907 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3908printf "%s\n" "none needed" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +02003909else case e in #(
3910 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +02003911printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +02003912 CC="$CC $ac_cv_prog_cc_c11" ;;
3913esac
Illia Bobyra96d5442023-08-30 16:30:15 +02003914fi
3915 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
Christian Brabandt9670f612025-05-07 21:44:33 +02003916 ac_prog_cc_stdc=c11 ;;
3917esac
Illia Bobyra96d5442023-08-30 16:30:15 +02003918fi
3919fi
3920if test x$ac_prog_cc_stdc = xno
3921then :
3922 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
3923printf %s "checking for $CC option to enable C99 features... " >&6; }
3924if test ${ac_cv_prog_cc_c99+y}
3925then :
3926 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02003927else case e in #(
3928 e) ac_cv_prog_cc_c99=no
Illia Bobyra96d5442023-08-30 16:30:15 +02003929ac_save_CC=$CC
3930cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3931/* end confdefs.h. */
3932$ac_c_conftest_c99_program
3933_ACEOF
3934for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
3935do
3936 CC="$ac_save_CC $ac_arg"
3937 if ac_fn_c_try_compile "$LINENO"
3938then :
Bram Moolenaar22640082018-04-19 20:39:41 +02003939 ac_cv_prog_cc_c99=$ac_arg
Bram Moolenaar2e324952018-04-14 14:37:07 +02003940fi
Illia Bobyra96d5442023-08-30 16:30:15 +02003941rm -f core conftest.err conftest.$ac_objext conftest.beam
Bram Moolenaar22640082018-04-19 20:39:41 +02003942 test "x$ac_cv_prog_cc_c99" != "xno" && break
Bram Moolenaar2e324952018-04-14 14:37:07 +02003943done
3944rm -f conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +02003945CC=$ac_save_CC ;;
3946esac
Bram Moolenaar2e324952018-04-14 14:37:07 +02003947fi
3948
Illia Bobyra96d5442023-08-30 16:30:15 +02003949if test "x$ac_cv_prog_cc_c99" = xno
3950then :
3951 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3952printf "%s\n" "unsupported" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +02003953else case e in #(
3954 e) if test "x$ac_cv_prog_cc_c99" = x
Illia Bobyra96d5442023-08-30 16:30:15 +02003955then :
3956 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3957printf "%s\n" "none needed" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +02003958else case e in #(
3959 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +02003960printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +02003961 CC="$CC $ac_cv_prog_cc_c99" ;;
3962esac
Illia Bobyra96d5442023-08-30 16:30:15 +02003963fi
3964 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
Christian Brabandt9670f612025-05-07 21:44:33 +02003965 ac_prog_cc_stdc=c99 ;;
3966esac
Illia Bobyra96d5442023-08-30 16:30:15 +02003967fi
3968fi
3969if test x$ac_prog_cc_stdc = xno
3970then :
3971 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
3972printf %s "checking for $CC option to enable C89 features... " >&6; }
3973if test ${ac_cv_prog_cc_c89+y}
3974then :
3975 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02003976else case e in #(
3977 e) ac_cv_prog_cc_c89=no
Illia Bobyra96d5442023-08-30 16:30:15 +02003978ac_save_CC=$CC
3979cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3980/* end confdefs.h. */
3981$ac_c_conftest_c89_program
3982_ACEOF
3983for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3984do
3985 CC="$ac_save_CC $ac_arg"
3986 if ac_fn_c_try_compile "$LINENO"
3987then :
3988 ac_cv_prog_cc_c89=$ac_arg
3989fi
3990rm -f core conftest.err conftest.$ac_objext conftest.beam
3991 test "x$ac_cv_prog_cc_c89" != "xno" && break
3992done
3993rm -f conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +02003994CC=$ac_save_CC ;;
3995esac
Illia Bobyra96d5442023-08-30 16:30:15 +02003996fi
3997
3998if test "x$ac_cv_prog_cc_c89" = xno
3999then :
4000 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4001printf "%s\n" "unsupported" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +02004002else case e in #(
4003 e) if test "x$ac_cv_prog_cc_c89" = x
Illia Bobyra96d5442023-08-30 16:30:15 +02004004then :
4005 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4006printf "%s\n" "none needed" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +02004007else case e in #(
4008 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +02004009printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +02004010 CC="$CC $ac_cv_prog_cc_c89" ;;
4011esac
Illia Bobyra96d5442023-08-30 16:30:15 +02004012fi
4013 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
Christian Brabandt9670f612025-05-07 21:44:33 +02004014 ac_prog_cc_stdc=c89 ;;
4015esac
Illia Bobyra96d5442023-08-30 16:30:15 +02004016fi
4017fi
4018
4019ac_ext=c
4020ac_cpp='$CPP $CPPFLAGS'
4021ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4022ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4023ac_compiler_gnu=$ac_cv_c_compiler_gnu
Bram Moolenaarc0394412017-04-20 20:20:23 +02004024 ac_ext=c
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004025ac_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
Illia Bobyra96d5442023-08-30 16:30:15 +02004029{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4030printf %s "checking how to run the C preprocessor... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00004031# On Suns, sometimes $CPP names a directory.
4032if test -n "$CPP" && test -d "$CPP"; then
4033 CPP=
4034fi
4035if test -z "$CPP"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004036 if test ${ac_cv_prog_CPP+y}
4037then :
4038 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02004039else case e in #(
4040 e) # Double quotes because $CC needs to be expanded
Illia Bobyra96d5442023-08-30 16:30:15 +02004041 for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004042 do
4043 ac_preproc_ok=false
4044for ac_c_preproc_warn_flag in '' yes
4045do
4046 # Use a header file that comes with gcc, so configuring glibc
4047 # with a fresh cross-compiler works.
Bram Moolenaar071d4272004-06-13 20:20:40 +00004048 # On the NeXT, cc -E runs the code through the compiler's parser,
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004049 # not just through cpp. "Syntax error" is here to catch this case.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004051/* end confdefs.h. */
Illia Bobyra96d5442023-08-30 16:30:15 +02004052#include <limits.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004053 Syntax error
4054_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004055if ac_fn_c_try_cpp "$LINENO"
4056then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004057
Christian Brabandt9670f612025-05-07 21:44:33 +02004058else case e in #(
4059 e) # Broken: fails on valid input.
4060continue ;;
4061esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004062fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01004063rm -f conftest.err conftest.i conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004064
Bram Moolenaar446cb832008-06-24 21:56:24 +00004065 # OK, works on sane cases. Now check whether nonexistent headers
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004066 # can be detected and how.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004068/* end confdefs.h. */
4069#include <ac_nonexistent.h>
4070_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004071if ac_fn_c_try_cpp "$LINENO"
4072then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004073 # Broken: success on invalid input.
4074continue
Christian Brabandt9670f612025-05-07 21:44:33 +02004075else case e in #(
4076 e) # Passes both tests.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004077ac_preproc_ok=:
Christian Brabandt9670f612025-05-07 21:44:33 +02004078break ;;
4079esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004080fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01004081rm -f conftest.err conftest.i conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004082
4083done
Christian Brabandt9670f612025-05-07 21:44:33 +02004084# Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Bram Moolenaar7db77842014-03-27 17:40:59 +01004085rm -f conftest.i conftest.err conftest.$ac_ext
Illia Bobyra96d5442023-08-30 16:30:15 +02004086if $ac_preproc_ok
4087then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004088 break
4089fi
4090
4091 done
4092 ac_cv_prog_CPP=$CPP
Christian Brabandt9670f612025-05-07 21:44:33 +02004093 ;;
4094esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004095fi
4096 CPP=$ac_cv_prog_CPP
4097else
4098 ac_cv_prog_CPP=$CPP
4099fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004100{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4101printf "%s\n" "$CPP" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004102ac_preproc_ok=false
4103for ac_c_preproc_warn_flag in '' yes
Bram Moolenaar071d4272004-06-13 20:20:40 +00004104do
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004105 # Use a header file that comes with gcc, so configuring glibc
4106 # with a fresh cross-compiler works.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004107 # On the NeXT, cc -E runs the code through the compiler's parser,
4108 # not just through cpp. "Syntax error" is here to catch this case.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004110/* end confdefs.h. */
Illia Bobyra96d5442023-08-30 16:30:15 +02004111#include <limits.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004112 Syntax error
4113_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004114if ac_fn_c_try_cpp "$LINENO"
4115then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004116
Christian Brabandt9670f612025-05-07 21:44:33 +02004117else case e in #(
4118 e) # Broken: fails on valid input.
4119continue ;;
4120esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004121fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01004122rm -f conftest.err conftest.i conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004123
Bram Moolenaar446cb832008-06-24 21:56:24 +00004124 # OK, works on sane cases. Now check whether nonexistent headers
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004125 # can be detected and how.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004127/* end confdefs.h. */
4128#include <ac_nonexistent.h>
4129_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004130if ac_fn_c_try_cpp "$LINENO"
4131then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004132 # Broken: success on invalid input.
4133continue
Christian Brabandt9670f612025-05-07 21:44:33 +02004134else case e in #(
4135 e) # Passes both tests.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004136ac_preproc_ok=:
Christian Brabandt9670f612025-05-07 21:44:33 +02004137break ;;
4138esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004139fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01004140rm -f conftest.err conftest.i conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004141
4142done
Christian Brabandt9670f612025-05-07 21:44:33 +02004143# Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Bram Moolenaar7db77842014-03-27 17:40:59 +01004144rm -f conftest.i conftest.err conftest.$ac_ext
Illia Bobyra96d5442023-08-30 16:30:15 +02004145if $ac_preproc_ok
4146then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004147
Christian Brabandt9670f612025-05-07 21:44:33 +02004148else case e in #(
4149 e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
4150printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +01004151as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Christian Brabandt9670f612025-05-07 21:44:33 +02004152See 'config.log' for more details" "$LINENO" 5; } ;;
4153esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004154fi
4155
4156ac_ext=c
4157ac_cpp='$CPP $CPPFLAGS'
4158ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4159ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4160ac_compiler_gnu=$ac_cv_c_compiler_gnu
Illia Bobyra96d5442023-08-30 16:30:15 +02004161 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4162printf %s "checking for grep that handles long lines and -e... " >&6; }
4163if test ${ac_cv_path_GREP+y}
4164then :
4165 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02004166else case e in #(
4167 e) if test -z "$GREP"; then
Bram Moolenaar446cb832008-06-24 21:56:24 +00004168 ac_path_GREP_found=false
4169 # Loop through the user's path and test for each of PROGNAME-LIST
4170 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4171for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4172do
4173 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02004174 case $as_dir in #(((
4175 '') as_dir=./ ;;
4176 */) ;;
4177 *) as_dir=$as_dir/ ;;
4178 esac
4179 for ac_prog in grep ggrep
4180 do
Bram Moolenaar446cb832008-06-24 21:56:24 +00004181 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02004182 ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
Bram Moolenaar7db77842014-03-27 17:40:59 +01004183 as_fn_executable_p "$ac_path_GREP" || continue
Bram Moolenaar446cb832008-06-24 21:56:24 +00004184# Check for GNU ac_path_GREP and select it if it is found.
4185 # Check for GNU $ac_path_GREP
Christian Brabandt9670f612025-05-07 21:44:33 +02004186case `"$ac_path_GREP" --version 2>&1` in #(
Bram Moolenaar446cb832008-06-24 21:56:24 +00004187*GNU*)
4188 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
Christian Brabandt9670f612025-05-07 21:44:33 +02004189#(
Bram Moolenaar446cb832008-06-24 21:56:24 +00004190*)
4191 ac_count=0
Illia Bobyra96d5442023-08-30 16:30:15 +02004192 printf %s 0123456789 >"conftest.in"
Bram Moolenaar446cb832008-06-24 21:56:24 +00004193 while :
4194 do
4195 cat "conftest.in" "conftest.in" >"conftest.tmp"
4196 mv "conftest.tmp" "conftest.in"
4197 cp "conftest.in" "conftest.nl"
Illia Bobyra96d5442023-08-30 16:30:15 +02004198 printf "%s\n" 'GREP' >> "conftest.nl"
Bram Moolenaar446cb832008-06-24 21:56:24 +00004199 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4200 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004201 as_fn_arith $ac_count + 1 && ac_count=$as_val
Bram Moolenaar446cb832008-06-24 21:56:24 +00004202 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4203 # Best one so far, save it but keep looking for a better one
4204 ac_cv_path_GREP="$ac_path_GREP"
4205 ac_path_GREP_max=$ac_count
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004206 fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00004207 # 10*(2^10) chars as input seems more than enough
4208 test $ac_count -gt 10 && break
4209 done
4210 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4211esac
4212
4213 $ac_path_GREP_found && break 3
4214 done
4215 done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004216 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00004217IFS=$as_save_IFS
4218 if test -z "$ac_cv_path_GREP"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01004219 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 +00004220 fi
4221else
4222 ac_cv_path_GREP=$GREP
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004223fi
Christian Brabandt9670f612025-05-07 21:44:33 +02004224 ;;
4225esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00004226fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004227{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4228printf "%s\n" "$ac_cv_path_GREP" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004229 GREP="$ac_cv_path_GREP"
4230
4231
Illia Bobyra96d5442023-08-30 16:30:15 +02004232{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4233printf %s "checking for egrep... " >&6; }
4234if test ${ac_cv_path_EGREP+y}
4235then :
4236 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02004237else case e in #(
4238 e) if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
Bram Moolenaar446cb832008-06-24 21:56:24 +00004239 then ac_cv_path_EGREP="$GREP -E"
4240 else
4241 if test -z "$EGREP"; then
4242 ac_path_EGREP_found=false
4243 # Loop through the user's path and test for each of PROGNAME-LIST
4244 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4245for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4246do
4247 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02004248 case $as_dir in #(((
4249 '') as_dir=./ ;;
4250 */) ;;
4251 *) as_dir=$as_dir/ ;;
4252 esac
4253 for ac_prog in egrep
4254 do
Bram Moolenaar446cb832008-06-24 21:56:24 +00004255 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02004256 ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
Bram Moolenaar7db77842014-03-27 17:40:59 +01004257 as_fn_executable_p "$ac_path_EGREP" || continue
Bram Moolenaar446cb832008-06-24 21:56:24 +00004258# Check for GNU ac_path_EGREP and select it if it is found.
4259 # Check for GNU $ac_path_EGREP
Christian Brabandt9670f612025-05-07 21:44:33 +02004260case `"$ac_path_EGREP" --version 2>&1` in #(
Bram Moolenaar446cb832008-06-24 21:56:24 +00004261*GNU*)
4262 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
Christian Brabandt9670f612025-05-07 21:44:33 +02004263#(
Bram Moolenaar446cb832008-06-24 21:56:24 +00004264*)
4265 ac_count=0
Illia Bobyra96d5442023-08-30 16:30:15 +02004266 printf %s 0123456789 >"conftest.in"
Bram Moolenaar446cb832008-06-24 21:56:24 +00004267 while :
4268 do
4269 cat "conftest.in" "conftest.in" >"conftest.tmp"
4270 mv "conftest.tmp" "conftest.in"
4271 cp "conftest.in" "conftest.nl"
Illia Bobyra96d5442023-08-30 16:30:15 +02004272 printf "%s\n" 'EGREP' >> "conftest.nl"
Bram Moolenaar446cb832008-06-24 21:56:24 +00004273 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4274 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004275 as_fn_arith $ac_count + 1 && ac_count=$as_val
Bram Moolenaar446cb832008-06-24 21:56:24 +00004276 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4277 # Best one so far, save it but keep looking for a better one
4278 ac_cv_path_EGREP="$ac_path_EGREP"
4279 ac_path_EGREP_max=$ac_count
4280 fi
4281 # 10*(2^10) chars as input seems more than enough
4282 test $ac_count -gt 10 && break
4283 done
4284 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4285esac
4286
4287 $ac_path_EGREP_found && break 3
4288 done
4289 done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004290 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00004291IFS=$as_save_IFS
4292 if test -z "$ac_cv_path_EGREP"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01004293 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 +00004294 fi
4295else
4296 ac_cv_path_EGREP=$EGREP
4297fi
4298
Christian Brabandt9670f612025-05-07 21:44:33 +02004299 fi ;;
4300esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00004301fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004302{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4303printf "%s\n" "$ac_cv_path_EGREP" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004304 EGREP="$ac_cv_path_EGREP"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004305
Christian Brabandt9670f612025-05-07 21:44:33 +02004306 EGREP_TRADITIONAL=$EGREP
4307 ac_cv_path_EGREP_TRADITIONAL=$EGREP
Illia Bobyra96d5442023-08-30 16:30:15 +02004308 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
4309printf %s "checking for fgrep... " >&6; }
4310if test ${ac_cv_path_FGREP+y}
4311then :
4312 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02004313else case e in #(
4314 e) if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
Bram Moolenaar2bcaec32014-03-27 18:51:11 +01004315 then ac_cv_path_FGREP="$GREP -F"
4316 else
4317 if test -z "$FGREP"; then
4318 ac_path_FGREP_found=false
4319 # Loop through the user's path and test for each of PROGNAME-LIST
4320 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4321for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4322do
4323 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02004324 case $as_dir in #(((
4325 '') as_dir=./ ;;
4326 */) ;;
4327 *) as_dir=$as_dir/ ;;
4328 esac
4329 for ac_prog in fgrep
4330 do
Bram Moolenaar2bcaec32014-03-27 18:51:11 +01004331 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02004332 ac_path_FGREP="$as_dir$ac_prog$ac_exec_ext"
Bram Moolenaar2bcaec32014-03-27 18:51:11 +01004333 as_fn_executable_p "$ac_path_FGREP" || continue
4334# Check for GNU ac_path_FGREP and select it if it is found.
4335 # Check for GNU $ac_path_FGREP
Christian Brabandt9670f612025-05-07 21:44:33 +02004336case `"$ac_path_FGREP" --version 2>&1` in #(
Bram Moolenaar2bcaec32014-03-27 18:51:11 +01004337*GNU*)
4338 ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
Christian Brabandt9670f612025-05-07 21:44:33 +02004339#(
Bram Moolenaar2bcaec32014-03-27 18:51:11 +01004340*)
4341 ac_count=0
Illia Bobyra96d5442023-08-30 16:30:15 +02004342 printf %s 0123456789 >"conftest.in"
Bram Moolenaar2bcaec32014-03-27 18:51:11 +01004343 while :
4344 do
4345 cat "conftest.in" "conftest.in" >"conftest.tmp"
4346 mv "conftest.tmp" "conftest.in"
4347 cp "conftest.in" "conftest.nl"
Illia Bobyra96d5442023-08-30 16:30:15 +02004348 printf "%s\n" 'FGREP' >> "conftest.nl"
Bram Moolenaar2bcaec32014-03-27 18:51:11 +01004349 "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
4350 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4351 as_fn_arith $ac_count + 1 && ac_count=$as_val
4352 if test $ac_count -gt ${ac_path_FGREP_max-0}; then
4353 # Best one so far, save it but keep looking for a better one
4354 ac_cv_path_FGREP="$ac_path_FGREP"
4355 ac_path_FGREP_max=$ac_count
4356 fi
4357 # 10*(2^10) chars as input seems more than enough
4358 test $ac_count -gt 10 && break
4359 done
4360 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4361esac
4362
4363 $ac_path_FGREP_found && break 3
4364 done
4365 done
4366 done
4367IFS=$as_save_IFS
4368 if test -z "$ac_cv_path_FGREP"; then
4369 as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4370 fi
4371else
4372 ac_cv_path_FGREP=$FGREP
4373fi
4374
Christian Brabandt9670f612025-05-07 21:44:33 +02004375 fi ;;
4376esac
Bram Moolenaar2bcaec32014-03-27 18:51:11 +01004377fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004378{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
4379printf "%s\n" "$ac_cv_path_FGREP" >&6; }
Bram Moolenaar2bcaec32014-03-27 18:51:11 +01004380 FGREP="$ac_cv_path_FGREP"
4381
Bram Moolenaarc0394412017-04-20 20:20:23 +02004382 for ac_prog in gawk mawk nawk awk
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004383do
4384 # Extract the first word of "$ac_prog", so it can be a program name with args.
Bram Moolenaar071d4272004-06-13 20:20:40 +00004385set dummy $ac_prog; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02004386{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4387printf %s "checking for $ac_word... " >&6; }
4388if test ${ac_cv_prog_AWK+y}
4389then :
4390 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02004391else case e in #(
4392 e) if test -n "$AWK"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00004393 ac_cv_prog_AWK="$AWK" # Let the user override the test.
4394else
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004395as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4396for as_dir in $PATH
4397do
4398 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02004399 case $as_dir in #(((
4400 '') as_dir=./ ;;
4401 */) ;;
4402 *) as_dir=$as_dir/ ;;
4403 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004404 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02004405 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004406 ac_cv_prog_AWK="$ac_prog"
Illia Bobyra96d5442023-08-30 16:30:15 +02004407 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004408 break 2
4409 fi
4410done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004411 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00004412IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004413
Christian Brabandt9670f612025-05-07 21:44:33 +02004414fi ;;
4415esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00004416fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004417AWK=$ac_cv_prog_AWK
Bram Moolenaar071d4272004-06-13 20:20:40 +00004418if test -n "$AWK"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004419 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4420printf "%s\n" "$AWK" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00004421else
Illia Bobyra96d5442023-08-30 16:30:15 +02004422 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4423printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00004424fi
4425
Bram Moolenaar446cb832008-06-24 21:56:24 +00004426
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004427 test -n "$AWK" && break
Bram Moolenaar071d4272004-06-13 20:20:40 +00004428done
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004429
Bram Moolenaar071d4272004-06-13 20:20:40 +00004430# Extract the first word of "strip", so it can be a program name with args.
4431set dummy strip; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02004432{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4433printf %s "checking for $ac_word... " >&6; }
4434if test ${ac_cv_prog_STRIP+y}
4435then :
4436 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02004437else case e in #(
4438 e) if test -n "$STRIP"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00004439 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4440else
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004441as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4442for as_dir in $PATH
4443do
4444 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02004445 case $as_dir in #(((
4446 '') as_dir=./ ;;
4447 */) ;;
4448 *) as_dir=$as_dir/ ;;
4449 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004450 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02004451 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004452 ac_cv_prog_STRIP="strip"
Illia Bobyra96d5442023-08-30 16:30:15 +02004453 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004454 break 2
4455 fi
4456done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004457 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00004458IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004459
Bram Moolenaar071d4272004-06-13 20:20:40 +00004460 test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
Christian Brabandt9670f612025-05-07 21:44:33 +02004461fi ;;
4462esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00004463fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004464STRIP=$ac_cv_prog_STRIP
Bram Moolenaar071d4272004-06-13 20:20:40 +00004465if test -n "$STRIP"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004466 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4467printf "%s\n" "$STRIP" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00004468else
Illia Bobyra96d5442023-08-30 16:30:15 +02004469 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4470printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00004471fi
4472
4473
Bram Moolenaar071d4272004-06-13 20:20:40 +00004474
4475
Bram Moolenaar071d4272004-06-13 20:20:40 +00004476
Illia Bobyrf39842f2023-08-27 18:21:23 +02004477
Illia Bobyra96d5442023-08-30 16:30:15 +02004478{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
4479printf %s "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
4480if test ${ac_cv_header_sys_wait_h+y}
4481then :
4482 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02004483else case e in #(
4484 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +00004485/* end confdefs.h. */
4486#include <sys/types.h>
4487#include <sys/wait.h>
4488#ifndef WEXITSTATUS
4489# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
4490#endif
4491#ifndef WIFEXITED
4492# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4493#endif
4494
4495int
Illia Bobyra96d5442023-08-30 16:30:15 +02004496main (void)
Bram Moolenaar446cb832008-06-24 21:56:24 +00004497{
4498 int s;
4499 wait (&s);
4500 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4501 ;
4502 return 0;
4503}
4504_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004505if ac_fn_c_try_compile "$LINENO"
4506then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00004507 ac_cv_header_sys_wait_h=yes
Christian Brabandt9670f612025-05-07 21:44:33 +02004508else case e in #(
4509 e) ac_cv_header_sys_wait_h=no ;;
4510esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00004511fi
Christian Brabandt9670f612025-05-07 21:44:33 +02004512rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
4513esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00004514fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004515{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
4516printf "%s\n" "$ac_cv_header_sys_wait_h" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004517if test $ac_cv_header_sys_wait_h = yes; then
4518
Illia Bobyra96d5442023-08-30 16:30:15 +02004519printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +00004520
4521fi
4522
4523
Bram Moolenaar22640082018-04-19 20:39:41 +02004524if test x"$ac_cv_prog_cc_c99" != xno; then
4525
4526
Illia Bobyra96d5442023-08-30 16:30:15 +02004527 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
4528printf %s "checking for unsigned long long int... " >&6; }
4529if test ${ac_cv_type_unsigned_long_long_int+y}
4530then :
4531 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02004532else case e in #(
4533 e) ac_cv_type_unsigned_long_long_int=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02004534 case $ac_prog_cc_stdc in
4535 no | c89) ;;
4536 *)
4537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar561f8a52018-04-17 22:02:45 +02004538/* end confdefs.h. */
Bram Moolenaar22640082018-04-19 20:39:41 +02004539
4540 /* For now, do not test the preprocessor; as of 2007 there are too many
4541 implementations with broken preprocessors. Perhaps this can
4542 be revisited in 2012. In the meantime, code should not expect
4543 #if to work with literals wider than 32 bits. */
4544 /* Test literals. */
4545 long long int ll = 9223372036854775807ll;
4546 long long int nll = -9223372036854775807LL;
4547 unsigned long long int ull = 18446744073709551615ULL;
4548 /* Test constant expressions. */
4549 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
4550 ? 1 : -1)];
4551 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
4552 ? 1 : -1)];
4553 int i = 63;
4554int
Illia Bobyra96d5442023-08-30 16:30:15 +02004555main (void)
Bram Moolenaar22640082018-04-19 20:39:41 +02004556{
4557/* Test availability of runtime routines for shift and division. */
4558 long long int llmax = 9223372036854775807ll;
4559 unsigned long long int ullmax = 18446744073709551615ull;
4560 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
4561 | (llmax / ll) | (llmax % ll)
4562 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
4563 | (ullmax / ull) | (ullmax % ull));
4564 ;
4565 return 0;
4566}
4567
4568_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004569if ac_fn_c_try_link "$LINENO"
4570then :
Bram Moolenaar22640082018-04-19 20:39:41 +02004571
Christian Brabandt9670f612025-05-07 21:44:33 +02004572else case e in #(
4573 e) ac_cv_type_unsigned_long_long_int=no ;;
4574esac
Bram Moolenaar22640082018-04-19 20:39:41 +02004575fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004576rm -f core conftest.err conftest.$ac_objext conftest.beam \
4577 conftest$ac_exeext conftest.$ac_ext;;
Christian Brabandt9670f612025-05-07 21:44:33 +02004578 esac ;;
4579esac
Bram Moolenaar22640082018-04-19 20:39:41 +02004580fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004581{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
4582printf "%s\n" "$ac_cv_type_unsigned_long_long_int" >&6; }
Bram Moolenaar22640082018-04-19 20:39:41 +02004583 if test $ac_cv_type_unsigned_long_long_int = yes; then
4584
Illia Bobyra96d5442023-08-30 16:30:15 +02004585printf "%s\n" "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
Bram Moolenaar22640082018-04-19 20:39:41 +02004586
4587 fi
4588
4589
4590
Illia Bobyra96d5442023-08-30 16:30:15 +02004591 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
4592printf %s "checking for long long int... " >&6; }
4593if test ${ac_cv_type_long_long_int+y}
4594then :
4595 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02004596else case e in #(
4597 e) ac_cv_type_long_long_int=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02004598 case $ac_prog_cc_stdc in
4599 no | c89) ;;
4600 *)
4601 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
4602 if test $ac_cv_type_long_long_int = yes; then
4603 if test "$cross_compiling" = yes
4604then :
Bram Moolenaar22640082018-04-19 20:39:41 +02004605 :
Christian Brabandt9670f612025-05-07 21:44:33 +02004606else case e in #(
4607 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar22640082018-04-19 20:39:41 +02004608/* end confdefs.h. */
4609#include <limits.h>
Illia Bobyra96d5442023-08-30 16:30:15 +02004610 #ifndef LLONG_MAX
Christian Brabandt9670f612025-05-07 21:44:33 +02004611 # define HALF \\
Illia Bobyra96d5442023-08-30 16:30:15 +02004612 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
4613 # define LLONG_MAX (HALF - 1 + HALF)
4614 #endif
Bram Moolenaar22640082018-04-19 20:39:41 +02004615int
Illia Bobyra96d5442023-08-30 16:30:15 +02004616main (void)
Bram Moolenaar22640082018-04-19 20:39:41 +02004617{
4618long long int n = 1;
Illia Bobyra96d5442023-08-30 16:30:15 +02004619 int i;
4620 for (i = 0; ; i++)
4621 {
4622 long long int m = n << i;
4623 if (m >> i != n)
4624 return 1;
4625 if (LLONG_MAX / 2 < m)
4626 break;
4627 }
4628 return 0;
Bram Moolenaar22640082018-04-19 20:39:41 +02004629 ;
4630 return 0;
4631}
4632_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004633if ac_fn_c_try_run "$LINENO"
4634then :
Bram Moolenaar22640082018-04-19 20:39:41 +02004635
Christian Brabandt9670f612025-05-07 21:44:33 +02004636else case e in #(
4637 e) ac_cv_type_long_long_int=no ;;
4638esac
Bram Moolenaar22640082018-04-19 20:39:41 +02004639fi
4640rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
Christian Brabandt9670f612025-05-07 21:44:33 +02004641 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
4642esac
Bram Moolenaar22640082018-04-19 20:39:41 +02004643fi
4644
Illia Bobyra96d5442023-08-30 16:30:15 +02004645 fi;;
Christian Brabandt9670f612025-05-07 21:44:33 +02004646 esac ;;
4647esac
Bram Moolenaar22640082018-04-19 20:39:41 +02004648fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004649{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
4650printf "%s\n" "$ac_cv_type_long_long_int" >&6; }
Bram Moolenaar22640082018-04-19 20:39:41 +02004651 if test $ac_cv_type_long_long_int = yes; then
4652
Illia Bobyra96d5442023-08-30 16:30:15 +02004653printf "%s\n" "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
Bram Moolenaar22640082018-04-19 20:39:41 +02004654
4655 fi
4656
4657 if test "$ac_cv_type_long_long_int" = no; then
Christian Brabandt9670f612025-05-07 21:44:33 +02004658 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
4659printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
Bram Moolenaar22640082018-04-19 20:39:41 +02004660as_fn_error $? "Compiler does not support long long int
Christian Brabandt9670f612025-05-07 21:44:33 +02004661See 'config.log' for more details" "$LINENO" 5; }
Bram Moolenaar22640082018-04-19 20:39:41 +02004662 fi
4663
Illia Bobyra96d5442023-08-30 16:30:15 +02004664 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the compiler supports trailing commas" >&5
4665printf %s "checking if the compiler supports trailing commas... " >&6; }
Bram Moolenaar22640082018-04-19 20:39:41 +02004666 trailing_commas=no
4667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4668/* end confdefs.h. */
4669
Bram Moolenaar561f8a52018-04-17 22:02:45 +02004670int
Illia Bobyra96d5442023-08-30 16:30:15 +02004671main (void)
Bram Moolenaar561f8a52018-04-17 22:02:45 +02004672{
4673
Bram Moolenaar22640082018-04-19 20:39:41 +02004674 enum {
4675 one,
4676 };
Bram Moolenaar561f8a52018-04-17 22:02:45 +02004677 ;
4678 return 0;
4679}
4680_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004681if ac_fn_c_try_compile "$LINENO"
4682then :
4683 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4684printf "%s\n" "yes" >&6; }; trailing_commas=yes
Christian Brabandt9670f612025-05-07 21:44:33 +02004685else case e in #(
4686 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4687printf "%s\n" "no" >&6; } ;;
4688esac
Bram Moolenaar561f8a52018-04-17 22:02:45 +02004689fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004690rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar22640082018-04-19 20:39:41 +02004691 if test "$trailing_commas" = no; then
Christian Brabandt9670f612025-05-07 21:44:33 +02004692 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
4693printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
Bram Moolenaar22640082018-04-19 20:39:41 +02004694as_fn_error $? "Compiler does not support trailing comma in enum
Christian Brabandt9670f612025-05-07 21:44:33 +02004695See 'config.log' for more details" "$LINENO" 5; }
Bram Moolenaar22640082018-04-19 20:39:41 +02004696 fi
4697
Illia Bobyra96d5442023-08-30 16:30:15 +02004698 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the compiler supports C++ comments" >&5
4699printf %s "checking if the compiler supports C++ comments... " >&6; }
Bram Moolenaar22640082018-04-19 20:39:41 +02004700 slash_comments=no
4701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4702/* end confdefs.h. */
4703
4704int
Illia Bobyra96d5442023-08-30 16:30:15 +02004705main (void)
Bram Moolenaar22640082018-04-19 20:39:41 +02004706{
4707// C++ comments?
4708 ;
4709 return 0;
4710}
4711_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004712if ac_fn_c_try_compile "$LINENO"
4713then :
4714 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4715printf "%s\n" "yes" >&6; }; slash_comments=yes
Christian Brabandt9670f612025-05-07 21:44:33 +02004716else case e in #(
4717 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4718printf "%s\n" "no" >&6; } ;;
4719esac
Bram Moolenaar22640082018-04-19 20:39:41 +02004720fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004721rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar22640082018-04-19 20:39:41 +02004722 if test "$slash_comments" = no; then
Christian Brabandt9670f612025-05-07 21:44:33 +02004723 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
4724printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
Bram Moolenaar22640082018-04-19 20:39:41 +02004725as_fn_error $? "Compiler does not support C++ comments
Christian Brabandt9670f612025-05-07 21:44:33 +02004726See 'config.log' for more details" "$LINENO" 5; }
Bram Moolenaar22640082018-04-19 20:39:41 +02004727 fi
4728fi
Bram Moolenaar561f8a52018-04-17 22:02:45 +02004729
Bram Moolenaar8f1dde52020-06-05 23:16:29 +02004730if test -n "$SOURCE_DATE_EPOCH"; then
4731 DATE_FMT="%b %d %Y %H:%M:%S"
4732 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 +02004733 printf "%s\n" "#define BUILD_DATE \"$BUILD_DATE\"" >>confdefs.h
Bram Moolenaar8f1dde52020-06-05 23:16:29 +02004734
4735 BUILD_DATE_MSG=-"echo -e '=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\nNOTE: build date/time is fixed: $BUILD_DATE\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-='"
4736
4737fi
4738
Bram Moolenaarf788a062011-12-14 20:51:25 +01004739
Illia Bobyra96d5442023-08-30 16:30:15 +02004740{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-fail-if-missing argument" >&5
4741printf %s "checking --enable-fail-if-missing argument... " >&6; }
Bram Moolenaarf788a062011-12-14 20:51:25 +01004742# Check whether --enable-fail_if_missing was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02004743if test ${enable_fail_if_missing+y}
4744then :
Bram Moolenaarf788a062011-12-14 20:51:25 +01004745 enableval=$enable_fail_if_missing; fail_if_missing="yes"
Christian Brabandt9670f612025-05-07 21:44:33 +02004746else case e in #(
4747 e) fail_if_missing="no" ;;
4748esac
Bram Moolenaarf788a062011-12-14 20:51:25 +01004749fi
4750
Illia Bobyra96d5442023-08-30 16:30:15 +02004751{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $fail_if_missing" >&5
4752printf "%s\n" "$fail_if_missing" >&6; }
Bram Moolenaarf788a062011-12-14 20:51:25 +01004753
Bram Moolenaard2a05492018-07-27 22:35:15 +02004754with_x_arg="$with_x"
4755
Bram Moolenaar446cb832008-06-24 21:56:24 +00004756if test -z "$CFLAGS"; then
4757 CFLAGS="-O"
Bram Moolenaar4d8479b2021-01-31 14:36:06 +01004758 test "$GCC" = yes && CFLAGS="-O2 -fno-strength-reduce -Wall -Wno-deprecated-declarations"
Bram Moolenaar446cb832008-06-24 21:56:24 +00004759fi
Rose00d07e72023-05-06 18:07:14 +01004760
Bram Moolenaar446cb832008-06-24 21:56:24 +00004761if test "$GCC" = yes; then
Bram Moolenaarc8836f72014-04-12 13:12:24 +02004762 gccversion=`$CC -dumpversion`
Bram Moolenaar446cb832008-06-24 21:56:24 +00004763 if test "x$gccversion" = "x"; then
Bram Moolenaarc8836f72014-04-12 13:12:24 +02004764 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 +00004765 fi
Rose00d07e72023-05-06 18:07:14 +01004766
4767 if test "$gccversion" = "3.0.1" -o "$gccversion" = "3.0.2" -o "$gccversion" = "4.0.1"; then
Bram Moolenaar446cb832008-06-24 21:56:24 +00004768 echo 'GCC [34].0.[12] has a bug in the optimizer, disabling "-O#"'
4769 CFLAGS=`echo "$CFLAGS" | sed 's/-O[23456789]/-O/'`
4770 else
4771 if test "$gccversion" = "3.1" -o "$gccversion" = "3.2" -o "$gccversion" = "3.2.1" && `echo "$CFLAGS" | grep -v fno-strength-reduce >/dev/null`; then
4772 echo 'GCC 3.1 and 3.2 have a bug in the optimizer, adding "-fno-strength-reduce"'
4773 CFLAGS="$CFLAGS -fno-strength-reduce"
4774 fi
4775 fi
4776fi
4777
Illia Bobyra96d5442023-08-30 16:30:15 +02004778{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clang version" >&5
4779printf %s "checking for clang version... " >&6; }
Bram Moolenaar5f69fee2017-03-09 11:58:40 +01004780CLANG_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 +02004781if test x"$CLANG_VERSION_STRING" != x"" ; then
4782 CLANG_MAJOR=`echo "$CLANG_VERSION_STRING" | sed -n -e 's/\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*/\1/p'`
4783 CLANG_MINOR=`echo "$CLANG_VERSION_STRING" | sed -n -e 's/[0-9][0-9]*\.\([0-9][0-9]*\)\.[0-9][0-9]*/\1/p'`
4784 CLANG_REVISION=`echo "$CLANG_VERSION_STRING" | sed -n -e 's/[0-9][0-9]*\.[0-9][0-9]*\.\([0-9][0-9]*\)/\1/p'`
4785 CLANG_VERSION=`expr $CLANG_MAJOR '*' 1000000 '+' $CLANG_MINOR '*' 1000 '+' $CLANG_REVISION`
Illia Bobyra96d5442023-08-30 16:30:15 +02004786 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CLANG_VERSION" >&5
4787printf "%s\n" "$CLANG_VERSION" >&6; }
4788 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if clang supports -fno-strength-reduce" >&5
4789printf %s "checking if clang supports -fno-strength-reduce... " >&6; }
Bram Moolenaarebd211c2021-01-30 19:33:36 +01004790 if test "$CLANG_MAJOR" -ge 10 -o "$CLANG_VERSION" -ge 500002075 ; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004791 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4792printf "%s\n" "no" >&6; }
Bram Moolenaar5f69fee2017-03-09 11:58:40 +01004793 CFLAGS=`echo "$CFLAGS" | sed -e 's/-fno-strength-reduce/ /'`
4794 else
Illia Bobyra96d5442023-08-30 16:30:15 +02004795 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4796printf "%s\n" "yes" >&6; }
Bram Moolenaar0c6ccfd2013-10-02 18:23:07 +02004797 fi
4798else
Illia Bobyra96d5442023-08-30 16:30:15 +02004799 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: N/A" >&5
4800printf "%s\n" "N/A" >&6; }
Bram Moolenaar0c6ccfd2013-10-02 18:23:07 +02004801fi
4802
Bram Moolenaar839e9542016-04-14 16:46:02 +02004803CROSS_COMPILING=
Bram Moolenaar446cb832008-06-24 21:56:24 +00004804if test "$cross_compiling" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004805 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot compile a simple program; if not cross compiling check CC and CFLAGS" >&5
4806printf "%s\n" "cannot compile a simple program; if not cross compiling check CC and CFLAGS" >&6; }
Bram Moolenaar839e9542016-04-14 16:46:02 +02004807 CROSS_COMPILING=1
Bram Moolenaar446cb832008-06-24 21:56:24 +00004808fi
4809
Bram Moolenaar839e9542016-04-14 16:46:02 +02004810
Bram Moolenaar446cb832008-06-24 21:56:24 +00004811test "$GCC" = yes && CPP_MM=M;
4812
4813if test -f ./toolcheck; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004814 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for buggy tools" >&5
4815printf %s "checking for buggy tools... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004816 sh ./toolcheck 1>&6
4817fi
4818
4819OS_EXTRA_SRC=""; OS_EXTRA_OBJ=""
4820
Illia Bobyra96d5442023-08-30 16:30:15 +02004821{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking uname" >&5
4822printf %s "checking uname... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004823if test "x$vim_cv_uname_output" = "x" ; then
4824 vim_cv_uname_output=`(uname) 2>/dev/null`
Illia Bobyra96d5442023-08-30 16:30:15 +02004825 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_uname_output" >&5
4826printf "%s\n" "$vim_cv_uname_output" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004827else
Illia Bobyra96d5442023-08-30 16:30:15 +02004828 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_uname_output (cached)" >&5
4829printf "%s\n" "$vim_cv_uname_output (cached)" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004830fi
4831
Illia Bobyra96d5442023-08-30 16:30:15 +02004832{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking uname -r" >&5
4833printf %s "checking uname -r... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004834if test "x$vim_cv_uname_r_output" = "x" ; then
4835 vim_cv_uname_r_output=`(uname -r) 2>/dev/null`
Illia Bobyra96d5442023-08-30 16:30:15 +02004836 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_uname_r_output" >&5
4837printf "%s\n" "$vim_cv_uname_r_output" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004838else
Illia Bobyra96d5442023-08-30 16:30:15 +02004839 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_uname_r_output (cached)" >&5
4840printf "%s\n" "$vim_cv_uname_r_output (cached)" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004841fi
4842
Illia Bobyra96d5442023-08-30 16:30:15 +02004843{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking uname -m" >&5
4844printf %s "checking uname -m... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004845if test "x$vim_cv_uname_m_output" = "x" ; then
4846 vim_cv_uname_m_output=`(uname -m) 2>/dev/null`
Illia Bobyra96d5442023-08-30 16:30:15 +02004847 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_uname_m_output" >&5
4848printf "%s\n" "$vim_cv_uname_m_output" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004849else
Illia Bobyra96d5442023-08-30 16:30:15 +02004850 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_uname_m_output (cached)" >&5
4851printf "%s\n" "$vim_cv_uname_m_output (cached)" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004852fi
4853
Illia Bobyra96d5442023-08-30 16:30:15 +02004854{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Haiku" >&5
4855printf %s "checking for Haiku... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004856case $vim_cv_uname_output in
Illia Bobyra96d5442023-08-30 16:30:15 +02004857 Haiku) HAIKU=yes; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4858printf "%s\n" "yes" >&6; };;
4859 *) HAIKU=no; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4860printf "%s\n" "no" >&6; };;
Bram Moolenaarb3f74062020-02-26 16:16:53 +01004861esac
4862
Illia Bobyra96d5442023-08-30 16:30:15 +02004863{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for QNX" >&5
4864printf %s "checking for QNX... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004865case $vim_cv_uname_output in
Bram Moolenaar446cb832008-06-24 21:56:24 +00004866 QNX) OS_EXTRA_SRC=os_qnx.c; OS_EXTRA_OBJ=objects/os_qnx.o
4867 test -z "$with_x" && with_x=no
Illia Bobyra96d5442023-08-30 16:30:15 +02004868 QNX=yes; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4869printf "%s\n" "yes" >&6; };;
4870 *) QNX=no; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4871printf "%s\n" "no" >&6; };;
Bram Moolenaar446cb832008-06-24 21:56:24 +00004872esac
4873
Illia Bobyra96d5442023-08-30 16:30:15 +02004874{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Darwin (Mac OS X)" >&5
4875printf %s "checking for Darwin (Mac OS X)... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004876if test "$vim_cv_uname_output" = Darwin; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004877 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4878printf "%s\n" "yes" >&6; }
Bram Moolenaard0573012017-10-28 21:11:06 +02004879 MACOS_X=yes
Bram Moolenaar52ecaaa2018-05-12 21:38:13 +02004880 CPPFLAGS="$CPPFLAGS -DMACOS_X"
Bram Moolenaar446cb832008-06-24 21:56:24 +00004881
Illia Bobyra96d5442023-08-30 16:30:15 +02004882 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-darwin argument" >&5
4883printf %s "checking --disable-darwin argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004884 # Check whether --enable-darwin was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02004885if test ${enable_darwin+y}
4886then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00004887 enableval=$enable_darwin;
Christian Brabandt9670f612025-05-07 21:44:33 +02004888else case e in #(
4889 e) enable_darwin="yes" ;;
4890esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00004891fi
4892
4893 if test "$enable_darwin" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004894 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4895printf "%s\n" "no" >&6; }
4896 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if Darwin files are there" >&5
4897printf %s "checking if Darwin files are there... " >&6; }
Bram Moolenaar164fca32010-07-14 13:58:07 +02004898 if test -f os_macosx.m; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004899 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4900printf "%s\n" "yes" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004901 else
Illia Bobyra96d5442023-08-30 16:30:15 +02004902 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, Darwin support disabled" >&5
4903printf "%s\n" "no, Darwin support disabled" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004904 enable_darwin=no
4905 fi
4906 else
Illia Bobyra96d5442023-08-30 16:30:15 +02004907 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, Darwin support excluded" >&5
4908printf "%s\n" "yes, Darwin support excluded" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004909 fi
4910
Illia Bobyra96d5442023-08-30 16:30:15 +02004911 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-mac-arch argument" >&5
4912printf %s "checking --with-mac-arch argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004913
4914# Check whether --with-mac-arch was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02004915if test ${with_mac_arch+y}
4916then :
4917 withval=$with_mac_arch; MACARCH="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MACARCH" >&5
4918printf "%s\n" "$MACARCH" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +02004919else case e in #(
4920 e) MACARCH="current"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: defaulting to $MACARCH" >&5
4921printf "%s\n" "defaulting to $MACARCH" >&6; } ;;
4922esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00004923fi
4924
4925
Illia Bobyra96d5442023-08-30 16:30:15 +02004926 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-developer-dir argument" >&5
4927printf %s "checking --with-developer-dir argument... " >&6; }
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004928
4929# Check whether --with-developer-dir was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02004930if test ${with_developer_dir+y}
4931then :
4932 withval=$with_developer_dir; DEVELOPER_DIR="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DEVELOPER_DIR" >&5
4933printf "%s\n" "$DEVELOPER_DIR" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +02004934else case e in #(
4935 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not present" >&5
4936printf "%s\n" "not present" >&6; } ;;
4937esac
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004938fi
4939
4940
4941 if test "x$DEVELOPER_DIR" = "x"; then
4942 # Extract the first word of "xcode-select", so it can be a program name with args.
4943set dummy xcode-select; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02004944{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4945printf %s "checking for $ac_word... " >&6; }
4946if test ${ac_cv_path_XCODE_SELECT+y}
4947then :
4948 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02004949else case e in #(
4950 e) case $XCODE_SELECT in
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004951 [\\/]* | ?:[\\/]*)
4952 ac_cv_path_XCODE_SELECT="$XCODE_SELECT" # Let the user override the test with a path.
4953 ;;
4954 *)
4955 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4956for as_dir in $PATH
4957do
4958 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02004959 case $as_dir in #(((
4960 '') as_dir=./ ;;
4961 */) ;;
4962 *) as_dir=$as_dir/ ;;
4963 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004964 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02004965 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4966 ac_cv_path_XCODE_SELECT="$as_dir$ac_word$ac_exec_ext"
4967 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004968 break 2
4969 fi
4970done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004971 done
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004972IFS=$as_save_IFS
4973
4974 ;;
Christian Brabandt9670f612025-05-07 21:44:33 +02004975esac ;;
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004976esac
4977fi
4978XCODE_SELECT=$ac_cv_path_XCODE_SELECT
4979if test -n "$XCODE_SELECT"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004980 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XCODE_SELECT" >&5
4981printf "%s\n" "$XCODE_SELECT" >&6; }
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004982else
Illia Bobyra96d5442023-08-30 16:30:15 +02004983 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4984printf "%s\n" "no" >&6; }
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004985fi
4986
4987
4988 if test "x$XCODE_SELECT" != "x"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004989 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for developer dir using xcode-select" >&5
4990printf %s "checking for developer dir using xcode-select... " >&6; }
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004991 DEVELOPER_DIR=`$XCODE_SELECT -print-path`
Illia Bobyra96d5442023-08-30 16:30:15 +02004992 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DEVELOPER_DIR" >&5
4993printf "%s\n" "$DEVELOPER_DIR" >&6; }
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004994 else
4995 DEVELOPER_DIR=/Developer
4996 fi
4997 fi
4998
Bram Moolenaar446cb832008-06-24 21:56:24 +00004999 if test "x$MACARCH" = "xboth"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005000 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 10.4 universal SDK" >&5
5001printf %s "checking for 10.4 universal SDK... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005002 save_cppflags="$CPPFLAGS"
5003 save_cflags="$CFLAGS"
5004 save_ldflags="$LDFLAGS"
Bram Moolenaar595a7be2010-03-10 16:28:12 +01005005 CFLAGS="$CFLAGS -isysroot $DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02005006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +00005007/* end confdefs.h. */
5008
5009int
Illia Bobyra96d5442023-08-30 16:30:15 +02005010main (void)
Bram Moolenaar446cb832008-06-24 21:56:24 +00005011{
5012
5013 ;
5014 return 0;
5015}
5016_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02005017if ac_fn_c_try_link "$LINENO"
5018then :
5019 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found" >&5
5020printf "%s\n" "found" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +02005021else case e in #(
5022 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +02005023printf "%s\n" "not found" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005024 CFLAGS="$save_cflags"
Illia Bobyra96d5442023-08-30 16:30:15 +02005025 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if Intel architecture is supported" >&5
5026printf %s "checking if Intel architecture is supported... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005027 CPPFLAGS="$CPPFLAGS -arch i386"
5028 LDFLAGS="$save_ldflags -arch i386"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02005029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +00005030/* end confdefs.h. */
5031
5032int
Illia Bobyra96d5442023-08-30 16:30:15 +02005033main (void)
Bram Moolenaar446cb832008-06-24 21:56:24 +00005034{
5035
5036 ;
5037 return 0;
5038}
5039_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02005040if ac_fn_c_try_link "$LINENO"
5041then :
5042 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5043printf "%s\n" "yes" >&6; }; MACARCH="intel"
Christian Brabandt9670f612025-05-07 21:44:33 +02005044else case e in #(
5045 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +02005046printf "%s\n" "no" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005047 MACARCH="ppc"
5048 CPPFLAGS="$save_cppflags -arch ppc"
Christian Brabandt9670f612025-05-07 21:44:33 +02005049 LDFLAGS="$save_ldflags -arch ppc" ;;
5050esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00005051fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005052rm -f core conftest.err conftest.$ac_objext conftest.beam \
Christian Brabandt9670f612025-05-07 21:44:33 +02005053 conftest$ac_exeext conftest.$ac_ext ;;
5054esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00005055fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005056rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02005057 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +00005058 elif test "x$MACARCH" = "xintel"; then
5059 CPPFLAGS="$CPPFLAGS -arch intel"
5060 LDFLAGS="$LDFLAGS -arch intel"
5061 elif test "x$MACARCH" = "xppc"; then
5062 CPPFLAGS="$CPPFLAGS -arch ppc"
5063 LDFLAGS="$LDFLAGS -arch ppc"
5064 fi
5065
5066 if test "$enable_darwin" = "yes"; then
Bram Moolenaard0573012017-10-28 21:11:06 +02005067 MACOS_X_DARWIN=yes
Bram Moolenaar164fca32010-07-14 13:58:07 +02005068 OS_EXTRA_SRC="os_macosx.m os_mac_conv.c";
Bram Moolenaar446cb832008-06-24 21:56:24 +00005069 OS_EXTRA_OBJ="objects/os_macosx.o objects/os_mac_conv.o"
Illia Bobyra96d5442023-08-30 16:30:15 +02005070 printf "%s\n" "#define HAVE_TIMER_CREATE 1" >>confdefs.h
Bram Moolenaare5303952022-06-19 17:05:47 +01005071
Bram Moolenaard0573012017-10-28 21:11:06 +02005072 CPPFLAGS="$CPPFLAGS -DMACOS_X_DARWIN"
Bram Moolenaar040f9752020-08-11 23:08:48 +02005073
Bram Moolenaar0b40d082022-03-08 13:32:37 +00005074 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 +02005075 with_x=no
5076 fi
Bram Moolenaar097148e2020-08-11 21:58:20 +02005077 fi
Bram Moolenaar097148e2020-08-11 21:58:20 +02005078else
Illia Bobyra96d5442023-08-30 16:30:15 +02005079 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5080printf "%s\n" "no" >&6; }
Bram Moolenaar097148e2020-08-11 21:58:20 +02005081fi
5082
Illia Bobyra96d5442023-08-30 16:30:15 +02005083ac_header= ac_cache=
5084for ac_item in $ac_header_c_list
5085do
5086 if test $ac_cache; then
5087 ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
5088 if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
5089 printf "%s\n" "#define $ac_item 1" >> confdefs.h
5090 fi
5091 ac_header= ac_cache=
5092 elif test $ac_header; then
5093 ac_cache=$ac_item
5094 else
5095 ac_header=$ac_item
5096 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005097done
5098
5099
Illia Bobyra96d5442023-08-30 16:30:15 +02005100
5101
5102
5103
5104
5105
5106if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
5107then :
5108
5109printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
Bram Moolenaar18e54692013-11-03 20:26:31 +01005110
Bram Moolenaar39766a72013-11-03 00:41:00 +01005111fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005112ac_fn_c_check_header_compile "$LINENO" "AvailabilityMacros.h" "ac_cv_header_AvailabilityMacros_h" "$ac_includes_default"
5113if test "x$ac_cv_header_AvailabilityMacros_h" = xyes
5114then :
5115 printf "%s\n" "#define HAVE_AVAILABILITYMACROS_H 1" >>confdefs.h
Bram Moolenaar39766a72013-11-03 00:41:00 +01005116
Illia Bobyra96d5442023-08-30 16:30:15 +02005117fi
Bram Moolenaar39766a72013-11-03 00:41:00 +01005118
Evan Miller25448072022-12-30 10:42:23 +00005119# 10.5 and earlier lack dispatch
Illia Bobyra96d5442023-08-30 16:30:15 +02005120ac_fn_c_check_header_compile "$LINENO" "dispatch/dispatch.h" "ac_cv_header_dispatch_dispatch_h" "$ac_includes_default"
5121if test "x$ac_cv_header_dispatch_dispatch_h" = xyes
5122then :
5123 printf "%s\n" "#define HAVE_DISPATCH_DISPATCH_H 1" >>confdefs.h
Evan Miller25448072022-12-30 10:42:23 +00005124
5125fi
5126
Bram Moolenaar39766a72013-11-03 00:41:00 +01005127
Bram Moolenaar071d4272004-06-13 20:20:40 +00005128
5129
5130
Bram Moolenaar446cb832008-06-24 21:56:24 +00005131if test "$cross_compiling" = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005132 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-local-dir argument" >&5
5133printf %s "checking --with-local-dir argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005134 have_local_include=''
5135 have_local_lib=''
Bram Moolenaarc236c162008-07-13 17:41:49 +00005136
5137# Check whether --with-local-dir was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005138if test ${with_local_dir+y}
5139then :
Bram Moolenaarc236c162008-07-13 17:41:49 +00005140 withval=$with_local_dir;
5141 local_dir="$withval"
5142 case "$withval" in
5143 */*) ;;
5144 no)
5145 # avoid adding local dir to LDFLAGS and CPPFLAGS
Bram Moolenaare06c1882010-07-21 22:05:20 +02005146 have_local_include=yes
Bram Moolenaarc236c162008-07-13 17:41:49 +00005147 have_local_lib=yes
5148 ;;
Bram Moolenaar7db77842014-03-27 17:40:59 +01005149 *) as_fn_error $? "must pass path argument to --with-local-dir" "$LINENO" 5 ;;
Bram Moolenaarc236c162008-07-13 17:41:49 +00005150 esac
Illia Bobyra96d5442023-08-30 16:30:15 +02005151 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $local_dir" >&5
5152printf "%s\n" "$local_dir" >&6; }
Bram Moolenaarc236c162008-07-13 17:41:49 +00005153
Christian Brabandt9670f612025-05-07 21:44:33 +02005154else case e in #(
5155 e)
Bram Moolenaarc236c162008-07-13 17:41:49 +00005156 local_dir=/usr/local
Illia Bobyra96d5442023-08-30 16:30:15 +02005157 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to $local_dir" >&5
5158printf "%s\n" "Defaulting to $local_dir" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +02005159 ;;
5160esac
Bram Moolenaarc236c162008-07-13 17:41:49 +00005161fi
5162
5163 if test "$GCC" = yes -a "$local_dir" != no; then
Bram Moolenaar446cb832008-06-24 21:56:24 +00005164 echo 'void f(){}' > conftest.c
Bram Moolenaar0958e0f2013-11-04 04:57:50 +01005165 have_local_include=`${CC-cc} -c -v conftest.c 2>&1 | grep "${local_dir}/include"`
Bram Moolenaarc236c162008-07-13 17:41:49 +00005166 have_local_lib=`${CC-cc} -c -v conftest.c 2>&1 | grep "${local_dir}/lib"`
Bram Moolenaar446cb832008-06-24 21:56:24 +00005167 rm -f conftest.c conftest.o
Bram Moolenaar071d4272004-06-13 20:20:40 +00005168 fi
Bram Moolenaarc236c162008-07-13 17:41:49 +00005169 if test -z "$have_local_lib" -a -d "${local_dir}/lib"; then
5170 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 +00005171 if test "$tt" = "$LDFLAGS"; then
Bram Moolenaarc236c162008-07-13 17:41:49 +00005172 LDFLAGS="$LDFLAGS -L${local_dir}/lib"
Bram Moolenaar446cb832008-06-24 21:56:24 +00005173 fi
5174 fi
Bram Moolenaarc236c162008-07-13 17:41:49 +00005175 if test -z "$have_local_include" -a -d "${local_dir}/include"; then
5176 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 +00005177 if test "$tt" = "$CPPFLAGS"; then
Bram Moolenaarc236c162008-07-13 17:41:49 +00005178 CPPFLAGS="$CPPFLAGS -I${local_dir}/include"
Bram Moolenaar446cb832008-06-24 21:56:24 +00005179 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005180 fi
5181fi
5182
Illia Bobyra96d5442023-08-30 16:30:15 +02005183{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-vim-name argument" >&5
5184printf %s "checking --with-vim-name argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005185
Bram Moolenaar446cb832008-06-24 21:56:24 +00005186# Check whether --with-vim-name was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005187if test ${with_vim_name+y}
5188then :
5189 withval=$with_vim_name; VIMNAME="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $VIMNAME" >&5
5190printf "%s\n" "$VIMNAME" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +02005191else case e in #(
5192 e) VIMNAME="vim"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to $VIMNAME" >&5
5193printf "%s\n" "Defaulting to $VIMNAME" >&6; } ;;
5194esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00005195fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005196
5197
Illia Bobyra96d5442023-08-30 16:30:15 +02005198{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-ex-name argument" >&5
5199printf %s "checking --with-ex-name argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005200
5201# Check whether --with-ex-name was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005202if test ${with_ex_name+y}
5203then :
5204 withval=$with_ex_name; EXNAME="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $EXNAME" >&5
5205printf "%s\n" "$EXNAME" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +02005206else case e in #(
5207 e) EXNAME="ex"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to ex" >&5
5208printf "%s\n" "Defaulting to ex" >&6; } ;;
5209esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00005210fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005211
5212
Illia Bobyra96d5442023-08-30 16:30:15 +02005213{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-view-name argument" >&5
5214printf %s "checking --with-view-name argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005215
5216# Check whether --with-view-name was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005217if test ${with_view_name+y}
5218then :
5219 withval=$with_view_name; VIEWNAME="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $VIEWNAME" >&5
5220printf "%s\n" "$VIEWNAME" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +02005221else case e in #(
5222 e) VIEWNAME="view"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to view" >&5
5223printf "%s\n" "Defaulting to view" >&6; } ;;
5224esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00005225fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005226
5227
5228
Illia Bobyra96d5442023-08-30 16:30:15 +02005229{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-global-runtime argument" >&5
5230printf %s "checking --with-global-runtime argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005231
5232# Check whether --with-global-runtime was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005233if test ${with_global_runtime+y}
5234then :
5235 withval=$with_global_runtime; RUNTIME_GLOBAL="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
5236printf "%s\n" "$withval" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +02005237else case e in #(
5238 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5239printf "%s\n" "no" >&6; } ;;
5240esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00005241fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005242
5243
Bram Moolenaar9d302ad2018-12-21 11:48:51 +01005244if test "X$RUNTIME_GLOBAL" != "X"; then
5245 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 +02005246 printf "%s\n" "#define RUNTIME_GLOBAL \"$RUNTIME_GLOBAL\"" >>confdefs.h
Bram Moolenaar9d302ad2018-12-21 11:48:51 +01005247
Illia Bobyra96d5442023-08-30 16:30:15 +02005248 printf "%s\n" "#define RUNTIME_GLOBAL_AFTER \"$RUNTIME_GLOBAL_AFTER\"" >>confdefs.h
Bram Moolenaar9d302ad2018-12-21 11:48:51 +01005249
5250fi
5251
Illia Bobyra96d5442023-08-30 16:30:15 +02005252{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-modified-by argument" >&5
5253printf %s "checking --with-modified-by argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005254
5255# Check whether --with-modified-by was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005256if test ${with_modified_by+y}
5257then :
5258 withval=$with_modified_by; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
5259printf "%s\n" "$withval" >&6; }; printf "%s\n" "#define MODIFIED_BY \"$withval\"" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00005260
Christian Brabandt9670f612025-05-07 21:44:33 +02005261else case e in #(
5262 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5263printf "%s\n" "no" >&6; } ;;
5264esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00005265fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005266
Bram Moolenaar446cb832008-06-24 21:56:24 +00005267
Illia Bobyra96d5442023-08-30 16:30:15 +02005268{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if character set is EBCDIC" >&5
5269printf %s "checking if character set is EBCDIC... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02005270cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005271/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00005272
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005273int
Illia Bobyra96d5442023-08-30 16:30:15 +02005274main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005275{
Bram Moolenaar071d4272004-06-13 20:20:40 +00005276 /* TryCompile function for CharSet.
5277 Treat any failure as ASCII for compatibility with existing art.
5278 Use compile-time rather than run-time tests for cross-compiler
5279 tolerance. */
5280#if '0'!=240
5281make an error "Character set is not EBCDIC"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005282#endif
5283 ;
5284 return 0;
5285}
5286_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02005287if ac_fn_c_try_compile "$LINENO"
5288then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00005289 # TryCompile action if true
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005290cf_cv_ebcdic=yes
Christian Brabandt9670f612025-05-07 21:44:33 +02005291else case e in #(
5292 e) # TryCompile action if false
5293cf_cv_ebcdic=no ;;
5294esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00005295fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005296rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +00005297# end of TryCompile ])
5298# end of CacheVal CvEbcdic
Illia Bobyra96d5442023-08-30 16:30:15 +02005299{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cf_cv_ebcdic" >&5
5300printf "%s\n" "$cf_cv_ebcdic" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00005301case "$cf_cv_ebcdic" in #(vi
Illia Bobyra96d5442023-08-30 16:30:15 +02005302 yes) printf "%s\n" "#define EBCDIC 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00005303
5304 line_break='"\\n"'
5305 ;;
5306 *) line_break='"\\012"';;
5307esac
5308
5309
5310if test "$cf_cv_ebcdic" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005311{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for z/OS Unix" >&5
5312printf %s "checking for z/OS Unix... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00005313case $vim_cv_uname_output in
Bram Moolenaar2c704a72010-06-03 21:17:25 +02005314 OS/390) zOSUnix="yes";
Bram Moolenaar071d4272004-06-13 20:20:40 +00005315 if test "$CC" = "cc"; then
5316 ccm="$_CC_CCMODE"
5317 ccn="CC"
5318 else
5319 if test "$CC" = "c89"; then
5320 ccm="$_CC_C89MODE"
5321 ccn="C89"
5322 else
5323 ccm=1
5324 fi
5325 fi
5326 if test "$ccm" != "1"; then
5327 echo ""
5328 echo "------------------------------------------"
Bram Moolenaar2c704a72010-06-03 21:17:25 +02005329 echo " On z/OS Unix, the environment variable"
Bram Moolenaar77c19352012-06-13 19:19:41 +02005330 echo " _CC_${ccn}MODE must be set to \"1\"!"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005331 echo " Do:"
5332 echo " export _CC_${ccn}MODE=1"
5333 echo " and then call configure again."
5334 echo "------------------------------------------"
5335 exit 1
5336 fi
Bram Moolenaar77c19352012-06-13 19:19:41 +02005337 # Set CFLAGS for configure process.
5338 # This will be reset later for config.mk.
5339 # Use haltonmsg to force error for missing H files.
5340 CFLAGS="$CFLAGS -D_ALL_SOURCE -Wc,float(ieee),haltonmsg(3296)";
5341 LDFLAGS="$LDFLAGS -Wl,EDIT=NO"
Illia Bobyra96d5442023-08-30 16:30:15 +02005342 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5343printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00005344 ;;
Bram Moolenaar2c704a72010-06-03 21:17:25 +02005345 *) zOSUnix="no";
Illia Bobyra96d5442023-08-30 16:30:15 +02005346 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5347printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00005348 ;;
5349esac
5350fi
5351
Bram Moolenaar2c704a72010-06-03 21:17:25 +02005352if test "$zOSUnix" = "yes"; then
Bram Moolenaarabcbb0e2020-12-23 12:33:42 +01005353 QUOTESED="sed -e 's/[\\\\\"]/\\\\\\\\&/g' -e 's/\\\\\\\\\"/\"/' -e 's/\\\\\\\\\";\$\$/\";/' -e 's/ */ /g'"
Bram Moolenaar2c704a72010-06-03 21:17:25 +02005354else
Bram Moolenaarabcbb0e2020-12-23 12:33:42 +01005355 QUOTESED="sed -e 's/[\\\\\"]/\\\\&/g' -e 's/\\\\\"/\"/' -e 's/\\\\\";\$\$/\";/' -e 's/ */ /g'"
Bram Moolenaar2c704a72010-06-03 21:17:25 +02005356fi
5357
5358
5359
Illia Bobyra96d5442023-08-30 16:30:15 +02005360{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-smack argument" >&5
5361printf %s "checking --disable-smack argument... " >&6; }
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005362# Check whether --enable-smack was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005363if test ${enable_smack+y}
5364then :
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005365 enableval=$enable_smack;
Christian Brabandt9670f612025-05-07 21:44:33 +02005366else case e in #(
5367 e) enable_smack="yes" ;;
5368esac
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005369fi
5370
5371if test "$enable_smack" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005372 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5373printf "%s\n" "no" >&6; }
5374 ac_fn_c_check_header_compile "$LINENO" "linux/xattr.h" "ac_cv_header_linux_xattr_h" "$ac_includes_default"
5375if test "x$ac_cv_header_linux_xattr_h" = xyes
5376then :
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005377 true
Christian Brabandt9670f612025-05-07 21:44:33 +02005378else case e in #(
5379 e) enable_smack="no" ;;
5380esac
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005381fi
5382
Bram Moolenaar4ed89cd2014-04-05 12:02:25 +02005383else
Illia Bobyra96d5442023-08-30 16:30:15 +02005384 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5385printf "%s\n" "yes" >&6; }
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005386fi
5387if test "$enable_smack" = "yes"; then
Illia Bobyr8c358e02023-09-30 22:57:19 +02005388 ac_fn_c_check_header_compile "$LINENO" "sys/xattr.h" "ac_cv_header_sys_xattr_h" "$ac_includes_default"
5389if test "x$ac_cv_header_sys_xattr_h" = xyes
Illia Bobyra96d5442023-08-30 16:30:15 +02005390then :
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005391 true
Christian Brabandt9670f612025-05-07 21:44:33 +02005392else case e in #(
5393 e) enable_smack="no" ;;
5394esac
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005395fi
5396
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005397fi
5398if test "$enable_smack" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005399 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XATTR_NAME_SMACKEXEC in linux/xattr.h" >&5
5400printf %s "checking for XATTR_NAME_SMACKEXEC in linux/xattr.h... " >&6; }
5401
Christian Brabandt9670f612025-05-07 21:44:33 +02005402{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep -e" >&5
5403printf %s "checking for egrep -e... " >&6; }
5404if test ${ac_cv_path_EGREP_TRADITIONAL+y}
5405then :
5406 printf %s "(cached) " >&6
5407else case e in #(
5408 e) if test -z "$EGREP_TRADITIONAL"; then
5409 ac_path_EGREP_TRADITIONAL_found=false
5410 # Loop through the user's path and test for each of PROGNAME-LIST
5411 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5412for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5413do
5414 IFS=$as_save_IFS
5415 case $as_dir in #(((
5416 '') as_dir=./ ;;
5417 */) ;;
5418 *) as_dir=$as_dir/ ;;
5419 esac
5420 for ac_prog in grep ggrep
5421 do
5422 for ac_exec_ext in '' $ac_executable_extensions; do
5423 ac_path_EGREP_TRADITIONAL="$as_dir$ac_prog$ac_exec_ext"
5424 as_fn_executable_p "$ac_path_EGREP_TRADITIONAL" || continue
5425# Check for GNU ac_path_EGREP_TRADITIONAL and select it if it is found.
5426 # Check for GNU $ac_path_EGREP_TRADITIONAL
5427case `"$ac_path_EGREP_TRADITIONAL" --version 2>&1` in #(
5428*GNU*)
5429 ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" ac_path_EGREP_TRADITIONAL_found=:;;
5430#(
5431*)
5432 ac_count=0
5433 printf %s 0123456789 >"conftest.in"
5434 while :
5435 do
5436 cat "conftest.in" "conftest.in" >"conftest.tmp"
5437 mv "conftest.tmp" "conftest.in"
5438 cp "conftest.in" "conftest.nl"
5439 printf "%s\n" 'EGREP_TRADITIONAL' >> "conftest.nl"
5440 "$ac_path_EGREP_TRADITIONAL" -E 'EGR(EP|AC)_TRADITIONAL$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5441 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5442 as_fn_arith $ac_count + 1 && ac_count=$as_val
5443 if test $ac_count -gt ${ac_path_EGREP_TRADITIONAL_max-0}; then
5444 # Best one so far, save it but keep looking for a better one
5445 ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL"
5446 ac_path_EGREP_TRADITIONAL_max=$ac_count
5447 fi
5448 # 10*(2^10) chars as input seems more than enough
5449 test $ac_count -gt 10 && break
5450 done
5451 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5452esac
5453
5454 $ac_path_EGREP_TRADITIONAL_found && break 3
5455 done
5456 done
5457 done
5458IFS=$as_save_IFS
5459 if test -z "$ac_cv_path_EGREP_TRADITIONAL"; then
5460 :
5461 fi
5462else
5463 ac_cv_path_EGREP_TRADITIONAL=$EGREP_TRADITIONAL
5464fi
5465
5466 if test "$ac_cv_path_EGREP_TRADITIONAL"
5467then :
5468 ac_cv_path_EGREP_TRADITIONAL="$ac_cv_path_EGREP_TRADITIONAL -E"
5469else case e in #(
5470 e) if test -z "$EGREP_TRADITIONAL"; then
5471 ac_path_EGREP_TRADITIONAL_found=false
5472 # Loop through the user's path and test for each of PROGNAME-LIST
5473 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5474for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5475do
5476 IFS=$as_save_IFS
5477 case $as_dir in #(((
5478 '') as_dir=./ ;;
5479 */) ;;
5480 *) as_dir=$as_dir/ ;;
5481 esac
5482 for ac_prog in egrep
5483 do
5484 for ac_exec_ext in '' $ac_executable_extensions; do
5485 ac_path_EGREP_TRADITIONAL="$as_dir$ac_prog$ac_exec_ext"
5486 as_fn_executable_p "$ac_path_EGREP_TRADITIONAL" || continue
5487# Check for GNU ac_path_EGREP_TRADITIONAL and select it if it is found.
5488 # Check for GNU $ac_path_EGREP_TRADITIONAL
5489case `"$ac_path_EGREP_TRADITIONAL" --version 2>&1` in #(
5490*GNU*)
5491 ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" ac_path_EGREP_TRADITIONAL_found=:;;
5492#(
5493*)
5494 ac_count=0
5495 printf %s 0123456789 >"conftest.in"
5496 while :
5497 do
5498 cat "conftest.in" "conftest.in" >"conftest.tmp"
5499 mv "conftest.tmp" "conftest.in"
5500 cp "conftest.in" "conftest.nl"
5501 printf "%s\n" 'EGREP_TRADITIONAL' >> "conftest.nl"
5502 "$ac_path_EGREP_TRADITIONAL" 'EGR(EP|AC)_TRADITIONAL$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5503 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5504 as_fn_arith $ac_count + 1 && ac_count=$as_val
5505 if test $ac_count -gt ${ac_path_EGREP_TRADITIONAL_max-0}; then
5506 # Best one so far, save it but keep looking for a better one
5507 ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL"
5508 ac_path_EGREP_TRADITIONAL_max=$ac_count
5509 fi
5510 # 10*(2^10) chars as input seems more than enough
5511 test $ac_count -gt 10 && break
5512 done
5513 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5514esac
5515
5516 $ac_path_EGREP_TRADITIONAL_found && break 3
5517 done
5518 done
5519 done
5520IFS=$as_save_IFS
5521 if test -z "$ac_cv_path_EGREP_TRADITIONAL"; then
5522 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5523 fi
5524else
5525 ac_cv_path_EGREP_TRADITIONAL=$EGREP_TRADITIONAL
5526fi
5527 ;;
5528esac
5529fi ;;
5530esac
5531fi
5532{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP_TRADITIONAL" >&5
5533printf "%s\n" "$ac_cv_path_EGREP_TRADITIONAL" >&6; }
5534 EGREP_TRADITIONAL=$ac_cv_path_EGREP_TRADITIONAL
5535
Illia Bobyra96d5442023-08-30 16:30:15 +02005536cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005537/* end confdefs.h. */
5538#include <linux/xattr.h>
5539_ACEOF
5540if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Christian Brabandt9670f612025-05-07 21:44:33 +02005541 $EGREP_TRADITIONAL "XATTR_NAME_SMACKEXEC" >/dev/null 2>&1
Illia Bobyra96d5442023-08-30 16:30:15 +02005542then :
5543 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5544printf "%s\n" "yes" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +02005545else case e in #(
5546 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5547printf "%s\n" "no" >&6; }; enable_smack="no" ;;
5548esac
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005549fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005550rm -rf conftest*
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005551
5552fi
5553if test "$enable_smack" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005554 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for setxattr in -lattr" >&5
5555printf %s "checking for setxattr in -lattr... " >&6; }
5556if test ${ac_cv_lib_attr_setxattr+y}
5557then :
5558 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02005559else case e in #(
5560 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005561LIBS="-lattr $LIBS"
5562cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5563/* end confdefs.h. */
5564
5565/* Override any GCC internal prototype to avoid an error.
5566 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +02005567 builtin and then its argument prototype would still apply.
5568 The 'extern "C"' is for builds by C++ compilers;
5569 although this is not generally supported in C code supporting it here
5570 has little cost and some practical benefit (sr 110532). */
5571#ifdef __cplusplus
5572extern "C"
5573#endif
5574char setxattr (void);
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005575int
Illia Bobyra96d5442023-08-30 16:30:15 +02005576main (void)
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005577{
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005578return setxattr ();
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005579 ;
5580 return 0;
5581}
5582_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02005583if ac_fn_c_try_link "$LINENO"
5584then :
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005585 ac_cv_lib_attr_setxattr=yes
Christian Brabandt9670f612025-05-07 21:44:33 +02005586else case e in #(
5587 e) ac_cv_lib_attr_setxattr=no ;;
5588esac
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005589fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005590rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005591 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +02005592LIBS=$ac_check_lib_save_LIBS ;;
5593esac
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005594fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005595{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_attr_setxattr" >&5
5596printf "%s\n" "$ac_cv_lib_attr_setxattr" >&6; }
5597if test "x$ac_cv_lib_attr_setxattr" = xyes
5598then :
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005599 LIBS="$LIBS -lattr"
5600 found_smack="yes"
Illia Bobyra96d5442023-08-30 16:30:15 +02005601 printf "%s\n" "#define HAVE_SMACK 1" >>confdefs.h
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005602
5603fi
5604
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005605fi
5606
5607if test "x$found_smack" = "x"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005608 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-selinux argument" >&5
5609printf %s "checking --disable-selinux argument... " >&6; }
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005610 # Check whether --enable-selinux was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005611if test ${enable_selinux+y}
5612then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00005613 enableval=$enable_selinux;
Christian Brabandt9670f612025-05-07 21:44:33 +02005614else case e in #(
5615 e) enable_selinux="yes" ;;
5616esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00005617fi
5618
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005619 if test "$enable_selinux" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005620 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5621printf "%s\n" "no" >&6; }
5622 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for is_selinux_enabled in -lselinux" >&5
5623printf %s "checking for is_selinux_enabled in -lselinux... " >&6; }
5624if test ${ac_cv_lib_selinux_is_selinux_enabled+y}
5625then :
5626 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02005627else case e in #(
5628 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005629LIBS="-lselinux $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02005630cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005631/* end confdefs.h. */
5632
Bram Moolenaar446cb832008-06-24 21:56:24 +00005633/* Override any GCC internal prototype to avoid an error.
5634 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +02005635 builtin and then its argument prototype would still apply.
5636 The 'extern "C"' is for builds by C++ compilers;
5637 although this is not generally supported in C code supporting it here
5638 has little cost and some practical benefit (sr 110532). */
5639#ifdef __cplusplus
5640extern "C"
5641#endif
5642char is_selinux_enabled (void);
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005643int
Illia Bobyra96d5442023-08-30 16:30:15 +02005644main (void)
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005645{
Bram Moolenaar446cb832008-06-24 21:56:24 +00005646return is_selinux_enabled ();
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005647 ;
5648 return 0;
5649}
5650_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02005651if ac_fn_c_try_link "$LINENO"
5652then :
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005653 ac_cv_lib_selinux_is_selinux_enabled=yes
Christian Brabandt9670f612025-05-07 21:44:33 +02005654else case e in #(
5655 e) ac_cv_lib_selinux_is_selinux_enabled=no ;;
5656esac
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005657fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005658rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02005659 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +02005660LIBS=$ac_check_lib_save_LIBS ;;
5661esac
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005662fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005663{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_is_selinux_enabled" >&5
5664printf "%s\n" "$ac_cv_lib_selinux_is_selinux_enabled" >&6; }
5665if test "x$ac_cv_lib_selinux_is_selinux_enabled" = xyes
5666then :
5667 ac_fn_c_check_header_compile "$LINENO" "selinux/selinux.h" "ac_cv_header_selinux_selinux_h" "$ac_includes_default"
5668if test "x$ac_cv_header_selinux_selinux_h" = xyes
5669then :
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005670 LIBS="$LIBS -lselinux"
Illia Bobyra96d5442023-08-30 16:30:15 +02005671 printf "%s\n" "#define HAVE_SELINUX 1" >>confdefs.h
Bram Moolenaare4b78e22017-12-07 22:29:11 +01005672
5673fi
5674
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005675fi
5676
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005677 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005678 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5679printf "%s\n" "yes" >&6; }
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005680 fi
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005681fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005682
Christian Brabandte085dfd2023-09-30 12:49:18 +02005683{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-xattr argument" >&5
5684printf %s "checking --enable-xattr argument... " >&6; }
5685# Check whether --enable-xattr was given.
5686if test ${enable_xattr+y}
5687then :
5688 enableval=$enable_xattr;
Christian Brabandt9670f612025-05-07 21:44:33 +02005689else case e in #(
5690 e) enable_xattr="yes" ;;
5691esac
Christian Brabandte085dfd2023-09-30 12:49:18 +02005692fi
5693
5694if test "$enable_xattr" = "yes"; then
5695 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5696printf "%s\n" "yes" >&6; }
Illia Bobyr8c358e02023-09-30 22:57:19 +02005697 ac_fn_c_check_header_compile "$LINENO" "sys/xattr.h" "ac_cv_header_sys_xattr_h" "$ac_includes_default"
5698if test "x$ac_cv_header_sys_xattr_h" = xyes
Christian Brabandte085dfd2023-09-30 12:49:18 +02005699then :
5700 printf "%s\n" "#define HAVE_XATTR 1" >>confdefs.h
5701
5702fi
5703
5704else
5705 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5706printf "%s\n" "no" >&6; }
5707fi
5708
5709
Illia Bobyra96d5442023-08-30 16:30:15 +02005710{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-features argument" >&5
5711printf %s "checking --with-features argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005712
Bram Moolenaar446cb832008-06-24 21:56:24 +00005713# Check whether --with-features was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005714if test ${with_features+y}
5715then :
5716 withval=$with_features; features="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $features" >&5
5717printf "%s\n" "$features" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +02005718else case e in #(
5719 e) features="huge"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to huge" >&5
5720printf "%s\n" "Defaulting to huge" >&6; } ;;
5721esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00005722fi
5723
Bram Moolenaar071d4272004-06-13 20:20:40 +00005724
Martin Tournoij7904fa42022-10-04 16:28:45 +01005725case "$features" in
Martin Tournoij25f3a142022-10-08 19:26:41 +01005726 small) features="tiny" ;;
5727 big) features="normal" ;;
Martin Tournoij7904fa42022-10-04 16:28:45 +01005728esac
5729
Bram Moolenaar071d4272004-06-13 20:20:40 +00005730dovimdiff=""
5731dogvimdiff=""
5732case "$features" in
Illia Bobyra96d5442023-08-30 16:30:15 +02005733 tiny) printf "%s\n" "#define FEAT_TINY 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00005734 ;;
Illia Bobyra96d5442023-08-30 16:30:15 +02005735 normal) printf "%s\n" "#define FEAT_NORMAL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00005736 dovimdiff="installvimdiff";
5737 dogvimdiff="installgvimdiff" ;;
Illia Bobyra96d5442023-08-30 16:30:15 +02005738 huge) printf "%s\n" "#define FEAT_HUGE 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00005739 dovimdiff="installvimdiff";
5740 dogvimdiff="installgvimdiff" ;;
Illia Bobyra96d5442023-08-30 16:30:15 +02005741 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Sorry, $features is not supported" >&5
5742printf "%s\n" "Sorry, $features is not supported" >&6; } ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00005743esac
5744
5745
5746
5747
Martin Tournoij7904fa42022-10-04 16:28:45 +01005748if test "x$features" = "xtiny"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00005749 has_eval=no
5750else
5751 has_eval=yes
5752fi
5753
Illia Bobyra96d5442023-08-30 16:30:15 +02005754{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-compiledby argument" >&5
5755printf %s "checking --with-compiledby argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005756
Bram Moolenaar446cb832008-06-24 21:56:24 +00005757# Check whether --with-compiledby was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005758if test ${with_compiledby+y}
5759then :
5760 withval=$with_compiledby; compiledby="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
5761printf "%s\n" "$withval" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +02005762else case e in #(
5763 e) compiledby=""; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5764printf "%s\n" "no" >&6; } ;;
5765esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00005766fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005767
5768
Bram Moolenaar446cb832008-06-24 21:56:24 +00005769
Illia Bobyra96d5442023-08-30 16:30:15 +02005770{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-xsmp argument" >&5
5771printf %s "checking --disable-xsmp argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005772# Check whether --enable-xsmp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005773if test ${enable_xsmp+y}
5774then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00005775 enableval=$enable_xsmp;
Christian Brabandt9670f612025-05-07 21:44:33 +02005776else case e in #(
5777 e) enable_xsmp="yes" ;;
5778esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00005779fi
5780
Bram Moolenaar071d4272004-06-13 20:20:40 +00005781
5782if test "$enable_xsmp" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005783 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5784printf "%s\n" "no" >&6; }
5785 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-xsmp-interact argument" >&5
5786printf %s "checking --disable-xsmp-interact argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005787 # Check whether --enable-xsmp-interact was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005788if test ${enable_xsmp_interact+y}
5789then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00005790 enableval=$enable_xsmp_interact;
Christian Brabandt9670f612025-05-07 21:44:33 +02005791else case e in #(
5792 e) enable_xsmp_interact="yes" ;;
5793esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00005794fi
5795
Bram Moolenaar071d4272004-06-13 20:20:40 +00005796 if test "$enable_xsmp_interact" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005797 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5798printf "%s\n" "no" >&6; }
5799 printf "%s\n" "#define USE_XSMP_INTERACT 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00005800
5801 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005802 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5803printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00005804 fi
5805else
Illia Bobyra96d5442023-08-30 16:30:15 +02005806 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5807printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00005808fi
5809
Illia Bobyra96d5442023-08-30 16:30:15 +02005810{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking diff feature" >&5
5811printf %s "checking diff feature... " >&6; }
Martin Tournoij7904fa42022-10-04 16:28:45 +01005812if test "x$features" = "xtiny"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005813 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: disabled in $features version" >&5
5814printf "%s\n" "disabled in $features version" >&6; }
Bram Moolenaar67ffb412022-01-08 13:36:57 +00005815else
Illia Bobyra96d5442023-08-30 16:30:15 +02005816 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: enabled" >&5
5817printf "%s\n" "enabled" >&6; }
5818 printf "%s\n" "#define FEAT_DIFF 1" >>confdefs.h
Bram Moolenaar67ffb412022-01-08 13:36:57 +00005819
5820 XDIFF_OBJS_USED="\$(XDIFF_OBJS)"
5821
5822fi
5823
Illia Bobyra96d5442023-08-30 16:30:15 +02005824{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-luainterp argument" >&5
5825printf %s "checking --enable-luainterp argument... " >&6; }
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005826# Check whether --enable-luainterp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005827if test ${enable_luainterp+y}
5828then :
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005829 enableval=$enable_luainterp;
Christian Brabandt9670f612025-05-07 21:44:33 +02005830else case e in #(
5831 e) enable_luainterp="no" ;;
5832esac
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005833fi
5834
Illia Bobyra96d5442023-08-30 16:30:15 +02005835{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_luainterp" >&5
5836printf "%s\n" "$enable_luainterp" >&6; }
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005837
Bram Moolenaar2334b6d2010-07-22 21:32:16 +02005838if test "$enable_luainterp" = "yes" -o "$enable_luainterp" = "dynamic"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00005839 if test "$has_eval" = "no"; then
Martin Tournoij7904fa42022-10-04 16:28:45 +01005840 as_fn_error $? "cannot use Lua with tiny features" "$LINENO" 5
Bram Moolenaar3c124e32016-01-31 14:36:58 +01005841 fi
5842
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005843
5844
Illia Bobyra96d5442023-08-30 16:30:15 +02005845 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-lua-prefix argument" >&5
5846printf %s "checking --with-lua-prefix argument... " >&6; }
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005847
5848# Check whether --with-lua_prefix was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005849if test ${with_lua_prefix+y}
5850then :
5851 withval=$with_lua_prefix; with_lua_prefix="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_lua_prefix" >&5
5852printf "%s\n" "$with_lua_prefix" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +02005853else case e in #(
5854 e) with_lua_prefix="";{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5855printf "%s\n" "no" >&6; } ;;
5856esac
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005857fi
5858
5859
5860 if test "X$with_lua_prefix" != "X"; then
5861 vi_cv_path_lua_pfx="$with_lua_prefix"
5862 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005863 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking LUA_PREFIX environment var" >&5
5864printf %s "checking LUA_PREFIX environment var... " >&6; }
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005865 if test "X$LUA_PREFIX" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005866 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: \"$LUA_PREFIX\"" >&5
5867printf "%s\n" "\"$LUA_PREFIX\"" >&6; }
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005868 vi_cv_path_lua_pfx="$LUA_PREFIX"
5869 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005870 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not set, default to /usr" >&5
5871printf "%s\n" "not set, default to /usr" >&6; }
Bram Moolenaar0d2e4fc2010-07-18 12:35:47 +02005872 vi_cv_path_lua_pfx="/usr"
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005873 fi
5874 fi
5875
Illia Bobyra96d5442023-08-30 16:30:15 +02005876 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-luajit" >&5
5877printf %s "checking --with-luajit... " >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005878
5879# Check whether --with-luajit was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005880if test ${with_luajit+y}
5881then :
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005882 withval=$with_luajit; vi_cv_with_luajit="$withval"
Christian Brabandt9670f612025-05-07 21:44:33 +02005883else case e in #(
5884 e) vi_cv_with_luajit="no" ;;
5885esac
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005886fi
5887
Illia Bobyra96d5442023-08-30 16:30:15 +02005888 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_with_luajit" >&5
5889printf "%s\n" "$vi_cv_with_luajit" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005890
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005891 LUA_INC=
5892 if test "X$vi_cv_path_lua_pfx" != "X"; then
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005893 if test "x$vi_cv_with_luajit" != "xno"; then
5894 # Extract the first word of "luajit", so it can be a program name with args.
5895set dummy luajit; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02005896{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5897printf %s "checking for $ac_word... " >&6; }
5898if test ${ac_cv_path_vi_cv_path_luajit+y}
5899then :
5900 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02005901else case e in #(
5902 e) case $vi_cv_path_luajit in
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005903 [\\/]* | ?:[\\/]*)
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005904 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 +02005905 ;;
5906 *)
5907 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5908for as_dir in $PATH
5909do
5910 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02005911 case $as_dir in #(((
5912 '') as_dir=./ ;;
5913 */) ;;
5914 *) as_dir=$as_dir/ ;;
5915 esac
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005916 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02005917 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5918 ac_cv_path_vi_cv_path_luajit="$as_dir$ac_word$ac_exec_ext"
5919 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005920 break 2
5921 fi
5922done
5923 done
5924IFS=$as_save_IFS
5925
5926 ;;
Christian Brabandt9670f612025-05-07 21:44:33 +02005927esac ;;
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005928esac
5929fi
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005930vi_cv_path_luajit=$ac_cv_path_vi_cv_path_luajit
5931if test -n "$vi_cv_path_luajit"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005932 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_luajit" >&5
5933printf "%s\n" "$vi_cv_path_luajit" >&6; }
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005934else
Illia Bobyra96d5442023-08-30 16:30:15 +02005935 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5936printf "%s\n" "no" >&6; }
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005937fi
5938
5939
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005940 if test "X$vi_cv_path_luajit" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005941 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking LuaJIT version" >&5
5942printf %s "checking LuaJIT version... " >&6; }
5943if test ${vi_cv_version_luajit+y}
5944then :
5945 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02005946else case e in #(
5947 e) vi_cv_version_luajit=`${vi_cv_path_luajit} -v 2>&1 | sed 's/LuaJIT \([0-9.]*\)\.[0-9]\(-*[a-z0-9]*\)* .*/\1/'` ;;
5948esac
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005949fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005950{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_version_luajit" >&5
5951printf "%s\n" "$vi_cv_version_luajit" >&6; }
5952 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Lua version of LuaJIT" >&5
5953printf %s "checking Lua version of LuaJIT... " >&6; }
5954if test ${vi_cv_version_lua_luajit+y}
5955then :
5956 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02005957else case e in #(
5958 e) vi_cv_version_lua_luajit=`${vi_cv_path_luajit} -e "print(_VERSION)" | sed 's/.* //'` ;;
5959esac
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005960fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005961{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_version_lua_luajit" >&5
5962printf "%s\n" "$vi_cv_version_lua_luajit" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005963 vi_cv_path_lua="$vi_cv_path_luajit"
5964 vi_cv_version_lua="$vi_cv_version_lua_luajit"
5965 fi
Bram Moolenaar1e91f262012-10-03 14:48:08 +02005966 else
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005967 # Extract the first word of "lua", so it can be a program name with args.
5968set dummy lua; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02005969{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5970printf %s "checking for $ac_word... " >&6; }
5971if test ${ac_cv_path_vi_cv_path_plain_lua+y}
5972then :
5973 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02005974else case e in #(
5975 e) case $vi_cv_path_plain_lua in
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005976 [\\/]* | ?:[\\/]*)
5977 ac_cv_path_vi_cv_path_plain_lua="$vi_cv_path_plain_lua" # Let the user override the test with a path.
5978 ;;
5979 *)
5980 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5981for as_dir in $PATH
5982do
5983 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02005984 case $as_dir in #(((
5985 '') as_dir=./ ;;
5986 */) ;;
5987 *) as_dir=$as_dir/ ;;
5988 esac
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005989 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02005990 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5991 ac_cv_path_vi_cv_path_plain_lua="$as_dir$ac_word$ac_exec_ext"
5992 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005993 break 2
5994 fi
5995done
5996 done
5997IFS=$as_save_IFS
5998
5999 ;;
Christian Brabandt9670f612025-05-07 21:44:33 +02006000esac ;;
Bram Moolenaare855ccf2013-07-28 13:32:15 +02006001esac
6002fi
6003vi_cv_path_plain_lua=$ac_cv_path_vi_cv_path_plain_lua
6004if test -n "$vi_cv_path_plain_lua"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006005 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_plain_lua" >&5
6006printf "%s\n" "$vi_cv_path_plain_lua" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02006007else
Illia Bobyra96d5442023-08-30 16:30:15 +02006008 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6009printf "%s\n" "no" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02006010fi
6011
6012
6013 if test "X$vi_cv_path_plain_lua" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006014 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Lua version" >&5
6015printf %s "checking Lua version... " >&6; }
6016if test ${vi_cv_version_plain_lua+y}
6017then :
6018 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02006019else case e in #(
6020 e) vi_cv_version_plain_lua=`${vi_cv_path_plain_lua} -e "print(_VERSION)" | sed 's/.* //'` ;;
6021esac
Bram Moolenaare855ccf2013-07-28 13:32:15 +02006022fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006023{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_version_plain_lua" >&5
6024printf "%s\n" "$vi_cv_version_plain_lua" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02006025 fi
6026 vi_cv_path_lua="$vi_cv_path_plain_lua"
6027 vi_cv_version_lua="$vi_cv_version_plain_lua"
6028 fi
6029 if test "x$vi_cv_with_luajit" != "xno" && test "X$vi_cv_version_luajit" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006030 { 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
6031printf %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 +01006032 if test -f "$vi_cv_path_lua_pfx/include/luajit-$vi_cv_version_luajit/lua.h"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006033 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6034printf "%s\n" "yes" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02006035 LUA_INC=/luajit-$vi_cv_version_luajit
6036 fi
6037 fi
6038 if test "X$LUA_INC" = "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006039 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if lua.h can be found in $vi_cv_path_lua_pfx/include" >&5
6040printf %s "checking if lua.h can be found in $vi_cv_path_lua_pfx/include... " >&6; }
Bram Moolenaar49222be2015-12-11 18:11:30 +01006041 if test -f "$vi_cv_path_lua_pfx/include/lua.h"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006042 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6043printf "%s\n" "yes" >&6; }
Bram Moolenaar1e91f262012-10-03 14:48:08 +02006044 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006045 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6046printf "%s\n" "no" >&6; }
6047 { 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
6048printf %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 +01006049 if test -f "$vi_cv_path_lua_pfx/include/lua$vi_cv_version_lua/lua.h"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006050 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6051printf "%s\n" "yes" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02006052 LUA_INC=/lua$vi_cv_version_lua
6053 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006054 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6055printf "%s\n" "no" >&6; }
Bram Moolenaarf49e5642020-04-19 17:46:53 +02006056
6057 # Detect moonjit:
6058 # https://groups.google.com/forum/#!topic/vim_use/O0vek60WuTk
6059 lua_suf=/moonjit-2.3
6060 inc_path="$vi_cv_path_lua_pfx/include"
Bram Moolenaarad4dc832020-04-20 16:21:53 +02006061 for dir in "$inc_path"/moonjit-[0-9]* ; do
Bram Moolenaarf49e5642020-04-19 17:46:53 +02006062 if test -d "$dir" ; then
Bram Moolenaara79a8942020-12-17 20:50:25 +01006063 lua_suf=`basename "$dir"`
Bram Moolenaarf49e5642020-04-19 17:46:53 +02006064 lua_suf="/$lua_suf"
6065 break
6066 fi
6067 done
Illia Bobyra96d5442023-08-30 16:30:15 +02006068 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if lua.h can be found in $inc_path$lua_suf" >&5
6069printf %s "checking if lua.h can be found in $inc_path$lua_suf... " >&6; }
Bram Moolenaarf49e5642020-04-19 17:46:53 +02006070 if test -f "$inc_path$lua_suf/lua.h"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006071 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6072printf "%s\n" "yes" >&6; }
Bram Moolenaarf49e5642020-04-19 17:46:53 +02006073 LUA_INC=$lua_suf
6074 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006075 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6076printf "%s\n" "no" >&6; }
Bram Moolenaarf49e5642020-04-19 17:46:53 +02006077 vi_cv_path_lua_pfx=
6078 fi
Bram Moolenaare855ccf2013-07-28 13:32:15 +02006079 fi
Bram Moolenaar0ba04292010-07-14 23:23:17 +02006080 fi
6081 fi
6082 fi
6083
6084 if test "X$vi_cv_path_lua_pfx" != "X"; then
Bram Moolenaare855ccf2013-07-28 13:32:15 +02006085 if test "x$vi_cv_with_luajit" != "xno"; then
6086 multiarch=`dpkg-architecture -qDEB_HOST_MULTIARCH 2> /dev/null`
6087 if test "X$multiarch" != "X"; then
6088 lib_multiarch="lib/${multiarch}"
6089 else
6090 lib_multiarch="lib"
6091 fi
6092 if test "X$vi_cv_version_lua" = "X"; then
6093 LUA_LIBS="-L${vi_cv_path_lua_pfx}/${lib_multiarch} -lluajit"
6094 else
6095 LUA_LIBS="-L${vi_cv_path_lua_pfx}/${lib_multiarch} -lluajit-$vi_cv_version_lua"
6096 fi
Bram Moolenaar0ba04292010-07-14 23:23:17 +02006097 else
Bram Moolenaar869113f2023-03-31 21:29:00 +01006098 if test -d "${vi_cv_path_lua_pfx}/lib/lua$vi_cv_version_lua"; then
6099 LUALIBDIR="lib/lua$vi_cv_version_lua"
Bram Moolenaare855ccf2013-07-28 13:32:15 +02006100 else
Bram Moolenaar869113f2023-03-31 21:29:00 +01006101 LUALIBDIR=lib
6102 fi
6103 if test "X$LUA_INC" != "X"; then
6104 LUA_LIBS="-L${vi_cv_path_lua_pfx}/${LUALIBDIR} -llua$vi_cv_version_lua"
6105 else
6106 LUA_LIBS="-L${vi_cv_path_lua_pfx}/${LUALIBDIR} -llua"
Bram Moolenaare855ccf2013-07-28 13:32:15 +02006107 fi
Bram Moolenaar0ba04292010-07-14 23:23:17 +02006108 fi
Bram Moolenaar2334b6d2010-07-22 21:32:16 +02006109 if test "$enable_luainterp" = "dynamic"; then
Bram Moolenaare855ccf2013-07-28 13:32:15 +02006110 lua_ok="yes"
6111 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006112 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if link with ${LUA_LIBS} is sane" >&5
6113printf %s "checking if link with ${LUA_LIBS} is sane... " >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02006114 libs_save=$LIBS
6115 LIBS="$LIBS $LUA_LIBS"
6116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6117/* end confdefs.h. */
6118
6119int
Illia Bobyra96d5442023-08-30 16:30:15 +02006120main (void)
Bram Moolenaare855ccf2013-07-28 13:32:15 +02006121{
6122
6123 ;
6124 return 0;
6125}
6126_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02006127if ac_fn_c_try_link "$LINENO"
6128then :
6129 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6130printf "%s\n" "yes" >&6; }; lua_ok="yes"
Christian Brabandt9670f612025-05-07 21:44:33 +02006131else case e in #(
6132 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6133printf "%s\n" "no" >&6; }; lua_ok="no"; LUA_LIBS="" ;;
6134esac
Bram Moolenaare855ccf2013-07-28 13:32:15 +02006135fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006136rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaare855ccf2013-07-28 13:32:15 +02006137 conftest$ac_exeext conftest.$ac_ext
6138 LIBS=$libs_save
6139 fi
6140 if test "x$lua_ok" = "xyes"; then
6141 LUA_CFLAGS="-I${vi_cv_path_lua_pfx}/include${LUA_INC}"
6142 LUA_SRC="if_lua.c"
6143 LUA_OBJ="objects/if_lua.o"
6144 LUA_PRO="if_lua.pro"
Illia Bobyra96d5442023-08-30 16:30:15 +02006145 printf "%s\n" "#define FEAT_LUA 1" >>confdefs.h
Bram Moolenaare855ccf2013-07-28 13:32:15 +02006146
6147 fi
6148 if test "$enable_luainterp" = "dynamic"; then
6149 if test "x$vi_cv_with_luajit" != "xno"; then
6150 luajit="jit"
6151 fi
Bram Moolenaar1e91f262012-10-03 14:48:08 +02006152 if test -f "${vi_cv_path_lua_pfx}/bin/cyglua-${vi_cv_version_lua}.dll"; then
6153 vi_cv_dll_name_lua="cyglua-${vi_cv_version_lua}.dll"
6154 else
Bram Moolenaard0573012017-10-28 21:11:06 +02006155 if test "x$MACOS_X" = "xyes"; then
Bram Moolenaare855ccf2013-07-28 13:32:15 +02006156 ext="dylib"
6157 indexes=""
6158 else
6159 ext="so"
6160 indexes=".0 .1 .2 .3 .4 .5 .6 .7 .8 .9"
6161 multiarch=`dpkg-architecture -qDEB_HOST_MULTIARCH 2> /dev/null`
6162 if test "X$multiarch" != "X"; then
6163 lib_multiarch="lib/${multiarch}"
6164 fi
Bram Moolenaar768baac2013-04-15 14:44:57 +02006165 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006166 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if liblua${luajit}*.${ext}* can be found in $vi_cv_path_lua_pfx" >&5
6167printf %s "checking if liblua${luajit}*.${ext}* can be found in $vi_cv_path_lua_pfx... " >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02006168 for subdir in "${lib_multiarch}" lib64 lib; do
Bram Moolenaar768baac2013-04-15 14:44:57 +02006169 if test -z "$subdir"; then
6170 continue
6171 fi
Bram Moolenaare855ccf2013-07-28 13:32:15 +02006172 for sover in "${vi_cv_version_lua}.${ext}" "-${vi_cv_version_lua}.${ext}" \
6173 ".${vi_cv_version_lua}.${ext}" ".${ext}.${vi_cv_version_lua}"; do
6174 for i in $indexes ""; do
6175 if test -f "${vi_cv_path_lua_pfx}/${subdir}/liblua${luajit}${sover}$i"; then
Bram Moolenaar768baac2013-04-15 14:44:57 +02006176 sover2="$i"
6177 break 3
6178 fi
6179 done
Bram Moolenaar07e1da62013-02-06 19:49:43 +01006180 done
Bram Moolenaare855ccf2013-07-28 13:32:15 +02006181 sover=""
Bram Moolenaar1e91f262012-10-03 14:48:08 +02006182 done
Bram Moolenaare855ccf2013-07-28 13:32:15 +02006183 if test "X$sover" = "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006184 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6185printf "%s\n" "no" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02006186 lua_ok="no"
6187 vi_cv_dll_name_lua="liblua${luajit}.${ext}"
6188 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006189 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6190printf "%s\n" "yes" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02006191 lua_ok="yes"
6192 vi_cv_dll_name_lua="liblua${luajit}${sover}$sover2"
6193 fi
Bram Moolenaar1e91f262012-10-03 14:48:08 +02006194 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006195 printf "%s\n" "#define DYNAMIC_LUA 1" >>confdefs.h
Bram Moolenaar2334b6d2010-07-22 21:32:16 +02006196
6197 LUA_LIBS=""
Bram Moolenaar1e91f262012-10-03 14:48:08 +02006198 LUA_CFLAGS="-DDYNAMIC_LUA_DLL=\\\"${vi_cv_dll_name_lua}\\\" $LUA_CFLAGS"
Bram Moolenaar2334b6d2010-07-22 21:32:16 +02006199 fi
Bram Moolenaare855ccf2013-07-28 13:32:15 +02006200 if test "X$LUA_CFLAGS$LUA_LIBS" != "X" && \
Bram Moolenaard0573012017-10-28 21:11:06 +02006201 test "x$MACOS_X" = "xyes" && test "x$vi_cv_with_luajit" != "xno" && \
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00006202 test "$vim_cv_uname_m_output" = "x86_64"; then
Bram Moolenaare855ccf2013-07-28 13:32:15 +02006203 LUA_LIBS="-pagezero_size 10000 -image_base 100000000 $LUA_LIBS"
6204 fi
Bram Moolenaar0ba04292010-07-14 23:23:17 +02006205 fi
Bram Moolenaare855ccf2013-07-28 13:32:15 +02006206 if test "$fail_if_missing" = "yes" -a "$lua_ok" != "yes"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01006207 as_fn_error $? "could not configure lua" "$LINENO" 5
Bram Moolenaarf788a062011-12-14 20:51:25 +01006208 fi
Bram Moolenaar0ba04292010-07-14 23:23:17 +02006209
6210
6211
6212
6213
ichizok8bb3fe42021-12-28 15:51:45 +00006214
Bram Moolenaar0ba04292010-07-14 23:23:17 +02006215fi
6216
6217
Illia Bobyra96d5442023-08-30 16:30:15 +02006218{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-mzschemeinterp argument" >&5
6219printf %s "checking --enable-mzschemeinterp argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00006220# Check whether --enable-mzschemeinterp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02006221if test ${enable_mzschemeinterp+y}
6222then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00006223 enableval=$enable_mzschemeinterp;
Christian Brabandt9670f612025-05-07 21:44:33 +02006224else case e in #(
6225 e) enable_mzschemeinterp="no" ;;
6226esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00006227fi
6228
Illia Bobyra96d5442023-08-30 16:30:15 +02006229{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_mzschemeinterp" >&5
6230printf "%s\n" "$enable_mzschemeinterp" >&6; }
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006231
6232if test "$enable_mzschemeinterp" = "yes"; then
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006233
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006234
Illia Bobyra96d5442023-08-30 16:30:15 +02006235 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-plthome argument" >&5
6236printf %s "checking --with-plthome argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006237
Bram Moolenaar446cb832008-06-24 21:56:24 +00006238# Check whether --with-plthome was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02006239if test ${with_plthome+y}
6240then :
6241 withval=$with_plthome; with_plthome="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_plthome" >&5
6242printf "%s\n" "$with_plthome" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +02006243else case e in #(
6244 e) with_plthome="";{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: \"no\"" >&5
6245printf "%s\n" "\"no\"" >&6; } ;;
6246esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00006247fi
6248
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006249
6250 if test "X$with_plthome" != "X"; then
6251 vi_cv_path_mzscheme_pfx="$with_plthome"
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006252 vi_cv_path_mzscheme="${vi_cv_path_mzscheme_pfx}/bin/mzscheme"
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006253 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006254 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking PLTHOME environment var" >&5
6255printf %s "checking PLTHOME environment var... " >&6; }
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006256 if test "X$PLTHOME" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006257 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: \"$PLTHOME\"" >&5
6258printf "%s\n" "\"$PLTHOME\"" >&6; }
Bram Moolenaarc9b4b052006-04-30 18:54:39 +00006259 vi_cv_path_mzscheme_pfx="$PLTHOME"
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006260 vi_cv_path_mzscheme="${vi_cv_path_mzscheme_pfx}/bin/mzscheme"
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006261 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006262 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not set" >&5
6263printf "%s\n" "not set" >&6; }
Bram Moolenaarc9b4b052006-04-30 18:54:39 +00006264 # Extract the first word of "mzscheme", so it can be a program name with args.
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006265set dummy mzscheme; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02006266{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6267printf %s "checking for $ac_word... " >&6; }
6268if test ${ac_cv_path_vi_cv_path_mzscheme+y}
6269then :
6270 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02006271else case e in #(
6272 e) case $vi_cv_path_mzscheme in
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006273 [\\/]* | ?:[\\/]*)
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006274 ac_cv_path_vi_cv_path_mzscheme="$vi_cv_path_mzscheme" # Let the user override the test with a path.
6275 ;;
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006276 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006277 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6278for as_dir in $PATH
6279do
6280 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02006281 case $as_dir in #(((
6282 '') as_dir=./ ;;
6283 */) ;;
6284 *) as_dir=$as_dir/ ;;
6285 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006286 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02006287 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6288 ac_cv_path_vi_cv_path_mzscheme="$as_dir$ac_word$ac_exec_ext"
6289 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006290 break 2
6291 fi
6292done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006293 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00006294IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006295
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006296 ;;
Christian Brabandt9670f612025-05-07 21:44:33 +02006297esac ;;
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006298esac
6299fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006300vi_cv_path_mzscheme=$ac_cv_path_vi_cv_path_mzscheme
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006301if test -n "$vi_cv_path_mzscheme"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006302 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_mzscheme" >&5
6303printf "%s\n" "$vi_cv_path_mzscheme" >&6; }
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006304else
Illia Bobyra96d5442023-08-30 16:30:15 +02006305 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6306printf "%s\n" "no" >&6; }
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006307fi
6308
6309
Bram Moolenaar446cb832008-06-24 21:56:24 +00006310
Bram Moolenaarc9b4b052006-04-30 18:54:39 +00006311 if test "X$vi_cv_path_mzscheme" != "X"; then
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006312 lsout=`ls -l $vi_cv_path_mzscheme`
6313 if echo "$lsout" | grep -e '->' >/dev/null 2>/dev/null; then
6314 vi_cv_path_mzscheme=`echo "$lsout" | sed 's/.*-> \(.*\)/\1/'`
6315 fi
6316 fi
6317
Bram Moolenaarc9b4b052006-04-30 18:54:39 +00006318 if test "X$vi_cv_path_mzscheme" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006319 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking MzScheme install prefix" >&5
6320printf %s "checking MzScheme install prefix... " >&6; }
6321if test ${vi_cv_path_mzscheme_pfx+y}
6322then :
6323 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02006324else case e in #(
6325 e) echo "(display (simplify-path \
Bram Moolenaarc9b4b052006-04-30 18:54:39 +00006326 (build-path (call-with-values \
6327 (lambda () (split-path (find-system-path (quote exec-file)))) \
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006328 (lambda (base name must-be-dir?) base)) (quote up))))" > mzdirs.scm
6329 vi_cv_path_mzscheme_pfx=`${vi_cv_path_mzscheme} -r mzdirs.scm | \
Christian Brabandt9670f612025-05-07 21:44:33 +02006330 sed -e 's+/$++'` ;;
6331esac
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006332fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006333{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_mzscheme_pfx" >&5
6334printf "%s\n" "$vi_cv_path_mzscheme_pfx" >&6; }
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006335 rm -f mzdirs.scm
Bram Moolenaarc9b4b052006-04-30 18:54:39 +00006336 fi
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006337 fi
6338 fi
6339
6340 if test "X$vi_cv_path_mzscheme_pfx" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006341 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for racket include directory" >&5
6342printf %s "checking for racket include directory... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006343 SCHEME_INC=`${vi_cv_path_mzscheme} -e '(require setup/dirs)(let ((p (find-include-dir))) (when (path? p) (display p)))'`
6344 if test "X$SCHEME_INC" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006345 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${SCHEME_INC}" >&5
6346printf "%s\n" "${SCHEME_INC}" >&6; }
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006347 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006348 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6349printf "%s\n" "not found" >&6; }
6350 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include" >&5
6351printf %s "checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006352 if test -f "$vi_cv_path_mzscheme_pfx/include/scheme.h"; then
6353 SCHEME_INC=${vi_cv_path_mzscheme_pfx}/include
Illia Bobyra96d5442023-08-30 16:30:15 +02006354 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6355printf "%s\n" "yes" >&6; }
Bram Moolenaarff4a37e2007-05-06 13:18:29 +00006356 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006357 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6358printf "%s\n" "no" >&6; }
6359 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include/plt" >&5
6360printf %s "checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include/plt... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006361 if test -f "$vi_cv_path_mzscheme_pfx/include/plt/scheme.h"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006362 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6363printf "%s\n" "yes" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006364 SCHEME_INC=${vi_cv_path_mzscheme_pfx}/include/plt
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006365 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006366 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6367printf "%s\n" "no" >&6; }
6368 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include/racket" >&5
6369printf %s "checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include/racket... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006370 if test -f "$vi_cv_path_mzscheme_pfx/include/racket/scheme.h"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006371 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6372printf "%s\n" "yes" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006373 SCHEME_INC=${vi_cv_path_mzscheme_pfx}/include/racket
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006374 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006375 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6376printf "%s\n" "no" >&6; }
6377 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in /usr/include/plt/" >&5
6378printf %s "checking if scheme.h can be found in /usr/include/plt/... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006379 if test -f /usr/include/plt/scheme.h; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006380 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6381printf "%s\n" "yes" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006382 SCHEME_INC=/usr/include/plt
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006383 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006384 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6385printf "%s\n" "no" >&6; }
6386 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in /usr/include/racket/" >&5
6387printf %s "checking if scheme.h can be found in /usr/include/racket/... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006388 if test -f /usr/include/racket/scheme.h; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006389 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6390printf "%s\n" "yes" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006391 SCHEME_INC=/usr/include/racket
6392 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006393 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6394printf "%s\n" "no" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006395 vi_cv_path_mzscheme_pfx=
6396 fi
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006397 fi
6398 fi
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006399 fi
Bram Moolenaarff4a37e2007-05-06 13:18:29 +00006400 fi
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006401 fi
6402 fi
6403
6404 if test "X$vi_cv_path_mzscheme_pfx" != "X"; then
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006405
Illia Bobyra96d5442023-08-30 16:30:15 +02006406 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for racket lib directory" >&5
6407printf %s "checking for racket lib directory... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006408 SCHEME_LIB=`${vi_cv_path_mzscheme} -e '(require setup/dirs)(let ((p (find-lib-dir))) (when (path? p) (display p)))'`
6409 if test "X$SCHEME_LIB" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006410 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${SCHEME_LIB}" >&5
6411printf "%s\n" "${SCHEME_LIB}" >&6; }
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006412 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006413 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6414printf "%s\n" "not found" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006415 fi
6416
6417 for path in "${vi_cv_path_mzscheme_pfx}/lib" "${SCHEME_LIB}"; do
6418 if test "X$path" != "X"; then
Bram Moolenaard0573012017-10-28 21:11:06 +02006419 if test "x$MACOS_X" = "xyes"; then
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006420 MZSCHEME_LIBS="-framework Racket"
6421 MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
6422 elif test -f "${path}/libmzscheme3m.a"; then
6423 MZSCHEME_LIBS="${path}/libmzscheme3m.a"
6424 MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
6425 elif test -f "${path}/libracket3m.a"; then
6426 MZSCHEME_LIBS="${path}/libracket3m.a"
Bram Moolenaar588d2412020-10-03 14:24:19 +02006427 if test -f "${path}/librktio.a"; then
6428 MZSCHEME_LIBS="${MZSCHEME_LIBS} ${path}/librktio.a"
6429 fi
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006430 MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
6431 elif test -f "${path}/libracket.a"; then
6432 MZSCHEME_LIBS="${path}/libracket.a ${path}/libmzgc.a"
6433 elif test -f "${path}/libmzscheme.a"; then
6434 MZSCHEME_LIBS="${path}/libmzscheme.a ${path}/libmzgc.a"
6435 else
6436 if test -f "${path}/libmzscheme3m.so"; then
6437 MZSCHEME_LIBS="-L${path} -lmzscheme3m"
6438 MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
6439 elif test -f "${path}/libracket3m.so"; then
6440 MZSCHEME_LIBS="-L${path} -lracket3m"
6441 MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
6442 elif test -f "${path}/libracket.so"; then
6443 MZSCHEME_LIBS="-L${path} -lracket -lmzgc"
6444 else
6445 if test "$path" != "$SCHEME_LIB"; then
6446 continue
6447 fi
6448 MZSCHEME_LIBS="-L${path} -lmzscheme -lmzgc"
6449 fi
6450 if test "$GCC" = yes; then
6451 MZSCHEME_LIBS="${MZSCHEME_LIBS} -Wl,-rpath -Wl,${path}"
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00006452 elif test "$vim_cv_uname_output" = SunOS &&
6453 echo $vim_cv_uname_r_output | grep '^5' >/dev/null; then
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006454 MZSCHEME_LIBS="${MZSCHEME_LIBS} -R ${path}"
6455 fi
6456 fi
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006457 fi
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006458 if test "X$MZSCHEME_LIBS" != "X"; then
6459 break
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006460 fi
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006461 done
6462
Illia Bobyra96d5442023-08-30 16:30:15 +02006463 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if racket requires -pthread" >&5
6464printf %s "checking if racket requires -pthread... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006465 if test "X$SCHEME_LIB" != "X" && $FGREP -e -pthread "$SCHEME_LIB/buildinfo" >/dev/null ; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006466 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6467printf "%s\n" "yes" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006468 MZSCHEME_LIBS="${MZSCHEME_LIBS} -pthread"
6469 MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -pthread"
6470 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006471 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6472printf "%s\n" "no" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006473 fi
6474
Illia Bobyra96d5442023-08-30 16:30:15 +02006475 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for racket config directory" >&5
6476printf %s "checking for racket config directory... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006477 SCHEME_CONFIGDIR=`${vi_cv_path_mzscheme} -e '(require setup/dirs)(let ((p (find-config-dir))) (when (path? p) (display p)))'`
6478 if test "X$SCHEME_CONFIGDIR" != "X"; then
6479 MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -DMZSCHEME_CONFIGDIR='\"${SCHEME_CONFIGDIR}\"'"
Illia Bobyra96d5442023-08-30 16:30:15 +02006480 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${SCHEME_CONFIGDIR}" >&5
6481printf "%s\n" "${SCHEME_CONFIGDIR}" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006482 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006483 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6484printf "%s\n" "not found" >&6; }
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006485 fi
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006486
Illia Bobyra96d5442023-08-30 16:30:15 +02006487 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for racket collects directory" >&5
6488printf %s "checking for racket collects directory... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006489 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))))'`
6490 if test "X$SCHEME_COLLECTS" = "X"; then
6491 if test -d "$vi_cv_path_mzscheme_pfx/lib/plt/collects"; then
6492 SCHEME_COLLECTS=$vi_cv_path_mzscheme_pfx/lib/plt/
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006493 else
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006494 if test -d "$vi_cv_path_mzscheme_pfx/lib/racket/collects"; then
6495 SCHEME_COLLECTS=$vi_cv_path_mzscheme_pfx/lib/racket/
Bram Moolenaar75676462013-01-30 14:55:42 +01006496 else
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006497 if test -d "$vi_cv_path_mzscheme_pfx/share/racket/collects"; then
6498 SCHEME_COLLECTS=$vi_cv_path_mzscheme_pfx/share/racket/
6499 else
6500 if test -d "$vi_cv_path_mzscheme_pfx/collects"; then
6501 SCHEME_COLLECTS=$vi_cv_path_mzscheme_pfx/
6502 fi
Bram Moolenaar75676462013-01-30 14:55:42 +01006503 fi
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006504 fi
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006505 fi
Bram Moolenaarff4a37e2007-05-06 13:18:29 +00006506 fi
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006507 if test "X$SCHEME_COLLECTS" != "X" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006508 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${SCHEME_COLLECTS}" >&5
6509printf "%s\n" "${SCHEME_COLLECTS}" >&6; }
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006510 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006511 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6512printf "%s\n" "not found" >&6; }
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006513 fi
6514
Illia Bobyra96d5442023-08-30 16:30:15 +02006515 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mzscheme_base.c" >&5
6516printf %s "checking for mzscheme_base.c... " >&6; }
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006517 if test -f "${SCHEME_COLLECTS}collects/scheme/base.ss" ; then
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006518 MZSCHEME_EXTRA="mzscheme_base.c"
Bram Moolenaara2aa31a2014-02-23 22:52:40 +01006519 MZSCHEME_MZC="${vi_cv_path_mzscheme_pfx}/bin/mzc"
6520 MZSCHEME_MOD="++lib scheme/base"
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006521 else
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006522 if test -f "${SCHEME_COLLECTS}collects/scheme/base.rkt" ; 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"
6526 else
6527 if test -f "${SCHEME_COLLECTS}collects/racket/base.rkt" ; then
6528 MZSCHEME_EXTRA="mzscheme_base.c"
6529 MZSCHEME_MZC="${vi_cv_path_mzscheme_pfx}/bin/raco ctool"
6530 MZSCHEME_MOD=""
6531 fi
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006532 fi
6533 fi
6534 if test "X$MZSCHEME_EXTRA" != "X" ; then
6535 MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -DINCLUDE_MZSCHEME_BASE"
Illia Bobyra96d5442023-08-30 16:30:15 +02006536 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: needed" >&5
6537printf "%s\n" "needed" >&6; }
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006538 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006539 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not needed" >&5
6540printf "%s\n" "not needed" >&6; }
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006541 fi
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006542
Illia Bobyra96d5442023-08-30 16:30:15 +02006543 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ffi_type_void in -lffi" >&5
6544printf %s "checking for ffi_type_void in -lffi... " >&6; }
6545if test ${ac_cv_lib_ffi_ffi_type_void+y}
6546then :
6547 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02006548else case e in #(
6549 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar9e902192013-07-17 18:58:11 +02006550LIBS="-lffi $LIBS"
6551cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6552/* end confdefs.h. */
6553
6554/* Override any GCC internal prototype to avoid an error.
6555 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +02006556 builtin and then its argument prototype would still apply.
6557 The 'extern "C"' is for builds by C++ compilers;
6558 although this is not generally supported in C code supporting it here
6559 has little cost and some practical benefit (sr 110532). */
6560#ifdef __cplusplus
6561extern "C"
6562#endif
6563char ffi_type_void (void);
Bram Moolenaar9e902192013-07-17 18:58:11 +02006564int
Illia Bobyra96d5442023-08-30 16:30:15 +02006565main (void)
Bram Moolenaar9e902192013-07-17 18:58:11 +02006566{
6567return ffi_type_void ();
6568 ;
6569 return 0;
6570}
6571_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02006572if ac_fn_c_try_link "$LINENO"
6573then :
Bram Moolenaar9e902192013-07-17 18:58:11 +02006574 ac_cv_lib_ffi_ffi_type_void=yes
Christian Brabandt9670f612025-05-07 21:44:33 +02006575else case e in #(
6576 e) ac_cv_lib_ffi_ffi_type_void=no ;;
6577esac
Bram Moolenaar9e902192013-07-17 18:58:11 +02006578fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006579rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar9e902192013-07-17 18:58:11 +02006580 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +02006581LIBS=$ac_check_lib_save_LIBS ;;
6582esac
Bram Moolenaar9e902192013-07-17 18:58:11 +02006583fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006584{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ffi_ffi_type_void" >&5
6585printf "%s\n" "$ac_cv_lib_ffi_ffi_type_void" >&6; }
6586if test "x$ac_cv_lib_ffi_ffi_type_void" = xyes
6587then :
Bram Moolenaar9e902192013-07-17 18:58:11 +02006588 MZSCHEME_LIBS="$MZSCHEME_LIBS -lffi"
6589fi
6590
6591
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006592 MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -I${SCHEME_INC} \
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006593 -DMZSCHEME_COLLECTS='\"${SCHEME_COLLECTS}collects\"'"
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006594
Illia Bobyra96d5442023-08-30 16:30:15 +02006595 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compile and link flags for MzScheme are sane" >&5
6596printf %s "checking if compile and link flags for MzScheme are sane... " >&6; }
Bram Moolenaar9e902192013-07-17 18:58:11 +02006597 cflags_save=$CFLAGS
6598 libs_save=$LIBS
6599 CFLAGS="$CFLAGS $MZSCHEME_CFLAGS"
6600 LIBS="$LIBS $MZSCHEME_LIBS"
6601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6602/* end confdefs.h. */
6603
6604int
Illia Bobyra96d5442023-08-30 16:30:15 +02006605main (void)
Bram Moolenaar9e902192013-07-17 18:58:11 +02006606{
6607
6608 ;
6609 return 0;
6610}
6611_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02006612if ac_fn_c_try_link "$LINENO"
6613then :
6614 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6615printf "%s\n" "yes" >&6; }; mzs_ok=yes
Christian Brabandt9670f612025-05-07 21:44:33 +02006616else case e in #(
6617 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no: MZSCHEME DISABLED" >&5
6618printf "%s\n" "no: MZSCHEME DISABLED" >&6; }; mzs_ok=no ;;
6619esac
Bram Moolenaar9e902192013-07-17 18:58:11 +02006620fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006621rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar9e902192013-07-17 18:58:11 +02006622 conftest$ac_exeext conftest.$ac_ext
6623 CFLAGS=$cflags_save
6624 LIBS=$libs_save
6625 if test $mzs_ok = yes; then
6626 MZSCHEME_SRC="if_mzsch.c"
6627 MZSCHEME_OBJ="objects/if_mzsch.o"
6628 MZSCHEME_PRO="if_mzsch.pro"
Illia Bobyra96d5442023-08-30 16:30:15 +02006629 printf "%s\n" "#define FEAT_MZSCHEME 1" >>confdefs.h
Bram Moolenaar9e902192013-07-17 18:58:11 +02006630
6631 else
6632 MZSCHEME_CFLAGS=
6633 MZSCHEME_LIBS=
6634 MZSCHEME_EXTRA=
6635 MZSCHEME_MZC=
6636 fi
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006637 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006638
6639
6640
6641
6642
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006643
6644
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006645fi
6646
6647
Illia Bobyra96d5442023-08-30 16:30:15 +02006648{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-perlinterp argument" >&5
6649printf %s "checking --enable-perlinterp argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00006650# Check whether --enable-perlinterp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02006651if test ${enable_perlinterp+y}
6652then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00006653 enableval=$enable_perlinterp;
Christian Brabandt9670f612025-05-07 21:44:33 +02006654else case e in #(
6655 e) enable_perlinterp="no" ;;
6656esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00006657fi
6658
Illia Bobyra96d5442023-08-30 16:30:15 +02006659{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_perlinterp" >&5
6660printf "%s\n" "$enable_perlinterp" >&6; }
Bram Moolenaare06c1882010-07-21 22:05:20 +02006661if test "$enable_perlinterp" = "yes" -o "$enable_perlinterp" = "dynamic"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00006662 if test "$has_eval" = "no"; then
Martin Tournoij7904fa42022-10-04 16:28:45 +01006663 as_fn_error $? "cannot use Perl with tiny features" "$LINENO" 5
Bram Moolenaar3c124e32016-01-31 14:36:58 +01006664 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006665
Bram Moolenaar071d4272004-06-13 20:20:40 +00006666 # Extract the first word of "perl", so it can be a program name with args.
6667set dummy perl; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02006668{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6669printf %s "checking for $ac_word... " >&6; }
6670if test ${ac_cv_path_vi_cv_path_perl+y}
6671then :
6672 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02006673else case e in #(
6674 e) case $vi_cv_path_perl in
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006675 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00006676 ac_cv_path_vi_cv_path_perl="$vi_cv_path_perl" # Let the user override the test with a path.
6677 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00006678 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006679 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6680for as_dir in $PATH
6681do
6682 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02006683 case $as_dir in #(((
6684 '') as_dir=./ ;;
6685 */) ;;
6686 *) as_dir=$as_dir/ ;;
6687 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006688 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02006689 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6690 ac_cv_path_vi_cv_path_perl="$as_dir$ac_word$ac_exec_ext"
6691 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006692 break 2
6693 fi
6694done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006695 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00006696IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006697
Bram Moolenaar071d4272004-06-13 20:20:40 +00006698 ;;
Christian Brabandt9670f612025-05-07 21:44:33 +02006699esac ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00006700esac
6701fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006702vi_cv_path_perl=$ac_cv_path_vi_cv_path_perl
Bram Moolenaar071d4272004-06-13 20:20:40 +00006703if test -n "$vi_cv_path_perl"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006704 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_perl" >&5
6705printf "%s\n" "$vi_cv_path_perl" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006706else
Illia Bobyra96d5442023-08-30 16:30:15 +02006707 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6708printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006709fi
6710
Bram Moolenaar446cb832008-06-24 21:56:24 +00006711
Bram Moolenaar071d4272004-06-13 20:20:40 +00006712 if test "X$vi_cv_path_perl" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006713 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Perl version" >&5
6714printf %s "checking Perl version... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006715 if $vi_cv_path_perl -e 'require 5.003_01' >/dev/null 2>/dev/null; then
6716 eval `$vi_cv_path_perl -V:usethreads`
Bram Moolenaare06c1882010-07-21 22:05:20 +02006717 eval `$vi_cv_path_perl -V:libperl`
Bram Moolenaar071d4272004-06-13 20:20:40 +00006718 if test "X$usethreads" = "XUNKNOWN" -o "X$usethreads" = "Xundef"; then
6719 badthreads=no
6720 else
6721 if $vi_cv_path_perl -e 'require 5.6.0' >/dev/null 2>/dev/null; then
6722 eval `$vi_cv_path_perl -V:use5005threads`
6723 if test "X$use5005threads" = "XUNKNOWN" -o "X$use5005threads" = "Xundef"; then
6724 badthreads=no
6725 else
6726 badthreads=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02006727 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: >>> Perl > 5.6 with 5.5 threads cannot be used <<<" >&5
6728printf "%s\n" ">>> Perl > 5.6 with 5.5 threads cannot be used <<<" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006729 fi
6730 else
6731 badthreads=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02006732 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: >>> Perl 5.5 with threads cannot be used <<<" >&5
6733printf "%s\n" ">>> Perl 5.5 with threads cannot be used <<<" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006734 fi
6735 fi
6736 if test $badthreads = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006737 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: OK" >&5
6738printf "%s\n" "OK" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006739 eval `$vi_cv_path_perl -V:shrpenv`
6740 if test "X$shrpenv" = "XUNKNOWN"; then # pre 5.003_04
6741 shrpenv=""
6742 fi
6743 vi_cv_perllib=`$vi_cv_path_perl -MConfig -e 'print $Config{privlibexp}'`
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006744
Bram Moolenaard5f62b12014-08-17 17:05:44 +02006745 vi_cv_perl_extutils=unknown_perl_extutils_path
Zdenek Dohnal1b1c9f22023-11-02 20:19:06 +01006746
6747 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-xsubpp path" >&5
6748printf %s "checking --with-xsubpp path... " >&6; }
6749 vi_cv_perl_xsubpp=
6750
6751# Check whether --with-xsubpp was given.
6752if test ${with_xsubpp+y}
6753then :
6754 withval=$with_xsubpp;
6755 if test -f "$withval"
6756 then
6757 vi_cv_perl_xsubpp="$withval"
6758 fi
6759
6760fi
6761
6762
6763 if test "x$vi_cv_perl_xsubpp" = "x"
6764 then
6765 for extutils_rel_path in ExtUtils vendor_perl/ExtUtils; do
6766 xsubpp_path="$vi_cv_perllib/$extutils_rel_path/xsubpp"
6767 if test -f "$xsubpp_path"; then
6768 vi_cv_perl_xsubpp="$xsubpp_path"
6769 fi
6770 done
6771 fi
6772
6773 if test "x$vi_cv_perl_xsubpp" = "x"
6774 then
6775 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: empty" >&5
6776printf "%s\n" "empty" >&6; }
6777 else
6778 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_perl_xsubpp" >&5
6779printf "%s\n" "$vi_cv_perl_xsubpp" >&6; }
6780 fi
6781
Bram Moolenaard5f62b12014-08-17 17:05:44 +02006782
Christian Brabandt2f9aef42024-02-12 23:12:26 +01006783 perlcppflags=`$vi_cv_path_perl -Mlib=$srcdir -MExtUtils::Embed \
Bram Moolenaare8ff56b2017-09-14 23:06:23 +02006784 -e 'ccflags;perl_inc;print"\n"' | sed -e 's/-fno[^ ]*//' \
6785 -e 's/-fdebug-prefix-map[^ ]*//g' \
Bram Moolenaar1ec96c92017-09-27 21:42:08 +02006786 -e 's/-pipe //' \
Christian Brabandt2f9aef42024-02-12 23:12:26 +01006787 -e 's/-flto\(=auto\)\? //' \
Bram Moolenaar1ec96c92017-09-27 21:42:08 +02006788 -e 's/-W[^ ]*//g' \
Bram Moolenaar92021622017-10-12 12:33:43 +02006789 -e 's/-D_FORTIFY_SOURCE=.//g'`
Christian Brabandt9c0ff472024-05-11 20:18:21 +02006790 perllibs=`cd $srcdir; $vi_cv_path_perl -MExtUtils::Embed -e 'ldopts' | \
Bram Moolenaar071d4272004-06-13 20:20:40 +00006791 sed -e '/Warning/d' -e '/Note (probably harmless)/d' \
Christian Brabandt9c0ff472024-05-11 20:18:21 +02006792 -e 's/-specs=[^ ]*//g' \
Bram Moolenaar071d4272004-06-13 20:20:40 +00006793 -e 's/-bE:perl.exp//' -e 's/-lc //'`
Christian Brabandt9c0ff472024-05-11 20:18:21 +02006794 perlldflags=`cd $srcdir; $vi_cv_path_perl -MExtUtils::Embed \
6795 -e 'ccdlflags' | sed -e 's/-bE:perl.exp//' \
6796 -e 's/-specs=[^ ]*//g' `
Bram Moolenaar071d4272004-06-13 20:20:40 +00006797
Illia Bobyra96d5442023-08-30 16:30:15 +02006798 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compile and link flags for Perl are sane" >&5
6799printf %s "checking if compile and link flags for Perl are sane... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006800 cflags_save=$CFLAGS
6801 libs_save=$LIBS
6802 ldflags_save=$LDFLAGS
6803 CFLAGS="$CFLAGS $perlcppflags"
6804 LIBS="$LIBS $perllibs"
Bram Moolenaara6cc0312013-06-18 23:31:55 +02006805 perlldflags=`echo "$perlldflags" | sed -e 's/^ *//g'`
Bram Moolenaar071d4272004-06-13 20:20:40 +00006806 LDFLAGS="$perlldflags $LDFLAGS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006808/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00006809
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006810int
Illia Bobyra96d5442023-08-30 16:30:15 +02006811main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006812{
6813
6814 ;
6815 return 0;
6816}
6817_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02006818if ac_fn_c_try_link "$LINENO"
6819then :
6820 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6821printf "%s\n" "yes" >&6; }; perl_ok=yes
Christian Brabandt9670f612025-05-07 21:44:33 +02006822else case e in #(
6823 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no: PERL DISABLED" >&5
6824printf "%s\n" "no: PERL DISABLED" >&6; }; perl_ok=no ;;
6825esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00006826fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006827rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006828 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +00006829 CFLAGS=$cflags_save
6830 LIBS=$libs_save
6831 LDFLAGS=$ldflags_save
6832 if test $perl_ok = yes; then
6833 if test "X$perlcppflags" != "X"; then
Bram Moolenaar1ec96c92017-09-27 21:42:08 +02006834 PERL_CFLAGS=$perlcppflags
Bram Moolenaar071d4272004-06-13 20:20:40 +00006835 fi
6836 if test "X$perlldflags" != "X"; then
Bram Moolenaar2bcaec32014-03-27 18:51:11 +01006837 if test "X`echo \"$LDFLAGS\" | $FGREP -e \"$perlldflags\"`" = "X"; then
Bram Moolenaara6cc0312013-06-18 23:31:55 +02006838 LDFLAGS="$perlldflags $LDFLAGS"
6839 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006840 fi
6841 PERL_LIBS=$perllibs
6842 PERL_SRC="auto/if_perl.c if_perlsfio.c"
6843 PERL_OBJ="objects/if_perl.o objects/if_perlsfio.o"
6844 PERL_PRO="if_perl.pro if_perlsfio.pro"
Illia Bobyra96d5442023-08-30 16:30:15 +02006845 printf "%s\n" "#define FEAT_PERL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00006846
6847 fi
6848 fi
6849 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006850 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: >>> too old; need Perl version 5.003_01 or later <<<" >&5
6851printf "%s\n" ">>> too old; need Perl version 5.003_01 or later <<<" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006852 fi
6853 fi
6854
Bram Moolenaard0573012017-10-28 21:11:06 +02006855 if test "x$MACOS_X" = "xyes"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00006856 dir=/System/Library/Perl
6857 darwindir=$dir/darwin
6858 if test -d $darwindir; then
6859 PERL=/usr/bin/perl
6860 else
6861 dir=/System/Library/Perl/5.8.1
6862 darwindir=$dir/darwin-thread-multi-2level
6863 if test -d $darwindir; then
6864 PERL=/usr/bin/perl
6865 fi
6866 fi
6867 if test -n "$PERL"; then
6868 PERL_DIR="$dir"
6869 PERL_CFLAGS="-DFEAT_PERL -I$darwindir/CORE"
6870 PERL_OBJ="objects/if_perl.o objects/if_perlsfio.o $darwindir/auto/DynaLoader/DynaLoader.a"
6871 PERL_LIBS="-L$darwindir/CORE -lperl"
6872 fi
Bram Moolenaar5dff57d2010-07-24 16:19:44 +02006873 PERL_LIBS=`echo "$PERL_LIBS" | sed -e 's/-arch\ ppc//' -e 's/-arch\ i386//' -e 's/-arch\ x86_64//'`
6874 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 +00006875 fi
Bram Moolenaare06c1882010-07-21 22:05:20 +02006876 if test "$enable_perlinterp" = "dynamic"; then
6877 if test "$perl_ok" = "yes" -a "X$libperl" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006878 printf "%s\n" "#define DYNAMIC_PERL 1" >>confdefs.h
Bram Moolenaare06c1882010-07-21 22:05:20 +02006879
6880 PERL_CFLAGS="-DDYNAMIC_PERL_DLL=\\\"$libperl\\\" $PERL_CFLAGS"
Christian Brabandt55460da2023-08-29 21:31:28 +02006881 PERL_LIBS=""
Bram Moolenaare06c1882010-07-21 22:05:20 +02006882 fi
6883 fi
Bram Moolenaarf788a062011-12-14 20:51:25 +01006884
6885 if test "$fail_if_missing" = "yes" -a "$perl_ok" != "yes"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01006886 as_fn_error $? "could not configure perl" "$LINENO" 5
Bram Moolenaarf788a062011-12-14 20:51:25 +01006887 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006888fi
6889
6890
6891
6892
6893
6894
6895
ichizok8bb3fe42021-12-28 15:51:45 +00006896
Illia Bobyra96d5442023-08-30 16:30:15 +02006897{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-pythoninterp argument" >&5
6898printf %s "checking --enable-pythoninterp argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00006899# Check whether --enable-pythoninterp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02006900if test ${enable_pythoninterp+y}
6901then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00006902 enableval=$enable_pythoninterp;
Christian Brabandt9670f612025-05-07 21:44:33 +02006903else case e in #(
6904 e) enable_pythoninterp="no" ;;
6905esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00006906fi
6907
Illia Bobyra96d5442023-08-30 16:30:15 +02006908{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_pythoninterp" >&5
6909printf "%s\n" "$enable_pythoninterp" >&6; }
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02006910if test "$enable_pythoninterp" = "yes" -o "$enable_pythoninterp" = "dynamic"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00006911 if test "$has_eval" = "no"; then
Martin Tournoij7904fa42022-10-04 16:28:45 +01006912 as_fn_error $? "cannot use Python with tiny features" "$LINENO" 5
Bram Moolenaar0b105412014-11-30 13:34:23 +01006913 fi
6914
Illia Bobyra96d5442023-08-30 16:30:15 +02006915 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-python-command argument" >&5
6916printf %s "checking --with-python-command argument... " >&6; }
Bram Moolenaare1a32312018-04-15 16:03:25 +02006917
6918
6919# Check whether --with-python-command was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02006920if test ${with_python_command+y}
6921then :
6922 withval=$with_python_command; vi_cv_path_python="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python" >&5
6923printf "%s\n" "$vi_cv_path_python" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +02006924else case e in #(
6925 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6926printf "%s\n" "no" >&6; } ;;
6927esac
Bram Moolenaare1a32312018-04-15 16:03:25 +02006928fi
6929
6930
6931 if test "X$vi_cv_path_python" = "X"; then
Bram Moolenaar09ba6d72012-12-12 14:25:05 +01006932 for ac_prog in python2 python
6933do
6934 # Extract the first word of "$ac_prog", so it can be a program name with args.
6935set dummy $ac_prog; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02006936{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6937printf %s "checking for $ac_word... " >&6; }
6938if test ${ac_cv_path_vi_cv_path_python+y}
6939then :
6940 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02006941else case e in #(
6942 e) case $vi_cv_path_python in
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006943 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00006944 ac_cv_path_vi_cv_path_python="$vi_cv_path_python" # Let the user override the test with a path.
6945 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00006946 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006947 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6948for as_dir in $PATH
6949do
6950 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02006951 case $as_dir in #(((
6952 '') as_dir=./ ;;
6953 */) ;;
6954 *) as_dir=$as_dir/ ;;
6955 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006956 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02006957 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6958 ac_cv_path_vi_cv_path_python="$as_dir$ac_word$ac_exec_ext"
6959 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006960 break 2
6961 fi
6962done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006963 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00006964IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006965
Bram Moolenaar071d4272004-06-13 20:20:40 +00006966 ;;
Christian Brabandt9670f612025-05-07 21:44:33 +02006967esac ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00006968esac
6969fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006970vi_cv_path_python=$ac_cv_path_vi_cv_path_python
Bram Moolenaar071d4272004-06-13 20:20:40 +00006971if test -n "$vi_cv_path_python"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006972 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python" >&5
6973printf "%s\n" "$vi_cv_path_python" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006974else
Illia Bobyra96d5442023-08-30 16:30:15 +02006975 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6976printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006977fi
6978
Bram Moolenaar446cb832008-06-24 21:56:24 +00006979
Bram Moolenaar09ba6d72012-12-12 14:25:05 +01006980 test -n "$vi_cv_path_python" && break
6981done
6982
Bram Moolenaare1a32312018-04-15 16:03:25 +02006983 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006984 if test "X$vi_cv_path_python" != "X"; then
6985
Illia Bobyra96d5442023-08-30 16:30:15 +02006986 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python version" >&5
6987printf %s "checking Python version... " >&6; }
6988if test ${vi_cv_var_python_version+y}
6989then :
6990 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02006991else case e in #(
6992 e) vi_cv_var_python_version=`
Bram Moolenaar071d4272004-06-13 20:20:40 +00006993 ${vi_cv_path_python} -c 'import sys; print sys.version[:3]'`
Christian Brabandt9670f612025-05-07 21:44:33 +02006994 ;;
6995esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00006996fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006997{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_var_python_version" >&5
6998printf "%s\n" "$vi_cv_var_python_version" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006999
Illia Bobyra96d5442023-08-30 16:30:15 +02007000 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python is 2.3 or better" >&5
7001printf %s "checking Python is 2.3 or better... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007002 if ${vi_cv_path_python} -c \
Bram Moolenaarc09a6d62013-06-10 21:27:29 +02007003 "import sys; sys.exit(${vi_cv_var_python_version} < 2.3)"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007004 then
Illia Bobyra96d5442023-08-30 16:30:15 +02007005 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yep" >&5
7006printf "%s\n" "yep" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007007
Illia Bobyra96d5442023-08-30 16:30:15 +02007008 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's install prefix" >&5
7009printf %s "checking Python's install prefix... " >&6; }
7010if test ${vi_cv_path_python_pfx+y}
7011then :
7012 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02007013else case e in #(
7014 e) vi_cv_path_python_pfx=`
Bram Moolenaar071d4272004-06-13 20:20:40 +00007015 ${vi_cv_path_python} -c \
Christian Brabandt9670f612025-05-07 21:44:33 +02007016 "import sys; print sys.prefix"` ;;
7017esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00007018fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007019{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python_pfx" >&5
7020printf "%s\n" "$vi_cv_path_python_pfx" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007021
Illia Bobyra96d5442023-08-30 16:30:15 +02007022 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's execution prefix" >&5
7023printf %s "checking Python's execution prefix... " >&6; }
7024if test ${vi_cv_path_python_epfx+y}
7025then :
7026 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02007027else case e in #(
7028 e) vi_cv_path_python_epfx=`
Bram Moolenaar071d4272004-06-13 20:20:40 +00007029 ${vi_cv_path_python} -c \
Christian Brabandt9670f612025-05-07 21:44:33 +02007030 "import sys; print sys.exec_prefix"` ;;
7031esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00007032fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007033{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python_epfx" >&5
7034printf "%s\n" "$vi_cv_path_python_epfx" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007035
Bram Moolenaar071d4272004-06-13 20:20:40 +00007036
Illia Bobyra96d5442023-08-30 16:30:15 +02007037 if test ${vi_cv_path_pythonpath+y}
7038then :
7039 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02007040else case e in #(
7041 e) vi_cv_path_pythonpath=`
Bram Moolenaar071d4272004-06-13 20:20:40 +00007042 unset PYTHONPATH;
7043 ${vi_cv_path_python} -c \
Christian Brabandt9670f612025-05-07 21:44:33 +02007044 "import sys, string; print string.join(sys.path,':')"` ;;
7045esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00007046fi
7047
7048
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007049
7050
Bram Moolenaar446cb832008-06-24 21:56:24 +00007051# Check whether --with-python-config-dir was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02007052if test ${with_python_config_dir+y}
7053then :
Bram Moolenaard0882402018-04-10 18:13:05 +02007054 withval=$with_python_config_dir; vi_cv_path_python_conf="${withval}"; have_python_config_dir=1
Bram Moolenaar446cb832008-06-24 21:56:24 +00007055fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00007056
Bram Moolenaar446cb832008-06-24 21:56:24 +00007057
Illia Bobyra96d5442023-08-30 16:30:15 +02007058 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's configuration directory" >&5
7059printf %s "checking Python's configuration directory... " >&6; }
7060if test ${vi_cv_path_python_conf+y}
7061then :
7062 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02007063else case e in #(
7064 e)
Bram Moolenaar071d4272004-06-13 20:20:40 +00007065 vi_cv_path_python_conf=
Bram Moolenaarac499e32013-06-02 19:14:17 +02007066 d=`${vi_cv_path_python} -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('LIBPL')"`
7067 if test -d "$d" && test -f "$d/config.c"; then
7068 vi_cv_path_python_conf="$d"
7069 else
7070 for path in "${vi_cv_path_python_pfx}" "${vi_cv_path_python_epfx}"; do
7071 for subdir in lib64 lib share; do
7072 d="${path}/${subdir}/python${vi_cv_var_python_version}/config"
7073 if test -d "$d" && test -f "$d/config.c"; then
7074 vi_cv_path_python_conf="$d"
7075 fi
7076 done
Bram Moolenaar071d4272004-06-13 20:20:40 +00007077 done
Bram Moolenaarac499e32013-06-02 19:14:17 +02007078 fi
Christian Brabandt9670f612025-05-07 21:44:33 +02007079 ;;
7080esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007081fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007082{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python_conf" >&5
7083printf "%s\n" "$vi_cv_path_python_conf" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007084
7085 PYTHON_CONFDIR="${vi_cv_path_python_conf}"
7086
7087 if test "X$PYTHON_CONFDIR" = "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007088 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: can't find it!" >&5
7089printf "%s\n" "can't find it!" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007090 else
7091
Illia Bobyra96d5442023-08-30 16:30:15 +02007092 if test ${vi_cv_path_python_plibs+y}
7093then :
7094 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02007095else case e in #(
7096 e)
Bram Moolenaar01dd60c2008-07-24 14:24:48 +00007097 pwd=`pwd`
7098 tmp_mkf="$pwd/config-PyMake$$"
7099 cat -- "${PYTHON_CONFDIR}/Makefile" - <<'eof' >"${tmp_mkf}"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007100__:
Bram Moolenaar218116c2010-05-20 21:46:00 +02007101 @echo "python_BASEMODLIBS='$(BASEMODLIBS)'"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007102 @echo "python_LIBS='$(LIBS)'"
7103 @echo "python_SYSLIBS='$(SYSLIBS)'"
7104 @echo "python_LINKFORSHARED='$(LINKFORSHARED)'"
Bram Moolenaarf94a13c2012-09-21 13:26:49 +02007105 @echo "python_DLLLIBRARY='$(DLLLIBRARY)'"
Bram Moolenaar2a7e2a62010-07-24 15:19:11 +02007106 @echo "python_INSTSONAME='$(INSTSONAME)'"
Bram Moolenaar6c927552015-03-24 12:21:33 +01007107 @echo "python_PYTHONFRAMEWORK='$(PYTHONFRAMEWORK)'"
7108 @echo "python_PYTHONFRAMEWORKPREFIX='$(PYTHONFRAMEWORKPREFIX)'"
7109 @echo "python_PYTHONFRAMEWORKINSTALLDIR='$(PYTHONFRAMEWORKINSTALLDIR)'"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007110eof
Bram Moolenaar01dd60c2008-07-24 14:24:48 +00007111 eval "`cd ${PYTHON_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`"
7112 rm -f -- "${tmp_mkf}"
Bram Moolenaard0573012017-10-28 21:11:06 +02007113 if test "x$MACOS_X" = "xyes" && test -n "${python_PYTHONFRAMEWORK}" && ${vi_cv_path_python} -c \
Bram Moolenaar071d4272004-06-13 20:20:40 +00007114 "import sys; sys.exit(${vi_cv_var_python_version} < 2.3)"; then
7115 vi_cv_path_python_plibs="-framework Python"
Bram Moolenaar6c927552015-03-24 12:21:33 +01007116 if test "x${vi_cv_path_python}" != "x/usr/bin/python" && test -n "${python_PYTHONFRAMEWORKPREFIX}"; then
7117 vi_cv_path_python_plibs="-F${python_PYTHONFRAMEWORKPREFIX} -framework Python"
7118 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00007119 else
Bram Moolenaar9ce42132018-04-11 22:19:36 +02007120 vi_cv_path_python_plibs="-L${PYTHON_CONFDIR} -lpython${vi_cv_var_python_version}"
Bram Moolenaara161e262015-03-24 15:14:27 +01007121 if test -n "${python_LINKFORSHARED}" && test -n "${python_PYTHONFRAMEWORKPREFIX}"; then
Bram Moolenaar6c927552015-03-24 12:21:33 +01007122 python_link_symbol=`echo ${python_LINKFORSHARED} | sed 's/\([^ \t][^ \t]*[ \t][ \t]*[^ \t][^ \t]*\)[ \t].*/\1/'`
7123 python_link_path=`echo ${python_LINKFORSHARED} | sed 's/\([^ \t][^ \t]*[ \t][ \t]*[^ \t][^ \t]*\)[ \t][ \t]*\(.*\)/\2/'`
7124 if test -n "${python_link_path}" && ! test -x "${python_link_path}"; then
7125 python_link_path="${python_PYTHONFRAMEWORKPREFIX}/${python_link_path}"
7126 if test -n "${python_link_path}" && ! test -x "${python_link_path}"; then
7127 python_link_path="${python_PYTHONFRAMEWORKINSTALLDIR}/Versions/${vi_cv_var_python_version}/${python_PYTHONFRAMEWORK}"
7128 fi
7129 python_LINKFORSHARED="${python_link_symbol} ${python_link_path}"
7130 fi
7131 fi
Bram Moolenaar218116c2010-05-20 21:46:00 +02007132 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 +00007133 vi_cv_path_python_plibs=`echo $vi_cv_path_python_plibs | sed s/-ltermcap//`
7134 fi
Christian Brabandt9670f612025-05-07 21:44:33 +02007135 ;;
7136esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00007137fi
7138
Illia Bobyra96d5442023-08-30 16:30:15 +02007139 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's dll name" >&5
7140printf %s "checking Python's dll name... " >&6; }
7141if test ${vi_cv_dll_name_python+y}
7142then :
7143 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02007144else case e in #(
7145 e)
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007146 if test "X$python_DLLLIBRARY" != "X"; then
7147 vi_cv_dll_name_python="$python_DLLLIBRARY"
7148 else
7149 vi_cv_dll_name_python="$python_INSTSONAME"
7150 fi
Christian Brabandt9670f612025-05-07 21:44:33 +02007151 ;;
7152esac
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007153fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007154{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_dll_name_python" >&5
7155printf "%s\n" "$vi_cv_dll_name_python" >&6; }
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007156
Bram Moolenaar071d4272004-06-13 20:20:40 +00007157 PYTHON_LIBS="${vi_cv_path_python_plibs}"
7158 if test "${vi_cv_path_python_pfx}" = "${vi_cv_path_python_epfx}"; then
Bram Moolenaar04249582018-04-10 13:29:34 +02007159 PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version}"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007160 else
Bram Moolenaar04249582018-04-10 13:29:34 +02007161 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 +00007162 fi
Bram Moolenaar3a21d9c2018-04-10 20:26:20 +02007163 if test "X$have_python_config_dir" = "X1" -a "$enable_pythoninterp" = "dynamic"; then
Bram Moolenaard0882402018-04-10 18:13:05 +02007164 PYTHON_CFLAGS="${PYTHON_CFLAGS} -DPYTHON_HOME='\"${vi_cv_path_python_pfx}\"'"
7165
7166 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00007167 PYTHON_SRC="if_python.c"
Bram Moolenaar9bdb9a02012-07-25 16:32:08 +02007168 PYTHON_OBJ="objects/if_python.o"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007169
Illia Bobyra96d5442023-08-30 16:30:15 +02007170 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -pthread should be used" >&5
7171printf %s "checking if -pthread should be used... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007172 threadsafe_flag=
7173 thread_lib=
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00007174 if test "$vim_cv_uname_output" != Darwin; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007175 test "$GCC" = yes && threadsafe_flag="-pthread"
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00007176 if test "$vim_cv_uname_output" = FreeBSD; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007177 threadsafe_flag="-D_THREAD_SAFE"
7178 thread_lib="-pthread"
7179 fi
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00007180 if test "$vim_cv_uname_output" = SunOS; then
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007181 threadsafe_flag="-pthreads"
7182 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00007183 fi
7184 libs_save_old=$LIBS
7185 if test -n "$threadsafe_flag"; then
7186 cflags_save=$CFLAGS
7187 CFLAGS="$CFLAGS $threadsafe_flag"
7188 LIBS="$LIBS $thread_lib"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007190/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00007191
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007192int
Illia Bobyra96d5442023-08-30 16:30:15 +02007193main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007194{
7195
7196 ;
7197 return 0;
7198}
7199_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02007200if ac_fn_c_try_link "$LINENO"
7201then :
7202 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7203printf "%s\n" "yes" >&6; }; PYTHON_CFLAGS="$PYTHON_CFLAGS $threadsafe_flag"
Christian Brabandt9670f612025-05-07 21:44:33 +02007204else case e in #(
7205 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +02007206printf "%s\n" "no" >&6; }; LIBS=$libs_save_old
Christian Brabandt9670f612025-05-07 21:44:33 +02007207 ;;
7208esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00007209fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007210rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007211 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +00007212 CFLAGS=$cflags_save
7213 else
Illia Bobyra96d5442023-08-30 16:30:15 +02007214 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7215printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007216 fi
7217
Illia Bobyra96d5442023-08-30 16:30:15 +02007218 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compile and link flags for Python are sane" >&5
7219printf %s "checking if compile and link flags for Python are sane... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007220 cflags_save=$CFLAGS
7221 libs_save=$LIBS
Bram Moolenaar69f787a2010-07-11 20:52:58 +02007222 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007223 LIBS="$LIBS $PYTHON_LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007225/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00007226
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007227int
Illia Bobyra96d5442023-08-30 16:30:15 +02007228main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007229{
7230
7231 ;
7232 return 0;
7233}
7234_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02007235if ac_fn_c_try_link "$LINENO"
7236then :
7237 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7238printf "%s\n" "yes" >&6; }; python_ok=yes
Christian Brabandt9670f612025-05-07 21:44:33 +02007239else case e in #(
7240 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no: PYTHON DISABLED" >&5
7241printf "%s\n" "no: PYTHON DISABLED" >&6; }; python_ok=no ;;
7242esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00007243fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007244rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007245 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +00007246 CFLAGS=$cflags_save
7247 LIBS=$libs_save
7248 if test $python_ok = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007249 printf "%s\n" "#define FEAT_PYTHON 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00007250
7251 else
7252 LIBS=$libs_save_old
7253 PYTHON_SRC=
7254 PYTHON_OBJ=
7255 PYTHON_LIBS=
7256 PYTHON_CFLAGS=
7257 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00007258 fi
7259 else
Illia Bobyra96d5442023-08-30 16:30:15 +02007260 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: too old" >&5
7261printf "%s\n" "too old" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007262 fi
7263 fi
Bram Moolenaarf788a062011-12-14 20:51:25 +01007264
7265 if test "$fail_if_missing" = "yes" -a "$python_ok" != "yes"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01007266 as_fn_error $? "could not configure python" "$LINENO" 5
Bram Moolenaarf788a062011-12-14 20:51:25 +01007267 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00007268fi
7269
7270
7271
7272
7273
7274
7275
ichizok8bb3fe42021-12-28 15:51:45 +00007276
Illia Bobyra96d5442023-08-30 16:30:15 +02007277{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-python3interp argument" >&5
7278printf %s "checking --enable-python3interp argument... " >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007279# Check whether --enable-python3interp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02007280if test ${enable_python3interp+y}
7281then :
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007282 enableval=$enable_python3interp;
Christian Brabandt9670f612025-05-07 21:44:33 +02007283else case e in #(
7284 e) enable_python3interp="no" ;;
7285esac
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007286fi
7287
Illia Bobyra96d5442023-08-30 16:30:15 +02007288{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_python3interp" >&5
7289printf "%s\n" "$enable_python3interp" >&6; }
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007290if test "$enable_python3interp" = "yes" -o "$enable_python3interp" = "dynamic"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00007291 if test "$has_eval" = "no"; then
Martin Tournoij7904fa42022-10-04 16:28:45 +01007292 as_fn_error $? "cannot use Python with tiny features" "$LINENO" 5
Bram Moolenaar0b105412014-11-30 13:34:23 +01007293 fi
7294
Illia Bobyra96d5442023-08-30 16:30:15 +02007295 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-python3-command argument" >&5
7296printf %s "checking --with-python3-command argument... " >&6; }
Bram Moolenaare1a32312018-04-15 16:03:25 +02007297
7298
7299# Check whether --with-python3-command was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02007300if test ${with_python3_command+y}
7301then :
7302 withval=$with_python3_command; vi_cv_path_python3="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3" >&5
7303printf "%s\n" "$vi_cv_path_python3" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +02007304else case e in #(
7305 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7306printf "%s\n" "no" >&6; } ;;
7307esac
Bram Moolenaare1a32312018-04-15 16:03:25 +02007308fi
7309
7310
7311 if test "X$vi_cv_path_python3" = "X"; then
Bram Moolenaar09ba6d72012-12-12 14:25:05 +01007312 for ac_prog in python3 python
7313do
7314 # Extract the first word of "$ac_prog", so it can be a program name with args.
7315set dummy $ac_prog; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02007316{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7317printf %s "checking for $ac_word... " >&6; }
7318if test ${ac_cv_path_vi_cv_path_python3+y}
7319then :
7320 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02007321else case e in #(
7322 e) case $vi_cv_path_python3 in
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007323 [\\/]* | ?:[\\/]*)
7324 ac_cv_path_vi_cv_path_python3="$vi_cv_path_python3" # Let the user override the test with a path.
7325 ;;
7326 *)
7327 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7328for as_dir in $PATH
7329do
7330 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02007331 case $as_dir in #(((
7332 '') as_dir=./ ;;
7333 */) ;;
7334 *) as_dir=$as_dir/ ;;
7335 esac
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007336 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02007337 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7338 ac_cv_path_vi_cv_path_python3="$as_dir$ac_word$ac_exec_ext"
7339 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007340 break 2
7341 fi
7342done
7343 done
7344IFS=$as_save_IFS
7345
7346 ;;
Christian Brabandt9670f612025-05-07 21:44:33 +02007347esac ;;
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007348esac
7349fi
7350vi_cv_path_python3=$ac_cv_path_vi_cv_path_python3
7351if test -n "$vi_cv_path_python3"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007352 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3" >&5
7353printf "%s\n" "$vi_cv_path_python3" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007354else
Illia Bobyra96d5442023-08-30 16:30:15 +02007355 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7356printf "%s\n" "no" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007357fi
7358
7359
Bram Moolenaar09ba6d72012-12-12 14:25:05 +01007360 test -n "$vi_cv_path_python3" && break
7361done
7362
Bram Moolenaare1a32312018-04-15 16:03:25 +02007363 fi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007364 if test "X$vi_cv_path_python3" != "X"; then
7365
Illia Bobyra96d5442023-08-30 16:30:15 +02007366 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python version" >&5
7367printf %s "checking Python version... " >&6; }
7368if test ${vi_cv_var_python3_version+y}
7369then :
7370 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02007371else case e in #(
7372 e) vi_cv_var_python3_version=`
Bram Moolenaar23c01922021-05-21 11:43:58 +02007373 ${vi_cv_path_python3} -c 'import sys; print("{}.{}".format(sys.version_info.major, sys.version_info.minor))'`
Christian Brabandt9670f612025-05-07 21:44:33 +02007374 ;;
7375esac
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007376fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007377{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_var_python3_version" >&5
7378printf "%s\n" "$vi_cv_var_python3_version" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007379
Illia Bobyra96d5442023-08-30 16:30:15 +02007380 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python is 3.0 or better" >&5
7381printf %s "checking Python is 3.0 or better... " >&6; }
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007382 if ${vi_cv_path_python3} -c \
7383 "import sys; sys.exit(${vi_cv_var_python3_version} < 3.0)"
7384 then
Illia Bobyra96d5442023-08-30 16:30:15 +02007385 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yep" >&5
7386printf "%s\n" "yep" >&6; }
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007387
Ken Takata1c032e32024-08-11 18:41:41 +02007388 python3_stable_abi_default=3.8
7389 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-python3-stable-abi argument" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +02007390printf %s "checking --with-python3-stable-abi argument... " >&6; }
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007391
7392
7393# Check whether --with-python3-stable-abi was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02007394if test ${with_python3_stable_abi+y}
7395then :
Ken Takata1c032e32024-08-11 18:41:41 +02007396 withval=$with_python3_stable_abi;
Christian Brabandt3f7024c2024-08-23 18:39:08 +02007397 if test "X$withval" = "Xyes"; then
7398 vi_cv_var_python3_stable_abi=$python3_stable_abi_default
7399 else
7400 vi_cv_var_python3_stable_abi="$withval"
7401 fi
7402 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_var_python3_stable_abi" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +02007403printf "%s\n" "$vi_cv_var_python3_stable_abi" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +02007404else case e in #(
7405 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7406printf "%s\n" "no" >&6; } ;;
7407esac
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007408fi
7409
Christian Brabandt3f7024c2024-08-23 18:39:08 +02007410 if test "X$vi_cv_var_python3_stable_abi" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007411 if test ${vi_cv_var_python3_stable_abi_hex+y}
7412then :
7413 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02007414else case e in #(
7415 e)
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007416 vi_cv_var_python3_stable_abi_hex=`
7417 ${vi_cv_path_python3} -c \
Christian Brabandt9670f612025-05-07 21:44:33 +02007418 "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) ))"` ;;
7419esac
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007420fi
7421
Yee Cheng Chine7d79eb2023-09-16 13:38:26 +02007422 if test "X$vi_cv_var_python3_stable_abi_hex" = "X"; then
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007423 as_fn_error $? "can't parse Python 3 stable ABI version. It should be \"<major>.<minor>\"" "$LINENO" 5
7424 fi
7425 fi
7426
Illia Bobyra96d5442023-08-30 16:30:15 +02007427 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's abiflags" >&5
7428printf %s "checking Python's abiflags... " >&6; }
7429if test ${vi_cv_var_python3_abiflags+y}
7430then :
7431 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02007432else case e in #(
7433 e)
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007434 vi_cv_var_python3_abiflags=
7435 if ${vi_cv_path_python3} -c \
7436 "import sys; sys.exit(${vi_cv_var_python3_version} < 3.2)"
7437 then
7438 vi_cv_var_python3_abiflags=`${vi_cv_path_python3} -c \
7439 "import sys; print(sys.abiflags)"`
Christian Brabandt9670f612025-05-07 21:44:33 +02007440 fi ;;
7441esac
Bram Moolenaar456f2bb2011-06-12 21:37:13 +02007442fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007443{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_var_python3_abiflags" >&5
7444printf "%s\n" "$vi_cv_var_python3_abiflags" >&6; }
Bram Moolenaar456f2bb2011-06-12 21:37:13 +02007445
Illia Bobyra96d5442023-08-30 16:30:15 +02007446 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's install prefix" >&5
7447printf %s "checking Python's install prefix... " >&6; }
7448if test ${vi_cv_path_python3_pfx+y}
7449then :
7450 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02007451else case e in #(
7452 e) vi_cv_path_python3_pfx=`
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007453 ${vi_cv_path_python3} -c \
Christian Brabandt9670f612025-05-07 21:44:33 +02007454 "import sys; print(sys.prefix)"` ;;
7455esac
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007456fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007457{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3_pfx" >&5
7458printf "%s\n" "$vi_cv_path_python3_pfx" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007459
Illia Bobyra96d5442023-08-30 16:30:15 +02007460 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's execution prefix" >&5
7461printf %s "checking Python's execution prefix... " >&6; }
7462if test ${vi_cv_path_python3_epfx+y}
7463then :
7464 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02007465else case e in #(
7466 e) vi_cv_path_python3_epfx=`
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007467 ${vi_cv_path_python3} -c \
Christian Brabandt9670f612025-05-07 21:44:33 +02007468 "import sys; print(sys.exec_prefix)"` ;;
7469esac
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007470fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007471{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3_epfx" >&5
7472printf "%s\n" "$vi_cv_path_python3_epfx" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007473
Illia Bobyra96d5442023-08-30 16:30:15 +02007474 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's include path" >&5
7475printf %s "checking Python's include path... " >&6; }
7476if test ${vi_cv_path_python3_include+y}
7477then :
7478 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02007479else case e in #(
7480 e) vi_cv_path_python3_include=`
Illia Bobyr74e1dad2023-08-27 18:26:54 +02007481 ${vi_cv_path_python3} -c \
Christian Brabandt9670f612025-05-07 21:44:33 +02007482 "import sysconfig; print(sysconfig.get_path(\"include\"))"` ;;
7483esac
Illia Bobyr74e1dad2023-08-27 18:26:54 +02007484fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007485{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3_include" >&5
7486printf "%s\n" "$vi_cv_path_python3_include" >&6; }
Illia Bobyr74e1dad2023-08-27 18:26:54 +02007487
Illia Bobyra96d5442023-08-30 16:30:15 +02007488 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's include path" >&5
7489printf %s "checking Python's include path... " >&6; }
7490if test ${vi_cv_path_python3_platinclude+y}
7491then :
7492 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02007493else case e in #(
7494 e) vi_cv_path_python3_platinclude=`
Illia Bobyr74e1dad2023-08-27 18:26:54 +02007495 ${vi_cv_path_python3} -c \
Christian Brabandt9670f612025-05-07 21:44:33 +02007496 "import sysconfig; print(sysconfig.get_path(\"platinclude\"))"` ;;
7497esac
Illia Bobyr74e1dad2023-08-27 18:26:54 +02007498fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007499{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3_platinclude" >&5
7500printf "%s\n" "$vi_cv_path_python3_platinclude" >&6; }
Illia Bobyr74e1dad2023-08-27 18:26:54 +02007501
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007502
Illia Bobyra96d5442023-08-30 16:30:15 +02007503 if test ${vi_cv_path_python3path+y}
7504then :
7505 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02007506else case e in #(
7507 e) vi_cv_path_python3path=`
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007508 unset PYTHONPATH;
7509 ${vi_cv_path_python3} -c \
Christian Brabandt9670f612025-05-07 21:44:33 +02007510 "import sys, string; print(':'.join(sys.path))"` ;;
7511esac
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007512fi
7513
7514
7515
7516
7517# Check whether --with-python3-config-dir was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02007518if test ${with_python3_config_dir+y}
7519then :
Bram Moolenaard0882402018-04-10 18:13:05 +02007520 withval=$with_python3_config_dir; vi_cv_path_python3_conf="${withval}"; have_python3_config_dir=1
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007521fi
7522
7523
Illia Bobyra96d5442023-08-30 16:30:15 +02007524 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's configuration directory" >&5
7525printf %s "checking Python's configuration directory... " >&6; }
7526if test ${vi_cv_path_python3_conf+y}
7527then :
7528 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02007529else case e in #(
7530 e)
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007531 vi_cv_path_python3_conf=
Bram Moolenaarfee496d2013-07-12 20:07:24 +02007532 config_dir="config-${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags}"
Zdenek Dohnal31e299c2021-06-10 18:50:55 +02007533 d=`${vi_cv_path_python3} -c "import sysconfig; print(sysconfig.get_config_var('LIBPL'))" 2> /dev/null`
7534 if test "x$d" = "x"; then
7535 d=`${vi_cv_path_python3} -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('LIBPL'))"`
7536 fi
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007537 if test -d "$d" && test -f "$d/config.c"; then
7538 vi_cv_path_python3_conf="$d"
7539 else
7540 for path in "${vi_cv_path_python3_pfx}" "${vi_cv_path_python3_epfx}"; do
7541 for subdir in lib64 lib share; do
7542 d="${path}/${subdir}/python${vi_cv_var_python3_version}/${config_dir}"
7543 if test -d "$d" && test -f "$d/config.c"; then
7544 vi_cv_path_python3_conf="$d"
7545 fi
7546 done
7547 done
7548 fi
Christian Brabandt9670f612025-05-07 21:44:33 +02007549 ;;
7550esac
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007551fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007552{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3_conf" >&5
7553printf "%s\n" "$vi_cv_path_python3_conf" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007554
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007555 PYTHON3_CONFDIR="${vi_cv_path_python3_conf}"
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007556
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007557 if test "X$PYTHON3_CONFDIR" = "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007558 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: can't find it!" >&5
7559printf "%s\n" "can't find it!" >&6; }
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007560 else
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007561
Illia Bobyra96d5442023-08-30 16:30:15 +02007562 if test ${vi_cv_path_python3_plibs+y}
7563then :
7564 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02007565else case e in #(
7566 e)
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007567 pwd=`pwd`
7568 tmp_mkf="$pwd/config-PyMake$$"
7569 cat -- "${PYTHON3_CONFDIR}/Makefile" - <<'eof' >"${tmp_mkf}"
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007570__:
Bram Moolenaar3804aeb2010-07-19 21:18:54 +02007571 @echo "python3_BASEMODLIBS='$(BASEMODLIBS)'"
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007572 @echo "python3_LIBS='$(LIBS)'"
7573 @echo "python3_SYSLIBS='$(SYSLIBS)'"
Bram Moolenaarf94a13c2012-09-21 13:26:49 +02007574 @echo "python3_DLLLIBRARY='$(DLLLIBRARY)'"
Bram Moolenaar2a7e2a62010-07-24 15:19:11 +02007575 @echo "python3_INSTSONAME='$(INSTSONAME)'"
Yee Cheng Chinb6ebe5a2023-04-05 18:24:50 +01007576 @echo "python3_PYTHONFRAMEWORKPREFIX='$(PYTHONFRAMEWORKPREFIX)'"
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007577eof
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007578 eval "`cd ${PYTHON3_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`"
7579 rm -f -- "${tmp_mkf}"
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007580 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 +02007581 vi_cv_path_python3_plibs="${vi_cv_path_python3_plibs} ${python3_BASEMODLIBS} ${python3_LIBS} ${python3_SYSLIBS}"
7582 vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-ltermcap//`
7583 vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-lffi//`
Christian Brabandt9670f612025-05-07 21:44:33 +02007584 ;;
7585esac
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007586fi
7587
Illia Bobyra96d5442023-08-30 16:30:15 +02007588 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python3's dll name" >&5
7589printf %s "checking Python3's dll name... " >&6; }
7590if test ${vi_cv_dll_name_python3+y}
7591then :
7592 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02007593else case e in #(
7594 e)
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007595 if test "X$python3_DLLLIBRARY" != "X"; then
7596 vi_cv_dll_name_python3="$python3_DLLLIBRARY"
Yee Cheng Chinb6ebe5a2023-04-05 18:24:50 +01007597 elif test "X$python3_PYTHONFRAMEWORKPREFIX" != "X"; then
7598 vi_cv_dll_name_python3="${python3_PYTHONFRAMEWORKPREFIX}/${python3_INSTSONAME}"
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007599 else
7600 vi_cv_dll_name_python3="$python3_INSTSONAME"
7601 fi
Christian Brabandt9670f612025-05-07 21:44:33 +02007602 ;;
7603esac
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007604fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007605{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_dll_name_python3" >&5
7606printf "%s\n" "$vi_cv_dll_name_python3" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007607
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007608 PYTHON3_LIBS="${vi_cv_path_python3_plibs}"
Illia Bobyr74e1dad2023-08-27 18:26:54 +02007609 if test "${vi_cv_path_python3_include}" = "${vi_cv_path_python3_platinclude}"; then
7610 PYTHON3_CFLAGS="-I${vi_cv_path_python3_include}"
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007611 else
Illia Bobyr74e1dad2023-08-27 18:26:54 +02007612 PYTHON3_CFLAGS="-I${vi_cv_path_python3_include} -I${vi_cv_path_python3_platinclude}"
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007613 fi
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007614 if test "X$have_python3_config_dir" = "X1" -a "$enable_python3interp" = "dynamic"; then
7615 PYTHON3_CFLAGS="${PYTHON3_CFLAGS} -DPYTHON3_HOME='L\"${vi_cv_path_python3_pfx}\"'"
7616 fi
7617 if test "X$vi_cv_var_python3_stable_abi_hex" != "X"; then
7618 PYTHON3_CFLAGS="${PYTHON3_CFLAGS} -DPy_LIMITED_API=${vi_cv_var_python3_stable_abi_hex}"
7619 fi
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007620 PYTHON3_SRC="if_python3.c"
7621 PYTHON3_OBJ="objects/if_python3.o"
7622
Illia Bobyra96d5442023-08-30 16:30:15 +02007623 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -pthread should be used" >&5
7624printf %s "checking if -pthread should be used... " >&6; }
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007625 threadsafe_flag=
7626 thread_lib=
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00007627 if test "$vim_cv_uname_output" != Darwin; then
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007628 test "$GCC" = yes && threadsafe_flag="-pthread"
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00007629 if test "$vim_cv_uname_output" = FreeBSD; then
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007630 threadsafe_flag="-D_THREAD_SAFE"
7631 thread_lib="-pthread"
7632 fi
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00007633 if test "$vim_cv_uname_output" = SunOS; then
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007634 threadsafe_flag="-pthreads"
7635 fi
7636 fi
7637 libs_save_old=$LIBS
7638 if test -n "$threadsafe_flag"; then
7639 cflags_save=$CFLAGS
7640 CFLAGS="$CFLAGS $threadsafe_flag"
7641 LIBS="$LIBS $thread_lib"
7642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007643/* end confdefs.h. */
7644
7645int
Illia Bobyra96d5442023-08-30 16:30:15 +02007646main (void)
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007647{
7648
7649 ;
7650 return 0;
7651}
7652_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02007653if ac_fn_c_try_link "$LINENO"
7654then :
7655 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7656printf "%s\n" "yes" >&6; }; PYTHON3_CFLAGS="$PYTHON3_CFLAGS $threadsafe_flag"
Christian Brabandt9670f612025-05-07 21:44:33 +02007657else case e in #(
7658 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +02007659printf "%s\n" "no" >&6; }; LIBS=$libs_save_old
Christian Brabandt9670f612025-05-07 21:44:33 +02007660 ;;
7661esac
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007662fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007663rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007664 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007665 CFLAGS=$cflags_save
7666 else
Illia Bobyra96d5442023-08-30 16:30:15 +02007667 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7668printf "%s\n" "no" >&6; }
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007669 fi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007670
Illia Bobyra96d5442023-08-30 16:30:15 +02007671 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compile and link flags for Python 3 are sane" >&5
7672printf %s "checking if compile and link flags for Python 3 are sane... " >&6; }
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007673 cflags_save=$CFLAGS
7674 libs_save=$LIBS
7675 CFLAGS="$CFLAGS $PYTHON3_CFLAGS"
7676 LIBS="$LIBS $PYTHON3_LIBS"
7677 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007678/* end confdefs.h. */
7679
7680int
Illia Bobyra96d5442023-08-30 16:30:15 +02007681main (void)
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007682{
7683
7684 ;
7685 return 0;
7686}
7687_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02007688if ac_fn_c_try_link "$LINENO"
7689then :
7690 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7691printf "%s\n" "yes" >&6; }; python3_ok=yes
Christian Brabandt9670f612025-05-07 21:44:33 +02007692else case e in #(
7693 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no: PYTHON3 DISABLED" >&5
7694printf "%s\n" "no: PYTHON3 DISABLED" >&6; }; python3_ok=no ;;
7695esac
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007696fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007697rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007698 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007699 CFLAGS=$cflags_save
7700 LIBS=$libs_save
7701 if test "$python3_ok" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007702 printf "%s\n" "#define FEAT_PYTHON3 1" >>confdefs.h
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007703
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007704 else
7705 LIBS=$libs_save_old
7706 PYTHON3_SRC=
7707 PYTHON3_OBJ=
7708 PYTHON3_LIBS=
7709 PYTHON3_CFLAGS=
7710 fi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007711 fi
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007712 else
Illia Bobyra96d5442023-08-30 16:30:15 +02007713 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: too old" >&5
7714printf "%s\n" "too old" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007715 fi
7716 fi
Bram Moolenaar1612b1a2013-06-14 21:22:39 +02007717 if test "$fail_if_missing" = "yes" -a "$python3_ok" != "yes"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01007718 as_fn_error $? "could not configure python3" "$LINENO" 5
Bram Moolenaar1612b1a2013-06-14 21:22:39 +02007719 fi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007720fi
7721
7722
7723
7724
7725
7726
ichizok8bb3fe42021-12-28 15:51:45 +00007727
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007728if test "$python_ok" = yes && test "$python3_ok" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007729 printf "%s\n" "#define DYNAMIC_PYTHON 1" >>confdefs.h
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007730
Illia Bobyra96d5442023-08-30 16:30:15 +02007731 printf "%s\n" "#define DYNAMIC_PYTHON3 1" >>confdefs.h
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007732
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007733 if test "X$vi_cv_var_python3_stable_abi_hex" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007734 printf "%s\n" "#define DYNAMIC_PYTHON3_STABLE_ABI 1" >>confdefs.h
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007735
7736 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007737 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we can do without RTLD_GLOBAL for Python" >&5
7738printf %s "checking whether we can do without RTLD_GLOBAL for Python... " >&6; }
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007739 cflags_save=$CFLAGS
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007740 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
Bram Moolenaar5d3fbf32015-03-05 16:47:20 +01007741 libs_save=$LIBS
7742 LIBS="-ldl $LIBS"
Illia Bobyra96d5442023-08-30 16:30:15 +02007743 if test "$cross_compiling" = yes
7744then :
Christian Brabandt9670f612025-05-07 21:44:33 +02007745 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
7746printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +01007747as_fn_error $? "cannot run test program while cross compiling
Christian Brabandt9670f612025-05-07 21:44:33 +02007748See 'config.log' for more details" "$LINENO" 5; }
7749else case e in #(
7750 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007751/* end confdefs.h. */
7752
7753 #include <dlfcn.h>
7754 /* If this program fails, then RTLD_GLOBAL is needed.
7755 * RTLD_GLOBAL will be used and then it is not possible to
7756 * have both python versions enabled in the same vim instance.
Bram Moolenaar84a05ac2013-05-06 04:24:17 +02007757 * Only the first python version used will be switched on.
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007758 */
7759
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +01007760 static int no_rtl_global_needed_for(char *python_instsoname, char *prefix)
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007761 {
7762 int needed = 0;
Bram Moolenaarba59ddb2016-01-28 15:34:25 +01007763 void* pylib = dlopen(python_instsoname, RTLD_LAZY|RTLD_LOCAL);
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007764 if (pylib != 0)
7765 {
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007766 void (*pfx)(char *home) = dlsym(pylib, "Py_SetPythonHome");
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007767 void (*init)(void) = dlsym(pylib, "Py_Initialize");
7768 int (*simple)(char*) = dlsym(pylib, "PyRun_SimpleString");
7769 void (*final)(void) = dlsym(pylib, "Py_Finalize");
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007770 (*pfx)(prefix);
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007771 (*init)();
7772 needed = (*simple)("import termios") == -1;
7773 (*final)();
7774 dlclose(pylib);
7775 }
7776 return !needed;
7777 }
7778
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +01007779 int main()
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007780 {
7781 int not_needed = 0;
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007782 if (no_rtl_global_needed_for("${vi_cv_dll_name_python}", "${vi_cv_path_python_pfx}"))
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007783 not_needed = 1;
7784 return !not_needed;
7785 }
7786_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02007787if ac_fn_c_try_run "$LINENO"
7788then :
7789 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7790printf "%s\n" "yes" >&6; };printf "%s\n" "#define PY_NO_RTLD_GLOBAL 1" >>confdefs.h
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007791
Christian Brabandt9670f612025-05-07 21:44:33 +02007792else case e in #(
7793 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7794printf "%s\n" "no" >&6; } ;;
7795esac
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007796fi
7797rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
Christian Brabandt9670f612025-05-07 21:44:33 +02007798 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
7799esac
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007800fi
7801
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007802
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007803 CFLAGS=$cflags_save
Bram Moolenaar5d3fbf32015-03-05 16:47:20 +01007804 LIBS=$libs_save
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007805
Illia Bobyra96d5442023-08-30 16:30:15 +02007806 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we can do without RTLD_GLOBAL for Python3" >&5
7807printf %s "checking whether we can do without RTLD_GLOBAL for Python3... " >&6; }
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007808 cflags_save=$CFLAGS
7809 CFLAGS="$CFLAGS $PYTHON3_CFLAGS"
Bram Moolenaar5d3fbf32015-03-05 16:47:20 +01007810 libs_save=$LIBS
7811 LIBS="-ldl $LIBS"
Illia Bobyra96d5442023-08-30 16:30:15 +02007812 if test "$cross_compiling" = yes
7813then :
Christian Brabandt9670f612025-05-07 21:44:33 +02007814 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
7815printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +01007816as_fn_error $? "cannot run test program while cross compiling
Christian Brabandt9670f612025-05-07 21:44:33 +02007817See 'config.log' for more details" "$LINENO" 5; }
7818else case e in #(
7819 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007820/* end confdefs.h. */
7821
7822 #include <dlfcn.h>
7823 #include <wchar.h>
7824 /* If this program fails, then RTLD_GLOBAL is needed.
7825 * RTLD_GLOBAL will be used and then it is not possible to
7826 * have both python versions enabled in the same vim instance.
Bram Moolenaar84a05ac2013-05-06 04:24:17 +02007827 * Only the first python version used will be switched on.
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007828 */
7829
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +01007830 static int no_rtl_global_needed_for(char *python_instsoname, wchar_t *prefix)
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007831 {
7832 int needed = 0;
Bram Moolenaarba59ddb2016-01-28 15:34:25 +01007833 void* pylib = dlopen(python_instsoname, RTLD_LAZY|RTLD_LOCAL);
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007834 if (pylib != 0)
7835 {
7836 void (*pfx)(wchar_t *home) = dlsym(pylib, "Py_SetPythonHome");
7837 void (*init)(void) = dlsym(pylib, "Py_Initialize");
7838 int (*simple)(char*) = dlsym(pylib, "PyRun_SimpleString");
7839 void (*final)(void) = dlsym(pylib, "Py_Finalize");
7840 (*pfx)(prefix);
7841 (*init)();
7842 needed = (*simple)("import termios") == -1;
7843 (*final)();
7844 dlclose(pylib);
7845 }
7846 return !needed;
7847 }
7848
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +01007849 int main()
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007850 {
7851 int not_needed = 0;
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007852 if (no_rtl_global_needed_for("${vi_cv_dll_name_python3}", L"${vi_cv_path_python3_pfx}"))
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007853 not_needed = 1;
7854 return !not_needed;
7855 }
7856_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02007857if ac_fn_c_try_run "$LINENO"
7858then :
7859 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7860printf "%s\n" "yes" >&6; };printf "%s\n" "#define PY3_NO_RTLD_GLOBAL 1" >>confdefs.h
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007861
Christian Brabandt9670f612025-05-07 21:44:33 +02007862else case e in #(
7863 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7864printf "%s\n" "no" >&6; } ;;
7865esac
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007866fi
7867rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
Christian Brabandt9670f612025-05-07 21:44:33 +02007868 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
7869esac
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007870fi
7871
7872
7873 CFLAGS=$cflags_save
Bram Moolenaar5d3fbf32015-03-05 16:47:20 +01007874 LIBS=$libs_save
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007875
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007876 PYTHON_SRC="if_python.c"
7877 PYTHON_OBJ="objects/if_python.o"
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007878 PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${vi_cv_dll_name_python}\\\""
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007879 PYTHON_LIBS=
7880 PYTHON3_SRC="if_python3.c"
7881 PYTHON3_OBJ="objects/if_python3.o"
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007882 PYTHON3_CFLAGS="$PYTHON3_CFLAGS -DDYNAMIC_PYTHON3_DLL=\\\"${vi_cv_dll_name_python3}\\\""
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007883 PYTHON3_LIBS=
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007884elif test "$python_ok" = yes && test "$enable_pythoninterp" = "dynamic"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007885 printf "%s\n" "#define DYNAMIC_PYTHON 1" >>confdefs.h
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007886
7887 PYTHON_SRC="if_python.c"
7888 PYTHON_OBJ="objects/if_python.o"
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007889 PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${vi_cv_dll_name_python}\\\""
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007890 PYTHON_LIBS=
Bram Moolenaare741f272013-07-09 21:57:52 +02007891elif test "$python_ok" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007892 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -fPIE can be added for Python" >&5
7893printf %s "checking if -fPIE can be added for Python... " >&6; }
Bram Moolenaare741f272013-07-09 21:57:52 +02007894 cflags_save=$CFLAGS
7895 libs_save=$LIBS
7896 CFLAGS="$CFLAGS $PYTHON_CFLAGS -fPIE"
7897 LIBS="$LIBS $PYTHON_LIBS"
7898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7899/* end confdefs.h. */
7900
7901int
Illia Bobyra96d5442023-08-30 16:30:15 +02007902main (void)
Bram Moolenaare741f272013-07-09 21:57:52 +02007903{
7904
7905 ;
7906 return 0;
7907}
7908_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02007909if ac_fn_c_try_link "$LINENO"
7910then :
7911 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7912printf "%s\n" "yes" >&6; }; fpie_ok=yes
Christian Brabandt9670f612025-05-07 21:44:33 +02007913else case e in #(
7914 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7915printf "%s\n" "no" >&6; }; fpie_ok=no ;;
7916esac
Bram Moolenaare741f272013-07-09 21:57:52 +02007917fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007918rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaare741f272013-07-09 21:57:52 +02007919 conftest$ac_exeext conftest.$ac_ext
7920 CFLAGS=$cflags_save
7921 LIBS=$libs_save
7922 if test $fpie_ok = yes; then
7923 PYTHON_CFLAGS="$PYTHON_CFLAGS -fPIE"
7924 fi
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007925elif test "$python3_ok" = yes && test "$enable_python3interp" = "dynamic"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007926 printf "%s\n" "#define DYNAMIC_PYTHON3 1" >>confdefs.h
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007927
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007928 if test "X$vi_cv_var_python3_stable_abi_hex" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007929 printf "%s\n" "#define DYNAMIC_PYTHON3_STABLE_ABI 1" >>confdefs.h
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007930
7931 fi
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007932 PYTHON3_SRC="if_python3.c"
7933 PYTHON3_OBJ="objects/if_python3.o"
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007934 PYTHON3_CFLAGS="$PYTHON3_CFLAGS -DDYNAMIC_PYTHON3_DLL=\\\"${vi_cv_dll_name_python3}\\\""
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007935 PYTHON3_LIBS=
Bram Moolenaare741f272013-07-09 21:57:52 +02007936elif test "$python3_ok" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007937 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -fPIE can be added for Python3" >&5
7938printf %s "checking if -fPIE can be added for Python3... " >&6; }
Bram Moolenaare741f272013-07-09 21:57:52 +02007939 cflags_save=$CFLAGS
7940 libs_save=$LIBS
7941 CFLAGS="$CFLAGS $PYTHON3_CFLAGS -fPIE"
7942 LIBS="$LIBS $PYTHON3_LIBS"
7943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7944/* end confdefs.h. */
7945
7946int
Illia Bobyra96d5442023-08-30 16:30:15 +02007947main (void)
Bram Moolenaare741f272013-07-09 21:57:52 +02007948{
7949
7950 ;
7951 return 0;
7952}
7953_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02007954if ac_fn_c_try_link "$LINENO"
7955then :
7956 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7957printf "%s\n" "yes" >&6; }; fpie_ok=yes
Christian Brabandt9670f612025-05-07 21:44:33 +02007958else case e in #(
7959 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7960printf "%s\n" "no" >&6; }; fpie_ok=no ;;
7961esac
Bram Moolenaare741f272013-07-09 21:57:52 +02007962fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007963rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaare741f272013-07-09 21:57:52 +02007964 conftest$ac_exeext conftest.$ac_ext
7965 CFLAGS=$cflags_save
7966 LIBS=$libs_save
7967 if test $fpie_ok = yes; then
7968 PYTHON3_CFLAGS="$PYTHON3_CFLAGS -fPIE"
7969 fi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007970fi
7971
Illia Bobyra96d5442023-08-30 16:30:15 +02007972{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-tclinterp argument" >&5
7973printf %s "checking --enable-tclinterp argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00007974# Check whether --enable-tclinterp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02007975if test ${enable_tclinterp+y}
7976then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00007977 enableval=$enable_tclinterp;
Christian Brabandt9670f612025-05-07 21:44:33 +02007978else case e in #(
7979 e) enable_tclinterp="no" ;;
7980esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00007981fi
7982
Illia Bobyra96d5442023-08-30 16:30:15 +02007983{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_tclinterp" >&5
7984printf "%s\n" "$enable_tclinterp" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007985
Bram Moolenaar8a5115c2016-01-09 19:41:11 +01007986if test "$enable_tclinterp" = "yes" -o "$enable_tclinterp" = "dynamic"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007987
Illia Bobyra96d5442023-08-30 16:30:15 +02007988 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-tclsh argument" >&5
7989printf %s "checking --with-tclsh argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007990
Bram Moolenaar446cb832008-06-24 21:56:24 +00007991# Check whether --with-tclsh was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02007992if test ${with_tclsh+y}
7993then :
7994 withval=$with_tclsh; tclsh_name="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tclsh_name" >&5
7995printf "%s\n" "$tclsh_name" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +02007996else case e in #(
7997 e) tclsh_name="tclsh8.5"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7998printf "%s\n" "no" >&6; } ;;
7999esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00008000fi
8001
Bram Moolenaar071d4272004-06-13 20:20:40 +00008002 # Extract the first word of "$tclsh_name", so it can be a program name with args.
8003set dummy $tclsh_name; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02008004{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8005printf %s "checking for $ac_word... " >&6; }
8006if test ${ac_cv_path_vi_cv_path_tcl+y}
8007then :
8008 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02008009else case e in #(
8010 e) case $vi_cv_path_tcl in
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008011 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00008012 ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
8013 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00008014 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008015 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8016for as_dir in $PATH
8017do
8018 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02008019 case $as_dir in #(((
8020 '') as_dir=./ ;;
8021 */) ;;
8022 *) as_dir=$as_dir/ ;;
8023 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008024 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02008025 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8026 ac_cv_path_vi_cv_path_tcl="$as_dir$ac_word$ac_exec_ext"
8027 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008028 break 2
8029 fi
8030done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008031 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00008032IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008033
Bram Moolenaar071d4272004-06-13 20:20:40 +00008034 ;;
Christian Brabandt9670f612025-05-07 21:44:33 +02008035esac ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00008036esac
8037fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008038vi_cv_path_tcl=$ac_cv_path_vi_cv_path_tcl
Bram Moolenaar071d4272004-06-13 20:20:40 +00008039if test -n "$vi_cv_path_tcl"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008040 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_tcl" >&5
8041printf "%s\n" "$vi_cv_path_tcl" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008042else
Illia Bobyra96d5442023-08-30 16:30:15 +02008043 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8044printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008045fi
8046
Bram Moolenaar071d4272004-06-13 20:20:40 +00008047
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008048
Bram Moolenaar446cb832008-06-24 21:56:24 +00008049
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00008050 if test "X$vi_cv_path_tcl" = "X" -a $tclsh_name = "tclsh8.5"; then
8051 tclsh_name="tclsh8.4"
8052 # Extract the first word of "$tclsh_name", so it can be a program name with args.
8053set dummy $tclsh_name; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02008054{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8055printf %s "checking for $ac_word... " >&6; }
8056if test ${ac_cv_path_vi_cv_path_tcl+y}
8057then :
8058 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02008059else case e in #(
8060 e) case $vi_cv_path_tcl in
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00008061 [\\/]* | ?:[\\/]*)
8062 ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
8063 ;;
8064 *)
8065 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8066for as_dir in $PATH
8067do
8068 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02008069 case $as_dir in #(((
8070 '') as_dir=./ ;;
8071 */) ;;
8072 *) as_dir=$as_dir/ ;;
8073 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008074 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02008075 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8076 ac_cv_path_vi_cv_path_tcl="$as_dir$ac_word$ac_exec_ext"
8077 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00008078 break 2
8079 fi
8080done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008081 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00008082IFS=$as_save_IFS
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00008083
8084 ;;
Christian Brabandt9670f612025-05-07 21:44:33 +02008085esac ;;
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00008086esac
8087fi
8088vi_cv_path_tcl=$ac_cv_path_vi_cv_path_tcl
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00008089if test -n "$vi_cv_path_tcl"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008090 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_tcl" >&5
8091printf "%s\n" "$vi_cv_path_tcl" >&6; }
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00008092else
Illia Bobyra96d5442023-08-30 16:30:15 +02008093 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8094printf "%s\n" "no" >&6; }
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00008095fi
8096
Bram Moolenaar446cb832008-06-24 21:56:24 +00008097
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00008098 fi
8099 if test "X$vi_cv_path_tcl" = "X" -a $tclsh_name = "tclsh8.4"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008100 tclsh_name="tclsh8.2"
8101 # Extract the first word of "$tclsh_name", so it can be a program name with args.
8102set dummy $tclsh_name; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02008103{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8104printf %s "checking for $ac_word... " >&6; }
8105if test ${ac_cv_path_vi_cv_path_tcl+y}
8106then :
8107 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02008108else case e in #(
8109 e) case $vi_cv_path_tcl in
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008110 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00008111 ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
8112 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00008113 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008114 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8115for as_dir in $PATH
8116do
8117 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02008118 case $as_dir in #(((
8119 '') as_dir=./ ;;
8120 */) ;;
8121 *) as_dir=$as_dir/ ;;
8122 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008123 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02008124 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8125 ac_cv_path_vi_cv_path_tcl="$as_dir$ac_word$ac_exec_ext"
8126 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008127 break 2
8128 fi
8129done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008130 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00008131IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008132
Bram Moolenaar071d4272004-06-13 20:20:40 +00008133 ;;
Christian Brabandt9670f612025-05-07 21:44:33 +02008134esac ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00008135esac
8136fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008137vi_cv_path_tcl=$ac_cv_path_vi_cv_path_tcl
Bram Moolenaar071d4272004-06-13 20:20:40 +00008138if test -n "$vi_cv_path_tcl"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008139 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_tcl" >&5
8140printf "%s\n" "$vi_cv_path_tcl" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008141else
Illia Bobyra96d5442023-08-30 16:30:15 +02008142 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8143printf "%s\n" "no" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008144fi
8145
Bram Moolenaar446cb832008-06-24 21:56:24 +00008146
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008147 fi
8148 if test "X$vi_cv_path_tcl" = "X" -a $tclsh_name = "tclsh8.2"; then
8149 tclsh_name="tclsh8.0"
8150 # Extract the first word of "$tclsh_name", so it can be a program name with args.
8151set dummy $tclsh_name; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02008152{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8153printf %s "checking for $ac_word... " >&6; }
8154if test ${ac_cv_path_vi_cv_path_tcl+y}
8155then :
8156 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02008157else case e in #(
8158 e) case $vi_cv_path_tcl in
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008159 [\\/]* | ?:[\\/]*)
8160 ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
8161 ;;
8162 *)
8163 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8164for as_dir in $PATH
8165do
8166 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02008167 case $as_dir in #(((
8168 '') as_dir=./ ;;
8169 */) ;;
8170 *) as_dir=$as_dir/ ;;
8171 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008172 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02008173 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8174 ac_cv_path_vi_cv_path_tcl="$as_dir$ac_word$ac_exec_ext"
8175 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008176 break 2
8177 fi
8178done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008179 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00008180IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008181
8182 ;;
Christian Brabandt9670f612025-05-07 21:44:33 +02008183esac ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008184esac
8185fi
8186vi_cv_path_tcl=$ac_cv_path_vi_cv_path_tcl
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008187if test -n "$vi_cv_path_tcl"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008188 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_tcl" >&5
8189printf "%s\n" "$vi_cv_path_tcl" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008190else
Illia Bobyra96d5442023-08-30 16:30:15 +02008191 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8192printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008193fi
8194
Bram Moolenaar446cb832008-06-24 21:56:24 +00008195
Bram Moolenaar071d4272004-06-13 20:20:40 +00008196 fi
8197 if test "X$vi_cv_path_tcl" = "X"; then
8198 tclsh_name="tclsh"
8199 # Extract the first word of "$tclsh_name", so it can be a program name with args.
8200set dummy $tclsh_name; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02008201{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8202printf %s "checking for $ac_word... " >&6; }
8203if test ${ac_cv_path_vi_cv_path_tcl+y}
8204then :
8205 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02008206else case e in #(
8207 e) case $vi_cv_path_tcl in
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008208 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00008209 ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
8210 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00008211 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008212 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8213for as_dir in $PATH
8214do
8215 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02008216 case $as_dir in #(((
8217 '') as_dir=./ ;;
8218 */) ;;
8219 *) as_dir=$as_dir/ ;;
8220 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008221 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02008222 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8223 ac_cv_path_vi_cv_path_tcl="$as_dir$ac_word$ac_exec_ext"
8224 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008225 break 2
8226 fi
8227done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008228 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00008229IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008230
Bram Moolenaar071d4272004-06-13 20:20:40 +00008231 ;;
Christian Brabandt9670f612025-05-07 21:44:33 +02008232esac ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00008233esac
8234fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008235vi_cv_path_tcl=$ac_cv_path_vi_cv_path_tcl
Bram Moolenaar071d4272004-06-13 20:20:40 +00008236if test -n "$vi_cv_path_tcl"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008237 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_tcl" >&5
8238printf "%s\n" "$vi_cv_path_tcl" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008239else
Illia Bobyra96d5442023-08-30 16:30:15 +02008240 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8241printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008242fi
8243
Bram Moolenaar446cb832008-06-24 21:56:24 +00008244
Bram Moolenaar071d4272004-06-13 20:20:40 +00008245 fi
8246 if test "X$vi_cv_path_tcl" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008247 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Tcl version" >&5
8248printf %s "checking Tcl version... " >&6; }
Bram Moolenaar49222be2015-12-11 18:11:30 +01008249 if echo 'exit [expr [info tclversion] < 8.0]' | "$vi_cv_path_tcl" - ; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008250 tclver=`echo 'puts [info tclversion]' | $vi_cv_path_tcl -`
Illia Bobyra96d5442023-08-30 16:30:15 +02008251 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tclver - OK" >&5
8252printf "%s\n" "$tclver - OK" >&6; };
Bram Moolenaar071d4272004-06-13 20:20:40 +00008253 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 +01008254 tcldll=`echo 'puts libtcl[info tclversion][info sharedlibextension]' | $vi_cv_path_tcl -`
Bram Moolenaar071d4272004-06-13 20:20:40 +00008255
Illia Bobyra96d5442023-08-30 16:30:15 +02008256 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for location of Tcl include" >&5
8257printf %s "checking for location of Tcl include... " >&6; }
Bram Moolenaard0573012017-10-28 21:11:06 +02008258 if test "x$MACOS_X" != "xyes"; then
Bram Moolenaar446cb832008-06-24 21:56:24 +00008259 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 +00008260 else
Bram Moolenaarf4ee5282020-07-30 20:18:08 +02008261 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 +00008262 fi
Bram Moolenaar0ff8f602008-02-20 11:44:03 +00008263 TCL_INC=
Bram Moolenaar071d4272004-06-13 20:20:40 +00008264 for try in $tclinc; do
8265 if test -f "$try/tcl.h"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008266 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $try/tcl.h" >&5
8267printf "%s\n" "$try/tcl.h" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008268 TCL_INC=$try
8269 break
8270 fi
8271 done
8272 if test -z "$TCL_INC"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008273 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <not found>" >&5
8274printf "%s\n" "<not found>" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008275 SKIP_TCL=YES
8276 fi
8277 if test -z "$SKIP_TCL"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008278 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for location of tclConfig.sh script" >&5
8279printf %s "checking for location of tclConfig.sh script... " >&6; }
Bram Moolenaard0573012017-10-28 21:11:06 +02008280 if test "x$MACOS_X" != "xyes"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008281 tclcnf=`echo $tclinc | sed s/include/lib/g`
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00008282 tclcnf="$tclcnf `echo $tclinc | sed s/include/lib64/g`"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008283 else
Bram Moolenaarf4ee5282020-07-30 20:18:08 +02008284 tclcnf=`echo $tclinc | sed s/include/lib/g`
8285 tclcnf="$tclcnf /System/Library/Frameworks/Tcl.framework `xcrun --show-sdk-path`/System/Library/Frameworks/Tcl.framework"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008286 fi
8287 for try in $tclcnf; do
Bram Moolenaar49222be2015-12-11 18:11:30 +01008288 if test -f "$try/tclConfig.sh"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008289 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $try/tclConfig.sh" >&5
8290printf "%s\n" "$try/tclConfig.sh" >&6; }
Bram Moolenaar49222be2015-12-11 18:11:30 +01008291 . "$try/tclConfig.sh"
Bram Moolenaar8a5115c2016-01-09 19:41:11 +01008292 if test "$enable_tclinterp" = "dynamic"; then
8293 TCL_LIBS=`eval echo "$TCL_STUB_LIB_SPEC $TCL_LIBS"`
8294 else
8295 TCL_LIBS=`eval echo "$TCL_LIB_SPEC $TCL_LIBS"`
8296 fi
Bram Moolenaar4394bff2008-07-24 11:21:31 +00008297 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 +00008298 break
8299 fi
8300 done
8301 if test -z "$TCL_LIBS"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008302 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <not found>" >&5
8303printf "%s\n" "<not found>" >&6; }
8304 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Tcl library by myself" >&5
8305printf %s "checking for Tcl library by myself... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008306 tcllib=`echo $tclinc | sed s/include/lib/g`
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00008307 tcllib="$tcllib `echo $tclinc | sed s/include/lib64/g`"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008308 for ext in .so .a ; do
8309 for ver in "" $tclver ; do
8310 for try in $tcllib ; do
8311 trylib=tcl$ver$ext
Bram Moolenaar49222be2015-12-11 18:11:30 +01008312 if test -f "$try/lib$trylib" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008313 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $try/lib$trylib" >&5
8314printf "%s\n" "$try/lib$trylib" >&6; }
Bram Moolenaar49222be2015-12-11 18:11:30 +01008315 TCL_LIBS="-L\"$try\" -ltcl$ver -ldl -lm"
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00008316 if test "$vim_cv_uname_output" = SunOS &&
8317 echo $vim_cv_uname_r_output | grep '^5' >/dev/null; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008318 TCL_LIBS="$TCL_LIBS -R $try"
8319 fi
8320 break 3
8321 fi
8322 done
8323 done
8324 done
8325 if test -z "$TCL_LIBS"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008326 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <not found>" >&5
8327printf "%s\n" "<not found>" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008328 SKIP_TCL=YES
8329 fi
8330 fi
8331 if test -z "$SKIP_TCL"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008332 printf "%s\n" "#define FEAT_TCL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00008333
8334 TCL_SRC=if_tcl.c
8335 TCL_OBJ=objects/if_tcl.o
8336 TCL_PRO=if_tcl.pro
8337 TCL_CFLAGS="-I$TCL_INC $TCL_DEFS"
8338 fi
8339 fi
8340 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008341 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: too old; need Tcl version 8.0 or later" >&5
8342printf "%s\n" "too old; need Tcl version 8.0 or later" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008343 fi
8344 fi
Bram Moolenaar8a5115c2016-01-09 19:41:11 +01008345 if test "$enable_tclinterp" = "dynamic"; then
8346 if test "X$TCL_SRC" != "X" -a "X$tcldll" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008347 printf "%s\n" "#define DYNAMIC_TCL 1" >>confdefs.h
Bram Moolenaar8a5115c2016-01-09 19:41:11 +01008348
8349 TCL_CFLAGS="-DDYNAMIC_TCL_DLL=\\\"$tcldll\\\" -DDYNAMIC_TCL_VER=\\\"$tclver\\\" $TCL_CFLAGS"
8350 fi
8351 fi
Bram Moolenaarf788a062011-12-14 20:51:25 +01008352 if test "$fail_if_missing" = "yes" -a -z "$TCL_SRC"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01008353 as_fn_error $? "could not configure Tcl" "$LINENO" 5
Bram Moolenaarf788a062011-12-14 20:51:25 +01008354 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00008355fi
8356
8357
8358
8359
8360
8361
ichizok8bb3fe42021-12-28 15:51:45 +00008362
Illia Bobyra96d5442023-08-30 16:30:15 +02008363{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-rubyinterp argument" >&5
8364printf %s "checking --enable-rubyinterp argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00008365# Check whether --enable-rubyinterp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008366if test ${enable_rubyinterp+y}
8367then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00008368 enableval=$enable_rubyinterp;
Christian Brabandt9670f612025-05-07 21:44:33 +02008369else case e in #(
8370 e) enable_rubyinterp="no" ;;
8371esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00008372fi
8373
Illia Bobyra96d5442023-08-30 16:30:15 +02008374{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_rubyinterp" >&5
8375printf "%s\n" "$enable_rubyinterp" >&6; }
Bram Moolenaar3ca71f12010-10-27 16:49:47 +02008376if test "$enable_rubyinterp" = "yes" -o "$enable_rubyinterp" = "dynamic"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00008377 if test "$has_eval" = "no"; then
Martin Tournoij7904fa42022-10-04 16:28:45 +01008378 as_fn_error $? "cannot use Ruby with tiny features" "$LINENO" 5
Bram Moolenaar0b105412014-11-30 13:34:23 +01008379 fi
8380
Illia Bobyra96d5442023-08-30 16:30:15 +02008381 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-ruby-command argument" >&5
8382printf %s "checking --with-ruby-command argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008383
Bram Moolenaar948733a2011-05-05 18:10:16 +02008384
Bram Moolenaar165641d2010-02-17 16:23:09 +01008385# Check whether --with-ruby-command was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008386if test ${with_ruby_command+y}
8387then :
8388 withval=$with_ruby_command; RUBY_CMD="$withval"; vi_cv_path_ruby="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RUBY_CMD" >&5
8389printf "%s\n" "$RUBY_CMD" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +02008390else case e in #(
8391 e) RUBY_CMD="ruby"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: defaulting to $RUBY_CMD" >&5
8392printf "%s\n" "defaulting to $RUBY_CMD" >&6; } ;;
8393esac
Bram Moolenaar165641d2010-02-17 16:23:09 +01008394fi
8395
Bram Moolenaar165641d2010-02-17 16:23:09 +01008396 # Extract the first word of "$RUBY_CMD", so it can be a program name with args.
8397set dummy $RUBY_CMD; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02008398{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8399printf %s "checking for $ac_word... " >&6; }
8400if test ${ac_cv_path_vi_cv_path_ruby+y}
8401then :
8402 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02008403else case e in #(
8404 e) case $vi_cv_path_ruby in
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008405 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00008406 ac_cv_path_vi_cv_path_ruby="$vi_cv_path_ruby" # Let the user override the test with a path.
8407 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00008408 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008409 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8410for as_dir in $PATH
8411do
8412 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02008413 case $as_dir in #(((
8414 '') as_dir=./ ;;
8415 */) ;;
8416 *) as_dir=$as_dir/ ;;
8417 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008418 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02008419 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8420 ac_cv_path_vi_cv_path_ruby="$as_dir$ac_word$ac_exec_ext"
8421 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008422 break 2
8423 fi
8424done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008425 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00008426IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008427
Bram Moolenaar071d4272004-06-13 20:20:40 +00008428 ;;
Christian Brabandt9670f612025-05-07 21:44:33 +02008429esac ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00008430esac
8431fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008432vi_cv_path_ruby=$ac_cv_path_vi_cv_path_ruby
Bram Moolenaar071d4272004-06-13 20:20:40 +00008433if test -n "$vi_cv_path_ruby"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008434 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_ruby" >&5
8435printf "%s\n" "$vi_cv_path_ruby" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008436else
Illia Bobyra96d5442023-08-30 16:30:15 +02008437 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8438printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008439fi
8440
Bram Moolenaar446cb832008-06-24 21:56:24 +00008441
Bram Moolenaar071d4272004-06-13 20:20:40 +00008442 if test "X$vi_cv_path_ruby" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008443 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Ruby version" >&5
8444printf %s "checking Ruby version... " >&6; }
K.Takata236ccbf2022-09-22 16:12:06 +01008445 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 +02008446 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: OK" >&5
8447printf "%s\n" "OK" >&6; }
8448 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Ruby rbconfig" >&5
8449printf %s "checking Ruby rbconfig... " >&6; }
Bram Moolenaar81398892012-10-03 21:09:35 +02008450 ruby_rbconfig="RbConfig"
8451 if ! $vi_cv_path_ruby -r rbconfig -e 'RbConfig' >/dev/null 2>/dev/null; then
8452 ruby_rbconfig="Config"
8453 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008454 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ruby_rbconfig" >&5
8455printf "%s\n" "$ruby_rbconfig" >&6; }
8456 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Ruby header files" >&5
8457printf %s "checking Ruby header files... " >&6; }
Bram Moolenaar81398892012-10-03 21:09:35 +02008458 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 +00008459 if test "X$rubyhdrdir" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008460 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $rubyhdrdir" >&5
8461printf "%s\n" "$rubyhdrdir" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008462 RUBY_CFLAGS="-I$rubyhdrdir"
Bram Moolenaara6fd37b2014-03-27 17:19:09 +01008463 rubyarchdir=`$vi_cv_path_ruby -r rbconfig -e "print ($ruby_rbconfig::CONFIG.has_key? 'rubyarchhdrdir') ? $ruby_rbconfig::CONFIG['rubyarchhdrdir'] : '$rubyhdrdir/'+$ruby_rbconfig::CONFIG['arch']"`
8464 if test -d "$rubyarchdir"; then
8465 RUBY_CFLAGS="$RUBY_CFLAGS -I$rubyarchdir"
Bram Moolenaar165641d2010-02-17 16:23:09 +01008466 fi
Bram Moolenaar81398892012-10-03 21:09:35 +02008467 rubyversion=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG['ruby_version'].gsub(/\./, '')[0,2]"`
Bram Moolenaar026a4452013-08-07 15:22:23 +02008468 if test "X$rubyversion" = "X"; then
K.Takata236ccbf2022-09-22 16:12:06 +01008469 rubyversion=`$vi_cv_path_ruby -e "print RUBY_VERSION.gsub(/\./, '')[0,2]"`
Bram Moolenaar026a4452013-08-07 15:22:23 +02008470 fi
Bram Moolenaar165641d2010-02-17 16:23:09 +01008471 RUBY_CFLAGS="$RUBY_CFLAGS -DRUBY_VERSION=$rubyversion"
Bram Moolenaar81398892012-10-03 21:09:35 +02008472 rubylibs=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG['LIBS']"`
Bram Moolenaar071d4272004-06-13 20:20:40 +00008473 if test "X$rubylibs" != "X"; then
8474 RUBY_LIBS="$rubylibs"
8475 fi
Bram Moolenaar81398892012-10-03 21:09:35 +02008476 librubyarg=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG['LIBRUBYARG'])"`
8477 librubya=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG['LIBRUBY_A'])"`
Bram Moolenaarac499e32013-06-02 19:14:17 +02008478 rubylibdir=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG['libdir'])"`
Illia Bobyre379e212023-09-30 22:59:27 +02008479 if test -f "$rubylibdir/$librubya" || expr "$librubyarg" : "-lruby" >/dev/null; then
Bram Moolenaarac499e32013-06-02 19:14:17 +02008480 RUBY_LIBS="$RUBY_LIBS -L$rubylibdir"
8481 elif test "$librubyarg" = "libruby.a"; then
8482 librubyarg="-lruby"
8483 RUBY_LIBS="$RUBY_LIBS -L$rubylibdir"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008484 fi
8485
8486 if test "X$librubyarg" != "X"; then
8487 RUBY_LIBS="$librubyarg $RUBY_LIBS"
8488 fi
Zdenek Dohnal1d822af2022-11-23 12:06:08 +00008489
8490
Bram Moolenaar071d4272004-06-13 20:20:40 +00008491 RUBY_SRC="if_ruby.c"
8492 RUBY_OBJ="objects/if_ruby.o"
8493 RUBY_PRO="if_ruby.pro"
Illia Bobyra96d5442023-08-30 16:30:15 +02008494 printf "%s\n" "#define FEAT_RUBY 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00008495
Bram Moolenaar3ca71f12010-10-27 16:49:47 +02008496 if test "$enable_rubyinterp" = "dynamic"; then
Bram Moolenaar92021622017-10-12 12:33:43 +02008497 libruby_soname=`$vi_cv_path_ruby -r rbconfig -e "puts $ruby_rbconfig::CONFIG['LIBRUBY_ALIASES'].split[0]"`
Bram Moolenaar87ea64c2018-08-04 15:13:34 +02008498 if test -z "$libruby_soname"; then
8499 libruby_soname=`$vi_cv_path_ruby -r rbconfig -e "puts $ruby_rbconfig::CONFIG['LIBRUBY_SO']"`
8500 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008501 printf "%s\n" "#define DYNAMIC_RUBY 1" >>confdefs.h
Bram Moolenaar3ca71f12010-10-27 16:49:47 +02008502
Bram Moolenaar41a41412020-01-07 21:32:19 +01008503 RUBY_CFLAGS="-DDYNAMIC_RUBY_DLL=\\\"$libruby_soname\\\" $RUBY_CFLAGS"
Bram Moolenaar3ca71f12010-10-27 16:49:47 +02008504 RUBY_LIBS=
8505 fi
Bram Moolenaar864a28b2020-12-28 21:36:56 +01008506 if test "X$CLANG_VERSION" != "X" -a "$rubyversion" -ge 30; then
8507 RUBY_CFLAGS="$RUBY_CFLAGS -fdeclspec"
8508 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00008509 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008510 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found; disabling Ruby" >&5
8511printf "%s\n" "not found; disabling Ruby" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008512 fi
8513 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008514 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: too old; need Ruby version 1.9.1 or later" >&5
8515printf "%s\n" "too old; need Ruby version 1.9.1 or later" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008516 fi
8517 fi
Bram Moolenaarf788a062011-12-14 20:51:25 +01008518
8519 if test "$fail_if_missing" = "yes" -a -z "$RUBY_OBJ"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01008520 as_fn_error $? "could not configure Ruby" "$LINENO" 5
Bram Moolenaarf788a062011-12-14 20:51:25 +01008521 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00008522fi
8523
8524
8525
8526
8527
8528
ichizok8bb3fe42021-12-28 15:51:45 +00008529
Illia Bobyra96d5442023-08-30 16:30:15 +02008530{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-cscope argument" >&5
8531printf %s "checking --enable-cscope argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00008532# Check whether --enable-cscope was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008533if test ${enable_cscope+y}
8534then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00008535 enableval=$enable_cscope;
Christian Brabandt9670f612025-05-07 21:44:33 +02008536else case e in #(
8537 e) enable_cscope="no" ;;
8538esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00008539fi
8540
Illia Bobyra96d5442023-08-30 16:30:15 +02008541{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_cscope" >&5
8542printf "%s\n" "$enable_cscope" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008543if test "$enable_cscope" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008544 printf "%s\n" "#define FEAT_CSCOPE 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00008545
8546fi
8547
Illia Bobyra96d5442023-08-30 16:30:15 +02008548{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-netbeans argument" >&5
8549printf %s "checking --disable-netbeans argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00008550# Check whether --enable-netbeans was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008551if test ${enable_netbeans+y}
8552then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00008553 enableval=$enable_netbeans;
Christian Brabandt9670f612025-05-07 21:44:33 +02008554else case e in #(
8555 e) enable_netbeans="yes" ;;
8556esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00008557fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008558
Bram Moolenaar446cb832008-06-24 21:56:24 +00008559if test "$enable_netbeans" = "yes"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00008560 if test "$has_eval" = "no"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008561 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot use NetBeans with tiny features" >&5
8562printf "%s\n" "cannot use NetBeans with tiny features" >&6; }
Bram Moolenaar3c124e32016-01-31 14:36:58 +01008563 enable_netbeans="no"
8564 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008565 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8566printf "%s\n" "no" >&6; }
Bram Moolenaar3c124e32016-01-31 14:36:58 +01008567 fi
Bram Moolenaare0874f82016-01-24 20:36:41 +01008568else
Illia Bobyra96d5442023-08-30 16:30:15 +02008569 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8570printf "%s\n" "yes" >&6; }
Bram Moolenaare0874f82016-01-24 20:36:41 +01008571fi
8572
Illia Bobyra96d5442023-08-30 16:30:15 +02008573{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-channel argument" >&5
8574printf %s "checking --disable-channel argument... " >&6; }
Bram Moolenaare0874f82016-01-24 20:36:41 +01008575# Check whether --enable-channel was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008576if test ${enable_channel+y}
8577then :
Bram Moolenaare0874f82016-01-24 20:36:41 +01008578 enableval=$enable_channel;
Christian Brabandt9670f612025-05-07 21:44:33 +02008579else case e in #(
8580 e) enable_channel="yes" ;;
8581esac
Bram Moolenaare0874f82016-01-24 20:36:41 +01008582fi
8583
8584if test "$enable_channel" = "yes"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00008585 if test "$has_eval" = "no"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008586 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot use channels with tiny features" >&5
8587printf "%s\n" "cannot use channels with tiny features" >&6; }
Bram Moolenaar3c124e32016-01-31 14:36:58 +01008588 enable_channel="no"
8589 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008590 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8591printf "%s\n" "no" >&6; }
Bram Moolenaar3c124e32016-01-31 14:36:58 +01008592 fi
Bram Moolenaare0874f82016-01-24 20:36:41 +01008593else
Bram Moolenaar16435482016-01-24 21:31:54 +01008594 if test "$enable_netbeans" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008595 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, netbeans also disabled" >&5
8596printf "%s\n" "yes, netbeans also disabled" >&6; }
Bram Moolenaar16435482016-01-24 21:31:54 +01008597 enable_netbeans="no"
8598 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008599 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8600printf "%s\n" "yes" >&6; }
Bram Moolenaar16435482016-01-24 21:31:54 +01008601 fi
Bram Moolenaare0874f82016-01-24 20:36:41 +01008602fi
8603
Bram Moolenaar16435482016-01-24 21:31:54 +01008604if test "$enable_channel" = "yes"; then
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008605 if test "x$HAIKU" = "xyes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008606 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socket in -lnetwork" >&5
8607printf %s "checking for socket in -lnetwork... " >&6; }
8608if test ${ac_cv_lib_network_socket+y}
8609then :
8610 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02008611else case e in #(
8612 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008613LIBS="-lnetwork $LIBS"
8614cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8615/* end confdefs.h. */
8616
8617/* Override any GCC internal prototype to avoid an error.
8618 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +02008619 builtin and then its argument prototype would still apply.
8620 The 'extern "C"' is for builds by C++ compilers;
8621 although this is not generally supported in C code supporting it here
8622 has little cost and some practical benefit (sr 110532). */
8623#ifdef __cplusplus
8624extern "C"
8625#endif
8626char socket (void);
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008627int
Illia Bobyra96d5442023-08-30 16:30:15 +02008628main (void)
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008629{
8630return socket ();
8631 ;
8632 return 0;
8633}
8634_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02008635if ac_fn_c_try_link "$LINENO"
8636then :
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008637 ac_cv_lib_network_socket=yes
Christian Brabandt9670f612025-05-07 21:44:33 +02008638else case e in #(
8639 e) ac_cv_lib_network_socket=no ;;
8640esac
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008641fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008642rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008643 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +02008644LIBS=$ac_check_lib_save_LIBS ;;
8645esac
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008646fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008647{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_network_socket" >&5
8648printf "%s\n" "$ac_cv_lib_network_socket" >&6; }
8649if test "x$ac_cv_lib_network_socket" = xyes
8650then :
8651 printf "%s\n" "#define HAVE_LIBNETWORK 1" >>confdefs.h
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008652
8653 LIBS="-lnetwork $LIBS"
8654
8655fi
8656
8657 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008658 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8659printf %s "checking for socket in -lsocket... " >&6; }
8660if test ${ac_cv_lib_socket_socket+y}
8661then :
8662 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02008663else case e in #(
8664 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00008665LIBS="-lsocket $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008666cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008667/* end confdefs.h. */
8668
Bram Moolenaar446cb832008-06-24 21:56:24 +00008669/* Override any GCC internal prototype to avoid an error.
8670 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +02008671 builtin and then its argument prototype would still apply.
8672 The 'extern "C"' is for builds by C++ compilers;
8673 although this is not generally supported in C code supporting it here
8674 has little cost and some practical benefit (sr 110532). */
8675#ifdef __cplusplus
8676extern "C"
8677#endif
8678char socket (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008679int
Illia Bobyra96d5442023-08-30 16:30:15 +02008680main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008681{
Bram Moolenaar446cb832008-06-24 21:56:24 +00008682return socket ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008683 ;
8684 return 0;
8685}
8686_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02008687if ac_fn_c_try_link "$LINENO"
8688then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008689 ac_cv_lib_socket_socket=yes
Christian Brabandt9670f612025-05-07 21:44:33 +02008690else case e in #(
8691 e) ac_cv_lib_socket_socket=no ;;
8692esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00008693fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008694rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008695 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +02008696LIBS=$ac_check_lib_save_LIBS ;;
8697esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008698fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008699{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8700printf "%s\n" "$ac_cv_lib_socket_socket" >&6; }
8701if test "x$ac_cv_lib_socket_socket" = xyes
8702then :
8703 printf "%s\n" "#define HAVE_LIBSOCKET 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00008704
8705 LIBS="-lsocket $LIBS"
8706
Bram Moolenaar071d4272004-06-13 20:20:40 +00008707fi
8708
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008709 fi
8710
Illia Bobyra96d5442023-08-30 16:30:15 +02008711 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether compiling with IPv6 networking is possible" >&5
8712printf %s "checking whether compiling with IPv6 networking is possible... " >&6; }
8713if test ${vim_cv_ipv6_networking+y}
8714then :
8715 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02008716else case e in #(
8717 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008718/* end confdefs.h. */
8719
8720#include <stdio.h>
8721#include <stdlib.h>
8722#include <stdarg.h>
8723#include <fcntl.h>
8724#include <netdb.h>
8725#include <netinet/in.h>
8726#include <errno.h>
8727#include <sys/types.h>
8728#include <sys/socket.h>
8729 /* Check bitfields */
8730 struct nbbuf {
8731 unsigned int initDone:1;
8732 unsigned short signmaplen;
8733 };
8734
8735int
Illia Bobyra96d5442023-08-30 16:30:15 +02008736main (void)
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008737{
8738
8739 /* Check creating a socket. */
8740 struct sockaddr_in server;
8741 struct addrinfo *res;
8742 (void)socket(AF_INET, SOCK_STREAM, 0);
8743 (void)htons(100);
8744 (void)getaddrinfo("microsoft.com", NULL, NULL, &res);
8745 if (errno == ECONNREFUSED)
8746 (void)connect(1, (struct sockaddr *)&server, sizeof(server));
8747 (void)freeaddrinfo(res);
8748
8749 ;
8750 return 0;
8751}
8752_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02008753if ac_fn_c_try_link "$LINENO"
8754then :
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008755 vim_cv_ipv6_networking="yes"
Christian Brabandt9670f612025-05-07 21:44:33 +02008756else case e in #(
8757 e) vim_cv_ipv6_networking="no" ;;
8758esac
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008759fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008760rm -f core conftest.err conftest.$ac_objext conftest.beam \
Christian Brabandt9670f612025-05-07 21:44:33 +02008761 conftest$ac_exeext conftest.$ac_ext ;;
8762esac
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008763fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008764{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_ipv6_networking" >&5
8765printf "%s\n" "$vim_cv_ipv6_networking" >&6; }
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008766
8767 if test "x$vim_cv_ipv6_networking" = "xyes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008768 printf "%s\n" "#define FEAT_IPV6 1" >>confdefs.h
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008769
Illia Bobyra96d5442023-08-30 16:30:15 +02008770 ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
8771if test "x$ac_cv_func_inet_ntop" = xyes
8772then :
8773 printf "%s\n" "#define HAVE_INET_NTOP 1" >>confdefs.h
Bram Moolenaarb6fb0512020-04-18 18:24:18 +02008774
8775fi
Bram Moolenaarb6fb0512020-04-18 18:24:18 +02008776
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008777 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008778 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
8779printf %s "checking for gethostbyname in -lnsl... " >&6; }
8780if test ${ac_cv_lib_nsl_gethostbyname+y}
8781then :
8782 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02008783else case e in #(
8784 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00008785LIBS="-lnsl $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008786cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008787/* end confdefs.h. */
8788
Bram Moolenaar446cb832008-06-24 21:56:24 +00008789/* Override any GCC internal prototype to avoid an error.
8790 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +02008791 builtin and then its argument prototype would still apply.
8792 The 'extern "C"' is for builds by C++ compilers;
8793 although this is not generally supported in C code supporting it here
8794 has little cost and some practical benefit (sr 110532). */
8795#ifdef __cplusplus
8796extern "C"
8797#endif
8798char gethostbyname (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008799int
Illia Bobyra96d5442023-08-30 16:30:15 +02008800main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008801{
Bram Moolenaar446cb832008-06-24 21:56:24 +00008802return gethostbyname ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008803 ;
8804 return 0;
8805}
8806_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02008807if ac_fn_c_try_link "$LINENO"
8808then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008809 ac_cv_lib_nsl_gethostbyname=yes
Christian Brabandt9670f612025-05-07 21:44:33 +02008810else case e in #(
8811 e) ac_cv_lib_nsl_gethostbyname=no ;;
8812esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00008813fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008814rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008815 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +02008816LIBS=$ac_check_lib_save_LIBS ;;
8817esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008818fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008819{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
8820printf "%s\n" "$ac_cv_lib_nsl_gethostbyname" >&6; }
8821if test "x$ac_cv_lib_nsl_gethostbyname" = xyes
8822then :
8823 printf "%s\n" "#define HAVE_LIBNSL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00008824
8825 LIBS="-lnsl $LIBS"
8826
Bram Moolenaar071d4272004-06-13 20:20:40 +00008827fi
8828
Illia Bobyra96d5442023-08-30 16:30:15 +02008829 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether compiling with IPv4 networking is possible" >&5
8830printf %s "checking whether compiling with IPv4 networking is possible... " >&6; }
8831if test ${vim_cv_ipv4_networking+y}
8832then :
8833 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02008834else case e in #(
8835 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008836/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00008837
8838#include <stdio.h>
8839#include <stdlib.h>
8840#include <stdarg.h>
8841#include <fcntl.h>
8842#include <netdb.h>
8843#include <netinet/in.h>
8844#include <errno.h>
8845#include <sys/types.h>
8846#include <sys/socket.h>
8847 /* Check bitfields */
8848 struct nbbuf {
8849 unsigned int initDone:1;
Bram Moolenaar63de19e2016-12-09 20:11:26 +01008850 unsigned short signmaplen;
Bram Moolenaar071d4272004-06-13 20:20:40 +00008851 };
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008852
8853int
Illia Bobyra96d5442023-08-30 16:30:15 +02008854main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008855{
Bram Moolenaar071d4272004-06-13 20:20:40 +00008856
8857 /* Check creating a socket. */
8858 struct sockaddr_in server;
8859 (void)socket(AF_INET, SOCK_STREAM, 0);
8860 (void)htons(100);
8861 (void)gethostbyname("microsoft.com");
8862 if (errno == ECONNREFUSED)
8863 (void)connect(1, (struct sockaddr *)&server, sizeof(server));
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008864
8865 ;
8866 return 0;
8867}
8868_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02008869if ac_fn_c_try_link "$LINENO"
8870then :
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008871 vim_cv_ipv4_networking="yes"
Christian Brabandt9670f612025-05-07 21:44:33 +02008872else case e in #(
8873 e) vim_cv_ipv4_networking="no"; enable_netbeans="no"; enable_channel="no" ;;
8874esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00008875fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008876rm -f core conftest.err conftest.$ac_objext conftest.beam \
Christian Brabandt9670f612025-05-07 21:44:33 +02008877 conftest$ac_exeext conftest.$ac_ext ;;
8878esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00008879fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008880{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_ipv4_networking" >&5
8881printf "%s\n" "$vim_cv_ipv4_networking" >&6; }
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008882 fi
8883fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00008884if test "$enable_netbeans" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008885 printf "%s\n" "#define FEAT_NETBEANS_INTG 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00008886
8887 NETBEANS_SRC="netbeans.c"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008888
Bram Moolenaar071d4272004-06-13 20:20:40 +00008889 NETBEANS_OBJ="objects/netbeans.o"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008890
Bram Moolenaar071d4272004-06-13 20:20:40 +00008891fi
Bram Moolenaare0874f82016-01-24 20:36:41 +01008892if test "$enable_channel" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008893 printf "%s\n" "#define FEAT_JOB_CHANNEL 1" >>confdefs.h
Bram Moolenaare0874f82016-01-24 20:36:41 +01008894
Bram Moolenaar8b5866d2020-09-05 15:48:51 +02008895 CHANNEL_SRC="job.c channel.c"
Bram Moolenaare0874f82016-01-24 20:36:41 +01008896
Bram Moolenaar8b5866d2020-09-05 15:48:51 +02008897 CHANNEL_OBJ="objects/job.o objects/channel.o"
Bram Moolenaare0874f82016-01-24 20:36:41 +01008898
8899fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00008900
Illia Bobyra96d5442023-08-30 16:30:15 +02008901{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-terminal argument" >&5
8902printf %s "checking --enable-terminal argument... " >&6; }
Bram Moolenaare4f25e42017-07-07 11:54:15 +02008903# Check whether --enable-terminal was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008904if test ${enable_terminal+y}
8905then :
Bram Moolenaaref839562017-10-28 20:28:23 +02008906 enableval=$enable_terminal;
Christian Brabandt9670f612025-05-07 21:44:33 +02008907else case e in #(
8908 e) enable_terminal="auto" ;;
8909esac
Bram Moolenaare4f25e42017-07-07 11:54:15 +02008910fi
8911
Bram Moolenaar595a4022017-09-03 19:15:57 +02008912if test "$enable_terminal" = "yes" || test "$enable_terminal" = "auto" -a "x$features" = "xhuge" ; then
Bram Moolenaar12471262022-01-18 11:11:25 +00008913 if test "$has_eval" = "no"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008914 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot use terminal emulator with tiny features" >&5
8915printf "%s\n" "cannot use terminal emulator with tiny features" >&6; }
Bram Moolenaare4f25e42017-07-07 11:54:15 +02008916 enable_terminal="no"
8917 else
Bram Moolenaar595a4022017-09-03 19:15:57 +02008918 if test "$enable_terminal" = "auto"; then
8919 enable_terminal="yes"
Illia Bobyra96d5442023-08-30 16:30:15 +02008920 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: defaulting to yes" >&5
8921printf "%s\n" "defaulting to yes" >&6; }
Bram Moolenaar595a4022017-09-03 19:15:57 +02008922 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008923 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8924printf "%s\n" "yes" >&6; }
Bram Moolenaar595a4022017-09-03 19:15:57 +02008925 fi
Bram Moolenaare4f25e42017-07-07 11:54:15 +02008926 fi
8927else
Bram Moolenaar595a4022017-09-03 19:15:57 +02008928 if test "$enable_terminal" = "auto"; then
8929 enable_terminal="no"
Illia Bobyra96d5442023-08-30 16:30:15 +02008930 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: defaulting to no" >&5
8931printf "%s\n" "defaulting to no" >&6; }
Bram Moolenaar595a4022017-09-03 19:15:57 +02008932 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008933 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8934printf "%s\n" "no" >&6; }
Bram Moolenaar595a4022017-09-03 19:15:57 +02008935 fi
Bram Moolenaare4f25e42017-07-07 11:54:15 +02008936fi
Bram Moolenaar8b423282017-12-16 14:37:06 +01008937if test "$enable_terminal" = "yes" -a "$enable_channel" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008938 printf "%s\n" "#define FEAT_TERMINAL 1" >>confdefs.h
Bram Moolenaare4f25e42017-07-07 11:54:15 +02008939
Bram Moolenaar93268052019-10-10 13:22:54 +02008940 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 +02008941
Bram Moolenaar93268052019-10-10 13:22:54 +02008942 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 +02008943
Bram Moolenaar823edd12019-10-23 22:35:36 +02008944 TERM_TEST="test_libvterm"
8945
Bram Moolenaare4f25e42017-07-07 11:54:15 +02008946fi
8947
Illia Bobyra96d5442023-08-30 16:30:15 +02008948{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-autoservername argument" >&5
8949printf %s "checking --enable-autoservername argument... " >&6; }
Bram Moolenaare42a6d22017-11-12 19:21:51 +01008950# Check whether --enable-autoservername was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008951if test ${enable_autoservername+y}
8952then :
Bram Moolenaare42a6d22017-11-12 19:21:51 +01008953 enableval=$enable_autoservername;
Christian Brabandt9670f612025-05-07 21:44:33 +02008954else case e in #(
8955 e) enable_autoservername="no" ;;
8956esac
Bram Moolenaare42a6d22017-11-12 19:21:51 +01008957fi
8958
Illia Bobyra96d5442023-08-30 16:30:15 +02008959{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_autoservername" >&5
8960printf "%s\n" "$enable_autoservername" >&6; }
Bram Moolenaare42a6d22017-11-12 19:21:51 +01008961if test "$enable_autoservername" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008962 printf "%s\n" "#define FEAT_AUTOSERVERNAME 1" >>confdefs.h
Bram Moolenaare42a6d22017-11-12 19:21:51 +01008963
8964fi
8965
Illia Bobyra96d5442023-08-30 16:30:15 +02008966{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-multibyte argument" >&5
8967printf %s "checking --enable-multibyte argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00008968# Check whether --enable-multibyte was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008969if test ${enable_multibyte+y}
8970then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00008971 enableval=$enable_multibyte;
Christian Brabandt9670f612025-05-07 21:44:33 +02008972else case e in #(
8973 e) enable_multibyte="yes" ;;
8974esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00008975fi
8976
Illia Bobyra96d5442023-08-30 16:30:15 +02008977{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_multibyte" >&5
8978printf "%s\n" "$enable_multibyte" >&6; }
Bram Moolenaar30276f22019-01-24 17:59:39 +01008979if test "$enable_multibyte" != "yes"; then
Bram Moolenaar2be7cb72019-01-12 16:10:51 +01008980 as_fn_error $? "The multi-byte feature can no longer be disabled. If you have
8981 a problem with this, discuss on the Vim mailing list." "$LINENO" 5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008982fi
8983
Illia Bobyra96d5442023-08-30 16:30:15 +02008984{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-rightleft argument" >&5
8985printf %s "checking --disable-rightleft argument... " >&6; }
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008986# Check whether --enable-rightleft was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008987if test ${enable_rightleft+y}
8988then :
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008989 enableval=$enable_rightleft;
Christian Brabandt9670f612025-05-07 21:44:33 +02008990else case e in #(
8991 e) enable_rightleft="yes" ;;
8992esac
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008993fi
8994
8995if test "$enable_rightleft" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008996 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8997printf "%s\n" "no" >&6; }
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008998else
Illia Bobyra96d5442023-08-30 16:30:15 +02008999 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9000printf "%s\n" "yes" >&6; }
9001 printf "%s\n" "#define DISABLE_RIGHTLEFT 1" >>confdefs.h
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01009002
9003fi
9004
Illia Bobyra96d5442023-08-30 16:30:15 +02009005{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-arabic argument" >&5
9006printf %s "checking --disable-arabic argument... " >&6; }
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01009007# Check whether --enable-arabic was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02009008if test ${enable_arabic+y}
9009then :
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01009010 enableval=$enable_arabic;
Christian Brabandt9670f612025-05-07 21:44:33 +02009011else case e in #(
9012 e) enable_arabic="yes" ;;
9013esac
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01009014fi
9015
9016if test "$enable_arabic" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009017 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9018printf "%s\n" "no" >&6; }
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01009019else
Illia Bobyra96d5442023-08-30 16:30:15 +02009020 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9021printf "%s\n" "yes" >&6; }
9022 printf "%s\n" "#define DISABLE_ARABIC 1" >>confdefs.h
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01009023
9024fi
9025
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01009026# Check whether --enable-farsi was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02009027if test ${enable_farsi+y}
9028then :
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01009029 enableval=$enable_farsi;
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01009030fi
9031
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01009032
Illia Bobyra96d5442023-08-30 16:30:15 +02009033{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-xim argument" >&5
9034printf %s "checking --enable-xim argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00009035# Check whether --enable-xim was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02009036if test ${enable_xim+y}
9037then :
9038 enableval=$enable_xim; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_xim" >&5
9039printf "%s\n" "$enable_xim" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +02009040else case e in #(
9041 e) enable_xim="auto"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: defaulting to auto" >&5
9042printf "%s\n" "defaulting to auto" >&6; } ;;
9043esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00009044fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00009045
Bram Moolenaar446cb832008-06-24 21:56:24 +00009046
Illia Bobyra96d5442023-08-30 16:30:15 +02009047{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-fontset argument" >&5
9048printf %s "checking --enable-fontset argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00009049# Check whether --enable-fontset was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02009050if test ${enable_fontset+y}
9051then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00009052 enableval=$enable_fontset;
Christian Brabandt9670f612025-05-07 21:44:33 +02009053else case e in #(
9054 e) enable_fontset="no" ;;
9055esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00009056fi
9057
Illia Bobyra96d5442023-08-30 16:30:15 +02009058{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_fontset" >&5
9059printf "%s\n" "$enable_fontset" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009060
9061test -z "$with_x" && with_x=yes
Bram Moolenaard0573012017-10-28 21:11:06 +02009062test "${enable_gui-yes}" != no -a "x$MACOS_X" != "xyes" -a "x$QNX" != "xyes" && with_x=yes
Bram Moolenaar071d4272004-06-13 20:20:40 +00009063if test "$with_x" = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009064 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: defaulting to: don't HAVE_X11" >&5
9065printf "%s\n" "defaulting to: don't HAVE_X11" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009066else
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009067
Bram Moolenaar071d4272004-06-13 20:20:40 +00009068 # Extract the first word of "xmkmf", so it can be a program name with args.
9069set dummy xmkmf; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02009070{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9071printf %s "checking for $ac_word... " >&6; }
9072if test ${ac_cv_path_xmkmfpath+y}
9073then :
9074 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02009075else case e in #(
9076 e) case $xmkmfpath in
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009077 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00009078 ac_cv_path_xmkmfpath="$xmkmfpath" # Let the user override the test with a path.
9079 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00009080 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009081 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9082for as_dir in $PATH
9083do
9084 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02009085 case $as_dir in #(((
9086 '') as_dir=./ ;;
9087 */) ;;
9088 *) as_dir=$as_dir/ ;;
9089 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009090 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02009091 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9092 ac_cv_path_xmkmfpath="$as_dir$ac_word$ac_exec_ext"
9093 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009094 break 2
9095 fi
9096done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009097 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00009098IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009099
Bram Moolenaar071d4272004-06-13 20:20:40 +00009100 ;;
Christian Brabandt9670f612025-05-07 21:44:33 +02009101esac ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00009102esac
9103fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009104xmkmfpath=$ac_cv_path_xmkmfpath
Bram Moolenaar071d4272004-06-13 20:20:40 +00009105if test -n "$xmkmfpath"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009106 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xmkmfpath" >&5
9107printf "%s\n" "$xmkmfpath" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009108else
Illia Bobyra96d5442023-08-30 16:30:15 +02009109 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9110printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009111fi
9112
9113
Bram Moolenaar446cb832008-06-24 21:56:24 +00009114
Illia Bobyra96d5442023-08-30 16:30:15 +02009115 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for X" >&5
9116printf %s "checking for X... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009117
Bram Moolenaar071d4272004-06-13 20:20:40 +00009118
Bram Moolenaar446cb832008-06-24 21:56:24 +00009119# Check whether --with-x was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02009120if test ${with_x+y}
9121then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00009122 withval=$with_x;
9123fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00009124
Christian Brabandt9670f612025-05-07 21:44:33 +02009125# $have_x is 'yes', 'no', 'disabled', or empty when we do not yet know.
Bram Moolenaar071d4272004-06-13 20:20:40 +00009126if test "x$with_x" = xno; then
9127 # The user explicitly disabled X.
9128 have_x=disabled
9129else
Bram Moolenaar446cb832008-06-24 21:56:24 +00009130 case $x_includes,$x_libraries in #(
Bram Moolenaar7db77842014-03-27 17:40:59 +01009131 *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
Illia Bobyra96d5442023-08-30 16:30:15 +02009132 *,NONE | NONE,*) if test ${ac_cv_have_x+y}
9133then :
9134 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02009135else case e in #(
9136 e) # One or both of the vars are not set, and there is no cached value.
Illia Bobyra96d5442023-08-30 16:30:15 +02009137ac_x_includes=no
9138ac_x_libraries=no
9139# Do we need to do anything special at all?
9140ac_save_LIBS=$LIBS
9141LIBS="-lX11 $LIBS"
9142cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9143/* end confdefs.h. */
9144#include <X11/Xlib.h>
9145int
9146main (void)
9147{
9148XrmInitialize ()
9149 ;
9150 return 0;
9151}
9152_ACEOF
9153if ac_fn_c_try_link "$LINENO"
9154then :
9155 # We can compile and link X programs with no special options.
9156 ac_x_includes=
9157 ac_x_libraries=
9158fi
9159rm -f core conftest.err conftest.$ac_objext conftest.beam \
9160 conftest$ac_exeext conftest.$ac_ext
9161LIBS="$ac_save_LIBS"
9162# If that didn't work, only try xmkmf and file system searches
9163# for native compilation.
9164if test x"$ac_x_includes" = xno && test "$cross_compiling" = no
9165then :
9166 rm -f -r conftest.dir
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009167if mkdir conftest.dir; then
9168 cd conftest.dir
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009169 cat >Imakefile <<'_ACEOF'
Bram Moolenaar446cb832008-06-24 21:56:24 +00009170incroot:
9171 @echo incroot='${INCROOT}'
9172usrlibdir:
9173 @echo usrlibdir='${USRLIBDIR}'
9174libdir:
9175 @echo libdir='${LIBDIR}'
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009176_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +00009177 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01009178 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
Bram Moolenaar446cb832008-06-24 21:56:24 +00009179 for ac_var in incroot usrlibdir libdir; do
9180 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
9181 done
Bram Moolenaar071d4272004-06-13 20:20:40 +00009182 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
Bram Moolenaar446cb832008-06-24 21:56:24 +00009183 for ac_extension in a so sl dylib la dll; do
9184 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
9185 test -f "$ac_im_libdir/libX11.$ac_extension"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009186 ac_im_usrlibdir=$ac_im_libdir; break
Bram Moolenaar071d4272004-06-13 20:20:40 +00009187 fi
9188 done
9189 # Screen out bogus values from the imake configuration. They are
9190 # bogus both because they are the default anyway, and because
9191 # using them would break gcc on systems where it needs fixed includes.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009192 case $ac_im_incroot in
Bram Moolenaar446cb832008-06-24 21:56:24 +00009193 /usr/include) ac_x_includes= ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009194 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00009195 esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009196 case $ac_im_usrlibdir in
Bram Moolenaar32f31b12009-05-21 13:20:59 +00009197 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009198 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00009199 esac
9200 fi
9201 cd ..
Bram Moolenaar446cb832008-06-24 21:56:24 +00009202 rm -f -r conftest.dir
Bram Moolenaar071d4272004-06-13 20:20:40 +00009203fi
9204
Illia Bobyra96d5442023-08-30 16:30:15 +02009205 # Standard set of common directories for X headers.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009206# Check X11 before X11Rn because it is often a symlink to the current release.
9207ac_x_header_dirs='
9208/usr/X11/include
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009209/usr/X11R7/include
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009210/usr/X11R6/include
9211/usr/X11R5/include
9212/usr/X11R4/include
Bram Moolenaar071d4272004-06-13 20:20:40 +00009213
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009214/usr/include/X11
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009215/usr/include/X11R7
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009216/usr/include/X11R6
9217/usr/include/X11R5
9218/usr/include/X11R4
9219
9220/usr/local/X11/include
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009221/usr/local/X11R7/include
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009222/usr/local/X11R6/include
9223/usr/local/X11R5/include
9224/usr/local/X11R4/include
9225
9226/usr/local/include/X11
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009227/usr/local/include/X11R7
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009228/usr/local/include/X11R6
9229/usr/local/include/X11R5
9230/usr/local/include/X11R4
9231
Illia Bobyra96d5442023-08-30 16:30:15 +02009232/opt/X11/include
9233
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009234/usr/X386/include
9235/usr/x386/include
9236/usr/XFree86/include/X11
9237
9238/usr/include
9239/usr/local/include
9240/usr/unsupported/include
9241/usr/athena/include
9242/usr/local/x11r5/include
9243/usr/lpp/Xamples/include
9244
9245/usr/openwin/include
9246/usr/openwin/share/include'
9247
9248if test "$ac_x_includes" = no; then
Bram Moolenaar446cb832008-06-24 21:56:24 +00009249 # Guess where to find include files, by looking for Xlib.h.
Bram Moolenaar071d4272004-06-13 20:20:40 +00009250 # First, try using that file with no special directory specified.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009252/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +00009253#include <X11/Xlib.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009254_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009255if ac_fn_c_try_cpp "$LINENO"
9256then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009257 # We can compile using X headers with no special include directory.
9258ac_x_includes=
Christian Brabandt9670f612025-05-07 21:44:33 +02009259else case e in #(
9260 e) for ac_dir in $ac_x_header_dirs; do
Bram Moolenaar446cb832008-06-24 21:56:24 +00009261 if test -r "$ac_dir/X11/Xlib.h"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009262 ac_x_includes=$ac_dir
9263 break
9264 fi
Christian Brabandt9670f612025-05-07 21:44:33 +02009265done ;;
9266esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00009267fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01009268rm -f conftest.err conftest.i conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009269fi # $ac_x_includes = no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009270
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009271if test "$ac_x_libraries" = no; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00009272 # Check for the libraries.
Bram Moolenaar071d4272004-06-13 20:20:40 +00009273 # See if we find them without any special options.
9274 # Don't add to $LIBS permanently.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009275 ac_save_LIBS=$LIBS
Bram Moolenaar446cb832008-06-24 21:56:24 +00009276 LIBS="-lX11 $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009278/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +00009279#include <X11/Xlib.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009280int
Illia Bobyra96d5442023-08-30 16:30:15 +02009281main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009282{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009283XrmInitialize ()
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009284 ;
9285 return 0;
9286}
9287_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009288if ac_fn_c_try_link "$LINENO"
9289then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009290 LIBS=$ac_save_LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009291# We can link X programs with no special library path.
9292ac_x_libraries=
Christian Brabandt9670f612025-05-07 21:44:33 +02009293else case e in #(
9294 e) LIBS=$ac_save_LIBS
Illia Bobyra96d5442023-08-30 16:30:15 +02009295for 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 +00009296do
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009297 # Don't even attempt the hair of trying to link an X program!
Bram Moolenaar446cb832008-06-24 21:56:24 +00009298 for ac_extension in a so sl dylib la dll; do
9299 if test -r "$ac_dir/libX11.$ac_extension"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00009300 ac_x_libraries=$ac_dir
9301 break 2
9302 fi
9303 done
Christian Brabandt9670f612025-05-07 21:44:33 +02009304done ;;
9305esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00009306fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009307rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009308 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009309fi # $ac_x_libraries = no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009310
Illia Bobyra96d5442023-08-30 16:30:15 +02009311fi
9312# Record the results.
Bram Moolenaar446cb832008-06-24 21:56:24 +00009313case $ac_x_includes,$ac_x_libraries in #(
Illia Bobyra96d5442023-08-30 16:30:15 +02009314 no,* | *,no | *\'*) :
Bram Moolenaar446cb832008-06-24 21:56:24 +00009315 # Didn't find X, or a directory has "'" in its name.
Illia Bobyra96d5442023-08-30 16:30:15 +02009316 ac_cv_have_x="have_x=no" ;; #(
9317 *) :
Bram Moolenaar446cb832008-06-24 21:56:24 +00009318 # Record where we found X for the cache.
9319 ac_cv_have_x="have_x=yes\
9320 ac_x_includes='$ac_x_includes'\
Illia Bobyra96d5442023-08-30 16:30:15 +02009321 ac_x_libraries='$ac_x_libraries'" ;;
Christian Brabandt9670f612025-05-07 21:44:33 +02009322esac ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +00009323esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00009324fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00009325;; #(
9326 *) have_x=yes;;
9327 esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00009328 eval "$ac_cv_have_x"
9329fi # $with_x != no
9330
9331if test "$have_x" != yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009332 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
9333printf "%s\n" "$have_x" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009334 no_x=yes
9335else
9336 # If each of the values was on the command line, it overrides each guess.
9337 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9338 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9339 # Update the cache value to reflect the command line values.
Bram Moolenaar446cb832008-06-24 21:56:24 +00009340 ac_cv_have_x="have_x=yes\
9341 ac_x_includes='$x_includes'\
9342 ac_x_libraries='$x_libraries'"
Illia Bobyra96d5442023-08-30 16:30:15 +02009343 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
9344printf "%s\n" "libraries $x_libraries, headers $x_includes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009345fi
9346
9347if test "$no_x" = yes; then
9348 # Not all programs may use this symbol, but it does not hurt to define it.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009349
Illia Bobyra96d5442023-08-30 16:30:15 +02009350printf "%s\n" "#define X_DISPLAY_MISSING 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00009351
9352 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
9353else
9354 if test -n "$x_includes"; then
9355 X_CFLAGS="$X_CFLAGS -I$x_includes"
9356 fi
9357
9358 # It would also be nice to do this for all -L options, not just this one.
9359 if test -n "$x_libraries"; then
9360 X_LIBS="$X_LIBS -L$x_libraries"
9361 # For Solaris; some versions of Sun CC require a space after -R and
9362 # others require no space. Words are not sufficient . . . .
Illia Bobyra96d5442023-08-30 16:30:15 +02009363 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
9364printf %s "checking whether -R must be followed by a space... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00009365 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
9366 ac_xsave_c_werror_flag=$ac_c_werror_flag
9367 ac_c_werror_flag=yes
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009369/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00009370
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009371int
Illia Bobyra96d5442023-08-30 16:30:15 +02009372main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009373{
Bram Moolenaar071d4272004-06-13 20:20:40 +00009374
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009375 ;
9376 return 0;
9377}
9378_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009379if ac_fn_c_try_link "$LINENO"
9380then :
9381 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9382printf "%s\n" "no" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00009383 X_LIBS="$X_LIBS -R$x_libraries"
Christian Brabandt9670f612025-05-07 21:44:33 +02009384else case e in #(
9385 e) LIBS="$ac_xsave_LIBS -R $x_libraries"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009387/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00009388
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009389int
Illia Bobyra96d5442023-08-30 16:30:15 +02009390main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009391{
Bram Moolenaar071d4272004-06-13 20:20:40 +00009392
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009393 ;
9394 return 0;
9395}
9396_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009397if ac_fn_c_try_link "$LINENO"
9398then :
9399 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9400printf "%s\n" "yes" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00009401 X_LIBS="$X_LIBS -R $x_libraries"
Christian Brabandt9670f612025-05-07 21:44:33 +02009402else case e in #(
9403 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
9404printf "%s\n" "neither works" >&6; } ;;
9405esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00009406fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009407rm -f core conftest.err conftest.$ac_objext conftest.beam \
Christian Brabandt9670f612025-05-07 21:44:33 +02009408 conftest$ac_exeext conftest.$ac_ext ;;
9409esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00009410fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009411rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009412 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +00009413 ac_c_werror_flag=$ac_xsave_c_werror_flag
9414 LIBS=$ac_xsave_LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009415 fi
9416
9417 # Check for system-dependent libraries X programs must link with.
9418 # Do this before checking for the system-independent R6 libraries
9419 # (-lICE), since we may need -lsocket or whatever for X linking.
9420
9421 if test "$ISC" = yes; then
9422 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
9423 else
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009424 # Martyn Johnson says this is needed for Ultrix, if the X
9425 # libraries were built with DECnet support. And Karl Berry says
Bram Moolenaar071d4272004-06-13 20:20:40 +00009426 # the Alpha needs dnet_stub (dnet does not exist).
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009427 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009429/* end confdefs.h. */
9430
Bram Moolenaar446cb832008-06-24 21:56:24 +00009431/* Override any GCC internal prototype to avoid an error.
9432 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +02009433 builtin and then its argument prototype would still apply.
9434 The 'extern "C"' is for builds by C++ compilers;
9435 although this is not generally supported in C code supporting it here
9436 has little cost and some practical benefit (sr 110532). */
9437#ifdef __cplusplus
9438extern "C"
9439#endif
9440char XOpenDisplay (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009441int
Illia Bobyra96d5442023-08-30 16:30:15 +02009442main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009443{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009444return XOpenDisplay ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009445 ;
9446 return 0;
9447}
9448_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009449if ac_fn_c_try_link "$LINENO"
9450then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009451
Christian Brabandt9670f612025-05-07 21:44:33 +02009452else case e in #(
9453 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +02009454printf %s "checking for dnet_ntoa in -ldnet... " >&6; }
9455if test ${ac_cv_lib_dnet_dnet_ntoa+y}
9456then :
9457 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02009458else case e in #(
9459 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009460LIBS="-ldnet $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009461cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009462/* end confdefs.h. */
9463
Bram Moolenaar446cb832008-06-24 21:56:24 +00009464/* Override any GCC internal prototype to avoid an error.
9465 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +02009466 builtin and then its argument prototype would still apply.
9467 The 'extern "C"' is for builds by C++ compilers;
9468 although this is not generally supported in C code supporting it here
9469 has little cost and some practical benefit (sr 110532). */
9470#ifdef __cplusplus
9471extern "C"
9472#endif
9473char dnet_ntoa (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009474int
Illia Bobyra96d5442023-08-30 16:30:15 +02009475main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009476{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009477return dnet_ntoa ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009478 ;
9479 return 0;
9480}
9481_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009482if ac_fn_c_try_link "$LINENO"
9483then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009484 ac_cv_lib_dnet_dnet_ntoa=yes
Christian Brabandt9670f612025-05-07 21:44:33 +02009485else case e in #(
9486 e) ac_cv_lib_dnet_dnet_ntoa=no ;;
9487esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00009488fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009489rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009490 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +02009491LIBS=$ac_check_lib_save_LIBS ;;
9492esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009493fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009494{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
9495printf "%s\n" "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
9496if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes
9497then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009498 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009499fi
9500
9501 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009502 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
9503printf %s "checking for dnet_ntoa in -ldnet_stub... " >&6; }
9504if test ${ac_cv_lib_dnet_stub_dnet_ntoa+y}
9505then :
9506 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02009507else case e in #(
9508 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009509LIBS="-ldnet_stub $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009510cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009511/* end confdefs.h. */
9512
Bram Moolenaar446cb832008-06-24 21:56:24 +00009513/* Override any GCC internal prototype to avoid an error.
9514 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +02009515 builtin and then its argument prototype would still apply.
9516 The 'extern "C"' is for builds by C++ compilers;
9517 although this is not generally supported in C code supporting it here
9518 has little cost and some practical benefit (sr 110532). */
9519#ifdef __cplusplus
9520extern "C"
9521#endif
9522char dnet_ntoa (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009523int
Illia Bobyra96d5442023-08-30 16:30:15 +02009524main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009525{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009526return dnet_ntoa ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009527 ;
9528 return 0;
9529}
9530_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009531if ac_fn_c_try_link "$LINENO"
9532then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009533 ac_cv_lib_dnet_stub_dnet_ntoa=yes
Christian Brabandt9670f612025-05-07 21:44:33 +02009534else case e in #(
9535 e) ac_cv_lib_dnet_stub_dnet_ntoa=no ;;
9536esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00009537fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009538rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009539 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +02009540LIBS=$ac_check_lib_save_LIBS ;;
9541esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009542fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009543{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
9544printf "%s\n" "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
9545if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes
9546then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009547 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009548fi
9549
Christian Brabandt9670f612025-05-07 21:44:33 +02009550 fi ;;
9551esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009552fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009553rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009554 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009555 LIBS="$ac_xsave_LIBS"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009556
9557 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
9558 # to get the SysV transport functions.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009559 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
Bram Moolenaar071d4272004-06-13 20:20:40 +00009560 # needs -lnsl.
9561 # The nsl library prevents programs from opening the X display
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009562 # on Irix 5.2, according to T.E. Dickey.
9563 # The functions gethostbyname, getservbyname, and inet_addr are
9564 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009565 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Illia Bobyra96d5442023-08-30 16:30:15 +02009566if test "x$ac_cv_func_gethostbyname" = xyes
9567then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009568
Bram Moolenaar071d4272004-06-13 20:20:40 +00009569fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00009570
Bram Moolenaar071d4272004-06-13 20:20:40 +00009571 if test $ac_cv_func_gethostbyname = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009572 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
9573printf %s "checking for gethostbyname in -lnsl... " >&6; }
9574if test ${ac_cv_lib_nsl_gethostbyname+y}
9575then :
9576 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02009577else case e in #(
9578 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009579LIBS="-lnsl $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009580cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009581/* end confdefs.h. */
9582
Bram Moolenaar446cb832008-06-24 21:56:24 +00009583/* Override any GCC internal prototype to avoid an error.
9584 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +02009585 builtin and then its argument prototype would still apply.
9586 The 'extern "C"' is for builds by C++ compilers;
9587 although this is not generally supported in C code supporting it here
9588 has little cost and some practical benefit (sr 110532). */
9589#ifdef __cplusplus
9590extern "C"
9591#endif
9592char gethostbyname (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009593int
Illia Bobyra96d5442023-08-30 16:30:15 +02009594main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009595{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009596return gethostbyname ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009597 ;
9598 return 0;
9599}
9600_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009601if ac_fn_c_try_link "$LINENO"
9602then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009603 ac_cv_lib_nsl_gethostbyname=yes
Christian Brabandt9670f612025-05-07 21:44:33 +02009604else case e in #(
9605 e) ac_cv_lib_nsl_gethostbyname=no ;;
9606esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00009607fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009608rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009609 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +02009610LIBS=$ac_check_lib_save_LIBS ;;
9611esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009612fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009613{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
9614printf "%s\n" "$ac_cv_lib_nsl_gethostbyname" >&6; }
9615if test "x$ac_cv_lib_nsl_gethostbyname" = xyes
9616then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009617 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009618fi
9619
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009620 if test $ac_cv_lib_nsl_gethostbyname = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009621 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
9622printf %s "checking for gethostbyname in -lbsd... " >&6; }
9623if test ${ac_cv_lib_bsd_gethostbyname+y}
9624then :
9625 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02009626else case e in #(
9627 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009628LIBS="-lbsd $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009629cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009630/* end confdefs.h. */
9631
Bram Moolenaar446cb832008-06-24 21:56:24 +00009632/* Override any GCC internal prototype to avoid an error.
9633 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +02009634 builtin and then its argument prototype would still apply.
9635 The 'extern "C"' is for builds by C++ compilers;
9636 although this is not generally supported in C code supporting it here
9637 has little cost and some practical benefit (sr 110532). */
9638#ifdef __cplusplus
9639extern "C"
9640#endif
9641char gethostbyname (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009642int
Illia Bobyra96d5442023-08-30 16:30:15 +02009643main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009644{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009645return gethostbyname ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009646 ;
9647 return 0;
9648}
9649_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009650if ac_fn_c_try_link "$LINENO"
9651then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009652 ac_cv_lib_bsd_gethostbyname=yes
Christian Brabandt9670f612025-05-07 21:44:33 +02009653else case e in #(
9654 e) ac_cv_lib_bsd_gethostbyname=no ;;
9655esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009656fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009657rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009658 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +02009659LIBS=$ac_check_lib_save_LIBS ;;
9660esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009661fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009662{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
9663printf "%s\n" "$ac_cv_lib_bsd_gethostbyname" >&6; }
9664if test "x$ac_cv_lib_bsd_gethostbyname" = xyes
9665then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009666 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
9667fi
9668
9669 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00009670 fi
9671
9672 # lieder@skyler.mavd.honeywell.com says without -lsocket,
9673 # socket/setsockopt and other routines are undefined under SCO ODT
9674 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009675 # on later versions), says Simon Leinen: it contains gethostby*
9676 # variants that don't use the name server (or something). -lsocket
9677 # must be given before -lnsl if both are needed. We assume that
9678 # if connect needs -lnsl, so does gethostbyname.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009679 ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect"
Illia Bobyra96d5442023-08-30 16:30:15 +02009680if test "x$ac_cv_func_connect" = xyes
9681then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009682
Bram Moolenaar071d4272004-06-13 20:20:40 +00009683fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00009684
Bram Moolenaar071d4272004-06-13 20:20:40 +00009685 if test $ac_cv_func_connect = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009686 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
9687printf %s "checking for connect in -lsocket... " >&6; }
9688if test ${ac_cv_lib_socket_connect+y}
9689then :
9690 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02009691else case e in #(
9692 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009693LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009694cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009695/* end confdefs.h. */
9696
Bram Moolenaar446cb832008-06-24 21:56:24 +00009697/* Override any GCC internal prototype to avoid an error.
9698 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +02009699 builtin and then its argument prototype would still apply.
9700 The 'extern "C"' is for builds by C++ compilers;
9701 although this is not generally supported in C code supporting it here
9702 has little cost and some practical benefit (sr 110532). */
9703#ifdef __cplusplus
9704extern "C"
9705#endif
9706char connect (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009707int
Illia Bobyra96d5442023-08-30 16:30:15 +02009708main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009709{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009710return connect ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009711 ;
9712 return 0;
9713}
9714_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009715if ac_fn_c_try_link "$LINENO"
9716then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009717 ac_cv_lib_socket_connect=yes
Christian Brabandt9670f612025-05-07 21:44:33 +02009718else case e in #(
9719 e) ac_cv_lib_socket_connect=no ;;
9720esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00009721fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009722rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009723 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +02009724LIBS=$ac_check_lib_save_LIBS ;;
9725esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009726fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009727{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
9728printf "%s\n" "$ac_cv_lib_socket_connect" >&6; }
9729if test "x$ac_cv_lib_socket_connect" = xyes
9730then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009731 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009732fi
9733
9734 fi
9735
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009736 # Guillermo Gomez says -lposix is necessary on A/UX.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009737 ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove"
Illia Bobyra96d5442023-08-30 16:30:15 +02009738if test "x$ac_cv_func_remove" = xyes
9739then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009740
Bram Moolenaar071d4272004-06-13 20:20:40 +00009741fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00009742
Bram Moolenaar071d4272004-06-13 20:20:40 +00009743 if test $ac_cv_func_remove = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009744 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
9745printf %s "checking for remove in -lposix... " >&6; }
9746if test ${ac_cv_lib_posix_remove+y}
9747then :
9748 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02009749else case e in #(
9750 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009751LIBS="-lposix $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009752cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009753/* end confdefs.h. */
9754
Bram Moolenaar446cb832008-06-24 21:56:24 +00009755/* Override any GCC internal prototype to avoid an error.
9756 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +02009757 builtin and then its argument prototype would still apply.
9758 The 'extern "C"' is for builds by C++ compilers;
9759 although this is not generally supported in C code supporting it here
9760 has little cost and some practical benefit (sr 110532). */
9761#ifdef __cplusplus
9762extern "C"
9763#endif
9764char remove (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009765int
Illia Bobyra96d5442023-08-30 16:30:15 +02009766main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009767{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009768return remove ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009769 ;
9770 return 0;
9771}
9772_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009773if ac_fn_c_try_link "$LINENO"
9774then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009775 ac_cv_lib_posix_remove=yes
Christian Brabandt9670f612025-05-07 21:44:33 +02009776else case e in #(
9777 e) ac_cv_lib_posix_remove=no ;;
9778esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00009779fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009780rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009781 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +02009782LIBS=$ac_check_lib_save_LIBS ;;
9783esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009784fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009785{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
9786printf "%s\n" "$ac_cv_lib_posix_remove" >&6; }
9787if test "x$ac_cv_lib_posix_remove" = xyes
9788then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009789 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009790fi
9791
9792 fi
9793
9794 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009795 ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
Illia Bobyra96d5442023-08-30 16:30:15 +02009796if test "x$ac_cv_func_shmat" = xyes
9797then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009798
Bram Moolenaar071d4272004-06-13 20:20:40 +00009799fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00009800
Bram Moolenaar071d4272004-06-13 20:20:40 +00009801 if test $ac_cv_func_shmat = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009802 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
9803printf %s "checking for shmat in -lipc... " >&6; }
9804if test ${ac_cv_lib_ipc_shmat+y}
9805then :
9806 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02009807else case e in #(
9808 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009809LIBS="-lipc $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009810cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009811/* end confdefs.h. */
9812
Bram Moolenaar446cb832008-06-24 21:56:24 +00009813/* Override any GCC internal prototype to avoid an error.
9814 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +02009815 builtin and then its argument prototype would still apply.
9816 The 'extern "C"' is for builds by C++ compilers;
9817 although this is not generally supported in C code supporting it here
9818 has little cost and some practical benefit (sr 110532). */
9819#ifdef __cplusplus
9820extern "C"
9821#endif
9822char shmat (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009823int
Illia Bobyra96d5442023-08-30 16:30:15 +02009824main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009825{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009826return shmat ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009827 ;
9828 return 0;
9829}
9830_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009831if ac_fn_c_try_link "$LINENO"
9832then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009833 ac_cv_lib_ipc_shmat=yes
Christian Brabandt9670f612025-05-07 21:44:33 +02009834else case e in #(
9835 e) ac_cv_lib_ipc_shmat=no ;;
9836esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00009837fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009838rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009839 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +02009840LIBS=$ac_check_lib_save_LIBS ;;
9841esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009842fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009843{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
9844printf "%s\n" "$ac_cv_lib_ipc_shmat" >&6; }
9845if test "x$ac_cv_lib_ipc_shmat" = xyes
9846then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009847 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009848fi
9849
9850 fi
9851 fi
9852
9853 # Check for libraries that X11R6 Xt/Xaw programs need.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009854 ac_save_LDFLAGS=$LDFLAGS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009855 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
9856 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
9857 # check for ICE first), but we must link in the order -lSM -lICE or
9858 # we get undefined symbols. So assume we have SM if we have ICE.
9859 # These have to be linked with before -lX11, unlike the other
9860 # libraries we check for below, so use a different variable.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009861 # John Interrante, Karl Berry
Illia Bobyra96d5442023-08-30 16:30:15 +02009862 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
9863printf %s "checking for IceConnectionNumber in -lICE... " >&6; }
9864if test ${ac_cv_lib_ICE_IceConnectionNumber+y}
9865then :
9866 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02009867else case e in #(
9868 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009869LIBS="-lICE $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009870cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009871/* end confdefs.h. */
9872
Bram Moolenaar446cb832008-06-24 21:56:24 +00009873/* Override any GCC internal prototype to avoid an error.
9874 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +02009875 builtin and then its argument prototype would still apply.
9876 The 'extern "C"' is for builds by C++ compilers;
9877 although this is not generally supported in C code supporting it here
9878 has little cost and some practical benefit (sr 110532). */
9879#ifdef __cplusplus
9880extern "C"
9881#endif
9882char IceConnectionNumber (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009883int
Illia Bobyra96d5442023-08-30 16:30:15 +02009884main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009885{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009886return IceConnectionNumber ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009887 ;
9888 return 0;
9889}
9890_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009891if ac_fn_c_try_link "$LINENO"
9892then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009893 ac_cv_lib_ICE_IceConnectionNumber=yes
Christian Brabandt9670f612025-05-07 21:44:33 +02009894else case e in #(
9895 e) ac_cv_lib_ICE_IceConnectionNumber=no ;;
9896esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00009897fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009898rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009899 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +02009900LIBS=$ac_check_lib_save_LIBS ;;
9901esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009902fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009903{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
9904printf "%s\n" "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
9905if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes
9906then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009907 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009908fi
9909
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009910 LDFLAGS=$ac_save_LDFLAGS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009911
9912fi
9913
9914
Bram Moolenaar2c704a72010-06-03 21:17:25 +02009915 if test "$zOSUnix" = "yes"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00009916 CFLAGS="$CFLAGS -W c,dll"
9917 LDFLAGS="$LDFLAGS -W l,dll"
9918 X_EXTRA_LIBS="$X_EXTRA_LIBS -lSM -lICE -lXmu"
9919 fi
9920
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009921
Bram Moolenaar071d4272004-06-13 20:20:40 +00009922 if test -d "$x_includes" && test ! -d "$x_libraries"; then
9923 x_libraries=`echo "$x_includes" | sed s/include/lib/`
Illia Bobyra96d5442023-08-30 16:30:15 +02009924 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Corrected X libraries to $x_libraries" >&5
9925printf "%s\n" "Corrected X libraries to $x_libraries" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009926 X_LIBS="$X_LIBS -L$x_libraries"
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00009927 if test "$vim_cv_uname_output" = SunOS &&
9928 echo $vim_cv_uname_r_output | grep '^5' >/dev/null; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00009929 X_LIBS="$X_LIBS -R $x_libraries"
9930 fi
9931 fi
9932
9933 if test -d "$x_libraries" && test ! -d "$x_includes"; then
9934 x_includes=`echo "$x_libraries" | sed s/lib/include/`
Illia Bobyra96d5442023-08-30 16:30:15 +02009935 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Corrected X includes to $x_includes" >&5
9936printf "%s\n" "Corrected X includes to $x_includes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009937 X_CFLAGS="$X_CFLAGS -I$x_includes"
9938 fi
9939
9940 X_CFLAGS="`echo $X_CFLAGS\ | sed 's%-I/usr/include %%'`"
9941 X_LIBS="`echo $X_LIBS\ | sed 's%-L/usr/lib %%'`"
9942 X_LIBS="`echo $X_LIBS\ | sed -e 's%-R/usr/lib %%' -e 's%-R /usr/lib %%'`"
9943
9944
Illia Bobyra96d5442023-08-30 16:30:15 +02009945 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if X11 header files can be found" >&5
9946printf %s "checking if X11 header files can be found... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009947 cflags_save=$CFLAGS
9948 CFLAGS="$CFLAGS $X_CFLAGS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009950/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00009951#include <X11/Xlib.h>
Bram Moolenaar00ca2842008-06-26 20:14:00 +00009952#include <X11/Intrinsic.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009953int
Illia Bobyra96d5442023-08-30 16:30:15 +02009954main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009955{
Bram Moolenaar071d4272004-06-13 20:20:40 +00009956
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009957 ;
9958 return 0;
9959}
9960_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009961if ac_fn_c_try_compile "$LINENO"
9962then :
9963 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9964printf "%s\n" "yes" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +02009965else case e in #(
9966 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9967printf "%s\n" "no" >&6; }; no_x=yes ;;
9968esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00009969fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009970rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +00009971 CFLAGS=$cflags_save
9972
9973 if test "${no_x-no}" = yes; then
9974 with_x=no
9975 else
Illia Bobyra96d5442023-08-30 16:30:15 +02009976 printf "%s\n" "#define HAVE_X11 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00009977
9978 X_LIB="-lXt -lX11";
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009979
Bram Moolenaar071d4272004-06-13 20:20:40 +00009980
9981 ac_save_LDFLAGS="$LDFLAGS"
9982 LDFLAGS="-L$x_libraries $LDFLAGS"
9983
Illia Bobyra96d5442023-08-30 16:30:15 +02009984 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _XdmcpAuthDoIt in -lXdmcp" >&5
9985printf %s "checking for _XdmcpAuthDoIt in -lXdmcp... " >&6; }
9986if test ${ac_cv_lib_Xdmcp__XdmcpAuthDoIt+y}
9987then :
9988 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02009989else case e in #(
9990 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009991LIBS="-lXdmcp -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS -lXdmcp $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009992cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009993/* end confdefs.h. */
9994
Bram Moolenaar446cb832008-06-24 21:56:24 +00009995/* Override any GCC internal prototype to avoid an error.
9996 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +02009997 builtin and then its argument prototype would still apply.
9998 The 'extern "C"' is for builds by C++ compilers;
9999 although this is not generally supported in C code supporting it here
10000 has little cost and some practical benefit (sr 110532). */
10001#ifdef __cplusplus
10002extern "C"
10003#endif
10004char _XdmcpAuthDoIt (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010005int
Illia Bobyra96d5442023-08-30 16:30:15 +020010006main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010007{
Bram Moolenaar446cb832008-06-24 21:56:24 +000010008return _XdmcpAuthDoIt ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010009 ;
10010 return 0;
10011}
10012_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020010013if ac_fn_c_try_link "$LINENO"
10014then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010015 ac_cv_lib_Xdmcp__XdmcpAuthDoIt=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020010016else case e in #(
10017 e) ac_cv_lib_Xdmcp__XdmcpAuthDoIt=no ;;
10018esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000010019fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010020rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010021 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020010022LIBS=$ac_check_lib_save_LIBS ;;
10023esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010024fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010025{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xdmcp__XdmcpAuthDoIt" >&5
10026printf "%s\n" "$ac_cv_lib_Xdmcp__XdmcpAuthDoIt" >&6; }
10027if test "x$ac_cv_lib_Xdmcp__XdmcpAuthDoIt" = xyes
10028then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000010029 X_EXTRA_LIBS="$X_EXTRA_LIBS -lXdmcp"
Bram Moolenaar071d4272004-06-13 20:20:40 +000010030fi
10031
10032
Illia Bobyra96d5442023-08-30 16:30:15 +020010033 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IceOpenConnection in -lICE" >&5
10034printf %s "checking for IceOpenConnection in -lICE... " >&6; }
10035if test ${ac_cv_lib_ICE_IceOpenConnection+y}
10036then :
10037 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020010038else case e in #(
10039 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000010040LIBS="-lICE $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010041cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010042/* end confdefs.h. */
10043
Bram Moolenaar446cb832008-06-24 21:56:24 +000010044/* Override any GCC internal prototype to avoid an error.
10045 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020010046 builtin and then its argument prototype would still apply.
10047 The 'extern "C"' is for builds by C++ compilers;
10048 although this is not generally supported in C code supporting it here
10049 has little cost and some practical benefit (sr 110532). */
10050#ifdef __cplusplus
10051extern "C"
10052#endif
10053char IceOpenConnection (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010054int
Illia Bobyra96d5442023-08-30 16:30:15 +020010055main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010056{
Bram Moolenaar446cb832008-06-24 21:56:24 +000010057return IceOpenConnection ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010058 ;
10059 return 0;
10060}
10061_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020010062if ac_fn_c_try_link "$LINENO"
10063then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010064 ac_cv_lib_ICE_IceOpenConnection=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020010065else case e in #(
10066 e) ac_cv_lib_ICE_IceOpenConnection=no ;;
10067esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000010068fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010069rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010070 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020010071LIBS=$ac_check_lib_save_LIBS ;;
10072esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010073fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010074{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceOpenConnection" >&5
10075printf "%s\n" "$ac_cv_lib_ICE_IceOpenConnection" >&6; }
10076if test "x$ac_cv_lib_ICE_IceOpenConnection" = xyes
10077then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000010078 X_EXTRA_LIBS="$X_EXTRA_LIBS -lSM -lICE"
Bram Moolenaar071d4272004-06-13 20:20:40 +000010079fi
10080
10081
10082 LDFLAGS="$X_LIBS $ac_save_LDFLAGS"
Illia Bobyra96d5442023-08-30 16:30:15 +020010083 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XpmCreatePixmapFromData in -lXpm" >&5
10084printf %s "checking for XpmCreatePixmapFromData in -lXpm... " >&6; }
10085if test ${ac_cv_lib_Xpm_XpmCreatePixmapFromData+y}
10086then :
10087 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020010088else case e in #(
10089 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000010090LIBS="-lXpm -lXt $X_PRE_LIBS -lXpm -lX11 $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010091cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010092/* end confdefs.h. */
10093
Bram Moolenaar446cb832008-06-24 21:56:24 +000010094/* Override any GCC internal prototype to avoid an error.
10095 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020010096 builtin and then its argument prototype would still apply.
10097 The 'extern "C"' is for builds by C++ compilers;
10098 although this is not generally supported in C code supporting it here
10099 has little cost and some practical benefit (sr 110532). */
10100#ifdef __cplusplus
10101extern "C"
10102#endif
10103char XpmCreatePixmapFromData (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010104int
Illia Bobyra96d5442023-08-30 16:30:15 +020010105main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010106{
Bram Moolenaar446cb832008-06-24 21:56:24 +000010107return XpmCreatePixmapFromData ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010108 ;
10109 return 0;
10110}
10111_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020010112if ac_fn_c_try_link "$LINENO"
10113then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010114 ac_cv_lib_Xpm_XpmCreatePixmapFromData=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020010115else case e in #(
10116 e) ac_cv_lib_Xpm_XpmCreatePixmapFromData=no ;;
10117esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000010118fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010119rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010120 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020010121LIBS=$ac_check_lib_save_LIBS ;;
10122esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010123fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010124{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmCreatePixmapFromData" >&5
10125printf "%s\n" "$ac_cv_lib_Xpm_XpmCreatePixmapFromData" >&6; }
10126if test "x$ac_cv_lib_Xpm_XpmCreatePixmapFromData" = xyes
10127then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000010128 X_PRE_LIBS="$X_PRE_LIBS -lXpm"
Bram Moolenaar071d4272004-06-13 20:20:40 +000010129fi
10130
10131
Illia Bobyra96d5442023-08-30 16:30:15 +020010132 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if X11 header files implicitly declare return values" >&5
10133printf %s "checking if X11 header files implicitly declare return values... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010134 cflags_save=$CFLAGS
Bram Moolenaard1864592013-05-04 04:40:15 +020010135 if test "$GCC" = yes; then
10136 CFLAGS="$CFLAGS $X_CFLAGS -Werror"
10137 else
10138 CFLAGS="$CFLAGS $X_CFLAGS"
10139 fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010141/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000010142#include <X11/Xlib.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010143int
Illia Bobyra96d5442023-08-30 16:30:15 +020010144main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010145{
Bram Moolenaar071d4272004-06-13 20:20:40 +000010146
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010147 ;
10148 return 0;
10149}
10150_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020010151if ac_fn_c_try_compile "$LINENO"
10152then :
10153 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10154printf "%s\n" "no" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +020010155else case e in #(
10156 e) CFLAGS="$CFLAGS -Wno-implicit-int"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010158/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000010159#include <X11/Xlib.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010160int
Illia Bobyra96d5442023-08-30 16:30:15 +020010161main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010162{
Bram Moolenaar071d4272004-06-13 20:20:40 +000010163
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010164 ;
10165 return 0;
10166}
10167_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020010168if ac_fn_c_try_compile "$LINENO"
10169then :
10170 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10171printf "%s\n" "yes" >&6; }; cflags_save="$cflags_save -Wno-implicit-int"
Christian Brabandt9670f612025-05-07 21:44:33 +020010172else case e in #(
10173 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: test failed" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +020010174printf "%s\n" "test failed" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +020010175 ;;
10176esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000010177fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010178rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020010179 ;;
10180esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000010181fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010182rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000010183 CFLAGS=$cflags_save
10184
10185 LDFLAGS="$ac_save_LDFLAGS"
10186
Mike Gilberta055b442023-08-20 19:01:41 +020010187 # The cast to long int works around a bug in the HP C Compiler
10188# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
Christian Brabandt9670f612025-05-07 21:44:33 +020010189# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'.
Mike Gilberta055b442023-08-20 19:01:41 +020010190# This bug is HP SR number 8606223364.
Illia Bobyra96d5442023-08-30 16:30:15 +020010191{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
10192printf %s "checking size of wchar_t... " >&6; }
10193if test ${ac_cv_sizeof_wchar_t+y}
10194then :
10195 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020010196else case e in #(
10197 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 +020010198then :
Bram Moolenaar4bdbbf72009-05-21 21:27:43 +000010199
Christian Brabandt9670f612025-05-07 21:44:33 +020010200else case e in #(
10201 e) if test "$ac_cv_type_wchar_t" = yes; then
10202 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
10203printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
Mike Gilberta055b442023-08-20 19:01:41 +020010204as_fn_error 77 "cannot compute sizeof (wchar_t)
Christian Brabandt9670f612025-05-07 21:44:33 +020010205See 'config.log' for more details" "$LINENO" 5; }
Mike Gilberta055b442023-08-20 19:01:41 +020010206 else
10207 ac_cv_sizeof_wchar_t=0
Christian Brabandt9670f612025-05-07 21:44:33 +020010208 fi ;;
10209esac
Mike Gilberta055b442023-08-20 19:01:41 +020010210fi
Christian Brabandt9670f612025-05-07 21:44:33 +020010211 ;;
10212esac
Mike Gilberta055b442023-08-20 19:01:41 +020010213fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010214{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
10215printf "%s\n" "$ac_cv_sizeof_wchar_t" >&6; }
Mike Gilberta055b442023-08-20 19:01:41 +020010216
10217
10218
Illia Bobyra96d5442023-08-30 16:30:15 +020010219printf "%s\n" "#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t" >>confdefs.h
Bram Moolenaar4bdbbf72009-05-21 21:27:43 +000010220
Bram Moolenaar4bdbbf72009-05-21 21:27:43 +000010221
Mike Gilberta055b442023-08-20 19:01:41 +020010222 if test "$ac_cv_sizeof_wchar_t" -le 2; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010223 printf "%s\n" "#define SMALL_WCHAR_T 1" >>confdefs.h
Bram Moolenaar4bdbbf72009-05-21 21:27:43 +000010224
10225 fi
10226
Bram Moolenaar071d4272004-06-13 20:20:40 +000010227 fi
10228fi
10229
Bram Moolenaard2a05492018-07-27 22:35:15 +020010230if test "x$with_x" = xno -a "x$with_x_arg" = xyes; then
10231 as_fn_error $? "could not configure X" "$LINENO" 5
10232fi
10233
Bram Moolenaarb3f74062020-02-26 16:16:53 +010010234test "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 +000010235
Illia Bobyra96d5442023-08-30 16:30:15 +020010236{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-gui argument" >&5
10237printf %s "checking --enable-gui argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000010238# Check whether --enable-gui was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010239if test ${enable_gui+y}
10240then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000010241 enableval=$enable_gui;
Christian Brabandt9670f612025-05-07 21:44:33 +020010242else case e in #(
10243 e) enable_gui="auto" ;;
10244esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000010245fi
10246
Bram Moolenaar071d4272004-06-13 20:20:40 +000010247
10248enable_gui_canon=`echo "_$enable_gui" | \
10249 sed 's/[ _+-]//g;y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
10250
Bram Moolenaar071d4272004-06-13 20:20:40 +000010251SKIP_GTK2=YES
Bram Moolenaar1858a842016-02-23 22:30:31 +010010252SKIP_GTK3=YES
Bram Moolenaar071d4272004-06-13 20:20:40 +000010253SKIP_GNOME=YES
10254SKIP_MOTIF=YES
Bram Moolenaar071d4272004-06-13 20:20:40 +000010255SKIP_PHOTON=YES
Bram Moolenaarb3f74062020-02-26 16:16:53 +010010256SKIP_HAIKU=YES
Bram Moolenaar071d4272004-06-13 20:20:40 +000010257GUITYPE=NONE
10258
Bram Moolenaarb3f74062020-02-26 16:16:53 +010010259if test "x$HAIKU" = "xyes"; then
10260 SKIP_HAIKU=
10261 case "$enable_gui_canon" in
Illia Bobyra96d5442023-08-30 16:30:15 +020010262 no) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no GUI support" >&5
10263printf "%s\n" "no GUI support" >&6; }
Bram Moolenaarb3f74062020-02-26 16:16:53 +010010264 SKIP_HAIKU=YES ;;
Illia Bobyra96d5442023-08-30 16:30:15 +020010265 yes|"") { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes - automatic GUI support" >&5
10266printf "%s\n" "yes - automatic GUI support" >&6; } ;;
10267 auto) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: auto - automatic GUI support" >&5
10268printf "%s\n" "auto - automatic GUI support" >&6; } ;;
10269 haiku) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Haiku GUI support" >&5
10270printf "%s\n" "Haiku GUI support" >&6; } ;;
10271 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Sorry, $enable_gui GUI is not supported" >&5
10272printf "%s\n" "Sorry, $enable_gui GUI is not supported" >&6; }
Bram Moolenaarb3f74062020-02-26 16:16:53 +010010273 SKIP_HAIKU=YES ;;
10274 esac
10275elif test "x$QNX" = "xyes" -a "x$with_x" = "xno" ; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000010276 SKIP_PHOTON=
10277 case "$enable_gui_canon" in
Illia Bobyra96d5442023-08-30 16:30:15 +020010278 no) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no GUI support" >&5
10279printf "%s\n" "no GUI support" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010280 SKIP_PHOTON=YES ;;
Illia Bobyra96d5442023-08-30 16:30:15 +020010281 yes|""|auto) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: automatic GUI support" >&5
10282printf "%s\n" "automatic GUI support" >&6; }
Bram Moolenaaraf0839a2018-12-30 22:55:47 +010010283 gui_auto=yes ;;
Illia Bobyra96d5442023-08-30 16:30:15 +020010284 photon) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Photon GUI support" >&5
10285printf "%s\n" "Photon GUI support" >&6; } ;;
10286 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Sorry, $enable_gui GUI is not supported" >&5
10287printf "%s\n" "Sorry, $enable_gui GUI is not supported" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010288 SKIP_PHOTON=YES ;;
10289 esac
10290
Bram Moolenaar040f9752020-08-11 23:08:48 +020010291elif test "x$MACOS_X" = "xyes" -a "x$with_x" = "xno" ; then
10292 case "$enable_gui_canon" in
Illia Bobyra96d5442023-08-30 16:30:15 +020010293 no) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no GUI support" >&5
10294printf "%s\n" "no GUI support" >&6; } ;;
10295 yes|"") { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes - automatic GUI support" >&5
10296printf "%s\n" "yes - automatic GUI support" >&6; }
Bram Moolenaar040f9752020-08-11 23:08:48 +020010297 gui_auto=yes ;;
Illia Bobyra96d5442023-08-30 16:30:15 +020010298 auto) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: auto - disable GUI support for Mac OS" >&5
10299printf "%s\n" "auto - disable GUI support for Mac OS" >&6; } ;;
10300 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Sorry, $enable_gui GUI is not supported" >&5
10301printf "%s\n" "Sorry, $enable_gui GUI is not supported" >&6; } ;;
Bram Moolenaar040f9752020-08-11 23:08:48 +020010302 esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000010303else
10304
Bram Moolenaar071d4272004-06-13 20:20:40 +000010305 case "$enable_gui_canon" in
Illia Bobyra96d5442023-08-30 16:30:15 +020010306 no|none) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no GUI support" >&5
10307printf "%s\n" "no GUI support" >&6; } ;;
10308 yes|""|auto) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes/auto - automatic GUI support" >&5
10309printf "%s\n" "yes/auto - automatic GUI support" >&6; }
Bram Moolenaaraf0839a2018-12-30 22:55:47 +010010310 gui_auto=yes
Bram Moolenaar071d4272004-06-13 20:20:40 +000010311 SKIP_GTK2=
Bram Moolenaarf272ae12021-01-31 19:52:50 +010010312 SKIP_GTK3=
Bram Moolenaar071d4272004-06-13 20:20:40 +000010313 SKIP_GNOME=
Bram Moolenaarf52fac22022-03-11 16:01:26 +000010314 SKIP_MOTIF=;;
Illia Bobyra96d5442023-08-30 16:30:15 +020010315 gtk2) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: GTK+ 2.x GUI support" >&5
10316printf "%s\n" "GTK+ 2.x GUI support" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010317 SKIP_GTK2=;;
Illia Bobyra96d5442023-08-30 16:30:15 +020010318 gnome2) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: GNOME 2.x GUI support" >&5
10319printf "%s\n" "GNOME 2.x GUI support" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010320 SKIP_GNOME=
Bram Moolenaar071d4272004-06-13 20:20:40 +000010321 SKIP_GTK2=;;
Illia Bobyra96d5442023-08-30 16:30:15 +020010322 gtk3) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: GTK+ 3.x GUI support" >&5
10323printf "%s\n" "GTK+ 3.x GUI support" >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010324 SKIP_GTK3=;;
Illia Bobyra96d5442023-08-30 16:30:15 +020010325 motif) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Motif GUI support" >&5
10326printf "%s\n" "Motif GUI support" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010327 SKIP_MOTIF=;;
Illia Bobyra96d5442023-08-30 16:30:15 +020010328 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Sorry, $enable_gui GUI is not supported" >&5
10329printf "%s\n" "Sorry, $enable_gui GUI is not supported" >&6; } ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +000010330 esac
10331
10332fi
10333
Bram Moolenaar071d4272004-06-13 20:20:40 +000010334if test "x$SKIP_GTK2" != "xYES" -a "$enable_gui_canon" != "gtk2" \
10335 -a "$enable_gui_canon" != "gnome2"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010336 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether or not to look for GTK+ 2" >&5
10337printf %s "checking whether or not to look for GTK+ 2... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000010338 # Check whether --enable-gtk2-check was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010339if test ${enable_gtk2_check+y}
10340then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000010341 enableval=$enable_gtk2_check;
Christian Brabandt9670f612025-05-07 21:44:33 +020010342else case e in #(
10343 e) enable_gtk2_check="yes" ;;
10344esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000010345fi
10346
Illia Bobyra96d5442023-08-30 16:30:15 +020010347 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_gtk2_check" >&5
10348printf "%s\n" "$enable_gtk2_check" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010349 if test "x$enable_gtk2_check" = "xno"; then
10350 SKIP_GTK2=YES
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010351 SKIP_GNOME=YES
Bram Moolenaar071d4272004-06-13 20:20:40 +000010352 fi
10353fi
10354
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010355if test "x$SKIP_GNOME" != "xYES" -a "$enable_gui_canon" != "gnome2"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010356 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether or not to look for GNOME" >&5
10357printf %s "checking whether or not to look for GNOME... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000010358 # Check whether --enable-gnome-check was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010359if test ${enable_gnome_check+y}
10360then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000010361 enableval=$enable_gnome_check;
Christian Brabandt9670f612025-05-07 21:44:33 +020010362else case e in #(
10363 e) enable_gnome_check="no" ;;
10364esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000010365fi
10366
Illia Bobyra96d5442023-08-30 16:30:15 +020010367 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_gnome_check" >&5
10368printf "%s\n" "$enable_gnome_check" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010369 if test "x$enable_gnome_check" = "xno"; then
10370 SKIP_GNOME=YES
10371 fi
10372fi
10373
Bram Moolenaar98921892016-02-23 17:14:37 +010010374if test "x$SKIP_GTK3" != "xYES" -a "$enable_gui_canon" != "gtk3"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010375 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether or not to look for GTK+ 3" >&5
10376printf %s "checking whether or not to look for GTK+ 3... " >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010377 # Check whether --enable-gtk3-check was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010378if test ${enable_gtk3_check+y}
10379then :
Bram Moolenaar98921892016-02-23 17:14:37 +010010380 enableval=$enable_gtk3_check;
Christian Brabandt9670f612025-05-07 21:44:33 +020010381else case e in #(
10382 e) enable_gtk3_check="yes" ;;
10383esac
Bram Moolenaar98921892016-02-23 17:14:37 +010010384fi
10385
Illia Bobyra96d5442023-08-30 16:30:15 +020010386 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_gtk3_check" >&5
10387printf "%s\n" "$enable_gtk3_check" >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010388 if test "x$enable_gtk3_check" = "xno"; then
10389 SKIP_GTK3=YES
10390 fi
10391fi
10392
Bram Moolenaar071d4272004-06-13 20:20:40 +000010393if test "x$SKIP_MOTIF" != "xYES" -a "$enable_gui_canon" != "motif"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010394 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether or not to look for Motif" >&5
10395printf %s "checking whether or not to look for Motif... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000010396 # Check whether --enable-motif-check was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010397if test ${enable_motif_check+y}
10398then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000010399 enableval=$enable_motif_check;
Christian Brabandt9670f612025-05-07 21:44:33 +020010400else case e in #(
10401 e) enable_motif_check="yes" ;;
10402esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000010403fi
10404
Illia Bobyra96d5442023-08-30 16:30:15 +020010405 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_motif_check" >&5
10406printf "%s\n" "$enable_motif_check" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010407 if test "x$enable_motif_check" = "xno"; then
10408 SKIP_MOTIF=YES
10409 fi
10410fi
10411
Bram Moolenaar071d4272004-06-13 20:20:40 +000010412
10413
10414
10415
10416
10417
Bram Moolenaar427f5b62019-06-09 13:43:51 +020010418if test "X$PKG_CONFIG" = "X"; then
10419 if test -n "$ac_tool_prefix"; then
Bram Moolenaard6d30422018-01-28 22:48:55 +010010420 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10421set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +020010422{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10423printf %s "checking for $ac_word... " >&6; }
10424if test ${ac_cv_path_PKG_CONFIG+y}
10425then :
10426 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020010427else case e in #(
10428 e) case $PKG_CONFIG in
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010429 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +000010430 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10431 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +000010432 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010433 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10434for as_dir in $PATH
10435do
10436 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +020010437 case $as_dir in #(((
10438 '') as_dir=./ ;;
10439 */) ;;
10440 *) as_dir=$as_dir/ ;;
10441 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010442 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +020010443 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10444 ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
10445 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010446 break 2
10447 fi
10448done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010449 done
Bram Moolenaar446cb832008-06-24 21:56:24 +000010450IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010451
Bram Moolenaar071d4272004-06-13 20:20:40 +000010452 ;;
Christian Brabandt9670f612025-05-07 21:44:33 +020010453esac ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +000010454esac
10455fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010456PKG_CONFIG=$ac_cv_path_PKG_CONFIG
Bram Moolenaar071d4272004-06-13 20:20:40 +000010457if test -n "$PKG_CONFIG"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010458 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10459printf "%s\n" "$PKG_CONFIG" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010460else
Illia Bobyra96d5442023-08-30 16:30:15 +020010461 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10462printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010463fi
10464
Bram Moolenaar446cb832008-06-24 21:56:24 +000010465
Bram Moolenaard6d30422018-01-28 22:48:55 +010010466fi
10467if test -z "$ac_cv_path_PKG_CONFIG"; then
10468 ac_pt_PKG_CONFIG=$PKG_CONFIG
10469 # Extract the first word of "pkg-config", so it can be a program name with args.
10470set dummy pkg-config; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +020010471{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10472printf %s "checking for $ac_word... " >&6; }
10473if test ${ac_cv_path_ac_pt_PKG_CONFIG+y}
10474then :
10475 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020010476else case e in #(
10477 e) case $ac_pt_PKG_CONFIG in
Bram Moolenaard6d30422018-01-28 22:48:55 +010010478 [\\/]* | ?:[\\/]*)
10479 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10480 ;;
10481 *)
10482 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10483for as_dir in $PATH
10484do
10485 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +020010486 case $as_dir in #(((
10487 '') as_dir=./ ;;
10488 */) ;;
10489 *) as_dir=$as_dir/ ;;
10490 esac
Bram Moolenaard6d30422018-01-28 22:48:55 +010010491 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +020010492 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10493 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
10494 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaard6d30422018-01-28 22:48:55 +010010495 break 2
10496 fi
10497done
10498 done
10499IFS=$as_save_IFS
10500
10501 ;;
Christian Brabandt9670f612025-05-07 21:44:33 +020010502esac ;;
Bram Moolenaard6d30422018-01-28 22:48:55 +010010503esac
10504fi
10505ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10506if test -n "$ac_pt_PKG_CONFIG"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010507 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10508printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; }
Bram Moolenaard6d30422018-01-28 22:48:55 +010010509else
Illia Bobyra96d5442023-08-30 16:30:15 +020010510 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10511printf "%s\n" "no" >&6; }
Bram Moolenaard6d30422018-01-28 22:48:55 +010010512fi
10513
10514 if test "x$ac_pt_PKG_CONFIG" = x; then
10515 PKG_CONFIG="no"
10516 else
10517 case $cross_compiling:$ac_tool_warned in
10518yes:)
Illia Bobyra96d5442023-08-30 16:30:15 +020010519{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10520printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Bram Moolenaard6d30422018-01-28 22:48:55 +010010521ac_tool_warned=yes ;;
10522esac
10523 PKG_CONFIG=$ac_pt_PKG_CONFIG
10524 fi
10525else
10526 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10527fi
10528
Bram Moolenaar427f5b62019-06-09 13:43:51 +020010529fi
10530
10531
10532if test -z "$SKIP_GTK2"; then
10533
Illia Bobyra96d5442023-08-30 16:30:15 +020010534 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-gtktest argument" >&5
10535printf %s "checking --disable-gtktest argument... " >&6; }
Bram Moolenaar427f5b62019-06-09 13:43:51 +020010536 # Check whether --enable-gtktest was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010537if test ${enable_gtktest+y}
10538then :
Bram Moolenaar427f5b62019-06-09 13:43:51 +020010539 enableval=$enable_gtktest;
Christian Brabandt9670f612025-05-07 21:44:33 +020010540else case e in #(
10541 e) enable_gtktest=yes ;;
10542esac
Bram Moolenaar427f5b62019-06-09 13:43:51 +020010543fi
10544
10545 if test "x$enable_gtktest" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010546 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gtk test enabled" >&5
10547printf "%s\n" "gtk test enabled" >&6; }
Bram Moolenaar427f5b62019-06-09 13:43:51 +020010548 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010549 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gtk test disabled" >&5
10550printf "%s\n" "gtk test disabled" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010551 fi
10552
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010553 if test "x$PKG_CONFIG" != "xno"; then
Bram Moolenaarf272ae12021-01-31 19:52:50 +010010554 save_skip_gtk3=$SKIP_GTK3
10555 SKIP_GTK3=YES
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010556
Bram Moolenaar071d4272004-06-13 20:20:40 +000010557 if test "X$GTK_CONFIG" != "Xno" -o "X$PKG_CONFIG" != "Xno"; then
10558 {
Bram Moolenaar071d4272004-06-13 20:20:40 +000010559 no_gtk=""
10560 if (test "X$SKIP_GTK2" != "XYES" -a "X$PKG_CONFIG" != "Xno") \
10561 && $PKG_CONFIG --exists gtk+-2.0; then
10562 {
Bram Moolenaar98921892016-02-23 17:14:37 +010010563 min_gtk_version=2.2.0
Illia Bobyra96d5442023-08-30 16:30:15 +020010564 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GTK - version >= $min_gtk_version" >&5
10565printf %s "checking for GTK - version >= $min_gtk_version... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010566 GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-2.0`
Bram Moolenaar7b0294c2004-10-11 10:16:09 +000010567 GTK_LIBDIR=`$PKG_CONFIG --libs-only-L gtk+-2.0`
Bram Moolenaar071d4272004-06-13 20:20:40 +000010568 GTK_LIBS=`$PKG_CONFIG --libs gtk+-2.0`
10569 gtk_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
10570 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
10571 gtk_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
10572 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
10573 gtk_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
10574 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
10575 }
Bram Moolenaar98921892016-02-23 17:14:37 +010010576 elif (test "X$SKIP_GTK3" != "XYES" -a "X$PKG_CONFIG" != "Xno") \
10577 && $PKG_CONFIG --exists gtk+-3.0; then
10578 {
10579 min_gtk_version=2.2.0
Illia Bobyra96d5442023-08-30 16:30:15 +020010580 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GTK - version >= $min_gtk_version" >&5
10581printf %s "checking for GTK - version >= $min_gtk_version... " >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010582
10583 GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-3.0`
10584 GTK_LIBDIR=`$PKG_CONFIG --libs-only-L gtk+-3.0`
10585 GTK_LIBS=`$PKG_CONFIG --libs gtk+-3.0`
10586 gtk_major_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
10587 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
10588 gtk_minor_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
10589 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
10590 gtk_micro_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
10591 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
10592 }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010593 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010594 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GTK -dev package" >&5
10595printf %s "checking for GTK -dev package... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010596 no_gtk=yes
10597 fi
10598
10599 if test "x$enable_gtktest" = "xyes" -a "x$no_gtk" = "x"; then
10600 {
10601 ac_save_CFLAGS="$CFLAGS"
10602 ac_save_LIBS="$LIBS"
10603 CFLAGS="$CFLAGS $GTK_CFLAGS"
10604 LIBS="$LIBS $GTK_LIBS"
10605
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010606 rm -f conf.gtktest
Illia Bobyra96d5442023-08-30 16:30:15 +020010607 if test "$cross_compiling" = yes
10608then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000010609 echo $ac_n "cross compiling; assumed OK... $ac_c"
Christian Brabandt9670f612025-05-07 21:44:33 +020010610else case e in #(
10611 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010612/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000010613
10614#include <gtk/gtk.h>
10615#include <stdio.h>
Bram Moolenaar446cb832008-06-24 21:56:24 +000010616#if STDC_HEADERS
10617# include <stdlib.h>
10618# include <stddef.h>
10619#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000010620
10621int
10622main ()
10623{
10624int major, minor, micro;
10625char *tmp_version;
10626
10627system ("touch conf.gtktest");
10628
10629/* HP/UX 9 (%@#!) writes to sscanf strings */
10630tmp_version = g_strdup("$min_gtk_version");
10631if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
10632 printf("%s, bad version string\n", "$min_gtk_version");
Zdenek Dohnal549f8c02023-12-14 20:22:49 +010010633 g_free(tmp_version);
Bram Moolenaar071d4272004-06-13 20:20:40 +000010634 exit(1);
10635 }
10636
Zdenek Dohnal549f8c02023-12-14 20:22:49 +010010637g_free(tmp_version);
10638
Bram Moolenaar071d4272004-06-13 20:20:40 +000010639if ((gtk_major_version > major) ||
10640 ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
10641 ((gtk_major_version == major) && (gtk_minor_version == minor) &&
10642 (gtk_micro_version >= micro)))
10643{
10644 return 0;
10645}
10646return 1;
10647}
10648
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010649_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020010650if ac_fn_c_try_run "$LINENO"
10651then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010652
Christian Brabandt9670f612025-05-07 21:44:33 +020010653else case e in #(
10654 e) no_gtk=yes ;;
10655esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010656fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010657rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
Christian Brabandt9670f612025-05-07 21:44:33 +020010658 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
10659esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010660fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000010661
Bram Moolenaar071d4272004-06-13 20:20:40 +000010662 CFLAGS="$ac_save_CFLAGS"
10663 LIBS="$ac_save_LIBS"
10664 }
10665 fi
10666 if test "x$no_gtk" = x ; then
10667 if test "x$enable_gtktest" = "xyes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010668 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&5
10669printf "%s\n" "yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010670 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010671 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&5
10672printf "%s\n" "found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010673 fi
Bram Moolenaar7b0294c2004-10-11 10:16:09 +000010674 GUI_LIB_LOC="$GTK_LIBDIR"
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010675 GTK_LIBNAME="$GTK_LIBS"
10676 GUI_INC_LOC="$GTK_CFLAGS"
Bram Moolenaar071d4272004-06-13 20:20:40 +000010677 else
10678 {
Illia Bobyra96d5442023-08-30 16:30:15 +020010679 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10680printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010681 GTK_CFLAGS=""
10682 GTK_LIBS=""
10683 :
Bram Moolenaaraf0839a2018-12-30 22:55:47 +010010684 if test "$fail_if_missing" = "yes" -a "X$gui_auto" != "Xyes"; then
10685 as_fn_error $? "could not configure GTK" "$LINENO" 5
10686 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000010687 }
10688 fi
10689 }
10690 else
10691 GTK_CFLAGS=""
10692 GTK_LIBS=""
10693 :
10694 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010695
10696
Bram Moolenaar071d4272004-06-13 20:20:40 +000010697 rm -f conf.gtktest
10698
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010699 if test "x$GTK_CFLAGS" != "x"; then
Bram Moolenaar98921892016-02-23 17:14:37 +010010700 SKIP_GTK3=YES
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010701 SKIP_MOTIF=YES
10702 GUITYPE=GTK
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010703
Bram Moolenaarf272ae12021-01-31 19:52:50 +010010704 else
10705 SKIP_GTK3=$save_skip_gtk3
Bram Moolenaar071d4272004-06-13 20:20:40 +000010706 fi
10707 fi
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010708 if test "x$GUITYPE" = "xGTK"; then
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010709 if test -z "$SKIP_GNOME"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000010710 {
Bram Moolenaar071d4272004-06-13 20:20:40 +000010711
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010712
10713
10714
10715
10716
Bram Moolenaar446cb832008-06-24 21:56:24 +000010717# Check whether --with-gnome-includes was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010718if test ${with_gnome_includes+y}
10719then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000010720 withval=$with_gnome_includes; CFLAGS="$CFLAGS -I$withval"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010721
Bram Moolenaar446cb832008-06-24 21:56:24 +000010722fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000010723
10724
Bram Moolenaar446cb832008-06-24 21:56:24 +000010725
10726# Check whether --with-gnome-libs was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010727if test ${with_gnome_libs+y}
10728then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000010729 withval=$with_gnome_libs; LDFLAGS="$LDFLAGS -L$withval" gnome_prefix=$withval
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010730
Bram Moolenaar446cb832008-06-24 21:56:24 +000010731fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000010732
10733
Bram Moolenaar446cb832008-06-24 21:56:24 +000010734
10735# Check whether --with-gnome was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010736if test ${with_gnome+y}
10737then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000010738 withval=$with_gnome; if test x$withval = xyes; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000010739 want_gnome=yes
10740 have_gnome=yes
10741 else
10742 if test "x$withval" = xno; then
10743 want_gnome=no
10744 else
10745 want_gnome=yes
10746 LDFLAGS="$LDFLAGS -L$withval/lib"
10747 CFLAGS="$CFLAGS -I$withval/include"
10748 gnome_prefix=$withval/lib
10749 fi
10750 fi
Christian Brabandt9670f612025-05-07 21:44:33 +020010751else case e in #(
10752 e) want_gnome=yes ;;
10753esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000010754fi
10755
Bram Moolenaar071d4272004-06-13 20:20:40 +000010756
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010757 if test "x$want_gnome" = xyes; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000010758 {
Illia Bobyra96d5442023-08-30 16:30:15 +020010759 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libgnomeui-2.0" >&5
10760printf %s "checking for libgnomeui-2.0... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010761 if $PKG_CONFIG --exists libgnomeui-2.0; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010762 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10763printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010764 GNOME_LIBS=`$PKG_CONFIG --libs-only-l libgnomeui-2.0`
10765 GNOME_LIBDIR=`$PKG_CONFIG --libs-only-L libgnomeui-2.0`
10766 GNOME_INCLUDEDIR=`$PKG_CONFIG --cflags libgnomeui-2.0`
Bram Moolenaar97b2ad32006-03-18 21:40:56 +000010767
Illia Bobyra96d5442023-08-30 16:30:15 +020010768 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FreeBSD" >&5
10769printf %s "checking for FreeBSD... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +000010770 if test "$vim_cv_uname_output" = FreeBSD; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010771 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10772printf "%s\n" "yes" >&6; }
Bram Moolenaarc9b4b052006-04-30 18:54:39 +000010773 GNOME_INCLUDEDIR="$GNOME_INCLUDEDIR -D_THREAD_SAFE"
Bram Moolenaar97b2ad32006-03-18 21:40:56 +000010774 GNOME_LIBS="$GNOME_LIBS -pthread"
10775 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010776 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10777printf "%s\n" "no" >&6; }
Bram Moolenaar97b2ad32006-03-18 21:40:56 +000010778 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000010779 have_gnome=yes
10780 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010781 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10782printf "%s\n" "not found" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010783 if test "x" = xfail; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010010784 as_fn_error $? "Could not find libgnomeui-2.0 via pkg-config" "$LINENO" 5
Bram Moolenaar071d4272004-06-13 20:20:40 +000010785 fi
10786 fi
10787 }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010788 fi
10789
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010790 if test "x$have_gnome" = xyes ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010791 printf "%s\n" "#define FEAT_GUI_GNOME 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000010792
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010793 GUI_INC_LOC="$GUI_INC_LOC $GNOME_INCLUDEDIR"
10794 GTK_LIBNAME="$GTK_LIBNAME $GNOME_LIBDIR $GNOME_LIBS"
Bram Moolenaar071d4272004-06-13 20:20:40 +000010795 fi
10796 }
10797 fi
10798 fi
10799fi
10800
Bram Moolenaar98921892016-02-23 17:14:37 +010010801
10802if test -z "$SKIP_GTK3"; then
10803
Illia Bobyra96d5442023-08-30 16:30:15 +020010804 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-gtktest argument" >&5
10805printf %s "checking --disable-gtktest argument... " >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010806 # Check whether --enable-gtktest was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010807if test ${enable_gtktest+y}
10808then :
Bram Moolenaar98921892016-02-23 17:14:37 +010010809 enableval=$enable_gtktest;
Christian Brabandt9670f612025-05-07 21:44:33 +020010810else case e in #(
10811 e) enable_gtktest=yes ;;
10812esac
Bram Moolenaar98921892016-02-23 17:14:37 +010010813fi
10814
10815 if test "x$enable_gtktest" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010816 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gtk test enabled" >&5
10817printf "%s\n" "gtk test enabled" >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010818 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010819 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gtk test disabled" >&5
10820printf "%s\n" "gtk test disabled" >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010821 fi
10822
Bram Moolenaar98921892016-02-23 17:14:37 +010010823 if test "x$PKG_CONFIG" != "xno"; then
Bram Moolenaarf272ae12021-01-31 19:52:50 +010010824 save_skip_gtk2=$SKIP_GTK2
10825 SKIP_GTK2=YES
Bram Moolenaar98921892016-02-23 17:14:37 +010010826
10827 if test "X$GTK_CONFIG" != "Xno" -o "X$PKG_CONFIG" != "Xno"; then
10828 {
10829 no_gtk=""
10830 if (test "X$SKIP_GTK2" != "XYES" -a "X$PKG_CONFIG" != "Xno") \
10831 && $PKG_CONFIG --exists gtk+-2.0; then
10832 {
10833 min_gtk_version=3.0.0
Illia Bobyra96d5442023-08-30 16:30:15 +020010834 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GTK - version >= $min_gtk_version" >&5
10835printf %s "checking for GTK - version >= $min_gtk_version... " >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010836 GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-2.0`
10837 GTK_LIBDIR=`$PKG_CONFIG --libs-only-L gtk+-2.0`
10838 GTK_LIBS=`$PKG_CONFIG --libs gtk+-2.0`
10839 gtk_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
10840 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
10841 gtk_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
10842 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
10843 gtk_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
10844 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
10845 }
10846 elif (test "X$SKIP_GTK3" != "XYES" -a "X$PKG_CONFIG" != "Xno") \
10847 && $PKG_CONFIG --exists gtk+-3.0; then
10848 {
10849 min_gtk_version=3.0.0
Illia Bobyra96d5442023-08-30 16:30:15 +020010850 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GTK - version >= $min_gtk_version" >&5
10851printf %s "checking for GTK - version >= $min_gtk_version... " >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010852
10853 GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-3.0`
10854 GTK_LIBDIR=`$PKG_CONFIG --libs-only-L gtk+-3.0`
10855 GTK_LIBS=`$PKG_CONFIG --libs gtk+-3.0`
10856 gtk_major_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
10857 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
10858 gtk_minor_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
10859 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
10860 gtk_micro_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
10861 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
10862 }
10863 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010864 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GTK -dev package" >&5
10865printf %s "checking for GTK -dev package... " >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010866 no_gtk=yes
10867 fi
10868
10869 if test "x$enable_gtktest" = "xyes" -a "x$no_gtk" = "x"; then
10870 {
10871 ac_save_CFLAGS="$CFLAGS"
10872 ac_save_LIBS="$LIBS"
10873 CFLAGS="$CFLAGS $GTK_CFLAGS"
10874 LIBS="$LIBS $GTK_LIBS"
10875
10876 rm -f conf.gtktest
Illia Bobyra96d5442023-08-30 16:30:15 +020010877 if test "$cross_compiling" = yes
10878then :
Bram Moolenaar98921892016-02-23 17:14:37 +010010879 echo $ac_n "cross compiling; assumed OK... $ac_c"
Christian Brabandt9670f612025-05-07 21:44:33 +020010880else case e in #(
10881 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar98921892016-02-23 17:14:37 +010010882/* end confdefs.h. */
10883
10884#include <gtk/gtk.h>
10885#include <stdio.h>
10886#if STDC_HEADERS
10887# include <stdlib.h>
10888# include <stddef.h>
10889#endif
10890
10891int
10892main ()
10893{
10894int major, minor, micro;
10895char *tmp_version;
10896
10897system ("touch conf.gtktest");
10898
10899/* HP/UX 9 (%@#!) writes to sscanf strings */
10900tmp_version = g_strdup("$min_gtk_version");
10901if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
10902 printf("%s, bad version string\n", "$min_gtk_version");
Christian Brabandt2f9aef42024-02-12 23:12:26 +010010903 g_free(tmp_version);
Bram Moolenaar98921892016-02-23 17:14:37 +010010904 exit(1);
10905 }
10906
Christian Brabandt2f9aef42024-02-12 23:12:26 +010010907g_free(tmp_version);
10908
Bram Moolenaar98921892016-02-23 17:14:37 +010010909if ((gtk_major_version > major) ||
10910 ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
10911 ((gtk_major_version == major) && (gtk_minor_version == minor) &&
10912 (gtk_micro_version >= micro)))
10913{
10914 return 0;
10915}
10916return 1;
10917}
10918
10919_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020010920if ac_fn_c_try_run "$LINENO"
10921then :
Bram Moolenaar98921892016-02-23 17:14:37 +010010922
Christian Brabandt9670f612025-05-07 21:44:33 +020010923else case e in #(
10924 e) no_gtk=yes ;;
10925esac
Bram Moolenaar98921892016-02-23 17:14:37 +010010926fi
10927rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
Christian Brabandt9670f612025-05-07 21:44:33 +020010928 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
10929esac
Bram Moolenaar98921892016-02-23 17:14:37 +010010930fi
10931
10932 CFLAGS="$ac_save_CFLAGS"
10933 LIBS="$ac_save_LIBS"
10934 }
10935 fi
10936 if test "x$no_gtk" = x ; then
10937 if test "x$enable_gtktest" = "xyes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010938 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&5
10939printf "%s\n" "yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010940 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010941 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&5
10942printf "%s\n" "found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010943 fi
10944 GUI_LIB_LOC="$GTK_LIBDIR"
10945 GTK_LIBNAME="$GTK_LIBS"
10946 GUI_INC_LOC="$GTK_CFLAGS"
10947 else
10948 {
Illia Bobyra96d5442023-08-30 16:30:15 +020010949 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10950printf "%s\n" "no" >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010951 GTK_CFLAGS=""
10952 GTK_LIBS=""
10953 :
Bram Moolenaaraf0839a2018-12-30 22:55:47 +010010954 if test "$fail_if_missing" = "yes" -a "X$gui_auto" != "Xyes"; then
10955 as_fn_error $? "could not configure GTK" "$LINENO" 5
10956 fi
Bram Moolenaar98921892016-02-23 17:14:37 +010010957 }
10958 fi
10959 }
10960 else
10961 GTK_CFLAGS=""
10962 GTK_LIBS=""
10963 :
10964 fi
10965
10966
10967 rm -f conf.gtktest
10968
10969 if test "x$GTK_CFLAGS" != "x"; then
10970 SKIP_GTK2=YES
10971 SKIP_GNOME=YES
Bram Moolenaar98921892016-02-23 17:14:37 +010010972 SKIP_MOTIF=YES
10973 GUITYPE=GTK
10974
Illia Bobyra96d5442023-08-30 16:30:15 +020010975 printf "%s\n" "#define USE_GTK3 1" >>confdefs.h
Bram Moolenaar98921892016-02-23 17:14:37 +010010976
Bram Moolenaarf272ae12021-01-31 19:52:50 +010010977 else
10978 SKIP_GTK2=$save_skip_gtk2
Bram Moolenaar98921892016-02-23 17:14:37 +010010979 fi
10980 fi
10981fi
10982
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010983if test "x$GUITYPE" = "xGTK"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010984 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking version of Gdk-Pixbuf" >&5
10985printf %s "checking version of Gdk-Pixbuf... " >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010986 gdk_pixbuf_version=`$PKG_CONFIG --modversion gdk-pixbuf-2.0`
10987 if test "x$gdk_pixbuf_version" != x ; then
10988 gdk_pixbuf_version_minor=`echo $gdk_pixbuf_version | \
10989 sed -e 's/[0-9][0-9]*\.\([0-9][0-9]*\)\.[0-9][0-9]*/\1/'`
10990 if test "x$gdk_pixbuf_version_minor" != x -a \
Bram Moolenaar33c31d52016-02-22 21:07:06 +010010991 $gdk_pixbuf_version_minor -ge 31 ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010992 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: OK." >&5
10993printf "%s\n" "OK." >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010994 # Extract the first word of "glib-compile-resources", so it can be a program name with args.
10995set dummy glib-compile-resources; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +020010996{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10997printf %s "checking for $ac_word... " >&6; }
10998if test ${ac_cv_path_GLIB_COMPILE_RESOURCES+y}
10999then :
11000 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020011001else case e in #(
11002 e) case $GLIB_COMPILE_RESOURCES in
Bram Moolenaar36e294c2015-12-29 18:55:46 +010011003 [\\/]* | ?:[\\/]*)
11004 ac_cv_path_GLIB_COMPILE_RESOURCES="$GLIB_COMPILE_RESOURCES" # Let the user override the test with a path.
11005 ;;
11006 *)
11007 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11008for as_dir in $PATH
11009do
11010 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +020011011 case $as_dir in #(((
11012 '') as_dir=./ ;;
11013 */) ;;
11014 *) as_dir=$as_dir/ ;;
11015 esac
Bram Moolenaar36e294c2015-12-29 18:55:46 +010011016 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +020011017 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
11018 ac_cv_path_GLIB_COMPILE_RESOURCES="$as_dir$ac_word$ac_exec_ext"
11019 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar36e294c2015-12-29 18:55:46 +010011020 break 2
11021 fi
11022done
11023 done
11024IFS=$as_save_IFS
11025
11026 test -z "$ac_cv_path_GLIB_COMPILE_RESOURCES" && ac_cv_path_GLIB_COMPILE_RESOURCES="no"
11027 ;;
Christian Brabandt9670f612025-05-07 21:44:33 +020011028esac ;;
Bram Moolenaar36e294c2015-12-29 18:55:46 +010011029esac
11030fi
11031GLIB_COMPILE_RESOURCES=$ac_cv_path_GLIB_COMPILE_RESOURCES
11032if test -n "$GLIB_COMPILE_RESOURCES"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011033 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GLIB_COMPILE_RESOURCES" >&5
11034printf "%s\n" "$GLIB_COMPILE_RESOURCES" >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010011035else
Illia Bobyra96d5442023-08-30 16:30:15 +020011036 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11037printf "%s\n" "no" >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010011038fi
11039
11040
Illia Bobyra96d5442023-08-30 16:30:15 +020011041 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking glib-compile-resources" >&5
11042printf %s "checking glib-compile-resources... " >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010011043 if test "x$GLIB_COMPILE_RESOURCES" = xno ; then
Bram Moolenaar33c31d52016-02-22 21:07:06 +010011044 GLIB_COMPILE_RESOURCES=""
Illia Bobyra96d5442023-08-30 16:30:15 +020011045 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot be found in PATH." >&5
11046printf "%s\n" "cannot be found in PATH." >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010011047 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011048 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: usable." >&5
11049printf "%s\n" "usable." >&6; }
11050 printf "%s\n" "#define USE_GRESOURCE 1" >>confdefs.h
Bram Moolenaar36e294c2015-12-29 18:55:46 +010011051
Bram Moolenaar33c31d52016-02-22 21:07:06 +010011052 GRESOURCE_SRC="auto/gui_gtk_gresources.c"
11053 GRESOURCE_OBJ="objects/gui_gtk_gresources.o"
Bram Moolenaar36e294c2015-12-29 18:55:46 +010011054 fi
11055 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011056 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable." >&5
11057printf "%s\n" "not usable." >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010011058 fi
11059 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011060 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot obtain from pkg_config." >&5
11061printf "%s\n" "cannot obtain from pkg_config." >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010011062 fi
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011063
Illia Bobyra96d5442023-08-30 16:30:15 +020011064 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-icon-cache-update argument" >&5
11065printf %s "checking --disable-icon-cache-update argument... " >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011066 # Check whether --enable-icon_cache_update was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020011067if test ${enable_icon_cache_update+y}
11068then :
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011069 enableval=$enable_icon_cache_update;
Christian Brabandt9670f612025-05-07 21:44:33 +020011070else case e in #(
11071 e) enable_icon_cache_update="yes" ;;
11072esac
Bram Moolenaar36e294c2015-12-29 18:55:46 +010011073fi
11074
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011075 if test "$enable_icon_cache_update" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011076 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not set" >&5
11077printf "%s\n" "not set" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011078 # Extract the first word of "gtk-update-icon-cache", so it can be a program name with args.
11079set dummy gtk-update-icon-cache; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +020011080{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11081printf %s "checking for $ac_word... " >&6; }
11082if test ${ac_cv_path_GTK_UPDATE_ICON_CACHE+y}
11083then :
11084 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020011085else case e in #(
11086 e) case $GTK_UPDATE_ICON_CACHE in
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011087 [\\/]* | ?:[\\/]*)
11088 ac_cv_path_GTK_UPDATE_ICON_CACHE="$GTK_UPDATE_ICON_CACHE" # Let the user override the test with a path.
11089 ;;
11090 *)
11091 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11092for as_dir in $PATH
11093do
11094 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +020011095 case $as_dir in #(((
11096 '') as_dir=./ ;;
11097 */) ;;
11098 *) as_dir=$as_dir/ ;;
11099 esac
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011100 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +020011101 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
11102 ac_cv_path_GTK_UPDATE_ICON_CACHE="$as_dir$ac_word$ac_exec_ext"
11103 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011104 break 2
11105 fi
11106done
11107 done
11108IFS=$as_save_IFS
11109
11110 test -z "$ac_cv_path_GTK_UPDATE_ICON_CACHE" && ac_cv_path_GTK_UPDATE_ICON_CACHE="no"
11111 ;;
Christian Brabandt9670f612025-05-07 21:44:33 +020011112esac ;;
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011113esac
11114fi
11115GTK_UPDATE_ICON_CACHE=$ac_cv_path_GTK_UPDATE_ICON_CACHE
11116if test -n "$GTK_UPDATE_ICON_CACHE"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011117 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GTK_UPDATE_ICON_CACHE" >&5
11118printf "%s\n" "$GTK_UPDATE_ICON_CACHE" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011119else
Illia Bobyra96d5442023-08-30 16:30:15 +020011120 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11121printf "%s\n" "no" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011122fi
11123
11124
11125 if test "x$GTK_UPDATE_ICON_CACHE" = "xno" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011126 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found in PATH." >&5
11127printf "%s\n" "not found in PATH." >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011128 fi
11129 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011130 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: update disabled" >&5
11131printf "%s\n" "update disabled" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011132 fi
11133
Illia Bobyra96d5442023-08-30 16:30:15 +020011134 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-desktop-database-update argument" >&5
11135printf %s "checking --disable-desktop-database-update argument... " >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011136 # Check whether --enable-desktop_database_update was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020011137if test ${enable_desktop_database_update+y}
11138then :
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011139 enableval=$enable_desktop_database_update;
Christian Brabandt9670f612025-05-07 21:44:33 +020011140else case e in #(
11141 e) enable_desktop_database_update="yes" ;;
11142esac
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011143fi
11144
11145 if test "$enable_desktop_database_update" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011146 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not set" >&5
11147printf "%s\n" "not set" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011148 # Extract the first word of "update-desktop-database", so it can be a program name with args.
11149set dummy update-desktop-database; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +020011150{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11151printf %s "checking for $ac_word... " >&6; }
11152if test ${ac_cv_path_UPDATE_DESKTOP_DATABASE+y}
11153then :
11154 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020011155else case e in #(
11156 e) case $UPDATE_DESKTOP_DATABASE in
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011157 [\\/]* | ?:[\\/]*)
11158 ac_cv_path_UPDATE_DESKTOP_DATABASE="$UPDATE_DESKTOP_DATABASE" # Let the user override the test with a path.
11159 ;;
11160 *)
11161 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11162for as_dir in $PATH
11163do
11164 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +020011165 case $as_dir in #(((
11166 '') as_dir=./ ;;
11167 */) ;;
11168 *) as_dir=$as_dir/ ;;
11169 esac
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011170 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +020011171 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
11172 ac_cv_path_UPDATE_DESKTOP_DATABASE="$as_dir$ac_word$ac_exec_ext"
11173 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011174 break 2
11175 fi
11176done
11177 done
11178IFS=$as_save_IFS
11179
11180 test -z "$ac_cv_path_UPDATE_DESKTOP_DATABASE" && ac_cv_path_UPDATE_DESKTOP_DATABASE="no"
11181 ;;
Christian Brabandt9670f612025-05-07 21:44:33 +020011182esac ;;
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011183esac
11184fi
11185UPDATE_DESKTOP_DATABASE=$ac_cv_path_UPDATE_DESKTOP_DATABASE
11186if test -n "$UPDATE_DESKTOP_DATABASE"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011187 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $UPDATE_DESKTOP_DATABASE" >&5
11188printf "%s\n" "$UPDATE_DESKTOP_DATABASE" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011189else
Illia Bobyra96d5442023-08-30 16:30:15 +020011190 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11191printf "%s\n" "no" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011192fi
11193
11194
11195 if test "x$UPDATE_DESKTOP_DATABASE" = "xno" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011196 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found in PATH." >&5
11197printf "%s\n" "not found in PATH." >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011198 fi
11199 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011200 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: update disabled" >&5
11201printf "%s\n" "update disabled" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011202 fi
11203fi
11204
11205
11206
Bram Moolenaar36e294c2015-12-29 18:55:46 +010011207
11208
11209
11210
Bram Moolenaar071d4272004-06-13 20:20:40 +000011211if test -z "$SKIP_MOTIF"; then
11212 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"
11213 GUI_INC_LOC="`echo $GUI_INC_LOC|sed 's%-I%%g'`"
11214
Illia Bobyra96d5442023-08-30 16:30:15 +020011215 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for location of Motif GUI includes" >&5
11216printf %s "checking for location of Motif GUI includes... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011217 gui_includes="`echo $x_includes|sed 's%/^/^/*$%%'` `echo "$gui_XXX" | sed s/XXX/include/g` $GUI_INC_LOC"
11218 GUI_INC_LOC=
11219 for try in $gui_includes; do
11220 if test -f "$try/Xm/Xm.h"; then
11221 GUI_INC_LOC=$try
11222 fi
11223 done
11224 if test -n "$GUI_INC_LOC"; then
11225 if test "$GUI_INC_LOC" = /usr/include; then
11226 GUI_INC_LOC=
Illia Bobyra96d5442023-08-30 16:30:15 +020011227 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: in default path" >&5
11228printf "%s\n" "in default path" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011229 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011230 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GUI_INC_LOC" >&5
11231printf "%s\n" "$GUI_INC_LOC" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011232 fi
11233 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011234 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <not found>" >&5
11235printf "%s\n" "<not found>" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011236 SKIP_MOTIF=YES
11237 fi
11238fi
11239
11240
11241if test -z "$SKIP_MOTIF"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011242 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-motif-lib argument" >&5
11243printf %s "checking --with-motif-lib argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011244
Bram Moolenaar446cb832008-06-24 21:56:24 +000011245# Check whether --with-motif-lib was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020011246if test ${with_motif_lib+y}
11247then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000011248 withval=$with_motif_lib; MOTIF_LIBNAME="${withval}"
11249fi
11250
Bram Moolenaar071d4272004-06-13 20:20:40 +000011251
11252 if test -n "$MOTIF_LIBNAME"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011253 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MOTIF_LIBNAME" >&5
11254printf "%s\n" "$MOTIF_LIBNAME" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011255 GUI_LIB_LOC=
11256 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011257 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11258printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011259
11260 GUI_LIB_LOC="`echo $GUI_LIB_LOC|sed 's%-L%%g'`"
11261
Illia Bobyra96d5442023-08-30 16:30:15 +020011262 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for location of Motif GUI libs" >&5
11263printf %s "checking for location of Motif GUI libs... " >&6; }
Bram Moolenaar01967f52023-04-12 16:24:03 +010011264 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 +000011265 GUI_LIB_LOC=
11266 for try in $gui_libs; do
Kelvin Leeb4716902022-04-04 17:20:01 +010011267 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 +000011268 if test -f "$libtry"; then
11269 GUI_LIB_LOC=$try
11270 fi
11271 done
11272 done
11273 if test -n "$GUI_LIB_LOC"; then
Bram Moolenaar01967f52023-04-12 16:24:03 +010011274 if test "$GUI_LIB_LOC" = /usr/lib \
11275 -o "$GUI_LIB_LOC" = /usr/lib64 \
Bram Moolenaar6324c3b2013-06-17 20:27:18 +020011276 -o "$GUI_LIB_LOC" = /usr/lib/i386-linux-gnu \
11277 -o "$GUI_LIB_LOC" = /usr/lib/x86_64-linux-gnu; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000011278 GUI_LIB_LOC=
Illia Bobyra96d5442023-08-30 16:30:15 +020011279 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: in default path" >&5
11280printf "%s\n" "in default path" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011281 else
11282 if test -n "$GUI_LIB_LOC"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011283 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GUI_LIB_LOC" >&5
11284printf "%s\n" "$GUI_LIB_LOC" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +000011285 if test "$vim_cv_uname_output" = SunOS &&
11286 echo $vim_cv_uname_r_output | grep '^5' >/dev/null; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000011287 GUI_LIB_LOC="$GUI_LIB_LOC -R $GUI_LIB_LOC"
11288 fi
11289 fi
11290 fi
11291 MOTIF_LIBNAME=-lXm
11292 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011293 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <not found>" >&5
11294printf "%s\n" "<not found>" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011295 SKIP_MOTIF=YES
11296 fi
11297 fi
11298fi
11299
11300if test -z "$SKIP_MOTIF"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000011301 GUITYPE=MOTIF
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011302
Bram Moolenaar071d4272004-06-13 20:20:40 +000011303fi
11304
Bram Moolenaare2adcf32022-03-12 11:57:25 +000011305if test -z "$SKIP_MOTIF"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000011306 if test -n "$GUI_INC_LOC"; then
11307 GUI_INC_LOC=-I"`echo $GUI_INC_LOC|sed 's%-I%%'`"
11308 fi
11309 if test -n "$GUI_LIB_LOC"; then
11310 GUI_LIB_LOC=-L"`echo $GUI_LIB_LOC|sed 's%-L%%'`"
11311 fi
11312
11313 ldflags_save=$LDFLAGS
11314 LDFLAGS="$X_LIBS $LDFLAGS"
Illia Bobyra96d5442023-08-30 16:30:15 +020011315 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XShapeQueryExtension in -lXext" >&5
11316printf %s "checking for XShapeQueryExtension in -lXext... " >&6; }
11317if test ${ac_cv_lib_Xext_XShapeQueryExtension+y}
11318then :
11319 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020011320else case e in #(
11321 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000011322LIBS="-lXext -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011323cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011324/* end confdefs.h. */
11325
Bram Moolenaar446cb832008-06-24 21:56:24 +000011326/* Override any GCC internal prototype to avoid an error.
11327 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020011328 builtin and then its argument prototype would still apply.
11329 The 'extern "C"' is for builds by C++ compilers;
11330 although this is not generally supported in C code supporting it here
11331 has little cost and some practical benefit (sr 110532). */
11332#ifdef __cplusplus
11333extern "C"
11334#endif
11335char XShapeQueryExtension (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011336int
Illia Bobyra96d5442023-08-30 16:30:15 +020011337main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011338{
Bram Moolenaar446cb832008-06-24 21:56:24 +000011339return XShapeQueryExtension ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011340 ;
11341 return 0;
11342}
11343_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011344if ac_fn_c_try_link "$LINENO"
11345then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011346 ac_cv_lib_Xext_XShapeQueryExtension=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020011347else case e in #(
11348 e) ac_cv_lib_Xext_XShapeQueryExtension=no ;;
11349esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000011350fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011351rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011352 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020011353LIBS=$ac_check_lib_save_LIBS ;;
11354esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011355fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011356{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
11357printf "%s\n" "$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
11358if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = xyes
11359then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000011360 GUI_X_LIBS="-lXext"
Bram Moolenaar071d4272004-06-13 20:20:40 +000011361fi
11362
Illia Bobyra96d5442023-08-30 16:30:15 +020011363 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wslen in -lw" >&5
11364printf %s "checking for wslen in -lw... " >&6; }
11365if test ${ac_cv_lib_w_wslen+y}
11366then :
11367 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020011368else case e in #(
11369 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000011370LIBS="-lw $GUI_X_LIBS -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011371cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011372/* end confdefs.h. */
11373
Bram Moolenaar446cb832008-06-24 21:56:24 +000011374/* Override any GCC internal prototype to avoid an error.
11375 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020011376 builtin and then its argument prototype would still apply.
11377 The 'extern "C"' is for builds by C++ compilers;
11378 although this is not generally supported in C code supporting it here
11379 has little cost and some practical benefit (sr 110532). */
11380#ifdef __cplusplus
11381extern "C"
11382#endif
11383char wslen (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011384int
Illia Bobyra96d5442023-08-30 16:30:15 +020011385main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011386{
Bram Moolenaar446cb832008-06-24 21:56:24 +000011387return wslen ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011388 ;
11389 return 0;
11390}
11391_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011392if ac_fn_c_try_link "$LINENO"
11393then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011394 ac_cv_lib_w_wslen=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020011395else case e in #(
11396 e) ac_cv_lib_w_wslen=no ;;
11397esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000011398fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011399rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011400 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020011401LIBS=$ac_check_lib_save_LIBS ;;
11402esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011403fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011404{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wslen" >&5
11405printf "%s\n" "$ac_cv_lib_w_wslen" >&6; }
11406if test "x$ac_cv_lib_w_wslen" = xyes
11407then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000011408 X_EXTRA_LIBS="$X_EXTRA_LIBS -lw"
Bram Moolenaar071d4272004-06-13 20:20:40 +000011409fi
11410
Illia Bobyra96d5442023-08-30 16:30:15 +020011411 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlsym in -ldl" >&5
11412printf %s "checking for dlsym in -ldl... " >&6; }
11413if test ${ac_cv_lib_dl_dlsym+y}
11414then :
11415 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020011416else case e in #(
11417 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000011418LIBS="-ldl $GUI_X_LIBS -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011419cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011420/* end confdefs.h. */
11421
Bram Moolenaar446cb832008-06-24 21:56:24 +000011422/* Override any GCC internal prototype to avoid an error.
11423 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020011424 builtin and then its argument prototype would still apply.
11425 The 'extern "C"' is for builds by C++ compilers;
11426 although this is not generally supported in C code supporting it here
11427 has little cost and some practical benefit (sr 110532). */
11428#ifdef __cplusplus
11429extern "C"
11430#endif
11431char dlsym (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011432int
Illia Bobyra96d5442023-08-30 16:30:15 +020011433main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011434{
Bram Moolenaar446cb832008-06-24 21:56:24 +000011435return dlsym ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011436 ;
11437 return 0;
11438}
11439_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011440if ac_fn_c_try_link "$LINENO"
11441then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011442 ac_cv_lib_dl_dlsym=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020011443else case e in #(
11444 e) ac_cv_lib_dl_dlsym=no ;;
11445esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000011446fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011447rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011448 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020011449LIBS=$ac_check_lib_save_LIBS ;;
11450esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011451fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011452{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlsym" >&5
11453printf "%s\n" "$ac_cv_lib_dl_dlsym" >&6; }
11454if test "x$ac_cv_lib_dl_dlsym" = xyes
11455then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000011456 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldl"
Bram Moolenaar071d4272004-06-13 20:20:40 +000011457fi
11458
Illia Bobyra96d5442023-08-30 16:30:15 +020011459 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XmuCreateStippledPixmap in -lXmu" >&5
11460printf %s "checking for XmuCreateStippledPixmap in -lXmu... " >&6; }
11461if test ${ac_cv_lib_Xmu_XmuCreateStippledPixmap+y}
11462then :
11463 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020011464else case e in #(
11465 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000011466LIBS="-lXmu $GUI_X_LIBS -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011467cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011468/* end confdefs.h. */
11469
Bram Moolenaar446cb832008-06-24 21:56:24 +000011470/* Override any GCC internal prototype to avoid an error.
11471 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020011472 builtin and then its argument prototype would still apply.
11473 The 'extern "C"' is for builds by C++ compilers;
11474 although this is not generally supported in C code supporting it here
11475 has little cost and some practical benefit (sr 110532). */
11476#ifdef __cplusplus
11477extern "C"
11478#endif
11479char XmuCreateStippledPixmap (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011480int
Illia Bobyra96d5442023-08-30 16:30:15 +020011481main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011482{
Bram Moolenaar446cb832008-06-24 21:56:24 +000011483return XmuCreateStippledPixmap ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011484 ;
11485 return 0;
11486}
11487_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011488if ac_fn_c_try_link "$LINENO"
11489then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011490 ac_cv_lib_Xmu_XmuCreateStippledPixmap=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020011491else case e in #(
11492 e) ac_cv_lib_Xmu_XmuCreateStippledPixmap=no ;;
11493esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000011494fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011495rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011496 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020011497LIBS=$ac_check_lib_save_LIBS ;;
11498esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011499fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011500{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuCreateStippledPixmap" >&5
11501printf "%s\n" "$ac_cv_lib_Xmu_XmuCreateStippledPixmap" >&6; }
11502if test "x$ac_cv_lib_Xmu_XmuCreateStippledPixmap" = xyes
11503then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000011504 GUI_X_LIBS="-lXmu $GUI_X_LIBS"
Bram Moolenaar071d4272004-06-13 20:20:40 +000011505fi
11506
11507 if test -z "$SKIP_MOTIF"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011508 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XpEndJob in -lXp" >&5
11509printf %s "checking for XpEndJob in -lXp... " >&6; }
11510if test ${ac_cv_lib_Xp_XpEndJob+y}
11511then :
11512 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020011513else case e in #(
11514 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000011515LIBS="-lXp $GUI_X_LIBS -lXm -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011516cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011517/* end confdefs.h. */
11518
Bram Moolenaar446cb832008-06-24 21:56:24 +000011519/* Override any GCC internal prototype to avoid an error.
11520 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020011521 builtin and then its argument prototype would still apply.
11522 The 'extern "C"' is for builds by C++ compilers;
11523 although this is not generally supported in C code supporting it here
11524 has little cost and some practical benefit (sr 110532). */
11525#ifdef __cplusplus
11526extern "C"
11527#endif
11528char XpEndJob (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011529int
Illia Bobyra96d5442023-08-30 16:30:15 +020011530main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011531{
Bram Moolenaar446cb832008-06-24 21:56:24 +000011532return XpEndJob ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011533 ;
11534 return 0;
11535}
11536_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011537if ac_fn_c_try_link "$LINENO"
11538then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011539 ac_cv_lib_Xp_XpEndJob=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020011540else case e in #(
11541 e) ac_cv_lib_Xp_XpEndJob=no ;;
11542esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000011543fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011544rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011545 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020011546LIBS=$ac_check_lib_save_LIBS ;;
11547esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011548fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011549{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpEndJob" >&5
11550printf "%s\n" "$ac_cv_lib_Xp_XpEndJob" >&6; }
11551if test "x$ac_cv_lib_Xp_XpEndJob" = xyes
11552then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000011553 GUI_X_LIBS="-lXp $GUI_X_LIBS"
Bram Moolenaar071d4272004-06-13 20:20:40 +000011554fi
11555
11556 fi
11557 LDFLAGS=$ldflags_save
11558
Illia Bobyra96d5442023-08-30 16:30:15 +020011559 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for extra X11 defines" >&5
11560printf %s "checking for extra X11 defines... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011561 NARROW_PROTO=
11562 rm -fr conftestdir
11563 if mkdir conftestdir; then
11564 cd conftestdir
11565 cat > Imakefile <<'EOF'
11566acfindx:
11567 @echo 'NARROW_PROTO="${PROTO_DEFINES}"'
11568EOF
11569 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
11570 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
11571 fi
11572 cd ..
11573 rm -fr conftestdir
11574 fi
11575 if test -z "$NARROW_PROTO"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011576 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11577printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011578 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011579 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NARROW_PROTO" >&5
11580printf "%s\n" "$NARROW_PROTO" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011581 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011582
Bram Moolenaar071d4272004-06-13 20:20:40 +000011583fi
11584
11585if test "$enable_xsmp" = "yes"; then
11586 cppflags_save=$CPPFLAGS
11587 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
Illia Bobyra96d5442023-08-30 16:30:15 +020011588 ac_fn_c_check_header_compile "$LINENO" "X11/SM/SMlib.h" "ac_cv_header_X11_SM_SMlib_h" "$ac_includes_default"
11589if test "x$ac_cv_header_X11_SM_SMlib_h" = xyes
11590then :
11591 printf "%s\n" "#define HAVE_X11_SM_SMLIB_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011592
11593fi
11594
Bram Moolenaar071d4272004-06-13 20:20:40 +000011595 CPPFLAGS=$cppflags_save
11596fi
11597
11598
Bram Moolenaarf52fac22022-03-11 16:01:26 +000011599if test -z "$SKIP_MOTIF" -o -z "$SKIP_GTK2" -o -z "$SKIP_GTK3"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000011600 cppflags_save=$CPPFLAGS
11601 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
Illia Bobyra96d5442023-08-30 16:30:15 +020011602 ac_fn_c_check_header_compile "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default"
11603if test "x$ac_cv_header_X11_xpm_h" = xyes
11604then :
11605 printf "%s\n" "#define HAVE_X11_XPM_H 1" >>confdefs.h
11606
11607fi
11608ac_fn_c_check_header_compile "$LINENO" "X11/Sunkeysym.h" "ac_cv_header_X11_Sunkeysym_h" "$ac_includes_default"
11609if test "x$ac_cv_header_X11_Sunkeysym_h" = xyes
11610then :
11611 printf "%s\n" "#define HAVE_X11_SUNKEYSYM_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011612
11613fi
11614
Bram Moolenaar071d4272004-06-13 20:20:40 +000011615
11616 if test ! "$enable_xim" = "no"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011617 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XIMText in X11/Xlib.h" >&5
11618printf %s "checking for XIMText in X11/Xlib.h... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011620/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000011621#include <X11/Xlib.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011622_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000011623if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Christian Brabandt9670f612025-05-07 21:44:33 +020011624 $EGREP_TRADITIONAL "XIMText" >/dev/null 2>&1
Illia Bobyra96d5442023-08-30 16:30:15 +020011625then :
11626 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11627printf "%s\n" "yes" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +020011628else case e in #(
11629 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no; xim has been disabled" >&5
11630printf "%s\n" "no; xim has been disabled" >&6; }; enable_xim="no" ;;
11631esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000011632fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011633rm -rf conftest*
Bram Moolenaar071d4272004-06-13 20:20:40 +000011634
11635 fi
11636 CPPFLAGS=$cppflags_save
11637
Bram Moolenaar54612582019-11-21 17:13:31 +010011638 if test "$enable_xim" = "auto" -a "x$GUITYPE" != "xNONE" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011639 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: X GUI selected; xim has been enabled" >&5
11640printf "%s\n" "X GUI selected; xim has been enabled" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011641 enable_xim="yes"
11642 fi
11643fi
11644
Bram Moolenaarf52fac22022-03-11 16:01:26 +000011645if test -z "$SKIP_MOTIF"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000011646 cppflags_save=$CPPFLAGS
11647 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
Illia Bobyra96d5442023-08-30 16:30:15 +020011648 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for X11/Xmu/Editres.h" >&5
11649printf %s "checking for X11/Xmu/Editres.h... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011651/* end confdefs.h. */
Bram Moolenaar2ce06f62005-01-31 19:19:04 +000011652
11653#include <X11/Intrinsic.h>
11654#include <X11/Xmu/Editres.h>
11655int
Illia Bobyra96d5442023-08-30 16:30:15 +020011656main (void)
Bram Moolenaar2ce06f62005-01-31 19:19:04 +000011657{
11658int i; i = 0;
11659 ;
11660 return 0;
11661}
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011662_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011663if ac_fn_c_try_compile "$LINENO"
11664then :
11665 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11666printf "%s\n" "yes" >&6; }
11667 printf "%s\n" "#define HAVE_X11_XMU_EDITRES_H 1" >>confdefs.h
Bram Moolenaar2ce06f62005-01-31 19:19:04 +000011668
Christian Brabandt9670f612025-05-07 21:44:33 +020011669else case e in #(
11670 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11671printf "%s\n" "no" >&6; } ;;
11672esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000011673fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011674rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000011675 CPPFLAGS=$cppflags_save
11676fi
11677
11678if test -z "$SKIP_MOTIF"; then
11679 cppflags_save=$CPPFLAGS
11680 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
Bram Moolenaar77c19352012-06-13 19:19:41 +020011681 if test "$zOSUnix" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011682 ac_fn_c_check_header_compile "$LINENO" "Xm/Xm.h" "ac_cv_header_Xm_Xm_h" "$ac_includes_default"
11683if test "x$ac_cv_header_Xm_Xm_h" = xyes
11684then :
11685 printf "%s\n" "#define HAVE_XM_XM_H 1" >>confdefs.h
Bram Moolenaar1004b3d2022-06-05 19:51:55 +010011686
11687fi
11688
Bram Moolenaar77c19352012-06-13 19:19:41 +020011689 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011690 ac_fn_c_check_header_compile "$LINENO" "Xm/Xm.h" "ac_cv_header_Xm_Xm_h" "$ac_includes_default"
11691if test "x$ac_cv_header_Xm_Xm_h" = xyes
11692then :
11693 printf "%s\n" "#define HAVE_XM_XM_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011694
11695fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011696ac_fn_c_check_header_compile "$LINENO" "Xm/XpmP.h" "ac_cv_header_Xm_XpmP_h" "$ac_includes_default"
11697if test "x$ac_cv_header_Xm_XpmP_h" = xyes
11698then :
11699 printf "%s\n" "#define HAVE_XM_XPMP_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011700
Illia Bobyra96d5442023-08-30 16:30:15 +020011701fi
11702ac_fn_c_check_header_compile "$LINENO" "Xm/JoinSideT.h" "ac_cv_header_Xm_JoinSideT_h" "$ac_includes_default"
11703if test "x$ac_cv_header_Xm_JoinSideT_h" = xyes
11704then :
11705 printf "%s\n" "#define HAVE_XM_JOINSIDET_H 1" >>confdefs.h
11706
11707fi
11708ac_fn_c_check_header_compile "$LINENO" "Xm/TraitP.h" "ac_cv_header_Xm_TraitP_h" "$ac_includes_default"
11709if test "x$ac_cv_header_Xm_TraitP_h" = xyes
11710then :
11711 printf "%s\n" "#define HAVE_XM_TRAITP_H 1" >>confdefs.h
11712
11713fi
11714ac_fn_c_check_header_compile "$LINENO" "Xm/Manager.h" "ac_cv_header_Xm_Manager_h" "$ac_includes_default"
11715if test "x$ac_cv_header_Xm_Manager_h" = xyes
11716then :
11717 printf "%s\n" "#define HAVE_XM_MANAGER_H 1" >>confdefs.h
11718
11719fi
11720ac_fn_c_check_header_compile "$LINENO" "Xm/UnhighlightT.h" "ac_cv_header_Xm_UnhighlightT_h" "$ac_includes_default"
11721if test "x$ac_cv_header_Xm_UnhighlightT_h" = xyes
11722then :
11723 printf "%s\n" "#define HAVE_XM_UNHIGHLIGHTT_H 1" >>confdefs.h
11724
11725fi
11726ac_fn_c_check_header_compile "$LINENO" "Xm/Notebook.h" "ac_cv_header_Xm_Notebook_h" "$ac_includes_default"
11727if test "x$ac_cv_header_Xm_Notebook_h" = xyes
11728then :
11729 printf "%s\n" "#define HAVE_XM_NOTEBOOK_H 1" >>confdefs.h
11730
11731fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000011732
Bram Moolenaar1004b3d2022-06-05 19:51:55 +010011733 fi
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011734
Bram Moolenaar77c19352012-06-13 19:19:41 +020011735 if test "x$ac_cv_header_Xm_XpmP_h" = "xyes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011736 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XpmAttributes_21 in Xm/XpmP.h" >&5
11737printf %s "checking for XpmAttributes_21 in Xm/XpmP.h... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011739/* end confdefs.h. */
11740#include <Xm/XpmP.h>
11741int
Illia Bobyra96d5442023-08-30 16:30:15 +020011742main (void)
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011743{
11744XpmAttributes_21 attr;
11745 ;
11746 return 0;
11747}
11748_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011749if ac_fn_c_try_compile "$LINENO"
11750then :
11751 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11752printf "%s\n" "yes" >&6; }; printf "%s\n" "#define XPMATTRIBUTES_TYPE XpmAttributes_21" >>confdefs.h
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011753
Christian Brabandt9670f612025-05-07 21:44:33 +020011754else case e in #(
11755 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +020011756printf "%s\n" "no" >&6; }; printf "%s\n" "#define XPMATTRIBUTES_TYPE XpmAttributes" >>confdefs.h
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011757
Christian Brabandt9670f612025-05-07 21:44:33 +020011758 ;;
11759esac
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011760fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011761rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011762 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011763 printf "%s\n" "#define XPMATTRIBUTES_TYPE XpmAttributes" >>confdefs.h
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011764
11765 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000011766 CPPFLAGS=$cppflags_save
11767fi
11768
11769if test "x$GUITYPE" = "xNONE" -a "$enable_xim" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011770 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no GUI selected; xim has been disabled" >&5
11771printf "%s\n" "no GUI selected; xim has been disabled" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011772 enable_xim="no"
11773fi
11774if test "x$GUITYPE" = "xNONE" -a "$enable_fontset" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011775 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no GUI selected; fontset has been disabled" >&5
11776printf "%s\n" "no GUI selected; fontset has been disabled" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011777 enable_fontset="no"
11778fi
Bram Moolenaar182c5be2010-06-25 05:37:59 +020011779if test "x$GUITYPE:$enable_fontset" = "xGTK:yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011780 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: GTK+ 2 GUI selected; fontset has been disabled" >&5
11781printf "%s\n" "GTK+ 2 GUI selected; fontset has been disabled" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011782 enable_fontset="no"
11783fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000011784
Bram Moolenaarb3f74062020-02-26 16:16:53 +010011785if test -z "$SKIP_HAIKU"; then
11786 GUITYPE=HAIKUGUI
11787fi
11788
Bram Moolenaar071d4272004-06-13 20:20:40 +000011789if test -z "$SKIP_PHOTON"; then
11790 GUITYPE=PHOTONGUI
11791fi
11792
11793
11794
11795
11796
11797
11798if test "$enable_workshop" = "yes" -a -n "$SKIP_MOTIF"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010011799 as_fn_error $? "cannot use workshop without Motif" "$LINENO" 5
Bram Moolenaar071d4272004-06-13 20:20:40 +000011800fi
11801
11802if test "$enable_xim" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011803 printf "%s\n" "#define FEAT_XIM 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000011804
11805fi
11806if test "$enable_fontset" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011807 printf "%s\n" "#define FEAT_XFONTSET 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000011808
11809fi
11810
11811
11812
Illia Bobyra96d5442023-08-30 16:30:15 +020011813{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for /proc link to executable" >&5
11814printf %s "checking for /proc link to executable... " >&6; }
Bram Moolenaar5f69fee2017-03-09 11:58:40 +010011815if test -L "/proc/self/exe"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011816 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: /proc/self/exe" >&5
11817printf "%s\n" "/proc/self/exe" >&6; }
11818 printf "%s\n" "#define PROC_EXE_LINK \"/proc/self/exe\"" >>confdefs.h
Bram Moolenaarf3757f02017-03-16 15:13:45 +010011819
11820elif test -L "/proc/self/path/a.out"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011821 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: /proc/self/path/a.out" >&5
11822printf "%s\n" "/proc/self/path/a.out" >&6; }
11823 printf "%s\n" "#define PROC_EXE_LINK \"/proc/self/path/a.out\"" >>confdefs.h
Bram Moolenaarf3757f02017-03-16 15:13:45 +010011824
11825elif test -L "/proc/curproc/file"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011826 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: /proc/curproc/file" >&5
11827printf "%s\n" "/proc/curproc/file" >&6; }
11828 printf "%s\n" "#define PROC_EXE_LINK \"/proc/curproc/file\"" >>confdefs.h
Bram Moolenaar5f69fee2017-03-09 11:58:40 +010011829
11830else
Illia Bobyra96d5442023-08-30 16:30:15 +020011831 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11832printf "%s\n" "no" >&6; }
Bram Moolenaar5f69fee2017-03-09 11:58:40 +010011833fi
11834
Illia Bobyra96d5442023-08-30 16:30:15 +020011835{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CYGWIN or MSYS environment" >&5
11836printf %s "checking for CYGWIN or MSYS environment... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +000011837case $vim_cv_uname_output in
Illia Bobyra96d5442023-08-30 16:30:15 +020011838 CYGWIN*|MSYS*) CYGWIN=yes; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11839printf "%s\n" "yes" >&6; }
11840 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CYGWIN clipboard support" >&5
11841printf %s "checking for CYGWIN clipboard support... " >&6; }
Bram Moolenaar693e40c2013-02-26 14:56:42 +010011842 if test "x$with_x" = "xno" ; then
11843 OS_EXTRA_SRC=winclip.c; OS_EXTRA_OBJ=objects/winclip.o
Illia Bobyra96d5442023-08-30 16:30:15 +020011844 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11845printf "%s\n" "yes" >&6; }
11846 printf "%s\n" "#define FEAT_CYGWIN_WIN32_CLIPBOARD 1" >>confdefs.h
Bram Moolenaar693e40c2013-02-26 14:56:42 +010011847
11848 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011849 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no - using X11" >&5
11850printf "%s\n" "no - using X11" >&6; }
Bram Moolenaar693e40c2013-02-26 14:56:42 +010011851 fi ;;
11852
Illia Bobyra96d5442023-08-30 16:30:15 +020011853 *) CYGWIN=no; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11854printf "%s\n" "no" >&6; };;
Bram Moolenaar693e40c2013-02-26 14:56:42 +010011855esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000011856
Bram Moolenaar071d4272004-06-13 20:20:40 +000011857
Illia Bobyra96d5442023-08-30 16:30:15 +020011858{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether toupper is broken" >&5
11859printf %s "checking whether toupper is broken... " >&6; }
11860if test ${vim_cv_toupper_broken+y}
11861then :
11862 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020011863else case e in #(
11864 e)
Illia Bobyra96d5442023-08-30 16:30:15 +020011865 if test "$cross_compiling" = yes
11866then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000011867
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010011868 vim_cv_toupper_broken=no
11869 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cross-compiling: consider setting 'vim_cv_toupper_broken'" >&5
11870printf "%s\n" "$as_me: WARNING: cross-compiling: consider setting 'vim_cv_toupper_broken'" >&2;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000011871
Christian Brabandt9670f612025-05-07 21:44:33 +020011872else case e in #(
11873 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011874/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000011875
11876#include "confdefs.h"
Bram Moolenaar071d4272004-06-13 20:20:40 +000011877#include <ctype.h>
Bram Moolenaar446cb832008-06-24 21:56:24 +000011878#if STDC_HEADERS
11879# include <stdlib.h>
11880# include <stddef.h>
11881#endif
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010011882int main() { exit(toupper('A') == 'A' && tolower('z') == 'z'); }
Bram Moolenaar446cb832008-06-24 21:56:24 +000011883
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011884_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011885if ac_fn_c_try_run "$LINENO"
11886then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000011887
11888 vim_cv_toupper_broken=yes
11889
Christian Brabandt9670f612025-05-07 21:44:33 +020011890else case e in #(
11891 e)
Bram Moolenaar446cb832008-06-24 21:56:24 +000011892 vim_cv_toupper_broken=no
Christian Brabandt9670f612025-05-07 21:44:33 +020011893 ;;
11894esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000011895fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011896rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
Christian Brabandt9670f612025-05-07 21:44:33 +020011897 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
11898esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000011899fi
Christian Brabandt9670f612025-05-07 21:44:33 +020011900 ;;
11901esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000011902fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011903{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_toupper_broken" >&5
11904printf "%s\n" "$vim_cv_toupper_broken" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000011905
11906if test "x$vim_cv_toupper_broken" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011907 printf "%s\n" "#define BROKEN_TOUPPER 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000011908
11909fi
11910
Illia Bobyra96d5442023-08-30 16:30:15 +020011911{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __DATE__ and __TIME__ work" >&5
11912printf %s "checking whether __DATE__ and __TIME__ work... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011913cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011914/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000011915#include <stdio.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011916int
Illia Bobyra96d5442023-08-30 16:30:15 +020011917main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011918{
Bram Moolenaar071d4272004-06-13 20:20:40 +000011919printf("(" __DATE__ " " __TIME__ ")");
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011920 ;
11921 return 0;
11922}
11923_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011924if ac_fn_c_try_compile "$LINENO"
11925then :
11926 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11927printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_DATE_TIME 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000011928
Christian Brabandt9670f612025-05-07 21:44:33 +020011929else case e in #(
11930 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11931printf "%s\n" "no" >&6; } ;;
11932esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000011933fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011934rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000011935
Illia Bobyra96d5442023-08-30 16:30:15 +020011936{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __attribute__((unused)) is allowed" >&5
11937printf %s "checking whether __attribute__((unused)) is allowed... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011938cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar0c094b92009-05-14 20:20:33 +000011939/* end confdefs.h. */
11940#include <stdio.h>
11941int
Illia Bobyra96d5442023-08-30 16:30:15 +020011942main (void)
Bram Moolenaar0c094b92009-05-14 20:20:33 +000011943{
11944int x __attribute__((unused));
11945 ;
11946 return 0;
11947}
11948_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011949if ac_fn_c_try_compile "$LINENO"
11950then :
11951 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11952printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_ATTRIBUTE_UNUSED 1" >>confdefs.h
Bram Moolenaar0c094b92009-05-14 20:20:33 +000011953
Christian Brabandt9670f612025-05-07 21:44:33 +020011954else case e in #(
11955 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11956printf "%s\n" "no" >&6; } ;;
11957esac
Bram Moolenaar0c094b92009-05-14 20:20:33 +000011958fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011959rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0c094b92009-05-14 20:20:33 +000011960
Bram Moolenaar071d4272004-06-13 20:20:40 +000011961ac_header_dirent=no
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011962for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Christian Brabandt9670f612025-05-07 21:44:33 +020011963 as_ac_Header=`printf "%s\n" "ac_cv_header_dirent_$ac_hdr" | sed "$as_sed_sh"`
Illia Bobyra96d5442023-08-30 16:30:15 +020011964{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
11965printf %s "checking for $ac_hdr that defines DIR... " >&6; }
11966if eval test \${$as_ac_Header+y}
11967then :
11968 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020011969else case e in #(
11970 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011971/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000011972#include <sys/types.h>
11973#include <$ac_hdr>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011974
11975int
Illia Bobyra96d5442023-08-30 16:30:15 +020011976main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011977{
11978if ((DIR *) 0)
11979return 0;
11980 ;
11981 return 0;
11982}
11983_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011984if ac_fn_c_try_compile "$LINENO"
11985then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011986 eval "$as_ac_Header=yes"
Christian Brabandt9670f612025-05-07 21:44:33 +020011987else case e in #(
11988 e) eval "$as_ac_Header=no" ;;
11989esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000011990fi
Christian Brabandt9670f612025-05-07 21:44:33 +020011991rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
11992esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000011993fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011994eval ac_res=\$$as_ac_Header
Illia Bobyra96d5442023-08-30 16:30:15 +020011995 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11996printf "%s\n" "$ac_res" >&6; }
11997if eval test \"x\$"$as_ac_Header"\" = x"yes"
11998then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011999 cat >>confdefs.h <<_ACEOF
Christian Brabandt9670f612025-05-07 21:44:33 +020012000#define `printf "%s\n" "HAVE_$ac_hdr" | sed "$as_sed_cpp"` 1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012001_ACEOF
12002
12003ac_header_dirent=$ac_hdr; break
Bram Moolenaar071d4272004-06-13 20:20:40 +000012004fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012005
Bram Moolenaar071d4272004-06-13 20:20:40 +000012006done
12007# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
12008if test $ac_header_dirent = dirent.h; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012009 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
12010printf %s "checking for library containing opendir... " >&6; }
12011if test ${ac_cv_search_opendir+y}
12012then :
12013 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020012014else case e in #(
12015 e) ac_func_search_save_LIBS=$LIBS
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012016cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012017/* end confdefs.h. */
12018
Bram Moolenaar446cb832008-06-24 21:56:24 +000012019/* Override any GCC internal prototype to avoid an error.
12020 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020012021 builtin and then its argument prototype would still apply.
12022 The 'extern "C"' is for builds by C++ compilers;
12023 although this is not generally supported in C code supporting it here
12024 has little cost and some practical benefit (sr 110532). */
12025#ifdef __cplusplus
12026extern "C"
12027#endif
12028char opendir (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012029int
Illia Bobyra96d5442023-08-30 16:30:15 +020012030main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012031{
Bram Moolenaar446cb832008-06-24 21:56:24 +000012032return opendir ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012033 ;
12034 return 0;
12035}
12036_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012037for ac_lib in '' dir
12038do
Bram Moolenaar446cb832008-06-24 21:56:24 +000012039 if test -z "$ac_lib"; then
12040 ac_res="none required"
12041 else
12042 ac_res=-l$ac_lib
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012043 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Bram Moolenaar446cb832008-06-24 21:56:24 +000012044 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012045 if ac_fn_c_try_link "$LINENO"
12046then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000012047 ac_cv_search_opendir=$ac_res
Bram Moolenaar071d4272004-06-13 20:20:40 +000012048fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012049rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012050 conftest$ac_exeext
Illia Bobyra96d5442023-08-30 16:30:15 +020012051 if test ${ac_cv_search_opendir+y}
12052then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000012053 break
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012054fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000012055done
Illia Bobyra96d5442023-08-30 16:30:15 +020012056if test ${ac_cv_search_opendir+y}
12057then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012058
Christian Brabandt9670f612025-05-07 21:44:33 +020012059else case e in #(
12060 e) ac_cv_search_opendir=no ;;
12061esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000012062fi
12063rm conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020012064LIBS=$ac_func_search_save_LIBS ;;
12065esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012066fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012067{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
12068printf "%s\n" "$ac_cv_search_opendir" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000012069ac_res=$ac_cv_search_opendir
Illia Bobyra96d5442023-08-30 16:30:15 +020012070if test "$ac_res" != no
12071then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000012072 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012073
12074fi
12075
Bram Moolenaar071d4272004-06-13 20:20:40 +000012076else
Illia Bobyra96d5442023-08-30 16:30:15 +020012077 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
12078printf %s "checking for library containing opendir... " >&6; }
12079if test ${ac_cv_search_opendir+y}
12080then :
12081 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020012082else case e in #(
12083 e) ac_func_search_save_LIBS=$LIBS
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012084cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012085/* end confdefs.h. */
12086
Bram Moolenaar446cb832008-06-24 21:56:24 +000012087/* Override any GCC internal prototype to avoid an error.
12088 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020012089 builtin and then its argument prototype would still apply.
12090 The 'extern "C"' is for builds by C++ compilers;
12091 although this is not generally supported in C code supporting it here
12092 has little cost and some practical benefit (sr 110532). */
12093#ifdef __cplusplus
12094extern "C"
12095#endif
12096char opendir (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012097int
Illia Bobyra96d5442023-08-30 16:30:15 +020012098main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012099{
Bram Moolenaar446cb832008-06-24 21:56:24 +000012100return opendir ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012101 ;
12102 return 0;
12103}
12104_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012105for ac_lib in '' x
12106do
Bram Moolenaar446cb832008-06-24 21:56:24 +000012107 if test -z "$ac_lib"; then
12108 ac_res="none required"
12109 else
12110 ac_res=-l$ac_lib
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012111 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Bram Moolenaar446cb832008-06-24 21:56:24 +000012112 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012113 if ac_fn_c_try_link "$LINENO"
12114then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000012115 ac_cv_search_opendir=$ac_res
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012116fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012117rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012118 conftest$ac_exeext
Illia Bobyra96d5442023-08-30 16:30:15 +020012119 if test ${ac_cv_search_opendir+y}
12120then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000012121 break
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012122fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000012123done
Illia Bobyra96d5442023-08-30 16:30:15 +020012124if test ${ac_cv_search_opendir+y}
12125then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012126
Christian Brabandt9670f612025-05-07 21:44:33 +020012127else case e in #(
12128 e) ac_cv_search_opendir=no ;;
12129esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000012130fi
12131rm conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020012132LIBS=$ac_func_search_save_LIBS ;;
12133esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012134fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012135{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
12136printf "%s\n" "$ac_cv_search_opendir" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000012137ac_res=$ac_cv_search_opendir
Illia Bobyra96d5442023-08-30 16:30:15 +020012138if test "$ac_res" != no
12139then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000012140 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012141
12142fi
12143
12144fi
12145
12146
Bram Moolenaar071d4272004-06-13 20:20:40 +000012147if test $ac_cv_header_sys_wait_h = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012148 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that defines union wait" >&5
12149printf %s "checking for sys/wait.h that defines union wait... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012151/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012152#include <sys/wait.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012153int
Illia Bobyra96d5442023-08-30 16:30:15 +020012154main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012155{
Bram Moolenaar071d4272004-06-13 20:20:40 +000012156union wait xx, yy; xx = yy
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012157 ;
12158 return 0;
12159}
12160_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012161if ac_fn_c_try_compile "$LINENO"
12162then :
12163 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12164printf "%s\n" "yes" >&6; }
12165 printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000012166
Illia Bobyra96d5442023-08-30 16:30:15 +020012167 printf "%s\n" "#define HAVE_UNION_WAIT 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000012168
Christian Brabandt9670f612025-05-07 21:44:33 +020012169else case e in #(
12170 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12171printf "%s\n" "no" >&6; } ;;
12172esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000012173fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012174rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000012175fi
12176
Illia Bobyra96d5442023-08-30 16:30:15 +020012177ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
12178if test "x$ac_cv_header_stdint_h" = xyes
12179then :
12180 printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h
12181
12182fi
12183ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
12184if test "x$ac_cv_header_stdlib_h" = xyes
12185then :
12186 printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h
12187
12188fi
12189ac_fn_c_check_header_compile "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default"
12190if test "x$ac_cv_header_string_h" = xyes
12191then :
12192 printf "%s\n" "#define HAVE_STRING_H 1" >>confdefs.h
12193
12194fi
12195ac_fn_c_check_header_compile "$LINENO" "sys/select.h" "ac_cv_header_sys_select_h" "$ac_includes_default"
12196if test "x$ac_cv_header_sys_select_h" = xyes
12197then :
12198 printf "%s\n" "#define HAVE_SYS_SELECT_H 1" >>confdefs.h
12199
12200fi
12201ac_fn_c_check_header_compile "$LINENO" "sys/utsname.h" "ac_cv_header_sys_utsname_h" "$ac_includes_default"
12202if test "x$ac_cv_header_sys_utsname_h" = xyes
12203then :
12204 printf "%s\n" "#define HAVE_SYS_UTSNAME_H 1" >>confdefs.h
12205
12206fi
12207ac_fn_c_check_header_compile "$LINENO" "termcap.h" "ac_cv_header_termcap_h" "$ac_includes_default"
12208if test "x$ac_cv_header_termcap_h" = xyes
12209then :
12210 printf "%s\n" "#define HAVE_TERMCAP_H 1" >>confdefs.h
12211
12212fi
12213ac_fn_c_check_header_compile "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default"
12214if test "x$ac_cv_header_fcntl_h" = xyes
12215then :
12216 printf "%s\n" "#define HAVE_FCNTL_H 1" >>confdefs.h
12217
12218fi
12219ac_fn_c_check_header_compile "$LINENO" "sgtty.h" "ac_cv_header_sgtty_h" "$ac_includes_default"
12220if test "x$ac_cv_header_sgtty_h" = xyes
12221then :
12222 printf "%s\n" "#define HAVE_SGTTY_H 1" >>confdefs.h
12223
12224fi
12225ac_fn_c_check_header_compile "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "$ac_includes_default"
12226if test "x$ac_cv_header_sys_ioctl_h" = xyes
12227then :
12228 printf "%s\n" "#define HAVE_SYS_IOCTL_H 1" >>confdefs.h
12229
12230fi
12231ac_fn_c_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default"
12232if test "x$ac_cv_header_sys_time_h" = xyes
12233then :
12234 printf "%s\n" "#define HAVE_SYS_TIME_H 1" >>confdefs.h
12235
12236fi
12237ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$ac_includes_default"
12238if test "x$ac_cv_header_sys_types_h" = xyes
12239then :
12240 printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h
12241
12242fi
12243ac_fn_c_check_header_compile "$LINENO" "termio.h" "ac_cv_header_termio_h" "$ac_includes_default"
12244if test "x$ac_cv_header_termio_h" = xyes
12245then :
12246 printf "%s\n" "#define HAVE_TERMIO_H 1" >>confdefs.h
12247
12248fi
12249ac_fn_c_check_header_compile "$LINENO" "iconv.h" "ac_cv_header_iconv_h" "$ac_includes_default"
12250if test "x$ac_cv_header_iconv_h" = xyes
12251then :
12252 printf "%s\n" "#define HAVE_ICONV_H 1" >>confdefs.h
12253
12254fi
12255ac_fn_c_check_header_compile "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
12256if test "x$ac_cv_header_inttypes_h" = xyes
12257then :
12258 printf "%s\n" "#define HAVE_INTTYPES_H 1" >>confdefs.h
12259
12260fi
12261ac_fn_c_check_header_compile "$LINENO" "langinfo.h" "ac_cv_header_langinfo_h" "$ac_includes_default"
12262if test "x$ac_cv_header_langinfo_h" = xyes
12263then :
12264 printf "%s\n" "#define HAVE_LANGINFO_H 1" >>confdefs.h
12265
12266fi
12267ac_fn_c_check_header_compile "$LINENO" "math.h" "ac_cv_header_math_h" "$ac_includes_default"
12268if test "x$ac_cv_header_math_h" = xyes
12269then :
12270 printf "%s\n" "#define HAVE_MATH_H 1" >>confdefs.h
12271
12272fi
12273ac_fn_c_check_header_compile "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
12274if test "x$ac_cv_header_unistd_h" = xyes
12275then :
12276 printf "%s\n" "#define HAVE_UNISTD_H 1" >>confdefs.h
12277
12278fi
12279ac_fn_c_check_header_compile "$LINENO" "stropts.h" "ac_cv_header_stropts_h" "$ac_includes_default"
12280if test "x$ac_cv_header_stropts_h" = xyes
12281then :
12282 printf "%s\n" "#define HAVE_STROPTS_H 1" >>confdefs.h
12283
12284fi
12285ac_fn_c_check_header_compile "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default"
12286if test "x$ac_cv_header_errno_h" = xyes
12287then :
12288 printf "%s\n" "#define HAVE_ERRNO_H 1" >>confdefs.h
12289
12290fi
12291ac_fn_c_check_header_compile "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" "$ac_includes_default"
12292if test "x$ac_cv_header_sys_resource_h" = xyes
12293then :
12294 printf "%s\n" "#define HAVE_SYS_RESOURCE_H 1" >>confdefs.h
12295
12296fi
12297ac_fn_c_check_header_compile "$LINENO" "sys/systeminfo.h" "ac_cv_header_sys_systeminfo_h" "$ac_includes_default"
12298if test "x$ac_cv_header_sys_systeminfo_h" = xyes
12299then :
12300 printf "%s\n" "#define HAVE_SYS_SYSTEMINFO_H 1" >>confdefs.h
12301
12302fi
12303ac_fn_c_check_header_compile "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default"
12304if test "x$ac_cv_header_locale_h" = xyes
12305then :
12306 printf "%s\n" "#define HAVE_LOCALE_H 1" >>confdefs.h
12307
12308fi
12309ac_fn_c_check_header_compile "$LINENO" "sys/stream.h" "ac_cv_header_sys_stream_h" "$ac_includes_default"
12310if test "x$ac_cv_header_sys_stream_h" = xyes
12311then :
12312 printf "%s\n" "#define HAVE_SYS_STREAM_H 1" >>confdefs.h
12313
12314fi
12315ac_fn_c_check_header_compile "$LINENO" "termios.h" "ac_cv_header_termios_h" "$ac_includes_default"
12316if test "x$ac_cv_header_termios_h" = xyes
12317then :
12318 printf "%s\n" "#define HAVE_TERMIOS_H 1" >>confdefs.h
12319
12320fi
12321ac_fn_c_check_header_compile "$LINENO" "libc.h" "ac_cv_header_libc_h" "$ac_includes_default"
12322if test "x$ac_cv_header_libc_h" = xyes
12323then :
12324 printf "%s\n" "#define HAVE_LIBC_H 1" >>confdefs.h
12325
12326fi
12327ac_fn_c_check_header_compile "$LINENO" "sys/statfs.h" "ac_cv_header_sys_statfs_h" "$ac_includes_default"
12328if test "x$ac_cv_header_sys_statfs_h" = xyes
12329then :
12330 printf "%s\n" "#define HAVE_SYS_STATFS_H 1" >>confdefs.h
12331
12332fi
12333ac_fn_c_check_header_compile "$LINENO" "poll.h" "ac_cv_header_poll_h" "$ac_includes_default"
12334if test "x$ac_cv_header_poll_h" = xyes
12335then :
12336 printf "%s\n" "#define HAVE_POLL_H 1" >>confdefs.h
12337
12338fi
12339ac_fn_c_check_header_compile "$LINENO" "sys/poll.h" "ac_cv_header_sys_poll_h" "$ac_includes_default"
12340if test "x$ac_cv_header_sys_poll_h" = xyes
12341then :
12342 printf "%s\n" "#define HAVE_SYS_POLL_H 1" >>confdefs.h
12343
12344fi
12345ac_fn_c_check_header_compile "$LINENO" "pwd.h" "ac_cv_header_pwd_h" "$ac_includes_default"
12346if test "x$ac_cv_header_pwd_h" = xyes
12347then :
12348 printf "%s\n" "#define HAVE_PWD_H 1" >>confdefs.h
12349
12350fi
12351ac_fn_c_check_header_compile "$LINENO" "utime.h" "ac_cv_header_utime_h" "$ac_includes_default"
12352if test "x$ac_cv_header_utime_h" = xyes
12353then :
12354 printf "%s\n" "#define HAVE_UTIME_H 1" >>confdefs.h
12355
12356fi
12357ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
12358if test "x$ac_cv_header_sys_param_h" = xyes
12359then :
12360 printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h
12361
12362fi
12363ac_fn_c_check_header_compile "$LINENO" "sys/ptms.h" "ac_cv_header_sys_ptms_h" "$ac_includes_default"
12364if test "x$ac_cv_header_sys_ptms_h" = xyes
12365then :
12366 printf "%s\n" "#define HAVE_SYS_PTMS_H 1" >>confdefs.h
12367
12368fi
12369ac_fn_c_check_header_compile "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
12370if test "x$ac_cv_header_libintl_h" = xyes
12371then :
12372 printf "%s\n" "#define HAVE_LIBINTL_H 1" >>confdefs.h
12373
12374fi
12375ac_fn_c_check_header_compile "$LINENO" "libgen.h" "ac_cv_header_libgen_h" "$ac_includes_default"
12376if test "x$ac_cv_header_libgen_h" = xyes
12377then :
12378 printf "%s\n" "#define HAVE_LIBGEN_H 1" >>confdefs.h
12379
12380fi
12381ac_fn_c_check_header_compile "$LINENO" "util/debug.h" "ac_cv_header_util_debug_h" "$ac_includes_default"
12382if test "x$ac_cv_header_util_debug_h" = xyes
12383then :
12384 printf "%s\n" "#define HAVE_UTIL_DEBUG_H 1" >>confdefs.h
12385
12386fi
12387ac_fn_c_check_header_compile "$LINENO" "util/msg18n.h" "ac_cv_header_util_msg18n_h" "$ac_includes_default"
12388if test "x$ac_cv_header_util_msg18n_h" = xyes
12389then :
12390 printf "%s\n" "#define HAVE_UTIL_MSG18N_H 1" >>confdefs.h
12391
12392fi
12393ac_fn_c_check_header_compile "$LINENO" "frame.h" "ac_cv_header_frame_h" "$ac_includes_default"
12394if test "x$ac_cv_header_frame_h" = xyes
12395then :
12396 printf "%s\n" "#define HAVE_FRAME_H 1" >>confdefs.h
12397
12398fi
12399ac_fn_c_check_header_compile "$LINENO" "sys/acl.h" "ac_cv_header_sys_acl_h" "$ac_includes_default"
12400if test "x$ac_cv_header_sys_acl_h" = xyes
12401then :
12402 printf "%s\n" "#define HAVE_SYS_ACL_H 1" >>confdefs.h
12403
12404fi
12405ac_fn_c_check_header_compile "$LINENO" "sys/access.h" "ac_cv_header_sys_access_h" "$ac_includes_default"
12406if test "x$ac_cv_header_sys_access_h" = xyes
12407then :
12408 printf "%s\n" "#define HAVE_SYS_ACCESS_H 1" >>confdefs.h
12409
12410fi
12411ac_fn_c_check_header_compile "$LINENO" "sys/sysinfo.h" "ac_cv_header_sys_sysinfo_h" "$ac_includes_default"
12412if test "x$ac_cv_header_sys_sysinfo_h" = xyes
12413then :
12414 printf "%s\n" "#define HAVE_SYS_SYSINFO_H 1" >>confdefs.h
12415
12416fi
12417ac_fn_c_check_header_compile "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
12418if test "x$ac_cv_header_wchar_h" = xyes
12419then :
12420 printf "%s\n" "#define HAVE_WCHAR_H 1" >>confdefs.h
12421
12422fi
12423ac_fn_c_check_header_compile "$LINENO" "wctype.h" "ac_cv_header_wctype_h" "$ac_includes_default"
12424if test "x$ac_cv_header_wctype_h" = xyes
12425then :
12426 printf "%s\n" "#define HAVE_WCTYPE_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012427
12428fi
12429
Bram Moolenaar071d4272004-06-13 20:20:40 +000012430
Illia Bobyra96d5442023-08-30 16:30:15 +020012431ac_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 +000012432# include <sys/stream.h>
12433#endif
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012434"
Illia Bobyra96d5442023-08-30 16:30:15 +020012435if test "x$ac_cv_header_sys_ptem_h" = xyes
12436then :
12437 printf "%s\n" "#define HAVE_SYS_PTEM_H 1" >>confdefs.h
Bram Moolenaar32f31b12009-05-21 13:20:59 +000012438
12439fi
12440
Bram Moolenaar32f31b12009-05-21 13:20:59 +000012441
Illia Bobyra96d5442023-08-30 16:30:15 +020012442ac_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 +000012443# include <sys/param.h>
12444#endif
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012445"
Illia Bobyra96d5442023-08-30 16:30:15 +020012446if test "x$ac_cv_header_sys_sysctl_h" = xyes
12447then :
12448 printf "%s\n" "#define HAVE_SYS_SYSCTL_H 1" >>confdefs.h
Bram Moolenaar00ca2842008-06-26 20:14:00 +000012449
12450fi
12451
Bram Moolenaar00ca2842008-06-26 20:14:00 +000012452
12453
Illia Bobyra96d5442023-08-30 16:30:15 +020012454{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_np.h" >&5
12455printf %s "checking for pthread_np.h... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012456cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012457/* end confdefs.h. */
12458
12459#include <pthread.h>
12460#include <pthread_np.h>
12461int
Illia Bobyra96d5442023-08-30 16:30:15 +020012462main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012463{
12464int i; i = 0;
12465 ;
12466 return 0;
12467}
12468_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012469if ac_fn_c_try_compile "$LINENO"
12470then :
12471 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12472printf "%s\n" "yes" >&6; }
12473 printf "%s\n" "#define HAVE_PTHREAD_NP_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012474
Christian Brabandt9670f612025-05-07 21:44:33 +020012475else case e in #(
12476 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12477printf "%s\n" "no" >&6; } ;;
12478esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012479fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012480rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012481
Illia Bobyra96d5442023-08-30 16:30:15 +020012482ac_fn_c_check_header_compile "$LINENO" "strings.h" "ac_cv_header_strings_h" "$ac_includes_default"
12483if test "x$ac_cv_header_strings_h" = xyes
12484then :
12485 printf "%s\n" "#define HAVE_STRINGS_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012486
12487fi
12488
Bram Moolenaard0573012017-10-28 21:11:06 +020012489if test "x$MACOS_X" = "xyes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012490 printf "%s\n" "#define NO_STRINGS_WITH_STRING_H 1" >>confdefs.h
Bram Moolenaar9372a112005-12-06 19:59:18 +000012491
12492else
Bram Moolenaar071d4272004-06-13 20:20:40 +000012493
Illia Bobyra96d5442023-08-30 16:30:15 +020012494{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strings.h can be included after string.h" >&5
12495printf %s "checking if strings.h can be included after string.h... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012496cppflags_save=$CPPFLAGS
12497CPPFLAGS="$CPPFLAGS $X_CFLAGS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012498cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012499/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012500
12501#if defined(_AIX) && !defined(_AIX51) && !defined(_NO_PROTO)
12502# define _NO_PROTO /* like in os_unix.h, causes conflict for AIX (Winn) */
12503 /* but don't do it on AIX 5.1 (Uribarri) */
12504#endif
12505#ifdef HAVE_XM_XM_H
12506# include <Xm/Xm.h> /* This breaks it for HP-UX 11 (Squassabia) */
12507#endif
12508#ifdef HAVE_STRING_H
12509# include <string.h>
12510#endif
12511#if defined(HAVE_STRINGS_H)
12512# include <strings.h>
12513#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000012514
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012515int
Illia Bobyra96d5442023-08-30 16:30:15 +020012516main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012517{
12518int i; i = 0;
12519 ;
12520 return 0;
12521}
12522_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012523if ac_fn_c_try_compile "$LINENO"
12524then :
12525 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12526printf "%s\n" "yes" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +020012527else case e in #(
12528 e) printf "%s\n" "#define NO_STRINGS_WITH_STRING_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012529
Illia Bobyra96d5442023-08-30 16:30:15 +020012530 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
Christian Brabandt9670f612025-05-07 21:44:33 +020012531printf "%s\n" "no" >&6; } ;;
12532esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000012533fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012534rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000012535CPPFLAGS=$cppflags_save
Bram Moolenaar9372a112005-12-06 19:59:18 +000012536fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000012537
Bram Moolenaar071d4272004-06-13 20:20:40 +000012538
Illia Bobyra96d5442023-08-30 16:30:15 +020012539{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12540printf %s "checking for an ANSI C-conforming const... " >&6; }
12541if test ${ac_cv_c_const+y}
12542then :
12543 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020012544else case e in #(
12545 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012546/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012547
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012548int
Illia Bobyra96d5442023-08-30 16:30:15 +020012549main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012550{
Bram Moolenaar7db77842014-03-27 17:40:59 +010012551
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012552#ifndef __cplusplus
Bram Moolenaar7db77842014-03-27 17:40:59 +010012553 /* Ultrix mips cc rejects this sort of thing. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012554 typedef int charset[2];
Bram Moolenaar7db77842014-03-27 17:40:59 +010012555 const charset cs = { 0, 0 };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012556 /* SunOS 4.1.1 cc rejects this. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000012557 char const *const *pcpcc;
12558 char **ppc;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012559 /* NEC SVR4.0.2 mips cc rejects this. */
12560 struct point {int x, y;};
12561 static struct point const zero = {0,0};
Illia Bobyra96d5442023-08-30 16:30:15 +020012562 /* IBM XL C 1.02.0.0 rejects this.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012563 It does not let you subtract one const X* pointer from another in
12564 an arm of an if-expression whose if-part is not a constant
12565 expression */
12566 const char *g = "string";
Bram Moolenaar446cb832008-06-24 21:56:24 +000012567 pcpcc = &g + (g ? g-g : 0);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012568 /* HPUX 7.0 cc rejects these. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000012569 ++pcpcc;
12570 ppc = (char**) pcpcc;
12571 pcpcc = (char const *const *) ppc;
Bram Moolenaar7db77842014-03-27 17:40:59 +010012572 { /* SCO 3.2v4 cc rejects this sort of thing. */
12573 char tx;
12574 char *t = &tx;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012575 char const *s = 0 ? (char *) 0 : (char const *) 0;
Bram Moolenaar071d4272004-06-13 20:20:40 +000012576
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012577 *t++ = 0;
Bram Moolenaar446cb832008-06-24 21:56:24 +000012578 if (s) return 0;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012579 }
12580 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12581 int x[] = {25, 17};
12582 const int *foo = &x[0];
12583 ++foo;
12584 }
12585 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12586 typedef const int *iptr;
12587 iptr p = 0;
12588 ++p;
12589 }
Illia Bobyra96d5442023-08-30 16:30:15 +020012590 { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012591 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Bram Moolenaar7db77842014-03-27 17:40:59 +010012592 struct s { int j; const int *ap[3]; } bx;
12593 struct s *b = &bx; b->j = 5;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012594 }
12595 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12596 const int foo = 10;
Bram Moolenaar446cb832008-06-24 21:56:24 +000012597 if (!foo) return 0;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012598 }
Bram Moolenaar446cb832008-06-24 21:56:24 +000012599 return !cs[0] && !zero.x;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012600#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000012601
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012602 ;
12603 return 0;
Bram Moolenaar071d4272004-06-13 20:20:40 +000012604}
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012605_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012606if ac_fn_c_try_compile "$LINENO"
12607then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012608 ac_cv_c_const=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020012609else case e in #(
12610 e) ac_cv_c_const=no ;;
12611esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012612fi
Christian Brabandt9670f612025-05-07 21:44:33 +020012613rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
12614esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012615fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012616{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12617printf "%s\n" "$ac_cv_c_const" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012618if test $ac_cv_c_const = no; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012619
Illia Bobyra96d5442023-08-30 16:30:15 +020012620printf "%s\n" "#define const /**/" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000012621
12622fi
12623
Illia Bobyra96d5442023-08-30 16:30:15 +020012624{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12625printf %s "checking for working volatile... " >&6; }
12626if test ${ac_cv_c_volatile+y}
12627then :
12628 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020012629else case e in #(
12630 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012631/* end confdefs.h. */
12632
12633int
Illia Bobyra96d5442023-08-30 16:30:15 +020012634main (void)
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012635{
12636
12637volatile int x;
12638int * volatile y = (int *) 0;
12639return !x && !y;
12640 ;
12641 return 0;
12642}
12643_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012644if ac_fn_c_try_compile "$LINENO"
12645then :
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012646 ac_cv_c_volatile=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020012647else case e in #(
12648 e) ac_cv_c_volatile=no ;;
12649esac
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012650fi
Christian Brabandt9670f612025-05-07 21:44:33 +020012651rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
12652esac
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012653fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012654{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5
12655printf "%s\n" "$ac_cv_c_volatile" >&6; }
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012656if test $ac_cv_c_volatile = no; then
12657
Illia Bobyra96d5442023-08-30 16:30:15 +020012658printf "%s\n" "#define volatile /**/" >>confdefs.h
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012659
12660fi
12661
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012662ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Illia Bobyra96d5442023-08-30 16:30:15 +020012663if test "x$ac_cv_type_mode_t" = xyes
12664then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012665
Christian Brabandt9670f612025-05-07 21:44:33 +020012666else case e in #(
12667 e)
Illia Bobyra96d5442023-08-30 16:30:15 +020012668printf "%s\n" "#define mode_t int" >>confdefs.h
Christian Brabandt9670f612025-05-07 21:44:33 +020012669 ;;
12670esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012671fi
12672
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012673ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Illia Bobyra96d5442023-08-30 16:30:15 +020012674if test "x$ac_cv_type_off_t" = xyes
12675then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012676
Christian Brabandt9670f612025-05-07 21:44:33 +020012677else case e in #(
12678 e)
Illia Bobyra96d5442023-08-30 16:30:15 +020012679printf "%s\n" "#define off_t long int" >>confdefs.h
Christian Brabandt9670f612025-05-07 21:44:33 +020012680 ;;
12681esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012682fi
12683
Bram Moolenaar071d4272004-06-13 20:20:40 +000012684
Illia Bobyra96d5442023-08-30 16:30:15 +020012685 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default
12686"
12687if test "x$ac_cv_type_pid_t" = xyes
12688then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012689
Christian Brabandt9670f612025-05-07 21:44:33 +020012690else case e in #(
12691 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Illia Bobyra96d5442023-08-30 16:30:15 +020012692/* end confdefs.h. */
12693
12694 #if defined _WIN64 && !defined __CYGWIN__
12695 LLP64
12696 #endif
12697
12698int
12699main (void)
12700{
12701
12702 ;
12703 return 0;
12704}
12705
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012706_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012707if ac_fn_c_try_compile "$LINENO"
12708then :
12709 ac_pid_type='int'
Christian Brabandt9670f612025-05-07 21:44:33 +020012710else case e in #(
12711 e) ac_pid_type='__int64' ;;
12712esac
Illia Bobyra96d5442023-08-30 16:30:15 +020012713fi
12714rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
12715
12716printf "%s\n" "#define pid_t $ac_pid_type" >>confdefs.h
12717
Christian Brabandt9670f612025-05-07 21:44:33 +020012718 ;;
12719esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012720fi
12721
Illia Bobyra96d5442023-08-30 16:30:15 +020012722
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012723ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Illia Bobyra96d5442023-08-30 16:30:15 +020012724if test "x$ac_cv_type_size_t" = xyes
12725then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012726
Christian Brabandt9670f612025-05-07 21:44:33 +020012727else case e in #(
12728 e)
Illia Bobyra96d5442023-08-30 16:30:15 +020012729printf "%s\n" "#define size_t unsigned int" >>confdefs.h
Christian Brabandt9670f612025-05-07 21:44:33 +020012730 ;;
12731esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012732fi
12733
Christian Brabandt9670f612025-05-07 21:44:33 +020012734ac_fn_c_check_type "$LINENO" "uid_t" "ac_cv_type_uid_t" "$ac_includes_default"
12735if test "x$ac_cv_type_uid_t" = xyes
Illia Bobyra96d5442023-08-30 16:30:15 +020012736then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012737
Christian Brabandt9670f612025-05-07 21:44:33 +020012738else case e in #(
12739 e)
Illia Bobyra96d5442023-08-30 16:30:15 +020012740printf "%s\n" "#define uid_t int" >>confdefs.h
Christian Brabandt9670f612025-05-07 21:44:33 +020012741 ;;
12742esac
12743fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012744
Christian Brabandt9670f612025-05-07 21:44:33 +020012745ac_fn_c_check_type "$LINENO" "gid_t" "ac_cv_type_gid_t" "$ac_includes_default"
12746if test "x$ac_cv_type_gid_t" = xyes
12747then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012748
Christian Brabandt9670f612025-05-07 21:44:33 +020012749else case e in #(
12750 e)
Illia Bobyra96d5442023-08-30 16:30:15 +020012751printf "%s\n" "#define gid_t int" >>confdefs.h
Christian Brabandt9670f612025-05-07 21:44:33 +020012752 ;;
12753esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000012754fi
12755
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012756ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
12757case $ac_cv_c_uint32_t in #(
12758 no|yes) ;; #(
12759 *)
12760
Illia Bobyra96d5442023-08-30 16:30:15 +020012761printf "%s\n" "#define _UINT32_T 1" >>confdefs.h
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012762
12763
Illia Bobyra96d5442023-08-30 16:30:15 +020012764printf "%s\n" "#define uint32_t $ac_cv_c_uint32_t" >>confdefs.h
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012765;;
12766 esac
12767
Bram Moolenaarfa7584c2010-05-19 21:57:45 +020012768
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012769
Illia Bobyrf39842f2023-08-27 18:21:23 +020012770
12771
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012772ac_fn_c_check_type "$LINENO" "ino_t" "ac_cv_type_ino_t" "$ac_includes_default"
Illia Bobyra96d5442023-08-30 16:30:15 +020012773if test "x$ac_cv_type_ino_t" = xyes
12774then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012775
Christian Brabandt9670f612025-05-07 21:44:33 +020012776else case e in #(
12777 e)
Illia Bobyra96d5442023-08-30 16:30:15 +020012778printf "%s\n" "#define ino_t long" >>confdefs.h
Christian Brabandt9670f612025-05-07 21:44:33 +020012779 ;;
12780esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012781fi
12782
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012783ac_fn_c_check_type "$LINENO" "dev_t" "ac_cv_type_dev_t" "$ac_includes_default"
Illia Bobyra96d5442023-08-30 16:30:15 +020012784if test "x$ac_cv_type_dev_t" = xyes
12785then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012786
Christian Brabandt9670f612025-05-07 21:44:33 +020012787else case e in #(
12788 e)
Illia Bobyra96d5442023-08-30 16:30:15 +020012789printf "%s\n" "#define dev_t unsigned" >>confdefs.h
Christian Brabandt9670f612025-05-07 21:44:33 +020012790 ;;
12791esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012792fi
12793
Illia Bobyra96d5442023-08-30 16:30:15 +020012794 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12795printf %s "checking whether byte ordering is bigendian... " >&6; }
12796if test ${ac_cv_c_bigendian+y}
12797then :
12798 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020012799else case e in #(
12800 e) ac_cv_c_bigendian=unknown
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012801 # See if we're dealing with a universal compiler.
12802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12803/* end confdefs.h. */
12804#ifndef __APPLE_CC__
12805 not a universal capable compiler
12806 #endif
12807 typedef int dummy;
12808
12809_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012810if ac_fn_c_try_compile "$LINENO"
12811then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012812
12813 # Check for potential -arch flags. It is not universal unless
12814 # there are at least two -arch flags with different values.
12815 ac_arch=
12816 ac_prev=
12817 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12818 if test -n "$ac_prev"; then
12819 case $ac_word in
12820 i?86 | x86_64 | ppc | ppc64)
12821 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12822 ac_arch=$ac_word
12823 else
12824 ac_cv_c_bigendian=universal
12825 break
12826 fi
12827 ;;
12828 esac
12829 ac_prev=
12830 elif test "x$ac_word" = "x-arch"; then
12831 ac_prev=arch
12832 fi
12833 done
12834fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012835rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012836 if test $ac_cv_c_bigendian = unknown; then
12837 # See if sys/param.h defines the BYTE_ORDER macro.
12838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12839/* end confdefs.h. */
12840#include <sys/types.h>
12841 #include <sys/param.h>
12842
12843int
Illia Bobyra96d5442023-08-30 16:30:15 +020012844main (void)
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012845{
Christian Brabandt9670f612025-05-07 21:44:33 +020012846#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \\
12847 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \\
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012848 && LITTLE_ENDIAN)
12849 bogus endian macros
12850 #endif
12851
12852 ;
12853 return 0;
12854}
12855_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012856if ac_fn_c_try_compile "$LINENO"
12857then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012858 # It does; now see whether it defined to BIG_ENDIAN or not.
12859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12860/* end confdefs.h. */
12861#include <sys/types.h>
12862 #include <sys/param.h>
12863
12864int
Illia Bobyra96d5442023-08-30 16:30:15 +020012865main (void)
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012866{
12867#if BYTE_ORDER != BIG_ENDIAN
12868 not big endian
12869 #endif
12870
12871 ;
12872 return 0;
12873}
12874_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012875if ac_fn_c_try_compile "$LINENO"
12876then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012877 ac_cv_c_bigendian=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020012878else case e in #(
12879 e) ac_cv_c_bigendian=no ;;
12880esac
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012881fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012882rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012883fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012884rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012885 fi
12886 if test $ac_cv_c_bigendian = unknown; then
12887 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12889/* end confdefs.h. */
12890#include <limits.h>
12891
12892int
Illia Bobyra96d5442023-08-30 16:30:15 +020012893main (void)
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012894{
12895#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12896 bogus endian macros
12897 #endif
12898
12899 ;
12900 return 0;
12901}
12902_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012903if ac_fn_c_try_compile "$LINENO"
12904then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012905 # It does; now see whether it defined to _BIG_ENDIAN or not.
12906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12907/* end confdefs.h. */
12908#include <limits.h>
12909
12910int
Illia Bobyra96d5442023-08-30 16:30:15 +020012911main (void)
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012912{
12913#ifndef _BIG_ENDIAN
12914 not big endian
12915 #endif
12916
12917 ;
12918 return 0;
12919}
12920_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012921if ac_fn_c_try_compile "$LINENO"
12922then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012923 ac_cv_c_bigendian=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020012924else case e in #(
12925 e) ac_cv_c_bigendian=no ;;
12926esac
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012927fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012928rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012929fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012930rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012931 fi
12932 if test $ac_cv_c_bigendian = unknown; then
12933 # Compile a test program.
Illia Bobyra96d5442023-08-30 16:30:15 +020012934 if test "$cross_compiling" = yes
12935then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012936 # Try to guess by grepping values from an object file.
12937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12938/* end confdefs.h. */
Illia Bobyra96d5442023-08-30 16:30:15 +020012939unsigned short int ascii_mm[] =
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012940 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
Illia Bobyra96d5442023-08-30 16:30:15 +020012941 unsigned short int ascii_ii[] =
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012942 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12943 int use_ascii (int i) {
12944 return ascii_mm[i] + ascii_ii[i];
12945 }
Illia Bobyra96d5442023-08-30 16:30:15 +020012946 unsigned short int ebcdic_ii[] =
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012947 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
Illia Bobyra96d5442023-08-30 16:30:15 +020012948 unsigned short int ebcdic_mm[] =
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012949 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12950 int use_ebcdic (int i) {
12951 return ebcdic_mm[i] + ebcdic_ii[i];
12952 }
Christian Brabandt9670f612025-05-07 21:44:33 +020012953 int
12954 main (int argc, char **argv)
12955 {
12956 /* Intimidate the compiler so that it does not
12957 optimize the arrays away. */
12958 char *p = argv[0];
12959 ascii_mm[1] = *p++; ebcdic_mm[1] = *p++;
12960 ascii_ii[1] = *p++; ebcdic_ii[1] = *p++;
12961 return use_ascii (argc) == use_ebcdic (*p);
12962 }
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012963_ACEOF
Christian Brabandt9670f612025-05-07 21:44:33 +020012964if ac_fn_c_try_link "$LINENO"
Illia Bobyra96d5442023-08-30 16:30:15 +020012965then :
Christian Brabandt9670f612025-05-07 21:44:33 +020012966 if grep BIGenDianSyS conftest$ac_exeext >/dev/null; then
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012967 ac_cv_c_bigendian=yes
12968 fi
Christian Brabandt9670f612025-05-07 21:44:33 +020012969 if grep LiTTleEnDian conftest$ac_exeext >/dev/null ; then
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012970 if test "$ac_cv_c_bigendian" = unknown; then
12971 ac_cv_c_bigendian=no
12972 else
12973 # finding both strings is unlikely to happen, but who knows?
12974 ac_cv_c_bigendian=unknown
12975 fi
12976 fi
12977fi
Christian Brabandt9670f612025-05-07 21:44:33 +020012978rm -f core conftest.err conftest.$ac_objext conftest.beam \
12979 conftest$ac_exeext conftest.$ac_ext
12980else case e in #(
12981 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012982/* end confdefs.h. */
12983$ac_includes_default
12984int
Illia Bobyra96d5442023-08-30 16:30:15 +020012985main (void)
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012986{
12987
12988 /* Are we little or big endian? From Harbison&Steele. */
12989 union
12990 {
12991 long int l;
12992 char c[sizeof (long int)];
12993 } u;
12994 u.l = 1;
12995 return u.c[sizeof (long int) - 1] == 1;
12996
12997 ;
12998 return 0;
12999}
13000_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013001if ac_fn_c_try_run "$LINENO"
13002then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013003 ac_cv_c_bigendian=no
Christian Brabandt9670f612025-05-07 21:44:33 +020013004else case e in #(
13005 e) ac_cv_c_bigendian=yes ;;
13006esac
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013007fi
13008rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
Christian Brabandt9670f612025-05-07 21:44:33 +020013009 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
13010esac
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013011fi
13012
Christian Brabandt9670f612025-05-07 21:44:33 +020013013 fi ;;
13014esac
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013015fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013016{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13017printf "%s\n" "$ac_cv_c_bigendian" >&6; }
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013018 case $ac_cv_c_bigendian in #(
13019 yes)
Illia Bobyra96d5442023-08-30 16:30:15 +020013020 printf "%s\n" "#define WORDS_BIGENDIAN 1" >>confdefs.h
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013021;; #(
13022 no)
13023 ;; #(
13024 universal)
13025
Illia Bobyra96d5442023-08-30 16:30:15 +020013026printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013027
13028 ;; #(
13029 *)
Bram Moolenaar7db77842014-03-27 17:40:59 +010013030 as_fn_error $? "unknown endianness
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013031 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
13032 esac
13033
Illia Bobyra96d5442023-08-30 16:30:15 +020013034{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
13035printf %s "checking for inline... " >&6; }
13036if test ${ac_cv_c_inline+y}
13037then :
13038 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020013039else case e in #(
13040 e) ac_cv_c_inline=no
Bram Moolenaar136f29a2016-02-27 20:14:15 +010013041for ac_kw in inline __inline__ __inline; do
13042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13043/* end confdefs.h. */
13044#ifndef __cplusplus
13045typedef int foo_t;
Illia Bobyra96d5442023-08-30 16:30:15 +020013046static $ac_kw foo_t static_foo (void) {return 0; }
13047$ac_kw foo_t foo (void) {return 0; }
Bram Moolenaar136f29a2016-02-27 20:14:15 +010013048#endif
13049
13050_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013051if ac_fn_c_try_compile "$LINENO"
13052then :
Bram Moolenaar136f29a2016-02-27 20:14:15 +010013053 ac_cv_c_inline=$ac_kw
13054fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013055rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar136f29a2016-02-27 20:14:15 +010013056 test "$ac_cv_c_inline" != no && break
13057done
Christian Brabandt9670f612025-05-07 21:44:33 +020013058 ;;
13059esac
Bram Moolenaar136f29a2016-02-27 20:14:15 +010013060fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013061{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
13062printf "%s\n" "$ac_cv_c_inline" >&6; }
Bram Moolenaar136f29a2016-02-27 20:14:15 +010013063
13064case $ac_cv_c_inline in
13065 inline | yes) ;;
13066 *)
13067 case $ac_cv_c_inline in
13068 no) ac_val=;;
13069 *) ac_val=$ac_cv_c_inline;;
13070 esac
13071 cat >>confdefs.h <<_ACEOF
13072#ifndef __cplusplus
13073#define inline $ac_val
13074#endif
13075_ACEOF
13076 ;;
13077esac
13078
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013079
Illia Bobyra96d5442023-08-30 16:30:15 +020013080{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for rlim_t" >&5
13081printf %s "checking for rlim_t... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013082if eval "test \"`echo '$''{'ac_cv_type_rlim_t'+set}'`\" = set"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020013083 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: (cached) $ac_cv_type_rlim_t" >&5
13084printf "%s\n" "(cached) $ac_cv_type_rlim_t" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013085else
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013087/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013088
13089#include <sys/types.h>
13090#if STDC_HEADERS
Bram Moolenaar446cb832008-06-24 21:56:24 +000013091# include <stdlib.h>
13092# include <stddef.h>
Bram Moolenaar071d4272004-06-13 20:20:40 +000013093#endif
13094#ifdef HAVE_SYS_RESOURCE_H
Bram Moolenaar446cb832008-06-24 21:56:24 +000013095# include <sys/resource.h>
Bram Moolenaar071d4272004-06-13 20:20:40 +000013096#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013097
13098_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000013099if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Christian Brabandt9670f612025-05-07 21:44:33 +020013100 $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 +020013101then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000013102 ac_cv_type_rlim_t=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020013103else case e in #(
13104 e) ac_cv_type_rlim_t=no ;;
13105esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000013106fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013107rm -rf conftest*
Bram Moolenaar071d4272004-06-13 20:20:40 +000013108
Illia Bobyra96d5442023-08-30 16:30:15 +020013109 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_rlim_t" >&5
13110printf "%s\n" "$ac_cv_type_rlim_t" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013111fi
13112if test $ac_cv_type_rlim_t = no; then
13113 cat >> confdefs.h <<\EOF
13114#define rlim_t unsigned long
13115EOF
13116fi
13117
Illia Bobyra96d5442023-08-30 16:30:15 +020013118{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stack_t" >&5
13119printf %s "checking for stack_t... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013120if eval "test \"`echo '$''{'ac_cv_type_stack_t'+set}'`\" = set"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020013121 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: (cached) $ac_cv_type_stack_t" >&5
13122printf "%s\n" "(cached) $ac_cv_type_stack_t" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013123else
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013125/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013126
13127#include <sys/types.h>
13128#if STDC_HEADERS
Bram Moolenaar446cb832008-06-24 21:56:24 +000013129# include <stdlib.h>
13130# include <stddef.h>
Bram Moolenaar071d4272004-06-13 20:20:40 +000013131#endif
13132#include <signal.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013133
13134_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000013135if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Christian Brabandt9670f612025-05-07 21:44:33 +020013136 $EGREP_TRADITIONAL "stack_t" >/dev/null 2>&1
Illia Bobyra96d5442023-08-30 16:30:15 +020013137then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000013138 ac_cv_type_stack_t=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020013139else case e in #(
13140 e) ac_cv_type_stack_t=no ;;
13141esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000013142fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013143rm -rf conftest*
Bram Moolenaar071d4272004-06-13 20:20:40 +000013144
Illia Bobyra96d5442023-08-30 16:30:15 +020013145 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_stack_t" >&5
13146printf "%s\n" "$ac_cv_type_stack_t" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013147fi
13148if test $ac_cv_type_stack_t = no; then
13149 cat >> confdefs.h <<\EOF
13150#define stack_t struct sigaltstack
13151EOF
13152fi
13153
Illia Bobyra96d5442023-08-30 16:30:15 +020013154{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stack_t has an ss_base field" >&5
13155printf %s "checking whether stack_t has an ss_base field... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013156cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013157/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013158
13159#include <sys/types.h>
13160#if STDC_HEADERS
Bram Moolenaar446cb832008-06-24 21:56:24 +000013161# include <stdlib.h>
13162# include <stddef.h>
Bram Moolenaar071d4272004-06-13 20:20:40 +000013163#endif
13164#include <signal.h>
13165#include "confdefs.h"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013166
13167int
Illia Bobyra96d5442023-08-30 16:30:15 +020013168main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013169{
13170stack_t sigstk; sigstk.ss_base = 0;
13171 ;
13172 return 0;
13173}
13174_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013175if ac_fn_c_try_compile "$LINENO"
13176then :
13177 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13178printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SS_BASE 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013179
Christian Brabandt9670f612025-05-07 21:44:33 +020013180else case e in #(
13181 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13182printf "%s\n" "no" >&6; } ;;
13183esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000013184fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013185rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000013186
13187olibs="$LIBS"
Illia Bobyra96d5442023-08-30 16:30:15 +020013188{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-tlib argument" >&5
13189printf %s "checking --with-tlib argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013190
Bram Moolenaar446cb832008-06-24 21:56:24 +000013191# Check whether --with-tlib was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020013192if test ${with_tlib+y}
13193then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000013194 withval=$with_tlib;
13195fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000013196
13197if test -n "$with_tlib"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020013198 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_tlib" >&5
13199printf "%s\n" "$with_tlib" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013200 LIBS="$LIBS -l$with_tlib"
Illia Bobyra96d5442023-08-30 16:30:15 +020013201 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for linking with $with_tlib library" >&5
13202printf %s "checking for linking with $with_tlib library... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013204/* end confdefs.h. */
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000013205
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013206int
Illia Bobyra96d5442023-08-30 16:30:15 +020013207main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013208{
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000013209
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013210 ;
13211 return 0;
13212}
13213_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013214if ac_fn_c_try_link "$LINENO"
13215then :
13216 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: OK" >&5
13217printf "%s\n" "OK" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +020013218else case e in #(
13219 e) as_fn_error $? "FAILED" "$LINENO" 5 ;;
13220esac
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000013221fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013222rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013223 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000013224 olibs="$LIBS"
13225else
Illia Bobyra96d5442023-08-30 16:30:15 +020013226 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: empty: automatic terminal library selection" >&5
13227printf "%s\n" "empty: automatic terminal library selection" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +000013228 case "$vim_cv_uname_output" in
Bram Moolenaar4e509b62011-02-09 17:42:57 +010013229 OSF1|SCO_SV) tlibs="tinfo ncurses curses termlib termcap";;
13230 *) tlibs="tinfo ncurses termlib termcap curses";;
Bram Moolenaar071d4272004-06-13 20:20:40 +000013231 esac
13232 for libname in $tlibs; do
Christian Brabandt9670f612025-05-07 21:44:33 +020013233 as_ac_Lib=`printf "%s\n" "ac_cv_lib_${libname}""_tgetent" | sed "$as_sed_sh"`
Illia Bobyra96d5442023-08-30 16:30:15 +020013234{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tgetent in -l${libname}" >&5
13235printf %s "checking for tgetent in -l${libname}... " >&6; }
13236if eval test \${$as_ac_Lib+y}
13237then :
13238 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020013239else case e in #(
13240 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000013241LIBS="-l${libname} $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013242cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013243/* end confdefs.h. */
13244
Bram Moolenaar446cb832008-06-24 21:56:24 +000013245/* Override any GCC internal prototype to avoid an error.
13246 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020013247 builtin and then its argument prototype would still apply.
13248 The 'extern "C"' is for builds by C++ compilers;
13249 although this is not generally supported in C code supporting it here
13250 has little cost and some practical benefit (sr 110532). */
13251#ifdef __cplusplus
13252extern "C"
13253#endif
13254char tgetent (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013255int
Illia Bobyra96d5442023-08-30 16:30:15 +020013256main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013257{
Bram Moolenaar446cb832008-06-24 21:56:24 +000013258return tgetent ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013259 ;
13260 return 0;
13261}
13262_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013263if ac_fn_c_try_link "$LINENO"
13264then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013265 eval "$as_ac_Lib=yes"
Christian Brabandt9670f612025-05-07 21:44:33 +020013266else case e in #(
13267 e) eval "$as_ac_Lib=no" ;;
13268esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000013269fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013270rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013271 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020013272LIBS=$ac_check_lib_save_LIBS ;;
13273esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013274fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013275eval ac_res=\$$as_ac_Lib
Illia Bobyra96d5442023-08-30 16:30:15 +020013276 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13277printf "%s\n" "$ac_res" >&6; }
13278if eval test \"x\$"$as_ac_Lib"\" = x"yes"
13279then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013280 cat >>confdefs.h <<_ACEOF
Christian Brabandt9670f612025-05-07 21:44:33 +020013281#define `printf "%s\n" "HAVE_LIB${libname}" | sed "$as_sed_cpp"` 1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013282_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000013283
13284 LIBS="-l${libname} $LIBS"
13285
Bram Moolenaar071d4272004-06-13 20:20:40 +000013286fi
13287
13288 if test "x$olibs" != "x$LIBS"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020013289 if test "$cross_compiling" = yes
13290then :
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010013291 res="OK"
Christian Brabandt9670f612025-05-07 21:44:33 +020013292else case e in #(
13293 e) cat 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#ifdef HAVE_TERMCAP_H
13297# include <termcap.h>
13298#endif
Bram Moolenaar446cb832008-06-24 21:56:24 +000013299#if STDC_HEADERS
13300# include <stdlib.h>
13301# include <stddef.h>
13302#endif
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010013303int main() {char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(0); }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013304_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013305if ac_fn_c_try_run "$LINENO"
13306then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000013307 res="OK"
Christian Brabandt9670f612025-05-07 21:44:33 +020013308else case e in #(
13309 e) res="FAIL" ;;
13310esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013311fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013312rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
Christian Brabandt9670f612025-05-07 21:44:33 +020013313 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
13314esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013315fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000013316
Bram Moolenaar071d4272004-06-13 20:20:40 +000013317 if test "$res" = "OK"; then
13318 break
13319 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013320 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libname library is not usable" >&5
13321printf "%s\n" "$libname library is not usable" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013322 LIBS="$olibs"
13323 fi
13324 done
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000013325 if test "x$olibs" = "x$LIBS"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020013326 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no terminal library found" >&5
13327printf "%s\n" "no terminal library found" >&6; }
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000013328 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000013329fi
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000013330
13331if test "x$olibs" = "x$LIBS"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020013332 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tgetent()" >&5
13333printf %s "checking for tgetent()... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013335/* end confdefs.h. */
Bram Moolenaarbd7f7c12020-07-28 21:03:37 +020013336int tgetent(char *, const char *);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013337int
Illia Bobyra96d5442023-08-30 16:30:15 +020013338main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013339{
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000013340char s[10000]; int res = tgetent(s, "thisterminaldoesnotexist");
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013341 ;
13342 return 0;
13343}
13344_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013345if ac_fn_c_try_link "$LINENO"
13346then :
13347 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13348printf "%s\n" "yes" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +020013349else case e in #(
13350 e) as_fn_error $? "NOT FOUND!
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000013351 You need to install a terminal library; for example ncurses.
Bram Moolenaar16678eb2021-04-21 11:57:59 +020013352 On Linux that would be the libncurses-dev package.
Christian Brabandt9670f612025-05-07 21:44:33 +020013353 Or specify the name of the library with --with-tlib." "$LINENO" 5 ;;
13354esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013355fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013356rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013357 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000013358fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000013359
Illia Bobyra96d5442023-08-30 16:30:15 +020013360{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we talk terminfo" >&5
13361printf %s "checking whether we talk terminfo... " >&6; }
13362if test ${vim_cv_terminfo+y}
13363then :
13364 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020013365else case e in #(
13366 e)
Illia Bobyra96d5442023-08-30 16:30:15 +020013367 if test "$cross_compiling" = yes
13368then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000013369
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010013370 vim_cv_terminfo=yes
13371 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cross-compiling: consider setting 'vim_cv_terminfo'" >&5
13372printf "%s\n" "$as_me: WARNING: cross-compiling: consider setting 'vim_cv_terminfo'" >&2;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000013373
Christian Brabandt9670f612025-05-07 21:44:33 +020013374else case e in #(
13375 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013376/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013377
Bram Moolenaar446cb832008-06-24 21:56:24 +000013378#include "confdefs.h"
Bram Moolenaar071d4272004-06-13 20:20:40 +000013379#ifdef HAVE_TERMCAP_H
13380# include <termcap.h>
13381#endif
Bram Moolenaar446cb832008-06-24 21:56:24 +000013382#ifdef HAVE_STRING_H
13383# include <string.h>
13384#endif
13385#if STDC_HEADERS
13386# include <stdlib.h>
13387# include <stddef.h>
13388#endif
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010013389int main()
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010013390{char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(!!strcmp(s==0 ? "" : s, "1")); }
Bram Moolenaar446cb832008-06-24 21:56:24 +000013391
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013392_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013393if ac_fn_c_try_run "$LINENO"
13394then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000013395
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010013396 vim_cv_terminfo=yes
Bram Moolenaar446cb832008-06-24 21:56:24 +000013397
Christian Brabandt9670f612025-05-07 21:44:33 +020013398else case e in #(
13399 e)
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010013400 vim_cv_terminfo=no
Christian Brabandt9670f612025-05-07 21:44:33 +020013401 ;;
13402esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000013403fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013404rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
Christian Brabandt9670f612025-05-07 21:44:33 +020013405 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
13406esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000013407fi
13408
Christian Brabandt9670f612025-05-07 21:44:33 +020013409 ;;
13410esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000013411fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013412{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_terminfo" >&5
13413printf "%s\n" "$vim_cv_terminfo" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000013414
13415if test "x$vim_cv_terminfo" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020013416 printf "%s\n" "#define TERMINFO 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013417
13418fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000013419
Illia Bobyra96d5442023-08-30 16:30:15 +020013420{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking what tgetent() returns for an unknown terminal" >&5
13421printf %s "checking what tgetent() returns for an unknown terminal... " >&6; }
13422if test ${vim_cv_tgetent+y}
13423then :
13424 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020013425else case e in #(
13426 e)
Illia Bobyra96d5442023-08-30 16:30:15 +020013427 if test "$cross_compiling" = yes
13428then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000013429
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010013430 vim_cv_tgetent=zero
13431 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cross-compiling: consider setting 'vim_cv_tgetent'" >&5
13432printf "%s\n" "$as_me: WARNING: cross-compiling: consider setting 'vim_cv_tgetent'" >&2;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000013433
Christian Brabandt9670f612025-05-07 21:44:33 +020013434else case e in #(
13435 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013436/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013437
Bram Moolenaar446cb832008-06-24 21:56:24 +000013438#include "confdefs.h"
Bram Moolenaar071d4272004-06-13 20:20:40 +000013439#ifdef HAVE_TERMCAP_H
13440# include <termcap.h>
13441#endif
Bram Moolenaar446cb832008-06-24 21:56:24 +000013442#if STDC_HEADERS
13443# include <stdlib.h>
13444# include <stddef.h>
13445#endif
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010013446int main()
Bram Moolenaar071d4272004-06-13 20:20:40 +000013447{char s[10000]; int res = tgetent(s, "thisterminaldoesnotexist"); exit(res != 0); }
Bram Moolenaar446cb832008-06-24 21:56:24 +000013448
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013449_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013450if ac_fn_c_try_run "$LINENO"
13451then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000013452
Bram Moolenaara88254f2017-11-02 23:04:14 +010013453 vim_cv_tgetent=zero
Bram Moolenaar071d4272004-06-13 20:20:40 +000013454
Christian Brabandt9670f612025-05-07 21:44:33 +020013455else case e in #(
13456 e)
Bram Moolenaara88254f2017-11-02 23:04:14 +010013457 vim_cv_tgetent=non-zero
Christian Brabandt9670f612025-05-07 21:44:33 +020013458 ;;
13459esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000013460fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013461rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
Christian Brabandt9670f612025-05-07 21:44:33 +020013462 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
13463esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000013464fi
13465
Christian Brabandt9670f612025-05-07 21:44:33 +020013466 ;;
13467esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000013468fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013469{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_tgetent" >&5
13470printf "%s\n" "$vim_cv_tgetent" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000013471
Bram Moolenaara88254f2017-11-02 23:04:14 +010013472if test "x$vim_cv_tgetent" = "xzero" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020013473 printf "%s\n" "#define TGETENT_ZERO_ERR 0" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000013474
Bram Moolenaar446cb832008-06-24 21:56:24 +000013475fi
13476
Illia Bobyra96d5442023-08-30 16:30:15 +020013477{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether termcap.h contains ospeed" >&5
13478printf %s "checking whether termcap.h contains ospeed... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013479cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013480/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013481
13482#ifdef HAVE_TERMCAP_H
13483# include <termcap.h>
13484#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013485
13486int
Illia Bobyra96d5442023-08-30 16:30:15 +020013487main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013488{
Bram Moolenaar071d4272004-06-13 20:20:40 +000013489ospeed = 20000
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013490 ;
13491 return 0;
13492}
13493_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013494if ac_fn_c_try_link "$LINENO"
13495then :
13496 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13497printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_OSPEED 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013498
Christian Brabandt9670f612025-05-07 21:44:33 +020013499else case e in #(
13500 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +020013501printf "%s\n" "no" >&6; }
13502 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ospeed can be extern" >&5
13503printf %s "checking whether ospeed can be extern... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013505/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013506
13507#ifdef HAVE_TERMCAP_H
13508# include <termcap.h>
13509#endif
13510extern short ospeed;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013511
13512int
Illia Bobyra96d5442023-08-30 16:30:15 +020013513main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013514{
Bram Moolenaar071d4272004-06-13 20:20:40 +000013515ospeed = 20000
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013516 ;
13517 return 0;
13518}
13519_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013520if ac_fn_c_try_link "$LINENO"
13521then :
13522 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13523printf "%s\n" "yes" >&6; }; printf "%s\n" "#define OSPEED_EXTERN 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013524
Christian Brabandt9670f612025-05-07 21:44:33 +020013525else case e in #(
13526 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13527printf "%s\n" "no" >&6; } ;;
13528esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013529fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013530rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013531 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020013532 ;;
13533esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013534fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013535rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013536 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000013537
Illia Bobyra96d5442023-08-30 16:30:15 +020013538{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether termcap.h contains UP, BC and PC" >&5
13539printf %s "checking whether termcap.h contains UP, BC and PC... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013540cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013541/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013542
13543#ifdef HAVE_TERMCAP_H
13544# include <termcap.h>
13545#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013546
13547int
Illia Bobyra96d5442023-08-30 16:30:15 +020013548main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013549{
Bram Moolenaar071d4272004-06-13 20:20:40 +000013550if (UP == 0 && BC == 0) PC = 1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013551 ;
13552 return 0;
13553}
13554_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013555if ac_fn_c_try_link "$LINENO"
13556then :
13557 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13558printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_UP_BC_PC 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013559
Christian Brabandt9670f612025-05-07 21:44:33 +020013560else case e in #(
13561 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +020013562printf "%s\n" "no" >&6; }
13563 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether UP, BC and PC can be extern" >&5
13564printf %s "checking whether UP, BC and PC can be extern... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013566/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013567
13568#ifdef HAVE_TERMCAP_H
13569# include <termcap.h>
13570#endif
13571extern char *UP, *BC, PC;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013572
13573int
Illia Bobyra96d5442023-08-30 16:30:15 +020013574main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013575{
Bram Moolenaar071d4272004-06-13 20:20:40 +000013576if (UP == 0 && BC == 0) PC = 1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013577 ;
13578 return 0;
13579}
13580_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013581if ac_fn_c_try_link "$LINENO"
13582then :
13583 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13584printf "%s\n" "yes" >&6; }; printf "%s\n" "#define UP_BC_PC_EXTERN 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013585
Christian Brabandt9670f612025-05-07 21:44:33 +020013586else case e in #(
13587 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13588printf "%s\n" "no" >&6; } ;;
13589esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013590fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013591rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013592 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020013593 ;;
13594esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013595fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013596rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013597 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000013598
Illia Bobyra96d5442023-08-30 16:30:15 +020013599{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether tputs() uses outfuntype" >&5
13600printf %s "checking whether tputs() uses outfuntype... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013601cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013602/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013603
13604#ifdef HAVE_TERMCAP_H
13605# include <termcap.h>
13606#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013607
13608int
Illia Bobyra96d5442023-08-30 16:30:15 +020013609main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013610{
Bram Moolenaar071d4272004-06-13 20:20:40 +000013611extern int xx(); tputs("test", 1, (outfuntype)xx)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013612 ;
13613 return 0;
13614}
13615_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013616if ac_fn_c_try_compile "$LINENO"
13617then :
13618 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13619printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_OUTFUNTYPE 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013620
Christian Brabandt9670f612025-05-07 21:44:33 +020013621else case e in #(
13622 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13623printf "%s\n" "no" >&6; } ;;
13624esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013625fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013626rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000013627
Illia Bobyra96d5442023-08-30 16:30:15 +020013628{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether del_curterm() can be used" >&5
13629printf %s "checking whether del_curterm() can be used... " >&6; }
Bram Moolenaarb3a29552021-11-19 11:28:04 +000013630cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13631/* end confdefs.h. */
13632
13633#ifdef HAVE_TERMCAP_H
13634# include <termcap.h>
13635#endif
13636#include <term.h>
13637
13638int
Illia Bobyra96d5442023-08-30 16:30:15 +020013639main (void)
Bram Moolenaarb3a29552021-11-19 11:28:04 +000013640{
13641if (cur_term) del_curterm(cur_term);
13642 ;
13643 return 0;
13644}
13645_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013646if ac_fn_c_try_link "$LINENO"
13647then :
13648 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13649printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_DEL_CURTERM 1" >>confdefs.h
Bram Moolenaarb3a29552021-11-19 11:28:04 +000013650
Christian Brabandt9670f612025-05-07 21:44:33 +020013651else case e in #(
13652 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13653printf "%s\n" "no" >&6; } ;;
13654esac
Bram Moolenaarb3a29552021-11-19 11:28:04 +000013655fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013656rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarb3a29552021-11-19 11:28:04 +000013657 conftest$ac_exeext conftest.$ac_ext
13658
Illia Bobyra96d5442023-08-30 16:30:15 +020013659{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13660printf %s "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013661cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013662/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013663
13664#include <sys/types.h>
13665#include <sys/time.h>
13666#include <sys/select.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013667int
Illia Bobyra96d5442023-08-30 16:30:15 +020013668main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013669{
Bram Moolenaar071d4272004-06-13 20:20:40 +000013670
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013671 ;
13672 return 0;
13673}
13674_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013675if ac_fn_c_try_compile "$LINENO"
13676then :
13677 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13678printf "%s\n" "yes" >&6; }
13679 printf "%s\n" "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013680
Christian Brabandt9670f612025-05-07 21:44:33 +020013681else case e in #(
13682 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13683printf "%s\n" "no" >&6; } ;;
13684esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000013685fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013686rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000013687
Illia Bobyra96d5442023-08-30 16:30:15 +020013688{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13689printf %s "checking for /dev/ptc... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013690if test -r /dev/ptc; then
Illia Bobyra96d5442023-08-30 16:30:15 +020013691 printf "%s\n" "#define HAVE_DEV_PTC 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013692
Illia Bobyra96d5442023-08-30 16:30:15 +020013693 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13694printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013695else
Illia Bobyra96d5442023-08-30 16:30:15 +020013696 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13697printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013698fi
13699
Illia Bobyra96d5442023-08-30 16:30:15 +020013700{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SVR4 ptys" >&5
13701printf %s "checking for SVR4 ptys... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013702if test -c /dev/ptmx ; then
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013704/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013705
Bram Moolenaarce7be3a2020-11-26 20:11:11 +010013706// These should be in stdlib.h, but it depends on _XOPEN_SOURCE.
13707char *ptsname(int);
13708int unlockpt(int);
13709int grantpt(int);
13710
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013711int
Illia Bobyra96d5442023-08-30 16:30:15 +020013712main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013713{
Bram Moolenaarce7be3a2020-11-26 20:11:11 +010013714
13715 ptsname(0);
13716 grantpt(0);
13717 unlockpt(0);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013718 ;
13719 return 0;
13720}
13721_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013722if ac_fn_c_try_link "$LINENO"
13723then :
13724 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13725printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SVR4_PTYS 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013726
Christian Brabandt9670f612025-05-07 21:44:33 +020013727else case e in #(
13728 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13729printf "%s\n" "no" >&6; } ;;
13730esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013731fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013732rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013733 conftest$ac_exeext conftest.$ac_ext
13734else
Illia Bobyra96d5442023-08-30 16:30:15 +020013735 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13736printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013737fi
13738
Illia Bobyra96d5442023-08-30 16:30:15 +020013739{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ptyranges" >&5
13740printf %s "checking for ptyranges... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013741if test -d /dev/ptym ; then
13742 pdir='/dev/ptym'
13743else
13744 pdir='/dev'
13745fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013746cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013747/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013748#ifdef M_UNIX
13749 yes;
13750#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013751
13752_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000013753if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Christian Brabandt9670f612025-05-07 21:44:33 +020013754 $EGREP_TRADITIONAL "yes" >/dev/null 2>&1
Illia Bobyra96d5442023-08-30 16:30:15 +020013755then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000013756 ptys=`echo /dev/ptyp??`
Christian Brabandt9670f612025-05-07 21:44:33 +020013757else case e in #(
13758 e) ptys=`echo $pdir/pty??` ;;
13759esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000013760fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013761rm -rf conftest*
Bram Moolenaar071d4272004-06-13 20:20:40 +000013762
13763if test "$ptys" != "$pdir/pty??" ; then
13764 p0=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\).$/\1/g' | sort -u | tr -d '\012'`
13765 p1=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\)$/\1/g' | sort -u | tr -d '\012'`
Illia Bobyra96d5442023-08-30 16:30:15 +020013766 printf "%s\n" "#define PTYRANGE0 \"$p0\"" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013767
Illia Bobyra96d5442023-08-30 16:30:15 +020013768 printf "%s\n" "#define PTYRANGE1 \"$p1\"" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013769
Illia Bobyra96d5442023-08-30 16:30:15 +020013770 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $p0 / $p1" >&5
13771printf "%s\n" "$p0 / $p1" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013772else
Illia Bobyra96d5442023-08-30 16:30:15 +020013773 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: don't know" >&5
13774printf "%s\n" "don't know" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013775fi
13776
Bram Moolenaar446cb832008-06-24 21:56:24 +000013777
Illia Bobyra96d5442023-08-30 16:30:15 +020013778{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct sigcontext" >&5
13779printf %s "checking for struct sigcontext... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013780cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013781/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013782
13783#include <signal.h>
Sam Jamesf8ea1062022-11-05 15:13:50 +000013784int test_sig()
Bram Moolenaar071d4272004-06-13 20:20:40 +000013785{
13786 struct sigcontext *scont;
13787 scont = (struct sigcontext *)0;
13788 return 1;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013789}
13790int
Illia Bobyra96d5442023-08-30 16:30:15 +020013791main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013792{
Bram Moolenaar071d4272004-06-13 20:20:40 +000013793
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013794 ;
13795 return 0;
13796}
13797_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013798if ac_fn_c_try_compile "$LINENO"
13799then :
13800 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13801printf "%s\n" "yes" >&6; }
13802 printf "%s\n" "#define HAVE_SIGCONTEXT 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013803
Christian Brabandt9670f612025-05-07 21:44:33 +020013804else case e in #(
13805 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13806printf "%s\n" "no" >&6; } ;;
13807esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000013808fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013809rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000013810
Illia Bobyra96d5442023-08-30 16:30:15 +020013811{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking getcwd implementation is broken" >&5
13812printf %s "checking getcwd implementation is broken... " >&6; }
13813if test ${vim_cv_getcwd_broken+y}
13814then :
13815 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020013816else case e in #(
13817 e)
Illia Bobyra96d5442023-08-30 16:30:15 +020013818 if test "$cross_compiling" = yes
13819then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000013820
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010013821 vim_cv_getcwd_broken=no
13822 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cross-compiling: consider setting 'vim_cv_getcwd_broken'" >&5
13823printf "%s\n" "$as_me: WARNING: cross-compiling: consider setting 'vim_cv_getcwd_broken'" >&2;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000013824
Christian Brabandt9670f612025-05-07 21:44:33 +020013825else case e in #(
13826 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013827/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013828
Bram Moolenaar446cb832008-06-24 21:56:24 +000013829#include "confdefs.h"
13830#ifdef HAVE_UNISTD_H
13831#include <unistd.h>
13832#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000013833char *dagger[] = { "IFS=pwd", 0 };
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010013834int main()
Bram Moolenaar071d4272004-06-13 20:20:40 +000013835{
13836 char buffer[500];
13837 extern char **environ;
13838 environ = dagger;
13839 return getcwd(buffer, 500) ? 0 : 1;
13840}
Bram Moolenaar446cb832008-06-24 21:56:24 +000013841
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013842_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013843if ac_fn_c_try_run "$LINENO"
13844then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000013845
13846 vim_cv_getcwd_broken=no
13847
Christian Brabandt9670f612025-05-07 21:44:33 +020013848else case e in #(
13849 e)
Bram Moolenaar446cb832008-06-24 21:56:24 +000013850 vim_cv_getcwd_broken=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020013851 ;;
13852esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000013853fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013854rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
Christian Brabandt9670f612025-05-07 21:44:33 +020013855 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
13856esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000013857fi
13858
Christian Brabandt9670f612025-05-07 21:44:33 +020013859 ;;
13860esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000013861fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013862{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_getcwd_broken" >&5
13863printf "%s\n" "$vim_cv_getcwd_broken" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000013864
13865if test "x$vim_cv_getcwd_broken" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020013866 printf "%s\n" "#define BAD_GETCWD 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013867
Bram Moolenaar63d25552019-05-10 21:28:38 +020013868 ac_fn_c_check_func "$LINENO" "getwd" "ac_cv_func_getwd"
Illia Bobyra96d5442023-08-30 16:30:15 +020013869if test "x$ac_cv_func_getwd" = xyes
13870then :
13871 printf "%s\n" "#define HAVE_GETWD 1" >>confdefs.h
Bram Moolenaar63d25552019-05-10 21:28:38 +020013872
Bram Moolenaar071d4272004-06-13 20:20:40 +000013873fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000013874
Illia Bobyra96d5442023-08-30 16:30:15 +020013875fi
13876
13877ac_fn_c_check_func "$LINENO" "fchdir" "ac_cv_func_fchdir"
13878if test "x$ac_cv_func_fchdir" = xyes
13879then :
13880 printf "%s\n" "#define HAVE_FCHDIR 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013881
Bram Moolenaar071d4272004-06-13 20:20:40 +000013882fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013883ac_fn_c_check_func "$LINENO" "fchown" "ac_cv_func_fchown"
13884if test "x$ac_cv_func_fchown" = xyes
13885then :
13886 printf "%s\n" "#define HAVE_FCHOWN 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013887
Illia Bobyra96d5442023-08-30 16:30:15 +020013888fi
13889ac_fn_c_check_func "$LINENO" "fchmod" "ac_cv_func_fchmod"
13890if test "x$ac_cv_func_fchmod" = xyes
13891then :
13892 printf "%s\n" "#define HAVE_FCHMOD 1" >>confdefs.h
13893
13894fi
13895ac_fn_c_check_func "$LINENO" "fsync" "ac_cv_func_fsync"
13896if test "x$ac_cv_func_fsync" = xyes
13897then :
13898 printf "%s\n" "#define HAVE_FSYNC 1" >>confdefs.h
13899
13900fi
13901ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
13902if test "x$ac_cv_func_getcwd" = xyes
13903then :
13904 printf "%s\n" "#define HAVE_GETCWD 1" >>confdefs.h
13905
13906fi
13907ac_fn_c_check_func "$LINENO" "getpseudotty" "ac_cv_func_getpseudotty"
13908if test "x$ac_cv_func_getpseudotty" = xyes
13909then :
13910 printf "%s\n" "#define HAVE_GETPSEUDOTTY 1" >>confdefs.h
13911
13912fi
13913ac_fn_c_check_func "$LINENO" "getpwent" "ac_cv_func_getpwent"
13914if test "x$ac_cv_func_getpwent" = xyes
13915then :
13916 printf "%s\n" "#define HAVE_GETPWENT 1" >>confdefs.h
13917
13918fi
13919ac_fn_c_check_func "$LINENO" "getpwnam" "ac_cv_func_getpwnam"
13920if test "x$ac_cv_func_getpwnam" = xyes
13921then :
13922 printf "%s\n" "#define HAVE_GETPWNAM 1" >>confdefs.h
13923
13924fi
13925ac_fn_c_check_func "$LINENO" "getpwuid" "ac_cv_func_getpwuid"
13926if test "x$ac_cv_func_getpwuid" = xyes
13927then :
13928 printf "%s\n" "#define HAVE_GETPWUID 1" >>confdefs.h
13929
13930fi
13931ac_fn_c_check_func "$LINENO" "getrlimit" "ac_cv_func_getrlimit"
13932if test "x$ac_cv_func_getrlimit" = xyes
13933then :
13934 printf "%s\n" "#define HAVE_GETRLIMIT 1" >>confdefs.h
13935
13936fi
13937ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
13938if test "x$ac_cv_func_gettimeofday" = xyes
13939then :
13940 printf "%s\n" "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
13941
13942fi
13943ac_fn_c_check_func "$LINENO" "localtime_r" "ac_cv_func_localtime_r"
13944if test "x$ac_cv_func_localtime_r" = xyes
13945then :
13946 printf "%s\n" "#define HAVE_LOCALTIME_R 1" >>confdefs.h
13947
13948fi
13949ac_fn_c_check_func "$LINENO" "lstat" "ac_cv_func_lstat"
13950if test "x$ac_cv_func_lstat" = xyes
13951then :
13952 printf "%s\n" "#define HAVE_LSTAT 1" >>confdefs.h
13953
13954fi
13955ac_fn_c_check_func "$LINENO" "memset" "ac_cv_func_memset"
13956if test "x$ac_cv_func_memset" = xyes
13957then :
13958 printf "%s\n" "#define HAVE_MEMSET 1" >>confdefs.h
13959
13960fi
13961ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
13962if test "x$ac_cv_func_mkdtemp" = xyes
13963then :
13964 printf "%s\n" "#define HAVE_MKDTEMP 1" >>confdefs.h
13965
13966fi
13967ac_fn_c_check_func "$LINENO" "nanosleep" "ac_cv_func_nanosleep"
13968if test "x$ac_cv_func_nanosleep" = xyes
13969then :
13970 printf "%s\n" "#define HAVE_NANOSLEEP 1" >>confdefs.h
13971
13972fi
13973ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
13974if test "x$ac_cv_func_opendir" = xyes
13975then :
13976 printf "%s\n" "#define HAVE_OPENDIR 1" >>confdefs.h
13977
13978fi
13979ac_fn_c_check_func "$LINENO" "putenv" "ac_cv_func_putenv"
13980if test "x$ac_cv_func_putenv" = xyes
13981then :
13982 printf "%s\n" "#define HAVE_PUTENV 1" >>confdefs.h
13983
13984fi
13985ac_fn_c_check_func "$LINENO" "qsort" "ac_cv_func_qsort"
13986if test "x$ac_cv_func_qsort" = xyes
13987then :
13988 printf "%s\n" "#define HAVE_QSORT 1" >>confdefs.h
13989
13990fi
13991ac_fn_c_check_func "$LINENO" "readlink" "ac_cv_func_readlink"
13992if test "x$ac_cv_func_readlink" = xyes
13993then :
13994 printf "%s\n" "#define HAVE_READLINK 1" >>confdefs.h
13995
13996fi
13997ac_fn_c_check_func "$LINENO" "select" "ac_cv_func_select"
13998if test "x$ac_cv_func_select" = xyes
13999then :
14000 printf "%s\n" "#define HAVE_SELECT 1" >>confdefs.h
14001
14002fi
14003ac_fn_c_check_func "$LINENO" "setenv" "ac_cv_func_setenv"
14004if test "x$ac_cv_func_setenv" = xyes
14005then :
14006 printf "%s\n" "#define HAVE_SETENV 1" >>confdefs.h
14007
14008fi
14009ac_fn_c_check_func "$LINENO" "getpgid" "ac_cv_func_getpgid"
14010if test "x$ac_cv_func_getpgid" = xyes
14011then :
14012 printf "%s\n" "#define HAVE_GETPGID 1" >>confdefs.h
14013
14014fi
14015ac_fn_c_check_func "$LINENO" "setpgid" "ac_cv_func_setpgid"
14016if test "x$ac_cv_func_setpgid" = xyes
14017then :
14018 printf "%s\n" "#define HAVE_SETPGID 1" >>confdefs.h
14019
14020fi
14021ac_fn_c_check_func "$LINENO" "setsid" "ac_cv_func_setsid"
14022if test "x$ac_cv_func_setsid" = xyes
14023then :
14024 printf "%s\n" "#define HAVE_SETSID 1" >>confdefs.h
14025
14026fi
14027ac_fn_c_check_func "$LINENO" "sigaltstack" "ac_cv_func_sigaltstack"
14028if test "x$ac_cv_func_sigaltstack" = xyes
14029then :
14030 printf "%s\n" "#define HAVE_SIGALTSTACK 1" >>confdefs.h
14031
14032fi
14033ac_fn_c_check_func "$LINENO" "sigstack" "ac_cv_func_sigstack"
14034if test "x$ac_cv_func_sigstack" = xyes
14035then :
14036 printf "%s\n" "#define HAVE_SIGSTACK 1" >>confdefs.h
14037
14038fi
14039ac_fn_c_check_func "$LINENO" "sigset" "ac_cv_func_sigset"
14040if test "x$ac_cv_func_sigset" = xyes
14041then :
14042 printf "%s\n" "#define HAVE_SIGSET 1" >>confdefs.h
14043
14044fi
14045ac_fn_c_check_func "$LINENO" "sigsetjmp" "ac_cv_func_sigsetjmp"
14046if test "x$ac_cv_func_sigsetjmp" = xyes
14047then :
14048 printf "%s\n" "#define HAVE_SIGSETJMP 1" >>confdefs.h
14049
14050fi
14051ac_fn_c_check_func "$LINENO" "sigaction" "ac_cv_func_sigaction"
14052if test "x$ac_cv_func_sigaction" = xyes
14053then :
14054 printf "%s\n" "#define HAVE_SIGACTION 1" >>confdefs.h
14055
14056fi
14057ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
14058if test "x$ac_cv_func_sigprocmask" = xyes
14059then :
14060 printf "%s\n" "#define HAVE_SIGPROCMASK 1" >>confdefs.h
14061
14062fi
14063ac_fn_c_check_func "$LINENO" "sigvec" "ac_cv_func_sigvec"
14064if test "x$ac_cv_func_sigvec" = xyes
14065then :
14066 printf "%s\n" "#define HAVE_SIGVEC 1" >>confdefs.h
14067
14068fi
14069ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
14070if test "x$ac_cv_func_strcasecmp" = xyes
14071then :
14072 printf "%s\n" "#define HAVE_STRCASECMP 1" >>confdefs.h
14073
14074fi
14075ac_fn_c_check_func "$LINENO" "strcoll" "ac_cv_func_strcoll"
14076if test "x$ac_cv_func_strcoll" = xyes
14077then :
14078 printf "%s\n" "#define HAVE_STRCOLL 1" >>confdefs.h
14079
14080fi
14081ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror"
14082if test "x$ac_cv_func_strerror" = xyes
14083then :
14084 printf "%s\n" "#define HAVE_STRERROR 1" >>confdefs.h
14085
14086fi
14087ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
14088if test "x$ac_cv_func_strftime" = xyes
14089then :
14090 printf "%s\n" "#define HAVE_STRFTIME 1" >>confdefs.h
14091
14092fi
14093ac_fn_c_check_func "$LINENO" "stricmp" "ac_cv_func_stricmp"
14094if test "x$ac_cv_func_stricmp" = xyes
14095then :
14096 printf "%s\n" "#define HAVE_STRICMP 1" >>confdefs.h
14097
14098fi
14099ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp"
14100if test "x$ac_cv_func_strncasecmp" = xyes
14101then :
14102 printf "%s\n" "#define HAVE_STRNCASECMP 1" >>confdefs.h
14103
14104fi
14105ac_fn_c_check_func "$LINENO" "strnicmp" "ac_cv_func_strnicmp"
14106if test "x$ac_cv_func_strnicmp" = xyes
14107then :
14108 printf "%s\n" "#define HAVE_STRNICMP 1" >>confdefs.h
14109
14110fi
14111ac_fn_c_check_func "$LINENO" "strpbrk" "ac_cv_func_strpbrk"
14112if test "x$ac_cv_func_strpbrk" = xyes
14113then :
14114 printf "%s\n" "#define HAVE_STRPBRK 1" >>confdefs.h
14115
14116fi
14117ac_fn_c_check_func "$LINENO" "strptime" "ac_cv_func_strptime"
14118if test "x$ac_cv_func_strptime" = xyes
14119then :
14120 printf "%s\n" "#define HAVE_STRPTIME 1" >>confdefs.h
14121
14122fi
14123ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol"
14124if test "x$ac_cv_func_strtol" = xyes
14125then :
14126 printf "%s\n" "#define HAVE_STRTOL 1" >>confdefs.h
14127
14128fi
14129ac_fn_c_check_func "$LINENO" "tgetent" "ac_cv_func_tgetent"
14130if test "x$ac_cv_func_tgetent" = xyes
14131then :
14132 printf "%s\n" "#define HAVE_TGETENT 1" >>confdefs.h
14133
14134fi
14135ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
14136if test "x$ac_cv_func_towlower" = xyes
14137then :
14138 printf "%s\n" "#define HAVE_TOWLOWER 1" >>confdefs.h
14139
14140fi
14141ac_fn_c_check_func "$LINENO" "towupper" "ac_cv_func_towupper"
14142if test "x$ac_cv_func_towupper" = xyes
14143then :
14144 printf "%s\n" "#define HAVE_TOWUPPER 1" >>confdefs.h
14145
14146fi
14147ac_fn_c_check_func "$LINENO" "iswupper" "ac_cv_func_iswupper"
14148if test "x$ac_cv_func_iswupper" = xyes
14149then :
14150 printf "%s\n" "#define HAVE_ISWUPPER 1" >>confdefs.h
14151
14152fi
14153ac_fn_c_check_func "$LINENO" "tzset" "ac_cv_func_tzset"
14154if test "x$ac_cv_func_tzset" = xyes
14155then :
14156 printf "%s\n" "#define HAVE_TZSET 1" >>confdefs.h
14157
14158fi
14159ac_fn_c_check_func "$LINENO" "usleep" "ac_cv_func_usleep"
14160if test "x$ac_cv_func_usleep" = xyes
14161then :
14162 printf "%s\n" "#define HAVE_USLEEP 1" >>confdefs.h
14163
14164fi
14165ac_fn_c_check_func "$LINENO" "utime" "ac_cv_func_utime"
14166if test "x$ac_cv_func_utime" = xyes
14167then :
14168 printf "%s\n" "#define HAVE_UTIME 1" >>confdefs.h
14169
14170fi
14171ac_fn_c_check_func "$LINENO" "utimes" "ac_cv_func_utimes"
14172if test "x$ac_cv_func_utimes" = xyes
14173then :
14174 printf "%s\n" "#define HAVE_UTIMES 1" >>confdefs.h
14175
14176fi
14177ac_fn_c_check_func "$LINENO" "mblen" "ac_cv_func_mblen"
14178if test "x$ac_cv_func_mblen" = xyes
14179then :
14180 printf "%s\n" "#define HAVE_MBLEN 1" >>confdefs.h
14181
14182fi
14183ac_fn_c_check_func "$LINENO" "ftruncate" "ac_cv_func_ftruncate"
14184if test "x$ac_cv_func_ftruncate" = xyes
14185then :
14186 printf "%s\n" "#define HAVE_FTRUNCATE 1" >>confdefs.h
14187
14188fi
14189ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
14190if test "x$ac_cv_func_unsetenv" = xyes
14191then :
14192 printf "%s\n" "#define HAVE_UNSETENV 1" >>confdefs.h
14193
14194fi
14195ac_fn_c_check_func "$LINENO" "posix_openpt" "ac_cv_func_posix_openpt"
14196if test "x$ac_cv_func_posix_openpt" = xyes
14197then :
14198 printf "%s\n" "#define HAVE_POSIX_OPENPT 1" >>confdefs.h
14199
14200fi
14201ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
14202if test "x$ac_cv_func_clock_gettime" = xyes
14203then :
14204 printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
Bram Moolenaar643b6142018-09-12 20:29:09 +020014205
14206fi
Jonas Sortie Termansen8bb5eaf2024-11-04 20:32:27 +010014207ac_fn_c_check_func "$LINENO" "sync" "ac_cv_func_sync"
14208if test "x$ac_cv_func_sync" = xyes
14209then :
14210 printf "%s\n" "#define HAVE_SYNC 1" >>confdefs.h
14211
14212fi
Bram Moolenaar643b6142018-09-12 20:29:09 +020014213
Bram Moolenaar643b6142018-09-12 20:29:09 +020014214
Illia Bobyra96d5442023-08-30 16:30:15 +020014215
14216
14217{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking types of arguments for select" >&5
14218printf %s "checking types of arguments for select... " >&6; }
14219if test ${ac_cv_func_select_args+y}
14220then :
14221 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020014222else case e in #(
14223 e) ac_cv_func_select_args='int,int *,struct timeval *'
Illia Bobyra96d5442023-08-30 16:30:15 +020014224for ac_arg234 in 'fd_set *' 'int *' 'void *'; do
Bram Moolenaar643b6142018-09-12 20:29:09 +020014225 for ac_arg1 in 'int' 'size_t' 'unsigned long int' 'unsigned int'; do
14226 for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do
14227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14228/* end confdefs.h. */
14229$ac_includes_default
14230#ifdef HAVE_SYS_SELECT_H
14231# include <sys/select.h>
14232#endif
14233#ifdef HAVE_SYS_SOCKET_H
14234# include <sys/socket.h>
14235#endif
14236
14237int
Illia Bobyra96d5442023-08-30 16:30:15 +020014238main (void)
Bram Moolenaar643b6142018-09-12 20:29:09 +020014239{
14240extern int select ($ac_arg1,
14241 $ac_arg234, $ac_arg234, $ac_arg234,
14242 $ac_arg5);
14243 ;
14244 return 0;
14245}
14246_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014247if ac_fn_c_try_compile "$LINENO"
14248then :
Bram Moolenaar643b6142018-09-12 20:29:09 +020014249 ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3
14250fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014251rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar643b6142018-09-12 20:29:09 +020014252 done
14253 done
14254done
Christian Brabandt9670f612025-05-07 21:44:33 +020014255 ;;
14256esac
Bram Moolenaar643b6142018-09-12 20:29:09 +020014257fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014258{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_select_args" >&5
14259printf "%s\n" "$ac_cv_func_select_args" >&6; }
Bram Moolenaar643b6142018-09-12 20:29:09 +020014260ac_save_IFS=$IFS; IFS=','
14261set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'`
14262IFS=$ac_save_IFS
14263shift
14264
Illia Bobyra96d5442023-08-30 16:30:15 +020014265printf "%s\n" "#define SELECT_TYPE_ARG1 $1" >>confdefs.h
Bram Moolenaar643b6142018-09-12 20:29:09 +020014266
14267
Illia Bobyra96d5442023-08-30 16:30:15 +020014268printf "%s\n" "#define SELECT_TYPE_ARG234 ($2)" >>confdefs.h
Bram Moolenaar643b6142018-09-12 20:29:09 +020014269
14270
Illia Bobyra96d5442023-08-30 16:30:15 +020014271printf "%s\n" "#define SELECT_TYPE_ARG5 ($3)" >>confdefs.h
Bram Moolenaar643b6142018-09-12 20:29:09 +020014272
Illia Bobyra96d5442023-08-30 16:30:15 +020014273rm -rf conftest*
Bram Moolenaar643b6142018-09-12 20:29:09 +020014274
Christian Brabandt9670f612025-05-07 21:44:33 +020014275{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for declarations of fseeko and ftello" >&5
14276printf %s "checking for declarations of fseeko and ftello... " >&6; }
14277if test ${ac_cv_func_fseeko_ftello+y}
Illia Bobyra96d5442023-08-30 16:30:15 +020014278then :
14279 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020014280else case e in #(
14281 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar25153e12010-02-24 14:47:08 +010014282/* end confdefs.h. */
Bram Moolenaar25153e12010-02-24 14:47:08 +010014283
Christian Brabandt9670f612025-05-07 21:44:33 +020014284#if defined __hpux && !defined _LARGEFILE_SOURCE
14285# include <limits.h>
14286# if LONG_MAX >> 31 == 0
14287# error "32-bit HP-UX 11/ia64 needs _LARGEFILE_SOURCE for fseeko in C++"
14288# endif
14289#endif
14290#include <sys/types.h> /* for off_t */
14291#include <stdio.h>
14292
14293int
14294main (void)
14295{
14296
14297 int (*fp1) (FILE *, off_t, int) = fseeko;
14298 off_t (*fp2) (FILE *) = ftello;
14299 return fseeko (stdin, 0, 0)
14300 && fp1 (stdin, 0, 0)
14301 && ftello (stdin) >= 0
14302 && fp2 (stdin) >= 0;
14303
14304 ;
14305 return 0;
14306}
14307_ACEOF
14308if ac_fn_c_try_compile "$LINENO"
14309then :
14310 ac_cv_func_fseeko_ftello=yes
14311else case e in #(
14312 e) ac_save_CPPFLAGS="$CPPFLAGS"
14313 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE=1"
14314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14315/* end confdefs.h. */
14316
14317#if defined __hpux && !defined _LARGEFILE_SOURCE
14318# include <limits.h>
14319# if LONG_MAX >> 31 == 0
14320# error "32-bit HP-UX 11/ia64 needs _LARGEFILE_SOURCE for fseeko in C++"
14321# endif
14322#endif
14323#include <sys/types.h> /* for off_t */
14324#include <stdio.h>
14325
14326int
14327main (void)
14328{
14329
14330 int (*fp1) (FILE *, off_t, int) = fseeko;
14331 off_t (*fp2) (FILE *) = ftello;
14332 return fseeko (stdin, 0, 0)
14333 && fp1 (stdin, 0, 0)
14334 && ftello (stdin) >= 0
14335 && fp2 (stdin) >= 0;
14336
14337 ;
14338 return 0;
14339}
14340_ACEOF
14341if ac_fn_c_try_compile "$LINENO"
14342then :
14343 ac_cv_func_fseeko_ftello="need _LARGEFILE_SOURCE"
14344else case e in #(
14345 e) ac_cv_func_fseeko_ftello=no ;;
14346esac
14347fi
14348rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
14349esac
14350fi
14351rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
14352esac
14353fi
14354{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fseeko_ftello" >&5
14355printf "%s\n" "$ac_cv_func_fseeko_ftello" >&6; }
14356if test "$ac_cv_func_fseeko_ftello" != no
14357then :
Bram Moolenaar25153e12010-02-24 14:47:08 +010014358
Illia Bobyra96d5442023-08-30 16:30:15 +020014359printf "%s\n" "#define HAVE_FSEEKO 1" >>confdefs.h
Bram Moolenaar25153e12010-02-24 14:47:08 +010014360
14361fi
Christian Brabandt9670f612025-05-07 21:44:33 +020014362if test "$ac_cv_func_fseeko_ftello" = "need _LARGEFILE_SOURCE"
14363then :
14364
14365printf "%s\n" "#define _LARGEFILE_SOURCE 1" >>confdefs.h
14366
14367fi
Bram Moolenaar25153e12010-02-24 14:47:08 +010014368
Bram Moolenaar071d4272004-06-13 20:20:40 +000014369
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014370# Check whether --enable-largefile was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020014371if test ${enable_largefile+y}
14372then :
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014373 enableval=$enable_largefile;
14374fi
Christian Brabandt9670f612025-05-07 21:44:33 +020014375if test "$enable_largefile,$enable_year2038" != no,no
14376then :
14377 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable large file support" >&5
14378printf %s "checking for $CC option to enable large file support... " >&6; }
14379if test ${ac_cv_sys_largefile_opts+y}
Illia Bobyra96d5442023-08-30 16:30:15 +020014380then :
14381 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020014382else case e in #(
14383 e) ac_save_CC="$CC"
14384 ac_opt_found=no
14385 for ac_opt in "none needed" "-D_FILE_OFFSET_BITS=64" "-D_LARGE_FILES=1" "-n32"; do
14386 if test x"$ac_opt" != x"none needed"
14387then :
14388 CC="$ac_save_CC $ac_opt"
14389fi
14390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014391/* end confdefs.h. */
14392#include <sys/types.h>
Christian Brabandt9670f612025-05-07 21:44:33 +020014393#ifndef FTYPE
14394# define FTYPE off_t
14395#endif
14396 /* Check that FTYPE can represent 2**63 - 1 correctly.
14397 We can't simply define LARGE_FTYPE to be 9223372036854775807,
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014398 since some C++ compilers masquerading as C compilers
14399 incorrectly reject 9223372036854775807. */
Christian Brabandt9670f612025-05-07 21:44:33 +020014400#define LARGE_FTYPE (((FTYPE) 1 << 31 << 31) - 1 + ((FTYPE) 1 << 31 << 31))
14401 int FTYPE_is_large[(LARGE_FTYPE % 2147483629 == 721
14402 && LARGE_FTYPE % 2147483647 == 1)
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014403 ? 1 : -1];
14404int
Illia Bobyra96d5442023-08-30 16:30:15 +020014405main (void)
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014406{
14407
14408 ;
14409 return 0;
14410}
14411_ACEOF
Christian Brabandt9670f612025-05-07 21:44:33 +020014412if ac_fn_c_try_compile "$LINENO"
14413then :
14414 if test x"$ac_opt" = x"none needed"
14415then :
14416 # GNU/Linux s390x and alpha need _FILE_OFFSET_BITS=64 for wide ino_t.
14417 CC="$CC -DFTYPE=ino_t"
Illia Bobyra96d5442023-08-30 16:30:15 +020014418 if ac_fn_c_try_compile "$LINENO"
14419then :
Christian Brabandt9670f612025-05-07 21:44:33 +020014420
14421else case e in #(
14422 e) CC="$CC -D_FILE_OFFSET_BITS=64"
14423 if ac_fn_c_try_compile "$LINENO"
14424then :
14425 ac_opt='-D_FILE_OFFSET_BITS=64'
14426fi
14427rm -f core conftest.err conftest.$ac_objext conftest.beam ;;
14428esac
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014429fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014430rm -f core conftest.err conftest.$ac_objext conftest.beam
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014431fi
Christian Brabandt9670f612025-05-07 21:44:33 +020014432 ac_cv_sys_largefile_opts=$ac_opt
14433 ac_opt_found=yes
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014434fi
Christian Brabandt9670f612025-05-07 21:44:33 +020014435rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14436 test $ac_opt_found = no || break
14437 done
14438 CC="$ac_save_CC"
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014439
Christian Brabandt9670f612025-05-07 21:44:33 +020014440 test $ac_opt_found = yes || ac_cv_sys_largefile_opts="support not detected" ;;
14441esac
14442fi
14443{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_opts" >&5
14444printf "%s\n" "$ac_cv_sys_largefile_opts" >&6; }
14445
14446ac_have_largefile=yes
14447case $ac_cv_sys_largefile_opts in #(
14448 "none needed") :
14449 ;; #(
14450 "supported through gnulib") :
14451 ;; #(
14452 "support not detected") :
14453 ac_have_largefile=no ;; #(
14454 "-D_FILE_OFFSET_BITS=64") :
14455
14456printf "%s\n" "#define _FILE_OFFSET_BITS 64" >>confdefs.h
14457 ;; #(
14458 "-D_LARGE_FILES=1") :
14459
14460printf "%s\n" "#define _LARGE_FILES 1" >>confdefs.h
14461 ;; #(
14462 "-n32") :
14463 CC="$CC -n32" ;; #(
14464 *) :
14465 as_fn_error $? "internal error: bad value for \$ac_cv_sys_largefile_opts" "$LINENO" 5 ;;
14466esac
14467
14468if test "$enable_year2038" != no
14469then :
14470 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option for timestamps after 2038" >&5
14471printf %s "checking for $CC option for timestamps after 2038... " >&6; }
14472if test ${ac_cv_sys_year2038_opts+y}
Illia Bobyra96d5442023-08-30 16:30:15 +020014473then :
14474 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020014475else case e in #(
14476 e) ac_save_CPPFLAGS="$CPPFLAGS"
14477 ac_opt_found=no
14478 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
14479 if test x"$ac_opt" != x"none needed"
14480then :
14481 CPPFLAGS="$ac_save_CPPFLAGS $ac_opt"
14482fi
14483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014484/* end confdefs.h. */
Christian Brabandt9670f612025-05-07 21:44:33 +020014485
14486 #include <time.h>
14487 /* Check that time_t can represent 2**32 - 1 correctly. */
14488 #define LARGE_TIME_T \\
14489 ((time_t) (((time_t) 1 << 30) - 1 + 3 * ((time_t) 1 << 30)))
14490 int verify_time_t_range[(LARGE_TIME_T / 65537 == 65535
14491 && LARGE_TIME_T % 65537 == 0)
14492 ? 1 : -1];
14493
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014494int
Illia Bobyra96d5442023-08-30 16:30:15 +020014495main (void)
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014496{
14497
14498 ;
14499 return 0;
14500}
14501_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014502if ac_fn_c_try_compile "$LINENO"
14503then :
Christian Brabandt9670f612025-05-07 21:44:33 +020014504 ac_cv_sys_year2038_opts="$ac_opt"
14505 ac_opt_found=yes
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014506fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014507rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020014508 test $ac_opt_found = no || break
14509 done
14510 CPPFLAGS="$ac_save_CPPFLAGS"
14511 test $ac_opt_found = yes || ac_cv_sys_year2038_opts="support not detected" ;;
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014512esac
Christian Brabandt9670f612025-05-07 21:44:33 +020014513fi
14514{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_year2038_opts" >&5
14515printf "%s\n" "$ac_cv_sys_year2038_opts" >&6; }
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014516
Christian Brabandt9670f612025-05-07 21:44:33 +020014517ac_have_year2038=yes
14518case $ac_cv_sys_year2038_opts in #(
14519 "none needed") :
14520 ;; #(
14521 "support not detected") :
14522 ac_have_year2038=no ;; #(
14523 "-D_TIME_BITS=64") :
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014524
Christian Brabandt9670f612025-05-07 21:44:33 +020014525printf "%s\n" "#define _TIME_BITS 64" >>confdefs.h
14526 ;; #(
14527 "-D__MINGW_USE_VC2005_COMPAT") :
14528
14529printf "%s\n" "#define __MINGW_USE_VC2005_COMPAT 1" >>confdefs.h
14530 ;; #(
14531 "-U_USE_32_BIT_TIME_T"*) :
14532 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
14533printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
14534as_fn_error $? "the 'time_t' type is currently forced to be 32-bit. It
14535will stop working after mid-January 2038. Remove
14536_USE_32BIT_TIME_T from the compiler flags.
14537See 'config.log' for more details" "$LINENO" 5; } ;; #(
14538 *) :
14539 as_fn_error $? "internal error: bad value for \$ac_cv_sys_year2038_opts" "$LINENO" 5 ;;
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014540esac
Christian Brabandt9670f612025-05-07 21:44:33 +020014541
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014542fi
14543
Christian Brabandt9670f612025-05-07 21:44:33 +020014544fi
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014545
Illia Bobyra96d5442023-08-30 16:30:15 +020014546{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-canberra argument" >&5
14547printf %s "checking --enable-canberra argument... " >&6; }
Bram Moolenaar21606672019-06-14 20:40:58 +020014548# Check whether --enable-canberra was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020014549if test ${enable_canberra+y}
14550then :
Bram Moolenaar21606672019-06-14 20:40:58 +020014551 enableval=$enable_canberra;
Christian Brabandt9670f612025-05-07 21:44:33 +020014552else case e in #(
14553 e) enable_canberra="maybe" ;;
14554esac
Bram Moolenaar21606672019-06-14 20:40:58 +020014555fi
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014556
Bram Moolenaar21606672019-06-14 20:40:58 +020014557
14558if test "$enable_canberra" = "maybe"; then
Martin Tournoij25f3a142022-10-08 19:26:41 +010014559 if test "$features" = "huge"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014560 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to yes" >&5
14561printf "%s\n" "Defaulting to yes" >&6; }
Bram Moolenaar21606672019-06-14 20:40:58 +020014562 enable_canberra="yes"
14563 else
Illia Bobyra96d5442023-08-30 16:30:15 +020014564 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to no" >&5
14565printf "%s\n" "Defaulting to no" >&6; }
Bram Moolenaar21606672019-06-14 20:40:58 +020014566 enable_canberra="no"
14567 fi
14568else
Bram Moolenaar12471262022-01-18 11:11:25 +000014569 if test "$enable_canberra" = "yes" -a "$has_eval" = "no"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014570 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot use sound with tiny features" >&5
14571printf "%s\n" "cannot use sound with tiny features" >&6; }
Bram Moolenaar12471262022-01-18 11:11:25 +000014572 enable_canberra="no"
14573 else
Illia Bobyra96d5442023-08-30 16:30:15 +020014574 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_canberra" >&5
14575printf "%s\n" "$enable_canberra" >&6; }
Bram Moolenaar12471262022-01-18 11:11:25 +000014576 fi
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014577fi
Bram Moolenaar21606672019-06-14 20:40:58 +020014578if test "$enable_canberra" = "yes"; then
14579 if test "x$PKG_CONFIG" != "xno"; then
14580 canberra_lib=`$PKG_CONFIG --libs libcanberra 2>/dev/null`
14581 canberra_cflags=`$PKG_CONFIG --cflags libcanberra 2>/dev/null`
14582 fi
14583 if test "x$canberra_lib" = "x"; then
14584 canberra_lib=-lcanberra
14585 canberra_cflags=-D_REENTRANT
14586 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014587 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcanberra" >&5
14588printf %s "checking for libcanberra... " >&6; }
Bram Moolenaar21606672019-06-14 20:40:58 +020014589 ac_save_CFLAGS="$CFLAGS"
14590 ac_save_LIBS="$LIBS"
Bram Moolenaar12471262022-01-18 11:11:25 +000014591 if `echo "$CFLAGS" | grep -v "$canberra_cflags" 2>/dev/null`; then
Christian Brabandt6b9efdd2021-09-09 17:14:50 +020014592 CFLAGS="$CFLAGS $canberra_cflags"
14593 fi
Bram Moolenaar21606672019-06-14 20:40:58 +020014594 LIBS="$LIBS $canberra_lib"
14595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014596/* end confdefs.h. */
14597
Bram Moolenaar21606672019-06-14 20:40:58 +020014598 # include <canberra.h>
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014599
14600int
Illia Bobyra96d5442023-08-30 16:30:15 +020014601main (void)
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014602{
14603
Bram Moolenaar21606672019-06-14 20:40:58 +020014604 ca_context *hello;
14605 ca_context_create(&hello);
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014606 ;
14607 return 0;
14608}
14609_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014610if ac_fn_c_try_link "$LINENO"
14611then :
14612 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14613printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_CANBERRA 1" >>confdefs.h
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014614
Christian Brabandt9670f612025-05-07 21:44:33 +020014615else case e in #(
14616 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no; try installing libcanberra-dev" >&5
14617printf "%s\n" "no; try installing libcanberra-dev" >&6; }; CFLAGS="$ac_save_CFLAGS"; LIBS="$ac_save_LIBS" ;;
14618esac
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014619fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014620rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014621 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar21606672019-06-14 20:40:58 +020014622fi
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014623
Illia Bobyra96d5442023-08-30 16:30:15 +020014624{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-libsodium argument" >&5
14625printf %s "checking --enable-libsodium argument... " >&6; }
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014626# Check whether --enable-libsodium was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020014627if test ${enable_libsodium+y}
14628then :
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014629 enableval=$enable_libsodium;
Christian Brabandt9670f612025-05-07 21:44:33 +020014630else case e in #(
14631 e) enable_libsodium="maybe" ;;
14632esac
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014633fi
14634
14635
14636if test "$enable_libsodium" = "maybe"; then
Martin Tournoij25f3a142022-10-08 19:26:41 +010014637 if test "$features" = "huge"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014638 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to yes" >&5
14639printf "%s\n" "Defaulting to yes" >&6; }
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014640 enable_libsodium="yes"
14641 else
Illia Bobyra96d5442023-08-30 16:30:15 +020014642 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to no" >&5
14643printf "%s\n" "Defaulting to no" >&6; }
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014644 enable_libsodium="no"
14645 fi
14646else
Illia Bobyra96d5442023-08-30 16:30:15 +020014647 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_libsodium" >&5
14648printf "%s\n" "$enable_libsodium" >&6; }
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014649fi
14650if test "$enable_libsodium" = "yes"; then
14651 if test "x$PKG_CONFIG" != "xno"; then
14652 libsodium_lib=`$PKG_CONFIG --libs libsodium 2>/dev/null`
14653 libsodium_cflags=`$PKG_CONFIG --cflags libsodium 2>/dev/null`
14654 fi
14655 if test "x$libsodium_lib" = "x"; then
14656 libsodium_lib=-lsodium
14657 libsodium_cflags=
14658 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014659 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libsodium" >&5
14660printf %s "checking for libsodium... " >&6; }
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014661 ac_save_CFLAGS="$CFLAGS"
14662 ac_save_LIBS="$LIBS"
14663 CFLAGS="$CFLAGS $libsodium_cflags"
14664 LIBS="$LIBS $libsodium_lib"
14665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14666/* end confdefs.h. */
14667
14668 # include <sodium.h>
14669
14670int
Illia Bobyra96d5442023-08-30 16:30:15 +020014671main (void)
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014672{
14673
14674 printf("%d", sodium_init());
14675 ;
14676 return 0;
14677}
14678_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014679if ac_fn_c_try_link "$LINENO"
14680then :
14681 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14682printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SODIUM 1" >>confdefs.h
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014683
Christian Brabandt9670f612025-05-07 21:44:33 +020014684else case e in #(
14685 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no; try installing libsodium-dev" >&5
14686printf "%s\n" "no; try installing libsodium-dev" >&6; }; CFLAGS="$ac_save_CFLAGS"; LIBS="$ac_save_LIBS" ;;
14687esac
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014688fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014689rm -f core conftest.err conftest.$ac_objext conftest.beam \
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014690 conftest$ac_exeext conftest.$ac_ext
14691fi
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014692
Illia Bobyra96d5442023-08-30 16:30:15 +020014693{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for st_blksize" >&5
14694printf %s "checking for st_blksize... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014695cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014696/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000014697#include <sys/types.h>
14698#include <sys/stat.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014699int
Illia Bobyra96d5442023-08-30 16:30:15 +020014700main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014701{
Bram Moolenaar071d4272004-06-13 20:20:40 +000014702 struct stat st;
14703 int n;
14704
14705 stat("/", &st);
14706 n = (int)st.st_blksize;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014707 ;
14708 return 0;
14709}
14710_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014711if ac_fn_c_try_compile "$LINENO"
14712then :
14713 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14714printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_ST_BLKSIZE 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000014715
Christian Brabandt9670f612025-05-07 21:44:33 +020014716else case e in #(
14717 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14718printf "%s\n" "no" >&6; } ;;
14719esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000014720fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014721rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000014722
Illia Bobyra96d5442023-08-30 16:30:15 +020014723{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for timer_create without -lrt" >&5
14724printf %s "checking for timer_create without -lrt... " >&6; }
14725if test ${vim_cv_timer_create+y}
14726then :
14727 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020014728else case e in #(
14729 e)
Bram Moolenaarf2ce76a2022-07-02 11:40:40 +010014730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Paul Ollis65745772022-06-05 16:55:54 +010014731/* end confdefs.h. */
14732
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010014733 #include <time.h>
Paul Ollis65745772022-06-05 16:55:54 +010014734
14735int
Illia Bobyra96d5442023-08-30 16:30:15 +020014736main (void)
Paul Ollis65745772022-06-05 16:55:54 +010014737{
14738
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010014739 timer_create(CLOCK_MONOTONIC, NULL, NULL);
Paul Ollis65745772022-06-05 16:55:54 +010014740
14741 ;
14742 return 0;
14743}
14744_ACEOF
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010014745if ac_fn_c_try_compile "$LINENO"
Illia Bobyra96d5442023-08-30 16:30:15 +020014746then :
Richard Purdie509695c2022-07-24 20:48:00 +010014747 vim_cv_timer_create=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020014748else case e in #(
14749 e) vim_cv_timer_create=no
14750 ;;
14751esac
Bram Moolenaarf2ce76a2022-07-02 11:40:40 +010014752fi
Christian Brabandt9670f612025-05-07 21:44:33 +020014753rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
14754esac
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010014755fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014756{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_timer_create" >&5
14757printf "%s\n" "$vim_cv_timer_create" >&6; }
Bram Moolenaarefffa532022-07-28 22:39:54 +010014758
14759if test "x$vim_cv_timer_create" = "xno" ; then
14760 save_LIBS="$LIBS"
14761 LIBS="$LIBS -lrt"
Illia Bobyra96d5442023-08-30 16:30:15 +020014762 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for timer_create with -lrt" >&5
14763printf %s "checking for timer_create with -lrt... " >&6; }
14764if test ${vim_cv_timer_create_with_lrt+y}
14765then :
14766 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020014767else case e in #(
14768 e)
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010014769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14770/* end confdefs.h. */
14771
14772 #include <time.h>
14773
14774int
14775main (void)
14776{
14777
14778 timer_create(CLOCK_MONOTONIC, NULL, NULL);
14779
14780 ;
14781 return 0;
14782}
14783_ACEOF
14784if ac_fn_c_try_compile "$LINENO"
14785then :
14786 vim_cv_timer_create_with_lrt=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020014787else case e in #(
14788 e) vim_cv_timer_create_with_lrt=no
14789 ;;
14790esac
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010014791fi
Christian Brabandt9670f612025-05-07 21:44:33 +020014792rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
14793esac
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010014794fi
14795{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_timer_create_with_lrt" >&5
14796printf "%s\n" "$vim_cv_timer_create_with_lrt" >&6; }
14797 LIBS="$save_LIBS"
14798else
14799 vim_cv_timer_create_with_lrt=no
14800fi
14801
14802if test "x$vim_cv_timer_create" = "xyes" ||
14803 test "x$vim_cv_timer_create_with_lrt" = "xyes"; then
14804 save_LIBS="$LIBS"
Brandon Maiercbdc3c12024-12-18 21:18:01 +010014805 if test "x$vim_cv_timer_create_with_lrt" = "xyes" ; then
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010014806 LIBS="$LIBS -lrt"
14807 fi
14808
14809 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if timer_create works" >&5
14810printf %s "checking if timer_create works... " >&6; }
14811if test ${vim_cv_timer_create_works+y}
14812then :
14813 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020014814else case e in #(
14815 e)
Illia Bobyra96d5442023-08-30 16:30:15 +020014816 if test "$cross_compiling" = yes
14817then :
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010014818 vim_cv_timer_create_works=yes
14819 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cross-compiling: consider setting 'vim_cv_timer_create_works'" >&5
14820printf "%s\n" "$as_me: WARNING: cross-compiling: consider setting 'vim_cv_timer_create_works'" >&2;}
Bram Moolenaarefffa532022-07-28 22:39:54 +010014821
Christian Brabandt9670f612025-05-07 21:44:33 +020014822else case e in #(
14823 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarefffa532022-07-28 22:39:54 +010014824/* end confdefs.h. */
14825
14826 #if STDC_HEADERS
14827 # include <stdlib.h>
14828 # include <stddef.h>
14829 #endif
14830 #include <signal.h>
14831 #include <time.h>
14832 static void set_flag(union sigval sv) {}
14833
14834int
Illia Bobyra96d5442023-08-30 16:30:15 +020014835main (void)
Bram Moolenaarefffa532022-07-28 22:39:54 +010014836{
14837
14838 struct timespec ts;
14839 struct sigevent action = {0};
14840 timer_t timer_id;
14841
14842 action.sigev_notify = SIGEV_THREAD;
14843 action.sigev_notify_function = set_flag;
14844 if (timer_create(CLOCK_MONOTONIC, &action, &timer_id) < 0)
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010014845 exit(1); // cannot create a monotonic timer
Bram Moolenaarefffa532022-07-28 22:39:54 +010014846
14847 ;
14848 return 0;
14849}
14850_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014851if ac_fn_c_try_run "$LINENO"
14852then :
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010014853 vim_cv_timer_create_works=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020014854else case e in #(
14855 e) vim_cv_timer_create_works=no ;;
14856esac
Bram Moolenaarefffa532022-07-28 22:39:54 +010014857fi
Bram Moolenaarf2ce76a2022-07-02 11:40:40 +010014858rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
Christian Brabandt9670f612025-05-07 21:44:33 +020014859 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
14860esac
Bram Moolenaarf2ce76a2022-07-02 11:40:40 +010014861fi
Christian Brabandt9670f612025-05-07 21:44:33 +020014862 ;;
14863esac
Richard Purdie509695c2022-07-24 20:48:00 +010014864fi
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010014865{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_timer_create_works" >&5
14866printf "%s\n" "$vim_cv_timer_create_works" >&6; }
Richard Purdie509695c2022-07-24 20:48:00 +010014867
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010014868 if test "x$vim_cv_timer_create_works" = "xyes" ; then
14869 printf "%s\n" "#define HAVE_TIMER_CREATE 1" >>confdefs.h
Richard Purdie509695c2022-07-24 20:48:00 +010014870
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010014871 else
14872 LIBS="$save_LIBS"
14873 fi
Bram Moolenaarefffa532022-07-28 22:39:54 +010014874fi
Richard Purdie509695c2022-07-24 20:48:00 +010014875
Illia Bobyra96d5442023-08-30 16:30:15 +020014876{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat() ignores a trailing slash" >&5
14877printf %s "checking whether stat() ignores a trailing slash... " >&6; }
14878if test ${vim_cv_stat_ignores_slash+y}
14879then :
14880 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020014881else case e in #(
14882 e)
Illia Bobyra96d5442023-08-30 16:30:15 +020014883 if test "$cross_compiling" = yes
14884then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000014885
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010014886 vim_cv_stat_ignores_slash=yes
14887 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cross-compiling: consider setting 'vim_cv_stat_ignores_slash'" >&5
14888printf "%s\n" "$as_me: WARNING: cross-compiling: consider setting 'vim_cv_stat_ignores_slash'" >&2;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000014889
Christian Brabandt9670f612025-05-07 21:44:33 +020014890else case e in #(
14891 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014892/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000014893
14894#include "confdefs.h"
14895#if STDC_HEADERS
14896# include <stdlib.h>
14897# include <stddef.h>
14898#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000014899#include <sys/types.h>
14900#include <sys/stat.h>
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010014901int main() {struct stat st; exit(stat("configure/", &st) != 0); }
Bram Moolenaar446cb832008-06-24 21:56:24 +000014902
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014903_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014904if ac_fn_c_try_run "$LINENO"
14905then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000014906
14907 vim_cv_stat_ignores_slash=yes
Bram Moolenaar071d4272004-06-13 20:20:40 +000014908
Christian Brabandt9670f612025-05-07 21:44:33 +020014909else case e in #(
14910 e)
Bram Moolenaar446cb832008-06-24 21:56:24 +000014911 vim_cv_stat_ignores_slash=no
Christian Brabandt9670f612025-05-07 21:44:33 +020014912 ;;
14913esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000014914fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014915rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
Christian Brabandt9670f612025-05-07 21:44:33 +020014916 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
14917esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000014918fi
14919
Christian Brabandt9670f612025-05-07 21:44:33 +020014920 ;;
14921esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000014922fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014923{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_stat_ignores_slash" >&5
14924printf "%s\n" "$vim_cv_stat_ignores_slash" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000014925
14926if test "x$vim_cv_stat_ignores_slash" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014927 printf "%s\n" "#define STAT_IGNORES_SLASH 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000014928
14929fi
14930
Illia Bobyra96d5442023-08-30 16:30:15 +020014931{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nanoseconds field of struct stat" >&5
14932printf %s "checking for nanoseconds field of struct stat... " >&6; }
14933if test ${ac_cv_struct_st_mtim_nsec+y}
14934then :
14935 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020014936else case e in #(
14937 e) ac_save_CPPFLAGS="$CPPFLAGS"
Leah Neukirchen0a7984a2021-10-14 21:27:55 +010014938 ac_cv_struct_st_mtim_nsec=no
14939 # st_mtim.tv_nsec -- the usual case
14940 # st_mtim._tv_nsec -- Solaris 2.6, if
14941 # (defined _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED == 1
14942 # && !defined __EXTENSIONS__)
14943 # st_mtim.st__tim.tv_nsec -- UnixWare 2.1.2
14944 # st_mtime_n -- AIX 5.2 and above
14945 # st_mtimespec.tv_nsec -- Darwin (Mac OSX)
14946 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
14947 CPPFLAGS="$ac_save_CPPFLAGS -DST_MTIM_NSEC=$ac_val"
14948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14949/* end confdefs.h. */
14950#include <sys/types.h>
14951#include <sys/stat.h>
14952int
Illia Bobyra96d5442023-08-30 16:30:15 +020014953main (void)
Leah Neukirchen0a7984a2021-10-14 21:27:55 +010014954{
14955struct stat s; s.ST_MTIM_NSEC;
14956 ;
14957 return 0;
14958}
14959_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014960if ac_fn_c_try_compile "$LINENO"
14961then :
Leah Neukirchen0a7984a2021-10-14 21:27:55 +010014962 ac_cv_struct_st_mtim_nsec=$ac_val; break
14963fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014964rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Leah Neukirchen0a7984a2021-10-14 21:27:55 +010014965 done
14966 CPPFLAGS="$ac_save_CPPFLAGS"
Christian Brabandt9670f612025-05-07 21:44:33 +020014967 ;;
14968esac
Leah Neukirchen0a7984a2021-10-14 21:27:55 +010014969fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014970{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_st_mtim_nsec" >&5
14971printf "%s\n" "$ac_cv_struct_st_mtim_nsec" >&6; }
Leah Neukirchen0a7984a2021-10-14 21:27:55 +010014972if test $ac_cv_struct_st_mtim_nsec != no; then
14973
Illia Bobyra96d5442023-08-30 16:30:15 +020014974printf "%s\n" "#define ST_MTIM_NSEC $ac_cv_struct_st_mtim_nsec" >>confdefs.h
Leah Neukirchen0a7984a2021-10-14 21:27:55 +010014975
14976fi
14977
Illia Bobyra96d5442023-08-30 16:30:15 +020014978{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv_open()" >&5
14979printf %s "checking for iconv_open()... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000014980save_LIBS="$LIBS"
14981LIBS="$LIBS -liconv"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014982cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014983/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000014984
14985#ifdef HAVE_ICONV_H
14986# include <iconv.h>
14987#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014988
14989int
Illia Bobyra96d5442023-08-30 16:30:15 +020014990main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014991{
Bram Moolenaar071d4272004-06-13 20:20:40 +000014992iconv_open("fr", "to");
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014993 ;
14994 return 0;
14995}
14996_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014997if ac_fn_c_try_link "$LINENO"
14998then :
14999 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes; with -liconv" >&5
15000printf "%s\n" "yes; with -liconv" >&6; }; printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015001
Christian Brabandt9670f612025-05-07 21:44:33 +020015002else case e in #(
15003 e) LIBS="$save_LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015005/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015006
15007#ifdef HAVE_ICONV_H
15008# include <iconv.h>
15009#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015010
15011int
Illia Bobyra96d5442023-08-30 16:30:15 +020015012main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015013{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015014iconv_open("fr", "to");
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015015 ;
15016 return 0;
15017}
15018_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015019if ac_fn_c_try_link "$LINENO"
15020then :
15021 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15022printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015023
Christian Brabandt9670f612025-05-07 21:44:33 +020015024else case e in #(
15025 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15026printf "%s\n" "no" >&6; } ;;
15027esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000015028fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015029rm -f core conftest.err conftest.$ac_objext conftest.beam \
Christian Brabandt9670f612025-05-07 21:44:33 +020015030 conftest$ac_exeext conftest.$ac_ext ;;
15031esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000015032fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015033rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015034 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000015035
15036
Illia Bobyra96d5442023-08-30 16:30:15 +020015037{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo(CODESET)" >&5
15038printf %s "checking for nl_langinfo(CODESET)... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015039cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015040/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015041
15042#ifdef HAVE_LANGINFO_H
15043# include <langinfo.h>
15044#endif
15045
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015046int
Illia Bobyra96d5442023-08-30 16:30:15 +020015047main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015048{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015049char *cs = nl_langinfo(CODESET);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015050 ;
15051 return 0;
15052}
15053_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015054if ac_fn_c_try_link "$LINENO"
15055then :
15056 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15057printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_NL_LANGINFO_CODESET 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015058
Christian Brabandt9670f612025-05-07 21:44:33 +020015059else case e in #(
15060 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15061printf "%s\n" "no" >&6; } ;;
15062esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015063fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015064rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015065 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015066
Illia Bobyra96d5442023-08-30 16:30:15 +020015067{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for strtod in -lm" >&5
15068printf %s "checking for strtod in -lm... " >&6; }
15069if test ${ac_cv_lib_m_strtod+y}
15070then :
15071 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020015072else case e in #(
15073 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar446cb832008-06-24 21:56:24 +000015074LIBS="-lm $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015075cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015076/* end confdefs.h. */
15077
15078/* Override any GCC internal prototype to avoid an error.
15079 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020015080 builtin and then its argument prototype would still apply.
15081 The 'extern "C"' is for builds by C++ compilers;
15082 although this is not generally supported in C code supporting it here
15083 has little cost and some practical benefit (sr 110532). */
15084#ifdef __cplusplus
15085extern "C"
15086#endif
15087char strtod (void);
Bram Moolenaar446cb832008-06-24 21:56:24 +000015088int
Illia Bobyra96d5442023-08-30 16:30:15 +020015089main (void)
Bram Moolenaar446cb832008-06-24 21:56:24 +000015090{
15091return strtod ();
15092 ;
15093 return 0;
15094}
15095_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015096if ac_fn_c_try_link "$LINENO"
15097then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015098 ac_cv_lib_m_strtod=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020015099else case e in #(
15100 e) ac_cv_lib_m_strtod=no ;;
15101esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000015102fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015103rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015104 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020015105LIBS=$ac_check_lib_save_LIBS ;;
15106esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000015107fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015108{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_strtod" >&5
15109printf "%s\n" "$ac_cv_lib_m_strtod" >&6; }
15110if test "x$ac_cv_lib_m_strtod" = xyes
15111then :
15112 printf "%s\n" "#define HAVE_LIBM 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000015113
15114 LIBS="-lm $LIBS"
15115
15116fi
15117
Bram Moolenaar446cb832008-06-24 21:56:24 +000015118
Illia Bobyra96d5442023-08-30 16:30:15 +020015119{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for isinf()" >&5
15120printf %s "checking for isinf()... " >&6; }
Bram Moolenaara6b89762016-02-29 21:38:26 +010015121cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15122/* end confdefs.h. */
15123
15124#ifdef HAVE_MATH_H
15125# include <math.h>
15126#endif
15127#if STDC_HEADERS
15128# include <stdlib.h>
15129# include <stddef.h>
15130#endif
15131
15132int
Illia Bobyra96d5442023-08-30 16:30:15 +020015133main (void)
Bram Moolenaara6b89762016-02-29 21:38:26 +010015134{
15135int r = isinf(1.11);
15136 ;
15137 return 0;
15138}
15139_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015140if ac_fn_c_try_link "$LINENO"
15141then :
15142 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15143printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_ISINF 1" >>confdefs.h
Bram Moolenaara6b89762016-02-29 21:38:26 +010015144
Christian Brabandt9670f612025-05-07 21:44:33 +020015145else case e in #(
15146 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15147printf "%s\n" "no" >&6; } ;;
15148esac
Bram Moolenaara6b89762016-02-29 21:38:26 +010015149fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015150rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaara6b89762016-02-29 21:38:26 +010015151 conftest$ac_exeext conftest.$ac_ext
15152
Illia Bobyra96d5442023-08-30 16:30:15 +020015153{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for isnan()" >&5
15154printf %s "checking for isnan()... " >&6; }
Bram Moolenaara6b89762016-02-29 21:38:26 +010015155cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15156/* end confdefs.h. */
15157
15158#ifdef HAVE_MATH_H
15159# include <math.h>
15160#endif
15161#if STDC_HEADERS
15162# include <stdlib.h>
15163# include <stddef.h>
15164#endif
15165
15166int
Illia Bobyra96d5442023-08-30 16:30:15 +020015167main (void)
Bram Moolenaara6b89762016-02-29 21:38:26 +010015168{
15169int r = isnan(1.11);
15170 ;
15171 return 0;
15172}
15173_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015174if ac_fn_c_try_link "$LINENO"
15175then :
15176 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15177printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_ISNAN 1" >>confdefs.h
Bram Moolenaara6b89762016-02-29 21:38:26 +010015178
Christian Brabandt9670f612025-05-07 21:44:33 +020015179else case e in #(
15180 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15181printf "%s\n" "no" >&6; } ;;
15182esac
Bram Moolenaara6b89762016-02-29 21:38:26 +010015183fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015184rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaara6b89762016-02-29 21:38:26 +010015185 conftest$ac_exeext conftest.$ac_ext
15186
Illia Bobyra96d5442023-08-30 16:30:15 +020015187{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-acl argument" >&5
15188printf %s "checking --disable-acl argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000015189# Check whether --enable-acl was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020015190if test ${enable_acl+y}
15191then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015192 enableval=$enable_acl;
Christian Brabandt9670f612025-05-07 21:44:33 +020015193else case e in #(
15194 e) enable_acl="yes" ;;
15195esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000015196fi
15197
Bram Moolenaar071d4272004-06-13 20:20:40 +000015198if test "$enable_acl" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015199 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15200printf "%s\n" "no" >&6; }
15201 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for acl_get_file in -lposix1e" >&5
15202printf %s "checking for acl_get_file in -lposix1e... " >&6; }
15203if test ${ac_cv_lib_posix1e_acl_get_file+y}
15204then :
15205 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020015206else case e in #(
15207 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000015208LIBS="-lposix1e $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015209cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015210/* end confdefs.h. */
15211
Bram Moolenaar446cb832008-06-24 21:56:24 +000015212/* Override any GCC internal prototype to avoid an error.
15213 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020015214 builtin and then its argument prototype would still apply.
15215 The 'extern "C"' is for builds by C++ compilers;
15216 although this is not generally supported in C code supporting it here
15217 has little cost and some practical benefit (sr 110532). */
15218#ifdef __cplusplus
15219extern "C"
15220#endif
15221char acl_get_file (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015222int
Illia Bobyra96d5442023-08-30 16:30:15 +020015223main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015224{
Bram Moolenaar446cb832008-06-24 21:56:24 +000015225return acl_get_file ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015226 ;
15227 return 0;
15228}
15229_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015230if ac_fn_c_try_link "$LINENO"
15231then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015232 ac_cv_lib_posix1e_acl_get_file=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020015233else case e in #(
15234 e) ac_cv_lib_posix1e_acl_get_file=no ;;
15235esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000015236fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015237rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015238 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020015239LIBS=$ac_check_lib_save_LIBS ;;
15240esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015241fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015242{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix1e_acl_get_file" >&5
15243printf "%s\n" "$ac_cv_lib_posix1e_acl_get_file" >&6; }
15244if test "x$ac_cv_lib_posix1e_acl_get_file" = xyes
15245then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000015246 LIBS="$LIBS -lposix1e"
Christian Brabandt9670f612025-05-07 21:44:33 +020015247else case e in #(
15248 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for acl_get_file in -lacl" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +020015249printf %s "checking for acl_get_file in -lacl... " >&6; }
15250if test ${ac_cv_lib_acl_acl_get_file+y}
15251then :
15252 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020015253else case e in #(
15254 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000015255LIBS="-lacl $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015256cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015257/* end confdefs.h. */
15258
Bram Moolenaar446cb832008-06-24 21:56:24 +000015259/* Override any GCC internal prototype to avoid an error.
15260 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020015261 builtin and then its argument prototype would still apply.
15262 The 'extern "C"' is for builds by C++ compilers;
15263 although this is not generally supported in C code supporting it here
15264 has little cost and some practical benefit (sr 110532). */
15265#ifdef __cplusplus
15266extern "C"
15267#endif
15268char acl_get_file (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015269int
Illia Bobyra96d5442023-08-30 16:30:15 +020015270main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015271{
Bram Moolenaar446cb832008-06-24 21:56:24 +000015272return acl_get_file ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015273 ;
15274 return 0;
15275}
15276_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015277if ac_fn_c_try_link "$LINENO"
15278then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015279 ac_cv_lib_acl_acl_get_file=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020015280else case e in #(
15281 e) ac_cv_lib_acl_acl_get_file=no ;;
15282esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000015283fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015284rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015285 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020015286LIBS=$ac_check_lib_save_LIBS ;;
15287esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015288fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015289{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_acl_acl_get_file" >&5
15290printf "%s\n" "$ac_cv_lib_acl_acl_get_file" >&6; }
15291if test "x$ac_cv_lib_acl_acl_get_file" = xyes
15292then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000015293 LIBS="$LIBS -lacl"
Illia Bobyra96d5442023-08-30 16:30:15 +020015294 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgetxattr in -lattr" >&5
15295printf %s "checking for fgetxattr in -lattr... " >&6; }
15296if test ${ac_cv_lib_attr_fgetxattr+y}
15297then :
15298 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020015299else case e in #(
15300 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000015301LIBS="-lattr $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015302cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015303/* end confdefs.h. */
15304
Bram Moolenaar446cb832008-06-24 21:56:24 +000015305/* Override any GCC internal prototype to avoid an error.
15306 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020015307 builtin and then its argument prototype would still apply.
15308 The 'extern "C"' is for builds by C++ compilers;
15309 although this is not generally supported in C code supporting it here
15310 has little cost and some practical benefit (sr 110532). */
15311#ifdef __cplusplus
15312extern "C"
15313#endif
15314char fgetxattr (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015315int
Illia Bobyra96d5442023-08-30 16:30:15 +020015316main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015317{
Bram Moolenaar446cb832008-06-24 21:56:24 +000015318return fgetxattr ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015319 ;
15320 return 0;
15321}
15322_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015323if ac_fn_c_try_link "$LINENO"
15324then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015325 ac_cv_lib_attr_fgetxattr=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020015326else case e in #(
15327 e) ac_cv_lib_attr_fgetxattr=no ;;
15328esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000015329fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015330rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015331 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020015332LIBS=$ac_check_lib_save_LIBS ;;
15333esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015334fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015335{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_attr_fgetxattr" >&5
15336printf "%s\n" "$ac_cv_lib_attr_fgetxattr" >&6; }
15337if test "x$ac_cv_lib_attr_fgetxattr" = xyes
15338then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000015339 LIBS="$LIBS -lattr"
Bram Moolenaar071d4272004-06-13 20:20:40 +000015340fi
15341
Bram Moolenaar071d4272004-06-13 20:20:40 +000015342fi
Christian Brabandt9670f612025-05-07 21:44:33 +020015343 ;;
15344esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000015345fi
15346
15347
Illia Bobyra96d5442023-08-30 16:30:15 +020015348 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for POSIX ACL support" >&5
15349printf %s "checking for POSIX ACL support... " >&6; }
Bram Moolenaard6d30422018-01-28 22:48:55 +010015350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015351/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015352
15353#include <sys/types.h>
15354#ifdef HAVE_SYS_ACL_H
15355# include <sys/acl.h>
15356#endif
15357acl_t acl;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015358int
Illia Bobyra96d5442023-08-30 16:30:15 +020015359main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015360{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015361acl = acl_get_file("foo", ACL_TYPE_ACCESS);
15362 acl_set_file("foo", ACL_TYPE_ACCESS, acl);
15363 acl_free(acl);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015364 ;
15365 return 0;
15366}
15367_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015368if ac_fn_c_try_link "$LINENO"
15369then :
15370 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15371printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_POSIX_ACL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015372
Christian Brabandt9670f612025-05-07 21:44:33 +020015373else case e in #(
15374 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15375printf "%s\n" "no" >&6; } ;;
15376esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015377fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015378rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015379 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015380
Illia Bobyra96d5442023-08-30 16:30:15 +020015381 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for acl_get in -lsec" >&5
15382printf %s "checking for acl_get in -lsec... " >&6; }
15383if test ${ac_cv_lib_sec_acl_get+y}
15384then :
15385 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020015386else case e in #(
15387 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar8d462f92012-02-05 22:51:33 +010015388LIBS="-lsec $LIBS"
15389cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15390/* end confdefs.h. */
15391
15392/* Override any GCC internal prototype to avoid an error.
15393 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020015394 builtin and then its argument prototype would still apply.
15395 The 'extern "C"' is for builds by C++ compilers;
15396 although this is not generally supported in C code supporting it here
15397 has little cost and some practical benefit (sr 110532). */
15398#ifdef __cplusplus
15399extern "C"
15400#endif
15401char acl_get (void);
Bram Moolenaar8d462f92012-02-05 22:51:33 +010015402int
Illia Bobyra96d5442023-08-30 16:30:15 +020015403main (void)
Bram Moolenaar8d462f92012-02-05 22:51:33 +010015404{
15405return acl_get ();
15406 ;
15407 return 0;
15408}
15409_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015410if ac_fn_c_try_link "$LINENO"
15411then :
Bram Moolenaar8d462f92012-02-05 22:51:33 +010015412 ac_cv_lib_sec_acl_get=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020015413else case e in #(
15414 e) ac_cv_lib_sec_acl_get=no ;;
15415esac
Bram Moolenaar8d462f92012-02-05 22:51:33 +010015416fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015417rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar8d462f92012-02-05 22:51:33 +010015418 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020015419LIBS=$ac_check_lib_save_LIBS ;;
15420esac
Bram Moolenaar8d462f92012-02-05 22:51:33 +010015421fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015422{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sec_acl_get" >&5
15423printf "%s\n" "$ac_cv_lib_sec_acl_get" >&6; }
15424if test "x$ac_cv_lib_sec_acl_get" = xyes
15425then :
15426 LIBS="$LIBS -lsec"; printf "%s\n" "#define HAVE_SOLARIS_ZFS_ACL 1" >>confdefs.h
Bram Moolenaar8d462f92012-02-05 22:51:33 +010015427
Christian Brabandt9670f612025-05-07 21:44:33 +020015428else case e in #(
15429 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Solaris ACL support" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +020015430printf %s "checking for Solaris ACL support... " >&6; }
Bram Moolenaard6d30422018-01-28 22:48:55 +010015431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015432/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015433
15434#ifdef HAVE_SYS_ACL_H
15435# include <sys/acl.h>
15436#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015437int
Illia Bobyra96d5442023-08-30 16:30:15 +020015438main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015439{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015440acl("foo", GETACLCNT, 0, NULL);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015441
15442 ;
15443 return 0;
15444}
15445_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015446if ac_fn_c_try_link "$LINENO"
15447then :
15448 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15449printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SOLARIS_ACL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015450
Christian Brabandt9670f612025-05-07 21:44:33 +020015451else case e in #(
15452 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15453printf "%s\n" "no" >&6; } ;;
15454esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015455fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015456rm -f core conftest.err conftest.$ac_objext conftest.beam \
Christian Brabandt9670f612025-05-07 21:44:33 +020015457 conftest$ac_exeext conftest.$ac_ext ;;
15458esac
Bram Moolenaar8d462f92012-02-05 22:51:33 +010015459fi
15460
Bram Moolenaar446cb832008-06-24 21:56:24 +000015461
Illia Bobyra96d5442023-08-30 16:30:15 +020015462 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for AIX ACL support" >&5
15463printf %s "checking for AIX ACL support... " >&6; }
Bram Moolenaard6d30422018-01-28 22:48:55 +010015464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015465/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015466
Bram Moolenaar446cb832008-06-24 21:56:24 +000015467#if STDC_HEADERS
15468# include <stdlib.h>
15469# include <stddef.h>
15470#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000015471#ifdef HAVE_SYS_ACL_H
15472# include <sys/acl.h>
15473#endif
15474#ifdef HAVE_SYS_ACCESS_H
15475# include <sys/access.h>
15476#endif
15477#define _ALL_SOURCE
15478
15479#include <sys/stat.h>
15480
15481int aclsize;
15482struct acl *aclent;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015483int
Illia Bobyra96d5442023-08-30 16:30:15 +020015484main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015485{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015486aclsize = sizeof(struct acl);
15487 aclent = (void *)malloc(aclsize);
15488 statacl("foo", STX_NORMAL, aclent, aclsize);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015489
15490 ;
15491 return 0;
15492}
15493_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015494if ac_fn_c_try_link "$LINENO"
15495then :
15496 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15497printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_AIX_ACL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015498
Christian Brabandt9670f612025-05-07 21:44:33 +020015499else case e in #(
15500 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15501printf "%s\n" "no" >&6; } ;;
15502esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000015503fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015504rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015505 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000015506else
Illia Bobyra96d5442023-08-30 16:30:15 +020015507 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15508printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015509fi
15510
Bram Moolenaar3cbe0c02015-09-08 20:00:22 +020015511if test "x$GTK_CFLAGS" != "x"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015512 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pango_shape_full" >&5
15513printf %s "checking for pango_shape_full... " >&6; }
Bram Moolenaar3cbe0c02015-09-08 20:00:22 +020015514 ac_save_CFLAGS="$CFLAGS"
15515 ac_save_LIBS="$LIBS"
15516 CFLAGS="$CFLAGS $GTK_CFLAGS"
15517 LIBS="$LIBS $GTK_LIBS"
15518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15519/* end confdefs.h. */
15520#include <gtk/gtk.h>
15521int
Illia Bobyra96d5442023-08-30 16:30:15 +020015522main (void)
Bram Moolenaar3cbe0c02015-09-08 20:00:22 +020015523{
15524 pango_shape_full(NULL, 0, NULL, 0, NULL, NULL);
15525 ;
15526 return 0;
15527}
15528_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015529if ac_fn_c_try_link "$LINENO"
15530then :
15531 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15532printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_PANGO_SHAPE_FULL 1" >>confdefs.h
Bram Moolenaar3cbe0c02015-09-08 20:00:22 +020015533
Christian Brabandt9670f612025-05-07 21:44:33 +020015534else case e in #(
15535 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15536printf "%s\n" "no" >&6; } ;;
15537esac
Bram Moolenaar3cbe0c02015-09-08 20:00:22 +020015538fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015539rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar5325b9b2015-09-09 20:27:02 +020015540 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar3cbe0c02015-09-08 20:00:22 +020015541 CFLAGS="$ac_save_CFLAGS"
15542 LIBS="$ac_save_LIBS"
15543fi
15544
Illia Bobyra96d5442023-08-30 16:30:15 +020015545{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-gpm argument" >&5
15546printf %s "checking --enable-gpm argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000015547# Check whether --enable-gpm was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020015548if test ${enable_gpm+y}
15549then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015550 enableval=$enable_gpm;
Christian Brabandt9670f612025-05-07 21:44:33 +020015551else case e in #(
15552 e) enable_gpm="yes" ;;
15553esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000015554fi
15555
Bram Moolenaar071d4272004-06-13 20:20:40 +000015556
Bram Moolenaar0b40d082022-03-08 13:32:37 +000015557if test "$enable_gpm" = "yes" -o "$enable_gpm" = "dynamic"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015558 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_gpm" >&5
15559printf "%s\n" "$enable_gpm" >&6; }
15560 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gpm" >&5
15561printf %s "checking for gpm... " >&6; }
15562if test ${vi_cv_have_gpm+y}
15563then :
15564 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020015565else case e in #(
15566 e) olibs="$LIBS" ; LIBS="-lgpm"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015567 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015568/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015569#include <gpm.h>
15570 #include <linux/keyboard.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015571int
Illia Bobyra96d5442023-08-30 16:30:15 +020015572main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015573{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015574Gpm_GetLibVersion(NULL);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015575 ;
15576 return 0;
15577}
15578_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015579if ac_fn_c_try_link "$LINENO"
15580then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000015581 vi_cv_have_gpm=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020015582else case e in #(
15583 e) vi_cv_have_gpm=no ;;
15584esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015585fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015586rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015587 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015588 LIBS="$olibs"
Christian Brabandt9670f612025-05-07 21:44:33 +020015589 ;;
15590esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015591fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015592{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_have_gpm" >&5
15593printf "%s\n" "$vi_cv_have_gpm" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015594 if test $vi_cv_have_gpm = yes; then
Bram Moolenaar0b40d082022-03-08 13:32:37 +000015595 if test "$enable_gpm" = "yes"; then
15596 LIBS="$LIBS -lgpm"
15597 else
Illia Bobyra96d5442023-08-30 16:30:15 +020015598 printf "%s\n" "#define DYNAMIC_GPM 1" >>confdefs.h
Bram Moolenaar0b40d082022-03-08 13:32:37 +000015599
15600 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015601 printf "%s\n" "#define HAVE_GPM 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015602
15603 fi
15604else
Illia Bobyra96d5442023-08-30 16:30:15 +020015605 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15606printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015607fi
15608
Illia Bobyra96d5442023-08-30 16:30:15 +020015609{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-sysmouse argument" >&5
15610printf %s "checking --disable-sysmouse argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000015611# Check whether --enable-sysmouse was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020015612if test ${enable_sysmouse+y}
15613then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015614 enableval=$enable_sysmouse;
Christian Brabandt9670f612025-05-07 21:44:33 +020015615else case e in #(
15616 e) enable_sysmouse="yes" ;;
15617esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000015618fi
15619
15620
15621if test "$enable_sysmouse" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015622 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15623printf "%s\n" "no" >&6; }
15624 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysmouse" >&5
15625printf %s "checking for sysmouse... " >&6; }
15626if test ${vi_cv_have_sysmouse+y}
15627then :
15628 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020015629else case e in #(
15630 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015631/* end confdefs.h. */
15632#include <sys/consio.h>
15633 #include <signal.h>
15634 #include <sys/fbio.h>
15635int
Illia Bobyra96d5442023-08-30 16:30:15 +020015636main (void)
Bram Moolenaar446cb832008-06-24 21:56:24 +000015637{
15638struct mouse_info mouse;
15639 mouse.operation = MOUSE_MODE;
15640 mouse.operation = MOUSE_SHOW;
15641 mouse.u.mode.mode = 0;
15642 mouse.u.mode.signal = SIGUSR2;
15643 ;
15644 return 0;
15645}
15646_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015647if ac_fn_c_try_link "$LINENO"
15648then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015649 vi_cv_have_sysmouse=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020015650else case e in #(
15651 e) vi_cv_have_sysmouse=no ;;
15652esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000015653fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015654rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015655 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020015656 ;;
15657esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000015658fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015659{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_have_sysmouse" >&5
15660printf "%s\n" "$vi_cv_have_sysmouse" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000015661 if test $vi_cv_have_sysmouse = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015662 printf "%s\n" "#define HAVE_SYSMOUSE 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000015663
15664 fi
15665else
Illia Bobyra96d5442023-08-30 16:30:15 +020015666 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15667printf "%s\n" "yes" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000015668fi
15669
Illia Bobyra96d5442023-08-30 16:30:15 +020015670{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FD_CLOEXEC" >&5
15671printf %s "checking for FD_CLOEXEC... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015672cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarf05da212009-11-17 16:13:15 +000015673/* end confdefs.h. */
15674#if HAVE_FCNTL_H
15675# include <fcntl.h>
15676#endif
15677int
Illia Bobyra96d5442023-08-30 16:30:15 +020015678main (void)
Bram Moolenaarf05da212009-11-17 16:13:15 +000015679{
15680 int flag = FD_CLOEXEC;
15681 ;
15682 return 0;
15683}
15684_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015685if ac_fn_c_try_compile "$LINENO"
15686then :
15687 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15688printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_FD_CLOEXEC 1" >>confdefs.h
Bram Moolenaarf05da212009-11-17 16:13:15 +000015689
Christian Brabandt9670f612025-05-07 21:44:33 +020015690else case e in #(
15691 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15692printf "%s\n" "not usable" >&6; } ;;
15693esac
Bram Moolenaarf05da212009-11-17 16:13:15 +000015694fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015695rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaarf05da212009-11-17 16:13:15 +000015696
Illia Bobyra96d5442023-08-30 16:30:15 +020015697{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for rename" >&5
15698printf %s "checking for rename... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015699cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015700/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015701#include <stdio.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015702int
Illia Bobyra96d5442023-08-30 16:30:15 +020015703main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015704{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015705rename("this", "that")
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015706 ;
15707 return 0;
15708}
15709_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015710if ac_fn_c_try_link "$LINENO"
15711then :
15712 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15713printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_RENAME 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015714
Christian Brabandt9670f612025-05-07 21:44:33 +020015715else case e in #(
15716 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15717printf "%s\n" "no" >&6; } ;;
15718esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015719fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015720rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015721 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015722
Illia Bobyra96d5442023-08-30 16:30:15 +020015723{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dirfd" >&5
15724printf %s "checking for dirfd... " >&6; }
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015725cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15726/* end confdefs.h. */
15727#include <sys/types.h>
15728#include <dirent.h>
15729int
Illia Bobyra96d5442023-08-30 16:30:15 +020015730main (void)
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015731{
15732DIR * dir=opendir("dirname"); dirfd(dir);
15733 ;
15734 return 0;
15735}
15736_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015737if ac_fn_c_try_link "$LINENO"
15738then :
15739 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15740printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_DIRFD 1" >>confdefs.h
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015741
Christian Brabandt9670f612025-05-07 21:44:33 +020015742else case e in #(
15743 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15744printf "%s\n" "not usable" >&6; } ;;
15745esac
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015746fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015747rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar9d8bfae2020-09-02 21:21:35 +020015748 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015749
Illia Bobyra96d5442023-08-30 16:30:15 +020015750{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for flock" >&5
15751printf %s "checking for flock... " >&6; }
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015752cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15753/* end confdefs.h. */
15754#include <sys/file.h>
15755int
Illia Bobyra96d5442023-08-30 16:30:15 +020015756main (void)
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015757{
15758flock(10, LOCK_SH);
15759 ;
15760 return 0;
15761}
15762_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015763if ac_fn_c_try_link "$LINENO"
15764then :
15765 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15766printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_FLOCK 1" >>confdefs.h
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015767
Christian Brabandt9670f612025-05-07 21:44:33 +020015768else case e in #(
15769 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15770printf "%s\n" "not usable" >&6; } ;;
15771esac
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015772fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015773rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar9d8bfae2020-09-02 21:21:35 +020015774 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015775
Illia Bobyra96d5442023-08-30 16:30:15 +020015776{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysctl" >&5
15777printf %s "checking for sysctl... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015778cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015779/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015780#include <sys/types.h>
15781#include <sys/sysctl.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015782int
Illia Bobyra96d5442023-08-30 16:30:15 +020015783main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015784{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015785 int mib[2], r;
15786 size_t len;
15787
15788 mib[0] = CTL_HW;
15789 mib[1] = HW_USERMEM;
15790 len = sizeof(r);
15791 (void)sysctl(mib, 2, &r, &len, (void *)0, (size_t)0);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015792
15793 ;
15794 return 0;
15795}
15796_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015797if ac_fn_c_try_compile "$LINENO"
15798then :
15799 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15800printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SYSCTL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015801
Christian Brabandt9670f612025-05-07 21:44:33 +020015802else case e in #(
15803 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15804printf "%s\n" "not usable" >&6; } ;;
15805esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015806fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015807rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015808
Illia Bobyra96d5442023-08-30 16:30:15 +020015809{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysinfo" >&5
15810printf %s "checking for sysinfo... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015811cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015812/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015813#include <sys/types.h>
15814#include <sys/sysinfo.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015815int
Illia Bobyra96d5442023-08-30 16:30:15 +020015816main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015817{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015818 struct sysinfo sinfo;
15819 int t;
15820
15821 (void)sysinfo(&sinfo);
15822 t = sinfo.totalram;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015823
15824 ;
15825 return 0;
15826}
15827_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015828if ac_fn_c_try_link "$LINENO"
15829then :
15830 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15831printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SYSINFO 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015832
Christian Brabandt9670f612025-05-07 21:44:33 +020015833else case e in #(
15834 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15835printf "%s\n" "not usable" >&6; } ;;
15836esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015837fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015838rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaare2982d62021-10-06 11:27:21 +010015839 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015840
Illia Bobyra96d5442023-08-30 16:30:15 +020015841{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysinfo.mem_unit" >&5
15842printf %s "checking for sysinfo.mem_unit... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015843cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar914572a2007-05-01 11:37:47 +000015844/* end confdefs.h. */
15845#include <sys/types.h>
15846#include <sys/sysinfo.h>
15847int
Illia Bobyra96d5442023-08-30 16:30:15 +020015848main (void)
Bram Moolenaar914572a2007-05-01 11:37:47 +000015849{
15850 struct sysinfo sinfo;
Bram Moolenaar3c7ad012013-06-11 19:53:45 +020015851 sinfo.mem_unit = 1;
Bram Moolenaar914572a2007-05-01 11:37:47 +000015852
15853 ;
15854 return 0;
15855}
15856_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015857if ac_fn_c_try_compile "$LINENO"
15858then :
15859 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15860printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SYSINFO_MEM_UNIT 1" >>confdefs.h
Bram Moolenaar914572a2007-05-01 11:37:47 +000015861
Christian Brabandt9670f612025-05-07 21:44:33 +020015862else case e in #(
15863 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15864printf "%s\n" "no" >&6; } ;;
15865esac
Bram Moolenaar914572a2007-05-01 11:37:47 +000015866fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015867rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015868
Illia Bobyra96d5442023-08-30 16:30:15 +020015869{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysinfo.uptime" >&5
15870printf %s "checking for sysinfo.uptime... " >&6; }
Bram Moolenaarf52f0602021-03-10 21:26:37 +010015871cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15872/* end confdefs.h. */
15873#include <sys/types.h>
15874#include <sys/sysinfo.h>
15875int
Illia Bobyra96d5442023-08-30 16:30:15 +020015876main (void)
Bram Moolenaarf52f0602021-03-10 21:26:37 +010015877{
15878 struct sysinfo sinfo;
15879 long ut;
15880
15881 (void)sysinfo(&sinfo);
15882 ut = sinfo.uptime;
15883
15884 ;
15885 return 0;
15886}
15887_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015888if ac_fn_c_try_compile "$LINENO"
15889then :
15890 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15891printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SYSINFO_UPTIME 1" >>confdefs.h
Bram Moolenaarf52f0602021-03-10 21:26:37 +010015892
Christian Brabandt9670f612025-05-07 21:44:33 +020015893else case e in #(
15894 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15895printf "%s\n" "no" >&6; } ;;
15896esac
Bram Moolenaarf52f0602021-03-10 21:26:37 +010015897fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015898rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaarf52f0602021-03-10 21:26:37 +010015899
Illia Bobyra96d5442023-08-30 16:30:15 +020015900{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysconf" >&5
15901printf %s "checking for sysconf... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015902cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015903/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015904#include <unistd.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015905int
Illia Bobyra96d5442023-08-30 16:30:15 +020015906main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015907{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015908 (void)sysconf(_SC_PAGESIZE);
15909 (void)sysconf(_SC_PHYS_PAGES);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015910
15911 ;
15912 return 0;
15913}
15914_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015915if ac_fn_c_try_compile "$LINENO"
15916then :
15917 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15918printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SYSCONF 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015919
Christian Brabandt9670f612025-05-07 21:44:33 +020015920else case e in #(
15921 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15922printf "%s\n" "not usable" >&6; } ;;
15923esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000015924fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015925rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000015926
Illia Bobyra96d5442023-08-30 16:30:15 +020015927{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _SC_SIGSTKSZ via sysconf()" >&5
15928printf %s "checking for _SC_SIGSTKSZ via sysconf()... " >&6; }
Bram Moolenaar0e62a672021-02-25 17:17:56 +010015929cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15930/* end confdefs.h. */
15931#include <unistd.h>
15932int
Illia Bobyra96d5442023-08-30 16:30:15 +020015933main (void)
Bram Moolenaar0e62a672021-02-25 17:17:56 +010015934{
15935 (void)sysconf(_SC_SIGSTKSZ);
15936
15937 ;
15938 return 0;
15939}
15940_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015941if ac_fn_c_try_compile "$LINENO"
15942then :
15943 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15944printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SYSCONF_SIGSTKSZ 1" >>confdefs.h
Bram Moolenaar0e62a672021-02-25 17:17:56 +010015945
Christian Brabandt9670f612025-05-07 21:44:33 +020015946else case e in #(
15947 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15948printf "%s\n" "not usable" >&6; } ;;
15949esac
Bram Moolenaar0e62a672021-02-25 17:17:56 +010015950fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015951rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0e62a672021-02-25 17:17:56 +010015952
Bram Moolenaar914703b2010-05-31 21:59:46 +020015953# The cast to long int works around a bug in the HP C Compiler
15954# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
Christian Brabandt9670f612025-05-07 21:44:33 +020015955# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'.
Bram Moolenaar914703b2010-05-31 21:59:46 +020015956# This bug is HP SR number 8606223364.
Illia Bobyra96d5442023-08-30 16:30:15 +020015957{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
15958printf %s "checking size of int... " >&6; }
15959if test ${ac_cv_sizeof_int+y}
15960then :
15961 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020015962else case e in #(
15963 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 +020015964then :
Bram Moolenaar914703b2010-05-31 21:59:46 +020015965
Christian Brabandt9670f612025-05-07 21:44:33 +020015966else case e in #(
15967 e) if test "$ac_cv_type_int" = yes; then
15968 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
15969printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +010015970as_fn_error 77 "cannot compute sizeof (int)
Christian Brabandt9670f612025-05-07 21:44:33 +020015971See 'config.log' for more details" "$LINENO" 5; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020015972 else
15973 ac_cv_sizeof_int=0
Christian Brabandt9670f612025-05-07 21:44:33 +020015974 fi ;;
15975esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000015976fi
Christian Brabandt9670f612025-05-07 21:44:33 +020015977 ;;
15978esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000015979fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015980{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
15981printf "%s\n" "$ac_cv_sizeof_int" >&6; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020015982
15983
15984
Illia Bobyra96d5442023-08-30 16:30:15 +020015985printf "%s\n" "#define SIZEOF_INT $ac_cv_sizeof_int" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015986
15987
Bram Moolenaar914703b2010-05-31 21:59:46 +020015988# The cast to long int works around a bug in the HP C Compiler
15989# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
Christian Brabandt9670f612025-05-07 21:44:33 +020015990# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'.
Bram Moolenaar914703b2010-05-31 21:59:46 +020015991# This bug is HP SR number 8606223364.
Illia Bobyra96d5442023-08-30 16:30:15 +020015992{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
15993printf %s "checking size of long... " >&6; }
15994if test ${ac_cv_sizeof_long+y}
15995then :
15996 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020015997else case e in #(
15998 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 +020015999then :
Bram Moolenaar914703b2010-05-31 21:59:46 +020016000
Christian Brabandt9670f612025-05-07 21:44:33 +020016001else case e in #(
16002 e) if test "$ac_cv_type_long" = yes; then
16003 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
16004printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +010016005as_fn_error 77 "cannot compute sizeof (long)
Christian Brabandt9670f612025-05-07 21:44:33 +020016006See 'config.log' for more details" "$LINENO" 5; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020016007 else
16008 ac_cv_sizeof_long=0
Christian Brabandt9670f612025-05-07 21:44:33 +020016009 fi ;;
16010esac
Bram Moolenaar914703b2010-05-31 21:59:46 +020016011fi
Christian Brabandt9670f612025-05-07 21:44:33 +020016012 ;;
16013esac
Bram Moolenaar914703b2010-05-31 21:59:46 +020016014fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016015{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
16016printf "%s\n" "$ac_cv_sizeof_long" >&6; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020016017
16018
16019
Illia Bobyra96d5442023-08-30 16:30:15 +020016020printf "%s\n" "#define SIZEOF_LONG $ac_cv_sizeof_long" >>confdefs.h
Bram Moolenaar914703b2010-05-31 21:59:46 +020016021
16022
16023# The cast to long int works around a bug in the HP C Compiler
16024# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
Christian Brabandt9670f612025-05-07 21:44:33 +020016025# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'.
Bram Moolenaar914703b2010-05-31 21:59:46 +020016026# This bug is HP SR number 8606223364.
Illia Bobyra96d5442023-08-30 16:30:15 +020016027{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
16028printf %s "checking size of time_t... " >&6; }
16029if test ${ac_cv_sizeof_time_t+y}
16030then :
16031 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020016032else case e in #(
16033 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 +020016034then :
Bram Moolenaar914703b2010-05-31 21:59:46 +020016035
Christian Brabandt9670f612025-05-07 21:44:33 +020016036else case e in #(
16037 e) if test "$ac_cv_type_time_t" = yes; then
16038 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
16039printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +010016040as_fn_error 77 "cannot compute sizeof (time_t)
Christian Brabandt9670f612025-05-07 21:44:33 +020016041See 'config.log' for more details" "$LINENO" 5; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020016042 else
16043 ac_cv_sizeof_time_t=0
Christian Brabandt9670f612025-05-07 21:44:33 +020016044 fi ;;
16045esac
Bram Moolenaar644fdff2010-05-30 13:26:21 +020016046fi
Christian Brabandt9670f612025-05-07 21:44:33 +020016047 ;;
16048esac
Bram Moolenaar644fdff2010-05-30 13:26:21 +020016049fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016050{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
16051printf "%s\n" "$ac_cv_sizeof_time_t" >&6; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020016052
16053
16054
Illia Bobyra96d5442023-08-30 16:30:15 +020016055printf "%s\n" "#define SIZEOF_TIME_T $ac_cv_sizeof_time_t" >>confdefs.h
Bram Moolenaar644fdff2010-05-30 13:26:21 +020016056
16057
Bram Moolenaar914703b2010-05-31 21:59:46 +020016058# The cast to long int works around a bug in the HP C Compiler
16059# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
Christian Brabandt9670f612025-05-07 21:44:33 +020016060# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'.
Bram Moolenaar914703b2010-05-31 21:59:46 +020016061# This bug is HP SR number 8606223364.
Illia Bobyra96d5442023-08-30 16:30:15 +020016062{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
16063printf %s "checking size of off_t... " >&6; }
16064if test ${ac_cv_sizeof_off_t+y}
16065then :
16066 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020016067else case e in #(
16068 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 +020016069then :
Bram Moolenaar914703b2010-05-31 21:59:46 +020016070
Christian Brabandt9670f612025-05-07 21:44:33 +020016071else case e in #(
16072 e) if test "$ac_cv_type_off_t" = yes; then
16073 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
16074printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +010016075as_fn_error 77 "cannot compute sizeof (off_t)
Christian Brabandt9670f612025-05-07 21:44:33 +020016076See 'config.log' for more details" "$LINENO" 5; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020016077 else
16078 ac_cv_sizeof_off_t=0
Christian Brabandt9670f612025-05-07 21:44:33 +020016079 fi ;;
16080esac
Bram Moolenaar914703b2010-05-31 21:59:46 +020016081fi
Christian Brabandt9670f612025-05-07 21:44:33 +020016082 ;;
16083esac
Bram Moolenaar914703b2010-05-31 21:59:46 +020016084fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016085{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
16086printf "%s\n" "$ac_cv_sizeof_off_t" >&6; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020016087
16088
16089
Illia Bobyra96d5442023-08-30 16:30:15 +020016090printf "%s\n" "#define SIZEOF_OFF_T $ac_cv_sizeof_off_t" >>confdefs.h
Bram Moolenaar914703b2010-05-31 21:59:46 +020016091
16092
16093
Illia Bobyra96d5442023-08-30 16:30:15 +020016094printf "%s\n" "#define VIM_SIZEOF_INT $ac_cv_sizeof_int" >>confdefs.h
Bram Moolenaara2aa31a2014-02-23 22:52:40 +010016095
Illia Bobyra96d5442023-08-30 16:30:15 +020016096printf "%s\n" "#define VIM_SIZEOF_LONG $ac_cv_sizeof_long" >>confdefs.h
Bram Moolenaara2aa31a2014-02-23 22:52:40 +010016097
16098
Illia Bobyra96d5442023-08-30 16:30:15 +020016099{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking uint32_t is 32 bits" >&5
16100printf %s "checking uint32_t is 32 bits... " >&6; }
16101if test "$cross_compiling" = yes
16102then :
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010016103 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: assuming uint32_t is correct when cross-compiling" >&5
16104printf "%s\n" "$as_me: WARNING: assuming uint32_t is correct when cross-compiling" >&2;}
Christian Brabandt9670f612025-05-07 21:44:33 +020016105else case e in #(
16106 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarfa7584c2010-05-19 21:57:45 +020016107/* end confdefs.h. */
16108
16109#ifdef HAVE_STDINT_H
16110# include <stdint.h>
16111#endif
16112#ifdef HAVE_INTTYPES_H
16113# include <inttypes.h>
16114#endif
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010016115int main() {
Bram Moolenaarfa7584c2010-05-19 21:57:45 +020016116 uint32_t nr1 = (uint32_t)-1;
16117 uint32_t nr2 = (uint32_t)0xffffffffUL;
Bram Moolenaar52897832020-07-02 22:50:37 +020016118 if (sizeof(uint32_t) != 4 || nr1 != 0xffffffffUL || nr2 + 1 != 0) return 1;
16119 return 0;
Bram Moolenaarfa7584c2010-05-19 21:57:45 +020016120}
16121_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016122if ac_fn_c_try_run "$LINENO"
16123then :
16124 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16125printf "%s\n" "ok" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +020016126else case e in #(
16127 e) as_fn_error $? "WRONG! uint32_t not defined correctly." "$LINENO" 5 ;;
16128esac
Bram Moolenaarfa7584c2010-05-19 21:57:45 +020016129fi
16130rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
Christian Brabandt9670f612025-05-07 21:44:33 +020016131 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
16132esac
Bram Moolenaarfa7584c2010-05-19 21:57:45 +020016133fi
16134
16135
Bram Moolenaar446cb832008-06-24 21:56:24 +000016136
Bram Moolenaar071d4272004-06-13 20:20:40 +000016137bcopy_test_prog='
Bram Moolenaar446cb832008-06-24 21:56:24 +000016138#include "confdefs.h"
16139#ifdef HAVE_STRING_H
16140# include <string.h>
16141#endif
16142#if STDC_HEADERS
16143# include <stdlib.h>
16144# include <stddef.h>
16145#endif
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010016146int main() {
Bram Moolenaar071d4272004-06-13 20:20:40 +000016147 char buf[10];
16148 strcpy(buf, "abcdefghi");
16149 mch_memmove(buf, buf + 2, 3);
16150 if (strncmp(buf, "ababcf", 6))
16151 exit(1);
16152 strcpy(buf, "abcdefghi");
16153 mch_memmove(buf + 2, buf, 3);
16154 if (strncmp(buf, "cdedef", 6))
16155 exit(1);
16156 exit(0); /* libc version works properly. */
16157}'
16158
Illia Bobyra96d5442023-08-30 16:30:15 +020016159{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether memmove handles overlaps" >&5
16160printf %s "checking whether memmove handles overlaps... " >&6; }
16161if test ${vim_cv_memmove_handles_overlap+y}
16162then :
16163 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020016164else case e in #(
16165 e)
Illia Bobyra96d5442023-08-30 16:30:15 +020016166 if test "$cross_compiling" = yes
16167then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000016168
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010016169 vim_cv_memmove_handles_overlap=yes
16170 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cross-compiling: consider setting 'vim_cv_memmove_handles_overlap'" >&5
16171printf "%s\n" "$as_me: WARNING: cross-compiling: consider setting 'vim_cv_memmove_handles_overlap'" >&2;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000016172
Christian Brabandt9670f612025-05-07 21:44:33 +020016173else case e in #(
16174 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016175/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016176#define mch_memmove(s,d,l) memmove(d,s,l) $bcopy_test_prog
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016177_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016178if ac_fn_c_try_run "$LINENO"
16179then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000016180
16181 vim_cv_memmove_handles_overlap=yes
16182
Christian Brabandt9670f612025-05-07 21:44:33 +020016183else case e in #(
16184 e)
Bram Moolenaar446cb832008-06-24 21:56:24 +000016185 vim_cv_memmove_handles_overlap=no
Christian Brabandt9670f612025-05-07 21:44:33 +020016186 ;;
16187esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000016188fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016189rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
Christian Brabandt9670f612025-05-07 21:44:33 +020016190 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
16191esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000016192fi
16193
Christian Brabandt9670f612025-05-07 21:44:33 +020016194 ;;
16195esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000016196fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016197{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_memmove_handles_overlap" >&5
16198printf "%s\n" "$vim_cv_memmove_handles_overlap" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000016199
16200if test "x$vim_cv_memmove_handles_overlap" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016201 printf "%s\n" "#define USEMEMMOVE 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000016202
Bram Moolenaar071d4272004-06-13 20:20:40 +000016203else
Illia Bobyra96d5442023-08-30 16:30:15 +020016204 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether bcopy handles overlaps" >&5
16205printf %s "checking whether bcopy handles overlaps... " >&6; }
16206if test ${vim_cv_bcopy_handles_overlap+y}
16207then :
16208 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020016209else case e in #(
16210 e)
Illia Bobyra96d5442023-08-30 16:30:15 +020016211 if test "$cross_compiling" = yes
16212then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000016213
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010016214 vim_cv_bcopy_handles_overlap=yes
16215 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cross-compiling: consider setting 'vim_cv_bcopy_handles_overlap'" >&5
16216printf "%s\n" "$as_me: WARNING: cross-compiling: consider setting 'vim_cv_bcopy_handles_overlap'" >&2;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000016217
Christian Brabandt9670f612025-05-07 21:44:33 +020016218else case e in #(
16219 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016220/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000016221#define mch_bcopy(s,d,l) bcopy(d,s,l) $bcopy_test_prog
16222_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016223if ac_fn_c_try_run "$LINENO"
16224then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000016225
16226 vim_cv_bcopy_handles_overlap=yes
16227
Christian Brabandt9670f612025-05-07 21:44:33 +020016228else case e in #(
16229 e)
Bram Moolenaar446cb832008-06-24 21:56:24 +000016230 vim_cv_bcopy_handles_overlap=no
Christian Brabandt9670f612025-05-07 21:44:33 +020016231 ;;
16232esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000016233fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016234rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
Christian Brabandt9670f612025-05-07 21:44:33 +020016235 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
16236esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000016237fi
16238
Christian Brabandt9670f612025-05-07 21:44:33 +020016239 ;;
16240esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000016241fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016242{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_bcopy_handles_overlap" >&5
16243printf "%s\n" "$vim_cv_bcopy_handles_overlap" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000016244
16245 if test "x$vim_cv_bcopy_handles_overlap" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016246 printf "%s\n" "#define USEBCOPY 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016247
Bram Moolenaar446cb832008-06-24 21:56:24 +000016248 else
Illia Bobyra96d5442023-08-30 16:30:15 +020016249 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether memcpy handles overlaps" >&5
16250printf %s "checking whether memcpy handles overlaps... " >&6; }
16251if test ${vim_cv_memcpy_handles_overlap+y}
16252then :
16253 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020016254else case e in #(
16255 e)
Illia Bobyra96d5442023-08-30 16:30:15 +020016256 if test "$cross_compiling" = yes
16257then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000016258
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010016259 vim_cv_memcpy_handles_overlap=yes
16260 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cross-compiling: consider setting 'vim_cv_memcpy_handles_overlap'" >&5
16261printf "%s\n" "$as_me: WARNING: cross-compiling: consider setting 'vim_cv_memcpy_handles_overlap'" >&2;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000016262
Christian Brabandt9670f612025-05-07 21:44:33 +020016263else case e in #(
16264 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016265/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000016266#define mch_memcpy(s,d,l) memcpy(d,s,l) $bcopy_test_prog
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016267_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016268if ac_fn_c_try_run "$LINENO"
16269then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000016270
16271 vim_cv_memcpy_handles_overlap=yes
16272
Christian Brabandt9670f612025-05-07 21:44:33 +020016273else case e in #(
16274 e)
Bram Moolenaar446cb832008-06-24 21:56:24 +000016275 vim_cv_memcpy_handles_overlap=no
Christian Brabandt9670f612025-05-07 21:44:33 +020016276 ;;
16277esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000016278fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016279rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
Christian Brabandt9670f612025-05-07 21:44:33 +020016280 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
16281esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000016282fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000016283
Christian Brabandt9670f612025-05-07 21:44:33 +020016284 ;;
16285esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000016286fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016287{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_memcpy_handles_overlap" >&5
16288printf "%s\n" "$vim_cv_memcpy_handles_overlap" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000016289
16290 if test "x$vim_cv_memcpy_handles_overlap" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016291 printf "%s\n" "#define USEMEMCPY 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000016292
16293 fi
16294 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000016295fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000016296
Bram Moolenaar071d4272004-06-13 20:20:40 +000016297
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020016298if test "x$with_x" = "xyes"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000016299 cflags_save=$CFLAGS
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020016300 libs_save=$LIBS
16301 LIBS="$LIBS $X_LIBS $GUI_LIB_LOC $GUI_X_LIBS $X_PRE_LIBS $X_LIB $X_EXTRA_LIBS"
16302 CFLAGS="$CFLAGS $X_CFLAGS"
16303
Illia Bobyra96d5442023-08-30 16:30:15 +020016304 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether X_LOCALE needed" >&5
16305printf %s "checking whether X_LOCALE needed... " >&6; }
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020016306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016307/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016308#include <X11/Xlocale.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016309int
Illia Bobyra96d5442023-08-30 16:30:15 +020016310main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016311{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016312
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016313 ;
16314 return 0;
16315}
16316_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016317if ac_fn_c_try_compile "$LINENO"
16318then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016320/* end confdefs.h. */
16321
Bram Moolenaar446cb832008-06-24 21:56:24 +000016322/* Override any GCC internal prototype to avoid an error.
16323 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020016324 builtin and then its argument prototype would still apply.
16325 The 'extern "C"' is for builds by C++ compilers;
16326 although this is not generally supported in C code supporting it here
16327 has little cost and some practical benefit (sr 110532). */
16328#ifdef __cplusplus
16329extern "C"
16330#endif
16331char _Xsetlocale (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016332int
Illia Bobyra96d5442023-08-30 16:30:15 +020016333main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016334{
Bram Moolenaar446cb832008-06-24 21:56:24 +000016335return _Xsetlocale ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016336 ;
16337 return 0;
16338}
16339_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016340if ac_fn_c_try_link "$LINENO"
16341then :
16342 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16343printf "%s\n" "yes" >&6; }
16344 printf "%s\n" "#define X_LOCALE 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016345
Christian Brabandt9670f612025-05-07 21:44:33 +020016346else case e in #(
16347 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16348printf "%s\n" "no" >&6; } ;;
16349esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000016350fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016351rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016352 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020016353else case e in #(
16354 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16355printf "%s\n" "no" >&6; } ;;
16356esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000016357fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016358rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020016359
Illia Bobyra96d5442023-08-30 16:30:15 +020016360 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether Xutf8SetWMProperties() can be used" >&5
16361printf %s "checking whether Xutf8SetWMProperties() can be used... " >&6; }
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020016362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16363/* end confdefs.h. */
16364
16365/* Override any GCC internal prototype to avoid an error.
16366 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020016367 builtin and then its argument prototype would still apply.
16368 The 'extern "C"' is for builds by C++ compilers;
16369 although this is not generally supported in C code supporting it here
16370 has little cost and some practical benefit (sr 110532). */
16371#ifdef __cplusplus
16372extern "C"
16373#endif
16374char Xutf8SetWMProperties (void);
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020016375int
Illia Bobyra96d5442023-08-30 16:30:15 +020016376main (void)
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020016377{
16378return Xutf8SetWMProperties ();
16379 ;
16380 return 0;
16381}
16382_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016383if ac_fn_c_try_link "$LINENO"
16384then :
16385 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16386printf "%s\n" "yes" >&6; }
16387 printf "%s\n" "#define HAVE_XUTF8SETWMPROPERTIES 1" >>confdefs.h
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020016388
Christian Brabandt9670f612025-05-07 21:44:33 +020016389else case e in #(
16390 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16391printf "%s\n" "no" >&6; } ;;
16392esac
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020016393fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016394rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020016395 conftest$ac_exeext conftest.$ac_ext
16396
Bram Moolenaar071d4272004-06-13 20:20:40 +000016397 CFLAGS=$cflags_save
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020016398 LIBS=$libs_save
Bram Moolenaar071d4272004-06-13 20:20:40 +000016399fi
16400
Illia Bobyra96d5442023-08-30 16:30:15 +020016401{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _xpg4_setrunelocale in -lxpg4" >&5
16402printf %s "checking for _xpg4_setrunelocale in -lxpg4... " >&6; }
16403if test ${ac_cv_lib_xpg4__xpg4_setrunelocale+y}
16404then :
16405 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020016406else case e in #(
16407 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000016408LIBS="-lxpg4 $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016409cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016410/* end confdefs.h. */
16411
Bram Moolenaar446cb832008-06-24 21:56:24 +000016412/* Override any GCC internal prototype to avoid an error.
16413 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020016414 builtin and then its argument prototype would still apply.
16415 The 'extern "C"' is for builds by C++ compilers;
16416 although this is not generally supported in C code supporting it here
16417 has little cost and some practical benefit (sr 110532). */
16418#ifdef __cplusplus
16419extern "C"
16420#endif
16421char _xpg4_setrunelocale (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016422int
Illia Bobyra96d5442023-08-30 16:30:15 +020016423main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016424{
Bram Moolenaar446cb832008-06-24 21:56:24 +000016425return _xpg4_setrunelocale ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016426 ;
16427 return 0;
16428}
16429_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016430if ac_fn_c_try_link "$LINENO"
16431then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016432 ac_cv_lib_xpg4__xpg4_setrunelocale=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020016433else case e in #(
16434 e) ac_cv_lib_xpg4__xpg4_setrunelocale=no ;;
16435esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000016436fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016437rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016438 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020016439LIBS=$ac_check_lib_save_LIBS ;;
16440esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016441fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016442{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xpg4__xpg4_setrunelocale" >&5
16443printf "%s\n" "$ac_cv_lib_xpg4__xpg4_setrunelocale" >&6; }
16444if test "x$ac_cv_lib_xpg4__xpg4_setrunelocale" = xyes
16445then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000016446 LIBS="$LIBS -lxpg4"
Bram Moolenaar071d4272004-06-13 20:20:40 +000016447fi
16448
16449
Illia Bobyra96d5442023-08-30 16:30:15 +020016450{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to create tags" >&5
16451printf %s "checking how to create tags... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000016452test -f tags && mv tags tags.save
Bram Moolenaar5897e0c2011-05-10 15:42:03 +020016453if (eval ctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then
Bram Moolenaar509ff062020-01-02 22:38:49 +010016454 TAGPRG="ctags -I INIT+,INIT2+,INIT3+,INIT4+,INIT5+ --fields=+S"
Bram Moolenaar5897e0c2011-05-10 15:42:03 +020016455elif (eval exctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then
Bram Moolenaar509ff062020-01-02 22:38:49 +010016456 TAGPRG="exctags -I INIT+,INIT2+,INIT3+,INIT4+,INIT5+ --fields=+S"
Bram Moolenaar5897e0c2011-05-10 15:42:03 +020016457elif (eval exuberant-ctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then
Bram Moolenaar509ff062020-01-02 22:38:49 +010016458 TAGPRG="exuberant-ctags -I INIT+,INIT2+,INIT3+,INIT4+,INIT5+ --fields=+S"
Bram Moolenaar071d4272004-06-13 20:20:40 +000016459else
Bram Moolenaar0c7ce772009-05-13 12:49:39 +000016460 TAGPRG="ctags"
Bram Moolenaar071d4272004-06-13 20:20:40 +000016461 (eval etags /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="etags"
16462 (eval etags -c /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="etags -c"
16463 (eval ctags /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags"
16464 (eval ctags -t /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -t"
16465 (eval ctags -ts /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -ts"
16466 (eval ctags -tvs /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -tvs"
16467 (eval ctags -i+m /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -i+m"
16468fi
16469test -f tags.save && mv tags.save tags
Illia Bobyra96d5442023-08-30 16:30:15 +020016470{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $TAGPRG" >&5
16471printf "%s\n" "$TAGPRG" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000016472
Illia Bobyra96d5442023-08-30 16:30:15 +020016473{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run man with a section nr" >&5
16474printf %s "checking how to run man with a section nr... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000016475MANDEF="man"
Bram Moolenaar8b131502008-02-13 09:28:19 +000016476(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 +020016477{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MANDEF" >&5
16478printf "%s\n" "$MANDEF" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000016479if test "$MANDEF" = "man -s"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016480 printf "%s\n" "#define USEMAN_S 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016481
16482fi
16483
Illia Bobyra96d5442023-08-30 16:30:15 +020016484{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-nls argument" >&5
16485printf %s "checking --disable-nls argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000016486# Check whether --enable-nls was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020016487if test ${enable_nls+y}
16488then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000016489 enableval=$enable_nls;
Christian Brabandt9670f612025-05-07 21:44:33 +020016490else case e in #(
16491 e) enable_nls="yes" ;;
16492esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000016493fi
16494
Bram Moolenaar071d4272004-06-13 20:20:40 +000016495
16496if test "$enable_nls" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016497 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16498printf "%s\n" "no" >&6; }
Bram Moolenaar2389c3c2005-05-22 22:07:59 +000016499
16500 INSTALL_LANGS=install-languages
16501
16502 INSTALL_TOOL_LANGS=install-tool-languages
16503
16504
Bram Moolenaar071d4272004-06-13 20:20:40 +000016505 # Extract the first word of "msgfmt", so it can be a program name with args.
16506set dummy msgfmt; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +020016507{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16508printf %s "checking for $ac_word... " >&6; }
16509if test ${ac_cv_prog_MSGFMT+y}
16510then :
16511 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020016512else case e in #(
16513 e) if test -n "$MSGFMT"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000016514 ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
16515else
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016516as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16517for as_dir in $PATH
16518do
16519 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +020016520 case $as_dir in #(((
16521 '') as_dir=./ ;;
16522 */) ;;
16523 *) as_dir=$as_dir/ ;;
16524 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016525 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +020016526 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016527 ac_cv_prog_MSGFMT="msgfmt"
Illia Bobyra96d5442023-08-30 16:30:15 +020016528 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016529 break 2
16530 fi
16531done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016532 done
Bram Moolenaar446cb832008-06-24 21:56:24 +000016533IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016534
Christian Brabandt9670f612025-05-07 21:44:33 +020016535fi ;;
16536esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000016537fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016538MSGFMT=$ac_cv_prog_MSGFMT
Bram Moolenaar071d4272004-06-13 20:20:40 +000016539if test -n "$MSGFMT"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016540 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
16541printf "%s\n" "$MSGFMT" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000016542else
Illia Bobyra96d5442023-08-30 16:30:15 +020016543 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16544printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000016545fi
16546
Bram Moolenaar446cb832008-06-24 21:56:24 +000016547
Illia Bobyra96d5442023-08-30 16:30:15 +020016548 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for NLS" >&5
16549printf %s "checking for NLS... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000016550 if test -f po/Makefile; then
16551 have_gettext="no"
16552 if test -n "$MSGFMT"; then
Bram Moolenaar49b6a572013-11-17 20:32:54 +010016553 olibs=$LIBS
16554 LIBS=""
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016556/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016557#include <libintl.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016558int
Illia Bobyra96d5442023-08-30 16:30:15 +020016559main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016560{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016561gettext("Test");
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016562 ;
16563 return 0;
16564}
16565_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016566if ac_fn_c_try_link "$LINENO"
16567then :
16568 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gettext() works" >&5
16569printf "%s\n" "gettext() works" >&6; }; have_gettext="yes"; LIBS=$olibs
Christian Brabandt9670f612025-05-07 21:44:33 +020016570else case e in #(
16571 e) LIBS="-lintl"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016573/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016574#include <libintl.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016575int
Illia Bobyra96d5442023-08-30 16:30:15 +020016576main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016577{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016578gettext("Test");
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016579 ;
16580 return 0;
16581}
16582_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016583if ac_fn_c_try_link "$LINENO"
16584then :
16585 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gettext() works with -lintl" >&5
16586printf "%s\n" "gettext() works with -lintl" >&6; }; have_gettext="yes";
Bram Moolenaar49b6a572013-11-17 20:32:54 +010016587 LIBS="$olibs -lintl"
Christian Brabandt9670f612025-05-07 21:44:33 +020016588else case e in #(
16589 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gettext() doesn't work" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +020016590printf "%s\n" "gettext() doesn't work" >&6; };
Christian Brabandt9670f612025-05-07 21:44:33 +020016591 LIBS=$olibs ;;
16592esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000016593fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016594rm -f core conftest.err conftest.$ac_objext conftest.beam \
Christian Brabandt9670f612025-05-07 21:44:33 +020016595 conftest$ac_exeext conftest.$ac_ext ;;
16596esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000016597fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016598rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016599 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000016600 else
Illia Bobyra96d5442023-08-30 16:30:15 +020016601 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: msgfmt not found - disabled" >&5
16602printf "%s\n" "msgfmt not found - disabled" >&6; };
Bram Moolenaar071d4272004-06-13 20:20:40 +000016603 fi
Martin Tournoij7904fa42022-10-04 16:28:45 +010016604 if test $have_gettext = "yes" -a "x$features" != "xtiny"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016605 printf "%s\n" "#define HAVE_GETTEXT 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016606
16607 MAKEMO=yes
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016608
Illia Bobyra96d5442023-08-30 16:30:15 +020016609 ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset"
16610if test "x$ac_cv_func_bind_textdomain_codeset" = xyes
16611then :
16612 printf "%s\n" "#define HAVE_BIND_TEXTDOMAIN_CODESET 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016613
Bram Moolenaar071d4272004-06-13 20:20:40 +000016614fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000016615
Christ van Willegence0ef912024-06-20 23:41:59 +020016616 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dgettext" >&5
16617printf %s "checking for dgettext... " >&6; }
16618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16619/* end confdefs.h. */
16620#include <libintl.h>
16621int
16622main (void)
16623{
16624dgettext("Test", "Test");
16625 ;
16626 return 0;
16627}
16628_ACEOF
16629if ac_fn_c_try_link "$LINENO"
16630then :
16631 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16632printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_DGETTEXT 1" >>confdefs.h
16633
Christian Brabandt9670f612025-05-07 21:44:33 +020016634else case e in #(
16635 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dngettext" >&5
Christ van Willegenc0786752025-02-01 15:42:16 +010016636printf %s "checking for dngettext... " >&6; }
16637 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
Christian Brabandt9670f612025-05-07 21:44:33 +020016638printf "%s\n" "no" >&6; } ;;
16639esac
Christ van Willegenc0786752025-02-01 15:42:16 +010016640fi
16641rm -f core conftest.err conftest.$ac_objext conftest.beam \
16642 conftest$ac_exeext conftest.$ac_ext
16643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16644/* end confdefs.h. */
16645#include <libintl.h>
16646int
16647main (void)
16648{
16649dngettext("DOMAIN", "Test single", "Test plural", 1);
16650 ;
16651 return 0;
16652}
16653_ACEOF
16654if ac_fn_c_try_link "$LINENO"
16655then :
16656 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16657printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_DNGETTEXT 1" >>confdefs.h
16658
Christian Brabandt9670f612025-05-07 21:44:33 +020016659else case e in #(
16660 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16661printf "%s\n" "no" >&6; } ;;
16662esac
Christ van Willegence0ef912024-06-20 23:41:59 +020016663fi
16664rm -f core conftest.err conftest.$ac_objext conftest.beam \
16665 conftest$ac_exeext conftest.$ac_ext
Illia Bobyra96d5442023-08-30 16:30:15 +020016666 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _nl_msg_cat_cntr" >&5
16667printf %s "checking for _nl_msg_cat_cntr... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016669/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016670#include <libintl.h>
16671 extern int _nl_msg_cat_cntr;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016672int
Illia Bobyra96d5442023-08-30 16:30:15 +020016673main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016674{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016675++_nl_msg_cat_cntr;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016676 ;
16677 return 0;
16678}
16679_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016680if ac_fn_c_try_link "$LINENO"
16681then :
16682 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16683printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_NL_MSG_CAT_CNTR 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016684
Christian Brabandt9670f612025-05-07 21:44:33 +020016685else case e in #(
16686 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16687printf "%s\n" "no" >&6; } ;;
16688esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000016689fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016690rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016691 conftest$ac_exeext conftest.$ac_ext
Illia Bobyra96d5442023-08-30 16:30:15 +020016692 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if msgfmt supports --desktop" >&5
16693printf %s "checking if msgfmt supports --desktop... " >&6; }
Bram Moolenaar26096cc2019-04-11 15:25:40 +020016694 MSGFMT_DESKTOP=
16695 if "$MSGFMT" --help | grep -e '--desktop' >/dev/null; then
Bram Moolenaar62a88f42019-06-07 20:44:40 +020016696 if "$MSGFMT" --version | grep '0.19.[3-7]$' >/dev/null; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016697 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: broken" >&5
16698printf "%s\n" "broken" >&6; }
Bram Moolenaar62a88f42019-06-07 20:44:40 +020016699 else
Illia Bobyra96d5442023-08-30 16:30:15 +020016700 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16701printf "%s\n" "yes" >&6; }
Bram Moolenaar62a88f42019-06-07 20:44:40 +020016702 MSGFMT_DESKTOP="gvim.desktop vim.desktop"
16703 fi
Bram Moolenaar26096cc2019-04-11 15:25:40 +020016704 else
Illia Bobyra96d5442023-08-30 16:30:15 +020016705 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16706printf "%s\n" "no" >&6; }
Bram Moolenaar26096cc2019-04-11 15:25:40 +020016707 fi
16708
Vladimír Marek87319172024-04-11 21:54:34 +020016709 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $MSGFMT supports --no-convert" >&5
16710printf %s "checking if $MSGFMT supports --no-convert... " >&6; }
RestorerZe498caf2024-03-12 22:11:36 +010016711 if "$MSGFMT" --help | grep -q -- '--no-convert' >/dev/null; then
16712 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16713printf "%s\n" "yes" >&6; }
Vladimír Marek87319172024-04-11 21:54:34 +020016714 MSGFMTCMD="OLD_PO_FILE_INPUT=yes $MSGFMT --no-convert -v"
RestorerZe498caf2024-03-12 22:11:36 +010016715 else
16716 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16717printf "%s\n" "no" >&6; }
Vladimír Marek87319172024-04-11 21:54:34 +020016718 MSGFMTCMD="OLD_PO_FILE_INPUT=yes $MSGFMT -v"
RestorerZe498caf2024-03-12 22:11:36 +010016719 fi
16720
Bram Moolenaar071d4272004-06-13 20:20:40 +000016721 fi
16722 else
Illia Bobyra96d5442023-08-30 16:30:15 +020016723 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no \"po/Makefile\" - disabled" >&5
16724printf "%s\n" "no \"po/Makefile\" - disabled" >&6; };
Bram Moolenaar071d4272004-06-13 20:20:40 +000016725 fi
16726else
Illia Bobyra96d5442023-08-30 16:30:15 +020016727 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16728printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000016729fi
16730
Illia Bobyra96d5442023-08-30 16:30:15 +020016731ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
16732if test "x$ac_cv_header_dlfcn_h" = xyes
16733then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000016734 DLL=dlfcn.h
Christian Brabandt9670f612025-05-07 21:44:33 +020016735else case e in #(
16736 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 +020016737if test "x$ac_cv_header_dl_h" = xyes
16738then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016739 DLL=dl.h
16740fi
Christian Brabandt9670f612025-05-07 21:44:33 +020016741 ;;
16742esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016743fi
16744
Bram Moolenaar071d4272004-06-13 20:20:40 +000016745if test x${DLL} = xdlfcn.h; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016746
Illia Bobyra96d5442023-08-30 16:30:15 +020016747printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016748
Illia Bobyra96d5442023-08-30 16:30:15 +020016749 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen()" >&5
16750printf %s "checking for dlopen()... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016752/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016753
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016754int
Illia Bobyra96d5442023-08-30 16:30:15 +020016755main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016756{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016757
16758 extern void* dlopen();
16759 dlopen();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016760
16761 ;
16762 return 0;
16763}
16764_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016765if ac_fn_c_try_link "$LINENO"
16766then :
16767 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16768printf "%s\n" "yes" >&6; };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016769
Illia Bobyra96d5442023-08-30 16:30:15 +020016770printf "%s\n" "#define HAVE_DLOPEN 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016771
Christian Brabandt9670f612025-05-07 21:44:33 +020016772else case e in #(
16773 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +020016774printf "%s\n" "no" >&6; };
16775 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen() in -ldl" >&5
16776printf %s "checking for dlopen() in -ldl... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000016777 olibs=$LIBS
16778 LIBS="$LIBS -ldl"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016780/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016781
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016782int
Illia Bobyra96d5442023-08-30 16:30:15 +020016783main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016784{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016785
16786 extern void* dlopen();
16787 dlopen();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016788
16789 ;
16790 return 0;
16791}
16792_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016793if ac_fn_c_try_link "$LINENO"
16794then :
16795 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16796printf "%s\n" "yes" >&6; };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016797
Illia Bobyra96d5442023-08-30 16:30:15 +020016798printf "%s\n" "#define HAVE_DLOPEN 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016799
Christian Brabandt9670f612025-05-07 21:44:33 +020016800else case e in #(
16801 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +020016802printf "%s\n" "no" >&6; };
Christian Brabandt9670f612025-05-07 21:44:33 +020016803 LIBS=$olibs ;;
16804esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000016805fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016806rm -f core conftest.err conftest.$ac_objext conftest.beam \
Christian Brabandt9670f612025-05-07 21:44:33 +020016807 conftest$ac_exeext conftest.$ac_ext ;;
16808esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000016809fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016810rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016811 conftest$ac_exeext conftest.$ac_ext
Illia Bobyra96d5442023-08-30 16:30:15 +020016812 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlsym()" >&5
16813printf %s "checking for dlsym()... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016815/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016816
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016817int
Illia Bobyra96d5442023-08-30 16:30:15 +020016818main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016819{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016820
16821 extern void* dlsym();
16822 dlsym();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016823
16824 ;
16825 return 0;
16826}
16827_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016828if ac_fn_c_try_link "$LINENO"
16829then :
16830 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16831printf "%s\n" "yes" >&6; };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016832
Illia Bobyra96d5442023-08-30 16:30:15 +020016833printf "%s\n" "#define HAVE_DLSYM 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016834
Christian Brabandt9670f612025-05-07 21:44:33 +020016835else case e in #(
16836 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +020016837printf "%s\n" "no" >&6; };
16838 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlsym() in -ldl" >&5
16839printf %s "checking for dlsym() in -ldl... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000016840 olibs=$LIBS
16841 LIBS="$LIBS -ldl"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016843/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016844
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016845int
Illia Bobyra96d5442023-08-30 16:30:15 +020016846main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016847{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016848
16849 extern void* dlsym();
16850 dlsym();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016851
16852 ;
16853 return 0;
16854}
16855_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016856if ac_fn_c_try_link "$LINENO"
16857then :
16858 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16859printf "%s\n" "yes" >&6; };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016860
Illia Bobyra96d5442023-08-30 16:30:15 +020016861printf "%s\n" "#define HAVE_DLSYM 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016862
Christian Brabandt9670f612025-05-07 21:44:33 +020016863else case e in #(
16864 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +020016865printf "%s\n" "no" >&6; };
Christian Brabandt9670f612025-05-07 21:44:33 +020016866 LIBS=$olibs ;;
16867esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000016868fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016869rm -f core conftest.err conftest.$ac_objext conftest.beam \
Christian Brabandt9670f612025-05-07 21:44:33 +020016870 conftest$ac_exeext conftest.$ac_ext ;;
16871esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000016872fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016873rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016874 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000016875elif test x${DLL} = xdl.h; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016876
Illia Bobyra96d5442023-08-30 16:30:15 +020016877printf "%s\n" "#define HAVE_DL_H 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016878
Illia Bobyra96d5442023-08-30 16:30:15 +020016879 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load()" >&5
16880printf %s "checking for shl_load()... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016882/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016883
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016884int
Illia Bobyra96d5442023-08-30 16:30:15 +020016885main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016886{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016887
16888 extern void* shl_load();
16889 shl_load();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016890
16891 ;
16892 return 0;
16893}
16894_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016895if ac_fn_c_try_link "$LINENO"
16896then :
16897 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16898printf "%s\n" "yes" >&6; };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016899
Illia Bobyra96d5442023-08-30 16:30:15 +020016900printf "%s\n" "#define HAVE_SHL_LOAD 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016901
Christian Brabandt9670f612025-05-07 21:44:33 +020016902else case e in #(
16903 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +020016904printf "%s\n" "no" >&6; };
16905 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load() in -ldld" >&5
16906printf %s "checking for shl_load() in -ldld... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000016907 olibs=$LIBS
16908 LIBS="$LIBS -ldld"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016910/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016911
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016912int
Illia Bobyra96d5442023-08-30 16:30:15 +020016913main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016914{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016915
16916 extern void* shl_load();
16917 shl_load();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016918
16919 ;
16920 return 0;
16921}
16922_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016923if ac_fn_c_try_link "$LINENO"
16924then :
16925 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16926printf "%s\n" "yes" >&6; };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016927
Illia Bobyra96d5442023-08-30 16:30:15 +020016928printf "%s\n" "#define HAVE_SHL_LOAD 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016929
Christian Brabandt9670f612025-05-07 21:44:33 +020016930else case e in #(
16931 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +020016932printf "%s\n" "no" >&6; };
Christian Brabandt9670f612025-05-07 21:44:33 +020016933 LIBS=$olibs ;;
16934esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000016935fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016936rm -f core conftest.err conftest.$ac_objext conftest.beam \
Christian Brabandt9670f612025-05-07 21:44:33 +020016937 conftest$ac_exeext conftest.$ac_ext ;;
16938esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000016939fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016940rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016941 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000016942fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016943ac_fn_c_check_header_compile "$LINENO" "setjmp.h" "ac_cv_header_setjmp_h" "$ac_includes_default"
16944if test "x$ac_cv_header_setjmp_h" = xyes
16945then :
16946 printf "%s\n" "#define HAVE_SETJMP_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016947
16948fi
16949
Bram Moolenaar071d4272004-06-13 20:20:40 +000016950
Bram Moolenaard0573012017-10-28 21:11:06 +020016951if test "x$MACOS_X" = "xyes" -a -n "$PERL"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000016952 if echo $LIBS | grep -e '-ldl' >/dev/null; then
16953 LIBS=`echo $LIBS | sed s/-ldl//`
16954 PERL_LIBS="$PERL_LIBS -ldl"
16955 fi
16956fi
16957
Bram Moolenaard0573012017-10-28 21:11:06 +020016958if test "$MACOS_X" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016959 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need macOS frameworks" >&5
16960printf %s "checking whether we need macOS frameworks... " >&6; }
Bram Moolenaar097148e2020-08-11 21:58:20 +020016961 if test "$MACOS_X_DARWIN" = "yes"; then
Bram Moolenaard0573012017-10-28 21:11:06 +020016962 if test "$features" = "tiny"; then
16963 OS_EXTRA_SRC=`echo "$OS_EXTRA_SRC" | sed -e 's+os_macosx.m++'`
16964 OS_EXTRA_OBJ=`echo "$OS_EXTRA_OBJ" | sed -e 's+objects/os_macosx.o++'`
Illia Bobyra96d5442023-08-30 16:30:15 +020016965 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, we need CoreServices" >&5
16966printf "%s\n" "yes, we need CoreServices" >&6; }
Bram Moolenaar2be7cb72019-01-12 16:10:51 +010016967 LIBS="$LIBS -framework CoreServices"
Bram Moolenaard0573012017-10-28 21:11:06 +020016968 else
Illia Bobyra96d5442023-08-30 16:30:15 +020016969 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, we need AppKit" >&5
16970printf "%s\n" "yes, we need AppKit" >&6; }
Bram Moolenaard0573012017-10-28 21:11:06 +020016971 LIBS="$LIBS -framework AppKit"
Bram Moolenaard0573012017-10-28 21:11:06 +020016972 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000016973 else
Illia Bobyra96d5442023-08-30 16:30:15 +020016974 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16975printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000016976 fi
16977fi
16978
Christian Brabandt6b9efdd2021-09-09 17:14:50 +020016979if `echo "$CFLAGS" | grep -v D_REENTRANT >/dev/null`; then
Bram Moolenaar3ae5fc92021-09-06 18:57:30 +020016980 CFLAGS="$CFLAGS -D_REENTRANT"
16981fi
16982
Bram Moolenaard5cdbeb2005-10-10 20:59:28 +000016983DEPEND_CFLAGS_FILTER=
16984if test "$GCC" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016985 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GCC 3 or later" >&5
16986printf %s "checking for GCC 3 or later... " >&6; }
Bram Moolenaar348808f2020-02-07 20:50:07 +010016987 gccmajor=`echo "$gccversion" | sed -e 's/^\([1-9][0-9]*\)\..*$/\1/g'`
Bram Moolenaarf740b292006-02-16 22:11:02 +000016988 if test "$gccmajor" -gt "2"; then
Bram Moolenaard5cdbeb2005-10-10 20:59:28 +000016989 DEPEND_CFLAGS_FILTER="| sed 's+-I */+-isystem /+g'"
Illia Bobyra96d5442023-08-30 16:30:15 +020016990 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16991printf "%s\n" "yes" >&6; }
Bram Moolenaar0cd49302008-11-20 09:37:01 +000016992 else
Illia Bobyra96d5442023-08-30 16:30:15 +020016993 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16994printf "%s\n" "no" >&6; }
Bram Moolenaar0cd49302008-11-20 09:37:01 +000016995 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016996 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D_FORTIFY_SOURCE=1" >&5
16997printf %s "checking whether we need -D_FORTIFY_SOURCE=1... " >&6; }
Bram Moolenaar0cd49302008-11-20 09:37:01 +000016998 if test "$gccmajor" -gt "3"; then
Zdenek Dohnal42196982023-01-18 16:09:51 +000016999 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/'`
17000 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 +020017001 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17002printf "%s\n" "yes" >&6; }
Bram Moolenaar0cd49302008-11-20 09:37:01 +000017003 else
Illia Bobyra96d5442023-08-30 16:30:15 +020017004 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17005printf "%s\n" "no" >&6; }
Bram Moolenaar0cd49302008-11-20 09:37:01 +000017006 fi
Bram Moolenaara5792f52005-11-23 21:25:05 +000017007fi
Bram Moolenaard5cdbeb2005-10-10 20:59:28 +000017008
Bram Moolenaar071d4272004-06-13 20:20:40 +000017009
Illia Bobyra96d5442023-08-30 16:30:15 +020017010{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need to force -D_FILE_OFFSET_BITS=64" >&5
17011printf %s "checking whether we need to force -D_FILE_OFFSET_BITS=64... " >&6; }
Bram Moolenaar9ce42132018-04-11 22:19:36 +020017012if 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 +020017013 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17014printf "%s\n" "yes" >&6; }
17015 printf "%s\n" "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Bram Moolenaarec0557f2018-01-31 14:41:37 +010017016
17017else
Illia Bobyra96d5442023-08-30 16:30:15 +020017018 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17019printf "%s\n" "no" >&6; }
Bram Moolenaarec0557f2018-01-31 14:41:37 +010017020fi
17021
Bram Moolenaar6cd42db2020-12-04 18:09:54 +010017022LDFLAGS=`echo "$LDFLAGS" | sed -e 's/-L /-L/g'`
17023
Illia Bobyra96d5442023-08-30 16:30:15 +020017024{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking linker --as-needed support" >&5
17025printf %s "checking linker --as-needed support... " >&6; }
Bram Moolenaar22e193d2010-11-03 22:32:24 +010017026LINK_AS_NEEDED=
17027# Check if linker supports --as-needed and --no-as-needed options
17028if $CC -Wl,--help 2>/dev/null | grep as-needed > /dev/null; then
Natanael Copa761ead42021-05-15 14:25:37 +020017029 if ! echo "$LDFLAGS" | grep -q -- '-Wl,[^[:space:]]*--as-needed'; then
17030 LDFLAGS="$LDFLAGS -Wl,--as-needed"
17031 fi
Bram Moolenaar22e193d2010-11-03 22:32:24 +010017032 LINK_AS_NEEDED=yes
17033fi
17034if test "$LINK_AS_NEEDED" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +020017035 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17036printf "%s\n" "yes" >&6; }
Bram Moolenaar22e193d2010-11-03 22:32:24 +010017037else
Illia Bobyra96d5442023-08-30 16:30:15 +020017038 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17039printf "%s\n" "no" >&6; }
Bram Moolenaar22e193d2010-11-03 22:32:24 +010017040fi
17041
17042
Bram Moolenaar77c19352012-06-13 19:19:41 +020017043# IBM z/OS reset CFLAGS for config.mk
17044if test "$zOSUnix" = "yes"; then
17045 CFLAGS="-D_ALL_SOURCE -Wc,float\(ieee\),dll"
17046fi
17047
Bram Moolenaar446cb832008-06-24 21:56:24 +000017048ac_config_files="$ac_config_files auto/config.mk:config.mk.in"
17049
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017050cat >confcache <<\_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000017051# This file is a shell script that caches the results of configure
17052# tests run on this system so they can be shared between configure
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017053# scripts and configure runs, see configure's option --config-cache.
17054# It is not useful on other systems. If it contains results you don't
17055# want to keep, you may remove or edit it.
Bram Moolenaar071d4272004-06-13 20:20:40 +000017056#
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017057# config.status only pays attention to the cache file if you give it
17058# the --recheck option to rerun configure.
Bram Moolenaar071d4272004-06-13 20:20:40 +000017059#
Christian Brabandt9670f612025-05-07 21:44:33 +020017060# 'ac_cv_env_foo' variables (set or unset) will be overridden when
17061# loading this file, other *unset* 'ac_cv_foo' will be assigned the
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017062# following values.
17063
17064_ACEOF
17065
Bram Moolenaar071d4272004-06-13 20:20:40 +000017066# The following way of writing the cache mishandles newlines in values,
17067# but we know of no workaround that is simple, portable, and efficient.
Bram Moolenaar446cb832008-06-24 21:56:24 +000017068# So, we kill variables containing newlines.
Bram Moolenaar071d4272004-06-13 20:20:40 +000017069# Ultrix sh set writes to stderr and can't be redirected directly,
17070# and sets the high bit in the cache file unless we assign to the vars.
Bram Moolenaar446cb832008-06-24 21:56:24 +000017071(
17072 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17073 eval ac_val=\$$ac_var
17074 case $ac_val in #(
17075 *${as_nl}*)
17076 case $ac_var in #(
Illia Bobyra96d5442023-08-30 16:30:15 +020017077 *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17078printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017079 esac
17080 case $ac_var in #(
17081 _ | IFS | as_nl) ;; #(
17082 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017083 *) { eval $ac_var=; unset $ac_var;} ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017084 esac ;;
17085 esac
17086 done
17087
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017088 (set) 2>&1 |
Bram Moolenaar446cb832008-06-24 21:56:24 +000017089 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17090 *${as_nl}ac_space=\ *)
Christian Brabandt9670f612025-05-07 21:44:33 +020017091 # 'set' does not quote correctly, so add quotes: double-quote
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017092 # substitution turns \\\\ into \\, and sed turns \\ into \.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017093 sed -n \
17094 "s/'/'\\\\''/g;
17095 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Bram Moolenaar446cb832008-06-24 21:56:24 +000017096 ;; #(
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017097 *)
Christian Brabandt9670f612025-05-07 21:44:33 +020017098 # 'set' quotes correctly as required by POSIX, so do not add quotes.
Bram Moolenaar446cb832008-06-24 21:56:24 +000017099 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017100 ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017101 esac |
17102 sort
17103) |
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017104 sed '
Bram Moolenaar446cb832008-06-24 21:56:24 +000017105 /^ac_cv_env_/b end
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017106 t clear
Bram Moolenaar446cb832008-06-24 21:56:24 +000017107 :clear
Illia Bobyra96d5442023-08-30 16:30:15 +020017108 s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017109 t end
Bram Moolenaar446cb832008-06-24 21:56:24 +000017110 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17111 :end' >>confcache
17112if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17113 if test -w "$cache_file"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010017114 if test "x$cache_file" != "x/dev/null"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020017115 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17116printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
Bram Moolenaar7db77842014-03-27 17:40:59 +010017117 if test ! -f "$cache_file" || test -h "$cache_file"; then
17118 cat confcache >"$cache_file"
17119 else
17120 case $cache_file in #(
17121 */* | ?:*)
17122 mv -f confcache "$cache_file"$$ &&
17123 mv -f "$cache_file"$$ "$cache_file" ;; #(
17124 *)
17125 mv -f confcache "$cache_file" ;;
17126 esac
17127 fi
17128 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000017129 else
Illia Bobyra96d5442023-08-30 16:30:15 +020017130 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17131printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
Bram Moolenaar071d4272004-06-13 20:20:40 +000017132 fi
17133fi
17134rm -f confcache
17135
Bram Moolenaar071d4272004-06-13 20:20:40 +000017136test "x$prefix" = xNONE && prefix=$ac_default_prefix
17137# Let make expand exec_prefix.
17138test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
17139
Bram Moolenaar071d4272004-06-13 20:20:40 +000017140DEFS=-DHAVE_CONFIG_H
17141
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017142ac_libobjs=
17143ac_ltlibobjs=
Bram Moolenaar7db77842014-03-27 17:40:59 +010017144U=
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017145for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17146 # 1. Remove the extension, and $U if already installed.
Bram Moolenaar446cb832008-06-24 21:56:24 +000017147 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Illia Bobyra96d5442023-08-30 16:30:15 +020017148 ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
Bram Moolenaar446cb832008-06-24 21:56:24 +000017149 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17150 # will be set to the directory where LIBOBJS objects are built.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017151 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17152 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017153done
17154LIBOBJS=$ac_libobjs
17155
17156LTLIBOBJS=$ac_ltlibobjs
17157
17158
17159
Christian Brabandt9670f612025-05-07 21:44:33 +020017160# Check whether --enable-year2038 was given.
17161if test ${enable_year2038+y}
17162then :
17163 enableval=$enable_year2038;
17164fi
17165
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020017166
Bram Moolenaar7db77842014-03-27 17:40:59 +010017167: "${CONFIG_STATUS=./config.status}"
Bram Moolenaar446cb832008-06-24 21:56:24 +000017168ac_write_fail=0
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017169ac_clean_files_save=$ac_clean_files
17170ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Illia Bobyra96d5442023-08-30 16:30:15 +020017171{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17172printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017173as_write_fail=0
17174cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017175#! $SHELL
17176# Generated by $as_me.
Bram Moolenaar071d4272004-06-13 20:20:40 +000017177# Run this file to recreate the current configuration.
Bram Moolenaar071d4272004-06-13 20:20:40 +000017178# Compiler output produced by configure, useful for debugging
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017179# configure, is in config.log if it exists.
Bram Moolenaar071d4272004-06-13 20:20:40 +000017180
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017181debug=false
17182ac_cs_recheck=false
17183ac_cs_silent=false
Bram Moolenaar071d4272004-06-13 20:20:40 +000017184
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017185SHELL=\${CONFIG_SHELL-$SHELL}
17186export SHELL
17187_ASEOF
17188cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17189## -------------------- ##
17190## M4sh Initialization. ##
17191## -------------------- ##
Bram Moolenaar071d4272004-06-13 20:20:40 +000017192
Bram Moolenaar446cb832008-06-24 21:56:24 +000017193# Be more Bourne compatible
17194DUALCASE=1; export DUALCASE # for MKS sh
Illia Bobyra96d5442023-08-30 16:30:15 +020017195if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
17196then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017197 emulate sh
17198 NULLCMD=:
Bram Moolenaar446cb832008-06-24 21:56:24 +000017199 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017200 # is contrary to our usage. Disable this feature.
17201 alias -g '${1+"$@"}'='"$@"'
Bram Moolenaar446cb832008-06-24 21:56:24 +000017202 setopt NO_GLOB_SUBST
Christian Brabandt9670f612025-05-07 21:44:33 +020017203else case e in #(
17204 e) case `(set -o) 2>/dev/null` in #(
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017205 *posix*) :
17206 set -o posix ;; #(
17207 *) :
17208 ;;
Christian Brabandt9670f612025-05-07 21:44:33 +020017209esac ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017210esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000017211fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000017212
17213
Illia Bobyra96d5442023-08-30 16:30:15 +020017214
17215# Reset variables that may have inherited troublesome values from
17216# the environment.
17217
17218# IFS needs to be set, to space, tab, and newline, in precisely that order.
17219# (If _AS_PATH_WALK were called with IFS unset, it would have the
17220# side effect of setting IFS to empty, thus disabling word splitting.)
17221# Quoting is to prevent editors from complaining about space-tab.
Bram Moolenaar446cb832008-06-24 21:56:24 +000017222as_nl='
17223'
17224export as_nl
Illia Bobyra96d5442023-08-30 16:30:15 +020017225IFS=" "" $as_nl"
17226
17227PS1='$ '
17228PS2='> '
17229PS4='+ '
17230
17231# Ensure predictable behavior from utilities with locale-dependent output.
17232LC_ALL=C
17233export LC_ALL
17234LANGUAGE=C
17235export LANGUAGE
17236
17237# We cannot yet rely on "unset" to work, but we need these variables
17238# to be unset--not just set to an empty or harmless value--now, to
17239# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
17240# also avoids known problems related to "unset" and subshell syntax
17241# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
17242for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
17243do eval test \${$as_var+y} \
17244 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
17245done
17246
17247# Ensure that fds 0, 1, and 2 are open.
17248if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
17249if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
17250if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000017251
17252# The user is always right.
Illia Bobyra96d5442023-08-30 16:30:15 +020017253if ${PATH_SEPARATOR+false} :; then
Bram Moolenaar446cb832008-06-24 21:56:24 +000017254 PATH_SEPARATOR=:
17255 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17256 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17257 PATH_SEPARATOR=';'
17258 }
17259fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000017260
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017261
Bram Moolenaar446cb832008-06-24 21:56:24 +000017262# Find who we are. Look in the path if we contain no directory separator.
Bram Moolenaar7db77842014-03-27 17:40:59 +010017263as_myself=
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017264case $0 in #((
Bram Moolenaar446cb832008-06-24 21:56:24 +000017265 *[\\/]* ) as_myself=$0 ;;
17266 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17267for as_dir in $PATH
17268do
17269 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +020017270 case $as_dir in #(((
17271 '') as_dir=./ ;;
17272 */) ;;
17273 *) as_dir=$as_dir/ ;;
17274 esac
17275 test -r "$as_dir$0" && as_myself=$as_dir$0 && break
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017276 done
Bram Moolenaar446cb832008-06-24 21:56:24 +000017277IFS=$as_save_IFS
17278
17279 ;;
17280esac
Christian Brabandt9670f612025-05-07 21:44:33 +020017281# We did not find ourselves, most probably we were run as 'sh COMMAND'
Bram Moolenaar446cb832008-06-24 21:56:24 +000017282# in which case we are not to be found in the path.
17283if test "x$as_myself" = x; then
17284 as_myself=$0
17285fi
17286if test ! -f "$as_myself"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020017287 printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017288 exit 1
Bram Moolenaar446cb832008-06-24 21:56:24 +000017289fi
17290
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017291
17292
Bram Moolenaar7db77842014-03-27 17:40:59 +010017293# as_fn_error STATUS ERROR [LINENO LOG_FD]
17294# ----------------------------------------
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017295# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17296# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Bram Moolenaar7db77842014-03-27 17:40:59 +010017297# script with STATUS, using 1 if that was 0.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017298as_fn_error ()
17299{
Bram Moolenaar7db77842014-03-27 17:40:59 +010017300 as_status=$1; test $as_status -eq 0 && as_status=1
17301 if test "$4"; then
17302 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +020017303 printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017304 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020017305 printf "%s\n" "$as_me: error: $2" >&2
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017306 as_fn_exit $as_status
17307} # as_fn_error
17308
17309
17310# as_fn_set_status STATUS
17311# -----------------------
17312# Set $? to STATUS, without forking.
17313as_fn_set_status ()
17314{
17315 return $1
17316} # as_fn_set_status
17317
17318# as_fn_exit STATUS
17319# -----------------
17320# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17321as_fn_exit ()
17322{
17323 set +e
17324 as_fn_set_status $1
17325 exit $1
17326} # as_fn_exit
17327
17328# as_fn_unset VAR
17329# ---------------
17330# Portably unset VAR.
17331as_fn_unset ()
17332{
17333 { eval $1=; unset $1;}
17334}
17335as_unset=as_fn_unset
Illia Bobyra96d5442023-08-30 16:30:15 +020017336
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017337# as_fn_append VAR VALUE
17338# ----------------------
17339# Append the text in VALUE to the end of the definition contained in VAR. Take
17340# advantage of any shell optimizations that allow amortized linear growth over
17341# repeated appends, instead of the typical quadratic growth present in naive
17342# implementations.
Illia Bobyra96d5442023-08-30 16:30:15 +020017343if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
17344then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017345 eval 'as_fn_append ()
17346 {
17347 eval $1+=\$2
17348 }'
Christian Brabandt9670f612025-05-07 21:44:33 +020017349else case e in #(
17350 e) as_fn_append ()
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017351 {
17352 eval $1=\$$1\$2
Christian Brabandt9670f612025-05-07 21:44:33 +020017353 } ;;
17354esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017355fi # as_fn_append
17356
17357# as_fn_arith ARG...
17358# ------------------
17359# Perform arithmetic evaluation on the ARGs, and store the result in the
17360# global $as_val. Take advantage of shells that can avoid forks. The arguments
17361# must be portable across $(()) and expr.
Illia Bobyra96d5442023-08-30 16:30:15 +020017362if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
17363then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017364 eval 'as_fn_arith ()
17365 {
17366 as_val=$(( $* ))
17367 }'
Christian Brabandt9670f612025-05-07 21:44:33 +020017368else case e in #(
17369 e) as_fn_arith ()
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017370 {
17371 as_val=`expr "$@" || test $? -eq 1`
Christian Brabandt9670f612025-05-07 21:44:33 +020017372 } ;;
17373esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017374fi # as_fn_arith
17375
17376
Bram Moolenaar446cb832008-06-24 21:56:24 +000017377if expr a : '\(a\)' >/dev/null 2>&1 &&
17378 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017379 as_expr=expr
17380else
17381 as_expr=false
17382fi
17383
Bram Moolenaar446cb832008-06-24 21:56:24 +000017384if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017385 as_basename=basename
17386else
17387 as_basename=false
17388fi
17389
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017390if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17391 as_dirname=dirname
17392else
17393 as_dirname=false
17394fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017395
Bram Moolenaar446cb832008-06-24 21:56:24 +000017396as_me=`$as_basename -- "$0" ||
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017397$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17398 X"$0" : 'X\(//\)$' \| \
Bram Moolenaar446cb832008-06-24 21:56:24 +000017399 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Illia Bobyra96d5442023-08-30 16:30:15 +020017400printf "%s\n" X/"$0" |
Bram Moolenaar446cb832008-06-24 21:56:24 +000017401 sed '/^.*\/\([^/][^/]*\)\/*$/{
17402 s//\1/
17403 q
17404 }
17405 /^X\/\(\/\/\)$/{
17406 s//\1/
17407 q
17408 }
17409 /^X\/\(\/\).*/{
17410 s//\1/
17411 q
17412 }
17413 s/.*/./; q'`
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017414
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017415# Avoid depending upon Character Ranges.
17416as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17417as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17418as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17419as_cr_digits='0123456789'
17420as_cr_alnum=$as_cr_Letters$as_cr_digits
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017421
Illia Bobyra96d5442023-08-30 16:30:15 +020017422
17423# Determine whether it's possible to make 'echo' print without a newline.
17424# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
17425# for compatibility with existing Makefiles.
Bram Moolenaar446cb832008-06-24 21:56:24 +000017426ECHO_C= ECHO_N= ECHO_T=
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017427case `echo -n x` in #(((((
Bram Moolenaar446cb832008-06-24 21:56:24 +000017428-n*)
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017429 case `echo 'xy\c'` in
Bram Moolenaar446cb832008-06-24 21:56:24 +000017430 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017431 xy) ECHO_C='\c';;
17432 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17433 ECHO_T=' ';;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017434 esac;;
17435*)
17436 ECHO_N='-n';;
17437esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017438
Illia Bobyra96d5442023-08-30 16:30:15 +020017439# For backward compatibility with old third-party macros, we provide
17440# the shell variables $as_echo and $as_echo_n. New code should use
17441# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
17442as_echo='printf %s\n'
17443as_echo_n='printf %s'
17444
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017445rm -f conf$$ conf$$.exe conf$$.file
Bram Moolenaar446cb832008-06-24 21:56:24 +000017446if test -d conf$$.dir; then
17447 rm -f conf$$.dir/conf$$.file
17448else
17449 rm -f conf$$.dir
17450 mkdir conf$$.dir 2>/dev/null
17451fi
17452if (echo >conf$$.file) 2>/dev/null; then
17453 if ln -s conf$$.file conf$$ 2>/dev/null; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017454 as_ln_s='ln -s'
Bram Moolenaar446cb832008-06-24 21:56:24 +000017455 # ... but there are two gotchas:
Christian Brabandt9670f612025-05-07 21:44:33 +020017456 # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail.
17457 # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable.
17458 # In both cases, we have to default to 'cp -pR'.
Bram Moolenaar446cb832008-06-24 21:56:24 +000017459 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Bram Moolenaar7db77842014-03-27 17:40:59 +010017460 as_ln_s='cp -pR'
Bram Moolenaar446cb832008-06-24 21:56:24 +000017461 elif ln conf$$.file conf$$ 2>/dev/null; then
17462 as_ln_s=ln
17463 else
Bram Moolenaar7db77842014-03-27 17:40:59 +010017464 as_ln_s='cp -pR'
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017465 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017466else
Bram Moolenaar7db77842014-03-27 17:40:59 +010017467 as_ln_s='cp -pR'
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017468fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000017469rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17470rmdir conf$$.dir 2>/dev/null
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017471
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017472
17473# as_fn_mkdir_p
17474# -------------
17475# Create "$as_dir" as a directory, including parents if necessary.
17476as_fn_mkdir_p ()
17477{
17478
17479 case $as_dir in #(
17480 -*) as_dir=./$as_dir;;
17481 esac
17482 test -d "$as_dir" || eval $as_mkdir_p || {
17483 as_dirs=
17484 while :; do
17485 case $as_dir in #(
Illia Bobyra96d5442023-08-30 16:30:15 +020017486 *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017487 *) as_qdir=$as_dir;;
17488 esac
17489 as_dirs="'$as_qdir' $as_dirs"
17490 as_dir=`$as_dirname -- "$as_dir" ||
17491$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17492 X"$as_dir" : 'X\(//\)[^/]' \| \
17493 X"$as_dir" : 'X\(//\)$' \| \
17494 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Illia Bobyra96d5442023-08-30 16:30:15 +020017495printf "%s\n" X"$as_dir" |
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017496 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17497 s//\1/
17498 q
17499 }
17500 /^X\(\/\/\)[^/].*/{
17501 s//\1/
17502 q
17503 }
17504 /^X\(\/\/\)$/{
17505 s//\1/
17506 q
17507 }
17508 /^X\(\/\).*/{
17509 s//\1/
17510 q
17511 }
17512 s/.*/./; q'`
17513 test -d "$as_dir" && break
17514 done
17515 test -z "$as_dirs" || eval "mkdir $as_dirs"
Bram Moolenaar7db77842014-03-27 17:40:59 +010017516 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017517
17518
17519} # as_fn_mkdir_p
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017520if mkdir -p . 2>/dev/null; then
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017521 as_mkdir_p='mkdir -p "$as_dir"'
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017522else
17523 test -d ./-p && rmdir ./-p
17524 as_mkdir_p=false
17525fi
17526
Bram Moolenaar7db77842014-03-27 17:40:59 +010017527
17528# as_fn_executable_p FILE
17529# -----------------------
17530# Test if FILE is an executable regular file.
17531as_fn_executable_p ()
17532{
17533 test -f "$1" && test -x "$1"
17534} # as_fn_executable_p
17535as_test_x='test -x'
17536as_executable_p=as_fn_executable_p
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017537
17538# Sed expression to map a string onto a valid CPP name.
Christian Brabandt9670f612025-05-07 21:44:33 +020017539as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
17540as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017541
17542# Sed expression to map a string onto a valid variable name.
Christian Brabandt9670f612025-05-07 21:44:33 +020017543as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
17544as_tr_sh="eval sed '$as_sed_sh'" # deprecated
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017545
17546
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017547exec 6>&1
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017548## ----------------------------------- ##
17549## Main body of $CONFIG_STATUS script. ##
17550## ----------------------------------- ##
17551_ASEOF
17552test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017553
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017554cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17555# Save the log message, to keep $0 and so on meaningful, and to
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017556# report actual input values of CONFIG_FILES etc. instead of their
Bram Moolenaar446cb832008-06-24 21:56:24 +000017557# values after options handling.
17558ac_log="
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017559This file was extended by $as_me, which was
Christian Brabandt9670f612025-05-07 21:44:33 +020017560generated by GNU Autoconf 2.72. Invocation command line was
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017561
17562 CONFIG_FILES = $CONFIG_FILES
17563 CONFIG_HEADERS = $CONFIG_HEADERS
17564 CONFIG_LINKS = $CONFIG_LINKS
17565 CONFIG_COMMANDS = $CONFIG_COMMANDS
17566 $ $0 $@
17567
Bram Moolenaar446cb832008-06-24 21:56:24 +000017568on `(hostname || uname -n) 2>/dev/null | sed 1q`
17569"
17570
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017571_ACEOF
17572
Bram Moolenaar32f31b12009-05-21 13:20:59 +000017573case $ac_config_files in *"
17574"*) set x $ac_config_files; shift; ac_config_files=$*;;
17575esac
17576
17577case $ac_config_headers in *"
17578"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17579esac
17580
17581
Bram Moolenaar446cb832008-06-24 21:56:24 +000017582cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017583# Files that config.status was made for.
Bram Moolenaar446cb832008-06-24 21:56:24 +000017584config_files="$ac_config_files"
17585config_headers="$ac_config_headers"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017586
Bram Moolenaar446cb832008-06-24 21:56:24 +000017587_ACEOF
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017588
Bram Moolenaar446cb832008-06-24 21:56:24 +000017589cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017590ac_cs_usage="\
Christian Brabandt9670f612025-05-07 21:44:33 +020017591'$as_me' instantiates files and other configuration actions
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017592from templates according to the current configuration. Unless the files
17593and actions are specified as TAGs, all are instantiated by default.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017594
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017595Usage: $0 [OPTION]... [TAG]...
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017596
17597 -h, --help print this help, then exit
Bram Moolenaar446cb832008-06-24 21:56:24 +000017598 -V, --version print version number and configuration settings, then exit
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017599 --config print configuration, then exit
Bram Moolenaar32f31b12009-05-21 13:20:59 +000017600 -q, --quiet, --silent
17601 do not print progress messages
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017602 -d, --debug don't remove temporary files
17603 --recheck update $as_me by reconfiguring in the same conditions
Bram Moolenaar32f31b12009-05-21 13:20:59 +000017604 --file=FILE[:TEMPLATE]
Bram Moolenaar446cb832008-06-24 21:56:24 +000017605 instantiate the configuration file FILE
Bram Moolenaar32f31b12009-05-21 13:20:59 +000017606 --header=FILE[:TEMPLATE]
Bram Moolenaar446cb832008-06-24 21:56:24 +000017607 instantiate the configuration header FILE
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017608
17609Configuration files:
17610$config_files
17611
17612Configuration headers:
17613$config_headers
17614
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017615Report bugs to the package provider."
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017616
Bram Moolenaar446cb832008-06-24 21:56:24 +000017617_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020017618ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
17619ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
Bram Moolenaar446cb832008-06-24 21:56:24 +000017620cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Illia Bobyra96d5442023-08-30 16:30:15 +020017621ac_cs_config='$ac_cs_config_escaped'
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017622ac_cs_version="\\
17623config.status
Christian Brabandt9670f612025-05-07 21:44:33 +020017624configured by $0, generated by GNU Autoconf 2.72,
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017625 with options \\"\$ac_cs_config\\"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017626
Christian Brabandt9670f612025-05-07 21:44:33 +020017627Copyright (C) 2023 Free Software Foundation, Inc.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017628This config.status script is free software; the Free Software Foundation
17629gives unlimited permission to copy, distribute and modify it."
Bram Moolenaar446cb832008-06-24 21:56:24 +000017630
17631ac_pwd='$ac_pwd'
17632srcdir='$srcdir'
17633AWK='$AWK'
17634test -n "\$AWK" || AWK=awk
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017635_ACEOF
17636
Bram Moolenaar446cb832008-06-24 21:56:24 +000017637cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17638# The default lists apply if the user does not specify any file.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017639ac_need_defaults=:
17640while test $# != 0
17641do
17642 case $1 in
Bram Moolenaar7db77842014-03-27 17:40:59 +010017643 --*=?*)
Bram Moolenaar446cb832008-06-24 21:56:24 +000017644 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17645 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017646 ac_shift=:
17647 ;;
Bram Moolenaar7db77842014-03-27 17:40:59 +010017648 --*=)
17649 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17650 ac_optarg=
17651 ac_shift=:
17652 ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017653 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017654 ac_option=$1
17655 ac_optarg=$2
17656 ac_shift=shift
17657 ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017658 esac
17659
17660 case $ac_option in
17661 # Handling of the options.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017662 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17663 ac_cs_recheck=: ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017664 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Illia Bobyra96d5442023-08-30 16:30:15 +020017665 printf "%s\n" "$ac_cs_version"; exit ;;
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017666 --config | --confi | --conf | --con | --co | --c )
Illia Bobyra96d5442023-08-30 16:30:15 +020017667 printf "%s\n" "$ac_cs_config"; exit ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017668 --debug | --debu | --deb | --de | --d | -d )
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017669 debug=: ;;
17670 --file | --fil | --fi | --f )
17671 $ac_shift
Bram Moolenaar446cb832008-06-24 21:56:24 +000017672 case $ac_optarg in
Illia Bobyra96d5442023-08-30 16:30:15 +020017673 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Bram Moolenaar7db77842014-03-27 17:40:59 +010017674 '') as_fn_error $? "missing file argument" ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017675 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017676 as_fn_append CONFIG_FILES " '$ac_optarg'"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017677 ac_need_defaults=false;;
17678 --header | --heade | --head | --hea )
17679 $ac_shift
Bram Moolenaar446cb832008-06-24 21:56:24 +000017680 case $ac_optarg in
Illia Bobyra96d5442023-08-30 16:30:15 +020017681 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017682 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017683 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017684 ac_need_defaults=false;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017685 --he | --h)
17686 # Conflict between --help and --header
Christian Brabandt9670f612025-05-07 21:44:33 +020017687 as_fn_error $? "ambiguous option: '$1'
17688Try '$0 --help' for more information.";;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017689 --help | --hel | -h )
Illia Bobyra96d5442023-08-30 16:30:15 +020017690 printf "%s\n" "$ac_cs_usage"; exit ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017691 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17692 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17693 ac_cs_silent=: ;;
17694
17695 # This is an error.
Christian Brabandt9670f612025-05-07 21:44:33 +020017696 -*) as_fn_error $? "unrecognized option: '$1'
17697Try '$0 --help' for more information." ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017698
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017699 *) as_fn_append ac_config_targets " $1"
Bram Moolenaar446cb832008-06-24 21:56:24 +000017700 ac_need_defaults=false ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017701
17702 esac
17703 shift
17704done
17705
17706ac_configure_extra_args=
17707
17708if $ac_cs_silent; then
17709 exec 6>/dev/null
17710 ac_configure_extra_args="$ac_configure_extra_args --silent"
17711fi
17712
17713_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +000017714cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017715if \$ac_cs_recheck; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010017716 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Bram Moolenaar446cb832008-06-24 21:56:24 +000017717 shift
Illia Bobyra96d5442023-08-30 16:30:15 +020017718 \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
Bram Moolenaar446cb832008-06-24 21:56:24 +000017719 CONFIG_SHELL='$SHELL'
17720 export CONFIG_SHELL
17721 exec "\$@"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017722fi
17723
17724_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +000017725cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17726exec 5>>auto/config.log
17727{
17728 echo
17729 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17730## Running $as_me. ##
17731_ASBOX
Illia Bobyra96d5442023-08-30 16:30:15 +020017732 printf "%s\n" "$ac_log"
Bram Moolenaar446cb832008-06-24 21:56:24 +000017733} >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017734
Bram Moolenaar446cb832008-06-24 21:56:24 +000017735_ACEOF
17736cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17737_ACEOF
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017738
Bram Moolenaar446cb832008-06-24 21:56:24 +000017739cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017740
Bram Moolenaar446cb832008-06-24 21:56:24 +000017741# Handling of arguments.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017742for ac_config_target in $ac_config_targets
17743do
Bram Moolenaar446cb832008-06-24 21:56:24 +000017744 case $ac_config_target in
17745 "auto/config.h") CONFIG_HEADERS="$CONFIG_HEADERS auto/config.h:config.h.in" ;;
17746 "auto/config.mk") CONFIG_FILES="$CONFIG_FILES auto/config.mk:config.mk.in" ;;
17747
Christian Brabandt9670f612025-05-07 21:44:33 +020017748 *) as_fn_error $? "invalid argument: '$ac_config_target'" "$LINENO" 5;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017749 esac
17750done
17751
Bram Moolenaar446cb832008-06-24 21:56:24 +000017752
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017753# If the user did not use the arguments to specify the items to instantiate,
17754# then the envvar interface is used. Set only those that are not.
17755# We use the long form for the default assignment because of an extremely
17756# bizarre bug on SunOS 4.1.3.
17757if $ac_need_defaults; then
Illia Bobyra96d5442023-08-30 16:30:15 +020017758 test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
17759 test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017760fi
17761
17762# Have a temporary directory for convenience. Make it in the build tree
Bram Moolenaar446cb832008-06-24 21:56:24 +000017763# simply because there is no reason against having it here, and in addition,
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017764# creating and moving files from /tmp can sometimes cause problems.
Bram Moolenaar446cb832008-06-24 21:56:24 +000017765# Hook for its removal unless debugging.
17766# Note that there is a small window in which the directory will not be cleaned:
Christian Brabandt9670f612025-05-07 21:44:33 +020017767# after its creation but before its name has been assigned to '$tmp'.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017768$debug ||
17769{
Bram Moolenaar7db77842014-03-27 17:40:59 +010017770 tmp= ac_tmp=
Bram Moolenaar446cb832008-06-24 21:56:24 +000017771 trap 'exit_status=$?
Bram Moolenaar7db77842014-03-27 17:40:59 +010017772 : "${ac_tmp:=$tmp}"
17773 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Bram Moolenaar446cb832008-06-24 21:56:24 +000017774' 0
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017775 trap 'as_fn_exit 1' 1 2 13 15
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017776}
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017777# Create a (secure) tmp directory for tmp files.
17778
17779{
Bram Moolenaar446cb832008-06-24 21:56:24 +000017780 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Bram Moolenaar7db77842014-03-27 17:40:59 +010017781 test -d "$tmp"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017782} ||
17783{
Bram Moolenaar446cb832008-06-24 21:56:24 +000017784 tmp=./conf$$-$RANDOM
17785 (umask 077 && mkdir "$tmp")
Bram Moolenaar7db77842014-03-27 17:40:59 +010017786} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
17787ac_tmp=$tmp
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017788
Bram Moolenaar446cb832008-06-24 21:56:24 +000017789# Set up the scripts for CONFIG_FILES section.
17790# No need to generate them if there are no CONFIG_FILES.
Christian Brabandt9670f612025-05-07 21:44:33 +020017791# This happens for instance with './config.status config.h'.
Bram Moolenaar446cb832008-06-24 21:56:24 +000017792if test -n "$CONFIG_FILES"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017793
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017794
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017795ac_cr=`echo X | tr X '\015'`
17796# On cygwin, bash can eat \r inside `` if the user requested igncr.
17797# But we know of no other shell where ac_cr would be empty at this
17798# point, so we can use a bashism as a fallback.
17799if test "x$ac_cr" = x; then
17800 eval ac_cr=\$\'\\r\'
17801fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000017802ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17803if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010017804 ac_cs_awk_cr='\\r'
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017805else
Bram Moolenaar446cb832008-06-24 21:56:24 +000017806 ac_cs_awk_cr=$ac_cr
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017807fi
17808
Bram Moolenaar7db77842014-03-27 17:40:59 +010017809echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017810_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000017811
Bram Moolenaar446cb832008-06-24 21:56:24 +000017812
17813{
17814 echo "cat >conf$$subs.awk <<_ACEOF" &&
17815 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17816 echo "_ACEOF"
17817} >conf$$subs.sh ||
Bram Moolenaar7db77842014-03-27 17:40:59 +010017818 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17819ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Bram Moolenaar446cb832008-06-24 21:56:24 +000017820ac_delim='%!_!# '
17821for ac_last_try in false false false false false :; do
17822 . ./conf$$subs.sh ||
Bram Moolenaar7db77842014-03-27 17:40:59 +010017823 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017824
Bram Moolenaar32f31b12009-05-21 13:20:59 +000017825 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17826 if test $ac_delim_n = $ac_delim_num; then
Bram Moolenaar446cb832008-06-24 21:56:24 +000017827 break
17828 elif $ac_last_try; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010017829 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017830 else
17831 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17832 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017833done
Bram Moolenaar446cb832008-06-24 21:56:24 +000017834rm -f conf$$subs.sh
17835
17836cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Bram Moolenaar7db77842014-03-27 17:40:59 +010017837cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017838_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +000017839sed -n '
17840h
17841s/^/S["/; s/!.*/"]=/
17842p
17843g
17844s/^[^!]*!//
17845:repl
17846t repl
17847s/'"$ac_delim"'$//
17848t delim
17849:nl
17850h
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017851s/\(.\{148\}\)..*/\1/
Bram Moolenaar446cb832008-06-24 21:56:24 +000017852t more1
17853s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17854p
17855n
17856b repl
17857:more1
17858s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17859p
17860g
17861s/.\{148\}//
17862t nl
17863:delim
17864h
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017865s/\(.\{148\}\)..*/\1/
Bram Moolenaar446cb832008-06-24 21:56:24 +000017866t more2
17867s/["\\]/\\&/g; s/^/"/; s/$/"/
17868p
17869b
17870:more2
17871s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17872p
17873g
17874s/.\{148\}//
17875t delim
17876' <conf$$subs.awk | sed '
17877/^[^""]/{
17878 N
17879 s/\n//
17880}
17881' >>$CONFIG_STATUS || ac_write_fail=1
17882rm -f conf$$subs.awk
17883cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17884_ACAWK
Bram Moolenaar7db77842014-03-27 17:40:59 +010017885cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Bram Moolenaar446cb832008-06-24 21:56:24 +000017886 for (key in S) S_is_set[key] = 1
17887 FS = ""
Bram Moolenaar071d4272004-06-13 20:20:40 +000017888
Bram Moolenaar446cb832008-06-24 21:56:24 +000017889}
17890{
17891 line = $ 0
17892 nfields = split(line, field, "@")
17893 substed = 0
17894 len = length(field[1])
17895 for (i = 2; i < nfields; i++) {
17896 key = field[i]
17897 keylen = length(key)
17898 if (S_is_set[key]) {
17899 value = S[key]
17900 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17901 len += length(value) + length(field[++i])
17902 substed = 1
17903 } else
17904 len += 1 + keylen
17905 }
Bram Moolenaar071d4272004-06-13 20:20:40 +000017906
Bram Moolenaar446cb832008-06-24 21:56:24 +000017907 print line
17908}
Bram Moolenaar071d4272004-06-13 20:20:40 +000017909
Bram Moolenaar446cb832008-06-24 21:56:24 +000017910_ACAWK
17911_ACEOF
17912cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17913if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17914 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17915else
17916 cat
Bram Moolenaar7db77842014-03-27 17:40:59 +010017917fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
17918 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017919_ACEOF
17920
Bram Moolenaar7db77842014-03-27 17:40:59 +010017921# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17922# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Bram Moolenaar446cb832008-06-24 21:56:24 +000017923# trailing colons and then remove the whole line if VPATH becomes empty
17924# (actually we leave an empty line to preserve line numbers).
17925if test "x$srcdir" = x.; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010017926 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17927h
17928s///
17929s/^/:/
17930s/[ ]*$/:/
17931s/:\$(srcdir):/:/g
17932s/:\${srcdir}:/:/g
17933s/:@srcdir@:/:/g
17934s/^:*//
Bram Moolenaar446cb832008-06-24 21:56:24 +000017935s/:*$//
Bram Moolenaar7db77842014-03-27 17:40:59 +010017936x
17937s/\(=[ ]*\).*/\1/
17938G
17939s/\n//
Bram Moolenaar446cb832008-06-24 21:56:24 +000017940s/^[^=]*=[ ]*$//
17941}'
17942fi
17943
17944cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17945fi # test -n "$CONFIG_FILES"
17946
17947# Set up the scripts for CONFIG_HEADERS section.
17948# No need to generate them if there are no CONFIG_HEADERS.
Christian Brabandt9670f612025-05-07 21:44:33 +020017949# This happens for instance with './config.status Makefile'.
Bram Moolenaar446cb832008-06-24 21:56:24 +000017950if test -n "$CONFIG_HEADERS"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010017951cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Bram Moolenaar446cb832008-06-24 21:56:24 +000017952BEGIN {
17953_ACEOF
17954
Christian Brabandt9670f612025-05-07 21:44:33 +020017955# Transform confdefs.h into an awk script 'defines.awk', embedded as
Bram Moolenaar446cb832008-06-24 21:56:24 +000017956# here-document in config.status, that substitutes the proper values into
17957# config.h.in to produce config.h.
17958
17959# Create a delimiter string that does not exist in confdefs.h, to ease
17960# handling of long lines.
17961ac_delim='%!_!# '
17962for ac_last_try in false false :; do
Bram Moolenaar7db77842014-03-27 17:40:59 +010017963 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17964 if test -z "$ac_tt"; then
Bram Moolenaar446cb832008-06-24 21:56:24 +000017965 break
17966 elif $ac_last_try; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010017967 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017968 else
17969 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17970 fi
17971done
17972
17973# For the awk script, D is an array of macro values keyed by name,
17974# likewise P contains macro parameters if any. Preserve backslash
17975# newline sequences.
17976
17977ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17978sed -n '
17979s/.\{148\}/&'"$ac_delim"'/g
17980t rset
17981:rset
17982s/^[ ]*#[ ]*define[ ][ ]*/ /
17983t def
17984d
17985:def
17986s/\\$//
17987t bsnl
17988s/["\\]/\\&/g
17989s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17990D["\1"]=" \3"/p
17991s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17992d
17993:bsnl
17994s/["\\]/\\&/g
17995s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17996D["\1"]=" \3\\\\\\n"\\/p
17997t cont
17998s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17999t cont
18000d
18001:cont
18002n
18003s/.\{148\}/&'"$ac_delim"'/g
18004t clear
18005:clear
18006s/\\$//
18007t bsnlc
18008s/["\\]/\\&/g; s/^/"/; s/$/"/p
18009d
18010:bsnlc
18011s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18012b cont
18013' <confdefs.h | sed '
18014s/'"$ac_delim"'/"\\\
18015"/g' >>$CONFIG_STATUS || ac_write_fail=1
18016
18017cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18018 for (key in D) D_is_set[key] = 1
18019 FS = ""
18020}
18021/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18022 line = \$ 0
18023 split(line, arg, " ")
18024 if (arg[1] == "#") {
18025 defundef = arg[2]
18026 mac1 = arg[3]
18027 } else {
18028 defundef = substr(arg[1], 2)
18029 mac1 = arg[2]
18030 }
18031 split(mac1, mac2, "(") #)
18032 macro = mac2[1]
Bram Moolenaar32f31b12009-05-21 13:20:59 +000018033 prefix = substr(line, 1, index(line, defundef) - 1)
Bram Moolenaar446cb832008-06-24 21:56:24 +000018034 if (D_is_set[macro]) {
18035 # Preserve the white space surrounding the "#".
Bram Moolenaar446cb832008-06-24 21:56:24 +000018036 print prefix "define", macro P[macro] D[macro]
18037 next
18038 } else {
18039 # Replace #undef with comments. This is necessary, for example,
18040 # in the case of _POSIX_SOURCE, which is predefined and required
18041 # on some systems where configure will not decide to define it.
18042 if (defundef == "undef") {
Bram Moolenaar32f31b12009-05-21 13:20:59 +000018043 print "/*", prefix defundef, macro, "*/"
Bram Moolenaar446cb832008-06-24 21:56:24 +000018044 next
18045 }
18046 }
18047}
18048{ print }
18049_ACAWK
18050_ACEOF
18051cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Bram Moolenaar7db77842014-03-27 17:40:59 +010018052 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000018053fi # test -n "$CONFIG_HEADERS"
18054
18055
18056eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
18057shift
18058for ac_tag
18059do
18060 case $ac_tag in
18061 :[FHLC]) ac_mode=$ac_tag; continue;;
18062 esac
18063 case $ac_mode$ac_tag in
18064 :[FHL]*:*);;
Christian Brabandt9670f612025-05-07 21:44:33 +020018065 :L* | :C*:*) as_fn_error $? "invalid tag '$ac_tag'" "$LINENO" 5;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000018066 :[FH]-) ac_tag=-:-;;
18067 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18068 esac
18069 ac_save_IFS=$IFS
18070 IFS=:
18071 set x $ac_tag
18072 IFS=$ac_save_IFS
18073 shift
18074 ac_file=$1
18075 shift
18076
18077 case $ac_mode in
18078 :L) ac_source=$1;;
18079 :[FH])
18080 ac_file_inputs=
18081 for ac_f
18082 do
18083 case $ac_f in
Bram Moolenaar7db77842014-03-27 17:40:59 +010018084 -) ac_f="$ac_tmp/stdin";;
Bram Moolenaar446cb832008-06-24 21:56:24 +000018085 *) # Look for the file first in the build tree, then in the source tree
18086 # (if the path is not absolute). The absolute path cannot be DOS-style,
Christian Brabandt9670f612025-05-07 21:44:33 +020018087 # because $ac_f cannot contain ':'.
Bram Moolenaar446cb832008-06-24 21:56:24 +000018088 test -f "$ac_f" ||
18089 case $ac_f in
18090 [\\/$]*) false;;
18091 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18092 esac ||
Christian Brabandt9670f612025-05-07 21:44:33 +020018093 as_fn_error 1 "cannot find input file: '$ac_f'" "$LINENO" 5;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000018094 esac
Illia Bobyra96d5442023-08-30 16:30:15 +020018095 case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020018096 as_fn_append ac_file_inputs " '$ac_f'"
Bram Moolenaar446cb832008-06-24 21:56:24 +000018097 done
18098
Christian Brabandt9670f612025-05-07 21:44:33 +020018099 # Let's still pretend it is 'configure' which instantiates (i.e., don't
Bram Moolenaar446cb832008-06-24 21:56:24 +000018100 # use $as_me), people would be surprised to read:
18101 # /* config.h. Generated by config.status. */
18102 configure_input='Generated from '`
Illia Bobyra96d5442023-08-30 16:30:15 +020018103 printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
Bram Moolenaar446cb832008-06-24 21:56:24 +000018104 `' by configure.'
18105 if test x"$ac_file" != x-; then
18106 configure_input="$ac_file. $configure_input"
Illia Bobyra96d5442023-08-30 16:30:15 +020018107 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18108printf "%s\n" "$as_me: creating $ac_file" >&6;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000018109 fi
18110 # Neutralize special characters interpreted by sed in replacement strings.
18111 case $configure_input in #(
18112 *\&* | *\|* | *\\* )
Illia Bobyra96d5442023-08-30 16:30:15 +020018113 ac_sed_conf_input=`printf "%s\n" "$configure_input" |
Bram Moolenaar446cb832008-06-24 21:56:24 +000018114 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18115 *) ac_sed_conf_input=$configure_input;;
18116 esac
18117
18118 case $ac_tag in
Bram Moolenaar7db77842014-03-27 17:40:59 +010018119 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18120 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000018121 esac
18122 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +000018123 esac
18124
Bram Moolenaar446cb832008-06-24 21:56:24 +000018125 ac_dir=`$as_dirname -- "$ac_file" ||
Bram Moolenaar495de9c2005-01-25 22:03:25 +000018126$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18127 X"$ac_file" : 'X\(//\)[^/]' \| \
18128 X"$ac_file" : 'X\(//\)$' \| \
Bram Moolenaar446cb832008-06-24 21:56:24 +000018129 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Illia Bobyra96d5442023-08-30 16:30:15 +020018130printf "%s\n" X"$ac_file" |
Bram Moolenaar446cb832008-06-24 21:56:24 +000018131 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18132 s//\1/
18133 q
18134 }
18135 /^X\(\/\/\)[^/].*/{
18136 s//\1/
18137 q
18138 }
18139 /^X\(\/\/\)$/{
18140 s//\1/
18141 q
18142 }
18143 /^X\(\/\).*/{
18144 s//\1/
18145 q
18146 }
18147 s/.*/./; q'`
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020018148 as_dir="$ac_dir"; as_fn_mkdir_p
Bram Moolenaar446cb832008-06-24 21:56:24 +000018149 ac_builddir=.
Bram Moolenaar071d4272004-06-13 20:20:40 +000018150
Bram Moolenaar446cb832008-06-24 21:56:24 +000018151case "$ac_dir" in
18152.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18153*)
Illia Bobyra96d5442023-08-30 16:30:15 +020018154 ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
Bram Moolenaar446cb832008-06-24 21:56:24 +000018155 # A ".." for each directory in $ac_dir_suffix.
Illia Bobyra96d5442023-08-30 16:30:15 +020018156 ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Bram Moolenaar446cb832008-06-24 21:56:24 +000018157 case $ac_top_builddir_sub in
18158 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18159 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18160 esac ;;
18161esac
18162ac_abs_top_builddir=$ac_pwd
18163ac_abs_builddir=$ac_pwd$ac_dir_suffix
18164# for backward compatibility:
18165ac_top_builddir=$ac_top_build_prefix
18166
18167case $srcdir in
18168 .) # We are building in place.
18169 ac_srcdir=.
18170 ac_top_srcdir=$ac_top_builddir_sub
18171 ac_abs_top_srcdir=$ac_pwd ;;
18172 [\\/]* | ?:[\\/]* ) # Absolute name.
18173 ac_srcdir=$srcdir$ac_dir_suffix;
18174 ac_top_srcdir=$srcdir
18175 ac_abs_top_srcdir=$srcdir ;;
18176 *) # Relative name.
18177 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18178 ac_top_srcdir=$ac_top_build_prefix$srcdir
18179 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
18180esac
18181ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
18182
18183
18184 case $ac_mode in
18185 :F)
18186 #
18187 # CONFIG_FILE
18188 #
18189
Bram Moolenaar495de9c2005-01-25 22:03:25 +000018190_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000018191
Bram Moolenaar446cb832008-06-24 21:56:24 +000018192cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18193# If the template does not know about datarootdir, expand it.
18194# FIXME: This hack should be removed a few years after 2.60.
18195ac_datarootdir_hack=; ac_datarootdir_seen=
Bram Moolenaar446cb832008-06-24 21:56:24 +000018196ac_sed_dataroot='
18197/datarootdir/ {
18198 p
18199 q
18200}
18201/@datadir@/p
18202/@docdir@/p
18203/@infodir@/p
18204/@localedir@/p
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020018205/@mandir@/p'
Bram Moolenaar446cb832008-06-24 21:56:24 +000018206case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
18207*datarootdir*) ac_datarootdir_seen=yes;;
18208*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Illia Bobyra96d5442023-08-30 16:30:15 +020018209 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18210printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000018211_ACEOF
18212cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18213 ac_datarootdir_hack='
18214 s&@datadir@&$datadir&g
18215 s&@docdir@&$docdir&g
18216 s&@infodir@&$infodir&g
18217 s&@localedir@&$localedir&g
18218 s&@mandir@&$mandir&g
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020018219 s&\\\${datarootdir}&$datarootdir&g' ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000018220esac
18221_ACEOF
18222
Christian Brabandt9670f612025-05-07 21:44:33 +020018223# Neutralize VPATH when '$srcdir' = '.'.
Bram Moolenaar446cb832008-06-24 21:56:24 +000018224# Shell code in configure.ac might set extrasub.
18225# FIXME: do we really want to maintain this feature?
18226cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18227ac_sed_extra="$ac_vpsub
18228$extrasub
18229_ACEOF
18230cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18231:t
18232/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18233s|@configure_input@|$ac_sed_conf_input|;t t
18234s&@top_builddir@&$ac_top_builddir_sub&;t t
18235s&@top_build_prefix@&$ac_top_build_prefix&;t t
18236s&@srcdir@&$ac_srcdir&;t t
18237s&@abs_srcdir@&$ac_abs_srcdir&;t t
18238s&@top_srcdir@&$ac_top_srcdir&;t t
18239s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18240s&@builddir@&$ac_builddir&;t t
18241s&@abs_builddir@&$ac_abs_builddir&;t t
18242s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18243$ac_datarootdir_hack
18244"
Bram Moolenaar7db77842014-03-27 17:40:59 +010018245eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18246 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000018247
18248test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Bram Moolenaar7db77842014-03-27 17:40:59 +010018249 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18250 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18251 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Christian Brabandt9670f612025-05-07 21:44:33 +020018252 { 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 +010018253which seems to be undefined. Please make sure it is defined" >&5
Christian Brabandt9670f612025-05-07 21:44:33 +020018254printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable 'datarootdir'
Bram Moolenaar7db77842014-03-27 17:40:59 +010018255which seems to be undefined. Please make sure it is defined" >&2;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000018256
Bram Moolenaar7db77842014-03-27 17:40:59 +010018257 rm -f "$ac_tmp/stdin"
Bram Moolenaar446cb832008-06-24 21:56:24 +000018258 case $ac_file in
Bram Moolenaar7db77842014-03-27 17:40:59 +010018259 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18260 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Bram Moolenaar446cb832008-06-24 21:56:24 +000018261 esac \
Bram Moolenaar7db77842014-03-27 17:40:59 +010018262 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000018263 ;;
18264 :H)
18265 #
18266 # CONFIG_HEADER
18267 #
18268 if test x"$ac_file" != x-; then
18269 {
Illia Bobyra96d5442023-08-30 16:30:15 +020018270 printf "%s\n" "/* $configure_input */" >&1 \
Bram Moolenaar7db77842014-03-27 17:40:59 +010018271 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18272 } >"$ac_tmp/config.h" \
18273 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
18274 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Illia Bobyra96d5442023-08-30 16:30:15 +020018275 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18276printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000018277 else
18278 rm -f "$ac_file"
Bram Moolenaar7db77842014-03-27 17:40:59 +010018279 mv "$ac_tmp/config.h" "$ac_file" \
18280 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000018281 fi
18282 else
Illia Bobyra96d5442023-08-30 16:30:15 +020018283 printf "%s\n" "/* $configure_input */" >&1 \
Bram Moolenaar7db77842014-03-27 17:40:59 +010018284 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
18285 || as_fn_error $? "could not create -" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000018286 fi
18287 ;;
18288
18289
18290 esac
18291
18292done # for ac_tag
18293
Bram Moolenaar071d4272004-06-13 20:20:40 +000018294
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020018295as_fn_exit 0
Bram Moolenaar495de9c2005-01-25 22:03:25 +000018296_ACEOF
Bram Moolenaar495de9c2005-01-25 22:03:25 +000018297ac_clean_files=$ac_clean_files_save
18298
Bram Moolenaar446cb832008-06-24 21:56:24 +000018299test $ac_write_fail = 0 ||
Bram Moolenaar7db77842014-03-27 17:40:59 +010018300 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000018301
Bram Moolenaar495de9c2005-01-25 22:03:25 +000018302
18303# configure is writing to config.log, and then calls config.status.
18304# config.status does its own redirection, appending to config.log.
18305# Unfortunately, on DOS this fails, as config.log is still kept open
18306# by configure, so config.status won't be able to write to it; its
18307# output is simply discarded. So we exec the FD to /dev/null,
18308# effectively closing config.log, so it can be properly (re)opened and
18309# appended to by config.status. When coming back to configure, we
18310# need to make the FD available again.
18311if test "$no_create" != yes; then
18312 ac_cs_success=:
18313 ac_config_status_args=
18314 test "$silent" = yes &&
18315 ac_config_status_args="$ac_config_status_args --quiet"
18316 exec 5>/dev/null
18317 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Bram Moolenaarc7453f52006-02-10 23:20:28 +000018318 exec 5>>auto/config.log
Bram Moolenaar495de9c2005-01-25 22:03:25 +000018319 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18320 # would make configure fail if this is the last instruction.
Bram Moolenaar7db77842014-03-27 17:40:59 +010018321 $ac_cs_success || as_fn_exit 1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000018322fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000018323if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
Illia Bobyra96d5442023-08-30 16:30:15 +020018324 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18325printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000018326fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000018327
18328
Illia Bobyra96d5442023-08-30 16:30:15 +020018329