blob: 8fb31e7904bfe5d33055ef7da4049faabd2ca3e1 [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
Drew Vogel51995672025-05-28 21:13:52 +020010418if test -z "$PKG_CONFIG"; then
Bram Moolenaar427f5b62019-06-09 13:43:51 +020010419 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
Drew Vogel51995672025-05-28 21:13:52 +020010531if test -z "$SKIP_GTK3"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010532 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-gtktest argument" >&5
10533printf %s "checking --disable-gtktest argument... " >&6; }
Bram Moolenaar427f5b62019-06-09 13:43:51 +020010534 # Check whether --enable-gtktest was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010535if test ${enable_gtktest+y}
10536then :
Bram Moolenaar427f5b62019-06-09 13:43:51 +020010537 enableval=$enable_gtktest;
Christian Brabandt9670f612025-05-07 21:44:33 +020010538else case e in #(
10539 e) enable_gtktest=yes ;;
10540esac
Bram Moolenaar427f5b62019-06-09 13:43:51 +020010541fi
10542
10543 if test "x$enable_gtktest" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010544 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gtk test enabled" >&5
10545printf "%s\n" "gtk test enabled" >&6; }
Bram Moolenaar427f5b62019-06-09 13:43:51 +020010546 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010547 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gtk test disabled" >&5
10548printf "%s\n" "gtk test disabled" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010549 fi
10550
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010551 if test "x$PKG_CONFIG" != "xno"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010552
Drew Vogel51995672025-05-28 21:13:52 +020010553 min_gtk_version="3.0.0"
10554
10555 if test "$PKG_CONFIG" != "no"; then
10556 case $min_gtk_version in #(
10557 2.*) :
10558 gtk_pkg_name="gtk+-2.0" ;; #(
10559 3.*) :
10560 gtk_pkg_name="gtk+-3.0" ;; #(
10561 *) :
10562 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
10563printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
10564as_fn_error $? "The configure script does not know which pkg-config name to use for GTK $min_gtk_version\"
10565See 'config.log' for more details" "$LINENO" 5; } ;;
10566esac
10567
10568 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pkg-config $gtk_pkg_name" >&5
10569printf %s "checking for pkg-config $gtk_pkg_name... " >&6; }
10570 if "$PKG_CONFIG" --exists "$gtk_pkg_name"
10571then :
10572
10573 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found" >&5
10574printf "%s\n" "found" >&6; }
10575 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GTK - version >= $min_gtk_version" >&5
10576printf %s "checking for GTK - version >= $min_gtk_version... " >&6; }
10577 GTK_CFLAGS=`$PKG_CONFIG --cflags $gtk_pkg_name`
10578 GTK_LIBDIR=`$PKG_CONFIG --libs-only-L $gtk_pkg_name`
10579 GTK_LIBS=`$PKG_CONFIG --libs $gtk_pkg_name`
10580 gtk_major_version=`$PKG_CONFIG --modversion $gtk_pkg_name | \
10581 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
10582 gtk_minor_version=`$PKG_CONFIG --modversion $gtk_pkg_name | \
10583 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
10584 gtk_micro_version=`$PKG_CONFIG --modversion $gtk_pkg_name | \
10585 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
10586 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&5
10587printf "%s\n" "yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&6; }
10588
10589else case e in #(
10590 e)
10591 GTK_CFLAGS=""
10592 GTK_LIBDIR=""
10593 GTK_LIBS=""
10594 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no; consider installing your distro GTK -dev package" >&5
10595printf "%s\n" "no; consider installing your distro GTK -dev package" >&6; }
10596 if test "$fail_if_missing" = "yes" -a "$gui_auto" != "yes"; then
10597 as_fn_error $? "pkg-config could not find $gtk_pkg_name" "$LINENO" 5
10598 fi
10599 ;;
10600esac
10601fi
10602 fi
10603
10604 gtktest_success="yes"
10605 if test "$enable_gtktest" = "yes"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000010606 {
Drew Vogel51995672025-05-28 21:13:52 +020010607 ac_save_CFLAGS="$CFLAGS"
10608 ac_save_LIBS="$LIBS"
10609 CFLAGS="$CFLAGS $GTK_CFLAGS"
10610 LIBS="$LIBS $GTK_LIBS"
Bram Moolenaar98921892016-02-23 17:14:37 +010010611
Drew Vogel51995672025-05-28 21:13:52 +020010612 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking ability to compile GTK test program" >&5
10613printf %s "checking ability to compile GTK test program... " >&6; }
10614 if test "$cross_compiling" = yes
Illia Bobyra96d5442023-08-30 16:30:15 +020010615then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000010616 echo $ac_n "cross compiling; assumed OK... $ac_c"
Christian Brabandt9670f612025-05-07 21:44:33 +020010617else case e in #(
10618 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010619/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000010620
10621#include <gtk/gtk.h>
10622#include <stdio.h>
Bram Moolenaar446cb832008-06-24 21:56:24 +000010623#if STDC_HEADERS
10624# include <stdlib.h>
10625# include <stddef.h>
10626#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000010627
10628int
10629main ()
10630{
Drew Vogel51995672025-05-28 21:13:52 +020010631 int ex_major = $gtk_major_version;
10632 int ex_minor = $gtk_minor_version;
10633 int ex_micro = $gtk_micro_version;
Bram Moolenaar071d4272004-06-13 20:20:40 +000010634
Drew Vogel51995672025-05-28 21:13:52 +020010635 #if $gtk_major_version == 2
10636 guint ob_major = gtk_major_version;
10637 guint ob_minor = gtk_minor_version;
10638 guint ob_micro = gtk_micro_version;
10639 #else
10640 guint ob_major = gtk_get_major_version();
10641 guint ob_minor = gtk_get_minor_version();
10642 guint ob_micro = gtk_get_micro_version();
10643 #endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000010644
Drew Vogel51995672025-05-28 21:13:52 +020010645 if ((ob_major > ex_major) ||
10646 ((ob_major == ex_major)
10647 && (ob_minor > ex_minor)) ||
10648 ((ob_major == ex_major)
10649 && (ob_minor == ex_minor)
10650 && (ob_micro >= ex_micro)))
10651 return 0;
10652 else
10653 return 1;
Bram Moolenaar071d4272004-06-13 20:20:40 +000010654}
10655
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010656_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020010657if ac_fn_c_try_run "$LINENO"
10658then :
Drew Vogel51995672025-05-28 21:13:52 +020010659 gtktest_success="yes"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10660printf "%s\n" "yes" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +020010661else case e in #(
Drew Vogel51995672025-05-28 21:13:52 +020010662 e) gtktest_success="no"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10663printf "%s\n" "no" >&6; } ;;
Christian Brabandt9670f612025-05-07 21:44:33 +020010664esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010665fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010666rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
Christian Brabandt9670f612025-05-07 21:44:33 +020010667 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
10668esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010669fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000010670
Drew Vogel51995672025-05-28 21:13:52 +020010671 CFLAGS="$ac_save_CFLAGS"
10672 LIBS="$ac_save_LIBS"
Bram Moolenaar071d4272004-06-13 20:20:40 +000010673 }
Drew Vogel51995672025-05-28 21:13:52 +020010674 fi
10675
10676 if test "$gtktest_success" = "yes"; then
10677 GUI_LIB_LOC="$GTK_LIBDIR"
10678 GTK_LIBNAME="$GTK_LIBS"
10679 GUI_INC_LOC="$GTK_CFLAGS"
Bram Moolenaar071d4272004-06-13 20:20:40 +000010680 else
Drew Vogel51995672025-05-28 21:13:52 +020010681 GTK_CFLAGS=""
10682 GTK_LIBDIR=""
Bram Moolenaar071d4272004-06-13 20:20:40 +000010683 GTK_LIBS=""
Drew Vogel51995672025-05-28 21:13:52 +020010684 if test "$fail_if_missing" = "yes" -a "$gui_auto" != "yes"; then
10685 as_fn_error $? "Failed to compile GTK test program." "$LINENO" 5
10686 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000010687 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010688
10689
Bram Moolenaar071d4272004-06-13 20:20:40 +000010690
Drew Vogel51995672025-05-28 21:13:52 +020010691
10692 if test -n "$GTK_CFLAGS"; then
10693 SKIP_GTK2=YES
10694 SKIP_GNOME=YES
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010695 SKIP_MOTIF=YES
10696 GUITYPE=GTK
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010697
Drew Vogel51995672025-05-28 21:13:52 +020010698 printf "%s\n" "#define USE_GTK3 1" >>confdefs.h
10699
10700 fi
10701 fi
10702fi
10703
10704if test -z "$SKIP_GTK2"; then
10705 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-gtktest argument" >&5
10706printf %s "checking --disable-gtktest argument... " >&6; }
10707 # Check whether --enable-gtktest was given.
10708if test ${enable_gtktest+y}
10709then :
10710 enableval=$enable_gtktest;
10711else case e in #(
10712 e) enable_gtktest=yes ;;
10713esac
10714fi
10715
10716 if test "x$enable_gtktest" = "xyes" ; then
10717 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gtk test enabled" >&5
10718printf "%s\n" "gtk test enabled" >&6; }
10719 else
10720 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gtk test disabled" >&5
10721printf "%s\n" "gtk test disabled" >&6; }
10722 fi
10723
10724 if test "x$PKG_CONFIG" != "xno"; then
10725
10726 min_gtk_version="2.2.0"
10727
10728 if test "$PKG_CONFIG" != "no"; then
10729 case $min_gtk_version in #(
10730 2.*) :
10731 gtk_pkg_name="gtk+-2.0" ;; #(
10732 3.*) :
10733 gtk_pkg_name="gtk+-3.0" ;; #(
10734 *) :
10735 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
10736printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
10737as_fn_error $? "The configure script does not know which pkg-config name to use for GTK $min_gtk_version\"
10738See 'config.log' for more details" "$LINENO" 5; } ;;
10739esac
10740
10741 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pkg-config $gtk_pkg_name" >&5
10742printf %s "checking for pkg-config $gtk_pkg_name... " >&6; }
10743 if "$PKG_CONFIG" --exists "$gtk_pkg_name"
10744then :
10745
10746 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found" >&5
10747printf "%s\n" "found" >&6; }
10748 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GTK - version >= $min_gtk_version" >&5
10749printf %s "checking for GTK - version >= $min_gtk_version... " >&6; }
10750 GTK_CFLAGS=`$PKG_CONFIG --cflags $gtk_pkg_name`
10751 GTK_LIBDIR=`$PKG_CONFIG --libs-only-L $gtk_pkg_name`
10752 GTK_LIBS=`$PKG_CONFIG --libs $gtk_pkg_name`
10753 gtk_major_version=`$PKG_CONFIG --modversion $gtk_pkg_name | \
10754 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
10755 gtk_minor_version=`$PKG_CONFIG --modversion $gtk_pkg_name | \
10756 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
10757 gtk_micro_version=`$PKG_CONFIG --modversion $gtk_pkg_name | \
10758 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
10759 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&5
10760printf "%s\n" "yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&6; }
10761
10762else case e in #(
10763 e)
10764 GTK_CFLAGS=""
10765 GTK_LIBDIR=""
10766 GTK_LIBS=""
10767 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no; consider installing your distro GTK -dev package" >&5
10768printf "%s\n" "no; consider installing your distro GTK -dev package" >&6; }
10769 if test "$fail_if_missing" = "yes" -a "$gui_auto" != "yes"; then
10770 as_fn_error $? "pkg-config could not find $gtk_pkg_name" "$LINENO" 5
10771 fi
10772 ;;
10773esac
10774fi
10775 fi
10776
10777 gtktest_success="yes"
10778 if test "$enable_gtktest" = "yes"; then
10779 {
10780 ac_save_CFLAGS="$CFLAGS"
10781 ac_save_LIBS="$LIBS"
10782 CFLAGS="$CFLAGS $GTK_CFLAGS"
10783 LIBS="$LIBS $GTK_LIBS"
10784
10785 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking ability to compile GTK test program" >&5
10786printf %s "checking ability to compile GTK test program... " >&6; }
10787 if test "$cross_compiling" = yes
10788then :
10789 echo $ac_n "cross compiling; assumed OK... $ac_c"
10790else case e in #(
10791 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10792/* end confdefs.h. */
10793
10794#include <gtk/gtk.h>
10795#include <stdio.h>
10796#if STDC_HEADERS
10797# include <stdlib.h>
10798# include <stddef.h>
10799#endif
10800
10801int
10802main ()
10803{
10804 int ex_major = $gtk_major_version;
10805 int ex_minor = $gtk_minor_version;
10806 int ex_micro = $gtk_micro_version;
10807
10808 #if $gtk_major_version == 2
10809 guint ob_major = gtk_major_version;
10810 guint ob_minor = gtk_minor_version;
10811 guint ob_micro = gtk_micro_version;
10812 #else
10813 guint ob_major = gtk_get_major_version();
10814 guint ob_minor = gtk_get_minor_version();
10815 guint ob_micro = gtk_get_micro_version();
10816 #endif
10817
10818 if ((ob_major > ex_major) ||
10819 ((ob_major == ex_major)
10820 && (ob_minor > ex_minor)) ||
10821 ((ob_major == ex_major)
10822 && (ob_minor == ex_minor)
10823 && (ob_micro >= ex_micro)))
10824 return 0;
10825 else
10826 return 1;
10827}
10828
10829_ACEOF
10830if ac_fn_c_try_run "$LINENO"
10831then :
10832 gtktest_success="yes"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10833printf "%s\n" "yes" >&6; }
10834else case e in #(
10835 e) gtktest_success="no"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10836printf "%s\n" "no" >&6; } ;;
10837esac
10838fi
10839rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10840 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
10841esac
10842fi
10843
10844 CFLAGS="$ac_save_CFLAGS"
10845 LIBS="$ac_save_LIBS"
10846 }
10847 fi
10848
10849 if test "$gtktest_success" = "yes"; then
10850 GUI_LIB_LOC="$GTK_LIBDIR"
10851 GTK_LIBNAME="$GTK_LIBS"
10852 GUI_INC_LOC="$GTK_CFLAGS"
10853 else
10854 GTK_CFLAGS=""
10855 GTK_LIBDIR=""
10856 GTK_LIBS=""
10857 if test "$fail_if_missing" = "yes" -a "$gui_auto" != "yes"; then
10858 as_fn_error $? "Failed to compile GTK test program." "$LINENO" 5
10859 fi
10860 fi
10861
10862
10863
10864
10865 if test -n "$GTK_CFLAGS"; then
10866 SKIP_MOTIF=YES
10867 GUITYPE=GTK
10868
Bram Moolenaar071d4272004-06-13 20:20:40 +000010869 fi
10870 fi
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010871 if test "x$GUITYPE" = "xGTK"; then
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010872 if test -z "$SKIP_GNOME"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000010873 {
Bram Moolenaar071d4272004-06-13 20:20:40 +000010874
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010875
10876
10877
10878
10879
Bram Moolenaar446cb832008-06-24 21:56:24 +000010880# Check whether --with-gnome-includes was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010881if test ${with_gnome_includes+y}
10882then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000010883 withval=$with_gnome_includes; CFLAGS="$CFLAGS -I$withval"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010884
Bram Moolenaar446cb832008-06-24 21:56:24 +000010885fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000010886
10887
Bram Moolenaar446cb832008-06-24 21:56:24 +000010888
10889# Check whether --with-gnome-libs was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010890if test ${with_gnome_libs+y}
10891then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000010892 withval=$with_gnome_libs; LDFLAGS="$LDFLAGS -L$withval" gnome_prefix=$withval
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010893
Bram Moolenaar446cb832008-06-24 21:56:24 +000010894fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000010895
10896
Bram Moolenaar446cb832008-06-24 21:56:24 +000010897
10898# Check whether --with-gnome was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010899if test ${with_gnome+y}
10900then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000010901 withval=$with_gnome; if test x$withval = xyes; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000010902 want_gnome=yes
10903 have_gnome=yes
10904 else
10905 if test "x$withval" = xno; then
10906 want_gnome=no
10907 else
10908 want_gnome=yes
10909 LDFLAGS="$LDFLAGS -L$withval/lib"
10910 CFLAGS="$CFLAGS -I$withval/include"
10911 gnome_prefix=$withval/lib
10912 fi
10913 fi
Christian Brabandt9670f612025-05-07 21:44:33 +020010914else case e in #(
10915 e) want_gnome=yes ;;
10916esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000010917fi
10918
Bram Moolenaar071d4272004-06-13 20:20:40 +000010919
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010920 if test "x$want_gnome" = xyes; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000010921 {
Illia Bobyra96d5442023-08-30 16:30:15 +020010922 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libgnomeui-2.0" >&5
10923printf %s "checking for libgnomeui-2.0... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010924 if $PKG_CONFIG --exists libgnomeui-2.0; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010925 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10926printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010927 GNOME_LIBS=`$PKG_CONFIG --libs-only-l libgnomeui-2.0`
10928 GNOME_LIBDIR=`$PKG_CONFIG --libs-only-L libgnomeui-2.0`
10929 GNOME_INCLUDEDIR=`$PKG_CONFIG --cflags libgnomeui-2.0`
Bram Moolenaar97b2ad32006-03-18 21:40:56 +000010930
Illia Bobyra96d5442023-08-30 16:30:15 +020010931 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FreeBSD" >&5
10932printf %s "checking for FreeBSD... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +000010933 if test "$vim_cv_uname_output" = FreeBSD; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010934 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10935printf "%s\n" "yes" >&6; }
Bram Moolenaarc9b4b052006-04-30 18:54:39 +000010936 GNOME_INCLUDEDIR="$GNOME_INCLUDEDIR -D_THREAD_SAFE"
Bram Moolenaar97b2ad32006-03-18 21:40:56 +000010937 GNOME_LIBS="$GNOME_LIBS -pthread"
10938 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010939 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10940printf "%s\n" "no" >&6; }
Bram Moolenaar97b2ad32006-03-18 21:40:56 +000010941 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000010942 have_gnome=yes
10943 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010944 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10945printf "%s\n" "not found" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010946 if test "x" = xfail; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010010947 as_fn_error $? "Could not find libgnomeui-2.0 via pkg-config" "$LINENO" 5
Bram Moolenaar071d4272004-06-13 20:20:40 +000010948 fi
10949 fi
10950 }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010951 fi
10952
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010953 if test "x$have_gnome" = xyes ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010954 printf "%s\n" "#define FEAT_GUI_GNOME 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000010955
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010956 GUI_INC_LOC="$GUI_INC_LOC $GNOME_INCLUDEDIR"
10957 GTK_LIBNAME="$GTK_LIBNAME $GNOME_LIBDIR $GNOME_LIBS"
Bram Moolenaar071d4272004-06-13 20:20:40 +000010958 fi
10959 }
10960 fi
10961 fi
10962fi
10963
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010964if test "x$GUITYPE" = "xGTK"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010965 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking version of Gdk-Pixbuf" >&5
10966printf %s "checking version of Gdk-Pixbuf... " >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010967 gdk_pixbuf_version=`$PKG_CONFIG --modversion gdk-pixbuf-2.0`
10968 if test "x$gdk_pixbuf_version" != x ; then
10969 gdk_pixbuf_version_minor=`echo $gdk_pixbuf_version | \
10970 sed -e 's/[0-9][0-9]*\.\([0-9][0-9]*\)\.[0-9][0-9]*/\1/'`
10971 if test "x$gdk_pixbuf_version_minor" != x -a \
Bram Moolenaar33c31d52016-02-22 21:07:06 +010010972 $gdk_pixbuf_version_minor -ge 31 ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010973 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: OK." >&5
10974printf "%s\n" "OK." >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010975 # Extract the first word of "glib-compile-resources", so it can be a program name with args.
10976set dummy glib-compile-resources; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +020010977{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10978printf %s "checking for $ac_word... " >&6; }
10979if test ${ac_cv_path_GLIB_COMPILE_RESOURCES+y}
10980then :
10981 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020010982else case e in #(
10983 e) case $GLIB_COMPILE_RESOURCES in
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010984 [\\/]* | ?:[\\/]*)
10985 ac_cv_path_GLIB_COMPILE_RESOURCES="$GLIB_COMPILE_RESOURCES" # Let the user override the test with a path.
10986 ;;
10987 *)
10988 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10989for as_dir in $PATH
10990do
10991 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +020010992 case $as_dir in #(((
10993 '') as_dir=./ ;;
10994 */) ;;
10995 *) as_dir=$as_dir/ ;;
10996 esac
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010997 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +020010998 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10999 ac_cv_path_GLIB_COMPILE_RESOURCES="$as_dir$ac_word$ac_exec_ext"
11000 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar36e294c2015-12-29 18:55:46 +010011001 break 2
11002 fi
11003done
11004 done
11005IFS=$as_save_IFS
11006
11007 test -z "$ac_cv_path_GLIB_COMPILE_RESOURCES" && ac_cv_path_GLIB_COMPILE_RESOURCES="no"
11008 ;;
Christian Brabandt9670f612025-05-07 21:44:33 +020011009esac ;;
Bram Moolenaar36e294c2015-12-29 18:55:46 +010011010esac
11011fi
11012GLIB_COMPILE_RESOURCES=$ac_cv_path_GLIB_COMPILE_RESOURCES
11013if test -n "$GLIB_COMPILE_RESOURCES"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011014 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GLIB_COMPILE_RESOURCES" >&5
11015printf "%s\n" "$GLIB_COMPILE_RESOURCES" >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010011016else
Illia Bobyra96d5442023-08-30 16:30:15 +020011017 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11018printf "%s\n" "no" >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010011019fi
11020
11021
Illia Bobyra96d5442023-08-30 16:30:15 +020011022 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking glib-compile-resources" >&5
11023printf %s "checking glib-compile-resources... " >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010011024 if test "x$GLIB_COMPILE_RESOURCES" = xno ; then
Bram Moolenaar33c31d52016-02-22 21:07:06 +010011025 GLIB_COMPILE_RESOURCES=""
Illia Bobyra96d5442023-08-30 16:30:15 +020011026 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot be found in PATH." >&5
11027printf "%s\n" "cannot be found in PATH." >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010011028 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011029 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: usable." >&5
11030printf "%s\n" "usable." >&6; }
11031 printf "%s\n" "#define USE_GRESOURCE 1" >>confdefs.h
Bram Moolenaar36e294c2015-12-29 18:55:46 +010011032
Bram Moolenaar33c31d52016-02-22 21:07:06 +010011033 GRESOURCE_SRC="auto/gui_gtk_gresources.c"
11034 GRESOURCE_OBJ="objects/gui_gtk_gresources.o"
Bram Moolenaar36e294c2015-12-29 18:55:46 +010011035 fi
11036 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011037 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable." >&5
11038printf "%s\n" "not usable." >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010011039 fi
11040 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011041 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot obtain from pkg_config." >&5
11042printf "%s\n" "cannot obtain from pkg_config." >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010011043 fi
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011044
Illia Bobyra96d5442023-08-30 16:30:15 +020011045 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-icon-cache-update argument" >&5
11046printf %s "checking --disable-icon-cache-update argument... " >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011047 # Check whether --enable-icon_cache_update was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020011048if test ${enable_icon_cache_update+y}
11049then :
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011050 enableval=$enable_icon_cache_update;
Christian Brabandt9670f612025-05-07 21:44:33 +020011051else case e in #(
11052 e) enable_icon_cache_update="yes" ;;
11053esac
Bram Moolenaar36e294c2015-12-29 18:55:46 +010011054fi
11055
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011056 if test "$enable_icon_cache_update" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011057 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not set" >&5
11058printf "%s\n" "not set" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011059 # Extract the first word of "gtk-update-icon-cache", so it can be a program name with args.
11060set dummy gtk-update-icon-cache; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +020011061{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11062printf %s "checking for $ac_word... " >&6; }
11063if test ${ac_cv_path_GTK_UPDATE_ICON_CACHE+y}
11064then :
11065 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020011066else case e in #(
11067 e) case $GTK_UPDATE_ICON_CACHE in
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011068 [\\/]* | ?:[\\/]*)
11069 ac_cv_path_GTK_UPDATE_ICON_CACHE="$GTK_UPDATE_ICON_CACHE" # Let the user override the test with a path.
11070 ;;
11071 *)
11072 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11073for as_dir in $PATH
11074do
11075 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +020011076 case $as_dir in #(((
11077 '') as_dir=./ ;;
11078 */) ;;
11079 *) as_dir=$as_dir/ ;;
11080 esac
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011081 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +020011082 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
11083 ac_cv_path_GTK_UPDATE_ICON_CACHE="$as_dir$ac_word$ac_exec_ext"
11084 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011085 break 2
11086 fi
11087done
11088 done
11089IFS=$as_save_IFS
11090
11091 test -z "$ac_cv_path_GTK_UPDATE_ICON_CACHE" && ac_cv_path_GTK_UPDATE_ICON_CACHE="no"
11092 ;;
Christian Brabandt9670f612025-05-07 21:44:33 +020011093esac ;;
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011094esac
11095fi
11096GTK_UPDATE_ICON_CACHE=$ac_cv_path_GTK_UPDATE_ICON_CACHE
11097if test -n "$GTK_UPDATE_ICON_CACHE"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011098 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GTK_UPDATE_ICON_CACHE" >&5
11099printf "%s\n" "$GTK_UPDATE_ICON_CACHE" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011100else
Illia Bobyra96d5442023-08-30 16:30:15 +020011101 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11102printf "%s\n" "no" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011103fi
11104
11105
11106 if test "x$GTK_UPDATE_ICON_CACHE" = "xno" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011107 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found in PATH." >&5
11108printf "%s\n" "not found in PATH." >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011109 fi
11110 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011111 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: update disabled" >&5
11112printf "%s\n" "update disabled" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011113 fi
11114
Illia Bobyra96d5442023-08-30 16:30:15 +020011115 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-desktop-database-update argument" >&5
11116printf %s "checking --disable-desktop-database-update argument... " >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011117 # Check whether --enable-desktop_database_update was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020011118if test ${enable_desktop_database_update+y}
11119then :
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011120 enableval=$enable_desktop_database_update;
Christian Brabandt9670f612025-05-07 21:44:33 +020011121else case e in #(
11122 e) enable_desktop_database_update="yes" ;;
11123esac
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011124fi
11125
11126 if test "$enable_desktop_database_update" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011127 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not set" >&5
11128printf "%s\n" "not set" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011129 # Extract the first word of "update-desktop-database", so it can be a program name with args.
11130set dummy update-desktop-database; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +020011131{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11132printf %s "checking for $ac_word... " >&6; }
11133if test ${ac_cv_path_UPDATE_DESKTOP_DATABASE+y}
11134then :
11135 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020011136else case e in #(
11137 e) case $UPDATE_DESKTOP_DATABASE in
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011138 [\\/]* | ?:[\\/]*)
11139 ac_cv_path_UPDATE_DESKTOP_DATABASE="$UPDATE_DESKTOP_DATABASE" # Let the user override the test with a path.
11140 ;;
11141 *)
11142 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11143for as_dir in $PATH
11144do
11145 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +020011146 case $as_dir in #(((
11147 '') as_dir=./ ;;
11148 */) ;;
11149 *) as_dir=$as_dir/ ;;
11150 esac
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011151 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +020011152 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
11153 ac_cv_path_UPDATE_DESKTOP_DATABASE="$as_dir$ac_word$ac_exec_ext"
11154 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011155 break 2
11156 fi
11157done
11158 done
11159IFS=$as_save_IFS
11160
11161 test -z "$ac_cv_path_UPDATE_DESKTOP_DATABASE" && ac_cv_path_UPDATE_DESKTOP_DATABASE="no"
11162 ;;
Christian Brabandt9670f612025-05-07 21:44:33 +020011163esac ;;
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011164esac
11165fi
11166UPDATE_DESKTOP_DATABASE=$ac_cv_path_UPDATE_DESKTOP_DATABASE
11167if test -n "$UPDATE_DESKTOP_DATABASE"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011168 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $UPDATE_DESKTOP_DATABASE" >&5
11169printf "%s\n" "$UPDATE_DESKTOP_DATABASE" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011170else
Illia Bobyra96d5442023-08-30 16:30:15 +020011171 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11172printf "%s\n" "no" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011173fi
11174
11175
11176 if test "x$UPDATE_DESKTOP_DATABASE" = "xno" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011177 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found in PATH." >&5
11178printf "%s\n" "not found in PATH." >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011179 fi
11180 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011181 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: update disabled" >&5
11182printf "%s\n" "update disabled" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011183 fi
11184fi
11185
11186
11187
Bram Moolenaar36e294c2015-12-29 18:55:46 +010011188
11189
11190
11191
Bram Moolenaar071d4272004-06-13 20:20:40 +000011192if test -z "$SKIP_MOTIF"; then
11193 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"
11194 GUI_INC_LOC="`echo $GUI_INC_LOC|sed 's%-I%%g'`"
11195
Illia Bobyra96d5442023-08-30 16:30:15 +020011196 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for location of Motif GUI includes" >&5
11197printf %s "checking for location of Motif GUI includes... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011198 gui_includes="`echo $x_includes|sed 's%/^/^/*$%%'` `echo "$gui_XXX" | sed s/XXX/include/g` $GUI_INC_LOC"
11199 GUI_INC_LOC=
11200 for try in $gui_includes; do
11201 if test -f "$try/Xm/Xm.h"; then
11202 GUI_INC_LOC=$try
11203 fi
11204 done
11205 if test -n "$GUI_INC_LOC"; then
11206 if test "$GUI_INC_LOC" = /usr/include; then
11207 GUI_INC_LOC=
Illia Bobyra96d5442023-08-30 16:30:15 +020011208 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: in default path" >&5
11209printf "%s\n" "in default path" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011210 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011211 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GUI_INC_LOC" >&5
11212printf "%s\n" "$GUI_INC_LOC" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011213 fi
11214 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011215 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <not found>" >&5
11216printf "%s\n" "<not found>" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011217 SKIP_MOTIF=YES
11218 fi
11219fi
11220
11221
11222if test -z "$SKIP_MOTIF"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011223 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-motif-lib argument" >&5
11224printf %s "checking --with-motif-lib argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011225
Bram Moolenaar446cb832008-06-24 21:56:24 +000011226# Check whether --with-motif-lib was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020011227if test ${with_motif_lib+y}
11228then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000011229 withval=$with_motif_lib; MOTIF_LIBNAME="${withval}"
11230fi
11231
Bram Moolenaar071d4272004-06-13 20:20:40 +000011232
11233 if test -n "$MOTIF_LIBNAME"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011234 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MOTIF_LIBNAME" >&5
11235printf "%s\n" "$MOTIF_LIBNAME" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011236 GUI_LIB_LOC=
11237 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011238 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11239printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011240
11241 GUI_LIB_LOC="`echo $GUI_LIB_LOC|sed 's%-L%%g'`"
11242
Illia Bobyra96d5442023-08-30 16:30:15 +020011243 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for location of Motif GUI libs" >&5
11244printf %s "checking for location of Motif GUI libs... " >&6; }
Bram Moolenaar01967f52023-04-12 16:24:03 +010011245 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 +000011246 GUI_LIB_LOC=
11247 for try in $gui_libs; do
Kelvin Leeb4716902022-04-04 17:20:01 +010011248 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 +000011249 if test -f "$libtry"; then
11250 GUI_LIB_LOC=$try
11251 fi
11252 done
11253 done
11254 if test -n "$GUI_LIB_LOC"; then
Bram Moolenaar01967f52023-04-12 16:24:03 +010011255 if test "$GUI_LIB_LOC" = /usr/lib \
11256 -o "$GUI_LIB_LOC" = /usr/lib64 \
Bram Moolenaar6324c3b2013-06-17 20:27:18 +020011257 -o "$GUI_LIB_LOC" = /usr/lib/i386-linux-gnu \
11258 -o "$GUI_LIB_LOC" = /usr/lib/x86_64-linux-gnu; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000011259 GUI_LIB_LOC=
Illia Bobyra96d5442023-08-30 16:30:15 +020011260 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: in default path" >&5
11261printf "%s\n" "in default path" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011262 else
11263 if test -n "$GUI_LIB_LOC"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011264 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GUI_LIB_LOC" >&5
11265printf "%s\n" "$GUI_LIB_LOC" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +000011266 if test "$vim_cv_uname_output" = SunOS &&
11267 echo $vim_cv_uname_r_output | grep '^5' >/dev/null; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000011268 GUI_LIB_LOC="$GUI_LIB_LOC -R $GUI_LIB_LOC"
11269 fi
11270 fi
11271 fi
11272 MOTIF_LIBNAME=-lXm
11273 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011274 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <not found>" >&5
11275printf "%s\n" "<not found>" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011276 SKIP_MOTIF=YES
11277 fi
11278 fi
11279fi
11280
11281if test -z "$SKIP_MOTIF"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000011282 GUITYPE=MOTIF
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011283
Bram Moolenaar071d4272004-06-13 20:20:40 +000011284fi
11285
Bram Moolenaare2adcf32022-03-12 11:57:25 +000011286if test -z "$SKIP_MOTIF"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000011287 if test -n "$GUI_INC_LOC"; then
11288 GUI_INC_LOC=-I"`echo $GUI_INC_LOC|sed 's%-I%%'`"
11289 fi
11290 if test -n "$GUI_LIB_LOC"; then
11291 GUI_LIB_LOC=-L"`echo $GUI_LIB_LOC|sed 's%-L%%'`"
11292 fi
11293
11294 ldflags_save=$LDFLAGS
11295 LDFLAGS="$X_LIBS $LDFLAGS"
Illia Bobyra96d5442023-08-30 16:30:15 +020011296 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XShapeQueryExtension in -lXext" >&5
11297printf %s "checking for XShapeQueryExtension in -lXext... " >&6; }
11298if test ${ac_cv_lib_Xext_XShapeQueryExtension+y}
11299then :
11300 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020011301else case e in #(
11302 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000011303LIBS="-lXext -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011304cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011305/* end confdefs.h. */
11306
Bram Moolenaar446cb832008-06-24 21:56:24 +000011307/* Override any GCC internal prototype to avoid an error.
11308 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020011309 builtin and then its argument prototype would still apply.
11310 The 'extern "C"' is for builds by C++ compilers;
11311 although this is not generally supported in C code supporting it here
11312 has little cost and some practical benefit (sr 110532). */
11313#ifdef __cplusplus
11314extern "C"
11315#endif
11316char XShapeQueryExtension (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011317int
Illia Bobyra96d5442023-08-30 16:30:15 +020011318main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011319{
Bram Moolenaar446cb832008-06-24 21:56:24 +000011320return XShapeQueryExtension ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011321 ;
11322 return 0;
11323}
11324_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011325if ac_fn_c_try_link "$LINENO"
11326then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011327 ac_cv_lib_Xext_XShapeQueryExtension=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020011328else case e in #(
11329 e) ac_cv_lib_Xext_XShapeQueryExtension=no ;;
11330esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000011331fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011332rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011333 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020011334LIBS=$ac_check_lib_save_LIBS ;;
11335esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011336fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011337{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
11338printf "%s\n" "$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
11339if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = xyes
11340then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000011341 GUI_X_LIBS="-lXext"
Bram Moolenaar071d4272004-06-13 20:20:40 +000011342fi
11343
Illia Bobyra96d5442023-08-30 16:30:15 +020011344 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wslen in -lw" >&5
11345printf %s "checking for wslen in -lw... " >&6; }
11346if test ${ac_cv_lib_w_wslen+y}
11347then :
11348 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020011349else case e in #(
11350 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000011351LIBS="-lw $GUI_X_LIBS -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011352cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011353/* end confdefs.h. */
11354
Bram Moolenaar446cb832008-06-24 21:56:24 +000011355/* Override any GCC internal prototype to avoid an error.
11356 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020011357 builtin and then its argument prototype would still apply.
11358 The 'extern "C"' is for builds by C++ compilers;
11359 although this is not generally supported in C code supporting it here
11360 has little cost and some practical benefit (sr 110532). */
11361#ifdef __cplusplus
11362extern "C"
11363#endif
11364char wslen (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011365int
Illia Bobyra96d5442023-08-30 16:30:15 +020011366main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011367{
Bram Moolenaar446cb832008-06-24 21:56:24 +000011368return wslen ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011369 ;
11370 return 0;
11371}
11372_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011373if ac_fn_c_try_link "$LINENO"
11374then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011375 ac_cv_lib_w_wslen=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020011376else case e in #(
11377 e) ac_cv_lib_w_wslen=no ;;
11378esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000011379fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011380rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011381 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020011382LIBS=$ac_check_lib_save_LIBS ;;
11383esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011384fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011385{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wslen" >&5
11386printf "%s\n" "$ac_cv_lib_w_wslen" >&6; }
11387if test "x$ac_cv_lib_w_wslen" = xyes
11388then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000011389 X_EXTRA_LIBS="$X_EXTRA_LIBS -lw"
Bram Moolenaar071d4272004-06-13 20:20:40 +000011390fi
11391
Illia Bobyra96d5442023-08-30 16:30:15 +020011392 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlsym in -ldl" >&5
11393printf %s "checking for dlsym in -ldl... " >&6; }
11394if test ${ac_cv_lib_dl_dlsym+y}
11395then :
11396 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020011397else case e in #(
11398 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000011399LIBS="-ldl $GUI_X_LIBS -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011400cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011401/* end confdefs.h. */
11402
Bram Moolenaar446cb832008-06-24 21:56:24 +000011403/* Override any GCC internal prototype to avoid an error.
11404 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020011405 builtin and then its argument prototype would still apply.
11406 The 'extern "C"' is for builds by C++ compilers;
11407 although this is not generally supported in C code supporting it here
11408 has little cost and some practical benefit (sr 110532). */
11409#ifdef __cplusplus
11410extern "C"
11411#endif
11412char dlsym (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011413int
Illia Bobyra96d5442023-08-30 16:30:15 +020011414main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011415{
Bram Moolenaar446cb832008-06-24 21:56:24 +000011416return dlsym ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011417 ;
11418 return 0;
11419}
11420_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011421if ac_fn_c_try_link "$LINENO"
11422then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011423 ac_cv_lib_dl_dlsym=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020011424else case e in #(
11425 e) ac_cv_lib_dl_dlsym=no ;;
11426esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000011427fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011428rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011429 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020011430LIBS=$ac_check_lib_save_LIBS ;;
11431esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011432fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011433{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlsym" >&5
11434printf "%s\n" "$ac_cv_lib_dl_dlsym" >&6; }
11435if test "x$ac_cv_lib_dl_dlsym" = xyes
11436then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000011437 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldl"
Bram Moolenaar071d4272004-06-13 20:20:40 +000011438fi
11439
Illia Bobyra96d5442023-08-30 16:30:15 +020011440 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XmuCreateStippledPixmap in -lXmu" >&5
11441printf %s "checking for XmuCreateStippledPixmap in -lXmu... " >&6; }
11442if test ${ac_cv_lib_Xmu_XmuCreateStippledPixmap+y}
11443then :
11444 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020011445else case e in #(
11446 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000011447LIBS="-lXmu $GUI_X_LIBS -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011448cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011449/* end confdefs.h. */
11450
Bram Moolenaar446cb832008-06-24 21:56:24 +000011451/* Override any GCC internal prototype to avoid an error.
11452 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020011453 builtin and then its argument prototype would still apply.
11454 The 'extern "C"' is for builds by C++ compilers;
11455 although this is not generally supported in C code supporting it here
11456 has little cost and some practical benefit (sr 110532). */
11457#ifdef __cplusplus
11458extern "C"
11459#endif
11460char XmuCreateStippledPixmap (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011461int
Illia Bobyra96d5442023-08-30 16:30:15 +020011462main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011463{
Bram Moolenaar446cb832008-06-24 21:56:24 +000011464return XmuCreateStippledPixmap ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011465 ;
11466 return 0;
11467}
11468_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011469if ac_fn_c_try_link "$LINENO"
11470then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011471 ac_cv_lib_Xmu_XmuCreateStippledPixmap=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020011472else case e in #(
11473 e) ac_cv_lib_Xmu_XmuCreateStippledPixmap=no ;;
11474esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000011475fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011476rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011477 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020011478LIBS=$ac_check_lib_save_LIBS ;;
11479esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011480fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011481{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuCreateStippledPixmap" >&5
11482printf "%s\n" "$ac_cv_lib_Xmu_XmuCreateStippledPixmap" >&6; }
11483if test "x$ac_cv_lib_Xmu_XmuCreateStippledPixmap" = xyes
11484then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000011485 GUI_X_LIBS="-lXmu $GUI_X_LIBS"
Bram Moolenaar071d4272004-06-13 20:20:40 +000011486fi
11487
11488 if test -z "$SKIP_MOTIF"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011489 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XpEndJob in -lXp" >&5
11490printf %s "checking for XpEndJob in -lXp... " >&6; }
11491if test ${ac_cv_lib_Xp_XpEndJob+y}
11492then :
11493 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020011494else case e in #(
11495 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000011496LIBS="-lXp $GUI_X_LIBS -lXm -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011497cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011498/* end confdefs.h. */
11499
Bram Moolenaar446cb832008-06-24 21:56:24 +000011500/* Override any GCC internal prototype to avoid an error.
11501 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020011502 builtin and then its argument prototype would still apply.
11503 The 'extern "C"' is for builds by C++ compilers;
11504 although this is not generally supported in C code supporting it here
11505 has little cost and some practical benefit (sr 110532). */
11506#ifdef __cplusplus
11507extern "C"
11508#endif
11509char XpEndJob (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011510int
Illia Bobyra96d5442023-08-30 16:30:15 +020011511main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011512{
Bram Moolenaar446cb832008-06-24 21:56:24 +000011513return XpEndJob ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011514 ;
11515 return 0;
11516}
11517_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011518if ac_fn_c_try_link "$LINENO"
11519then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011520 ac_cv_lib_Xp_XpEndJob=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020011521else case e in #(
11522 e) ac_cv_lib_Xp_XpEndJob=no ;;
11523esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000011524fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011525rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011526 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020011527LIBS=$ac_check_lib_save_LIBS ;;
11528esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011529fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011530{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpEndJob" >&5
11531printf "%s\n" "$ac_cv_lib_Xp_XpEndJob" >&6; }
11532if test "x$ac_cv_lib_Xp_XpEndJob" = xyes
11533then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000011534 GUI_X_LIBS="-lXp $GUI_X_LIBS"
Bram Moolenaar071d4272004-06-13 20:20:40 +000011535fi
11536
11537 fi
11538 LDFLAGS=$ldflags_save
11539
Illia Bobyra96d5442023-08-30 16:30:15 +020011540 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for extra X11 defines" >&5
11541printf %s "checking for extra X11 defines... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011542 NARROW_PROTO=
11543 rm -fr conftestdir
11544 if mkdir conftestdir; then
11545 cd conftestdir
11546 cat > Imakefile <<'EOF'
11547acfindx:
11548 @echo 'NARROW_PROTO="${PROTO_DEFINES}"'
11549EOF
11550 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
11551 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
11552 fi
11553 cd ..
11554 rm -fr conftestdir
11555 fi
11556 if test -z "$NARROW_PROTO"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011557 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11558printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011559 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011560 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NARROW_PROTO" >&5
11561printf "%s\n" "$NARROW_PROTO" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011562 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011563
Bram Moolenaar071d4272004-06-13 20:20:40 +000011564fi
11565
11566if test "$enable_xsmp" = "yes"; then
11567 cppflags_save=$CPPFLAGS
11568 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
Illia Bobyra96d5442023-08-30 16:30:15 +020011569 ac_fn_c_check_header_compile "$LINENO" "X11/SM/SMlib.h" "ac_cv_header_X11_SM_SMlib_h" "$ac_includes_default"
11570if test "x$ac_cv_header_X11_SM_SMlib_h" = xyes
11571then :
11572 printf "%s\n" "#define HAVE_X11_SM_SMLIB_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011573
11574fi
11575
Bram Moolenaar071d4272004-06-13 20:20:40 +000011576 CPPFLAGS=$cppflags_save
11577fi
11578
11579
Bram Moolenaarf52fac22022-03-11 16:01:26 +000011580if test -z "$SKIP_MOTIF" -o -z "$SKIP_GTK2" -o -z "$SKIP_GTK3"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000011581 cppflags_save=$CPPFLAGS
11582 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
Illia Bobyra96d5442023-08-30 16:30:15 +020011583 ac_fn_c_check_header_compile "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default"
11584if test "x$ac_cv_header_X11_xpm_h" = xyes
11585then :
11586 printf "%s\n" "#define HAVE_X11_XPM_H 1" >>confdefs.h
11587
11588fi
11589ac_fn_c_check_header_compile "$LINENO" "X11/Sunkeysym.h" "ac_cv_header_X11_Sunkeysym_h" "$ac_includes_default"
11590if test "x$ac_cv_header_X11_Sunkeysym_h" = xyes
11591then :
11592 printf "%s\n" "#define HAVE_X11_SUNKEYSYM_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011593
11594fi
11595
Bram Moolenaar071d4272004-06-13 20:20:40 +000011596
11597 if test ! "$enable_xim" = "no"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011598 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XIMText in X11/Xlib.h" >&5
11599printf %s "checking for XIMText in X11/Xlib.h... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011601/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000011602#include <X11/Xlib.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011603_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000011604if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Christian Brabandt9670f612025-05-07 21:44:33 +020011605 $EGREP_TRADITIONAL "XIMText" >/dev/null 2>&1
Illia Bobyra96d5442023-08-30 16:30:15 +020011606then :
11607 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11608printf "%s\n" "yes" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +020011609else case e in #(
11610 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no; xim has been disabled" >&5
11611printf "%s\n" "no; xim has been disabled" >&6; }; enable_xim="no" ;;
11612esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000011613fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011614rm -rf conftest*
Bram Moolenaar071d4272004-06-13 20:20:40 +000011615
11616 fi
11617 CPPFLAGS=$cppflags_save
11618
Bram Moolenaar54612582019-11-21 17:13:31 +010011619 if test "$enable_xim" = "auto" -a "x$GUITYPE" != "xNONE" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011620 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: X GUI selected; xim has been enabled" >&5
11621printf "%s\n" "X GUI selected; xim has been enabled" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011622 enable_xim="yes"
11623 fi
11624fi
11625
Bram Moolenaarf52fac22022-03-11 16:01:26 +000011626if test -z "$SKIP_MOTIF"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000011627 cppflags_save=$CPPFLAGS
11628 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
Illia Bobyra96d5442023-08-30 16:30:15 +020011629 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for X11/Xmu/Editres.h" >&5
11630printf %s "checking for X11/Xmu/Editres.h... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011631 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011632/* end confdefs.h. */
Bram Moolenaar2ce06f62005-01-31 19:19:04 +000011633
11634#include <X11/Intrinsic.h>
11635#include <X11/Xmu/Editres.h>
11636int
Illia Bobyra96d5442023-08-30 16:30:15 +020011637main (void)
Bram Moolenaar2ce06f62005-01-31 19:19:04 +000011638{
11639int i; i = 0;
11640 ;
11641 return 0;
11642}
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011643_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011644if ac_fn_c_try_compile "$LINENO"
11645then :
11646 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11647printf "%s\n" "yes" >&6; }
11648 printf "%s\n" "#define HAVE_X11_XMU_EDITRES_H 1" >>confdefs.h
Bram Moolenaar2ce06f62005-01-31 19:19:04 +000011649
Christian Brabandt9670f612025-05-07 21:44:33 +020011650else case e in #(
11651 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11652printf "%s\n" "no" >&6; } ;;
11653esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000011654fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011655rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000011656 CPPFLAGS=$cppflags_save
11657fi
11658
11659if test -z "$SKIP_MOTIF"; then
11660 cppflags_save=$CPPFLAGS
11661 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
Bram Moolenaar77c19352012-06-13 19:19:41 +020011662 if test "$zOSUnix" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011663 ac_fn_c_check_header_compile "$LINENO" "Xm/Xm.h" "ac_cv_header_Xm_Xm_h" "$ac_includes_default"
11664if test "x$ac_cv_header_Xm_Xm_h" = xyes
11665then :
11666 printf "%s\n" "#define HAVE_XM_XM_H 1" >>confdefs.h
Bram Moolenaar1004b3d2022-06-05 19:51:55 +010011667
11668fi
11669
Bram Moolenaar77c19352012-06-13 19:19:41 +020011670 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011671 ac_fn_c_check_header_compile "$LINENO" "Xm/Xm.h" "ac_cv_header_Xm_Xm_h" "$ac_includes_default"
11672if test "x$ac_cv_header_Xm_Xm_h" = xyes
11673then :
11674 printf "%s\n" "#define HAVE_XM_XM_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011675
11676fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011677ac_fn_c_check_header_compile "$LINENO" "Xm/XpmP.h" "ac_cv_header_Xm_XpmP_h" "$ac_includes_default"
11678if test "x$ac_cv_header_Xm_XpmP_h" = xyes
11679then :
11680 printf "%s\n" "#define HAVE_XM_XPMP_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011681
Illia Bobyra96d5442023-08-30 16:30:15 +020011682fi
11683ac_fn_c_check_header_compile "$LINENO" "Xm/JoinSideT.h" "ac_cv_header_Xm_JoinSideT_h" "$ac_includes_default"
11684if test "x$ac_cv_header_Xm_JoinSideT_h" = xyes
11685then :
11686 printf "%s\n" "#define HAVE_XM_JOINSIDET_H 1" >>confdefs.h
11687
11688fi
11689ac_fn_c_check_header_compile "$LINENO" "Xm/TraitP.h" "ac_cv_header_Xm_TraitP_h" "$ac_includes_default"
11690if test "x$ac_cv_header_Xm_TraitP_h" = xyes
11691then :
11692 printf "%s\n" "#define HAVE_XM_TRAITP_H 1" >>confdefs.h
11693
11694fi
11695ac_fn_c_check_header_compile "$LINENO" "Xm/Manager.h" "ac_cv_header_Xm_Manager_h" "$ac_includes_default"
11696if test "x$ac_cv_header_Xm_Manager_h" = xyes
11697then :
11698 printf "%s\n" "#define HAVE_XM_MANAGER_H 1" >>confdefs.h
11699
11700fi
11701ac_fn_c_check_header_compile "$LINENO" "Xm/UnhighlightT.h" "ac_cv_header_Xm_UnhighlightT_h" "$ac_includes_default"
11702if test "x$ac_cv_header_Xm_UnhighlightT_h" = xyes
11703then :
11704 printf "%s\n" "#define HAVE_XM_UNHIGHLIGHTT_H 1" >>confdefs.h
11705
11706fi
11707ac_fn_c_check_header_compile "$LINENO" "Xm/Notebook.h" "ac_cv_header_Xm_Notebook_h" "$ac_includes_default"
11708if test "x$ac_cv_header_Xm_Notebook_h" = xyes
11709then :
11710 printf "%s\n" "#define HAVE_XM_NOTEBOOK_H 1" >>confdefs.h
11711
11712fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000011713
Bram Moolenaar1004b3d2022-06-05 19:51:55 +010011714 fi
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011715
Bram Moolenaar77c19352012-06-13 19:19:41 +020011716 if test "x$ac_cv_header_Xm_XpmP_h" = "xyes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011717 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XpmAttributes_21 in Xm/XpmP.h" >&5
11718printf %s "checking for XpmAttributes_21 in Xm/XpmP.h... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011720/* end confdefs.h. */
11721#include <Xm/XpmP.h>
11722int
Illia Bobyra96d5442023-08-30 16:30:15 +020011723main (void)
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011724{
11725XpmAttributes_21 attr;
11726 ;
11727 return 0;
11728}
11729_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011730if ac_fn_c_try_compile "$LINENO"
11731then :
11732 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11733printf "%s\n" "yes" >&6; }; printf "%s\n" "#define XPMATTRIBUTES_TYPE XpmAttributes_21" >>confdefs.h
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011734
Christian Brabandt9670f612025-05-07 21:44:33 +020011735else case e in #(
11736 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +020011737printf "%s\n" "no" >&6; }; printf "%s\n" "#define XPMATTRIBUTES_TYPE XpmAttributes" >>confdefs.h
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011738
Christian Brabandt9670f612025-05-07 21:44:33 +020011739 ;;
11740esac
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011741fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011742rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011743 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011744 printf "%s\n" "#define XPMATTRIBUTES_TYPE XpmAttributes" >>confdefs.h
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011745
11746 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000011747 CPPFLAGS=$cppflags_save
11748fi
11749
11750if test "x$GUITYPE" = "xNONE" -a "$enable_xim" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011751 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no GUI selected; xim has been disabled" >&5
11752printf "%s\n" "no GUI selected; xim has been disabled" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011753 enable_xim="no"
11754fi
11755if test "x$GUITYPE" = "xNONE" -a "$enable_fontset" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011756 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no GUI selected; fontset has been disabled" >&5
11757printf "%s\n" "no GUI selected; fontset has been disabled" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011758 enable_fontset="no"
11759fi
Bram Moolenaar182c5be2010-06-25 05:37:59 +020011760if test "x$GUITYPE:$enable_fontset" = "xGTK:yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011761 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: GTK+ 2 GUI selected; fontset has been disabled" >&5
11762printf "%s\n" "GTK+ 2 GUI selected; fontset has been disabled" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011763 enable_fontset="no"
11764fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000011765
Bram Moolenaarb3f74062020-02-26 16:16:53 +010011766if test -z "$SKIP_HAIKU"; then
11767 GUITYPE=HAIKUGUI
11768fi
11769
Bram Moolenaar071d4272004-06-13 20:20:40 +000011770if test -z "$SKIP_PHOTON"; then
11771 GUITYPE=PHOTONGUI
11772fi
11773
11774
11775
11776
11777
11778
11779if test "$enable_workshop" = "yes" -a -n "$SKIP_MOTIF"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010011780 as_fn_error $? "cannot use workshop without Motif" "$LINENO" 5
Bram Moolenaar071d4272004-06-13 20:20:40 +000011781fi
11782
11783if test "$enable_xim" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011784 printf "%s\n" "#define FEAT_XIM 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000011785
11786fi
11787if test "$enable_fontset" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011788 printf "%s\n" "#define FEAT_XFONTSET 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000011789
11790fi
11791
11792
11793
Illia Bobyra96d5442023-08-30 16:30:15 +020011794{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for /proc link to executable" >&5
11795printf %s "checking for /proc link to executable... " >&6; }
Bram Moolenaar5f69fee2017-03-09 11:58:40 +010011796if test -L "/proc/self/exe"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011797 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: /proc/self/exe" >&5
11798printf "%s\n" "/proc/self/exe" >&6; }
11799 printf "%s\n" "#define PROC_EXE_LINK \"/proc/self/exe\"" >>confdefs.h
Bram Moolenaarf3757f02017-03-16 15:13:45 +010011800
11801elif test -L "/proc/self/path/a.out"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011802 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: /proc/self/path/a.out" >&5
11803printf "%s\n" "/proc/self/path/a.out" >&6; }
11804 printf "%s\n" "#define PROC_EXE_LINK \"/proc/self/path/a.out\"" >>confdefs.h
Bram Moolenaarf3757f02017-03-16 15:13:45 +010011805
11806elif test -L "/proc/curproc/file"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011807 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: /proc/curproc/file" >&5
11808printf "%s\n" "/proc/curproc/file" >&6; }
11809 printf "%s\n" "#define PROC_EXE_LINK \"/proc/curproc/file\"" >>confdefs.h
Bram Moolenaar5f69fee2017-03-09 11:58:40 +010011810
11811else
Illia Bobyra96d5442023-08-30 16:30:15 +020011812 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11813printf "%s\n" "no" >&6; }
Bram Moolenaar5f69fee2017-03-09 11:58:40 +010011814fi
11815
Illia Bobyra96d5442023-08-30 16:30:15 +020011816{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CYGWIN or MSYS environment" >&5
11817printf %s "checking for CYGWIN or MSYS environment... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +000011818case $vim_cv_uname_output in
Illia Bobyra96d5442023-08-30 16:30:15 +020011819 CYGWIN*|MSYS*) CYGWIN=yes; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11820printf "%s\n" "yes" >&6; }
11821 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CYGWIN clipboard support" >&5
11822printf %s "checking for CYGWIN clipboard support... " >&6; }
Bram Moolenaar693e40c2013-02-26 14:56:42 +010011823 if test "x$with_x" = "xno" ; then
11824 OS_EXTRA_SRC=winclip.c; OS_EXTRA_OBJ=objects/winclip.o
Illia Bobyra96d5442023-08-30 16:30:15 +020011825 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11826printf "%s\n" "yes" >&6; }
11827 printf "%s\n" "#define FEAT_CYGWIN_WIN32_CLIPBOARD 1" >>confdefs.h
Bram Moolenaar693e40c2013-02-26 14:56:42 +010011828
11829 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011830 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no - using X11" >&5
11831printf "%s\n" "no - using X11" >&6; }
Bram Moolenaar693e40c2013-02-26 14:56:42 +010011832 fi ;;
11833
Illia Bobyra96d5442023-08-30 16:30:15 +020011834 *) CYGWIN=no; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11835printf "%s\n" "no" >&6; };;
Bram Moolenaar693e40c2013-02-26 14:56:42 +010011836esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000011837
Bram Moolenaar071d4272004-06-13 20:20:40 +000011838
Illia Bobyra96d5442023-08-30 16:30:15 +020011839{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether toupper is broken" >&5
11840printf %s "checking whether toupper is broken... " >&6; }
11841if test ${vim_cv_toupper_broken+y}
11842then :
11843 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020011844else case e in #(
11845 e)
Illia Bobyra96d5442023-08-30 16:30:15 +020011846 if test "$cross_compiling" = yes
11847then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000011848
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010011849 vim_cv_toupper_broken=no
11850 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cross-compiling: consider setting 'vim_cv_toupper_broken'" >&5
11851printf "%s\n" "$as_me: WARNING: cross-compiling: consider setting 'vim_cv_toupper_broken'" >&2;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000011852
Christian Brabandt9670f612025-05-07 21:44:33 +020011853else case e in #(
11854 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011855/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000011856
11857#include "confdefs.h"
Bram Moolenaar071d4272004-06-13 20:20:40 +000011858#include <ctype.h>
Bram Moolenaar446cb832008-06-24 21:56:24 +000011859#if STDC_HEADERS
11860# include <stdlib.h>
11861# include <stddef.h>
11862#endif
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010011863int main() { exit(toupper('A') == 'A' && tolower('z') == 'z'); }
Bram Moolenaar446cb832008-06-24 21:56:24 +000011864
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011865_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011866if ac_fn_c_try_run "$LINENO"
11867then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000011868
11869 vim_cv_toupper_broken=yes
11870
Christian Brabandt9670f612025-05-07 21:44:33 +020011871else case e in #(
11872 e)
Bram Moolenaar446cb832008-06-24 21:56:24 +000011873 vim_cv_toupper_broken=no
Christian Brabandt9670f612025-05-07 21:44:33 +020011874 ;;
11875esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000011876fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011877rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
Christian Brabandt9670f612025-05-07 21:44:33 +020011878 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
11879esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000011880fi
Christian Brabandt9670f612025-05-07 21:44:33 +020011881 ;;
11882esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000011883fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011884{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_toupper_broken" >&5
11885printf "%s\n" "$vim_cv_toupper_broken" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000011886
11887if test "x$vim_cv_toupper_broken" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011888 printf "%s\n" "#define BROKEN_TOUPPER 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000011889
11890fi
11891
Illia Bobyra96d5442023-08-30 16:30:15 +020011892{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __DATE__ and __TIME__ work" >&5
11893printf %s "checking whether __DATE__ and __TIME__ work... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011894cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011895/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000011896#include <stdio.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011897int
Illia Bobyra96d5442023-08-30 16:30:15 +020011898main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011899{
Bram Moolenaar071d4272004-06-13 20:20:40 +000011900printf("(" __DATE__ " " __TIME__ ")");
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011901 ;
11902 return 0;
11903}
11904_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011905if ac_fn_c_try_compile "$LINENO"
11906then :
11907 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11908printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_DATE_TIME 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000011909
Christian Brabandt9670f612025-05-07 21:44:33 +020011910else case e in #(
11911 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11912printf "%s\n" "no" >&6; } ;;
11913esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000011914fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011915rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000011916
Illia Bobyra96d5442023-08-30 16:30:15 +020011917{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __attribute__((unused)) is allowed" >&5
11918printf %s "checking whether __attribute__((unused)) is allowed... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011919cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar0c094b92009-05-14 20:20:33 +000011920/* end confdefs.h. */
11921#include <stdio.h>
11922int
Illia Bobyra96d5442023-08-30 16:30:15 +020011923main (void)
Bram Moolenaar0c094b92009-05-14 20:20:33 +000011924{
11925int x __attribute__((unused));
11926 ;
11927 return 0;
11928}
11929_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011930if ac_fn_c_try_compile "$LINENO"
11931then :
11932 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11933printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_ATTRIBUTE_UNUSED 1" >>confdefs.h
Bram Moolenaar0c094b92009-05-14 20:20:33 +000011934
Christian Brabandt9670f612025-05-07 21:44:33 +020011935else case e in #(
11936 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11937printf "%s\n" "no" >&6; } ;;
11938esac
Bram Moolenaar0c094b92009-05-14 20:20:33 +000011939fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011940rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0c094b92009-05-14 20:20:33 +000011941
Bram Moolenaar071d4272004-06-13 20:20:40 +000011942ac_header_dirent=no
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011943for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Christian Brabandt9670f612025-05-07 21:44:33 +020011944 as_ac_Header=`printf "%s\n" "ac_cv_header_dirent_$ac_hdr" | sed "$as_sed_sh"`
Illia Bobyra96d5442023-08-30 16:30:15 +020011945{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
11946printf %s "checking for $ac_hdr that defines DIR... " >&6; }
11947if eval test \${$as_ac_Header+y}
11948then :
11949 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020011950else case e in #(
11951 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011952/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000011953#include <sys/types.h>
11954#include <$ac_hdr>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011955
11956int
Illia Bobyra96d5442023-08-30 16:30:15 +020011957main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011958{
11959if ((DIR *) 0)
11960return 0;
11961 ;
11962 return 0;
11963}
11964_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011965if ac_fn_c_try_compile "$LINENO"
11966then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011967 eval "$as_ac_Header=yes"
Christian Brabandt9670f612025-05-07 21:44:33 +020011968else case e in #(
11969 e) eval "$as_ac_Header=no" ;;
11970esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000011971fi
Christian Brabandt9670f612025-05-07 21:44:33 +020011972rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
11973esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000011974fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011975eval ac_res=\$$as_ac_Header
Illia Bobyra96d5442023-08-30 16:30:15 +020011976 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11977printf "%s\n" "$ac_res" >&6; }
11978if eval test \"x\$"$as_ac_Header"\" = x"yes"
11979then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011980 cat >>confdefs.h <<_ACEOF
Christian Brabandt9670f612025-05-07 21:44:33 +020011981#define `printf "%s\n" "HAVE_$ac_hdr" | sed "$as_sed_cpp"` 1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011982_ACEOF
11983
11984ac_header_dirent=$ac_hdr; break
Bram Moolenaar071d4272004-06-13 20:20:40 +000011985fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011986
Bram Moolenaar071d4272004-06-13 20:20:40 +000011987done
11988# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
11989if test $ac_header_dirent = dirent.h; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011990 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
11991printf %s "checking for library containing opendir... " >&6; }
11992if test ${ac_cv_search_opendir+y}
11993then :
11994 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020011995else case e in #(
11996 e) ac_func_search_save_LIBS=$LIBS
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011997cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011998/* end confdefs.h. */
11999
Bram Moolenaar446cb832008-06-24 21:56:24 +000012000/* Override any GCC internal prototype to avoid an error.
12001 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020012002 builtin and then its argument prototype would still apply.
12003 The 'extern "C"' is for builds by C++ compilers;
12004 although this is not generally supported in C code supporting it here
12005 has little cost and some practical benefit (sr 110532). */
12006#ifdef __cplusplus
12007extern "C"
12008#endif
12009char opendir (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012010int
Illia Bobyra96d5442023-08-30 16:30:15 +020012011main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012012{
Bram Moolenaar446cb832008-06-24 21:56:24 +000012013return opendir ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012014 ;
12015 return 0;
12016}
12017_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012018for ac_lib in '' dir
12019do
Bram Moolenaar446cb832008-06-24 21:56:24 +000012020 if test -z "$ac_lib"; then
12021 ac_res="none required"
12022 else
12023 ac_res=-l$ac_lib
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012024 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Bram Moolenaar446cb832008-06-24 21:56:24 +000012025 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012026 if ac_fn_c_try_link "$LINENO"
12027then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000012028 ac_cv_search_opendir=$ac_res
Bram Moolenaar071d4272004-06-13 20:20:40 +000012029fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012030rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012031 conftest$ac_exeext
Illia Bobyra96d5442023-08-30 16:30:15 +020012032 if test ${ac_cv_search_opendir+y}
12033then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000012034 break
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012035fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000012036done
Illia Bobyra96d5442023-08-30 16:30:15 +020012037if test ${ac_cv_search_opendir+y}
12038then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012039
Christian Brabandt9670f612025-05-07 21:44:33 +020012040else case e in #(
12041 e) ac_cv_search_opendir=no ;;
12042esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000012043fi
12044rm conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020012045LIBS=$ac_func_search_save_LIBS ;;
12046esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012047fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012048{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
12049printf "%s\n" "$ac_cv_search_opendir" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000012050ac_res=$ac_cv_search_opendir
Illia Bobyra96d5442023-08-30 16:30:15 +020012051if test "$ac_res" != no
12052then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000012053 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012054
12055fi
12056
Bram Moolenaar071d4272004-06-13 20:20:40 +000012057else
Illia Bobyra96d5442023-08-30 16:30:15 +020012058 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
12059printf %s "checking for library containing opendir... " >&6; }
12060if test ${ac_cv_search_opendir+y}
12061then :
12062 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020012063else case e in #(
12064 e) ac_func_search_save_LIBS=$LIBS
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012065cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012066/* end confdefs.h. */
12067
Bram Moolenaar446cb832008-06-24 21:56:24 +000012068/* Override any GCC internal prototype to avoid an error.
12069 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020012070 builtin and then its argument prototype would still apply.
12071 The 'extern "C"' is for builds by C++ compilers;
12072 although this is not generally supported in C code supporting it here
12073 has little cost and some practical benefit (sr 110532). */
12074#ifdef __cplusplus
12075extern "C"
12076#endif
12077char opendir (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012078int
Illia Bobyra96d5442023-08-30 16:30:15 +020012079main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012080{
Bram Moolenaar446cb832008-06-24 21:56:24 +000012081return opendir ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012082 ;
12083 return 0;
12084}
12085_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012086for ac_lib in '' x
12087do
Bram Moolenaar446cb832008-06-24 21:56:24 +000012088 if test -z "$ac_lib"; then
12089 ac_res="none required"
12090 else
12091 ac_res=-l$ac_lib
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012092 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Bram Moolenaar446cb832008-06-24 21:56:24 +000012093 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012094 if ac_fn_c_try_link "$LINENO"
12095then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000012096 ac_cv_search_opendir=$ac_res
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012097fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012098rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012099 conftest$ac_exeext
Illia Bobyra96d5442023-08-30 16:30:15 +020012100 if test ${ac_cv_search_opendir+y}
12101then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000012102 break
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012103fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000012104done
Illia Bobyra96d5442023-08-30 16:30:15 +020012105if test ${ac_cv_search_opendir+y}
12106then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012107
Christian Brabandt9670f612025-05-07 21:44:33 +020012108else case e in #(
12109 e) ac_cv_search_opendir=no ;;
12110esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000012111fi
12112rm conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020012113LIBS=$ac_func_search_save_LIBS ;;
12114esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012115fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012116{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
12117printf "%s\n" "$ac_cv_search_opendir" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000012118ac_res=$ac_cv_search_opendir
Illia Bobyra96d5442023-08-30 16:30:15 +020012119if test "$ac_res" != no
12120then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000012121 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012122
12123fi
12124
12125fi
12126
12127
Bram Moolenaar071d4272004-06-13 20:20:40 +000012128if test $ac_cv_header_sys_wait_h = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012129 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that defines union wait" >&5
12130printf %s "checking for sys/wait.h that defines union wait... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012132/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012133#include <sys/wait.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012134int
Illia Bobyra96d5442023-08-30 16:30:15 +020012135main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012136{
Bram Moolenaar071d4272004-06-13 20:20:40 +000012137union wait xx, yy; xx = yy
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012138 ;
12139 return 0;
12140}
12141_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012142if ac_fn_c_try_compile "$LINENO"
12143then :
12144 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12145printf "%s\n" "yes" >&6; }
12146 printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000012147
Illia Bobyra96d5442023-08-30 16:30:15 +020012148 printf "%s\n" "#define HAVE_UNION_WAIT 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000012149
Christian Brabandt9670f612025-05-07 21:44:33 +020012150else case e in #(
12151 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12152printf "%s\n" "no" >&6; } ;;
12153esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000012154fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012155rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000012156fi
12157
Illia Bobyra96d5442023-08-30 16:30:15 +020012158ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
12159if test "x$ac_cv_header_stdint_h" = xyes
12160then :
12161 printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h
12162
12163fi
12164ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
12165if test "x$ac_cv_header_stdlib_h" = xyes
12166then :
12167 printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h
12168
12169fi
12170ac_fn_c_check_header_compile "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default"
12171if test "x$ac_cv_header_string_h" = xyes
12172then :
12173 printf "%s\n" "#define HAVE_STRING_H 1" >>confdefs.h
12174
12175fi
12176ac_fn_c_check_header_compile "$LINENO" "sys/select.h" "ac_cv_header_sys_select_h" "$ac_includes_default"
12177if test "x$ac_cv_header_sys_select_h" = xyes
12178then :
12179 printf "%s\n" "#define HAVE_SYS_SELECT_H 1" >>confdefs.h
12180
12181fi
12182ac_fn_c_check_header_compile "$LINENO" "sys/utsname.h" "ac_cv_header_sys_utsname_h" "$ac_includes_default"
12183if test "x$ac_cv_header_sys_utsname_h" = xyes
12184then :
12185 printf "%s\n" "#define HAVE_SYS_UTSNAME_H 1" >>confdefs.h
12186
12187fi
12188ac_fn_c_check_header_compile "$LINENO" "termcap.h" "ac_cv_header_termcap_h" "$ac_includes_default"
12189if test "x$ac_cv_header_termcap_h" = xyes
12190then :
12191 printf "%s\n" "#define HAVE_TERMCAP_H 1" >>confdefs.h
12192
12193fi
12194ac_fn_c_check_header_compile "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default"
12195if test "x$ac_cv_header_fcntl_h" = xyes
12196then :
12197 printf "%s\n" "#define HAVE_FCNTL_H 1" >>confdefs.h
12198
12199fi
12200ac_fn_c_check_header_compile "$LINENO" "sgtty.h" "ac_cv_header_sgtty_h" "$ac_includes_default"
12201if test "x$ac_cv_header_sgtty_h" = xyes
12202then :
12203 printf "%s\n" "#define HAVE_SGTTY_H 1" >>confdefs.h
12204
12205fi
12206ac_fn_c_check_header_compile "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "$ac_includes_default"
12207if test "x$ac_cv_header_sys_ioctl_h" = xyes
12208then :
12209 printf "%s\n" "#define HAVE_SYS_IOCTL_H 1" >>confdefs.h
12210
12211fi
12212ac_fn_c_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default"
12213if test "x$ac_cv_header_sys_time_h" = xyes
12214then :
12215 printf "%s\n" "#define HAVE_SYS_TIME_H 1" >>confdefs.h
12216
12217fi
12218ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$ac_includes_default"
12219if test "x$ac_cv_header_sys_types_h" = xyes
12220then :
12221 printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h
12222
12223fi
12224ac_fn_c_check_header_compile "$LINENO" "termio.h" "ac_cv_header_termio_h" "$ac_includes_default"
12225if test "x$ac_cv_header_termio_h" = xyes
12226then :
12227 printf "%s\n" "#define HAVE_TERMIO_H 1" >>confdefs.h
12228
12229fi
12230ac_fn_c_check_header_compile "$LINENO" "iconv.h" "ac_cv_header_iconv_h" "$ac_includes_default"
12231if test "x$ac_cv_header_iconv_h" = xyes
12232then :
12233 printf "%s\n" "#define HAVE_ICONV_H 1" >>confdefs.h
12234
12235fi
12236ac_fn_c_check_header_compile "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
12237if test "x$ac_cv_header_inttypes_h" = xyes
12238then :
12239 printf "%s\n" "#define HAVE_INTTYPES_H 1" >>confdefs.h
12240
12241fi
12242ac_fn_c_check_header_compile "$LINENO" "langinfo.h" "ac_cv_header_langinfo_h" "$ac_includes_default"
12243if test "x$ac_cv_header_langinfo_h" = xyes
12244then :
12245 printf "%s\n" "#define HAVE_LANGINFO_H 1" >>confdefs.h
12246
12247fi
12248ac_fn_c_check_header_compile "$LINENO" "math.h" "ac_cv_header_math_h" "$ac_includes_default"
12249if test "x$ac_cv_header_math_h" = xyes
12250then :
12251 printf "%s\n" "#define HAVE_MATH_H 1" >>confdefs.h
12252
12253fi
12254ac_fn_c_check_header_compile "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
12255if test "x$ac_cv_header_unistd_h" = xyes
12256then :
12257 printf "%s\n" "#define HAVE_UNISTD_H 1" >>confdefs.h
12258
12259fi
12260ac_fn_c_check_header_compile "$LINENO" "stropts.h" "ac_cv_header_stropts_h" "$ac_includes_default"
12261if test "x$ac_cv_header_stropts_h" = xyes
12262then :
12263 printf "%s\n" "#define HAVE_STROPTS_H 1" >>confdefs.h
12264
12265fi
12266ac_fn_c_check_header_compile "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default"
12267if test "x$ac_cv_header_errno_h" = xyes
12268then :
12269 printf "%s\n" "#define HAVE_ERRNO_H 1" >>confdefs.h
12270
12271fi
12272ac_fn_c_check_header_compile "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" "$ac_includes_default"
12273if test "x$ac_cv_header_sys_resource_h" = xyes
12274then :
12275 printf "%s\n" "#define HAVE_SYS_RESOURCE_H 1" >>confdefs.h
12276
12277fi
12278ac_fn_c_check_header_compile "$LINENO" "sys/systeminfo.h" "ac_cv_header_sys_systeminfo_h" "$ac_includes_default"
12279if test "x$ac_cv_header_sys_systeminfo_h" = xyes
12280then :
12281 printf "%s\n" "#define HAVE_SYS_SYSTEMINFO_H 1" >>confdefs.h
12282
12283fi
12284ac_fn_c_check_header_compile "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default"
12285if test "x$ac_cv_header_locale_h" = xyes
12286then :
12287 printf "%s\n" "#define HAVE_LOCALE_H 1" >>confdefs.h
12288
12289fi
12290ac_fn_c_check_header_compile "$LINENO" "sys/stream.h" "ac_cv_header_sys_stream_h" "$ac_includes_default"
12291if test "x$ac_cv_header_sys_stream_h" = xyes
12292then :
12293 printf "%s\n" "#define HAVE_SYS_STREAM_H 1" >>confdefs.h
12294
12295fi
12296ac_fn_c_check_header_compile "$LINENO" "termios.h" "ac_cv_header_termios_h" "$ac_includes_default"
12297if test "x$ac_cv_header_termios_h" = xyes
12298then :
12299 printf "%s\n" "#define HAVE_TERMIOS_H 1" >>confdefs.h
12300
12301fi
12302ac_fn_c_check_header_compile "$LINENO" "libc.h" "ac_cv_header_libc_h" "$ac_includes_default"
12303if test "x$ac_cv_header_libc_h" = xyes
12304then :
12305 printf "%s\n" "#define HAVE_LIBC_H 1" >>confdefs.h
12306
12307fi
12308ac_fn_c_check_header_compile "$LINENO" "sys/statfs.h" "ac_cv_header_sys_statfs_h" "$ac_includes_default"
12309if test "x$ac_cv_header_sys_statfs_h" = xyes
12310then :
12311 printf "%s\n" "#define HAVE_SYS_STATFS_H 1" >>confdefs.h
12312
12313fi
12314ac_fn_c_check_header_compile "$LINENO" "poll.h" "ac_cv_header_poll_h" "$ac_includes_default"
12315if test "x$ac_cv_header_poll_h" = xyes
12316then :
12317 printf "%s\n" "#define HAVE_POLL_H 1" >>confdefs.h
12318
12319fi
12320ac_fn_c_check_header_compile "$LINENO" "sys/poll.h" "ac_cv_header_sys_poll_h" "$ac_includes_default"
12321if test "x$ac_cv_header_sys_poll_h" = xyes
12322then :
12323 printf "%s\n" "#define HAVE_SYS_POLL_H 1" >>confdefs.h
12324
12325fi
12326ac_fn_c_check_header_compile "$LINENO" "pwd.h" "ac_cv_header_pwd_h" "$ac_includes_default"
12327if test "x$ac_cv_header_pwd_h" = xyes
12328then :
12329 printf "%s\n" "#define HAVE_PWD_H 1" >>confdefs.h
12330
12331fi
12332ac_fn_c_check_header_compile "$LINENO" "utime.h" "ac_cv_header_utime_h" "$ac_includes_default"
12333if test "x$ac_cv_header_utime_h" = xyes
12334then :
12335 printf "%s\n" "#define HAVE_UTIME_H 1" >>confdefs.h
12336
12337fi
12338ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
12339if test "x$ac_cv_header_sys_param_h" = xyes
12340then :
12341 printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h
12342
12343fi
12344ac_fn_c_check_header_compile "$LINENO" "sys/ptms.h" "ac_cv_header_sys_ptms_h" "$ac_includes_default"
12345if test "x$ac_cv_header_sys_ptms_h" = xyes
12346then :
12347 printf "%s\n" "#define HAVE_SYS_PTMS_H 1" >>confdefs.h
12348
12349fi
12350ac_fn_c_check_header_compile "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
12351if test "x$ac_cv_header_libintl_h" = xyes
12352then :
12353 printf "%s\n" "#define HAVE_LIBINTL_H 1" >>confdefs.h
12354
12355fi
12356ac_fn_c_check_header_compile "$LINENO" "libgen.h" "ac_cv_header_libgen_h" "$ac_includes_default"
12357if test "x$ac_cv_header_libgen_h" = xyes
12358then :
12359 printf "%s\n" "#define HAVE_LIBGEN_H 1" >>confdefs.h
12360
12361fi
12362ac_fn_c_check_header_compile "$LINENO" "util/debug.h" "ac_cv_header_util_debug_h" "$ac_includes_default"
12363if test "x$ac_cv_header_util_debug_h" = xyes
12364then :
12365 printf "%s\n" "#define HAVE_UTIL_DEBUG_H 1" >>confdefs.h
12366
12367fi
12368ac_fn_c_check_header_compile "$LINENO" "util/msg18n.h" "ac_cv_header_util_msg18n_h" "$ac_includes_default"
12369if test "x$ac_cv_header_util_msg18n_h" = xyes
12370then :
12371 printf "%s\n" "#define HAVE_UTIL_MSG18N_H 1" >>confdefs.h
12372
12373fi
12374ac_fn_c_check_header_compile "$LINENO" "frame.h" "ac_cv_header_frame_h" "$ac_includes_default"
12375if test "x$ac_cv_header_frame_h" = xyes
12376then :
12377 printf "%s\n" "#define HAVE_FRAME_H 1" >>confdefs.h
12378
12379fi
12380ac_fn_c_check_header_compile "$LINENO" "sys/acl.h" "ac_cv_header_sys_acl_h" "$ac_includes_default"
12381if test "x$ac_cv_header_sys_acl_h" = xyes
12382then :
12383 printf "%s\n" "#define HAVE_SYS_ACL_H 1" >>confdefs.h
12384
12385fi
12386ac_fn_c_check_header_compile "$LINENO" "sys/access.h" "ac_cv_header_sys_access_h" "$ac_includes_default"
12387if test "x$ac_cv_header_sys_access_h" = xyes
12388then :
12389 printf "%s\n" "#define HAVE_SYS_ACCESS_H 1" >>confdefs.h
12390
12391fi
12392ac_fn_c_check_header_compile "$LINENO" "sys/sysinfo.h" "ac_cv_header_sys_sysinfo_h" "$ac_includes_default"
12393if test "x$ac_cv_header_sys_sysinfo_h" = xyes
12394then :
12395 printf "%s\n" "#define HAVE_SYS_SYSINFO_H 1" >>confdefs.h
12396
12397fi
12398ac_fn_c_check_header_compile "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
12399if test "x$ac_cv_header_wchar_h" = xyes
12400then :
12401 printf "%s\n" "#define HAVE_WCHAR_H 1" >>confdefs.h
12402
12403fi
12404ac_fn_c_check_header_compile "$LINENO" "wctype.h" "ac_cv_header_wctype_h" "$ac_includes_default"
12405if test "x$ac_cv_header_wctype_h" = xyes
12406then :
12407 printf "%s\n" "#define HAVE_WCTYPE_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012408
12409fi
12410
Bram Moolenaar071d4272004-06-13 20:20:40 +000012411
Illia Bobyra96d5442023-08-30 16:30:15 +020012412ac_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 +000012413# include <sys/stream.h>
12414#endif
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012415"
Illia Bobyra96d5442023-08-30 16:30:15 +020012416if test "x$ac_cv_header_sys_ptem_h" = xyes
12417then :
12418 printf "%s\n" "#define HAVE_SYS_PTEM_H 1" >>confdefs.h
Bram Moolenaar32f31b12009-05-21 13:20:59 +000012419
12420fi
12421
Bram Moolenaar32f31b12009-05-21 13:20:59 +000012422
Illia Bobyra96d5442023-08-30 16:30:15 +020012423ac_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 +000012424# include <sys/param.h>
12425#endif
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012426"
Illia Bobyra96d5442023-08-30 16:30:15 +020012427if test "x$ac_cv_header_sys_sysctl_h" = xyes
12428then :
12429 printf "%s\n" "#define HAVE_SYS_SYSCTL_H 1" >>confdefs.h
Bram Moolenaar00ca2842008-06-26 20:14:00 +000012430
12431fi
12432
Bram Moolenaar00ca2842008-06-26 20:14:00 +000012433
12434
Illia Bobyra96d5442023-08-30 16:30:15 +020012435{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_np.h" >&5
12436printf %s "checking for pthread_np.h... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012437cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012438/* end confdefs.h. */
12439
12440#include <pthread.h>
12441#include <pthread_np.h>
12442int
Illia Bobyra96d5442023-08-30 16:30:15 +020012443main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012444{
12445int i; i = 0;
12446 ;
12447 return 0;
12448}
12449_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012450if ac_fn_c_try_compile "$LINENO"
12451then :
12452 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12453printf "%s\n" "yes" >&6; }
12454 printf "%s\n" "#define HAVE_PTHREAD_NP_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012455
Christian Brabandt9670f612025-05-07 21:44:33 +020012456else case e in #(
12457 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12458printf "%s\n" "no" >&6; } ;;
12459esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012460fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012461rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012462
Illia Bobyra96d5442023-08-30 16:30:15 +020012463ac_fn_c_check_header_compile "$LINENO" "strings.h" "ac_cv_header_strings_h" "$ac_includes_default"
12464if test "x$ac_cv_header_strings_h" = xyes
12465then :
12466 printf "%s\n" "#define HAVE_STRINGS_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012467
12468fi
12469
Bram Moolenaard0573012017-10-28 21:11:06 +020012470if test "x$MACOS_X" = "xyes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012471 printf "%s\n" "#define NO_STRINGS_WITH_STRING_H 1" >>confdefs.h
Bram Moolenaar9372a112005-12-06 19:59:18 +000012472
12473else
Bram Moolenaar071d4272004-06-13 20:20:40 +000012474
Illia Bobyra96d5442023-08-30 16:30:15 +020012475{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strings.h can be included after string.h" >&5
12476printf %s "checking if strings.h can be included after string.h... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012477cppflags_save=$CPPFLAGS
12478CPPFLAGS="$CPPFLAGS $X_CFLAGS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012479cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012480/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012481
12482#if defined(_AIX) && !defined(_AIX51) && !defined(_NO_PROTO)
12483# define _NO_PROTO /* like in os_unix.h, causes conflict for AIX (Winn) */
12484 /* but don't do it on AIX 5.1 (Uribarri) */
12485#endif
12486#ifdef HAVE_XM_XM_H
12487# include <Xm/Xm.h> /* This breaks it for HP-UX 11 (Squassabia) */
12488#endif
12489#ifdef HAVE_STRING_H
12490# include <string.h>
12491#endif
12492#if defined(HAVE_STRINGS_H)
12493# include <strings.h>
12494#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000012495
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012496int
Illia Bobyra96d5442023-08-30 16:30:15 +020012497main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012498{
12499int i; i = 0;
12500 ;
12501 return 0;
12502}
12503_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012504if ac_fn_c_try_compile "$LINENO"
12505then :
12506 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12507printf "%s\n" "yes" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +020012508else case e in #(
12509 e) printf "%s\n" "#define NO_STRINGS_WITH_STRING_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012510
Illia Bobyra96d5442023-08-30 16:30:15 +020012511 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
Christian Brabandt9670f612025-05-07 21:44:33 +020012512printf "%s\n" "no" >&6; } ;;
12513esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000012514fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012515rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000012516CPPFLAGS=$cppflags_save
Bram Moolenaar9372a112005-12-06 19:59:18 +000012517fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000012518
Bram Moolenaar071d4272004-06-13 20:20:40 +000012519
Illia Bobyra96d5442023-08-30 16:30:15 +020012520{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12521printf %s "checking for an ANSI C-conforming const... " >&6; }
12522if test ${ac_cv_c_const+y}
12523then :
12524 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020012525else case e in #(
12526 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012527/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012528
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012529int
Illia Bobyra96d5442023-08-30 16:30:15 +020012530main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012531{
Bram Moolenaar7db77842014-03-27 17:40:59 +010012532
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012533#ifndef __cplusplus
Bram Moolenaar7db77842014-03-27 17:40:59 +010012534 /* Ultrix mips cc rejects this sort of thing. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012535 typedef int charset[2];
Bram Moolenaar7db77842014-03-27 17:40:59 +010012536 const charset cs = { 0, 0 };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012537 /* SunOS 4.1.1 cc rejects this. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000012538 char const *const *pcpcc;
12539 char **ppc;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012540 /* NEC SVR4.0.2 mips cc rejects this. */
12541 struct point {int x, y;};
12542 static struct point const zero = {0,0};
Illia Bobyra96d5442023-08-30 16:30:15 +020012543 /* IBM XL C 1.02.0.0 rejects this.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012544 It does not let you subtract one const X* pointer from another in
12545 an arm of an if-expression whose if-part is not a constant
12546 expression */
12547 const char *g = "string";
Bram Moolenaar446cb832008-06-24 21:56:24 +000012548 pcpcc = &g + (g ? g-g : 0);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012549 /* HPUX 7.0 cc rejects these. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000012550 ++pcpcc;
12551 ppc = (char**) pcpcc;
12552 pcpcc = (char const *const *) ppc;
Bram Moolenaar7db77842014-03-27 17:40:59 +010012553 { /* SCO 3.2v4 cc rejects this sort of thing. */
12554 char tx;
12555 char *t = &tx;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012556 char const *s = 0 ? (char *) 0 : (char const *) 0;
Bram Moolenaar071d4272004-06-13 20:20:40 +000012557
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012558 *t++ = 0;
Bram Moolenaar446cb832008-06-24 21:56:24 +000012559 if (s) return 0;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012560 }
12561 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12562 int x[] = {25, 17};
12563 const int *foo = &x[0];
12564 ++foo;
12565 }
12566 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12567 typedef const int *iptr;
12568 iptr p = 0;
12569 ++p;
12570 }
Illia Bobyra96d5442023-08-30 16:30:15 +020012571 { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012572 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Bram Moolenaar7db77842014-03-27 17:40:59 +010012573 struct s { int j; const int *ap[3]; } bx;
12574 struct s *b = &bx; b->j = 5;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012575 }
12576 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12577 const int foo = 10;
Bram Moolenaar446cb832008-06-24 21:56:24 +000012578 if (!foo) return 0;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012579 }
Bram Moolenaar446cb832008-06-24 21:56:24 +000012580 return !cs[0] && !zero.x;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012581#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000012582
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012583 ;
12584 return 0;
Bram Moolenaar071d4272004-06-13 20:20:40 +000012585}
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012586_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012587if ac_fn_c_try_compile "$LINENO"
12588then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012589 ac_cv_c_const=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020012590else case e in #(
12591 e) ac_cv_c_const=no ;;
12592esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012593fi
Christian Brabandt9670f612025-05-07 21:44:33 +020012594rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
12595esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012596fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012597{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12598printf "%s\n" "$ac_cv_c_const" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012599if test $ac_cv_c_const = no; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012600
Illia Bobyra96d5442023-08-30 16:30:15 +020012601printf "%s\n" "#define const /**/" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000012602
12603fi
12604
Illia Bobyra96d5442023-08-30 16:30:15 +020012605{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12606printf %s "checking for working volatile... " >&6; }
12607if test ${ac_cv_c_volatile+y}
12608then :
12609 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020012610else case e in #(
12611 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012612/* end confdefs.h. */
12613
12614int
Illia Bobyra96d5442023-08-30 16:30:15 +020012615main (void)
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012616{
12617
12618volatile int x;
12619int * volatile y = (int *) 0;
12620return !x && !y;
12621 ;
12622 return 0;
12623}
12624_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012625if ac_fn_c_try_compile "$LINENO"
12626then :
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012627 ac_cv_c_volatile=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020012628else case e in #(
12629 e) ac_cv_c_volatile=no ;;
12630esac
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012631fi
Christian Brabandt9670f612025-05-07 21:44:33 +020012632rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
12633esac
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012634fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012635{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5
12636printf "%s\n" "$ac_cv_c_volatile" >&6; }
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012637if test $ac_cv_c_volatile = no; then
12638
Illia Bobyra96d5442023-08-30 16:30:15 +020012639printf "%s\n" "#define volatile /**/" >>confdefs.h
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012640
12641fi
12642
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012643ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Illia Bobyra96d5442023-08-30 16:30:15 +020012644if test "x$ac_cv_type_mode_t" = xyes
12645then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012646
Christian Brabandt9670f612025-05-07 21:44:33 +020012647else case e in #(
12648 e)
Illia Bobyra96d5442023-08-30 16:30:15 +020012649printf "%s\n" "#define mode_t int" >>confdefs.h
Christian Brabandt9670f612025-05-07 21:44:33 +020012650 ;;
12651esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012652fi
12653
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012654ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Illia Bobyra96d5442023-08-30 16:30:15 +020012655if test "x$ac_cv_type_off_t" = xyes
12656then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012657
Christian Brabandt9670f612025-05-07 21:44:33 +020012658else case e in #(
12659 e)
Illia Bobyra96d5442023-08-30 16:30:15 +020012660printf "%s\n" "#define off_t long int" >>confdefs.h
Christian Brabandt9670f612025-05-07 21:44:33 +020012661 ;;
12662esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012663fi
12664
Bram Moolenaar071d4272004-06-13 20:20:40 +000012665
Illia Bobyra96d5442023-08-30 16:30:15 +020012666 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default
12667"
12668if test "x$ac_cv_type_pid_t" = xyes
12669then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012670
Christian Brabandt9670f612025-05-07 21:44:33 +020012671else case e in #(
12672 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Illia Bobyra96d5442023-08-30 16:30:15 +020012673/* end confdefs.h. */
12674
12675 #if defined _WIN64 && !defined __CYGWIN__
12676 LLP64
12677 #endif
12678
12679int
12680main (void)
12681{
12682
12683 ;
12684 return 0;
12685}
12686
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012687_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012688if ac_fn_c_try_compile "$LINENO"
12689then :
12690 ac_pid_type='int'
Christian Brabandt9670f612025-05-07 21:44:33 +020012691else case e in #(
12692 e) ac_pid_type='__int64' ;;
12693esac
Illia Bobyra96d5442023-08-30 16:30:15 +020012694fi
12695rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
12696
12697printf "%s\n" "#define pid_t $ac_pid_type" >>confdefs.h
12698
Christian Brabandt9670f612025-05-07 21:44:33 +020012699 ;;
12700esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012701fi
12702
Illia Bobyra96d5442023-08-30 16:30:15 +020012703
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012704ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Illia Bobyra96d5442023-08-30 16:30:15 +020012705if test "x$ac_cv_type_size_t" = xyes
12706then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012707
Christian Brabandt9670f612025-05-07 21:44:33 +020012708else case e in #(
12709 e)
Illia Bobyra96d5442023-08-30 16:30:15 +020012710printf "%s\n" "#define size_t unsigned int" >>confdefs.h
Christian Brabandt9670f612025-05-07 21:44:33 +020012711 ;;
12712esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012713fi
12714
Christian Brabandt9670f612025-05-07 21:44:33 +020012715ac_fn_c_check_type "$LINENO" "uid_t" "ac_cv_type_uid_t" "$ac_includes_default"
12716if test "x$ac_cv_type_uid_t" = xyes
Illia Bobyra96d5442023-08-30 16:30:15 +020012717then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012718
Christian Brabandt9670f612025-05-07 21:44:33 +020012719else case e in #(
12720 e)
Illia Bobyra96d5442023-08-30 16:30:15 +020012721printf "%s\n" "#define uid_t int" >>confdefs.h
Christian Brabandt9670f612025-05-07 21:44:33 +020012722 ;;
12723esac
12724fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012725
Christian Brabandt9670f612025-05-07 21:44:33 +020012726ac_fn_c_check_type "$LINENO" "gid_t" "ac_cv_type_gid_t" "$ac_includes_default"
12727if test "x$ac_cv_type_gid_t" = xyes
12728then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012729
Christian Brabandt9670f612025-05-07 21:44:33 +020012730else case e in #(
12731 e)
Illia Bobyra96d5442023-08-30 16:30:15 +020012732printf "%s\n" "#define gid_t int" >>confdefs.h
Christian Brabandt9670f612025-05-07 21:44:33 +020012733 ;;
12734esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000012735fi
12736
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012737ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
12738case $ac_cv_c_uint32_t in #(
12739 no|yes) ;; #(
12740 *)
12741
Illia Bobyra96d5442023-08-30 16:30:15 +020012742printf "%s\n" "#define _UINT32_T 1" >>confdefs.h
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012743
12744
Illia Bobyra96d5442023-08-30 16:30:15 +020012745printf "%s\n" "#define uint32_t $ac_cv_c_uint32_t" >>confdefs.h
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012746;;
12747 esac
12748
Bram Moolenaarfa7584c2010-05-19 21:57:45 +020012749
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012750
Illia Bobyrf39842f2023-08-27 18:21:23 +020012751
12752
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012753ac_fn_c_check_type "$LINENO" "ino_t" "ac_cv_type_ino_t" "$ac_includes_default"
Illia Bobyra96d5442023-08-30 16:30:15 +020012754if test "x$ac_cv_type_ino_t" = xyes
12755then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012756
Christian Brabandt9670f612025-05-07 21:44:33 +020012757else case e in #(
12758 e)
Illia Bobyra96d5442023-08-30 16:30:15 +020012759printf "%s\n" "#define ino_t long" >>confdefs.h
Christian Brabandt9670f612025-05-07 21:44:33 +020012760 ;;
12761esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012762fi
12763
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012764ac_fn_c_check_type "$LINENO" "dev_t" "ac_cv_type_dev_t" "$ac_includes_default"
Illia Bobyra96d5442023-08-30 16:30:15 +020012765if test "x$ac_cv_type_dev_t" = xyes
12766then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012767
Christian Brabandt9670f612025-05-07 21:44:33 +020012768else case e in #(
12769 e)
Illia Bobyra96d5442023-08-30 16:30:15 +020012770printf "%s\n" "#define dev_t unsigned" >>confdefs.h
Christian Brabandt9670f612025-05-07 21:44:33 +020012771 ;;
12772esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012773fi
12774
Illia Bobyra96d5442023-08-30 16:30:15 +020012775 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12776printf %s "checking whether byte ordering is bigendian... " >&6; }
12777if test ${ac_cv_c_bigendian+y}
12778then :
12779 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020012780else case e in #(
12781 e) ac_cv_c_bigendian=unknown
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012782 # See if we're dealing with a universal compiler.
12783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12784/* end confdefs.h. */
12785#ifndef __APPLE_CC__
12786 not a universal capable compiler
12787 #endif
12788 typedef int dummy;
12789
12790_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012791if ac_fn_c_try_compile "$LINENO"
12792then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012793
12794 # Check for potential -arch flags. It is not universal unless
12795 # there are at least two -arch flags with different values.
12796 ac_arch=
12797 ac_prev=
12798 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12799 if test -n "$ac_prev"; then
12800 case $ac_word in
12801 i?86 | x86_64 | ppc | ppc64)
12802 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12803 ac_arch=$ac_word
12804 else
12805 ac_cv_c_bigendian=universal
12806 break
12807 fi
12808 ;;
12809 esac
12810 ac_prev=
12811 elif test "x$ac_word" = "x-arch"; then
12812 ac_prev=arch
12813 fi
12814 done
12815fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012816rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012817 if test $ac_cv_c_bigendian = unknown; then
12818 # See if sys/param.h defines the BYTE_ORDER macro.
12819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12820/* end confdefs.h. */
12821#include <sys/types.h>
12822 #include <sys/param.h>
12823
12824int
Illia Bobyra96d5442023-08-30 16:30:15 +020012825main (void)
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012826{
Christian Brabandt9670f612025-05-07 21:44:33 +020012827#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \\
12828 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \\
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012829 && LITTLE_ENDIAN)
12830 bogus endian macros
12831 #endif
12832
12833 ;
12834 return 0;
12835}
12836_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012837if ac_fn_c_try_compile "$LINENO"
12838then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012839 # It does; now see whether it defined to BIG_ENDIAN or not.
12840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12841/* end confdefs.h. */
12842#include <sys/types.h>
12843 #include <sys/param.h>
12844
12845int
Illia Bobyra96d5442023-08-30 16:30:15 +020012846main (void)
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012847{
12848#if BYTE_ORDER != BIG_ENDIAN
12849 not big endian
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 ac_cv_c_bigendian=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020012859else case e in #(
12860 e) ac_cv_c_bigendian=no ;;
12861esac
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012862fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012863rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012864fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012865rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012866 fi
12867 if test $ac_cv_c_bigendian = unknown; then
12868 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12870/* end confdefs.h. */
12871#include <limits.h>
12872
12873int
Illia Bobyra96d5442023-08-30 16:30:15 +020012874main (void)
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012875{
12876#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12877 bogus endian macros
12878 #endif
12879
12880 ;
12881 return 0;
12882}
12883_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012884if ac_fn_c_try_compile "$LINENO"
12885then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012886 # It does; now see whether it defined to _BIG_ENDIAN or not.
12887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12888/* end confdefs.h. */
12889#include <limits.h>
12890
12891int
Illia Bobyra96d5442023-08-30 16:30:15 +020012892main (void)
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012893{
12894#ifndef _BIG_ENDIAN
12895 not big endian
12896 #endif
12897
12898 ;
12899 return 0;
12900}
12901_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012902if ac_fn_c_try_compile "$LINENO"
12903then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012904 ac_cv_c_bigendian=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020012905else case e in #(
12906 e) ac_cv_c_bigendian=no ;;
12907esac
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012908fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012909rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012910fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012911rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012912 fi
12913 if test $ac_cv_c_bigendian = unknown; then
12914 # Compile a test program.
Illia Bobyra96d5442023-08-30 16:30:15 +020012915 if test "$cross_compiling" = yes
12916then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012917 # Try to guess by grepping values from an object file.
12918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12919/* end confdefs.h. */
Illia Bobyra96d5442023-08-30 16:30:15 +020012920unsigned short int ascii_mm[] =
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012921 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
Illia Bobyra96d5442023-08-30 16:30:15 +020012922 unsigned short int ascii_ii[] =
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012923 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12924 int use_ascii (int i) {
12925 return ascii_mm[i] + ascii_ii[i];
12926 }
Illia Bobyra96d5442023-08-30 16:30:15 +020012927 unsigned short int ebcdic_ii[] =
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012928 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
Illia Bobyra96d5442023-08-30 16:30:15 +020012929 unsigned short int ebcdic_mm[] =
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012930 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12931 int use_ebcdic (int i) {
12932 return ebcdic_mm[i] + ebcdic_ii[i];
12933 }
Christian Brabandt9670f612025-05-07 21:44:33 +020012934 int
12935 main (int argc, char **argv)
12936 {
12937 /* Intimidate the compiler so that it does not
12938 optimize the arrays away. */
12939 char *p = argv[0];
12940 ascii_mm[1] = *p++; ebcdic_mm[1] = *p++;
12941 ascii_ii[1] = *p++; ebcdic_ii[1] = *p++;
12942 return use_ascii (argc) == use_ebcdic (*p);
12943 }
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012944_ACEOF
Christian Brabandt9670f612025-05-07 21:44:33 +020012945if ac_fn_c_try_link "$LINENO"
Illia Bobyra96d5442023-08-30 16:30:15 +020012946then :
Christian Brabandt9670f612025-05-07 21:44:33 +020012947 if grep BIGenDianSyS conftest$ac_exeext >/dev/null; then
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012948 ac_cv_c_bigendian=yes
12949 fi
Christian Brabandt9670f612025-05-07 21:44:33 +020012950 if grep LiTTleEnDian conftest$ac_exeext >/dev/null ; then
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012951 if test "$ac_cv_c_bigendian" = unknown; then
12952 ac_cv_c_bigendian=no
12953 else
12954 # finding both strings is unlikely to happen, but who knows?
12955 ac_cv_c_bigendian=unknown
12956 fi
12957 fi
12958fi
Christian Brabandt9670f612025-05-07 21:44:33 +020012959rm -f core conftest.err conftest.$ac_objext conftest.beam \
12960 conftest$ac_exeext conftest.$ac_ext
12961else case e in #(
12962 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012963/* end confdefs.h. */
12964$ac_includes_default
12965int
Illia Bobyra96d5442023-08-30 16:30:15 +020012966main (void)
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012967{
12968
12969 /* Are we little or big endian? From Harbison&Steele. */
12970 union
12971 {
12972 long int l;
12973 char c[sizeof (long int)];
12974 } u;
12975 u.l = 1;
12976 return u.c[sizeof (long int) - 1] == 1;
12977
12978 ;
12979 return 0;
12980}
12981_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012982if ac_fn_c_try_run "$LINENO"
12983then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012984 ac_cv_c_bigendian=no
Christian Brabandt9670f612025-05-07 21:44:33 +020012985else case e in #(
12986 e) ac_cv_c_bigendian=yes ;;
12987esac
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012988fi
12989rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
Christian Brabandt9670f612025-05-07 21:44:33 +020012990 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
12991esac
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012992fi
12993
Christian Brabandt9670f612025-05-07 21:44:33 +020012994 fi ;;
12995esac
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012996fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012997{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12998printf "%s\n" "$ac_cv_c_bigendian" >&6; }
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012999 case $ac_cv_c_bigendian in #(
13000 yes)
Illia Bobyra96d5442023-08-30 16:30:15 +020013001 printf "%s\n" "#define WORDS_BIGENDIAN 1" >>confdefs.h
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013002;; #(
13003 no)
13004 ;; #(
13005 universal)
13006
Illia Bobyra96d5442023-08-30 16:30:15 +020013007printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013008
13009 ;; #(
13010 *)
Bram Moolenaar7db77842014-03-27 17:40:59 +010013011 as_fn_error $? "unknown endianness
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013012 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
13013 esac
13014
Illia Bobyra96d5442023-08-30 16:30:15 +020013015{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
13016printf %s "checking for inline... " >&6; }
13017if test ${ac_cv_c_inline+y}
13018then :
13019 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020013020else case e in #(
13021 e) ac_cv_c_inline=no
Bram Moolenaar136f29a2016-02-27 20:14:15 +010013022for ac_kw in inline __inline__ __inline; do
13023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13024/* end confdefs.h. */
13025#ifndef __cplusplus
13026typedef int foo_t;
Illia Bobyra96d5442023-08-30 16:30:15 +020013027static $ac_kw foo_t static_foo (void) {return 0; }
13028$ac_kw foo_t foo (void) {return 0; }
Bram Moolenaar136f29a2016-02-27 20:14:15 +010013029#endif
13030
13031_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013032if ac_fn_c_try_compile "$LINENO"
13033then :
Bram Moolenaar136f29a2016-02-27 20:14:15 +010013034 ac_cv_c_inline=$ac_kw
13035fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013036rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar136f29a2016-02-27 20:14:15 +010013037 test "$ac_cv_c_inline" != no && break
13038done
Christian Brabandt9670f612025-05-07 21:44:33 +020013039 ;;
13040esac
Bram Moolenaar136f29a2016-02-27 20:14:15 +010013041fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013042{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
13043printf "%s\n" "$ac_cv_c_inline" >&6; }
Bram Moolenaar136f29a2016-02-27 20:14:15 +010013044
13045case $ac_cv_c_inline in
13046 inline | yes) ;;
13047 *)
13048 case $ac_cv_c_inline in
13049 no) ac_val=;;
13050 *) ac_val=$ac_cv_c_inline;;
13051 esac
13052 cat >>confdefs.h <<_ACEOF
13053#ifndef __cplusplus
13054#define inline $ac_val
13055#endif
13056_ACEOF
13057 ;;
13058esac
13059
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013060
Illia Bobyra96d5442023-08-30 16:30:15 +020013061{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for rlim_t" >&5
13062printf %s "checking for rlim_t... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013063if eval "test \"`echo '$''{'ac_cv_type_rlim_t'+set}'`\" = set"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020013064 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: (cached) $ac_cv_type_rlim_t" >&5
13065printf "%s\n" "(cached) $ac_cv_type_rlim_t" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013066else
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013068/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013069
13070#include <sys/types.h>
13071#if STDC_HEADERS
Bram Moolenaar446cb832008-06-24 21:56:24 +000013072# include <stdlib.h>
13073# include <stddef.h>
Bram Moolenaar071d4272004-06-13 20:20:40 +000013074#endif
13075#ifdef HAVE_SYS_RESOURCE_H
Bram Moolenaar446cb832008-06-24 21:56:24 +000013076# include <sys/resource.h>
Bram Moolenaar071d4272004-06-13 20:20:40 +000013077#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013078
13079_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000013080if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Christian Brabandt9670f612025-05-07 21:44:33 +020013081 $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 +020013082then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000013083 ac_cv_type_rlim_t=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020013084else case e in #(
13085 e) ac_cv_type_rlim_t=no ;;
13086esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000013087fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013088rm -rf conftest*
Bram Moolenaar071d4272004-06-13 20:20:40 +000013089
Illia Bobyra96d5442023-08-30 16:30:15 +020013090 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_rlim_t" >&5
13091printf "%s\n" "$ac_cv_type_rlim_t" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013092fi
13093if test $ac_cv_type_rlim_t = no; then
13094 cat >> confdefs.h <<\EOF
13095#define rlim_t unsigned long
13096EOF
13097fi
13098
Illia Bobyra96d5442023-08-30 16:30:15 +020013099{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stack_t" >&5
13100printf %s "checking for stack_t... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013101if eval "test \"`echo '$''{'ac_cv_type_stack_t'+set}'`\" = set"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020013102 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: (cached) $ac_cv_type_stack_t" >&5
13103printf "%s\n" "(cached) $ac_cv_type_stack_t" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013104else
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013106/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013107
13108#include <sys/types.h>
13109#if STDC_HEADERS
Bram Moolenaar446cb832008-06-24 21:56:24 +000013110# include <stdlib.h>
13111# include <stddef.h>
Bram Moolenaar071d4272004-06-13 20:20:40 +000013112#endif
13113#include <signal.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013114
13115_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000013116if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Christian Brabandt9670f612025-05-07 21:44:33 +020013117 $EGREP_TRADITIONAL "stack_t" >/dev/null 2>&1
Illia Bobyra96d5442023-08-30 16:30:15 +020013118then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000013119 ac_cv_type_stack_t=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020013120else case e in #(
13121 e) ac_cv_type_stack_t=no ;;
13122esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000013123fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013124rm -rf conftest*
Bram Moolenaar071d4272004-06-13 20:20:40 +000013125
Illia Bobyra96d5442023-08-30 16:30:15 +020013126 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_stack_t" >&5
13127printf "%s\n" "$ac_cv_type_stack_t" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013128fi
13129if test $ac_cv_type_stack_t = no; then
13130 cat >> confdefs.h <<\EOF
13131#define stack_t struct sigaltstack
13132EOF
13133fi
13134
Illia Bobyra96d5442023-08-30 16:30:15 +020013135{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stack_t has an ss_base field" >&5
13136printf %s "checking whether stack_t has an ss_base field... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013137cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013138/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013139
13140#include <sys/types.h>
13141#if STDC_HEADERS
Bram Moolenaar446cb832008-06-24 21:56:24 +000013142# include <stdlib.h>
13143# include <stddef.h>
Bram Moolenaar071d4272004-06-13 20:20:40 +000013144#endif
13145#include <signal.h>
13146#include "confdefs.h"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013147
13148int
Illia Bobyra96d5442023-08-30 16:30:15 +020013149main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013150{
13151stack_t sigstk; sigstk.ss_base = 0;
13152 ;
13153 return 0;
13154}
13155_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013156if ac_fn_c_try_compile "$LINENO"
13157then :
13158 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13159printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SS_BASE 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013160
Christian Brabandt9670f612025-05-07 21:44:33 +020013161else case e in #(
13162 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13163printf "%s\n" "no" >&6; } ;;
13164esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000013165fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013166rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000013167
13168olibs="$LIBS"
Illia Bobyra96d5442023-08-30 16:30:15 +020013169{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-tlib argument" >&5
13170printf %s "checking --with-tlib argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013171
Bram Moolenaar446cb832008-06-24 21:56:24 +000013172# Check whether --with-tlib was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020013173if test ${with_tlib+y}
13174then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000013175 withval=$with_tlib;
13176fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000013177
13178if test -n "$with_tlib"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020013179 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_tlib" >&5
13180printf "%s\n" "$with_tlib" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013181 LIBS="$LIBS -l$with_tlib"
Illia Bobyra96d5442023-08-30 16:30:15 +020013182 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for linking with $with_tlib library" >&5
13183printf %s "checking for linking with $with_tlib library... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013185/* end confdefs.h. */
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000013186
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013187int
Illia Bobyra96d5442023-08-30 16:30:15 +020013188main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013189{
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000013190
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013191 ;
13192 return 0;
13193}
13194_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013195if ac_fn_c_try_link "$LINENO"
13196then :
13197 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: OK" >&5
13198printf "%s\n" "OK" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +020013199else case e in #(
13200 e) as_fn_error $? "FAILED" "$LINENO" 5 ;;
13201esac
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000013202fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013203rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013204 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000013205 olibs="$LIBS"
13206else
Illia Bobyra96d5442023-08-30 16:30:15 +020013207 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: empty: automatic terminal library selection" >&5
13208printf "%s\n" "empty: automatic terminal library selection" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +000013209 case "$vim_cv_uname_output" in
Bram Moolenaar4e509b62011-02-09 17:42:57 +010013210 OSF1|SCO_SV) tlibs="tinfo ncurses curses termlib termcap";;
13211 *) tlibs="tinfo ncurses termlib termcap curses";;
Bram Moolenaar071d4272004-06-13 20:20:40 +000013212 esac
13213 for libname in $tlibs; do
Christian Brabandt9670f612025-05-07 21:44:33 +020013214 as_ac_Lib=`printf "%s\n" "ac_cv_lib_${libname}""_tgetent" | sed "$as_sed_sh"`
Illia Bobyra96d5442023-08-30 16:30:15 +020013215{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tgetent in -l${libname}" >&5
13216printf %s "checking for tgetent in -l${libname}... " >&6; }
13217if eval test \${$as_ac_Lib+y}
13218then :
13219 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020013220else case e in #(
13221 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000013222LIBS="-l${libname} $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013223cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013224/* end confdefs.h. */
13225
Bram Moolenaar446cb832008-06-24 21:56:24 +000013226/* Override any GCC internal prototype to avoid an error.
13227 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020013228 builtin and then its argument prototype would still apply.
13229 The 'extern "C"' is for builds by C++ compilers;
13230 although this is not generally supported in C code supporting it here
13231 has little cost and some practical benefit (sr 110532). */
13232#ifdef __cplusplus
13233extern "C"
13234#endif
13235char tgetent (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013236int
Illia Bobyra96d5442023-08-30 16:30:15 +020013237main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013238{
Bram Moolenaar446cb832008-06-24 21:56:24 +000013239return tgetent ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013240 ;
13241 return 0;
13242}
13243_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013244if ac_fn_c_try_link "$LINENO"
13245then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013246 eval "$as_ac_Lib=yes"
Christian Brabandt9670f612025-05-07 21:44:33 +020013247else case e in #(
13248 e) eval "$as_ac_Lib=no" ;;
13249esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000013250fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013251rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013252 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020013253LIBS=$ac_check_lib_save_LIBS ;;
13254esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013255fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013256eval ac_res=\$$as_ac_Lib
Illia Bobyra96d5442023-08-30 16:30:15 +020013257 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13258printf "%s\n" "$ac_res" >&6; }
13259if eval test \"x\$"$as_ac_Lib"\" = x"yes"
13260then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013261 cat >>confdefs.h <<_ACEOF
Christian Brabandt9670f612025-05-07 21:44:33 +020013262#define `printf "%s\n" "HAVE_LIB${libname}" | sed "$as_sed_cpp"` 1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013263_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000013264
13265 LIBS="-l${libname} $LIBS"
13266
Bram Moolenaar071d4272004-06-13 20:20:40 +000013267fi
13268
13269 if test "x$olibs" != "x$LIBS"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020013270 if test "$cross_compiling" = yes
13271then :
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010013272 res="OK"
Christian Brabandt9670f612025-05-07 21:44:33 +020013273else case e in #(
13274 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013275/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013276
13277#ifdef HAVE_TERMCAP_H
13278# include <termcap.h>
13279#endif
Bram Moolenaar446cb832008-06-24 21:56:24 +000013280#if STDC_HEADERS
13281# include <stdlib.h>
13282# include <stddef.h>
13283#endif
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010013284int main() {char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(0); }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013285_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013286if ac_fn_c_try_run "$LINENO"
13287then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000013288 res="OK"
Christian Brabandt9670f612025-05-07 21:44:33 +020013289else case e in #(
13290 e) res="FAIL" ;;
13291esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013292fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013293rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
Christian Brabandt9670f612025-05-07 21:44:33 +020013294 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
13295esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013296fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000013297
Bram Moolenaar071d4272004-06-13 20:20:40 +000013298 if test "$res" = "OK"; then
13299 break
13300 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013301 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libname library is not usable" >&5
13302printf "%s\n" "$libname library is not usable" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013303 LIBS="$olibs"
13304 fi
13305 done
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000013306 if test "x$olibs" = "x$LIBS"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020013307 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no terminal library found" >&5
13308printf "%s\n" "no terminal library found" >&6; }
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000013309 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000013310fi
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000013311
13312if test "x$olibs" = "x$LIBS"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020013313 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tgetent()" >&5
13314printf %s "checking for tgetent()... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013316/* end confdefs.h. */
Bram Moolenaarbd7f7c12020-07-28 21:03:37 +020013317int tgetent(char *, const char *);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013318int
Illia Bobyra96d5442023-08-30 16:30:15 +020013319main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013320{
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000013321char s[10000]; int res = tgetent(s, "thisterminaldoesnotexist");
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013322 ;
13323 return 0;
13324}
13325_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013326if ac_fn_c_try_link "$LINENO"
13327then :
13328 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13329printf "%s\n" "yes" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +020013330else case e in #(
13331 e) as_fn_error $? "NOT FOUND!
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000013332 You need to install a terminal library; for example ncurses.
Bram Moolenaar16678eb2021-04-21 11:57:59 +020013333 On Linux that would be the libncurses-dev package.
Christian Brabandt9670f612025-05-07 21:44:33 +020013334 Or specify the name of the library with --with-tlib." "$LINENO" 5 ;;
13335esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013336fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013337rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013338 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000013339fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000013340
Illia Bobyra96d5442023-08-30 16:30:15 +020013341{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we talk terminfo" >&5
13342printf %s "checking whether we talk terminfo... " >&6; }
13343if test ${vim_cv_terminfo+y}
13344then :
13345 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020013346else case e in #(
13347 e)
Illia Bobyra96d5442023-08-30 16:30:15 +020013348 if test "$cross_compiling" = yes
13349then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000013350
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010013351 vim_cv_terminfo=yes
13352 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cross-compiling: consider setting 'vim_cv_terminfo'" >&5
13353printf "%s\n" "$as_me: WARNING: cross-compiling: consider setting 'vim_cv_terminfo'" >&2;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000013354
Christian Brabandt9670f612025-05-07 21:44:33 +020013355else case e in #(
13356 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013357/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013358
Bram Moolenaar446cb832008-06-24 21:56:24 +000013359#include "confdefs.h"
Bram Moolenaar071d4272004-06-13 20:20:40 +000013360#ifdef HAVE_TERMCAP_H
13361# include <termcap.h>
13362#endif
Bram Moolenaar446cb832008-06-24 21:56:24 +000013363#ifdef HAVE_STRING_H
13364# include <string.h>
13365#endif
13366#if STDC_HEADERS
13367# include <stdlib.h>
13368# include <stddef.h>
13369#endif
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010013370int main()
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010013371{char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(!!strcmp(s==0 ? "" : s, "1")); }
Bram Moolenaar446cb832008-06-24 21:56:24 +000013372
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013373_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013374if ac_fn_c_try_run "$LINENO"
13375then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000013376
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010013377 vim_cv_terminfo=yes
Bram Moolenaar446cb832008-06-24 21:56:24 +000013378
Christian Brabandt9670f612025-05-07 21:44:33 +020013379else case e in #(
13380 e)
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010013381 vim_cv_terminfo=no
Christian Brabandt9670f612025-05-07 21:44:33 +020013382 ;;
13383esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000013384fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013385rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
Christian Brabandt9670f612025-05-07 21:44:33 +020013386 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
13387esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000013388fi
13389
Christian Brabandt9670f612025-05-07 21:44:33 +020013390 ;;
13391esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000013392fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013393{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_terminfo" >&5
13394printf "%s\n" "$vim_cv_terminfo" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000013395
13396if test "x$vim_cv_terminfo" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020013397 printf "%s\n" "#define TERMINFO 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013398
13399fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000013400
Illia Bobyra96d5442023-08-30 16:30:15 +020013401{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking what tgetent() returns for an unknown terminal" >&5
13402printf %s "checking what tgetent() returns for an unknown terminal... " >&6; }
13403if test ${vim_cv_tgetent+y}
13404then :
13405 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020013406else case e in #(
13407 e)
Illia Bobyra96d5442023-08-30 16:30:15 +020013408 if test "$cross_compiling" = yes
13409then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000013410
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010013411 vim_cv_tgetent=zero
13412 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cross-compiling: consider setting 'vim_cv_tgetent'" >&5
13413printf "%s\n" "$as_me: WARNING: cross-compiling: consider setting 'vim_cv_tgetent'" >&2;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000013414
Christian Brabandt9670f612025-05-07 21:44:33 +020013415else case e in #(
13416 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013417/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013418
Bram Moolenaar446cb832008-06-24 21:56:24 +000013419#include "confdefs.h"
Bram Moolenaar071d4272004-06-13 20:20:40 +000013420#ifdef HAVE_TERMCAP_H
13421# include <termcap.h>
13422#endif
Bram Moolenaar446cb832008-06-24 21:56:24 +000013423#if STDC_HEADERS
13424# include <stdlib.h>
13425# include <stddef.h>
13426#endif
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010013427int main()
Bram Moolenaar071d4272004-06-13 20:20:40 +000013428{char s[10000]; int res = tgetent(s, "thisterminaldoesnotexist"); exit(res != 0); }
Bram Moolenaar446cb832008-06-24 21:56:24 +000013429
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013430_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013431if ac_fn_c_try_run "$LINENO"
13432then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000013433
Bram Moolenaara88254f2017-11-02 23:04:14 +010013434 vim_cv_tgetent=zero
Bram Moolenaar071d4272004-06-13 20:20:40 +000013435
Christian Brabandt9670f612025-05-07 21:44:33 +020013436else case e in #(
13437 e)
Bram Moolenaara88254f2017-11-02 23:04:14 +010013438 vim_cv_tgetent=non-zero
Christian Brabandt9670f612025-05-07 21:44:33 +020013439 ;;
13440esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000013441fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013442rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
Christian Brabandt9670f612025-05-07 21:44:33 +020013443 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
13444esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000013445fi
13446
Christian Brabandt9670f612025-05-07 21:44:33 +020013447 ;;
13448esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000013449fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013450{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_tgetent" >&5
13451printf "%s\n" "$vim_cv_tgetent" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000013452
Bram Moolenaara88254f2017-11-02 23:04:14 +010013453if test "x$vim_cv_tgetent" = "xzero" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020013454 printf "%s\n" "#define TGETENT_ZERO_ERR 0" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000013455
Bram Moolenaar446cb832008-06-24 21:56:24 +000013456fi
13457
Illia Bobyra96d5442023-08-30 16:30:15 +020013458{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether termcap.h contains ospeed" >&5
13459printf %s "checking whether termcap.h contains ospeed... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013460cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013461/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013462
13463#ifdef HAVE_TERMCAP_H
13464# include <termcap.h>
13465#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013466
13467int
Illia Bobyra96d5442023-08-30 16:30:15 +020013468main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013469{
Bram Moolenaar071d4272004-06-13 20:20:40 +000013470ospeed = 20000
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013471 ;
13472 return 0;
13473}
13474_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013475if ac_fn_c_try_link "$LINENO"
13476then :
13477 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13478printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_OSPEED 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013479
Christian Brabandt9670f612025-05-07 21:44:33 +020013480else case e in #(
13481 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +020013482printf "%s\n" "no" >&6; }
13483 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ospeed can be extern" >&5
13484printf %s "checking whether ospeed can be extern... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013486/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013487
13488#ifdef HAVE_TERMCAP_H
13489# include <termcap.h>
13490#endif
13491extern short ospeed;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013492
13493int
Illia Bobyra96d5442023-08-30 16:30:15 +020013494main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013495{
Bram Moolenaar071d4272004-06-13 20:20:40 +000013496ospeed = 20000
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013497 ;
13498 return 0;
13499}
13500_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013501if ac_fn_c_try_link "$LINENO"
13502then :
13503 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13504printf "%s\n" "yes" >&6; }; printf "%s\n" "#define OSPEED_EXTERN 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013505
Christian Brabandt9670f612025-05-07 21:44:33 +020013506else case e in #(
13507 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13508printf "%s\n" "no" >&6; } ;;
13509esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013510fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013511rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013512 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020013513 ;;
13514esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013515fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013516rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013517 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000013518
Illia Bobyra96d5442023-08-30 16:30:15 +020013519{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether termcap.h contains UP, BC and PC" >&5
13520printf %s "checking whether termcap.h contains UP, BC and PC... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013521cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013522/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013523
13524#ifdef HAVE_TERMCAP_H
13525# include <termcap.h>
13526#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013527
13528int
Illia Bobyra96d5442023-08-30 16:30:15 +020013529main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013530{
Bram Moolenaar071d4272004-06-13 20:20:40 +000013531if (UP == 0 && BC == 0) PC = 1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013532 ;
13533 return 0;
13534}
13535_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013536if ac_fn_c_try_link "$LINENO"
13537then :
13538 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13539printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_UP_BC_PC 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013540
Christian Brabandt9670f612025-05-07 21:44:33 +020013541else case e in #(
13542 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +020013543printf "%s\n" "no" >&6; }
13544 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether UP, BC and PC can be extern" >&5
13545printf %s "checking whether UP, BC and PC can be extern... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013547/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013548
13549#ifdef HAVE_TERMCAP_H
13550# include <termcap.h>
13551#endif
13552extern char *UP, *BC, PC;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013553
13554int
Illia Bobyra96d5442023-08-30 16:30:15 +020013555main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013556{
Bram Moolenaar071d4272004-06-13 20:20:40 +000013557if (UP == 0 && BC == 0) PC = 1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013558 ;
13559 return 0;
13560}
13561_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013562if ac_fn_c_try_link "$LINENO"
13563then :
13564 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13565printf "%s\n" "yes" >&6; }; printf "%s\n" "#define UP_BC_PC_EXTERN 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013566
Christian Brabandt9670f612025-05-07 21:44:33 +020013567else case e in #(
13568 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13569printf "%s\n" "no" >&6; } ;;
13570esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013571fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013572rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013573 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020013574 ;;
13575esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013576fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013577rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013578 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000013579
Illia Bobyra96d5442023-08-30 16:30:15 +020013580{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether tputs() uses outfuntype" >&5
13581printf %s "checking whether tputs() uses outfuntype... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013582cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013583/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013584
13585#ifdef HAVE_TERMCAP_H
13586# include <termcap.h>
13587#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013588
13589int
Illia Bobyra96d5442023-08-30 16:30:15 +020013590main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013591{
Bram Moolenaar071d4272004-06-13 20:20:40 +000013592extern int xx(); tputs("test", 1, (outfuntype)xx)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013593 ;
13594 return 0;
13595}
13596_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013597if ac_fn_c_try_compile "$LINENO"
13598then :
13599 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13600printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_OUTFUNTYPE 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013601
Christian Brabandt9670f612025-05-07 21:44:33 +020013602else case e in #(
13603 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13604printf "%s\n" "no" >&6; } ;;
13605esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013606fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013607rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000013608
Illia Bobyra96d5442023-08-30 16:30:15 +020013609{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether del_curterm() can be used" >&5
13610printf %s "checking whether del_curterm() can be used... " >&6; }
Bram Moolenaarb3a29552021-11-19 11:28:04 +000013611cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13612/* end confdefs.h. */
13613
13614#ifdef HAVE_TERMCAP_H
13615# include <termcap.h>
13616#endif
13617#include <term.h>
13618
13619int
Illia Bobyra96d5442023-08-30 16:30:15 +020013620main (void)
Bram Moolenaarb3a29552021-11-19 11:28:04 +000013621{
13622if (cur_term) del_curterm(cur_term);
13623 ;
13624 return 0;
13625}
13626_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013627if ac_fn_c_try_link "$LINENO"
13628then :
13629 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13630printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_DEL_CURTERM 1" >>confdefs.h
Bram Moolenaarb3a29552021-11-19 11:28:04 +000013631
Christian Brabandt9670f612025-05-07 21:44:33 +020013632else case e in #(
13633 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13634printf "%s\n" "no" >&6; } ;;
13635esac
Bram Moolenaarb3a29552021-11-19 11:28:04 +000013636fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013637rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarb3a29552021-11-19 11:28:04 +000013638 conftest$ac_exeext conftest.$ac_ext
13639
Illia Bobyra96d5442023-08-30 16:30:15 +020013640{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13641printf %s "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013642cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013643/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013644
13645#include <sys/types.h>
13646#include <sys/time.h>
13647#include <sys/select.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013648int
Illia Bobyra96d5442023-08-30 16:30:15 +020013649main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013650{
Bram Moolenaar071d4272004-06-13 20:20:40 +000013651
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013652 ;
13653 return 0;
13654}
13655_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013656if ac_fn_c_try_compile "$LINENO"
13657then :
13658 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13659printf "%s\n" "yes" >&6; }
13660 printf "%s\n" "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013661
Christian Brabandt9670f612025-05-07 21:44:33 +020013662else case e in #(
13663 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13664printf "%s\n" "no" >&6; } ;;
13665esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000013666fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013667rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000013668
Illia Bobyra96d5442023-08-30 16:30:15 +020013669{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13670printf %s "checking for /dev/ptc... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013671if test -r /dev/ptc; then
Illia Bobyra96d5442023-08-30 16:30:15 +020013672 printf "%s\n" "#define HAVE_DEV_PTC 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013673
Illia Bobyra96d5442023-08-30 16:30:15 +020013674 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13675printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013676else
Illia Bobyra96d5442023-08-30 16:30:15 +020013677 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13678printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013679fi
13680
Illia Bobyra96d5442023-08-30 16:30:15 +020013681{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SVR4 ptys" >&5
13682printf %s "checking for SVR4 ptys... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013683if test -c /dev/ptmx ; then
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013685/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013686
Bram Moolenaarce7be3a2020-11-26 20:11:11 +010013687// These should be in stdlib.h, but it depends on _XOPEN_SOURCE.
13688char *ptsname(int);
13689int unlockpt(int);
13690int grantpt(int);
13691
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013692int
Illia Bobyra96d5442023-08-30 16:30:15 +020013693main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013694{
Bram Moolenaarce7be3a2020-11-26 20:11:11 +010013695
13696 ptsname(0);
13697 grantpt(0);
13698 unlockpt(0);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013699 ;
13700 return 0;
13701}
13702_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013703if ac_fn_c_try_link "$LINENO"
13704then :
13705 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13706printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SVR4_PTYS 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013707
Christian Brabandt9670f612025-05-07 21:44:33 +020013708else case e in #(
13709 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13710printf "%s\n" "no" >&6; } ;;
13711esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013712fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013713rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013714 conftest$ac_exeext conftest.$ac_ext
13715else
Illia Bobyra96d5442023-08-30 16:30:15 +020013716 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13717printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013718fi
13719
Illia Bobyra96d5442023-08-30 16:30:15 +020013720{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ptyranges" >&5
13721printf %s "checking for ptyranges... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013722if test -d /dev/ptym ; then
13723 pdir='/dev/ptym'
13724else
13725 pdir='/dev'
13726fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013727cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013728/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013729#ifdef M_UNIX
13730 yes;
13731#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013732
13733_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000013734if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Christian Brabandt9670f612025-05-07 21:44:33 +020013735 $EGREP_TRADITIONAL "yes" >/dev/null 2>&1
Illia Bobyra96d5442023-08-30 16:30:15 +020013736then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000013737 ptys=`echo /dev/ptyp??`
Christian Brabandt9670f612025-05-07 21:44:33 +020013738else case e in #(
13739 e) ptys=`echo $pdir/pty??` ;;
13740esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000013741fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013742rm -rf conftest*
Bram Moolenaar071d4272004-06-13 20:20:40 +000013743
13744if test "$ptys" != "$pdir/pty??" ; then
13745 p0=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\).$/\1/g' | sort -u | tr -d '\012'`
13746 p1=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\)$/\1/g' | sort -u | tr -d '\012'`
Illia Bobyra96d5442023-08-30 16:30:15 +020013747 printf "%s\n" "#define PTYRANGE0 \"$p0\"" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013748
Illia Bobyra96d5442023-08-30 16:30:15 +020013749 printf "%s\n" "#define PTYRANGE1 \"$p1\"" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013750
Illia Bobyra96d5442023-08-30 16:30:15 +020013751 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $p0 / $p1" >&5
13752printf "%s\n" "$p0 / $p1" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013753else
Illia Bobyra96d5442023-08-30 16:30:15 +020013754 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: don't know" >&5
13755printf "%s\n" "don't know" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013756fi
13757
Bram Moolenaar446cb832008-06-24 21:56:24 +000013758
Illia Bobyra96d5442023-08-30 16:30:15 +020013759{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct sigcontext" >&5
13760printf %s "checking for struct sigcontext... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013761cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013762/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013763
13764#include <signal.h>
Sam Jamesf8ea1062022-11-05 15:13:50 +000013765int test_sig()
Bram Moolenaar071d4272004-06-13 20:20:40 +000013766{
13767 struct sigcontext *scont;
13768 scont = (struct sigcontext *)0;
13769 return 1;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013770}
13771int
Illia Bobyra96d5442023-08-30 16:30:15 +020013772main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013773{
Bram Moolenaar071d4272004-06-13 20:20:40 +000013774
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013775 ;
13776 return 0;
13777}
13778_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013779if ac_fn_c_try_compile "$LINENO"
13780then :
13781 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13782printf "%s\n" "yes" >&6; }
13783 printf "%s\n" "#define HAVE_SIGCONTEXT 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013784
Christian Brabandt9670f612025-05-07 21:44:33 +020013785else case e in #(
13786 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13787printf "%s\n" "no" >&6; } ;;
13788esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000013789fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013790rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000013791
Illia Bobyra96d5442023-08-30 16:30:15 +020013792{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking getcwd implementation is broken" >&5
13793printf %s "checking getcwd implementation is broken... " >&6; }
13794if test ${vim_cv_getcwd_broken+y}
13795then :
13796 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020013797else case e in #(
13798 e)
Illia Bobyra96d5442023-08-30 16:30:15 +020013799 if test "$cross_compiling" = yes
13800then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000013801
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010013802 vim_cv_getcwd_broken=no
13803 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cross-compiling: consider setting 'vim_cv_getcwd_broken'" >&5
13804printf "%s\n" "$as_me: WARNING: cross-compiling: consider setting 'vim_cv_getcwd_broken'" >&2;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000013805
Christian Brabandt9670f612025-05-07 21:44:33 +020013806else case e in #(
13807 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013808/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013809
Bram Moolenaar446cb832008-06-24 21:56:24 +000013810#include "confdefs.h"
13811#ifdef HAVE_UNISTD_H
13812#include <unistd.h>
13813#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000013814char *dagger[] = { "IFS=pwd", 0 };
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010013815int main()
Bram Moolenaar071d4272004-06-13 20:20:40 +000013816{
13817 char buffer[500];
13818 extern char **environ;
13819 environ = dagger;
13820 return getcwd(buffer, 500) ? 0 : 1;
13821}
Bram Moolenaar446cb832008-06-24 21:56:24 +000013822
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013823_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013824if ac_fn_c_try_run "$LINENO"
13825then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000013826
13827 vim_cv_getcwd_broken=no
13828
Christian Brabandt9670f612025-05-07 21:44:33 +020013829else case e in #(
13830 e)
Bram Moolenaar446cb832008-06-24 21:56:24 +000013831 vim_cv_getcwd_broken=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020013832 ;;
13833esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000013834fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013835rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
Christian Brabandt9670f612025-05-07 21:44:33 +020013836 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
13837esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000013838fi
13839
Christian Brabandt9670f612025-05-07 21:44:33 +020013840 ;;
13841esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000013842fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013843{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_getcwd_broken" >&5
13844printf "%s\n" "$vim_cv_getcwd_broken" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000013845
13846if test "x$vim_cv_getcwd_broken" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020013847 printf "%s\n" "#define BAD_GETCWD 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013848
Bram Moolenaar63d25552019-05-10 21:28:38 +020013849 ac_fn_c_check_func "$LINENO" "getwd" "ac_cv_func_getwd"
Illia Bobyra96d5442023-08-30 16:30:15 +020013850if test "x$ac_cv_func_getwd" = xyes
13851then :
13852 printf "%s\n" "#define HAVE_GETWD 1" >>confdefs.h
Bram Moolenaar63d25552019-05-10 21:28:38 +020013853
Bram Moolenaar071d4272004-06-13 20:20:40 +000013854fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000013855
Illia Bobyra96d5442023-08-30 16:30:15 +020013856fi
13857
13858ac_fn_c_check_func "$LINENO" "fchdir" "ac_cv_func_fchdir"
13859if test "x$ac_cv_func_fchdir" = xyes
13860then :
13861 printf "%s\n" "#define HAVE_FCHDIR 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013862
Bram Moolenaar071d4272004-06-13 20:20:40 +000013863fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013864ac_fn_c_check_func "$LINENO" "fchown" "ac_cv_func_fchown"
13865if test "x$ac_cv_func_fchown" = xyes
13866then :
13867 printf "%s\n" "#define HAVE_FCHOWN 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013868
Illia Bobyra96d5442023-08-30 16:30:15 +020013869fi
13870ac_fn_c_check_func "$LINENO" "fchmod" "ac_cv_func_fchmod"
13871if test "x$ac_cv_func_fchmod" = xyes
13872then :
13873 printf "%s\n" "#define HAVE_FCHMOD 1" >>confdefs.h
13874
13875fi
13876ac_fn_c_check_func "$LINENO" "fsync" "ac_cv_func_fsync"
13877if test "x$ac_cv_func_fsync" = xyes
13878then :
13879 printf "%s\n" "#define HAVE_FSYNC 1" >>confdefs.h
13880
13881fi
13882ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
13883if test "x$ac_cv_func_getcwd" = xyes
13884then :
13885 printf "%s\n" "#define HAVE_GETCWD 1" >>confdefs.h
13886
13887fi
13888ac_fn_c_check_func "$LINENO" "getpseudotty" "ac_cv_func_getpseudotty"
13889if test "x$ac_cv_func_getpseudotty" = xyes
13890then :
13891 printf "%s\n" "#define HAVE_GETPSEUDOTTY 1" >>confdefs.h
13892
13893fi
13894ac_fn_c_check_func "$LINENO" "getpwent" "ac_cv_func_getpwent"
13895if test "x$ac_cv_func_getpwent" = xyes
13896then :
13897 printf "%s\n" "#define HAVE_GETPWENT 1" >>confdefs.h
13898
13899fi
13900ac_fn_c_check_func "$LINENO" "getpwnam" "ac_cv_func_getpwnam"
13901if test "x$ac_cv_func_getpwnam" = xyes
13902then :
13903 printf "%s\n" "#define HAVE_GETPWNAM 1" >>confdefs.h
13904
13905fi
13906ac_fn_c_check_func "$LINENO" "getpwuid" "ac_cv_func_getpwuid"
13907if test "x$ac_cv_func_getpwuid" = xyes
13908then :
13909 printf "%s\n" "#define HAVE_GETPWUID 1" >>confdefs.h
13910
13911fi
13912ac_fn_c_check_func "$LINENO" "getrlimit" "ac_cv_func_getrlimit"
13913if test "x$ac_cv_func_getrlimit" = xyes
13914then :
13915 printf "%s\n" "#define HAVE_GETRLIMIT 1" >>confdefs.h
13916
13917fi
13918ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
13919if test "x$ac_cv_func_gettimeofday" = xyes
13920then :
13921 printf "%s\n" "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
13922
13923fi
13924ac_fn_c_check_func "$LINENO" "localtime_r" "ac_cv_func_localtime_r"
13925if test "x$ac_cv_func_localtime_r" = xyes
13926then :
13927 printf "%s\n" "#define HAVE_LOCALTIME_R 1" >>confdefs.h
13928
13929fi
13930ac_fn_c_check_func "$LINENO" "lstat" "ac_cv_func_lstat"
13931if test "x$ac_cv_func_lstat" = xyes
13932then :
13933 printf "%s\n" "#define HAVE_LSTAT 1" >>confdefs.h
13934
13935fi
13936ac_fn_c_check_func "$LINENO" "memset" "ac_cv_func_memset"
13937if test "x$ac_cv_func_memset" = xyes
13938then :
13939 printf "%s\n" "#define HAVE_MEMSET 1" >>confdefs.h
13940
13941fi
13942ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
13943if test "x$ac_cv_func_mkdtemp" = xyes
13944then :
13945 printf "%s\n" "#define HAVE_MKDTEMP 1" >>confdefs.h
13946
13947fi
13948ac_fn_c_check_func "$LINENO" "nanosleep" "ac_cv_func_nanosleep"
13949if test "x$ac_cv_func_nanosleep" = xyes
13950then :
13951 printf "%s\n" "#define HAVE_NANOSLEEP 1" >>confdefs.h
13952
13953fi
13954ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
13955if test "x$ac_cv_func_opendir" = xyes
13956then :
13957 printf "%s\n" "#define HAVE_OPENDIR 1" >>confdefs.h
13958
13959fi
13960ac_fn_c_check_func "$LINENO" "putenv" "ac_cv_func_putenv"
13961if test "x$ac_cv_func_putenv" = xyes
13962then :
13963 printf "%s\n" "#define HAVE_PUTENV 1" >>confdefs.h
13964
13965fi
13966ac_fn_c_check_func "$LINENO" "qsort" "ac_cv_func_qsort"
13967if test "x$ac_cv_func_qsort" = xyes
13968then :
13969 printf "%s\n" "#define HAVE_QSORT 1" >>confdefs.h
13970
13971fi
13972ac_fn_c_check_func "$LINENO" "readlink" "ac_cv_func_readlink"
13973if test "x$ac_cv_func_readlink" = xyes
13974then :
13975 printf "%s\n" "#define HAVE_READLINK 1" >>confdefs.h
13976
13977fi
13978ac_fn_c_check_func "$LINENO" "select" "ac_cv_func_select"
13979if test "x$ac_cv_func_select" = xyes
13980then :
13981 printf "%s\n" "#define HAVE_SELECT 1" >>confdefs.h
13982
13983fi
13984ac_fn_c_check_func "$LINENO" "setenv" "ac_cv_func_setenv"
13985if test "x$ac_cv_func_setenv" = xyes
13986then :
13987 printf "%s\n" "#define HAVE_SETENV 1" >>confdefs.h
13988
13989fi
13990ac_fn_c_check_func "$LINENO" "getpgid" "ac_cv_func_getpgid"
13991if test "x$ac_cv_func_getpgid" = xyes
13992then :
13993 printf "%s\n" "#define HAVE_GETPGID 1" >>confdefs.h
13994
13995fi
13996ac_fn_c_check_func "$LINENO" "setpgid" "ac_cv_func_setpgid"
13997if test "x$ac_cv_func_setpgid" = xyes
13998then :
13999 printf "%s\n" "#define HAVE_SETPGID 1" >>confdefs.h
14000
14001fi
14002ac_fn_c_check_func "$LINENO" "setsid" "ac_cv_func_setsid"
14003if test "x$ac_cv_func_setsid" = xyes
14004then :
14005 printf "%s\n" "#define HAVE_SETSID 1" >>confdefs.h
14006
14007fi
14008ac_fn_c_check_func "$LINENO" "sigaltstack" "ac_cv_func_sigaltstack"
14009if test "x$ac_cv_func_sigaltstack" = xyes
14010then :
14011 printf "%s\n" "#define HAVE_SIGALTSTACK 1" >>confdefs.h
14012
14013fi
14014ac_fn_c_check_func "$LINENO" "sigstack" "ac_cv_func_sigstack"
14015if test "x$ac_cv_func_sigstack" = xyes
14016then :
14017 printf "%s\n" "#define HAVE_SIGSTACK 1" >>confdefs.h
14018
14019fi
14020ac_fn_c_check_func "$LINENO" "sigset" "ac_cv_func_sigset"
14021if test "x$ac_cv_func_sigset" = xyes
14022then :
14023 printf "%s\n" "#define HAVE_SIGSET 1" >>confdefs.h
14024
14025fi
14026ac_fn_c_check_func "$LINENO" "sigsetjmp" "ac_cv_func_sigsetjmp"
14027if test "x$ac_cv_func_sigsetjmp" = xyes
14028then :
14029 printf "%s\n" "#define HAVE_SIGSETJMP 1" >>confdefs.h
14030
14031fi
14032ac_fn_c_check_func "$LINENO" "sigaction" "ac_cv_func_sigaction"
14033if test "x$ac_cv_func_sigaction" = xyes
14034then :
14035 printf "%s\n" "#define HAVE_SIGACTION 1" >>confdefs.h
14036
14037fi
14038ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
14039if test "x$ac_cv_func_sigprocmask" = xyes
14040then :
14041 printf "%s\n" "#define HAVE_SIGPROCMASK 1" >>confdefs.h
14042
14043fi
14044ac_fn_c_check_func "$LINENO" "sigvec" "ac_cv_func_sigvec"
14045if test "x$ac_cv_func_sigvec" = xyes
14046then :
14047 printf "%s\n" "#define HAVE_SIGVEC 1" >>confdefs.h
14048
14049fi
14050ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
14051if test "x$ac_cv_func_strcasecmp" = xyes
14052then :
14053 printf "%s\n" "#define HAVE_STRCASECMP 1" >>confdefs.h
14054
14055fi
14056ac_fn_c_check_func "$LINENO" "strcoll" "ac_cv_func_strcoll"
14057if test "x$ac_cv_func_strcoll" = xyes
14058then :
14059 printf "%s\n" "#define HAVE_STRCOLL 1" >>confdefs.h
14060
14061fi
14062ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror"
14063if test "x$ac_cv_func_strerror" = xyes
14064then :
14065 printf "%s\n" "#define HAVE_STRERROR 1" >>confdefs.h
14066
14067fi
14068ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
14069if test "x$ac_cv_func_strftime" = xyes
14070then :
14071 printf "%s\n" "#define HAVE_STRFTIME 1" >>confdefs.h
14072
14073fi
14074ac_fn_c_check_func "$LINENO" "stricmp" "ac_cv_func_stricmp"
14075if test "x$ac_cv_func_stricmp" = xyes
14076then :
14077 printf "%s\n" "#define HAVE_STRICMP 1" >>confdefs.h
14078
14079fi
14080ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp"
14081if test "x$ac_cv_func_strncasecmp" = xyes
14082then :
14083 printf "%s\n" "#define HAVE_STRNCASECMP 1" >>confdefs.h
14084
14085fi
14086ac_fn_c_check_func "$LINENO" "strnicmp" "ac_cv_func_strnicmp"
14087if test "x$ac_cv_func_strnicmp" = xyes
14088then :
14089 printf "%s\n" "#define HAVE_STRNICMP 1" >>confdefs.h
14090
14091fi
14092ac_fn_c_check_func "$LINENO" "strpbrk" "ac_cv_func_strpbrk"
14093if test "x$ac_cv_func_strpbrk" = xyes
14094then :
14095 printf "%s\n" "#define HAVE_STRPBRK 1" >>confdefs.h
14096
14097fi
14098ac_fn_c_check_func "$LINENO" "strptime" "ac_cv_func_strptime"
14099if test "x$ac_cv_func_strptime" = xyes
14100then :
14101 printf "%s\n" "#define HAVE_STRPTIME 1" >>confdefs.h
14102
14103fi
14104ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol"
14105if test "x$ac_cv_func_strtol" = xyes
14106then :
14107 printf "%s\n" "#define HAVE_STRTOL 1" >>confdefs.h
14108
14109fi
14110ac_fn_c_check_func "$LINENO" "tgetent" "ac_cv_func_tgetent"
14111if test "x$ac_cv_func_tgetent" = xyes
14112then :
14113 printf "%s\n" "#define HAVE_TGETENT 1" >>confdefs.h
14114
14115fi
14116ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
14117if test "x$ac_cv_func_towlower" = xyes
14118then :
14119 printf "%s\n" "#define HAVE_TOWLOWER 1" >>confdefs.h
14120
14121fi
14122ac_fn_c_check_func "$LINENO" "towupper" "ac_cv_func_towupper"
14123if test "x$ac_cv_func_towupper" = xyes
14124then :
14125 printf "%s\n" "#define HAVE_TOWUPPER 1" >>confdefs.h
14126
14127fi
14128ac_fn_c_check_func "$LINENO" "iswupper" "ac_cv_func_iswupper"
14129if test "x$ac_cv_func_iswupper" = xyes
14130then :
14131 printf "%s\n" "#define HAVE_ISWUPPER 1" >>confdefs.h
14132
14133fi
14134ac_fn_c_check_func "$LINENO" "tzset" "ac_cv_func_tzset"
14135if test "x$ac_cv_func_tzset" = xyes
14136then :
14137 printf "%s\n" "#define HAVE_TZSET 1" >>confdefs.h
14138
14139fi
14140ac_fn_c_check_func "$LINENO" "usleep" "ac_cv_func_usleep"
14141if test "x$ac_cv_func_usleep" = xyes
14142then :
14143 printf "%s\n" "#define HAVE_USLEEP 1" >>confdefs.h
14144
14145fi
14146ac_fn_c_check_func "$LINENO" "utime" "ac_cv_func_utime"
14147if test "x$ac_cv_func_utime" = xyes
14148then :
14149 printf "%s\n" "#define HAVE_UTIME 1" >>confdefs.h
14150
14151fi
14152ac_fn_c_check_func "$LINENO" "utimes" "ac_cv_func_utimes"
14153if test "x$ac_cv_func_utimes" = xyes
14154then :
14155 printf "%s\n" "#define HAVE_UTIMES 1" >>confdefs.h
14156
14157fi
14158ac_fn_c_check_func "$LINENO" "mblen" "ac_cv_func_mblen"
14159if test "x$ac_cv_func_mblen" = xyes
14160then :
14161 printf "%s\n" "#define HAVE_MBLEN 1" >>confdefs.h
14162
14163fi
14164ac_fn_c_check_func "$LINENO" "ftruncate" "ac_cv_func_ftruncate"
14165if test "x$ac_cv_func_ftruncate" = xyes
14166then :
14167 printf "%s\n" "#define HAVE_FTRUNCATE 1" >>confdefs.h
14168
14169fi
14170ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
14171if test "x$ac_cv_func_unsetenv" = xyes
14172then :
14173 printf "%s\n" "#define HAVE_UNSETENV 1" >>confdefs.h
14174
14175fi
14176ac_fn_c_check_func "$LINENO" "posix_openpt" "ac_cv_func_posix_openpt"
14177if test "x$ac_cv_func_posix_openpt" = xyes
14178then :
14179 printf "%s\n" "#define HAVE_POSIX_OPENPT 1" >>confdefs.h
14180
14181fi
14182ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
14183if test "x$ac_cv_func_clock_gettime" = xyes
14184then :
14185 printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
Bram Moolenaar643b6142018-09-12 20:29:09 +020014186
14187fi
Jonas Sortie Termansen8bb5eaf2024-11-04 20:32:27 +010014188ac_fn_c_check_func "$LINENO" "sync" "ac_cv_func_sync"
14189if test "x$ac_cv_func_sync" = xyes
14190then :
14191 printf "%s\n" "#define HAVE_SYNC 1" >>confdefs.h
14192
14193fi
Bram Moolenaar643b6142018-09-12 20:29:09 +020014194
Bram Moolenaar643b6142018-09-12 20:29:09 +020014195
Illia Bobyra96d5442023-08-30 16:30:15 +020014196
14197
14198{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking types of arguments for select" >&5
14199printf %s "checking types of arguments for select... " >&6; }
14200if test ${ac_cv_func_select_args+y}
14201then :
14202 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020014203else case e in #(
14204 e) ac_cv_func_select_args='int,int *,struct timeval *'
Illia Bobyra96d5442023-08-30 16:30:15 +020014205for ac_arg234 in 'fd_set *' 'int *' 'void *'; do
Bram Moolenaar643b6142018-09-12 20:29:09 +020014206 for ac_arg1 in 'int' 'size_t' 'unsigned long int' 'unsigned int'; do
14207 for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do
14208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14209/* end confdefs.h. */
14210$ac_includes_default
14211#ifdef HAVE_SYS_SELECT_H
14212# include <sys/select.h>
14213#endif
14214#ifdef HAVE_SYS_SOCKET_H
14215# include <sys/socket.h>
14216#endif
14217
14218int
Illia Bobyra96d5442023-08-30 16:30:15 +020014219main (void)
Bram Moolenaar643b6142018-09-12 20:29:09 +020014220{
14221extern int select ($ac_arg1,
14222 $ac_arg234, $ac_arg234, $ac_arg234,
14223 $ac_arg5);
14224 ;
14225 return 0;
14226}
14227_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014228if ac_fn_c_try_compile "$LINENO"
14229then :
Bram Moolenaar643b6142018-09-12 20:29:09 +020014230 ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3
14231fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014232rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar643b6142018-09-12 20:29:09 +020014233 done
14234 done
14235done
Christian Brabandt9670f612025-05-07 21:44:33 +020014236 ;;
14237esac
Bram Moolenaar643b6142018-09-12 20:29:09 +020014238fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014239{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_select_args" >&5
14240printf "%s\n" "$ac_cv_func_select_args" >&6; }
Bram Moolenaar643b6142018-09-12 20:29:09 +020014241ac_save_IFS=$IFS; IFS=','
14242set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'`
14243IFS=$ac_save_IFS
14244shift
14245
Illia Bobyra96d5442023-08-30 16:30:15 +020014246printf "%s\n" "#define SELECT_TYPE_ARG1 $1" >>confdefs.h
Bram Moolenaar643b6142018-09-12 20:29:09 +020014247
14248
Illia Bobyra96d5442023-08-30 16:30:15 +020014249printf "%s\n" "#define SELECT_TYPE_ARG234 ($2)" >>confdefs.h
Bram Moolenaar643b6142018-09-12 20:29:09 +020014250
14251
Illia Bobyra96d5442023-08-30 16:30:15 +020014252printf "%s\n" "#define SELECT_TYPE_ARG5 ($3)" >>confdefs.h
Bram Moolenaar643b6142018-09-12 20:29:09 +020014253
Illia Bobyra96d5442023-08-30 16:30:15 +020014254rm -rf conftest*
Bram Moolenaar643b6142018-09-12 20:29:09 +020014255
Christian Brabandt9670f612025-05-07 21:44:33 +020014256{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for declarations of fseeko and ftello" >&5
14257printf %s "checking for declarations of fseeko and ftello... " >&6; }
14258if test ${ac_cv_func_fseeko_ftello+y}
Illia Bobyra96d5442023-08-30 16:30:15 +020014259then :
14260 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020014261else case e in #(
14262 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar25153e12010-02-24 14:47:08 +010014263/* end confdefs.h. */
Bram Moolenaar25153e12010-02-24 14:47:08 +010014264
Christian Brabandt9670f612025-05-07 21:44:33 +020014265#if defined __hpux && !defined _LARGEFILE_SOURCE
14266# include <limits.h>
14267# if LONG_MAX >> 31 == 0
14268# error "32-bit HP-UX 11/ia64 needs _LARGEFILE_SOURCE for fseeko in C++"
14269# endif
14270#endif
14271#include <sys/types.h> /* for off_t */
14272#include <stdio.h>
14273
14274int
14275main (void)
14276{
14277
14278 int (*fp1) (FILE *, off_t, int) = fseeko;
14279 off_t (*fp2) (FILE *) = ftello;
14280 return fseeko (stdin, 0, 0)
14281 && fp1 (stdin, 0, 0)
14282 && ftello (stdin) >= 0
14283 && fp2 (stdin) >= 0;
14284
14285 ;
14286 return 0;
14287}
14288_ACEOF
14289if ac_fn_c_try_compile "$LINENO"
14290then :
14291 ac_cv_func_fseeko_ftello=yes
14292else case e in #(
14293 e) ac_save_CPPFLAGS="$CPPFLAGS"
14294 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE=1"
14295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14296/* end confdefs.h. */
14297
14298#if defined __hpux && !defined _LARGEFILE_SOURCE
14299# include <limits.h>
14300# if LONG_MAX >> 31 == 0
14301# error "32-bit HP-UX 11/ia64 needs _LARGEFILE_SOURCE for fseeko in C++"
14302# endif
14303#endif
14304#include <sys/types.h> /* for off_t */
14305#include <stdio.h>
14306
14307int
14308main (void)
14309{
14310
14311 int (*fp1) (FILE *, off_t, int) = fseeko;
14312 off_t (*fp2) (FILE *) = ftello;
14313 return fseeko (stdin, 0, 0)
14314 && fp1 (stdin, 0, 0)
14315 && ftello (stdin) >= 0
14316 && fp2 (stdin) >= 0;
14317
14318 ;
14319 return 0;
14320}
14321_ACEOF
14322if ac_fn_c_try_compile "$LINENO"
14323then :
14324 ac_cv_func_fseeko_ftello="need _LARGEFILE_SOURCE"
14325else case e in #(
14326 e) ac_cv_func_fseeko_ftello=no ;;
14327esac
14328fi
14329rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
14330esac
14331fi
14332rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
14333esac
14334fi
14335{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fseeko_ftello" >&5
14336printf "%s\n" "$ac_cv_func_fseeko_ftello" >&6; }
14337if test "$ac_cv_func_fseeko_ftello" != no
14338then :
Bram Moolenaar25153e12010-02-24 14:47:08 +010014339
Illia Bobyra96d5442023-08-30 16:30:15 +020014340printf "%s\n" "#define HAVE_FSEEKO 1" >>confdefs.h
Bram Moolenaar25153e12010-02-24 14:47:08 +010014341
14342fi
Christian Brabandt9670f612025-05-07 21:44:33 +020014343if test "$ac_cv_func_fseeko_ftello" = "need _LARGEFILE_SOURCE"
14344then :
14345
14346printf "%s\n" "#define _LARGEFILE_SOURCE 1" >>confdefs.h
14347
14348fi
Bram Moolenaar25153e12010-02-24 14:47:08 +010014349
Bram Moolenaar071d4272004-06-13 20:20:40 +000014350
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014351# Check whether --enable-largefile was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020014352if test ${enable_largefile+y}
14353then :
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014354 enableval=$enable_largefile;
14355fi
Christian Brabandt9670f612025-05-07 21:44:33 +020014356if test "$enable_largefile,$enable_year2038" != no,no
14357then :
14358 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable large file support" >&5
14359printf %s "checking for $CC option to enable large file support... " >&6; }
14360if test ${ac_cv_sys_largefile_opts+y}
Illia Bobyra96d5442023-08-30 16:30:15 +020014361then :
14362 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020014363else case e in #(
14364 e) ac_save_CC="$CC"
14365 ac_opt_found=no
14366 for ac_opt in "none needed" "-D_FILE_OFFSET_BITS=64" "-D_LARGE_FILES=1" "-n32"; do
14367 if test x"$ac_opt" != x"none needed"
14368then :
14369 CC="$ac_save_CC $ac_opt"
14370fi
14371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014372/* end confdefs.h. */
14373#include <sys/types.h>
Christian Brabandt9670f612025-05-07 21:44:33 +020014374#ifndef FTYPE
14375# define FTYPE off_t
14376#endif
14377 /* Check that FTYPE can represent 2**63 - 1 correctly.
14378 We can't simply define LARGE_FTYPE to be 9223372036854775807,
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014379 since some C++ compilers masquerading as C compilers
14380 incorrectly reject 9223372036854775807. */
Christian Brabandt9670f612025-05-07 21:44:33 +020014381#define LARGE_FTYPE (((FTYPE) 1 << 31 << 31) - 1 + ((FTYPE) 1 << 31 << 31))
14382 int FTYPE_is_large[(LARGE_FTYPE % 2147483629 == 721
14383 && LARGE_FTYPE % 2147483647 == 1)
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014384 ? 1 : -1];
14385int
Illia Bobyra96d5442023-08-30 16:30:15 +020014386main (void)
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014387{
14388
14389 ;
14390 return 0;
14391}
14392_ACEOF
Christian Brabandt9670f612025-05-07 21:44:33 +020014393if ac_fn_c_try_compile "$LINENO"
14394then :
14395 if test x"$ac_opt" = x"none needed"
14396then :
14397 # GNU/Linux s390x and alpha need _FILE_OFFSET_BITS=64 for wide ino_t.
14398 CC="$CC -DFTYPE=ino_t"
Illia Bobyra96d5442023-08-30 16:30:15 +020014399 if ac_fn_c_try_compile "$LINENO"
14400then :
Christian Brabandt9670f612025-05-07 21:44:33 +020014401
14402else case e in #(
14403 e) CC="$CC -D_FILE_OFFSET_BITS=64"
14404 if ac_fn_c_try_compile "$LINENO"
14405then :
14406 ac_opt='-D_FILE_OFFSET_BITS=64'
14407fi
14408rm -f core conftest.err conftest.$ac_objext conftest.beam ;;
14409esac
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014410fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014411rm -f core conftest.err conftest.$ac_objext conftest.beam
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014412fi
Christian Brabandt9670f612025-05-07 21:44:33 +020014413 ac_cv_sys_largefile_opts=$ac_opt
14414 ac_opt_found=yes
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014415fi
Christian Brabandt9670f612025-05-07 21:44:33 +020014416rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14417 test $ac_opt_found = no || break
14418 done
14419 CC="$ac_save_CC"
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014420
Christian Brabandt9670f612025-05-07 21:44:33 +020014421 test $ac_opt_found = yes || ac_cv_sys_largefile_opts="support not detected" ;;
14422esac
14423fi
14424{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_opts" >&5
14425printf "%s\n" "$ac_cv_sys_largefile_opts" >&6; }
14426
14427ac_have_largefile=yes
14428case $ac_cv_sys_largefile_opts in #(
14429 "none needed") :
14430 ;; #(
14431 "supported through gnulib") :
14432 ;; #(
14433 "support not detected") :
14434 ac_have_largefile=no ;; #(
14435 "-D_FILE_OFFSET_BITS=64") :
14436
14437printf "%s\n" "#define _FILE_OFFSET_BITS 64" >>confdefs.h
14438 ;; #(
14439 "-D_LARGE_FILES=1") :
14440
14441printf "%s\n" "#define _LARGE_FILES 1" >>confdefs.h
14442 ;; #(
14443 "-n32") :
14444 CC="$CC -n32" ;; #(
14445 *) :
14446 as_fn_error $? "internal error: bad value for \$ac_cv_sys_largefile_opts" "$LINENO" 5 ;;
14447esac
14448
14449if test "$enable_year2038" != no
14450then :
14451 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option for timestamps after 2038" >&5
14452printf %s "checking for $CC option for timestamps after 2038... " >&6; }
14453if test ${ac_cv_sys_year2038_opts+y}
Illia Bobyra96d5442023-08-30 16:30:15 +020014454then :
14455 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020014456else case e in #(
14457 e) ac_save_CPPFLAGS="$CPPFLAGS"
14458 ac_opt_found=no
14459 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
14460 if test x"$ac_opt" != x"none needed"
14461then :
14462 CPPFLAGS="$ac_save_CPPFLAGS $ac_opt"
14463fi
14464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014465/* end confdefs.h. */
Christian Brabandt9670f612025-05-07 21:44:33 +020014466
14467 #include <time.h>
14468 /* Check that time_t can represent 2**32 - 1 correctly. */
14469 #define LARGE_TIME_T \\
14470 ((time_t) (((time_t) 1 << 30) - 1 + 3 * ((time_t) 1 << 30)))
14471 int verify_time_t_range[(LARGE_TIME_T / 65537 == 65535
14472 && LARGE_TIME_T % 65537 == 0)
14473 ? 1 : -1];
14474
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014475int
Illia Bobyra96d5442023-08-30 16:30:15 +020014476main (void)
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014477{
14478
14479 ;
14480 return 0;
14481}
14482_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014483if ac_fn_c_try_compile "$LINENO"
14484then :
Christian Brabandt9670f612025-05-07 21:44:33 +020014485 ac_cv_sys_year2038_opts="$ac_opt"
14486 ac_opt_found=yes
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014487fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014488rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020014489 test $ac_opt_found = no || break
14490 done
14491 CPPFLAGS="$ac_save_CPPFLAGS"
14492 test $ac_opt_found = yes || ac_cv_sys_year2038_opts="support not detected" ;;
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014493esac
Christian Brabandt9670f612025-05-07 21:44:33 +020014494fi
14495{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_year2038_opts" >&5
14496printf "%s\n" "$ac_cv_sys_year2038_opts" >&6; }
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014497
Christian Brabandt9670f612025-05-07 21:44:33 +020014498ac_have_year2038=yes
14499case $ac_cv_sys_year2038_opts in #(
14500 "none needed") :
14501 ;; #(
14502 "support not detected") :
14503 ac_have_year2038=no ;; #(
14504 "-D_TIME_BITS=64") :
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014505
Christian Brabandt9670f612025-05-07 21:44:33 +020014506printf "%s\n" "#define _TIME_BITS 64" >>confdefs.h
14507 ;; #(
14508 "-D__MINGW_USE_VC2005_COMPAT") :
14509
14510printf "%s\n" "#define __MINGW_USE_VC2005_COMPAT 1" >>confdefs.h
14511 ;; #(
14512 "-U_USE_32_BIT_TIME_T"*) :
14513 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
14514printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
14515as_fn_error $? "the 'time_t' type is currently forced to be 32-bit. It
14516will stop working after mid-January 2038. Remove
14517_USE_32BIT_TIME_T from the compiler flags.
14518See 'config.log' for more details" "$LINENO" 5; } ;; #(
14519 *) :
14520 as_fn_error $? "internal error: bad value for \$ac_cv_sys_year2038_opts" "$LINENO" 5 ;;
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014521esac
Christian Brabandt9670f612025-05-07 21:44:33 +020014522
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014523fi
14524
Christian Brabandt9670f612025-05-07 21:44:33 +020014525fi
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014526
Illia Bobyra96d5442023-08-30 16:30:15 +020014527{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-canberra argument" >&5
14528printf %s "checking --enable-canberra argument... " >&6; }
Bram Moolenaar21606672019-06-14 20:40:58 +020014529# Check whether --enable-canberra was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020014530if test ${enable_canberra+y}
14531then :
Bram Moolenaar21606672019-06-14 20:40:58 +020014532 enableval=$enable_canberra;
Christian Brabandt9670f612025-05-07 21:44:33 +020014533else case e in #(
14534 e) enable_canberra="maybe" ;;
14535esac
Bram Moolenaar21606672019-06-14 20:40:58 +020014536fi
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014537
Bram Moolenaar21606672019-06-14 20:40:58 +020014538
14539if test "$enable_canberra" = "maybe"; then
Martin Tournoij25f3a142022-10-08 19:26:41 +010014540 if test "$features" = "huge"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014541 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to yes" >&5
14542printf "%s\n" "Defaulting to yes" >&6; }
Bram Moolenaar21606672019-06-14 20:40:58 +020014543 enable_canberra="yes"
14544 else
Illia Bobyra96d5442023-08-30 16:30:15 +020014545 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to no" >&5
14546printf "%s\n" "Defaulting to no" >&6; }
Bram Moolenaar21606672019-06-14 20:40:58 +020014547 enable_canberra="no"
14548 fi
14549else
Bram Moolenaar12471262022-01-18 11:11:25 +000014550 if test "$enable_canberra" = "yes" -a "$has_eval" = "no"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014551 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot use sound with tiny features" >&5
14552printf "%s\n" "cannot use sound with tiny features" >&6; }
Bram Moolenaar12471262022-01-18 11:11:25 +000014553 enable_canberra="no"
14554 else
Illia Bobyra96d5442023-08-30 16:30:15 +020014555 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_canberra" >&5
14556printf "%s\n" "$enable_canberra" >&6; }
Bram Moolenaar12471262022-01-18 11:11:25 +000014557 fi
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014558fi
Bram Moolenaar21606672019-06-14 20:40:58 +020014559if test "$enable_canberra" = "yes"; then
14560 if test "x$PKG_CONFIG" != "xno"; then
14561 canberra_lib=`$PKG_CONFIG --libs libcanberra 2>/dev/null`
14562 canberra_cflags=`$PKG_CONFIG --cflags libcanberra 2>/dev/null`
14563 fi
14564 if test "x$canberra_lib" = "x"; then
14565 canberra_lib=-lcanberra
14566 canberra_cflags=-D_REENTRANT
14567 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014568 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcanberra" >&5
14569printf %s "checking for libcanberra... " >&6; }
Bram Moolenaar21606672019-06-14 20:40:58 +020014570 ac_save_CFLAGS="$CFLAGS"
14571 ac_save_LIBS="$LIBS"
Bram Moolenaar12471262022-01-18 11:11:25 +000014572 if `echo "$CFLAGS" | grep -v "$canberra_cflags" 2>/dev/null`; then
Christian Brabandt6b9efdd2021-09-09 17:14:50 +020014573 CFLAGS="$CFLAGS $canberra_cflags"
14574 fi
Bram Moolenaar21606672019-06-14 20:40:58 +020014575 LIBS="$LIBS $canberra_lib"
14576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014577/* end confdefs.h. */
14578
Bram Moolenaar21606672019-06-14 20:40:58 +020014579 # include <canberra.h>
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014580
14581int
Illia Bobyra96d5442023-08-30 16:30:15 +020014582main (void)
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014583{
14584
Bram Moolenaar21606672019-06-14 20:40:58 +020014585 ca_context *hello;
14586 ca_context_create(&hello);
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014587 ;
14588 return 0;
14589}
14590_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014591if ac_fn_c_try_link "$LINENO"
14592then :
14593 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14594printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_CANBERRA 1" >>confdefs.h
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014595
Christian Brabandt9670f612025-05-07 21:44:33 +020014596else case e in #(
14597 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no; try installing libcanberra-dev" >&5
14598printf "%s\n" "no; try installing libcanberra-dev" >&6; }; CFLAGS="$ac_save_CFLAGS"; LIBS="$ac_save_LIBS" ;;
14599esac
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014600fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014601rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014602 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar21606672019-06-14 20:40:58 +020014603fi
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014604
Illia Bobyra96d5442023-08-30 16:30:15 +020014605{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-libsodium argument" >&5
14606printf %s "checking --enable-libsodium argument... " >&6; }
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014607# Check whether --enable-libsodium was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020014608if test ${enable_libsodium+y}
14609then :
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014610 enableval=$enable_libsodium;
Christian Brabandt9670f612025-05-07 21:44:33 +020014611else case e in #(
14612 e) enable_libsodium="maybe" ;;
14613esac
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014614fi
14615
14616
14617if test "$enable_libsodium" = "maybe"; then
Martin Tournoij25f3a142022-10-08 19:26:41 +010014618 if test "$features" = "huge"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014619 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to yes" >&5
14620printf "%s\n" "Defaulting to yes" >&6; }
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014621 enable_libsodium="yes"
14622 else
Illia Bobyra96d5442023-08-30 16:30:15 +020014623 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to no" >&5
14624printf "%s\n" "Defaulting to no" >&6; }
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014625 enable_libsodium="no"
14626 fi
14627else
Illia Bobyra96d5442023-08-30 16:30:15 +020014628 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_libsodium" >&5
14629printf "%s\n" "$enable_libsodium" >&6; }
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014630fi
14631if test "$enable_libsodium" = "yes"; then
14632 if test "x$PKG_CONFIG" != "xno"; then
14633 libsodium_lib=`$PKG_CONFIG --libs libsodium 2>/dev/null`
14634 libsodium_cflags=`$PKG_CONFIG --cflags libsodium 2>/dev/null`
14635 fi
14636 if test "x$libsodium_lib" = "x"; then
14637 libsodium_lib=-lsodium
14638 libsodium_cflags=
14639 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014640 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libsodium" >&5
14641printf %s "checking for libsodium... " >&6; }
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014642 ac_save_CFLAGS="$CFLAGS"
14643 ac_save_LIBS="$LIBS"
14644 CFLAGS="$CFLAGS $libsodium_cflags"
14645 LIBS="$LIBS $libsodium_lib"
14646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14647/* end confdefs.h. */
14648
14649 # include <sodium.h>
14650
14651int
Illia Bobyra96d5442023-08-30 16:30:15 +020014652main (void)
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014653{
14654
14655 printf("%d", sodium_init());
14656 ;
14657 return 0;
14658}
14659_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014660if ac_fn_c_try_link "$LINENO"
14661then :
14662 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14663printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SODIUM 1" >>confdefs.h
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014664
Christian Brabandt9670f612025-05-07 21:44:33 +020014665else case e in #(
14666 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no; try installing libsodium-dev" >&5
14667printf "%s\n" "no; try installing libsodium-dev" >&6; }; CFLAGS="$ac_save_CFLAGS"; LIBS="$ac_save_LIBS" ;;
14668esac
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014669fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014670rm -f core conftest.err conftest.$ac_objext conftest.beam \
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014671 conftest$ac_exeext conftest.$ac_ext
14672fi
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014673
Illia Bobyra96d5442023-08-30 16:30:15 +020014674{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for st_blksize" >&5
14675printf %s "checking for st_blksize... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014676cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014677/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000014678#include <sys/types.h>
14679#include <sys/stat.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014680int
Illia Bobyra96d5442023-08-30 16:30:15 +020014681main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014682{
Bram Moolenaar071d4272004-06-13 20:20:40 +000014683 struct stat st;
14684 int n;
14685
14686 stat("/", &st);
14687 n = (int)st.st_blksize;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014688 ;
14689 return 0;
14690}
14691_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014692if ac_fn_c_try_compile "$LINENO"
14693then :
14694 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14695printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_ST_BLKSIZE 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000014696
Christian Brabandt9670f612025-05-07 21:44:33 +020014697else case e in #(
14698 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14699printf "%s\n" "no" >&6; } ;;
14700esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000014701fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014702rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000014703
Illia Bobyra96d5442023-08-30 16:30:15 +020014704{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for timer_create without -lrt" >&5
14705printf %s "checking for timer_create without -lrt... " >&6; }
14706if test ${vim_cv_timer_create+y}
14707then :
14708 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020014709else case e in #(
14710 e)
Bram Moolenaarf2ce76a2022-07-02 11:40:40 +010014711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Paul Ollis65745772022-06-05 16:55:54 +010014712/* end confdefs.h. */
14713
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010014714 #include <time.h>
Paul Ollis65745772022-06-05 16:55:54 +010014715
14716int
Illia Bobyra96d5442023-08-30 16:30:15 +020014717main (void)
Paul Ollis65745772022-06-05 16:55:54 +010014718{
14719
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010014720 timer_create(CLOCK_MONOTONIC, NULL, NULL);
Paul Ollis65745772022-06-05 16:55:54 +010014721
14722 ;
14723 return 0;
14724}
14725_ACEOF
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010014726if ac_fn_c_try_compile "$LINENO"
Illia Bobyra96d5442023-08-30 16:30:15 +020014727then :
Richard Purdie509695c2022-07-24 20:48:00 +010014728 vim_cv_timer_create=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020014729else case e in #(
14730 e) vim_cv_timer_create=no
14731 ;;
14732esac
Bram Moolenaarf2ce76a2022-07-02 11:40:40 +010014733fi
Christian Brabandt9670f612025-05-07 21:44:33 +020014734rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
14735esac
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010014736fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014737{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_timer_create" >&5
14738printf "%s\n" "$vim_cv_timer_create" >&6; }
Bram Moolenaarefffa532022-07-28 22:39:54 +010014739
14740if test "x$vim_cv_timer_create" = "xno" ; then
14741 save_LIBS="$LIBS"
14742 LIBS="$LIBS -lrt"
Illia Bobyra96d5442023-08-30 16:30:15 +020014743 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for timer_create with -lrt" >&5
14744printf %s "checking for timer_create with -lrt... " >&6; }
14745if test ${vim_cv_timer_create_with_lrt+y}
14746then :
14747 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020014748else case e in #(
14749 e)
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010014750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14751/* end confdefs.h. */
14752
14753 #include <time.h>
14754
14755int
14756main (void)
14757{
14758
14759 timer_create(CLOCK_MONOTONIC, NULL, NULL);
14760
14761 ;
14762 return 0;
14763}
14764_ACEOF
14765if ac_fn_c_try_compile "$LINENO"
14766then :
14767 vim_cv_timer_create_with_lrt=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020014768else case e in #(
14769 e) vim_cv_timer_create_with_lrt=no
14770 ;;
14771esac
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010014772fi
Christian Brabandt9670f612025-05-07 21:44:33 +020014773rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
14774esac
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010014775fi
14776{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_timer_create_with_lrt" >&5
14777printf "%s\n" "$vim_cv_timer_create_with_lrt" >&6; }
14778 LIBS="$save_LIBS"
14779else
14780 vim_cv_timer_create_with_lrt=no
14781fi
14782
14783if test "x$vim_cv_timer_create" = "xyes" ||
14784 test "x$vim_cv_timer_create_with_lrt" = "xyes"; then
14785 save_LIBS="$LIBS"
Brandon Maiercbdc3c12024-12-18 21:18:01 +010014786 if test "x$vim_cv_timer_create_with_lrt" = "xyes" ; then
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010014787 LIBS="$LIBS -lrt"
14788 fi
14789
14790 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if timer_create works" >&5
14791printf %s "checking if timer_create works... " >&6; }
14792if test ${vim_cv_timer_create_works+y}
14793then :
14794 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020014795else case e in #(
14796 e)
Illia Bobyra96d5442023-08-30 16:30:15 +020014797 if test "$cross_compiling" = yes
14798then :
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010014799 vim_cv_timer_create_works=yes
14800 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cross-compiling: consider setting 'vim_cv_timer_create_works'" >&5
14801printf "%s\n" "$as_me: WARNING: cross-compiling: consider setting 'vim_cv_timer_create_works'" >&2;}
Bram Moolenaarefffa532022-07-28 22:39:54 +010014802
Christian Brabandt9670f612025-05-07 21:44:33 +020014803else case e in #(
14804 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarefffa532022-07-28 22:39:54 +010014805/* end confdefs.h. */
14806
14807 #if STDC_HEADERS
14808 # include <stdlib.h>
14809 # include <stddef.h>
14810 #endif
14811 #include <signal.h>
14812 #include <time.h>
14813 static void set_flag(union sigval sv) {}
14814
14815int
Illia Bobyra96d5442023-08-30 16:30:15 +020014816main (void)
Bram Moolenaarefffa532022-07-28 22:39:54 +010014817{
14818
14819 struct timespec ts;
14820 struct sigevent action = {0};
14821 timer_t timer_id;
14822
14823 action.sigev_notify = SIGEV_THREAD;
14824 action.sigev_notify_function = set_flag;
14825 if (timer_create(CLOCK_MONOTONIC, &action, &timer_id) < 0)
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010014826 exit(1); // cannot create a monotonic timer
Bram Moolenaarefffa532022-07-28 22:39:54 +010014827
14828 ;
14829 return 0;
14830}
14831_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014832if ac_fn_c_try_run "$LINENO"
14833then :
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010014834 vim_cv_timer_create_works=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020014835else case e in #(
14836 e) vim_cv_timer_create_works=no ;;
14837esac
Bram Moolenaarefffa532022-07-28 22:39:54 +010014838fi
Bram Moolenaarf2ce76a2022-07-02 11:40:40 +010014839rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
Christian Brabandt9670f612025-05-07 21:44:33 +020014840 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
14841esac
Bram Moolenaarf2ce76a2022-07-02 11:40:40 +010014842fi
Christian Brabandt9670f612025-05-07 21:44:33 +020014843 ;;
14844esac
Richard Purdie509695c2022-07-24 20:48:00 +010014845fi
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010014846{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_timer_create_works" >&5
14847printf "%s\n" "$vim_cv_timer_create_works" >&6; }
Richard Purdie509695c2022-07-24 20:48:00 +010014848
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010014849 if test "x$vim_cv_timer_create_works" = "xyes" ; then
14850 printf "%s\n" "#define HAVE_TIMER_CREATE 1" >>confdefs.h
Richard Purdie509695c2022-07-24 20:48:00 +010014851
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010014852 else
14853 LIBS="$save_LIBS"
14854 fi
Bram Moolenaarefffa532022-07-28 22:39:54 +010014855fi
Richard Purdie509695c2022-07-24 20:48:00 +010014856
Illia Bobyra96d5442023-08-30 16:30:15 +020014857{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat() ignores a trailing slash" >&5
14858printf %s "checking whether stat() ignores a trailing slash... " >&6; }
14859if test ${vim_cv_stat_ignores_slash+y}
14860then :
14861 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020014862else case e in #(
14863 e)
Illia Bobyra96d5442023-08-30 16:30:15 +020014864 if test "$cross_compiling" = yes
14865then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000014866
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010014867 vim_cv_stat_ignores_slash=yes
14868 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cross-compiling: consider setting 'vim_cv_stat_ignores_slash'" >&5
14869printf "%s\n" "$as_me: WARNING: cross-compiling: consider setting 'vim_cv_stat_ignores_slash'" >&2;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000014870
Christian Brabandt9670f612025-05-07 21:44:33 +020014871else case e in #(
14872 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014873/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000014874
14875#include "confdefs.h"
14876#if STDC_HEADERS
14877# include <stdlib.h>
14878# include <stddef.h>
14879#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000014880#include <sys/types.h>
14881#include <sys/stat.h>
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010014882int main() {struct stat st; exit(stat("configure/", &st) != 0); }
Bram Moolenaar446cb832008-06-24 21:56:24 +000014883
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014884_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014885if ac_fn_c_try_run "$LINENO"
14886then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000014887
14888 vim_cv_stat_ignores_slash=yes
Bram Moolenaar071d4272004-06-13 20:20:40 +000014889
Christian Brabandt9670f612025-05-07 21:44:33 +020014890else case e in #(
14891 e)
Bram Moolenaar446cb832008-06-24 21:56:24 +000014892 vim_cv_stat_ignores_slash=no
Christian Brabandt9670f612025-05-07 21:44:33 +020014893 ;;
14894esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000014895fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014896rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
Christian Brabandt9670f612025-05-07 21:44:33 +020014897 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
14898esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000014899fi
14900
Christian Brabandt9670f612025-05-07 21:44:33 +020014901 ;;
14902esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000014903fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014904{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_stat_ignores_slash" >&5
14905printf "%s\n" "$vim_cv_stat_ignores_slash" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000014906
14907if test "x$vim_cv_stat_ignores_slash" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014908 printf "%s\n" "#define STAT_IGNORES_SLASH 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000014909
14910fi
14911
Illia Bobyra96d5442023-08-30 16:30:15 +020014912{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nanoseconds field of struct stat" >&5
14913printf %s "checking for nanoseconds field of struct stat... " >&6; }
14914if test ${ac_cv_struct_st_mtim_nsec+y}
14915then :
14916 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020014917else case e in #(
14918 e) ac_save_CPPFLAGS="$CPPFLAGS"
Leah Neukirchen0a7984a2021-10-14 21:27:55 +010014919 ac_cv_struct_st_mtim_nsec=no
14920 # st_mtim.tv_nsec -- the usual case
14921 # st_mtim._tv_nsec -- Solaris 2.6, if
14922 # (defined _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED == 1
14923 # && !defined __EXTENSIONS__)
14924 # st_mtim.st__tim.tv_nsec -- UnixWare 2.1.2
14925 # st_mtime_n -- AIX 5.2 and above
14926 # st_mtimespec.tv_nsec -- Darwin (Mac OSX)
14927 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
14928 CPPFLAGS="$ac_save_CPPFLAGS -DST_MTIM_NSEC=$ac_val"
14929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14930/* end confdefs.h. */
14931#include <sys/types.h>
14932#include <sys/stat.h>
14933int
Illia Bobyra96d5442023-08-30 16:30:15 +020014934main (void)
Leah Neukirchen0a7984a2021-10-14 21:27:55 +010014935{
14936struct stat s; s.ST_MTIM_NSEC;
14937 ;
14938 return 0;
14939}
14940_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014941if ac_fn_c_try_compile "$LINENO"
14942then :
Leah Neukirchen0a7984a2021-10-14 21:27:55 +010014943 ac_cv_struct_st_mtim_nsec=$ac_val; break
14944fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014945rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Leah Neukirchen0a7984a2021-10-14 21:27:55 +010014946 done
14947 CPPFLAGS="$ac_save_CPPFLAGS"
Christian Brabandt9670f612025-05-07 21:44:33 +020014948 ;;
14949esac
Leah Neukirchen0a7984a2021-10-14 21:27:55 +010014950fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014951{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_st_mtim_nsec" >&5
14952printf "%s\n" "$ac_cv_struct_st_mtim_nsec" >&6; }
Leah Neukirchen0a7984a2021-10-14 21:27:55 +010014953if test $ac_cv_struct_st_mtim_nsec != no; then
14954
Illia Bobyra96d5442023-08-30 16:30:15 +020014955printf "%s\n" "#define ST_MTIM_NSEC $ac_cv_struct_st_mtim_nsec" >>confdefs.h
Leah Neukirchen0a7984a2021-10-14 21:27:55 +010014956
14957fi
14958
Illia Bobyra96d5442023-08-30 16:30:15 +020014959{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv_open()" >&5
14960printf %s "checking for iconv_open()... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000014961save_LIBS="$LIBS"
14962LIBS="$LIBS -liconv"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014963cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014964/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000014965
14966#ifdef HAVE_ICONV_H
14967# include <iconv.h>
14968#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014969
14970int
Illia Bobyra96d5442023-08-30 16:30:15 +020014971main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014972{
Bram Moolenaar071d4272004-06-13 20:20:40 +000014973iconv_open("fr", "to");
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014974 ;
14975 return 0;
14976}
14977_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014978if ac_fn_c_try_link "$LINENO"
14979then :
14980 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes; with -liconv" >&5
14981printf "%s\n" "yes; with -liconv" >&6; }; printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000014982
Christian Brabandt9670f612025-05-07 21:44:33 +020014983else case e in #(
14984 e) LIBS="$save_LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014986/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000014987
14988#ifdef HAVE_ICONV_H
14989# include <iconv.h>
14990#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014991
14992int
Illia Bobyra96d5442023-08-30 16:30:15 +020014993main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014994{
Bram Moolenaar071d4272004-06-13 20:20:40 +000014995iconv_open("fr", "to");
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014996 ;
14997 return 0;
14998}
14999_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015000if ac_fn_c_try_link "$LINENO"
15001then :
15002 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15003printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015004
Christian Brabandt9670f612025-05-07 21:44:33 +020015005else case e in #(
15006 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15007printf "%s\n" "no" >&6; } ;;
15008esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000015009fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015010rm -f core conftest.err conftest.$ac_objext conftest.beam \
Christian Brabandt9670f612025-05-07 21:44:33 +020015011 conftest$ac_exeext conftest.$ac_ext ;;
15012esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000015013fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015014rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015015 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000015016
15017
Illia Bobyra96d5442023-08-30 16:30:15 +020015018{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo(CODESET)" >&5
15019printf %s "checking for nl_langinfo(CODESET)... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015020cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015021/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015022
15023#ifdef HAVE_LANGINFO_H
15024# include <langinfo.h>
15025#endif
15026
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015027int
Illia Bobyra96d5442023-08-30 16:30:15 +020015028main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015029{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015030char *cs = nl_langinfo(CODESET);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015031 ;
15032 return 0;
15033}
15034_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015035if ac_fn_c_try_link "$LINENO"
15036then :
15037 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15038printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_NL_LANGINFO_CODESET 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015039
Christian Brabandt9670f612025-05-07 21:44:33 +020015040else case e in #(
15041 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15042printf "%s\n" "no" >&6; } ;;
15043esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015044fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015045rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015046 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015047
Illia Bobyra96d5442023-08-30 16:30:15 +020015048{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for strtod in -lm" >&5
15049printf %s "checking for strtod in -lm... " >&6; }
15050if test ${ac_cv_lib_m_strtod+y}
15051then :
15052 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020015053else case e in #(
15054 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar446cb832008-06-24 21:56:24 +000015055LIBS="-lm $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015056cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015057/* end confdefs.h. */
15058
15059/* Override any GCC internal prototype to avoid an error.
15060 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020015061 builtin and then its argument prototype would still apply.
15062 The 'extern "C"' is for builds by C++ compilers;
15063 although this is not generally supported in C code supporting it here
15064 has little cost and some practical benefit (sr 110532). */
15065#ifdef __cplusplus
15066extern "C"
15067#endif
15068char strtod (void);
Bram Moolenaar446cb832008-06-24 21:56:24 +000015069int
Illia Bobyra96d5442023-08-30 16:30:15 +020015070main (void)
Bram Moolenaar446cb832008-06-24 21:56:24 +000015071{
15072return strtod ();
15073 ;
15074 return 0;
15075}
15076_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015077if ac_fn_c_try_link "$LINENO"
15078then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015079 ac_cv_lib_m_strtod=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020015080else case e in #(
15081 e) ac_cv_lib_m_strtod=no ;;
15082esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000015083fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015084rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015085 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020015086LIBS=$ac_check_lib_save_LIBS ;;
15087esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000015088fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015089{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_strtod" >&5
15090printf "%s\n" "$ac_cv_lib_m_strtod" >&6; }
15091if test "x$ac_cv_lib_m_strtod" = xyes
15092then :
15093 printf "%s\n" "#define HAVE_LIBM 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000015094
15095 LIBS="-lm $LIBS"
15096
15097fi
15098
Bram Moolenaar446cb832008-06-24 21:56:24 +000015099
Illia Bobyra96d5442023-08-30 16:30:15 +020015100{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for isinf()" >&5
15101printf %s "checking for isinf()... " >&6; }
Bram Moolenaara6b89762016-02-29 21:38:26 +010015102cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15103/* end confdefs.h. */
15104
15105#ifdef HAVE_MATH_H
15106# include <math.h>
15107#endif
15108#if STDC_HEADERS
15109# include <stdlib.h>
15110# include <stddef.h>
15111#endif
15112
15113int
Illia Bobyra96d5442023-08-30 16:30:15 +020015114main (void)
Bram Moolenaara6b89762016-02-29 21:38:26 +010015115{
15116int r = isinf(1.11);
15117 ;
15118 return 0;
15119}
15120_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015121if ac_fn_c_try_link "$LINENO"
15122then :
15123 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15124printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_ISINF 1" >>confdefs.h
Bram Moolenaara6b89762016-02-29 21:38:26 +010015125
Christian Brabandt9670f612025-05-07 21:44:33 +020015126else case e in #(
15127 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15128printf "%s\n" "no" >&6; } ;;
15129esac
Bram Moolenaara6b89762016-02-29 21:38:26 +010015130fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015131rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaara6b89762016-02-29 21:38:26 +010015132 conftest$ac_exeext conftest.$ac_ext
15133
Illia Bobyra96d5442023-08-30 16:30:15 +020015134{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for isnan()" >&5
15135printf %s "checking for isnan()... " >&6; }
Bram Moolenaara6b89762016-02-29 21:38:26 +010015136cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15137/* end confdefs.h. */
15138
15139#ifdef HAVE_MATH_H
15140# include <math.h>
15141#endif
15142#if STDC_HEADERS
15143# include <stdlib.h>
15144# include <stddef.h>
15145#endif
15146
15147int
Illia Bobyra96d5442023-08-30 16:30:15 +020015148main (void)
Bram Moolenaara6b89762016-02-29 21:38:26 +010015149{
15150int r = isnan(1.11);
15151 ;
15152 return 0;
15153}
15154_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015155if ac_fn_c_try_link "$LINENO"
15156then :
15157 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15158printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_ISNAN 1" >>confdefs.h
Bram Moolenaara6b89762016-02-29 21:38:26 +010015159
Christian Brabandt9670f612025-05-07 21:44:33 +020015160else case e in #(
15161 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15162printf "%s\n" "no" >&6; } ;;
15163esac
Bram Moolenaara6b89762016-02-29 21:38:26 +010015164fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015165rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaara6b89762016-02-29 21:38:26 +010015166 conftest$ac_exeext conftest.$ac_ext
15167
Illia Bobyra96d5442023-08-30 16:30:15 +020015168{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-acl argument" >&5
15169printf %s "checking --disable-acl argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000015170# Check whether --enable-acl was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020015171if test ${enable_acl+y}
15172then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015173 enableval=$enable_acl;
Christian Brabandt9670f612025-05-07 21:44:33 +020015174else case e in #(
15175 e) enable_acl="yes" ;;
15176esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000015177fi
15178
Bram Moolenaar071d4272004-06-13 20:20:40 +000015179if test "$enable_acl" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015180 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15181printf "%s\n" "no" >&6; }
15182 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for acl_get_file in -lposix1e" >&5
15183printf %s "checking for acl_get_file in -lposix1e... " >&6; }
15184if test ${ac_cv_lib_posix1e_acl_get_file+y}
15185then :
15186 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020015187else case e in #(
15188 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000015189LIBS="-lposix1e $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015190cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015191/* end confdefs.h. */
15192
Bram Moolenaar446cb832008-06-24 21:56:24 +000015193/* Override any GCC internal prototype to avoid an error.
15194 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020015195 builtin and then its argument prototype would still apply.
15196 The 'extern "C"' is for builds by C++ compilers;
15197 although this is not generally supported in C code supporting it here
15198 has little cost and some practical benefit (sr 110532). */
15199#ifdef __cplusplus
15200extern "C"
15201#endif
15202char acl_get_file (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015203int
Illia Bobyra96d5442023-08-30 16:30:15 +020015204main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015205{
Bram Moolenaar446cb832008-06-24 21:56:24 +000015206return acl_get_file ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015207 ;
15208 return 0;
15209}
15210_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015211if ac_fn_c_try_link "$LINENO"
15212then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015213 ac_cv_lib_posix1e_acl_get_file=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020015214else case e in #(
15215 e) ac_cv_lib_posix1e_acl_get_file=no ;;
15216esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000015217fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015218rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015219 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020015220LIBS=$ac_check_lib_save_LIBS ;;
15221esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015222fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015223{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix1e_acl_get_file" >&5
15224printf "%s\n" "$ac_cv_lib_posix1e_acl_get_file" >&6; }
15225if test "x$ac_cv_lib_posix1e_acl_get_file" = xyes
15226then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000015227 LIBS="$LIBS -lposix1e"
Christian Brabandt9670f612025-05-07 21:44:33 +020015228else case e in #(
15229 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for acl_get_file in -lacl" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +020015230printf %s "checking for acl_get_file in -lacl... " >&6; }
15231if test ${ac_cv_lib_acl_acl_get_file+y}
15232then :
15233 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020015234else case e in #(
15235 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000015236LIBS="-lacl $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015237cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015238/* end confdefs.h. */
15239
Bram Moolenaar446cb832008-06-24 21:56:24 +000015240/* Override any GCC internal prototype to avoid an error.
15241 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020015242 builtin and then its argument prototype would still apply.
15243 The 'extern "C"' is for builds by C++ compilers;
15244 although this is not generally supported in C code supporting it here
15245 has little cost and some practical benefit (sr 110532). */
15246#ifdef __cplusplus
15247extern "C"
15248#endif
15249char acl_get_file (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015250int
Illia Bobyra96d5442023-08-30 16:30:15 +020015251main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015252{
Bram Moolenaar446cb832008-06-24 21:56:24 +000015253return acl_get_file ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015254 ;
15255 return 0;
15256}
15257_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015258if ac_fn_c_try_link "$LINENO"
15259then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015260 ac_cv_lib_acl_acl_get_file=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020015261else case e in #(
15262 e) ac_cv_lib_acl_acl_get_file=no ;;
15263esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000015264fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015265rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015266 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020015267LIBS=$ac_check_lib_save_LIBS ;;
15268esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015269fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015270{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_acl_acl_get_file" >&5
15271printf "%s\n" "$ac_cv_lib_acl_acl_get_file" >&6; }
15272if test "x$ac_cv_lib_acl_acl_get_file" = xyes
15273then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000015274 LIBS="$LIBS -lacl"
Illia Bobyra96d5442023-08-30 16:30:15 +020015275 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgetxattr in -lattr" >&5
15276printf %s "checking for fgetxattr in -lattr... " >&6; }
15277if test ${ac_cv_lib_attr_fgetxattr+y}
15278then :
15279 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020015280else case e in #(
15281 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000015282LIBS="-lattr $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015283cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015284/* end confdefs.h. */
15285
Bram Moolenaar446cb832008-06-24 21:56:24 +000015286/* Override any GCC internal prototype to avoid an error.
15287 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020015288 builtin and then its argument prototype would still apply.
15289 The 'extern "C"' is for builds by C++ compilers;
15290 although this is not generally supported in C code supporting it here
15291 has little cost and some practical benefit (sr 110532). */
15292#ifdef __cplusplus
15293extern "C"
15294#endif
15295char fgetxattr (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015296int
Illia Bobyra96d5442023-08-30 16:30:15 +020015297main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015298{
Bram Moolenaar446cb832008-06-24 21:56:24 +000015299return fgetxattr ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015300 ;
15301 return 0;
15302}
15303_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015304if ac_fn_c_try_link "$LINENO"
15305then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015306 ac_cv_lib_attr_fgetxattr=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020015307else case e in #(
15308 e) ac_cv_lib_attr_fgetxattr=no ;;
15309esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000015310fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015311rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015312 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020015313LIBS=$ac_check_lib_save_LIBS ;;
15314esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015315fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015316{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_attr_fgetxattr" >&5
15317printf "%s\n" "$ac_cv_lib_attr_fgetxattr" >&6; }
15318if test "x$ac_cv_lib_attr_fgetxattr" = xyes
15319then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000015320 LIBS="$LIBS -lattr"
Bram Moolenaar071d4272004-06-13 20:20:40 +000015321fi
15322
Bram Moolenaar071d4272004-06-13 20:20:40 +000015323fi
Christian Brabandt9670f612025-05-07 21:44:33 +020015324 ;;
15325esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000015326fi
15327
15328
Illia Bobyra96d5442023-08-30 16:30:15 +020015329 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for POSIX ACL support" >&5
15330printf %s "checking for POSIX ACL support... " >&6; }
Bram Moolenaard6d30422018-01-28 22:48:55 +010015331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015332/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015333
15334#include <sys/types.h>
15335#ifdef HAVE_SYS_ACL_H
15336# include <sys/acl.h>
15337#endif
15338acl_t acl;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015339int
Illia Bobyra96d5442023-08-30 16:30:15 +020015340main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015341{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015342acl = acl_get_file("foo", ACL_TYPE_ACCESS);
15343 acl_set_file("foo", ACL_TYPE_ACCESS, acl);
15344 acl_free(acl);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015345 ;
15346 return 0;
15347}
15348_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015349if ac_fn_c_try_link "$LINENO"
15350then :
15351 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15352printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_POSIX_ACL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015353
Christian Brabandt9670f612025-05-07 21:44:33 +020015354else case e in #(
15355 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15356printf "%s\n" "no" >&6; } ;;
15357esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015358fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015359rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015360 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015361
Illia Bobyra96d5442023-08-30 16:30:15 +020015362 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for acl_get in -lsec" >&5
15363printf %s "checking for acl_get in -lsec... " >&6; }
15364if test ${ac_cv_lib_sec_acl_get+y}
15365then :
15366 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020015367else case e in #(
15368 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar8d462f92012-02-05 22:51:33 +010015369LIBS="-lsec $LIBS"
15370cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15371/* end confdefs.h. */
15372
15373/* Override any GCC internal prototype to avoid an error.
15374 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020015375 builtin and then its argument prototype would still apply.
15376 The 'extern "C"' is for builds by C++ compilers;
15377 although this is not generally supported in C code supporting it here
15378 has little cost and some practical benefit (sr 110532). */
15379#ifdef __cplusplus
15380extern "C"
15381#endif
15382char acl_get (void);
Bram Moolenaar8d462f92012-02-05 22:51:33 +010015383int
Illia Bobyra96d5442023-08-30 16:30:15 +020015384main (void)
Bram Moolenaar8d462f92012-02-05 22:51:33 +010015385{
15386return acl_get ();
15387 ;
15388 return 0;
15389}
15390_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015391if ac_fn_c_try_link "$LINENO"
15392then :
Bram Moolenaar8d462f92012-02-05 22:51:33 +010015393 ac_cv_lib_sec_acl_get=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020015394else case e in #(
15395 e) ac_cv_lib_sec_acl_get=no ;;
15396esac
Bram Moolenaar8d462f92012-02-05 22:51:33 +010015397fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015398rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar8d462f92012-02-05 22:51:33 +010015399 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020015400LIBS=$ac_check_lib_save_LIBS ;;
15401esac
Bram Moolenaar8d462f92012-02-05 22:51:33 +010015402fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015403{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sec_acl_get" >&5
15404printf "%s\n" "$ac_cv_lib_sec_acl_get" >&6; }
15405if test "x$ac_cv_lib_sec_acl_get" = xyes
15406then :
15407 LIBS="$LIBS -lsec"; printf "%s\n" "#define HAVE_SOLARIS_ZFS_ACL 1" >>confdefs.h
Bram Moolenaar8d462f92012-02-05 22:51:33 +010015408
Christian Brabandt9670f612025-05-07 21:44:33 +020015409else case e in #(
15410 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Solaris ACL support" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +020015411printf %s "checking for Solaris ACL support... " >&6; }
Bram Moolenaard6d30422018-01-28 22:48:55 +010015412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015413/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015414
15415#ifdef HAVE_SYS_ACL_H
15416# include <sys/acl.h>
15417#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015418int
Illia Bobyra96d5442023-08-30 16:30:15 +020015419main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015420{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015421acl("foo", GETACLCNT, 0, NULL);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015422
15423 ;
15424 return 0;
15425}
15426_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015427if ac_fn_c_try_link "$LINENO"
15428then :
15429 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15430printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SOLARIS_ACL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015431
Christian Brabandt9670f612025-05-07 21:44:33 +020015432else case e in #(
15433 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15434printf "%s\n" "no" >&6; } ;;
15435esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015436fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015437rm -f core conftest.err conftest.$ac_objext conftest.beam \
Christian Brabandt9670f612025-05-07 21:44:33 +020015438 conftest$ac_exeext conftest.$ac_ext ;;
15439esac
Bram Moolenaar8d462f92012-02-05 22:51:33 +010015440fi
15441
Bram Moolenaar446cb832008-06-24 21:56:24 +000015442
Illia Bobyra96d5442023-08-30 16:30:15 +020015443 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for AIX ACL support" >&5
15444printf %s "checking for AIX ACL support... " >&6; }
Bram Moolenaard6d30422018-01-28 22:48:55 +010015445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015446/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015447
Bram Moolenaar446cb832008-06-24 21:56:24 +000015448#if STDC_HEADERS
15449# include <stdlib.h>
15450# include <stddef.h>
15451#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000015452#ifdef HAVE_SYS_ACL_H
15453# include <sys/acl.h>
15454#endif
15455#ifdef HAVE_SYS_ACCESS_H
15456# include <sys/access.h>
15457#endif
15458#define _ALL_SOURCE
15459
15460#include <sys/stat.h>
15461
15462int aclsize;
15463struct acl *aclent;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015464int
Illia Bobyra96d5442023-08-30 16:30:15 +020015465main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015466{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015467aclsize = sizeof(struct acl);
15468 aclent = (void *)malloc(aclsize);
15469 statacl("foo", STX_NORMAL, aclent, aclsize);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015470
15471 ;
15472 return 0;
15473}
15474_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015475if ac_fn_c_try_link "$LINENO"
15476then :
15477 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15478printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_AIX_ACL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015479
Christian Brabandt9670f612025-05-07 21:44:33 +020015480else case e in #(
15481 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15482printf "%s\n" "no" >&6; } ;;
15483esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000015484fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015485rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015486 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000015487else
Illia Bobyra96d5442023-08-30 16:30:15 +020015488 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15489printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015490fi
15491
Bram Moolenaar3cbe0c02015-09-08 20:00:22 +020015492if test "x$GTK_CFLAGS" != "x"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015493 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pango_shape_full" >&5
15494printf %s "checking for pango_shape_full... " >&6; }
Bram Moolenaar3cbe0c02015-09-08 20:00:22 +020015495 ac_save_CFLAGS="$CFLAGS"
15496 ac_save_LIBS="$LIBS"
15497 CFLAGS="$CFLAGS $GTK_CFLAGS"
15498 LIBS="$LIBS $GTK_LIBS"
15499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15500/* end confdefs.h. */
15501#include <gtk/gtk.h>
15502int
Illia Bobyra96d5442023-08-30 16:30:15 +020015503main (void)
Bram Moolenaar3cbe0c02015-09-08 20:00:22 +020015504{
15505 pango_shape_full(NULL, 0, NULL, 0, NULL, NULL);
15506 ;
15507 return 0;
15508}
15509_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015510if ac_fn_c_try_link "$LINENO"
15511then :
15512 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15513printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_PANGO_SHAPE_FULL 1" >>confdefs.h
Bram Moolenaar3cbe0c02015-09-08 20:00:22 +020015514
Christian Brabandt9670f612025-05-07 21:44:33 +020015515else case e in #(
15516 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15517printf "%s\n" "no" >&6; } ;;
15518esac
Bram Moolenaar3cbe0c02015-09-08 20:00:22 +020015519fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015520rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar5325b9b2015-09-09 20:27:02 +020015521 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar3cbe0c02015-09-08 20:00:22 +020015522 CFLAGS="$ac_save_CFLAGS"
15523 LIBS="$ac_save_LIBS"
15524fi
15525
Illia Bobyra96d5442023-08-30 16:30:15 +020015526{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-gpm argument" >&5
15527printf %s "checking --enable-gpm argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000015528# Check whether --enable-gpm was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020015529if test ${enable_gpm+y}
15530then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015531 enableval=$enable_gpm;
Christian Brabandt9670f612025-05-07 21:44:33 +020015532else case e in #(
15533 e) enable_gpm="yes" ;;
15534esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000015535fi
15536
Bram Moolenaar071d4272004-06-13 20:20:40 +000015537
Bram Moolenaar0b40d082022-03-08 13:32:37 +000015538if test "$enable_gpm" = "yes" -o "$enable_gpm" = "dynamic"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015539 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_gpm" >&5
15540printf "%s\n" "$enable_gpm" >&6; }
15541 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gpm" >&5
15542printf %s "checking for gpm... " >&6; }
15543if test ${vi_cv_have_gpm+y}
15544then :
15545 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020015546else case e in #(
15547 e) olibs="$LIBS" ; LIBS="-lgpm"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015549/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015550#include <gpm.h>
15551 #include <linux/keyboard.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015552int
Illia Bobyra96d5442023-08-30 16:30:15 +020015553main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015554{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015555Gpm_GetLibVersion(NULL);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015556 ;
15557 return 0;
15558}
15559_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015560if ac_fn_c_try_link "$LINENO"
15561then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000015562 vi_cv_have_gpm=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020015563else case e in #(
15564 e) vi_cv_have_gpm=no ;;
15565esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015566fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015567rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015568 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015569 LIBS="$olibs"
Christian Brabandt9670f612025-05-07 21:44:33 +020015570 ;;
15571esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015572fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015573{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_have_gpm" >&5
15574printf "%s\n" "$vi_cv_have_gpm" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015575 if test $vi_cv_have_gpm = yes; then
Bram Moolenaar0b40d082022-03-08 13:32:37 +000015576 if test "$enable_gpm" = "yes"; then
15577 LIBS="$LIBS -lgpm"
15578 else
Illia Bobyra96d5442023-08-30 16:30:15 +020015579 printf "%s\n" "#define DYNAMIC_GPM 1" >>confdefs.h
Bram Moolenaar0b40d082022-03-08 13:32:37 +000015580
15581 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015582 printf "%s\n" "#define HAVE_GPM 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015583
15584 fi
15585else
Illia Bobyra96d5442023-08-30 16:30:15 +020015586 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15587printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015588fi
15589
Illia Bobyra96d5442023-08-30 16:30:15 +020015590{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-sysmouse argument" >&5
15591printf %s "checking --disable-sysmouse argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000015592# Check whether --enable-sysmouse was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020015593if test ${enable_sysmouse+y}
15594then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015595 enableval=$enable_sysmouse;
Christian Brabandt9670f612025-05-07 21:44:33 +020015596else case e in #(
15597 e) enable_sysmouse="yes" ;;
15598esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000015599fi
15600
15601
15602if test "$enable_sysmouse" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015603 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15604printf "%s\n" "no" >&6; }
15605 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysmouse" >&5
15606printf %s "checking for sysmouse... " >&6; }
15607if test ${vi_cv_have_sysmouse+y}
15608then :
15609 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020015610else case e in #(
15611 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015612/* end confdefs.h. */
15613#include <sys/consio.h>
15614 #include <signal.h>
15615 #include <sys/fbio.h>
15616int
Illia Bobyra96d5442023-08-30 16:30:15 +020015617main (void)
Bram Moolenaar446cb832008-06-24 21:56:24 +000015618{
15619struct mouse_info mouse;
15620 mouse.operation = MOUSE_MODE;
15621 mouse.operation = MOUSE_SHOW;
15622 mouse.u.mode.mode = 0;
15623 mouse.u.mode.signal = SIGUSR2;
15624 ;
15625 return 0;
15626}
15627_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015628if ac_fn_c_try_link "$LINENO"
15629then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015630 vi_cv_have_sysmouse=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020015631else case e in #(
15632 e) vi_cv_have_sysmouse=no ;;
15633esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000015634fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015635rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015636 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020015637 ;;
15638esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000015639fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015640{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_have_sysmouse" >&5
15641printf "%s\n" "$vi_cv_have_sysmouse" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000015642 if test $vi_cv_have_sysmouse = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015643 printf "%s\n" "#define HAVE_SYSMOUSE 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000015644
15645 fi
15646else
Illia Bobyra96d5442023-08-30 16:30:15 +020015647 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15648printf "%s\n" "yes" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000015649fi
15650
Illia Bobyra96d5442023-08-30 16:30:15 +020015651{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FD_CLOEXEC" >&5
15652printf %s "checking for FD_CLOEXEC... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015653cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarf05da212009-11-17 16:13:15 +000015654/* end confdefs.h. */
15655#if HAVE_FCNTL_H
15656# include <fcntl.h>
15657#endif
15658int
Illia Bobyra96d5442023-08-30 16:30:15 +020015659main (void)
Bram Moolenaarf05da212009-11-17 16:13:15 +000015660{
15661 int flag = FD_CLOEXEC;
15662 ;
15663 return 0;
15664}
15665_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015666if ac_fn_c_try_compile "$LINENO"
15667then :
15668 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15669printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_FD_CLOEXEC 1" >>confdefs.h
Bram Moolenaarf05da212009-11-17 16:13:15 +000015670
Christian Brabandt9670f612025-05-07 21:44:33 +020015671else case e in #(
15672 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15673printf "%s\n" "not usable" >&6; } ;;
15674esac
Bram Moolenaarf05da212009-11-17 16:13:15 +000015675fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015676rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaarf05da212009-11-17 16:13:15 +000015677
Illia Bobyra96d5442023-08-30 16:30:15 +020015678{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for rename" >&5
15679printf %s "checking for rename... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015680cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015681/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015682#include <stdio.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015683int
Illia Bobyra96d5442023-08-30 16:30:15 +020015684main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015685{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015686rename("this", "that")
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015687 ;
15688 return 0;
15689}
15690_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015691if ac_fn_c_try_link "$LINENO"
15692then :
15693 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15694printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_RENAME 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015695
Christian Brabandt9670f612025-05-07 21:44:33 +020015696else case e in #(
15697 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15698printf "%s\n" "no" >&6; } ;;
15699esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015700fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015701rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015702 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015703
Illia Bobyra96d5442023-08-30 16:30:15 +020015704{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dirfd" >&5
15705printf %s "checking for dirfd... " >&6; }
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015706cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15707/* end confdefs.h. */
15708#include <sys/types.h>
15709#include <dirent.h>
15710int
Illia Bobyra96d5442023-08-30 16:30:15 +020015711main (void)
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015712{
15713DIR * dir=opendir("dirname"); dirfd(dir);
15714 ;
15715 return 0;
15716}
15717_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015718if ac_fn_c_try_link "$LINENO"
15719then :
15720 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15721printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_DIRFD 1" >>confdefs.h
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015722
Christian Brabandt9670f612025-05-07 21:44:33 +020015723else case e in #(
15724 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15725printf "%s\n" "not usable" >&6; } ;;
15726esac
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015727fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015728rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar9d8bfae2020-09-02 21:21:35 +020015729 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015730
Illia Bobyra96d5442023-08-30 16:30:15 +020015731{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for flock" >&5
15732printf %s "checking for flock... " >&6; }
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015733cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15734/* end confdefs.h. */
15735#include <sys/file.h>
15736int
Illia Bobyra96d5442023-08-30 16:30:15 +020015737main (void)
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015738{
15739flock(10, LOCK_SH);
15740 ;
15741 return 0;
15742}
15743_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015744if ac_fn_c_try_link "$LINENO"
15745then :
15746 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15747printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_FLOCK 1" >>confdefs.h
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015748
Christian Brabandt9670f612025-05-07 21:44:33 +020015749else case e in #(
15750 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15751printf "%s\n" "not usable" >&6; } ;;
15752esac
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015753fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015754rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar9d8bfae2020-09-02 21:21:35 +020015755 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015756
Illia Bobyra96d5442023-08-30 16:30:15 +020015757{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysctl" >&5
15758printf %s "checking for sysctl... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015759cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015760/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015761#include <sys/types.h>
15762#include <sys/sysctl.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015763int
Illia Bobyra96d5442023-08-30 16:30:15 +020015764main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015765{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015766 int mib[2], r;
15767 size_t len;
15768
15769 mib[0] = CTL_HW;
15770 mib[1] = HW_USERMEM;
15771 len = sizeof(r);
15772 (void)sysctl(mib, 2, &r, &len, (void *)0, (size_t)0);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015773
15774 ;
15775 return 0;
15776}
15777_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015778if ac_fn_c_try_compile "$LINENO"
15779then :
15780 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15781printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SYSCTL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015782
Christian Brabandt9670f612025-05-07 21:44:33 +020015783else case e in #(
15784 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15785printf "%s\n" "not usable" >&6; } ;;
15786esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015787fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015788rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015789
Illia Bobyra96d5442023-08-30 16:30:15 +020015790{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysinfo" >&5
15791printf %s "checking for sysinfo... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015792cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015793/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015794#include <sys/types.h>
15795#include <sys/sysinfo.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015796int
Illia Bobyra96d5442023-08-30 16:30:15 +020015797main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015798{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015799 struct sysinfo sinfo;
15800 int t;
15801
15802 (void)sysinfo(&sinfo);
15803 t = sinfo.totalram;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015804
15805 ;
15806 return 0;
15807}
15808_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015809if ac_fn_c_try_link "$LINENO"
15810then :
15811 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15812printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SYSINFO 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015813
Christian Brabandt9670f612025-05-07 21:44:33 +020015814else case e in #(
15815 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15816printf "%s\n" "not usable" >&6; } ;;
15817esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015818fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015819rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaare2982d62021-10-06 11:27:21 +010015820 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015821
Illia Bobyra96d5442023-08-30 16:30:15 +020015822{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysinfo.mem_unit" >&5
15823printf %s "checking for sysinfo.mem_unit... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015824cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar914572a2007-05-01 11:37:47 +000015825/* end confdefs.h. */
15826#include <sys/types.h>
15827#include <sys/sysinfo.h>
15828int
Illia Bobyra96d5442023-08-30 16:30:15 +020015829main (void)
Bram Moolenaar914572a2007-05-01 11:37:47 +000015830{
15831 struct sysinfo sinfo;
Bram Moolenaar3c7ad012013-06-11 19:53:45 +020015832 sinfo.mem_unit = 1;
Bram Moolenaar914572a2007-05-01 11:37:47 +000015833
15834 ;
15835 return 0;
15836}
15837_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015838if ac_fn_c_try_compile "$LINENO"
15839then :
15840 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15841printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SYSINFO_MEM_UNIT 1" >>confdefs.h
Bram Moolenaar914572a2007-05-01 11:37:47 +000015842
Christian Brabandt9670f612025-05-07 21:44:33 +020015843else case e in #(
15844 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15845printf "%s\n" "no" >&6; } ;;
15846esac
Bram Moolenaar914572a2007-05-01 11:37:47 +000015847fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015848rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015849
Illia Bobyra96d5442023-08-30 16:30:15 +020015850{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysinfo.uptime" >&5
15851printf %s "checking for sysinfo.uptime... " >&6; }
Bram Moolenaarf52f0602021-03-10 21:26:37 +010015852cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15853/* end confdefs.h. */
15854#include <sys/types.h>
15855#include <sys/sysinfo.h>
15856int
Illia Bobyra96d5442023-08-30 16:30:15 +020015857main (void)
Bram Moolenaarf52f0602021-03-10 21:26:37 +010015858{
15859 struct sysinfo sinfo;
15860 long ut;
15861
15862 (void)sysinfo(&sinfo);
15863 ut = sinfo.uptime;
15864
15865 ;
15866 return 0;
15867}
15868_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015869if ac_fn_c_try_compile "$LINENO"
15870then :
15871 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15872printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SYSINFO_UPTIME 1" >>confdefs.h
Bram Moolenaarf52f0602021-03-10 21:26:37 +010015873
Christian Brabandt9670f612025-05-07 21:44:33 +020015874else case e in #(
15875 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15876printf "%s\n" "no" >&6; } ;;
15877esac
Bram Moolenaarf52f0602021-03-10 21:26:37 +010015878fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015879rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaarf52f0602021-03-10 21:26:37 +010015880
Illia Bobyra96d5442023-08-30 16:30:15 +020015881{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysconf" >&5
15882printf %s "checking for sysconf... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015883cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015884/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015885#include <unistd.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015886int
Illia Bobyra96d5442023-08-30 16:30:15 +020015887main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015888{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015889 (void)sysconf(_SC_PAGESIZE);
15890 (void)sysconf(_SC_PHYS_PAGES);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015891
15892 ;
15893 return 0;
15894}
15895_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015896if ac_fn_c_try_compile "$LINENO"
15897then :
15898 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15899printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SYSCONF 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015900
Christian Brabandt9670f612025-05-07 21:44:33 +020015901else case e in #(
15902 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15903printf "%s\n" "not usable" >&6; } ;;
15904esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000015905fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015906rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000015907
Illia Bobyra96d5442023-08-30 16:30:15 +020015908{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _SC_SIGSTKSZ via sysconf()" >&5
15909printf %s "checking for _SC_SIGSTKSZ via sysconf()... " >&6; }
Bram Moolenaar0e62a672021-02-25 17:17:56 +010015910cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15911/* end confdefs.h. */
15912#include <unistd.h>
15913int
Illia Bobyra96d5442023-08-30 16:30:15 +020015914main (void)
Bram Moolenaar0e62a672021-02-25 17:17:56 +010015915{
15916 (void)sysconf(_SC_SIGSTKSZ);
15917
15918 ;
15919 return 0;
15920}
15921_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015922if ac_fn_c_try_compile "$LINENO"
15923then :
15924 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15925printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SYSCONF_SIGSTKSZ 1" >>confdefs.h
Bram Moolenaar0e62a672021-02-25 17:17:56 +010015926
Christian Brabandt9670f612025-05-07 21:44:33 +020015927else case e in #(
15928 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15929printf "%s\n" "not usable" >&6; } ;;
15930esac
Bram Moolenaar0e62a672021-02-25 17:17:56 +010015931fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015932rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0e62a672021-02-25 17:17:56 +010015933
Bram Moolenaar914703b2010-05-31 21:59:46 +020015934# The cast to long int works around a bug in the HP C Compiler
15935# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
Christian Brabandt9670f612025-05-07 21:44:33 +020015936# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'.
Bram Moolenaar914703b2010-05-31 21:59:46 +020015937# This bug is HP SR number 8606223364.
Illia Bobyra96d5442023-08-30 16:30:15 +020015938{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
15939printf %s "checking size of int... " >&6; }
15940if test ${ac_cv_sizeof_int+y}
15941then :
15942 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020015943else case e in #(
15944 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 +020015945then :
Bram Moolenaar914703b2010-05-31 21:59:46 +020015946
Christian Brabandt9670f612025-05-07 21:44:33 +020015947else case e in #(
15948 e) if test "$ac_cv_type_int" = yes; then
15949 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
15950printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +010015951as_fn_error 77 "cannot compute sizeof (int)
Christian Brabandt9670f612025-05-07 21:44:33 +020015952See 'config.log' for more details" "$LINENO" 5; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020015953 else
15954 ac_cv_sizeof_int=0
Christian Brabandt9670f612025-05-07 21:44:33 +020015955 fi ;;
15956esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000015957fi
Christian Brabandt9670f612025-05-07 21:44:33 +020015958 ;;
15959esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000015960fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015961{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
15962printf "%s\n" "$ac_cv_sizeof_int" >&6; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020015963
15964
15965
Illia Bobyra96d5442023-08-30 16:30:15 +020015966printf "%s\n" "#define SIZEOF_INT $ac_cv_sizeof_int" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015967
15968
Bram Moolenaar914703b2010-05-31 21:59:46 +020015969# The cast to long int works around a bug in the HP C Compiler
15970# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
Christian Brabandt9670f612025-05-07 21:44:33 +020015971# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'.
Bram Moolenaar914703b2010-05-31 21:59:46 +020015972# This bug is HP SR number 8606223364.
Illia Bobyra96d5442023-08-30 16:30:15 +020015973{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
15974printf %s "checking size of long... " >&6; }
15975if test ${ac_cv_sizeof_long+y}
15976then :
15977 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020015978else case e in #(
15979 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 +020015980then :
Bram Moolenaar914703b2010-05-31 21:59:46 +020015981
Christian Brabandt9670f612025-05-07 21:44:33 +020015982else case e in #(
15983 e) if test "$ac_cv_type_long" = yes; then
15984 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
15985printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +010015986as_fn_error 77 "cannot compute sizeof (long)
Christian Brabandt9670f612025-05-07 21:44:33 +020015987See 'config.log' for more details" "$LINENO" 5; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020015988 else
15989 ac_cv_sizeof_long=0
Christian Brabandt9670f612025-05-07 21:44:33 +020015990 fi ;;
15991esac
Bram Moolenaar914703b2010-05-31 21:59:46 +020015992fi
Christian Brabandt9670f612025-05-07 21:44:33 +020015993 ;;
15994esac
Bram Moolenaar914703b2010-05-31 21:59:46 +020015995fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015996{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
15997printf "%s\n" "$ac_cv_sizeof_long" >&6; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020015998
15999
16000
Illia Bobyra96d5442023-08-30 16:30:15 +020016001printf "%s\n" "#define SIZEOF_LONG $ac_cv_sizeof_long" >>confdefs.h
Bram Moolenaar914703b2010-05-31 21:59:46 +020016002
16003
16004# The cast to long int works around a bug in the HP C Compiler
16005# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
Christian Brabandt9670f612025-05-07 21:44:33 +020016006# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'.
Bram Moolenaar914703b2010-05-31 21:59:46 +020016007# This bug is HP SR number 8606223364.
Illia Bobyra96d5442023-08-30 16:30:15 +020016008{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
16009printf %s "checking size of time_t... " >&6; }
16010if test ${ac_cv_sizeof_time_t+y}
16011then :
16012 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020016013else case e in #(
16014 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 +020016015then :
Bram Moolenaar914703b2010-05-31 21:59:46 +020016016
Christian Brabandt9670f612025-05-07 21:44:33 +020016017else case e in #(
16018 e) if test "$ac_cv_type_time_t" = yes; then
16019 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
16020printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +010016021as_fn_error 77 "cannot compute sizeof (time_t)
Christian Brabandt9670f612025-05-07 21:44:33 +020016022See 'config.log' for more details" "$LINENO" 5; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020016023 else
16024 ac_cv_sizeof_time_t=0
Christian Brabandt9670f612025-05-07 21:44:33 +020016025 fi ;;
16026esac
Bram Moolenaar644fdff2010-05-30 13:26:21 +020016027fi
Christian Brabandt9670f612025-05-07 21:44:33 +020016028 ;;
16029esac
Bram Moolenaar644fdff2010-05-30 13:26:21 +020016030fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016031{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
16032printf "%s\n" "$ac_cv_sizeof_time_t" >&6; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020016033
16034
16035
Illia Bobyra96d5442023-08-30 16:30:15 +020016036printf "%s\n" "#define SIZEOF_TIME_T $ac_cv_sizeof_time_t" >>confdefs.h
Bram Moolenaar644fdff2010-05-30 13:26:21 +020016037
16038
Bram Moolenaar914703b2010-05-31 21:59:46 +020016039# The cast to long int works around a bug in the HP C Compiler
16040# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
Christian Brabandt9670f612025-05-07 21:44:33 +020016041# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'.
Bram Moolenaar914703b2010-05-31 21:59:46 +020016042# This bug is HP SR number 8606223364.
Illia Bobyra96d5442023-08-30 16:30:15 +020016043{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
16044printf %s "checking size of off_t... " >&6; }
16045if test ${ac_cv_sizeof_off_t+y}
16046then :
16047 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020016048else case e in #(
16049 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 +020016050then :
Bram Moolenaar914703b2010-05-31 21:59:46 +020016051
Christian Brabandt9670f612025-05-07 21:44:33 +020016052else case e in #(
16053 e) if test "$ac_cv_type_off_t" = yes; then
16054 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
16055printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +010016056as_fn_error 77 "cannot compute sizeof (off_t)
Christian Brabandt9670f612025-05-07 21:44:33 +020016057See 'config.log' for more details" "$LINENO" 5; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020016058 else
16059 ac_cv_sizeof_off_t=0
Christian Brabandt9670f612025-05-07 21:44:33 +020016060 fi ;;
16061esac
Bram Moolenaar914703b2010-05-31 21:59:46 +020016062fi
Christian Brabandt9670f612025-05-07 21:44:33 +020016063 ;;
16064esac
Bram Moolenaar914703b2010-05-31 21:59:46 +020016065fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016066{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
16067printf "%s\n" "$ac_cv_sizeof_off_t" >&6; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020016068
16069
16070
Illia Bobyra96d5442023-08-30 16:30:15 +020016071printf "%s\n" "#define SIZEOF_OFF_T $ac_cv_sizeof_off_t" >>confdefs.h
Bram Moolenaar914703b2010-05-31 21:59:46 +020016072
16073
16074
Illia Bobyra96d5442023-08-30 16:30:15 +020016075printf "%s\n" "#define VIM_SIZEOF_INT $ac_cv_sizeof_int" >>confdefs.h
Bram Moolenaara2aa31a2014-02-23 22:52:40 +010016076
Illia Bobyra96d5442023-08-30 16:30:15 +020016077printf "%s\n" "#define VIM_SIZEOF_LONG $ac_cv_sizeof_long" >>confdefs.h
Bram Moolenaara2aa31a2014-02-23 22:52:40 +010016078
16079
Illia Bobyra96d5442023-08-30 16:30:15 +020016080{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking uint32_t is 32 bits" >&5
16081printf %s "checking uint32_t is 32 bits... " >&6; }
16082if test "$cross_compiling" = yes
16083then :
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010016084 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: assuming uint32_t is correct when cross-compiling" >&5
16085printf "%s\n" "$as_me: WARNING: assuming uint32_t is correct when cross-compiling" >&2;}
Christian Brabandt9670f612025-05-07 21:44:33 +020016086else case e in #(
16087 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarfa7584c2010-05-19 21:57:45 +020016088/* end confdefs.h. */
16089
16090#ifdef HAVE_STDINT_H
16091# include <stdint.h>
16092#endif
16093#ifdef HAVE_INTTYPES_H
16094# include <inttypes.h>
16095#endif
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010016096int main() {
Bram Moolenaarfa7584c2010-05-19 21:57:45 +020016097 uint32_t nr1 = (uint32_t)-1;
16098 uint32_t nr2 = (uint32_t)0xffffffffUL;
Bram Moolenaar52897832020-07-02 22:50:37 +020016099 if (sizeof(uint32_t) != 4 || nr1 != 0xffffffffUL || nr2 + 1 != 0) return 1;
16100 return 0;
Bram Moolenaarfa7584c2010-05-19 21:57:45 +020016101}
16102_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016103if ac_fn_c_try_run "$LINENO"
16104then :
16105 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16106printf "%s\n" "ok" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +020016107else case e in #(
16108 e) as_fn_error $? "WRONG! uint32_t not defined correctly." "$LINENO" 5 ;;
16109esac
Bram Moolenaarfa7584c2010-05-19 21:57:45 +020016110fi
16111rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
Christian Brabandt9670f612025-05-07 21:44:33 +020016112 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
16113esac
Bram Moolenaarfa7584c2010-05-19 21:57:45 +020016114fi
16115
16116
Bram Moolenaar446cb832008-06-24 21:56:24 +000016117
Bram Moolenaar071d4272004-06-13 20:20:40 +000016118bcopy_test_prog='
Bram Moolenaar446cb832008-06-24 21:56:24 +000016119#include "confdefs.h"
16120#ifdef HAVE_STRING_H
16121# include <string.h>
16122#endif
16123#if STDC_HEADERS
16124# include <stdlib.h>
16125# include <stddef.h>
16126#endif
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010016127int main() {
Bram Moolenaar071d4272004-06-13 20:20:40 +000016128 char buf[10];
16129 strcpy(buf, "abcdefghi");
16130 mch_memmove(buf, buf + 2, 3);
16131 if (strncmp(buf, "ababcf", 6))
16132 exit(1);
16133 strcpy(buf, "abcdefghi");
16134 mch_memmove(buf + 2, buf, 3);
16135 if (strncmp(buf, "cdedef", 6))
16136 exit(1);
16137 exit(0); /* libc version works properly. */
16138}'
16139
Illia Bobyra96d5442023-08-30 16:30:15 +020016140{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether memmove handles overlaps" >&5
16141printf %s "checking whether memmove handles overlaps... " >&6; }
16142if test ${vim_cv_memmove_handles_overlap+y}
16143then :
16144 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020016145else case e in #(
16146 e)
Illia Bobyra96d5442023-08-30 16:30:15 +020016147 if test "$cross_compiling" = yes
16148then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000016149
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010016150 vim_cv_memmove_handles_overlap=yes
16151 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cross-compiling: consider setting 'vim_cv_memmove_handles_overlap'" >&5
16152printf "%s\n" "$as_me: WARNING: cross-compiling: consider setting 'vim_cv_memmove_handles_overlap'" >&2;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000016153
Christian Brabandt9670f612025-05-07 21:44:33 +020016154else case e in #(
16155 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016156/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016157#define mch_memmove(s,d,l) memmove(d,s,l) $bcopy_test_prog
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016158_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016159if ac_fn_c_try_run "$LINENO"
16160then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000016161
16162 vim_cv_memmove_handles_overlap=yes
16163
Christian Brabandt9670f612025-05-07 21:44:33 +020016164else case e in #(
16165 e)
Bram Moolenaar446cb832008-06-24 21:56:24 +000016166 vim_cv_memmove_handles_overlap=no
Christian Brabandt9670f612025-05-07 21:44:33 +020016167 ;;
16168esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000016169fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016170rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
Christian Brabandt9670f612025-05-07 21:44:33 +020016171 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
16172esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000016173fi
16174
Christian Brabandt9670f612025-05-07 21:44:33 +020016175 ;;
16176esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000016177fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016178{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_memmove_handles_overlap" >&5
16179printf "%s\n" "$vim_cv_memmove_handles_overlap" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000016180
16181if test "x$vim_cv_memmove_handles_overlap" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016182 printf "%s\n" "#define USEMEMMOVE 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000016183
Bram Moolenaar071d4272004-06-13 20:20:40 +000016184else
Illia Bobyra96d5442023-08-30 16:30:15 +020016185 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether bcopy handles overlaps" >&5
16186printf %s "checking whether bcopy handles overlaps... " >&6; }
16187if test ${vim_cv_bcopy_handles_overlap+y}
16188then :
16189 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020016190else case e in #(
16191 e)
Illia Bobyra96d5442023-08-30 16:30:15 +020016192 if test "$cross_compiling" = yes
16193then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000016194
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010016195 vim_cv_bcopy_handles_overlap=yes
16196 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cross-compiling: consider setting 'vim_cv_bcopy_handles_overlap'" >&5
16197printf "%s\n" "$as_me: WARNING: cross-compiling: consider setting 'vim_cv_bcopy_handles_overlap'" >&2;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000016198
Christian Brabandt9670f612025-05-07 21:44:33 +020016199else case e in #(
16200 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016201/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000016202#define mch_bcopy(s,d,l) bcopy(d,s,l) $bcopy_test_prog
16203_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016204if ac_fn_c_try_run "$LINENO"
16205then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000016206
16207 vim_cv_bcopy_handles_overlap=yes
16208
Christian Brabandt9670f612025-05-07 21:44:33 +020016209else case e in #(
16210 e)
Bram Moolenaar446cb832008-06-24 21:56:24 +000016211 vim_cv_bcopy_handles_overlap=no
Christian Brabandt9670f612025-05-07 21:44:33 +020016212 ;;
16213esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000016214fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016215rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
Christian Brabandt9670f612025-05-07 21:44:33 +020016216 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
16217esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000016218fi
16219
Christian Brabandt9670f612025-05-07 21:44:33 +020016220 ;;
16221esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000016222fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016223{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_bcopy_handles_overlap" >&5
16224printf "%s\n" "$vim_cv_bcopy_handles_overlap" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000016225
16226 if test "x$vim_cv_bcopy_handles_overlap" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016227 printf "%s\n" "#define USEBCOPY 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016228
Bram Moolenaar446cb832008-06-24 21:56:24 +000016229 else
Illia Bobyra96d5442023-08-30 16:30:15 +020016230 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether memcpy handles overlaps" >&5
16231printf %s "checking whether memcpy handles overlaps... " >&6; }
16232if test ${vim_cv_memcpy_handles_overlap+y}
16233then :
16234 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020016235else case e in #(
16236 e)
Illia Bobyra96d5442023-08-30 16:30:15 +020016237 if test "$cross_compiling" = yes
16238then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000016239
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010016240 vim_cv_memcpy_handles_overlap=yes
16241 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cross-compiling: consider setting 'vim_cv_memcpy_handles_overlap'" >&5
16242printf "%s\n" "$as_me: WARNING: cross-compiling: consider setting 'vim_cv_memcpy_handles_overlap'" >&2;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000016243
Christian Brabandt9670f612025-05-07 21:44:33 +020016244else case e in #(
16245 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016246/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000016247#define mch_memcpy(s,d,l) memcpy(d,s,l) $bcopy_test_prog
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016248_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016249if ac_fn_c_try_run "$LINENO"
16250then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000016251
16252 vim_cv_memcpy_handles_overlap=yes
16253
Christian Brabandt9670f612025-05-07 21:44:33 +020016254else case e in #(
16255 e)
Bram Moolenaar446cb832008-06-24 21:56:24 +000016256 vim_cv_memcpy_handles_overlap=no
Christian Brabandt9670f612025-05-07 21:44:33 +020016257 ;;
16258esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000016259fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016260rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
Christian Brabandt9670f612025-05-07 21:44:33 +020016261 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
16262esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000016263fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000016264
Christian Brabandt9670f612025-05-07 21:44:33 +020016265 ;;
16266esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000016267fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016268{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_memcpy_handles_overlap" >&5
16269printf "%s\n" "$vim_cv_memcpy_handles_overlap" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000016270
16271 if test "x$vim_cv_memcpy_handles_overlap" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016272 printf "%s\n" "#define USEMEMCPY 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000016273
16274 fi
16275 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000016276fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000016277
Bram Moolenaar071d4272004-06-13 20:20:40 +000016278
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020016279if test "x$with_x" = "xyes"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000016280 cflags_save=$CFLAGS
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020016281 libs_save=$LIBS
16282 LIBS="$LIBS $X_LIBS $GUI_LIB_LOC $GUI_X_LIBS $X_PRE_LIBS $X_LIB $X_EXTRA_LIBS"
16283 CFLAGS="$CFLAGS $X_CFLAGS"
16284
Illia Bobyra96d5442023-08-30 16:30:15 +020016285 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether X_LOCALE needed" >&5
16286printf %s "checking whether X_LOCALE needed... " >&6; }
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020016287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016288/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016289#include <X11/Xlocale.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016290int
Illia Bobyra96d5442023-08-30 16:30:15 +020016291main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016292{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016293
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016294 ;
16295 return 0;
16296}
16297_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016298if ac_fn_c_try_compile "$LINENO"
16299then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016301/* end confdefs.h. */
16302
Bram Moolenaar446cb832008-06-24 21:56:24 +000016303/* Override any GCC internal prototype to avoid an error.
16304 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020016305 builtin and then its argument prototype would still apply.
16306 The 'extern "C"' is for builds by C++ compilers;
16307 although this is not generally supported in C code supporting it here
16308 has little cost and some practical benefit (sr 110532). */
16309#ifdef __cplusplus
16310extern "C"
16311#endif
16312char _Xsetlocale (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016313int
Illia Bobyra96d5442023-08-30 16:30:15 +020016314main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016315{
Bram Moolenaar446cb832008-06-24 21:56:24 +000016316return _Xsetlocale ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016317 ;
16318 return 0;
16319}
16320_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016321if ac_fn_c_try_link "$LINENO"
16322then :
16323 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16324printf "%s\n" "yes" >&6; }
16325 printf "%s\n" "#define X_LOCALE 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016326
Christian Brabandt9670f612025-05-07 21:44:33 +020016327else case e in #(
16328 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16329printf "%s\n" "no" >&6; } ;;
16330esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000016331fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016332rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016333 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020016334else case e in #(
16335 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16336printf "%s\n" "no" >&6; } ;;
16337esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000016338fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016339rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020016340
Illia Bobyra96d5442023-08-30 16:30:15 +020016341 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether Xutf8SetWMProperties() can be used" >&5
16342printf %s "checking whether Xutf8SetWMProperties() can be used... " >&6; }
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020016343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16344/* end confdefs.h. */
16345
16346/* Override any GCC internal prototype to avoid an error.
16347 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020016348 builtin and then its argument prototype would still apply.
16349 The 'extern "C"' is for builds by C++ compilers;
16350 although this is not generally supported in C code supporting it here
16351 has little cost and some practical benefit (sr 110532). */
16352#ifdef __cplusplus
16353extern "C"
16354#endif
16355char Xutf8SetWMProperties (void);
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020016356int
Illia Bobyra96d5442023-08-30 16:30:15 +020016357main (void)
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020016358{
16359return Xutf8SetWMProperties ();
16360 ;
16361 return 0;
16362}
16363_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016364if ac_fn_c_try_link "$LINENO"
16365then :
16366 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16367printf "%s\n" "yes" >&6; }
16368 printf "%s\n" "#define HAVE_XUTF8SETWMPROPERTIES 1" >>confdefs.h
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020016369
Christian Brabandt9670f612025-05-07 21:44:33 +020016370else case e in #(
16371 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16372printf "%s\n" "no" >&6; } ;;
16373esac
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020016374fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016375rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020016376 conftest$ac_exeext conftest.$ac_ext
16377
Bram Moolenaar071d4272004-06-13 20:20:40 +000016378 CFLAGS=$cflags_save
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020016379 LIBS=$libs_save
Bram Moolenaar071d4272004-06-13 20:20:40 +000016380fi
16381
Illia Bobyra96d5442023-08-30 16:30:15 +020016382{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _xpg4_setrunelocale in -lxpg4" >&5
16383printf %s "checking for _xpg4_setrunelocale in -lxpg4... " >&6; }
16384if test ${ac_cv_lib_xpg4__xpg4_setrunelocale+y}
16385then :
16386 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020016387else case e in #(
16388 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000016389LIBS="-lxpg4 $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016390cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016391/* end confdefs.h. */
16392
Bram Moolenaar446cb832008-06-24 21:56:24 +000016393/* Override any GCC internal prototype to avoid an error.
16394 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020016395 builtin and then its argument prototype would still apply.
16396 The 'extern "C"' is for builds by C++ compilers;
16397 although this is not generally supported in C code supporting it here
16398 has little cost and some practical benefit (sr 110532). */
16399#ifdef __cplusplus
16400extern "C"
16401#endif
16402char _xpg4_setrunelocale (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016403int
Illia Bobyra96d5442023-08-30 16:30:15 +020016404main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016405{
Bram Moolenaar446cb832008-06-24 21:56:24 +000016406return _xpg4_setrunelocale ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016407 ;
16408 return 0;
16409}
16410_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016411if ac_fn_c_try_link "$LINENO"
16412then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016413 ac_cv_lib_xpg4__xpg4_setrunelocale=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020016414else case e in #(
16415 e) ac_cv_lib_xpg4__xpg4_setrunelocale=no ;;
16416esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000016417fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016418rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016419 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020016420LIBS=$ac_check_lib_save_LIBS ;;
16421esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016422fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016423{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xpg4__xpg4_setrunelocale" >&5
16424printf "%s\n" "$ac_cv_lib_xpg4__xpg4_setrunelocale" >&6; }
16425if test "x$ac_cv_lib_xpg4__xpg4_setrunelocale" = xyes
16426then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000016427 LIBS="$LIBS -lxpg4"
Bram Moolenaar071d4272004-06-13 20:20:40 +000016428fi
16429
16430
Illia Bobyra96d5442023-08-30 16:30:15 +020016431{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to create tags" >&5
16432printf %s "checking how to create tags... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000016433test -f tags && mv tags tags.save
Bram Moolenaar5897e0c2011-05-10 15:42:03 +020016434if (eval ctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then
Bram Moolenaar509ff062020-01-02 22:38:49 +010016435 TAGPRG="ctags -I INIT+,INIT2+,INIT3+,INIT4+,INIT5+ --fields=+S"
Bram Moolenaar5897e0c2011-05-10 15:42:03 +020016436elif (eval exctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then
Bram Moolenaar509ff062020-01-02 22:38:49 +010016437 TAGPRG="exctags -I INIT+,INIT2+,INIT3+,INIT4+,INIT5+ --fields=+S"
Bram Moolenaar5897e0c2011-05-10 15:42:03 +020016438elif (eval exuberant-ctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then
Bram Moolenaar509ff062020-01-02 22:38:49 +010016439 TAGPRG="exuberant-ctags -I INIT+,INIT2+,INIT3+,INIT4+,INIT5+ --fields=+S"
Bram Moolenaar071d4272004-06-13 20:20:40 +000016440else
Bram Moolenaar0c7ce772009-05-13 12:49:39 +000016441 TAGPRG="ctags"
Bram Moolenaar071d4272004-06-13 20:20:40 +000016442 (eval etags /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="etags"
16443 (eval etags -c /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="etags -c"
16444 (eval ctags /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags"
16445 (eval ctags -t /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -t"
16446 (eval ctags -ts /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -ts"
16447 (eval ctags -tvs /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -tvs"
16448 (eval ctags -i+m /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -i+m"
16449fi
16450test -f tags.save && mv tags.save tags
Illia Bobyra96d5442023-08-30 16:30:15 +020016451{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $TAGPRG" >&5
16452printf "%s\n" "$TAGPRG" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000016453
Illia Bobyra96d5442023-08-30 16:30:15 +020016454{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run man with a section nr" >&5
16455printf %s "checking how to run man with a section nr... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000016456MANDEF="man"
Bram Moolenaar8b131502008-02-13 09:28:19 +000016457(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 +020016458{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MANDEF" >&5
16459printf "%s\n" "$MANDEF" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000016460if test "$MANDEF" = "man -s"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016461 printf "%s\n" "#define USEMAN_S 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016462
16463fi
16464
Illia Bobyra96d5442023-08-30 16:30:15 +020016465{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-nls argument" >&5
16466printf %s "checking --disable-nls argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000016467# Check whether --enable-nls was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020016468if test ${enable_nls+y}
16469then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000016470 enableval=$enable_nls;
Christian Brabandt9670f612025-05-07 21:44:33 +020016471else case e in #(
16472 e) enable_nls="yes" ;;
16473esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000016474fi
16475
Bram Moolenaar071d4272004-06-13 20:20:40 +000016476
16477if test "$enable_nls" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016478 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16479printf "%s\n" "no" >&6; }
Bram Moolenaar2389c3c2005-05-22 22:07:59 +000016480
16481 INSTALL_LANGS=install-languages
16482
16483 INSTALL_TOOL_LANGS=install-tool-languages
16484
16485
Bram Moolenaar071d4272004-06-13 20:20:40 +000016486 # Extract the first word of "msgfmt", so it can be a program name with args.
16487set dummy msgfmt; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +020016488{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16489printf %s "checking for $ac_word... " >&6; }
16490if test ${ac_cv_prog_MSGFMT+y}
16491then :
16492 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020016493else case e in #(
16494 e) if test -n "$MSGFMT"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000016495 ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
16496else
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016497as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16498for as_dir in $PATH
16499do
16500 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +020016501 case $as_dir in #(((
16502 '') as_dir=./ ;;
16503 */) ;;
16504 *) as_dir=$as_dir/ ;;
16505 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016506 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +020016507 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016508 ac_cv_prog_MSGFMT="msgfmt"
Illia Bobyra96d5442023-08-30 16:30:15 +020016509 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016510 break 2
16511 fi
16512done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016513 done
Bram Moolenaar446cb832008-06-24 21:56:24 +000016514IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016515
Christian Brabandt9670f612025-05-07 21:44:33 +020016516fi ;;
16517esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000016518fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016519MSGFMT=$ac_cv_prog_MSGFMT
Bram Moolenaar071d4272004-06-13 20:20:40 +000016520if test -n "$MSGFMT"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016521 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
16522printf "%s\n" "$MSGFMT" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000016523else
Illia Bobyra96d5442023-08-30 16:30:15 +020016524 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16525printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000016526fi
16527
Bram Moolenaar446cb832008-06-24 21:56:24 +000016528
Illia Bobyra96d5442023-08-30 16:30:15 +020016529 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for NLS" >&5
16530printf %s "checking for NLS... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000016531 if test -f po/Makefile; then
16532 have_gettext="no"
16533 if test -n "$MSGFMT"; then
Bram Moolenaar49b6a572013-11-17 20:32:54 +010016534 olibs=$LIBS
16535 LIBS=""
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016537/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016538#include <libintl.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016539int
Illia Bobyra96d5442023-08-30 16:30:15 +020016540main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016541{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016542gettext("Test");
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016543 ;
16544 return 0;
16545}
16546_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016547if ac_fn_c_try_link "$LINENO"
16548then :
16549 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gettext() works" >&5
16550printf "%s\n" "gettext() works" >&6; }; have_gettext="yes"; LIBS=$olibs
Christian Brabandt9670f612025-05-07 21:44:33 +020016551else case e in #(
16552 e) LIBS="-lintl"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016554/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016555#include <libintl.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016556int
Illia Bobyra96d5442023-08-30 16:30:15 +020016557main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016558{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016559gettext("Test");
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016560 ;
16561 return 0;
16562}
16563_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016564if ac_fn_c_try_link "$LINENO"
16565then :
16566 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gettext() works with -lintl" >&5
16567printf "%s\n" "gettext() works with -lintl" >&6; }; have_gettext="yes";
Bram Moolenaar49b6a572013-11-17 20:32:54 +010016568 LIBS="$olibs -lintl"
Christian Brabandt9670f612025-05-07 21:44:33 +020016569else case e in #(
16570 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gettext() doesn't work" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +020016571printf "%s\n" "gettext() doesn't work" >&6; };
Christian Brabandt9670f612025-05-07 21:44:33 +020016572 LIBS=$olibs ;;
16573esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000016574fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016575rm -f core conftest.err conftest.$ac_objext conftest.beam \
Christian Brabandt9670f612025-05-07 21:44:33 +020016576 conftest$ac_exeext conftest.$ac_ext ;;
16577esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000016578fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016579rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016580 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000016581 else
Illia Bobyra96d5442023-08-30 16:30:15 +020016582 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: msgfmt not found - disabled" >&5
16583printf "%s\n" "msgfmt not found - disabled" >&6; };
Bram Moolenaar071d4272004-06-13 20:20:40 +000016584 fi
Martin Tournoij7904fa42022-10-04 16:28:45 +010016585 if test $have_gettext = "yes" -a "x$features" != "xtiny"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016586 printf "%s\n" "#define HAVE_GETTEXT 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016587
16588 MAKEMO=yes
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016589
Illia Bobyra96d5442023-08-30 16:30:15 +020016590 ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset"
16591if test "x$ac_cv_func_bind_textdomain_codeset" = xyes
16592then :
16593 printf "%s\n" "#define HAVE_BIND_TEXTDOMAIN_CODESET 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016594
Bram Moolenaar071d4272004-06-13 20:20:40 +000016595fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000016596
Christ van Willegence0ef912024-06-20 23:41:59 +020016597 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dgettext" >&5
16598printf %s "checking for dgettext... " >&6; }
16599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16600/* end confdefs.h. */
16601#include <libintl.h>
16602int
16603main (void)
16604{
16605dgettext("Test", "Test");
16606 ;
16607 return 0;
16608}
16609_ACEOF
16610if ac_fn_c_try_link "$LINENO"
16611then :
16612 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16613printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_DGETTEXT 1" >>confdefs.h
16614
Christian Brabandt9670f612025-05-07 21:44:33 +020016615else case e in #(
16616 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dngettext" >&5
Christ van Willegenc0786752025-02-01 15:42:16 +010016617printf %s "checking for dngettext... " >&6; }
16618 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
Christian Brabandt9670f612025-05-07 21:44:33 +020016619printf "%s\n" "no" >&6; } ;;
16620esac
Christ van Willegenc0786752025-02-01 15:42:16 +010016621fi
16622rm -f core conftest.err conftest.$ac_objext conftest.beam \
16623 conftest$ac_exeext conftest.$ac_ext
16624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16625/* end confdefs.h. */
16626#include <libintl.h>
16627int
16628main (void)
16629{
16630dngettext("DOMAIN", "Test single", "Test plural", 1);
16631 ;
16632 return 0;
16633}
16634_ACEOF
16635if ac_fn_c_try_link "$LINENO"
16636then :
16637 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16638printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_DNGETTEXT 1" >>confdefs.h
16639
Christian Brabandt9670f612025-05-07 21:44:33 +020016640else case e in #(
16641 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16642printf "%s\n" "no" >&6; } ;;
16643esac
Christ van Willegence0ef912024-06-20 23:41:59 +020016644fi
16645rm -f core conftest.err conftest.$ac_objext conftest.beam \
16646 conftest$ac_exeext conftest.$ac_ext
Illia Bobyra96d5442023-08-30 16:30:15 +020016647 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _nl_msg_cat_cntr" >&5
16648printf %s "checking for _nl_msg_cat_cntr... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016650/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016651#include <libintl.h>
16652 extern int _nl_msg_cat_cntr;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016653int
Illia Bobyra96d5442023-08-30 16:30:15 +020016654main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016655{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016656++_nl_msg_cat_cntr;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016657 ;
16658 return 0;
16659}
16660_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016661if ac_fn_c_try_link "$LINENO"
16662then :
16663 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16664printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_NL_MSG_CAT_CNTR 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016665
Christian Brabandt9670f612025-05-07 21:44:33 +020016666else case e in #(
16667 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16668printf "%s\n" "no" >&6; } ;;
16669esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000016670fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016671rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016672 conftest$ac_exeext conftest.$ac_ext
Illia Bobyra96d5442023-08-30 16:30:15 +020016673 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if msgfmt supports --desktop" >&5
16674printf %s "checking if msgfmt supports --desktop... " >&6; }
Bram Moolenaar26096cc2019-04-11 15:25:40 +020016675 MSGFMT_DESKTOP=
16676 if "$MSGFMT" --help | grep -e '--desktop' >/dev/null; then
Bram Moolenaar62a88f42019-06-07 20:44:40 +020016677 if "$MSGFMT" --version | grep '0.19.[3-7]$' >/dev/null; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016678 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: broken" >&5
16679printf "%s\n" "broken" >&6; }
Bram Moolenaar62a88f42019-06-07 20:44:40 +020016680 else
Illia Bobyra96d5442023-08-30 16:30:15 +020016681 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16682printf "%s\n" "yes" >&6; }
Bram Moolenaar62a88f42019-06-07 20:44:40 +020016683 MSGFMT_DESKTOP="gvim.desktop vim.desktop"
16684 fi
Bram Moolenaar26096cc2019-04-11 15:25:40 +020016685 else
Illia Bobyra96d5442023-08-30 16:30:15 +020016686 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16687printf "%s\n" "no" >&6; }
Bram Moolenaar26096cc2019-04-11 15:25:40 +020016688 fi
16689
Vladimír Marek87319172024-04-11 21:54:34 +020016690 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $MSGFMT supports --no-convert" >&5
16691printf %s "checking if $MSGFMT supports --no-convert... " >&6; }
RestorerZe498caf2024-03-12 22:11:36 +010016692 if "$MSGFMT" --help | grep -q -- '--no-convert' >/dev/null; then
16693 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16694printf "%s\n" "yes" >&6; }
Vladimír Marek87319172024-04-11 21:54:34 +020016695 MSGFMTCMD="OLD_PO_FILE_INPUT=yes $MSGFMT --no-convert -v"
RestorerZe498caf2024-03-12 22:11:36 +010016696 else
16697 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16698printf "%s\n" "no" >&6; }
Vladimír Marek87319172024-04-11 21:54:34 +020016699 MSGFMTCMD="OLD_PO_FILE_INPUT=yes $MSGFMT -v"
RestorerZe498caf2024-03-12 22:11:36 +010016700 fi
16701
Bram Moolenaar071d4272004-06-13 20:20:40 +000016702 fi
16703 else
Illia Bobyra96d5442023-08-30 16:30:15 +020016704 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no \"po/Makefile\" - disabled" >&5
16705printf "%s\n" "no \"po/Makefile\" - disabled" >&6; };
Bram Moolenaar071d4272004-06-13 20:20:40 +000016706 fi
16707else
Illia Bobyra96d5442023-08-30 16:30:15 +020016708 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16709printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000016710fi
16711
Illia Bobyra96d5442023-08-30 16:30:15 +020016712ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
16713if test "x$ac_cv_header_dlfcn_h" = xyes
16714then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000016715 DLL=dlfcn.h
Christian Brabandt9670f612025-05-07 21:44:33 +020016716else case e in #(
16717 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 +020016718if test "x$ac_cv_header_dl_h" = xyes
16719then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016720 DLL=dl.h
16721fi
Christian Brabandt9670f612025-05-07 21:44:33 +020016722 ;;
16723esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016724fi
16725
Bram Moolenaar071d4272004-06-13 20:20:40 +000016726if test x${DLL} = xdlfcn.h; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016727
Illia Bobyra96d5442023-08-30 16:30:15 +020016728printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016729
Illia Bobyra96d5442023-08-30 16:30:15 +020016730 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen()" >&5
16731printf %s "checking for dlopen()... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016733/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016734
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016735int
Illia Bobyra96d5442023-08-30 16:30:15 +020016736main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016737{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016738
16739 extern void* dlopen();
16740 dlopen();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016741
16742 ;
16743 return 0;
16744}
16745_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016746if ac_fn_c_try_link "$LINENO"
16747then :
16748 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16749printf "%s\n" "yes" >&6; };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016750
Illia Bobyra96d5442023-08-30 16:30:15 +020016751printf "%s\n" "#define HAVE_DLOPEN 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016752
Christian Brabandt9670f612025-05-07 21:44:33 +020016753else case e in #(
16754 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +020016755printf "%s\n" "no" >&6; };
16756 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen() in -ldl" >&5
16757printf %s "checking for dlopen() in -ldl... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000016758 olibs=$LIBS
16759 LIBS="$LIBS -ldl"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016761/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016762
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016763int
Illia Bobyra96d5442023-08-30 16:30:15 +020016764main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016765{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016766
16767 extern void* dlopen();
16768 dlopen();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016769
16770 ;
16771 return 0;
16772}
16773_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016774if ac_fn_c_try_link "$LINENO"
16775then :
16776 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16777printf "%s\n" "yes" >&6; };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016778
Illia Bobyra96d5442023-08-30 16:30:15 +020016779printf "%s\n" "#define HAVE_DLOPEN 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016780
Christian Brabandt9670f612025-05-07 21:44:33 +020016781else case e in #(
16782 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +020016783printf "%s\n" "no" >&6; };
Christian Brabandt9670f612025-05-07 21:44:33 +020016784 LIBS=$olibs ;;
16785esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000016786fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016787rm -f core conftest.err conftest.$ac_objext conftest.beam \
Christian Brabandt9670f612025-05-07 21:44:33 +020016788 conftest$ac_exeext conftest.$ac_ext ;;
16789esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000016790fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016791rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016792 conftest$ac_exeext conftest.$ac_ext
Illia Bobyra96d5442023-08-30 16:30:15 +020016793 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlsym()" >&5
16794printf %s "checking for dlsym()... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016796/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016797
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016798int
Illia Bobyra96d5442023-08-30 16:30:15 +020016799main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016800{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016801
16802 extern void* dlsym();
16803 dlsym();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016804
16805 ;
16806 return 0;
16807}
16808_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016809if ac_fn_c_try_link "$LINENO"
16810then :
16811 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16812printf "%s\n" "yes" >&6; };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016813
Illia Bobyra96d5442023-08-30 16:30:15 +020016814printf "%s\n" "#define HAVE_DLSYM 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016815
Christian Brabandt9670f612025-05-07 21:44:33 +020016816else case e in #(
16817 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +020016818printf "%s\n" "no" >&6; };
16819 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlsym() in -ldl" >&5
16820printf %s "checking for dlsym() in -ldl... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000016821 olibs=$LIBS
16822 LIBS="$LIBS -ldl"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016824/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016825
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016826int
Illia Bobyra96d5442023-08-30 16:30:15 +020016827main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016828{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016829
16830 extern void* dlsym();
16831 dlsym();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016832
16833 ;
16834 return 0;
16835}
16836_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016837if ac_fn_c_try_link "$LINENO"
16838then :
16839 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16840printf "%s\n" "yes" >&6; };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016841
Illia Bobyra96d5442023-08-30 16:30:15 +020016842printf "%s\n" "#define HAVE_DLSYM 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016843
Christian Brabandt9670f612025-05-07 21:44:33 +020016844else case e in #(
16845 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +020016846printf "%s\n" "no" >&6; };
Christian Brabandt9670f612025-05-07 21:44:33 +020016847 LIBS=$olibs ;;
16848esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000016849fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016850rm -f core conftest.err conftest.$ac_objext conftest.beam \
Christian Brabandt9670f612025-05-07 21:44:33 +020016851 conftest$ac_exeext conftest.$ac_ext ;;
16852esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000016853fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016854rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016855 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000016856elif test x${DLL} = xdl.h; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016857
Illia Bobyra96d5442023-08-30 16:30:15 +020016858printf "%s\n" "#define HAVE_DL_H 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016859
Illia Bobyra96d5442023-08-30 16:30:15 +020016860 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load()" >&5
16861printf %s "checking for shl_load()... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016863/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016864
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016865int
Illia Bobyra96d5442023-08-30 16:30:15 +020016866main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016867{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016868
16869 extern void* shl_load();
16870 shl_load();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016871
16872 ;
16873 return 0;
16874}
16875_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016876if ac_fn_c_try_link "$LINENO"
16877then :
16878 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16879printf "%s\n" "yes" >&6; };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016880
Illia Bobyra96d5442023-08-30 16:30:15 +020016881printf "%s\n" "#define HAVE_SHL_LOAD 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016882
Christian Brabandt9670f612025-05-07 21:44:33 +020016883else case e in #(
16884 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +020016885printf "%s\n" "no" >&6; };
16886 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load() in -ldld" >&5
16887printf %s "checking for shl_load() in -ldld... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000016888 olibs=$LIBS
16889 LIBS="$LIBS -ldld"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016891/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016892
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016893int
Illia Bobyra96d5442023-08-30 16:30:15 +020016894main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016895{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016896
16897 extern void* shl_load();
16898 shl_load();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016899
16900 ;
16901 return 0;
16902}
16903_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016904if ac_fn_c_try_link "$LINENO"
16905then :
16906 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16907printf "%s\n" "yes" >&6; };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016908
Illia Bobyra96d5442023-08-30 16:30:15 +020016909printf "%s\n" "#define HAVE_SHL_LOAD 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016910
Christian Brabandt9670f612025-05-07 21:44:33 +020016911else case e in #(
16912 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +020016913printf "%s\n" "no" >&6; };
Christian Brabandt9670f612025-05-07 21:44:33 +020016914 LIBS=$olibs ;;
16915esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000016916fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016917rm -f core conftest.err conftest.$ac_objext conftest.beam \
Christian Brabandt9670f612025-05-07 21:44:33 +020016918 conftest$ac_exeext conftest.$ac_ext ;;
16919esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000016920fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016921rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016922 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000016923fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016924ac_fn_c_check_header_compile "$LINENO" "setjmp.h" "ac_cv_header_setjmp_h" "$ac_includes_default"
16925if test "x$ac_cv_header_setjmp_h" = xyes
16926then :
16927 printf "%s\n" "#define HAVE_SETJMP_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016928
16929fi
16930
Bram Moolenaar071d4272004-06-13 20:20:40 +000016931
Bram Moolenaard0573012017-10-28 21:11:06 +020016932if test "x$MACOS_X" = "xyes" -a -n "$PERL"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000016933 if echo $LIBS | grep -e '-ldl' >/dev/null; then
16934 LIBS=`echo $LIBS | sed s/-ldl//`
16935 PERL_LIBS="$PERL_LIBS -ldl"
16936 fi
16937fi
16938
Bram Moolenaard0573012017-10-28 21:11:06 +020016939if test "$MACOS_X" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016940 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need macOS frameworks" >&5
16941printf %s "checking whether we need macOS frameworks... " >&6; }
Bram Moolenaar097148e2020-08-11 21:58:20 +020016942 if test "$MACOS_X_DARWIN" = "yes"; then
Bram Moolenaard0573012017-10-28 21:11:06 +020016943 if test "$features" = "tiny"; then
16944 OS_EXTRA_SRC=`echo "$OS_EXTRA_SRC" | sed -e 's+os_macosx.m++'`
16945 OS_EXTRA_OBJ=`echo "$OS_EXTRA_OBJ" | sed -e 's+objects/os_macosx.o++'`
Illia Bobyra96d5442023-08-30 16:30:15 +020016946 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, we need CoreServices" >&5
16947printf "%s\n" "yes, we need CoreServices" >&6; }
Bram Moolenaar2be7cb72019-01-12 16:10:51 +010016948 LIBS="$LIBS -framework CoreServices"
Bram Moolenaard0573012017-10-28 21:11:06 +020016949 else
Illia Bobyra96d5442023-08-30 16:30:15 +020016950 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, we need AppKit" >&5
16951printf "%s\n" "yes, we need AppKit" >&6; }
Bram Moolenaard0573012017-10-28 21:11:06 +020016952 LIBS="$LIBS -framework AppKit"
Bram Moolenaard0573012017-10-28 21:11:06 +020016953 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000016954 else
Illia Bobyra96d5442023-08-30 16:30:15 +020016955 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16956printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000016957 fi
16958fi
16959
Christian Brabandt6b9efdd2021-09-09 17:14:50 +020016960if `echo "$CFLAGS" | grep -v D_REENTRANT >/dev/null`; then
Bram Moolenaar3ae5fc92021-09-06 18:57:30 +020016961 CFLAGS="$CFLAGS -D_REENTRANT"
16962fi
16963
Bram Moolenaard5cdbeb2005-10-10 20:59:28 +000016964DEPEND_CFLAGS_FILTER=
16965if test "$GCC" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016966 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GCC 3 or later" >&5
16967printf %s "checking for GCC 3 or later... " >&6; }
Bram Moolenaar348808f2020-02-07 20:50:07 +010016968 gccmajor=`echo "$gccversion" | sed -e 's/^\([1-9][0-9]*\)\..*$/\1/g'`
Bram Moolenaarf740b292006-02-16 22:11:02 +000016969 if test "$gccmajor" -gt "2"; then
Bram Moolenaard5cdbeb2005-10-10 20:59:28 +000016970 DEPEND_CFLAGS_FILTER="| sed 's+-I */+-isystem /+g'"
Illia Bobyra96d5442023-08-30 16:30:15 +020016971 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16972printf "%s\n" "yes" >&6; }
Bram Moolenaar0cd49302008-11-20 09:37:01 +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 Moolenaar0cd49302008-11-20 09:37:01 +000016976 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016977 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D_FORTIFY_SOURCE=1" >&5
16978printf %s "checking whether we need -D_FORTIFY_SOURCE=1... " >&6; }
Bram Moolenaar0cd49302008-11-20 09:37:01 +000016979 if test "$gccmajor" -gt "3"; then
Zdenek Dohnal42196982023-01-18 16:09:51 +000016980 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/'`
16981 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 +020016982 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16983printf "%s\n" "yes" >&6; }
Bram Moolenaar0cd49302008-11-20 09:37:01 +000016984 else
Illia Bobyra96d5442023-08-30 16:30:15 +020016985 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16986printf "%s\n" "no" >&6; }
Bram Moolenaar0cd49302008-11-20 09:37:01 +000016987 fi
Bram Moolenaara5792f52005-11-23 21:25:05 +000016988fi
Bram Moolenaard5cdbeb2005-10-10 20:59:28 +000016989
Bram Moolenaar071d4272004-06-13 20:20:40 +000016990
Illia Bobyra96d5442023-08-30 16:30:15 +020016991{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need to force -D_FILE_OFFSET_BITS=64" >&5
16992printf %s "checking whether we need to force -D_FILE_OFFSET_BITS=64... " >&6; }
Bram Moolenaar9ce42132018-04-11 22:19:36 +020016993if 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 +020016994 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16995printf "%s\n" "yes" >&6; }
16996 printf "%s\n" "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Bram Moolenaarec0557f2018-01-31 14:41:37 +010016997
16998else
Illia Bobyra96d5442023-08-30 16:30:15 +020016999 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17000printf "%s\n" "no" >&6; }
Bram Moolenaarec0557f2018-01-31 14:41:37 +010017001fi
17002
Bram Moolenaar6cd42db2020-12-04 18:09:54 +010017003LDFLAGS=`echo "$LDFLAGS" | sed -e 's/-L /-L/g'`
17004
Illia Bobyra96d5442023-08-30 16:30:15 +020017005{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking linker --as-needed support" >&5
17006printf %s "checking linker --as-needed support... " >&6; }
Bram Moolenaar22e193d2010-11-03 22:32:24 +010017007LINK_AS_NEEDED=
17008# Check if linker supports --as-needed and --no-as-needed options
17009if $CC -Wl,--help 2>/dev/null | grep as-needed > /dev/null; then
Natanael Copa761ead42021-05-15 14:25:37 +020017010 if ! echo "$LDFLAGS" | grep -q -- '-Wl,[^[:space:]]*--as-needed'; then
17011 LDFLAGS="$LDFLAGS -Wl,--as-needed"
17012 fi
Bram Moolenaar22e193d2010-11-03 22:32:24 +010017013 LINK_AS_NEEDED=yes
17014fi
17015if test "$LINK_AS_NEEDED" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +020017016 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17017printf "%s\n" "yes" >&6; }
Bram Moolenaar22e193d2010-11-03 22:32:24 +010017018else
Illia Bobyra96d5442023-08-30 16:30:15 +020017019 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17020printf "%s\n" "no" >&6; }
Bram Moolenaar22e193d2010-11-03 22:32:24 +010017021fi
17022
17023
Bram Moolenaar77c19352012-06-13 19:19:41 +020017024# IBM z/OS reset CFLAGS for config.mk
17025if test "$zOSUnix" = "yes"; then
17026 CFLAGS="-D_ALL_SOURCE -Wc,float\(ieee\),dll"
17027fi
17028
Bram Moolenaar446cb832008-06-24 21:56:24 +000017029ac_config_files="$ac_config_files auto/config.mk:config.mk.in"
17030
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017031cat >confcache <<\_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000017032# This file is a shell script that caches the results of configure
17033# tests run on this system so they can be shared between configure
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017034# scripts and configure runs, see configure's option --config-cache.
17035# It is not useful on other systems. If it contains results you don't
17036# want to keep, you may remove or edit it.
Bram Moolenaar071d4272004-06-13 20:20:40 +000017037#
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017038# config.status only pays attention to the cache file if you give it
17039# the --recheck option to rerun configure.
Bram Moolenaar071d4272004-06-13 20:20:40 +000017040#
Christian Brabandt9670f612025-05-07 21:44:33 +020017041# 'ac_cv_env_foo' variables (set or unset) will be overridden when
17042# loading this file, other *unset* 'ac_cv_foo' will be assigned the
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017043# following values.
17044
17045_ACEOF
17046
Bram Moolenaar071d4272004-06-13 20:20:40 +000017047# The following way of writing the cache mishandles newlines in values,
17048# but we know of no workaround that is simple, portable, and efficient.
Bram Moolenaar446cb832008-06-24 21:56:24 +000017049# So, we kill variables containing newlines.
Bram Moolenaar071d4272004-06-13 20:20:40 +000017050# Ultrix sh set writes to stderr and can't be redirected directly,
17051# and sets the high bit in the cache file unless we assign to the vars.
Bram Moolenaar446cb832008-06-24 21:56:24 +000017052(
17053 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17054 eval ac_val=\$$ac_var
17055 case $ac_val in #(
17056 *${as_nl}*)
17057 case $ac_var in #(
Illia Bobyra96d5442023-08-30 16:30:15 +020017058 *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17059printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017060 esac
17061 case $ac_var in #(
17062 _ | IFS | as_nl) ;; #(
17063 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017064 *) { eval $ac_var=; unset $ac_var;} ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017065 esac ;;
17066 esac
17067 done
17068
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017069 (set) 2>&1 |
Bram Moolenaar446cb832008-06-24 21:56:24 +000017070 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17071 *${as_nl}ac_space=\ *)
Christian Brabandt9670f612025-05-07 21:44:33 +020017072 # 'set' does not quote correctly, so add quotes: double-quote
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017073 # substitution turns \\\\ into \\, and sed turns \\ into \.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017074 sed -n \
17075 "s/'/'\\\\''/g;
17076 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Bram Moolenaar446cb832008-06-24 21:56:24 +000017077 ;; #(
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017078 *)
Christian Brabandt9670f612025-05-07 21:44:33 +020017079 # 'set' quotes correctly as required by POSIX, so do not add quotes.
Bram Moolenaar446cb832008-06-24 21:56:24 +000017080 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017081 ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017082 esac |
17083 sort
17084) |
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017085 sed '
Bram Moolenaar446cb832008-06-24 21:56:24 +000017086 /^ac_cv_env_/b end
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017087 t clear
Bram Moolenaar446cb832008-06-24 21:56:24 +000017088 :clear
Illia Bobyra96d5442023-08-30 16:30:15 +020017089 s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017090 t end
Bram Moolenaar446cb832008-06-24 21:56:24 +000017091 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17092 :end' >>confcache
17093if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17094 if test -w "$cache_file"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010017095 if test "x$cache_file" != "x/dev/null"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020017096 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17097printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
Bram Moolenaar7db77842014-03-27 17:40:59 +010017098 if test ! -f "$cache_file" || test -h "$cache_file"; then
17099 cat confcache >"$cache_file"
17100 else
17101 case $cache_file in #(
17102 */* | ?:*)
17103 mv -f confcache "$cache_file"$$ &&
17104 mv -f "$cache_file"$$ "$cache_file" ;; #(
17105 *)
17106 mv -f confcache "$cache_file" ;;
17107 esac
17108 fi
17109 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000017110 else
Illia Bobyra96d5442023-08-30 16:30:15 +020017111 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17112printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
Bram Moolenaar071d4272004-06-13 20:20:40 +000017113 fi
17114fi
17115rm -f confcache
17116
Bram Moolenaar071d4272004-06-13 20:20:40 +000017117test "x$prefix" = xNONE && prefix=$ac_default_prefix
17118# Let make expand exec_prefix.
17119test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
17120
Bram Moolenaar071d4272004-06-13 20:20:40 +000017121DEFS=-DHAVE_CONFIG_H
17122
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017123ac_libobjs=
17124ac_ltlibobjs=
Bram Moolenaar7db77842014-03-27 17:40:59 +010017125U=
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017126for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17127 # 1. Remove the extension, and $U if already installed.
Bram Moolenaar446cb832008-06-24 21:56:24 +000017128 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Illia Bobyra96d5442023-08-30 16:30:15 +020017129 ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
Bram Moolenaar446cb832008-06-24 21:56:24 +000017130 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17131 # will be set to the directory where LIBOBJS objects are built.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017132 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17133 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017134done
17135LIBOBJS=$ac_libobjs
17136
17137LTLIBOBJS=$ac_ltlibobjs
17138
17139
17140
Christian Brabandt9670f612025-05-07 21:44:33 +020017141# Check whether --enable-year2038 was given.
17142if test ${enable_year2038+y}
17143then :
17144 enableval=$enable_year2038;
17145fi
17146
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020017147
Bram Moolenaar7db77842014-03-27 17:40:59 +010017148: "${CONFIG_STATUS=./config.status}"
Bram Moolenaar446cb832008-06-24 21:56:24 +000017149ac_write_fail=0
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017150ac_clean_files_save=$ac_clean_files
17151ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Illia Bobyra96d5442023-08-30 16:30:15 +020017152{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17153printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017154as_write_fail=0
17155cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017156#! $SHELL
17157# Generated by $as_me.
Bram Moolenaar071d4272004-06-13 20:20:40 +000017158# Run this file to recreate the current configuration.
Bram Moolenaar071d4272004-06-13 20:20:40 +000017159# Compiler output produced by configure, useful for debugging
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017160# configure, is in config.log if it exists.
Bram Moolenaar071d4272004-06-13 20:20:40 +000017161
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017162debug=false
17163ac_cs_recheck=false
17164ac_cs_silent=false
Bram Moolenaar071d4272004-06-13 20:20:40 +000017165
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017166SHELL=\${CONFIG_SHELL-$SHELL}
17167export SHELL
17168_ASEOF
17169cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17170## -------------------- ##
17171## M4sh Initialization. ##
17172## -------------------- ##
Bram Moolenaar071d4272004-06-13 20:20:40 +000017173
Bram Moolenaar446cb832008-06-24 21:56:24 +000017174# Be more Bourne compatible
17175DUALCASE=1; export DUALCASE # for MKS sh
Illia Bobyra96d5442023-08-30 16:30:15 +020017176if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
17177then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017178 emulate sh
17179 NULLCMD=:
Bram Moolenaar446cb832008-06-24 21:56:24 +000017180 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017181 # is contrary to our usage. Disable this feature.
17182 alias -g '${1+"$@"}'='"$@"'
Bram Moolenaar446cb832008-06-24 21:56:24 +000017183 setopt NO_GLOB_SUBST
Christian Brabandt9670f612025-05-07 21:44:33 +020017184else case e in #(
17185 e) case `(set -o) 2>/dev/null` in #(
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017186 *posix*) :
17187 set -o posix ;; #(
17188 *) :
17189 ;;
Christian Brabandt9670f612025-05-07 21:44:33 +020017190esac ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017191esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000017192fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000017193
17194
Illia Bobyra96d5442023-08-30 16:30:15 +020017195
17196# Reset variables that may have inherited troublesome values from
17197# the environment.
17198
17199# IFS needs to be set, to space, tab, and newline, in precisely that order.
17200# (If _AS_PATH_WALK were called with IFS unset, it would have the
17201# side effect of setting IFS to empty, thus disabling word splitting.)
17202# Quoting is to prevent editors from complaining about space-tab.
Bram Moolenaar446cb832008-06-24 21:56:24 +000017203as_nl='
17204'
17205export as_nl
Illia Bobyra96d5442023-08-30 16:30:15 +020017206IFS=" "" $as_nl"
17207
17208PS1='$ '
17209PS2='> '
17210PS4='+ '
17211
17212# Ensure predictable behavior from utilities with locale-dependent output.
17213LC_ALL=C
17214export LC_ALL
17215LANGUAGE=C
17216export LANGUAGE
17217
17218# We cannot yet rely on "unset" to work, but we need these variables
17219# to be unset--not just set to an empty or harmless value--now, to
17220# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
17221# also avoids known problems related to "unset" and subshell syntax
17222# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
17223for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
17224do eval test \${$as_var+y} \
17225 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
17226done
17227
17228# Ensure that fds 0, 1, and 2 are open.
17229if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
17230if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
17231if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000017232
17233# The user is always right.
Illia Bobyra96d5442023-08-30 16:30:15 +020017234if ${PATH_SEPARATOR+false} :; then
Bram Moolenaar446cb832008-06-24 21:56:24 +000017235 PATH_SEPARATOR=:
17236 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17237 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17238 PATH_SEPARATOR=';'
17239 }
17240fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000017241
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017242
Bram Moolenaar446cb832008-06-24 21:56:24 +000017243# Find who we are. Look in the path if we contain no directory separator.
Bram Moolenaar7db77842014-03-27 17:40:59 +010017244as_myself=
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017245case $0 in #((
Bram Moolenaar446cb832008-06-24 21:56:24 +000017246 *[\\/]* ) as_myself=$0 ;;
17247 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17248for as_dir in $PATH
17249do
17250 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +020017251 case $as_dir in #(((
17252 '') as_dir=./ ;;
17253 */) ;;
17254 *) as_dir=$as_dir/ ;;
17255 esac
17256 test -r "$as_dir$0" && as_myself=$as_dir$0 && break
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017257 done
Bram Moolenaar446cb832008-06-24 21:56:24 +000017258IFS=$as_save_IFS
17259
17260 ;;
17261esac
Christian Brabandt9670f612025-05-07 21:44:33 +020017262# We did not find ourselves, most probably we were run as 'sh COMMAND'
Bram Moolenaar446cb832008-06-24 21:56:24 +000017263# in which case we are not to be found in the path.
17264if test "x$as_myself" = x; then
17265 as_myself=$0
17266fi
17267if test ! -f "$as_myself"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020017268 printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017269 exit 1
Bram Moolenaar446cb832008-06-24 21:56:24 +000017270fi
17271
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017272
17273
Bram Moolenaar7db77842014-03-27 17:40:59 +010017274# as_fn_error STATUS ERROR [LINENO LOG_FD]
17275# ----------------------------------------
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017276# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17277# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Bram Moolenaar7db77842014-03-27 17:40:59 +010017278# script with STATUS, using 1 if that was 0.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017279as_fn_error ()
17280{
Bram Moolenaar7db77842014-03-27 17:40:59 +010017281 as_status=$1; test $as_status -eq 0 && as_status=1
17282 if test "$4"; then
17283 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +020017284 printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017285 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020017286 printf "%s\n" "$as_me: error: $2" >&2
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017287 as_fn_exit $as_status
17288} # as_fn_error
17289
17290
17291# as_fn_set_status STATUS
17292# -----------------------
17293# Set $? to STATUS, without forking.
17294as_fn_set_status ()
17295{
17296 return $1
17297} # as_fn_set_status
17298
17299# as_fn_exit STATUS
17300# -----------------
17301# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17302as_fn_exit ()
17303{
17304 set +e
17305 as_fn_set_status $1
17306 exit $1
17307} # as_fn_exit
17308
17309# as_fn_unset VAR
17310# ---------------
17311# Portably unset VAR.
17312as_fn_unset ()
17313{
17314 { eval $1=; unset $1;}
17315}
17316as_unset=as_fn_unset
Illia Bobyra96d5442023-08-30 16:30:15 +020017317
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017318# as_fn_append VAR VALUE
17319# ----------------------
17320# Append the text in VALUE to the end of the definition contained in VAR. Take
17321# advantage of any shell optimizations that allow amortized linear growth over
17322# repeated appends, instead of the typical quadratic growth present in naive
17323# implementations.
Illia Bobyra96d5442023-08-30 16:30:15 +020017324if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
17325then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017326 eval 'as_fn_append ()
17327 {
17328 eval $1+=\$2
17329 }'
Christian Brabandt9670f612025-05-07 21:44:33 +020017330else case e in #(
17331 e) as_fn_append ()
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017332 {
17333 eval $1=\$$1\$2
Christian Brabandt9670f612025-05-07 21:44:33 +020017334 } ;;
17335esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017336fi # as_fn_append
17337
17338# as_fn_arith ARG...
17339# ------------------
17340# Perform arithmetic evaluation on the ARGs, and store the result in the
17341# global $as_val. Take advantage of shells that can avoid forks. The arguments
17342# must be portable across $(()) and expr.
Illia Bobyra96d5442023-08-30 16:30:15 +020017343if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
17344then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017345 eval 'as_fn_arith ()
17346 {
17347 as_val=$(( $* ))
17348 }'
Christian Brabandt9670f612025-05-07 21:44:33 +020017349else case e in #(
17350 e) as_fn_arith ()
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017351 {
17352 as_val=`expr "$@" || test $? -eq 1`
Christian Brabandt9670f612025-05-07 21:44:33 +020017353 } ;;
17354esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017355fi # as_fn_arith
17356
17357
Bram Moolenaar446cb832008-06-24 21:56:24 +000017358if expr a : '\(a\)' >/dev/null 2>&1 &&
17359 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017360 as_expr=expr
17361else
17362 as_expr=false
17363fi
17364
Bram Moolenaar446cb832008-06-24 21:56:24 +000017365if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017366 as_basename=basename
17367else
17368 as_basename=false
17369fi
17370
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017371if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17372 as_dirname=dirname
17373else
17374 as_dirname=false
17375fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017376
Bram Moolenaar446cb832008-06-24 21:56:24 +000017377as_me=`$as_basename -- "$0" ||
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017378$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17379 X"$0" : 'X\(//\)$' \| \
Bram Moolenaar446cb832008-06-24 21:56:24 +000017380 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Illia Bobyra96d5442023-08-30 16:30:15 +020017381printf "%s\n" X/"$0" |
Bram Moolenaar446cb832008-06-24 21:56:24 +000017382 sed '/^.*\/\([^/][^/]*\)\/*$/{
17383 s//\1/
17384 q
17385 }
17386 /^X\/\(\/\/\)$/{
17387 s//\1/
17388 q
17389 }
17390 /^X\/\(\/\).*/{
17391 s//\1/
17392 q
17393 }
17394 s/.*/./; q'`
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017395
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017396# Avoid depending upon Character Ranges.
17397as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17398as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17399as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17400as_cr_digits='0123456789'
17401as_cr_alnum=$as_cr_Letters$as_cr_digits
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017402
Illia Bobyra96d5442023-08-30 16:30:15 +020017403
17404# Determine whether it's possible to make 'echo' print without a newline.
17405# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
17406# for compatibility with existing Makefiles.
Bram Moolenaar446cb832008-06-24 21:56:24 +000017407ECHO_C= ECHO_N= ECHO_T=
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017408case `echo -n x` in #(((((
Bram Moolenaar446cb832008-06-24 21:56:24 +000017409-n*)
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017410 case `echo 'xy\c'` in
Bram Moolenaar446cb832008-06-24 21:56:24 +000017411 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017412 xy) ECHO_C='\c';;
17413 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17414 ECHO_T=' ';;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017415 esac;;
17416*)
17417 ECHO_N='-n';;
17418esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017419
Illia Bobyra96d5442023-08-30 16:30:15 +020017420# For backward compatibility with old third-party macros, we provide
17421# the shell variables $as_echo and $as_echo_n. New code should use
17422# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
17423as_echo='printf %s\n'
17424as_echo_n='printf %s'
17425
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017426rm -f conf$$ conf$$.exe conf$$.file
Bram Moolenaar446cb832008-06-24 21:56:24 +000017427if test -d conf$$.dir; then
17428 rm -f conf$$.dir/conf$$.file
17429else
17430 rm -f conf$$.dir
17431 mkdir conf$$.dir 2>/dev/null
17432fi
17433if (echo >conf$$.file) 2>/dev/null; then
17434 if ln -s conf$$.file conf$$ 2>/dev/null; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017435 as_ln_s='ln -s'
Bram Moolenaar446cb832008-06-24 21:56:24 +000017436 # ... but there are two gotchas:
Christian Brabandt9670f612025-05-07 21:44:33 +020017437 # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail.
17438 # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable.
17439 # In both cases, we have to default to 'cp -pR'.
Bram Moolenaar446cb832008-06-24 21:56:24 +000017440 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Bram Moolenaar7db77842014-03-27 17:40:59 +010017441 as_ln_s='cp -pR'
Bram Moolenaar446cb832008-06-24 21:56:24 +000017442 elif ln conf$$.file conf$$ 2>/dev/null; then
17443 as_ln_s=ln
17444 else
Bram Moolenaar7db77842014-03-27 17:40:59 +010017445 as_ln_s='cp -pR'
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017446 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017447else
Bram Moolenaar7db77842014-03-27 17:40:59 +010017448 as_ln_s='cp -pR'
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017449fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000017450rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17451rmdir conf$$.dir 2>/dev/null
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017452
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017453
17454# as_fn_mkdir_p
17455# -------------
17456# Create "$as_dir" as a directory, including parents if necessary.
17457as_fn_mkdir_p ()
17458{
17459
17460 case $as_dir in #(
17461 -*) as_dir=./$as_dir;;
17462 esac
17463 test -d "$as_dir" || eval $as_mkdir_p || {
17464 as_dirs=
17465 while :; do
17466 case $as_dir in #(
Illia Bobyra96d5442023-08-30 16:30:15 +020017467 *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017468 *) as_qdir=$as_dir;;
17469 esac
17470 as_dirs="'$as_qdir' $as_dirs"
17471 as_dir=`$as_dirname -- "$as_dir" ||
17472$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17473 X"$as_dir" : 'X\(//\)[^/]' \| \
17474 X"$as_dir" : 'X\(//\)$' \| \
17475 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Illia Bobyra96d5442023-08-30 16:30:15 +020017476printf "%s\n" X"$as_dir" |
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017477 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17478 s//\1/
17479 q
17480 }
17481 /^X\(\/\/\)[^/].*/{
17482 s//\1/
17483 q
17484 }
17485 /^X\(\/\/\)$/{
17486 s//\1/
17487 q
17488 }
17489 /^X\(\/\).*/{
17490 s//\1/
17491 q
17492 }
17493 s/.*/./; q'`
17494 test -d "$as_dir" && break
17495 done
17496 test -z "$as_dirs" || eval "mkdir $as_dirs"
Bram Moolenaar7db77842014-03-27 17:40:59 +010017497 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017498
17499
17500} # as_fn_mkdir_p
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017501if mkdir -p . 2>/dev/null; then
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017502 as_mkdir_p='mkdir -p "$as_dir"'
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017503else
17504 test -d ./-p && rmdir ./-p
17505 as_mkdir_p=false
17506fi
17507
Bram Moolenaar7db77842014-03-27 17:40:59 +010017508
17509# as_fn_executable_p FILE
17510# -----------------------
17511# Test if FILE is an executable regular file.
17512as_fn_executable_p ()
17513{
17514 test -f "$1" && test -x "$1"
17515} # as_fn_executable_p
17516as_test_x='test -x'
17517as_executable_p=as_fn_executable_p
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017518
17519# Sed expression to map a string onto a valid CPP name.
Christian Brabandt9670f612025-05-07 21:44:33 +020017520as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
17521as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017522
17523# Sed expression to map a string onto a valid variable name.
Christian Brabandt9670f612025-05-07 21:44:33 +020017524as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
17525as_tr_sh="eval sed '$as_sed_sh'" # deprecated
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017526
17527
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017528exec 6>&1
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017529## ----------------------------------- ##
17530## Main body of $CONFIG_STATUS script. ##
17531## ----------------------------------- ##
17532_ASEOF
17533test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017534
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017535cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17536# Save the log message, to keep $0 and so on meaningful, and to
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017537# report actual input values of CONFIG_FILES etc. instead of their
Bram Moolenaar446cb832008-06-24 21:56:24 +000017538# values after options handling.
17539ac_log="
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017540This file was extended by $as_me, which was
Christian Brabandt9670f612025-05-07 21:44:33 +020017541generated by GNU Autoconf 2.72. Invocation command line was
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017542
17543 CONFIG_FILES = $CONFIG_FILES
17544 CONFIG_HEADERS = $CONFIG_HEADERS
17545 CONFIG_LINKS = $CONFIG_LINKS
17546 CONFIG_COMMANDS = $CONFIG_COMMANDS
17547 $ $0 $@
17548
Bram Moolenaar446cb832008-06-24 21:56:24 +000017549on `(hostname || uname -n) 2>/dev/null | sed 1q`
17550"
17551
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017552_ACEOF
17553
Bram Moolenaar32f31b12009-05-21 13:20:59 +000017554case $ac_config_files in *"
17555"*) set x $ac_config_files; shift; ac_config_files=$*;;
17556esac
17557
17558case $ac_config_headers in *"
17559"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17560esac
17561
17562
Bram Moolenaar446cb832008-06-24 21:56:24 +000017563cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017564# Files that config.status was made for.
Bram Moolenaar446cb832008-06-24 21:56:24 +000017565config_files="$ac_config_files"
17566config_headers="$ac_config_headers"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017567
Bram Moolenaar446cb832008-06-24 21:56:24 +000017568_ACEOF
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017569
Bram Moolenaar446cb832008-06-24 21:56:24 +000017570cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017571ac_cs_usage="\
Christian Brabandt9670f612025-05-07 21:44:33 +020017572'$as_me' instantiates files and other configuration actions
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017573from templates according to the current configuration. Unless the files
17574and actions are specified as TAGs, all are instantiated by default.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017575
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017576Usage: $0 [OPTION]... [TAG]...
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017577
17578 -h, --help print this help, then exit
Bram Moolenaar446cb832008-06-24 21:56:24 +000017579 -V, --version print version number and configuration settings, then exit
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017580 --config print configuration, then exit
Bram Moolenaar32f31b12009-05-21 13:20:59 +000017581 -q, --quiet, --silent
17582 do not print progress messages
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017583 -d, --debug don't remove temporary files
17584 --recheck update $as_me by reconfiguring in the same conditions
Bram Moolenaar32f31b12009-05-21 13:20:59 +000017585 --file=FILE[:TEMPLATE]
Bram Moolenaar446cb832008-06-24 21:56:24 +000017586 instantiate the configuration file FILE
Bram Moolenaar32f31b12009-05-21 13:20:59 +000017587 --header=FILE[:TEMPLATE]
Bram Moolenaar446cb832008-06-24 21:56:24 +000017588 instantiate the configuration header FILE
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017589
17590Configuration files:
17591$config_files
17592
17593Configuration headers:
17594$config_headers
17595
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017596Report bugs to the package provider."
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017597
Bram Moolenaar446cb832008-06-24 21:56:24 +000017598_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020017599ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
17600ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
Bram Moolenaar446cb832008-06-24 21:56:24 +000017601cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Illia Bobyra96d5442023-08-30 16:30:15 +020017602ac_cs_config='$ac_cs_config_escaped'
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017603ac_cs_version="\\
17604config.status
Christian Brabandt9670f612025-05-07 21:44:33 +020017605configured by $0, generated by GNU Autoconf 2.72,
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017606 with options \\"\$ac_cs_config\\"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017607
Christian Brabandt9670f612025-05-07 21:44:33 +020017608Copyright (C) 2023 Free Software Foundation, Inc.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017609This config.status script is free software; the Free Software Foundation
17610gives unlimited permission to copy, distribute and modify it."
Bram Moolenaar446cb832008-06-24 21:56:24 +000017611
17612ac_pwd='$ac_pwd'
17613srcdir='$srcdir'
17614AWK='$AWK'
17615test -n "\$AWK" || AWK=awk
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017616_ACEOF
17617
Bram Moolenaar446cb832008-06-24 21:56:24 +000017618cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17619# The default lists apply if the user does not specify any file.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017620ac_need_defaults=:
17621while test $# != 0
17622do
17623 case $1 in
Bram Moolenaar7db77842014-03-27 17:40:59 +010017624 --*=?*)
Bram Moolenaar446cb832008-06-24 21:56:24 +000017625 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17626 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017627 ac_shift=:
17628 ;;
Bram Moolenaar7db77842014-03-27 17:40:59 +010017629 --*=)
17630 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17631 ac_optarg=
17632 ac_shift=:
17633 ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017634 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017635 ac_option=$1
17636 ac_optarg=$2
17637 ac_shift=shift
17638 ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017639 esac
17640
17641 case $ac_option in
17642 # Handling of the options.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017643 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17644 ac_cs_recheck=: ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017645 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Illia Bobyra96d5442023-08-30 16:30:15 +020017646 printf "%s\n" "$ac_cs_version"; exit ;;
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017647 --config | --confi | --conf | --con | --co | --c )
Illia Bobyra96d5442023-08-30 16:30:15 +020017648 printf "%s\n" "$ac_cs_config"; exit ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017649 --debug | --debu | --deb | --de | --d | -d )
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017650 debug=: ;;
17651 --file | --fil | --fi | --f )
17652 $ac_shift
Bram Moolenaar446cb832008-06-24 21:56:24 +000017653 case $ac_optarg in
Illia Bobyra96d5442023-08-30 16:30:15 +020017654 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Bram Moolenaar7db77842014-03-27 17:40:59 +010017655 '') as_fn_error $? "missing file argument" ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017656 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017657 as_fn_append CONFIG_FILES " '$ac_optarg'"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017658 ac_need_defaults=false;;
17659 --header | --heade | --head | --hea )
17660 $ac_shift
Bram Moolenaar446cb832008-06-24 21:56:24 +000017661 case $ac_optarg in
Illia Bobyra96d5442023-08-30 16:30:15 +020017662 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017663 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017664 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017665 ac_need_defaults=false;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017666 --he | --h)
17667 # Conflict between --help and --header
Christian Brabandt9670f612025-05-07 21:44:33 +020017668 as_fn_error $? "ambiguous option: '$1'
17669Try '$0 --help' for more information.";;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017670 --help | --hel | -h )
Illia Bobyra96d5442023-08-30 16:30:15 +020017671 printf "%s\n" "$ac_cs_usage"; exit ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017672 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17673 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17674 ac_cs_silent=: ;;
17675
17676 # This is an error.
Christian Brabandt9670f612025-05-07 21:44:33 +020017677 -*) as_fn_error $? "unrecognized option: '$1'
17678Try '$0 --help' for more information." ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017679
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017680 *) as_fn_append ac_config_targets " $1"
Bram Moolenaar446cb832008-06-24 21:56:24 +000017681 ac_need_defaults=false ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017682
17683 esac
17684 shift
17685done
17686
17687ac_configure_extra_args=
17688
17689if $ac_cs_silent; then
17690 exec 6>/dev/null
17691 ac_configure_extra_args="$ac_configure_extra_args --silent"
17692fi
17693
17694_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +000017695cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017696if \$ac_cs_recheck; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010017697 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Bram Moolenaar446cb832008-06-24 21:56:24 +000017698 shift
Illia Bobyra96d5442023-08-30 16:30:15 +020017699 \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
Bram Moolenaar446cb832008-06-24 21:56:24 +000017700 CONFIG_SHELL='$SHELL'
17701 export CONFIG_SHELL
17702 exec "\$@"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017703fi
17704
17705_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +000017706cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17707exec 5>>auto/config.log
17708{
17709 echo
17710 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17711## Running $as_me. ##
17712_ASBOX
Illia Bobyra96d5442023-08-30 16:30:15 +020017713 printf "%s\n" "$ac_log"
Bram Moolenaar446cb832008-06-24 21:56:24 +000017714} >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017715
Bram Moolenaar446cb832008-06-24 21:56:24 +000017716_ACEOF
17717cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17718_ACEOF
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017719
Bram Moolenaar446cb832008-06-24 21:56:24 +000017720cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017721
Bram Moolenaar446cb832008-06-24 21:56:24 +000017722# Handling of arguments.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017723for ac_config_target in $ac_config_targets
17724do
Bram Moolenaar446cb832008-06-24 21:56:24 +000017725 case $ac_config_target in
17726 "auto/config.h") CONFIG_HEADERS="$CONFIG_HEADERS auto/config.h:config.h.in" ;;
17727 "auto/config.mk") CONFIG_FILES="$CONFIG_FILES auto/config.mk:config.mk.in" ;;
17728
Christian Brabandt9670f612025-05-07 21:44:33 +020017729 *) as_fn_error $? "invalid argument: '$ac_config_target'" "$LINENO" 5;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017730 esac
17731done
17732
Bram Moolenaar446cb832008-06-24 21:56:24 +000017733
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017734# If the user did not use the arguments to specify the items to instantiate,
17735# then the envvar interface is used. Set only those that are not.
17736# We use the long form for the default assignment because of an extremely
17737# bizarre bug on SunOS 4.1.3.
17738if $ac_need_defaults; then
Illia Bobyra96d5442023-08-30 16:30:15 +020017739 test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
17740 test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017741fi
17742
17743# Have a temporary directory for convenience. Make it in the build tree
Bram Moolenaar446cb832008-06-24 21:56:24 +000017744# simply because there is no reason against having it here, and in addition,
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017745# creating and moving files from /tmp can sometimes cause problems.
Bram Moolenaar446cb832008-06-24 21:56:24 +000017746# Hook for its removal unless debugging.
17747# Note that there is a small window in which the directory will not be cleaned:
Christian Brabandt9670f612025-05-07 21:44:33 +020017748# after its creation but before its name has been assigned to '$tmp'.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017749$debug ||
17750{
Bram Moolenaar7db77842014-03-27 17:40:59 +010017751 tmp= ac_tmp=
Bram Moolenaar446cb832008-06-24 21:56:24 +000017752 trap 'exit_status=$?
Bram Moolenaar7db77842014-03-27 17:40:59 +010017753 : "${ac_tmp:=$tmp}"
17754 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Bram Moolenaar446cb832008-06-24 21:56:24 +000017755' 0
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017756 trap 'as_fn_exit 1' 1 2 13 15
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017757}
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017758# Create a (secure) tmp directory for tmp files.
17759
17760{
Bram Moolenaar446cb832008-06-24 21:56:24 +000017761 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Bram Moolenaar7db77842014-03-27 17:40:59 +010017762 test -d "$tmp"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017763} ||
17764{
Bram Moolenaar446cb832008-06-24 21:56:24 +000017765 tmp=./conf$$-$RANDOM
17766 (umask 077 && mkdir "$tmp")
Bram Moolenaar7db77842014-03-27 17:40:59 +010017767} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
17768ac_tmp=$tmp
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017769
Bram Moolenaar446cb832008-06-24 21:56:24 +000017770# Set up the scripts for CONFIG_FILES section.
17771# No need to generate them if there are no CONFIG_FILES.
Christian Brabandt9670f612025-05-07 21:44:33 +020017772# This happens for instance with './config.status config.h'.
Bram Moolenaar446cb832008-06-24 21:56:24 +000017773if test -n "$CONFIG_FILES"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017774
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017775
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017776ac_cr=`echo X | tr X '\015'`
17777# On cygwin, bash can eat \r inside `` if the user requested igncr.
17778# But we know of no other shell where ac_cr would be empty at this
17779# point, so we can use a bashism as a fallback.
17780if test "x$ac_cr" = x; then
17781 eval ac_cr=\$\'\\r\'
17782fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000017783ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17784if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010017785 ac_cs_awk_cr='\\r'
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017786else
Bram Moolenaar446cb832008-06-24 21:56:24 +000017787 ac_cs_awk_cr=$ac_cr
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017788fi
17789
Bram Moolenaar7db77842014-03-27 17:40:59 +010017790echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017791_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000017792
Bram Moolenaar446cb832008-06-24 21:56:24 +000017793
17794{
17795 echo "cat >conf$$subs.awk <<_ACEOF" &&
17796 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17797 echo "_ACEOF"
17798} >conf$$subs.sh ||
Bram Moolenaar7db77842014-03-27 17:40:59 +010017799 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17800ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Bram Moolenaar446cb832008-06-24 21:56:24 +000017801ac_delim='%!_!# '
17802for ac_last_try in false false false false false :; do
17803 . ./conf$$subs.sh ||
Bram Moolenaar7db77842014-03-27 17:40:59 +010017804 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017805
Bram Moolenaar32f31b12009-05-21 13:20:59 +000017806 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17807 if test $ac_delim_n = $ac_delim_num; then
Bram Moolenaar446cb832008-06-24 21:56:24 +000017808 break
17809 elif $ac_last_try; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010017810 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017811 else
17812 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17813 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017814done
Bram Moolenaar446cb832008-06-24 21:56:24 +000017815rm -f conf$$subs.sh
17816
17817cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Bram Moolenaar7db77842014-03-27 17:40:59 +010017818cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017819_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +000017820sed -n '
17821h
17822s/^/S["/; s/!.*/"]=/
17823p
17824g
17825s/^[^!]*!//
17826:repl
17827t repl
17828s/'"$ac_delim"'$//
17829t delim
17830:nl
17831h
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017832s/\(.\{148\}\)..*/\1/
Bram Moolenaar446cb832008-06-24 21:56:24 +000017833t more1
17834s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17835p
17836n
17837b repl
17838:more1
17839s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17840p
17841g
17842s/.\{148\}//
17843t nl
17844:delim
17845h
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017846s/\(.\{148\}\)..*/\1/
Bram Moolenaar446cb832008-06-24 21:56:24 +000017847t more2
17848s/["\\]/\\&/g; s/^/"/; s/$/"/
17849p
17850b
17851:more2
17852s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17853p
17854g
17855s/.\{148\}//
17856t delim
17857' <conf$$subs.awk | sed '
17858/^[^""]/{
17859 N
17860 s/\n//
17861}
17862' >>$CONFIG_STATUS || ac_write_fail=1
17863rm -f conf$$subs.awk
17864cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17865_ACAWK
Bram Moolenaar7db77842014-03-27 17:40:59 +010017866cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Bram Moolenaar446cb832008-06-24 21:56:24 +000017867 for (key in S) S_is_set[key] = 1
17868 FS = ""
Bram Moolenaar071d4272004-06-13 20:20:40 +000017869
Bram Moolenaar446cb832008-06-24 21:56:24 +000017870}
17871{
17872 line = $ 0
17873 nfields = split(line, field, "@")
17874 substed = 0
17875 len = length(field[1])
17876 for (i = 2; i < nfields; i++) {
17877 key = field[i]
17878 keylen = length(key)
17879 if (S_is_set[key]) {
17880 value = S[key]
17881 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17882 len += length(value) + length(field[++i])
17883 substed = 1
17884 } else
17885 len += 1 + keylen
17886 }
Bram Moolenaar071d4272004-06-13 20:20:40 +000017887
Bram Moolenaar446cb832008-06-24 21:56:24 +000017888 print line
17889}
Bram Moolenaar071d4272004-06-13 20:20:40 +000017890
Bram Moolenaar446cb832008-06-24 21:56:24 +000017891_ACAWK
17892_ACEOF
17893cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17894if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17895 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17896else
17897 cat
Bram Moolenaar7db77842014-03-27 17:40:59 +010017898fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
17899 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017900_ACEOF
17901
Bram Moolenaar7db77842014-03-27 17:40:59 +010017902# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17903# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Bram Moolenaar446cb832008-06-24 21:56:24 +000017904# trailing colons and then remove the whole line if VPATH becomes empty
17905# (actually we leave an empty line to preserve line numbers).
17906if test "x$srcdir" = x.; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010017907 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17908h
17909s///
17910s/^/:/
17911s/[ ]*$/:/
17912s/:\$(srcdir):/:/g
17913s/:\${srcdir}:/:/g
17914s/:@srcdir@:/:/g
17915s/^:*//
Bram Moolenaar446cb832008-06-24 21:56:24 +000017916s/:*$//
Bram Moolenaar7db77842014-03-27 17:40:59 +010017917x
17918s/\(=[ ]*\).*/\1/
17919G
17920s/\n//
Bram Moolenaar446cb832008-06-24 21:56:24 +000017921s/^[^=]*=[ ]*$//
17922}'
17923fi
17924
17925cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17926fi # test -n "$CONFIG_FILES"
17927
17928# Set up the scripts for CONFIG_HEADERS section.
17929# No need to generate them if there are no CONFIG_HEADERS.
Christian Brabandt9670f612025-05-07 21:44:33 +020017930# This happens for instance with './config.status Makefile'.
Bram Moolenaar446cb832008-06-24 21:56:24 +000017931if test -n "$CONFIG_HEADERS"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010017932cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Bram Moolenaar446cb832008-06-24 21:56:24 +000017933BEGIN {
17934_ACEOF
17935
Christian Brabandt9670f612025-05-07 21:44:33 +020017936# Transform confdefs.h into an awk script 'defines.awk', embedded as
Bram Moolenaar446cb832008-06-24 21:56:24 +000017937# here-document in config.status, that substitutes the proper values into
17938# config.h.in to produce config.h.
17939
17940# Create a delimiter string that does not exist in confdefs.h, to ease
17941# handling of long lines.
17942ac_delim='%!_!# '
17943for ac_last_try in false false :; do
Bram Moolenaar7db77842014-03-27 17:40:59 +010017944 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17945 if test -z "$ac_tt"; then
Bram Moolenaar446cb832008-06-24 21:56:24 +000017946 break
17947 elif $ac_last_try; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010017948 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017949 else
17950 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17951 fi
17952done
17953
17954# For the awk script, D is an array of macro values keyed by name,
17955# likewise P contains macro parameters if any. Preserve backslash
17956# newline sequences.
17957
17958ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17959sed -n '
17960s/.\{148\}/&'"$ac_delim"'/g
17961t rset
17962:rset
17963s/^[ ]*#[ ]*define[ ][ ]*/ /
17964t def
17965d
17966:def
17967s/\\$//
17968t bsnl
17969s/["\\]/\\&/g
17970s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17971D["\1"]=" \3"/p
17972s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17973d
17974:bsnl
17975s/["\\]/\\&/g
17976s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17977D["\1"]=" \3\\\\\\n"\\/p
17978t cont
17979s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17980t cont
17981d
17982:cont
17983n
17984s/.\{148\}/&'"$ac_delim"'/g
17985t clear
17986:clear
17987s/\\$//
17988t bsnlc
17989s/["\\]/\\&/g; s/^/"/; s/$/"/p
17990d
17991:bsnlc
17992s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17993b cont
17994' <confdefs.h | sed '
17995s/'"$ac_delim"'/"\\\
17996"/g' >>$CONFIG_STATUS || ac_write_fail=1
17997
17998cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17999 for (key in D) D_is_set[key] = 1
18000 FS = ""
18001}
18002/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18003 line = \$ 0
18004 split(line, arg, " ")
18005 if (arg[1] == "#") {
18006 defundef = arg[2]
18007 mac1 = arg[3]
18008 } else {
18009 defundef = substr(arg[1], 2)
18010 mac1 = arg[2]
18011 }
18012 split(mac1, mac2, "(") #)
18013 macro = mac2[1]
Bram Moolenaar32f31b12009-05-21 13:20:59 +000018014 prefix = substr(line, 1, index(line, defundef) - 1)
Bram Moolenaar446cb832008-06-24 21:56:24 +000018015 if (D_is_set[macro]) {
18016 # Preserve the white space surrounding the "#".
Bram Moolenaar446cb832008-06-24 21:56:24 +000018017 print prefix "define", macro P[macro] D[macro]
18018 next
18019 } else {
18020 # Replace #undef with comments. This is necessary, for example,
18021 # in the case of _POSIX_SOURCE, which is predefined and required
18022 # on some systems where configure will not decide to define it.
18023 if (defundef == "undef") {
Bram Moolenaar32f31b12009-05-21 13:20:59 +000018024 print "/*", prefix defundef, macro, "*/"
Bram Moolenaar446cb832008-06-24 21:56:24 +000018025 next
18026 }
18027 }
18028}
18029{ print }
18030_ACAWK
18031_ACEOF
18032cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Bram Moolenaar7db77842014-03-27 17:40:59 +010018033 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000018034fi # test -n "$CONFIG_HEADERS"
18035
18036
18037eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
18038shift
18039for ac_tag
18040do
18041 case $ac_tag in
18042 :[FHLC]) ac_mode=$ac_tag; continue;;
18043 esac
18044 case $ac_mode$ac_tag in
18045 :[FHL]*:*);;
Christian Brabandt9670f612025-05-07 21:44:33 +020018046 :L* | :C*:*) as_fn_error $? "invalid tag '$ac_tag'" "$LINENO" 5;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000018047 :[FH]-) ac_tag=-:-;;
18048 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18049 esac
18050 ac_save_IFS=$IFS
18051 IFS=:
18052 set x $ac_tag
18053 IFS=$ac_save_IFS
18054 shift
18055 ac_file=$1
18056 shift
18057
18058 case $ac_mode in
18059 :L) ac_source=$1;;
18060 :[FH])
18061 ac_file_inputs=
18062 for ac_f
18063 do
18064 case $ac_f in
Bram Moolenaar7db77842014-03-27 17:40:59 +010018065 -) ac_f="$ac_tmp/stdin";;
Bram Moolenaar446cb832008-06-24 21:56:24 +000018066 *) # Look for the file first in the build tree, then in the source tree
18067 # (if the path is not absolute). The absolute path cannot be DOS-style,
Christian Brabandt9670f612025-05-07 21:44:33 +020018068 # because $ac_f cannot contain ':'.
Bram Moolenaar446cb832008-06-24 21:56:24 +000018069 test -f "$ac_f" ||
18070 case $ac_f in
18071 [\\/$]*) false;;
18072 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18073 esac ||
Christian Brabandt9670f612025-05-07 21:44:33 +020018074 as_fn_error 1 "cannot find input file: '$ac_f'" "$LINENO" 5;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000018075 esac
Illia Bobyra96d5442023-08-30 16:30:15 +020018076 case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020018077 as_fn_append ac_file_inputs " '$ac_f'"
Bram Moolenaar446cb832008-06-24 21:56:24 +000018078 done
18079
Christian Brabandt9670f612025-05-07 21:44:33 +020018080 # Let's still pretend it is 'configure' which instantiates (i.e., don't
Bram Moolenaar446cb832008-06-24 21:56:24 +000018081 # use $as_me), people would be surprised to read:
18082 # /* config.h. Generated by config.status. */
18083 configure_input='Generated from '`
Illia Bobyra96d5442023-08-30 16:30:15 +020018084 printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
Bram Moolenaar446cb832008-06-24 21:56:24 +000018085 `' by configure.'
18086 if test x"$ac_file" != x-; then
18087 configure_input="$ac_file. $configure_input"
Illia Bobyra96d5442023-08-30 16:30:15 +020018088 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18089printf "%s\n" "$as_me: creating $ac_file" >&6;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000018090 fi
18091 # Neutralize special characters interpreted by sed in replacement strings.
18092 case $configure_input in #(
18093 *\&* | *\|* | *\\* )
Illia Bobyra96d5442023-08-30 16:30:15 +020018094 ac_sed_conf_input=`printf "%s\n" "$configure_input" |
Bram Moolenaar446cb832008-06-24 21:56:24 +000018095 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18096 *) ac_sed_conf_input=$configure_input;;
18097 esac
18098
18099 case $ac_tag in
Bram Moolenaar7db77842014-03-27 17:40:59 +010018100 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18101 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000018102 esac
18103 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +000018104 esac
18105
Bram Moolenaar446cb832008-06-24 21:56:24 +000018106 ac_dir=`$as_dirname -- "$ac_file" ||
Bram Moolenaar495de9c2005-01-25 22:03:25 +000018107$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18108 X"$ac_file" : 'X\(//\)[^/]' \| \
18109 X"$ac_file" : 'X\(//\)$' \| \
Bram Moolenaar446cb832008-06-24 21:56:24 +000018110 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Illia Bobyra96d5442023-08-30 16:30:15 +020018111printf "%s\n" X"$ac_file" |
Bram Moolenaar446cb832008-06-24 21:56:24 +000018112 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18113 s//\1/
18114 q
18115 }
18116 /^X\(\/\/\)[^/].*/{
18117 s//\1/
18118 q
18119 }
18120 /^X\(\/\/\)$/{
18121 s//\1/
18122 q
18123 }
18124 /^X\(\/\).*/{
18125 s//\1/
18126 q
18127 }
18128 s/.*/./; q'`
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020018129 as_dir="$ac_dir"; as_fn_mkdir_p
Bram Moolenaar446cb832008-06-24 21:56:24 +000018130 ac_builddir=.
Bram Moolenaar071d4272004-06-13 20:20:40 +000018131
Bram Moolenaar446cb832008-06-24 21:56:24 +000018132case "$ac_dir" in
18133.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18134*)
Illia Bobyra96d5442023-08-30 16:30:15 +020018135 ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
Bram Moolenaar446cb832008-06-24 21:56:24 +000018136 # A ".." for each directory in $ac_dir_suffix.
Illia Bobyra96d5442023-08-30 16:30:15 +020018137 ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Bram Moolenaar446cb832008-06-24 21:56:24 +000018138 case $ac_top_builddir_sub in
18139 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18140 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18141 esac ;;
18142esac
18143ac_abs_top_builddir=$ac_pwd
18144ac_abs_builddir=$ac_pwd$ac_dir_suffix
18145# for backward compatibility:
18146ac_top_builddir=$ac_top_build_prefix
18147
18148case $srcdir in
18149 .) # We are building in place.
18150 ac_srcdir=.
18151 ac_top_srcdir=$ac_top_builddir_sub
18152 ac_abs_top_srcdir=$ac_pwd ;;
18153 [\\/]* | ?:[\\/]* ) # Absolute name.
18154 ac_srcdir=$srcdir$ac_dir_suffix;
18155 ac_top_srcdir=$srcdir
18156 ac_abs_top_srcdir=$srcdir ;;
18157 *) # Relative name.
18158 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18159 ac_top_srcdir=$ac_top_build_prefix$srcdir
18160 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
18161esac
18162ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
18163
18164
18165 case $ac_mode in
18166 :F)
18167 #
18168 # CONFIG_FILE
18169 #
18170
Bram Moolenaar495de9c2005-01-25 22:03:25 +000018171_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000018172
Bram Moolenaar446cb832008-06-24 21:56:24 +000018173cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18174# If the template does not know about datarootdir, expand it.
18175# FIXME: This hack should be removed a few years after 2.60.
18176ac_datarootdir_hack=; ac_datarootdir_seen=
Bram Moolenaar446cb832008-06-24 21:56:24 +000018177ac_sed_dataroot='
18178/datarootdir/ {
18179 p
18180 q
18181}
18182/@datadir@/p
18183/@docdir@/p
18184/@infodir@/p
18185/@localedir@/p
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020018186/@mandir@/p'
Bram Moolenaar446cb832008-06-24 21:56:24 +000018187case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
18188*datarootdir*) ac_datarootdir_seen=yes;;
18189*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Illia Bobyra96d5442023-08-30 16:30:15 +020018190 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18191printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000018192_ACEOF
18193cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18194 ac_datarootdir_hack='
18195 s&@datadir@&$datadir&g
18196 s&@docdir@&$docdir&g
18197 s&@infodir@&$infodir&g
18198 s&@localedir@&$localedir&g
18199 s&@mandir@&$mandir&g
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020018200 s&\\\${datarootdir}&$datarootdir&g' ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000018201esac
18202_ACEOF
18203
Christian Brabandt9670f612025-05-07 21:44:33 +020018204# Neutralize VPATH when '$srcdir' = '.'.
Bram Moolenaar446cb832008-06-24 21:56:24 +000018205# Shell code in configure.ac might set extrasub.
18206# FIXME: do we really want to maintain this feature?
18207cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18208ac_sed_extra="$ac_vpsub
18209$extrasub
18210_ACEOF
18211cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18212:t
18213/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18214s|@configure_input@|$ac_sed_conf_input|;t t
18215s&@top_builddir@&$ac_top_builddir_sub&;t t
18216s&@top_build_prefix@&$ac_top_build_prefix&;t t
18217s&@srcdir@&$ac_srcdir&;t t
18218s&@abs_srcdir@&$ac_abs_srcdir&;t t
18219s&@top_srcdir@&$ac_top_srcdir&;t t
18220s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18221s&@builddir@&$ac_builddir&;t t
18222s&@abs_builddir@&$ac_abs_builddir&;t t
18223s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18224$ac_datarootdir_hack
18225"
Bram Moolenaar7db77842014-03-27 17:40:59 +010018226eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18227 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000018228
18229test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Bram Moolenaar7db77842014-03-27 17:40:59 +010018230 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18231 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18232 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Christian Brabandt9670f612025-05-07 21:44:33 +020018233 { 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 +010018234which seems to be undefined. Please make sure it is defined" >&5
Christian Brabandt9670f612025-05-07 21:44:33 +020018235printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable 'datarootdir'
Bram Moolenaar7db77842014-03-27 17:40:59 +010018236which seems to be undefined. Please make sure it is defined" >&2;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000018237
Bram Moolenaar7db77842014-03-27 17:40:59 +010018238 rm -f "$ac_tmp/stdin"
Bram Moolenaar446cb832008-06-24 21:56:24 +000018239 case $ac_file in
Bram Moolenaar7db77842014-03-27 17:40:59 +010018240 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18241 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Bram Moolenaar446cb832008-06-24 21:56:24 +000018242 esac \
Bram Moolenaar7db77842014-03-27 17:40:59 +010018243 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000018244 ;;
18245 :H)
18246 #
18247 # CONFIG_HEADER
18248 #
18249 if test x"$ac_file" != x-; then
18250 {
Illia Bobyra96d5442023-08-30 16:30:15 +020018251 printf "%s\n" "/* $configure_input */" >&1 \
Bram Moolenaar7db77842014-03-27 17:40:59 +010018252 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18253 } >"$ac_tmp/config.h" \
18254 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
18255 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Illia Bobyra96d5442023-08-30 16:30:15 +020018256 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18257printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000018258 else
18259 rm -f "$ac_file"
Bram Moolenaar7db77842014-03-27 17:40:59 +010018260 mv "$ac_tmp/config.h" "$ac_file" \
18261 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000018262 fi
18263 else
Illia Bobyra96d5442023-08-30 16:30:15 +020018264 printf "%s\n" "/* $configure_input */" >&1 \
Bram Moolenaar7db77842014-03-27 17:40:59 +010018265 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
18266 || as_fn_error $? "could not create -" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000018267 fi
18268 ;;
18269
18270
18271 esac
18272
18273done # for ac_tag
18274
Bram Moolenaar071d4272004-06-13 20:20:40 +000018275
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020018276as_fn_exit 0
Bram Moolenaar495de9c2005-01-25 22:03:25 +000018277_ACEOF
Bram Moolenaar495de9c2005-01-25 22:03:25 +000018278ac_clean_files=$ac_clean_files_save
18279
Bram Moolenaar446cb832008-06-24 21:56:24 +000018280test $ac_write_fail = 0 ||
Bram Moolenaar7db77842014-03-27 17:40:59 +010018281 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000018282
Bram Moolenaar495de9c2005-01-25 22:03:25 +000018283
18284# configure is writing to config.log, and then calls config.status.
18285# config.status does its own redirection, appending to config.log.
18286# Unfortunately, on DOS this fails, as config.log is still kept open
18287# by configure, so config.status won't be able to write to it; its
18288# output is simply discarded. So we exec the FD to /dev/null,
18289# effectively closing config.log, so it can be properly (re)opened and
18290# appended to by config.status. When coming back to configure, we
18291# need to make the FD available again.
18292if test "$no_create" != yes; then
18293 ac_cs_success=:
18294 ac_config_status_args=
18295 test "$silent" = yes &&
18296 ac_config_status_args="$ac_config_status_args --quiet"
18297 exec 5>/dev/null
18298 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Bram Moolenaarc7453f52006-02-10 23:20:28 +000018299 exec 5>>auto/config.log
Bram Moolenaar495de9c2005-01-25 22:03:25 +000018300 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18301 # would make configure fail if this is the last instruction.
Bram Moolenaar7db77842014-03-27 17:40:59 +010018302 $ac_cs_success || as_fn_exit 1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000018303fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000018304if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
Illia Bobyra96d5442023-08-30 16:30:15 +020018305 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18306printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000018307fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000018308
18309
Illia Bobyra96d5442023-08-30 16:30:15 +020018310