blob: 54c1aa8159944f8be4fa92f0bb4f276726f9c3d6 [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001#! /bin/sh
Bram Moolenaar071d4272004-06-13 20:20:40 +00002# Guess values for system-dependent variables and create Makefiles.
Illia Bobyra96d5442023-08-30 16:30:15 +02003# Generated by GNU Autoconf 2.71.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004#
Bram Moolenaar071d4272004-06-13 20:20:40 +00005#
Illia Bobyra96d5442023-08-30 16:30:15 +02006# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,
7# Inc.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008#
9#
Bram Moolenaar071d4272004-06-13 20:20:40 +000010# This configure script is free software; the Free Software Foundation
11# gives unlimited permission to copy, distribute and modify it.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012## -------------------- ##
13## M4sh Initialization. ##
14## -------------------- ##
Bram Moolenaar071d4272004-06-13 20:20:40 +000015
Bram Moolenaar446cb832008-06-24 21:56:24 +000016# Be more Bourne compatible
17DUALCASE=1; export DUALCASE # for MKS sh
Illia Bobyra96d5442023-08-30 16:30:15 +020018as_nop=:
19if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
20then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000021 emulate sh
22 NULLCMD=:
Bram Moolenaar446cb832008-06-24 21:56:24 +000023 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Bram Moolenaar495de9c2005-01-25 22:03:25 +000024 # is contrary to our usage. Disable this feature.
25 alias -g '${1+"$@"}'='"$@"'
Bram Moolenaar446cb832008-06-24 21:56:24 +000026 setopt NO_GLOB_SUBST
Illia Bobyra96d5442023-08-30 16:30:15 +020027else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020028 case `(set -o) 2>/dev/null` in #(
29 *posix*) :
30 set -o posix ;; #(
31 *) :
32 ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000033esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000034fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000035
36
Illia Bobyra96d5442023-08-30 16:30:15 +020037
38# Reset variables that may have inherited troublesome values from
39# the environment.
40
41# IFS needs to be set, to space, tab, and newline, in precisely that order.
42# (If _AS_PATH_WALK were called with IFS unset, it would have the
43# side effect of setting IFS to empty, thus disabling word splitting.)
44# Quoting is to prevent editors from complaining about space-tab.
Bram Moolenaar446cb832008-06-24 21:56:24 +000045as_nl='
46'
47export as_nl
Illia Bobyra96d5442023-08-30 16:30:15 +020048IFS=" "" $as_nl"
49
50PS1='$ '
51PS2='> '
52PS4='+ '
53
54# Ensure predictable behavior from utilities with locale-dependent output.
55LC_ALL=C
56export LC_ALL
57LANGUAGE=C
58export LANGUAGE
59
60# We cannot yet rely on "unset" to work, but we need these variables
61# to be unset--not just set to an empty or harmless value--now, to
62# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
63# also avoids known problems related to "unset" and subshell syntax
64# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
65for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
66do eval test \${$as_var+y} \
67 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
68done
69
70# Ensure that fds 0, 1, and 2 are open.
71if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
72if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
73if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000074
75# The user is always right.
Illia Bobyra96d5442023-08-30 16:30:15 +020076if ${PATH_SEPARATOR+false} :; then
Bram Moolenaar446cb832008-06-24 21:56:24 +000077 PATH_SEPARATOR=:
78 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
79 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
80 PATH_SEPARATOR=';'
81 }
82fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000083
Bram Moolenaar495de9c2005-01-25 22:03:25 +000084
Bram Moolenaar446cb832008-06-24 21:56:24 +000085# Find who we are. Look in the path if we contain no directory separator.
Bram Moolenaar7db77842014-03-27 17:40:59 +010086as_myself=
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020087case $0 in #((
Bram Moolenaar446cb832008-06-24 21:56:24 +000088 *[\\/]* ) as_myself=$0 ;;
89 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
90for as_dir in $PATH
91do
92 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +020093 case $as_dir in #(((
94 '') as_dir=./ ;;
95 */) ;;
96 *) as_dir=$as_dir/ ;;
97 esac
98 test -r "$as_dir$0" && as_myself=$as_dir$0 && break
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020099 done
Bram Moolenaar446cb832008-06-24 21:56:24 +0000100IFS=$as_save_IFS
101
102 ;;
103esac
104# We did not find ourselves, most probably we were run as `sh COMMAND'
105# in which case we are not to be found in the path.
106if test "x$as_myself" = x; then
107 as_myself=$0
108fi
109if test ! -f "$as_myself"; then
Illia Bobyra96d5442023-08-30 16:30:15 +0200110 printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200111 exit 1
Bram Moolenaar446cb832008-06-24 21:56:24 +0000112fi
113
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200114
Bram Moolenaar7db77842014-03-27 17:40:59 +0100115# Use a proper internal environment variable to ensure we don't fall
116 # into an infinite loop, continuously re-executing ourselves.
117 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
118 _as_can_reexec=no; export _as_can_reexec;
119 # We cannot yet assume a decent shell, so we have to provide a
120# neutralization value for shells without unset; and this also
121# works around shells that cannot unset nonexistent variables.
122# Preserve -v and -x to the replacement shell.
123BASH_ENV=/dev/null
124ENV=/dev/null
125(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
126case $- in # ((((
127 *v*x* | *x*v* ) as_opts=-vx ;;
128 *v* ) as_opts=-v ;;
129 *x* ) as_opts=-x ;;
130 * ) as_opts= ;;
131esac
132exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
133# Admittedly, this is quite paranoid, since all the known shells bail
134# out after a failed `exec'.
Illia Bobyra96d5442023-08-30 16:30:15 +0200135printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
136exit 255
Bram Moolenaar7db77842014-03-27 17:40:59 +0100137 fi
138 # We don't want this to propagate to other subprocesses.
139 { _as_can_reexec=; unset _as_can_reexec;}
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200140if test "x$CONFIG_SHELL" = x; then
Illia Bobyra96d5442023-08-30 16:30:15 +0200141 as_bourne_compatible="as_nop=:
142if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
143then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200144 emulate sh
145 NULLCMD=:
146 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
147 # is contrary to our usage. Disable this feature.
148 alias -g '\${1+\"\$@\"}'='\"\$@\"'
149 setopt NO_GLOB_SUBST
Illia Bobyra96d5442023-08-30 16:30:15 +0200150else \$as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200151 case \`(set -o) 2>/dev/null\` in #(
152 *posix*) :
153 set -o posix ;; #(
154 *) :
155 ;;
156esac
157fi
158"
159 as_required="as_fn_return () { (exit \$1); }
160as_fn_success () { as_fn_return 0; }
161as_fn_failure () { as_fn_return 1; }
162as_fn_ret_success () { return 0; }
163as_fn_ret_failure () { return 1; }
164
165exitcode=0
166as_fn_success || { exitcode=1; echo as_fn_success failed.; }
167as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
168as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
169as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
Illia Bobyra96d5442023-08-30 16:30:15 +0200170if ( set x; as_fn_ret_success y && test x = \"\$1\" )
171then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200172
Illia Bobyra96d5442023-08-30 16:30:15 +0200173else \$as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200174 exitcode=1; echo positional parameters were not saved.
175fi
Bram Moolenaar7db77842014-03-27 17:40:59 +0100176test x\$exitcode = x0 || exit 1
Illia Bobyra96d5442023-08-30 16:30:15 +0200177blah=\$(echo \$(echo blah))
178test x\"\$blah\" = xblah || exit 1
Bram Moolenaar7db77842014-03-27 17:40:59 +0100179test -x / || exit 1"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200180 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
181 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
182 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
183 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
184test \$(( 1 + 1 )) = 2 || exit 1"
Illia Bobyra96d5442023-08-30 16:30:15 +0200185 if (eval "$as_required") 2>/dev/null
186then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200187 as_have_required=yes
Illia Bobyra96d5442023-08-30 16:30:15 +0200188else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200189 as_have_required=no
190fi
Illia Bobyra96d5442023-08-30 16:30:15 +0200191 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null
192then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200193
Illia Bobyra96d5442023-08-30 16:30:15 +0200194else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200195 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
196as_found=false
197for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
198do
199 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +0200200 case $as_dir in #(((
201 '') as_dir=./ ;;
202 */) ;;
203 *) as_dir=$as_dir/ ;;
204 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200205 as_found=:
206 case $as_dir in #(
207 /*)
208 for as_base in sh bash ksh sh5; do
209 # Try only shells that exist, to save several forks.
Illia Bobyra96d5442023-08-30 16:30:15 +0200210 as_shell=$as_dir$as_base
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200211 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
Illia Bobyra96d5442023-08-30 16:30:15 +0200212 as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null
213then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200214 CONFIG_SHELL=$as_shell as_have_required=yes
Illia Bobyra96d5442023-08-30 16:30:15 +0200215 if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null
216then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200217 break 2
218fi
219fi
220 done;;
221 esac
222 as_found=false
223done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200224IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +0200225if $as_found
226then :
227
228else $as_nop
229 if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
230 as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null
231then :
232 CONFIG_SHELL=$SHELL as_have_required=yes
233fi
234fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200235
236
Illia Bobyra96d5442023-08-30 16:30:15 +0200237 if test "x$CONFIG_SHELL" != x
238then :
Bram Moolenaar7db77842014-03-27 17:40:59 +0100239 export CONFIG_SHELL
240 # We cannot yet assume a decent shell, so we have to provide a
241# neutralization value for shells without unset; and this also
242# works around shells that cannot unset nonexistent variables.
243# Preserve -v and -x to the replacement shell.
244BASH_ENV=/dev/null
245ENV=/dev/null
246(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
247case $- in # ((((
248 *v*x* | *x*v* ) as_opts=-vx ;;
249 *v* ) as_opts=-v ;;
250 *x* ) as_opts=-x ;;
251 * ) as_opts= ;;
252esac
253exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
254# Admittedly, this is quite paranoid, since all the known shells bail
255# out after a failed `exec'.
Illia Bobyra96d5442023-08-30 16:30:15 +0200256printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
Bram Moolenaar7db77842014-03-27 17:40:59 +0100257exit 255
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200258fi
259
Illia Bobyra96d5442023-08-30 16:30:15 +0200260 if test x$as_have_required = xno
261then :
262 printf "%s\n" "$0: This script requires a shell more modern than all"
263 printf "%s\n" "$0: the shells that I found on your system."
264 if test ${ZSH_VERSION+y} ; then
265 printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should"
266 printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later."
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200267 else
Illia Bobyra96d5442023-08-30 16:30:15 +0200268 printf "%s\n" "$0: Please tell bug-autoconf@gnu.org about your system,
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200269$0: including any error possibly output before this
270$0: message. Then install a modern shell, or manually run
271$0: the script under such a shell if you do have one."
272 fi
273 exit 1
274fi
275fi
276fi
277SHELL=${CONFIG_SHELL-/bin/sh}
278export SHELL
279# Unset more variables known to interfere with behavior of common tools.
280CLICOLOR_FORCE= GREP_OPTIONS=
281unset CLICOLOR_FORCE GREP_OPTIONS
282
283## --------------------- ##
284## M4sh Shell Functions. ##
285## --------------------- ##
286# as_fn_unset VAR
287# ---------------
288# Portably unset VAR.
289as_fn_unset ()
290{
291 { eval $1=; unset $1;}
292}
293as_unset=as_fn_unset
294
Illia Bobyra96d5442023-08-30 16:30:15 +0200295
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200296# as_fn_set_status STATUS
297# -----------------------
298# Set $? to STATUS, without forking.
299as_fn_set_status ()
300{
301 return $1
302} # as_fn_set_status
303
304# as_fn_exit STATUS
305# -----------------
306# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
307as_fn_exit ()
308{
309 set +e
310 as_fn_set_status $1
311 exit $1
312} # as_fn_exit
Illia Bobyra96d5442023-08-30 16:30:15 +0200313# as_fn_nop
314# ---------
315# Do nothing but, unlike ":", preserve the value of $?.
316as_fn_nop ()
317{
318 return $?
319}
320as_nop=as_fn_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200321
322# as_fn_mkdir_p
323# -------------
324# Create "$as_dir" as a directory, including parents if necessary.
325as_fn_mkdir_p ()
326{
327
328 case $as_dir in #(
329 -*) as_dir=./$as_dir;;
330 esac
331 test -d "$as_dir" || eval $as_mkdir_p || {
332 as_dirs=
333 while :; do
334 case $as_dir in #(
Illia Bobyra96d5442023-08-30 16:30:15 +0200335 *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200336 *) as_qdir=$as_dir;;
337 esac
338 as_dirs="'$as_qdir' $as_dirs"
339 as_dir=`$as_dirname -- "$as_dir" ||
340$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
341 X"$as_dir" : 'X\(//\)[^/]' \| \
342 X"$as_dir" : 'X\(//\)$' \| \
343 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Illia Bobyra96d5442023-08-30 16:30:15 +0200344printf "%s\n" X"$as_dir" |
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200345 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
346 s//\1/
347 q
348 }
349 /^X\(\/\/\)[^/].*/{
350 s//\1/
351 q
352 }
353 /^X\(\/\/\)$/{
354 s//\1/
355 q
356 }
357 /^X\(\/\).*/{
358 s//\1/
359 q
360 }
361 s/.*/./; q'`
362 test -d "$as_dir" && break
363 done
364 test -z "$as_dirs" || eval "mkdir $as_dirs"
Bram Moolenaar7db77842014-03-27 17:40:59 +0100365 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200366
367
368} # as_fn_mkdir_p
Bram Moolenaar7db77842014-03-27 17:40:59 +0100369
370# as_fn_executable_p FILE
371# -----------------------
372# Test if FILE is an executable regular file.
373as_fn_executable_p ()
374{
375 test -f "$1" && test -x "$1"
376} # as_fn_executable_p
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200377# as_fn_append VAR VALUE
378# ----------------------
379# Append the text in VALUE to the end of the definition contained in VAR. Take
380# advantage of any shell optimizations that allow amortized linear growth over
381# repeated appends, instead of the typical quadratic growth present in naive
382# implementations.
Illia Bobyra96d5442023-08-30 16:30:15 +0200383if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
384then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200385 eval 'as_fn_append ()
386 {
387 eval $1+=\$2
388 }'
Illia Bobyra96d5442023-08-30 16:30:15 +0200389else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200390 as_fn_append ()
391 {
392 eval $1=\$$1\$2
393 }
394fi # as_fn_append
395
396# as_fn_arith ARG...
397# ------------------
398# Perform arithmetic evaluation on the ARGs, and store the result in the
399# global $as_val. Take advantage of shells that can avoid forks. The arguments
400# must be portable across $(()) and expr.
Illia Bobyra96d5442023-08-30 16:30:15 +0200401if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
402then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200403 eval 'as_fn_arith ()
404 {
405 as_val=$(( $* ))
406 }'
Illia Bobyra96d5442023-08-30 16:30:15 +0200407else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200408 as_fn_arith ()
409 {
410 as_val=`expr "$@" || test $? -eq 1`
411 }
412fi # as_fn_arith
413
Illia Bobyra96d5442023-08-30 16:30:15 +0200414# as_fn_nop
415# ---------
416# Do nothing but, unlike ":", preserve the value of $?.
417as_fn_nop ()
418{
419 return $?
420}
421as_nop=as_fn_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200422
Bram Moolenaar7db77842014-03-27 17:40:59 +0100423# as_fn_error STATUS ERROR [LINENO LOG_FD]
424# ----------------------------------------
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200425# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
426# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Bram Moolenaar7db77842014-03-27 17:40:59 +0100427# script with STATUS, using 1 if that was 0.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200428as_fn_error ()
429{
Bram Moolenaar7db77842014-03-27 17:40:59 +0100430 as_status=$1; test $as_status -eq 0 && as_status=1
431 if test "$4"; then
432 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +0200433 printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200434 fi
Illia Bobyra96d5442023-08-30 16:30:15 +0200435 printf "%s\n" "$as_me: error: $2" >&2
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200436 as_fn_exit $as_status
437} # as_fn_error
438
Bram Moolenaar446cb832008-06-24 21:56:24 +0000439if expr a : '\(a\)' >/dev/null 2>&1 &&
440 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000441 as_expr=expr
442else
443 as_expr=false
444fi
445
Bram Moolenaar446cb832008-06-24 21:56:24 +0000446if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000447 as_basename=basename
448else
449 as_basename=false
450fi
451
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200452if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
453 as_dirname=dirname
454else
455 as_dirname=false
456fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000457
Bram Moolenaar446cb832008-06-24 21:56:24 +0000458as_me=`$as_basename -- "$0" ||
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000459$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
460 X"$0" : 'X\(//\)$' \| \
Bram Moolenaar446cb832008-06-24 21:56:24 +0000461 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Illia Bobyra96d5442023-08-30 16:30:15 +0200462printf "%s\n" X/"$0" |
Bram Moolenaar446cb832008-06-24 21:56:24 +0000463 sed '/^.*\/\([^/][^/]*\)\/*$/{
464 s//\1/
465 q
466 }
467 /^X\/\(\/\/\)$/{
468 s//\1/
469 q
470 }
471 /^X\/\(\/\).*/{
472 s//\1/
473 q
474 }
475 s/.*/./; q'`
476
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200477# Avoid depending upon Character Ranges.
478as_cr_letters='abcdefghijklmnopqrstuvwxyz'
479as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
480as_cr_Letters=$as_cr_letters$as_cr_LETTERS
481as_cr_digits='0123456789'
482as_cr_alnum=$as_cr_Letters$as_cr_digits
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000483
484
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200485 as_lineno_1=$LINENO as_lineno_1a=$LINENO
486 as_lineno_2=$LINENO as_lineno_2a=$LINENO
487 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
488 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
489 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Bram Moolenaar446cb832008-06-24 21:56:24 +0000490 sed -n '
491 p
492 /[$]LINENO/=
493 ' <$as_myself |
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000494 sed '
Bram Moolenaar446cb832008-06-24 21:56:24 +0000495 s/[$]LINENO.*/&-/
496 t lineno
497 b
498 :lineno
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000499 N
Bram Moolenaar446cb832008-06-24 21:56:24 +0000500 :loop
501 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000502 t loop
Bram Moolenaar446cb832008-06-24 21:56:24 +0000503 s/-\n.*//
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000504 ' >$as_me.lineno &&
Bram Moolenaar446cb832008-06-24 21:56:24 +0000505 chmod +x "$as_me.lineno" ||
Illia Bobyra96d5442023-08-30 16:30:15 +0200506 { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000507
Bram Moolenaar7db77842014-03-27 17:40:59 +0100508 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
509 # already done that, so ensure we don't try to do so again and fall
510 # in an infinite loop. This has already happened in practice.
511 _as_can_reexec=no; export _as_can_reexec
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000512 # Don't try to exec as it changes $[0], causing all sort of problems
513 # (the dirname of $[0] is not the place where we might find the
Bram Moolenaar446cb832008-06-24 21:56:24 +0000514 # original and so on. Autoconf is especially sensitive to this).
515 . "./$as_me.lineno"
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000516 # Exit status is that of the last command.
517 exit
518}
519
Illia Bobyra96d5442023-08-30 16:30:15 +0200520
521# Determine whether it's possible to make 'echo' print without a newline.
522# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
523# for compatibility with existing Makefiles.
Bram Moolenaar446cb832008-06-24 21:56:24 +0000524ECHO_C= ECHO_N= ECHO_T=
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200525case `echo -n x` in #(((((
Bram Moolenaar446cb832008-06-24 21:56:24 +0000526-n*)
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200527 case `echo 'xy\c'` in
Bram Moolenaar446cb832008-06-24 21:56:24 +0000528 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200529 xy) ECHO_C='\c';;
530 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
531 ECHO_T=' ';;
Bram Moolenaar446cb832008-06-24 21:56:24 +0000532 esac;;
533*)
534 ECHO_N='-n';;
535esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000536
Illia Bobyra96d5442023-08-30 16:30:15 +0200537# For backward compatibility with old third-party macros, we provide
538# the shell variables $as_echo and $as_echo_n. New code should use
539# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
540as_echo='printf %s\n'
541as_echo_n='printf %s'
542
543
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000544rm -f conf$$ conf$$.exe conf$$.file
Bram Moolenaar446cb832008-06-24 21:56:24 +0000545if test -d conf$$.dir; then
546 rm -f conf$$.dir/conf$$.file
547else
548 rm -f conf$$.dir
549 mkdir conf$$.dir 2>/dev/null
550fi
551if (echo >conf$$.file) 2>/dev/null; then
552 if ln -s conf$$.file conf$$ 2>/dev/null; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000553 as_ln_s='ln -s'
Bram Moolenaar446cb832008-06-24 21:56:24 +0000554 # ... but there are two gotchas:
555 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
556 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Bram Moolenaar7db77842014-03-27 17:40:59 +0100557 # In both cases, we have to default to `cp -pR'.
Bram Moolenaar446cb832008-06-24 21:56:24 +0000558 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Bram Moolenaar7db77842014-03-27 17:40:59 +0100559 as_ln_s='cp -pR'
Bram Moolenaar446cb832008-06-24 21:56:24 +0000560 elif ln conf$$.file conf$$ 2>/dev/null; then
561 as_ln_s=ln
562 else
Bram Moolenaar7db77842014-03-27 17:40:59 +0100563 as_ln_s='cp -pR'
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000564 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000565else
Bram Moolenaar7db77842014-03-27 17:40:59 +0100566 as_ln_s='cp -pR'
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000567fi
Bram Moolenaar446cb832008-06-24 21:56:24 +0000568rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
569rmdir conf$$.dir 2>/dev/null
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000570
571if mkdir -p . 2>/dev/null; then
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200572 as_mkdir_p='mkdir -p "$as_dir"'
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000573else
574 test -d ./-p && rmdir ./-p
575 as_mkdir_p=false
576fi
577
Bram Moolenaar7db77842014-03-27 17:40:59 +0100578as_test_x='test -x'
579as_executable_p=as_fn_executable_p
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000580
581# Sed expression to map a string onto a valid CPP name.
582as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
583
584# Sed expression to map a string onto a valid variable name.
585as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
586
587
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200588test -n "$DJDIR" || exec 7<&0 </dev/null
589exec 6>&1
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000590
591# Name of the host.
Bram Moolenaar7db77842014-03-27 17:40:59 +0100592# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000593# so uname gets run too.
594ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
595
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000596#
597# Initializations.
598#
Bram Moolenaar071d4272004-06-13 20:20:40 +0000599ac_default_prefix=/usr/local
Bram Moolenaar446cb832008-06-24 21:56:24 +0000600ac_clean_files=
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000601ac_config_libobj_dir=.
Bram Moolenaar446cb832008-06-24 21:56:24 +0000602LIBOBJS=
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000603cross_compiling=no
604subdirs=
605MFLAGS=
606MAKEFLAGS=
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000607
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000608# Identity of this package.
Illia Bobyra96d5442023-08-30 16:30:15 +0200609PACKAGE_NAME=''
610PACKAGE_TARNAME=''
611PACKAGE_VERSION=''
612PACKAGE_STRING=''
613PACKAGE_BUGREPORT=''
614PACKAGE_URL=''
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000615
616ac_unique_file="vim.h"
617# Factoring default headers for most tests.
618ac_includes_default="\
Illia Bobyra96d5442023-08-30 16:30:15 +0200619#include <stddef.h>
620#ifdef HAVE_STDIO_H
621# include <stdio.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000622#endif
Illia Bobyra96d5442023-08-30 16:30:15 +0200623#ifdef HAVE_STDLIB_H
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000624# include <stdlib.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000625#endif
Bram Moolenaar446cb832008-06-24 21:56:24 +0000626#ifdef HAVE_STRING_H
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000627# include <string.h>
628#endif
Bram Moolenaar446cb832008-06-24 21:56:24 +0000629#ifdef HAVE_INTTYPES_H
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000630# include <inttypes.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000631#endif
Bram Moolenaar446cb832008-06-24 21:56:24 +0000632#ifdef HAVE_STDINT_H
633# include <stdint.h>
634#endif
Illia Bobyra96d5442023-08-30 16:30:15 +0200635#ifdef HAVE_STRINGS_H
636# include <strings.h>
637#endif
638#ifdef HAVE_SYS_TYPES_H
639# include <sys/types.h>
640#endif
641#ifdef HAVE_SYS_STAT_H
642# include <sys/stat.h>
643#endif
Bram Moolenaar446cb832008-06-24 21:56:24 +0000644#ifdef HAVE_UNISTD_H
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000645# include <unistd.h>
646#endif"
647
Illia Bobyra96d5442023-08-30 16:30:15 +0200648ac_header_c_list=
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000649ac_subst_vars='LTLIBOBJS
Bram Moolenaar446cb832008-06-24 21:56:24 +0000650LIBOBJS
Bram Moolenaar22e193d2010-11-03 22:32:24 +0100651LINK_AS_NEEDED
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000652DEPEND_CFLAGS_FILTER
Bram Moolenaar26096cc2019-04-11 15:25:40 +0200653MSGFMT_DESKTOP
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000654MAKEMO
655MSGFMT
656INSTALL_TOOL_LANGS
657INSTALL_LANGS
658TAGPRG
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000659GUI_X_LIBS
660GUITYPE
661GUI_LIB_LOC
662GUI_INC_LOC
663NARROW_PROTO
664MOTIF_LIBNAME
Bram Moolenaar36e294c2015-12-29 18:55:46 +0100665GRESOURCE_OBJ
666GRESOURCE_SRC
Bram Moolenaar4adfaab2016-04-21 18:20:11 +0200667UPDATE_DESKTOP_DATABASE
668GTK_UPDATE_ICON_CACHE
Bram Moolenaar36e294c2015-12-29 18:55:46 +0100669GLIB_COMPILE_RESOURCES
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000670GNOME_INCLUDEDIR
671GNOME_LIBDIR
672GNOME_LIBS
673GTK_LIBNAME
674GTK_LIBS
675GTK_CFLAGS
676PKG_CONFIG
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000677X_LIB
678X_EXTRA_LIBS
679X_LIBS
680X_PRE_LIBS
681X_CFLAGS
682XMKMF
683xmkmfpath
Bram Moolenaar823edd12019-10-23 22:35:36 +0200684TERM_TEST
Bram Moolenaare4f25e42017-07-07 11:54:15 +0200685TERM_OBJ
686TERM_SRC
Bram Moolenaare0874f82016-01-24 20:36:41 +0100687CHANNEL_OBJ
688CHANNEL_SRC
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000689NETBEANS_OBJ
690NETBEANS_SRC
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000691RUBY_LIBS
ichizok8bb3fe42021-12-28 15:51:45 +0000692RUBY_CFLAGS_EXTRA
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000693RUBY_CFLAGS
694RUBY_PRO
695RUBY_OBJ
696RUBY_SRC
697vi_cv_path_ruby
698TCL_LIBS
ichizok8bb3fe42021-12-28 15:51:45 +0000699TCL_CFLAGS_EXTRA
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000700TCL_CFLAGS
701TCL_PRO
702TCL_OBJ
703TCL_SRC
704vi_cv_path_tcl
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200705PYTHON3_OBJ
706PYTHON3_SRC
ichizok8bb3fe42021-12-28 15:51:45 +0000707PYTHON3_CFLAGS_EXTRA
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200708PYTHON3_CFLAGS
709PYTHON3_LIBS
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +0200710vi_cv_var_python3_stable_abi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200711vi_cv_path_python3
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000712PYTHON_OBJ
713PYTHON_SRC
ichizok8bb3fe42021-12-28 15:51:45 +0000714PYTHON_CFLAGS_EXTRA
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000715PYTHON_CFLAGS
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000716PYTHON_LIBS
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000717vi_cv_path_python
718PERL_LIBS
ichizok8bb3fe42021-12-28 15:51:45 +0000719PERL_CFLAGS_EXTRA
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000720PERL_CFLAGS
721PERL_PRO
722PERL_OBJ
723PERL_SRC
724shrpenv
Bram Moolenaard5f62b12014-08-17 17:05:44 +0200725vi_cv_perl_xsubpp
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000726vi_cv_perllib
727vi_cv_path_perl
Bram Moolenaar9e70cf12009-05-26 20:59:55 +0000728MZSCHEME_MZC
729MZSCHEME_EXTRA
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000730MZSCHEME_CFLAGS
731MZSCHEME_LIBS
732MZSCHEME_PRO
733MZSCHEME_OBJ
734MZSCHEME_SRC
735vi_cv_path_mzscheme
ichizok8bb3fe42021-12-28 15:51:45 +0000736LUA_CFLAGS_EXTRA
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200737LUA_CFLAGS
738LUA_LIBS
739LUA_PRO
740LUA_OBJ
741LUA_SRC
Bram Moolenaare855ccf2013-07-28 13:32:15 +0200742vi_cv_path_plain_lua
743vi_cv_path_luajit
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200744vi_cv_path_lua
Bram Moolenaar67ffb412022-01-08 13:36:57 +0000745XDIFF_OBJS_USED
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000746compiledby
747dogvimdiff
748dovimdiff
Bram Moolenaar2c704a72010-06-03 21:17:25 +0200749QUOTESED
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000750line_break
751VIEWNAME
752EXNAME
753VIMNAME
754OS_EXTRA_OBJ
755OS_EXTRA_SRC
Bram Moolenaar595a7be2010-03-10 16:28:12 +0100756XCODE_SELECT
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000757CPP_MM
Bram Moolenaar839e9542016-04-14 16:46:02 +0200758CROSS_COMPILING
Bram Moolenaar8f1dde52020-06-05 23:16:29 +0200759BUILD_DATE_MSG
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000760STRIP
761AWK
Bram Moolenaar2bcaec32014-03-27 18:51:11 +0100762FGREP
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000763EGREP
764GREP
765CPP
766OBJEXT
767EXEEXT
768ac_ct_CC
769CPPFLAGS
770LDFLAGS
771CFLAGS
772CC
773SET_MAKE
774target_alias
775host_alias
776build_alias
777LIBS
778ECHO_T
779ECHO_N
780ECHO_C
781DEFS
782mandir
783localedir
784libdir
785psdir
786pdfdir
787dvidir
788htmldir
789infodir
790docdir
791oldincludedir
792includedir
Illia Bobyrf39842f2023-08-27 18:21:23 +0200793runstatedir
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000794localstatedir
795sharedstatedir
796sysconfdir
797datadir
798datarootdir
799libexecdir
800sbindir
801bindir
802program_transform_name
803prefix
804exec_prefix
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200805PACKAGE_URL
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000806PACKAGE_BUGREPORT
807PACKAGE_STRING
808PACKAGE_VERSION
809PACKAGE_TARNAME
810PACKAGE_NAME
811PATH_SEPARATOR
812SHELL'
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000813ac_subst_files=''
Bram Moolenaar446cb832008-06-24 21:56:24 +0000814ac_user_opts='
815enable_option_checking
Bram Moolenaarf788a062011-12-14 20:51:25 +0100816enable_fail_if_missing
Bram Moolenaar446cb832008-06-24 21:56:24 +0000817enable_darwin
818with_mac_arch
Bram Moolenaar595a7be2010-03-10 16:28:12 +0100819with_developer_dir
Bram Moolenaarc236c162008-07-13 17:41:49 +0000820with_local_dir
Bram Moolenaar446cb832008-06-24 21:56:24 +0000821with_vim_name
822with_ex_name
823with_view_name
824with_global_runtime
825with_modified_by
Bram Moolenaar5bd32f42014-04-02 14:05:38 +0200826enable_smack
Bram Moolenaar446cb832008-06-24 21:56:24 +0000827enable_selinux
Christian Brabandte085dfd2023-09-30 12:49:18 +0200828enable_xattr
Bram Moolenaar446cb832008-06-24 21:56:24 +0000829with_features
830with_compiledby
831enable_xsmp
832enable_xsmp_interact
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200833enable_luainterp
834with_lua_prefix
Bram Moolenaare855ccf2013-07-28 13:32:15 +0200835with_luajit
Bram Moolenaar446cb832008-06-24 21:56:24 +0000836enable_mzschemeinterp
837with_plthome
838enable_perlinterp
839enable_pythoninterp
Bram Moolenaare1a32312018-04-15 16:03:25 +0200840with_python_command
Bram Moolenaar446cb832008-06-24 21:56:24 +0000841with_python_config_dir
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200842enable_python3interp
Bram Moolenaare1a32312018-04-15 16:03:25 +0200843with_python3_command
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +0200844with_python3_stable_abi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200845with_python3_config_dir
Bram Moolenaar446cb832008-06-24 21:56:24 +0000846enable_tclinterp
847with_tclsh
848enable_rubyinterp
Bram Moolenaar165641d2010-02-17 16:23:09 +0100849with_ruby_command
Bram Moolenaar446cb832008-06-24 21:56:24 +0000850enable_cscope
Bram Moolenaar446cb832008-06-24 21:56:24 +0000851enable_netbeans
Bram Moolenaare0874f82016-01-24 20:36:41 +0100852enable_channel
Bram Moolenaare4f25e42017-07-07 11:54:15 +0200853enable_terminal
Bram Moolenaare42a6d22017-11-12 19:21:51 +0100854enable_autoservername
Bram Moolenaar446cb832008-06-24 21:56:24 +0000855enable_multibyte
Bram Moolenaar5c5697f2018-12-12 20:34:09 +0100856enable_rightleft
857enable_arabic
858enable_farsi
Bram Moolenaar446cb832008-06-24 21:56:24 +0000859enable_xim
860enable_fontset
861with_x
862enable_gui
Bram Moolenaar446cb832008-06-24 21:56:24 +0000863enable_gtk2_check
864enable_gnome_check
Bram Moolenaar98921892016-02-23 17:14:37 +0100865enable_gtk3_check
Bram Moolenaar446cb832008-06-24 21:56:24 +0000866enable_motif_check
Bram Moolenaar446cb832008-06-24 21:56:24 +0000867enable_gtktest
868with_gnome_includes
869with_gnome_libs
870with_gnome
Bram Moolenaar4adfaab2016-04-21 18:20:11 +0200871enable_icon_cache_update
872enable_desktop_database_update
Bram Moolenaar446cb832008-06-24 21:56:24 +0000873with_motif_lib
874with_tlib
Bram Moolenaar317fd3a2010-05-07 16:05:55 +0200875enable_largefile
Bram Moolenaar21606672019-06-14 20:40:58 +0200876enable_canberra
Christian Brabandtf573c6e2021-06-20 14:02:16 +0200877enable_libsodium
Bram Moolenaar446cb832008-06-24 21:56:24 +0000878enable_acl
879enable_gpm
880enable_sysmouse
881enable_nls
882'
883 ac_precious_vars='build_alias
884host_alias
885target_alias
886CC
887CFLAGS
888LDFLAGS
889LIBS
890CPPFLAGS
891CPP
892XMKMF'
893
Bram Moolenaar071d4272004-06-13 20:20:40 +0000894
895# Initialize some variables set by options.
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000896ac_init_help=
897ac_init_version=false
Bram Moolenaar446cb832008-06-24 21:56:24 +0000898ac_unrecognized_opts=
899ac_unrecognized_sep=
Bram Moolenaar071d4272004-06-13 20:20:40 +0000900# The variables have the same names as the options, with
901# dashes changed to underlines.
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000902cache_file=/dev/null
Bram Moolenaar071d4272004-06-13 20:20:40 +0000903exec_prefix=NONE
Bram Moolenaar071d4272004-06-13 20:20:40 +0000904no_create=
Bram Moolenaar071d4272004-06-13 20:20:40 +0000905no_recursion=
906prefix=NONE
907program_prefix=NONE
908program_suffix=NONE
909program_transform_name=s,x,x,
910silent=
911site=
912srcdir=
Bram Moolenaar071d4272004-06-13 20:20:40 +0000913verbose=
914x_includes=NONE
915x_libraries=NONE
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000916
917# Installation directory options.
918# These are left unexpanded so users can "make install exec_prefix=/foo"
919# and all the variables that are supposed to be based on exec_prefix
920# by default will actually change.
921# Use braces instead of parens because sh, perl, etc. also accept them.
Bram Moolenaar446cb832008-06-24 21:56:24 +0000922# (The list follows the same order as the GNU Coding Standards.)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000923bindir='${exec_prefix}/bin'
924sbindir='${exec_prefix}/sbin'
925libexecdir='${exec_prefix}/libexec'
Bram Moolenaar446cb832008-06-24 21:56:24 +0000926datarootdir='${prefix}/share'
927datadir='${datarootdir}'
Bram Moolenaar071d4272004-06-13 20:20:40 +0000928sysconfdir='${prefix}/etc'
929sharedstatedir='${prefix}/com'
930localstatedir='${prefix}/var'
Illia Bobyrf39842f2023-08-27 18:21:23 +0200931runstatedir='${localstatedir}/run'
Bram Moolenaar071d4272004-06-13 20:20:40 +0000932includedir='${prefix}/include'
933oldincludedir='/usr/include'
Bram Moolenaar446cb832008-06-24 21:56:24 +0000934docdir='${datarootdir}/doc/${PACKAGE}'
935infodir='${datarootdir}/info'
936htmldir='${docdir}'
937dvidir='${docdir}'
938pdfdir='${docdir}'
939psdir='${docdir}'
940libdir='${exec_prefix}/lib'
941localedir='${datarootdir}/locale'
942mandir='${datarootdir}/man'
Bram Moolenaar071d4272004-06-13 20:20:40 +0000943
Bram Moolenaar071d4272004-06-13 20:20:40 +0000944ac_prev=
Bram Moolenaar446cb832008-06-24 21:56:24 +0000945ac_dashdash=
Bram Moolenaar071d4272004-06-13 20:20:40 +0000946for ac_option
947do
Bram Moolenaar071d4272004-06-13 20:20:40 +0000948 # If the previous option needs an argument, assign it.
949 if test -n "$ac_prev"; then
Bram Moolenaar446cb832008-06-24 21:56:24 +0000950 eval $ac_prev=\$ac_option
Bram Moolenaar071d4272004-06-13 20:20:40 +0000951 ac_prev=
952 continue
953 fi
954
Bram Moolenaar446cb832008-06-24 21:56:24 +0000955 case $ac_option in
Bram Moolenaar7db77842014-03-27 17:40:59 +0100956 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
957 *=) ac_optarg= ;;
958 *) ac_optarg=yes ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +0000959 esac
Bram Moolenaar071d4272004-06-13 20:20:40 +0000960
Bram Moolenaar446cb832008-06-24 21:56:24 +0000961 case $ac_dashdash$ac_option in
962 --)
963 ac_dashdash=yes ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +0000964
965 -bindir | --bindir | --bindi | --bind | --bin | --bi)
966 ac_prev=bindir ;;
967 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000968 bindir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +0000969
970 -build | --build | --buil | --bui | --bu)
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000971 ac_prev=build_alias ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +0000972 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000973 build_alias=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +0000974
975 -cache-file | --cache-file | --cache-fil | --cache-fi \
976 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
977 ac_prev=cache_file ;;
978 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
979 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000980 cache_file=$ac_optarg ;;
981
982 --config-cache | -C)
983 cache_file=config.cache ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +0000984
Bram Moolenaar446cb832008-06-24 21:56:24 +0000985 -datadir | --datadir | --datadi | --datad)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000986 ac_prev=datadir ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +0000987 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000988 datadir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +0000989
Bram Moolenaar446cb832008-06-24 21:56:24 +0000990 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
991 | --dataroo | --dataro | --datar)
992 ac_prev=datarootdir ;;
993 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
994 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
995 datarootdir=$ac_optarg ;;
996
Bram Moolenaar071d4272004-06-13 20:20:40 +0000997 -disable-* | --disable-*)
Bram Moolenaar446cb832008-06-24 21:56:24 +0000998 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Bram Moolenaar071d4272004-06-13 20:20:40 +0000999 # Reject names that are not valid shell variable names.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001000 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Illia Bobyra96d5442023-08-30 16:30:15 +02001001 as_fn_error $? "invalid feature name: \`$ac_useropt'"
Bram Moolenaar446cb832008-06-24 21:56:24 +00001002 ac_useropt_orig=$ac_useropt
Illia Bobyra96d5442023-08-30 16:30:15 +02001003 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
Bram Moolenaar446cb832008-06-24 21:56:24 +00001004 case $ac_user_opts in
1005 *"
1006"enable_$ac_useropt"
1007"*) ;;
1008 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1009 ac_unrecognized_sep=', ';;
1010 esac
1011 eval enable_$ac_useropt=no ;;
1012
1013 -docdir | --docdir | --docdi | --doc | --do)
1014 ac_prev=docdir ;;
1015 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1016 docdir=$ac_optarg ;;
1017
1018 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1019 ac_prev=dvidir ;;
1020 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1021 dvidir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001022
1023 -enable-* | --enable-*)
Bram Moolenaar446cb832008-06-24 21:56:24 +00001024 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Bram Moolenaar071d4272004-06-13 20:20:40 +00001025 # Reject names that are not valid shell variable names.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001026 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Illia Bobyra96d5442023-08-30 16:30:15 +02001027 as_fn_error $? "invalid feature name: \`$ac_useropt'"
Bram Moolenaar446cb832008-06-24 21:56:24 +00001028 ac_useropt_orig=$ac_useropt
Illia Bobyra96d5442023-08-30 16:30:15 +02001029 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
Bram Moolenaar446cb832008-06-24 21:56:24 +00001030 case $ac_user_opts in
1031 *"
1032"enable_$ac_useropt"
1033"*) ;;
1034 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1035 ac_unrecognized_sep=', ';;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001036 esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00001037 eval enable_$ac_useropt=\$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001038
1039 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1040 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1041 | --exec | --exe | --ex)
1042 ac_prev=exec_prefix ;;
1043 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1044 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1045 | --exec=* | --exe=* | --ex=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001046 exec_prefix=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001047
1048 -gas | --gas | --ga | --g)
1049 # Obsolete; use --with-gas.
1050 with_gas=yes ;;
1051
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001052 -help | --help | --hel | --he | -h)
1053 ac_init_help=long ;;
1054 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1055 ac_init_help=recursive ;;
1056 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1057 ac_init_help=short ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001058
1059 -host | --host | --hos | --ho)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001060 ac_prev=host_alias ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001061 -host=* | --host=* | --hos=* | --ho=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001062 host_alias=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001063
Bram Moolenaar446cb832008-06-24 21:56:24 +00001064 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1065 ac_prev=htmldir ;;
1066 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1067 | --ht=*)
1068 htmldir=$ac_optarg ;;
1069
Bram Moolenaar071d4272004-06-13 20:20:40 +00001070 -includedir | --includedir | --includedi | --included | --include \
1071 | --includ | --inclu | --incl | --inc)
1072 ac_prev=includedir ;;
1073 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1074 | --includ=* | --inclu=* | --incl=* | --inc=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001075 includedir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001076
1077 -infodir | --infodir | --infodi | --infod | --info | --inf)
1078 ac_prev=infodir ;;
1079 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001080 infodir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001081
1082 -libdir | --libdir | --libdi | --libd)
1083 ac_prev=libdir ;;
1084 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001085 libdir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001086
1087 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1088 | --libexe | --libex | --libe)
1089 ac_prev=libexecdir ;;
1090 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1091 | --libexe=* | --libex=* | --libe=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001092 libexecdir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001093
Bram Moolenaar446cb832008-06-24 21:56:24 +00001094 -localedir | --localedir | --localedi | --localed | --locale)
1095 ac_prev=localedir ;;
1096 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1097 localedir=$ac_optarg ;;
1098
Bram Moolenaar071d4272004-06-13 20:20:40 +00001099 -localstatedir | --localstatedir | --localstatedi | --localstated \
Bram Moolenaar446cb832008-06-24 21:56:24 +00001100 | --localstate | --localstat | --localsta | --localst | --locals)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001101 ac_prev=localstatedir ;;
1102 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Bram Moolenaar446cb832008-06-24 21:56:24 +00001103 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001104 localstatedir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001105
1106 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1107 ac_prev=mandir ;;
1108 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001109 mandir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001110
1111 -nfp | --nfp | --nf)
1112 # Obsolete; use --without-fp.
1113 with_fp=no ;;
1114
1115 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001116 | --no-cr | --no-c | -n)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001117 no_create=yes ;;
1118
1119 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1120 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1121 no_recursion=yes ;;
1122
1123 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1124 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1125 | --oldin | --oldi | --old | --ol | --o)
1126 ac_prev=oldincludedir ;;
1127 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1128 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1129 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001130 oldincludedir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001131
1132 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1133 ac_prev=prefix ;;
1134 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001135 prefix=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001136
1137 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1138 | --program-pre | --program-pr | --program-p)
1139 ac_prev=program_prefix ;;
1140 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1141 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001142 program_prefix=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001143
1144 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1145 | --program-suf | --program-su | --program-s)
1146 ac_prev=program_suffix ;;
1147 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1148 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001149 program_suffix=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001150
1151 -program-transform-name | --program-transform-name \
1152 | --program-transform-nam | --program-transform-na \
1153 | --program-transform-n | --program-transform- \
1154 | --program-transform | --program-transfor \
1155 | --program-transfo | --program-transf \
1156 | --program-trans | --program-tran \
1157 | --progr-tra | --program-tr | --program-t)
1158 ac_prev=program_transform_name ;;
1159 -program-transform-name=* | --program-transform-name=* \
1160 | --program-transform-nam=* | --program-transform-na=* \
1161 | --program-transform-n=* | --program-transform-=* \
1162 | --program-transform=* | --program-transfor=* \
1163 | --program-transfo=* | --program-transf=* \
1164 | --program-trans=* | --program-tran=* \
1165 | --progr-tra=* | --program-tr=* | --program-t=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001166 program_transform_name=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001167
Bram Moolenaar446cb832008-06-24 21:56:24 +00001168 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1169 ac_prev=pdfdir ;;
1170 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1171 pdfdir=$ac_optarg ;;
1172
1173 -psdir | --psdir | --psdi | --psd | --ps)
1174 ac_prev=psdir ;;
1175 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1176 psdir=$ac_optarg ;;
1177
Bram Moolenaar071d4272004-06-13 20:20:40 +00001178 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1179 | -silent | --silent | --silen | --sile | --sil)
1180 silent=yes ;;
1181
Illia Bobyrf39842f2023-08-27 18:21:23 +02001182 -runstatedir | --runstatedir | --runstatedi | --runstated \
1183 | --runstate | --runstat | --runsta | --runst | --runs \
1184 | --run | --ru | --r)
1185 ac_prev=runstatedir ;;
1186 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1187 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1188 | --run=* | --ru=* | --r=*)
1189 runstatedir=$ac_optarg ;;
1190
Bram Moolenaar071d4272004-06-13 20:20:40 +00001191 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1192 ac_prev=sbindir ;;
1193 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1194 | --sbi=* | --sb=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001195 sbindir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001196
1197 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1198 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1199 | --sharedst | --shareds | --shared | --share | --shar \
1200 | --sha | --sh)
1201 ac_prev=sharedstatedir ;;
1202 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1203 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1204 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1205 | --sha=* | --sh=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001206 sharedstatedir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001207
1208 -site | --site | --sit)
1209 ac_prev=site ;;
1210 -site=* | --site=* | --sit=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001211 site=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001212
1213 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1214 ac_prev=srcdir ;;
1215 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001216 srcdir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001217
1218 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1219 | --syscon | --sysco | --sysc | --sys | --sy)
1220 ac_prev=sysconfdir ;;
1221 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1222 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001223 sysconfdir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001224
1225 -target | --target | --targe | --targ | --tar | --ta | --t)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001226 ac_prev=target_alias ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001227 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001228 target_alias=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001229
1230 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1231 verbose=yes ;;
1232
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001233 -version | --version | --versio | --versi | --vers | -V)
1234 ac_init_version=: ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001235
1236 -with-* | --with-*)
Bram Moolenaar446cb832008-06-24 21:56:24 +00001237 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Bram Moolenaar071d4272004-06-13 20:20:40 +00001238 # Reject names that are not valid shell variable names.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001239 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Illia Bobyra96d5442023-08-30 16:30:15 +02001240 as_fn_error $? "invalid package name: \`$ac_useropt'"
Bram Moolenaar446cb832008-06-24 21:56:24 +00001241 ac_useropt_orig=$ac_useropt
Illia Bobyra96d5442023-08-30 16:30:15 +02001242 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
Bram Moolenaar446cb832008-06-24 21:56:24 +00001243 case $ac_user_opts in
1244 *"
1245"with_$ac_useropt"
1246"*) ;;
1247 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1248 ac_unrecognized_sep=', ';;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001249 esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00001250 eval with_$ac_useropt=\$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001251
1252 -without-* | --without-*)
Bram Moolenaar446cb832008-06-24 21:56:24 +00001253 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Bram Moolenaar071d4272004-06-13 20:20:40 +00001254 # Reject names that are not valid shell variable names.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001255 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Illia Bobyra96d5442023-08-30 16:30:15 +02001256 as_fn_error $? "invalid package name: \`$ac_useropt'"
Bram Moolenaar446cb832008-06-24 21:56:24 +00001257 ac_useropt_orig=$ac_useropt
Illia Bobyra96d5442023-08-30 16:30:15 +02001258 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
Bram Moolenaar446cb832008-06-24 21:56:24 +00001259 case $ac_user_opts in
1260 *"
1261"with_$ac_useropt"
1262"*) ;;
1263 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1264 ac_unrecognized_sep=', ';;
1265 esac
1266 eval with_$ac_useropt=no ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001267
1268 --x)
1269 # Obsolete; use --with-x.
1270 with_x=yes ;;
1271
1272 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1273 | --x-incl | --x-inc | --x-in | --x-i)
1274 ac_prev=x_includes ;;
1275 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1276 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001277 x_includes=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001278
1279 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1280 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1281 ac_prev=x_libraries ;;
1282 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1283 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001284 x_libraries=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001285
Bram Moolenaar7db77842014-03-27 17:40:59 +01001286 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1287Try \`$0 --help' for more information"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001288 ;;
1289
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001290 *=*)
1291 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1292 # Reject names that are not valid shell variable names.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001293 case $ac_envvar in #(
1294 '' | [0-9]* | *[!_$as_cr_alnum]* )
Bram Moolenaar7db77842014-03-27 17:40:59 +01001295 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001296 esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00001297 eval $ac_envvar=\$ac_optarg
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001298 export $ac_envvar ;;
1299
Bram Moolenaar071d4272004-06-13 20:20:40 +00001300 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001301 # FIXME: should be removed in autoconf 3.0.
Illia Bobyra96d5442023-08-30 16:30:15 +02001302 printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001303 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Illia Bobyra96d5442023-08-30 16:30:15 +02001304 printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
Bram Moolenaar7db77842014-03-27 17:40:59 +01001305 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001306 ;;
1307
1308 esac
1309done
1310
1311if test -n "$ac_prev"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001312 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Bram Moolenaar7db77842014-03-27 17:40:59 +01001313 as_fn_error $? "missing argument to $ac_option"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001314fi
1315
Bram Moolenaar446cb832008-06-24 21:56:24 +00001316if test -n "$ac_unrecognized_opts"; then
1317 case $enable_option_checking in
1318 no) ;;
Bram Moolenaar7db77842014-03-27 17:40:59 +01001319 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Illia Bobyra96d5442023-08-30 16:30:15 +02001320 *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001321 esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00001322fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00001323
Bram Moolenaar446cb832008-06-24 21:56:24 +00001324# Check all directory arguments for consistency.
1325for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1326 datadir sysconfdir sharedstatedir localstatedir includedir \
1327 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Illia Bobyrf39842f2023-08-27 18:21:23 +02001328 libdir localedir mandir runstatedir
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001329do
Bram Moolenaar446cb832008-06-24 21:56:24 +00001330 eval ac_val=\$$ac_var
1331 # Remove trailing slashes.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001332 case $ac_val in
Bram Moolenaar446cb832008-06-24 21:56:24 +00001333 */ )
1334 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1335 eval $ac_var=\$ac_val;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001336 esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00001337 # Be sure to have absolute directory names.
1338 case $ac_val in
1339 [\\/$]* | ?:[\\/]* ) continue;;
1340 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1341 esac
Bram Moolenaar7db77842014-03-27 17:40:59 +01001342 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001343done
Bram Moolenaar071d4272004-06-13 20:20:40 +00001344
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001345# There might be people who depend on the old broken behavior: `$host'
1346# used to hold the argument of --host etc.
1347# FIXME: To remove some day.
1348build=$build_alias
1349host=$host_alias
1350target=$target_alias
Bram Moolenaar071d4272004-06-13 20:20:40 +00001351
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001352# FIXME: To remove some day.
1353if test "x$host_alias" != x; then
1354 if test "x$build_alias" = x; then
1355 cross_compiling=maybe
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001356 elif test "x$build_alias" != "x$host_alias"; then
1357 cross_compiling=yes
1358 fi
1359fi
1360
1361ac_tool_prefix=
1362test -n "$host_alias" && ac_tool_prefix=$host_alias-
1363
1364test "$silent" = yes && exec 6>/dev/null
1365
Bram Moolenaar071d4272004-06-13 20:20:40 +00001366
Bram Moolenaar446cb832008-06-24 21:56:24 +00001367ac_pwd=`pwd` && test -n "$ac_pwd" &&
1368ac_ls_di=`ls -di .` &&
1369ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Bram Moolenaar7db77842014-03-27 17:40:59 +01001370 as_fn_error $? "working directory cannot be determined"
Bram Moolenaar446cb832008-06-24 21:56:24 +00001371test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Bram Moolenaar7db77842014-03-27 17:40:59 +01001372 as_fn_error $? "pwd does not report name of working directory"
Bram Moolenaar446cb832008-06-24 21:56:24 +00001373
1374
Bram Moolenaar071d4272004-06-13 20:20:40 +00001375# Find the source files, if location was not specified.
1376if test -z "$srcdir"; then
1377 ac_srcdir_defaulted=yes
Bram Moolenaar446cb832008-06-24 21:56:24 +00001378 # Try the directory containing this script, then the parent directory.
1379 ac_confdir=`$as_dirname -- "$as_myself" ||
1380$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1381 X"$as_myself" : 'X\(//\)[^/]' \| \
1382 X"$as_myself" : 'X\(//\)$' \| \
1383 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
Illia Bobyra96d5442023-08-30 16:30:15 +02001384printf "%s\n" X"$as_myself" |
Bram Moolenaar446cb832008-06-24 21:56:24 +00001385 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1386 s//\1/
1387 q
1388 }
1389 /^X\(\/\/\)[^/].*/{
1390 s//\1/
1391 q
1392 }
1393 /^X\(\/\/\)$/{
1394 s//\1/
1395 q
1396 }
1397 /^X\(\/\).*/{
1398 s//\1/
1399 q
1400 }
1401 s/.*/./; q'`
Bram Moolenaar071d4272004-06-13 20:20:40 +00001402 srcdir=$ac_confdir
Bram Moolenaar446cb832008-06-24 21:56:24 +00001403 if test ! -r "$srcdir/$ac_unique_file"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00001404 srcdir=..
1405 fi
1406else
1407 ac_srcdir_defaulted=no
1408fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00001409if test ! -r "$srcdir/$ac_unique_file"; then
1410 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Bram Moolenaar7db77842014-03-27 17:40:59 +01001411 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001412fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00001413ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1414ac_abs_confdir=`(
Bram Moolenaar7db77842014-03-27 17:40:59 +01001415 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Bram Moolenaar446cb832008-06-24 21:56:24 +00001416 pwd)`
1417# When building in place, set srcdir=.
1418if test "$ac_abs_confdir" = "$ac_pwd"; then
1419 srcdir=.
1420fi
1421# Remove unnecessary trailing slashes from srcdir.
1422# Double slashes in file names in object file debugging info
1423# mess up M-x gdb in Emacs.
1424case $srcdir in
1425*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1426esac
1427for ac_var in $ac_precious_vars; do
1428 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1429 eval ac_env_${ac_var}_value=\$${ac_var}
1430 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1431 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1432done
Bram Moolenaar071d4272004-06-13 20:20:40 +00001433
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001434#
1435# Report the --help message.
1436#
1437if test "$ac_init_help" = "long"; then
1438 # Omit some internal or obsolete options to make the list less imposing.
1439 # This message is too long to be a string in the A/UX 3.1 sh.
1440 cat <<_ACEOF
1441\`configure' configures this package to adapt to many kinds of systems.
1442
1443Usage: $0 [OPTION]... [VAR=VALUE]...
1444
1445To assign environment variables (e.g., CC, CFLAGS...), specify them as
1446VAR=VALUE. See below for descriptions of some of the useful variables.
1447
1448Defaults for the options are specified in brackets.
1449
1450Configuration:
1451 -h, --help display this help and exit
1452 --help=short display options specific to this package
1453 --help=recursive display the short help of all the included packages
1454 -V, --version display version information and exit
Bram Moolenaar7db77842014-03-27 17:40:59 +01001455 -q, --quiet, --silent do not print \`checking ...' messages
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001456 --cache-file=FILE cache test results in FILE [disabled]
1457 -C, --config-cache alias for \`--cache-file=config.cache'
1458 -n, --no-create do not create output files
1459 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1460
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001461Installation directories:
1462 --prefix=PREFIX install architecture-independent files in PREFIX
Bram Moolenaar446cb832008-06-24 21:56:24 +00001463 [$ac_default_prefix]
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001464 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Bram Moolenaar446cb832008-06-24 21:56:24 +00001465 [PREFIX]
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001466
1467By default, \`make install' will install all the files in
1468\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1469an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1470for instance \`--prefix=\$HOME'.
1471
1472For better control, use the options below.
1473
1474Fine tuning of the installation directories:
Bram Moolenaar446cb832008-06-24 21:56:24 +00001475 --bindir=DIR user executables [EPREFIX/bin]
1476 --sbindir=DIR system admin executables [EPREFIX/sbin]
1477 --libexecdir=DIR program executables [EPREFIX/libexec]
1478 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1479 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1480 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
Illia Bobyrf39842f2023-08-27 18:21:23 +02001481 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Bram Moolenaar446cb832008-06-24 21:56:24 +00001482 --libdir=DIR object code libraries [EPREFIX/lib]
1483 --includedir=DIR C header files [PREFIX/include]
1484 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1485 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1486 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1487 --infodir=DIR info documentation [DATAROOTDIR/info]
1488 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1489 --mandir=DIR man documentation [DATAROOTDIR/man]
1490 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1491 --htmldir=DIR html documentation [DOCDIR]
1492 --dvidir=DIR dvi documentation [DOCDIR]
1493 --pdfdir=DIR pdf documentation [DOCDIR]
1494 --psdir=DIR ps documentation [DOCDIR]
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001495_ACEOF
1496
1497 cat <<\_ACEOF
1498
1499X features:
1500 --x-includes=DIR X include files are in DIR
1501 --x-libraries=DIR X library files are in DIR
1502_ACEOF
1503fi
1504
1505if test -n "$ac_init_help"; then
1506
1507 cat <<\_ACEOF
1508
1509Optional Features:
Bram Moolenaar446cb832008-06-24 21:56:24 +00001510 --disable-option-checking ignore unrecognized --enable/--with options
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001511 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1512 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Bram Moolenaarf788a062011-12-14 20:51:25 +01001513 --enable-fail-if-missing Fail if dependencies on additional features
1514 specified on the command line are missing.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001515 --disable-darwin Disable Darwin (Mac OS X) support.
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02001516 --disable-smack Do not check for Smack support.
1517 --disable-selinux Do not check for SELinux support.
Christian Brabandte085dfd2023-09-30 12:49:18 +02001518 --disable-xattr Do not check for XATTR support.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001519 --disable-xsmp Disable XSMP session management
1520 --disable-xsmp-interact Disable XSMP interaction
Bram Moolenaar8008b632017-07-18 21:33:20 +02001521 --enable-luainterp=OPTS Include Lua interpreter. default=no OPTS=no/yes/dynamic
1522 --enable-mzschemeinterp Include MzScheme interpreter.
Bram Moolenaare06c1882010-07-21 22:05:20 +02001523 --enable-perlinterp=OPTS Include Perl interpreter. default=no OPTS=no/yes/dynamic
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02001524 --enable-pythoninterp=OPTS Include Python interpreter. default=no OPTS=no/yes/dynamic
Bram Moolenaar8008b632017-07-18 21:33:20 +02001525 --enable-python3interp=OPTS Include Python3 interpreter. default=no OPTS=no/yes/dynamic
Bram Moolenaar8a5115c2016-01-09 19:41:11 +01001526 --enable-tclinterp=OPTS Include Tcl interpreter. default=no OPTS=no/yes/dynamic
Bram Moolenaar3ca71f12010-10-27 16:49:47 +02001527 --enable-rubyinterp=OPTS Include Ruby interpreter. default=no OPTS=no/yes/dynamic
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001528 --enable-cscope Include cscope interface.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001529 --disable-netbeans Disable NetBeans integration support.
Bram Moolenaar8008b632017-07-18 21:33:20 +02001530 --disable-channel Disable process communication support.
1531 --enable-terminal Enable terminal emulation support.
Bram Moolenaare42a6d22017-11-12 19:21:51 +01001532 --enable-autoservername Automatically define servername at vim startup.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001533 --enable-multibyte Include multibyte editing support.
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01001534 --disable-rightleft Do not include Right-to-Left language support.
1535 --disable-arabic Do not include Arabic language support.
Bram Moolenaar14184a32019-02-16 15:10:30 +01001536 --disable-farsi Deprecated.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001537 --enable-xim Include XIM input support.
1538 --enable-fontset Include X fontset output support.
Bram Moolenaarf52fac22022-03-11 16:01:26 +00001539 --enable-gui=OPTS X11 GUI. default=auto OPTS=auto/no/gtk2/gnome2/gtk3/motif/haiku/photon/carbon
Bram Moolenaar182c5be2010-06-25 05:37:59 +02001540 --enable-gtk2-check If auto-select GUI, check for GTK+ 2 default=yes
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001541 --enable-gnome-check If GTK GUI, check for GNOME default=no
Bram Moolenaar98921892016-02-23 17:14:37 +01001542 --enable-gtk3-check If auto-select GUI, check for GTK+ 3 default=yes
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001543 --enable-motif-check If auto-select GUI, check for Motif default=yes
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001544 --disable-gtktest Do not try to compile and run a test GTK program
Bram Moolenaar4adfaab2016-04-21 18:20:11 +02001545 --disable-icon-cache-update update disabled
1546 --disable-desktop-database-update update disabled
Bram Moolenaar317fd3a2010-05-07 16:05:55 +02001547 --disable-largefile omit support for large files
Bram Moolenaar21606672019-06-14 20:40:58 +02001548 --disable-canberra Do not use libcanberra.
Christian Brabandtf573c6e2021-06-20 14:02:16 +02001549 --disable-libsodium Do not use libsodium.
Bram Moolenaard6d30422018-01-28 22:48:55 +01001550 --disable-acl No check for ACL support.
Bram Moolenaar0b40d082022-03-08 13:32:37 +00001551 --enable-gpm=OPTS Use gpm (Linux mouse daemon). default=yes OPTS=yes/no/dynamic
Bram Moolenaar8008b632017-07-18 21:33:20 +02001552 --disable-sysmouse Don't use sysmouse (mouse in *BSD console).
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001553 --disable-nls Don't support NLS (gettext()).
1554
1555Optional Packages:
1556 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1557 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Bram Moolenaar899dddf2006-03-26 21:06:50 +00001558 --with-mac-arch=ARCH current, intel, ppc or both
Bram Moolenaar595a7be2010-03-10 16:28:12 +01001559 --with-developer-dir=PATH use PATH as location for Xcode developer tools
Bram Moolenaarc236c162008-07-13 17:41:49 +00001560 --with-local-dir=PATH search PATH instead of /usr/local for local libraries.
1561 --without-local-dir do not search /usr/local for local libraries.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001562 --with-vim-name=NAME what to call the Vim executable
1563 --with-ex-name=NAME what to call the Ex executable
1564 --with-view-name=NAME what to call the View executable
Bram Moolenaar9d302ad2018-12-21 11:48:51 +01001565 --with-global-runtime=DIR global runtime directory in 'runtimepath', comma-separated for multiple directories
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001566 --with-modified-by=NAME name of who modified a release version
Martin Tournoij25f3a142022-10-08 19:26:41 +01001567 --with-features=TYPE tiny, normal or huge (default: huge)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001568 --with-compiledby=NAME name to show in :version message
Bram Moolenaar0ba04292010-07-14 23:23:17 +02001569 --with-lua-prefix=PFX Prefix where Lua is installed.
Bram Moolenaare855ccf2013-07-28 13:32:15 +02001570 --with-luajit Link with LuaJIT instead of Lua.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001571 --with-plthome=PLTHOME Use PLTHOME.
Bram Moolenaare1a32312018-04-15 16:03:25 +02001572 --with-python-command=NAME name of the Python 2 command (default: python2 or python)
1573 --with-python-config-dir=PATH Python's config directory (deprecated)
1574 --with-python3-command=NAME name of the Python 3 command (default: python3 or python)
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02001575 --with-python3-stable-abi=VERSION stable ABI version to target (e.g. 3.8)
Bram Moolenaare1a32312018-04-15 16:03:25 +02001576 --with-python3-config-dir=PATH Python's config directory (deprecated)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001577 --with-tclsh=PATH which tclsh to use (default: tclsh8.0)
Bram Moolenaar165641d2010-02-17 16:23:09 +01001578 --with-ruby-command=RUBY name of the Ruby command (default: ruby)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001579 --with-x use the X Window System
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001580 --with-gnome-includes=DIR Specify location of GNOME headers
1581 --with-gnome-libs=DIR Specify location of GNOME libs
1582 --with-gnome Specify prefix for GNOME files
Bram Moolenaar8008b632017-07-18 21:33:20 +02001583 --with-motif-lib=STRING Library for Motif
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001584 --with-tlib=library terminal library to be used
1585
1586Some influential environment variables:
1587 CC C compiler command
1588 CFLAGS C compiler flags
1589 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1590 nonstandard directory <lib dir>
Bram Moolenaar446cb832008-06-24 21:56:24 +00001591 LIBS libraries to pass to the linker, e.g. -l<library>
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001592 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Bram Moolenaar446cb832008-06-24 21:56:24 +00001593 you have headers in a nonstandard directory <include dir>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001594 CPP C preprocessor
Bram Moolenaar446cb832008-06-24 21:56:24 +00001595 XMKMF Path to xmkmf, Makefile generator for X Window System
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001596
1597Use these variables to override the choices made by `configure' or to help
1598it to find libraries and programs with nonstandard names/locations.
1599
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001600Report bugs to the package provider.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001601_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +00001602ac_status=$?
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001603fi
1604
1605if test "$ac_init_help" = "recursive"; then
1606 # If there are subdirs, report their specific --help.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001607 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Bram Moolenaar446cb832008-06-24 21:56:24 +00001608 test -d "$ac_dir" ||
1609 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1610 continue
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001611 ac_builddir=.
1612
Bram Moolenaar446cb832008-06-24 21:56:24 +00001613case "$ac_dir" in
1614.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1615*)
Illia Bobyra96d5442023-08-30 16:30:15 +02001616 ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
Bram Moolenaar446cb832008-06-24 21:56:24 +00001617 # A ".." for each directory in $ac_dir_suffix.
Illia Bobyra96d5442023-08-30 16:30:15 +02001618 ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Bram Moolenaar446cb832008-06-24 21:56:24 +00001619 case $ac_top_builddir_sub in
1620 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1621 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1622 esac ;;
1623esac
1624ac_abs_top_builddir=$ac_pwd
1625ac_abs_builddir=$ac_pwd$ac_dir_suffix
1626# for backward compatibility:
1627ac_top_builddir=$ac_top_build_prefix
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001628
1629case $srcdir in
Bram Moolenaar446cb832008-06-24 21:56:24 +00001630 .) # We are building in place.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001631 ac_srcdir=.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001632 ac_top_srcdir=$ac_top_builddir_sub
1633 ac_abs_top_srcdir=$ac_pwd ;;
1634 [\\/]* | ?:[\\/]* ) # Absolute name.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001635 ac_srcdir=$srcdir$ac_dir_suffix;
Bram Moolenaar446cb832008-06-24 21:56:24 +00001636 ac_top_srcdir=$srcdir
1637 ac_abs_top_srcdir=$srcdir ;;
1638 *) # Relative name.
1639 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1640 ac_top_srcdir=$ac_top_build_prefix$srcdir
1641 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001642esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00001643ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001644
Bram Moolenaar446cb832008-06-24 21:56:24 +00001645 cd "$ac_dir" || { ac_status=$?; continue; }
Illia Bobyra96d5442023-08-30 16:30:15 +02001646 # Check for configure.gnu first; this name is used for a wrapper for
1647 # Metaconfig's "Configure" on case-insensitive file systems.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001648 if test -f "$ac_srcdir/configure.gnu"; then
1649 echo &&
1650 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1651 elif test -f "$ac_srcdir/configure"; then
1652 echo &&
1653 $SHELL "$ac_srcdir/configure" --help=recursive
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001654 else
Illia Bobyra96d5442023-08-30 16:30:15 +02001655 printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Bram Moolenaar446cb832008-06-24 21:56:24 +00001656 fi || ac_status=$?
1657 cd "$ac_pwd" || { ac_status=$?; break; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001658 done
1659fi
1660
Bram Moolenaar446cb832008-06-24 21:56:24 +00001661test -n "$ac_init_help" && exit $ac_status
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001662if $ac_init_version; then
1663 cat <<\_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +00001664configure
Illia Bobyra96d5442023-08-30 16:30:15 +02001665generated by GNU Autoconf 2.71
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001666
Illia Bobyra96d5442023-08-30 16:30:15 +02001667Copyright (C) 2021 Free Software Foundation, Inc.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001668This configure script is free software; the Free Software Foundation
1669gives unlimited permission to copy, distribute and modify it.
1670_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +00001671 exit
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001672fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001673
1674## ------------------------ ##
1675## Autoconf initialization. ##
1676## ------------------------ ##
1677
1678# ac_fn_c_try_compile LINENO
1679# --------------------------
1680# Try to compile conftest.$ac_ext, and return whether this succeeded.
1681ac_fn_c_try_compile ()
1682{
1683 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +02001684 rm -f conftest.$ac_objext conftest.beam
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001685 if { { ac_try="$ac_compile"
1686case "(($ac_try" in
1687 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1688 *) ac_try_echo=$ac_try;;
1689esac
1690eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Illia Bobyra96d5442023-08-30 16:30:15 +02001691printf "%s\n" "$ac_try_echo"; } >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001692 (eval "$ac_compile") 2>conftest.err
1693 ac_status=$?
1694 if test -s conftest.err; then
1695 grep -v '^ *+' conftest.err >conftest.er1
1696 cat conftest.er1 >&5
1697 mv -f conftest.er1 conftest.err
1698 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02001699 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001700 test $ac_status = 0; } && {
1701 test -z "$ac_c_werror_flag" ||
1702 test ! -s conftest.err
Illia Bobyra96d5442023-08-30 16:30:15 +02001703 } && test -s conftest.$ac_objext
1704then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001705 ac_retval=0
Illia Bobyra96d5442023-08-30 16:30:15 +02001706else $as_nop
1707 printf "%s\n" "$as_me: failed program was:" >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001708sed 's/^/| /' conftest.$ac_ext >&5
1709
1710 ac_retval=1
1711fi
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
Illia Bobyra96d5442023-08-30 16:30:15 +02001744else $as_nop
1745 printf "%s\n" "$as_me: failed program was:" >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001746sed 's/^/| /' conftest.$ac_ext >&5
1747
1748 ac_retval=1
1749fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01001750 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001751 as_fn_set_status $ac_retval
1752
1753} # ac_fn_c_try_cpp
1754
1755# ac_fn_c_try_link LINENO
1756# -----------------------
1757# Try to link conftest.$ac_ext, and return whether this succeeded.
1758ac_fn_c_try_link ()
1759{
1760 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +02001761 rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001762 if { { ac_try="$ac_link"
1763case "(($ac_try" in
1764 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1765 *) ac_try_echo=$ac_try;;
1766esac
1767eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Illia Bobyra96d5442023-08-30 16:30:15 +02001768printf "%s\n" "$ac_try_echo"; } >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001769 (eval "$ac_link") 2>conftest.err
1770 ac_status=$?
1771 if test -s conftest.err; then
1772 grep -v '^ *+' conftest.err >conftest.er1
1773 cat conftest.er1 >&5
1774 mv -f conftest.er1 conftest.err
1775 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02001776 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001777 test $ac_status = 0; } && {
1778 test -z "$ac_c_werror_flag" ||
1779 test ! -s conftest.err
1780 } && test -s conftest$ac_exeext && {
1781 test "$cross_compiling" = yes ||
Bram Moolenaar7db77842014-03-27 17:40:59 +01001782 test -x conftest$ac_exeext
Illia Bobyra96d5442023-08-30 16:30:15 +02001783 }
1784then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001785 ac_retval=0
Illia Bobyra96d5442023-08-30 16:30:15 +02001786else $as_nop
1787 printf "%s\n" "$as_me: failed program was:" >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001788sed 's/^/| /' conftest.$ac_ext >&5
1789
1790 ac_retval=1
1791fi
1792 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1793 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1794 # interfere with the next link command; also delete a directory that is
1795 # left behind by Apple's compiler. We do this before executing the actions.
1796 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Bram Moolenaar7db77842014-03-27 17:40:59 +01001797 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001798 as_fn_set_status $ac_retval
1799
1800} # ac_fn_c_try_link
1801
Illia Bobyr0e82b592023-08-29 21:16:29 +02001802# ac_fn_c_try_run LINENO
1803# ----------------------
Illia Bobyra96d5442023-08-30 16:30:15 +02001804# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
1805# executables *can* be run.
Illia Bobyr0e82b592023-08-29 21:16:29 +02001806ac_fn_c_try_run ()
1807{
1808 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1809 if { { ac_try="$ac_link"
1810case "(($ac_try" in
1811 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1812 *) ac_try_echo=$ac_try;;
1813esac
1814eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Illia Bobyra96d5442023-08-30 16:30:15 +02001815printf "%s\n" "$ac_try_echo"; } >&5
Illia Bobyr0e82b592023-08-29 21:16:29 +02001816 (eval "$ac_link") 2>&5
1817 ac_status=$?
Illia Bobyra96d5442023-08-30 16:30:15 +02001818 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Illia Bobyr0e82b592023-08-29 21:16:29 +02001819 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1820 { { case "(($ac_try" in
1821 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1822 *) ac_try_echo=$ac_try;;
1823esac
1824eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Illia Bobyra96d5442023-08-30 16:30:15 +02001825printf "%s\n" "$ac_try_echo"; } >&5
Illia Bobyr0e82b592023-08-29 21:16:29 +02001826 (eval "$ac_try") 2>&5
1827 ac_status=$?
Illia Bobyra96d5442023-08-30 16:30:15 +02001828 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1829 test $ac_status = 0; }; }
1830then :
Illia Bobyr0e82b592023-08-29 21:16:29 +02001831 ac_retval=0
Illia Bobyra96d5442023-08-30 16:30:15 +02001832else $as_nop
1833 printf "%s\n" "$as_me: program exited with status $ac_status" >&5
1834 printf "%s\n" "$as_me: failed program was:" >&5
Illia Bobyr0e82b592023-08-29 21:16:29 +02001835sed 's/^/| /' conftest.$ac_ext >&5
1836
1837 ac_retval=$ac_status
1838fi
1839 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1840 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1841 as_fn_set_status $ac_retval
1842
1843} # ac_fn_c_try_run
1844
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001845# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1846# -------------------------------------------------------
1847# Tests whether HEADER exists and can be compiled using the include files in
1848# INCLUDES, setting the cache variable VAR accordingly.
1849ac_fn_c_check_header_compile ()
1850{
1851 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +02001852 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1853printf %s "checking for $2... " >&6; }
1854if eval test \${$3+y}
1855then :
1856 printf %s "(cached) " >&6
1857else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1859/* end confdefs.h. */
1860$4
1861#include <$2>
1862_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02001863if ac_fn_c_try_compile "$LINENO"
1864then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001865 eval "$3=yes"
Illia Bobyra96d5442023-08-30 16:30:15 +02001866else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001867 eval "$3=no"
1868fi
Illia Bobyra96d5442023-08-30 16:30:15 +02001869rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001870fi
1871eval ac_res=\$$3
Illia Bobyra96d5442023-08-30 16:30:15 +02001872 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1873printf "%s\n" "$ac_res" >&6; }
Bram Moolenaar7db77842014-03-27 17:40:59 +01001874 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001875
1876} # ac_fn_c_check_header_compile
1877
1878# ac_fn_c_check_func LINENO FUNC VAR
1879# ----------------------------------
1880# Tests whether FUNC exists, setting the cache variable VAR accordingly
1881ac_fn_c_check_func ()
1882{
1883 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +02001884 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1885printf %s "checking for $2... " >&6; }
1886if eval test \${$3+y}
1887then :
1888 printf %s "(cached) " >&6
1889else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1891/* end confdefs.h. */
1892/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1893 For example, HP-UX 11i <limits.h> declares gettimeofday. */
1894#define $2 innocuous_$2
1895
1896/* System header to define __stub macros and hopefully few prototypes,
Illia Bobyra96d5442023-08-30 16:30:15 +02001897 which can conflict with char $2 (); below. */
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001898
Illia Bobyra96d5442023-08-30 16:30:15 +02001899#include <limits.h>
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001900#undef $2
1901
1902/* Override any GCC internal prototype to avoid an error.
1903 Use char because int might match the return type of a GCC
1904 builtin and then its argument prototype would still apply. */
1905#ifdef __cplusplus
1906extern "C"
1907#endif
1908char $2 ();
1909/* The GNU C library defines this for functions which it implements
1910 to always fail with ENOSYS. Some functions are actually named
1911 something starting with __ and the normal name is an alias. */
1912#if defined __stub_$2 || defined __stub___$2
1913choke me
1914#endif
1915
1916int
Illia Bobyra96d5442023-08-30 16:30:15 +02001917main (void)
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001918{
1919return $2 ();
1920 ;
1921 return 0;
1922}
1923_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02001924if ac_fn_c_try_link "$LINENO"
1925then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001926 eval "$3=yes"
Illia Bobyra96d5442023-08-30 16:30:15 +02001927else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001928 eval "$3=no"
1929fi
Illia Bobyra96d5442023-08-30 16:30:15 +02001930rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001931 conftest$ac_exeext conftest.$ac_ext
1932fi
1933eval ac_res=\$$3
Illia Bobyra96d5442023-08-30 16:30:15 +02001934 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1935printf "%s\n" "$ac_res" >&6; }
Bram Moolenaar7db77842014-03-27 17:40:59 +01001936 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001937
1938} # ac_fn_c_check_func
1939
Bram Moolenaar914703b2010-05-31 21:59:46 +02001940# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1941# --------------------------------------------
1942# Tries to find the compile-time value of EXPR in a program that includes
1943# INCLUDES, setting VAR accordingly. Returns whether the value could be
1944# computed
1945ac_fn_c_compute_int ()
1946{
1947 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1948 if test "$cross_compiling" = yes; then
1949 # Depending upon the size, compute the lo and hi bounds.
1950cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1951/* end confdefs.h. */
1952$4
1953int
Illia Bobyra96d5442023-08-30 16:30:15 +02001954main (void)
Bram Moolenaar914703b2010-05-31 21:59:46 +02001955{
1956static int test_array [1 - 2 * !(($2) >= 0)];
Bram Moolenaar7db77842014-03-27 17:40:59 +01001957test_array [0] = 0;
1958return test_array [0];
Bram Moolenaar914703b2010-05-31 21:59:46 +02001959
1960 ;
1961 return 0;
1962}
1963_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02001964if ac_fn_c_try_compile "$LINENO"
1965then :
Bram Moolenaar914703b2010-05-31 21:59:46 +02001966 ac_lo=0 ac_mid=0
1967 while :; do
1968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1969/* end confdefs.h. */
1970$4
1971int
Illia Bobyra96d5442023-08-30 16:30:15 +02001972main (void)
Bram Moolenaar914703b2010-05-31 21:59:46 +02001973{
1974static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Bram Moolenaar7db77842014-03-27 17:40:59 +01001975test_array [0] = 0;
1976return test_array [0];
Bram Moolenaar914703b2010-05-31 21:59:46 +02001977
1978 ;
1979 return 0;
1980}
1981_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02001982if ac_fn_c_try_compile "$LINENO"
1983then :
Bram Moolenaar914703b2010-05-31 21:59:46 +02001984 ac_hi=$ac_mid; break
Illia Bobyra96d5442023-08-30 16:30:15 +02001985else $as_nop
Bram Moolenaar914703b2010-05-31 21:59:46 +02001986 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
1987 if test $ac_lo -le $ac_mid; then
1988 ac_lo= ac_hi=
1989 break
1990 fi
1991 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
1992fi
Illia Bobyra96d5442023-08-30 16:30:15 +02001993rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar914703b2010-05-31 21:59:46 +02001994 done
Illia Bobyra96d5442023-08-30 16:30:15 +02001995else $as_nop
Bram Moolenaar914703b2010-05-31 21:59:46 +02001996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1997/* end confdefs.h. */
1998$4
1999int
Illia Bobyra96d5442023-08-30 16:30:15 +02002000main (void)
Bram Moolenaar914703b2010-05-31 21:59:46 +02002001{
2002static int test_array [1 - 2 * !(($2) < 0)];
Bram Moolenaar7db77842014-03-27 17:40:59 +01002003test_array [0] = 0;
2004return test_array [0];
Bram Moolenaar914703b2010-05-31 21:59:46 +02002005
2006 ;
2007 return 0;
2008}
2009_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02002010if ac_fn_c_try_compile "$LINENO"
2011then :
Bram Moolenaar914703b2010-05-31 21:59:46 +02002012 ac_hi=-1 ac_mid=-1
2013 while :; do
2014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2015/* end confdefs.h. */
2016$4
2017int
Illia Bobyra96d5442023-08-30 16:30:15 +02002018main (void)
Bram Moolenaar914703b2010-05-31 21:59:46 +02002019{
2020static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Bram Moolenaar7db77842014-03-27 17:40:59 +01002021test_array [0] = 0;
2022return test_array [0];
Bram Moolenaar914703b2010-05-31 21:59:46 +02002023
2024 ;
2025 return 0;
2026}
2027_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02002028if ac_fn_c_try_compile "$LINENO"
2029then :
Bram Moolenaar914703b2010-05-31 21:59:46 +02002030 ac_lo=$ac_mid; break
Illia Bobyra96d5442023-08-30 16:30:15 +02002031else $as_nop
Bram Moolenaar914703b2010-05-31 21:59:46 +02002032 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2033 if test $ac_mid -le $ac_hi; then
2034 ac_lo= ac_hi=
2035 break
2036 fi
2037 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2038fi
Illia Bobyra96d5442023-08-30 16:30:15 +02002039rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar914703b2010-05-31 21:59:46 +02002040 done
Illia Bobyra96d5442023-08-30 16:30:15 +02002041else $as_nop
Bram Moolenaar914703b2010-05-31 21:59:46 +02002042 ac_lo= ac_hi=
2043fi
Illia Bobyra96d5442023-08-30 16:30:15 +02002044rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar914703b2010-05-31 21:59:46 +02002045fi
Illia Bobyra96d5442023-08-30 16:30:15 +02002046rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar914703b2010-05-31 21:59:46 +02002047# Binary search between lo and hi bounds.
2048while test "x$ac_lo" != "x$ac_hi"; do
2049 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2051/* end confdefs.h. */
2052$4
2053int
Illia Bobyra96d5442023-08-30 16:30:15 +02002054main (void)
Bram Moolenaar914703b2010-05-31 21:59:46 +02002055{
2056static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Bram Moolenaar7db77842014-03-27 17:40:59 +01002057test_array [0] = 0;
2058return test_array [0];
Bram Moolenaar914703b2010-05-31 21:59:46 +02002059
2060 ;
2061 return 0;
2062}
2063_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02002064if ac_fn_c_try_compile "$LINENO"
2065then :
Bram Moolenaar914703b2010-05-31 21:59:46 +02002066 ac_hi=$ac_mid
Illia Bobyra96d5442023-08-30 16:30:15 +02002067else $as_nop
Bram Moolenaar914703b2010-05-31 21:59:46 +02002068 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2069fi
Illia Bobyra96d5442023-08-30 16:30:15 +02002070rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar914703b2010-05-31 21:59:46 +02002071done
2072case $ac_lo in #((
2073?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2074'') ac_retval=1 ;;
2075esac
2076 else
2077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2078/* end confdefs.h. */
2079$4
Illia Bobyra96d5442023-08-30 16:30:15 +02002080static long int longval (void) { return $2; }
2081static unsigned long int ulongval (void) { return $2; }
Bram Moolenaar914703b2010-05-31 21:59:46 +02002082#include <stdio.h>
2083#include <stdlib.h>
2084int
Illia Bobyra96d5442023-08-30 16:30:15 +02002085main (void)
Bram Moolenaar914703b2010-05-31 21:59:46 +02002086{
2087
2088 FILE *f = fopen ("conftest.val", "w");
2089 if (! f)
2090 return 1;
2091 if (($2) < 0)
2092 {
2093 long int i = longval ();
2094 if (i != ($2))
2095 return 1;
2096 fprintf (f, "%ld", i);
2097 }
2098 else
2099 {
2100 unsigned long int i = ulongval ();
2101 if (i != ($2))
2102 return 1;
2103 fprintf (f, "%lu", i);
2104 }
2105 /* Do not output a trailing newline, as this causes \r\n confusion
2106 on some platforms. */
2107 return ferror (f) || fclose (f) != 0;
2108
2109 ;
2110 return 0;
2111}
2112_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02002113if ac_fn_c_try_run "$LINENO"
2114then :
Bram Moolenaar914703b2010-05-31 21:59:46 +02002115 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
Illia Bobyra96d5442023-08-30 16:30:15 +02002116else $as_nop
Bram Moolenaar914703b2010-05-31 21:59:46 +02002117 ac_retval=1
2118fi
2119rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2120 conftest.$ac_objext conftest.beam conftest.$ac_ext
2121rm -f conftest.val
2122
2123 fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01002124 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Bram Moolenaar914703b2010-05-31 21:59:46 +02002125 as_fn_set_status $ac_retval
2126
2127} # ac_fn_c_compute_int
Mike Gilberta055b442023-08-20 19:01:41 +02002128
2129# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2130# -------------------------------------------
2131# Tests whether TYPE exists after having included INCLUDES, setting cache
2132# variable VAR accordingly.
2133ac_fn_c_check_type ()
2134{
2135 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +02002136 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2137printf %s "checking for $2... " >&6; }
2138if eval test \${$3+y}
2139then :
2140 printf %s "(cached) " >&6
2141else $as_nop
Mike Gilberta055b442023-08-20 19:01:41 +02002142 eval "$3=no"
2143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2144/* end confdefs.h. */
2145$4
2146int
Illia Bobyra96d5442023-08-30 16:30:15 +02002147main (void)
Mike Gilberta055b442023-08-20 19:01:41 +02002148{
2149if (sizeof ($2))
2150 return 0;
2151 ;
2152 return 0;
2153}
2154_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02002155if ac_fn_c_try_compile "$LINENO"
2156then :
Mike Gilberta055b442023-08-20 19:01:41 +02002157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2158/* end confdefs.h. */
2159$4
2160int
Illia Bobyra96d5442023-08-30 16:30:15 +02002161main (void)
Mike Gilberta055b442023-08-20 19:01:41 +02002162{
2163if (sizeof (($2)))
2164 return 0;
2165 ;
2166 return 0;
2167}
2168_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02002169if ac_fn_c_try_compile "$LINENO"
2170then :
Mike Gilberta055b442023-08-20 19:01:41 +02002171
Illia Bobyra96d5442023-08-30 16:30:15 +02002172else $as_nop
Mike Gilberta055b442023-08-20 19:01:41 +02002173 eval "$3=yes"
2174fi
Illia Bobyra96d5442023-08-30 16:30:15 +02002175rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Mike Gilberta055b442023-08-20 19:01:41 +02002176fi
Illia Bobyra96d5442023-08-30 16:30:15 +02002177rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Mike Gilberta055b442023-08-20 19:01:41 +02002178fi
2179eval ac_res=\$$3
Illia Bobyra96d5442023-08-30 16:30:15 +02002180 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2181printf "%s\n" "$ac_res" >&6; }
Mike Gilberta055b442023-08-20 19:01:41 +02002182 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2183
2184} # ac_fn_c_check_type
2185
2186# ac_fn_c_find_uintX_t LINENO BITS VAR
2187# ------------------------------------
2188# Finds an unsigned integer type with width BITS, setting cache variable VAR
2189# accordingly.
2190ac_fn_c_find_uintX_t ()
2191{
2192 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +02002193 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
2194printf %s "checking for uint$2_t... " >&6; }
2195if eval test \${$3+y}
2196then :
2197 printf %s "(cached) " >&6
2198else $as_nop
Mike Gilberta055b442023-08-20 19:01:41 +02002199 eval "$3=no"
2200 # Order is important - never check a type that is potentially smaller
2201 # than half of the expected target width.
2202 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
2203 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
2204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2205/* end confdefs.h. */
2206$ac_includes_default
2207int
Illia Bobyra96d5442023-08-30 16:30:15 +02002208main (void)
Mike Gilberta055b442023-08-20 19:01:41 +02002209{
2210static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
2211test_array [0] = 0;
2212return test_array [0];
2213
2214 ;
2215 return 0;
2216}
2217_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02002218if ac_fn_c_try_compile "$LINENO"
2219then :
Mike Gilberta055b442023-08-20 19:01:41 +02002220 case $ac_type in #(
2221 uint$2_t) :
2222 eval "$3=yes" ;; #(
2223 *) :
2224 eval "$3=\$ac_type" ;;
2225esac
2226fi
Illia Bobyra96d5442023-08-30 16:30:15 +02002227rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2228 if eval test \"x\$"$3"\" = x"no"
2229then :
Mike Gilberta055b442023-08-20 19:01:41 +02002230
Illia Bobyra96d5442023-08-30 16:30:15 +02002231else $as_nop
Mike Gilberta055b442023-08-20 19:01:41 +02002232 break
2233fi
2234 done
2235fi
2236eval ac_res=\$$3
Illia Bobyra96d5442023-08-30 16:30:15 +02002237 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2238printf "%s\n" "$ac_res" >&6; }
Mike Gilberta055b442023-08-20 19:01:41 +02002239 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2240
2241} # ac_fn_c_find_uintX_t
Illia Bobyra96d5442023-08-30 16:30:15 +02002242ac_configure_args_raw=
2243for ac_arg
2244do
2245 case $ac_arg in
2246 *\'*)
2247 ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2248 esac
2249 as_fn_append ac_configure_args_raw " '$ac_arg'"
2250done
2251
2252case $ac_configure_args_raw in
2253 *$as_nl*)
2254 ac_safe_unquote= ;;
2255 *)
2256 ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab.
2257 ac_unsafe_a="$ac_unsafe_z#~"
2258 ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
2259 ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
2260esac
2261
Bram Moolenaar446cb832008-06-24 21:56:24 +00002262cat >auto/config.log <<_ACEOF
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002263This file contains any messages produced by compilers while
2264running configure, to aid debugging if configure makes a mistake.
2265
2266It was created by $as_me, which was
Illia Bobyra96d5442023-08-30 16:30:15 +02002267generated by GNU Autoconf 2.71. Invocation command line was
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002268
Illia Bobyra96d5442023-08-30 16:30:15 +02002269 $ $0$ac_configure_args_raw
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002270
2271_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +00002272exec 5>>auto/config.log
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002273{
2274cat <<_ASUNAME
2275## --------- ##
2276## Platform. ##
2277## --------- ##
2278
2279hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2280uname -m = `(uname -m) 2>/dev/null || echo unknown`
2281uname -r = `(uname -r) 2>/dev/null || echo unknown`
2282uname -s = `(uname -s) 2>/dev/null || echo unknown`
2283uname -v = `(uname -v) 2>/dev/null || echo unknown`
2284
2285/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2286/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2287
2288/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2289/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2290/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Bram Moolenaar446cb832008-06-24 21:56:24 +00002291/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002292/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2293/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2294/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2295
2296_ASUNAME
2297
2298as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2299for as_dir in $PATH
2300do
2301 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02002302 case $as_dir in #(((
2303 '') as_dir=./ ;;
2304 */) ;;
2305 *) as_dir=$as_dir/ ;;
2306 esac
2307 printf "%s\n" "PATH: $as_dir"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002308 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00002309IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002310
2311} >&5
2312
2313cat >&5 <<_ACEOF
2314
2315
2316## ----------- ##
2317## Core tests. ##
2318## ----------- ##
2319
2320_ACEOF
2321
2322
2323# Keep a trace of the command line.
2324# Strip out --no-create and --no-recursion so they do not pile up.
2325# Strip out --silent because we don't want to record it for future runs.
2326# Also quote any args containing shell meta-characters.
2327# Make two passes to allow for proper duplicate-argument suppression.
2328ac_configure_args=
2329ac_configure_args0=
2330ac_configure_args1=
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002331ac_must_keep_next=false
2332for ac_pass in 1 2
2333do
2334 for ac_arg
2335 do
2336 case $ac_arg in
2337 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2338 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2339 | -silent | --silent | --silen | --sile | --sil)
2340 continue ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +00002341 *\'*)
Illia Bobyra96d5442023-08-30 16:30:15 +02002342 ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002343 esac
2344 case $ac_pass in
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002345 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002346 2)
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002347 as_fn_append ac_configure_args1 " '$ac_arg'"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002348 if test $ac_must_keep_next = true; then
2349 ac_must_keep_next=false # Got value, back to normal.
2350 else
2351 case $ac_arg in
2352 *=* | --config-cache | -C | -disable-* | --disable-* \
2353 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2354 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2355 | -with-* | --with-* | -without-* | --without-* | --x)
2356 case "$ac_configure_args0 " in
2357 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2358 esac
2359 ;;
2360 -* ) ac_must_keep_next=true ;;
2361 esac
2362 fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002363 as_fn_append ac_configure_args " '$ac_arg'"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002364 ;;
2365 esac
2366 done
2367done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002368{ ac_configure_args0=; unset ac_configure_args0;}
2369{ ac_configure_args1=; unset ac_configure_args1;}
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002370
2371# When interrupted or exit'd, cleanup temporary files, and complete
2372# config.log. We remove comments because anyway the quotes in there
2373# would cause problems or look ugly.
Bram Moolenaar446cb832008-06-24 21:56:24 +00002374# WARNING: Use '\'' to represent an apostrophe within the trap.
2375# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002376trap 'exit_status=$?
Illia Bobyra96d5442023-08-30 16:30:15 +02002377 # Sanitize IFS.
2378 IFS=" "" $as_nl"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002379 # Save into config.log some information that might help in debugging.
2380 {
2381 echo
2382
Illia Bobyra96d5442023-08-30 16:30:15 +02002383 printf "%s\n" "## ---------------- ##
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002384## Cache variables. ##
Bram Moolenaar7db77842014-03-27 17:40:59 +01002385## ---------------- ##"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002386 echo
2387 # The following way of writing the cache mishandles newlines in values,
Bram Moolenaar446cb832008-06-24 21:56:24 +00002388(
2389 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2390 eval ac_val=\$$ac_var
2391 case $ac_val in #(
2392 *${as_nl}*)
2393 case $ac_var in #(
Illia Bobyra96d5442023-08-30 16:30:15 +02002394 *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2395printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +00002396 esac
2397 case $ac_var in #(
2398 _ | IFS | as_nl) ;; #(
2399 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002400 *) { eval $ac_var=; unset $ac_var;} ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +00002401 esac ;;
2402 esac
2403 done
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002404 (set) 2>&1 |
Bram Moolenaar446cb832008-06-24 21:56:24 +00002405 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2406 *${as_nl}ac_space=\ *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002407 sed -n \
Bram Moolenaar446cb832008-06-24 21:56:24 +00002408 "s/'\''/'\''\\\\'\'''\''/g;
2409 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2410 ;; #(
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002411 *)
Bram Moolenaar446cb832008-06-24 21:56:24 +00002412 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002413 ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +00002414 esac |
2415 sort
2416)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002417 echo
2418
Illia Bobyra96d5442023-08-30 16:30:15 +02002419 printf "%s\n" "## ----------------- ##
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002420## Output variables. ##
Bram Moolenaar7db77842014-03-27 17:40:59 +01002421## ----------------- ##"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002422 echo
2423 for ac_var in $ac_subst_vars
2424 do
Bram Moolenaar446cb832008-06-24 21:56:24 +00002425 eval ac_val=\$$ac_var
2426 case $ac_val in
Illia Bobyra96d5442023-08-30 16:30:15 +02002427 *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Bram Moolenaar446cb832008-06-24 21:56:24 +00002428 esac
Illia Bobyra96d5442023-08-30 16:30:15 +02002429 printf "%s\n" "$ac_var='\''$ac_val'\''"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002430 done | sort
2431 echo
2432
2433 if test -n "$ac_subst_files"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02002434 printf "%s\n" "## ------------------- ##
Bram Moolenaar446cb832008-06-24 21:56:24 +00002435## File substitutions. ##
Bram Moolenaar7db77842014-03-27 17:40:59 +01002436## ------------------- ##"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002437 echo
2438 for ac_var in $ac_subst_files
2439 do
Bram Moolenaar446cb832008-06-24 21:56:24 +00002440 eval ac_val=\$$ac_var
2441 case $ac_val in
Illia Bobyra96d5442023-08-30 16:30:15 +02002442 *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Bram Moolenaar446cb832008-06-24 21:56:24 +00002443 esac
Illia Bobyra96d5442023-08-30 16:30:15 +02002444 printf "%s\n" "$ac_var='\''$ac_val'\''"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002445 done | sort
2446 echo
2447 fi
2448
2449 if test -s confdefs.h; then
Illia Bobyra96d5442023-08-30 16:30:15 +02002450 printf "%s\n" "## ----------- ##
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002451## confdefs.h. ##
Bram Moolenaar7db77842014-03-27 17:40:59 +01002452## ----------- ##"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002453 echo
Bram Moolenaar446cb832008-06-24 21:56:24 +00002454 cat confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002455 echo
2456 fi
2457 test "$ac_signal" != 0 &&
Illia Bobyra96d5442023-08-30 16:30:15 +02002458 printf "%s\n" "$as_me: caught signal $ac_signal"
2459 printf "%s\n" "$as_me: exit $exit_status"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002460 } >&5
Bram Moolenaar446cb832008-06-24 21:56:24 +00002461 rm -f core *.core core.conftest.* &&
2462 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002463 exit $exit_status
Bram Moolenaar446cb832008-06-24 21:56:24 +00002464' 0
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002465for ac_signal in 1 2 13 15; do
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002466 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002467done
2468ac_signal=0
2469
2470# confdefs.h avoids OS command line length limits that DEFS can exceed.
Bram Moolenaar446cb832008-06-24 21:56:24 +00002471rm -f -r conftest* confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002472
Illia Bobyra96d5442023-08-30 16:30:15 +02002473printf "%s\n" "/* confdefs.h */" > confdefs.h
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002474
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002475# Predefined preprocessor variables.
2476
Illia Bobyra96d5442023-08-30 16:30:15 +02002477printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002478
Illia Bobyra96d5442023-08-30 16:30:15 +02002479printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002480
Illia Bobyra96d5442023-08-30 16:30:15 +02002481printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002482
Illia Bobyra96d5442023-08-30 16:30:15 +02002483printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002484
Illia Bobyra96d5442023-08-30 16:30:15 +02002485printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002486
Illia Bobyra96d5442023-08-30 16:30:15 +02002487printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002488
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002489
2490# Let the site file select an alternate cache file if it wants to.
Bram Moolenaar446cb832008-06-24 21:56:24 +00002491# Prefer an explicitly selected file to automatically selected ones.
Bram Moolenaar446cb832008-06-24 21:56:24 +00002492if test -n "$CONFIG_SITE"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02002493 ac_site_files="$CONFIG_SITE"
Bram Moolenaar446cb832008-06-24 21:56:24 +00002494elif test "x$prefix" != xNONE; then
Illia Bobyra96d5442023-08-30 16:30:15 +02002495 ac_site_files="$prefix/share/config.site $prefix/etc/config.site"
Bram Moolenaar446cb832008-06-24 21:56:24 +00002496else
Illia Bobyra96d5442023-08-30 16:30:15 +02002497 ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
Bram Moolenaar071d4272004-06-13 20:20:40 +00002498fi
Illia Bobyra96d5442023-08-30 16:30:15 +02002499
2500for ac_site_file in $ac_site_files
Bram Moolenaar446cb832008-06-24 21:56:24 +00002501do
Illia Bobyra96d5442023-08-30 16:30:15 +02002502 case $ac_site_file in #(
2503 */*) :
2504 ;; #(
2505 *) :
2506 ac_site_file=./$ac_site_file ;;
2507esac
2508 if test -f "$ac_site_file" && test -r "$ac_site_file"; then
2509 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2510printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002511 sed 's/^/| /' "$ac_site_file" >&5
Bram Moolenaar7db77842014-03-27 17:40:59 +01002512 . "$ac_site_file" \
Illia Bobyra96d5442023-08-30 16:30:15 +02002513 || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2514printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +01002515as_fn_error $? "failed to load site script $ac_site_file
2516See \`config.log' for more details" "$LINENO" 5; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00002517 fi
2518done
2519
2520if test -r "$cache_file"; then
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002521 # Some versions of bash will fail to source /dev/null (special files
2522 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2523 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02002524 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2525printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002526 case $cache_file in
Bram Moolenaar446cb832008-06-24 21:56:24 +00002527 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2528 *) . "./$cache_file";;
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002529 esac
2530 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00002531else
Illia Bobyra96d5442023-08-30 16:30:15 +02002532 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2533printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002534 >$cache_file
2535fi
2536
Illia Bobyra96d5442023-08-30 16:30:15 +02002537# Test code for whether the C compiler supports C89 (global declarations)
2538ac_c_conftest_c89_globals='
2539/* Does the compiler advertise C89 conformance?
2540 Do not test the value of __STDC__, because some compilers set it to 0
2541 while being otherwise adequately conformant. */
2542#if !defined __STDC__
2543# error "Compiler does not advertise C89 conformance"
Bram Moolenaar071d4272004-06-13 20:20:40 +00002544#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +00002545
Illia Bobyra96d5442023-08-30 16:30:15 +02002546#include <stddef.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002547#include <stdarg.h>
Bram Moolenaar7db77842014-03-27 17:40:59 +01002548struct stat;
Illia Bobyra96d5442023-08-30 16:30:15 +02002549/* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002550struct buf { int x; };
Illia Bobyra96d5442023-08-30 16:30:15 +02002551struct buf * (*rcsopen) (struct buf *, struct stat *, int);
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002552static char *e (p, i)
2553 char **p;
2554 int i;
2555{
2556 return p[i];
2557}
2558static char *f (char * (*g) (char **, int), char **p, ...)
2559{
2560 char *s;
2561 va_list v;
2562 va_start (v,p);
2563 s = g (p, va_arg (v,int));
2564 va_end (v);
2565 return s;
2566}
2567
2568/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
Illia Bobyra96d5442023-08-30 16:30:15 +02002569 function prototypes and stuff, but not \xHH hex character constants.
2570 These do not provoke an error unfortunately, instead are silently treated
2571 as an "x". The following induces an error, until -std is added to get
2572 proper ANSI mode. Curiously \x00 != x always comes out true, for an
2573 array size at least. It is necessary to write \x00 == 0 to get something
2574 that is true only with -std. */
2575int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1];
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002576
Bram Moolenaar446cb832008-06-24 21:56:24 +00002577/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
2578 inside strings and character constants. */
Illia Bobyra96d5442023-08-30 16:30:15 +02002579#define FOO(x) '\''x'\''
2580int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1];
Bram Moolenaar446cb832008-06-24 21:56:24 +00002581
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002582int test (int i, double x);
2583struct s1 {int (*f) (int a);};
2584struct s2 {int (*f) (double a);};
Illia Bobyra96d5442023-08-30 16:30:15 +02002585int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int),
2586 int, int);'
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002587
Illia Bobyra96d5442023-08-30 16:30:15 +02002588# Test code for whether the C compiler supports C89 (body of main).
2589ac_c_conftest_c89_main='
2590ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
2591'
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002592
Illia Bobyra96d5442023-08-30 16:30:15 +02002593# Test code for whether the C compiler supports C99 (global declarations)
2594ac_c_conftest_c99_globals='
2595// Does the compiler advertise C99 conformance?
2596#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
2597# error "Compiler does not advertise C99 conformance"
2598#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002599
Bram Moolenaar22640082018-04-19 20:39:41 +02002600#include <stdbool.h>
Illia Bobyra96d5442023-08-30 16:30:15 +02002601extern int puts (const char *);
2602extern int printf (const char *, ...);
2603extern int dprintf (int, const char *, ...);
2604extern void *malloc (size_t);
Bram Moolenaar22640082018-04-19 20:39:41 +02002605
2606// Check varargs macros. These examples are taken from C99 6.10.3.5.
Illia Bobyra96d5442023-08-30 16:30:15 +02002607// dprintf is used instead of fprintf to avoid needing to declare
2608// FILE and stderr.
2609#define debug(...) dprintf (2, __VA_ARGS__)
Bram Moolenaar22640082018-04-19 20:39:41 +02002610#define showlist(...) puts (#__VA_ARGS__)
2611#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
2612static void
2613test_varargs_macros (void)
Bram Moolenaar2e324952018-04-14 14:37:07 +02002614{
Bram Moolenaar22640082018-04-19 20:39:41 +02002615 int x = 1234;
2616 int y = 5678;
2617 debug ("Flag");
2618 debug ("X = %d\n", x);
2619 showlist (The first, second, and third items.);
2620 report (x>y, "x is %d but y is %d", x, y);
Bram Moolenaar2e324952018-04-14 14:37:07 +02002621}
2622
Bram Moolenaar22640082018-04-19 20:39:41 +02002623// Check long long types.
2624#define BIG64 18446744073709551615ull
2625#define BIG32 4294967295ul
2626#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
2627#if !BIG_OK
Illia Bobyra96d5442023-08-30 16:30:15 +02002628 #error "your preprocessor is broken"
Bram Moolenaar22640082018-04-19 20:39:41 +02002629#endif
2630#if BIG_OK
2631#else
Illia Bobyra96d5442023-08-30 16:30:15 +02002632 #error "your preprocessor is broken"
Bram Moolenaar22640082018-04-19 20:39:41 +02002633#endif
2634static long long int bignum = -9223372036854775807LL;
2635static unsigned long long int ubignum = BIG64;
Bram Moolenaar2e324952018-04-14 14:37:07 +02002636
Bram Moolenaar22640082018-04-19 20:39:41 +02002637struct incomplete_array
2638{
2639 int datasize;
2640 double data[];
2641};
Bram Moolenaar2e324952018-04-14 14:37:07 +02002642
Bram Moolenaar22640082018-04-19 20:39:41 +02002643struct named_init {
2644 int number;
2645 const wchar_t *name;
2646 double average;
2647};
2648
2649typedef const char *ccp;
2650
2651static inline int
2652test_restrict (ccp restrict text)
2653{
2654 // See if C++-style comments work.
2655 // Iterate through items via the restricted pointer.
2656 // Also check for declarations in for loops.
Illia Bobyra96d5442023-08-30 16:30:15 +02002657 for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
Bram Moolenaar22640082018-04-19 20:39:41 +02002658 continue;
2659 return 0;
2660}
2661
2662// Check varargs and va_copy.
Illia Bobyra96d5442023-08-30 16:30:15 +02002663static bool
Bram Moolenaar22640082018-04-19 20:39:41 +02002664test_varargs (const char *format, ...)
2665{
2666 va_list args;
2667 va_start (args, format);
2668 va_list args_copy;
2669 va_copy (args_copy, args);
2670
Illia Bobyra96d5442023-08-30 16:30:15 +02002671 const char *str = "";
2672 int number = 0;
2673 float fnumber = 0;
Bram Moolenaar22640082018-04-19 20:39:41 +02002674
2675 while (*format)
2676 {
2677 switch (*format++)
2678 {
Illia Bobyra96d5442023-08-30 16:30:15 +02002679 case '\''s'\'': // string
Bram Moolenaar22640082018-04-19 20:39:41 +02002680 str = va_arg (args_copy, const char *);
2681 break;
Illia Bobyra96d5442023-08-30 16:30:15 +02002682 case '\''d'\'': // int
Bram Moolenaar22640082018-04-19 20:39:41 +02002683 number = va_arg (args_copy, int);
2684 break;
Illia Bobyra96d5442023-08-30 16:30:15 +02002685 case '\''f'\'': // float
Bram Moolenaar22640082018-04-19 20:39:41 +02002686 fnumber = va_arg (args_copy, double);
2687 break;
2688 default:
2689 break;
2690 }
2691 }
2692 va_end (args_copy);
2693 va_end (args);
Illia Bobyra96d5442023-08-30 16:30:15 +02002694
2695 return *str && number && fnumber;
Bram Moolenaar22640082018-04-19 20:39:41 +02002696}
Illia Bobyra96d5442023-08-30 16:30:15 +02002697'
Bram Moolenaar22640082018-04-19 20:39:41 +02002698
Illia Bobyra96d5442023-08-30 16:30:15 +02002699# Test code for whether the C compiler supports C99 (body of main).
2700ac_c_conftest_c99_main='
Bram Moolenaar22640082018-04-19 20:39:41 +02002701 // Check bool.
2702 _Bool success = false;
Illia Bobyra96d5442023-08-30 16:30:15 +02002703 success |= (argc != 0);
Bram Moolenaar22640082018-04-19 20:39:41 +02002704
2705 // Check restrict.
2706 if (test_restrict ("String literal") == 0)
2707 success = true;
2708 char *restrict newvar = "Another string";
2709
2710 // Check varargs.
Illia Bobyra96d5442023-08-30 16:30:15 +02002711 success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234);
Bram Moolenaar22640082018-04-19 20:39:41 +02002712 test_varargs_macros ();
2713
2714 // Check flexible array members.
2715 struct incomplete_array *ia =
2716 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
2717 ia->datasize = 10;
2718 for (int i = 0; i < ia->datasize; ++i)
2719 ia->data[i] = i * 1.234;
2720
2721 // Check named initializers.
2722 struct named_init ni = {
2723 .number = 34,
2724 .name = L"Test wide string",
2725 .average = 543.34343,
2726 };
2727
2728 ni.number = 58;
2729
2730 int dynamic_array[ni.number];
Illia Bobyra96d5442023-08-30 16:30:15 +02002731 dynamic_array[0] = argv[0][0];
Bram Moolenaar22640082018-04-19 20:39:41 +02002732 dynamic_array[ni.number - 1] = 543;
2733
2734 // work around unused variable warnings
Illia Bobyra96d5442023-08-30 16:30:15 +02002735 ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\''
2736 || dynamic_array[ni.number - 1] != 543);
2737'
2738
2739# Test code for whether the C compiler supports C11 (global declarations)
2740ac_c_conftest_c11_globals='
2741// Does the compiler advertise C11 conformance?
2742#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
2743# error "Compiler does not advertise C11 conformance"
2744#endif
2745
2746// Check _Alignas.
2747char _Alignas (double) aligned_as_double;
2748char _Alignas (0) no_special_alignment;
2749extern char aligned_as_int;
2750char _Alignas (0) _Alignas (int) aligned_as_int;
2751
2752// Check _Alignof.
2753enum
2754{
2755 int_alignment = _Alignof (int),
2756 int_array_alignment = _Alignof (int[100]),
2757 char_alignment = _Alignof (char)
2758};
2759_Static_assert (0 < -_Alignof (int), "_Alignof is signed");
2760
2761// Check _Noreturn.
2762int _Noreturn does_not_return (void) { for (;;) continue; }
2763
2764// Check _Static_assert.
2765struct test_static_assert
2766{
2767 int x;
2768 _Static_assert (sizeof (int) <= sizeof (long int),
2769 "_Static_assert does not work in struct");
2770 long int y;
2771};
2772
2773// Check UTF-8 literals.
2774#define u8 syntax error!
2775char const utf8_literal[] = u8"happens to be ASCII" "another string";
2776
2777// Check duplicate typedefs.
2778typedef long *long_ptr;
2779typedef long int *long_ptr;
2780typedef long_ptr long_ptr;
2781
2782// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
2783struct anonymous
2784{
2785 union {
2786 struct { int i; int j; };
2787 struct { int k; long int l; } w;
2788 };
2789 int m;
2790} v1;
2791'
2792
2793# Test code for whether the C compiler supports C11 (body of main).
2794ac_c_conftest_c11_main='
2795 _Static_assert ((offsetof (struct anonymous, i)
2796 == offsetof (struct anonymous, w.k)),
2797 "Anonymous union alignment botch");
2798 v1.i = 2;
2799 v1.w.k = 5;
2800 ok |= v1.i != 5;
2801'
2802
2803# Test code for whether the C compiler supports C11 (complete).
2804ac_c_conftest_c11_program="${ac_c_conftest_c89_globals}
2805${ac_c_conftest_c99_globals}
2806${ac_c_conftest_c11_globals}
2807
2808int
2809main (int argc, char **argv)
2810{
2811 int ok = 0;
2812 ${ac_c_conftest_c89_main}
2813 ${ac_c_conftest_c99_main}
2814 ${ac_c_conftest_c11_main}
2815 return ok;
2816}
2817"
2818
2819# Test code for whether the C compiler supports C99 (complete).
2820ac_c_conftest_c99_program="${ac_c_conftest_c89_globals}
2821${ac_c_conftest_c99_globals}
2822
2823int
2824main (int argc, char **argv)
2825{
2826 int ok = 0;
2827 ${ac_c_conftest_c89_main}
2828 ${ac_c_conftest_c99_main}
2829 return ok;
2830}
2831"
2832
2833# Test code for whether the C compiler supports C89 (complete).
2834ac_c_conftest_c89_program="${ac_c_conftest_c89_globals}
2835
2836int
2837main (int argc, char **argv)
2838{
2839 int ok = 0;
2840 ${ac_c_conftest_c89_main}
2841 return ok;
2842}
2843"
2844
2845as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H"
2846as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H"
2847as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H"
2848as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
2849as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
2850as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
2851as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
2852as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
2853as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
2854as_fn_append ac_header_c_list " sys/time.h sys_time_h HAVE_SYS_TIME_H"
2855as_fn_append ac_header_c_list " sys/select.h sys_select_h HAVE_SYS_SELECT_H"
2856as_fn_append ac_header_c_list " sys/socket.h sys_socket_h HAVE_SYS_SOCKET_H"
2857# Check that the precious variables saved in the cache have kept the same
2858# value.
2859ac_cache_corrupted=false
2860for ac_var in $ac_precious_vars; do
2861 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2862 eval ac_new_set=\$ac_env_${ac_var}_set
2863 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2864 eval ac_new_val=\$ac_env_${ac_var}_value
2865 case $ac_old_set,$ac_new_set in
2866 set,)
2867 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2868printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2869 ac_cache_corrupted=: ;;
2870 ,set)
2871 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2872printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2873 ac_cache_corrupted=: ;;
2874 ,);;
2875 *)
2876 if test "x$ac_old_val" != "x$ac_new_val"; then
2877 # differences in whitespace do not lead to failure.
2878 ac_old_val_w=`echo x $ac_old_val`
2879 ac_new_val_w=`echo x $ac_new_val`
2880 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2881 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2882printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2883 ac_cache_corrupted=:
2884 else
2885 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2886printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2887 eval $ac_var=\$ac_old_val
2888 fi
2889 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2890printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;}
2891 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2892printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;}
2893 fi;;
2894 esac
2895 # Pass precious variables to config.status.
2896 if test "$ac_new_set" = set; then
2897 case $ac_new_val in
2898 *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2899 *) ac_arg=$ac_var=$ac_new_val ;;
2900 esac
2901 case " $ac_configure_args " in
2902 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2903 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2904 esac
2905 fi
2906done
2907if $ac_cache_corrupted; then
2908 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2909printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
2910 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2911printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
2912 as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file'
2913 and start over" "$LINENO" 5
2914fi
2915## -------------------- ##
2916## Main body of script. ##
2917## -------------------- ##
2918
2919ac_ext=c
2920ac_cpp='$CPP $CPPFLAGS'
2921ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2922ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2923ac_compiler_gnu=$ac_cv_c_compiler_gnu
2924
2925
2926
2927ac_config_headers="$ac_config_headers auto/config.h:config.h.in"
2928
2929
2930printf "%s\n" "#define UNIX 1" >>confdefs.h
2931
2932{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
2933printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
2934set x ${MAKE-make}
2935ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
2936if eval test \${ac_cv_prog_make_${ac_make}_set+y}
2937then :
2938 printf %s "(cached) " >&6
2939else $as_nop
2940 cat >conftest.make <<\_ACEOF
2941SHELL = /bin/sh
2942all:
2943 @echo '@@@%%%=$(MAKE)=@@@%%%'
2944_ACEOF
2945# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
2946case `${MAKE-make} -f conftest.make 2>/dev/null` in
2947 *@@@%%%=?*=@@@%%%*)
2948 eval ac_cv_prog_make_${ac_make}_set=yes;;
2949 *)
2950 eval ac_cv_prog_make_${ac_make}_set=no;;
2951esac
2952rm -f conftest.make
2953fi
2954if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
2955 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
2956printf "%s\n" "yes" >&6; }
2957 SET_MAKE=
2958else
2959 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
2960printf "%s\n" "no" >&6; }
2961 SET_MAKE="MAKE=${MAKE-make}"
2962fi
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974ac_ext=c
2975ac_cpp='$CPP $CPPFLAGS'
2976ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2977ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2978ac_compiler_gnu=$ac_cv_c_compiler_gnu
2979if test -n "$ac_tool_prefix"; then
2980 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2981set dummy ${ac_tool_prefix}gcc; ac_word=$2
2982{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2983printf %s "checking for $ac_word... " >&6; }
2984if test ${ac_cv_prog_CC+y}
2985then :
2986 printf %s "(cached) " >&6
2987else $as_nop
2988 if test -n "$CC"; then
2989 ac_cv_prog_CC="$CC" # Let the user override the test.
2990else
2991as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2992for as_dir in $PATH
2993do
2994 IFS=$as_save_IFS
2995 case $as_dir in #(((
2996 '') as_dir=./ ;;
2997 */) ;;
2998 *) as_dir=$as_dir/ ;;
2999 esac
3000 for ac_exec_ext in '' $ac_executable_extensions; do
3001 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3002 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3003 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3004 break 2
3005 fi
3006done
3007 done
3008IFS=$as_save_IFS
3009
3010fi
3011fi
3012CC=$ac_cv_prog_CC
3013if test -n "$CC"; then
3014 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3015printf "%s\n" "$CC" >&6; }
3016else
3017 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3018printf "%s\n" "no" >&6; }
3019fi
3020
3021
3022fi
3023if test -z "$ac_cv_prog_CC"; then
3024 ac_ct_CC=$CC
3025 # Extract the first word of "gcc", so it can be a program name with args.
3026set dummy gcc; ac_word=$2
3027{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3028printf %s "checking for $ac_word... " >&6; }
3029if test ${ac_cv_prog_ac_ct_CC+y}
3030then :
3031 printf %s "(cached) " >&6
3032else $as_nop
3033 if test -n "$ac_ct_CC"; then
3034 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3035else
3036as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3037for as_dir in $PATH
3038do
3039 IFS=$as_save_IFS
3040 case $as_dir in #(((
3041 '') as_dir=./ ;;
3042 */) ;;
3043 *) as_dir=$as_dir/ ;;
3044 esac
3045 for ac_exec_ext in '' $ac_executable_extensions; do
3046 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3047 ac_cv_prog_ac_ct_CC="gcc"
3048 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3049 break 2
3050 fi
3051done
3052 done
3053IFS=$as_save_IFS
3054
3055fi
3056fi
3057ac_ct_CC=$ac_cv_prog_ac_ct_CC
3058if test -n "$ac_ct_CC"; then
3059 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3060printf "%s\n" "$ac_ct_CC" >&6; }
3061else
3062 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3063printf "%s\n" "no" >&6; }
3064fi
3065
3066 if test "x$ac_ct_CC" = x; then
3067 CC=""
3068 else
3069 case $cross_compiling:$ac_tool_warned in
3070yes:)
3071{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3072printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3073ac_tool_warned=yes ;;
3074esac
3075 CC=$ac_ct_CC
3076 fi
3077else
3078 CC="$ac_cv_prog_CC"
3079fi
3080
3081if test -z "$CC"; then
3082 if test -n "$ac_tool_prefix"; then
3083 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3084set dummy ${ac_tool_prefix}cc; ac_word=$2
3085{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3086printf %s "checking for $ac_word... " >&6; }
3087if test ${ac_cv_prog_CC+y}
3088then :
3089 printf %s "(cached) " >&6
3090else $as_nop
3091 if test -n "$CC"; then
3092 ac_cv_prog_CC="$CC" # Let the user override the test.
3093else
3094as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3095for as_dir in $PATH
3096do
3097 IFS=$as_save_IFS
3098 case $as_dir in #(((
3099 '') as_dir=./ ;;
3100 */) ;;
3101 *) as_dir=$as_dir/ ;;
3102 esac
3103 for ac_exec_ext in '' $ac_executable_extensions; do
3104 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3105 ac_cv_prog_CC="${ac_tool_prefix}cc"
3106 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3107 break 2
3108 fi
3109done
3110 done
3111IFS=$as_save_IFS
3112
3113fi
3114fi
3115CC=$ac_cv_prog_CC
3116if test -n "$CC"; then
3117 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3118printf "%s\n" "$CC" >&6; }
3119else
3120 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3121printf "%s\n" "no" >&6; }
3122fi
3123
3124
3125 fi
3126fi
3127if test -z "$CC"; then
3128 # Extract the first word of "cc", so it can be a program name with args.
3129set dummy cc; ac_word=$2
3130{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3131printf %s "checking for $ac_word... " >&6; }
3132if test ${ac_cv_prog_CC+y}
3133then :
3134 printf %s "(cached) " >&6
3135else $as_nop
3136 if test -n "$CC"; then
3137 ac_cv_prog_CC="$CC" # Let the user override the test.
3138else
3139 ac_prog_rejected=no
3140as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3141for as_dir in $PATH
3142do
3143 IFS=$as_save_IFS
3144 case $as_dir in #(((
3145 '') as_dir=./ ;;
3146 */) ;;
3147 *) as_dir=$as_dir/ ;;
3148 esac
3149 for ac_exec_ext in '' $ac_executable_extensions; do
3150 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3151 if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3152 ac_prog_rejected=yes
3153 continue
3154 fi
3155 ac_cv_prog_CC="cc"
3156 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3157 break 2
3158 fi
3159done
3160 done
3161IFS=$as_save_IFS
3162
3163if test $ac_prog_rejected = yes; then
3164 # We found a bogon in the path, so make sure we never use it.
3165 set dummy $ac_cv_prog_CC
3166 shift
3167 if test $# != 0; then
3168 # We chose a different compiler from the bogus one.
3169 # However, it has the same basename, so the bogon will be chosen
3170 # first if we set CC to just the basename; use the full file name.
3171 shift
3172 ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
3173 fi
3174fi
3175fi
3176fi
3177CC=$ac_cv_prog_CC
3178if test -n "$CC"; then
3179 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3180printf "%s\n" "$CC" >&6; }
3181else
3182 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3183printf "%s\n" "no" >&6; }
3184fi
3185
3186
3187fi
3188if test -z "$CC"; then
3189 if test -n "$ac_tool_prefix"; then
3190 for ac_prog in cl.exe
3191 do
3192 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3193set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3194{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3195printf %s "checking for $ac_word... " >&6; }
3196if test ${ac_cv_prog_CC+y}
3197then :
3198 printf %s "(cached) " >&6
3199else $as_nop
3200 if test -n "$CC"; then
3201 ac_cv_prog_CC="$CC" # Let the user override the test.
3202else
3203as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3204for as_dir in $PATH
3205do
3206 IFS=$as_save_IFS
3207 case $as_dir in #(((
3208 '') as_dir=./ ;;
3209 */) ;;
3210 *) as_dir=$as_dir/ ;;
3211 esac
3212 for ac_exec_ext in '' $ac_executable_extensions; do
3213 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3214 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3215 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3216 break 2
3217 fi
3218done
3219 done
3220IFS=$as_save_IFS
3221
3222fi
3223fi
3224CC=$ac_cv_prog_CC
3225if test -n "$CC"; then
3226 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3227printf "%s\n" "$CC" >&6; }
3228else
3229 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3230printf "%s\n" "no" >&6; }
3231fi
3232
3233
3234 test -n "$CC" && break
3235 done
3236fi
3237if test -z "$CC"; then
3238 ac_ct_CC=$CC
3239 for ac_prog in cl.exe
3240do
3241 # Extract the first word of "$ac_prog", so it can be a program name with args.
3242set dummy $ac_prog; ac_word=$2
3243{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3244printf %s "checking for $ac_word... " >&6; }
3245if test ${ac_cv_prog_ac_ct_CC+y}
3246then :
3247 printf %s "(cached) " >&6
3248else $as_nop
3249 if test -n "$ac_ct_CC"; then
3250 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3251else
3252as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3253for as_dir in $PATH
3254do
3255 IFS=$as_save_IFS
3256 case $as_dir in #(((
3257 '') as_dir=./ ;;
3258 */) ;;
3259 *) as_dir=$as_dir/ ;;
3260 esac
3261 for ac_exec_ext in '' $ac_executable_extensions; do
3262 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3263 ac_cv_prog_ac_ct_CC="$ac_prog"
3264 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3265 break 2
3266 fi
3267done
3268 done
3269IFS=$as_save_IFS
3270
3271fi
3272fi
3273ac_ct_CC=$ac_cv_prog_ac_ct_CC
3274if test -n "$ac_ct_CC"; then
3275 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3276printf "%s\n" "$ac_ct_CC" >&6; }
3277else
3278 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3279printf "%s\n" "no" >&6; }
3280fi
3281
3282
3283 test -n "$ac_ct_CC" && break
3284done
3285
3286 if test "x$ac_ct_CC" = x; then
3287 CC=""
3288 else
3289 case $cross_compiling:$ac_tool_warned in
3290yes:)
3291{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3292printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3293ac_tool_warned=yes ;;
3294esac
3295 CC=$ac_ct_CC
3296 fi
3297fi
3298
3299fi
3300if test -z "$CC"; then
3301 if test -n "$ac_tool_prefix"; then
3302 # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
3303set dummy ${ac_tool_prefix}clang; ac_word=$2
3304{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3305printf %s "checking for $ac_word... " >&6; }
3306if test ${ac_cv_prog_CC+y}
3307then :
3308 printf %s "(cached) " >&6
3309else $as_nop
3310 if test -n "$CC"; then
3311 ac_cv_prog_CC="$CC" # Let the user override the test.
3312else
3313as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3314for as_dir in $PATH
3315do
3316 IFS=$as_save_IFS
3317 case $as_dir in #(((
3318 '') as_dir=./ ;;
3319 */) ;;
3320 *) as_dir=$as_dir/ ;;
3321 esac
3322 for ac_exec_ext in '' $ac_executable_extensions; do
3323 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3324 ac_cv_prog_CC="${ac_tool_prefix}clang"
3325 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3326 break 2
3327 fi
3328done
3329 done
3330IFS=$as_save_IFS
3331
3332fi
3333fi
3334CC=$ac_cv_prog_CC
3335if test -n "$CC"; then
3336 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3337printf "%s\n" "$CC" >&6; }
3338else
3339 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3340printf "%s\n" "no" >&6; }
3341fi
3342
3343
3344fi
3345if test -z "$ac_cv_prog_CC"; then
3346 ac_ct_CC=$CC
3347 # Extract the first word of "clang", so it can be a program name with args.
3348set dummy clang; ac_word=$2
3349{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3350printf %s "checking for $ac_word... " >&6; }
3351if test ${ac_cv_prog_ac_ct_CC+y}
3352then :
3353 printf %s "(cached) " >&6
3354else $as_nop
3355 if test -n "$ac_ct_CC"; then
3356 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3357else
3358as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3359for as_dir in $PATH
3360do
3361 IFS=$as_save_IFS
3362 case $as_dir in #(((
3363 '') as_dir=./ ;;
3364 */) ;;
3365 *) as_dir=$as_dir/ ;;
3366 esac
3367 for ac_exec_ext in '' $ac_executable_extensions; do
3368 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3369 ac_cv_prog_ac_ct_CC="clang"
3370 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3371 break 2
3372 fi
3373done
3374 done
3375IFS=$as_save_IFS
3376
3377fi
3378fi
3379ac_ct_CC=$ac_cv_prog_ac_ct_CC
3380if test -n "$ac_ct_CC"; then
3381 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3382printf "%s\n" "$ac_ct_CC" >&6; }
3383else
3384 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3385printf "%s\n" "no" >&6; }
3386fi
3387
3388 if test "x$ac_ct_CC" = x; then
3389 CC=""
3390 else
3391 case $cross_compiling:$ac_tool_warned in
3392yes:)
3393{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3394printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3395ac_tool_warned=yes ;;
3396esac
3397 CC=$ac_ct_CC
3398 fi
3399else
3400 CC="$ac_cv_prog_CC"
3401fi
3402
3403fi
3404
3405
3406test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3407printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3408as_fn_error $? "no acceptable C compiler found in \$PATH
3409See \`config.log' for more details" "$LINENO" 5; }
3410
3411# Provide some information about the compiler.
3412printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3413set X $ac_compile
3414ac_compiler=$2
3415for ac_option in --version -v -V -qversion -version; do
3416 { { ac_try="$ac_compiler $ac_option >&5"
3417case "(($ac_try" in
3418 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3419 *) ac_try_echo=$ac_try;;
3420esac
3421eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3422printf "%s\n" "$ac_try_echo"; } >&5
3423 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3424 ac_status=$?
3425 if test -s conftest.err; then
3426 sed '10a\
3427... rest of stderr output deleted ...
3428 10q' conftest.err >conftest.er1
3429 cat conftest.er1 >&5
3430 fi
3431 rm -f conftest.er1 conftest.err
3432 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3433 test $ac_status = 0; }
3434done
3435
3436cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3437/* end confdefs.h. */
3438
3439int
3440main (void)
3441{
Bram Moolenaar22640082018-04-19 20:39:41 +02003442
Bram Moolenaar2e324952018-04-14 14:37:07 +02003443 ;
3444 return 0;
3445}
3446_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02003447ac_clean_files_save=$ac_clean_files
3448ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3449# Try to create an executable without -o first, disregard a.out.
3450# It will help us diagnose broken compilers, and finding out an intuition
3451# of exeext.
3452{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3453printf %s "checking whether the C compiler works... " >&6; }
3454ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3455
3456# The possible output files:
3457ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3458
3459ac_rmfiles=
3460for ac_file in $ac_files
3461do
3462 case $ac_file in
3463 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3464 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3465 esac
3466done
3467rm -f $ac_rmfiles
3468
3469if { { ac_try="$ac_link_default"
3470case "(($ac_try" in
3471 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3472 *) ac_try_echo=$ac_try;;
3473esac
3474eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3475printf "%s\n" "$ac_try_echo"; } >&5
3476 (eval "$ac_link_default") 2>&5
3477 ac_status=$?
3478 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3479 test $ac_status = 0; }
3480then :
3481 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3482# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3483# in a Makefile. We should not override ac_cv_exeext if it was cached,
3484# so that the user can short-circuit this test for compilers unknown to
3485# Autoconf.
3486for ac_file in $ac_files ''
3487do
3488 test -f "$ac_file" || continue
3489 case $ac_file in
3490 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3491 ;;
3492 [ab].out )
3493 # We found the default executable, but exeext='' is most
3494 # certainly right.
3495 break;;
3496 *.* )
3497 if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
3498 then :; else
3499 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3500 fi
3501 # We set ac_cv_exeext here because the later test for it is not
3502 # safe: cross compilers may not add the suffix if given an `-o'
3503 # argument, so we may need to know it at that point already.
3504 # Even if this section looks crufty: it has the advantage of
3505 # actually working.
3506 break;;
3507 * )
3508 break;;
3509 esac
3510done
3511test "$ac_cv_exeext" = no && ac_cv_exeext=
3512
3513else $as_nop
3514 ac_file=''
3515fi
3516if test -z "$ac_file"
3517then :
3518 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3519printf "%s\n" "no" >&6; }
3520printf "%s\n" "$as_me: failed program was:" >&5
3521sed 's/^/| /' conftest.$ac_ext >&5
3522
3523{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3524printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3525as_fn_error 77 "C compiler cannot create executables
3526See \`config.log' for more details" "$LINENO" 5; }
3527else $as_nop
3528 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3529printf "%s\n" "yes" >&6; }
3530fi
3531{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3532printf %s "checking for C compiler default output file name... " >&6; }
3533{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3534printf "%s\n" "$ac_file" >&6; }
3535ac_exeext=$ac_cv_exeext
3536
3537rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3538ac_clean_files=$ac_clean_files_save
3539{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3540printf %s "checking for suffix of executables... " >&6; }
3541if { { ac_try="$ac_link"
3542case "(($ac_try" in
3543 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3544 *) ac_try_echo=$ac_try;;
3545esac
3546eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3547printf "%s\n" "$ac_try_echo"; } >&5
3548 (eval "$ac_link") 2>&5
3549 ac_status=$?
3550 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3551 test $ac_status = 0; }
3552then :
3553 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3554# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3555# work properly (i.e., refer to `conftest.exe'), while it won't with
3556# `rm'.
3557for ac_file in conftest.exe conftest conftest.*; do
3558 test -f "$ac_file" || continue
3559 case $ac_file in
3560 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3561 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3562 break;;
3563 * ) break;;
3564 esac
3565done
3566else $as_nop
3567 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3568printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3569as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3570See \`config.log' for more details" "$LINENO" 5; }
3571fi
3572rm -f conftest conftest$ac_cv_exeext
3573{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3574printf "%s\n" "$ac_cv_exeext" >&6; }
3575
3576rm -f conftest.$ac_ext
3577EXEEXT=$ac_cv_exeext
3578ac_exeext=$EXEEXT
3579cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3580/* end confdefs.h. */
3581#include <stdio.h>
3582int
3583main (void)
3584{
3585FILE *f = fopen ("conftest.out", "w");
3586 return ferror (f) || fclose (f) != 0;
3587
3588 ;
3589 return 0;
3590}
3591_ACEOF
3592ac_clean_files="$ac_clean_files conftest.out"
3593# Check that the compiler produces executables we can run. If not, either
3594# the compiler is broken, or we cross compile.
3595{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3596printf %s "checking whether we are cross compiling... " >&6; }
3597if test "$cross_compiling" != yes; then
3598 { { ac_try="$ac_link"
3599case "(($ac_try" in
3600 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3601 *) ac_try_echo=$ac_try;;
3602esac
3603eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3604printf "%s\n" "$ac_try_echo"; } >&5
3605 (eval "$ac_link") 2>&5
3606 ac_status=$?
3607 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3608 test $ac_status = 0; }
3609 if { ac_try='./conftest$ac_cv_exeext'
3610 { { case "(($ac_try" in
3611 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3612 *) ac_try_echo=$ac_try;;
3613esac
3614eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3615printf "%s\n" "$ac_try_echo"; } >&5
3616 (eval "$ac_try") 2>&5
3617 ac_status=$?
3618 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3619 test $ac_status = 0; }; }; then
3620 cross_compiling=no
3621 else
3622 if test "$cross_compiling" = maybe; then
3623 cross_compiling=yes
3624 else
3625 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3626printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3627as_fn_error 77 "cannot run C compiled programs.
3628If you meant to cross compile, use \`--host'.
3629See \`config.log' for more details" "$LINENO" 5; }
3630 fi
3631 fi
3632fi
3633{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3634printf "%s\n" "$cross_compiling" >&6; }
3635
3636rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3637ac_clean_files=$ac_clean_files_save
3638{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3639printf %s "checking for suffix of object files... " >&6; }
3640if test ${ac_cv_objext+y}
3641then :
3642 printf %s "(cached) " >&6
3643else $as_nop
3644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3645/* end confdefs.h. */
3646
3647int
3648main (void)
3649{
3650
3651 ;
3652 return 0;
3653}
3654_ACEOF
3655rm -f conftest.o conftest.obj
3656if { { ac_try="$ac_compile"
3657case "(($ac_try" in
3658 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3659 *) ac_try_echo=$ac_try;;
3660esac
3661eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3662printf "%s\n" "$ac_try_echo"; } >&5
3663 (eval "$ac_compile") 2>&5
3664 ac_status=$?
3665 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3666 test $ac_status = 0; }
3667then :
3668 for ac_file in conftest.o conftest.obj conftest.*; do
3669 test -f "$ac_file" || continue;
3670 case $ac_file in
3671 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3672 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3673 break;;
3674 esac
3675done
3676else $as_nop
3677 printf "%s\n" "$as_me: failed program was:" >&5
3678sed 's/^/| /' conftest.$ac_ext >&5
3679
3680{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3681printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3682as_fn_error $? "cannot compute suffix of object files: cannot compile
3683See \`config.log' for more details" "$LINENO" 5; }
3684fi
3685rm -f conftest.$ac_cv_objext conftest.$ac_ext
3686fi
3687{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3688printf "%s\n" "$ac_cv_objext" >&6; }
3689OBJEXT=$ac_cv_objext
3690ac_objext=$OBJEXT
3691{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
3692printf %s "checking whether the compiler supports GNU C... " >&6; }
3693if test ${ac_cv_c_compiler_gnu+y}
3694then :
3695 printf %s "(cached) " >&6
3696else $as_nop
3697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3698/* end confdefs.h. */
3699
3700int
3701main (void)
3702{
3703#ifndef __GNUC__
3704 choke me
3705#endif
3706
3707 ;
3708 return 0;
3709}
3710_ACEOF
3711if ac_fn_c_try_compile "$LINENO"
3712then :
3713 ac_compiler_gnu=yes
3714else $as_nop
3715 ac_compiler_gnu=no
3716fi
3717rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3718ac_cv_c_compiler_gnu=$ac_compiler_gnu
3719
3720fi
3721{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3722printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
3723ac_compiler_gnu=$ac_cv_c_compiler_gnu
3724
3725if test $ac_compiler_gnu = yes; then
3726 GCC=yes
3727else
3728 GCC=
3729fi
3730ac_test_CFLAGS=${CFLAGS+y}
3731ac_save_CFLAGS=$CFLAGS
3732{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3733printf %s "checking whether $CC accepts -g... " >&6; }
3734if test ${ac_cv_prog_cc_g+y}
3735then :
3736 printf %s "(cached) " >&6
3737else $as_nop
3738 ac_save_c_werror_flag=$ac_c_werror_flag
3739 ac_c_werror_flag=yes
3740 ac_cv_prog_cc_g=no
3741 CFLAGS="-g"
3742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3743/* end confdefs.h. */
3744
3745int
3746main (void)
3747{
3748
3749 ;
3750 return 0;
3751}
3752_ACEOF
3753if ac_fn_c_try_compile "$LINENO"
3754then :
3755 ac_cv_prog_cc_g=yes
3756else $as_nop
3757 CFLAGS=""
3758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3759/* end confdefs.h. */
3760
3761int
3762main (void)
3763{
3764
3765 ;
3766 return 0;
3767}
3768_ACEOF
3769if ac_fn_c_try_compile "$LINENO"
3770then :
3771
3772else $as_nop
3773 ac_c_werror_flag=$ac_save_c_werror_flag
3774 CFLAGS="-g"
3775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3776/* end confdefs.h. */
3777
3778int
3779main (void)
3780{
3781
3782 ;
3783 return 0;
3784}
3785_ACEOF
3786if ac_fn_c_try_compile "$LINENO"
3787then :
3788 ac_cv_prog_cc_g=yes
3789fi
3790rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3791fi
3792rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3793fi
3794rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3795 ac_c_werror_flag=$ac_save_c_werror_flag
3796fi
3797{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3798printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
3799if test $ac_test_CFLAGS; then
3800 CFLAGS=$ac_save_CFLAGS
3801elif test $ac_cv_prog_cc_g = yes; then
3802 if test "$GCC" = yes; then
3803 CFLAGS="-g -O2"
3804 else
3805 CFLAGS="-g"
3806 fi
3807else
3808 if test "$GCC" = yes; then
3809 CFLAGS="-O2"
3810 else
3811 CFLAGS=
3812 fi
3813fi
3814ac_prog_cc_stdc=no
3815if test x$ac_prog_cc_stdc = xno
3816then :
3817 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
3818printf %s "checking for $CC option to enable C11 features... " >&6; }
3819if test ${ac_cv_prog_cc_c11+y}
3820then :
3821 printf %s "(cached) " >&6
3822else $as_nop
3823 ac_cv_prog_cc_c11=no
3824ac_save_CC=$CC
3825cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3826/* end confdefs.h. */
3827$ac_c_conftest_c11_program
3828_ACEOF
3829for ac_arg in '' -std=gnu11
Bram Moolenaar2e324952018-04-14 14:37:07 +02003830do
3831 CC="$ac_save_CC $ac_arg"
Illia Bobyra96d5442023-08-30 16:30:15 +02003832 if ac_fn_c_try_compile "$LINENO"
3833then :
3834 ac_cv_prog_cc_c11=$ac_arg
3835fi
3836rm -f core conftest.err conftest.$ac_objext conftest.beam
3837 test "x$ac_cv_prog_cc_c11" != "xno" && break
3838done
3839rm -f conftest.$ac_ext
3840CC=$ac_save_CC
3841fi
3842
3843if test "x$ac_cv_prog_cc_c11" = xno
3844then :
3845 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3846printf "%s\n" "unsupported" >&6; }
3847else $as_nop
3848 if test "x$ac_cv_prog_cc_c11" = x
3849then :
3850 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3851printf "%s\n" "none needed" >&6; }
3852else $as_nop
3853 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
3854printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
3855 CC="$CC $ac_cv_prog_cc_c11"
3856fi
3857 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
3858 ac_prog_cc_stdc=c11
3859fi
3860fi
3861if test x$ac_prog_cc_stdc = xno
3862then :
3863 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
3864printf %s "checking for $CC option to enable C99 features... " >&6; }
3865if test ${ac_cv_prog_cc_c99+y}
3866then :
3867 printf %s "(cached) " >&6
3868else $as_nop
3869 ac_cv_prog_cc_c99=no
3870ac_save_CC=$CC
3871cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3872/* end confdefs.h. */
3873$ac_c_conftest_c99_program
3874_ACEOF
3875for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
3876do
3877 CC="$ac_save_CC $ac_arg"
3878 if ac_fn_c_try_compile "$LINENO"
3879then :
Bram Moolenaar22640082018-04-19 20:39:41 +02003880 ac_cv_prog_cc_c99=$ac_arg
Bram Moolenaar2e324952018-04-14 14:37:07 +02003881fi
Illia Bobyra96d5442023-08-30 16:30:15 +02003882rm -f core conftest.err conftest.$ac_objext conftest.beam
Bram Moolenaar22640082018-04-19 20:39:41 +02003883 test "x$ac_cv_prog_cc_c99" != "xno" && break
Bram Moolenaar2e324952018-04-14 14:37:07 +02003884done
3885rm -f conftest.$ac_ext
3886CC=$ac_save_CC
Bram Moolenaar2e324952018-04-14 14:37:07 +02003887fi
3888
Illia Bobyra96d5442023-08-30 16:30:15 +02003889if test "x$ac_cv_prog_cc_c99" = xno
3890then :
3891 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3892printf "%s\n" "unsupported" >&6; }
3893else $as_nop
3894 if test "x$ac_cv_prog_cc_c99" = x
3895then :
3896 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3897printf "%s\n" "none needed" >&6; }
3898else $as_nop
3899 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
3900printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
3901 CC="$CC $ac_cv_prog_cc_c99"
3902fi
3903 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
3904 ac_prog_cc_stdc=c99
3905fi
3906fi
3907if test x$ac_prog_cc_stdc = xno
3908then :
3909 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
3910printf %s "checking for $CC option to enable C89 features... " >&6; }
3911if test ${ac_cv_prog_cc_c89+y}
3912then :
3913 printf %s "(cached) " >&6
3914else $as_nop
3915 ac_cv_prog_cc_c89=no
3916ac_save_CC=$CC
3917cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3918/* end confdefs.h. */
3919$ac_c_conftest_c89_program
3920_ACEOF
3921for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3922do
3923 CC="$ac_save_CC $ac_arg"
3924 if ac_fn_c_try_compile "$LINENO"
3925then :
3926 ac_cv_prog_cc_c89=$ac_arg
3927fi
3928rm -f core conftest.err conftest.$ac_objext conftest.beam
3929 test "x$ac_cv_prog_cc_c89" != "xno" && break
3930done
3931rm -f conftest.$ac_ext
3932CC=$ac_save_CC
3933fi
3934
3935if test "x$ac_cv_prog_cc_c89" = xno
3936then :
3937 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3938printf "%s\n" "unsupported" >&6; }
3939else $as_nop
3940 if test "x$ac_cv_prog_cc_c89" = x
3941then :
3942 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3943printf "%s\n" "none needed" >&6; }
3944else $as_nop
3945 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3946printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
3947 CC="$CC $ac_cv_prog_cc_c89"
3948fi
3949 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
3950 ac_prog_cc_stdc=c89
3951fi
3952fi
3953
3954ac_ext=c
3955ac_cpp='$CPP $CPPFLAGS'
3956ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3957ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3958ac_compiler_gnu=$ac_cv_c_compiler_gnu
Bram Moolenaarc0394412017-04-20 20:20:23 +02003959 ac_ext=c
Bram Moolenaar495de9c2005-01-25 22:03:25 +00003960ac_cpp='$CPP $CPPFLAGS'
3961ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3962ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3963ac_compiler_gnu=$ac_cv_c_compiler_gnu
Illia Bobyra96d5442023-08-30 16:30:15 +02003964{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3965printf %s "checking how to run the C preprocessor... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00003966# On Suns, sometimes $CPP names a directory.
3967if test -n "$CPP" && test -d "$CPP"; then
3968 CPP=
3969fi
3970if test -z "$CPP"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02003971 if test ${ac_cv_prog_CPP+y}
3972then :
3973 printf %s "(cached) " >&6
3974else $as_nop
3975 # Double quotes because $CC needs to be expanded
3976 for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp
Bram Moolenaar495de9c2005-01-25 22:03:25 +00003977 do
3978 ac_preproc_ok=false
3979for ac_c_preproc_warn_flag in '' yes
3980do
3981 # Use a header file that comes with gcc, so configuring glibc
3982 # with a fresh cross-compiler works.
Bram Moolenaar071d4272004-06-13 20:20:40 +00003983 # On the NeXT, cc -E runs the code through the compiler's parser,
Bram Moolenaar495de9c2005-01-25 22:03:25 +00003984 # not just through cpp. "Syntax error" is here to catch this case.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02003985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00003986/* end confdefs.h. */
Illia Bobyra96d5442023-08-30 16:30:15 +02003987#include <limits.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00003988 Syntax error
3989_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02003990if ac_fn_c_try_cpp "$LINENO"
3991then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00003992
Illia Bobyra96d5442023-08-30 16:30:15 +02003993else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00003994 # Broken: fails on valid input.
3995continue
3996fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01003997rm -f conftest.err conftest.i conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00003998
Bram Moolenaar446cb832008-06-24 21:56:24 +00003999 # OK, works on sane cases. Now check whether nonexistent headers
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004000 # can be detected and how.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004002/* end confdefs.h. */
4003#include <ac_nonexistent.h>
4004_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004005if ac_fn_c_try_cpp "$LINENO"
4006then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004007 # Broken: success on invalid input.
4008continue
Illia Bobyra96d5442023-08-30 16:30:15 +02004009else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004010 # Passes both tests.
4011ac_preproc_ok=:
4012break
4013fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01004014rm -f conftest.err conftest.i conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004015
4016done
4017# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Bram Moolenaar7db77842014-03-27 17:40:59 +01004018rm -f conftest.i conftest.err conftest.$ac_ext
Illia Bobyra96d5442023-08-30 16:30:15 +02004019if $ac_preproc_ok
4020then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004021 break
4022fi
4023
4024 done
4025 ac_cv_prog_CPP=$CPP
4026
4027fi
4028 CPP=$ac_cv_prog_CPP
4029else
4030 ac_cv_prog_CPP=$CPP
4031fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004032{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4033printf "%s\n" "$CPP" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004034ac_preproc_ok=false
4035for ac_c_preproc_warn_flag in '' yes
Bram Moolenaar071d4272004-06-13 20:20:40 +00004036do
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004037 # Use a header file that comes with gcc, so configuring glibc
4038 # with a fresh cross-compiler works.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004039 # On the NeXT, cc -E runs the code through the compiler's parser,
4040 # not just through cpp. "Syntax error" is here to catch this case.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004042/* end confdefs.h. */
Illia Bobyra96d5442023-08-30 16:30:15 +02004043#include <limits.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004044 Syntax error
4045_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004046if ac_fn_c_try_cpp "$LINENO"
4047then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004048
Illia Bobyra96d5442023-08-30 16:30:15 +02004049else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004050 # Broken: fails on valid input.
4051continue
4052fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01004053rm -f conftest.err conftest.i conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004054
Bram Moolenaar446cb832008-06-24 21:56:24 +00004055 # OK, works on sane cases. Now check whether nonexistent headers
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004056 # can be detected and how.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004058/* end confdefs.h. */
4059#include <ac_nonexistent.h>
4060_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004061if ac_fn_c_try_cpp "$LINENO"
4062then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004063 # Broken: success on invalid input.
4064continue
Illia Bobyra96d5442023-08-30 16:30:15 +02004065else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004066 # Passes both tests.
4067ac_preproc_ok=:
4068break
4069fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01004070rm -f conftest.err conftest.i conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004071
4072done
4073# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Bram Moolenaar7db77842014-03-27 17:40:59 +01004074rm -f conftest.i conftest.err conftest.$ac_ext
Illia Bobyra96d5442023-08-30 16:30:15 +02004075if $ac_preproc_ok
4076then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004077
Illia Bobyra96d5442023-08-30 16:30:15 +02004078else $as_nop
4079 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4080printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +01004081as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4082See \`config.log' for more details" "$LINENO" 5; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004083fi
4084
4085ac_ext=c
4086ac_cpp='$CPP $CPPFLAGS'
4087ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4088ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4089ac_compiler_gnu=$ac_cv_c_compiler_gnu
Illia Bobyra96d5442023-08-30 16:30:15 +02004090 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4091printf %s "checking for grep that handles long lines and -e... " >&6; }
4092if test ${ac_cv_path_GREP+y}
4093then :
4094 printf %s "(cached) " >&6
4095else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +00004096 if test -z "$GREP"; then
4097 ac_path_GREP_found=false
4098 # Loop through the user's path and test for each of PROGNAME-LIST
4099 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4100for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4101do
4102 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02004103 case $as_dir in #(((
4104 '') as_dir=./ ;;
4105 */) ;;
4106 *) as_dir=$as_dir/ ;;
4107 esac
4108 for ac_prog in grep ggrep
4109 do
Bram Moolenaar446cb832008-06-24 21:56:24 +00004110 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02004111 ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
Bram Moolenaar7db77842014-03-27 17:40:59 +01004112 as_fn_executable_p "$ac_path_GREP" || continue
Bram Moolenaar446cb832008-06-24 21:56:24 +00004113# Check for GNU ac_path_GREP and select it if it is found.
4114 # Check for GNU $ac_path_GREP
4115case `"$ac_path_GREP" --version 2>&1` in
4116*GNU*)
4117 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4118*)
4119 ac_count=0
Illia Bobyra96d5442023-08-30 16:30:15 +02004120 printf %s 0123456789 >"conftest.in"
Bram Moolenaar446cb832008-06-24 21:56:24 +00004121 while :
4122 do
4123 cat "conftest.in" "conftest.in" >"conftest.tmp"
4124 mv "conftest.tmp" "conftest.in"
4125 cp "conftest.in" "conftest.nl"
Illia Bobyra96d5442023-08-30 16:30:15 +02004126 printf "%s\n" 'GREP' >> "conftest.nl"
Bram Moolenaar446cb832008-06-24 21:56:24 +00004127 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4128 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004129 as_fn_arith $ac_count + 1 && ac_count=$as_val
Bram Moolenaar446cb832008-06-24 21:56:24 +00004130 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4131 # Best one so far, save it but keep looking for a better one
4132 ac_cv_path_GREP="$ac_path_GREP"
4133 ac_path_GREP_max=$ac_count
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004134 fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00004135 # 10*(2^10) chars as input seems more than enough
4136 test $ac_count -gt 10 && break
4137 done
4138 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4139esac
4140
4141 $ac_path_GREP_found && break 3
4142 done
4143 done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004144 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00004145IFS=$as_save_IFS
4146 if test -z "$ac_cv_path_GREP"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01004147 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 +00004148 fi
4149else
4150 ac_cv_path_GREP=$GREP
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004151fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00004152
4153fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004154{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4155printf "%s\n" "$ac_cv_path_GREP" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004156 GREP="$ac_cv_path_GREP"
4157
4158
Illia Bobyra96d5442023-08-30 16:30:15 +02004159{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4160printf %s "checking for egrep... " >&6; }
4161if test ${ac_cv_path_EGREP+y}
4162then :
4163 printf %s "(cached) " >&6
4164else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +00004165 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4166 then ac_cv_path_EGREP="$GREP -E"
4167 else
4168 if test -z "$EGREP"; then
4169 ac_path_EGREP_found=false
4170 # Loop through the user's path and test for each of PROGNAME-LIST
4171 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4172for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4173do
4174 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02004175 case $as_dir in #(((
4176 '') as_dir=./ ;;
4177 */) ;;
4178 *) as_dir=$as_dir/ ;;
4179 esac
4180 for ac_prog in egrep
4181 do
Bram Moolenaar446cb832008-06-24 21:56:24 +00004182 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02004183 ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
Bram Moolenaar7db77842014-03-27 17:40:59 +01004184 as_fn_executable_p "$ac_path_EGREP" || continue
Bram Moolenaar446cb832008-06-24 21:56:24 +00004185# Check for GNU ac_path_EGREP and select it if it is found.
4186 # Check for GNU $ac_path_EGREP
4187case `"$ac_path_EGREP" --version 2>&1` in
4188*GNU*)
4189 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4190*)
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" 'EGREP' >> "conftest.nl"
Bram Moolenaar446cb832008-06-24 21:56:24 +00004199 "$ac_path_EGREP" 'EGREP$' < "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_EGREP_max-0}; then
4203 # Best one so far, save it but keep looking for a better one
4204 ac_cv_path_EGREP="$ac_path_EGREP"
4205 ac_path_EGREP_max=$ac_count
4206 fi
4207 # 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_EGREP_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_EGREP"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01004219 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 +00004220 fi
4221else
4222 ac_cv_path_EGREP=$EGREP
4223fi
4224
4225 fi
4226fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004227{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4228printf "%s\n" "$ac_cv_path_EGREP" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004229 EGREP="$ac_cv_path_EGREP"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004230
Illia Bobyra96d5442023-08-30 16:30:15 +02004231 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
4232printf %s "checking for fgrep... " >&6; }
4233if test ${ac_cv_path_FGREP+y}
4234then :
4235 printf %s "(cached) " >&6
4236else $as_nop
Bram Moolenaar2bcaec32014-03-27 18:51:11 +01004237 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
4238 then ac_cv_path_FGREP="$GREP -F"
4239 else
4240 if test -z "$FGREP"; then
4241 ac_path_FGREP_found=false
4242 # Loop through the user's path and test for each of PROGNAME-LIST
4243 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4244for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4245do
4246 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02004247 case $as_dir in #(((
4248 '') as_dir=./ ;;
4249 */) ;;
4250 *) as_dir=$as_dir/ ;;
4251 esac
4252 for ac_prog in fgrep
4253 do
Bram Moolenaar2bcaec32014-03-27 18:51:11 +01004254 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02004255 ac_path_FGREP="$as_dir$ac_prog$ac_exec_ext"
Bram Moolenaar2bcaec32014-03-27 18:51:11 +01004256 as_fn_executable_p "$ac_path_FGREP" || continue
4257# Check for GNU ac_path_FGREP and select it if it is found.
4258 # Check for GNU $ac_path_FGREP
4259case `"$ac_path_FGREP" --version 2>&1` in
4260*GNU*)
4261 ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
4262*)
4263 ac_count=0
Illia Bobyra96d5442023-08-30 16:30:15 +02004264 printf %s 0123456789 >"conftest.in"
Bram Moolenaar2bcaec32014-03-27 18:51:11 +01004265 while :
4266 do
4267 cat "conftest.in" "conftest.in" >"conftest.tmp"
4268 mv "conftest.tmp" "conftest.in"
4269 cp "conftest.in" "conftest.nl"
Illia Bobyra96d5442023-08-30 16:30:15 +02004270 printf "%s\n" 'FGREP' >> "conftest.nl"
Bram Moolenaar2bcaec32014-03-27 18:51:11 +01004271 "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
4272 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4273 as_fn_arith $ac_count + 1 && ac_count=$as_val
4274 if test $ac_count -gt ${ac_path_FGREP_max-0}; then
4275 # Best one so far, save it but keep looking for a better one
4276 ac_cv_path_FGREP="$ac_path_FGREP"
4277 ac_path_FGREP_max=$ac_count
4278 fi
4279 # 10*(2^10) chars as input seems more than enough
4280 test $ac_count -gt 10 && break
4281 done
4282 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4283esac
4284
4285 $ac_path_FGREP_found && break 3
4286 done
4287 done
4288 done
4289IFS=$as_save_IFS
4290 if test -z "$ac_cv_path_FGREP"; then
4291 as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4292 fi
4293else
4294 ac_cv_path_FGREP=$FGREP
4295fi
4296
4297 fi
4298fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004299{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
4300printf "%s\n" "$ac_cv_path_FGREP" >&6; }
Bram Moolenaar2bcaec32014-03-27 18:51:11 +01004301 FGREP="$ac_cv_path_FGREP"
4302
Bram Moolenaarc0394412017-04-20 20:20:23 +02004303 for ac_prog in gawk mawk nawk awk
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004304do
4305 # Extract the first word of "$ac_prog", so it can be a program name with args.
Bram Moolenaar071d4272004-06-13 20:20:40 +00004306set dummy $ac_prog; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02004307{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4308printf %s "checking for $ac_word... " >&6; }
4309if test ${ac_cv_prog_AWK+y}
4310then :
4311 printf %s "(cached) " >&6
4312else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00004313 if test -n "$AWK"; then
4314 ac_cv_prog_AWK="$AWK" # Let the user override the test.
4315else
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004316as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4317for as_dir in $PATH
4318do
4319 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02004320 case $as_dir in #(((
4321 '') as_dir=./ ;;
4322 */) ;;
4323 *) as_dir=$as_dir/ ;;
4324 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004325 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02004326 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004327 ac_cv_prog_AWK="$ac_prog"
Illia Bobyra96d5442023-08-30 16:30:15 +02004328 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004329 break 2
4330 fi
4331done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004332 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00004333IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004334
Bram Moolenaar071d4272004-06-13 20:20:40 +00004335fi
4336fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004337AWK=$ac_cv_prog_AWK
Bram Moolenaar071d4272004-06-13 20:20:40 +00004338if test -n "$AWK"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004339 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4340printf "%s\n" "$AWK" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00004341else
Illia Bobyra96d5442023-08-30 16:30:15 +02004342 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4343printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00004344fi
4345
Bram Moolenaar446cb832008-06-24 21:56:24 +00004346
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004347 test -n "$AWK" && break
Bram Moolenaar071d4272004-06-13 20:20:40 +00004348done
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004349
Bram Moolenaar071d4272004-06-13 20:20:40 +00004350# Extract the first word of "strip", so it can be a program name with args.
4351set dummy strip; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02004352{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4353printf %s "checking for $ac_word... " >&6; }
4354if test ${ac_cv_prog_STRIP+y}
4355then :
4356 printf %s "(cached) " >&6
4357else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00004358 if test -n "$STRIP"; then
4359 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4360else
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004361as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4362for as_dir in $PATH
4363do
4364 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02004365 case $as_dir in #(((
4366 '') as_dir=./ ;;
4367 */) ;;
4368 *) as_dir=$as_dir/ ;;
4369 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004370 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02004371 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004372 ac_cv_prog_STRIP="strip"
Illia Bobyra96d5442023-08-30 16:30:15 +02004373 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004374 break 2
4375 fi
4376done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004377 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00004378IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004379
Bram Moolenaar071d4272004-06-13 20:20:40 +00004380 test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4381fi
4382fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004383STRIP=$ac_cv_prog_STRIP
Bram Moolenaar071d4272004-06-13 20:20:40 +00004384if test -n "$STRIP"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004385 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4386printf "%s\n" "$STRIP" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00004387else
Illia Bobyra96d5442023-08-30 16:30:15 +02004388 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4389printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00004390fi
4391
4392
Bram Moolenaar071d4272004-06-13 20:20:40 +00004393
4394
Bram Moolenaar071d4272004-06-13 20:20:40 +00004395
Illia Bobyrf39842f2023-08-27 18:21:23 +02004396
Illia Bobyra96d5442023-08-30 16:30:15 +02004397{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
4398printf %s "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
4399if test ${ac_cv_header_sys_wait_h+y}
4400then :
4401 printf %s "(cached) " >&6
4402else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +00004404/* end confdefs.h. */
4405#include <sys/types.h>
4406#include <sys/wait.h>
4407#ifndef WEXITSTATUS
4408# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
4409#endif
4410#ifndef WIFEXITED
4411# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4412#endif
4413
4414int
Illia Bobyra96d5442023-08-30 16:30:15 +02004415main (void)
Bram Moolenaar446cb832008-06-24 21:56:24 +00004416{
4417 int s;
4418 wait (&s);
4419 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4420 ;
4421 return 0;
4422}
4423_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004424if ac_fn_c_try_compile "$LINENO"
4425then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00004426 ac_cv_header_sys_wait_h=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02004427else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004428 ac_cv_header_sys_wait_h=no
Bram Moolenaar446cb832008-06-24 21:56:24 +00004429fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004430rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +00004431fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004432{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
4433printf "%s\n" "$ac_cv_header_sys_wait_h" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004434if test $ac_cv_header_sys_wait_h = yes; then
4435
Illia Bobyra96d5442023-08-30 16:30:15 +02004436printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +00004437
4438fi
4439
4440
Bram Moolenaar22640082018-04-19 20:39:41 +02004441if test x"$ac_cv_prog_cc_c99" != xno; then
4442
4443
Illia Bobyra96d5442023-08-30 16:30:15 +02004444 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
4445printf %s "checking for unsigned long long int... " >&6; }
4446if test ${ac_cv_type_unsigned_long_long_int+y}
4447then :
4448 printf %s "(cached) " >&6
4449else $as_nop
Bram Moolenaar22640082018-04-19 20:39:41 +02004450 ac_cv_type_unsigned_long_long_int=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02004451 case $ac_prog_cc_stdc in
4452 no | c89) ;;
4453 *)
4454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar561f8a52018-04-17 22:02:45 +02004455/* end confdefs.h. */
Bram Moolenaar22640082018-04-19 20:39:41 +02004456
4457 /* For now, do not test the preprocessor; as of 2007 there are too many
4458 implementations with broken preprocessors. Perhaps this can
4459 be revisited in 2012. In the meantime, code should not expect
4460 #if to work with literals wider than 32 bits. */
4461 /* Test literals. */
4462 long long int ll = 9223372036854775807ll;
4463 long long int nll = -9223372036854775807LL;
4464 unsigned long long int ull = 18446744073709551615ULL;
4465 /* Test constant expressions. */
4466 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
4467 ? 1 : -1)];
4468 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
4469 ? 1 : -1)];
4470 int i = 63;
4471int
Illia Bobyra96d5442023-08-30 16:30:15 +02004472main (void)
Bram Moolenaar22640082018-04-19 20:39:41 +02004473{
4474/* Test availability of runtime routines for shift and division. */
4475 long long int llmax = 9223372036854775807ll;
4476 unsigned long long int ullmax = 18446744073709551615ull;
4477 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
4478 | (llmax / ll) | (llmax % ll)
4479 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
4480 | (ullmax / ull) | (ullmax % ull));
4481 ;
4482 return 0;
4483}
4484
4485_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004486if ac_fn_c_try_link "$LINENO"
4487then :
Bram Moolenaar22640082018-04-19 20:39:41 +02004488
Illia Bobyra96d5442023-08-30 16:30:15 +02004489else $as_nop
Bram Moolenaar22640082018-04-19 20:39:41 +02004490 ac_cv_type_unsigned_long_long_int=no
4491fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004492rm -f core conftest.err conftest.$ac_objext conftest.beam \
4493 conftest$ac_exeext conftest.$ac_ext;;
4494 esac
Bram Moolenaar22640082018-04-19 20:39:41 +02004495fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004496{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
4497printf "%s\n" "$ac_cv_type_unsigned_long_long_int" >&6; }
Bram Moolenaar22640082018-04-19 20:39:41 +02004498 if test $ac_cv_type_unsigned_long_long_int = yes; then
4499
Illia Bobyra96d5442023-08-30 16:30:15 +02004500printf "%s\n" "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
Bram Moolenaar22640082018-04-19 20:39:41 +02004501
4502 fi
4503
4504
4505
Illia Bobyra96d5442023-08-30 16:30:15 +02004506 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
4507printf %s "checking for long long int... " >&6; }
4508if test ${ac_cv_type_long_long_int+y}
4509then :
4510 printf %s "(cached) " >&6
4511else $as_nop
Bram Moolenaar22640082018-04-19 20:39:41 +02004512 ac_cv_type_long_long_int=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02004513 case $ac_prog_cc_stdc in
4514 no | c89) ;;
4515 *)
4516 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
4517 if test $ac_cv_type_long_long_int = yes; then
4518 if test "$cross_compiling" = yes
4519then :
Bram Moolenaar22640082018-04-19 20:39:41 +02004520 :
Illia Bobyra96d5442023-08-30 16:30:15 +02004521else $as_nop
Bram Moolenaar22640082018-04-19 20:39:41 +02004522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4523/* end confdefs.h. */
4524#include <limits.h>
Illia Bobyra96d5442023-08-30 16:30:15 +02004525 #ifndef LLONG_MAX
4526 # define HALF \
4527 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
4528 # define LLONG_MAX (HALF - 1 + HALF)
4529 #endif
Bram Moolenaar22640082018-04-19 20:39:41 +02004530int
Illia Bobyra96d5442023-08-30 16:30:15 +02004531main (void)
Bram Moolenaar22640082018-04-19 20:39:41 +02004532{
4533long long int n = 1;
Illia Bobyra96d5442023-08-30 16:30:15 +02004534 int i;
4535 for (i = 0; ; i++)
4536 {
4537 long long int m = n << i;
4538 if (m >> i != n)
4539 return 1;
4540 if (LLONG_MAX / 2 < m)
4541 break;
4542 }
4543 return 0;
Bram Moolenaar22640082018-04-19 20:39:41 +02004544 ;
4545 return 0;
4546}
4547_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004548if ac_fn_c_try_run "$LINENO"
4549then :
Bram Moolenaar22640082018-04-19 20:39:41 +02004550
Illia Bobyra96d5442023-08-30 16:30:15 +02004551else $as_nop
Bram Moolenaar22640082018-04-19 20:39:41 +02004552 ac_cv_type_long_long_int=no
4553fi
4554rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4555 conftest.$ac_objext conftest.beam conftest.$ac_ext
4556fi
4557
Illia Bobyra96d5442023-08-30 16:30:15 +02004558 fi;;
4559 esac
Bram Moolenaar22640082018-04-19 20:39:41 +02004560fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004561{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
4562printf "%s\n" "$ac_cv_type_long_long_int" >&6; }
Bram Moolenaar22640082018-04-19 20:39:41 +02004563 if test $ac_cv_type_long_long_int = yes; then
4564
Illia Bobyra96d5442023-08-30 16:30:15 +02004565printf "%s\n" "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
Bram Moolenaar22640082018-04-19 20:39:41 +02004566
4567 fi
4568
4569 if test "$ac_cv_type_long_long_int" = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004570 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4571printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar22640082018-04-19 20:39:41 +02004572as_fn_error $? "Compiler does not support long long int
4573See \`config.log' for more details" "$LINENO" 5; }
4574 fi
4575
Illia Bobyra96d5442023-08-30 16:30:15 +02004576 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the compiler supports trailing commas" >&5
4577printf %s "checking if the compiler supports trailing commas... " >&6; }
Bram Moolenaar22640082018-04-19 20:39:41 +02004578 trailing_commas=no
4579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4580/* end confdefs.h. */
4581
Bram Moolenaar561f8a52018-04-17 22:02:45 +02004582int
Illia Bobyra96d5442023-08-30 16:30:15 +02004583main (void)
Bram Moolenaar561f8a52018-04-17 22:02:45 +02004584{
4585
Bram Moolenaar22640082018-04-19 20:39:41 +02004586 enum {
4587 one,
4588 };
Bram Moolenaar561f8a52018-04-17 22:02:45 +02004589 ;
4590 return 0;
4591}
4592_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004593if ac_fn_c_try_compile "$LINENO"
4594then :
4595 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4596printf "%s\n" "yes" >&6; }; trailing_commas=yes
4597else $as_nop
4598 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4599printf "%s\n" "no" >&6; }
Bram Moolenaar561f8a52018-04-17 22:02:45 +02004600fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004601rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar22640082018-04-19 20:39:41 +02004602 if test "$trailing_commas" = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004603 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4604printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar22640082018-04-19 20:39:41 +02004605as_fn_error $? "Compiler does not support trailing comma in enum
4606See \`config.log' for more details" "$LINENO" 5; }
4607 fi
4608
Illia Bobyra96d5442023-08-30 16:30:15 +02004609 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the compiler supports C++ comments" >&5
4610printf %s "checking if the compiler supports C++ comments... " >&6; }
Bram Moolenaar22640082018-04-19 20:39:41 +02004611 slash_comments=no
4612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4613/* end confdefs.h. */
4614
4615int
Illia Bobyra96d5442023-08-30 16:30:15 +02004616main (void)
Bram Moolenaar22640082018-04-19 20:39:41 +02004617{
4618// C++ comments?
4619 ;
4620 return 0;
4621}
4622_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004623if ac_fn_c_try_compile "$LINENO"
4624then :
4625 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4626printf "%s\n" "yes" >&6; }; slash_comments=yes
4627else $as_nop
4628 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4629printf "%s\n" "no" >&6; }
Bram Moolenaar22640082018-04-19 20:39:41 +02004630fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004631rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar22640082018-04-19 20:39:41 +02004632 if test "$slash_comments" = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004633 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4634printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar22640082018-04-19 20:39:41 +02004635as_fn_error $? "Compiler does not support C++ comments
4636See \`config.log' for more details" "$LINENO" 5; }
4637 fi
4638fi
Bram Moolenaar561f8a52018-04-17 22:02:45 +02004639
Bram Moolenaar8f1dde52020-06-05 23:16:29 +02004640if test -n "$SOURCE_DATE_EPOCH"; then
4641 DATE_FMT="%b %d %Y %H:%M:%S"
4642 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 +02004643 printf "%s\n" "#define BUILD_DATE \"$BUILD_DATE\"" >>confdefs.h
Bram Moolenaar8f1dde52020-06-05 23:16:29 +02004644
4645 BUILD_DATE_MSG=-"echo -e '=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\nNOTE: build date/time is fixed: $BUILD_DATE\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-='"
4646
4647fi
4648
Bram Moolenaarf788a062011-12-14 20:51:25 +01004649
Illia Bobyra96d5442023-08-30 16:30:15 +02004650{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-fail-if-missing argument" >&5
4651printf %s "checking --enable-fail-if-missing argument... " >&6; }
Bram Moolenaarf788a062011-12-14 20:51:25 +01004652# Check whether --enable-fail_if_missing was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02004653if test ${enable_fail_if_missing+y}
4654then :
Bram Moolenaarf788a062011-12-14 20:51:25 +01004655 enableval=$enable_fail_if_missing; fail_if_missing="yes"
Illia Bobyra96d5442023-08-30 16:30:15 +02004656else $as_nop
Bram Moolenaarf788a062011-12-14 20:51:25 +01004657 fail_if_missing="no"
4658fi
4659
Illia Bobyra96d5442023-08-30 16:30:15 +02004660{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $fail_if_missing" >&5
4661printf "%s\n" "$fail_if_missing" >&6; }
Bram Moolenaarf788a062011-12-14 20:51:25 +01004662
Bram Moolenaard2a05492018-07-27 22:35:15 +02004663with_x_arg="$with_x"
4664
Bram Moolenaar446cb832008-06-24 21:56:24 +00004665if test -z "$CFLAGS"; then
4666 CFLAGS="-O"
Bram Moolenaar4d8479b2021-01-31 14:36:06 +01004667 test "$GCC" = yes && CFLAGS="-O2 -fno-strength-reduce -Wall -Wno-deprecated-declarations"
Bram Moolenaar446cb832008-06-24 21:56:24 +00004668fi
Rose00d07e72023-05-06 18:07:14 +01004669
Bram Moolenaar446cb832008-06-24 21:56:24 +00004670if test "$GCC" = yes; then
Bram Moolenaarc8836f72014-04-12 13:12:24 +02004671 gccversion=`$CC -dumpversion`
Bram Moolenaar446cb832008-06-24 21:56:24 +00004672 if test "x$gccversion" = "x"; then
Bram Moolenaarc8836f72014-04-12 13:12:24 +02004673 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 +00004674 fi
Rose00d07e72023-05-06 18:07:14 +01004675
4676 if test "$gccversion" = "3.0.1" -o "$gccversion" = "3.0.2" -o "$gccversion" = "4.0.1"; then
Bram Moolenaar446cb832008-06-24 21:56:24 +00004677 echo 'GCC [34].0.[12] has a bug in the optimizer, disabling "-O#"'
4678 CFLAGS=`echo "$CFLAGS" | sed 's/-O[23456789]/-O/'`
4679 else
4680 if test "$gccversion" = "3.1" -o "$gccversion" = "3.2" -o "$gccversion" = "3.2.1" && `echo "$CFLAGS" | grep -v fno-strength-reduce >/dev/null`; then
4681 echo 'GCC 3.1 and 3.2 have a bug in the optimizer, adding "-fno-strength-reduce"'
4682 CFLAGS="$CFLAGS -fno-strength-reduce"
4683 fi
4684 fi
4685fi
4686
Illia Bobyra96d5442023-08-30 16:30:15 +02004687{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clang version" >&5
4688printf %s "checking for clang version... " >&6; }
Bram Moolenaar5f69fee2017-03-09 11:58:40 +01004689CLANG_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 +02004690if test x"$CLANG_VERSION_STRING" != x"" ; then
4691 CLANG_MAJOR=`echo "$CLANG_VERSION_STRING" | sed -n -e 's/\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*/\1/p'`
4692 CLANG_MINOR=`echo "$CLANG_VERSION_STRING" | sed -n -e 's/[0-9][0-9]*\.\([0-9][0-9]*\)\.[0-9][0-9]*/\1/p'`
4693 CLANG_REVISION=`echo "$CLANG_VERSION_STRING" | sed -n -e 's/[0-9][0-9]*\.[0-9][0-9]*\.\([0-9][0-9]*\)/\1/p'`
4694 CLANG_VERSION=`expr $CLANG_MAJOR '*' 1000000 '+' $CLANG_MINOR '*' 1000 '+' $CLANG_REVISION`
Illia Bobyra96d5442023-08-30 16:30:15 +02004695 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CLANG_VERSION" >&5
4696printf "%s\n" "$CLANG_VERSION" >&6; }
4697 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if clang supports -fno-strength-reduce" >&5
4698printf %s "checking if clang supports -fno-strength-reduce... " >&6; }
Bram Moolenaarebd211c2021-01-30 19:33:36 +01004699 if test "$CLANG_MAJOR" -ge 10 -o "$CLANG_VERSION" -ge 500002075 ; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004700 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4701printf "%s\n" "no" >&6; }
Bram Moolenaar5f69fee2017-03-09 11:58:40 +01004702 CFLAGS=`echo "$CFLAGS" | sed -e 's/-fno-strength-reduce/ /'`
4703 else
Illia Bobyra96d5442023-08-30 16:30:15 +02004704 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4705printf "%s\n" "yes" >&6; }
Bram Moolenaar0c6ccfd2013-10-02 18:23:07 +02004706 fi
4707else
Illia Bobyra96d5442023-08-30 16:30:15 +02004708 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: N/A" >&5
4709printf "%s\n" "N/A" >&6; }
Bram Moolenaar0c6ccfd2013-10-02 18:23:07 +02004710fi
4711
Bram Moolenaar839e9542016-04-14 16:46:02 +02004712CROSS_COMPILING=
Bram Moolenaar446cb832008-06-24 21:56:24 +00004713if test "$cross_compiling" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004714 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot compile a simple program; if not cross compiling check CC and CFLAGS" >&5
4715printf "%s\n" "cannot compile a simple program; if not cross compiling check CC and CFLAGS" >&6; }
Bram Moolenaar839e9542016-04-14 16:46:02 +02004716 CROSS_COMPILING=1
Bram Moolenaar446cb832008-06-24 21:56:24 +00004717fi
4718
Bram Moolenaar839e9542016-04-14 16:46:02 +02004719
Bram Moolenaar446cb832008-06-24 21:56:24 +00004720test "$GCC" = yes && CPP_MM=M;
4721
4722if test -f ./toolcheck; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004723 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for buggy tools" >&5
4724printf %s "checking for buggy tools... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004725 sh ./toolcheck 1>&6
4726fi
4727
4728OS_EXTRA_SRC=""; OS_EXTRA_OBJ=""
4729
Illia Bobyra96d5442023-08-30 16:30:15 +02004730{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking uname" >&5
4731printf %s "checking uname... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004732if test "x$vim_cv_uname_output" = "x" ; then
4733 vim_cv_uname_output=`(uname) 2>/dev/null`
Illia Bobyra96d5442023-08-30 16:30:15 +02004734 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_uname_output" >&5
4735printf "%s\n" "$vim_cv_uname_output" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004736else
Illia Bobyra96d5442023-08-30 16:30:15 +02004737 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_uname_output (cached)" >&5
4738printf "%s\n" "$vim_cv_uname_output (cached)" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004739fi
4740
Illia Bobyra96d5442023-08-30 16:30:15 +02004741{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking uname -r" >&5
4742printf %s "checking uname -r... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004743if test "x$vim_cv_uname_r_output" = "x" ; then
4744 vim_cv_uname_r_output=`(uname -r) 2>/dev/null`
Illia Bobyra96d5442023-08-30 16:30:15 +02004745 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_uname_r_output" >&5
4746printf "%s\n" "$vim_cv_uname_r_output" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004747else
Illia Bobyra96d5442023-08-30 16:30:15 +02004748 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_uname_r_output (cached)" >&5
4749printf "%s\n" "$vim_cv_uname_r_output (cached)" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004750fi
4751
Illia Bobyra96d5442023-08-30 16:30:15 +02004752{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking uname -m" >&5
4753printf %s "checking uname -m... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004754if test "x$vim_cv_uname_m_output" = "x" ; then
4755 vim_cv_uname_m_output=`(uname -m) 2>/dev/null`
Illia Bobyra96d5442023-08-30 16:30:15 +02004756 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_uname_m_output" >&5
4757printf "%s\n" "$vim_cv_uname_m_output" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004758else
Illia Bobyra96d5442023-08-30 16:30:15 +02004759 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_uname_m_output (cached)" >&5
4760printf "%s\n" "$vim_cv_uname_m_output (cached)" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004761fi
4762
Illia Bobyra96d5442023-08-30 16:30:15 +02004763{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Haiku" >&5
4764printf %s "checking for Haiku... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004765case $vim_cv_uname_output in
Illia Bobyra96d5442023-08-30 16:30:15 +02004766 Haiku) HAIKU=yes; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4767printf "%s\n" "yes" >&6; };;
4768 *) HAIKU=no; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4769printf "%s\n" "no" >&6; };;
Bram Moolenaarb3f74062020-02-26 16:16:53 +01004770esac
4771
Illia Bobyra96d5442023-08-30 16:30:15 +02004772{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for QNX" >&5
4773printf %s "checking for QNX... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004774case $vim_cv_uname_output in
Bram Moolenaar446cb832008-06-24 21:56:24 +00004775 QNX) OS_EXTRA_SRC=os_qnx.c; OS_EXTRA_OBJ=objects/os_qnx.o
4776 test -z "$with_x" && with_x=no
Illia Bobyra96d5442023-08-30 16:30:15 +02004777 QNX=yes; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4778printf "%s\n" "yes" >&6; };;
4779 *) QNX=no; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4780printf "%s\n" "no" >&6; };;
Bram Moolenaar446cb832008-06-24 21:56:24 +00004781esac
4782
Illia Bobyra96d5442023-08-30 16:30:15 +02004783{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Darwin (Mac OS X)" >&5
4784printf %s "checking for Darwin (Mac OS X)... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004785if test "$vim_cv_uname_output" = Darwin; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004786 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4787printf "%s\n" "yes" >&6; }
Bram Moolenaard0573012017-10-28 21:11:06 +02004788 MACOS_X=yes
Bram Moolenaar52ecaaa2018-05-12 21:38:13 +02004789 CPPFLAGS="$CPPFLAGS -DMACOS_X"
Bram Moolenaar446cb832008-06-24 21:56:24 +00004790
Illia Bobyra96d5442023-08-30 16:30:15 +02004791 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-darwin argument" >&5
4792printf %s "checking --disable-darwin argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004793 # Check whether --enable-darwin was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02004794if test ${enable_darwin+y}
4795then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00004796 enableval=$enable_darwin;
Illia Bobyra96d5442023-08-30 16:30:15 +02004797else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +00004798 enable_darwin="yes"
4799fi
4800
4801 if test "$enable_darwin" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004802 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4803printf "%s\n" "no" >&6; }
4804 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if Darwin files are there" >&5
4805printf %s "checking if Darwin files are there... " >&6; }
Bram Moolenaar164fca32010-07-14 13:58:07 +02004806 if test -f os_macosx.m; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004807 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4808printf "%s\n" "yes" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004809 else
Illia Bobyra96d5442023-08-30 16:30:15 +02004810 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, Darwin support disabled" >&5
4811printf "%s\n" "no, Darwin support disabled" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004812 enable_darwin=no
4813 fi
4814 else
Illia Bobyra96d5442023-08-30 16:30:15 +02004815 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, Darwin support excluded" >&5
4816printf "%s\n" "yes, Darwin support excluded" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004817 fi
4818
Illia Bobyra96d5442023-08-30 16:30:15 +02004819 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-mac-arch argument" >&5
4820printf %s "checking --with-mac-arch argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004821
4822# Check whether --with-mac-arch was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02004823if test ${with_mac_arch+y}
4824then :
4825 withval=$with_mac_arch; MACARCH="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MACARCH" >&5
4826printf "%s\n" "$MACARCH" >&6; }
4827else $as_nop
4828 MACARCH="current"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: defaulting to $MACARCH" >&5
4829printf "%s\n" "defaulting to $MACARCH" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004830fi
4831
4832
Illia Bobyra96d5442023-08-30 16:30:15 +02004833 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-developer-dir argument" >&5
4834printf %s "checking --with-developer-dir argument... " >&6; }
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004835
4836# Check whether --with-developer-dir was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02004837if test ${with_developer_dir+y}
4838then :
4839 withval=$with_developer_dir; DEVELOPER_DIR="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DEVELOPER_DIR" >&5
4840printf "%s\n" "$DEVELOPER_DIR" >&6; }
4841else $as_nop
4842 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not present" >&5
4843printf "%s\n" "not present" >&6; }
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004844fi
4845
4846
4847 if test "x$DEVELOPER_DIR" = "x"; then
4848 # Extract the first word of "xcode-select", so it can be a program name with args.
4849set dummy xcode-select; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02004850{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4851printf %s "checking for $ac_word... " >&6; }
4852if test ${ac_cv_path_XCODE_SELECT+y}
4853then :
4854 printf %s "(cached) " >&6
4855else $as_nop
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004856 case $XCODE_SELECT in
4857 [\\/]* | ?:[\\/]*)
4858 ac_cv_path_XCODE_SELECT="$XCODE_SELECT" # Let the user override the test with a path.
4859 ;;
4860 *)
4861 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4862for as_dir in $PATH
4863do
4864 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02004865 case $as_dir in #(((
4866 '') as_dir=./ ;;
4867 */) ;;
4868 *) as_dir=$as_dir/ ;;
4869 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004870 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02004871 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4872 ac_cv_path_XCODE_SELECT="$as_dir$ac_word$ac_exec_ext"
4873 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004874 break 2
4875 fi
4876done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004877 done
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004878IFS=$as_save_IFS
4879
4880 ;;
4881esac
4882fi
4883XCODE_SELECT=$ac_cv_path_XCODE_SELECT
4884if test -n "$XCODE_SELECT"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004885 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XCODE_SELECT" >&5
4886printf "%s\n" "$XCODE_SELECT" >&6; }
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004887else
Illia Bobyra96d5442023-08-30 16:30:15 +02004888 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4889printf "%s\n" "no" >&6; }
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004890fi
4891
4892
4893 if test "x$XCODE_SELECT" != "x"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004894 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for developer dir using xcode-select" >&5
4895printf %s "checking for developer dir using xcode-select... " >&6; }
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004896 DEVELOPER_DIR=`$XCODE_SELECT -print-path`
Illia Bobyra96d5442023-08-30 16:30:15 +02004897 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DEVELOPER_DIR" >&5
4898printf "%s\n" "$DEVELOPER_DIR" >&6; }
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004899 else
4900 DEVELOPER_DIR=/Developer
4901 fi
4902 fi
4903
Bram Moolenaar446cb832008-06-24 21:56:24 +00004904 if test "x$MACARCH" = "xboth"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004905 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 10.4 universal SDK" >&5
4906printf %s "checking for 10.4 universal SDK... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004907 save_cppflags="$CPPFLAGS"
4908 save_cflags="$CFLAGS"
4909 save_ldflags="$LDFLAGS"
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004910 CFLAGS="$CFLAGS -isysroot $DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +00004912/* end confdefs.h. */
4913
4914int
Illia Bobyra96d5442023-08-30 16:30:15 +02004915main (void)
Bram Moolenaar446cb832008-06-24 21:56:24 +00004916{
4917
4918 ;
4919 return 0;
4920}
4921_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004922if ac_fn_c_try_link "$LINENO"
4923then :
4924 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found" >&5
4925printf "%s\n" "found" >&6; }
4926else $as_nop
4927 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4928printf "%s\n" "not found" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004929 CFLAGS="$save_cflags"
Illia Bobyra96d5442023-08-30 16:30:15 +02004930 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if Intel architecture is supported" >&5
4931printf %s "checking if Intel architecture is supported... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004932 CPPFLAGS="$CPPFLAGS -arch i386"
4933 LDFLAGS="$save_ldflags -arch i386"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +00004935/* end confdefs.h. */
4936
4937int
Illia Bobyra96d5442023-08-30 16:30:15 +02004938main (void)
Bram Moolenaar446cb832008-06-24 21:56:24 +00004939{
4940
4941 ;
4942 return 0;
4943}
4944_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004945if ac_fn_c_try_link "$LINENO"
4946then :
4947 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4948printf "%s\n" "yes" >&6; }; MACARCH="intel"
4949else $as_nop
4950 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4951printf "%s\n" "no" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004952 MACARCH="ppc"
4953 CPPFLAGS="$save_cppflags -arch ppc"
4954 LDFLAGS="$save_ldflags -arch ppc"
4955fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004956rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004957 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +00004958fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004959rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004960 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +00004961 elif test "x$MACARCH" = "xintel"; then
4962 CPPFLAGS="$CPPFLAGS -arch intel"
4963 LDFLAGS="$LDFLAGS -arch intel"
4964 elif test "x$MACARCH" = "xppc"; then
4965 CPPFLAGS="$CPPFLAGS -arch ppc"
4966 LDFLAGS="$LDFLAGS -arch ppc"
4967 fi
4968
4969 if test "$enable_darwin" = "yes"; then
Bram Moolenaard0573012017-10-28 21:11:06 +02004970 MACOS_X_DARWIN=yes
Bram Moolenaar164fca32010-07-14 13:58:07 +02004971 OS_EXTRA_SRC="os_macosx.m os_mac_conv.c";
Bram Moolenaar446cb832008-06-24 21:56:24 +00004972 OS_EXTRA_OBJ="objects/os_macosx.o objects/os_mac_conv.o"
Illia Bobyra96d5442023-08-30 16:30:15 +02004973 printf "%s\n" "#define HAVE_TIMER_CREATE 1" >>confdefs.h
Bram Moolenaare5303952022-06-19 17:05:47 +01004974
Bram Moolenaard0573012017-10-28 21:11:06 +02004975 CPPFLAGS="$CPPFLAGS -DMACOS_X_DARWIN"
Bram Moolenaar040f9752020-08-11 23:08:48 +02004976
Bram Moolenaar0b40d082022-03-08 13:32:37 +00004977 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 +02004978 with_x=no
4979 fi
Bram Moolenaar097148e2020-08-11 21:58:20 +02004980 fi
Bram Moolenaar097148e2020-08-11 21:58:20 +02004981else
Illia Bobyra96d5442023-08-30 16:30:15 +02004982 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4983printf "%s\n" "no" >&6; }
Bram Moolenaar097148e2020-08-11 21:58:20 +02004984fi
4985
Illia Bobyra96d5442023-08-30 16:30:15 +02004986ac_header= ac_cache=
4987for ac_item in $ac_header_c_list
4988do
4989 if test $ac_cache; then
4990 ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
4991 if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
4992 printf "%s\n" "#define $ac_item 1" >> confdefs.h
4993 fi
4994 ac_header= ac_cache=
4995 elif test $ac_header; then
4996 ac_cache=$ac_item
4997 else
4998 ac_header=$ac_item
4999 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005000done
5001
5002
Illia Bobyra96d5442023-08-30 16:30:15 +02005003
5004
5005
5006
5007
5008
5009if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
5010then :
5011
5012printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
Bram Moolenaar18e54692013-11-03 20:26:31 +01005013
Bram Moolenaar39766a72013-11-03 00:41:00 +01005014fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005015ac_fn_c_check_header_compile "$LINENO" "AvailabilityMacros.h" "ac_cv_header_AvailabilityMacros_h" "$ac_includes_default"
5016if test "x$ac_cv_header_AvailabilityMacros_h" = xyes
5017then :
5018 printf "%s\n" "#define HAVE_AVAILABILITYMACROS_H 1" >>confdefs.h
Bram Moolenaar39766a72013-11-03 00:41:00 +01005019
Illia Bobyra96d5442023-08-30 16:30:15 +02005020fi
Bram Moolenaar39766a72013-11-03 00:41:00 +01005021
Evan Miller25448072022-12-30 10:42:23 +00005022# 10.5 and earlier lack dispatch
Illia Bobyra96d5442023-08-30 16:30:15 +02005023ac_fn_c_check_header_compile "$LINENO" "dispatch/dispatch.h" "ac_cv_header_dispatch_dispatch_h" "$ac_includes_default"
5024if test "x$ac_cv_header_dispatch_dispatch_h" = xyes
5025then :
5026 printf "%s\n" "#define HAVE_DISPATCH_DISPATCH_H 1" >>confdefs.h
Evan Miller25448072022-12-30 10:42:23 +00005027
5028fi
5029
Bram Moolenaar39766a72013-11-03 00:41:00 +01005030
Bram Moolenaar071d4272004-06-13 20:20:40 +00005031
5032
5033
Bram Moolenaar446cb832008-06-24 21:56:24 +00005034if test "$cross_compiling" = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005035 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-local-dir argument" >&5
5036printf %s "checking --with-local-dir argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005037 have_local_include=''
5038 have_local_lib=''
Bram Moolenaarc236c162008-07-13 17:41:49 +00005039
5040# Check whether --with-local-dir was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005041if test ${with_local_dir+y}
5042then :
Bram Moolenaarc236c162008-07-13 17:41:49 +00005043 withval=$with_local_dir;
5044 local_dir="$withval"
5045 case "$withval" in
5046 */*) ;;
5047 no)
5048 # avoid adding local dir to LDFLAGS and CPPFLAGS
Bram Moolenaare06c1882010-07-21 22:05:20 +02005049 have_local_include=yes
Bram Moolenaarc236c162008-07-13 17:41:49 +00005050 have_local_lib=yes
5051 ;;
Bram Moolenaar7db77842014-03-27 17:40:59 +01005052 *) as_fn_error $? "must pass path argument to --with-local-dir" "$LINENO" 5 ;;
Bram Moolenaarc236c162008-07-13 17:41:49 +00005053 esac
Illia Bobyra96d5442023-08-30 16:30:15 +02005054 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $local_dir" >&5
5055printf "%s\n" "$local_dir" >&6; }
Bram Moolenaarc236c162008-07-13 17:41:49 +00005056
Illia Bobyra96d5442023-08-30 16:30:15 +02005057else $as_nop
Bram Moolenaarc236c162008-07-13 17:41:49 +00005058
5059 local_dir=/usr/local
Illia Bobyra96d5442023-08-30 16:30:15 +02005060 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to $local_dir" >&5
5061printf "%s\n" "Defaulting to $local_dir" >&6; }
Bram Moolenaarc236c162008-07-13 17:41:49 +00005062
5063fi
5064
5065 if test "$GCC" = yes -a "$local_dir" != no; then
Bram Moolenaar446cb832008-06-24 21:56:24 +00005066 echo 'void f(){}' > conftest.c
Bram Moolenaar0958e0f2013-11-04 04:57:50 +01005067 have_local_include=`${CC-cc} -c -v conftest.c 2>&1 | grep "${local_dir}/include"`
Bram Moolenaarc236c162008-07-13 17:41:49 +00005068 have_local_lib=`${CC-cc} -c -v conftest.c 2>&1 | grep "${local_dir}/lib"`
Bram Moolenaar446cb832008-06-24 21:56:24 +00005069 rm -f conftest.c conftest.o
Bram Moolenaar071d4272004-06-13 20:20:40 +00005070 fi
Bram Moolenaarc236c162008-07-13 17:41:49 +00005071 if test -z "$have_local_lib" -a -d "${local_dir}/lib"; then
5072 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 +00005073 if test "$tt" = "$LDFLAGS"; then
Bram Moolenaarc236c162008-07-13 17:41:49 +00005074 LDFLAGS="$LDFLAGS -L${local_dir}/lib"
Bram Moolenaar446cb832008-06-24 21:56:24 +00005075 fi
5076 fi
Bram Moolenaarc236c162008-07-13 17:41:49 +00005077 if test -z "$have_local_include" -a -d "${local_dir}/include"; then
5078 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 +00005079 if test "$tt" = "$CPPFLAGS"; then
Bram Moolenaarc236c162008-07-13 17:41:49 +00005080 CPPFLAGS="$CPPFLAGS -I${local_dir}/include"
Bram Moolenaar446cb832008-06-24 21:56:24 +00005081 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005082 fi
5083fi
5084
Illia Bobyra96d5442023-08-30 16:30:15 +02005085{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-vim-name argument" >&5
5086printf %s "checking --with-vim-name argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005087
Bram Moolenaar446cb832008-06-24 21:56:24 +00005088# Check whether --with-vim-name was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005089if test ${with_vim_name+y}
5090then :
5091 withval=$with_vim_name; VIMNAME="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $VIMNAME" >&5
5092printf "%s\n" "$VIMNAME" >&6; }
5093else $as_nop
5094 VIMNAME="vim"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to $VIMNAME" >&5
5095printf "%s\n" "Defaulting to $VIMNAME" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005096fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005097
5098
Illia Bobyra96d5442023-08-30 16:30:15 +02005099{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-ex-name argument" >&5
5100printf %s "checking --with-ex-name argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005101
5102# Check whether --with-ex-name was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005103if test ${with_ex_name+y}
5104then :
5105 withval=$with_ex_name; EXNAME="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $EXNAME" >&5
5106printf "%s\n" "$EXNAME" >&6; }
5107else $as_nop
5108 EXNAME="ex"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to ex" >&5
5109printf "%s\n" "Defaulting to ex" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005110fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005111
5112
Illia Bobyra96d5442023-08-30 16:30:15 +02005113{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-view-name argument" >&5
5114printf %s "checking --with-view-name argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005115
5116# Check whether --with-view-name was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005117if test ${with_view_name+y}
5118then :
5119 withval=$with_view_name; VIEWNAME="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $VIEWNAME" >&5
5120printf "%s\n" "$VIEWNAME" >&6; }
5121else $as_nop
5122 VIEWNAME="view"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to view" >&5
5123printf "%s\n" "Defaulting to view" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005124fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005125
5126
5127
Illia Bobyra96d5442023-08-30 16:30:15 +02005128{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-global-runtime argument" >&5
5129printf %s "checking --with-global-runtime argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005130
5131# Check whether --with-global-runtime was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005132if test ${with_global_runtime+y}
5133then :
5134 withval=$with_global_runtime; RUNTIME_GLOBAL="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
5135printf "%s\n" "$withval" >&6; }
5136else $as_nop
5137 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5138printf "%s\n" "no" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005139fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005140
5141
Bram Moolenaar9d302ad2018-12-21 11:48:51 +01005142if test "X$RUNTIME_GLOBAL" != "X"; then
5143 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 +02005144 printf "%s\n" "#define RUNTIME_GLOBAL \"$RUNTIME_GLOBAL\"" >>confdefs.h
Bram Moolenaar9d302ad2018-12-21 11:48:51 +01005145
Illia Bobyra96d5442023-08-30 16:30:15 +02005146 printf "%s\n" "#define RUNTIME_GLOBAL_AFTER \"$RUNTIME_GLOBAL_AFTER\"" >>confdefs.h
Bram Moolenaar9d302ad2018-12-21 11:48:51 +01005147
5148fi
5149
Illia Bobyra96d5442023-08-30 16:30:15 +02005150{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-modified-by argument" >&5
5151printf %s "checking --with-modified-by argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005152
5153# Check whether --with-modified-by was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005154if test ${with_modified_by+y}
5155then :
5156 withval=$with_modified_by; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
5157printf "%s\n" "$withval" >&6; }; printf "%s\n" "#define MODIFIED_BY \"$withval\"" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00005158
Illia Bobyra96d5442023-08-30 16:30:15 +02005159else $as_nop
5160 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5161printf "%s\n" "no" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005162fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005163
Bram Moolenaar446cb832008-06-24 21:56:24 +00005164
Illia Bobyra96d5442023-08-30 16:30:15 +02005165{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if character set is EBCDIC" >&5
5166printf %s "checking if character set is EBCDIC... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02005167cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005168/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00005169
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005170int
Illia Bobyra96d5442023-08-30 16:30:15 +02005171main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005172{
Bram Moolenaar071d4272004-06-13 20:20:40 +00005173 /* TryCompile function for CharSet.
5174 Treat any failure as ASCII for compatibility with existing art.
5175 Use compile-time rather than run-time tests for cross-compiler
5176 tolerance. */
5177#if '0'!=240
5178make an error "Character set is not EBCDIC"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005179#endif
5180 ;
5181 return 0;
5182}
5183_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02005184if ac_fn_c_try_compile "$LINENO"
5185then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00005186 # TryCompile action if true
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005187cf_cv_ebcdic=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02005188else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02005189 # TryCompile action if false
Bram Moolenaar071d4272004-06-13 20:20:40 +00005190cf_cv_ebcdic=no
5191fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005192rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +00005193# end of TryCompile ])
5194# end of CacheVal CvEbcdic
Illia Bobyra96d5442023-08-30 16:30:15 +02005195{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cf_cv_ebcdic" >&5
5196printf "%s\n" "$cf_cv_ebcdic" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00005197case "$cf_cv_ebcdic" in #(vi
Illia Bobyra96d5442023-08-30 16:30:15 +02005198 yes) printf "%s\n" "#define EBCDIC 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00005199
5200 line_break='"\\n"'
5201 ;;
5202 *) line_break='"\\012"';;
5203esac
5204
5205
5206if test "$cf_cv_ebcdic" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005207{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for z/OS Unix" >&5
5208printf %s "checking for z/OS Unix... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00005209case $vim_cv_uname_output in
Bram Moolenaar2c704a72010-06-03 21:17:25 +02005210 OS/390) zOSUnix="yes";
Bram Moolenaar071d4272004-06-13 20:20:40 +00005211 if test "$CC" = "cc"; then
5212 ccm="$_CC_CCMODE"
5213 ccn="CC"
5214 else
5215 if test "$CC" = "c89"; then
5216 ccm="$_CC_C89MODE"
5217 ccn="C89"
5218 else
5219 ccm=1
5220 fi
5221 fi
5222 if test "$ccm" != "1"; then
5223 echo ""
5224 echo "------------------------------------------"
Bram Moolenaar2c704a72010-06-03 21:17:25 +02005225 echo " On z/OS Unix, the environment variable"
Bram Moolenaar77c19352012-06-13 19:19:41 +02005226 echo " _CC_${ccn}MODE must be set to \"1\"!"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005227 echo " Do:"
5228 echo " export _CC_${ccn}MODE=1"
5229 echo " and then call configure again."
5230 echo "------------------------------------------"
5231 exit 1
5232 fi
Bram Moolenaar77c19352012-06-13 19:19:41 +02005233 # Set CFLAGS for configure process.
5234 # This will be reset later for config.mk.
5235 # Use haltonmsg to force error for missing H files.
5236 CFLAGS="$CFLAGS -D_ALL_SOURCE -Wc,float(ieee),haltonmsg(3296)";
5237 LDFLAGS="$LDFLAGS -Wl,EDIT=NO"
Illia Bobyra96d5442023-08-30 16:30:15 +02005238 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5239printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00005240 ;;
Bram Moolenaar2c704a72010-06-03 21:17:25 +02005241 *) zOSUnix="no";
Illia Bobyra96d5442023-08-30 16:30:15 +02005242 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5243printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00005244 ;;
5245esac
5246fi
5247
Bram Moolenaar2c704a72010-06-03 21:17:25 +02005248if test "$zOSUnix" = "yes"; then
Bram Moolenaarabcbb0e2020-12-23 12:33:42 +01005249 QUOTESED="sed -e 's/[\\\\\"]/\\\\\\\\&/g' -e 's/\\\\\\\\\"/\"/' -e 's/\\\\\\\\\";\$\$/\";/' -e 's/ */ /g'"
Bram Moolenaar2c704a72010-06-03 21:17:25 +02005250else
Bram Moolenaarabcbb0e2020-12-23 12:33:42 +01005251 QUOTESED="sed -e 's/[\\\\\"]/\\\\&/g' -e 's/\\\\\"/\"/' -e 's/\\\\\";\$\$/\";/' -e 's/ */ /g'"
Bram Moolenaar2c704a72010-06-03 21:17:25 +02005252fi
5253
5254
5255
Illia Bobyra96d5442023-08-30 16:30:15 +02005256{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-smack argument" >&5
5257printf %s "checking --disable-smack argument... " >&6; }
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005258# Check whether --enable-smack was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005259if test ${enable_smack+y}
5260then :
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005261 enableval=$enable_smack;
Illia Bobyra96d5442023-08-30 16:30:15 +02005262else $as_nop
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005263 enable_smack="yes"
5264fi
5265
5266if test "$enable_smack" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005267 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5268printf "%s\n" "no" >&6; }
5269 ac_fn_c_check_header_compile "$LINENO" "linux/xattr.h" "ac_cv_header_linux_xattr_h" "$ac_includes_default"
5270if test "x$ac_cv_header_linux_xattr_h" = xyes
5271then :
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005272 true
Illia Bobyra96d5442023-08-30 16:30:15 +02005273else $as_nop
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005274 enable_smack="no"
5275fi
5276
Bram Moolenaar4ed89cd2014-04-05 12:02:25 +02005277else
Illia Bobyra96d5442023-08-30 16:30:15 +02005278 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5279printf "%s\n" "yes" >&6; }
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005280fi
5281if test "$enable_smack" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005282 ac_fn_c_check_header_compile "$LINENO" "attr/xattr.h" "ac_cv_header_attr_xattr_h" "$ac_includes_default"
5283if test "x$ac_cv_header_attr_xattr_h" = xyes
5284then :
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005285 true
Illia Bobyra96d5442023-08-30 16:30:15 +02005286else $as_nop
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005287 enable_smack="no"
5288fi
5289
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005290fi
5291if test "$enable_smack" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005292 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XATTR_NAME_SMACKEXEC in linux/xattr.h" >&5
5293printf %s "checking for XATTR_NAME_SMACKEXEC in linux/xattr.h... " >&6; }
5294
5295cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005296/* end confdefs.h. */
5297#include <linux/xattr.h>
5298_ACEOF
5299if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Illia Bobyra96d5442023-08-30 16:30:15 +02005300 $EGREP "XATTR_NAME_SMACKEXEC" >/dev/null 2>&1
5301then :
5302 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5303printf "%s\n" "yes" >&6; }
5304else $as_nop
5305 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5306printf "%s\n" "no" >&6; }; enable_smack="no"
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005307fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005308rm -rf conftest*
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005309
5310fi
5311if test "$enable_smack" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005312 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for setxattr in -lattr" >&5
5313printf %s "checking for setxattr in -lattr... " >&6; }
5314if test ${ac_cv_lib_attr_setxattr+y}
5315then :
5316 printf %s "(cached) " >&6
5317else $as_nop
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005318 ac_check_lib_save_LIBS=$LIBS
5319LIBS="-lattr $LIBS"
5320cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5321/* end confdefs.h. */
5322
5323/* Override any GCC internal prototype to avoid an error.
5324 Use char because int might match the return type of a GCC
5325 builtin and then its argument prototype would still apply. */
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005326char setxattr ();
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005327int
Illia Bobyra96d5442023-08-30 16:30:15 +02005328main (void)
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005329{
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005330return setxattr ();
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005331 ;
5332 return 0;
5333}
5334_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02005335if ac_fn_c_try_link "$LINENO"
5336then :
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005337 ac_cv_lib_attr_setxattr=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02005338else $as_nop
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005339 ac_cv_lib_attr_setxattr=no
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005340fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005341rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005342 conftest$ac_exeext conftest.$ac_ext
5343LIBS=$ac_check_lib_save_LIBS
5344fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005345{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_attr_setxattr" >&5
5346printf "%s\n" "$ac_cv_lib_attr_setxattr" >&6; }
5347if test "x$ac_cv_lib_attr_setxattr" = xyes
5348then :
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005349 LIBS="$LIBS -lattr"
5350 found_smack="yes"
Illia Bobyra96d5442023-08-30 16:30:15 +02005351 printf "%s\n" "#define HAVE_SMACK 1" >>confdefs.h
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005352
5353fi
5354
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005355fi
5356
5357if test "x$found_smack" = "x"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005358 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-selinux argument" >&5
5359printf %s "checking --disable-selinux argument... " >&6; }
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005360 # Check whether --enable-selinux was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005361if test ${enable_selinux+y}
5362then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00005363 enableval=$enable_selinux;
Illia Bobyra96d5442023-08-30 16:30:15 +02005364else $as_nop
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005365 enable_selinux="yes"
Bram Moolenaar446cb832008-06-24 21:56:24 +00005366fi
5367
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005368 if test "$enable_selinux" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005369 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5370printf "%s\n" "no" >&6; }
5371 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for is_selinux_enabled in -lselinux" >&5
5372printf %s "checking for is_selinux_enabled in -lselinux... " >&6; }
5373if test ${ac_cv_lib_selinux_is_selinux_enabled+y}
5374then :
5375 printf %s "(cached) " >&6
5376else $as_nop
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005377 ac_check_lib_save_LIBS=$LIBS
5378LIBS="-lselinux $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02005379cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005380/* end confdefs.h. */
5381
Bram Moolenaar446cb832008-06-24 21:56:24 +00005382/* Override any GCC internal prototype to avoid an error.
5383 Use char because int might match the return type of a GCC
5384 builtin and then its argument prototype would still apply. */
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005385char is_selinux_enabled ();
5386int
Illia Bobyra96d5442023-08-30 16:30:15 +02005387main (void)
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005388{
Bram Moolenaar446cb832008-06-24 21:56:24 +00005389return is_selinux_enabled ();
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005390 ;
5391 return 0;
5392}
5393_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02005394if ac_fn_c_try_link "$LINENO"
5395then :
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005396 ac_cv_lib_selinux_is_selinux_enabled=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02005397else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02005398 ac_cv_lib_selinux_is_selinux_enabled=no
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005399fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005400rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02005401 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005402LIBS=$ac_check_lib_save_LIBS
5403fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005404{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_is_selinux_enabled" >&5
5405printf "%s\n" "$ac_cv_lib_selinux_is_selinux_enabled" >&6; }
5406if test "x$ac_cv_lib_selinux_is_selinux_enabled" = xyes
5407then :
5408 ac_fn_c_check_header_compile "$LINENO" "selinux/selinux.h" "ac_cv_header_selinux_selinux_h" "$ac_includes_default"
5409if test "x$ac_cv_header_selinux_selinux_h" = xyes
5410then :
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005411 LIBS="$LIBS -lselinux"
Illia Bobyra96d5442023-08-30 16:30:15 +02005412 printf "%s\n" "#define HAVE_SELINUX 1" >>confdefs.h
Bram Moolenaare4b78e22017-12-07 22:29:11 +01005413
5414fi
5415
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005416fi
5417
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005418 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005419 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5420printf "%s\n" "yes" >&6; }
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005421 fi
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005422fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005423
Christian Brabandte085dfd2023-09-30 12:49:18 +02005424{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-xattr argument" >&5
5425printf %s "checking --enable-xattr argument... " >&6; }
5426# Check whether --enable-xattr was given.
5427if test ${enable_xattr+y}
5428then :
5429 enableval=$enable_xattr;
5430else $as_nop
5431 enable_xattr="yes"
5432fi
5433
5434if test "$enable_xattr" = "yes"; then
5435 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5436printf "%s\n" "yes" >&6; }
5437 ac_fn_c_check_header_compile "$LINENO" "attr/xattr.h" "ac_cv_header_attr_xattr_h" "$ac_includes_default"
5438if test "x$ac_cv_header_attr_xattr_h" = xyes
5439then :
5440 printf "%s\n" "#define HAVE_XATTR 1" >>confdefs.h
5441
5442fi
5443
5444else
5445 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5446printf "%s\n" "no" >&6; }
5447fi
5448
5449
Bram Moolenaar071d4272004-06-13 20:20:40 +00005450
Illia Bobyra96d5442023-08-30 16:30:15 +02005451{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-features argument" >&5
5452printf %s "checking --with-features argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005453
Bram Moolenaar446cb832008-06-24 21:56:24 +00005454# Check whether --with-features was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005455if test ${with_features+y}
5456then :
5457 withval=$with_features; features="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $features" >&5
5458printf "%s\n" "$features" >&6; }
5459else $as_nop
5460 features="huge"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to huge" >&5
5461printf "%s\n" "Defaulting to huge" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005462fi
5463
Bram Moolenaar071d4272004-06-13 20:20:40 +00005464
Martin Tournoij7904fa42022-10-04 16:28:45 +01005465case "$features" in
Martin Tournoij25f3a142022-10-08 19:26:41 +01005466 small) features="tiny" ;;
5467 big) features="normal" ;;
Martin Tournoij7904fa42022-10-04 16:28:45 +01005468esac
5469
Bram Moolenaar071d4272004-06-13 20:20:40 +00005470dovimdiff=""
5471dogvimdiff=""
5472case "$features" in
Illia Bobyra96d5442023-08-30 16:30:15 +02005473 tiny) printf "%s\n" "#define FEAT_TINY 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00005474 ;;
Illia Bobyra96d5442023-08-30 16:30:15 +02005475 normal) printf "%s\n" "#define FEAT_NORMAL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00005476 dovimdiff="installvimdiff";
5477 dogvimdiff="installgvimdiff" ;;
Illia Bobyra96d5442023-08-30 16:30:15 +02005478 huge) printf "%s\n" "#define FEAT_HUGE 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00005479 dovimdiff="installvimdiff";
5480 dogvimdiff="installgvimdiff" ;;
Illia Bobyra96d5442023-08-30 16:30:15 +02005481 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Sorry, $features is not supported" >&5
5482printf "%s\n" "Sorry, $features is not supported" >&6; } ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00005483esac
5484
5485
5486
5487
Martin Tournoij7904fa42022-10-04 16:28:45 +01005488if test "x$features" = "xtiny"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00005489 has_eval=no
5490else
5491 has_eval=yes
5492fi
5493
Illia Bobyra96d5442023-08-30 16:30:15 +02005494{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-compiledby argument" >&5
5495printf %s "checking --with-compiledby argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005496
Bram Moolenaar446cb832008-06-24 21:56:24 +00005497# Check whether --with-compiledby was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005498if test ${with_compiledby+y}
5499then :
5500 withval=$with_compiledby; compiledby="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
5501printf "%s\n" "$withval" >&6; }
5502else $as_nop
5503 compiledby=""; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5504printf "%s\n" "no" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005505fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005506
5507
Bram Moolenaar446cb832008-06-24 21:56:24 +00005508
Illia Bobyra96d5442023-08-30 16:30:15 +02005509{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-xsmp argument" >&5
5510printf %s "checking --disable-xsmp argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005511# Check whether --enable-xsmp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005512if test ${enable_xsmp+y}
5513then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00005514 enableval=$enable_xsmp;
Illia Bobyra96d5442023-08-30 16:30:15 +02005515else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00005516 enable_xsmp="yes"
Bram Moolenaar446cb832008-06-24 21:56:24 +00005517fi
5518
Bram Moolenaar071d4272004-06-13 20:20:40 +00005519
5520if test "$enable_xsmp" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005521 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5522printf "%s\n" "no" >&6; }
5523 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-xsmp-interact argument" >&5
5524printf %s "checking --disable-xsmp-interact argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005525 # Check whether --enable-xsmp-interact was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005526if test ${enable_xsmp_interact+y}
5527then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00005528 enableval=$enable_xsmp_interact;
Illia Bobyra96d5442023-08-30 16:30:15 +02005529else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00005530 enable_xsmp_interact="yes"
Bram Moolenaar446cb832008-06-24 21:56:24 +00005531fi
5532
Bram Moolenaar071d4272004-06-13 20:20:40 +00005533 if test "$enable_xsmp_interact" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005534 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5535printf "%s\n" "no" >&6; }
5536 printf "%s\n" "#define USE_XSMP_INTERACT 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00005537
5538 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005539 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5540printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00005541 fi
5542else
Illia Bobyra96d5442023-08-30 16:30:15 +02005543 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5544printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00005545fi
5546
Illia Bobyra96d5442023-08-30 16:30:15 +02005547{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking diff feature" >&5
5548printf %s "checking diff feature... " >&6; }
Martin Tournoij7904fa42022-10-04 16:28:45 +01005549if test "x$features" = "xtiny"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005550 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: disabled in $features version" >&5
5551printf "%s\n" "disabled in $features version" >&6; }
Bram Moolenaar67ffb412022-01-08 13:36:57 +00005552else
Illia Bobyra96d5442023-08-30 16:30:15 +02005553 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: enabled" >&5
5554printf "%s\n" "enabled" >&6; }
5555 printf "%s\n" "#define FEAT_DIFF 1" >>confdefs.h
Bram Moolenaar67ffb412022-01-08 13:36:57 +00005556
5557 XDIFF_OBJS_USED="\$(XDIFF_OBJS)"
5558
5559fi
5560
Illia Bobyra96d5442023-08-30 16:30:15 +02005561{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-luainterp argument" >&5
5562printf %s "checking --enable-luainterp argument... " >&6; }
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005563# Check whether --enable-luainterp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005564if test ${enable_luainterp+y}
5565then :
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005566 enableval=$enable_luainterp;
Illia Bobyra96d5442023-08-30 16:30:15 +02005567else $as_nop
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005568 enable_luainterp="no"
5569fi
5570
Illia Bobyra96d5442023-08-30 16:30:15 +02005571{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_luainterp" >&5
5572printf "%s\n" "$enable_luainterp" >&6; }
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005573
Bram Moolenaar2334b6d2010-07-22 21:32:16 +02005574if test "$enable_luainterp" = "yes" -o "$enable_luainterp" = "dynamic"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00005575 if test "$has_eval" = "no"; then
Martin Tournoij7904fa42022-10-04 16:28:45 +01005576 as_fn_error $? "cannot use Lua with tiny features" "$LINENO" 5
Bram Moolenaar3c124e32016-01-31 14:36:58 +01005577 fi
5578
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005579
5580
Illia Bobyra96d5442023-08-30 16:30:15 +02005581 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-lua-prefix argument" >&5
5582printf %s "checking --with-lua-prefix argument... " >&6; }
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005583
5584# Check whether --with-lua_prefix was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005585if test ${with_lua_prefix+y}
5586then :
5587 withval=$with_lua_prefix; with_lua_prefix="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_lua_prefix" >&5
5588printf "%s\n" "$with_lua_prefix" >&6; }
5589else $as_nop
5590 with_lua_prefix="";{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5591printf "%s\n" "no" >&6; }
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005592fi
5593
5594
5595 if test "X$with_lua_prefix" != "X"; then
5596 vi_cv_path_lua_pfx="$with_lua_prefix"
5597 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005598 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking LUA_PREFIX environment var" >&5
5599printf %s "checking LUA_PREFIX environment var... " >&6; }
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005600 if test "X$LUA_PREFIX" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005601 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: \"$LUA_PREFIX\"" >&5
5602printf "%s\n" "\"$LUA_PREFIX\"" >&6; }
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005603 vi_cv_path_lua_pfx="$LUA_PREFIX"
5604 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005605 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not set, default to /usr" >&5
5606printf "%s\n" "not set, default to /usr" >&6; }
Bram Moolenaar0d2e4fc2010-07-18 12:35:47 +02005607 vi_cv_path_lua_pfx="/usr"
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005608 fi
5609 fi
5610
Illia Bobyra96d5442023-08-30 16:30:15 +02005611 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-luajit" >&5
5612printf %s "checking --with-luajit... " >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005613
5614# Check whether --with-luajit was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005615if test ${with_luajit+y}
5616then :
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005617 withval=$with_luajit; vi_cv_with_luajit="$withval"
Illia Bobyra96d5442023-08-30 16:30:15 +02005618else $as_nop
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005619 vi_cv_with_luajit="no"
5620fi
5621
Illia Bobyra96d5442023-08-30 16:30:15 +02005622 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_with_luajit" >&5
5623printf "%s\n" "$vi_cv_with_luajit" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005624
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005625 LUA_INC=
5626 if test "X$vi_cv_path_lua_pfx" != "X"; then
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005627 if test "x$vi_cv_with_luajit" != "xno"; then
5628 # Extract the first word of "luajit", so it can be a program name with args.
5629set dummy luajit; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02005630{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5631printf %s "checking for $ac_word... " >&6; }
5632if test ${ac_cv_path_vi_cv_path_luajit+y}
5633then :
5634 printf %s "(cached) " >&6
5635else $as_nop
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005636 case $vi_cv_path_luajit in
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005637 [\\/]* | ?:[\\/]*)
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005638 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 +02005639 ;;
5640 *)
5641 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5642for as_dir in $PATH
5643do
5644 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02005645 case $as_dir in #(((
5646 '') as_dir=./ ;;
5647 */) ;;
5648 *) as_dir=$as_dir/ ;;
5649 esac
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005650 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02005651 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5652 ac_cv_path_vi_cv_path_luajit="$as_dir$ac_word$ac_exec_ext"
5653 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005654 break 2
5655 fi
5656done
5657 done
5658IFS=$as_save_IFS
5659
5660 ;;
5661esac
5662fi
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005663vi_cv_path_luajit=$ac_cv_path_vi_cv_path_luajit
5664if test -n "$vi_cv_path_luajit"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005665 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_luajit" >&5
5666printf "%s\n" "$vi_cv_path_luajit" >&6; }
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005667else
Illia Bobyra96d5442023-08-30 16:30:15 +02005668 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5669printf "%s\n" "no" >&6; }
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005670fi
5671
5672
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005673 if test "X$vi_cv_path_luajit" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005674 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking LuaJIT version" >&5
5675printf %s "checking LuaJIT version... " >&6; }
5676if test ${vi_cv_version_luajit+y}
5677then :
5678 printf %s "(cached) " >&6
5679else $as_nop
ichizokbddc6ad2023-08-29 20:54:32 +02005680 vi_cv_version_luajit=`${vi_cv_path_luajit} -v 2>&1 | sed 's/LuaJIT \([0-9.]*\)\.[0-9]\(-*[a-z0-9]*\)* .*/\1/'`
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005681fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005682{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_version_luajit" >&5
5683printf "%s\n" "$vi_cv_version_luajit" >&6; }
5684 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Lua version of LuaJIT" >&5
5685printf %s "checking Lua version of LuaJIT... " >&6; }
5686if test ${vi_cv_version_lua_luajit+y}
5687then :
5688 printf %s "(cached) " >&6
5689else $as_nop
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005690 vi_cv_version_lua_luajit=`${vi_cv_path_luajit} -e "print(_VERSION)" | sed 's/.* //'`
5691fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005692{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_version_lua_luajit" >&5
5693printf "%s\n" "$vi_cv_version_lua_luajit" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005694 vi_cv_path_lua="$vi_cv_path_luajit"
5695 vi_cv_version_lua="$vi_cv_version_lua_luajit"
5696 fi
Bram Moolenaar1e91f262012-10-03 14:48:08 +02005697 else
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005698 # Extract the first word of "lua", so it can be a program name with args.
5699set dummy lua; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02005700{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5701printf %s "checking for $ac_word... " >&6; }
5702if test ${ac_cv_path_vi_cv_path_plain_lua+y}
5703then :
5704 printf %s "(cached) " >&6
5705else $as_nop
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005706 case $vi_cv_path_plain_lua in
5707 [\\/]* | ?:[\\/]*)
5708 ac_cv_path_vi_cv_path_plain_lua="$vi_cv_path_plain_lua" # Let the user override the test with a path.
5709 ;;
5710 *)
5711 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5712for as_dir in $PATH
5713do
5714 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02005715 case $as_dir in #(((
5716 '') as_dir=./ ;;
5717 */) ;;
5718 *) as_dir=$as_dir/ ;;
5719 esac
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005720 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02005721 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5722 ac_cv_path_vi_cv_path_plain_lua="$as_dir$ac_word$ac_exec_ext"
5723 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005724 break 2
5725 fi
5726done
5727 done
5728IFS=$as_save_IFS
5729
5730 ;;
5731esac
5732fi
5733vi_cv_path_plain_lua=$ac_cv_path_vi_cv_path_plain_lua
5734if test -n "$vi_cv_path_plain_lua"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005735 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_plain_lua" >&5
5736printf "%s\n" "$vi_cv_path_plain_lua" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005737else
Illia Bobyra96d5442023-08-30 16:30:15 +02005738 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5739printf "%s\n" "no" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005740fi
5741
5742
5743 if test "X$vi_cv_path_plain_lua" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005744 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Lua version" >&5
5745printf %s "checking Lua version... " >&6; }
5746if test ${vi_cv_version_plain_lua+y}
5747then :
5748 printf %s "(cached) " >&6
5749else $as_nop
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005750 vi_cv_version_plain_lua=`${vi_cv_path_plain_lua} -e "print(_VERSION)" | sed 's/.* //'`
5751fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005752{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_version_plain_lua" >&5
5753printf "%s\n" "$vi_cv_version_plain_lua" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005754 fi
5755 vi_cv_path_lua="$vi_cv_path_plain_lua"
5756 vi_cv_version_lua="$vi_cv_version_plain_lua"
5757 fi
5758 if test "x$vi_cv_with_luajit" != "xno" && test "X$vi_cv_version_luajit" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005759 { 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
5760printf %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 +01005761 if test -f "$vi_cv_path_lua_pfx/include/luajit-$vi_cv_version_luajit/lua.h"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005762 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5763printf "%s\n" "yes" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005764 LUA_INC=/luajit-$vi_cv_version_luajit
5765 fi
5766 fi
5767 if test "X$LUA_INC" = "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005768 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if lua.h can be found in $vi_cv_path_lua_pfx/include" >&5
5769printf %s "checking if lua.h can be found in $vi_cv_path_lua_pfx/include... " >&6; }
Bram Moolenaar49222be2015-12-11 18:11:30 +01005770 if test -f "$vi_cv_path_lua_pfx/include/lua.h"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005771 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5772printf "%s\n" "yes" >&6; }
Bram Moolenaar1e91f262012-10-03 14:48:08 +02005773 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005774 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5775printf "%s\n" "no" >&6; }
5776 { 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
5777printf %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 +01005778 if test -f "$vi_cv_path_lua_pfx/include/lua$vi_cv_version_lua/lua.h"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005779 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5780printf "%s\n" "yes" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005781 LUA_INC=/lua$vi_cv_version_lua
5782 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005783 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5784printf "%s\n" "no" >&6; }
Bram Moolenaarf49e5642020-04-19 17:46:53 +02005785
5786 # Detect moonjit:
5787 # https://groups.google.com/forum/#!topic/vim_use/O0vek60WuTk
5788 lua_suf=/moonjit-2.3
5789 inc_path="$vi_cv_path_lua_pfx/include"
Bram Moolenaarad4dc832020-04-20 16:21:53 +02005790 for dir in "$inc_path"/moonjit-[0-9]* ; do
Bram Moolenaarf49e5642020-04-19 17:46:53 +02005791 if test -d "$dir" ; then
Bram Moolenaara79a8942020-12-17 20:50:25 +01005792 lua_suf=`basename "$dir"`
Bram Moolenaarf49e5642020-04-19 17:46:53 +02005793 lua_suf="/$lua_suf"
5794 break
5795 fi
5796 done
Illia Bobyra96d5442023-08-30 16:30:15 +02005797 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if lua.h can be found in $inc_path$lua_suf" >&5
5798printf %s "checking if lua.h can be found in $inc_path$lua_suf... " >&6; }
Bram Moolenaarf49e5642020-04-19 17:46:53 +02005799 if test -f "$inc_path$lua_suf/lua.h"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005800 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5801printf "%s\n" "yes" >&6; }
Bram Moolenaarf49e5642020-04-19 17:46:53 +02005802 LUA_INC=$lua_suf
5803 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005804 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5805printf "%s\n" "no" >&6; }
Bram Moolenaarf49e5642020-04-19 17:46:53 +02005806 vi_cv_path_lua_pfx=
5807 fi
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005808 fi
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005809 fi
5810 fi
5811 fi
5812
5813 if test "X$vi_cv_path_lua_pfx" != "X"; then
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005814 if test "x$vi_cv_with_luajit" != "xno"; then
5815 multiarch=`dpkg-architecture -qDEB_HOST_MULTIARCH 2> /dev/null`
5816 if test "X$multiarch" != "X"; then
5817 lib_multiarch="lib/${multiarch}"
5818 else
5819 lib_multiarch="lib"
5820 fi
5821 if test "X$vi_cv_version_lua" = "X"; then
5822 LUA_LIBS="-L${vi_cv_path_lua_pfx}/${lib_multiarch} -lluajit"
5823 else
5824 LUA_LIBS="-L${vi_cv_path_lua_pfx}/${lib_multiarch} -lluajit-$vi_cv_version_lua"
5825 fi
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005826 else
Bram Moolenaar869113f2023-03-31 21:29:00 +01005827 if test -d "${vi_cv_path_lua_pfx}/lib/lua$vi_cv_version_lua"; then
5828 LUALIBDIR="lib/lua$vi_cv_version_lua"
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005829 else
Bram Moolenaar869113f2023-03-31 21:29:00 +01005830 LUALIBDIR=lib
5831 fi
5832 if test "X$LUA_INC" != "X"; then
5833 LUA_LIBS="-L${vi_cv_path_lua_pfx}/${LUALIBDIR} -llua$vi_cv_version_lua"
5834 else
5835 LUA_LIBS="-L${vi_cv_path_lua_pfx}/${LUALIBDIR} -llua"
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005836 fi
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005837 fi
Bram Moolenaar2334b6d2010-07-22 21:32:16 +02005838 if test "$enable_luainterp" = "dynamic"; then
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005839 lua_ok="yes"
5840 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005841 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if link with ${LUA_LIBS} is sane" >&5
5842printf %s "checking if link with ${LUA_LIBS} is sane... " >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005843 libs_save=$LIBS
5844 LIBS="$LIBS $LUA_LIBS"
5845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5846/* end confdefs.h. */
5847
5848int
Illia Bobyra96d5442023-08-30 16:30:15 +02005849main (void)
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005850{
5851
5852 ;
5853 return 0;
5854}
5855_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02005856if ac_fn_c_try_link "$LINENO"
5857then :
5858 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5859printf "%s\n" "yes" >&6; }; lua_ok="yes"
5860else $as_nop
5861 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5862printf "%s\n" "no" >&6; }; lua_ok="no"; LUA_LIBS=""
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005863fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005864rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005865 conftest$ac_exeext conftest.$ac_ext
5866 LIBS=$libs_save
5867 fi
5868 if test "x$lua_ok" = "xyes"; then
5869 LUA_CFLAGS="-I${vi_cv_path_lua_pfx}/include${LUA_INC}"
5870 LUA_SRC="if_lua.c"
5871 LUA_OBJ="objects/if_lua.o"
5872 LUA_PRO="if_lua.pro"
Illia Bobyra96d5442023-08-30 16:30:15 +02005873 printf "%s\n" "#define FEAT_LUA 1" >>confdefs.h
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005874
5875 fi
5876 if test "$enable_luainterp" = "dynamic"; then
5877 if test "x$vi_cv_with_luajit" != "xno"; then
5878 luajit="jit"
5879 fi
Bram Moolenaar1e91f262012-10-03 14:48:08 +02005880 if test -f "${vi_cv_path_lua_pfx}/bin/cyglua-${vi_cv_version_lua}.dll"; then
5881 vi_cv_dll_name_lua="cyglua-${vi_cv_version_lua}.dll"
5882 else
Bram Moolenaard0573012017-10-28 21:11:06 +02005883 if test "x$MACOS_X" = "xyes"; then
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005884 ext="dylib"
5885 indexes=""
5886 else
5887 ext="so"
5888 indexes=".0 .1 .2 .3 .4 .5 .6 .7 .8 .9"
5889 multiarch=`dpkg-architecture -qDEB_HOST_MULTIARCH 2> /dev/null`
5890 if test "X$multiarch" != "X"; then
5891 lib_multiarch="lib/${multiarch}"
5892 fi
Bram Moolenaar768baac2013-04-15 14:44:57 +02005893 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005894 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if liblua${luajit}*.${ext}* can be found in $vi_cv_path_lua_pfx" >&5
5895printf %s "checking if liblua${luajit}*.${ext}* can be found in $vi_cv_path_lua_pfx... " >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005896 for subdir in "${lib_multiarch}" lib64 lib; do
Bram Moolenaar768baac2013-04-15 14:44:57 +02005897 if test -z "$subdir"; then
5898 continue
5899 fi
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005900 for sover in "${vi_cv_version_lua}.${ext}" "-${vi_cv_version_lua}.${ext}" \
5901 ".${vi_cv_version_lua}.${ext}" ".${ext}.${vi_cv_version_lua}"; do
5902 for i in $indexes ""; do
5903 if test -f "${vi_cv_path_lua_pfx}/${subdir}/liblua${luajit}${sover}$i"; then
Bram Moolenaar768baac2013-04-15 14:44:57 +02005904 sover2="$i"
5905 break 3
5906 fi
5907 done
Bram Moolenaar07e1da62013-02-06 19:49:43 +01005908 done
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005909 sover=""
Bram Moolenaar1e91f262012-10-03 14:48:08 +02005910 done
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005911 if test "X$sover" = "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005912 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5913printf "%s\n" "no" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005914 lua_ok="no"
5915 vi_cv_dll_name_lua="liblua${luajit}.${ext}"
5916 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005917 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5918printf "%s\n" "yes" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005919 lua_ok="yes"
5920 vi_cv_dll_name_lua="liblua${luajit}${sover}$sover2"
5921 fi
Bram Moolenaar1e91f262012-10-03 14:48:08 +02005922 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005923 printf "%s\n" "#define DYNAMIC_LUA 1" >>confdefs.h
Bram Moolenaar2334b6d2010-07-22 21:32:16 +02005924
5925 LUA_LIBS=""
Bram Moolenaar1e91f262012-10-03 14:48:08 +02005926 LUA_CFLAGS="-DDYNAMIC_LUA_DLL=\\\"${vi_cv_dll_name_lua}\\\" $LUA_CFLAGS"
Bram Moolenaar2334b6d2010-07-22 21:32:16 +02005927 fi
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005928 if test "X$LUA_CFLAGS$LUA_LIBS" != "X" && \
Bram Moolenaard0573012017-10-28 21:11:06 +02005929 test "x$MACOS_X" = "xyes" && test "x$vi_cv_with_luajit" != "xno" && \
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00005930 test "$vim_cv_uname_m_output" = "x86_64"; then
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005931 LUA_LIBS="-pagezero_size 10000 -image_base 100000000 $LUA_LIBS"
5932 fi
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005933 fi
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005934 if test "$fail_if_missing" = "yes" -a "$lua_ok" != "yes"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01005935 as_fn_error $? "could not configure lua" "$LINENO" 5
Bram Moolenaarf788a062011-12-14 20:51:25 +01005936 fi
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005937
5938
5939
5940
5941
ichizok8bb3fe42021-12-28 15:51:45 +00005942
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005943fi
5944
5945
Illia Bobyra96d5442023-08-30 16:30:15 +02005946{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-mzschemeinterp argument" >&5
5947printf %s "checking --enable-mzschemeinterp argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005948# Check whether --enable-mzschemeinterp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005949if test ${enable_mzschemeinterp+y}
5950then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00005951 enableval=$enable_mzschemeinterp;
Illia Bobyra96d5442023-08-30 16:30:15 +02005952else $as_nop
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005953 enable_mzschemeinterp="no"
Bram Moolenaar446cb832008-06-24 21:56:24 +00005954fi
5955
Illia Bobyra96d5442023-08-30 16:30:15 +02005956{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_mzschemeinterp" >&5
5957printf "%s\n" "$enable_mzschemeinterp" >&6; }
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005958
5959if test "$enable_mzschemeinterp" = "yes"; then
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005960
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005961
Illia Bobyra96d5442023-08-30 16:30:15 +02005962 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-plthome argument" >&5
5963printf %s "checking --with-plthome argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005964
Bram Moolenaar446cb832008-06-24 21:56:24 +00005965# Check whether --with-plthome was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005966if test ${with_plthome+y}
5967then :
5968 withval=$with_plthome; with_plthome="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_plthome" >&5
5969printf "%s\n" "$with_plthome" >&6; }
5970else $as_nop
5971 with_plthome="";{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: \"no\"" >&5
5972printf "%s\n" "\"no\"" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005973fi
5974
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005975
5976 if test "X$with_plthome" != "X"; then
5977 vi_cv_path_mzscheme_pfx="$with_plthome"
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01005978 vi_cv_path_mzscheme="${vi_cv_path_mzscheme_pfx}/bin/mzscheme"
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005979 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005980 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking PLTHOME environment var" >&5
5981printf %s "checking PLTHOME environment var... " >&6; }
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005982 if test "X$PLTHOME" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005983 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: \"$PLTHOME\"" >&5
5984printf "%s\n" "\"$PLTHOME\"" >&6; }
Bram Moolenaarc9b4b052006-04-30 18:54:39 +00005985 vi_cv_path_mzscheme_pfx="$PLTHOME"
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01005986 vi_cv_path_mzscheme="${vi_cv_path_mzscheme_pfx}/bin/mzscheme"
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005987 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005988 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not set" >&5
5989printf "%s\n" "not set" >&6; }
Bram Moolenaarc9b4b052006-04-30 18:54:39 +00005990 # Extract the first word of "mzscheme", so it can be a program name with args.
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005991set dummy mzscheme; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02005992{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5993printf %s "checking for $ac_word... " >&6; }
5994if test ${ac_cv_path_vi_cv_path_mzscheme+y}
5995then :
5996 printf %s "(cached) " >&6
5997else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005998 case $vi_cv_path_mzscheme in
5999 [\\/]* | ?:[\\/]*)
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006000 ac_cv_path_vi_cv_path_mzscheme="$vi_cv_path_mzscheme" # Let the user override the test with a path.
6001 ;;
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006002 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006003 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6004for as_dir in $PATH
6005do
6006 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02006007 case $as_dir in #(((
6008 '') as_dir=./ ;;
6009 */) ;;
6010 *) as_dir=$as_dir/ ;;
6011 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006012 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02006013 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6014 ac_cv_path_vi_cv_path_mzscheme="$as_dir$ac_word$ac_exec_ext"
6015 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006016 break 2
6017 fi
6018done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006019 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00006020IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006021
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006022 ;;
6023esac
6024fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006025vi_cv_path_mzscheme=$ac_cv_path_vi_cv_path_mzscheme
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006026if test -n "$vi_cv_path_mzscheme"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006027 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_mzscheme" >&5
6028printf "%s\n" "$vi_cv_path_mzscheme" >&6; }
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006029else
Illia Bobyra96d5442023-08-30 16:30:15 +02006030 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6031printf "%s\n" "no" >&6; }
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006032fi
6033
6034
Bram Moolenaar446cb832008-06-24 21:56:24 +00006035
Bram Moolenaarc9b4b052006-04-30 18:54:39 +00006036 if test "X$vi_cv_path_mzscheme" != "X"; then
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006037 lsout=`ls -l $vi_cv_path_mzscheme`
6038 if echo "$lsout" | grep -e '->' >/dev/null 2>/dev/null; then
6039 vi_cv_path_mzscheme=`echo "$lsout" | sed 's/.*-> \(.*\)/\1/'`
6040 fi
6041 fi
6042
Bram Moolenaarc9b4b052006-04-30 18:54:39 +00006043 if test "X$vi_cv_path_mzscheme" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006044 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking MzScheme install prefix" >&5
6045printf %s "checking MzScheme install prefix... " >&6; }
6046if test ${vi_cv_path_mzscheme_pfx+y}
6047then :
6048 printf %s "(cached) " >&6
6049else $as_nop
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006050 echo "(display (simplify-path \
Bram Moolenaarc9b4b052006-04-30 18:54:39 +00006051 (build-path (call-with-values \
6052 (lambda () (split-path (find-system-path (quote exec-file)))) \
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006053 (lambda (base name must-be-dir?) base)) (quote up))))" > mzdirs.scm
6054 vi_cv_path_mzscheme_pfx=`${vi_cv_path_mzscheme} -r mzdirs.scm | \
6055 sed -e 's+/$++'`
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006056fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006057{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_mzscheme_pfx" >&5
6058printf "%s\n" "$vi_cv_path_mzscheme_pfx" >&6; }
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006059 rm -f mzdirs.scm
Bram Moolenaarc9b4b052006-04-30 18:54:39 +00006060 fi
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006061 fi
6062 fi
6063
6064 if test "X$vi_cv_path_mzscheme_pfx" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006065 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for racket include directory" >&5
6066printf %s "checking for racket include directory... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006067 SCHEME_INC=`${vi_cv_path_mzscheme} -e '(require setup/dirs)(let ((p (find-include-dir))) (when (path? p) (display p)))'`
6068 if test "X$SCHEME_INC" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006069 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${SCHEME_INC}" >&5
6070printf "%s\n" "${SCHEME_INC}" >&6; }
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006071 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006072 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6073printf "%s\n" "not found" >&6; }
6074 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include" >&5
6075printf %s "checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006076 if test -f "$vi_cv_path_mzscheme_pfx/include/scheme.h"; then
6077 SCHEME_INC=${vi_cv_path_mzscheme_pfx}/include
Illia Bobyra96d5442023-08-30 16:30:15 +02006078 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6079printf "%s\n" "yes" >&6; }
Bram Moolenaarff4a37e2007-05-06 13:18:29 +00006080 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006081 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6082printf "%s\n" "no" >&6; }
6083 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include/plt" >&5
6084printf %s "checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include/plt... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006085 if test -f "$vi_cv_path_mzscheme_pfx/include/plt/scheme.h"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006086 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6087printf "%s\n" "yes" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006088 SCHEME_INC=${vi_cv_path_mzscheme_pfx}/include/plt
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006089 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006090 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6091printf "%s\n" "no" >&6; }
6092 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include/racket" >&5
6093printf %s "checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include/racket... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006094 if test -f "$vi_cv_path_mzscheme_pfx/include/racket/scheme.h"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006095 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6096printf "%s\n" "yes" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006097 SCHEME_INC=${vi_cv_path_mzscheme_pfx}/include/racket
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006098 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006099 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6100printf "%s\n" "no" >&6; }
6101 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in /usr/include/plt/" >&5
6102printf %s "checking if scheme.h can be found in /usr/include/plt/... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006103 if test -f /usr/include/plt/scheme.h; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006104 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6105printf "%s\n" "yes" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006106 SCHEME_INC=/usr/include/plt
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006107 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006108 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6109printf "%s\n" "no" >&6; }
6110 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in /usr/include/racket/" >&5
6111printf %s "checking if scheme.h can be found in /usr/include/racket/... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006112 if test -f /usr/include/racket/scheme.h; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006113 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6114printf "%s\n" "yes" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006115 SCHEME_INC=/usr/include/racket
6116 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006117 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6118printf "%s\n" "no" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006119 vi_cv_path_mzscheme_pfx=
6120 fi
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006121 fi
6122 fi
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006123 fi
Bram Moolenaarff4a37e2007-05-06 13:18:29 +00006124 fi
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006125 fi
6126 fi
6127
6128 if test "X$vi_cv_path_mzscheme_pfx" != "X"; then
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006129
Illia Bobyra96d5442023-08-30 16:30:15 +02006130 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for racket lib directory" >&5
6131printf %s "checking for racket lib directory... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006132 SCHEME_LIB=`${vi_cv_path_mzscheme} -e '(require setup/dirs)(let ((p (find-lib-dir))) (when (path? p) (display p)))'`
6133 if test "X$SCHEME_LIB" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006134 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${SCHEME_LIB}" >&5
6135printf "%s\n" "${SCHEME_LIB}" >&6; }
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006136 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006137 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6138printf "%s\n" "not found" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006139 fi
6140
6141 for path in "${vi_cv_path_mzscheme_pfx}/lib" "${SCHEME_LIB}"; do
6142 if test "X$path" != "X"; then
Bram Moolenaard0573012017-10-28 21:11:06 +02006143 if test "x$MACOS_X" = "xyes"; then
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006144 MZSCHEME_LIBS="-framework Racket"
6145 MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
6146 elif test -f "${path}/libmzscheme3m.a"; then
6147 MZSCHEME_LIBS="${path}/libmzscheme3m.a"
6148 MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
6149 elif test -f "${path}/libracket3m.a"; then
6150 MZSCHEME_LIBS="${path}/libracket3m.a"
Bram Moolenaar588d2412020-10-03 14:24:19 +02006151 if test -f "${path}/librktio.a"; then
6152 MZSCHEME_LIBS="${MZSCHEME_LIBS} ${path}/librktio.a"
6153 fi
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006154 MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
6155 elif test -f "${path}/libracket.a"; then
6156 MZSCHEME_LIBS="${path}/libracket.a ${path}/libmzgc.a"
6157 elif test -f "${path}/libmzscheme.a"; then
6158 MZSCHEME_LIBS="${path}/libmzscheme.a ${path}/libmzgc.a"
6159 else
6160 if test -f "${path}/libmzscheme3m.so"; then
6161 MZSCHEME_LIBS="-L${path} -lmzscheme3m"
6162 MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
6163 elif test -f "${path}/libracket3m.so"; then
6164 MZSCHEME_LIBS="-L${path} -lracket3m"
6165 MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
6166 elif test -f "${path}/libracket.so"; then
6167 MZSCHEME_LIBS="-L${path} -lracket -lmzgc"
6168 else
6169 if test "$path" != "$SCHEME_LIB"; then
6170 continue
6171 fi
6172 MZSCHEME_LIBS="-L${path} -lmzscheme -lmzgc"
6173 fi
6174 if test "$GCC" = yes; then
6175 MZSCHEME_LIBS="${MZSCHEME_LIBS} -Wl,-rpath -Wl,${path}"
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00006176 elif test "$vim_cv_uname_output" = SunOS &&
6177 echo $vim_cv_uname_r_output | grep '^5' >/dev/null; then
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006178 MZSCHEME_LIBS="${MZSCHEME_LIBS} -R ${path}"
6179 fi
6180 fi
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006181 fi
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006182 if test "X$MZSCHEME_LIBS" != "X"; then
6183 break
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006184 fi
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006185 done
6186
Illia Bobyra96d5442023-08-30 16:30:15 +02006187 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if racket requires -pthread" >&5
6188printf %s "checking if racket requires -pthread... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006189 if test "X$SCHEME_LIB" != "X" && $FGREP -e -pthread "$SCHEME_LIB/buildinfo" >/dev/null ; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006190 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6191printf "%s\n" "yes" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006192 MZSCHEME_LIBS="${MZSCHEME_LIBS} -pthread"
6193 MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -pthread"
6194 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006195 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6196printf "%s\n" "no" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006197 fi
6198
Illia Bobyra96d5442023-08-30 16:30:15 +02006199 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for racket config directory" >&5
6200printf %s "checking for racket config directory... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006201 SCHEME_CONFIGDIR=`${vi_cv_path_mzscheme} -e '(require setup/dirs)(let ((p (find-config-dir))) (when (path? p) (display p)))'`
6202 if test "X$SCHEME_CONFIGDIR" != "X"; then
6203 MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -DMZSCHEME_CONFIGDIR='\"${SCHEME_CONFIGDIR}\"'"
Illia Bobyra96d5442023-08-30 16:30:15 +02006204 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${SCHEME_CONFIGDIR}" >&5
6205printf "%s\n" "${SCHEME_CONFIGDIR}" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006206 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006207 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6208printf "%s\n" "not found" >&6; }
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006209 fi
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006210
Illia Bobyra96d5442023-08-30 16:30:15 +02006211 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for racket collects directory" >&5
6212printf %s "checking for racket collects directory... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006213 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))))'`
6214 if test "X$SCHEME_COLLECTS" = "X"; then
6215 if test -d "$vi_cv_path_mzscheme_pfx/lib/plt/collects"; then
6216 SCHEME_COLLECTS=$vi_cv_path_mzscheme_pfx/lib/plt/
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006217 else
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006218 if test -d "$vi_cv_path_mzscheme_pfx/lib/racket/collects"; then
6219 SCHEME_COLLECTS=$vi_cv_path_mzscheme_pfx/lib/racket/
Bram Moolenaar75676462013-01-30 14:55:42 +01006220 else
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006221 if test -d "$vi_cv_path_mzscheme_pfx/share/racket/collects"; then
6222 SCHEME_COLLECTS=$vi_cv_path_mzscheme_pfx/share/racket/
6223 else
6224 if test -d "$vi_cv_path_mzscheme_pfx/collects"; then
6225 SCHEME_COLLECTS=$vi_cv_path_mzscheme_pfx/
6226 fi
Bram Moolenaar75676462013-01-30 14:55:42 +01006227 fi
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006228 fi
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006229 fi
Bram Moolenaarff4a37e2007-05-06 13:18:29 +00006230 fi
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006231 if test "X$SCHEME_COLLECTS" != "X" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006232 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${SCHEME_COLLECTS}" >&5
6233printf "%s\n" "${SCHEME_COLLECTS}" >&6; }
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006234 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006235 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6236printf "%s\n" "not found" >&6; }
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006237 fi
6238
Illia Bobyra96d5442023-08-30 16:30:15 +02006239 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mzscheme_base.c" >&5
6240printf %s "checking for mzscheme_base.c... " >&6; }
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006241 if test -f "${SCHEME_COLLECTS}collects/scheme/base.ss" ; then
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006242 MZSCHEME_EXTRA="mzscheme_base.c"
Bram Moolenaara2aa31a2014-02-23 22:52:40 +01006243 MZSCHEME_MZC="${vi_cv_path_mzscheme_pfx}/bin/mzc"
6244 MZSCHEME_MOD="++lib scheme/base"
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006245 else
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006246 if test -f "${SCHEME_COLLECTS}collects/scheme/base.rkt" ; then
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006247 MZSCHEME_EXTRA="mzscheme_base.c"
Bram Moolenaara2aa31a2014-02-23 22:52:40 +01006248 MZSCHEME_MZC="${vi_cv_path_mzscheme_pfx}/bin/mzc"
6249 MZSCHEME_MOD="++lib scheme/base"
6250 else
6251 if test -f "${SCHEME_COLLECTS}collects/racket/base.rkt" ; then
6252 MZSCHEME_EXTRA="mzscheme_base.c"
6253 MZSCHEME_MZC="${vi_cv_path_mzscheme_pfx}/bin/raco ctool"
6254 MZSCHEME_MOD=""
6255 fi
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006256 fi
6257 fi
6258 if test "X$MZSCHEME_EXTRA" != "X" ; then
6259 MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -DINCLUDE_MZSCHEME_BASE"
Illia Bobyra96d5442023-08-30 16:30:15 +02006260 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: needed" >&5
6261printf "%s\n" "needed" >&6; }
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006262 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006263 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not needed" >&5
6264printf "%s\n" "not needed" >&6; }
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006265 fi
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006266
Illia Bobyra96d5442023-08-30 16:30:15 +02006267 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ffi_type_void in -lffi" >&5
6268printf %s "checking for ffi_type_void in -lffi... " >&6; }
6269if test ${ac_cv_lib_ffi_ffi_type_void+y}
6270then :
6271 printf %s "(cached) " >&6
6272else $as_nop
Bram Moolenaar9e902192013-07-17 18:58:11 +02006273 ac_check_lib_save_LIBS=$LIBS
6274LIBS="-lffi $LIBS"
6275cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6276/* end confdefs.h. */
6277
6278/* Override any GCC internal prototype to avoid an error.
6279 Use char because int might match the return type of a GCC
6280 builtin and then its argument prototype would still apply. */
Bram Moolenaar9e902192013-07-17 18:58:11 +02006281char ffi_type_void ();
6282int
Illia Bobyra96d5442023-08-30 16:30:15 +02006283main (void)
Bram Moolenaar9e902192013-07-17 18:58:11 +02006284{
6285return ffi_type_void ();
6286 ;
6287 return 0;
6288}
6289_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02006290if ac_fn_c_try_link "$LINENO"
6291then :
Bram Moolenaar9e902192013-07-17 18:58:11 +02006292 ac_cv_lib_ffi_ffi_type_void=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02006293else $as_nop
Bram Moolenaar9e902192013-07-17 18:58:11 +02006294 ac_cv_lib_ffi_ffi_type_void=no
6295fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006296rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar9e902192013-07-17 18:58:11 +02006297 conftest$ac_exeext conftest.$ac_ext
6298LIBS=$ac_check_lib_save_LIBS
6299fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006300{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ffi_ffi_type_void" >&5
6301printf "%s\n" "$ac_cv_lib_ffi_ffi_type_void" >&6; }
6302if test "x$ac_cv_lib_ffi_ffi_type_void" = xyes
6303then :
Bram Moolenaar9e902192013-07-17 18:58:11 +02006304 MZSCHEME_LIBS="$MZSCHEME_LIBS -lffi"
6305fi
6306
6307
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006308 MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -I${SCHEME_INC} \
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006309 -DMZSCHEME_COLLECTS='\"${SCHEME_COLLECTS}collects\"'"
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006310
Illia Bobyra96d5442023-08-30 16:30:15 +02006311 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compile and link flags for MzScheme are sane" >&5
6312printf %s "checking if compile and link flags for MzScheme are sane... " >&6; }
Bram Moolenaar9e902192013-07-17 18:58:11 +02006313 cflags_save=$CFLAGS
6314 libs_save=$LIBS
6315 CFLAGS="$CFLAGS $MZSCHEME_CFLAGS"
6316 LIBS="$LIBS $MZSCHEME_LIBS"
6317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6318/* end confdefs.h. */
6319
6320int
Illia Bobyra96d5442023-08-30 16:30:15 +02006321main (void)
Bram Moolenaar9e902192013-07-17 18:58:11 +02006322{
6323
6324 ;
6325 return 0;
6326}
6327_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02006328if ac_fn_c_try_link "$LINENO"
6329then :
6330 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6331printf "%s\n" "yes" >&6; }; mzs_ok=yes
6332else $as_nop
6333 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no: MZSCHEME DISABLED" >&5
6334printf "%s\n" "no: MZSCHEME DISABLED" >&6; }; mzs_ok=no
Bram Moolenaar9e902192013-07-17 18:58:11 +02006335fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006336rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar9e902192013-07-17 18:58:11 +02006337 conftest$ac_exeext conftest.$ac_ext
6338 CFLAGS=$cflags_save
6339 LIBS=$libs_save
6340 if test $mzs_ok = yes; then
6341 MZSCHEME_SRC="if_mzsch.c"
6342 MZSCHEME_OBJ="objects/if_mzsch.o"
6343 MZSCHEME_PRO="if_mzsch.pro"
Illia Bobyra96d5442023-08-30 16:30:15 +02006344 printf "%s\n" "#define FEAT_MZSCHEME 1" >>confdefs.h
Bram Moolenaar9e902192013-07-17 18:58:11 +02006345
6346 else
6347 MZSCHEME_CFLAGS=
6348 MZSCHEME_LIBS=
6349 MZSCHEME_EXTRA=
6350 MZSCHEME_MZC=
6351 fi
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006352 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006353
6354
6355
6356
6357
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006358
6359
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006360fi
6361
6362
Illia Bobyra96d5442023-08-30 16:30:15 +02006363{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-perlinterp argument" >&5
6364printf %s "checking --enable-perlinterp argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00006365# Check whether --enable-perlinterp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02006366if test ${enable_perlinterp+y}
6367then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00006368 enableval=$enable_perlinterp;
Illia Bobyra96d5442023-08-30 16:30:15 +02006369else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00006370 enable_perlinterp="no"
Bram Moolenaar446cb832008-06-24 21:56:24 +00006371fi
6372
Illia Bobyra96d5442023-08-30 16:30:15 +02006373{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_perlinterp" >&5
6374printf "%s\n" "$enable_perlinterp" >&6; }
Bram Moolenaare06c1882010-07-21 22:05:20 +02006375if test "$enable_perlinterp" = "yes" -o "$enable_perlinterp" = "dynamic"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00006376 if test "$has_eval" = "no"; then
Martin Tournoij7904fa42022-10-04 16:28:45 +01006377 as_fn_error $? "cannot use Perl with tiny features" "$LINENO" 5
Bram Moolenaar3c124e32016-01-31 14:36:58 +01006378 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006379
Bram Moolenaar071d4272004-06-13 20:20:40 +00006380 # Extract the first word of "perl", so it can be a program name with args.
6381set dummy perl; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02006382{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6383printf %s "checking for $ac_word... " >&6; }
6384if test ${ac_cv_path_vi_cv_path_perl+y}
6385then :
6386 printf %s "(cached) " >&6
6387else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006388 case $vi_cv_path_perl in
6389 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00006390 ac_cv_path_vi_cv_path_perl="$vi_cv_path_perl" # Let the user override the test with a path.
6391 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00006392 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006393 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6394for as_dir in $PATH
6395do
6396 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02006397 case $as_dir in #(((
6398 '') as_dir=./ ;;
6399 */) ;;
6400 *) as_dir=$as_dir/ ;;
6401 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006402 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02006403 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6404 ac_cv_path_vi_cv_path_perl="$as_dir$ac_word$ac_exec_ext"
6405 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006406 break 2
6407 fi
6408done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006409 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00006410IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006411
Bram Moolenaar071d4272004-06-13 20:20:40 +00006412 ;;
6413esac
6414fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006415vi_cv_path_perl=$ac_cv_path_vi_cv_path_perl
Bram Moolenaar071d4272004-06-13 20:20:40 +00006416if test -n "$vi_cv_path_perl"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006417 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_perl" >&5
6418printf "%s\n" "$vi_cv_path_perl" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006419else
Illia Bobyra96d5442023-08-30 16:30:15 +02006420 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6421printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006422fi
6423
Bram Moolenaar446cb832008-06-24 21:56:24 +00006424
Bram Moolenaar071d4272004-06-13 20:20:40 +00006425 if test "X$vi_cv_path_perl" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006426 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Perl version" >&5
6427printf %s "checking Perl version... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006428 if $vi_cv_path_perl -e 'require 5.003_01' >/dev/null 2>/dev/null; then
6429 eval `$vi_cv_path_perl -V:usethreads`
Bram Moolenaare06c1882010-07-21 22:05:20 +02006430 eval `$vi_cv_path_perl -V:libperl`
Bram Moolenaar071d4272004-06-13 20:20:40 +00006431 if test "X$usethreads" = "XUNKNOWN" -o "X$usethreads" = "Xundef"; then
6432 badthreads=no
6433 else
6434 if $vi_cv_path_perl -e 'require 5.6.0' >/dev/null 2>/dev/null; then
6435 eval `$vi_cv_path_perl -V:use5005threads`
6436 if test "X$use5005threads" = "XUNKNOWN" -o "X$use5005threads" = "Xundef"; then
6437 badthreads=no
6438 else
6439 badthreads=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02006440 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: >>> Perl > 5.6 with 5.5 threads cannot be used <<<" >&5
6441printf "%s\n" ">>> Perl > 5.6 with 5.5 threads cannot be used <<<" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006442 fi
6443 else
6444 badthreads=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02006445 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: >>> Perl 5.5 with threads cannot be used <<<" >&5
6446printf "%s\n" ">>> Perl 5.5 with threads cannot be used <<<" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006447 fi
6448 fi
6449 if test $badthreads = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006450 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: OK" >&5
6451printf "%s\n" "OK" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006452 eval `$vi_cv_path_perl -V:shrpenv`
6453 if test "X$shrpenv" = "XUNKNOWN"; then # pre 5.003_04
6454 shrpenv=""
6455 fi
6456 vi_cv_perllib=`$vi_cv_path_perl -MConfig -e 'print $Config{privlibexp}'`
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006457
Bram Moolenaard5f62b12014-08-17 17:05:44 +02006458 vi_cv_perl_extutils=unknown_perl_extutils_path
6459 for extutils_rel_path in ExtUtils vendor_perl/ExtUtils; do
6460 xsubpp_path="$vi_cv_perllib/$extutils_rel_path/xsubpp"
6461 if test -f "$xsubpp_path"; then
6462 vi_cv_perl_xsubpp="$xsubpp_path"
6463 fi
6464 done
6465
Bram Moolenaar1ec96c92017-09-27 21:42:08 +02006466 perlcppflags=`$vi_cv_path_perl -Mlib=$srcdir -MExtUtils::Embed \
Bram Moolenaare8ff56b2017-09-14 23:06:23 +02006467 -e 'ccflags;perl_inc;print"\n"' | sed -e 's/-fno[^ ]*//' \
6468 -e 's/-fdebug-prefix-map[^ ]*//g' \
Bram Moolenaar1ec96c92017-09-27 21:42:08 +02006469 -e 's/-pipe //' \
6470 -e 's/-W[^ ]*//g' \
Bram Moolenaar92021622017-10-12 12:33:43 +02006471 -e 's/-D_FORTIFY_SOURCE=.//g'`
Bram Moolenaar071d4272004-06-13 20:20:40 +00006472 perllibs=`cd $srcdir; $vi_cv_path_perl -MExtUtils::Embed -e 'ldopts' | \
6473 sed -e '/Warning/d' -e '/Note (probably harmless)/d' \
6474 -e 's/-bE:perl.exp//' -e 's/-lc //'`
6475 perlldflags=`cd $srcdir; $vi_cv_path_perl -MExtUtils::Embed \
6476 -e 'ccdlflags' | sed -e 's/-bE:perl.exp//'`
6477
Illia Bobyra96d5442023-08-30 16:30:15 +02006478 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compile and link flags for Perl are sane" >&5
6479printf %s "checking if compile and link flags for Perl are sane... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006480 cflags_save=$CFLAGS
6481 libs_save=$LIBS
6482 ldflags_save=$LDFLAGS
6483 CFLAGS="$CFLAGS $perlcppflags"
6484 LIBS="$LIBS $perllibs"
Bram Moolenaara6cc0312013-06-18 23:31:55 +02006485 perlldflags=`echo "$perlldflags" | sed -e 's/^ *//g'`
Bram Moolenaar071d4272004-06-13 20:20:40 +00006486 LDFLAGS="$perlldflags $LDFLAGS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006488/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00006489
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006490int
Illia Bobyra96d5442023-08-30 16:30:15 +02006491main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006492{
6493
6494 ;
6495 return 0;
6496}
6497_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02006498if ac_fn_c_try_link "$LINENO"
6499then :
6500 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6501printf "%s\n" "yes" >&6; }; perl_ok=yes
6502else $as_nop
6503 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no: PERL DISABLED" >&5
6504printf "%s\n" "no: PERL DISABLED" >&6; }; perl_ok=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00006505fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006506rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006507 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +00006508 CFLAGS=$cflags_save
6509 LIBS=$libs_save
6510 LDFLAGS=$ldflags_save
6511 if test $perl_ok = yes; then
6512 if test "X$perlcppflags" != "X"; then
Bram Moolenaar1ec96c92017-09-27 21:42:08 +02006513 PERL_CFLAGS=$perlcppflags
Bram Moolenaar071d4272004-06-13 20:20:40 +00006514 fi
6515 if test "X$perlldflags" != "X"; then
Bram Moolenaar2bcaec32014-03-27 18:51:11 +01006516 if test "X`echo \"$LDFLAGS\" | $FGREP -e \"$perlldflags\"`" = "X"; then
Bram Moolenaara6cc0312013-06-18 23:31:55 +02006517 LDFLAGS="$perlldflags $LDFLAGS"
6518 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006519 fi
6520 PERL_LIBS=$perllibs
6521 PERL_SRC="auto/if_perl.c if_perlsfio.c"
6522 PERL_OBJ="objects/if_perl.o objects/if_perlsfio.o"
6523 PERL_PRO="if_perl.pro if_perlsfio.pro"
Illia Bobyra96d5442023-08-30 16:30:15 +02006524 printf "%s\n" "#define FEAT_PERL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00006525
6526 fi
6527 fi
6528 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006529 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: >>> too old; need Perl version 5.003_01 or later <<<" >&5
6530printf "%s\n" ">>> too old; need Perl version 5.003_01 or later <<<" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006531 fi
6532 fi
6533
Bram Moolenaard0573012017-10-28 21:11:06 +02006534 if test "x$MACOS_X" = "xyes"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00006535 dir=/System/Library/Perl
6536 darwindir=$dir/darwin
6537 if test -d $darwindir; then
6538 PERL=/usr/bin/perl
6539 else
6540 dir=/System/Library/Perl/5.8.1
6541 darwindir=$dir/darwin-thread-multi-2level
6542 if test -d $darwindir; then
6543 PERL=/usr/bin/perl
6544 fi
6545 fi
6546 if test -n "$PERL"; then
6547 PERL_DIR="$dir"
6548 PERL_CFLAGS="-DFEAT_PERL -I$darwindir/CORE"
6549 PERL_OBJ="objects/if_perl.o objects/if_perlsfio.o $darwindir/auto/DynaLoader/DynaLoader.a"
6550 PERL_LIBS="-L$darwindir/CORE -lperl"
6551 fi
Bram Moolenaar5dff57d2010-07-24 16:19:44 +02006552 PERL_LIBS=`echo "$PERL_LIBS" | sed -e 's/-arch\ ppc//' -e 's/-arch\ i386//' -e 's/-arch\ x86_64//'`
6553 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 +00006554 fi
Bram Moolenaare06c1882010-07-21 22:05:20 +02006555 if test "$enable_perlinterp" = "dynamic"; then
6556 if test "$perl_ok" = "yes" -a "X$libperl" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006557 printf "%s\n" "#define DYNAMIC_PERL 1" >>confdefs.h
Bram Moolenaare06c1882010-07-21 22:05:20 +02006558
6559 PERL_CFLAGS="-DDYNAMIC_PERL_DLL=\\\"$libperl\\\" $PERL_CFLAGS"
Christian Brabandt55460da2023-08-29 21:31:28 +02006560 PERL_LIBS=""
Bram Moolenaare06c1882010-07-21 22:05:20 +02006561 fi
6562 fi
Bram Moolenaarf788a062011-12-14 20:51:25 +01006563
6564 if test "$fail_if_missing" = "yes" -a "$perl_ok" != "yes"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01006565 as_fn_error $? "could not configure perl" "$LINENO" 5
Bram Moolenaarf788a062011-12-14 20:51:25 +01006566 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006567fi
6568
6569
6570
6571
6572
6573
6574
ichizok8bb3fe42021-12-28 15:51:45 +00006575
Illia Bobyra96d5442023-08-30 16:30:15 +02006576{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-pythoninterp argument" >&5
6577printf %s "checking --enable-pythoninterp argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00006578# Check whether --enable-pythoninterp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02006579if test ${enable_pythoninterp+y}
6580then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00006581 enableval=$enable_pythoninterp;
Illia Bobyra96d5442023-08-30 16:30:15 +02006582else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00006583 enable_pythoninterp="no"
Bram Moolenaar446cb832008-06-24 21:56:24 +00006584fi
6585
Illia Bobyra96d5442023-08-30 16:30:15 +02006586{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_pythoninterp" >&5
6587printf "%s\n" "$enable_pythoninterp" >&6; }
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02006588if test "$enable_pythoninterp" = "yes" -o "$enable_pythoninterp" = "dynamic"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00006589 if test "$has_eval" = "no"; then
Martin Tournoij7904fa42022-10-04 16:28:45 +01006590 as_fn_error $? "cannot use Python with tiny features" "$LINENO" 5
Bram Moolenaar0b105412014-11-30 13:34:23 +01006591 fi
6592
Illia Bobyra96d5442023-08-30 16:30:15 +02006593 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-python-command argument" >&5
6594printf %s "checking --with-python-command argument... " >&6; }
Bram Moolenaare1a32312018-04-15 16:03:25 +02006595
6596
6597# Check whether --with-python-command was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02006598if test ${with_python_command+y}
6599then :
6600 withval=$with_python_command; vi_cv_path_python="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python" >&5
6601printf "%s\n" "$vi_cv_path_python" >&6; }
6602else $as_nop
6603 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6604printf "%s\n" "no" >&6; }
Bram Moolenaare1a32312018-04-15 16:03:25 +02006605fi
6606
6607
6608 if test "X$vi_cv_path_python" = "X"; then
Bram Moolenaar09ba6d72012-12-12 14:25:05 +01006609 for ac_prog in python2 python
6610do
6611 # Extract the first word of "$ac_prog", so it can be a program name with args.
6612set dummy $ac_prog; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02006613{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6614printf %s "checking for $ac_word... " >&6; }
6615if test ${ac_cv_path_vi_cv_path_python+y}
6616then :
6617 printf %s "(cached) " >&6
6618else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006619 case $vi_cv_path_python in
6620 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00006621 ac_cv_path_vi_cv_path_python="$vi_cv_path_python" # Let the user override the test with a path.
6622 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00006623 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006624 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6625for as_dir in $PATH
6626do
6627 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02006628 case $as_dir in #(((
6629 '') as_dir=./ ;;
6630 */) ;;
6631 *) as_dir=$as_dir/ ;;
6632 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006633 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02006634 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6635 ac_cv_path_vi_cv_path_python="$as_dir$ac_word$ac_exec_ext"
6636 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006637 break 2
6638 fi
6639done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006640 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00006641IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006642
Bram Moolenaar071d4272004-06-13 20:20:40 +00006643 ;;
6644esac
6645fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006646vi_cv_path_python=$ac_cv_path_vi_cv_path_python
Bram Moolenaar071d4272004-06-13 20:20:40 +00006647if test -n "$vi_cv_path_python"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006648 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python" >&5
6649printf "%s\n" "$vi_cv_path_python" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006650else
Illia Bobyra96d5442023-08-30 16:30:15 +02006651 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6652printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006653fi
6654
Bram Moolenaar446cb832008-06-24 21:56:24 +00006655
Bram Moolenaar09ba6d72012-12-12 14:25:05 +01006656 test -n "$vi_cv_path_python" && break
6657done
6658
Bram Moolenaare1a32312018-04-15 16:03:25 +02006659 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006660 if test "X$vi_cv_path_python" != "X"; then
6661
Illia Bobyra96d5442023-08-30 16:30:15 +02006662 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python version" >&5
6663printf %s "checking Python version... " >&6; }
6664if test ${vi_cv_var_python_version+y}
6665then :
6666 printf %s "(cached) " >&6
6667else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00006668 vi_cv_var_python_version=`
6669 ${vi_cv_path_python} -c 'import sys; print sys.version[:3]'`
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006670
Bram Moolenaar071d4272004-06-13 20:20:40 +00006671fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006672{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_var_python_version" >&5
6673printf "%s\n" "$vi_cv_var_python_version" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006674
Illia Bobyra96d5442023-08-30 16:30:15 +02006675 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python is 2.3 or better" >&5
6676printf %s "checking Python is 2.3 or better... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006677 if ${vi_cv_path_python} -c \
Bram Moolenaarc09a6d62013-06-10 21:27:29 +02006678 "import sys; sys.exit(${vi_cv_var_python_version} < 2.3)"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006679 then
Illia Bobyra96d5442023-08-30 16:30:15 +02006680 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yep" >&5
6681printf "%s\n" "yep" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006682
Illia Bobyra96d5442023-08-30 16:30:15 +02006683 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's install prefix" >&5
6684printf %s "checking Python's install prefix... " >&6; }
6685if test ${vi_cv_path_python_pfx+y}
6686then :
6687 printf %s "(cached) " >&6
6688else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00006689 vi_cv_path_python_pfx=`
6690 ${vi_cv_path_python} -c \
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006691 "import sys; print sys.prefix"`
Bram Moolenaar071d4272004-06-13 20:20:40 +00006692fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006693{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python_pfx" >&5
6694printf "%s\n" "$vi_cv_path_python_pfx" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006695
Illia Bobyra96d5442023-08-30 16:30:15 +02006696 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's execution prefix" >&5
6697printf %s "checking Python's execution prefix... " >&6; }
6698if test ${vi_cv_path_python_epfx+y}
6699then :
6700 printf %s "(cached) " >&6
6701else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00006702 vi_cv_path_python_epfx=`
6703 ${vi_cv_path_python} -c \
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006704 "import sys; print sys.exec_prefix"`
Bram Moolenaar071d4272004-06-13 20:20:40 +00006705fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006706{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python_epfx" >&5
6707printf "%s\n" "$vi_cv_path_python_epfx" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006708
Bram Moolenaar071d4272004-06-13 20:20:40 +00006709
Illia Bobyra96d5442023-08-30 16:30:15 +02006710 if test ${vi_cv_path_pythonpath+y}
6711then :
6712 printf %s "(cached) " >&6
6713else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00006714 vi_cv_path_pythonpath=`
6715 unset PYTHONPATH;
6716 ${vi_cv_path_python} -c \
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006717 "import sys, string; print string.join(sys.path,':')"`
Bram Moolenaar071d4272004-06-13 20:20:40 +00006718fi
6719
6720
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006721
6722
Bram Moolenaar446cb832008-06-24 21:56:24 +00006723# Check whether --with-python-config-dir was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02006724if test ${with_python_config_dir+y}
6725then :
Bram Moolenaard0882402018-04-10 18:13:05 +02006726 withval=$with_python_config_dir; vi_cv_path_python_conf="${withval}"; have_python_config_dir=1
Bram Moolenaar446cb832008-06-24 21:56:24 +00006727fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006728
Bram Moolenaar446cb832008-06-24 21:56:24 +00006729
Illia Bobyra96d5442023-08-30 16:30:15 +02006730 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's configuration directory" >&5
6731printf %s "checking Python's configuration directory... " >&6; }
6732if test ${vi_cv_path_python_conf+y}
6733then :
6734 printf %s "(cached) " >&6
6735else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006736
Bram Moolenaar071d4272004-06-13 20:20:40 +00006737 vi_cv_path_python_conf=
Bram Moolenaarac499e32013-06-02 19:14:17 +02006738 d=`${vi_cv_path_python} -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('LIBPL')"`
6739 if test -d "$d" && test -f "$d/config.c"; then
6740 vi_cv_path_python_conf="$d"
6741 else
6742 for path in "${vi_cv_path_python_pfx}" "${vi_cv_path_python_epfx}"; do
6743 for subdir in lib64 lib share; do
6744 d="${path}/${subdir}/python${vi_cv_var_python_version}/config"
6745 if test -d "$d" && test -f "$d/config.c"; then
6746 vi_cv_path_python_conf="$d"
6747 fi
6748 done
Bram Moolenaar071d4272004-06-13 20:20:40 +00006749 done
Bram Moolenaarac499e32013-06-02 19:14:17 +02006750 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006751
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006752fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006753{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python_conf" >&5
6754printf "%s\n" "$vi_cv_path_python_conf" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006755
6756 PYTHON_CONFDIR="${vi_cv_path_python_conf}"
6757
6758 if test "X$PYTHON_CONFDIR" = "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006759 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: can't find it!" >&5
6760printf "%s\n" "can't find it!" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006761 else
6762
Illia Bobyra96d5442023-08-30 16:30:15 +02006763 if test ${vi_cv_path_python_plibs+y}
6764then :
6765 printf %s "(cached) " >&6
6766else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006767
Bram Moolenaar01dd60c2008-07-24 14:24:48 +00006768 pwd=`pwd`
6769 tmp_mkf="$pwd/config-PyMake$$"
6770 cat -- "${PYTHON_CONFDIR}/Makefile" - <<'eof' >"${tmp_mkf}"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006771__:
Bram Moolenaar218116c2010-05-20 21:46:00 +02006772 @echo "python_BASEMODLIBS='$(BASEMODLIBS)'"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006773 @echo "python_LIBS='$(LIBS)'"
6774 @echo "python_SYSLIBS='$(SYSLIBS)'"
6775 @echo "python_LINKFORSHARED='$(LINKFORSHARED)'"
Bram Moolenaarf94a13c2012-09-21 13:26:49 +02006776 @echo "python_DLLLIBRARY='$(DLLLIBRARY)'"
Bram Moolenaar2a7e2a62010-07-24 15:19:11 +02006777 @echo "python_INSTSONAME='$(INSTSONAME)'"
Bram Moolenaar6c927552015-03-24 12:21:33 +01006778 @echo "python_PYTHONFRAMEWORK='$(PYTHONFRAMEWORK)'"
6779 @echo "python_PYTHONFRAMEWORKPREFIX='$(PYTHONFRAMEWORKPREFIX)'"
6780 @echo "python_PYTHONFRAMEWORKINSTALLDIR='$(PYTHONFRAMEWORKINSTALLDIR)'"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006781eof
Bram Moolenaar01dd60c2008-07-24 14:24:48 +00006782 eval "`cd ${PYTHON_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`"
6783 rm -f -- "${tmp_mkf}"
Bram Moolenaard0573012017-10-28 21:11:06 +02006784 if test "x$MACOS_X" = "xyes" && test -n "${python_PYTHONFRAMEWORK}" && ${vi_cv_path_python} -c \
Bram Moolenaar071d4272004-06-13 20:20:40 +00006785 "import sys; sys.exit(${vi_cv_var_python_version} < 2.3)"; then
6786 vi_cv_path_python_plibs="-framework Python"
Bram Moolenaar6c927552015-03-24 12:21:33 +01006787 if test "x${vi_cv_path_python}" != "x/usr/bin/python" && test -n "${python_PYTHONFRAMEWORKPREFIX}"; then
6788 vi_cv_path_python_plibs="-F${python_PYTHONFRAMEWORKPREFIX} -framework Python"
6789 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006790 else
Bram Moolenaar9ce42132018-04-11 22:19:36 +02006791 vi_cv_path_python_plibs="-L${PYTHON_CONFDIR} -lpython${vi_cv_var_python_version}"
Bram Moolenaara161e262015-03-24 15:14:27 +01006792 if test -n "${python_LINKFORSHARED}" && test -n "${python_PYTHONFRAMEWORKPREFIX}"; then
Bram Moolenaar6c927552015-03-24 12:21:33 +01006793 python_link_symbol=`echo ${python_LINKFORSHARED} | sed 's/\([^ \t][^ \t]*[ \t][ \t]*[^ \t][^ \t]*\)[ \t].*/\1/'`
6794 python_link_path=`echo ${python_LINKFORSHARED} | sed 's/\([^ \t][^ \t]*[ \t][ \t]*[^ \t][^ \t]*\)[ \t][ \t]*\(.*\)/\2/'`
6795 if test -n "${python_link_path}" && ! test -x "${python_link_path}"; then
6796 python_link_path="${python_PYTHONFRAMEWORKPREFIX}/${python_link_path}"
6797 if test -n "${python_link_path}" && ! test -x "${python_link_path}"; then
6798 python_link_path="${python_PYTHONFRAMEWORKINSTALLDIR}/Versions/${vi_cv_var_python_version}/${python_PYTHONFRAMEWORK}"
6799 fi
6800 python_LINKFORSHARED="${python_link_symbol} ${python_link_path}"
6801 fi
6802 fi
Bram Moolenaar218116c2010-05-20 21:46:00 +02006803 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 +00006804 vi_cv_path_python_plibs=`echo $vi_cv_path_python_plibs | sed s/-ltermcap//`
6805 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006806
Bram Moolenaar071d4272004-06-13 20:20:40 +00006807fi
6808
Illia Bobyra96d5442023-08-30 16:30:15 +02006809 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's dll name" >&5
6810printf %s "checking Python's dll name... " >&6; }
6811if test ${vi_cv_dll_name_python+y}
6812then :
6813 printf %s "(cached) " >&6
6814else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00006815
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02006816 if test "X$python_DLLLIBRARY" != "X"; then
6817 vi_cv_dll_name_python="$python_DLLLIBRARY"
6818 else
6819 vi_cv_dll_name_python="$python_INSTSONAME"
6820 fi
6821
6822fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006823{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_dll_name_python" >&5
6824printf "%s\n" "$vi_cv_dll_name_python" >&6; }
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02006825
Bram Moolenaar071d4272004-06-13 20:20:40 +00006826 PYTHON_LIBS="${vi_cv_path_python_plibs}"
6827 if test "${vi_cv_path_python_pfx}" = "${vi_cv_path_python_epfx}"; then
Bram Moolenaar04249582018-04-10 13:29:34 +02006828 PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version}"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006829 else
Bram Moolenaar04249582018-04-10 13:29:34 +02006830 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 +00006831 fi
Bram Moolenaar3a21d9c2018-04-10 20:26:20 +02006832 if test "X$have_python_config_dir" = "X1" -a "$enable_pythoninterp" = "dynamic"; then
Bram Moolenaard0882402018-04-10 18:13:05 +02006833 PYTHON_CFLAGS="${PYTHON_CFLAGS} -DPYTHON_HOME='\"${vi_cv_path_python_pfx}\"'"
6834
6835 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006836 PYTHON_SRC="if_python.c"
Bram Moolenaar9bdb9a02012-07-25 16:32:08 +02006837 PYTHON_OBJ="objects/if_python.o"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006838
Illia Bobyra96d5442023-08-30 16:30:15 +02006839 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -pthread should be used" >&5
6840printf %s "checking if -pthread should be used... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006841 threadsafe_flag=
6842 thread_lib=
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00006843 if test "$vim_cv_uname_output" != Darwin; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00006844 test "$GCC" = yes && threadsafe_flag="-pthread"
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00006845 if test "$vim_cv_uname_output" = FreeBSD; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00006846 threadsafe_flag="-D_THREAD_SAFE"
6847 thread_lib="-pthread"
6848 fi
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00006849 if test "$vim_cv_uname_output" = SunOS; then
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02006850 threadsafe_flag="-pthreads"
6851 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006852 fi
6853 libs_save_old=$LIBS
6854 if test -n "$threadsafe_flag"; then
6855 cflags_save=$CFLAGS
6856 CFLAGS="$CFLAGS $threadsafe_flag"
6857 LIBS="$LIBS $thread_lib"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006859/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00006860
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006861int
Illia Bobyra96d5442023-08-30 16:30:15 +02006862main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006863{
6864
6865 ;
6866 return 0;
6867}
6868_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02006869if ac_fn_c_try_link "$LINENO"
6870then :
6871 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6872printf "%s\n" "yes" >&6; }; PYTHON_CFLAGS="$PYTHON_CFLAGS $threadsafe_flag"
6873else $as_nop
6874 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6875printf "%s\n" "no" >&6; }; LIBS=$libs_save_old
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006876
Bram Moolenaar071d4272004-06-13 20:20:40 +00006877fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006878rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006879 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +00006880 CFLAGS=$cflags_save
6881 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006882 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6883printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006884 fi
6885
Illia Bobyra96d5442023-08-30 16:30:15 +02006886 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compile and link flags for Python are sane" >&5
6887printf %s "checking if compile and link flags for Python are sane... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006888 cflags_save=$CFLAGS
6889 libs_save=$LIBS
Bram Moolenaar69f787a2010-07-11 20:52:58 +02006890 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006891 LIBS="$LIBS $PYTHON_LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006893/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00006894
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006895int
Illia Bobyra96d5442023-08-30 16:30:15 +02006896main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006897{
6898
6899 ;
6900 return 0;
6901}
6902_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02006903if ac_fn_c_try_link "$LINENO"
6904then :
6905 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6906printf "%s\n" "yes" >&6; }; python_ok=yes
6907else $as_nop
6908 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no: PYTHON DISABLED" >&5
6909printf "%s\n" "no: PYTHON DISABLED" >&6; }; python_ok=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00006910fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006911rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006912 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +00006913 CFLAGS=$cflags_save
6914 LIBS=$libs_save
6915 if test $python_ok = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006916 printf "%s\n" "#define FEAT_PYTHON 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00006917
6918 else
6919 LIBS=$libs_save_old
6920 PYTHON_SRC=
6921 PYTHON_OBJ=
6922 PYTHON_LIBS=
6923 PYTHON_CFLAGS=
6924 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006925 fi
6926 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006927 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: too old" >&5
6928printf "%s\n" "too old" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006929 fi
6930 fi
Bram Moolenaarf788a062011-12-14 20:51:25 +01006931
6932 if test "$fail_if_missing" = "yes" -a "$python_ok" != "yes"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01006933 as_fn_error $? "could not configure python" "$LINENO" 5
Bram Moolenaarf788a062011-12-14 20:51:25 +01006934 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006935fi
6936
6937
6938
6939
6940
6941
6942
ichizok8bb3fe42021-12-28 15:51:45 +00006943
Illia Bobyra96d5442023-08-30 16:30:15 +02006944{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-python3interp argument" >&5
6945printf %s "checking --enable-python3interp argument... " >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02006946# Check whether --enable-python3interp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02006947if test ${enable_python3interp+y}
6948then :
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02006949 enableval=$enable_python3interp;
Illia Bobyra96d5442023-08-30 16:30:15 +02006950else $as_nop
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02006951 enable_python3interp="no"
6952fi
6953
Illia Bobyra96d5442023-08-30 16:30:15 +02006954{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_python3interp" >&5
6955printf "%s\n" "$enable_python3interp" >&6; }
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02006956if test "$enable_python3interp" = "yes" -o "$enable_python3interp" = "dynamic"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00006957 if test "$has_eval" = "no"; then
Martin Tournoij7904fa42022-10-04 16:28:45 +01006958 as_fn_error $? "cannot use Python with tiny features" "$LINENO" 5
Bram Moolenaar0b105412014-11-30 13:34:23 +01006959 fi
6960
Illia Bobyra96d5442023-08-30 16:30:15 +02006961 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-python3-command argument" >&5
6962printf %s "checking --with-python3-command argument... " >&6; }
Bram Moolenaare1a32312018-04-15 16:03:25 +02006963
6964
6965# Check whether --with-python3-command was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02006966if test ${with_python3_command+y}
6967then :
6968 withval=$with_python3_command; vi_cv_path_python3="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3" >&5
6969printf "%s\n" "$vi_cv_path_python3" >&6; }
6970else $as_nop
6971 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6972printf "%s\n" "no" >&6; }
Bram Moolenaare1a32312018-04-15 16:03:25 +02006973fi
6974
6975
6976 if test "X$vi_cv_path_python3" = "X"; then
Bram Moolenaar09ba6d72012-12-12 14:25:05 +01006977 for ac_prog in python3 python
6978do
6979 # Extract the first word of "$ac_prog", so it can be a program name with args.
6980set dummy $ac_prog; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02006981{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6982printf %s "checking for $ac_word... " >&6; }
6983if test ${ac_cv_path_vi_cv_path_python3+y}
6984then :
6985 printf %s "(cached) " >&6
6986else $as_nop
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02006987 case $vi_cv_path_python3 in
6988 [\\/]* | ?:[\\/]*)
6989 ac_cv_path_vi_cv_path_python3="$vi_cv_path_python3" # Let the user override the test with a path.
6990 ;;
6991 *)
6992 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6993for as_dir in $PATH
6994do
6995 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02006996 case $as_dir in #(((
6997 '') as_dir=./ ;;
6998 */) ;;
6999 *) as_dir=$as_dir/ ;;
7000 esac
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007001 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02007002 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7003 ac_cv_path_vi_cv_path_python3="$as_dir$ac_word$ac_exec_ext"
7004 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007005 break 2
7006 fi
7007done
7008 done
7009IFS=$as_save_IFS
7010
7011 ;;
7012esac
7013fi
7014vi_cv_path_python3=$ac_cv_path_vi_cv_path_python3
7015if test -n "$vi_cv_path_python3"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007016 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3" >&5
7017printf "%s\n" "$vi_cv_path_python3" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007018else
Illia Bobyra96d5442023-08-30 16:30:15 +02007019 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7020printf "%s\n" "no" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007021fi
7022
7023
Bram Moolenaar09ba6d72012-12-12 14:25:05 +01007024 test -n "$vi_cv_path_python3" && break
7025done
7026
Bram Moolenaare1a32312018-04-15 16:03:25 +02007027 fi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007028 if test "X$vi_cv_path_python3" != "X"; then
7029
Illia Bobyra96d5442023-08-30 16:30:15 +02007030 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python version" >&5
7031printf %s "checking Python version... " >&6; }
7032if test ${vi_cv_var_python3_version+y}
7033then :
7034 printf %s "(cached) " >&6
7035else $as_nop
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007036 vi_cv_var_python3_version=`
Bram Moolenaar23c01922021-05-21 11:43:58 +02007037 ${vi_cv_path_python3} -c 'import sys; print("{}.{}".format(sys.version_info.major, sys.version_info.minor))'`
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007038
7039fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007040{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_var_python3_version" >&5
7041printf "%s\n" "$vi_cv_var_python3_version" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007042
Illia Bobyra96d5442023-08-30 16:30:15 +02007043 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python is 3.0 or better" >&5
7044printf %s "checking Python is 3.0 or better... " >&6; }
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007045 if ${vi_cv_path_python3} -c \
7046 "import sys; sys.exit(${vi_cv_var_python3_version} < 3.0)"
7047 then
Illia Bobyra96d5442023-08-30 16:30:15 +02007048 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yep" >&5
7049printf "%s\n" "yep" >&6; }
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007050
Illia Bobyra96d5442023-08-30 16:30:15 +02007051 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-python3-stable-abi argument" >&5
7052printf %s "checking --with-python3-stable-abi argument... " >&6; }
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007053
7054
7055# Check whether --with-python3-stable-abi was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02007056if test ${with_python3_stable_abi+y}
7057then :
7058 withval=$with_python3_stable_abi; vi_cv_var_python3_stable_abi="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_var_python3_stable_abi" >&5
7059printf "%s\n" "$vi_cv_var_python3_stable_abi" >&6; }
7060else $as_nop
7061 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7062printf "%s\n" "no" >&6; }
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007063fi
7064
7065 if test "X$vi_cv_var_python3_stable_abi" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007066 if test ${vi_cv_var_python3_stable_abi_hex+y}
7067then :
7068 printf %s "(cached) " >&6
7069else $as_nop
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007070
7071 vi_cv_var_python3_stable_abi_hex=`
7072 ${vi_cv_path_python3} -c \
7073 "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) ))"`
7074fi
7075
Yee Cheng Chine7d79eb2023-09-16 13:38:26 +02007076 if test "X$vi_cv_var_python3_stable_abi_hex" = "X"; then
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007077 as_fn_error $? "can't parse Python 3 stable ABI version. It should be \"<major>.<minor>\"" "$LINENO" 5
7078 fi
7079 fi
7080
Illia Bobyra96d5442023-08-30 16:30:15 +02007081 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's abiflags" >&5
7082printf %s "checking Python's abiflags... " >&6; }
7083if test ${vi_cv_var_python3_abiflags+y}
7084then :
7085 printf %s "(cached) " >&6
7086else $as_nop
Bram Moolenaar456f2bb2011-06-12 21:37:13 +02007087
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007088 vi_cv_var_python3_abiflags=
7089 if ${vi_cv_path_python3} -c \
7090 "import sys; sys.exit(${vi_cv_var_python3_version} < 3.2)"
7091 then
7092 vi_cv_var_python3_abiflags=`${vi_cv_path_python3} -c \
7093 "import sys; print(sys.abiflags)"`
7094 fi
Bram Moolenaar456f2bb2011-06-12 21:37:13 +02007095fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007096{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_var_python3_abiflags" >&5
7097printf "%s\n" "$vi_cv_var_python3_abiflags" >&6; }
Bram Moolenaar456f2bb2011-06-12 21:37:13 +02007098
Illia Bobyra96d5442023-08-30 16:30:15 +02007099 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's install prefix" >&5
7100printf %s "checking Python's install prefix... " >&6; }
7101if test ${vi_cv_path_python3_pfx+y}
7102then :
7103 printf %s "(cached) " >&6
7104else $as_nop
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007105 vi_cv_path_python3_pfx=`
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007106 ${vi_cv_path_python3} -c \
7107 "import sys; print(sys.prefix)"`
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007108fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007109{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3_pfx" >&5
7110printf "%s\n" "$vi_cv_path_python3_pfx" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007111
Illia Bobyra96d5442023-08-30 16:30:15 +02007112 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's execution prefix" >&5
7113printf %s "checking Python's execution prefix... " >&6; }
7114if test ${vi_cv_path_python3_epfx+y}
7115then :
7116 printf %s "(cached) " >&6
7117else $as_nop
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007118 vi_cv_path_python3_epfx=`
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007119 ${vi_cv_path_python3} -c \
7120 "import sys; print(sys.exec_prefix)"`
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007121fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007122{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3_epfx" >&5
7123printf "%s\n" "$vi_cv_path_python3_epfx" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007124
Illia Bobyra96d5442023-08-30 16:30:15 +02007125 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's include path" >&5
7126printf %s "checking Python's include path... " >&6; }
7127if test ${vi_cv_path_python3_include+y}
7128then :
7129 printf %s "(cached) " >&6
7130else $as_nop
Illia Bobyr74e1dad2023-08-27 18:26:54 +02007131 vi_cv_path_python3_include=`
7132 ${vi_cv_path_python3} -c \
7133 "import sysconfig; print(sysconfig.get_path(\"include\"))"`
7134fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007135{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3_include" >&5
7136printf "%s\n" "$vi_cv_path_python3_include" >&6; }
Illia Bobyr74e1dad2023-08-27 18:26:54 +02007137
Illia Bobyra96d5442023-08-30 16:30:15 +02007138 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's include path" >&5
7139printf %s "checking Python's include path... " >&6; }
7140if test ${vi_cv_path_python3_platinclude+y}
7141then :
7142 printf %s "(cached) " >&6
7143else $as_nop
Illia Bobyr74e1dad2023-08-27 18:26:54 +02007144 vi_cv_path_python3_platinclude=`
7145 ${vi_cv_path_python3} -c \
7146 "import sysconfig; print(sysconfig.get_path(\"platinclude\"))"`
7147fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007148{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3_platinclude" >&5
7149printf "%s\n" "$vi_cv_path_python3_platinclude" >&6; }
Illia Bobyr74e1dad2023-08-27 18:26:54 +02007150
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007151
Illia Bobyra96d5442023-08-30 16:30:15 +02007152 if test ${vi_cv_path_python3path+y}
7153then :
7154 printf %s "(cached) " >&6
7155else $as_nop
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007156 vi_cv_path_python3path=`
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007157 unset PYTHONPATH;
7158 ${vi_cv_path_python3} -c \
7159 "import sys, string; print(':'.join(sys.path))"`
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007160fi
7161
7162
7163
7164
7165# Check whether --with-python3-config-dir was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02007166if test ${with_python3_config_dir+y}
7167then :
Bram Moolenaard0882402018-04-10 18:13:05 +02007168 withval=$with_python3_config_dir; vi_cv_path_python3_conf="${withval}"; have_python3_config_dir=1
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007169fi
7170
7171
Illia Bobyra96d5442023-08-30 16:30:15 +02007172 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's configuration directory" >&5
7173printf %s "checking Python's configuration directory... " >&6; }
7174if test ${vi_cv_path_python3_conf+y}
7175then :
7176 printf %s "(cached) " >&6
7177else $as_nop
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007178
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007179 vi_cv_path_python3_conf=
Bram Moolenaarfee496d2013-07-12 20:07:24 +02007180 config_dir="config-${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags}"
Zdenek Dohnal31e299c2021-06-10 18:50:55 +02007181 d=`${vi_cv_path_python3} -c "import sysconfig; print(sysconfig.get_config_var('LIBPL'))" 2> /dev/null`
7182 if test "x$d" = "x"; then
7183 d=`${vi_cv_path_python3} -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('LIBPL'))"`
7184 fi
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007185 if test -d "$d" && test -f "$d/config.c"; then
7186 vi_cv_path_python3_conf="$d"
7187 else
7188 for path in "${vi_cv_path_python3_pfx}" "${vi_cv_path_python3_epfx}"; do
7189 for subdir in lib64 lib share; do
7190 d="${path}/${subdir}/python${vi_cv_var_python3_version}/${config_dir}"
7191 if test -d "$d" && test -f "$d/config.c"; then
7192 vi_cv_path_python3_conf="$d"
7193 fi
7194 done
7195 done
7196 fi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007197
7198fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007199{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3_conf" >&5
7200printf "%s\n" "$vi_cv_path_python3_conf" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007201
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007202 PYTHON3_CONFDIR="${vi_cv_path_python3_conf}"
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007203
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007204 if test "X$PYTHON3_CONFDIR" = "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007205 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: can't find it!" >&5
7206printf "%s\n" "can't find it!" >&6; }
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007207 else
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007208
Illia Bobyra96d5442023-08-30 16:30:15 +02007209 if test ${vi_cv_path_python3_plibs+y}
7210then :
7211 printf %s "(cached) " >&6
7212else $as_nop
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007213
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007214 pwd=`pwd`
7215 tmp_mkf="$pwd/config-PyMake$$"
7216 cat -- "${PYTHON3_CONFDIR}/Makefile" - <<'eof' >"${tmp_mkf}"
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007217__:
Bram Moolenaar3804aeb2010-07-19 21:18:54 +02007218 @echo "python3_BASEMODLIBS='$(BASEMODLIBS)'"
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007219 @echo "python3_LIBS='$(LIBS)'"
7220 @echo "python3_SYSLIBS='$(SYSLIBS)'"
Bram Moolenaarf94a13c2012-09-21 13:26:49 +02007221 @echo "python3_DLLLIBRARY='$(DLLLIBRARY)'"
Bram Moolenaar2a7e2a62010-07-24 15:19:11 +02007222 @echo "python3_INSTSONAME='$(INSTSONAME)'"
Yee Cheng Chinb6ebe5a2023-04-05 18:24:50 +01007223 @echo "python3_PYTHONFRAMEWORKPREFIX='$(PYTHONFRAMEWORKPREFIX)'"
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007224eof
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007225 eval "`cd ${PYTHON3_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`"
7226 rm -f -- "${tmp_mkf}"
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007227 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 +02007228 vi_cv_path_python3_plibs="${vi_cv_path_python3_plibs} ${python3_BASEMODLIBS} ${python3_LIBS} ${python3_SYSLIBS}"
7229 vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-ltermcap//`
7230 vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-lffi//`
7231
7232fi
7233
Illia Bobyra96d5442023-08-30 16:30:15 +02007234 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python3's dll name" >&5
7235printf %s "checking Python3's dll name... " >&6; }
7236if test ${vi_cv_dll_name_python3+y}
7237then :
7238 printf %s "(cached) " >&6
7239else $as_nop
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007240
7241 if test "X$python3_DLLLIBRARY" != "X"; then
7242 vi_cv_dll_name_python3="$python3_DLLLIBRARY"
Yee Cheng Chinb6ebe5a2023-04-05 18:24:50 +01007243 elif test "X$python3_PYTHONFRAMEWORKPREFIX" != "X"; then
7244 vi_cv_dll_name_python3="${python3_PYTHONFRAMEWORKPREFIX}/${python3_INSTSONAME}"
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007245 else
7246 vi_cv_dll_name_python3="$python3_INSTSONAME"
7247 fi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007248
7249fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007250{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_dll_name_python3" >&5
7251printf "%s\n" "$vi_cv_dll_name_python3" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007252
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007253 PYTHON3_LIBS="${vi_cv_path_python3_plibs}"
Illia Bobyr74e1dad2023-08-27 18:26:54 +02007254 if test "${vi_cv_path_python3_include}" = "${vi_cv_path_python3_platinclude}"; then
7255 PYTHON3_CFLAGS="-I${vi_cv_path_python3_include}"
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007256 else
Illia Bobyr74e1dad2023-08-27 18:26:54 +02007257 PYTHON3_CFLAGS="-I${vi_cv_path_python3_include} -I${vi_cv_path_python3_platinclude}"
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007258 fi
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007259 if test "X$have_python3_config_dir" = "X1" -a "$enable_python3interp" = "dynamic"; then
7260 PYTHON3_CFLAGS="${PYTHON3_CFLAGS} -DPYTHON3_HOME='L\"${vi_cv_path_python3_pfx}\"'"
7261 fi
7262 if test "X$vi_cv_var_python3_stable_abi_hex" != "X"; then
7263 PYTHON3_CFLAGS="${PYTHON3_CFLAGS} -DPy_LIMITED_API=${vi_cv_var_python3_stable_abi_hex}"
7264 fi
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007265 PYTHON3_SRC="if_python3.c"
7266 PYTHON3_OBJ="objects/if_python3.o"
7267
Illia Bobyra96d5442023-08-30 16:30:15 +02007268 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -pthread should be used" >&5
7269printf %s "checking if -pthread should be used... " >&6; }
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007270 threadsafe_flag=
7271 thread_lib=
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00007272 if test "$vim_cv_uname_output" != Darwin; then
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007273 test "$GCC" = yes && threadsafe_flag="-pthread"
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00007274 if test "$vim_cv_uname_output" = FreeBSD; then
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007275 threadsafe_flag="-D_THREAD_SAFE"
7276 thread_lib="-pthread"
7277 fi
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00007278 if test "$vim_cv_uname_output" = SunOS; then
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007279 threadsafe_flag="-pthreads"
7280 fi
7281 fi
7282 libs_save_old=$LIBS
7283 if test -n "$threadsafe_flag"; then
7284 cflags_save=$CFLAGS
7285 CFLAGS="$CFLAGS $threadsafe_flag"
7286 LIBS="$LIBS $thread_lib"
7287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007288/* end confdefs.h. */
7289
7290int
Illia Bobyra96d5442023-08-30 16:30:15 +02007291main (void)
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007292{
7293
7294 ;
7295 return 0;
7296}
7297_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02007298if ac_fn_c_try_link "$LINENO"
7299then :
7300 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7301printf "%s\n" "yes" >&6; }; PYTHON3_CFLAGS="$PYTHON3_CFLAGS $threadsafe_flag"
7302else $as_nop
7303 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7304printf "%s\n" "no" >&6; }; LIBS=$libs_save_old
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007305
7306fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007307rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007308 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007309 CFLAGS=$cflags_save
7310 else
Illia Bobyra96d5442023-08-30 16:30:15 +02007311 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7312printf "%s\n" "no" >&6; }
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007313 fi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007314
Illia Bobyra96d5442023-08-30 16:30:15 +02007315 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compile and link flags for Python 3 are sane" >&5
7316printf %s "checking if compile and link flags for Python 3 are sane... " >&6; }
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007317 cflags_save=$CFLAGS
7318 libs_save=$LIBS
7319 CFLAGS="$CFLAGS $PYTHON3_CFLAGS"
7320 LIBS="$LIBS $PYTHON3_LIBS"
7321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007322/* end confdefs.h. */
7323
7324int
Illia Bobyra96d5442023-08-30 16:30:15 +02007325main (void)
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007326{
7327
7328 ;
7329 return 0;
7330}
7331_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02007332if ac_fn_c_try_link "$LINENO"
7333then :
7334 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7335printf "%s\n" "yes" >&6; }; python3_ok=yes
7336else $as_nop
7337 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no: PYTHON3 DISABLED" >&5
7338printf "%s\n" "no: PYTHON3 DISABLED" >&6; }; python3_ok=no
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007339fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007340rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007341 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007342 CFLAGS=$cflags_save
7343 LIBS=$libs_save
7344 if test "$python3_ok" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007345 printf "%s\n" "#define FEAT_PYTHON3 1" >>confdefs.h
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007346
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007347 else
7348 LIBS=$libs_save_old
7349 PYTHON3_SRC=
7350 PYTHON3_OBJ=
7351 PYTHON3_LIBS=
7352 PYTHON3_CFLAGS=
7353 fi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007354 fi
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007355 else
Illia Bobyra96d5442023-08-30 16:30:15 +02007356 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: too old" >&5
7357printf "%s\n" "too old" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007358 fi
7359 fi
Bram Moolenaar1612b1a2013-06-14 21:22:39 +02007360 if test "$fail_if_missing" = "yes" -a "$python3_ok" != "yes"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01007361 as_fn_error $? "could not configure python3" "$LINENO" 5
Bram Moolenaar1612b1a2013-06-14 21:22:39 +02007362 fi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007363fi
7364
7365
7366
7367
7368
7369
ichizok8bb3fe42021-12-28 15:51:45 +00007370
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007371if test "$python_ok" = yes && test "$python3_ok" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007372 printf "%s\n" "#define DYNAMIC_PYTHON 1" >>confdefs.h
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007373
Illia Bobyra96d5442023-08-30 16:30:15 +02007374 printf "%s\n" "#define DYNAMIC_PYTHON3 1" >>confdefs.h
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007375
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007376 if test "X$vi_cv_var_python3_stable_abi_hex" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007377 printf "%s\n" "#define DYNAMIC_PYTHON3_STABLE_ABI 1" >>confdefs.h
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007378
7379 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007380 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we can do without RTLD_GLOBAL for Python" >&5
7381printf %s "checking whether we can do without RTLD_GLOBAL for Python... " >&6; }
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007382 cflags_save=$CFLAGS
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007383 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
Bram Moolenaar5d3fbf32015-03-05 16:47:20 +01007384 libs_save=$LIBS
7385 LIBS="-ldl $LIBS"
Illia Bobyra96d5442023-08-30 16:30:15 +02007386 if test "$cross_compiling" = yes
7387then :
7388 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7389printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +01007390as_fn_error $? "cannot run test program while cross compiling
7391See \`config.log' for more details" "$LINENO" 5; }
Illia Bobyra96d5442023-08-30 16:30:15 +02007392else $as_nop
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7394/* end confdefs.h. */
7395
7396 #include <dlfcn.h>
7397 /* If this program fails, then RTLD_GLOBAL is needed.
7398 * RTLD_GLOBAL will be used and then it is not possible to
7399 * have both python versions enabled in the same vim instance.
Bram Moolenaar84a05ac2013-05-06 04:24:17 +02007400 * Only the first python version used will be switched on.
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007401 */
7402
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +01007403 static int no_rtl_global_needed_for(char *python_instsoname, char *prefix)
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007404 {
7405 int needed = 0;
Bram Moolenaarba59ddb2016-01-28 15:34:25 +01007406 void* pylib = dlopen(python_instsoname, RTLD_LAZY|RTLD_LOCAL);
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007407 if (pylib != 0)
7408 {
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007409 void (*pfx)(char *home) = dlsym(pylib, "Py_SetPythonHome");
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007410 void (*init)(void) = dlsym(pylib, "Py_Initialize");
7411 int (*simple)(char*) = dlsym(pylib, "PyRun_SimpleString");
7412 void (*final)(void) = dlsym(pylib, "Py_Finalize");
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007413 (*pfx)(prefix);
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007414 (*init)();
7415 needed = (*simple)("import termios") == -1;
7416 (*final)();
7417 dlclose(pylib);
7418 }
7419 return !needed;
7420 }
7421
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +01007422 int main()
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007423 {
7424 int not_needed = 0;
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007425 if (no_rtl_global_needed_for("${vi_cv_dll_name_python}", "${vi_cv_path_python_pfx}"))
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007426 not_needed = 1;
7427 return !not_needed;
7428 }
7429_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02007430if ac_fn_c_try_run "$LINENO"
7431then :
7432 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7433printf "%s\n" "yes" >&6; };printf "%s\n" "#define PY_NO_RTLD_GLOBAL 1" >>confdefs.h
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007434
Illia Bobyra96d5442023-08-30 16:30:15 +02007435else $as_nop
7436 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7437printf "%s\n" "no" >&6; }
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007438fi
7439rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7440 conftest.$ac_objext conftest.beam conftest.$ac_ext
7441fi
7442
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007443
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007444 CFLAGS=$cflags_save
Bram Moolenaar5d3fbf32015-03-05 16:47:20 +01007445 LIBS=$libs_save
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007446
Illia Bobyra96d5442023-08-30 16:30:15 +02007447 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we can do without RTLD_GLOBAL for Python3" >&5
7448printf %s "checking whether we can do without RTLD_GLOBAL for Python3... " >&6; }
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007449 cflags_save=$CFLAGS
7450 CFLAGS="$CFLAGS $PYTHON3_CFLAGS"
Bram Moolenaar5d3fbf32015-03-05 16:47:20 +01007451 libs_save=$LIBS
7452 LIBS="-ldl $LIBS"
Illia Bobyra96d5442023-08-30 16:30:15 +02007453 if test "$cross_compiling" = yes
7454then :
7455 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7456printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +01007457as_fn_error $? "cannot run test program while cross compiling
7458See \`config.log' for more details" "$LINENO" 5; }
Illia Bobyra96d5442023-08-30 16:30:15 +02007459else $as_nop
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7461/* end confdefs.h. */
7462
7463 #include <dlfcn.h>
7464 #include <wchar.h>
7465 /* If this program fails, then RTLD_GLOBAL is needed.
7466 * RTLD_GLOBAL will be used and then it is not possible to
7467 * have both python versions enabled in the same vim instance.
Bram Moolenaar84a05ac2013-05-06 04:24:17 +02007468 * Only the first python version used will be switched on.
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007469 */
7470
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +01007471 static int no_rtl_global_needed_for(char *python_instsoname, wchar_t *prefix)
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007472 {
7473 int needed = 0;
Bram Moolenaarba59ddb2016-01-28 15:34:25 +01007474 void* pylib = dlopen(python_instsoname, RTLD_LAZY|RTLD_LOCAL);
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007475 if (pylib != 0)
7476 {
7477 void (*pfx)(wchar_t *home) = dlsym(pylib, "Py_SetPythonHome");
7478 void (*init)(void) = dlsym(pylib, "Py_Initialize");
7479 int (*simple)(char*) = dlsym(pylib, "PyRun_SimpleString");
7480 void (*final)(void) = dlsym(pylib, "Py_Finalize");
7481 (*pfx)(prefix);
7482 (*init)();
7483 needed = (*simple)("import termios") == -1;
7484 (*final)();
7485 dlclose(pylib);
7486 }
7487 return !needed;
7488 }
7489
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +01007490 int main()
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007491 {
7492 int not_needed = 0;
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007493 if (no_rtl_global_needed_for("${vi_cv_dll_name_python3}", L"${vi_cv_path_python3_pfx}"))
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007494 not_needed = 1;
7495 return !not_needed;
7496 }
7497_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02007498if ac_fn_c_try_run "$LINENO"
7499then :
7500 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7501printf "%s\n" "yes" >&6; };printf "%s\n" "#define PY3_NO_RTLD_GLOBAL 1" >>confdefs.h
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007502
Illia Bobyra96d5442023-08-30 16:30:15 +02007503else $as_nop
7504 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7505printf "%s\n" "no" >&6; }
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007506fi
7507rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7508 conftest.$ac_objext conftest.beam conftest.$ac_ext
7509fi
7510
7511
7512 CFLAGS=$cflags_save
Bram Moolenaar5d3fbf32015-03-05 16:47:20 +01007513 LIBS=$libs_save
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007514
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007515 PYTHON_SRC="if_python.c"
7516 PYTHON_OBJ="objects/if_python.o"
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007517 PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${vi_cv_dll_name_python}\\\""
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007518 PYTHON_LIBS=
7519 PYTHON3_SRC="if_python3.c"
7520 PYTHON3_OBJ="objects/if_python3.o"
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007521 PYTHON3_CFLAGS="$PYTHON3_CFLAGS -DDYNAMIC_PYTHON3_DLL=\\\"${vi_cv_dll_name_python3}\\\""
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007522 PYTHON3_LIBS=
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007523elif test "$python_ok" = yes && test "$enable_pythoninterp" = "dynamic"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007524 printf "%s\n" "#define DYNAMIC_PYTHON 1" >>confdefs.h
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007525
7526 PYTHON_SRC="if_python.c"
7527 PYTHON_OBJ="objects/if_python.o"
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007528 PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${vi_cv_dll_name_python}\\\""
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007529 PYTHON_LIBS=
Bram Moolenaare741f272013-07-09 21:57:52 +02007530elif test "$python_ok" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007531 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -fPIE can be added for Python" >&5
7532printf %s "checking if -fPIE can be added for Python... " >&6; }
Bram Moolenaare741f272013-07-09 21:57:52 +02007533 cflags_save=$CFLAGS
7534 libs_save=$LIBS
7535 CFLAGS="$CFLAGS $PYTHON_CFLAGS -fPIE"
7536 LIBS="$LIBS $PYTHON_LIBS"
7537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7538/* end confdefs.h. */
7539
7540int
Illia Bobyra96d5442023-08-30 16:30:15 +02007541main (void)
Bram Moolenaare741f272013-07-09 21:57:52 +02007542{
7543
7544 ;
7545 return 0;
7546}
7547_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02007548if ac_fn_c_try_link "$LINENO"
7549then :
7550 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7551printf "%s\n" "yes" >&6; }; fpie_ok=yes
7552else $as_nop
7553 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7554printf "%s\n" "no" >&6; }; fpie_ok=no
Bram Moolenaare741f272013-07-09 21:57:52 +02007555fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007556rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaare741f272013-07-09 21:57:52 +02007557 conftest$ac_exeext conftest.$ac_ext
7558 CFLAGS=$cflags_save
7559 LIBS=$libs_save
7560 if test $fpie_ok = yes; then
7561 PYTHON_CFLAGS="$PYTHON_CFLAGS -fPIE"
7562 fi
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007563elif test "$python3_ok" = yes && test "$enable_python3interp" = "dynamic"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007564 printf "%s\n" "#define DYNAMIC_PYTHON3 1" >>confdefs.h
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007565
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007566 if test "X$vi_cv_var_python3_stable_abi_hex" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007567 printf "%s\n" "#define DYNAMIC_PYTHON3_STABLE_ABI 1" >>confdefs.h
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007568
7569 fi
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007570 PYTHON3_SRC="if_python3.c"
7571 PYTHON3_OBJ="objects/if_python3.o"
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007572 PYTHON3_CFLAGS="$PYTHON3_CFLAGS -DDYNAMIC_PYTHON3_DLL=\\\"${vi_cv_dll_name_python3}\\\""
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007573 PYTHON3_LIBS=
Bram Moolenaare741f272013-07-09 21:57:52 +02007574elif test "$python3_ok" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007575 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -fPIE can be added for Python3" >&5
7576printf %s "checking if -fPIE can be added for Python3... " >&6; }
Bram Moolenaare741f272013-07-09 21:57:52 +02007577 cflags_save=$CFLAGS
7578 libs_save=$LIBS
7579 CFLAGS="$CFLAGS $PYTHON3_CFLAGS -fPIE"
7580 LIBS="$LIBS $PYTHON3_LIBS"
7581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7582/* end confdefs.h. */
7583
7584int
Illia Bobyra96d5442023-08-30 16:30:15 +02007585main (void)
Bram Moolenaare741f272013-07-09 21:57:52 +02007586{
7587
7588 ;
7589 return 0;
7590}
7591_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02007592if ac_fn_c_try_link "$LINENO"
7593then :
7594 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7595printf "%s\n" "yes" >&6; }; fpie_ok=yes
7596else $as_nop
7597 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7598printf "%s\n" "no" >&6; }; fpie_ok=no
Bram Moolenaare741f272013-07-09 21:57:52 +02007599fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007600rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaare741f272013-07-09 21:57:52 +02007601 conftest$ac_exeext conftest.$ac_ext
7602 CFLAGS=$cflags_save
7603 LIBS=$libs_save
7604 if test $fpie_ok = yes; then
7605 PYTHON3_CFLAGS="$PYTHON3_CFLAGS -fPIE"
7606 fi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007607fi
7608
Illia Bobyra96d5442023-08-30 16:30:15 +02007609{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-tclinterp argument" >&5
7610printf %s "checking --enable-tclinterp argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00007611# Check whether --enable-tclinterp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02007612if test ${enable_tclinterp+y}
7613then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00007614 enableval=$enable_tclinterp;
Illia Bobyra96d5442023-08-30 16:30:15 +02007615else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00007616 enable_tclinterp="no"
Bram Moolenaar446cb832008-06-24 21:56:24 +00007617fi
7618
Illia Bobyra96d5442023-08-30 16:30:15 +02007619{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_tclinterp" >&5
7620printf "%s\n" "$enable_tclinterp" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007621
Bram Moolenaar8a5115c2016-01-09 19:41:11 +01007622if test "$enable_tclinterp" = "yes" -o "$enable_tclinterp" = "dynamic"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007623
Illia Bobyra96d5442023-08-30 16:30:15 +02007624 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-tclsh argument" >&5
7625printf %s "checking --with-tclsh argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007626
Bram Moolenaar446cb832008-06-24 21:56:24 +00007627# Check whether --with-tclsh was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02007628if test ${with_tclsh+y}
7629then :
7630 withval=$with_tclsh; tclsh_name="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tclsh_name" >&5
7631printf "%s\n" "$tclsh_name" >&6; }
7632else $as_nop
7633 tclsh_name="tclsh8.5"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7634printf "%s\n" "no" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00007635fi
7636
Bram Moolenaar071d4272004-06-13 20:20:40 +00007637 # Extract the first word of "$tclsh_name", so it can be a program name with args.
7638set dummy $tclsh_name; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02007639{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7640printf %s "checking for $ac_word... " >&6; }
7641if test ${ac_cv_path_vi_cv_path_tcl+y}
7642then :
7643 printf %s "(cached) " >&6
7644else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007645 case $vi_cv_path_tcl in
7646 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00007647 ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
7648 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00007649 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007650 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7651for as_dir in $PATH
7652do
7653 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02007654 case $as_dir in #(((
7655 '') as_dir=./ ;;
7656 */) ;;
7657 *) as_dir=$as_dir/ ;;
7658 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007659 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02007660 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7661 ac_cv_path_vi_cv_path_tcl="$as_dir$ac_word$ac_exec_ext"
7662 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007663 break 2
7664 fi
7665done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007666 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00007667IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007668
Bram Moolenaar071d4272004-06-13 20:20:40 +00007669 ;;
7670esac
7671fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007672vi_cv_path_tcl=$ac_cv_path_vi_cv_path_tcl
Bram Moolenaar071d4272004-06-13 20:20:40 +00007673if test -n "$vi_cv_path_tcl"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007674 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_tcl" >&5
7675printf "%s\n" "$vi_cv_path_tcl" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007676else
Illia Bobyra96d5442023-08-30 16:30:15 +02007677 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7678printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007679fi
7680
Bram Moolenaar071d4272004-06-13 20:20:40 +00007681
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007682
Bram Moolenaar446cb832008-06-24 21:56:24 +00007683
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00007684 if test "X$vi_cv_path_tcl" = "X" -a $tclsh_name = "tclsh8.5"; then
7685 tclsh_name="tclsh8.4"
7686 # Extract the first word of "$tclsh_name", so it can be a program name with args.
7687set dummy $tclsh_name; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02007688{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7689printf %s "checking for $ac_word... " >&6; }
7690if test ${ac_cv_path_vi_cv_path_tcl+y}
7691then :
7692 printf %s "(cached) " >&6
7693else $as_nop
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00007694 case $vi_cv_path_tcl in
7695 [\\/]* | ?:[\\/]*)
7696 ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
7697 ;;
7698 *)
7699 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7700for as_dir in $PATH
7701do
7702 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02007703 case $as_dir in #(((
7704 '') as_dir=./ ;;
7705 */) ;;
7706 *) as_dir=$as_dir/ ;;
7707 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007708 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02007709 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7710 ac_cv_path_vi_cv_path_tcl="$as_dir$ac_word$ac_exec_ext"
7711 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00007712 break 2
7713 fi
7714done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007715 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00007716IFS=$as_save_IFS
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00007717
7718 ;;
7719esac
7720fi
7721vi_cv_path_tcl=$ac_cv_path_vi_cv_path_tcl
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00007722if test -n "$vi_cv_path_tcl"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007723 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_tcl" >&5
7724printf "%s\n" "$vi_cv_path_tcl" >&6; }
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00007725else
Illia Bobyra96d5442023-08-30 16:30:15 +02007726 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7727printf "%s\n" "no" >&6; }
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00007728fi
7729
Bram Moolenaar446cb832008-06-24 21:56:24 +00007730
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00007731 fi
7732 if test "X$vi_cv_path_tcl" = "X" -a $tclsh_name = "tclsh8.4"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007733 tclsh_name="tclsh8.2"
7734 # Extract the first word of "$tclsh_name", so it can be a program name with args.
7735set dummy $tclsh_name; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02007736{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7737printf %s "checking for $ac_word... " >&6; }
7738if test ${ac_cv_path_vi_cv_path_tcl+y}
7739then :
7740 printf %s "(cached) " >&6
7741else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007742 case $vi_cv_path_tcl in
7743 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00007744 ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
7745 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00007746 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007747 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7748for as_dir in $PATH
7749do
7750 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02007751 case $as_dir in #(((
7752 '') as_dir=./ ;;
7753 */) ;;
7754 *) as_dir=$as_dir/ ;;
7755 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007756 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02007757 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7758 ac_cv_path_vi_cv_path_tcl="$as_dir$ac_word$ac_exec_ext"
7759 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007760 break 2
7761 fi
7762done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007763 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00007764IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007765
Bram Moolenaar071d4272004-06-13 20:20:40 +00007766 ;;
7767esac
7768fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007769vi_cv_path_tcl=$ac_cv_path_vi_cv_path_tcl
Bram Moolenaar071d4272004-06-13 20:20:40 +00007770if test -n "$vi_cv_path_tcl"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007771 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_tcl" >&5
7772printf "%s\n" "$vi_cv_path_tcl" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007773else
Illia Bobyra96d5442023-08-30 16:30:15 +02007774 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7775printf "%s\n" "no" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007776fi
7777
Bram Moolenaar446cb832008-06-24 21:56:24 +00007778
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007779 fi
7780 if test "X$vi_cv_path_tcl" = "X" -a $tclsh_name = "tclsh8.2"; then
7781 tclsh_name="tclsh8.0"
7782 # Extract the first word of "$tclsh_name", so it can be a program name with args.
7783set dummy $tclsh_name; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02007784{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7785printf %s "checking for $ac_word... " >&6; }
7786if test ${ac_cv_path_vi_cv_path_tcl+y}
7787then :
7788 printf %s "(cached) " >&6
7789else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007790 case $vi_cv_path_tcl in
7791 [\\/]* | ?:[\\/]*)
7792 ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
7793 ;;
7794 *)
7795 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7796for as_dir in $PATH
7797do
7798 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02007799 case $as_dir in #(((
7800 '') as_dir=./ ;;
7801 */) ;;
7802 *) as_dir=$as_dir/ ;;
7803 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007804 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02007805 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7806 ac_cv_path_vi_cv_path_tcl="$as_dir$ac_word$ac_exec_ext"
7807 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007808 break 2
7809 fi
7810done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007811 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00007812IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007813
7814 ;;
7815esac
7816fi
7817vi_cv_path_tcl=$ac_cv_path_vi_cv_path_tcl
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007818if test -n "$vi_cv_path_tcl"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007819 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_tcl" >&5
7820printf "%s\n" "$vi_cv_path_tcl" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007821else
Illia Bobyra96d5442023-08-30 16:30:15 +02007822 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7823printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007824fi
7825
Bram Moolenaar446cb832008-06-24 21:56:24 +00007826
Bram Moolenaar071d4272004-06-13 20:20:40 +00007827 fi
7828 if test "X$vi_cv_path_tcl" = "X"; then
7829 tclsh_name="tclsh"
7830 # Extract the first word of "$tclsh_name", so it can be a program name with args.
7831set dummy $tclsh_name; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02007832{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7833printf %s "checking for $ac_word... " >&6; }
7834if test ${ac_cv_path_vi_cv_path_tcl+y}
7835then :
7836 printf %s "(cached) " >&6
7837else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007838 case $vi_cv_path_tcl in
7839 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00007840 ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
7841 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00007842 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007843 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7844for as_dir in $PATH
7845do
7846 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02007847 case $as_dir in #(((
7848 '') as_dir=./ ;;
7849 */) ;;
7850 *) as_dir=$as_dir/ ;;
7851 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007852 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02007853 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7854 ac_cv_path_vi_cv_path_tcl="$as_dir$ac_word$ac_exec_ext"
7855 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007856 break 2
7857 fi
7858done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007859 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00007860IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007861
Bram Moolenaar071d4272004-06-13 20:20:40 +00007862 ;;
7863esac
7864fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007865vi_cv_path_tcl=$ac_cv_path_vi_cv_path_tcl
Bram Moolenaar071d4272004-06-13 20:20:40 +00007866if test -n "$vi_cv_path_tcl"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007867 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_tcl" >&5
7868printf "%s\n" "$vi_cv_path_tcl" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007869else
Illia Bobyra96d5442023-08-30 16:30:15 +02007870 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7871printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007872fi
7873
Bram Moolenaar446cb832008-06-24 21:56:24 +00007874
Bram Moolenaar071d4272004-06-13 20:20:40 +00007875 fi
7876 if test "X$vi_cv_path_tcl" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007877 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Tcl version" >&5
7878printf %s "checking Tcl version... " >&6; }
Bram Moolenaar49222be2015-12-11 18:11:30 +01007879 if echo 'exit [expr [info tclversion] < 8.0]' | "$vi_cv_path_tcl" - ; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007880 tclver=`echo 'puts [info tclversion]' | $vi_cv_path_tcl -`
Illia Bobyra96d5442023-08-30 16:30:15 +02007881 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tclver - OK" >&5
7882printf "%s\n" "$tclver - OK" >&6; };
Bram Moolenaar071d4272004-06-13 20:20:40 +00007883 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 +01007884 tcldll=`echo 'puts libtcl[info tclversion][info sharedlibextension]' | $vi_cv_path_tcl -`
Bram Moolenaar071d4272004-06-13 20:20:40 +00007885
Illia Bobyra96d5442023-08-30 16:30:15 +02007886 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for location of Tcl include" >&5
7887printf %s "checking for location of Tcl include... " >&6; }
Bram Moolenaard0573012017-10-28 21:11:06 +02007888 if test "x$MACOS_X" != "xyes"; then
Bram Moolenaar446cb832008-06-24 21:56:24 +00007889 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 +00007890 else
Bram Moolenaarf4ee5282020-07-30 20:18:08 +02007891 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 +00007892 fi
Bram Moolenaar0ff8f602008-02-20 11:44:03 +00007893 TCL_INC=
Bram Moolenaar071d4272004-06-13 20:20:40 +00007894 for try in $tclinc; do
7895 if test -f "$try/tcl.h"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007896 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $try/tcl.h" >&5
7897printf "%s\n" "$try/tcl.h" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007898 TCL_INC=$try
7899 break
7900 fi
7901 done
7902 if test -z "$TCL_INC"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007903 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <not found>" >&5
7904printf "%s\n" "<not found>" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007905 SKIP_TCL=YES
7906 fi
7907 if test -z "$SKIP_TCL"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007908 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for location of tclConfig.sh script" >&5
7909printf %s "checking for location of tclConfig.sh script... " >&6; }
Bram Moolenaard0573012017-10-28 21:11:06 +02007910 if test "x$MACOS_X" != "xyes"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007911 tclcnf=`echo $tclinc | sed s/include/lib/g`
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00007912 tclcnf="$tclcnf `echo $tclinc | sed s/include/lib64/g`"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007913 else
Bram Moolenaarf4ee5282020-07-30 20:18:08 +02007914 tclcnf=`echo $tclinc | sed s/include/lib/g`
7915 tclcnf="$tclcnf /System/Library/Frameworks/Tcl.framework `xcrun --show-sdk-path`/System/Library/Frameworks/Tcl.framework"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007916 fi
7917 for try in $tclcnf; do
Bram Moolenaar49222be2015-12-11 18:11:30 +01007918 if test -f "$try/tclConfig.sh"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007919 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $try/tclConfig.sh" >&5
7920printf "%s\n" "$try/tclConfig.sh" >&6; }
Bram Moolenaar49222be2015-12-11 18:11:30 +01007921 . "$try/tclConfig.sh"
Bram Moolenaar8a5115c2016-01-09 19:41:11 +01007922 if test "$enable_tclinterp" = "dynamic"; then
7923 TCL_LIBS=`eval echo "$TCL_STUB_LIB_SPEC $TCL_LIBS"`
7924 else
7925 TCL_LIBS=`eval echo "$TCL_LIB_SPEC $TCL_LIBS"`
7926 fi
Bram Moolenaar4394bff2008-07-24 11:21:31 +00007927 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 +00007928 break
7929 fi
7930 done
7931 if test -z "$TCL_LIBS"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007932 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <not found>" >&5
7933printf "%s\n" "<not found>" >&6; }
7934 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Tcl library by myself" >&5
7935printf %s "checking for Tcl library by myself... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007936 tcllib=`echo $tclinc | sed s/include/lib/g`
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00007937 tcllib="$tcllib `echo $tclinc | sed s/include/lib64/g`"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007938 for ext in .so .a ; do
7939 for ver in "" $tclver ; do
7940 for try in $tcllib ; do
7941 trylib=tcl$ver$ext
Bram Moolenaar49222be2015-12-11 18:11:30 +01007942 if test -f "$try/lib$trylib" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007943 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $try/lib$trylib" >&5
7944printf "%s\n" "$try/lib$trylib" >&6; }
Bram Moolenaar49222be2015-12-11 18:11:30 +01007945 TCL_LIBS="-L\"$try\" -ltcl$ver -ldl -lm"
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00007946 if test "$vim_cv_uname_output" = SunOS &&
7947 echo $vim_cv_uname_r_output | grep '^5' >/dev/null; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007948 TCL_LIBS="$TCL_LIBS -R $try"
7949 fi
7950 break 3
7951 fi
7952 done
7953 done
7954 done
7955 if test -z "$TCL_LIBS"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007956 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <not found>" >&5
7957printf "%s\n" "<not found>" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007958 SKIP_TCL=YES
7959 fi
7960 fi
7961 if test -z "$SKIP_TCL"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007962 printf "%s\n" "#define FEAT_TCL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00007963
7964 TCL_SRC=if_tcl.c
7965 TCL_OBJ=objects/if_tcl.o
7966 TCL_PRO=if_tcl.pro
7967 TCL_CFLAGS="-I$TCL_INC $TCL_DEFS"
7968 fi
7969 fi
7970 else
Illia Bobyra96d5442023-08-30 16:30:15 +02007971 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: too old; need Tcl version 8.0 or later" >&5
7972printf "%s\n" "too old; need Tcl version 8.0 or later" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007973 fi
7974 fi
Bram Moolenaar8a5115c2016-01-09 19:41:11 +01007975 if test "$enable_tclinterp" = "dynamic"; then
7976 if test "X$TCL_SRC" != "X" -a "X$tcldll" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007977 printf "%s\n" "#define DYNAMIC_TCL 1" >>confdefs.h
Bram Moolenaar8a5115c2016-01-09 19:41:11 +01007978
7979 TCL_CFLAGS="-DDYNAMIC_TCL_DLL=\\\"$tcldll\\\" -DDYNAMIC_TCL_VER=\\\"$tclver\\\" $TCL_CFLAGS"
7980 fi
7981 fi
Bram Moolenaarf788a062011-12-14 20:51:25 +01007982 if test "$fail_if_missing" = "yes" -a -z "$TCL_SRC"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01007983 as_fn_error $? "could not configure Tcl" "$LINENO" 5
Bram Moolenaarf788a062011-12-14 20:51:25 +01007984 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00007985fi
7986
7987
7988
7989
7990
7991
ichizok8bb3fe42021-12-28 15:51:45 +00007992
Illia Bobyra96d5442023-08-30 16:30:15 +02007993{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-rubyinterp argument" >&5
7994printf %s "checking --enable-rubyinterp argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00007995# Check whether --enable-rubyinterp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02007996if test ${enable_rubyinterp+y}
7997then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00007998 enableval=$enable_rubyinterp;
Illia Bobyra96d5442023-08-30 16:30:15 +02007999else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00008000 enable_rubyinterp="no"
Bram Moolenaar446cb832008-06-24 21:56:24 +00008001fi
8002
Illia Bobyra96d5442023-08-30 16:30:15 +02008003{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_rubyinterp" >&5
8004printf "%s\n" "$enable_rubyinterp" >&6; }
Bram Moolenaar3ca71f12010-10-27 16:49:47 +02008005if test "$enable_rubyinterp" = "yes" -o "$enable_rubyinterp" = "dynamic"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00008006 if test "$has_eval" = "no"; then
Martin Tournoij7904fa42022-10-04 16:28:45 +01008007 as_fn_error $? "cannot use Ruby with tiny features" "$LINENO" 5
Bram Moolenaar0b105412014-11-30 13:34:23 +01008008 fi
8009
Illia Bobyra96d5442023-08-30 16:30:15 +02008010 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-ruby-command argument" >&5
8011printf %s "checking --with-ruby-command argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008012
Bram Moolenaar948733a2011-05-05 18:10:16 +02008013
Bram Moolenaar165641d2010-02-17 16:23:09 +01008014# Check whether --with-ruby-command was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008015if test ${with_ruby_command+y}
8016then :
8017 withval=$with_ruby_command; RUBY_CMD="$withval"; vi_cv_path_ruby="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RUBY_CMD" >&5
8018printf "%s\n" "$RUBY_CMD" >&6; }
8019else $as_nop
8020 RUBY_CMD="ruby"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: defaulting to $RUBY_CMD" >&5
8021printf "%s\n" "defaulting to $RUBY_CMD" >&6; }
Bram Moolenaar165641d2010-02-17 16:23:09 +01008022fi
8023
Bram Moolenaar165641d2010-02-17 16:23:09 +01008024 # Extract the first word of "$RUBY_CMD", so it can be a program name with args.
8025set dummy $RUBY_CMD; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02008026{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8027printf %s "checking for $ac_word... " >&6; }
8028if test ${ac_cv_path_vi_cv_path_ruby+y}
8029then :
8030 printf %s "(cached) " >&6
8031else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008032 case $vi_cv_path_ruby in
8033 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00008034 ac_cv_path_vi_cv_path_ruby="$vi_cv_path_ruby" # Let the user override the test with a path.
8035 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00008036 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008037 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8038for as_dir in $PATH
8039do
8040 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02008041 case $as_dir in #(((
8042 '') as_dir=./ ;;
8043 */) ;;
8044 *) as_dir=$as_dir/ ;;
8045 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008046 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02008047 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8048 ac_cv_path_vi_cv_path_ruby="$as_dir$ac_word$ac_exec_ext"
8049 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008050 break 2
8051 fi
8052done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008053 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00008054IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008055
Bram Moolenaar071d4272004-06-13 20:20:40 +00008056 ;;
8057esac
8058fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008059vi_cv_path_ruby=$ac_cv_path_vi_cv_path_ruby
Bram Moolenaar071d4272004-06-13 20:20:40 +00008060if test -n "$vi_cv_path_ruby"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008061 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_ruby" >&5
8062printf "%s\n" "$vi_cv_path_ruby" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008063else
Illia Bobyra96d5442023-08-30 16:30:15 +02008064 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8065printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008066fi
8067
Bram Moolenaar446cb832008-06-24 21:56:24 +00008068
Bram Moolenaar071d4272004-06-13 20:20:40 +00008069 if test "X$vi_cv_path_ruby" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008070 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Ruby version" >&5
8071printf %s "checking Ruby version... " >&6; }
K.Takata236ccbf2022-09-22 16:12:06 +01008072 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 +02008073 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: OK" >&5
8074printf "%s\n" "OK" >&6; }
8075 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Ruby rbconfig" >&5
8076printf %s "checking Ruby rbconfig... " >&6; }
Bram Moolenaar81398892012-10-03 21:09:35 +02008077 ruby_rbconfig="RbConfig"
8078 if ! $vi_cv_path_ruby -r rbconfig -e 'RbConfig' >/dev/null 2>/dev/null; then
8079 ruby_rbconfig="Config"
8080 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008081 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ruby_rbconfig" >&5
8082printf "%s\n" "$ruby_rbconfig" >&6; }
8083 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Ruby header files" >&5
8084printf %s "checking Ruby header files... " >&6; }
Bram Moolenaar81398892012-10-03 21:09:35 +02008085 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 +00008086 if test "X$rubyhdrdir" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008087 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $rubyhdrdir" >&5
8088printf "%s\n" "$rubyhdrdir" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008089 RUBY_CFLAGS="-I$rubyhdrdir"
Bram Moolenaara6fd37b2014-03-27 17:19:09 +01008090 rubyarchdir=`$vi_cv_path_ruby -r rbconfig -e "print ($ruby_rbconfig::CONFIG.has_key? 'rubyarchhdrdir') ? $ruby_rbconfig::CONFIG['rubyarchhdrdir'] : '$rubyhdrdir/'+$ruby_rbconfig::CONFIG['arch']"`
8091 if test -d "$rubyarchdir"; then
8092 RUBY_CFLAGS="$RUBY_CFLAGS -I$rubyarchdir"
Bram Moolenaar165641d2010-02-17 16:23:09 +01008093 fi
Bram Moolenaar81398892012-10-03 21:09:35 +02008094 rubyversion=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG['ruby_version'].gsub(/\./, '')[0,2]"`
Bram Moolenaar026a4452013-08-07 15:22:23 +02008095 if test "X$rubyversion" = "X"; then
K.Takata236ccbf2022-09-22 16:12:06 +01008096 rubyversion=`$vi_cv_path_ruby -e "print RUBY_VERSION.gsub(/\./, '')[0,2]"`
Bram Moolenaar026a4452013-08-07 15:22:23 +02008097 fi
Bram Moolenaar165641d2010-02-17 16:23:09 +01008098 RUBY_CFLAGS="$RUBY_CFLAGS -DRUBY_VERSION=$rubyversion"
Bram Moolenaar81398892012-10-03 21:09:35 +02008099 rubylibs=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG['LIBS']"`
Bram Moolenaar071d4272004-06-13 20:20:40 +00008100 if test "X$rubylibs" != "X"; then
8101 RUBY_LIBS="$rubylibs"
8102 fi
Bram Moolenaar81398892012-10-03 21:09:35 +02008103 librubyarg=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG['LIBRUBYARG'])"`
8104 librubya=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG['LIBRUBY_A'])"`
Bram Moolenaarac499e32013-06-02 19:14:17 +02008105 rubylibdir=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG['libdir'])"`
Bram Moolenaard5a986f2020-12-06 21:11:31 +01008106 if test -f "$rubylibdir/$librubya" || expr "$librubyarg" : "-lruby"; then
Bram Moolenaarac499e32013-06-02 19:14:17 +02008107 RUBY_LIBS="$RUBY_LIBS -L$rubylibdir"
8108 elif test "$librubyarg" = "libruby.a"; then
8109 librubyarg="-lruby"
8110 RUBY_LIBS="$RUBY_LIBS -L$rubylibdir"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008111 fi
8112
8113 if test "X$librubyarg" != "X"; then
8114 RUBY_LIBS="$librubyarg $RUBY_LIBS"
8115 fi
Zdenek Dohnal1d822af2022-11-23 12:06:08 +00008116
8117
Bram Moolenaar071d4272004-06-13 20:20:40 +00008118 RUBY_SRC="if_ruby.c"
8119 RUBY_OBJ="objects/if_ruby.o"
8120 RUBY_PRO="if_ruby.pro"
Illia Bobyra96d5442023-08-30 16:30:15 +02008121 printf "%s\n" "#define FEAT_RUBY 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00008122
Bram Moolenaar3ca71f12010-10-27 16:49:47 +02008123 if test "$enable_rubyinterp" = "dynamic"; then
Bram Moolenaar92021622017-10-12 12:33:43 +02008124 libruby_soname=`$vi_cv_path_ruby -r rbconfig -e "puts $ruby_rbconfig::CONFIG['LIBRUBY_ALIASES'].split[0]"`
Bram Moolenaar87ea64c2018-08-04 15:13:34 +02008125 if test -z "$libruby_soname"; then
8126 libruby_soname=`$vi_cv_path_ruby -r rbconfig -e "puts $ruby_rbconfig::CONFIG['LIBRUBY_SO']"`
8127 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008128 printf "%s\n" "#define DYNAMIC_RUBY 1" >>confdefs.h
Bram Moolenaar3ca71f12010-10-27 16:49:47 +02008129
Bram Moolenaar41a41412020-01-07 21:32:19 +01008130 RUBY_CFLAGS="-DDYNAMIC_RUBY_DLL=\\\"$libruby_soname\\\" $RUBY_CFLAGS"
Bram Moolenaar3ca71f12010-10-27 16:49:47 +02008131 RUBY_LIBS=
8132 fi
Bram Moolenaar864a28b2020-12-28 21:36:56 +01008133 if test "X$CLANG_VERSION" != "X" -a "$rubyversion" -ge 30; then
8134 RUBY_CFLAGS="$RUBY_CFLAGS -fdeclspec"
8135 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00008136 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008137 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found; disabling Ruby" >&5
8138printf "%s\n" "not found; disabling Ruby" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008139 fi
8140 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008141 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: too old; need Ruby version 1.9.1 or later" >&5
8142printf "%s\n" "too old; need Ruby version 1.9.1 or later" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008143 fi
8144 fi
Bram Moolenaarf788a062011-12-14 20:51:25 +01008145
8146 if test "$fail_if_missing" = "yes" -a -z "$RUBY_OBJ"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01008147 as_fn_error $? "could not configure Ruby" "$LINENO" 5
Bram Moolenaarf788a062011-12-14 20:51:25 +01008148 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00008149fi
8150
8151
8152
8153
8154
8155
ichizok8bb3fe42021-12-28 15:51:45 +00008156
Illia Bobyra96d5442023-08-30 16:30:15 +02008157{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-cscope argument" >&5
8158printf %s "checking --enable-cscope argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00008159# Check whether --enable-cscope was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008160if test ${enable_cscope+y}
8161then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00008162 enableval=$enable_cscope;
Illia Bobyra96d5442023-08-30 16:30:15 +02008163else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00008164 enable_cscope="no"
Bram Moolenaar446cb832008-06-24 21:56:24 +00008165fi
8166
Illia Bobyra96d5442023-08-30 16:30:15 +02008167{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_cscope" >&5
8168printf "%s\n" "$enable_cscope" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008169if test "$enable_cscope" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008170 printf "%s\n" "#define FEAT_CSCOPE 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00008171
8172fi
8173
Illia Bobyra96d5442023-08-30 16:30:15 +02008174{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-netbeans argument" >&5
8175printf %s "checking --disable-netbeans argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00008176# Check whether --enable-netbeans was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008177if test ${enable_netbeans+y}
8178then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00008179 enableval=$enable_netbeans;
Illia Bobyra96d5442023-08-30 16:30:15 +02008180else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00008181 enable_netbeans="yes"
Bram Moolenaar446cb832008-06-24 21:56:24 +00008182fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008183
Bram Moolenaar446cb832008-06-24 21:56:24 +00008184if test "$enable_netbeans" = "yes"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00008185 if test "$has_eval" = "no"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008186 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot use NetBeans with tiny features" >&5
8187printf "%s\n" "cannot use NetBeans with tiny features" >&6; }
Bram Moolenaar3c124e32016-01-31 14:36:58 +01008188 enable_netbeans="no"
8189 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008190 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8191printf "%s\n" "no" >&6; }
Bram Moolenaar3c124e32016-01-31 14:36:58 +01008192 fi
Bram Moolenaare0874f82016-01-24 20:36:41 +01008193else
Illia Bobyra96d5442023-08-30 16:30:15 +02008194 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8195printf "%s\n" "yes" >&6; }
Bram Moolenaare0874f82016-01-24 20:36:41 +01008196fi
8197
Illia Bobyra96d5442023-08-30 16:30:15 +02008198{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-channel argument" >&5
8199printf %s "checking --disable-channel argument... " >&6; }
Bram Moolenaare0874f82016-01-24 20:36:41 +01008200# Check whether --enable-channel was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008201if test ${enable_channel+y}
8202then :
Bram Moolenaare0874f82016-01-24 20:36:41 +01008203 enableval=$enable_channel;
Illia Bobyra96d5442023-08-30 16:30:15 +02008204else $as_nop
Bram Moolenaare0874f82016-01-24 20:36:41 +01008205 enable_channel="yes"
8206fi
8207
8208if test "$enable_channel" = "yes"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00008209 if test "$has_eval" = "no"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008210 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot use channels with tiny features" >&5
8211printf "%s\n" "cannot use channels with tiny features" >&6; }
Bram Moolenaar3c124e32016-01-31 14:36:58 +01008212 enable_channel="no"
8213 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008214 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8215printf "%s\n" "no" >&6; }
Bram Moolenaar3c124e32016-01-31 14:36:58 +01008216 fi
Bram Moolenaare0874f82016-01-24 20:36:41 +01008217else
Bram Moolenaar16435482016-01-24 21:31:54 +01008218 if test "$enable_netbeans" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008219 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, netbeans also disabled" >&5
8220printf "%s\n" "yes, netbeans also disabled" >&6; }
Bram Moolenaar16435482016-01-24 21:31:54 +01008221 enable_netbeans="no"
8222 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008223 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8224printf "%s\n" "yes" >&6; }
Bram Moolenaar16435482016-01-24 21:31:54 +01008225 fi
Bram Moolenaare0874f82016-01-24 20:36:41 +01008226fi
8227
Bram Moolenaar16435482016-01-24 21:31:54 +01008228if test "$enable_channel" = "yes"; then
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008229 if test "x$HAIKU" = "xyes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008230 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socket in -lnetwork" >&5
8231printf %s "checking for socket in -lnetwork... " >&6; }
8232if test ${ac_cv_lib_network_socket+y}
8233then :
8234 printf %s "(cached) " >&6
8235else $as_nop
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008236 ac_check_lib_save_LIBS=$LIBS
8237LIBS="-lnetwork $LIBS"
8238cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8239/* end confdefs.h. */
8240
8241/* Override any GCC internal prototype to avoid an error.
8242 Use char because int might match the return type of a GCC
8243 builtin and then its argument prototype would still apply. */
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008244char socket ();
8245int
Illia Bobyra96d5442023-08-30 16:30:15 +02008246main (void)
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008247{
8248return socket ();
8249 ;
8250 return 0;
8251}
8252_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02008253if ac_fn_c_try_link "$LINENO"
8254then :
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008255 ac_cv_lib_network_socket=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02008256else $as_nop
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008257 ac_cv_lib_network_socket=no
8258fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008259rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008260 conftest$ac_exeext conftest.$ac_ext
8261LIBS=$ac_check_lib_save_LIBS
8262fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008263{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_network_socket" >&5
8264printf "%s\n" "$ac_cv_lib_network_socket" >&6; }
8265if test "x$ac_cv_lib_network_socket" = xyes
8266then :
8267 printf "%s\n" "#define HAVE_LIBNETWORK 1" >>confdefs.h
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008268
8269 LIBS="-lnetwork $LIBS"
8270
8271fi
8272
8273 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008274 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8275printf %s "checking for socket in -lsocket... " >&6; }
8276if test ${ac_cv_lib_socket_socket+y}
8277then :
8278 printf %s "(cached) " >&6
8279else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008280 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00008281LIBS="-lsocket $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008282cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008283/* end confdefs.h. */
8284
Bram Moolenaar446cb832008-06-24 21:56:24 +00008285/* Override any GCC internal prototype to avoid an error.
8286 Use char because int might match the return type of a GCC
8287 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008288char socket ();
8289int
Illia Bobyra96d5442023-08-30 16:30:15 +02008290main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008291{
Bram Moolenaar446cb832008-06-24 21:56:24 +00008292return socket ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008293 ;
8294 return 0;
8295}
8296_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02008297if ac_fn_c_try_link "$LINENO"
8298then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008299 ac_cv_lib_socket_socket=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02008300else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008301 ac_cv_lib_socket_socket=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00008302fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008303rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008304 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008305LIBS=$ac_check_lib_save_LIBS
8306fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008307{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8308printf "%s\n" "$ac_cv_lib_socket_socket" >&6; }
8309if test "x$ac_cv_lib_socket_socket" = xyes
8310then :
8311 printf "%s\n" "#define HAVE_LIBSOCKET 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00008312
8313 LIBS="-lsocket $LIBS"
8314
Bram Moolenaar071d4272004-06-13 20:20:40 +00008315fi
8316
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008317 fi
8318
Illia Bobyra96d5442023-08-30 16:30:15 +02008319 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether compiling with IPv6 networking is possible" >&5
8320printf %s "checking whether compiling with IPv6 networking is possible... " >&6; }
8321if test ${vim_cv_ipv6_networking+y}
8322then :
8323 printf %s "(cached) " >&6
8324else $as_nop
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8326/* end confdefs.h. */
8327
8328#include <stdio.h>
8329#include <stdlib.h>
8330#include <stdarg.h>
8331#include <fcntl.h>
8332#include <netdb.h>
8333#include <netinet/in.h>
8334#include <errno.h>
8335#include <sys/types.h>
8336#include <sys/socket.h>
8337 /* Check bitfields */
8338 struct nbbuf {
8339 unsigned int initDone:1;
8340 unsigned short signmaplen;
8341 };
8342
8343int
Illia Bobyra96d5442023-08-30 16:30:15 +02008344main (void)
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008345{
8346
8347 /* Check creating a socket. */
8348 struct sockaddr_in server;
8349 struct addrinfo *res;
8350 (void)socket(AF_INET, SOCK_STREAM, 0);
8351 (void)htons(100);
8352 (void)getaddrinfo("microsoft.com", NULL, NULL, &res);
8353 if (errno == ECONNREFUSED)
8354 (void)connect(1, (struct sockaddr *)&server, sizeof(server));
8355 (void)freeaddrinfo(res);
8356
8357 ;
8358 return 0;
8359}
8360_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02008361if ac_fn_c_try_link "$LINENO"
8362then :
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008363 vim_cv_ipv6_networking="yes"
Illia Bobyra96d5442023-08-30 16:30:15 +02008364else $as_nop
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008365 vim_cv_ipv6_networking="no"
8366fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008367rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008368 conftest$ac_exeext conftest.$ac_ext
8369fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008370{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_ipv6_networking" >&5
8371printf "%s\n" "$vim_cv_ipv6_networking" >&6; }
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008372
8373 if test "x$vim_cv_ipv6_networking" = "xyes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008374 printf "%s\n" "#define FEAT_IPV6 1" >>confdefs.h
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008375
Illia Bobyra96d5442023-08-30 16:30:15 +02008376 ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
8377if test "x$ac_cv_func_inet_ntop" = xyes
8378then :
8379 printf "%s\n" "#define HAVE_INET_NTOP 1" >>confdefs.h
Bram Moolenaarb6fb0512020-04-18 18:24:18 +02008380
8381fi
Bram Moolenaarb6fb0512020-04-18 18:24:18 +02008382
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008383 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008384 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
8385printf %s "checking for gethostbyname in -lnsl... " >&6; }
8386if test ${ac_cv_lib_nsl_gethostbyname+y}
8387then :
8388 printf %s "(cached) " >&6
8389else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008390 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00008391LIBS="-lnsl $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008392cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008393/* end confdefs.h. */
8394
Bram Moolenaar446cb832008-06-24 21:56:24 +00008395/* Override any GCC internal prototype to avoid an error.
8396 Use char because int might match the return type of a GCC
8397 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008398char gethostbyname ();
8399int
Illia Bobyra96d5442023-08-30 16:30:15 +02008400main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008401{
Bram Moolenaar446cb832008-06-24 21:56:24 +00008402return gethostbyname ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008403 ;
8404 return 0;
8405}
8406_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02008407if ac_fn_c_try_link "$LINENO"
8408then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008409 ac_cv_lib_nsl_gethostbyname=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02008410else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008411 ac_cv_lib_nsl_gethostbyname=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00008412fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008413rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008414 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008415LIBS=$ac_check_lib_save_LIBS
8416fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008417{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
8418printf "%s\n" "$ac_cv_lib_nsl_gethostbyname" >&6; }
8419if test "x$ac_cv_lib_nsl_gethostbyname" = xyes
8420then :
8421 printf "%s\n" "#define HAVE_LIBNSL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00008422
8423 LIBS="-lnsl $LIBS"
8424
Bram Moolenaar071d4272004-06-13 20:20:40 +00008425fi
8426
Illia Bobyra96d5442023-08-30 16:30:15 +02008427 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether compiling with IPv4 networking is possible" >&5
8428printf %s "checking whether compiling with IPv4 networking is possible... " >&6; }
8429if test ${vim_cv_ipv4_networking+y}
8430then :
8431 printf %s "(cached) " >&6
8432else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008434/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00008435
8436#include <stdio.h>
8437#include <stdlib.h>
8438#include <stdarg.h>
8439#include <fcntl.h>
8440#include <netdb.h>
8441#include <netinet/in.h>
8442#include <errno.h>
8443#include <sys/types.h>
8444#include <sys/socket.h>
8445 /* Check bitfields */
8446 struct nbbuf {
8447 unsigned int initDone:1;
Bram Moolenaar63de19e2016-12-09 20:11:26 +01008448 unsigned short signmaplen;
Bram Moolenaar071d4272004-06-13 20:20:40 +00008449 };
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008450
8451int
Illia Bobyra96d5442023-08-30 16:30:15 +02008452main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008453{
Bram Moolenaar071d4272004-06-13 20:20:40 +00008454
8455 /* Check creating a socket. */
8456 struct sockaddr_in server;
8457 (void)socket(AF_INET, SOCK_STREAM, 0);
8458 (void)htons(100);
8459 (void)gethostbyname("microsoft.com");
8460 if (errno == ECONNREFUSED)
8461 (void)connect(1, (struct sockaddr *)&server, sizeof(server));
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008462
8463 ;
8464 return 0;
8465}
8466_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02008467if ac_fn_c_try_link "$LINENO"
8468then :
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008469 vim_cv_ipv4_networking="yes"
Illia Bobyra96d5442023-08-30 16:30:15 +02008470else $as_nop
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008471 vim_cv_ipv4_networking="no"; enable_netbeans="no"; enable_channel="no"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008472fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008473rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008474 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +00008475fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008476{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_ipv4_networking" >&5
8477printf "%s\n" "$vim_cv_ipv4_networking" >&6; }
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008478 fi
8479fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00008480if test "$enable_netbeans" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008481 printf "%s\n" "#define FEAT_NETBEANS_INTG 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00008482
8483 NETBEANS_SRC="netbeans.c"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008484
Bram Moolenaar071d4272004-06-13 20:20:40 +00008485 NETBEANS_OBJ="objects/netbeans.o"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008486
Bram Moolenaar071d4272004-06-13 20:20:40 +00008487fi
Bram Moolenaare0874f82016-01-24 20:36:41 +01008488if test "$enable_channel" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008489 printf "%s\n" "#define FEAT_JOB_CHANNEL 1" >>confdefs.h
Bram Moolenaare0874f82016-01-24 20:36:41 +01008490
Bram Moolenaar8b5866d2020-09-05 15:48:51 +02008491 CHANNEL_SRC="job.c channel.c"
Bram Moolenaare0874f82016-01-24 20:36:41 +01008492
Bram Moolenaar8b5866d2020-09-05 15:48:51 +02008493 CHANNEL_OBJ="objects/job.o objects/channel.o"
Bram Moolenaare0874f82016-01-24 20:36:41 +01008494
8495fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00008496
Illia Bobyra96d5442023-08-30 16:30:15 +02008497{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-terminal argument" >&5
8498printf %s "checking --enable-terminal argument... " >&6; }
Bram Moolenaare4f25e42017-07-07 11:54:15 +02008499# Check whether --enable-terminal was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008500if test ${enable_terminal+y}
8501then :
Bram Moolenaaref839562017-10-28 20:28:23 +02008502 enableval=$enable_terminal;
Illia Bobyra96d5442023-08-30 16:30:15 +02008503else $as_nop
Bram Moolenaar595a4022017-09-03 19:15:57 +02008504 enable_terminal="auto"
Bram Moolenaare4f25e42017-07-07 11:54:15 +02008505fi
8506
Bram Moolenaar595a4022017-09-03 19:15:57 +02008507if test "$enable_terminal" = "yes" || test "$enable_terminal" = "auto" -a "x$features" = "xhuge" ; then
Bram Moolenaar12471262022-01-18 11:11:25 +00008508 if test "$has_eval" = "no"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008509 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot use terminal emulator with tiny features" >&5
8510printf "%s\n" "cannot use terminal emulator with tiny features" >&6; }
Bram Moolenaare4f25e42017-07-07 11:54:15 +02008511 enable_terminal="no"
8512 else
Bram Moolenaar595a4022017-09-03 19:15:57 +02008513 if test "$enable_terminal" = "auto"; then
8514 enable_terminal="yes"
Illia Bobyra96d5442023-08-30 16:30:15 +02008515 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: defaulting to yes" >&5
8516printf "%s\n" "defaulting to yes" >&6; }
Bram Moolenaar595a4022017-09-03 19:15:57 +02008517 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008518 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8519printf "%s\n" "yes" >&6; }
Bram Moolenaar595a4022017-09-03 19:15:57 +02008520 fi
Bram Moolenaare4f25e42017-07-07 11:54:15 +02008521 fi
8522else
Bram Moolenaar595a4022017-09-03 19:15:57 +02008523 if test "$enable_terminal" = "auto"; then
8524 enable_terminal="no"
Illia Bobyra96d5442023-08-30 16:30:15 +02008525 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: defaulting to no" >&5
8526printf "%s\n" "defaulting to no" >&6; }
Bram Moolenaar595a4022017-09-03 19:15:57 +02008527 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008528 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8529printf "%s\n" "no" >&6; }
Bram Moolenaar595a4022017-09-03 19:15:57 +02008530 fi
Bram Moolenaare4f25e42017-07-07 11:54:15 +02008531fi
Bram Moolenaar8b423282017-12-16 14:37:06 +01008532if test "$enable_terminal" = "yes" -a "$enable_channel" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008533 printf "%s\n" "#define FEAT_TERMINAL 1" >>confdefs.h
Bram Moolenaare4f25e42017-07-07 11:54:15 +02008534
Bram Moolenaar93268052019-10-10 13:22:54 +02008535 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 +02008536
Bram Moolenaar93268052019-10-10 13:22:54 +02008537 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 +02008538
Bram Moolenaar823edd12019-10-23 22:35:36 +02008539 TERM_TEST="test_libvterm"
8540
Bram Moolenaare4f25e42017-07-07 11:54:15 +02008541fi
8542
Illia Bobyra96d5442023-08-30 16:30:15 +02008543{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-autoservername argument" >&5
8544printf %s "checking --enable-autoservername argument... " >&6; }
Bram Moolenaare42a6d22017-11-12 19:21:51 +01008545# Check whether --enable-autoservername was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008546if test ${enable_autoservername+y}
8547then :
Bram Moolenaare42a6d22017-11-12 19:21:51 +01008548 enableval=$enable_autoservername;
Illia Bobyra96d5442023-08-30 16:30:15 +02008549else $as_nop
Bram Moolenaare42a6d22017-11-12 19:21:51 +01008550 enable_autoservername="no"
8551fi
8552
Illia Bobyra96d5442023-08-30 16:30:15 +02008553{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_autoservername" >&5
8554printf "%s\n" "$enable_autoservername" >&6; }
Bram Moolenaare42a6d22017-11-12 19:21:51 +01008555if test "$enable_autoservername" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008556 printf "%s\n" "#define FEAT_AUTOSERVERNAME 1" >>confdefs.h
Bram Moolenaare42a6d22017-11-12 19:21:51 +01008557
8558fi
8559
Illia Bobyra96d5442023-08-30 16:30:15 +02008560{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-multibyte argument" >&5
8561printf %s "checking --enable-multibyte argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00008562# Check whether --enable-multibyte was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008563if test ${enable_multibyte+y}
8564then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00008565 enableval=$enable_multibyte;
Illia Bobyra96d5442023-08-30 16:30:15 +02008566else $as_nop
Bram Moolenaar2be7cb72019-01-12 16:10:51 +01008567 enable_multibyte="yes"
Bram Moolenaar446cb832008-06-24 21:56:24 +00008568fi
8569
Illia Bobyra96d5442023-08-30 16:30:15 +02008570{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_multibyte" >&5
8571printf "%s\n" "$enable_multibyte" >&6; }
Bram Moolenaar30276f22019-01-24 17:59:39 +01008572if test "$enable_multibyte" != "yes"; then
Bram Moolenaar2be7cb72019-01-12 16:10:51 +01008573 as_fn_error $? "The multi-byte feature can no longer be disabled. If you have
8574 a problem with this, discuss on the Vim mailing list." "$LINENO" 5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008575fi
8576
Illia Bobyra96d5442023-08-30 16:30:15 +02008577{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-rightleft argument" >&5
8578printf %s "checking --disable-rightleft argument... " >&6; }
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008579# Check whether --enable-rightleft was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008580if test ${enable_rightleft+y}
8581then :
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008582 enableval=$enable_rightleft;
Illia Bobyra96d5442023-08-30 16:30:15 +02008583else $as_nop
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008584 enable_rightleft="yes"
8585fi
8586
8587if test "$enable_rightleft" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008588 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8589printf "%s\n" "no" >&6; }
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008590else
Illia Bobyra96d5442023-08-30 16:30:15 +02008591 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8592printf "%s\n" "yes" >&6; }
8593 printf "%s\n" "#define DISABLE_RIGHTLEFT 1" >>confdefs.h
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008594
8595fi
8596
Illia Bobyra96d5442023-08-30 16:30:15 +02008597{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-arabic argument" >&5
8598printf %s "checking --disable-arabic argument... " >&6; }
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008599# Check whether --enable-arabic was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008600if test ${enable_arabic+y}
8601then :
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008602 enableval=$enable_arabic;
Illia Bobyra96d5442023-08-30 16:30:15 +02008603else $as_nop
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008604 enable_arabic="yes"
8605fi
8606
8607if test "$enable_arabic" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008608 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8609printf "%s\n" "no" >&6; }
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008610else
Illia Bobyra96d5442023-08-30 16:30:15 +02008611 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8612printf "%s\n" "yes" >&6; }
8613 printf "%s\n" "#define DISABLE_ARABIC 1" >>confdefs.h
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008614
8615fi
8616
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008617# Check whether --enable-farsi was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008618if test ${enable_farsi+y}
8619then :
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008620 enableval=$enable_farsi;
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008621fi
8622
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008623
Illia Bobyra96d5442023-08-30 16:30:15 +02008624{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-xim argument" >&5
8625printf %s "checking --enable-xim argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00008626# Check whether --enable-xim was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008627if test ${enable_xim+y}
8628then :
8629 enableval=$enable_xim; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_xim" >&5
8630printf "%s\n" "$enable_xim" >&6; }
8631else $as_nop
8632 enable_xim="auto"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: defaulting to auto" >&5
8633printf "%s\n" "defaulting to auto" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00008634fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00008635
Bram Moolenaar446cb832008-06-24 21:56:24 +00008636
Illia Bobyra96d5442023-08-30 16:30:15 +02008637{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-fontset argument" >&5
8638printf %s "checking --enable-fontset argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00008639# Check whether --enable-fontset was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008640if test ${enable_fontset+y}
8641then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00008642 enableval=$enable_fontset;
Illia Bobyra96d5442023-08-30 16:30:15 +02008643else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00008644 enable_fontset="no"
Bram Moolenaar446cb832008-06-24 21:56:24 +00008645fi
8646
Illia Bobyra96d5442023-08-30 16:30:15 +02008647{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_fontset" >&5
8648printf "%s\n" "$enable_fontset" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008649
8650test -z "$with_x" && with_x=yes
Bram Moolenaard0573012017-10-28 21:11:06 +02008651test "${enable_gui-yes}" != no -a "x$MACOS_X" != "xyes" -a "x$QNX" != "xyes" && with_x=yes
Bram Moolenaar071d4272004-06-13 20:20:40 +00008652if test "$with_x" = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008653 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: defaulting to: don't HAVE_X11" >&5
8654printf "%s\n" "defaulting to: don't HAVE_X11" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008655else
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008656
Bram Moolenaar071d4272004-06-13 20:20:40 +00008657 # Extract the first word of "xmkmf", so it can be a program name with args.
8658set dummy xmkmf; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02008659{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8660printf %s "checking for $ac_word... " >&6; }
8661if test ${ac_cv_path_xmkmfpath+y}
8662then :
8663 printf %s "(cached) " >&6
8664else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008665 case $xmkmfpath in
8666 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00008667 ac_cv_path_xmkmfpath="$xmkmfpath" # Let the user override the test with a path.
8668 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00008669 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008670 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8671for as_dir in $PATH
8672do
8673 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02008674 case $as_dir in #(((
8675 '') as_dir=./ ;;
8676 */) ;;
8677 *) as_dir=$as_dir/ ;;
8678 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008679 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02008680 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8681 ac_cv_path_xmkmfpath="$as_dir$ac_word$ac_exec_ext"
8682 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008683 break 2
8684 fi
8685done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008686 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00008687IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008688
Bram Moolenaar071d4272004-06-13 20:20:40 +00008689 ;;
8690esac
8691fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008692xmkmfpath=$ac_cv_path_xmkmfpath
Bram Moolenaar071d4272004-06-13 20:20:40 +00008693if test -n "$xmkmfpath"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008694 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xmkmfpath" >&5
8695printf "%s\n" "$xmkmfpath" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008696else
Illia Bobyra96d5442023-08-30 16:30:15 +02008697 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8698printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008699fi
8700
8701
Bram Moolenaar446cb832008-06-24 21:56:24 +00008702
Illia Bobyra96d5442023-08-30 16:30:15 +02008703 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for X" >&5
8704printf %s "checking for X... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008705
Bram Moolenaar071d4272004-06-13 20:20:40 +00008706
Bram Moolenaar446cb832008-06-24 21:56:24 +00008707# Check whether --with-x was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008708if test ${with_x+y}
8709then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00008710 withval=$with_x;
8711fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00008712
8713# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
8714if test "x$with_x" = xno; then
8715 # The user explicitly disabled X.
8716 have_x=disabled
8717else
Bram Moolenaar446cb832008-06-24 21:56:24 +00008718 case $x_includes,$x_libraries in #(
Bram Moolenaar7db77842014-03-27 17:40:59 +01008719 *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
Illia Bobyra96d5442023-08-30 16:30:15 +02008720 *,NONE | NONE,*) if test ${ac_cv_have_x+y}
8721then :
8722 printf %s "(cached) " >&6
8723else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00008724 # One or both of the vars are not set, and there is no cached value.
Illia Bobyra96d5442023-08-30 16:30:15 +02008725ac_x_includes=no
8726ac_x_libraries=no
8727# Do we need to do anything special at all?
8728ac_save_LIBS=$LIBS
8729LIBS="-lX11 $LIBS"
8730cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8731/* end confdefs.h. */
8732#include <X11/Xlib.h>
8733int
8734main (void)
8735{
8736XrmInitialize ()
8737 ;
8738 return 0;
8739}
8740_ACEOF
8741if ac_fn_c_try_link "$LINENO"
8742then :
8743 # We can compile and link X programs with no special options.
8744 ac_x_includes=
8745 ac_x_libraries=
8746fi
8747rm -f core conftest.err conftest.$ac_objext conftest.beam \
8748 conftest$ac_exeext conftest.$ac_ext
8749LIBS="$ac_save_LIBS"
8750# If that didn't work, only try xmkmf and file system searches
8751# for native compilation.
8752if test x"$ac_x_includes" = xno && test "$cross_compiling" = no
8753then :
8754 rm -f -r conftest.dir
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008755if mkdir conftest.dir; then
8756 cd conftest.dir
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008757 cat >Imakefile <<'_ACEOF'
Bram Moolenaar446cb832008-06-24 21:56:24 +00008758incroot:
8759 @echo incroot='${INCROOT}'
8760usrlibdir:
8761 @echo usrlibdir='${USRLIBDIR}'
8762libdir:
8763 @echo libdir='${LIBDIR}'
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008764_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +00008765 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01008766 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
Bram Moolenaar446cb832008-06-24 21:56:24 +00008767 for ac_var in incroot usrlibdir libdir; do
8768 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
8769 done
Bram Moolenaar071d4272004-06-13 20:20:40 +00008770 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
Bram Moolenaar446cb832008-06-24 21:56:24 +00008771 for ac_extension in a so sl dylib la dll; do
8772 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
8773 test -f "$ac_im_libdir/libX11.$ac_extension"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008774 ac_im_usrlibdir=$ac_im_libdir; break
Bram Moolenaar071d4272004-06-13 20:20:40 +00008775 fi
8776 done
8777 # Screen out bogus values from the imake configuration. They are
8778 # bogus both because they are the default anyway, and because
8779 # using them would break gcc on systems where it needs fixed includes.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008780 case $ac_im_incroot in
Bram Moolenaar446cb832008-06-24 21:56:24 +00008781 /usr/include) ac_x_includes= ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008782 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00008783 esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008784 case $ac_im_usrlibdir in
Bram Moolenaar32f31b12009-05-21 13:20:59 +00008785 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008786 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00008787 esac
8788 fi
8789 cd ..
Bram Moolenaar446cb832008-06-24 21:56:24 +00008790 rm -f -r conftest.dir
Bram Moolenaar071d4272004-06-13 20:20:40 +00008791fi
8792
Illia Bobyra96d5442023-08-30 16:30:15 +02008793 # Standard set of common directories for X headers.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008794# Check X11 before X11Rn because it is often a symlink to the current release.
8795ac_x_header_dirs='
8796/usr/X11/include
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008797/usr/X11R7/include
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008798/usr/X11R6/include
8799/usr/X11R5/include
8800/usr/X11R4/include
Bram Moolenaar071d4272004-06-13 20:20:40 +00008801
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008802/usr/include/X11
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008803/usr/include/X11R7
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008804/usr/include/X11R6
8805/usr/include/X11R5
8806/usr/include/X11R4
8807
8808/usr/local/X11/include
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008809/usr/local/X11R7/include
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008810/usr/local/X11R6/include
8811/usr/local/X11R5/include
8812/usr/local/X11R4/include
8813
8814/usr/local/include/X11
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008815/usr/local/include/X11R7
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008816/usr/local/include/X11R6
8817/usr/local/include/X11R5
8818/usr/local/include/X11R4
8819
Illia Bobyra96d5442023-08-30 16:30:15 +02008820/opt/X11/include
8821
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008822/usr/X386/include
8823/usr/x386/include
8824/usr/XFree86/include/X11
8825
8826/usr/include
8827/usr/local/include
8828/usr/unsupported/include
8829/usr/athena/include
8830/usr/local/x11r5/include
8831/usr/lpp/Xamples/include
8832
8833/usr/openwin/include
8834/usr/openwin/share/include'
8835
8836if test "$ac_x_includes" = no; then
Bram Moolenaar446cb832008-06-24 21:56:24 +00008837 # Guess where to find include files, by looking for Xlib.h.
Bram Moolenaar071d4272004-06-13 20:20:40 +00008838 # First, try using that file with no special directory specified.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008840/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +00008841#include <X11/Xlib.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008842_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02008843if ac_fn_c_try_cpp "$LINENO"
8844then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00008845 # We can compile using X headers with no special include directory.
8846ac_x_includes=
Illia Bobyra96d5442023-08-30 16:30:15 +02008847else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008848 for ac_dir in $ac_x_header_dirs; do
Bram Moolenaar446cb832008-06-24 21:56:24 +00008849 if test -r "$ac_dir/X11/Xlib.h"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008850 ac_x_includes=$ac_dir
8851 break
8852 fi
8853done
Bram Moolenaar071d4272004-06-13 20:20:40 +00008854fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01008855rm -f conftest.err conftest.i conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008856fi # $ac_x_includes = no
Bram Moolenaar071d4272004-06-13 20:20:40 +00008857
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008858if test "$ac_x_libraries" = no; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008859 # Check for the libraries.
Bram Moolenaar071d4272004-06-13 20:20:40 +00008860 # See if we find them without any special options.
8861 # Don't add to $LIBS permanently.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008862 ac_save_LIBS=$LIBS
Bram Moolenaar446cb832008-06-24 21:56:24 +00008863 LIBS="-lX11 $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008865/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +00008866#include <X11/Xlib.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008867int
Illia Bobyra96d5442023-08-30 16:30:15 +02008868main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008869{
Bram Moolenaar446cb832008-06-24 21:56:24 +00008870XrmInitialize ()
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008871 ;
8872 return 0;
8873}
8874_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02008875if ac_fn_c_try_link "$LINENO"
8876then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008877 LIBS=$ac_save_LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00008878# We can link X programs with no special library path.
8879ac_x_libraries=
Illia Bobyra96d5442023-08-30 16:30:15 +02008880else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008881 LIBS=$ac_save_LIBS
Illia Bobyra96d5442023-08-30 16:30:15 +02008882for 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 +00008883do
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008884 # Don't even attempt the hair of trying to link an X program!
Bram Moolenaar446cb832008-06-24 21:56:24 +00008885 for ac_extension in a so sl dylib la dll; do
8886 if test -r "$ac_dir/libX11.$ac_extension"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008887 ac_x_libraries=$ac_dir
8888 break 2
8889 fi
8890 done
8891done
8892fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008893rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008894 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008895fi # $ac_x_libraries = no
Bram Moolenaar071d4272004-06-13 20:20:40 +00008896
Illia Bobyra96d5442023-08-30 16:30:15 +02008897fi
8898# Record the results.
Bram Moolenaar446cb832008-06-24 21:56:24 +00008899case $ac_x_includes,$ac_x_libraries in #(
Illia Bobyra96d5442023-08-30 16:30:15 +02008900 no,* | *,no | *\'*) :
Bram Moolenaar446cb832008-06-24 21:56:24 +00008901 # Didn't find X, or a directory has "'" in its name.
Illia Bobyra96d5442023-08-30 16:30:15 +02008902 ac_cv_have_x="have_x=no" ;; #(
8903 *) :
Bram Moolenaar446cb832008-06-24 21:56:24 +00008904 # Record where we found X for the cache.
8905 ac_cv_have_x="have_x=yes\
8906 ac_x_includes='$ac_x_includes'\
Illia Bobyra96d5442023-08-30 16:30:15 +02008907 ac_x_libraries='$ac_x_libraries'" ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +00008908esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00008909fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00008910;; #(
8911 *) have_x=yes;;
8912 esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00008913 eval "$ac_cv_have_x"
8914fi # $with_x != no
8915
8916if test "$have_x" != yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008917 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
8918printf "%s\n" "$have_x" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008919 no_x=yes
8920else
8921 # If each of the values was on the command line, it overrides each guess.
8922 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
8923 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
8924 # Update the cache value to reflect the command line values.
Bram Moolenaar446cb832008-06-24 21:56:24 +00008925 ac_cv_have_x="have_x=yes\
8926 ac_x_includes='$x_includes'\
8927 ac_x_libraries='$x_libraries'"
Illia Bobyra96d5442023-08-30 16:30:15 +02008928 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
8929printf "%s\n" "libraries $x_libraries, headers $x_includes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008930fi
8931
8932if test "$no_x" = yes; then
8933 # Not all programs may use this symbol, but it does not hurt to define it.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008934
Illia Bobyra96d5442023-08-30 16:30:15 +02008935printf "%s\n" "#define X_DISPLAY_MISSING 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00008936
8937 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
8938else
8939 if test -n "$x_includes"; then
8940 X_CFLAGS="$X_CFLAGS -I$x_includes"
8941 fi
8942
8943 # It would also be nice to do this for all -L options, not just this one.
8944 if test -n "$x_libraries"; then
8945 X_LIBS="$X_LIBS -L$x_libraries"
8946 # For Solaris; some versions of Sun CC require a space after -R and
8947 # others require no space. Words are not sufficient . . . .
Illia Bobyra96d5442023-08-30 16:30:15 +02008948 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
8949printf %s "checking whether -R must be followed by a space... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00008950 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
8951 ac_xsave_c_werror_flag=$ac_c_werror_flag
8952 ac_c_werror_flag=yes
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008954/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00008955
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008956int
Illia Bobyra96d5442023-08-30 16:30:15 +02008957main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008958{
Bram Moolenaar071d4272004-06-13 20:20:40 +00008959
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008960 ;
8961 return 0;
8962}
8963_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02008964if ac_fn_c_try_link "$LINENO"
8965then :
8966 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8967printf "%s\n" "no" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00008968 X_LIBS="$X_LIBS -R$x_libraries"
Illia Bobyra96d5442023-08-30 16:30:15 +02008969else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008970 LIBS="$ac_xsave_LIBS -R $x_libraries"
8971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008972/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00008973
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008974int
Illia Bobyra96d5442023-08-30 16:30:15 +02008975main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008976{
Bram Moolenaar071d4272004-06-13 20:20:40 +00008977
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008978 ;
8979 return 0;
8980}
8981_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02008982if ac_fn_c_try_link "$LINENO"
8983then :
8984 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8985printf "%s\n" "yes" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00008986 X_LIBS="$X_LIBS -R $x_libraries"
Illia Bobyra96d5442023-08-30 16:30:15 +02008987else $as_nop
8988 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
8989printf "%s\n" "neither works" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008990fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008991rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008992 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +00008993fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008994rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008995 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +00008996 ac_c_werror_flag=$ac_xsave_c_werror_flag
8997 LIBS=$ac_xsave_LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00008998 fi
8999
9000 # Check for system-dependent libraries X programs must link with.
9001 # Do this before checking for the system-independent R6 libraries
9002 # (-lICE), since we may need -lsocket or whatever for X linking.
9003
9004 if test "$ISC" = yes; then
9005 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
9006 else
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009007 # Martyn Johnson says this is needed for Ultrix, if the X
9008 # libraries were built with DECnet support. And Karl Berry says
Bram Moolenaar071d4272004-06-13 20:20:40 +00009009 # the Alpha needs dnet_stub (dnet does not exist).
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009010 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009012/* end confdefs.h. */
9013
Bram Moolenaar446cb832008-06-24 21:56:24 +00009014/* Override any GCC internal prototype to avoid an error.
9015 Use char because int might match the return type of a GCC
9016 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009017char XOpenDisplay ();
9018int
Illia Bobyra96d5442023-08-30 16:30:15 +02009019main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009020{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009021return XOpenDisplay ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009022 ;
9023 return 0;
9024}
9025_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009026if ac_fn_c_try_link "$LINENO"
9027then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009028
Illia Bobyra96d5442023-08-30 16:30:15 +02009029else $as_nop
9030 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
9031printf %s "checking for dnet_ntoa in -ldnet... " >&6; }
9032if test ${ac_cv_lib_dnet_dnet_ntoa+y}
9033then :
9034 printf %s "(cached) " >&6
9035else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009036 ac_check_lib_save_LIBS=$LIBS
9037LIBS="-ldnet $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009038cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009039/* end confdefs.h. */
9040
Bram Moolenaar446cb832008-06-24 21:56:24 +00009041/* Override any GCC internal prototype to avoid an error.
9042 Use char because int might match the return type of a GCC
9043 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009044char dnet_ntoa ();
9045int
Illia Bobyra96d5442023-08-30 16:30:15 +02009046main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009047{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009048return dnet_ntoa ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009049 ;
9050 return 0;
9051}
9052_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009053if ac_fn_c_try_link "$LINENO"
9054then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009055 ac_cv_lib_dnet_dnet_ntoa=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009056else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009057 ac_cv_lib_dnet_dnet_ntoa=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009058fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009059rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009060 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009061LIBS=$ac_check_lib_save_LIBS
9062fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009063{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
9064printf "%s\n" "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
9065if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes
9066then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009067 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009068fi
9069
9070 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009071 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
9072printf %s "checking for dnet_ntoa in -ldnet_stub... " >&6; }
9073if test ${ac_cv_lib_dnet_stub_dnet_ntoa+y}
9074then :
9075 printf %s "(cached) " >&6
9076else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009077 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009078LIBS="-ldnet_stub $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009079cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009080/* end confdefs.h. */
9081
Bram Moolenaar446cb832008-06-24 21:56:24 +00009082/* Override any GCC internal prototype to avoid an error.
9083 Use char because int might match the return type of a GCC
9084 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009085char dnet_ntoa ();
9086int
Illia Bobyra96d5442023-08-30 16:30:15 +02009087main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009088{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009089return dnet_ntoa ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009090 ;
9091 return 0;
9092}
9093_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009094if ac_fn_c_try_link "$LINENO"
9095then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009096 ac_cv_lib_dnet_stub_dnet_ntoa=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009097else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009098 ac_cv_lib_dnet_stub_dnet_ntoa=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009099fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009100rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009101 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009102LIBS=$ac_check_lib_save_LIBS
9103fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009104{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
9105printf "%s\n" "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
9106if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes
9107then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009108 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009109fi
9110
9111 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009112fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009113rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009114 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009115 LIBS="$ac_xsave_LIBS"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009116
9117 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
9118 # to get the SysV transport functions.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009119 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
Bram Moolenaar071d4272004-06-13 20:20:40 +00009120 # needs -lnsl.
9121 # The nsl library prevents programs from opening the X display
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009122 # on Irix 5.2, according to T.E. Dickey.
9123 # The functions gethostbyname, getservbyname, and inet_addr are
9124 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009125 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Illia Bobyra96d5442023-08-30 16:30:15 +02009126if test "x$ac_cv_func_gethostbyname" = xyes
9127then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009128
Bram Moolenaar071d4272004-06-13 20:20:40 +00009129fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00009130
Bram Moolenaar071d4272004-06-13 20:20:40 +00009131 if test $ac_cv_func_gethostbyname = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009132 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
9133printf %s "checking for gethostbyname in -lnsl... " >&6; }
9134if test ${ac_cv_lib_nsl_gethostbyname+y}
9135then :
9136 printf %s "(cached) " >&6
9137else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009138 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009139LIBS="-lnsl $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009140cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009141/* end confdefs.h. */
9142
Bram Moolenaar446cb832008-06-24 21:56:24 +00009143/* Override any GCC internal prototype to avoid an error.
9144 Use char because int might match the return type of a GCC
9145 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009146char gethostbyname ();
9147int
Illia Bobyra96d5442023-08-30 16:30:15 +02009148main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009149{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009150return gethostbyname ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009151 ;
9152 return 0;
9153}
9154_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009155if ac_fn_c_try_link "$LINENO"
9156then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009157 ac_cv_lib_nsl_gethostbyname=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009158else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009159 ac_cv_lib_nsl_gethostbyname=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009160fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009161rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009162 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009163LIBS=$ac_check_lib_save_LIBS
9164fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009165{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
9166printf "%s\n" "$ac_cv_lib_nsl_gethostbyname" >&6; }
9167if test "x$ac_cv_lib_nsl_gethostbyname" = xyes
9168then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009169 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009170fi
9171
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009172 if test $ac_cv_lib_nsl_gethostbyname = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009173 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
9174printf %s "checking for gethostbyname in -lbsd... " >&6; }
9175if test ${ac_cv_lib_bsd_gethostbyname+y}
9176then :
9177 printf %s "(cached) " >&6
9178else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009179 ac_check_lib_save_LIBS=$LIBS
9180LIBS="-lbsd $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009181cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009182/* end confdefs.h. */
9183
Bram Moolenaar446cb832008-06-24 21:56:24 +00009184/* Override any GCC internal prototype to avoid an error.
9185 Use char because int might match the return type of a GCC
9186 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009187char gethostbyname ();
9188int
Illia Bobyra96d5442023-08-30 16:30:15 +02009189main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009190{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009191return gethostbyname ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009192 ;
9193 return 0;
9194}
9195_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009196if ac_fn_c_try_link "$LINENO"
9197then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009198 ac_cv_lib_bsd_gethostbyname=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009199else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009200 ac_cv_lib_bsd_gethostbyname=no
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009201fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009202rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009203 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009204LIBS=$ac_check_lib_save_LIBS
9205fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009206{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
9207printf "%s\n" "$ac_cv_lib_bsd_gethostbyname" >&6; }
9208if test "x$ac_cv_lib_bsd_gethostbyname" = xyes
9209then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009210 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
9211fi
9212
9213 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00009214 fi
9215
9216 # lieder@skyler.mavd.honeywell.com says without -lsocket,
9217 # socket/setsockopt and other routines are undefined under SCO ODT
9218 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009219 # on later versions), says Simon Leinen: it contains gethostby*
9220 # variants that don't use the name server (or something). -lsocket
9221 # must be given before -lnsl if both are needed. We assume that
9222 # if connect needs -lnsl, so does gethostbyname.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009223 ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect"
Illia Bobyra96d5442023-08-30 16:30:15 +02009224if test "x$ac_cv_func_connect" = xyes
9225then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009226
Bram Moolenaar071d4272004-06-13 20:20:40 +00009227fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00009228
Bram Moolenaar071d4272004-06-13 20:20:40 +00009229 if test $ac_cv_func_connect = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009230 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
9231printf %s "checking for connect in -lsocket... " >&6; }
9232if test ${ac_cv_lib_socket_connect+y}
9233then :
9234 printf %s "(cached) " >&6
9235else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009236 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009237LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009238cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009239/* end confdefs.h. */
9240
Bram Moolenaar446cb832008-06-24 21:56:24 +00009241/* Override any GCC internal prototype to avoid an error.
9242 Use char because int might match the return type of a GCC
9243 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009244char connect ();
9245int
Illia Bobyra96d5442023-08-30 16:30:15 +02009246main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009247{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009248return connect ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009249 ;
9250 return 0;
9251}
9252_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009253if ac_fn_c_try_link "$LINENO"
9254then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009255 ac_cv_lib_socket_connect=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009256else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009257 ac_cv_lib_socket_connect=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009258fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009259rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009260 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009261LIBS=$ac_check_lib_save_LIBS
9262fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009263{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
9264printf "%s\n" "$ac_cv_lib_socket_connect" >&6; }
9265if test "x$ac_cv_lib_socket_connect" = xyes
9266then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009267 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009268fi
9269
9270 fi
9271
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009272 # Guillermo Gomez says -lposix is necessary on A/UX.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009273 ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove"
Illia Bobyra96d5442023-08-30 16:30:15 +02009274if test "x$ac_cv_func_remove" = xyes
9275then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009276
Bram Moolenaar071d4272004-06-13 20:20:40 +00009277fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00009278
Bram Moolenaar071d4272004-06-13 20:20:40 +00009279 if test $ac_cv_func_remove = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009280 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
9281printf %s "checking for remove in -lposix... " >&6; }
9282if test ${ac_cv_lib_posix_remove+y}
9283then :
9284 printf %s "(cached) " >&6
9285else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009286 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009287LIBS="-lposix $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009288cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009289/* end confdefs.h. */
9290
Bram Moolenaar446cb832008-06-24 21:56:24 +00009291/* Override any GCC internal prototype to avoid an error.
9292 Use char because int might match the return type of a GCC
9293 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009294char remove ();
9295int
Illia Bobyra96d5442023-08-30 16:30:15 +02009296main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009297{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009298return remove ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009299 ;
9300 return 0;
9301}
9302_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009303if ac_fn_c_try_link "$LINENO"
9304then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009305 ac_cv_lib_posix_remove=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009306else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009307 ac_cv_lib_posix_remove=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009308fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009309rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009310 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009311LIBS=$ac_check_lib_save_LIBS
9312fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009313{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
9314printf "%s\n" "$ac_cv_lib_posix_remove" >&6; }
9315if test "x$ac_cv_lib_posix_remove" = xyes
9316then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009317 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009318fi
9319
9320 fi
9321
9322 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009323 ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
Illia Bobyra96d5442023-08-30 16:30:15 +02009324if test "x$ac_cv_func_shmat" = xyes
9325then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009326
Bram Moolenaar071d4272004-06-13 20:20:40 +00009327fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00009328
Bram Moolenaar071d4272004-06-13 20:20:40 +00009329 if test $ac_cv_func_shmat = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009330 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
9331printf %s "checking for shmat in -lipc... " >&6; }
9332if test ${ac_cv_lib_ipc_shmat+y}
9333then :
9334 printf %s "(cached) " >&6
9335else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009336 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009337LIBS="-lipc $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009338cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009339/* end confdefs.h. */
9340
Bram Moolenaar446cb832008-06-24 21:56:24 +00009341/* Override any GCC internal prototype to avoid an error.
9342 Use char because int might match the return type of a GCC
9343 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009344char shmat ();
9345int
Illia Bobyra96d5442023-08-30 16:30:15 +02009346main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009347{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009348return shmat ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009349 ;
9350 return 0;
9351}
9352_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009353if ac_fn_c_try_link "$LINENO"
9354then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009355 ac_cv_lib_ipc_shmat=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009356else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009357 ac_cv_lib_ipc_shmat=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009358fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009359rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009360 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009361LIBS=$ac_check_lib_save_LIBS
9362fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009363{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
9364printf "%s\n" "$ac_cv_lib_ipc_shmat" >&6; }
9365if test "x$ac_cv_lib_ipc_shmat" = xyes
9366then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009367 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009368fi
9369
9370 fi
9371 fi
9372
9373 # Check for libraries that X11R6 Xt/Xaw programs need.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009374 ac_save_LDFLAGS=$LDFLAGS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009375 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
9376 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
9377 # check for ICE first), but we must link in the order -lSM -lICE or
9378 # we get undefined symbols. So assume we have SM if we have ICE.
9379 # These have to be linked with before -lX11, unlike the other
9380 # libraries we check for below, so use a different variable.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009381 # John Interrante, Karl Berry
Illia Bobyra96d5442023-08-30 16:30:15 +02009382 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
9383printf %s "checking for IceConnectionNumber in -lICE... " >&6; }
9384if test ${ac_cv_lib_ICE_IceConnectionNumber+y}
9385then :
9386 printf %s "(cached) " >&6
9387else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009388 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009389LIBS="-lICE $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009390cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009391/* end confdefs.h. */
9392
Bram Moolenaar446cb832008-06-24 21:56:24 +00009393/* Override any GCC internal prototype to avoid an error.
9394 Use char because int might match the return type of a GCC
9395 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009396char IceConnectionNumber ();
9397int
Illia Bobyra96d5442023-08-30 16:30:15 +02009398main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009399{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009400return IceConnectionNumber ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009401 ;
9402 return 0;
9403}
9404_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009405if ac_fn_c_try_link "$LINENO"
9406then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009407 ac_cv_lib_ICE_IceConnectionNumber=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009408else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009409 ac_cv_lib_ICE_IceConnectionNumber=no
Bram Moolenaar071d4272004-06-13 20:20:40 +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 Moolenaar495de9c2005-01-25 22:03:25 +00009413LIBS=$ac_check_lib_save_LIBS
9414fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009415{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
9416printf "%s\n" "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
9417if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes
9418then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009419 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009420fi
9421
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009422 LDFLAGS=$ac_save_LDFLAGS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009423
9424fi
9425
9426
Bram Moolenaar2c704a72010-06-03 21:17:25 +02009427 if test "$zOSUnix" = "yes"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00009428 CFLAGS="$CFLAGS -W c,dll"
9429 LDFLAGS="$LDFLAGS -W l,dll"
9430 X_EXTRA_LIBS="$X_EXTRA_LIBS -lSM -lICE -lXmu"
9431 fi
9432
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009433
Bram Moolenaar071d4272004-06-13 20:20:40 +00009434 if test -d "$x_includes" && test ! -d "$x_libraries"; then
9435 x_libraries=`echo "$x_includes" | sed s/include/lib/`
Illia Bobyra96d5442023-08-30 16:30:15 +02009436 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Corrected X libraries to $x_libraries" >&5
9437printf "%s\n" "Corrected X libraries to $x_libraries" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009438 X_LIBS="$X_LIBS -L$x_libraries"
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00009439 if test "$vim_cv_uname_output" = SunOS &&
9440 echo $vim_cv_uname_r_output | grep '^5' >/dev/null; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00009441 X_LIBS="$X_LIBS -R $x_libraries"
9442 fi
9443 fi
9444
9445 if test -d "$x_libraries" && test ! -d "$x_includes"; then
9446 x_includes=`echo "$x_libraries" | sed s/lib/include/`
Illia Bobyra96d5442023-08-30 16:30:15 +02009447 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Corrected X includes to $x_includes" >&5
9448printf "%s\n" "Corrected X includes to $x_includes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009449 X_CFLAGS="$X_CFLAGS -I$x_includes"
9450 fi
9451
9452 X_CFLAGS="`echo $X_CFLAGS\ | sed 's%-I/usr/include %%'`"
9453 X_LIBS="`echo $X_LIBS\ | sed 's%-L/usr/lib %%'`"
9454 X_LIBS="`echo $X_LIBS\ | sed -e 's%-R/usr/lib %%' -e 's%-R /usr/lib %%'`"
9455
9456
Illia Bobyra96d5442023-08-30 16:30:15 +02009457 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if X11 header files can be found" >&5
9458printf %s "checking if X11 header files can be found... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009459 cflags_save=$CFLAGS
9460 CFLAGS="$CFLAGS $X_CFLAGS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009462/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00009463#include <X11/Xlib.h>
Bram Moolenaar00ca2842008-06-26 20:14:00 +00009464#include <X11/Intrinsic.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009465int
Illia Bobyra96d5442023-08-30 16:30:15 +02009466main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009467{
Bram Moolenaar071d4272004-06-13 20:20:40 +00009468
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009469 ;
9470 return 0;
9471}
9472_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009473if ac_fn_c_try_compile "$LINENO"
9474then :
9475 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9476printf "%s\n" "yes" >&6; }
9477else $as_nop
9478 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9479printf "%s\n" "no" >&6; }; no_x=yes
Bram Moolenaar071d4272004-06-13 20:20:40 +00009480fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009481rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +00009482 CFLAGS=$cflags_save
9483
9484 if test "${no_x-no}" = yes; then
9485 with_x=no
9486 else
Illia Bobyra96d5442023-08-30 16:30:15 +02009487 printf "%s\n" "#define HAVE_X11 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00009488
9489 X_LIB="-lXt -lX11";
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009490
Bram Moolenaar071d4272004-06-13 20:20:40 +00009491
9492 ac_save_LDFLAGS="$LDFLAGS"
9493 LDFLAGS="-L$x_libraries $LDFLAGS"
9494
Illia Bobyra96d5442023-08-30 16:30:15 +02009495 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _XdmcpAuthDoIt in -lXdmcp" >&5
9496printf %s "checking for _XdmcpAuthDoIt in -lXdmcp... " >&6; }
9497if test ${ac_cv_lib_Xdmcp__XdmcpAuthDoIt+y}
9498then :
9499 printf %s "(cached) " >&6
9500else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009501 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009502LIBS="-lXdmcp -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS -lXdmcp $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009503cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009504/* end confdefs.h. */
9505
Bram Moolenaar446cb832008-06-24 21:56:24 +00009506/* Override any GCC internal prototype to avoid an error.
9507 Use char because int might match the return type of a GCC
9508 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009509char _XdmcpAuthDoIt ();
9510int
Illia Bobyra96d5442023-08-30 16:30:15 +02009511main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009512{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009513return _XdmcpAuthDoIt ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009514 ;
9515 return 0;
9516}
9517_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009518if ac_fn_c_try_link "$LINENO"
9519then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009520 ac_cv_lib_Xdmcp__XdmcpAuthDoIt=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009521else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009522 ac_cv_lib_Xdmcp__XdmcpAuthDoIt=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009523fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009524rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009525 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009526LIBS=$ac_check_lib_save_LIBS
9527fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009528{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xdmcp__XdmcpAuthDoIt" >&5
9529printf "%s\n" "$ac_cv_lib_Xdmcp__XdmcpAuthDoIt" >&6; }
9530if test "x$ac_cv_lib_Xdmcp__XdmcpAuthDoIt" = xyes
9531then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009532 X_EXTRA_LIBS="$X_EXTRA_LIBS -lXdmcp"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009533fi
9534
9535
Illia Bobyra96d5442023-08-30 16:30:15 +02009536 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IceOpenConnection in -lICE" >&5
9537printf %s "checking for IceOpenConnection in -lICE... " >&6; }
9538if test ${ac_cv_lib_ICE_IceOpenConnection+y}
9539then :
9540 printf %s "(cached) " >&6
9541else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009542 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009543LIBS="-lICE $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009544cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009545/* end confdefs.h. */
9546
Bram Moolenaar446cb832008-06-24 21:56:24 +00009547/* Override any GCC internal prototype to avoid an error.
9548 Use char because int might match the return type of a GCC
9549 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009550char IceOpenConnection ();
9551int
Illia Bobyra96d5442023-08-30 16:30:15 +02009552main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009553{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009554return IceOpenConnection ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009555 ;
9556 return 0;
9557}
9558_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009559if ac_fn_c_try_link "$LINENO"
9560then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009561 ac_cv_lib_ICE_IceOpenConnection=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009562else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009563 ac_cv_lib_ICE_IceOpenConnection=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009564fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009565rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009566 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009567LIBS=$ac_check_lib_save_LIBS
9568fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009569{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceOpenConnection" >&5
9570printf "%s\n" "$ac_cv_lib_ICE_IceOpenConnection" >&6; }
9571if test "x$ac_cv_lib_ICE_IceOpenConnection" = xyes
9572then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009573 X_EXTRA_LIBS="$X_EXTRA_LIBS -lSM -lICE"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009574fi
9575
9576
9577 LDFLAGS="$X_LIBS $ac_save_LDFLAGS"
Illia Bobyra96d5442023-08-30 16:30:15 +02009578 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XpmCreatePixmapFromData in -lXpm" >&5
9579printf %s "checking for XpmCreatePixmapFromData in -lXpm... " >&6; }
9580if test ${ac_cv_lib_Xpm_XpmCreatePixmapFromData+y}
9581then :
9582 printf %s "(cached) " >&6
9583else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009584 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009585LIBS="-lXpm -lXt $X_PRE_LIBS -lXpm -lX11 $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009586cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009587/* end confdefs.h. */
9588
Bram Moolenaar446cb832008-06-24 21:56:24 +00009589/* Override any GCC internal prototype to avoid an error.
9590 Use char because int might match the return type of a GCC
9591 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009592char XpmCreatePixmapFromData ();
9593int
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 XpmCreatePixmapFromData ();
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_Xpm_XpmCreatePixmapFromData=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009604else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009605 ac_cv_lib_Xpm_XpmCreatePixmapFromData=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009606fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009607rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009608 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009609LIBS=$ac_check_lib_save_LIBS
9610fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009611{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmCreatePixmapFromData" >&5
9612printf "%s\n" "$ac_cv_lib_Xpm_XpmCreatePixmapFromData" >&6; }
9613if test "x$ac_cv_lib_Xpm_XpmCreatePixmapFromData" = xyes
9614then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009615 X_PRE_LIBS="$X_PRE_LIBS -lXpm"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009616fi
9617
9618
Illia Bobyra96d5442023-08-30 16:30:15 +02009619 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if X11 header files implicitly declare return values" >&5
9620printf %s "checking if X11 header files implicitly declare return values... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009621 cflags_save=$CFLAGS
Bram Moolenaard1864592013-05-04 04:40:15 +02009622 if test "$GCC" = yes; then
9623 CFLAGS="$CFLAGS $X_CFLAGS -Werror"
9624 else
9625 CFLAGS="$CFLAGS $X_CFLAGS"
9626 fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009628/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00009629#include <X11/Xlib.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009630int
Illia Bobyra96d5442023-08-30 16:30:15 +02009631main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009632{
Bram Moolenaar071d4272004-06-13 20:20:40 +00009633
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009634 ;
9635 return 0;
9636}
9637_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009638if ac_fn_c_try_compile "$LINENO"
9639then :
9640 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9641printf "%s\n" "no" >&6; }
9642else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009643 CFLAGS="$CFLAGS -Wno-implicit-int"
9644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009645/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00009646#include <X11/Xlib.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009647int
Illia Bobyra96d5442023-08-30 16:30:15 +02009648main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009649{
Bram Moolenaar071d4272004-06-13 20:20:40 +00009650
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009651 ;
9652 return 0;
9653}
9654_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009655if ac_fn_c_try_compile "$LINENO"
9656then :
9657 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9658printf "%s\n" "yes" >&6; }; cflags_save="$cflags_save -Wno-implicit-int"
9659else $as_nop
9660 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: test failed" >&5
9661printf "%s\n" "test failed" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009662
Bram Moolenaar071d4272004-06-13 20:20:40 +00009663fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009664rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009665
Bram Moolenaar071d4272004-06-13 20:20:40 +00009666fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009667rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +00009668 CFLAGS=$cflags_save
9669
9670 LDFLAGS="$ac_save_LDFLAGS"
9671
Mike Gilberta055b442023-08-20 19:01:41 +02009672 # The cast to long int works around a bug in the HP C Compiler
9673# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9674# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9675# This bug is HP SR number 8606223364.
Illia Bobyra96d5442023-08-30 16:30:15 +02009676{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
9677printf %s "checking size of wchar_t... " >&6; }
9678if test ${ac_cv_sizeof_wchar_t+y}
9679then :
9680 printf %s "(cached) " >&6
9681else $as_nop
9682 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "$ac_includes_default"
9683then :
Bram Moolenaar4bdbbf72009-05-21 21:27:43 +00009684
Illia Bobyra96d5442023-08-30 16:30:15 +02009685else $as_nop
Mike Gilberta055b442023-08-20 19:01:41 +02009686 if test "$ac_cv_type_wchar_t" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009687 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9688printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Mike Gilberta055b442023-08-20 19:01:41 +02009689as_fn_error 77 "cannot compute sizeof (wchar_t)
9690See \`config.log' for more details" "$LINENO" 5; }
9691 else
9692 ac_cv_sizeof_wchar_t=0
9693 fi
9694fi
9695
9696fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009697{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
9698printf "%s\n" "$ac_cv_sizeof_wchar_t" >&6; }
Mike Gilberta055b442023-08-20 19:01:41 +02009699
9700
9701
Illia Bobyra96d5442023-08-30 16:30:15 +02009702printf "%s\n" "#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t" >>confdefs.h
Bram Moolenaar4bdbbf72009-05-21 21:27:43 +00009703
Bram Moolenaar4bdbbf72009-05-21 21:27:43 +00009704
Mike Gilberta055b442023-08-20 19:01:41 +02009705 if test "$ac_cv_sizeof_wchar_t" -le 2; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009706 printf "%s\n" "#define SMALL_WCHAR_T 1" >>confdefs.h
Bram Moolenaar4bdbbf72009-05-21 21:27:43 +00009707
9708 fi
9709
Bram Moolenaar071d4272004-06-13 20:20:40 +00009710 fi
9711fi
9712
Bram Moolenaard2a05492018-07-27 22:35:15 +02009713if test "x$with_x" = xno -a "x$with_x_arg" = xyes; then
9714 as_fn_error $? "could not configure X" "$LINENO" 5
9715fi
9716
Bram Moolenaarb3f74062020-02-26 16:16:53 +01009717test "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 +00009718
Illia Bobyra96d5442023-08-30 16:30:15 +02009719{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-gui argument" >&5
9720printf %s "checking --enable-gui argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00009721# Check whether --enable-gui was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02009722if test ${enable_gui+y}
9723then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00009724 enableval=$enable_gui;
Illia Bobyra96d5442023-08-30 16:30:15 +02009725else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00009726 enable_gui="auto"
Bram Moolenaar446cb832008-06-24 21:56:24 +00009727fi
9728
Bram Moolenaar071d4272004-06-13 20:20:40 +00009729
9730enable_gui_canon=`echo "_$enable_gui" | \
9731 sed 's/[ _+-]//g;y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
9732
Bram Moolenaar071d4272004-06-13 20:20:40 +00009733SKIP_GTK2=YES
Bram Moolenaar1858a842016-02-23 22:30:31 +01009734SKIP_GTK3=YES
Bram Moolenaar071d4272004-06-13 20:20:40 +00009735SKIP_GNOME=YES
9736SKIP_MOTIF=YES
Bram Moolenaar071d4272004-06-13 20:20:40 +00009737SKIP_PHOTON=YES
Bram Moolenaarb3f74062020-02-26 16:16:53 +01009738SKIP_HAIKU=YES
Bram Moolenaar071d4272004-06-13 20:20:40 +00009739GUITYPE=NONE
9740
Bram Moolenaarb3f74062020-02-26 16:16:53 +01009741if test "x$HAIKU" = "xyes"; then
9742 SKIP_HAIKU=
9743 case "$enable_gui_canon" in
Illia Bobyra96d5442023-08-30 16:30:15 +02009744 no) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no GUI support" >&5
9745printf "%s\n" "no GUI support" >&6; }
Bram Moolenaarb3f74062020-02-26 16:16:53 +01009746 SKIP_HAIKU=YES ;;
Illia Bobyra96d5442023-08-30 16:30:15 +02009747 yes|"") { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes - automatic GUI support" >&5
9748printf "%s\n" "yes - automatic GUI support" >&6; } ;;
9749 auto) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: auto - automatic GUI support" >&5
9750printf "%s\n" "auto - automatic GUI support" >&6; } ;;
9751 haiku) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Haiku GUI support" >&5
9752printf "%s\n" "Haiku GUI support" >&6; } ;;
9753 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Sorry, $enable_gui GUI is not supported" >&5
9754printf "%s\n" "Sorry, $enable_gui GUI is not supported" >&6; }
Bram Moolenaarb3f74062020-02-26 16:16:53 +01009755 SKIP_HAIKU=YES ;;
9756 esac
9757elif test "x$QNX" = "xyes" -a "x$with_x" = "xno" ; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00009758 SKIP_PHOTON=
9759 case "$enable_gui_canon" in
Illia Bobyra96d5442023-08-30 16:30:15 +02009760 no) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no GUI support" >&5
9761printf "%s\n" "no GUI support" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009762 SKIP_PHOTON=YES ;;
Illia Bobyra96d5442023-08-30 16:30:15 +02009763 yes|""|auto) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: automatic GUI support" >&5
9764printf "%s\n" "automatic GUI support" >&6; }
Bram Moolenaaraf0839a2018-12-30 22:55:47 +01009765 gui_auto=yes ;;
Illia Bobyra96d5442023-08-30 16:30:15 +02009766 photon) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Photon GUI support" >&5
9767printf "%s\n" "Photon GUI support" >&6; } ;;
9768 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Sorry, $enable_gui GUI is not supported" >&5
9769printf "%s\n" "Sorry, $enable_gui GUI is not supported" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009770 SKIP_PHOTON=YES ;;
9771 esac
9772
Bram Moolenaar040f9752020-08-11 23:08:48 +02009773elif test "x$MACOS_X" = "xyes" -a "x$with_x" = "xno" ; then
9774 case "$enable_gui_canon" in
Illia Bobyra96d5442023-08-30 16:30:15 +02009775 no) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no GUI support" >&5
9776printf "%s\n" "no GUI support" >&6; } ;;
9777 yes|"") { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes - automatic GUI support" >&5
9778printf "%s\n" "yes - automatic GUI support" >&6; }
Bram Moolenaar040f9752020-08-11 23:08:48 +02009779 gui_auto=yes ;;
Illia Bobyra96d5442023-08-30 16:30:15 +02009780 auto) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: auto - disable GUI support for Mac OS" >&5
9781printf "%s\n" "auto - disable GUI support for Mac OS" >&6; } ;;
9782 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Sorry, $enable_gui GUI is not supported" >&5
9783printf "%s\n" "Sorry, $enable_gui GUI is not supported" >&6; } ;;
Bram Moolenaar040f9752020-08-11 23:08:48 +02009784 esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00009785else
9786
Bram Moolenaar071d4272004-06-13 20:20:40 +00009787 case "$enable_gui_canon" in
Illia Bobyra96d5442023-08-30 16:30:15 +02009788 no|none) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no GUI support" >&5
9789printf "%s\n" "no GUI support" >&6; } ;;
9790 yes|""|auto) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes/auto - automatic GUI support" >&5
9791printf "%s\n" "yes/auto - automatic GUI support" >&6; }
Bram Moolenaaraf0839a2018-12-30 22:55:47 +01009792 gui_auto=yes
Bram Moolenaar071d4272004-06-13 20:20:40 +00009793 SKIP_GTK2=
Bram Moolenaarf272ae12021-01-31 19:52:50 +01009794 SKIP_GTK3=
Bram Moolenaar071d4272004-06-13 20:20:40 +00009795 SKIP_GNOME=
Bram Moolenaarf52fac22022-03-11 16:01:26 +00009796 SKIP_MOTIF=;;
Illia Bobyra96d5442023-08-30 16:30:15 +02009797 gtk2) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: GTK+ 2.x GUI support" >&5
9798printf "%s\n" "GTK+ 2.x GUI support" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009799 SKIP_GTK2=;;
Illia Bobyra96d5442023-08-30 16:30:15 +02009800 gnome2) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: GNOME 2.x GUI support" >&5
9801printf "%s\n" "GNOME 2.x GUI support" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009802 SKIP_GNOME=
Bram Moolenaar071d4272004-06-13 20:20:40 +00009803 SKIP_GTK2=;;
Illia Bobyra96d5442023-08-30 16:30:15 +02009804 gtk3) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: GTK+ 3.x GUI support" >&5
9805printf "%s\n" "GTK+ 3.x GUI support" >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +01009806 SKIP_GTK3=;;
Illia Bobyra96d5442023-08-30 16:30:15 +02009807 motif) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Motif GUI support" >&5
9808printf "%s\n" "Motif GUI support" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009809 SKIP_MOTIF=;;
Illia Bobyra96d5442023-08-30 16:30:15 +02009810 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Sorry, $enable_gui GUI is not supported" >&5
9811printf "%s\n" "Sorry, $enable_gui GUI is not supported" >&6; } ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00009812 esac
9813
9814fi
9815
Bram Moolenaar071d4272004-06-13 20:20:40 +00009816if test "x$SKIP_GTK2" != "xYES" -a "$enable_gui_canon" != "gtk2" \
9817 -a "$enable_gui_canon" != "gnome2"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009818 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether or not to look for GTK+ 2" >&5
9819printf %s "checking whether or not to look for GTK+ 2... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00009820 # Check whether --enable-gtk2-check was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02009821if test ${enable_gtk2_check+y}
9822then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00009823 enableval=$enable_gtk2_check;
Illia Bobyra96d5442023-08-30 16:30:15 +02009824else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00009825 enable_gtk2_check="yes"
Bram Moolenaar446cb832008-06-24 21:56:24 +00009826fi
9827
Illia Bobyra96d5442023-08-30 16:30:15 +02009828 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_gtk2_check" >&5
9829printf "%s\n" "$enable_gtk2_check" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009830 if test "x$enable_gtk2_check" = "xno"; then
9831 SKIP_GTK2=YES
Bram Moolenaar182c5be2010-06-25 05:37:59 +02009832 SKIP_GNOME=YES
Bram Moolenaar071d4272004-06-13 20:20:40 +00009833 fi
9834fi
9835
Bram Moolenaar182c5be2010-06-25 05:37:59 +02009836if test "x$SKIP_GNOME" != "xYES" -a "$enable_gui_canon" != "gnome2"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009837 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether or not to look for GNOME" >&5
9838printf %s "checking whether or not to look for GNOME... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00009839 # Check whether --enable-gnome-check was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02009840if test ${enable_gnome_check+y}
9841then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00009842 enableval=$enable_gnome_check;
Illia Bobyra96d5442023-08-30 16:30:15 +02009843else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00009844 enable_gnome_check="no"
Bram Moolenaar446cb832008-06-24 21:56:24 +00009845fi
9846
Illia Bobyra96d5442023-08-30 16:30:15 +02009847 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_gnome_check" >&5
9848printf "%s\n" "$enable_gnome_check" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009849 if test "x$enable_gnome_check" = "xno"; then
9850 SKIP_GNOME=YES
9851 fi
9852fi
9853
Bram Moolenaar98921892016-02-23 17:14:37 +01009854if test "x$SKIP_GTK3" != "xYES" -a "$enable_gui_canon" != "gtk3"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009855 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether or not to look for GTK+ 3" >&5
9856printf %s "checking whether or not to look for GTK+ 3... " >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +01009857 # Check whether --enable-gtk3-check was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02009858if test ${enable_gtk3_check+y}
9859then :
Bram Moolenaar98921892016-02-23 17:14:37 +01009860 enableval=$enable_gtk3_check;
Illia Bobyra96d5442023-08-30 16:30:15 +02009861else $as_nop
Bram Moolenaar98921892016-02-23 17:14:37 +01009862 enable_gtk3_check="yes"
9863fi
9864
Illia Bobyra96d5442023-08-30 16:30:15 +02009865 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_gtk3_check" >&5
9866printf "%s\n" "$enable_gtk3_check" >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +01009867 if test "x$enable_gtk3_check" = "xno"; then
9868 SKIP_GTK3=YES
9869 fi
9870fi
9871
Bram Moolenaar071d4272004-06-13 20:20:40 +00009872if test "x$SKIP_MOTIF" != "xYES" -a "$enable_gui_canon" != "motif"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009873 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether or not to look for Motif" >&5
9874printf %s "checking whether or not to look for Motif... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00009875 # Check whether --enable-motif-check was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02009876if test ${enable_motif_check+y}
9877then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00009878 enableval=$enable_motif_check;
Illia Bobyra96d5442023-08-30 16:30:15 +02009879else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00009880 enable_motif_check="yes"
Bram Moolenaar446cb832008-06-24 21:56:24 +00009881fi
9882
Illia Bobyra96d5442023-08-30 16:30:15 +02009883 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_motif_check" >&5
9884printf "%s\n" "$enable_motif_check" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009885 if test "x$enable_motif_check" = "xno"; then
9886 SKIP_MOTIF=YES
9887 fi
9888fi
9889
Bram Moolenaar071d4272004-06-13 20:20:40 +00009890
9891
9892
9893
9894
9895
Bram Moolenaar427f5b62019-06-09 13:43:51 +02009896if test "X$PKG_CONFIG" = "X"; then
9897 if test -n "$ac_tool_prefix"; then
Bram Moolenaard6d30422018-01-28 22:48:55 +01009898 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9899set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02009900{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9901printf %s "checking for $ac_word... " >&6; }
9902if test ${ac_cv_path_PKG_CONFIG+y}
9903then :
9904 printf %s "(cached) " >&6
9905else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009906 case $PKG_CONFIG in
9907 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00009908 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9909 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00009910 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009911 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9912for as_dir in $PATH
9913do
9914 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02009915 case $as_dir in #(((
9916 '') as_dir=./ ;;
9917 */) ;;
9918 *) as_dir=$as_dir/ ;;
9919 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009920 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02009921 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9922 ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
9923 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009924 break 2
9925 fi
9926done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009927 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00009928IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009929
Bram Moolenaar071d4272004-06-13 20:20:40 +00009930 ;;
9931esac
9932fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009933PKG_CONFIG=$ac_cv_path_PKG_CONFIG
Bram Moolenaar071d4272004-06-13 20:20:40 +00009934if test -n "$PKG_CONFIG"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009935 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9936printf "%s\n" "$PKG_CONFIG" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009937else
Illia Bobyra96d5442023-08-30 16:30:15 +02009938 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9939printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009940fi
9941
Bram Moolenaar446cb832008-06-24 21:56:24 +00009942
Bram Moolenaard6d30422018-01-28 22:48:55 +01009943fi
9944if test -z "$ac_cv_path_PKG_CONFIG"; then
9945 ac_pt_PKG_CONFIG=$PKG_CONFIG
9946 # Extract the first word of "pkg-config", so it can be a program name with args.
9947set dummy pkg-config; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02009948{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9949printf %s "checking for $ac_word... " >&6; }
9950if test ${ac_cv_path_ac_pt_PKG_CONFIG+y}
9951then :
9952 printf %s "(cached) " >&6
9953else $as_nop
Bram Moolenaard6d30422018-01-28 22:48:55 +01009954 case $ac_pt_PKG_CONFIG in
9955 [\\/]* | ?:[\\/]*)
9956 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9957 ;;
9958 *)
9959 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9960for as_dir in $PATH
9961do
9962 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02009963 case $as_dir in #(((
9964 '') as_dir=./ ;;
9965 */) ;;
9966 *) as_dir=$as_dir/ ;;
9967 esac
Bram Moolenaard6d30422018-01-28 22:48:55 +01009968 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02009969 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9970 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
9971 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaard6d30422018-01-28 22:48:55 +01009972 break 2
9973 fi
9974done
9975 done
9976IFS=$as_save_IFS
9977
9978 ;;
9979esac
9980fi
9981ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9982if test -n "$ac_pt_PKG_CONFIG"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009983 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9984printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; }
Bram Moolenaard6d30422018-01-28 22:48:55 +01009985else
Illia Bobyra96d5442023-08-30 16:30:15 +02009986 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9987printf "%s\n" "no" >&6; }
Bram Moolenaard6d30422018-01-28 22:48:55 +01009988fi
9989
9990 if test "x$ac_pt_PKG_CONFIG" = x; then
9991 PKG_CONFIG="no"
9992 else
9993 case $cross_compiling:$ac_tool_warned in
9994yes:)
Illia Bobyra96d5442023-08-30 16:30:15 +02009995{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9996printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Bram Moolenaard6d30422018-01-28 22:48:55 +01009997ac_tool_warned=yes ;;
9998esac
9999 PKG_CONFIG=$ac_pt_PKG_CONFIG
10000 fi
10001else
10002 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10003fi
10004
Bram Moolenaar427f5b62019-06-09 13:43:51 +020010005fi
10006
10007
10008if test -z "$SKIP_GTK2"; then
10009
Illia Bobyra96d5442023-08-30 16:30:15 +020010010 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-gtktest argument" >&5
10011printf %s "checking --disable-gtktest argument... " >&6; }
Bram Moolenaar427f5b62019-06-09 13:43:51 +020010012 # Check whether --enable-gtktest was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010013if test ${enable_gtktest+y}
10014then :
Bram Moolenaar427f5b62019-06-09 13:43:51 +020010015 enableval=$enable_gtktest;
Illia Bobyra96d5442023-08-30 16:30:15 +020010016else $as_nop
Bram Moolenaar427f5b62019-06-09 13:43:51 +020010017 enable_gtktest=yes
10018fi
10019
10020 if test "x$enable_gtktest" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010021 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gtk test enabled" >&5
10022printf "%s\n" "gtk test enabled" >&6; }
Bram Moolenaar427f5b62019-06-09 13:43:51 +020010023 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010024 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gtk test disabled" >&5
10025printf "%s\n" "gtk test disabled" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010026 fi
10027
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010028 if test "x$PKG_CONFIG" != "xno"; then
Bram Moolenaarf272ae12021-01-31 19:52:50 +010010029 save_skip_gtk3=$SKIP_GTK3
10030 SKIP_GTK3=YES
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010031
Bram Moolenaar071d4272004-06-13 20:20:40 +000010032 if test "X$GTK_CONFIG" != "Xno" -o "X$PKG_CONFIG" != "Xno"; then
10033 {
Bram Moolenaar071d4272004-06-13 20:20:40 +000010034 no_gtk=""
10035 if (test "X$SKIP_GTK2" != "XYES" -a "X$PKG_CONFIG" != "Xno") \
10036 && $PKG_CONFIG --exists gtk+-2.0; then
10037 {
Bram Moolenaar98921892016-02-23 17:14:37 +010010038 min_gtk_version=2.2.0
Illia Bobyra96d5442023-08-30 16:30:15 +020010039 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GTK - version >= $min_gtk_version" >&5
10040printf %s "checking for GTK - version >= $min_gtk_version... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010041 GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-2.0`
Bram Moolenaar7b0294c2004-10-11 10:16:09 +000010042 GTK_LIBDIR=`$PKG_CONFIG --libs-only-L gtk+-2.0`
Bram Moolenaar071d4272004-06-13 20:20:40 +000010043 GTK_LIBS=`$PKG_CONFIG --libs gtk+-2.0`
10044 gtk_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
10045 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
10046 gtk_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
10047 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
10048 gtk_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
10049 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
10050 }
Bram Moolenaar98921892016-02-23 17:14:37 +010010051 elif (test "X$SKIP_GTK3" != "XYES" -a "X$PKG_CONFIG" != "Xno") \
10052 && $PKG_CONFIG --exists gtk+-3.0; then
10053 {
10054 min_gtk_version=2.2.0
Illia Bobyra96d5442023-08-30 16:30:15 +020010055 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GTK - version >= $min_gtk_version" >&5
10056printf %s "checking for GTK - version >= $min_gtk_version... " >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010057
10058 GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-3.0`
10059 GTK_LIBDIR=`$PKG_CONFIG --libs-only-L gtk+-3.0`
10060 GTK_LIBS=`$PKG_CONFIG --libs gtk+-3.0`
10061 gtk_major_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
10062 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
10063 gtk_minor_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
10064 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
10065 gtk_micro_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
10066 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
10067 }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010068 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010069 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GTK -dev package" >&5
10070printf %s "checking for GTK -dev package... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010071 no_gtk=yes
10072 fi
10073
10074 if test "x$enable_gtktest" = "xyes" -a "x$no_gtk" = "x"; then
10075 {
10076 ac_save_CFLAGS="$CFLAGS"
10077 ac_save_LIBS="$LIBS"
10078 CFLAGS="$CFLAGS $GTK_CFLAGS"
10079 LIBS="$LIBS $GTK_LIBS"
10080
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010081 rm -f conf.gtktest
Illia Bobyra96d5442023-08-30 16:30:15 +020010082 if test "$cross_compiling" = yes
10083then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000010084 echo $ac_n "cross compiling; assumed OK... $ac_c"
Illia Bobyra96d5442023-08-30 16:30:15 +020010085else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010087/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000010088
10089#include <gtk/gtk.h>
10090#include <stdio.h>
Bram Moolenaar446cb832008-06-24 21:56:24 +000010091#if STDC_HEADERS
10092# include <stdlib.h>
10093# include <stddef.h>
10094#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000010095
10096int
10097main ()
10098{
10099int major, minor, micro;
10100char *tmp_version;
10101
10102system ("touch conf.gtktest");
10103
10104/* HP/UX 9 (%@#!) writes to sscanf strings */
10105tmp_version = g_strdup("$min_gtk_version");
10106if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
10107 printf("%s, bad version string\n", "$min_gtk_version");
10108 exit(1);
10109 }
10110
10111if ((gtk_major_version > major) ||
10112 ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
10113 ((gtk_major_version == major) && (gtk_minor_version == minor) &&
10114 (gtk_micro_version >= micro)))
10115{
10116 return 0;
10117}
10118return 1;
10119}
10120
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010121_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020010122if ac_fn_c_try_run "$LINENO"
10123then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010124
Illia Bobyra96d5442023-08-30 16:30:15 +020010125else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010126 no_gtk=yes
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010127fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010128rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10129 conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010130fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000010131
Bram Moolenaar071d4272004-06-13 20:20:40 +000010132 CFLAGS="$ac_save_CFLAGS"
10133 LIBS="$ac_save_LIBS"
10134 }
10135 fi
10136 if test "x$no_gtk" = x ; then
10137 if test "x$enable_gtktest" = "xyes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010138 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&5
10139printf "%s\n" "yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010140 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010141 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&5
10142printf "%s\n" "found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010143 fi
Bram Moolenaar7b0294c2004-10-11 10:16:09 +000010144 GUI_LIB_LOC="$GTK_LIBDIR"
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010145 GTK_LIBNAME="$GTK_LIBS"
10146 GUI_INC_LOC="$GTK_CFLAGS"
Bram Moolenaar071d4272004-06-13 20:20:40 +000010147 else
10148 {
Illia Bobyra96d5442023-08-30 16:30:15 +020010149 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10150printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010151 GTK_CFLAGS=""
10152 GTK_LIBS=""
10153 :
Bram Moolenaaraf0839a2018-12-30 22:55:47 +010010154 if test "$fail_if_missing" = "yes" -a "X$gui_auto" != "Xyes"; then
10155 as_fn_error $? "could not configure GTK" "$LINENO" 5
10156 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000010157 }
10158 fi
10159 }
10160 else
10161 GTK_CFLAGS=""
10162 GTK_LIBS=""
10163 :
10164 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010165
10166
Bram Moolenaar071d4272004-06-13 20:20:40 +000010167 rm -f conf.gtktest
10168
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010169 if test "x$GTK_CFLAGS" != "x"; then
Bram Moolenaar98921892016-02-23 17:14:37 +010010170 SKIP_GTK3=YES
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010171 SKIP_MOTIF=YES
10172 GUITYPE=GTK
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010173
Bram Moolenaarf272ae12021-01-31 19:52:50 +010010174 else
10175 SKIP_GTK3=$save_skip_gtk3
Bram Moolenaar071d4272004-06-13 20:20:40 +000010176 fi
10177 fi
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010178 if test "x$GUITYPE" = "xGTK"; then
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010179 if test -z "$SKIP_GNOME"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000010180 {
Bram Moolenaar071d4272004-06-13 20:20:40 +000010181
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010182
10183
10184
10185
10186
Bram Moolenaar446cb832008-06-24 21:56:24 +000010187# Check whether --with-gnome-includes was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010188if test ${with_gnome_includes+y}
10189then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000010190 withval=$with_gnome_includes; CFLAGS="$CFLAGS -I$withval"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010191
Bram Moolenaar446cb832008-06-24 21:56:24 +000010192fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000010193
10194
Bram Moolenaar446cb832008-06-24 21:56:24 +000010195
10196# Check whether --with-gnome-libs was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010197if test ${with_gnome_libs+y}
10198then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000010199 withval=$with_gnome_libs; LDFLAGS="$LDFLAGS -L$withval" gnome_prefix=$withval
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010200
Bram Moolenaar446cb832008-06-24 21:56:24 +000010201fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000010202
10203
Bram Moolenaar446cb832008-06-24 21:56:24 +000010204
10205# Check whether --with-gnome was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010206if test ${with_gnome+y}
10207then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000010208 withval=$with_gnome; if test x$withval = xyes; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000010209 want_gnome=yes
10210 have_gnome=yes
10211 else
10212 if test "x$withval" = xno; then
10213 want_gnome=no
10214 else
10215 want_gnome=yes
10216 LDFLAGS="$LDFLAGS -L$withval/lib"
10217 CFLAGS="$CFLAGS -I$withval/include"
10218 gnome_prefix=$withval/lib
10219 fi
10220 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010221else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000010222 want_gnome=yes
Bram Moolenaar446cb832008-06-24 21:56:24 +000010223fi
10224
Bram Moolenaar071d4272004-06-13 20:20:40 +000010225
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010226 if test "x$want_gnome" = xyes; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000010227 {
Illia Bobyra96d5442023-08-30 16:30:15 +020010228 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libgnomeui-2.0" >&5
10229printf %s "checking for libgnomeui-2.0... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010230 if $PKG_CONFIG --exists libgnomeui-2.0; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010231 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10232printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010233 GNOME_LIBS=`$PKG_CONFIG --libs-only-l libgnomeui-2.0`
10234 GNOME_LIBDIR=`$PKG_CONFIG --libs-only-L libgnomeui-2.0`
10235 GNOME_INCLUDEDIR=`$PKG_CONFIG --cflags libgnomeui-2.0`
Bram Moolenaar97b2ad32006-03-18 21:40:56 +000010236
Illia Bobyra96d5442023-08-30 16:30:15 +020010237 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FreeBSD" >&5
10238printf %s "checking for FreeBSD... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +000010239 if test "$vim_cv_uname_output" = FreeBSD; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010240 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10241printf "%s\n" "yes" >&6; }
Bram Moolenaarc9b4b052006-04-30 18:54:39 +000010242 GNOME_INCLUDEDIR="$GNOME_INCLUDEDIR -D_THREAD_SAFE"
Bram Moolenaar97b2ad32006-03-18 21:40:56 +000010243 GNOME_LIBS="$GNOME_LIBS -pthread"
10244 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010245 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10246printf "%s\n" "no" >&6; }
Bram Moolenaar97b2ad32006-03-18 21:40:56 +000010247 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000010248 have_gnome=yes
10249 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010250 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10251printf "%s\n" "not found" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010252 if test "x" = xfail; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010010253 as_fn_error $? "Could not find libgnomeui-2.0 via pkg-config" "$LINENO" 5
Bram Moolenaar071d4272004-06-13 20:20:40 +000010254 fi
10255 fi
10256 }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010257 fi
10258
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010259 if test "x$have_gnome" = xyes ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010260 printf "%s\n" "#define FEAT_GUI_GNOME 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000010261
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010262 GUI_INC_LOC="$GUI_INC_LOC $GNOME_INCLUDEDIR"
10263 GTK_LIBNAME="$GTK_LIBNAME $GNOME_LIBDIR $GNOME_LIBS"
Bram Moolenaar071d4272004-06-13 20:20:40 +000010264 fi
10265 }
10266 fi
10267 fi
10268fi
10269
Bram Moolenaar98921892016-02-23 17:14:37 +010010270
10271if test -z "$SKIP_GTK3"; then
10272
Illia Bobyra96d5442023-08-30 16:30:15 +020010273 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-gtktest argument" >&5
10274printf %s "checking --disable-gtktest argument... " >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010275 # Check whether --enable-gtktest was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010276if test ${enable_gtktest+y}
10277then :
Bram Moolenaar98921892016-02-23 17:14:37 +010010278 enableval=$enable_gtktest;
Illia Bobyra96d5442023-08-30 16:30:15 +020010279else $as_nop
Bram Moolenaar98921892016-02-23 17:14:37 +010010280 enable_gtktest=yes
10281fi
10282
10283 if test "x$enable_gtktest" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010284 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gtk test enabled" >&5
10285printf "%s\n" "gtk test enabled" >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010286 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010287 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gtk test disabled" >&5
10288printf "%s\n" "gtk test disabled" >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010289 fi
10290
Bram Moolenaar98921892016-02-23 17:14:37 +010010291 if test "x$PKG_CONFIG" != "xno"; then
Bram Moolenaarf272ae12021-01-31 19:52:50 +010010292 save_skip_gtk2=$SKIP_GTK2
10293 SKIP_GTK2=YES
Bram Moolenaar98921892016-02-23 17:14:37 +010010294
10295 if test "X$GTK_CONFIG" != "Xno" -o "X$PKG_CONFIG" != "Xno"; then
10296 {
10297 no_gtk=""
10298 if (test "X$SKIP_GTK2" != "XYES" -a "X$PKG_CONFIG" != "Xno") \
10299 && $PKG_CONFIG --exists gtk+-2.0; then
10300 {
10301 min_gtk_version=3.0.0
Illia Bobyra96d5442023-08-30 16:30:15 +020010302 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GTK - version >= $min_gtk_version" >&5
10303printf %s "checking for GTK - version >= $min_gtk_version... " >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010304 GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-2.0`
10305 GTK_LIBDIR=`$PKG_CONFIG --libs-only-L gtk+-2.0`
10306 GTK_LIBS=`$PKG_CONFIG --libs gtk+-2.0`
10307 gtk_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
10308 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
10309 gtk_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
10310 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
10311 gtk_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
10312 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
10313 }
10314 elif (test "X$SKIP_GTK3" != "XYES" -a "X$PKG_CONFIG" != "Xno") \
10315 && $PKG_CONFIG --exists gtk+-3.0; then
10316 {
10317 min_gtk_version=3.0.0
Illia Bobyra96d5442023-08-30 16:30:15 +020010318 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GTK - version >= $min_gtk_version" >&5
10319printf %s "checking for GTK - version >= $min_gtk_version... " >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010320
10321 GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-3.0`
10322 GTK_LIBDIR=`$PKG_CONFIG --libs-only-L gtk+-3.0`
10323 GTK_LIBS=`$PKG_CONFIG --libs gtk+-3.0`
10324 gtk_major_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
10325 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
10326 gtk_minor_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
10327 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
10328 gtk_micro_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
10329 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
10330 }
10331 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010332 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GTK -dev package" >&5
10333printf %s "checking for GTK -dev package... " >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010334 no_gtk=yes
10335 fi
10336
10337 if test "x$enable_gtktest" = "xyes" -a "x$no_gtk" = "x"; then
10338 {
10339 ac_save_CFLAGS="$CFLAGS"
10340 ac_save_LIBS="$LIBS"
10341 CFLAGS="$CFLAGS $GTK_CFLAGS"
10342 LIBS="$LIBS $GTK_LIBS"
10343
10344 rm -f conf.gtktest
Illia Bobyra96d5442023-08-30 16:30:15 +020010345 if test "$cross_compiling" = yes
10346then :
Bram Moolenaar98921892016-02-23 17:14:37 +010010347 echo $ac_n "cross compiling; assumed OK... $ac_c"
Illia Bobyra96d5442023-08-30 16:30:15 +020010348else $as_nop
Bram Moolenaar98921892016-02-23 17:14:37 +010010349 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10350/* end confdefs.h. */
10351
10352#include <gtk/gtk.h>
10353#include <stdio.h>
10354#if STDC_HEADERS
10355# include <stdlib.h>
10356# include <stddef.h>
10357#endif
10358
10359int
10360main ()
10361{
10362int major, minor, micro;
10363char *tmp_version;
10364
10365system ("touch conf.gtktest");
10366
10367/* HP/UX 9 (%@#!) writes to sscanf strings */
10368tmp_version = g_strdup("$min_gtk_version");
10369if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
10370 printf("%s, bad version string\n", "$min_gtk_version");
10371 exit(1);
10372 }
10373
10374if ((gtk_major_version > major) ||
10375 ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
10376 ((gtk_major_version == major) && (gtk_minor_version == minor) &&
10377 (gtk_micro_version >= micro)))
10378{
10379 return 0;
10380}
10381return 1;
10382}
10383
10384_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020010385if ac_fn_c_try_run "$LINENO"
10386then :
Bram Moolenaar98921892016-02-23 17:14:37 +010010387
Illia Bobyra96d5442023-08-30 16:30:15 +020010388else $as_nop
Bram Moolenaar98921892016-02-23 17:14:37 +010010389 no_gtk=yes
10390fi
10391rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10392 conftest.$ac_objext conftest.beam conftest.$ac_ext
10393fi
10394
10395 CFLAGS="$ac_save_CFLAGS"
10396 LIBS="$ac_save_LIBS"
10397 }
10398 fi
10399 if test "x$no_gtk" = x ; then
10400 if test "x$enable_gtktest" = "xyes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010401 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&5
10402printf "%s\n" "yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010403 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010404 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&5
10405printf "%s\n" "found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010406 fi
10407 GUI_LIB_LOC="$GTK_LIBDIR"
10408 GTK_LIBNAME="$GTK_LIBS"
10409 GUI_INC_LOC="$GTK_CFLAGS"
10410 else
10411 {
Illia Bobyra96d5442023-08-30 16:30:15 +020010412 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10413printf "%s\n" "no" >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010414 GTK_CFLAGS=""
10415 GTK_LIBS=""
10416 :
Bram Moolenaaraf0839a2018-12-30 22:55:47 +010010417 if test "$fail_if_missing" = "yes" -a "X$gui_auto" != "Xyes"; then
10418 as_fn_error $? "could not configure GTK" "$LINENO" 5
10419 fi
Bram Moolenaar98921892016-02-23 17:14:37 +010010420 }
10421 fi
10422 }
10423 else
10424 GTK_CFLAGS=""
10425 GTK_LIBS=""
10426 :
10427 fi
10428
10429
10430 rm -f conf.gtktest
10431
10432 if test "x$GTK_CFLAGS" != "x"; then
10433 SKIP_GTK2=YES
10434 SKIP_GNOME=YES
Bram Moolenaar98921892016-02-23 17:14:37 +010010435 SKIP_MOTIF=YES
10436 GUITYPE=GTK
10437
Illia Bobyra96d5442023-08-30 16:30:15 +020010438 printf "%s\n" "#define USE_GTK3 1" >>confdefs.h
Bram Moolenaar98921892016-02-23 17:14:37 +010010439
Bram Moolenaarf272ae12021-01-31 19:52:50 +010010440 else
10441 SKIP_GTK2=$save_skip_gtk2
Bram Moolenaar98921892016-02-23 17:14:37 +010010442 fi
10443 fi
10444fi
10445
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010446if test "x$GUITYPE" = "xGTK"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010447 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking version of Gdk-Pixbuf" >&5
10448printf %s "checking version of Gdk-Pixbuf... " >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010449 gdk_pixbuf_version=`$PKG_CONFIG --modversion gdk-pixbuf-2.0`
10450 if test "x$gdk_pixbuf_version" != x ; then
10451 gdk_pixbuf_version_minor=`echo $gdk_pixbuf_version | \
10452 sed -e 's/[0-9][0-9]*\.\([0-9][0-9]*\)\.[0-9][0-9]*/\1/'`
10453 if test "x$gdk_pixbuf_version_minor" != x -a \
Bram Moolenaar33c31d52016-02-22 21:07:06 +010010454 $gdk_pixbuf_version_minor -ge 31 ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010455 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: OK." >&5
10456printf "%s\n" "OK." >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010457 # Extract the first word of "glib-compile-resources", so it can be a program name with args.
10458set dummy glib-compile-resources; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +020010459{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10460printf %s "checking for $ac_word... " >&6; }
10461if test ${ac_cv_path_GLIB_COMPILE_RESOURCES+y}
10462then :
10463 printf %s "(cached) " >&6
10464else $as_nop
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010465 case $GLIB_COMPILE_RESOURCES in
10466 [\\/]* | ?:[\\/]*)
10467 ac_cv_path_GLIB_COMPILE_RESOURCES="$GLIB_COMPILE_RESOURCES" # Let the user override the test with a path.
10468 ;;
10469 *)
10470 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10471for as_dir in $PATH
10472do
10473 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +020010474 case $as_dir in #(((
10475 '') as_dir=./ ;;
10476 */) ;;
10477 *) as_dir=$as_dir/ ;;
10478 esac
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010479 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +020010480 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10481 ac_cv_path_GLIB_COMPILE_RESOURCES="$as_dir$ac_word$ac_exec_ext"
10482 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010483 break 2
10484 fi
10485done
10486 done
10487IFS=$as_save_IFS
10488
10489 test -z "$ac_cv_path_GLIB_COMPILE_RESOURCES" && ac_cv_path_GLIB_COMPILE_RESOURCES="no"
10490 ;;
10491esac
10492fi
10493GLIB_COMPILE_RESOURCES=$ac_cv_path_GLIB_COMPILE_RESOURCES
10494if test -n "$GLIB_COMPILE_RESOURCES"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010495 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GLIB_COMPILE_RESOURCES" >&5
10496printf "%s\n" "$GLIB_COMPILE_RESOURCES" >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010497else
Illia Bobyra96d5442023-08-30 16:30:15 +020010498 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10499printf "%s\n" "no" >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010500fi
10501
10502
Illia Bobyra96d5442023-08-30 16:30:15 +020010503 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking glib-compile-resources" >&5
10504printf %s "checking glib-compile-resources... " >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010505 if test "x$GLIB_COMPILE_RESOURCES" = xno ; then
Bram Moolenaar33c31d52016-02-22 21:07:06 +010010506 GLIB_COMPILE_RESOURCES=""
Illia Bobyra96d5442023-08-30 16:30:15 +020010507 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot be found in PATH." >&5
10508printf "%s\n" "cannot be found in PATH." >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010509 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010510 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: usable." >&5
10511printf "%s\n" "usable." >&6; }
10512 printf "%s\n" "#define USE_GRESOURCE 1" >>confdefs.h
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010513
Bram Moolenaar33c31d52016-02-22 21:07:06 +010010514 GRESOURCE_SRC="auto/gui_gtk_gresources.c"
10515 GRESOURCE_OBJ="objects/gui_gtk_gresources.o"
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010516 fi
10517 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010518 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable." >&5
10519printf "%s\n" "not usable." >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010520 fi
10521 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010522 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot obtain from pkg_config." >&5
10523printf "%s\n" "cannot obtain from pkg_config." >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010524 fi
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010525
Illia Bobyra96d5442023-08-30 16:30:15 +020010526 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-icon-cache-update argument" >&5
10527printf %s "checking --disable-icon-cache-update argument... " >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010528 # Check whether --enable-icon_cache_update was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010529if test ${enable_icon_cache_update+y}
10530then :
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010531 enableval=$enable_icon_cache_update;
Illia Bobyra96d5442023-08-30 16:30:15 +020010532else $as_nop
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010533 enable_icon_cache_update="yes"
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010534fi
10535
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010536 if test "$enable_icon_cache_update" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010537 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not set" >&5
10538printf "%s\n" "not set" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010539 # Extract the first word of "gtk-update-icon-cache", so it can be a program name with args.
10540set dummy gtk-update-icon-cache; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +020010541{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10542printf %s "checking for $ac_word... " >&6; }
10543if test ${ac_cv_path_GTK_UPDATE_ICON_CACHE+y}
10544then :
10545 printf %s "(cached) " >&6
10546else $as_nop
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010547 case $GTK_UPDATE_ICON_CACHE in
10548 [\\/]* | ?:[\\/]*)
10549 ac_cv_path_GTK_UPDATE_ICON_CACHE="$GTK_UPDATE_ICON_CACHE" # Let the user override the test with a path.
10550 ;;
10551 *)
10552 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10553for as_dir in $PATH
10554do
10555 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +020010556 case $as_dir in #(((
10557 '') as_dir=./ ;;
10558 */) ;;
10559 *) as_dir=$as_dir/ ;;
10560 esac
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010561 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +020010562 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10563 ac_cv_path_GTK_UPDATE_ICON_CACHE="$as_dir$ac_word$ac_exec_ext"
10564 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010565 break 2
10566 fi
10567done
10568 done
10569IFS=$as_save_IFS
10570
10571 test -z "$ac_cv_path_GTK_UPDATE_ICON_CACHE" && ac_cv_path_GTK_UPDATE_ICON_CACHE="no"
10572 ;;
10573esac
10574fi
10575GTK_UPDATE_ICON_CACHE=$ac_cv_path_GTK_UPDATE_ICON_CACHE
10576if test -n "$GTK_UPDATE_ICON_CACHE"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010577 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GTK_UPDATE_ICON_CACHE" >&5
10578printf "%s\n" "$GTK_UPDATE_ICON_CACHE" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010579else
Illia Bobyra96d5442023-08-30 16:30:15 +020010580 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10581printf "%s\n" "no" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010582fi
10583
10584
10585 if test "x$GTK_UPDATE_ICON_CACHE" = "xno" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010586 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found in PATH." >&5
10587printf "%s\n" "not found in PATH." >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010588 fi
10589 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010590 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: update disabled" >&5
10591printf "%s\n" "update disabled" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010592 fi
10593
Illia Bobyra96d5442023-08-30 16:30:15 +020010594 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-desktop-database-update argument" >&5
10595printf %s "checking --disable-desktop-database-update argument... " >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010596 # Check whether --enable-desktop_database_update was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010597if test ${enable_desktop_database_update+y}
10598then :
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010599 enableval=$enable_desktop_database_update;
Illia Bobyra96d5442023-08-30 16:30:15 +020010600else $as_nop
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010601 enable_desktop_database_update="yes"
10602fi
10603
10604 if test "$enable_desktop_database_update" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010605 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not set" >&5
10606printf "%s\n" "not set" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010607 # Extract the first word of "update-desktop-database", so it can be a program name with args.
10608set dummy update-desktop-database; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +020010609{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10610printf %s "checking for $ac_word... " >&6; }
10611if test ${ac_cv_path_UPDATE_DESKTOP_DATABASE+y}
10612then :
10613 printf %s "(cached) " >&6
10614else $as_nop
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010615 case $UPDATE_DESKTOP_DATABASE in
10616 [\\/]* | ?:[\\/]*)
10617 ac_cv_path_UPDATE_DESKTOP_DATABASE="$UPDATE_DESKTOP_DATABASE" # Let the user override the test with a path.
10618 ;;
10619 *)
10620 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10621for as_dir in $PATH
10622do
10623 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +020010624 case $as_dir in #(((
10625 '') as_dir=./ ;;
10626 */) ;;
10627 *) as_dir=$as_dir/ ;;
10628 esac
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010629 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +020010630 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10631 ac_cv_path_UPDATE_DESKTOP_DATABASE="$as_dir$ac_word$ac_exec_ext"
10632 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010633 break 2
10634 fi
10635done
10636 done
10637IFS=$as_save_IFS
10638
10639 test -z "$ac_cv_path_UPDATE_DESKTOP_DATABASE" && ac_cv_path_UPDATE_DESKTOP_DATABASE="no"
10640 ;;
10641esac
10642fi
10643UPDATE_DESKTOP_DATABASE=$ac_cv_path_UPDATE_DESKTOP_DATABASE
10644if test -n "$UPDATE_DESKTOP_DATABASE"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010645 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $UPDATE_DESKTOP_DATABASE" >&5
10646printf "%s\n" "$UPDATE_DESKTOP_DATABASE" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010647else
Illia Bobyra96d5442023-08-30 16:30:15 +020010648 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10649printf "%s\n" "no" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010650fi
10651
10652
10653 if test "x$UPDATE_DESKTOP_DATABASE" = "xno" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010654 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found in PATH." >&5
10655printf "%s\n" "not found in PATH." >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010656 fi
10657 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010658 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: update disabled" >&5
10659printf "%s\n" "update disabled" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010660 fi
10661fi
10662
10663
10664
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010665
10666
10667
10668
Bram Moolenaar071d4272004-06-13 20:20:40 +000010669if test -z "$SKIP_MOTIF"; then
10670 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"
10671 GUI_INC_LOC="`echo $GUI_INC_LOC|sed 's%-I%%g'`"
10672
Illia Bobyra96d5442023-08-30 16:30:15 +020010673 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for location of Motif GUI includes" >&5
10674printf %s "checking for location of Motif GUI includes... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010675 gui_includes="`echo $x_includes|sed 's%/^/^/*$%%'` `echo "$gui_XXX" | sed s/XXX/include/g` $GUI_INC_LOC"
10676 GUI_INC_LOC=
10677 for try in $gui_includes; do
10678 if test -f "$try/Xm/Xm.h"; then
10679 GUI_INC_LOC=$try
10680 fi
10681 done
10682 if test -n "$GUI_INC_LOC"; then
10683 if test "$GUI_INC_LOC" = /usr/include; then
10684 GUI_INC_LOC=
Illia Bobyra96d5442023-08-30 16:30:15 +020010685 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: in default path" >&5
10686printf "%s\n" "in default path" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010687 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010688 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GUI_INC_LOC" >&5
10689printf "%s\n" "$GUI_INC_LOC" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010690 fi
10691 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010692 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <not found>" >&5
10693printf "%s\n" "<not found>" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010694 SKIP_MOTIF=YES
10695 fi
10696fi
10697
10698
10699if test -z "$SKIP_MOTIF"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010700 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-motif-lib argument" >&5
10701printf %s "checking --with-motif-lib argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010702
Bram Moolenaar446cb832008-06-24 21:56:24 +000010703# Check whether --with-motif-lib was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010704if test ${with_motif_lib+y}
10705then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000010706 withval=$with_motif_lib; MOTIF_LIBNAME="${withval}"
10707fi
10708
Bram Moolenaar071d4272004-06-13 20:20:40 +000010709
10710 if test -n "$MOTIF_LIBNAME"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010711 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MOTIF_LIBNAME" >&5
10712printf "%s\n" "$MOTIF_LIBNAME" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010713 GUI_LIB_LOC=
10714 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010715 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10716printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010717
10718 GUI_LIB_LOC="`echo $GUI_LIB_LOC|sed 's%-L%%g'`"
10719
Illia Bobyra96d5442023-08-30 16:30:15 +020010720 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for location of Motif GUI libs" >&5
10721printf %s "checking for location of Motif GUI libs... " >&6; }
Bram Moolenaar01967f52023-04-12 16:24:03 +010010722 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 +000010723 GUI_LIB_LOC=
10724 for try in $gui_libs; do
Kelvin Leeb4716902022-04-04 17:20:01 +010010725 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 +000010726 if test -f "$libtry"; then
10727 GUI_LIB_LOC=$try
10728 fi
10729 done
10730 done
10731 if test -n "$GUI_LIB_LOC"; then
Bram Moolenaar01967f52023-04-12 16:24:03 +010010732 if test "$GUI_LIB_LOC" = /usr/lib \
10733 -o "$GUI_LIB_LOC" = /usr/lib64 \
Bram Moolenaar6324c3b2013-06-17 20:27:18 +020010734 -o "$GUI_LIB_LOC" = /usr/lib/i386-linux-gnu \
10735 -o "$GUI_LIB_LOC" = /usr/lib/x86_64-linux-gnu; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000010736 GUI_LIB_LOC=
Illia Bobyra96d5442023-08-30 16:30:15 +020010737 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: in default path" >&5
10738printf "%s\n" "in default path" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010739 else
10740 if test -n "$GUI_LIB_LOC"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010741 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GUI_LIB_LOC" >&5
10742printf "%s\n" "$GUI_LIB_LOC" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +000010743 if test "$vim_cv_uname_output" = SunOS &&
10744 echo $vim_cv_uname_r_output | grep '^5' >/dev/null; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000010745 GUI_LIB_LOC="$GUI_LIB_LOC -R $GUI_LIB_LOC"
10746 fi
10747 fi
10748 fi
10749 MOTIF_LIBNAME=-lXm
10750 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010751 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <not found>" >&5
10752printf "%s\n" "<not found>" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010753 SKIP_MOTIF=YES
10754 fi
10755 fi
10756fi
10757
10758if test -z "$SKIP_MOTIF"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000010759 GUITYPE=MOTIF
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010760
Bram Moolenaar071d4272004-06-13 20:20:40 +000010761fi
10762
Bram Moolenaare2adcf32022-03-12 11:57:25 +000010763if test -z "$SKIP_MOTIF"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000010764 if test -n "$GUI_INC_LOC"; then
10765 GUI_INC_LOC=-I"`echo $GUI_INC_LOC|sed 's%-I%%'`"
10766 fi
10767 if test -n "$GUI_LIB_LOC"; then
10768 GUI_LIB_LOC=-L"`echo $GUI_LIB_LOC|sed 's%-L%%'`"
10769 fi
10770
10771 ldflags_save=$LDFLAGS
10772 LDFLAGS="$X_LIBS $LDFLAGS"
Illia Bobyra96d5442023-08-30 16:30:15 +020010773 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XShapeQueryExtension in -lXext" >&5
10774printf %s "checking for XShapeQueryExtension in -lXext... " >&6; }
10775if test ${ac_cv_lib_Xext_XShapeQueryExtension+y}
10776then :
10777 printf %s "(cached) " >&6
10778else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010779 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000010780LIBS="-lXext -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010781cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010782/* end confdefs.h. */
10783
Bram Moolenaar446cb832008-06-24 21:56:24 +000010784/* Override any GCC internal prototype to avoid an error.
10785 Use char because int might match the return type of a GCC
10786 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010787char XShapeQueryExtension ();
10788int
Illia Bobyra96d5442023-08-30 16:30:15 +020010789main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010790{
Bram Moolenaar446cb832008-06-24 21:56:24 +000010791return XShapeQueryExtension ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010792 ;
10793 return 0;
10794}
10795_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020010796if ac_fn_c_try_link "$LINENO"
10797then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010798 ac_cv_lib_Xext_XShapeQueryExtension=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020010799else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010800 ac_cv_lib_Xext_XShapeQueryExtension=no
Bram Moolenaar071d4272004-06-13 20:20:40 +000010801fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010802rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010803 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010804LIBS=$ac_check_lib_save_LIBS
10805fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010806{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
10807printf "%s\n" "$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
10808if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = xyes
10809then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000010810 GUI_X_LIBS="-lXext"
Bram Moolenaar071d4272004-06-13 20:20:40 +000010811fi
10812
Illia Bobyra96d5442023-08-30 16:30:15 +020010813 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wslen in -lw" >&5
10814printf %s "checking for wslen in -lw... " >&6; }
10815if test ${ac_cv_lib_w_wslen+y}
10816then :
10817 printf %s "(cached) " >&6
10818else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010819 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000010820LIBS="-lw $GUI_X_LIBS -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010821cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010822/* end confdefs.h. */
10823
Bram Moolenaar446cb832008-06-24 21:56:24 +000010824/* Override any GCC internal prototype to avoid an error.
10825 Use char because int might match the return type of a GCC
10826 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010827char wslen ();
10828int
Illia Bobyra96d5442023-08-30 16:30:15 +020010829main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010830{
Bram Moolenaar446cb832008-06-24 21:56:24 +000010831return wslen ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010832 ;
10833 return 0;
10834}
10835_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020010836if ac_fn_c_try_link "$LINENO"
10837then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010838 ac_cv_lib_w_wslen=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020010839else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010840 ac_cv_lib_w_wslen=no
Bram Moolenaar071d4272004-06-13 20:20:40 +000010841fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010842rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010843 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010844LIBS=$ac_check_lib_save_LIBS
10845fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010846{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wslen" >&5
10847printf "%s\n" "$ac_cv_lib_w_wslen" >&6; }
10848if test "x$ac_cv_lib_w_wslen" = xyes
10849then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000010850 X_EXTRA_LIBS="$X_EXTRA_LIBS -lw"
Bram Moolenaar071d4272004-06-13 20:20:40 +000010851fi
10852
Illia Bobyra96d5442023-08-30 16:30:15 +020010853 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlsym in -ldl" >&5
10854printf %s "checking for dlsym in -ldl... " >&6; }
10855if test ${ac_cv_lib_dl_dlsym+y}
10856then :
10857 printf %s "(cached) " >&6
10858else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010859 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000010860LIBS="-ldl $GUI_X_LIBS -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010861cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010862/* end confdefs.h. */
10863
Bram Moolenaar446cb832008-06-24 21:56:24 +000010864/* Override any GCC internal prototype to avoid an error.
10865 Use char because int might match the return type of a GCC
10866 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010867char dlsym ();
10868int
Illia Bobyra96d5442023-08-30 16:30:15 +020010869main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010870{
Bram Moolenaar446cb832008-06-24 21:56:24 +000010871return dlsym ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010872 ;
10873 return 0;
10874}
10875_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020010876if ac_fn_c_try_link "$LINENO"
10877then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010878 ac_cv_lib_dl_dlsym=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020010879else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010880 ac_cv_lib_dl_dlsym=no
Bram Moolenaar071d4272004-06-13 20:20:40 +000010881fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010882rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010883 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010884LIBS=$ac_check_lib_save_LIBS
10885fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010886{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlsym" >&5
10887printf "%s\n" "$ac_cv_lib_dl_dlsym" >&6; }
10888if test "x$ac_cv_lib_dl_dlsym" = xyes
10889then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000010890 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldl"
Bram Moolenaar071d4272004-06-13 20:20:40 +000010891fi
10892
Illia Bobyra96d5442023-08-30 16:30:15 +020010893 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XmuCreateStippledPixmap in -lXmu" >&5
10894printf %s "checking for XmuCreateStippledPixmap in -lXmu... " >&6; }
10895if test ${ac_cv_lib_Xmu_XmuCreateStippledPixmap+y}
10896then :
10897 printf %s "(cached) " >&6
10898else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010899 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000010900LIBS="-lXmu $GUI_X_LIBS -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010901cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010902/* end confdefs.h. */
10903
Bram Moolenaar446cb832008-06-24 21:56:24 +000010904/* Override any GCC internal prototype to avoid an error.
10905 Use char because int might match the return type of a GCC
10906 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010907char XmuCreateStippledPixmap ();
10908int
Illia Bobyra96d5442023-08-30 16:30:15 +020010909main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010910{
Bram Moolenaar446cb832008-06-24 21:56:24 +000010911return XmuCreateStippledPixmap ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010912 ;
10913 return 0;
10914}
10915_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020010916if ac_fn_c_try_link "$LINENO"
10917then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010918 ac_cv_lib_Xmu_XmuCreateStippledPixmap=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020010919else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010920 ac_cv_lib_Xmu_XmuCreateStippledPixmap=no
Bram Moolenaar071d4272004-06-13 20:20:40 +000010921fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010922rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010923 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010924LIBS=$ac_check_lib_save_LIBS
10925fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010926{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuCreateStippledPixmap" >&5
10927printf "%s\n" "$ac_cv_lib_Xmu_XmuCreateStippledPixmap" >&6; }
10928if test "x$ac_cv_lib_Xmu_XmuCreateStippledPixmap" = xyes
10929then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000010930 GUI_X_LIBS="-lXmu $GUI_X_LIBS"
Bram Moolenaar071d4272004-06-13 20:20:40 +000010931fi
10932
10933 if test -z "$SKIP_MOTIF"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010934 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XpEndJob in -lXp" >&5
10935printf %s "checking for XpEndJob in -lXp... " >&6; }
10936if test ${ac_cv_lib_Xp_XpEndJob+y}
10937then :
10938 printf %s "(cached) " >&6
10939else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010940 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000010941LIBS="-lXp $GUI_X_LIBS -lXm -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010942cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010943/* end confdefs.h. */
10944
Bram Moolenaar446cb832008-06-24 21:56:24 +000010945/* Override any GCC internal prototype to avoid an error.
10946 Use char because int might match the return type of a GCC
10947 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010948char XpEndJob ();
10949int
Illia Bobyra96d5442023-08-30 16:30:15 +020010950main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010951{
Bram Moolenaar446cb832008-06-24 21:56:24 +000010952return XpEndJob ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010953 ;
10954 return 0;
10955}
10956_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020010957if ac_fn_c_try_link "$LINENO"
10958then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010959 ac_cv_lib_Xp_XpEndJob=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020010960else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010961 ac_cv_lib_Xp_XpEndJob=no
Bram Moolenaar071d4272004-06-13 20:20:40 +000010962fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010963rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010964 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010965LIBS=$ac_check_lib_save_LIBS
10966fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010967{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpEndJob" >&5
10968printf "%s\n" "$ac_cv_lib_Xp_XpEndJob" >&6; }
10969if test "x$ac_cv_lib_Xp_XpEndJob" = xyes
10970then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000010971 GUI_X_LIBS="-lXp $GUI_X_LIBS"
Bram Moolenaar071d4272004-06-13 20:20:40 +000010972fi
10973
10974 fi
10975 LDFLAGS=$ldflags_save
10976
Illia Bobyra96d5442023-08-30 16:30:15 +020010977 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for extra X11 defines" >&5
10978printf %s "checking for extra X11 defines... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010979 NARROW_PROTO=
10980 rm -fr conftestdir
10981 if mkdir conftestdir; then
10982 cd conftestdir
10983 cat > Imakefile <<'EOF'
10984acfindx:
10985 @echo 'NARROW_PROTO="${PROTO_DEFINES}"'
10986EOF
10987 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
10988 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
10989 fi
10990 cd ..
10991 rm -fr conftestdir
10992 fi
10993 if test -z "$NARROW_PROTO"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010994 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10995printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010996 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010997 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NARROW_PROTO" >&5
10998printf "%s\n" "$NARROW_PROTO" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010999 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011000
Bram Moolenaar071d4272004-06-13 20:20:40 +000011001fi
11002
11003if test "$enable_xsmp" = "yes"; then
11004 cppflags_save=$CPPFLAGS
11005 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
Illia Bobyra96d5442023-08-30 16:30:15 +020011006 ac_fn_c_check_header_compile "$LINENO" "X11/SM/SMlib.h" "ac_cv_header_X11_SM_SMlib_h" "$ac_includes_default"
11007if test "x$ac_cv_header_X11_SM_SMlib_h" = xyes
11008then :
11009 printf "%s\n" "#define HAVE_X11_SM_SMLIB_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011010
11011fi
11012
Bram Moolenaar071d4272004-06-13 20:20:40 +000011013 CPPFLAGS=$cppflags_save
11014fi
11015
11016
Bram Moolenaarf52fac22022-03-11 16:01:26 +000011017if test -z "$SKIP_MOTIF" -o -z "$SKIP_GTK2" -o -z "$SKIP_GTK3"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000011018 cppflags_save=$CPPFLAGS
11019 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
Illia Bobyra96d5442023-08-30 16:30:15 +020011020 ac_fn_c_check_header_compile "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default"
11021if test "x$ac_cv_header_X11_xpm_h" = xyes
11022then :
11023 printf "%s\n" "#define HAVE_X11_XPM_H 1" >>confdefs.h
11024
11025fi
11026ac_fn_c_check_header_compile "$LINENO" "X11/Sunkeysym.h" "ac_cv_header_X11_Sunkeysym_h" "$ac_includes_default"
11027if test "x$ac_cv_header_X11_Sunkeysym_h" = xyes
11028then :
11029 printf "%s\n" "#define HAVE_X11_SUNKEYSYM_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011030
11031fi
11032
Bram Moolenaar071d4272004-06-13 20:20:40 +000011033
11034 if test ! "$enable_xim" = "no"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011035 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XIMText in X11/Xlib.h" >&5
11036printf %s "checking for XIMText in X11/Xlib.h... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011038/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000011039#include <X11/Xlib.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011040_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000011041if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Illia Bobyra96d5442023-08-30 16:30:15 +020011042 $EGREP "XIMText" >/dev/null 2>&1
11043then :
11044 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11045printf "%s\n" "yes" >&6; }
11046else $as_nop
11047 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no; xim has been disabled" >&5
11048printf "%s\n" "no; xim has been disabled" >&6; }; enable_xim="no"
Bram Moolenaar071d4272004-06-13 20:20:40 +000011049fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011050rm -rf conftest*
Bram Moolenaar071d4272004-06-13 20:20:40 +000011051
11052 fi
11053 CPPFLAGS=$cppflags_save
11054
Bram Moolenaar54612582019-11-21 17:13:31 +010011055 if test "$enable_xim" = "auto" -a "x$GUITYPE" != "xNONE" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011056 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: X GUI selected; xim has been enabled" >&5
11057printf "%s\n" "X GUI selected; xim has been enabled" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011058 enable_xim="yes"
11059 fi
11060fi
11061
Bram Moolenaarf52fac22022-03-11 16:01:26 +000011062if test -z "$SKIP_MOTIF"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000011063 cppflags_save=$CPPFLAGS
11064 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
Illia Bobyra96d5442023-08-30 16:30:15 +020011065 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for X11/Xmu/Editres.h" >&5
11066printf %s "checking for X11/Xmu/Editres.h... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011068/* end confdefs.h. */
Bram Moolenaar2ce06f62005-01-31 19:19:04 +000011069
11070#include <X11/Intrinsic.h>
11071#include <X11/Xmu/Editres.h>
11072int
Illia Bobyra96d5442023-08-30 16:30:15 +020011073main (void)
Bram Moolenaar2ce06f62005-01-31 19:19:04 +000011074{
11075int i; i = 0;
11076 ;
11077 return 0;
11078}
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011079_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011080if ac_fn_c_try_compile "$LINENO"
11081then :
11082 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11083printf "%s\n" "yes" >&6; }
11084 printf "%s\n" "#define HAVE_X11_XMU_EDITRES_H 1" >>confdefs.h
Bram Moolenaar2ce06f62005-01-31 19:19:04 +000011085
Illia Bobyra96d5442023-08-30 16:30:15 +020011086else $as_nop
11087 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11088printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011089fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011090rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000011091 CPPFLAGS=$cppflags_save
11092fi
11093
11094if test -z "$SKIP_MOTIF"; then
11095 cppflags_save=$CPPFLAGS
11096 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
Bram Moolenaar77c19352012-06-13 19:19:41 +020011097 if test "$zOSUnix" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011098 ac_fn_c_check_header_compile "$LINENO" "Xm/Xm.h" "ac_cv_header_Xm_Xm_h" "$ac_includes_default"
11099if test "x$ac_cv_header_Xm_Xm_h" = xyes
11100then :
11101 printf "%s\n" "#define HAVE_XM_XM_H 1" >>confdefs.h
Bram Moolenaar1004b3d2022-06-05 19:51:55 +010011102
11103fi
11104
Bram Moolenaar77c19352012-06-13 19:19:41 +020011105 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011106 ac_fn_c_check_header_compile "$LINENO" "Xm/Xm.h" "ac_cv_header_Xm_Xm_h" "$ac_includes_default"
11107if test "x$ac_cv_header_Xm_Xm_h" = xyes
11108then :
11109 printf "%s\n" "#define HAVE_XM_XM_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011110
11111fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011112ac_fn_c_check_header_compile "$LINENO" "Xm/XpmP.h" "ac_cv_header_Xm_XpmP_h" "$ac_includes_default"
11113if test "x$ac_cv_header_Xm_XpmP_h" = xyes
11114then :
11115 printf "%s\n" "#define HAVE_XM_XPMP_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011116
Illia Bobyra96d5442023-08-30 16:30:15 +020011117fi
11118ac_fn_c_check_header_compile "$LINENO" "Xm/JoinSideT.h" "ac_cv_header_Xm_JoinSideT_h" "$ac_includes_default"
11119if test "x$ac_cv_header_Xm_JoinSideT_h" = xyes
11120then :
11121 printf "%s\n" "#define HAVE_XM_JOINSIDET_H 1" >>confdefs.h
11122
11123fi
11124ac_fn_c_check_header_compile "$LINENO" "Xm/TraitP.h" "ac_cv_header_Xm_TraitP_h" "$ac_includes_default"
11125if test "x$ac_cv_header_Xm_TraitP_h" = xyes
11126then :
11127 printf "%s\n" "#define HAVE_XM_TRAITP_H 1" >>confdefs.h
11128
11129fi
11130ac_fn_c_check_header_compile "$LINENO" "Xm/Manager.h" "ac_cv_header_Xm_Manager_h" "$ac_includes_default"
11131if test "x$ac_cv_header_Xm_Manager_h" = xyes
11132then :
11133 printf "%s\n" "#define HAVE_XM_MANAGER_H 1" >>confdefs.h
11134
11135fi
11136ac_fn_c_check_header_compile "$LINENO" "Xm/UnhighlightT.h" "ac_cv_header_Xm_UnhighlightT_h" "$ac_includes_default"
11137if test "x$ac_cv_header_Xm_UnhighlightT_h" = xyes
11138then :
11139 printf "%s\n" "#define HAVE_XM_UNHIGHLIGHTT_H 1" >>confdefs.h
11140
11141fi
11142ac_fn_c_check_header_compile "$LINENO" "Xm/Notebook.h" "ac_cv_header_Xm_Notebook_h" "$ac_includes_default"
11143if test "x$ac_cv_header_Xm_Notebook_h" = xyes
11144then :
11145 printf "%s\n" "#define HAVE_XM_NOTEBOOK_H 1" >>confdefs.h
11146
11147fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000011148
Bram Moolenaar1004b3d2022-06-05 19:51:55 +010011149 fi
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011150
Bram Moolenaar77c19352012-06-13 19:19:41 +020011151 if test "x$ac_cv_header_Xm_XpmP_h" = "xyes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011152 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XpmAttributes_21 in Xm/XpmP.h" >&5
11153printf %s "checking for XpmAttributes_21 in Xm/XpmP.h... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011155/* end confdefs.h. */
11156#include <Xm/XpmP.h>
11157int
Illia Bobyra96d5442023-08-30 16:30:15 +020011158main (void)
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011159{
11160XpmAttributes_21 attr;
11161 ;
11162 return 0;
11163}
11164_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011165if ac_fn_c_try_compile "$LINENO"
11166then :
11167 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11168printf "%s\n" "yes" >&6; }; printf "%s\n" "#define XPMATTRIBUTES_TYPE XpmAttributes_21" >>confdefs.h
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011169
Illia Bobyra96d5442023-08-30 16:30:15 +020011170else $as_nop
11171 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11172printf "%s\n" "no" >&6; }; printf "%s\n" "#define XPMATTRIBUTES_TYPE XpmAttributes" >>confdefs.h
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011173
11174
11175fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011176rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011177 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011178 printf "%s\n" "#define XPMATTRIBUTES_TYPE XpmAttributes" >>confdefs.h
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011179
11180 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000011181 CPPFLAGS=$cppflags_save
11182fi
11183
11184if test "x$GUITYPE" = "xNONE" -a "$enable_xim" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011185 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no GUI selected; xim has been disabled" >&5
11186printf "%s\n" "no GUI selected; xim has been disabled" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011187 enable_xim="no"
11188fi
11189if test "x$GUITYPE" = "xNONE" -a "$enable_fontset" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011190 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no GUI selected; fontset has been disabled" >&5
11191printf "%s\n" "no GUI selected; fontset has been disabled" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011192 enable_fontset="no"
11193fi
Bram Moolenaar182c5be2010-06-25 05:37:59 +020011194if test "x$GUITYPE:$enable_fontset" = "xGTK:yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011195 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: GTK+ 2 GUI selected; fontset has been disabled" >&5
11196printf "%s\n" "GTK+ 2 GUI selected; fontset has been disabled" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011197 enable_fontset="no"
11198fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000011199
Bram Moolenaarb3f74062020-02-26 16:16:53 +010011200if test -z "$SKIP_HAIKU"; then
11201 GUITYPE=HAIKUGUI
11202fi
11203
Bram Moolenaar071d4272004-06-13 20:20:40 +000011204if test -z "$SKIP_PHOTON"; then
11205 GUITYPE=PHOTONGUI
11206fi
11207
11208
11209
11210
11211
11212
11213if test "$enable_workshop" = "yes" -a -n "$SKIP_MOTIF"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010011214 as_fn_error $? "cannot use workshop without Motif" "$LINENO" 5
Bram Moolenaar071d4272004-06-13 20:20:40 +000011215fi
11216
11217if test "$enable_xim" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011218 printf "%s\n" "#define FEAT_XIM 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000011219
11220fi
11221if test "$enable_fontset" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011222 printf "%s\n" "#define FEAT_XFONTSET 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000011223
11224fi
11225
11226
11227
Illia Bobyra96d5442023-08-30 16:30:15 +020011228{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for /proc link to executable" >&5
11229printf %s "checking for /proc link to executable... " >&6; }
Bram Moolenaar5f69fee2017-03-09 11:58:40 +010011230if test -L "/proc/self/exe"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011231 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: /proc/self/exe" >&5
11232printf "%s\n" "/proc/self/exe" >&6; }
11233 printf "%s\n" "#define PROC_EXE_LINK \"/proc/self/exe\"" >>confdefs.h
Bram Moolenaarf3757f02017-03-16 15:13:45 +010011234
11235elif test -L "/proc/self/path/a.out"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011236 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: /proc/self/path/a.out" >&5
11237printf "%s\n" "/proc/self/path/a.out" >&6; }
11238 printf "%s\n" "#define PROC_EXE_LINK \"/proc/self/path/a.out\"" >>confdefs.h
Bram Moolenaarf3757f02017-03-16 15:13:45 +010011239
11240elif test -L "/proc/curproc/file"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011241 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: /proc/curproc/file" >&5
11242printf "%s\n" "/proc/curproc/file" >&6; }
11243 printf "%s\n" "#define PROC_EXE_LINK \"/proc/curproc/file\"" >>confdefs.h
Bram Moolenaar5f69fee2017-03-09 11:58:40 +010011244
11245else
Illia Bobyra96d5442023-08-30 16:30:15 +020011246 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11247printf "%s\n" "no" >&6; }
Bram Moolenaar5f69fee2017-03-09 11:58:40 +010011248fi
11249
Illia Bobyra96d5442023-08-30 16:30:15 +020011250{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CYGWIN or MSYS environment" >&5
11251printf %s "checking for CYGWIN or MSYS environment... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +000011252case $vim_cv_uname_output in
Illia Bobyra96d5442023-08-30 16:30:15 +020011253 CYGWIN*|MSYS*) CYGWIN=yes; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11254printf "%s\n" "yes" >&6; }
11255 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CYGWIN clipboard support" >&5
11256printf %s "checking for CYGWIN clipboard support... " >&6; }
Bram Moolenaar693e40c2013-02-26 14:56:42 +010011257 if test "x$with_x" = "xno" ; then
11258 OS_EXTRA_SRC=winclip.c; OS_EXTRA_OBJ=objects/winclip.o
Illia Bobyra96d5442023-08-30 16:30:15 +020011259 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11260printf "%s\n" "yes" >&6; }
11261 printf "%s\n" "#define FEAT_CYGWIN_WIN32_CLIPBOARD 1" >>confdefs.h
Bram Moolenaar693e40c2013-02-26 14:56:42 +010011262
11263 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011264 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no - using X11" >&5
11265printf "%s\n" "no - using X11" >&6; }
Bram Moolenaar693e40c2013-02-26 14:56:42 +010011266 fi ;;
11267
Illia Bobyra96d5442023-08-30 16:30:15 +020011268 *) CYGWIN=no; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11269printf "%s\n" "no" >&6; };;
Bram Moolenaar693e40c2013-02-26 14:56:42 +010011270esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000011271
Bram Moolenaar071d4272004-06-13 20:20:40 +000011272
Illia Bobyra96d5442023-08-30 16:30:15 +020011273{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether toupper is broken" >&5
11274printf %s "checking whether toupper is broken... " >&6; }
11275if test ${vim_cv_toupper_broken+y}
11276then :
11277 printf %s "(cached) " >&6
11278else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000011279
Illia Bobyra96d5442023-08-30 16:30:15 +020011280 if test "$cross_compiling" = yes
11281then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000011282
Bram Moolenaar7db77842014-03-27 17:40:59 +010011283 as_fn_error $? "cross-compiling: please set 'vim_cv_toupper_broken'" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000011284
Illia Bobyra96d5442023-08-30 16:30:15 +020011285else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11287/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000011288
11289#include "confdefs.h"
Bram Moolenaar071d4272004-06-13 20:20:40 +000011290#include <ctype.h>
Bram Moolenaar446cb832008-06-24 21:56:24 +000011291#if STDC_HEADERS
11292# include <stdlib.h>
11293# include <stddef.h>
11294#endif
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010011295int main() { exit(toupper('A') == 'A' && tolower('z') == 'z'); }
Bram Moolenaar446cb832008-06-24 21:56:24 +000011296
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011297_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011298if ac_fn_c_try_run "$LINENO"
11299then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000011300
11301 vim_cv_toupper_broken=yes
11302
Illia Bobyra96d5442023-08-30 16:30:15 +020011303else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000011304
11305 vim_cv_toupper_broken=no
11306
Bram Moolenaar071d4272004-06-13 20:20:40 +000011307fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011308rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11309 conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000011310fi
11311
Bram Moolenaar446cb832008-06-24 21:56:24 +000011312fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011313{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_toupper_broken" >&5
11314printf "%s\n" "$vim_cv_toupper_broken" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000011315
11316if test "x$vim_cv_toupper_broken" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011317 printf "%s\n" "#define BROKEN_TOUPPER 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000011318
11319fi
11320
Illia Bobyra96d5442023-08-30 16:30:15 +020011321{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __DATE__ and __TIME__ work" >&5
11322printf %s "checking whether __DATE__ and __TIME__ work... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011323cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011324/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000011325#include <stdio.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011326int
Illia Bobyra96d5442023-08-30 16:30:15 +020011327main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011328{
Bram Moolenaar071d4272004-06-13 20:20:40 +000011329printf("(" __DATE__ " " __TIME__ ")");
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011330 ;
11331 return 0;
11332}
11333_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011334if ac_fn_c_try_compile "$LINENO"
11335then :
11336 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11337printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_DATE_TIME 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000011338
Illia Bobyra96d5442023-08-30 16:30:15 +020011339else $as_nop
11340 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11341printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011342fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011343rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000011344
Illia Bobyra96d5442023-08-30 16:30:15 +020011345{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __attribute__((unused)) is allowed" >&5
11346printf %s "checking whether __attribute__((unused)) is allowed... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011347cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar0c094b92009-05-14 20:20:33 +000011348/* end confdefs.h. */
11349#include <stdio.h>
11350int
Illia Bobyra96d5442023-08-30 16:30:15 +020011351main (void)
Bram Moolenaar0c094b92009-05-14 20:20:33 +000011352{
11353int x __attribute__((unused));
11354 ;
11355 return 0;
11356}
11357_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011358if ac_fn_c_try_compile "$LINENO"
11359then :
11360 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11361printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_ATTRIBUTE_UNUSED 1" >>confdefs.h
Bram Moolenaar0c094b92009-05-14 20:20:33 +000011362
Illia Bobyra96d5442023-08-30 16:30:15 +020011363else $as_nop
11364 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11365printf "%s\n" "no" >&6; }
Bram Moolenaar0c094b92009-05-14 20:20:33 +000011366fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011367rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0c094b92009-05-14 20:20:33 +000011368
Illia Bobyra96d5442023-08-30 16:30:15 +020011369ac_fn_c_check_header_compile "$LINENO" "elf.h" "ac_cv_header_elf_h" "$ac_includes_default"
11370if test "x$ac_cv_header_elf_h" = xyes
11371then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000011372 HAS_ELF=1
Bram Moolenaar071d4272004-06-13 20:20:40 +000011373fi
11374
11375if test "$HAS_ELF" = 1; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011376 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for main in -lelf" >&5
11377printf %s "checking for main in -lelf... " >&6; }
11378if test ${ac_cv_lib_elf_main+y}
11379then :
11380 printf %s "(cached) " >&6
11381else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011382 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000011383LIBS="-lelf $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011384cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011385/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000011386
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011387
11388int
Illia Bobyra96d5442023-08-30 16:30:15 +020011389main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011390{
Bram Moolenaar446cb832008-06-24 21:56:24 +000011391return main ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011392 ;
11393 return 0;
11394}
11395_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011396if ac_fn_c_try_link "$LINENO"
11397then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011398 ac_cv_lib_elf_main=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020011399else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011400 ac_cv_lib_elf_main=no
Bram Moolenaar071d4272004-06-13 20:20:40 +000011401fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011402rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011403 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011404LIBS=$ac_check_lib_save_LIBS
11405fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011406{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_main" >&5
11407printf "%s\n" "$ac_cv_lib_elf_main" >&6; }
11408if test "x$ac_cv_lib_elf_main" = xyes
11409then :
11410 printf "%s\n" "#define HAVE_LIBELF 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000011411
11412 LIBS="-lelf $LIBS"
11413
Bram Moolenaar071d4272004-06-13 20:20:40 +000011414fi
11415
11416fi
11417
11418ac_header_dirent=no
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011419for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Illia Bobyra96d5442023-08-30 16:30:15 +020011420 as_ac_Header=`printf "%s\n" "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
11421{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
11422printf %s "checking for $ac_hdr that defines DIR... " >&6; }
11423if eval test \${$as_ac_Header+y}
11424then :
11425 printf %s "(cached) " >&6
11426else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011428/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000011429#include <sys/types.h>
11430#include <$ac_hdr>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011431
11432int
Illia Bobyra96d5442023-08-30 16:30:15 +020011433main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011434{
11435if ((DIR *) 0)
11436return 0;
11437 ;
11438 return 0;
11439}
11440_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011441if ac_fn_c_try_compile "$LINENO"
11442then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011443 eval "$as_ac_Header=yes"
Illia Bobyra96d5442023-08-30 16:30:15 +020011444else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011445 eval "$as_ac_Header=no"
Bram Moolenaar071d4272004-06-13 20:20:40 +000011446fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011447rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000011448fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011449eval ac_res=\$$as_ac_Header
Illia Bobyra96d5442023-08-30 16:30:15 +020011450 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11451printf "%s\n" "$ac_res" >&6; }
11452if eval test \"x\$"$as_ac_Header"\" = x"yes"
11453then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011454 cat >>confdefs.h <<_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011455#define `printf "%s\n" "HAVE_$ac_hdr" | $as_tr_cpp` 1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011456_ACEOF
11457
11458ac_header_dirent=$ac_hdr; break
Bram Moolenaar071d4272004-06-13 20:20:40 +000011459fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011460
Bram Moolenaar071d4272004-06-13 20:20:40 +000011461done
11462# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
11463if test $ac_header_dirent = dirent.h; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011464 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
11465printf %s "checking for library containing opendir... " >&6; }
11466if test ${ac_cv_search_opendir+y}
11467then :
11468 printf %s "(cached) " >&6
11469else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011470 ac_func_search_save_LIBS=$LIBS
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011471cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011472/* end confdefs.h. */
11473
Bram Moolenaar446cb832008-06-24 21:56:24 +000011474/* Override any GCC internal prototype to avoid an error.
11475 Use char because int might match the return type of a GCC
11476 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011477char opendir ();
11478int
Illia Bobyra96d5442023-08-30 16:30:15 +020011479main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011480{
Bram Moolenaar446cb832008-06-24 21:56:24 +000011481return opendir ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011482 ;
11483 return 0;
11484}
11485_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011486for ac_lib in '' dir
11487do
Bram Moolenaar446cb832008-06-24 21:56:24 +000011488 if test -z "$ac_lib"; then
11489 ac_res="none required"
11490 else
11491 ac_res=-l$ac_lib
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011492 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Bram Moolenaar446cb832008-06-24 21:56:24 +000011493 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011494 if ac_fn_c_try_link "$LINENO"
11495then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000011496 ac_cv_search_opendir=$ac_res
Bram Moolenaar071d4272004-06-13 20:20:40 +000011497fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011498rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011499 conftest$ac_exeext
Illia Bobyra96d5442023-08-30 16:30:15 +020011500 if test ${ac_cv_search_opendir+y}
11501then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000011502 break
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011503fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000011504done
Illia Bobyra96d5442023-08-30 16:30:15 +020011505if test ${ac_cv_search_opendir+y}
11506then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011507
Illia Bobyra96d5442023-08-30 16:30:15 +020011508else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000011509 ac_cv_search_opendir=no
11510fi
11511rm conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011512LIBS=$ac_func_search_save_LIBS
11513fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011514{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
11515printf "%s\n" "$ac_cv_search_opendir" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000011516ac_res=$ac_cv_search_opendir
Illia Bobyra96d5442023-08-30 16:30:15 +020011517if test "$ac_res" != no
11518then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000011519 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011520
11521fi
11522
Bram Moolenaar071d4272004-06-13 20:20:40 +000011523else
Illia Bobyra96d5442023-08-30 16:30:15 +020011524 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
11525printf %s "checking for library containing opendir... " >&6; }
11526if test ${ac_cv_search_opendir+y}
11527then :
11528 printf %s "(cached) " >&6
11529else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011530 ac_func_search_save_LIBS=$LIBS
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011531cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011532/* end confdefs.h. */
11533
Bram Moolenaar446cb832008-06-24 21:56:24 +000011534/* Override any GCC internal prototype to avoid an error.
11535 Use char because int might match the return type of a GCC
11536 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011537char opendir ();
11538int
Illia Bobyra96d5442023-08-30 16:30:15 +020011539main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011540{
Bram Moolenaar446cb832008-06-24 21:56:24 +000011541return opendir ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011542 ;
11543 return 0;
11544}
11545_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011546for ac_lib in '' x
11547do
Bram Moolenaar446cb832008-06-24 21:56:24 +000011548 if test -z "$ac_lib"; then
11549 ac_res="none required"
11550 else
11551 ac_res=-l$ac_lib
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011552 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Bram Moolenaar446cb832008-06-24 21:56:24 +000011553 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011554 if ac_fn_c_try_link "$LINENO"
11555then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000011556 ac_cv_search_opendir=$ac_res
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011557fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011558rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011559 conftest$ac_exeext
Illia Bobyra96d5442023-08-30 16:30:15 +020011560 if test ${ac_cv_search_opendir+y}
11561then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000011562 break
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011563fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000011564done
Illia Bobyra96d5442023-08-30 16:30:15 +020011565if test ${ac_cv_search_opendir+y}
11566then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011567
Illia Bobyra96d5442023-08-30 16:30:15 +020011568else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000011569 ac_cv_search_opendir=no
11570fi
11571rm conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011572LIBS=$ac_func_search_save_LIBS
11573fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011574{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
11575printf "%s\n" "$ac_cv_search_opendir" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000011576ac_res=$ac_cv_search_opendir
Illia Bobyra96d5442023-08-30 16:30:15 +020011577if test "$ac_res" != no
11578then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000011579 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011580
11581fi
11582
11583fi
11584
11585
Bram Moolenaar071d4272004-06-13 20:20:40 +000011586if test $ac_cv_header_sys_wait_h = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011587 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that defines union wait" >&5
11588printf %s "checking for sys/wait.h that defines union wait... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011590/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000011591#include <sys/wait.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011592int
Illia Bobyra96d5442023-08-30 16:30:15 +020011593main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011594{
Bram Moolenaar071d4272004-06-13 20:20:40 +000011595union wait xx, yy; xx = yy
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011596 ;
11597 return 0;
11598}
11599_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011600if ac_fn_c_try_compile "$LINENO"
11601then :
11602 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11603printf "%s\n" "yes" >&6; }
11604 printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000011605
Illia Bobyra96d5442023-08-30 16:30:15 +020011606 printf "%s\n" "#define HAVE_UNION_WAIT 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000011607
Illia Bobyra96d5442023-08-30 16:30:15 +020011608else $as_nop
11609 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11610printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011611fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011612rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000011613fi
11614
Illia Bobyra96d5442023-08-30 16:30:15 +020011615ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
11616if test "x$ac_cv_header_stdint_h" = xyes
11617then :
11618 printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h
11619
11620fi
11621ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
11622if test "x$ac_cv_header_stdlib_h" = xyes
11623then :
11624 printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h
11625
11626fi
11627ac_fn_c_check_header_compile "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default"
11628if test "x$ac_cv_header_string_h" = xyes
11629then :
11630 printf "%s\n" "#define HAVE_STRING_H 1" >>confdefs.h
11631
11632fi
11633ac_fn_c_check_header_compile "$LINENO" "sys/select.h" "ac_cv_header_sys_select_h" "$ac_includes_default"
11634if test "x$ac_cv_header_sys_select_h" = xyes
11635then :
11636 printf "%s\n" "#define HAVE_SYS_SELECT_H 1" >>confdefs.h
11637
11638fi
11639ac_fn_c_check_header_compile "$LINENO" "sys/utsname.h" "ac_cv_header_sys_utsname_h" "$ac_includes_default"
11640if test "x$ac_cv_header_sys_utsname_h" = xyes
11641then :
11642 printf "%s\n" "#define HAVE_SYS_UTSNAME_H 1" >>confdefs.h
11643
11644fi
11645ac_fn_c_check_header_compile "$LINENO" "termcap.h" "ac_cv_header_termcap_h" "$ac_includes_default"
11646if test "x$ac_cv_header_termcap_h" = xyes
11647then :
11648 printf "%s\n" "#define HAVE_TERMCAP_H 1" >>confdefs.h
11649
11650fi
11651ac_fn_c_check_header_compile "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default"
11652if test "x$ac_cv_header_fcntl_h" = xyes
11653then :
11654 printf "%s\n" "#define HAVE_FCNTL_H 1" >>confdefs.h
11655
11656fi
11657ac_fn_c_check_header_compile "$LINENO" "sgtty.h" "ac_cv_header_sgtty_h" "$ac_includes_default"
11658if test "x$ac_cv_header_sgtty_h" = xyes
11659then :
11660 printf "%s\n" "#define HAVE_SGTTY_H 1" >>confdefs.h
11661
11662fi
11663ac_fn_c_check_header_compile "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "$ac_includes_default"
11664if test "x$ac_cv_header_sys_ioctl_h" = xyes
11665then :
11666 printf "%s\n" "#define HAVE_SYS_IOCTL_H 1" >>confdefs.h
11667
11668fi
11669ac_fn_c_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default"
11670if test "x$ac_cv_header_sys_time_h" = xyes
11671then :
11672 printf "%s\n" "#define HAVE_SYS_TIME_H 1" >>confdefs.h
11673
11674fi
11675ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$ac_includes_default"
11676if test "x$ac_cv_header_sys_types_h" = xyes
11677then :
11678 printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h
11679
11680fi
11681ac_fn_c_check_header_compile "$LINENO" "termio.h" "ac_cv_header_termio_h" "$ac_includes_default"
11682if test "x$ac_cv_header_termio_h" = xyes
11683then :
11684 printf "%s\n" "#define HAVE_TERMIO_H 1" >>confdefs.h
11685
11686fi
11687ac_fn_c_check_header_compile "$LINENO" "iconv.h" "ac_cv_header_iconv_h" "$ac_includes_default"
11688if test "x$ac_cv_header_iconv_h" = xyes
11689then :
11690 printf "%s\n" "#define HAVE_ICONV_H 1" >>confdefs.h
11691
11692fi
11693ac_fn_c_check_header_compile "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
11694if test "x$ac_cv_header_inttypes_h" = xyes
11695then :
11696 printf "%s\n" "#define HAVE_INTTYPES_H 1" >>confdefs.h
11697
11698fi
11699ac_fn_c_check_header_compile "$LINENO" "langinfo.h" "ac_cv_header_langinfo_h" "$ac_includes_default"
11700if test "x$ac_cv_header_langinfo_h" = xyes
11701then :
11702 printf "%s\n" "#define HAVE_LANGINFO_H 1" >>confdefs.h
11703
11704fi
11705ac_fn_c_check_header_compile "$LINENO" "math.h" "ac_cv_header_math_h" "$ac_includes_default"
11706if test "x$ac_cv_header_math_h" = xyes
11707then :
11708 printf "%s\n" "#define HAVE_MATH_H 1" >>confdefs.h
11709
11710fi
11711ac_fn_c_check_header_compile "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
11712if test "x$ac_cv_header_unistd_h" = xyes
11713then :
11714 printf "%s\n" "#define HAVE_UNISTD_H 1" >>confdefs.h
11715
11716fi
11717ac_fn_c_check_header_compile "$LINENO" "stropts.h" "ac_cv_header_stropts_h" "$ac_includes_default"
11718if test "x$ac_cv_header_stropts_h" = xyes
11719then :
11720 printf "%s\n" "#define HAVE_STROPTS_H 1" >>confdefs.h
11721
11722fi
11723ac_fn_c_check_header_compile "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default"
11724if test "x$ac_cv_header_errno_h" = xyes
11725then :
11726 printf "%s\n" "#define HAVE_ERRNO_H 1" >>confdefs.h
11727
11728fi
11729ac_fn_c_check_header_compile "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" "$ac_includes_default"
11730if test "x$ac_cv_header_sys_resource_h" = xyes
11731then :
11732 printf "%s\n" "#define HAVE_SYS_RESOURCE_H 1" >>confdefs.h
11733
11734fi
11735ac_fn_c_check_header_compile "$LINENO" "sys/systeminfo.h" "ac_cv_header_sys_systeminfo_h" "$ac_includes_default"
11736if test "x$ac_cv_header_sys_systeminfo_h" = xyes
11737then :
11738 printf "%s\n" "#define HAVE_SYS_SYSTEMINFO_H 1" >>confdefs.h
11739
11740fi
11741ac_fn_c_check_header_compile "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default"
11742if test "x$ac_cv_header_locale_h" = xyes
11743then :
11744 printf "%s\n" "#define HAVE_LOCALE_H 1" >>confdefs.h
11745
11746fi
11747ac_fn_c_check_header_compile "$LINENO" "sys/stream.h" "ac_cv_header_sys_stream_h" "$ac_includes_default"
11748if test "x$ac_cv_header_sys_stream_h" = xyes
11749then :
11750 printf "%s\n" "#define HAVE_SYS_STREAM_H 1" >>confdefs.h
11751
11752fi
11753ac_fn_c_check_header_compile "$LINENO" "termios.h" "ac_cv_header_termios_h" "$ac_includes_default"
11754if test "x$ac_cv_header_termios_h" = xyes
11755then :
11756 printf "%s\n" "#define HAVE_TERMIOS_H 1" >>confdefs.h
11757
11758fi
11759ac_fn_c_check_header_compile "$LINENO" "libc.h" "ac_cv_header_libc_h" "$ac_includes_default"
11760if test "x$ac_cv_header_libc_h" = xyes
11761then :
11762 printf "%s\n" "#define HAVE_LIBC_H 1" >>confdefs.h
11763
11764fi
11765ac_fn_c_check_header_compile "$LINENO" "sys/statfs.h" "ac_cv_header_sys_statfs_h" "$ac_includes_default"
11766if test "x$ac_cv_header_sys_statfs_h" = xyes
11767then :
11768 printf "%s\n" "#define HAVE_SYS_STATFS_H 1" >>confdefs.h
11769
11770fi
11771ac_fn_c_check_header_compile "$LINENO" "poll.h" "ac_cv_header_poll_h" "$ac_includes_default"
11772if test "x$ac_cv_header_poll_h" = xyes
11773then :
11774 printf "%s\n" "#define HAVE_POLL_H 1" >>confdefs.h
11775
11776fi
11777ac_fn_c_check_header_compile "$LINENO" "sys/poll.h" "ac_cv_header_sys_poll_h" "$ac_includes_default"
11778if test "x$ac_cv_header_sys_poll_h" = xyes
11779then :
11780 printf "%s\n" "#define HAVE_SYS_POLL_H 1" >>confdefs.h
11781
11782fi
11783ac_fn_c_check_header_compile "$LINENO" "pwd.h" "ac_cv_header_pwd_h" "$ac_includes_default"
11784if test "x$ac_cv_header_pwd_h" = xyes
11785then :
11786 printf "%s\n" "#define HAVE_PWD_H 1" >>confdefs.h
11787
11788fi
11789ac_fn_c_check_header_compile "$LINENO" "utime.h" "ac_cv_header_utime_h" "$ac_includes_default"
11790if test "x$ac_cv_header_utime_h" = xyes
11791then :
11792 printf "%s\n" "#define HAVE_UTIME_H 1" >>confdefs.h
11793
11794fi
11795ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
11796if test "x$ac_cv_header_sys_param_h" = xyes
11797then :
11798 printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h
11799
11800fi
11801ac_fn_c_check_header_compile "$LINENO" "sys/ptms.h" "ac_cv_header_sys_ptms_h" "$ac_includes_default"
11802if test "x$ac_cv_header_sys_ptms_h" = xyes
11803then :
11804 printf "%s\n" "#define HAVE_SYS_PTMS_H 1" >>confdefs.h
11805
11806fi
11807ac_fn_c_check_header_compile "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
11808if test "x$ac_cv_header_libintl_h" = xyes
11809then :
11810 printf "%s\n" "#define HAVE_LIBINTL_H 1" >>confdefs.h
11811
11812fi
11813ac_fn_c_check_header_compile "$LINENO" "libgen.h" "ac_cv_header_libgen_h" "$ac_includes_default"
11814if test "x$ac_cv_header_libgen_h" = xyes
11815then :
11816 printf "%s\n" "#define HAVE_LIBGEN_H 1" >>confdefs.h
11817
11818fi
11819ac_fn_c_check_header_compile "$LINENO" "util/debug.h" "ac_cv_header_util_debug_h" "$ac_includes_default"
11820if test "x$ac_cv_header_util_debug_h" = xyes
11821then :
11822 printf "%s\n" "#define HAVE_UTIL_DEBUG_H 1" >>confdefs.h
11823
11824fi
11825ac_fn_c_check_header_compile "$LINENO" "util/msg18n.h" "ac_cv_header_util_msg18n_h" "$ac_includes_default"
11826if test "x$ac_cv_header_util_msg18n_h" = xyes
11827then :
11828 printf "%s\n" "#define HAVE_UTIL_MSG18N_H 1" >>confdefs.h
11829
11830fi
11831ac_fn_c_check_header_compile "$LINENO" "frame.h" "ac_cv_header_frame_h" "$ac_includes_default"
11832if test "x$ac_cv_header_frame_h" = xyes
11833then :
11834 printf "%s\n" "#define HAVE_FRAME_H 1" >>confdefs.h
11835
11836fi
11837ac_fn_c_check_header_compile "$LINENO" "sys/acl.h" "ac_cv_header_sys_acl_h" "$ac_includes_default"
11838if test "x$ac_cv_header_sys_acl_h" = xyes
11839then :
11840 printf "%s\n" "#define HAVE_SYS_ACL_H 1" >>confdefs.h
11841
11842fi
11843ac_fn_c_check_header_compile "$LINENO" "sys/access.h" "ac_cv_header_sys_access_h" "$ac_includes_default"
11844if test "x$ac_cv_header_sys_access_h" = xyes
11845then :
11846 printf "%s\n" "#define HAVE_SYS_ACCESS_H 1" >>confdefs.h
11847
11848fi
11849ac_fn_c_check_header_compile "$LINENO" "sys/sysinfo.h" "ac_cv_header_sys_sysinfo_h" "$ac_includes_default"
11850if test "x$ac_cv_header_sys_sysinfo_h" = xyes
11851then :
11852 printf "%s\n" "#define HAVE_SYS_SYSINFO_H 1" >>confdefs.h
11853
11854fi
11855ac_fn_c_check_header_compile "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
11856if test "x$ac_cv_header_wchar_h" = xyes
11857then :
11858 printf "%s\n" "#define HAVE_WCHAR_H 1" >>confdefs.h
11859
11860fi
11861ac_fn_c_check_header_compile "$LINENO" "wctype.h" "ac_cv_header_wctype_h" "$ac_includes_default"
11862if test "x$ac_cv_header_wctype_h" = xyes
11863then :
11864 printf "%s\n" "#define HAVE_WCTYPE_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011865
11866fi
11867
Bram Moolenaar071d4272004-06-13 20:20:40 +000011868
Illia Bobyra96d5442023-08-30 16:30:15 +020011869ac_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 +000011870# include <sys/stream.h>
11871#endif
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011872"
Illia Bobyra96d5442023-08-30 16:30:15 +020011873if test "x$ac_cv_header_sys_ptem_h" = xyes
11874then :
11875 printf "%s\n" "#define HAVE_SYS_PTEM_H 1" >>confdefs.h
Bram Moolenaar32f31b12009-05-21 13:20:59 +000011876
11877fi
11878
Bram Moolenaar32f31b12009-05-21 13:20:59 +000011879
Illia Bobyra96d5442023-08-30 16:30:15 +020011880ac_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 +000011881# include <sys/param.h>
11882#endif
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011883"
Illia Bobyra96d5442023-08-30 16:30:15 +020011884if test "x$ac_cv_header_sys_sysctl_h" = xyes
11885then :
11886 printf "%s\n" "#define HAVE_SYS_SYSCTL_H 1" >>confdefs.h
Bram Moolenaar00ca2842008-06-26 20:14:00 +000011887
11888fi
11889
Bram Moolenaar00ca2842008-06-26 20:14:00 +000011890
11891
Illia Bobyra96d5442023-08-30 16:30:15 +020011892{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_np.h" >&5
11893printf %s "checking for pthread_np.h... " >&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. */
11896
11897#include <pthread.h>
11898#include <pthread_np.h>
11899int
Illia Bobyra96d5442023-08-30 16:30:15 +020011900main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011901{
11902int i; i = 0;
11903 ;
11904 return 0;
11905}
11906_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011907if ac_fn_c_try_compile "$LINENO"
11908then :
11909 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11910printf "%s\n" "yes" >&6; }
11911 printf "%s\n" "#define HAVE_PTHREAD_NP_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011912
Illia Bobyra96d5442023-08-30 16:30:15 +020011913else $as_nop
11914 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11915printf "%s\n" "no" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011916fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011917rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011918
Illia Bobyra96d5442023-08-30 16:30:15 +020011919ac_fn_c_check_header_compile "$LINENO" "strings.h" "ac_cv_header_strings_h" "$ac_includes_default"
11920if test "x$ac_cv_header_strings_h" = xyes
11921then :
11922 printf "%s\n" "#define HAVE_STRINGS_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011923
11924fi
11925
Bram Moolenaard0573012017-10-28 21:11:06 +020011926if test "x$MACOS_X" = "xyes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011927 printf "%s\n" "#define NO_STRINGS_WITH_STRING_H 1" >>confdefs.h
Bram Moolenaar9372a112005-12-06 19:59:18 +000011928
11929else
Bram Moolenaar071d4272004-06-13 20:20:40 +000011930
Illia Bobyra96d5442023-08-30 16:30:15 +020011931{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strings.h can be included after string.h" >&5
11932printf %s "checking if strings.h can be included after string.h... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011933cppflags_save=$CPPFLAGS
11934CPPFLAGS="$CPPFLAGS $X_CFLAGS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011935cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011936/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000011937
11938#if defined(_AIX) && !defined(_AIX51) && !defined(_NO_PROTO)
11939# define _NO_PROTO /* like in os_unix.h, causes conflict for AIX (Winn) */
11940 /* but don't do it on AIX 5.1 (Uribarri) */
11941#endif
11942#ifdef HAVE_XM_XM_H
11943# include <Xm/Xm.h> /* This breaks it for HP-UX 11 (Squassabia) */
11944#endif
11945#ifdef HAVE_STRING_H
11946# include <string.h>
11947#endif
11948#if defined(HAVE_STRINGS_H)
11949# include <strings.h>
11950#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000011951
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011952int
Illia Bobyra96d5442023-08-30 16:30:15 +020011953main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011954{
11955int i; i = 0;
11956 ;
11957 return 0;
11958}
11959_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011960if ac_fn_c_try_compile "$LINENO"
11961then :
11962 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11963printf "%s\n" "yes" >&6; }
11964else $as_nop
11965 printf "%s\n" "#define NO_STRINGS_WITH_STRING_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011966
Illia Bobyra96d5442023-08-30 16:30:15 +020011967 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11968printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011969fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011970rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000011971CPPFLAGS=$cppflags_save
Bram Moolenaar9372a112005-12-06 19:59:18 +000011972fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000011973
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011974if test $ac_cv_c_compiler_gnu = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011975 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5
11976printf %s "checking whether $CC needs -traditional... " >&6; }
11977if test ${ac_cv_prog_gcc_traditional+y}
11978then :
11979 printf %s "(cached) " >&6
11980else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000011981 ac_pattern="Autoconf.*'x'"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011983/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000011984#include <sgtty.h>
11985Autoconf TIOCGETP
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011986_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000011987if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Illia Bobyra96d5442023-08-30 16:30:15 +020011988 $EGREP "$ac_pattern" >/dev/null 2>&1
11989then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000011990 ac_cv_prog_gcc_traditional=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020011991else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000011992 ac_cv_prog_gcc_traditional=no
11993fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011994rm -rf conftest*
Bram Moolenaar071d4272004-06-13 20:20:40 +000011995
11996
11997 if test $ac_cv_prog_gcc_traditional = no; then
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011999/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012000#include <termio.h>
12001Autoconf TCGETA
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012002_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000012003if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Illia Bobyra96d5442023-08-30 16:30:15 +020012004 $EGREP "$ac_pattern" >/dev/null 2>&1
12005then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012006 ac_cv_prog_gcc_traditional=yes
12007fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012008rm -rf conftest*
Bram Moolenaar071d4272004-06-13 20:20:40 +000012009
12010 fi
12011fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012012{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5
12013printf "%s\n" "$ac_cv_prog_gcc_traditional" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012014 if test $ac_cv_prog_gcc_traditional = yes; then
12015 CC="$CC -traditional"
12016 fi
12017fi
12018
Illia Bobyra96d5442023-08-30 16:30:15 +020012019{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12020printf %s "checking for an ANSI C-conforming const... " >&6; }
12021if test ${ac_cv_c_const+y}
12022then :
12023 printf %s "(cached) " >&6
12024else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012026/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012027
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012028int
Illia Bobyra96d5442023-08-30 16:30:15 +020012029main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012030{
Bram Moolenaar7db77842014-03-27 17:40:59 +010012031
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012032#ifndef __cplusplus
Bram Moolenaar7db77842014-03-27 17:40:59 +010012033 /* Ultrix mips cc rejects this sort of thing. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012034 typedef int charset[2];
Bram Moolenaar7db77842014-03-27 17:40:59 +010012035 const charset cs = { 0, 0 };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012036 /* SunOS 4.1.1 cc rejects this. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000012037 char const *const *pcpcc;
12038 char **ppc;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012039 /* NEC SVR4.0.2 mips cc rejects this. */
12040 struct point {int x, y;};
12041 static struct point const zero = {0,0};
Illia Bobyra96d5442023-08-30 16:30:15 +020012042 /* IBM XL C 1.02.0.0 rejects this.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012043 It does not let you subtract one const X* pointer from another in
12044 an arm of an if-expression whose if-part is not a constant
12045 expression */
12046 const char *g = "string";
Bram Moolenaar446cb832008-06-24 21:56:24 +000012047 pcpcc = &g + (g ? g-g : 0);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012048 /* HPUX 7.0 cc rejects these. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000012049 ++pcpcc;
12050 ppc = (char**) pcpcc;
12051 pcpcc = (char const *const *) ppc;
Bram Moolenaar7db77842014-03-27 17:40:59 +010012052 { /* SCO 3.2v4 cc rejects this sort of thing. */
12053 char tx;
12054 char *t = &tx;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012055 char const *s = 0 ? (char *) 0 : (char const *) 0;
Bram Moolenaar071d4272004-06-13 20:20:40 +000012056
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012057 *t++ = 0;
Bram Moolenaar446cb832008-06-24 21:56:24 +000012058 if (s) return 0;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012059 }
12060 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12061 int x[] = {25, 17};
12062 const int *foo = &x[0];
12063 ++foo;
12064 }
12065 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12066 typedef const int *iptr;
12067 iptr p = 0;
12068 ++p;
12069 }
Illia Bobyra96d5442023-08-30 16:30:15 +020012070 { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012071 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Bram Moolenaar7db77842014-03-27 17:40:59 +010012072 struct s { int j; const int *ap[3]; } bx;
12073 struct s *b = &bx; b->j = 5;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012074 }
12075 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12076 const int foo = 10;
Bram Moolenaar446cb832008-06-24 21:56:24 +000012077 if (!foo) return 0;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012078 }
Bram Moolenaar446cb832008-06-24 21:56:24 +000012079 return !cs[0] && !zero.x;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012080#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000012081
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012082 ;
12083 return 0;
Bram Moolenaar071d4272004-06-13 20:20:40 +000012084}
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012085_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012086if ac_fn_c_try_compile "$LINENO"
12087then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012088 ac_cv_c_const=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020012089else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012090 ac_cv_c_const=no
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012091fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012092rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012093fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012094{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12095printf "%s\n" "$ac_cv_c_const" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012096if test $ac_cv_c_const = no; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012097
Illia Bobyra96d5442023-08-30 16:30:15 +020012098printf "%s\n" "#define const /**/" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000012099
12100fi
12101
Illia Bobyra96d5442023-08-30 16:30:15 +020012102{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12103printf %s "checking for working volatile... " >&6; }
12104if test ${ac_cv_c_volatile+y}
12105then :
12106 printf %s "(cached) " >&6
12107else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012109/* end confdefs.h. */
12110
12111int
Illia Bobyra96d5442023-08-30 16:30:15 +020012112main (void)
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012113{
12114
12115volatile int x;
12116int * volatile y = (int *) 0;
12117return !x && !y;
12118 ;
12119 return 0;
12120}
12121_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012122if ac_fn_c_try_compile "$LINENO"
12123then :
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012124 ac_cv_c_volatile=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020012125else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012126 ac_cv_c_volatile=no
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012127fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012128rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012129fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012130{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5
12131printf "%s\n" "$ac_cv_c_volatile" >&6; }
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012132if test $ac_cv_c_volatile = no; then
12133
Illia Bobyra96d5442023-08-30 16:30:15 +020012134printf "%s\n" "#define volatile /**/" >>confdefs.h
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012135
12136fi
12137
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012138ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Illia Bobyra96d5442023-08-30 16:30:15 +020012139if test "x$ac_cv_type_mode_t" = xyes
12140then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012141
Illia Bobyra96d5442023-08-30 16:30:15 +020012142else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012143
Illia Bobyra96d5442023-08-30 16:30:15 +020012144printf "%s\n" "#define mode_t int" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012145
12146fi
12147
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012148ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Illia Bobyra96d5442023-08-30 16:30:15 +020012149if test "x$ac_cv_type_off_t" = xyes
12150then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012151
Illia Bobyra96d5442023-08-30 16:30:15 +020012152else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012153
Illia Bobyra96d5442023-08-30 16:30:15 +020012154printf "%s\n" "#define off_t long int" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012155
12156fi
12157
Bram Moolenaar071d4272004-06-13 20:20:40 +000012158
Illia Bobyra96d5442023-08-30 16:30:15 +020012159 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default
12160"
12161if test "x$ac_cv_type_pid_t" = xyes
12162then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012163
Illia Bobyra96d5442023-08-30 16:30:15 +020012164else $as_nop
12165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12166/* end confdefs.h. */
12167
12168 #if defined _WIN64 && !defined __CYGWIN__
12169 LLP64
12170 #endif
12171
12172int
12173main (void)
12174{
12175
12176 ;
12177 return 0;
12178}
12179
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012180_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012181if ac_fn_c_try_compile "$LINENO"
12182then :
12183 ac_pid_type='int'
12184else $as_nop
12185 ac_pid_type='__int64'
12186fi
12187rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
12188
12189printf "%s\n" "#define pid_t $ac_pid_type" >>confdefs.h
12190
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012191
12192fi
12193
Illia Bobyra96d5442023-08-30 16:30:15 +020012194
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012195ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Illia Bobyra96d5442023-08-30 16:30:15 +020012196if test "x$ac_cv_type_size_t" = xyes
12197then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012198
Illia Bobyra96d5442023-08-30 16:30:15 +020012199else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012200
Illia Bobyra96d5442023-08-30 16:30:15 +020012201printf "%s\n" "#define size_t unsigned int" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012202
12203fi
12204
Illia Bobyra96d5442023-08-30 16:30:15 +020012205{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
12206printf %s "checking for uid_t in sys/types.h... " >&6; }
12207if test ${ac_cv_type_uid_t+y}
12208then :
12209 printf %s "(cached) " >&6
12210else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012212/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012213#include <sys/types.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012214
12215_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000012216if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Illia Bobyra96d5442023-08-30 16:30:15 +020012217 $EGREP "uid_t" >/dev/null 2>&1
12218then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012219 ac_cv_type_uid_t=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020012220else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000012221 ac_cv_type_uid_t=no
12222fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012223rm -rf conftest*
Bram Moolenaar071d4272004-06-13 20:20:40 +000012224
12225fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012226{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
12227printf "%s\n" "$ac_cv_type_uid_t" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012228if test $ac_cv_type_uid_t = no; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000012229
Illia Bobyra96d5442023-08-30 16:30:15 +020012230printf "%s\n" "#define uid_t int" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012231
12232
Illia Bobyra96d5442023-08-30 16:30:15 +020012233printf "%s\n" "#define gid_t int" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000012234
12235fi
12236
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012237ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
12238case $ac_cv_c_uint32_t in #(
12239 no|yes) ;; #(
12240 *)
12241
Illia Bobyra96d5442023-08-30 16:30:15 +020012242printf "%s\n" "#define _UINT32_T 1" >>confdefs.h
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012243
12244
Illia Bobyra96d5442023-08-30 16:30:15 +020012245printf "%s\n" "#define uint32_t $ac_cv_c_uint32_t" >>confdefs.h
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012246;;
12247 esac
12248
Bram Moolenaarfa7584c2010-05-19 21:57:45 +020012249
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012250
Illia Bobyrf39842f2023-08-27 18:21:23 +020012251
12252
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012253ac_fn_c_check_type "$LINENO" "ino_t" "ac_cv_type_ino_t" "$ac_includes_default"
Illia Bobyra96d5442023-08-30 16:30:15 +020012254if test "x$ac_cv_type_ino_t" = xyes
12255then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012256
Illia Bobyra96d5442023-08-30 16:30:15 +020012257else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012258
Illia Bobyra96d5442023-08-30 16:30:15 +020012259printf "%s\n" "#define ino_t long" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012260
12261fi
12262
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012263ac_fn_c_check_type "$LINENO" "dev_t" "ac_cv_type_dev_t" "$ac_includes_default"
Illia Bobyra96d5442023-08-30 16:30:15 +020012264if test "x$ac_cv_type_dev_t" = xyes
12265then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012266
Illia Bobyra96d5442023-08-30 16:30:15 +020012267else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012268
Illia Bobyra96d5442023-08-30 16:30:15 +020012269printf "%s\n" "#define dev_t unsigned" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012270
12271fi
12272
Illia Bobyra96d5442023-08-30 16:30:15 +020012273 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12274printf %s "checking whether byte ordering is bigendian... " >&6; }
12275if test ${ac_cv_c_bigendian+y}
12276then :
12277 printf %s "(cached) " >&6
12278else $as_nop
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012279 ac_cv_c_bigendian=unknown
12280 # See if we're dealing with a universal compiler.
12281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12282/* end confdefs.h. */
12283#ifndef __APPLE_CC__
12284 not a universal capable compiler
12285 #endif
12286 typedef int dummy;
12287
12288_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012289if ac_fn_c_try_compile "$LINENO"
12290then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012291
12292 # Check for potential -arch flags. It is not universal unless
12293 # there are at least two -arch flags with different values.
12294 ac_arch=
12295 ac_prev=
12296 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12297 if test -n "$ac_prev"; then
12298 case $ac_word in
12299 i?86 | x86_64 | ppc | ppc64)
12300 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12301 ac_arch=$ac_word
12302 else
12303 ac_cv_c_bigendian=universal
12304 break
12305 fi
12306 ;;
12307 esac
12308 ac_prev=
12309 elif test "x$ac_word" = "x-arch"; then
12310 ac_prev=arch
12311 fi
12312 done
12313fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012314rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012315 if test $ac_cv_c_bigendian = unknown; then
12316 # See if sys/param.h defines the BYTE_ORDER macro.
12317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12318/* end confdefs.h. */
12319#include <sys/types.h>
12320 #include <sys/param.h>
12321
12322int
Illia Bobyra96d5442023-08-30 16:30:15 +020012323main (void)
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012324{
12325#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12326 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12327 && LITTLE_ENDIAN)
12328 bogus endian macros
12329 #endif
12330
12331 ;
12332 return 0;
12333}
12334_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012335if ac_fn_c_try_compile "$LINENO"
12336then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012337 # It does; now see whether it defined to BIG_ENDIAN or not.
12338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12339/* end confdefs.h. */
12340#include <sys/types.h>
12341 #include <sys/param.h>
12342
12343int
Illia Bobyra96d5442023-08-30 16:30:15 +020012344main (void)
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012345{
12346#if BYTE_ORDER != BIG_ENDIAN
12347 not big endian
12348 #endif
12349
12350 ;
12351 return 0;
12352}
12353_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012354if ac_fn_c_try_compile "$LINENO"
12355then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012356 ac_cv_c_bigendian=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020012357else $as_nop
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012358 ac_cv_c_bigendian=no
12359fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012360rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012361fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012362rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012363 fi
12364 if test $ac_cv_c_bigendian = unknown; then
12365 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12367/* end confdefs.h. */
12368#include <limits.h>
12369
12370int
Illia Bobyra96d5442023-08-30 16:30:15 +020012371main (void)
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012372{
12373#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12374 bogus endian macros
12375 #endif
12376
12377 ;
12378 return 0;
12379}
12380_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012381if ac_fn_c_try_compile "$LINENO"
12382then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012383 # It does; now see whether it defined to _BIG_ENDIAN or not.
12384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12385/* end confdefs.h. */
12386#include <limits.h>
12387
12388int
Illia Bobyra96d5442023-08-30 16:30:15 +020012389main (void)
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012390{
12391#ifndef _BIG_ENDIAN
12392 not big endian
12393 #endif
12394
12395 ;
12396 return 0;
12397}
12398_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012399if ac_fn_c_try_compile "$LINENO"
12400then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012401 ac_cv_c_bigendian=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020012402else $as_nop
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012403 ac_cv_c_bigendian=no
12404fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012405rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012406fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012407rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012408 fi
12409 if test $ac_cv_c_bigendian = unknown; then
12410 # Compile a test program.
Illia Bobyra96d5442023-08-30 16:30:15 +020012411 if test "$cross_compiling" = yes
12412then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012413 # Try to guess by grepping values from an object file.
12414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12415/* end confdefs.h. */
Illia Bobyra96d5442023-08-30 16:30:15 +020012416unsigned short int ascii_mm[] =
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012417 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
Illia Bobyra96d5442023-08-30 16:30:15 +020012418 unsigned short int ascii_ii[] =
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012419 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12420 int use_ascii (int i) {
12421 return ascii_mm[i] + ascii_ii[i];
12422 }
Illia Bobyra96d5442023-08-30 16:30:15 +020012423 unsigned short int ebcdic_ii[] =
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012424 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
Illia Bobyra96d5442023-08-30 16:30:15 +020012425 unsigned short int ebcdic_mm[] =
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012426 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12427 int use_ebcdic (int i) {
12428 return ebcdic_mm[i] + ebcdic_ii[i];
12429 }
12430 extern int foo;
12431
12432int
Illia Bobyra96d5442023-08-30 16:30:15 +020012433main (void)
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012434{
12435return use_ascii (foo) == use_ebcdic (foo);
12436 ;
12437 return 0;
12438}
12439_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012440if ac_fn_c_try_compile "$LINENO"
12441then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012442 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12443 ac_cv_c_bigendian=yes
12444 fi
12445 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12446 if test "$ac_cv_c_bigendian" = unknown; then
12447 ac_cv_c_bigendian=no
12448 else
12449 # finding both strings is unlikely to happen, but who knows?
12450 ac_cv_c_bigendian=unknown
12451 fi
12452 fi
12453fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012454rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
12455else $as_nop
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12457/* end confdefs.h. */
12458$ac_includes_default
12459int
Illia Bobyra96d5442023-08-30 16:30:15 +020012460main (void)
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012461{
12462
12463 /* Are we little or big endian? From Harbison&Steele. */
12464 union
12465 {
12466 long int l;
12467 char c[sizeof (long int)];
12468 } u;
12469 u.l = 1;
12470 return u.c[sizeof (long int) - 1] == 1;
12471
12472 ;
12473 return 0;
12474}
12475_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012476if ac_fn_c_try_run "$LINENO"
12477then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012478 ac_cv_c_bigendian=no
Illia Bobyra96d5442023-08-30 16:30:15 +020012479else $as_nop
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012480 ac_cv_c_bigendian=yes
12481fi
12482rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12483 conftest.$ac_objext conftest.beam conftest.$ac_ext
12484fi
12485
12486 fi
12487fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012488{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12489printf "%s\n" "$ac_cv_c_bigendian" >&6; }
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012490 case $ac_cv_c_bigendian in #(
12491 yes)
Illia Bobyra96d5442023-08-30 16:30:15 +020012492 printf "%s\n" "#define WORDS_BIGENDIAN 1" >>confdefs.h
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012493;; #(
12494 no)
12495 ;; #(
12496 universal)
12497
Illia Bobyra96d5442023-08-30 16:30:15 +020012498printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012499
12500 ;; #(
12501 *)
Bram Moolenaar7db77842014-03-27 17:40:59 +010012502 as_fn_error $? "unknown endianness
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012503 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12504 esac
12505
Illia Bobyra96d5442023-08-30 16:30:15 +020012506{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
12507printf %s "checking for inline... " >&6; }
12508if test ${ac_cv_c_inline+y}
12509then :
12510 printf %s "(cached) " >&6
12511else $as_nop
Bram Moolenaar136f29a2016-02-27 20:14:15 +010012512 ac_cv_c_inline=no
12513for ac_kw in inline __inline__ __inline; do
12514 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12515/* end confdefs.h. */
12516#ifndef __cplusplus
12517typedef int foo_t;
Illia Bobyra96d5442023-08-30 16:30:15 +020012518static $ac_kw foo_t static_foo (void) {return 0; }
12519$ac_kw foo_t foo (void) {return 0; }
Bram Moolenaar136f29a2016-02-27 20:14:15 +010012520#endif
12521
12522_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012523if ac_fn_c_try_compile "$LINENO"
12524then :
Bram Moolenaar136f29a2016-02-27 20:14:15 +010012525 ac_cv_c_inline=$ac_kw
12526fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012527rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar136f29a2016-02-27 20:14:15 +010012528 test "$ac_cv_c_inline" != no && break
12529done
12530
12531fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012532{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
12533printf "%s\n" "$ac_cv_c_inline" >&6; }
Bram Moolenaar136f29a2016-02-27 20:14:15 +010012534
12535case $ac_cv_c_inline in
12536 inline | yes) ;;
12537 *)
12538 case $ac_cv_c_inline in
12539 no) ac_val=;;
12540 *) ac_val=$ac_cv_c_inline;;
12541 esac
12542 cat >>confdefs.h <<_ACEOF
12543#ifndef __cplusplus
12544#define inline $ac_val
12545#endif
12546_ACEOF
12547 ;;
12548esac
12549
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012550
Illia Bobyra96d5442023-08-30 16:30:15 +020012551{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for rlim_t" >&5
12552printf %s "checking for rlim_t... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012553if eval "test \"`echo '$''{'ac_cv_type_rlim_t'+set}'`\" = set"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012554 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: (cached) $ac_cv_type_rlim_t" >&5
12555printf "%s\n" "(cached) $ac_cv_type_rlim_t" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012556else
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012558/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012559
12560#include <sys/types.h>
12561#if STDC_HEADERS
Bram Moolenaar446cb832008-06-24 21:56:24 +000012562# include <stdlib.h>
12563# include <stddef.h>
Bram Moolenaar071d4272004-06-13 20:20:40 +000012564#endif
12565#ifdef HAVE_SYS_RESOURCE_H
Bram Moolenaar446cb832008-06-24 21:56:24 +000012566# include <sys/resource.h>
Bram Moolenaar071d4272004-06-13 20:20:40 +000012567#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012568
12569_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000012570if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Illia Bobyra96d5442023-08-30 16:30:15 +020012571 $EGREP "(^|[^a-zA-Z_0-9])rlim_t[^a-zA-Z_0-9]" >/dev/null 2>&1
12572then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012573 ac_cv_type_rlim_t=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020012574else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000012575 ac_cv_type_rlim_t=no
12576fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012577rm -rf conftest*
Bram Moolenaar071d4272004-06-13 20:20:40 +000012578
Illia Bobyra96d5442023-08-30 16:30:15 +020012579 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_rlim_t" >&5
12580printf "%s\n" "$ac_cv_type_rlim_t" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012581fi
12582if test $ac_cv_type_rlim_t = no; then
12583 cat >> confdefs.h <<\EOF
12584#define rlim_t unsigned long
12585EOF
12586fi
12587
Illia Bobyra96d5442023-08-30 16:30:15 +020012588{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stack_t" >&5
12589printf %s "checking for stack_t... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012590if eval "test \"`echo '$''{'ac_cv_type_stack_t'+set}'`\" = set"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012591 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: (cached) $ac_cv_type_stack_t" >&5
12592printf "%s\n" "(cached) $ac_cv_type_stack_t" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012593else
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012595/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012596
12597#include <sys/types.h>
12598#if STDC_HEADERS
Bram Moolenaar446cb832008-06-24 21:56:24 +000012599# include <stdlib.h>
12600# include <stddef.h>
Bram Moolenaar071d4272004-06-13 20:20:40 +000012601#endif
12602#include <signal.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012603
12604_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000012605if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Illia Bobyra96d5442023-08-30 16:30:15 +020012606 $EGREP "stack_t" >/dev/null 2>&1
12607then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012608 ac_cv_type_stack_t=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020012609else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000012610 ac_cv_type_stack_t=no
12611fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012612rm -rf conftest*
Bram Moolenaar071d4272004-06-13 20:20:40 +000012613
Illia Bobyra96d5442023-08-30 16:30:15 +020012614 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_stack_t" >&5
12615printf "%s\n" "$ac_cv_type_stack_t" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012616fi
12617if test $ac_cv_type_stack_t = no; then
12618 cat >> confdefs.h <<\EOF
12619#define stack_t struct sigaltstack
12620EOF
12621fi
12622
Illia Bobyra96d5442023-08-30 16:30:15 +020012623{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stack_t has an ss_base field" >&5
12624printf %s "checking whether stack_t has an ss_base field... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012625cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012626/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012627
12628#include <sys/types.h>
12629#if STDC_HEADERS
Bram Moolenaar446cb832008-06-24 21:56:24 +000012630# include <stdlib.h>
12631# include <stddef.h>
Bram Moolenaar071d4272004-06-13 20:20:40 +000012632#endif
12633#include <signal.h>
12634#include "confdefs.h"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012635
12636int
Illia Bobyra96d5442023-08-30 16:30:15 +020012637main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012638{
12639stack_t sigstk; sigstk.ss_base = 0;
12640 ;
12641 return 0;
12642}
12643_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012644if ac_fn_c_try_compile "$LINENO"
12645then :
12646 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12647printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SS_BASE 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000012648
Illia Bobyra96d5442023-08-30 16:30:15 +020012649else $as_nop
12650 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12651printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012652fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012653rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000012654
12655olibs="$LIBS"
Illia Bobyra96d5442023-08-30 16:30:15 +020012656{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-tlib argument" >&5
12657printf %s "checking --with-tlib argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012658
Bram Moolenaar446cb832008-06-24 21:56:24 +000012659# Check whether --with-tlib was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020012660if test ${with_tlib+y}
12661then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000012662 withval=$with_tlib;
12663fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000012664
12665if test -n "$with_tlib"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012666 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_tlib" >&5
12667printf "%s\n" "$with_tlib" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012668 LIBS="$LIBS -l$with_tlib"
Illia Bobyra96d5442023-08-30 16:30:15 +020012669 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for linking with $with_tlib library" >&5
12670printf %s "checking for linking with $with_tlib library... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012672/* end confdefs.h. */
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000012673
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012674int
Illia Bobyra96d5442023-08-30 16:30:15 +020012675main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012676{
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000012677
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012678 ;
12679 return 0;
12680}
12681_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012682if ac_fn_c_try_link "$LINENO"
12683then :
12684 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: OK" >&5
12685printf "%s\n" "OK" >&6; }
12686else $as_nop
Bram Moolenaar7db77842014-03-27 17:40:59 +010012687 as_fn_error $? "FAILED" "$LINENO" 5
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000012688fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012689rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012690 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000012691 olibs="$LIBS"
12692else
Illia Bobyra96d5442023-08-30 16:30:15 +020012693 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: empty: automatic terminal library selection" >&5
12694printf "%s\n" "empty: automatic terminal library selection" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +000012695 case "$vim_cv_uname_output" in
Bram Moolenaar4e509b62011-02-09 17:42:57 +010012696 OSF1|SCO_SV) tlibs="tinfo ncurses curses termlib termcap";;
12697 *) tlibs="tinfo ncurses termlib termcap curses";;
Bram Moolenaar071d4272004-06-13 20:20:40 +000012698 esac
12699 for libname in $tlibs; do
Illia Bobyra96d5442023-08-30 16:30:15 +020012700 as_ac_Lib=`printf "%s\n" "ac_cv_lib_${libname}""_tgetent" | $as_tr_sh`
12701{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tgetent in -l${libname}" >&5
12702printf %s "checking for tgetent in -l${libname}... " >&6; }
12703if eval test \${$as_ac_Lib+y}
12704then :
12705 printf %s "(cached) " >&6
12706else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012707 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000012708LIBS="-l${libname} $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012709cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012710/* end confdefs.h. */
12711
Bram Moolenaar446cb832008-06-24 21:56:24 +000012712/* Override any GCC internal prototype to avoid an error.
12713 Use char because int might match the return type of a GCC
12714 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012715char tgetent ();
12716int
Illia Bobyra96d5442023-08-30 16:30:15 +020012717main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012718{
Bram Moolenaar446cb832008-06-24 21:56:24 +000012719return tgetent ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012720 ;
12721 return 0;
12722}
12723_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012724if ac_fn_c_try_link "$LINENO"
12725then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012726 eval "$as_ac_Lib=yes"
Illia Bobyra96d5442023-08-30 16:30:15 +020012727else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012728 eval "$as_ac_Lib=no"
Bram Moolenaar071d4272004-06-13 20:20:40 +000012729fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012730rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012731 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012732LIBS=$ac_check_lib_save_LIBS
12733fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012734eval ac_res=\$$as_ac_Lib
Illia Bobyra96d5442023-08-30 16:30:15 +020012735 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12736printf "%s\n" "$ac_res" >&6; }
12737if eval test \"x\$"$as_ac_Lib"\" = x"yes"
12738then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012739 cat >>confdefs.h <<_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012740#define `printf "%s\n" "HAVE_LIB${libname}" | $as_tr_cpp` 1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012741_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000012742
12743 LIBS="-l${libname} $LIBS"
12744
Bram Moolenaar071d4272004-06-13 20:20:40 +000012745fi
12746
12747 if test "x$olibs" != "x$LIBS"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012748 if test "$cross_compiling" = yes
12749then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012750 res="FAIL"
Illia Bobyra96d5442023-08-30 16:30:15 +020012751else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012753/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012754
12755#ifdef HAVE_TERMCAP_H
12756# include <termcap.h>
12757#endif
Bram Moolenaar446cb832008-06-24 21:56:24 +000012758#if STDC_HEADERS
12759# include <stdlib.h>
12760# include <stddef.h>
12761#endif
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010012762int main() {char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(0); }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012763_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012764if ac_fn_c_try_run "$LINENO"
12765then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012766 res="OK"
Illia Bobyra96d5442023-08-30 16:30:15 +020012767else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012768 res="FAIL"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012769fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012770rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12771 conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012772fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000012773
Bram Moolenaar071d4272004-06-13 20:20:40 +000012774 if test "$res" = "OK"; then
12775 break
12776 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012777 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libname library is not usable" >&5
12778printf "%s\n" "$libname library is not usable" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012779 LIBS="$olibs"
12780 fi
12781 done
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000012782 if test "x$olibs" = "x$LIBS"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012783 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no terminal library found" >&5
12784printf "%s\n" "no terminal library found" >&6; }
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000012785 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000012786fi
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000012787
12788if test "x$olibs" = "x$LIBS"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012789 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tgetent()" >&5
12790printf %s "checking for tgetent()... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012792/* end confdefs.h. */
Bram Moolenaarbd7f7c12020-07-28 21:03:37 +020012793int tgetent(char *, const char *);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012794int
Illia Bobyra96d5442023-08-30 16:30:15 +020012795main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012796{
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000012797char s[10000]; int res = tgetent(s, "thisterminaldoesnotexist");
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012798 ;
12799 return 0;
12800}
12801_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012802if ac_fn_c_try_link "$LINENO"
12803then :
12804 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12805printf "%s\n" "yes" >&6; }
12806else $as_nop
Bram Moolenaar7db77842014-03-27 17:40:59 +010012807 as_fn_error $? "NOT FOUND!
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000012808 You need to install a terminal library; for example ncurses.
Bram Moolenaar16678eb2021-04-21 11:57:59 +020012809 On Linux that would be the libncurses-dev package.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012810 Or specify the name of the library with --with-tlib." "$LINENO" 5
12811fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012812rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012813 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000012814fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000012815
Illia Bobyra96d5442023-08-30 16:30:15 +020012816{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we talk terminfo" >&5
12817printf %s "checking whether we talk terminfo... " >&6; }
12818if test ${vim_cv_terminfo+y}
12819then :
12820 printf %s "(cached) " >&6
12821else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000012822
Illia Bobyra96d5442023-08-30 16:30:15 +020012823 if test "$cross_compiling" = yes
12824then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000012825
Bram Moolenaar7db77842014-03-27 17:40:59 +010012826 as_fn_error $? "cross-compiling: please set 'vim_cv_terminfo'" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000012827
Illia Bobyra96d5442023-08-30 16:30:15 +020012828else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12830/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012831
Bram Moolenaar446cb832008-06-24 21:56:24 +000012832#include "confdefs.h"
Bram Moolenaar071d4272004-06-13 20:20:40 +000012833#ifdef HAVE_TERMCAP_H
12834# include <termcap.h>
12835#endif
Bram Moolenaar446cb832008-06-24 21:56:24 +000012836#ifdef HAVE_STRING_H
12837# include <string.h>
12838#endif
12839#if STDC_HEADERS
12840# include <stdlib.h>
12841# include <stddef.h>
12842#endif
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010012843int main()
Bram Moolenaar071d4272004-06-13 20:20:40 +000012844{char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(!strcmp(s==0 ? "" : s, "1")); }
Bram Moolenaar446cb832008-06-24 21:56:24 +000012845
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012846_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012847if ac_fn_c_try_run "$LINENO"
12848then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000012849
12850 vim_cv_terminfo=no
12851
Illia Bobyra96d5442023-08-30 16:30:15 +020012852else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000012853
12854 vim_cv_terminfo=yes
12855
12856fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012857rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12858 conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000012859fi
12860
12861
Bram Moolenaar446cb832008-06-24 21:56:24 +000012862fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012863{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_terminfo" >&5
12864printf "%s\n" "$vim_cv_terminfo" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000012865
12866if test "x$vim_cv_terminfo" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012867 printf "%s\n" "#define TERMINFO 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000012868
12869fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000012870
Illia Bobyra96d5442023-08-30 16:30:15 +020012871{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking what tgetent() returns for an unknown terminal" >&5
12872printf %s "checking what tgetent() returns for an unknown terminal... " >&6; }
12873if test ${vim_cv_tgetent+y}
12874then :
12875 printf %s "(cached) " >&6
12876else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000012877
Illia Bobyra96d5442023-08-30 16:30:15 +020012878 if test "$cross_compiling" = yes
12879then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000012880
Bram Moolenaar696cbd22017-04-28 15:45:46 +020012881 as_fn_error $? "failed to compile test program." "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000012882
Illia Bobyra96d5442023-08-30 16:30:15 +020012883else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012884 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12885/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012886
Bram Moolenaar446cb832008-06-24 21:56:24 +000012887#include "confdefs.h"
Bram Moolenaar071d4272004-06-13 20:20:40 +000012888#ifdef HAVE_TERMCAP_H
12889# include <termcap.h>
12890#endif
Bram Moolenaar446cb832008-06-24 21:56:24 +000012891#if STDC_HEADERS
12892# include <stdlib.h>
12893# include <stddef.h>
12894#endif
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010012895int main()
Bram Moolenaar071d4272004-06-13 20:20:40 +000012896{char s[10000]; int res = tgetent(s, "thisterminaldoesnotexist"); exit(res != 0); }
Bram Moolenaar446cb832008-06-24 21:56:24 +000012897
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012898_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012899if ac_fn_c_try_run "$LINENO"
12900then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000012901
Bram Moolenaara88254f2017-11-02 23:04:14 +010012902 vim_cv_tgetent=zero
Bram Moolenaar071d4272004-06-13 20:20:40 +000012903
Illia Bobyra96d5442023-08-30 16:30:15 +020012904else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000012905
Bram Moolenaara88254f2017-11-02 23:04:14 +010012906 vim_cv_tgetent=non-zero
Bram Moolenaar446cb832008-06-24 21:56:24 +000012907
Bram Moolenaar071d4272004-06-13 20:20:40 +000012908fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012909rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12910 conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000012911fi
12912
Bram Moolenaar446cb832008-06-24 21:56:24 +000012913
Bram Moolenaar446cb832008-06-24 21:56:24 +000012914fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012915{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_tgetent" >&5
12916printf "%s\n" "$vim_cv_tgetent" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000012917
Bram Moolenaara88254f2017-11-02 23:04:14 +010012918if test "x$vim_cv_tgetent" = "xzero" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012919 printf "%s\n" "#define TGETENT_ZERO_ERR 0" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000012920
Bram Moolenaar446cb832008-06-24 21:56:24 +000012921fi
12922
Illia Bobyra96d5442023-08-30 16:30:15 +020012923{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether termcap.h contains ospeed" >&5
12924printf %s "checking whether termcap.h contains ospeed... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012925cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012926/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012927
12928#ifdef HAVE_TERMCAP_H
12929# include <termcap.h>
12930#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012931
12932int
Illia Bobyra96d5442023-08-30 16:30:15 +020012933main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012934{
Bram Moolenaar071d4272004-06-13 20:20:40 +000012935ospeed = 20000
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012936 ;
12937 return 0;
12938}
12939_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012940if ac_fn_c_try_link "$LINENO"
12941then :
12942 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12943printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_OSPEED 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000012944
Illia Bobyra96d5442023-08-30 16:30:15 +020012945else $as_nop
12946 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12947printf "%s\n" "no" >&6; }
12948 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ospeed can be extern" >&5
12949printf %s "checking whether ospeed can be extern... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012951/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012952
12953#ifdef HAVE_TERMCAP_H
12954# include <termcap.h>
12955#endif
12956extern short ospeed;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012957
12958int
Illia Bobyra96d5442023-08-30 16:30:15 +020012959main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012960{
Bram Moolenaar071d4272004-06-13 20:20:40 +000012961ospeed = 20000
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012962 ;
12963 return 0;
12964}
12965_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012966if ac_fn_c_try_link "$LINENO"
12967then :
12968 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12969printf "%s\n" "yes" >&6; }; printf "%s\n" "#define OSPEED_EXTERN 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000012970
Illia Bobyra96d5442023-08-30 16:30:15 +020012971else $as_nop
12972 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12973printf "%s\n" "no" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012974fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012975rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012976 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012977
12978fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012979rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012980 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000012981
Illia Bobyra96d5442023-08-30 16:30:15 +020012982{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether termcap.h contains UP, BC and PC" >&5
12983printf %s "checking whether termcap.h contains UP, BC and PC... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012984cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012985/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012986
12987#ifdef HAVE_TERMCAP_H
12988# include <termcap.h>
12989#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012990
12991int
Illia Bobyra96d5442023-08-30 16:30:15 +020012992main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012993{
Bram Moolenaar071d4272004-06-13 20:20:40 +000012994if (UP == 0 && BC == 0) PC = 1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012995 ;
12996 return 0;
12997}
12998_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012999if ac_fn_c_try_link "$LINENO"
13000then :
13001 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13002printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_UP_BC_PC 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013003
Illia Bobyra96d5442023-08-30 16:30:15 +020013004else $as_nop
13005 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13006printf "%s\n" "no" >&6; }
13007 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether UP, BC and PC can be extern" >&5
13008printf %s "checking whether UP, BC and PC can be extern... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013010/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013011
13012#ifdef HAVE_TERMCAP_H
13013# include <termcap.h>
13014#endif
13015extern char *UP, *BC, PC;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013016
13017int
Illia Bobyra96d5442023-08-30 16:30:15 +020013018main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013019{
Bram Moolenaar071d4272004-06-13 20:20:40 +000013020if (UP == 0 && BC == 0) PC = 1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013021 ;
13022 return 0;
13023}
13024_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013025if ac_fn_c_try_link "$LINENO"
13026then :
13027 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13028printf "%s\n" "yes" >&6; }; printf "%s\n" "#define UP_BC_PC_EXTERN 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013029
Illia Bobyra96d5442023-08-30 16:30:15 +020013030else $as_nop
13031 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13032printf "%s\n" "no" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013033fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013034rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013035 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013036
13037fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013038rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013039 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000013040
Illia Bobyra96d5442023-08-30 16:30:15 +020013041{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether tputs() uses outfuntype" >&5
13042printf %s "checking whether tputs() uses outfuntype... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013043cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013044/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013045
13046#ifdef HAVE_TERMCAP_H
13047# include <termcap.h>
13048#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013049
13050int
Illia Bobyra96d5442023-08-30 16:30:15 +020013051main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013052{
Bram Moolenaar071d4272004-06-13 20:20:40 +000013053extern int xx(); tputs("test", 1, (outfuntype)xx)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013054 ;
13055 return 0;
13056}
13057_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013058if ac_fn_c_try_compile "$LINENO"
13059then :
13060 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13061printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_OUTFUNTYPE 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013062
Illia Bobyra96d5442023-08-30 16:30:15 +020013063else $as_nop
13064 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13065printf "%s\n" "no" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013066fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013067rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000013068
Illia Bobyra96d5442023-08-30 16:30:15 +020013069{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether del_curterm() can be used" >&5
13070printf %s "checking whether del_curterm() can be used... " >&6; }
Bram Moolenaarb3a29552021-11-19 11:28:04 +000013071cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13072/* end confdefs.h. */
13073
13074#ifdef HAVE_TERMCAP_H
13075# include <termcap.h>
13076#endif
13077#include <term.h>
13078
13079int
Illia Bobyra96d5442023-08-30 16:30:15 +020013080main (void)
Bram Moolenaarb3a29552021-11-19 11:28:04 +000013081{
13082if (cur_term) del_curterm(cur_term);
13083 ;
13084 return 0;
13085}
13086_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013087if ac_fn_c_try_link "$LINENO"
13088then :
13089 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13090printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_DEL_CURTERM 1" >>confdefs.h
Bram Moolenaarb3a29552021-11-19 11:28:04 +000013091
Illia Bobyra96d5442023-08-30 16:30:15 +020013092else $as_nop
13093 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13094printf "%s\n" "no" >&6; }
Bram Moolenaarb3a29552021-11-19 11:28:04 +000013095fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013096rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarb3a29552021-11-19 11:28:04 +000013097 conftest$ac_exeext conftest.$ac_ext
13098
Illia Bobyra96d5442023-08-30 16:30:15 +020013099{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13100printf %s "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013101cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013102/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013103
13104#include <sys/types.h>
13105#include <sys/time.h>
13106#include <sys/select.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013107int
Illia Bobyra96d5442023-08-30 16:30:15 +020013108main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013109{
Bram Moolenaar071d4272004-06-13 20:20:40 +000013110
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013111 ;
13112 return 0;
13113}
13114_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013115if ac_fn_c_try_compile "$LINENO"
13116then :
13117 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13118printf "%s\n" "yes" >&6; }
13119 printf "%s\n" "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013120
Illia Bobyra96d5442023-08-30 16:30:15 +020013121else $as_nop
13122 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13123printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013124fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013125rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000013126
Illia Bobyra96d5442023-08-30 16:30:15 +020013127{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13128printf %s "checking for /dev/ptc... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013129if test -r /dev/ptc; then
Illia Bobyra96d5442023-08-30 16:30:15 +020013130 printf "%s\n" "#define HAVE_DEV_PTC 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013131
Illia Bobyra96d5442023-08-30 16:30:15 +020013132 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13133printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013134else
Illia Bobyra96d5442023-08-30 16:30:15 +020013135 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13136printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013137fi
13138
Illia Bobyra96d5442023-08-30 16:30:15 +020013139{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SVR4 ptys" >&5
13140printf %s "checking for SVR4 ptys... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013141if test -c /dev/ptmx ; then
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013143/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013144
Bram Moolenaarce7be3a2020-11-26 20:11:11 +010013145// These should be in stdlib.h, but it depends on _XOPEN_SOURCE.
13146char *ptsname(int);
13147int unlockpt(int);
13148int grantpt(int);
13149
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013150int
Illia Bobyra96d5442023-08-30 16:30:15 +020013151main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013152{
Bram Moolenaarce7be3a2020-11-26 20:11:11 +010013153
13154 ptsname(0);
13155 grantpt(0);
13156 unlockpt(0);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013157 ;
13158 return 0;
13159}
13160_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013161if ac_fn_c_try_link "$LINENO"
13162then :
13163 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13164printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SVR4_PTYS 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013165
Illia Bobyra96d5442023-08-30 16:30:15 +020013166else $as_nop
13167 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13168printf "%s\n" "no" >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013169fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013170rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013171 conftest$ac_exeext conftest.$ac_ext
13172else
Illia Bobyra96d5442023-08-30 16:30:15 +020013173 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13174printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013175fi
13176
Illia Bobyra96d5442023-08-30 16:30:15 +020013177{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ptyranges" >&5
13178printf %s "checking for ptyranges... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013179if test -d /dev/ptym ; then
13180 pdir='/dev/ptym'
13181else
13182 pdir='/dev'
13183fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013184cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013185/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013186#ifdef M_UNIX
13187 yes;
13188#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013189
13190_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000013191if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Illia Bobyra96d5442023-08-30 16:30:15 +020013192 $EGREP "yes" >/dev/null 2>&1
13193then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000013194 ptys=`echo /dev/ptyp??`
Illia Bobyra96d5442023-08-30 16:30:15 +020013195else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000013196 ptys=`echo $pdir/pty??`
13197fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013198rm -rf conftest*
Bram Moolenaar071d4272004-06-13 20:20:40 +000013199
13200if test "$ptys" != "$pdir/pty??" ; then
13201 p0=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\).$/\1/g' | sort -u | tr -d '\012'`
13202 p1=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\)$/\1/g' | sort -u | tr -d '\012'`
Illia Bobyra96d5442023-08-30 16:30:15 +020013203 printf "%s\n" "#define PTYRANGE0 \"$p0\"" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013204
Illia Bobyra96d5442023-08-30 16:30:15 +020013205 printf "%s\n" "#define PTYRANGE1 \"$p1\"" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013206
Illia Bobyra96d5442023-08-30 16:30:15 +020013207 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $p0 / $p1" >&5
13208printf "%s\n" "$p0 / $p1" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013209else
Illia Bobyra96d5442023-08-30 16:30:15 +020013210 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: don't know" >&5
13211printf "%s\n" "don't know" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013212fi
13213
Bram Moolenaar446cb832008-06-24 21:56:24 +000013214
Illia Bobyra96d5442023-08-30 16:30:15 +020013215{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct sigcontext" >&5
13216printf %s "checking for struct sigcontext... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013217cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013218/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013219
13220#include <signal.h>
Sam Jamesf8ea1062022-11-05 15:13:50 +000013221int test_sig()
Bram Moolenaar071d4272004-06-13 20:20:40 +000013222{
13223 struct sigcontext *scont;
13224 scont = (struct sigcontext *)0;
13225 return 1;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013226}
13227int
Illia Bobyra96d5442023-08-30 16:30:15 +020013228main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013229{
Bram Moolenaar071d4272004-06-13 20:20:40 +000013230
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013231 ;
13232 return 0;
13233}
13234_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013235if ac_fn_c_try_compile "$LINENO"
13236then :
13237 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13238printf "%s\n" "yes" >&6; }
13239 printf "%s\n" "#define HAVE_SIGCONTEXT 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013240
Illia Bobyra96d5442023-08-30 16:30:15 +020013241else $as_nop
13242 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13243printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013244fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013245rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000013246
Illia Bobyra96d5442023-08-30 16:30:15 +020013247{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking getcwd implementation is broken" >&5
13248printf %s "checking getcwd implementation is broken... " >&6; }
13249if test ${vim_cv_getcwd_broken+y}
13250then :
13251 printf %s "(cached) " >&6
13252else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000013253
Illia Bobyra96d5442023-08-30 16:30:15 +020013254 if test "$cross_compiling" = yes
13255then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000013256
Bram Moolenaar7db77842014-03-27 17:40:59 +010013257 as_fn_error $? "cross-compiling: please set 'vim_cv_getcwd_broken'" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000013258
Illia Bobyra96d5442023-08-30 16:30:15 +020013259else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13261/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013262
Bram Moolenaar446cb832008-06-24 21:56:24 +000013263#include "confdefs.h"
13264#ifdef HAVE_UNISTD_H
13265#include <unistd.h>
13266#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000013267char *dagger[] = { "IFS=pwd", 0 };
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010013268int main()
Bram Moolenaar071d4272004-06-13 20:20:40 +000013269{
13270 char buffer[500];
13271 extern char **environ;
13272 environ = dagger;
13273 return getcwd(buffer, 500) ? 0 : 1;
13274}
Bram Moolenaar446cb832008-06-24 21:56:24 +000013275
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013276_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013277if ac_fn_c_try_run "$LINENO"
13278then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000013279
13280 vim_cv_getcwd_broken=no
13281
Illia Bobyra96d5442023-08-30 16:30:15 +020013282else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000013283
13284 vim_cv_getcwd_broken=yes
13285
13286fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013287rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13288 conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000013289fi
13290
13291
Bram Moolenaar446cb832008-06-24 21:56:24 +000013292fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013293{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_getcwd_broken" >&5
13294printf "%s\n" "$vim_cv_getcwd_broken" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000013295
13296if test "x$vim_cv_getcwd_broken" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020013297 printf "%s\n" "#define BAD_GETCWD 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013298
Bram Moolenaar63d25552019-05-10 21:28:38 +020013299 ac_fn_c_check_func "$LINENO" "getwd" "ac_cv_func_getwd"
Illia Bobyra96d5442023-08-30 16:30:15 +020013300if test "x$ac_cv_func_getwd" = xyes
13301then :
13302 printf "%s\n" "#define HAVE_GETWD 1" >>confdefs.h
Bram Moolenaar63d25552019-05-10 21:28:38 +020013303
Bram Moolenaar071d4272004-06-13 20:20:40 +000013304fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000013305
Illia Bobyra96d5442023-08-30 16:30:15 +020013306fi
13307
13308ac_fn_c_check_func "$LINENO" "fchdir" "ac_cv_func_fchdir"
13309if test "x$ac_cv_func_fchdir" = xyes
13310then :
13311 printf "%s\n" "#define HAVE_FCHDIR 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013312
Bram Moolenaar071d4272004-06-13 20:20:40 +000013313fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013314ac_fn_c_check_func "$LINENO" "fchown" "ac_cv_func_fchown"
13315if test "x$ac_cv_func_fchown" = xyes
13316then :
13317 printf "%s\n" "#define HAVE_FCHOWN 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013318
Illia Bobyra96d5442023-08-30 16:30:15 +020013319fi
13320ac_fn_c_check_func "$LINENO" "fchmod" "ac_cv_func_fchmod"
13321if test "x$ac_cv_func_fchmod" = xyes
13322then :
13323 printf "%s\n" "#define HAVE_FCHMOD 1" >>confdefs.h
13324
13325fi
13326ac_fn_c_check_func "$LINENO" "fsync" "ac_cv_func_fsync"
13327if test "x$ac_cv_func_fsync" = xyes
13328then :
13329 printf "%s\n" "#define HAVE_FSYNC 1" >>confdefs.h
13330
13331fi
13332ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
13333if test "x$ac_cv_func_getcwd" = xyes
13334then :
13335 printf "%s\n" "#define HAVE_GETCWD 1" >>confdefs.h
13336
13337fi
13338ac_fn_c_check_func "$LINENO" "getpseudotty" "ac_cv_func_getpseudotty"
13339if test "x$ac_cv_func_getpseudotty" = xyes
13340then :
13341 printf "%s\n" "#define HAVE_GETPSEUDOTTY 1" >>confdefs.h
13342
13343fi
13344ac_fn_c_check_func "$LINENO" "getpwent" "ac_cv_func_getpwent"
13345if test "x$ac_cv_func_getpwent" = xyes
13346then :
13347 printf "%s\n" "#define HAVE_GETPWENT 1" >>confdefs.h
13348
13349fi
13350ac_fn_c_check_func "$LINENO" "getpwnam" "ac_cv_func_getpwnam"
13351if test "x$ac_cv_func_getpwnam" = xyes
13352then :
13353 printf "%s\n" "#define HAVE_GETPWNAM 1" >>confdefs.h
13354
13355fi
13356ac_fn_c_check_func "$LINENO" "getpwuid" "ac_cv_func_getpwuid"
13357if test "x$ac_cv_func_getpwuid" = xyes
13358then :
13359 printf "%s\n" "#define HAVE_GETPWUID 1" >>confdefs.h
13360
13361fi
13362ac_fn_c_check_func "$LINENO" "getrlimit" "ac_cv_func_getrlimit"
13363if test "x$ac_cv_func_getrlimit" = xyes
13364then :
13365 printf "%s\n" "#define HAVE_GETRLIMIT 1" >>confdefs.h
13366
13367fi
13368ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
13369if test "x$ac_cv_func_gettimeofday" = xyes
13370then :
13371 printf "%s\n" "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
13372
13373fi
13374ac_fn_c_check_func "$LINENO" "localtime_r" "ac_cv_func_localtime_r"
13375if test "x$ac_cv_func_localtime_r" = xyes
13376then :
13377 printf "%s\n" "#define HAVE_LOCALTIME_R 1" >>confdefs.h
13378
13379fi
13380ac_fn_c_check_func "$LINENO" "lstat" "ac_cv_func_lstat"
13381if test "x$ac_cv_func_lstat" = xyes
13382then :
13383 printf "%s\n" "#define HAVE_LSTAT 1" >>confdefs.h
13384
13385fi
13386ac_fn_c_check_func "$LINENO" "memset" "ac_cv_func_memset"
13387if test "x$ac_cv_func_memset" = xyes
13388then :
13389 printf "%s\n" "#define HAVE_MEMSET 1" >>confdefs.h
13390
13391fi
13392ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
13393if test "x$ac_cv_func_mkdtemp" = xyes
13394then :
13395 printf "%s\n" "#define HAVE_MKDTEMP 1" >>confdefs.h
13396
13397fi
13398ac_fn_c_check_func "$LINENO" "nanosleep" "ac_cv_func_nanosleep"
13399if test "x$ac_cv_func_nanosleep" = xyes
13400then :
13401 printf "%s\n" "#define HAVE_NANOSLEEP 1" >>confdefs.h
13402
13403fi
13404ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
13405if test "x$ac_cv_func_opendir" = xyes
13406then :
13407 printf "%s\n" "#define HAVE_OPENDIR 1" >>confdefs.h
13408
13409fi
13410ac_fn_c_check_func "$LINENO" "putenv" "ac_cv_func_putenv"
13411if test "x$ac_cv_func_putenv" = xyes
13412then :
13413 printf "%s\n" "#define HAVE_PUTENV 1" >>confdefs.h
13414
13415fi
13416ac_fn_c_check_func "$LINENO" "qsort" "ac_cv_func_qsort"
13417if test "x$ac_cv_func_qsort" = xyes
13418then :
13419 printf "%s\n" "#define HAVE_QSORT 1" >>confdefs.h
13420
13421fi
13422ac_fn_c_check_func "$LINENO" "readlink" "ac_cv_func_readlink"
13423if test "x$ac_cv_func_readlink" = xyes
13424then :
13425 printf "%s\n" "#define HAVE_READLINK 1" >>confdefs.h
13426
13427fi
13428ac_fn_c_check_func "$LINENO" "select" "ac_cv_func_select"
13429if test "x$ac_cv_func_select" = xyes
13430then :
13431 printf "%s\n" "#define HAVE_SELECT 1" >>confdefs.h
13432
13433fi
13434ac_fn_c_check_func "$LINENO" "setenv" "ac_cv_func_setenv"
13435if test "x$ac_cv_func_setenv" = xyes
13436then :
13437 printf "%s\n" "#define HAVE_SETENV 1" >>confdefs.h
13438
13439fi
13440ac_fn_c_check_func "$LINENO" "getpgid" "ac_cv_func_getpgid"
13441if test "x$ac_cv_func_getpgid" = xyes
13442then :
13443 printf "%s\n" "#define HAVE_GETPGID 1" >>confdefs.h
13444
13445fi
13446ac_fn_c_check_func "$LINENO" "setpgid" "ac_cv_func_setpgid"
13447if test "x$ac_cv_func_setpgid" = xyes
13448then :
13449 printf "%s\n" "#define HAVE_SETPGID 1" >>confdefs.h
13450
13451fi
13452ac_fn_c_check_func "$LINENO" "setsid" "ac_cv_func_setsid"
13453if test "x$ac_cv_func_setsid" = xyes
13454then :
13455 printf "%s\n" "#define HAVE_SETSID 1" >>confdefs.h
13456
13457fi
13458ac_fn_c_check_func "$LINENO" "sigaltstack" "ac_cv_func_sigaltstack"
13459if test "x$ac_cv_func_sigaltstack" = xyes
13460then :
13461 printf "%s\n" "#define HAVE_SIGALTSTACK 1" >>confdefs.h
13462
13463fi
13464ac_fn_c_check_func "$LINENO" "sigstack" "ac_cv_func_sigstack"
13465if test "x$ac_cv_func_sigstack" = xyes
13466then :
13467 printf "%s\n" "#define HAVE_SIGSTACK 1" >>confdefs.h
13468
13469fi
13470ac_fn_c_check_func "$LINENO" "sigset" "ac_cv_func_sigset"
13471if test "x$ac_cv_func_sigset" = xyes
13472then :
13473 printf "%s\n" "#define HAVE_SIGSET 1" >>confdefs.h
13474
13475fi
13476ac_fn_c_check_func "$LINENO" "sigsetjmp" "ac_cv_func_sigsetjmp"
13477if test "x$ac_cv_func_sigsetjmp" = xyes
13478then :
13479 printf "%s\n" "#define HAVE_SIGSETJMP 1" >>confdefs.h
13480
13481fi
13482ac_fn_c_check_func "$LINENO" "sigaction" "ac_cv_func_sigaction"
13483if test "x$ac_cv_func_sigaction" = xyes
13484then :
13485 printf "%s\n" "#define HAVE_SIGACTION 1" >>confdefs.h
13486
13487fi
13488ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
13489if test "x$ac_cv_func_sigprocmask" = xyes
13490then :
13491 printf "%s\n" "#define HAVE_SIGPROCMASK 1" >>confdefs.h
13492
13493fi
13494ac_fn_c_check_func "$LINENO" "sigvec" "ac_cv_func_sigvec"
13495if test "x$ac_cv_func_sigvec" = xyes
13496then :
13497 printf "%s\n" "#define HAVE_SIGVEC 1" >>confdefs.h
13498
13499fi
13500ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
13501if test "x$ac_cv_func_strcasecmp" = xyes
13502then :
13503 printf "%s\n" "#define HAVE_STRCASECMP 1" >>confdefs.h
13504
13505fi
13506ac_fn_c_check_func "$LINENO" "strcoll" "ac_cv_func_strcoll"
13507if test "x$ac_cv_func_strcoll" = xyes
13508then :
13509 printf "%s\n" "#define HAVE_STRCOLL 1" >>confdefs.h
13510
13511fi
13512ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror"
13513if test "x$ac_cv_func_strerror" = xyes
13514then :
13515 printf "%s\n" "#define HAVE_STRERROR 1" >>confdefs.h
13516
13517fi
13518ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
13519if test "x$ac_cv_func_strftime" = xyes
13520then :
13521 printf "%s\n" "#define HAVE_STRFTIME 1" >>confdefs.h
13522
13523fi
13524ac_fn_c_check_func "$LINENO" "stricmp" "ac_cv_func_stricmp"
13525if test "x$ac_cv_func_stricmp" = xyes
13526then :
13527 printf "%s\n" "#define HAVE_STRICMP 1" >>confdefs.h
13528
13529fi
13530ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp"
13531if test "x$ac_cv_func_strncasecmp" = xyes
13532then :
13533 printf "%s\n" "#define HAVE_STRNCASECMP 1" >>confdefs.h
13534
13535fi
13536ac_fn_c_check_func "$LINENO" "strnicmp" "ac_cv_func_strnicmp"
13537if test "x$ac_cv_func_strnicmp" = xyes
13538then :
13539 printf "%s\n" "#define HAVE_STRNICMP 1" >>confdefs.h
13540
13541fi
13542ac_fn_c_check_func "$LINENO" "strpbrk" "ac_cv_func_strpbrk"
13543if test "x$ac_cv_func_strpbrk" = xyes
13544then :
13545 printf "%s\n" "#define HAVE_STRPBRK 1" >>confdefs.h
13546
13547fi
13548ac_fn_c_check_func "$LINENO" "strptime" "ac_cv_func_strptime"
13549if test "x$ac_cv_func_strptime" = xyes
13550then :
13551 printf "%s\n" "#define HAVE_STRPTIME 1" >>confdefs.h
13552
13553fi
13554ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol"
13555if test "x$ac_cv_func_strtol" = xyes
13556then :
13557 printf "%s\n" "#define HAVE_STRTOL 1" >>confdefs.h
13558
13559fi
13560ac_fn_c_check_func "$LINENO" "tgetent" "ac_cv_func_tgetent"
13561if test "x$ac_cv_func_tgetent" = xyes
13562then :
13563 printf "%s\n" "#define HAVE_TGETENT 1" >>confdefs.h
13564
13565fi
13566ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
13567if test "x$ac_cv_func_towlower" = xyes
13568then :
13569 printf "%s\n" "#define HAVE_TOWLOWER 1" >>confdefs.h
13570
13571fi
13572ac_fn_c_check_func "$LINENO" "towupper" "ac_cv_func_towupper"
13573if test "x$ac_cv_func_towupper" = xyes
13574then :
13575 printf "%s\n" "#define HAVE_TOWUPPER 1" >>confdefs.h
13576
13577fi
13578ac_fn_c_check_func "$LINENO" "iswupper" "ac_cv_func_iswupper"
13579if test "x$ac_cv_func_iswupper" = xyes
13580then :
13581 printf "%s\n" "#define HAVE_ISWUPPER 1" >>confdefs.h
13582
13583fi
13584ac_fn_c_check_func "$LINENO" "tzset" "ac_cv_func_tzset"
13585if test "x$ac_cv_func_tzset" = xyes
13586then :
13587 printf "%s\n" "#define HAVE_TZSET 1" >>confdefs.h
13588
13589fi
13590ac_fn_c_check_func "$LINENO" "usleep" "ac_cv_func_usleep"
13591if test "x$ac_cv_func_usleep" = xyes
13592then :
13593 printf "%s\n" "#define HAVE_USLEEP 1" >>confdefs.h
13594
13595fi
13596ac_fn_c_check_func "$LINENO" "utime" "ac_cv_func_utime"
13597if test "x$ac_cv_func_utime" = xyes
13598then :
13599 printf "%s\n" "#define HAVE_UTIME 1" >>confdefs.h
13600
13601fi
13602ac_fn_c_check_func "$LINENO" "utimes" "ac_cv_func_utimes"
13603if test "x$ac_cv_func_utimes" = xyes
13604then :
13605 printf "%s\n" "#define HAVE_UTIMES 1" >>confdefs.h
13606
13607fi
13608ac_fn_c_check_func "$LINENO" "mblen" "ac_cv_func_mblen"
13609if test "x$ac_cv_func_mblen" = xyes
13610then :
13611 printf "%s\n" "#define HAVE_MBLEN 1" >>confdefs.h
13612
13613fi
13614ac_fn_c_check_func "$LINENO" "ftruncate" "ac_cv_func_ftruncate"
13615if test "x$ac_cv_func_ftruncate" = xyes
13616then :
13617 printf "%s\n" "#define HAVE_FTRUNCATE 1" >>confdefs.h
13618
13619fi
13620ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
13621if test "x$ac_cv_func_unsetenv" = xyes
13622then :
13623 printf "%s\n" "#define HAVE_UNSETENV 1" >>confdefs.h
13624
13625fi
13626ac_fn_c_check_func "$LINENO" "posix_openpt" "ac_cv_func_posix_openpt"
13627if test "x$ac_cv_func_posix_openpt" = xyes
13628then :
13629 printf "%s\n" "#define HAVE_POSIX_OPENPT 1" >>confdefs.h
13630
13631fi
13632ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
13633if test "x$ac_cv_func_clock_gettime" = xyes
13634then :
13635 printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
Bram Moolenaar643b6142018-09-12 20:29:09 +020013636
13637fi
13638
Bram Moolenaar643b6142018-09-12 20:29:09 +020013639
Illia Bobyra96d5442023-08-30 16:30:15 +020013640
13641
13642{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking types of arguments for select" >&5
13643printf %s "checking types of arguments for select... " >&6; }
13644if test ${ac_cv_func_select_args+y}
13645then :
13646 printf %s "(cached) " >&6
13647else $as_nop
13648 ac_cv_func_select_args='int,int *,struct timeval *'
13649for ac_arg234 in 'fd_set *' 'int *' 'void *'; do
Bram Moolenaar643b6142018-09-12 20:29:09 +020013650 for ac_arg1 in 'int' 'size_t' 'unsigned long int' 'unsigned int'; do
13651 for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do
13652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13653/* end confdefs.h. */
13654$ac_includes_default
13655#ifdef HAVE_SYS_SELECT_H
13656# include <sys/select.h>
13657#endif
13658#ifdef HAVE_SYS_SOCKET_H
13659# include <sys/socket.h>
13660#endif
13661
13662int
Illia Bobyra96d5442023-08-30 16:30:15 +020013663main (void)
Bram Moolenaar643b6142018-09-12 20:29:09 +020013664{
13665extern int select ($ac_arg1,
13666 $ac_arg234, $ac_arg234, $ac_arg234,
13667 $ac_arg5);
13668 ;
13669 return 0;
13670}
13671_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013672if ac_fn_c_try_compile "$LINENO"
13673then :
Bram Moolenaar643b6142018-09-12 20:29:09 +020013674 ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3
13675fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013676rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar643b6142018-09-12 20:29:09 +020013677 done
13678 done
13679done
Bram Moolenaar643b6142018-09-12 20:29:09 +020013680
13681fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013682{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_select_args" >&5
13683printf "%s\n" "$ac_cv_func_select_args" >&6; }
Bram Moolenaar643b6142018-09-12 20:29:09 +020013684ac_save_IFS=$IFS; IFS=','
13685set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'`
13686IFS=$ac_save_IFS
13687shift
13688
Illia Bobyra96d5442023-08-30 16:30:15 +020013689printf "%s\n" "#define SELECT_TYPE_ARG1 $1" >>confdefs.h
Bram Moolenaar643b6142018-09-12 20:29:09 +020013690
13691
Illia Bobyra96d5442023-08-30 16:30:15 +020013692printf "%s\n" "#define SELECT_TYPE_ARG234 ($2)" >>confdefs.h
Bram Moolenaar643b6142018-09-12 20:29:09 +020013693
13694
Illia Bobyra96d5442023-08-30 16:30:15 +020013695printf "%s\n" "#define SELECT_TYPE_ARG5 ($3)" >>confdefs.h
Bram Moolenaar643b6142018-09-12 20:29:09 +020013696
Illia Bobyra96d5442023-08-30 16:30:15 +020013697rm -rf conftest*
Bram Moolenaar643b6142018-09-12 20:29:09 +020013698
Illia Bobyra96d5442023-08-30 16:30:15 +020013699{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
13700printf %s "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
13701if test ${ac_cv_sys_largefile_source+y}
13702then :
13703 printf %s "(cached) " >&6
13704else $as_nop
Bram Moolenaar25153e12010-02-24 14:47:08 +010013705 while :; do
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar25153e12010-02-24 14:47:08 +010013707/* end confdefs.h. */
13708#include <sys/types.h> /* for off_t */
13709 #include <stdio.h>
13710int
Illia Bobyra96d5442023-08-30 16:30:15 +020013711main (void)
Bram Moolenaar25153e12010-02-24 14:47:08 +010013712{
13713int (*fp) (FILE *, off_t, int) = fseeko;
13714 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
13715 ;
13716 return 0;
13717}
13718_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013719if ac_fn_c_try_link "$LINENO"
13720then :
Bram Moolenaar25153e12010-02-24 14:47:08 +010013721 ac_cv_sys_largefile_source=no; break
Bram Moolenaar25153e12010-02-24 14:47:08 +010013722fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013723rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013724 conftest$ac_exeext conftest.$ac_ext
13725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar25153e12010-02-24 14:47:08 +010013726/* end confdefs.h. */
13727#define _LARGEFILE_SOURCE 1
13728#include <sys/types.h> /* for off_t */
13729 #include <stdio.h>
13730int
Illia Bobyra96d5442023-08-30 16:30:15 +020013731main (void)
Bram Moolenaar25153e12010-02-24 14:47:08 +010013732{
13733int (*fp) (FILE *, off_t, int) = fseeko;
13734 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
13735 ;
13736 return 0;
13737}
13738_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013739if ac_fn_c_try_link "$LINENO"
13740then :
Bram Moolenaar25153e12010-02-24 14:47:08 +010013741 ac_cv_sys_largefile_source=1; break
Bram Moolenaar25153e12010-02-24 14:47:08 +010013742fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013743rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013744 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar25153e12010-02-24 14:47:08 +010013745 ac_cv_sys_largefile_source=unknown
13746 break
13747done
13748fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013749{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
13750printf "%s\n" "$ac_cv_sys_largefile_source" >&6; }
Bram Moolenaar25153e12010-02-24 14:47:08 +010013751case $ac_cv_sys_largefile_source in #(
13752 no | unknown) ;;
13753 *)
Illia Bobyra96d5442023-08-30 16:30:15 +020013754printf "%s\n" "#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source" >>confdefs.h
Bram Moolenaar25153e12010-02-24 14:47:08 +010013755;;
13756esac
13757rm -rf conftest*
13758
13759# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
13760# in glibc 2.1.3, but that breaks too many other things.
13761# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
13762if test $ac_cv_sys_largefile_source != unknown; then
13763
Illia Bobyra96d5442023-08-30 16:30:15 +020013764printf "%s\n" "#define HAVE_FSEEKO 1" >>confdefs.h
Bram Moolenaar25153e12010-02-24 14:47:08 +010013765
13766fi
13767
Bram Moolenaar071d4272004-06-13 20:20:40 +000013768
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013769# Check whether --enable-largefile was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020013770if test ${enable_largefile+y}
13771then :
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013772 enableval=$enable_largefile;
13773fi
13774
13775if test "$enable_largefile" != no; then
13776
Illia Bobyra96d5442023-08-30 16:30:15 +020013777 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
13778printf %s "checking for special C compiler options needed for large files... " >&6; }
13779if test ${ac_cv_sys_largefile_CC+y}
13780then :
13781 printf %s "(cached) " >&6
13782else $as_nop
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013783 ac_cv_sys_largefile_CC=no
13784 if test "$GCC" != yes; then
13785 ac_save_CC=$CC
13786 while :; do
13787 # IRIX 6.2 and later do not support large files by default,
13788 # so use the C compiler's -n32 option if that helps.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013790/* end confdefs.h. */
13791#include <sys/types.h>
13792 /* Check that off_t can represent 2**63 - 1 correctly.
13793 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13794 since some C++ compilers masquerading as C compilers
13795 incorrectly reject 9223372036854775807. */
Illia Bobyra96d5442023-08-30 16:30:15 +020013796#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013797 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13798 && LARGE_OFF_T % 2147483647 == 1)
13799 ? 1 : -1];
13800int
Illia Bobyra96d5442023-08-30 16:30:15 +020013801main (void)
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013802{
13803
13804 ;
13805 return 0;
13806}
13807_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013808 if ac_fn_c_try_compile "$LINENO"
13809then :
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013810 break
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013811fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013812rm -f core conftest.err conftest.$ac_objext conftest.beam
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013813 CC="$CC -n32"
Illia Bobyra96d5442023-08-30 16:30:15 +020013814 if ac_fn_c_try_compile "$LINENO"
13815then :
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013816 ac_cv_sys_largefile_CC=' -n32'; break
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013817fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013818rm -f core conftest.err conftest.$ac_objext conftest.beam
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013819 break
13820 done
13821 CC=$ac_save_CC
13822 rm -f conftest.$ac_ext
13823 fi
13824fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013825{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
13826printf "%s\n" "$ac_cv_sys_largefile_CC" >&6; }
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013827 if test "$ac_cv_sys_largefile_CC" != no; then
13828 CC=$CC$ac_cv_sys_largefile_CC
13829 fi
13830
Illia Bobyra96d5442023-08-30 16:30:15 +020013831 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
13832printf %s "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
13833if test ${ac_cv_sys_file_offset_bits+y}
13834then :
13835 printf %s "(cached) " >&6
13836else $as_nop
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013837 while :; do
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013839/* end confdefs.h. */
13840#include <sys/types.h>
13841 /* Check that off_t can represent 2**63 - 1 correctly.
13842 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13843 since some C++ compilers masquerading as C compilers
13844 incorrectly reject 9223372036854775807. */
Illia Bobyra96d5442023-08-30 16:30:15 +020013845#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013846 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13847 && LARGE_OFF_T % 2147483647 == 1)
13848 ? 1 : -1];
13849int
Illia Bobyra96d5442023-08-30 16:30:15 +020013850main (void)
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013851{
13852
13853 ;
13854 return 0;
13855}
13856_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013857if ac_fn_c_try_compile "$LINENO"
13858then :
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013859 ac_cv_sys_file_offset_bits=no; break
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013860fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013861rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013863/* end confdefs.h. */
13864#define _FILE_OFFSET_BITS 64
13865#include <sys/types.h>
13866 /* Check that off_t can represent 2**63 - 1 correctly.
13867 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13868 since some C++ compilers masquerading as C compilers
13869 incorrectly reject 9223372036854775807. */
Illia Bobyra96d5442023-08-30 16:30:15 +020013870#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013871 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13872 && LARGE_OFF_T % 2147483647 == 1)
13873 ? 1 : -1];
13874int
Illia Bobyra96d5442023-08-30 16:30:15 +020013875main (void)
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013876{
13877
13878 ;
13879 return 0;
13880}
13881_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013882if ac_fn_c_try_compile "$LINENO"
13883then :
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013884 ac_cv_sys_file_offset_bits=64; break
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013885fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013886rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013887 ac_cv_sys_file_offset_bits=unknown
13888 break
13889done
13890fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013891{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
13892printf "%s\n" "$ac_cv_sys_file_offset_bits" >&6; }
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013893case $ac_cv_sys_file_offset_bits in #(
13894 no | unknown) ;;
13895 *)
Illia Bobyra96d5442023-08-30 16:30:15 +020013896printf "%s\n" "#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits" >>confdefs.h
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013897;;
13898esac
13899rm -rf conftest*
13900 if test $ac_cv_sys_file_offset_bits = unknown; then
Illia Bobyra96d5442023-08-30 16:30:15 +020013901 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
13902printf %s "checking for _LARGE_FILES value needed for large files... " >&6; }
13903if test ${ac_cv_sys_large_files+y}
13904then :
13905 printf %s "(cached) " >&6
13906else $as_nop
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013907 while :; do
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013909/* end confdefs.h. */
13910#include <sys/types.h>
13911 /* Check that off_t can represent 2**63 - 1 correctly.
13912 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13913 since some C++ compilers masquerading as C compilers
13914 incorrectly reject 9223372036854775807. */
Illia Bobyra96d5442023-08-30 16:30:15 +020013915#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013916 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13917 && LARGE_OFF_T % 2147483647 == 1)
13918 ? 1 : -1];
13919int
Illia Bobyra96d5442023-08-30 16:30:15 +020013920main (void)
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013921{
13922
13923 ;
13924 return 0;
13925}
13926_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013927if ac_fn_c_try_compile "$LINENO"
13928then :
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013929 ac_cv_sys_large_files=no; break
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013930fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013931rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013933/* end confdefs.h. */
13934#define _LARGE_FILES 1
13935#include <sys/types.h>
13936 /* Check that off_t can represent 2**63 - 1 correctly.
13937 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13938 since some C++ compilers masquerading as C compilers
13939 incorrectly reject 9223372036854775807. */
Illia Bobyra96d5442023-08-30 16:30:15 +020013940#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013941 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13942 && LARGE_OFF_T % 2147483647 == 1)
13943 ? 1 : -1];
13944int
Illia Bobyra96d5442023-08-30 16:30:15 +020013945main (void)
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013946{
13947
13948 ;
13949 return 0;
13950}
13951_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013952if ac_fn_c_try_compile "$LINENO"
13953then :
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013954 ac_cv_sys_large_files=1; break
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013955fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013956rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013957 ac_cv_sys_large_files=unknown
13958 break
13959done
13960fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013961{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
13962printf "%s\n" "$ac_cv_sys_large_files" >&6; }
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013963case $ac_cv_sys_large_files in #(
13964 no | unknown) ;;
13965 *)
Illia Bobyra96d5442023-08-30 16:30:15 +020013966printf "%s\n" "#define _LARGE_FILES $ac_cv_sys_large_files" >>confdefs.h
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013967;;
13968esac
13969rm -rf conftest*
13970 fi
13971fi
13972
13973
Illia Bobyra96d5442023-08-30 16:30:15 +020013974{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-canberra argument" >&5
13975printf %s "checking --enable-canberra argument... " >&6; }
Bram Moolenaar21606672019-06-14 20:40:58 +020013976# Check whether --enable-canberra was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020013977if test ${enable_canberra+y}
13978then :
Bram Moolenaar21606672019-06-14 20:40:58 +020013979 enableval=$enable_canberra;
Illia Bobyra96d5442023-08-30 16:30:15 +020013980else $as_nop
Bram Moolenaar21606672019-06-14 20:40:58 +020013981 enable_canberra="maybe"
13982fi
Bram Moolenaar427f5b62019-06-09 13:43:51 +020013983
Bram Moolenaar21606672019-06-14 20:40:58 +020013984
13985if test "$enable_canberra" = "maybe"; then
Martin Tournoij25f3a142022-10-08 19:26:41 +010013986 if test "$features" = "huge"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020013987 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to yes" >&5
13988printf "%s\n" "Defaulting to yes" >&6; }
Bram Moolenaar21606672019-06-14 20:40:58 +020013989 enable_canberra="yes"
13990 else
Illia Bobyra96d5442023-08-30 16:30:15 +020013991 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to no" >&5
13992printf "%s\n" "Defaulting to no" >&6; }
Bram Moolenaar21606672019-06-14 20:40:58 +020013993 enable_canberra="no"
13994 fi
13995else
Bram Moolenaar12471262022-01-18 11:11:25 +000013996 if test "$enable_canberra" = "yes" -a "$has_eval" = "no"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020013997 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot use sound with tiny features" >&5
13998printf "%s\n" "cannot use sound with tiny features" >&6; }
Bram Moolenaar12471262022-01-18 11:11:25 +000013999 enable_canberra="no"
14000 else
Illia Bobyra96d5442023-08-30 16:30:15 +020014001 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_canberra" >&5
14002printf "%s\n" "$enable_canberra" >&6; }
Bram Moolenaar12471262022-01-18 11:11:25 +000014003 fi
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014004fi
Bram Moolenaar21606672019-06-14 20:40:58 +020014005if test "$enable_canberra" = "yes"; then
14006 if test "x$PKG_CONFIG" != "xno"; then
14007 canberra_lib=`$PKG_CONFIG --libs libcanberra 2>/dev/null`
14008 canberra_cflags=`$PKG_CONFIG --cflags libcanberra 2>/dev/null`
14009 fi
14010 if test "x$canberra_lib" = "x"; then
14011 canberra_lib=-lcanberra
14012 canberra_cflags=-D_REENTRANT
14013 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014014 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcanberra" >&5
14015printf %s "checking for libcanberra... " >&6; }
Bram Moolenaar21606672019-06-14 20:40:58 +020014016 ac_save_CFLAGS="$CFLAGS"
14017 ac_save_LIBS="$LIBS"
Bram Moolenaar12471262022-01-18 11:11:25 +000014018 if `echo "$CFLAGS" | grep -v "$canberra_cflags" 2>/dev/null`; then
Christian Brabandt6b9efdd2021-09-09 17:14:50 +020014019 CFLAGS="$CFLAGS $canberra_cflags"
14020 fi
Bram Moolenaar21606672019-06-14 20:40:58 +020014021 LIBS="$LIBS $canberra_lib"
14022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014023/* end confdefs.h. */
14024
Bram Moolenaar21606672019-06-14 20:40:58 +020014025 # include <canberra.h>
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014026
14027int
Illia Bobyra96d5442023-08-30 16:30:15 +020014028main (void)
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014029{
14030
Bram Moolenaar21606672019-06-14 20:40:58 +020014031 ca_context *hello;
14032 ca_context_create(&hello);
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014033 ;
14034 return 0;
14035}
14036_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014037if ac_fn_c_try_link "$LINENO"
14038then :
14039 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14040printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_CANBERRA 1" >>confdefs.h
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014041
Illia Bobyra96d5442023-08-30 16:30:15 +020014042else $as_nop
14043 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no; try installing libcanberra-dev" >&5
14044printf "%s\n" "no; try installing libcanberra-dev" >&6; }; CFLAGS="$ac_save_CFLAGS"; LIBS="$ac_save_LIBS"
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014045fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014046rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014047 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar21606672019-06-14 20:40:58 +020014048fi
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014049
Illia Bobyra96d5442023-08-30 16:30:15 +020014050{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-libsodium argument" >&5
14051printf %s "checking --enable-libsodium argument... " >&6; }
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014052# Check whether --enable-libsodium was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020014053if test ${enable_libsodium+y}
14054then :
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014055 enableval=$enable_libsodium;
Illia Bobyra96d5442023-08-30 16:30:15 +020014056else $as_nop
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014057 enable_libsodium="maybe"
14058fi
14059
14060
14061if test "$enable_libsodium" = "maybe"; then
Martin Tournoij25f3a142022-10-08 19:26:41 +010014062 if test "$features" = "huge"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014063 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to yes" >&5
14064printf "%s\n" "Defaulting to yes" >&6; }
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014065 enable_libsodium="yes"
14066 else
Illia Bobyra96d5442023-08-30 16:30:15 +020014067 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to no" >&5
14068printf "%s\n" "Defaulting to no" >&6; }
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014069 enable_libsodium="no"
14070 fi
14071else
Illia Bobyra96d5442023-08-30 16:30:15 +020014072 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_libsodium" >&5
14073printf "%s\n" "$enable_libsodium" >&6; }
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014074fi
14075if test "$enable_libsodium" = "yes"; then
14076 if test "x$PKG_CONFIG" != "xno"; then
14077 libsodium_lib=`$PKG_CONFIG --libs libsodium 2>/dev/null`
14078 libsodium_cflags=`$PKG_CONFIG --cflags libsodium 2>/dev/null`
14079 fi
14080 if test "x$libsodium_lib" = "x"; then
14081 libsodium_lib=-lsodium
14082 libsodium_cflags=
14083 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014084 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libsodium" >&5
14085printf %s "checking for libsodium... " >&6; }
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014086 ac_save_CFLAGS="$CFLAGS"
14087 ac_save_LIBS="$LIBS"
14088 CFLAGS="$CFLAGS $libsodium_cflags"
14089 LIBS="$LIBS $libsodium_lib"
14090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14091/* end confdefs.h. */
14092
14093 # include <sodium.h>
14094
14095int
Illia Bobyra96d5442023-08-30 16:30:15 +020014096main (void)
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014097{
14098
14099 printf("%d", sodium_init());
14100 ;
14101 return 0;
14102}
14103_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014104if ac_fn_c_try_link "$LINENO"
14105then :
14106 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14107printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SODIUM 1" >>confdefs.h
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014108
Illia Bobyra96d5442023-08-30 16:30:15 +020014109else $as_nop
14110 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no; try installing libsodium-dev" >&5
14111printf "%s\n" "no; try installing libsodium-dev" >&6; }; CFLAGS="$ac_save_CFLAGS"; LIBS="$ac_save_LIBS"
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014112fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014113rm -f core conftest.err conftest.$ac_objext conftest.beam \
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014114 conftest$ac_exeext conftest.$ac_ext
14115fi
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014116
Illia Bobyra96d5442023-08-30 16:30:15 +020014117{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for st_blksize" >&5
14118printf %s "checking for st_blksize... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014119cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014120/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000014121#include <sys/types.h>
14122#include <sys/stat.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014123int
Illia Bobyra96d5442023-08-30 16:30:15 +020014124main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014125{
Bram Moolenaar071d4272004-06-13 20:20:40 +000014126 struct stat st;
14127 int n;
14128
14129 stat("/", &st);
14130 n = (int)st.st_blksize;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014131 ;
14132 return 0;
14133}
14134_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014135if ac_fn_c_try_compile "$LINENO"
14136then :
14137 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14138printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_ST_BLKSIZE 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000014139
Illia Bobyra96d5442023-08-30 16:30:15 +020014140else $as_nop
14141 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14142printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000014143fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014144rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000014145
Illia Bobyra96d5442023-08-30 16:30:15 +020014146{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for timer_create without -lrt" >&5
14147printf %s "checking for timer_create without -lrt... " >&6; }
14148if test ${vim_cv_timer_create+y}
14149then :
14150 printf %s "(cached) " >&6
14151else $as_nop
Bram Moolenaar5748b7f2022-07-28 12:09:04 +010014152
Illia Bobyra96d5442023-08-30 16:30:15 +020014153if test "$cross_compiling" = yes
14154then :
14155 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: failed to build test program; if cross-compiling please set 'vim_cv_timer_create'" >&5
14156printf "%s\n" "$as_me: WARNING: failed to build test program; if cross-compiling please set 'vim_cv_timer_create'" >&2;}
Richard Purdie509695c2022-07-24 20:48:00 +010014157
Illia Bobyra96d5442023-08-30 16:30:15 +020014158else $as_nop
Bram Moolenaarf2ce76a2022-07-02 11:40:40 +010014159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Paul Ollis65745772022-06-05 16:55:54 +010014160/* end confdefs.h. */
14161
Bram Moolenaar5748b7f2022-07-28 12:09:04 +010014162#if STDC_HEADERS
14163# include <stdlib.h>
14164# include <stddef.h>
14165#endif
14166#include <signal.h>
14167#include <time.h>
Bram Moolenaare5303952022-06-19 17:05:47 +010014168static void set_flag(union sigval sv) {}
Paul Ollis65745772022-06-05 16:55:54 +010014169
14170int
Illia Bobyra96d5442023-08-30 16:30:15 +020014171main (void)
Paul Ollis65745772022-06-05 16:55:54 +010014172{
14173
14174 struct timespec ts;
14175 struct sigevent action = {0};
14176 timer_t timer_id;
14177
14178 action.sigev_notify = SIGEV_THREAD;
14179 action.sigev_notify_function = set_flag;
Bram Moolenaarf2ce76a2022-07-02 11:40:40 +010014180 if (timer_create(CLOCK_MONOTONIC, &action, &timer_id) < 0)
14181 exit(1); // cannot create a monotonic timer
Paul Ollis65745772022-06-05 16:55:54 +010014182
14183 ;
14184 return 0;
14185}
14186_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014187if ac_fn_c_try_run "$LINENO"
14188then :
Richard Purdie509695c2022-07-24 20:48:00 +010014189 vim_cv_timer_create=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020014190else $as_nop
Richard Purdie509695c2022-07-24 20:48:00 +010014191 vim_cv_timer_create=no
Paul Ollis65745772022-06-05 16:55:54 +010014192fi
Bram Moolenaarf2ce76a2022-07-02 11:40:40 +010014193rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14194 conftest.$ac_objext conftest.beam conftest.$ac_ext
Paul Ollis65745772022-06-05 16:55:54 +010014195fi
Bram Moolenaarf2ce76a2022-07-02 11:40:40 +010014196
14197fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014198{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_timer_create" >&5
14199printf "%s\n" "$vim_cv_timer_create" >&6; }
Bram Moolenaarefffa532022-07-28 22:39:54 +010014200
14201if test "x$vim_cv_timer_create" = "xno" ; then
14202 save_LIBS="$LIBS"
14203 LIBS="$LIBS -lrt"
Illia Bobyra96d5442023-08-30 16:30:15 +020014204 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for timer_create with -lrt" >&5
14205printf %s "checking for timer_create with -lrt... " >&6; }
14206if test ${vim_cv_timer_create_with_lrt+y}
14207then :
14208 printf %s "(cached) " >&6
14209else $as_nop
Bram Moolenaarefffa532022-07-28 22:39:54 +010014210
Illia Bobyra96d5442023-08-30 16:30:15 +020014211 if test "$cross_compiling" = yes
14212then :
14213 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: failed to build test program; if cross-compiling please set 'vim_cv_timer_create_with_lrt'" >&5
14214printf "%s\n" "$as_me: WARNING: failed to build test program; if cross-compiling please set 'vim_cv_timer_create_with_lrt'" >&2;}
Bram Moolenaarefffa532022-07-28 22:39:54 +010014215
Illia Bobyra96d5442023-08-30 16:30:15 +020014216else $as_nop
Bram Moolenaarefffa532022-07-28 22:39:54 +010014217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14218/* end confdefs.h. */
14219
14220 #if STDC_HEADERS
14221 # include <stdlib.h>
14222 # include <stddef.h>
14223 #endif
14224 #include <signal.h>
14225 #include <time.h>
14226 static void set_flag(union sigval sv) {}
14227
14228int
Illia Bobyra96d5442023-08-30 16:30:15 +020014229main (void)
Bram Moolenaarefffa532022-07-28 22:39:54 +010014230{
14231
14232 struct timespec ts;
14233 struct sigevent action = {0};
14234 timer_t timer_id;
14235
14236 action.sigev_notify = SIGEV_THREAD;
14237 action.sigev_notify_function = set_flag;
14238 if (timer_create(CLOCK_MONOTONIC, &action, &timer_id) < 0)
14239 exit(1); // cannot create a monotonic timer
14240
14241 ;
14242 return 0;
14243}
14244_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014245if ac_fn_c_try_run "$LINENO"
14246then :
Bram Moolenaarefffa532022-07-28 22:39:54 +010014247 vim_cv_timer_create_with_lrt=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020014248else $as_nop
Bram Moolenaarefffa532022-07-28 22:39:54 +010014249 vim_cv_timer_create_with_lrt=no
14250fi
Bram Moolenaarf2ce76a2022-07-02 11:40:40 +010014251rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14252 conftest.$ac_objext conftest.beam conftest.$ac_ext
14253fi
14254
Richard Purdie509695c2022-07-24 20:48:00 +010014255fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014256{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_timer_create_with_lrt" >&5
14257printf "%s\n" "$vim_cv_timer_create_with_lrt" >&6; }
Bram Moolenaarefffa532022-07-28 22:39:54 +010014258 LIBS="$save_LIBS"
14259else
14260 vim_cv_timer_create_with_lrt=no
14261fi
Richard Purdie509695c2022-07-24 20:48:00 +010014262
14263if test "x$vim_cv_timer_create" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014264 printf "%s\n" "#define HAVE_TIMER_CREATE 1" >>confdefs.h
Richard Purdie509695c2022-07-24 20:48:00 +010014265
14266fi
Bram Moolenaarefffa532022-07-28 22:39:54 +010014267if test "x$vim_cv_timer_create_with_lrt" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014268 printf "%s\n" "#define HAVE_TIMER_CREATE 1" >>confdefs.h
Richard Purdie509695c2022-07-24 20:48:00 +010014269
Bram Moolenaarefffa532022-07-28 22:39:54 +010014270 LIBS="$LIBS -lrt"
14271fi
Richard Purdie509695c2022-07-24 20:48:00 +010014272
Illia Bobyra96d5442023-08-30 16:30:15 +020014273{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat() ignores a trailing slash" >&5
14274printf %s "checking whether stat() ignores a trailing slash... " >&6; }
14275if test ${vim_cv_stat_ignores_slash+y}
14276then :
14277 printf %s "(cached) " >&6
14278else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000014279
Illia Bobyra96d5442023-08-30 16:30:15 +020014280 if test "$cross_compiling" = yes
14281then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000014282
Bram Moolenaar7db77842014-03-27 17:40:59 +010014283 as_fn_error $? "cross-compiling: please set 'vim_cv_stat_ignores_slash'" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000014284
Illia Bobyra96d5442023-08-30 16:30:15 +020014285else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14287/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000014288
14289#include "confdefs.h"
14290#if STDC_HEADERS
14291# include <stdlib.h>
14292# include <stddef.h>
14293#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000014294#include <sys/types.h>
14295#include <sys/stat.h>
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010014296int main() {struct stat st; exit(stat("configure/", &st) != 0); }
Bram Moolenaar446cb832008-06-24 21:56:24 +000014297
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014298_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014299if ac_fn_c_try_run "$LINENO"
14300then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000014301
14302 vim_cv_stat_ignores_slash=yes
Bram Moolenaar071d4272004-06-13 20:20:40 +000014303
Illia Bobyra96d5442023-08-30 16:30:15 +020014304else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000014305
14306 vim_cv_stat_ignores_slash=no
14307
Bram Moolenaar071d4272004-06-13 20:20:40 +000014308fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014309rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14310 conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000014311fi
14312
Bram Moolenaar446cb832008-06-24 21:56:24 +000014313
Bram Moolenaar446cb832008-06-24 21:56:24 +000014314fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014315{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_stat_ignores_slash" >&5
14316printf "%s\n" "$vim_cv_stat_ignores_slash" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000014317
14318if test "x$vim_cv_stat_ignores_slash" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014319 printf "%s\n" "#define STAT_IGNORES_SLASH 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000014320
14321fi
14322
Illia Bobyra96d5442023-08-30 16:30:15 +020014323{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nanoseconds field of struct stat" >&5
14324printf %s "checking for nanoseconds field of struct stat... " >&6; }
14325if test ${ac_cv_struct_st_mtim_nsec+y}
14326then :
14327 printf %s "(cached) " >&6
14328else $as_nop
Leah Neukirchen0a7984a2021-10-14 21:27:55 +010014329 ac_save_CPPFLAGS="$CPPFLAGS"
14330 ac_cv_struct_st_mtim_nsec=no
14331 # st_mtim.tv_nsec -- the usual case
14332 # st_mtim._tv_nsec -- Solaris 2.6, if
14333 # (defined _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED == 1
14334 # && !defined __EXTENSIONS__)
14335 # st_mtim.st__tim.tv_nsec -- UnixWare 2.1.2
14336 # st_mtime_n -- AIX 5.2 and above
14337 # st_mtimespec.tv_nsec -- Darwin (Mac OSX)
14338 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
14339 CPPFLAGS="$ac_save_CPPFLAGS -DST_MTIM_NSEC=$ac_val"
14340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14341/* end confdefs.h. */
14342#include <sys/types.h>
14343#include <sys/stat.h>
14344int
Illia Bobyra96d5442023-08-30 16:30:15 +020014345main (void)
Leah Neukirchen0a7984a2021-10-14 21:27:55 +010014346{
14347struct stat s; s.ST_MTIM_NSEC;
14348 ;
14349 return 0;
14350}
14351_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014352if ac_fn_c_try_compile "$LINENO"
14353then :
Leah Neukirchen0a7984a2021-10-14 21:27:55 +010014354 ac_cv_struct_st_mtim_nsec=$ac_val; break
14355fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014356rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Leah Neukirchen0a7984a2021-10-14 21:27:55 +010014357 done
14358 CPPFLAGS="$ac_save_CPPFLAGS"
14359
14360fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014361{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_st_mtim_nsec" >&5
14362printf "%s\n" "$ac_cv_struct_st_mtim_nsec" >&6; }
Leah Neukirchen0a7984a2021-10-14 21:27:55 +010014363if test $ac_cv_struct_st_mtim_nsec != no; then
14364
Illia Bobyra96d5442023-08-30 16:30:15 +020014365printf "%s\n" "#define ST_MTIM_NSEC $ac_cv_struct_st_mtim_nsec" >>confdefs.h
Leah Neukirchen0a7984a2021-10-14 21:27:55 +010014366
14367fi
14368
Illia Bobyra96d5442023-08-30 16:30:15 +020014369{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv_open()" >&5
14370printf %s "checking for iconv_open()... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000014371save_LIBS="$LIBS"
14372LIBS="$LIBS -liconv"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014373cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014374/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000014375
14376#ifdef HAVE_ICONV_H
14377# include <iconv.h>
14378#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014379
14380int
Illia Bobyra96d5442023-08-30 16:30:15 +020014381main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014382{
Bram Moolenaar071d4272004-06-13 20:20:40 +000014383iconv_open("fr", "to");
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014384 ;
14385 return 0;
14386}
14387_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014388if ac_fn_c_try_link "$LINENO"
14389then :
14390 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes; with -liconv" >&5
14391printf "%s\n" "yes; with -liconv" >&6; }; printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000014392
Illia Bobyra96d5442023-08-30 16:30:15 +020014393else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014394 LIBS="$save_LIBS"
14395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014396/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000014397
14398#ifdef HAVE_ICONV_H
14399# include <iconv.h>
14400#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014401
14402int
Illia Bobyra96d5442023-08-30 16:30:15 +020014403main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014404{
Bram Moolenaar071d4272004-06-13 20:20:40 +000014405iconv_open("fr", "to");
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014406 ;
14407 return 0;
14408}
14409_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014410if ac_fn_c_try_link "$LINENO"
14411then :
14412 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14413printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000014414
Illia Bobyra96d5442023-08-30 16:30:15 +020014415else $as_nop
14416 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14417printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000014418fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014419rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014420 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000014421fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014422rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014423 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000014424
14425
Illia Bobyra96d5442023-08-30 16:30:15 +020014426{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo(CODESET)" >&5
14427printf %s "checking for nl_langinfo(CODESET)... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014428cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014429/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000014430
14431#ifdef HAVE_LANGINFO_H
14432# include <langinfo.h>
14433#endif
14434
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014435int
Illia Bobyra96d5442023-08-30 16:30:15 +020014436main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014437{
Bram Moolenaar071d4272004-06-13 20:20:40 +000014438char *cs = nl_langinfo(CODESET);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014439 ;
14440 return 0;
14441}
14442_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014443if ac_fn_c_try_link "$LINENO"
14444then :
14445 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14446printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_NL_LANGINFO_CODESET 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000014447
Illia Bobyra96d5442023-08-30 16:30:15 +020014448else $as_nop
14449 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14450printf "%s\n" "no" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014451fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014452rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014453 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000014454
Illia Bobyra96d5442023-08-30 16:30:15 +020014455{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for strtod in -lm" >&5
14456printf %s "checking for strtod in -lm... " >&6; }
14457if test ${ac_cv_lib_m_strtod+y}
14458then :
14459 printf %s "(cached) " >&6
14460else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000014461 ac_check_lib_save_LIBS=$LIBS
14462LIBS="-lm $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014463cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000014464/* end confdefs.h. */
14465
14466/* Override any GCC internal prototype to avoid an error.
14467 Use char because int might match the return type of a GCC
14468 builtin and then its argument prototype would still apply. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000014469char strtod ();
14470int
Illia Bobyra96d5442023-08-30 16:30:15 +020014471main (void)
Bram Moolenaar446cb832008-06-24 21:56:24 +000014472{
14473return strtod ();
14474 ;
14475 return 0;
14476}
14477_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014478if ac_fn_c_try_link "$LINENO"
14479then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000014480 ac_cv_lib_m_strtod=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020014481else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014482 ac_cv_lib_m_strtod=no
Bram Moolenaar446cb832008-06-24 21:56:24 +000014483fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014484rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014485 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000014486LIBS=$ac_check_lib_save_LIBS
14487fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014488{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_strtod" >&5
14489printf "%s\n" "$ac_cv_lib_m_strtod" >&6; }
14490if test "x$ac_cv_lib_m_strtod" = xyes
14491then :
14492 printf "%s\n" "#define HAVE_LIBM 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000014493
14494 LIBS="-lm $LIBS"
14495
14496fi
14497
Bram Moolenaar446cb832008-06-24 21:56:24 +000014498
Illia Bobyra96d5442023-08-30 16:30:15 +020014499{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for isinf()" >&5
14500printf %s "checking for isinf()... " >&6; }
Bram Moolenaara6b89762016-02-29 21:38:26 +010014501cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14502/* end confdefs.h. */
14503
14504#ifdef HAVE_MATH_H
14505# include <math.h>
14506#endif
14507#if STDC_HEADERS
14508# include <stdlib.h>
14509# include <stddef.h>
14510#endif
14511
14512int
Illia Bobyra96d5442023-08-30 16:30:15 +020014513main (void)
Bram Moolenaara6b89762016-02-29 21:38:26 +010014514{
14515int r = isinf(1.11);
14516 ;
14517 return 0;
14518}
14519_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014520if ac_fn_c_try_link "$LINENO"
14521then :
14522 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14523printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_ISINF 1" >>confdefs.h
Bram Moolenaara6b89762016-02-29 21:38:26 +010014524
Illia Bobyra96d5442023-08-30 16:30:15 +020014525else $as_nop
14526 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14527printf "%s\n" "no" >&6; }
Bram Moolenaara6b89762016-02-29 21:38:26 +010014528fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014529rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaara6b89762016-02-29 21:38:26 +010014530 conftest$ac_exeext conftest.$ac_ext
14531
Illia Bobyra96d5442023-08-30 16:30:15 +020014532{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for isnan()" >&5
14533printf %s "checking for isnan()... " >&6; }
Bram Moolenaara6b89762016-02-29 21:38:26 +010014534cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14535/* end confdefs.h. */
14536
14537#ifdef HAVE_MATH_H
14538# include <math.h>
14539#endif
14540#if STDC_HEADERS
14541# include <stdlib.h>
14542# include <stddef.h>
14543#endif
14544
14545int
Illia Bobyra96d5442023-08-30 16:30:15 +020014546main (void)
Bram Moolenaara6b89762016-02-29 21:38:26 +010014547{
14548int r = isnan(1.11);
14549 ;
14550 return 0;
14551}
14552_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014553if ac_fn_c_try_link "$LINENO"
14554then :
14555 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14556printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_ISNAN 1" >>confdefs.h
Bram Moolenaara6b89762016-02-29 21:38:26 +010014557
Illia Bobyra96d5442023-08-30 16:30:15 +020014558else $as_nop
14559 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14560printf "%s\n" "no" >&6; }
Bram Moolenaara6b89762016-02-29 21:38:26 +010014561fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014562rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaara6b89762016-02-29 21:38:26 +010014563 conftest$ac_exeext conftest.$ac_ext
14564
Illia Bobyra96d5442023-08-30 16:30:15 +020014565{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-acl argument" >&5
14566printf %s "checking --disable-acl argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000014567# Check whether --enable-acl was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020014568if test ${enable_acl+y}
14569then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000014570 enableval=$enable_acl;
Illia Bobyra96d5442023-08-30 16:30:15 +020014571else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000014572 enable_acl="yes"
Bram Moolenaar446cb832008-06-24 21:56:24 +000014573fi
14574
Bram Moolenaar071d4272004-06-13 20:20:40 +000014575if test "$enable_acl" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014576 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14577printf "%s\n" "no" >&6; }
14578 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for acl_get_file in -lposix1e" >&5
14579printf %s "checking for acl_get_file in -lposix1e... " >&6; }
14580if test ${ac_cv_lib_posix1e_acl_get_file+y}
14581then :
14582 printf %s "(cached) " >&6
14583else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014584 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000014585LIBS="-lposix1e $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014586cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014587/* end confdefs.h. */
14588
Bram Moolenaar446cb832008-06-24 21:56:24 +000014589/* Override any GCC internal prototype to avoid an error.
14590 Use char because int might match the return type of a GCC
14591 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014592char acl_get_file ();
14593int
Illia Bobyra96d5442023-08-30 16:30:15 +020014594main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014595{
Bram Moolenaar446cb832008-06-24 21:56:24 +000014596return acl_get_file ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014597 ;
14598 return 0;
14599}
14600_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014601if ac_fn_c_try_link "$LINENO"
14602then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014603 ac_cv_lib_posix1e_acl_get_file=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020014604else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014605 ac_cv_lib_posix1e_acl_get_file=no
Bram Moolenaar071d4272004-06-13 20:20:40 +000014606fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014607rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014608 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014609LIBS=$ac_check_lib_save_LIBS
14610fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014611{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix1e_acl_get_file" >&5
14612printf "%s\n" "$ac_cv_lib_posix1e_acl_get_file" >&6; }
14613if test "x$ac_cv_lib_posix1e_acl_get_file" = xyes
14614then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000014615 LIBS="$LIBS -lposix1e"
Illia Bobyra96d5442023-08-30 16:30:15 +020014616else $as_nop
14617 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for acl_get_file in -lacl" >&5
14618printf %s "checking for acl_get_file in -lacl... " >&6; }
14619if test ${ac_cv_lib_acl_acl_get_file+y}
14620then :
14621 printf %s "(cached) " >&6
14622else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014623 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000014624LIBS="-lacl $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014625cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014626/* end confdefs.h. */
14627
Bram Moolenaar446cb832008-06-24 21:56:24 +000014628/* Override any GCC internal prototype to avoid an error.
14629 Use char because int might match the return type of a GCC
14630 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014631char acl_get_file ();
14632int
Illia Bobyra96d5442023-08-30 16:30:15 +020014633main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014634{
Bram Moolenaar446cb832008-06-24 21:56:24 +000014635return acl_get_file ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014636 ;
14637 return 0;
14638}
14639_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014640if ac_fn_c_try_link "$LINENO"
14641then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014642 ac_cv_lib_acl_acl_get_file=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020014643else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014644 ac_cv_lib_acl_acl_get_file=no
Bram Moolenaar071d4272004-06-13 20:20:40 +000014645fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014646rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014647 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014648LIBS=$ac_check_lib_save_LIBS
14649fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014650{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_acl_acl_get_file" >&5
14651printf "%s\n" "$ac_cv_lib_acl_acl_get_file" >&6; }
14652if test "x$ac_cv_lib_acl_acl_get_file" = xyes
14653then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000014654 LIBS="$LIBS -lacl"
Illia Bobyra96d5442023-08-30 16:30:15 +020014655 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgetxattr in -lattr" >&5
14656printf %s "checking for fgetxattr in -lattr... " >&6; }
14657if test ${ac_cv_lib_attr_fgetxattr+y}
14658then :
14659 printf %s "(cached) " >&6
14660else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014661 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000014662LIBS="-lattr $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014663cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014664/* end confdefs.h. */
14665
Bram Moolenaar446cb832008-06-24 21:56:24 +000014666/* Override any GCC internal prototype to avoid an error.
14667 Use char because int might match the return type of a GCC
14668 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014669char fgetxattr ();
14670int
Illia Bobyra96d5442023-08-30 16:30:15 +020014671main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014672{
Bram Moolenaar446cb832008-06-24 21:56:24 +000014673return fgetxattr ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014674 ;
14675 return 0;
14676}
14677_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014678if ac_fn_c_try_link "$LINENO"
14679then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014680 ac_cv_lib_attr_fgetxattr=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020014681else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014682 ac_cv_lib_attr_fgetxattr=no
Bram Moolenaar071d4272004-06-13 20:20:40 +000014683fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014684rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014685 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014686LIBS=$ac_check_lib_save_LIBS
14687fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014688{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_attr_fgetxattr" >&5
14689printf "%s\n" "$ac_cv_lib_attr_fgetxattr" >&6; }
14690if test "x$ac_cv_lib_attr_fgetxattr" = xyes
14691then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000014692 LIBS="$LIBS -lattr"
Bram Moolenaar071d4272004-06-13 20:20:40 +000014693fi
14694
Bram Moolenaar071d4272004-06-13 20:20:40 +000014695fi
14696
14697fi
14698
14699
Illia Bobyra96d5442023-08-30 16:30:15 +020014700 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for POSIX ACL support" >&5
14701printf %s "checking for POSIX ACL support... " >&6; }
Bram Moolenaard6d30422018-01-28 22:48:55 +010014702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014703/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000014704
14705#include <sys/types.h>
14706#ifdef HAVE_SYS_ACL_H
14707# include <sys/acl.h>
14708#endif
14709acl_t acl;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014710int
Illia Bobyra96d5442023-08-30 16:30:15 +020014711main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014712{
Bram Moolenaar071d4272004-06-13 20:20:40 +000014713acl = acl_get_file("foo", ACL_TYPE_ACCESS);
14714 acl_set_file("foo", ACL_TYPE_ACCESS, acl);
14715 acl_free(acl);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014716 ;
14717 return 0;
14718}
14719_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014720if ac_fn_c_try_link "$LINENO"
14721then :
14722 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14723printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_POSIX_ACL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000014724
Illia Bobyra96d5442023-08-30 16:30:15 +020014725else $as_nop
14726 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14727printf "%s\n" "no" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014728fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014729rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014730 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000014731
Illia Bobyra96d5442023-08-30 16:30:15 +020014732 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for acl_get in -lsec" >&5
14733printf %s "checking for acl_get in -lsec... " >&6; }
14734if test ${ac_cv_lib_sec_acl_get+y}
14735then :
14736 printf %s "(cached) " >&6
14737else $as_nop
Bram Moolenaar8d462f92012-02-05 22:51:33 +010014738 ac_check_lib_save_LIBS=$LIBS
14739LIBS="-lsec $LIBS"
14740cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14741/* end confdefs.h. */
14742
14743/* Override any GCC internal prototype to avoid an error.
14744 Use char because int might match the return type of a GCC
14745 builtin and then its argument prototype would still apply. */
Bram Moolenaar8d462f92012-02-05 22:51:33 +010014746char acl_get ();
14747int
Illia Bobyra96d5442023-08-30 16:30:15 +020014748main (void)
Bram Moolenaar8d462f92012-02-05 22:51:33 +010014749{
14750return acl_get ();
14751 ;
14752 return 0;
14753}
14754_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014755if ac_fn_c_try_link "$LINENO"
14756then :
Bram Moolenaar8d462f92012-02-05 22:51:33 +010014757 ac_cv_lib_sec_acl_get=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020014758else $as_nop
Bram Moolenaar8d462f92012-02-05 22:51:33 +010014759 ac_cv_lib_sec_acl_get=no
14760fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014761rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar8d462f92012-02-05 22:51:33 +010014762 conftest$ac_exeext conftest.$ac_ext
14763LIBS=$ac_check_lib_save_LIBS
14764fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014765{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sec_acl_get" >&5
14766printf "%s\n" "$ac_cv_lib_sec_acl_get" >&6; }
14767if test "x$ac_cv_lib_sec_acl_get" = xyes
14768then :
14769 LIBS="$LIBS -lsec"; printf "%s\n" "#define HAVE_SOLARIS_ZFS_ACL 1" >>confdefs.h
Bram Moolenaar8d462f92012-02-05 22:51:33 +010014770
Illia Bobyra96d5442023-08-30 16:30:15 +020014771else $as_nop
14772 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Solaris ACL support" >&5
14773printf %s "checking for Solaris ACL support... " >&6; }
Bram Moolenaard6d30422018-01-28 22:48:55 +010014774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014775/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000014776
14777#ifdef HAVE_SYS_ACL_H
14778# include <sys/acl.h>
14779#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014780int
Illia Bobyra96d5442023-08-30 16:30:15 +020014781main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014782{
Bram Moolenaar071d4272004-06-13 20:20:40 +000014783acl("foo", GETACLCNT, 0, NULL);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014784
14785 ;
14786 return 0;
14787}
14788_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014789if ac_fn_c_try_link "$LINENO"
14790then :
14791 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14792printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SOLARIS_ACL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000014793
Illia Bobyra96d5442023-08-30 16:30:15 +020014794else $as_nop
14795 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14796printf "%s\n" "no" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014797fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014798rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014799 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar8d462f92012-02-05 22:51:33 +010014800fi
14801
Bram Moolenaar446cb832008-06-24 21:56:24 +000014802
Illia Bobyra96d5442023-08-30 16:30:15 +020014803 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for AIX ACL support" >&5
14804printf %s "checking for AIX ACL support... " >&6; }
Bram Moolenaard6d30422018-01-28 22:48:55 +010014805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014806/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000014807
Bram Moolenaar446cb832008-06-24 21:56:24 +000014808#if STDC_HEADERS
14809# include <stdlib.h>
14810# include <stddef.h>
14811#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000014812#ifdef HAVE_SYS_ACL_H
14813# include <sys/acl.h>
14814#endif
14815#ifdef HAVE_SYS_ACCESS_H
14816# include <sys/access.h>
14817#endif
14818#define _ALL_SOURCE
14819
14820#include <sys/stat.h>
14821
14822int aclsize;
14823struct acl *aclent;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014824int
Illia Bobyra96d5442023-08-30 16:30:15 +020014825main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014826{
Bram Moolenaar071d4272004-06-13 20:20:40 +000014827aclsize = sizeof(struct acl);
14828 aclent = (void *)malloc(aclsize);
14829 statacl("foo", STX_NORMAL, aclent, aclsize);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014830
14831 ;
14832 return 0;
14833}
14834_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014835if ac_fn_c_try_link "$LINENO"
14836then :
14837 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14838printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_AIX_ACL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000014839
Illia Bobyra96d5442023-08-30 16:30:15 +020014840else $as_nop
14841 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14842printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000014843fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014844rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014845 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000014846else
Illia Bobyra96d5442023-08-30 16:30:15 +020014847 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14848printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000014849fi
14850
Bram Moolenaar3cbe0c02015-09-08 20:00:22 +020014851if test "x$GTK_CFLAGS" != "x"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014852 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pango_shape_full" >&5
14853printf %s "checking for pango_shape_full... " >&6; }
Bram Moolenaar3cbe0c02015-09-08 20:00:22 +020014854 ac_save_CFLAGS="$CFLAGS"
14855 ac_save_LIBS="$LIBS"
14856 CFLAGS="$CFLAGS $GTK_CFLAGS"
14857 LIBS="$LIBS $GTK_LIBS"
14858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14859/* end confdefs.h. */
14860#include <gtk/gtk.h>
14861int
Illia Bobyra96d5442023-08-30 16:30:15 +020014862main (void)
Bram Moolenaar3cbe0c02015-09-08 20:00:22 +020014863{
14864 pango_shape_full(NULL, 0, NULL, 0, NULL, NULL);
14865 ;
14866 return 0;
14867}
14868_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014869if ac_fn_c_try_link "$LINENO"
14870then :
14871 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14872printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_PANGO_SHAPE_FULL 1" >>confdefs.h
Bram Moolenaar3cbe0c02015-09-08 20:00:22 +020014873
Illia Bobyra96d5442023-08-30 16:30:15 +020014874else $as_nop
14875 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14876printf "%s\n" "no" >&6; }
Bram Moolenaar3cbe0c02015-09-08 20:00:22 +020014877fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014878rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar5325b9b2015-09-09 20:27:02 +020014879 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar3cbe0c02015-09-08 20:00:22 +020014880 CFLAGS="$ac_save_CFLAGS"
14881 LIBS="$ac_save_LIBS"
14882fi
14883
Illia Bobyra96d5442023-08-30 16:30:15 +020014884{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-gpm argument" >&5
14885printf %s "checking --enable-gpm argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000014886# Check whether --enable-gpm was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020014887if test ${enable_gpm+y}
14888then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000014889 enableval=$enable_gpm;
Illia Bobyra96d5442023-08-30 16:30:15 +020014890else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000014891 enable_gpm="yes"
Bram Moolenaar446cb832008-06-24 21:56:24 +000014892fi
14893
Bram Moolenaar071d4272004-06-13 20:20:40 +000014894
Bram Moolenaar0b40d082022-03-08 13:32:37 +000014895if test "$enable_gpm" = "yes" -o "$enable_gpm" = "dynamic"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014896 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_gpm" >&5
14897printf "%s\n" "$enable_gpm" >&6; }
14898 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gpm" >&5
14899printf %s "checking for gpm... " >&6; }
14900if test ${vi_cv_have_gpm+y}
14901then :
14902 printf %s "(cached) " >&6
14903else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000014904 olibs="$LIBS" ; LIBS="-lgpm"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014906/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000014907#include <gpm.h>
14908 #include <linux/keyboard.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014909int
Illia Bobyra96d5442023-08-30 16:30:15 +020014910main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014911{
Bram Moolenaar071d4272004-06-13 20:20:40 +000014912Gpm_GetLibVersion(NULL);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014913 ;
14914 return 0;
14915}
14916_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014917if ac_fn_c_try_link "$LINENO"
14918then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000014919 vi_cv_have_gpm=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020014920else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014921 vi_cv_have_gpm=no
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014922fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014923rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014924 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014925 LIBS="$olibs"
14926
14927fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014928{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_have_gpm" >&5
14929printf "%s\n" "$vi_cv_have_gpm" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000014930 if test $vi_cv_have_gpm = yes; then
Bram Moolenaar0b40d082022-03-08 13:32:37 +000014931 if test "$enable_gpm" = "yes"; then
14932 LIBS="$LIBS -lgpm"
14933 else
Illia Bobyra96d5442023-08-30 16:30:15 +020014934 printf "%s\n" "#define DYNAMIC_GPM 1" >>confdefs.h
Bram Moolenaar0b40d082022-03-08 13:32:37 +000014935
14936 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014937 printf "%s\n" "#define HAVE_GPM 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000014938
14939 fi
14940else
Illia Bobyra96d5442023-08-30 16:30:15 +020014941 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14942printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000014943fi
14944
Illia Bobyra96d5442023-08-30 16:30:15 +020014945{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-sysmouse argument" >&5
14946printf %s "checking --disable-sysmouse argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000014947# Check whether --enable-sysmouse was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020014948if test ${enable_sysmouse+y}
14949then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000014950 enableval=$enable_sysmouse;
Illia Bobyra96d5442023-08-30 16:30:15 +020014951else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000014952 enable_sysmouse="yes"
14953fi
14954
14955
14956if test "$enable_sysmouse" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014957 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14958printf "%s\n" "no" >&6; }
14959 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysmouse" >&5
14960printf %s "checking for sysmouse... " >&6; }
14961if test ${vi_cv_have_sysmouse+y}
14962then :
14963 printf %s "(cached) " >&6
14964else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000014966/* end confdefs.h. */
14967#include <sys/consio.h>
14968 #include <signal.h>
14969 #include <sys/fbio.h>
14970int
Illia Bobyra96d5442023-08-30 16:30:15 +020014971main (void)
Bram Moolenaar446cb832008-06-24 21:56:24 +000014972{
14973struct mouse_info mouse;
14974 mouse.operation = MOUSE_MODE;
14975 mouse.operation = MOUSE_SHOW;
14976 mouse.u.mode.mode = 0;
14977 mouse.u.mode.signal = SIGUSR2;
14978 ;
14979 return 0;
14980}
14981_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014982if ac_fn_c_try_link "$LINENO"
14983then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000014984 vi_cv_have_sysmouse=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020014985else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014986 vi_cv_have_sysmouse=no
Bram Moolenaar446cb832008-06-24 21:56:24 +000014987fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014988rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014989 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000014990
14991fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014992{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_have_sysmouse" >&5
14993printf "%s\n" "$vi_cv_have_sysmouse" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000014994 if test $vi_cv_have_sysmouse = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014995 printf "%s\n" "#define HAVE_SYSMOUSE 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000014996
14997 fi
14998else
Illia Bobyra96d5442023-08-30 16:30:15 +020014999 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15000printf "%s\n" "yes" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000015001fi
15002
Illia Bobyra96d5442023-08-30 16:30:15 +020015003{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FD_CLOEXEC" >&5
15004printf %s "checking for FD_CLOEXEC... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015005cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarf05da212009-11-17 16:13:15 +000015006/* end confdefs.h. */
15007#if HAVE_FCNTL_H
15008# include <fcntl.h>
15009#endif
15010int
Illia Bobyra96d5442023-08-30 16:30:15 +020015011main (void)
Bram Moolenaarf05da212009-11-17 16:13:15 +000015012{
15013 int flag = FD_CLOEXEC;
15014 ;
15015 return 0;
15016}
15017_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015018if ac_fn_c_try_compile "$LINENO"
15019then :
15020 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15021printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_FD_CLOEXEC 1" >>confdefs.h
Bram Moolenaarf05da212009-11-17 16:13:15 +000015022
Illia Bobyra96d5442023-08-30 16:30:15 +020015023else $as_nop
15024 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15025printf "%s\n" "not usable" >&6; }
Bram Moolenaarf05da212009-11-17 16:13:15 +000015026fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015027rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaarf05da212009-11-17 16:13:15 +000015028
Illia Bobyra96d5442023-08-30 16:30:15 +020015029{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for rename" >&5
15030printf %s "checking for rename... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015031cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015032/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015033#include <stdio.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015034int
Illia Bobyra96d5442023-08-30 16:30:15 +020015035main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015036{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015037rename("this", "that")
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015038 ;
15039 return 0;
15040}
15041_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015042if ac_fn_c_try_link "$LINENO"
15043then :
15044 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15045printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_RENAME 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015046
Illia Bobyra96d5442023-08-30 16:30:15 +020015047else $as_nop
15048 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15049printf "%s\n" "no" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015050fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015051rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015052 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015053
Illia Bobyra96d5442023-08-30 16:30:15 +020015054{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dirfd" >&5
15055printf %s "checking for dirfd... " >&6; }
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015056cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15057/* end confdefs.h. */
15058#include <sys/types.h>
15059#include <dirent.h>
15060int
Illia Bobyra96d5442023-08-30 16:30:15 +020015061main (void)
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015062{
15063DIR * dir=opendir("dirname"); dirfd(dir);
15064 ;
15065 return 0;
15066}
15067_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015068if ac_fn_c_try_link "$LINENO"
15069then :
15070 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15071printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_DIRFD 1" >>confdefs.h
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015072
Illia Bobyra96d5442023-08-30 16:30:15 +020015073else $as_nop
15074 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15075printf "%s\n" "not usable" >&6; }
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015076fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015077rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar9d8bfae2020-09-02 21:21:35 +020015078 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015079
Illia Bobyra96d5442023-08-30 16:30:15 +020015080{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for flock" >&5
15081printf %s "checking for flock... " >&6; }
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015082cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15083/* end confdefs.h. */
15084#include <sys/file.h>
15085int
Illia Bobyra96d5442023-08-30 16:30:15 +020015086main (void)
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015087{
15088flock(10, LOCK_SH);
15089 ;
15090 return 0;
15091}
15092_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015093if ac_fn_c_try_link "$LINENO"
15094then :
15095 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15096printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_FLOCK 1" >>confdefs.h
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015097
Illia Bobyra96d5442023-08-30 16:30:15 +020015098else $as_nop
15099 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15100printf "%s\n" "not usable" >&6; }
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015101fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015102rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar9d8bfae2020-09-02 21:21:35 +020015103 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015104
Illia Bobyra96d5442023-08-30 16:30:15 +020015105{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysctl" >&5
15106printf %s "checking for sysctl... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015107cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015108/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015109#include <sys/types.h>
15110#include <sys/sysctl.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015111int
Illia Bobyra96d5442023-08-30 16:30:15 +020015112main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015113{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015114 int mib[2], r;
15115 size_t len;
15116
15117 mib[0] = CTL_HW;
15118 mib[1] = HW_USERMEM;
15119 len = sizeof(r);
15120 (void)sysctl(mib, 2, &r, &len, (void *)0, (size_t)0);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015121
15122 ;
15123 return 0;
15124}
15125_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015126if ac_fn_c_try_compile "$LINENO"
15127then :
15128 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15129printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SYSCTL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015130
Illia Bobyra96d5442023-08-30 16:30:15 +020015131else $as_nop
15132 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15133printf "%s\n" "not usable" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015134fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015135rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015136
Illia Bobyra96d5442023-08-30 16:30:15 +020015137{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysinfo" >&5
15138printf %s "checking for sysinfo... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015139cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015140/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015141#include <sys/types.h>
15142#include <sys/sysinfo.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015143int
Illia Bobyra96d5442023-08-30 16:30:15 +020015144main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015145{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015146 struct sysinfo sinfo;
15147 int t;
15148
15149 (void)sysinfo(&sinfo);
15150 t = sinfo.totalram;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015151
15152 ;
15153 return 0;
15154}
15155_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015156if ac_fn_c_try_link "$LINENO"
15157then :
15158 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15159printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SYSINFO 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015160
Illia Bobyra96d5442023-08-30 16:30:15 +020015161else $as_nop
15162 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15163printf "%s\n" "not usable" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015164fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015165rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaare2982d62021-10-06 11:27:21 +010015166 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015167
Illia Bobyra96d5442023-08-30 16:30:15 +020015168{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysinfo.mem_unit" >&5
15169printf %s "checking for sysinfo.mem_unit... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015170cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar914572a2007-05-01 11:37:47 +000015171/* end confdefs.h. */
15172#include <sys/types.h>
15173#include <sys/sysinfo.h>
15174int
Illia Bobyra96d5442023-08-30 16:30:15 +020015175main (void)
Bram Moolenaar914572a2007-05-01 11:37:47 +000015176{
15177 struct sysinfo sinfo;
Bram Moolenaar3c7ad012013-06-11 19:53:45 +020015178 sinfo.mem_unit = 1;
Bram Moolenaar914572a2007-05-01 11:37:47 +000015179
15180 ;
15181 return 0;
15182}
15183_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015184if ac_fn_c_try_compile "$LINENO"
15185then :
15186 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15187printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SYSINFO_MEM_UNIT 1" >>confdefs.h
Bram Moolenaar914572a2007-05-01 11:37:47 +000015188
Illia Bobyra96d5442023-08-30 16:30:15 +020015189else $as_nop
15190 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15191printf "%s\n" "no" >&6; }
Bram Moolenaar914572a2007-05-01 11:37:47 +000015192fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015193rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015194
Illia Bobyra96d5442023-08-30 16:30:15 +020015195{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysinfo.uptime" >&5
15196printf %s "checking for sysinfo.uptime... " >&6; }
Bram Moolenaarf52f0602021-03-10 21:26:37 +010015197cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15198/* end confdefs.h. */
15199#include <sys/types.h>
15200#include <sys/sysinfo.h>
15201int
Illia Bobyra96d5442023-08-30 16:30:15 +020015202main (void)
Bram Moolenaarf52f0602021-03-10 21:26:37 +010015203{
15204 struct sysinfo sinfo;
15205 long ut;
15206
15207 (void)sysinfo(&sinfo);
15208 ut = sinfo.uptime;
15209
15210 ;
15211 return 0;
15212}
15213_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015214if ac_fn_c_try_compile "$LINENO"
15215then :
15216 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15217printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SYSINFO_UPTIME 1" >>confdefs.h
Bram Moolenaarf52f0602021-03-10 21:26:37 +010015218
Illia Bobyra96d5442023-08-30 16:30:15 +020015219else $as_nop
15220 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15221printf "%s\n" "no" >&6; }
Bram Moolenaarf52f0602021-03-10 21:26:37 +010015222fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015223rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaarf52f0602021-03-10 21:26:37 +010015224
Illia Bobyra96d5442023-08-30 16:30:15 +020015225{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysconf" >&5
15226printf %s "checking for sysconf... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015227cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015228/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015229#include <unistd.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015230int
Illia Bobyra96d5442023-08-30 16:30:15 +020015231main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015232{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015233 (void)sysconf(_SC_PAGESIZE);
15234 (void)sysconf(_SC_PHYS_PAGES);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015235
15236 ;
15237 return 0;
15238}
15239_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015240if ac_fn_c_try_compile "$LINENO"
15241then :
15242 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15243printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SYSCONF 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015244
Illia Bobyra96d5442023-08-30 16:30:15 +020015245else $as_nop
15246 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15247printf "%s\n" "not usable" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015248fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015249rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000015250
Illia Bobyra96d5442023-08-30 16:30:15 +020015251{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _SC_SIGSTKSZ via sysconf()" >&5
15252printf %s "checking for _SC_SIGSTKSZ via sysconf()... " >&6; }
Bram Moolenaar0e62a672021-02-25 17:17:56 +010015253cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15254/* end confdefs.h. */
15255#include <unistd.h>
15256int
Illia Bobyra96d5442023-08-30 16:30:15 +020015257main (void)
Bram Moolenaar0e62a672021-02-25 17:17:56 +010015258{
15259 (void)sysconf(_SC_SIGSTKSZ);
15260
15261 ;
15262 return 0;
15263}
15264_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015265if ac_fn_c_try_compile "$LINENO"
15266then :
15267 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15268printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SYSCONF_SIGSTKSZ 1" >>confdefs.h
Bram Moolenaar0e62a672021-02-25 17:17:56 +010015269
Illia Bobyra96d5442023-08-30 16:30:15 +020015270else $as_nop
15271 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15272printf "%s\n" "not usable" >&6; }
Bram Moolenaar0e62a672021-02-25 17:17:56 +010015273fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015274rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0e62a672021-02-25 17:17:56 +010015275
Bram Moolenaar914703b2010-05-31 21:59:46 +020015276# The cast to long int works around a bug in the HP C Compiler
15277# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15278# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15279# This bug is HP SR number 8606223364.
Illia Bobyra96d5442023-08-30 16:30:15 +020015280{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
15281printf %s "checking size of int... " >&6; }
15282if test ${ac_cv_sizeof_int+y}
15283then :
15284 printf %s "(cached) " >&6
15285else $as_nop
15286 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"
15287then :
Bram Moolenaar914703b2010-05-31 21:59:46 +020015288
Illia Bobyra96d5442023-08-30 16:30:15 +020015289else $as_nop
Bram Moolenaar914703b2010-05-31 21:59:46 +020015290 if test "$ac_cv_type_int" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015291 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15292printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +010015293as_fn_error 77 "cannot compute sizeof (int)
15294See \`config.log' for more details" "$LINENO" 5; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020015295 else
15296 ac_cv_sizeof_int=0
15297 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000015298fi
15299
Bram Moolenaar446cb832008-06-24 21:56:24 +000015300fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015301{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
15302printf "%s\n" "$ac_cv_sizeof_int" >&6; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020015303
15304
15305
Illia Bobyra96d5442023-08-30 16:30:15 +020015306printf "%s\n" "#define SIZEOF_INT $ac_cv_sizeof_int" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015307
15308
Bram Moolenaar914703b2010-05-31 21:59:46 +020015309# The cast to long int works around a bug in the HP C Compiler
15310# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15311# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15312# This bug is HP SR number 8606223364.
Illia Bobyra96d5442023-08-30 16:30:15 +020015313{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
15314printf %s "checking size of long... " >&6; }
15315if test ${ac_cv_sizeof_long+y}
15316then :
15317 printf %s "(cached) " >&6
15318else $as_nop
15319 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"
15320then :
Bram Moolenaar914703b2010-05-31 21:59:46 +020015321
Illia Bobyra96d5442023-08-30 16:30:15 +020015322else $as_nop
Bram Moolenaar914703b2010-05-31 21:59:46 +020015323 if test "$ac_cv_type_long" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015324 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15325printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +010015326as_fn_error 77 "cannot compute sizeof (long)
15327See \`config.log' for more details" "$LINENO" 5; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020015328 else
15329 ac_cv_sizeof_long=0
15330 fi
15331fi
15332
15333fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015334{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
15335printf "%s\n" "$ac_cv_sizeof_long" >&6; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020015336
15337
15338
Illia Bobyra96d5442023-08-30 16:30:15 +020015339printf "%s\n" "#define SIZEOF_LONG $ac_cv_sizeof_long" >>confdefs.h
Bram Moolenaar914703b2010-05-31 21:59:46 +020015340
15341
15342# The cast to long int works around a bug in the HP C Compiler
15343# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15344# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15345# This bug is HP SR number 8606223364.
Illia Bobyra96d5442023-08-30 16:30:15 +020015346{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
15347printf %s "checking size of time_t... " >&6; }
15348if test ${ac_cv_sizeof_time_t+y}
15349then :
15350 printf %s "(cached) " >&6
15351else $as_nop
15352 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "$ac_includes_default"
15353then :
Bram Moolenaar914703b2010-05-31 21:59:46 +020015354
Illia Bobyra96d5442023-08-30 16:30:15 +020015355else $as_nop
Bram Moolenaar914703b2010-05-31 21:59:46 +020015356 if test "$ac_cv_type_time_t" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015357 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15358printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +010015359as_fn_error 77 "cannot compute sizeof (time_t)
15360See \`config.log' for more details" "$LINENO" 5; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020015361 else
15362 ac_cv_sizeof_time_t=0
15363 fi
Bram Moolenaar644fdff2010-05-30 13:26:21 +020015364fi
15365
15366fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015367{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
15368printf "%s\n" "$ac_cv_sizeof_time_t" >&6; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020015369
15370
15371
Illia Bobyra96d5442023-08-30 16:30:15 +020015372printf "%s\n" "#define SIZEOF_TIME_T $ac_cv_sizeof_time_t" >>confdefs.h
Bram Moolenaar644fdff2010-05-30 13:26:21 +020015373
15374
Bram Moolenaar914703b2010-05-31 21:59:46 +020015375# The cast to long int works around a bug in the HP C Compiler
15376# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15377# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15378# This bug is HP SR number 8606223364.
Illia Bobyra96d5442023-08-30 16:30:15 +020015379{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
15380printf %s "checking size of off_t... " >&6; }
15381if test ${ac_cv_sizeof_off_t+y}
15382then :
15383 printf %s "(cached) " >&6
15384else $as_nop
15385 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default"
15386then :
Bram Moolenaar914703b2010-05-31 21:59:46 +020015387
Illia Bobyra96d5442023-08-30 16:30:15 +020015388else $as_nop
Bram Moolenaar914703b2010-05-31 21:59:46 +020015389 if test "$ac_cv_type_off_t" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015390 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15391printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +010015392as_fn_error 77 "cannot compute sizeof (off_t)
15393See \`config.log' for more details" "$LINENO" 5; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020015394 else
15395 ac_cv_sizeof_off_t=0
15396 fi
15397fi
15398
15399fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015400{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
15401printf "%s\n" "$ac_cv_sizeof_off_t" >&6; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020015402
15403
15404
Illia Bobyra96d5442023-08-30 16:30:15 +020015405printf "%s\n" "#define SIZEOF_OFF_T $ac_cv_sizeof_off_t" >>confdefs.h
Bram Moolenaar914703b2010-05-31 21:59:46 +020015406
15407
15408
Illia Bobyra96d5442023-08-30 16:30:15 +020015409printf "%s\n" "#define VIM_SIZEOF_INT $ac_cv_sizeof_int" >>confdefs.h
Bram Moolenaara2aa31a2014-02-23 22:52:40 +010015410
Illia Bobyra96d5442023-08-30 16:30:15 +020015411printf "%s\n" "#define VIM_SIZEOF_LONG $ac_cv_sizeof_long" >>confdefs.h
Bram Moolenaara2aa31a2014-02-23 22:52:40 +010015412
15413
Illia Bobyra96d5442023-08-30 16:30:15 +020015414{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking uint32_t is 32 bits" >&5
15415printf %s "checking uint32_t is 32 bits... " >&6; }
15416if test "$cross_compiling" = yes
15417then :
15418 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check uint32_t when cross-compiling." >&5
15419printf "%s\n" "$as_me: WARNING: cannot check uint32_t when cross-compiling." >&2;}
15420else $as_nop
Bram Moolenaarfa7584c2010-05-19 21:57:45 +020015421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15422/* end confdefs.h. */
15423
15424#ifdef HAVE_STDINT_H
15425# include <stdint.h>
15426#endif
15427#ifdef HAVE_INTTYPES_H
15428# include <inttypes.h>
15429#endif
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010015430int main() {
Bram Moolenaarfa7584c2010-05-19 21:57:45 +020015431 uint32_t nr1 = (uint32_t)-1;
15432 uint32_t nr2 = (uint32_t)0xffffffffUL;
Bram Moolenaar52897832020-07-02 22:50:37 +020015433 if (sizeof(uint32_t) != 4 || nr1 != 0xffffffffUL || nr2 + 1 != 0) return 1;
15434 return 0;
Bram Moolenaarfa7584c2010-05-19 21:57:45 +020015435}
15436_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015437if ac_fn_c_try_run "$LINENO"
15438then :
15439 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15440printf "%s\n" "ok" >&6; }
15441else $as_nop
Bram Moolenaar7db77842014-03-27 17:40:59 +010015442 as_fn_error $? "WRONG! uint32_t not defined correctly." "$LINENO" 5
Bram Moolenaarfa7584c2010-05-19 21:57:45 +020015443fi
15444rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15445 conftest.$ac_objext conftest.beam conftest.$ac_ext
15446fi
15447
15448
Bram Moolenaar446cb832008-06-24 21:56:24 +000015449
Bram Moolenaar071d4272004-06-13 20:20:40 +000015450bcopy_test_prog='
Bram Moolenaar446cb832008-06-24 21:56:24 +000015451#include "confdefs.h"
15452#ifdef HAVE_STRING_H
15453# include <string.h>
15454#endif
15455#if STDC_HEADERS
15456# include <stdlib.h>
15457# include <stddef.h>
15458#endif
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010015459int main() {
Bram Moolenaar071d4272004-06-13 20:20:40 +000015460 char buf[10];
15461 strcpy(buf, "abcdefghi");
15462 mch_memmove(buf, buf + 2, 3);
15463 if (strncmp(buf, "ababcf", 6))
15464 exit(1);
15465 strcpy(buf, "abcdefghi");
15466 mch_memmove(buf + 2, buf, 3);
15467 if (strncmp(buf, "cdedef", 6))
15468 exit(1);
15469 exit(0); /* libc version works properly. */
15470}'
15471
Illia Bobyra96d5442023-08-30 16:30:15 +020015472{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether memmove handles overlaps" >&5
15473printf %s "checking whether memmove handles overlaps... " >&6; }
15474if test ${vim_cv_memmove_handles_overlap+y}
15475then :
15476 printf %s "(cached) " >&6
15477else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000015478
Illia Bobyra96d5442023-08-30 16:30:15 +020015479 if test "$cross_compiling" = yes
15480then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015481
Bram Moolenaar7db77842014-03-27 17:40:59 +010015482 as_fn_error $? "cross-compiling: please set 'vim_cv_memmove_handles_overlap'" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000015483
Illia Bobyra96d5442023-08-30 16:30:15 +020015484else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15486/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015487#define mch_memmove(s,d,l) memmove(d,s,l) $bcopy_test_prog
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015488_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015489if ac_fn_c_try_run "$LINENO"
15490then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015491
15492 vim_cv_memmove_handles_overlap=yes
15493
Illia Bobyra96d5442023-08-30 16:30:15 +020015494else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000015495
15496 vim_cv_memmove_handles_overlap=no
15497
15498fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015499rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15500 conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015501fi
15502
15503
Bram Moolenaar446cb832008-06-24 21:56:24 +000015504fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015505{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_memmove_handles_overlap" >&5
15506printf "%s\n" "$vim_cv_memmove_handles_overlap" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000015507
15508if test "x$vim_cv_memmove_handles_overlap" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015509 printf "%s\n" "#define USEMEMMOVE 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000015510
Bram Moolenaar071d4272004-06-13 20:20:40 +000015511else
Illia Bobyra96d5442023-08-30 16:30:15 +020015512 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether bcopy handles overlaps" >&5
15513printf %s "checking whether bcopy handles overlaps... " >&6; }
15514if test ${vim_cv_bcopy_handles_overlap+y}
15515then :
15516 printf %s "(cached) " >&6
15517else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000015518
Illia Bobyra96d5442023-08-30 16:30:15 +020015519 if test "$cross_compiling" = yes
15520then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015521
Bram Moolenaar7db77842014-03-27 17:40:59 +010015522 as_fn_error $? "cross-compiling: please set 'vim_cv_bcopy_handles_overlap'" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000015523
Illia Bobyra96d5442023-08-30 16:30:15 +020015524else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15526/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000015527#define mch_bcopy(s,d,l) bcopy(d,s,l) $bcopy_test_prog
15528_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015529if ac_fn_c_try_run "$LINENO"
15530then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015531
15532 vim_cv_bcopy_handles_overlap=yes
15533
Illia Bobyra96d5442023-08-30 16:30:15 +020015534else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000015535
15536 vim_cv_bcopy_handles_overlap=no
15537
15538fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015539rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15540 conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015541fi
15542
15543
Bram Moolenaar446cb832008-06-24 21:56:24 +000015544fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015545{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_bcopy_handles_overlap" >&5
15546printf "%s\n" "$vim_cv_bcopy_handles_overlap" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000015547
15548 if test "x$vim_cv_bcopy_handles_overlap" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015549 printf "%s\n" "#define USEBCOPY 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015550
Bram Moolenaar446cb832008-06-24 21:56:24 +000015551 else
Illia Bobyra96d5442023-08-30 16:30:15 +020015552 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether memcpy handles overlaps" >&5
15553printf %s "checking whether memcpy handles overlaps... " >&6; }
15554if test ${vim_cv_memcpy_handles_overlap+y}
15555then :
15556 printf %s "(cached) " >&6
15557else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000015558
Illia Bobyra96d5442023-08-30 16:30:15 +020015559 if test "$cross_compiling" = yes
15560then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015561
Bram Moolenaar7db77842014-03-27 17:40:59 +010015562 as_fn_error $? "cross-compiling: please set 'vim_cv_memcpy_handles_overlap'" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000015563
Illia Bobyra96d5442023-08-30 16:30:15 +020015564else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15566/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000015567#define mch_memcpy(s,d,l) memcpy(d,s,l) $bcopy_test_prog
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015568_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015569if ac_fn_c_try_run "$LINENO"
15570then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015571
15572 vim_cv_memcpy_handles_overlap=yes
15573
Illia Bobyra96d5442023-08-30 16:30:15 +020015574else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000015575
15576 vim_cv_memcpy_handles_overlap=no
15577
Bram Moolenaar071d4272004-06-13 20:20:40 +000015578fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015579rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15580 conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000015581fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000015582
15583
Bram Moolenaar071d4272004-06-13 20:20:40 +000015584fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015585{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_memcpy_handles_overlap" >&5
15586printf "%s\n" "$vim_cv_memcpy_handles_overlap" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000015587
15588 if test "x$vim_cv_memcpy_handles_overlap" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015589 printf "%s\n" "#define USEMEMCPY 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000015590
15591 fi
15592 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000015593fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000015594
Bram Moolenaar071d4272004-06-13 20:20:40 +000015595
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015596if test "x$with_x" = "xyes"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000015597 cflags_save=$CFLAGS
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015598 libs_save=$LIBS
15599 LIBS="$LIBS $X_LIBS $GUI_LIB_LOC $GUI_X_LIBS $X_PRE_LIBS $X_LIB $X_EXTRA_LIBS"
15600 CFLAGS="$CFLAGS $X_CFLAGS"
15601
Illia Bobyra96d5442023-08-30 16:30:15 +020015602 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether X_LOCALE needed" >&5
15603printf %s "checking whether X_LOCALE needed... " >&6; }
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015605/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015606#include <X11/Xlocale.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015607int
Illia Bobyra96d5442023-08-30 16:30:15 +020015608main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015609{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015610
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015611 ;
15612 return 0;
15613}
15614_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015615if ac_fn_c_try_compile "$LINENO"
15616then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015618/* end confdefs.h. */
15619
Bram Moolenaar446cb832008-06-24 21:56:24 +000015620/* Override any GCC internal prototype to avoid an error.
15621 Use char because int might match the return type of a GCC
15622 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015623char _Xsetlocale ();
15624int
Illia Bobyra96d5442023-08-30 16:30:15 +020015625main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015626{
Bram Moolenaar446cb832008-06-24 21:56:24 +000015627return _Xsetlocale ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015628 ;
15629 return 0;
15630}
15631_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015632if ac_fn_c_try_link "$LINENO"
15633then :
15634 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15635printf "%s\n" "yes" >&6; }
15636 printf "%s\n" "#define X_LOCALE 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015637
Illia Bobyra96d5442023-08-30 16:30:15 +020015638else $as_nop
15639 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15640printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015641fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015642rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015643 conftest$ac_exeext conftest.$ac_ext
Illia Bobyra96d5442023-08-30 16:30:15 +020015644else $as_nop
15645 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15646printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015647fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015648rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015649
Illia Bobyra96d5442023-08-30 16:30:15 +020015650 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether Xutf8SetWMProperties() can be used" >&5
15651printf %s "checking whether Xutf8SetWMProperties() can be used... " >&6; }
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15653/* end confdefs.h. */
15654
15655/* Override any GCC internal prototype to avoid an error.
15656 Use char because int might match the return type of a GCC
15657 builtin and then its argument prototype would still apply. */
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015658char Xutf8SetWMProperties ();
15659int
Illia Bobyra96d5442023-08-30 16:30:15 +020015660main (void)
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015661{
15662return Xutf8SetWMProperties ();
15663 ;
15664 return 0;
15665}
15666_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015667if ac_fn_c_try_link "$LINENO"
15668then :
15669 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15670printf "%s\n" "yes" >&6; }
15671 printf "%s\n" "#define HAVE_XUTF8SETWMPROPERTIES 1" >>confdefs.h
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015672
Illia Bobyra96d5442023-08-30 16:30:15 +020015673else $as_nop
15674 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15675printf "%s\n" "no" >&6; }
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015676fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015677rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015678 conftest$ac_exeext conftest.$ac_ext
15679
Bram Moolenaar071d4272004-06-13 20:20:40 +000015680 CFLAGS=$cflags_save
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015681 LIBS=$libs_save
Bram Moolenaar071d4272004-06-13 20:20:40 +000015682fi
15683
Illia Bobyra96d5442023-08-30 16:30:15 +020015684{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _xpg4_setrunelocale in -lxpg4" >&5
15685printf %s "checking for _xpg4_setrunelocale in -lxpg4... " >&6; }
15686if test ${ac_cv_lib_xpg4__xpg4_setrunelocale+y}
15687then :
15688 printf %s "(cached) " >&6
15689else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015690 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000015691LIBS="-lxpg4 $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015692cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015693/* end confdefs.h. */
15694
Bram Moolenaar446cb832008-06-24 21:56:24 +000015695/* Override any GCC internal prototype to avoid an error.
15696 Use char because int might match the return type of a GCC
15697 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015698char _xpg4_setrunelocale ();
15699int
Illia Bobyra96d5442023-08-30 16:30:15 +020015700main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015701{
Bram Moolenaar446cb832008-06-24 21:56:24 +000015702return _xpg4_setrunelocale ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015703 ;
15704 return 0;
15705}
15706_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015707if ac_fn_c_try_link "$LINENO"
15708then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015709 ac_cv_lib_xpg4__xpg4_setrunelocale=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020015710else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015711 ac_cv_lib_xpg4__xpg4_setrunelocale=no
Bram Moolenaar071d4272004-06-13 20:20:40 +000015712fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015713rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015714 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015715LIBS=$ac_check_lib_save_LIBS
15716fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015717{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xpg4__xpg4_setrunelocale" >&5
15718printf "%s\n" "$ac_cv_lib_xpg4__xpg4_setrunelocale" >&6; }
15719if test "x$ac_cv_lib_xpg4__xpg4_setrunelocale" = xyes
15720then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000015721 LIBS="$LIBS -lxpg4"
Bram Moolenaar071d4272004-06-13 20:20:40 +000015722fi
15723
15724
Illia Bobyra96d5442023-08-30 16:30:15 +020015725{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to create tags" >&5
15726printf %s "checking how to create tags... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015727test -f tags && mv tags tags.save
Bram Moolenaar5897e0c2011-05-10 15:42:03 +020015728if (eval ctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then
Bram Moolenaar509ff062020-01-02 22:38:49 +010015729 TAGPRG="ctags -I INIT+,INIT2+,INIT3+,INIT4+,INIT5+ --fields=+S"
Bram Moolenaar5897e0c2011-05-10 15:42:03 +020015730elif (eval exctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then
Bram Moolenaar509ff062020-01-02 22:38:49 +010015731 TAGPRG="exctags -I INIT+,INIT2+,INIT3+,INIT4+,INIT5+ --fields=+S"
Bram Moolenaar5897e0c2011-05-10 15:42:03 +020015732elif (eval exuberant-ctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then
Bram Moolenaar509ff062020-01-02 22:38:49 +010015733 TAGPRG="exuberant-ctags -I INIT+,INIT2+,INIT3+,INIT4+,INIT5+ --fields=+S"
Bram Moolenaar071d4272004-06-13 20:20:40 +000015734else
Bram Moolenaar0c7ce772009-05-13 12:49:39 +000015735 TAGPRG="ctags"
Bram Moolenaar071d4272004-06-13 20:20:40 +000015736 (eval etags /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="etags"
15737 (eval etags -c /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="etags -c"
15738 (eval ctags /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags"
15739 (eval ctags -t /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -t"
15740 (eval ctags -ts /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -ts"
15741 (eval ctags -tvs /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -tvs"
15742 (eval ctags -i+m /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -i+m"
15743fi
15744test -f tags.save && mv tags.save tags
Illia Bobyra96d5442023-08-30 16:30:15 +020015745{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $TAGPRG" >&5
15746printf "%s\n" "$TAGPRG" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015747
Illia Bobyra96d5442023-08-30 16:30:15 +020015748{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run man with a section nr" >&5
15749printf %s "checking how to run man with a section nr... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015750MANDEF="man"
Bram Moolenaar8b131502008-02-13 09:28:19 +000015751(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 +020015752{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MANDEF" >&5
15753printf "%s\n" "$MANDEF" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015754if test "$MANDEF" = "man -s"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015755 printf "%s\n" "#define USEMAN_S 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015756
15757fi
15758
Illia Bobyra96d5442023-08-30 16:30:15 +020015759{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-nls argument" >&5
15760printf %s "checking --disable-nls argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000015761# Check whether --enable-nls was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020015762if test ${enable_nls+y}
15763then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015764 enableval=$enable_nls;
Illia Bobyra96d5442023-08-30 16:30:15 +020015765else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000015766 enable_nls="yes"
Bram Moolenaar446cb832008-06-24 21:56:24 +000015767fi
15768
Bram Moolenaar071d4272004-06-13 20:20:40 +000015769
15770if test "$enable_nls" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015771 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15772printf "%s\n" "no" >&6; }
Bram Moolenaar2389c3c2005-05-22 22:07:59 +000015773
15774 INSTALL_LANGS=install-languages
15775
15776 INSTALL_TOOL_LANGS=install-tool-languages
15777
15778
Bram Moolenaar071d4272004-06-13 20:20:40 +000015779 # Extract the first word of "msgfmt", so it can be a program name with args.
15780set dummy msgfmt; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +020015781{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15782printf %s "checking for $ac_word... " >&6; }
15783if test ${ac_cv_prog_MSGFMT+y}
15784then :
15785 printf %s "(cached) " >&6
15786else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000015787 if test -n "$MSGFMT"; then
15788 ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
15789else
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015790as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15791for as_dir in $PATH
15792do
15793 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +020015794 case $as_dir in #(((
15795 '') as_dir=./ ;;
15796 */) ;;
15797 *) as_dir=$as_dir/ ;;
15798 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015799 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +020015800 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015801 ac_cv_prog_MSGFMT="msgfmt"
Illia Bobyra96d5442023-08-30 16:30:15 +020015802 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015803 break 2
15804 fi
15805done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015806 done
Bram Moolenaar446cb832008-06-24 21:56:24 +000015807IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015808
Bram Moolenaar071d4272004-06-13 20:20:40 +000015809fi
15810fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015811MSGFMT=$ac_cv_prog_MSGFMT
Bram Moolenaar071d4272004-06-13 20:20:40 +000015812if test -n "$MSGFMT"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015813 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
15814printf "%s\n" "$MSGFMT" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015815else
Illia Bobyra96d5442023-08-30 16:30:15 +020015816 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15817printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015818fi
15819
Bram Moolenaar446cb832008-06-24 21:56:24 +000015820
Illia Bobyra96d5442023-08-30 16:30:15 +020015821 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for NLS" >&5
15822printf %s "checking for NLS... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015823 if test -f po/Makefile; then
15824 have_gettext="no"
15825 if test -n "$MSGFMT"; then
Bram Moolenaar49b6a572013-11-17 20:32:54 +010015826 olibs=$LIBS
15827 LIBS=""
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015829/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015830#include <libintl.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015831int
Illia Bobyra96d5442023-08-30 16:30:15 +020015832main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015833{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015834gettext("Test");
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015835 ;
15836 return 0;
15837}
15838_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015839if ac_fn_c_try_link "$LINENO"
15840then :
15841 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gettext() works" >&5
15842printf "%s\n" "gettext() works" >&6; }; have_gettext="yes"; LIBS=$olibs
15843else $as_nop
Bram Moolenaar49b6a572013-11-17 20:32:54 +010015844 LIBS="-lintl"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015846/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015847#include <libintl.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015848int
Illia Bobyra96d5442023-08-30 16:30:15 +020015849main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015850{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015851gettext("Test");
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015852 ;
15853 return 0;
15854}
15855_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015856if ac_fn_c_try_link "$LINENO"
15857then :
15858 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gettext() works with -lintl" >&5
15859printf "%s\n" "gettext() works with -lintl" >&6; }; have_gettext="yes";
Bram Moolenaar49b6a572013-11-17 20:32:54 +010015860 LIBS="$olibs -lintl"
Illia Bobyra96d5442023-08-30 16:30:15 +020015861else $as_nop
15862 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gettext() doesn't work" >&5
15863printf "%s\n" "gettext() doesn't work" >&6; };
Bram Moolenaar071d4272004-06-13 20:20:40 +000015864 LIBS=$olibs
15865fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015866rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015867 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000015868fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015869rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015870 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000015871 else
Illia Bobyra96d5442023-08-30 16:30:15 +020015872 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: msgfmt not found - disabled" >&5
15873printf "%s\n" "msgfmt not found - disabled" >&6; };
Bram Moolenaar071d4272004-06-13 20:20:40 +000015874 fi
Martin Tournoij7904fa42022-10-04 16:28:45 +010015875 if test $have_gettext = "yes" -a "x$features" != "xtiny"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015876 printf "%s\n" "#define HAVE_GETTEXT 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015877
15878 MAKEMO=yes
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015879
Illia Bobyra96d5442023-08-30 16:30:15 +020015880 ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset"
15881if test "x$ac_cv_func_bind_textdomain_codeset" = xyes
15882then :
15883 printf "%s\n" "#define HAVE_BIND_TEXTDOMAIN_CODESET 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015884
Bram Moolenaar071d4272004-06-13 20:20:40 +000015885fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000015886
Illia Bobyra96d5442023-08-30 16:30:15 +020015887 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _nl_msg_cat_cntr" >&5
15888printf %s "checking for _nl_msg_cat_cntr... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015890/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015891#include <libintl.h>
15892 extern int _nl_msg_cat_cntr;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015893int
Illia Bobyra96d5442023-08-30 16:30:15 +020015894main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015895{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015896++_nl_msg_cat_cntr;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015897 ;
15898 return 0;
15899}
15900_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015901if ac_fn_c_try_link "$LINENO"
15902then :
15903 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15904printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_NL_MSG_CAT_CNTR 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015905
Illia Bobyra96d5442023-08-30 16:30:15 +020015906else $as_nop
15907 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15908printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015909fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015910rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015911 conftest$ac_exeext conftest.$ac_ext
Illia Bobyra96d5442023-08-30 16:30:15 +020015912 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if msgfmt supports --desktop" >&5
15913printf %s "checking if msgfmt supports --desktop... " >&6; }
Bram Moolenaar26096cc2019-04-11 15:25:40 +020015914 MSGFMT_DESKTOP=
15915 if "$MSGFMT" --help | grep -e '--desktop' >/dev/null; then
Bram Moolenaar62a88f42019-06-07 20:44:40 +020015916 if "$MSGFMT" --version | grep '0.19.[3-7]$' >/dev/null; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015917 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: broken" >&5
15918printf "%s\n" "broken" >&6; }
Bram Moolenaar62a88f42019-06-07 20:44:40 +020015919 else
Illia Bobyra96d5442023-08-30 16:30:15 +020015920 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15921printf "%s\n" "yes" >&6; }
Bram Moolenaar62a88f42019-06-07 20:44:40 +020015922 MSGFMT_DESKTOP="gvim.desktop vim.desktop"
15923 fi
Bram Moolenaar26096cc2019-04-11 15:25:40 +020015924 else
Illia Bobyra96d5442023-08-30 16:30:15 +020015925 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15926printf "%s\n" "no" >&6; }
Bram Moolenaar26096cc2019-04-11 15:25:40 +020015927 fi
15928
Bram Moolenaar071d4272004-06-13 20:20:40 +000015929 fi
15930 else
Illia Bobyra96d5442023-08-30 16:30:15 +020015931 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no \"po/Makefile\" - disabled" >&5
15932printf "%s\n" "no \"po/Makefile\" - disabled" >&6; };
Bram Moolenaar071d4272004-06-13 20:20:40 +000015933 fi
15934else
Illia Bobyra96d5442023-08-30 16:30:15 +020015935 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15936printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015937fi
15938
Illia Bobyra96d5442023-08-30 16:30:15 +020015939ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
15940if test "x$ac_cv_header_dlfcn_h" = xyes
15941then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000015942 DLL=dlfcn.h
Illia Bobyra96d5442023-08-30 16:30:15 +020015943else $as_nop
15944 ac_fn_c_check_header_compile "$LINENO" "dl.h" "ac_cv_header_dl_h" "$ac_includes_default"
15945if test "x$ac_cv_header_dl_h" = xyes
15946then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015947 DLL=dl.h
15948fi
15949
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015950fi
15951
Bram Moolenaar071d4272004-06-13 20:20:40 +000015952if test x${DLL} = xdlfcn.h; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015953
Illia Bobyra96d5442023-08-30 16:30:15 +020015954printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015955
Illia Bobyra96d5442023-08-30 16:30:15 +020015956 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen()" >&5
15957printf %s "checking for dlopen()... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015959/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015960
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015961int
Illia Bobyra96d5442023-08-30 16:30:15 +020015962main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015963{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015964
15965 extern void* dlopen();
15966 dlopen();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015967
15968 ;
15969 return 0;
15970}
15971_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015972if ac_fn_c_try_link "$LINENO"
15973then :
15974 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15975printf "%s\n" "yes" >&6; };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015976
Illia Bobyra96d5442023-08-30 16:30:15 +020015977printf "%s\n" "#define HAVE_DLOPEN 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015978
Illia Bobyra96d5442023-08-30 16:30:15 +020015979else $as_nop
15980 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15981printf "%s\n" "no" >&6; };
15982 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen() in -ldl" >&5
15983printf %s "checking for dlopen() in -ldl... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015984 olibs=$LIBS
15985 LIBS="$LIBS -ldl"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015987/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015988
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015989int
Illia Bobyra96d5442023-08-30 16:30:15 +020015990main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015991{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015992
15993 extern void* dlopen();
15994 dlopen();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015995
15996 ;
15997 return 0;
15998}
15999_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016000if ac_fn_c_try_link "$LINENO"
16001then :
16002 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16003printf "%s\n" "yes" >&6; };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016004
Illia Bobyra96d5442023-08-30 16:30:15 +020016005printf "%s\n" "#define HAVE_DLOPEN 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016006
Illia Bobyra96d5442023-08-30 16:30:15 +020016007else $as_nop
16008 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16009printf "%s\n" "no" >&6; };
Bram Moolenaar071d4272004-06-13 20:20:40 +000016010 LIBS=$olibs
16011fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016012rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016013 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000016014fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016015rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016016 conftest$ac_exeext conftest.$ac_ext
Illia Bobyra96d5442023-08-30 16:30:15 +020016017 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlsym()" >&5
16018printf %s "checking for dlsym()... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016020/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016021
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016022int
Illia Bobyra96d5442023-08-30 16:30:15 +020016023main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016024{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016025
16026 extern void* dlsym();
16027 dlsym();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016028
16029 ;
16030 return 0;
16031}
16032_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016033if ac_fn_c_try_link "$LINENO"
16034then :
16035 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16036printf "%s\n" "yes" >&6; };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016037
Illia Bobyra96d5442023-08-30 16:30:15 +020016038printf "%s\n" "#define HAVE_DLSYM 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016039
Illia Bobyra96d5442023-08-30 16:30:15 +020016040else $as_nop
16041 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16042printf "%s\n" "no" >&6; };
16043 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlsym() in -ldl" >&5
16044printf %s "checking for dlsym() in -ldl... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000016045 olibs=$LIBS
16046 LIBS="$LIBS -ldl"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016048/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016049
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016050int
Illia Bobyra96d5442023-08-30 16:30:15 +020016051main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016052{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016053
16054 extern void* dlsym();
16055 dlsym();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016056
16057 ;
16058 return 0;
16059}
16060_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016061if ac_fn_c_try_link "$LINENO"
16062then :
16063 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16064printf "%s\n" "yes" >&6; };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016065
Illia Bobyra96d5442023-08-30 16:30:15 +020016066printf "%s\n" "#define HAVE_DLSYM 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016067
Illia Bobyra96d5442023-08-30 16:30:15 +020016068else $as_nop
16069 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16070printf "%s\n" "no" >&6; };
Bram Moolenaar071d4272004-06-13 20:20:40 +000016071 LIBS=$olibs
16072fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016073rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016074 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000016075fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016076rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016077 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000016078elif test x${DLL} = xdl.h; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016079
Illia Bobyra96d5442023-08-30 16:30:15 +020016080printf "%s\n" "#define HAVE_DL_H 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016081
Illia Bobyra96d5442023-08-30 16:30:15 +020016082 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load()" >&5
16083printf %s "checking for shl_load()... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016085/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016086
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016087int
Illia Bobyra96d5442023-08-30 16:30:15 +020016088main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016089{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016090
16091 extern void* shl_load();
16092 shl_load();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016093
16094 ;
16095 return 0;
16096}
16097_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016098if ac_fn_c_try_link "$LINENO"
16099then :
16100 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16101printf "%s\n" "yes" >&6; };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016102
Illia Bobyra96d5442023-08-30 16:30:15 +020016103printf "%s\n" "#define HAVE_SHL_LOAD 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016104
Illia Bobyra96d5442023-08-30 16:30:15 +020016105else $as_nop
16106 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16107printf "%s\n" "no" >&6; };
16108 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load() in -ldld" >&5
16109printf %s "checking for shl_load() in -ldld... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000016110 olibs=$LIBS
16111 LIBS="$LIBS -ldld"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016113/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016114
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016115int
Illia Bobyra96d5442023-08-30 16:30:15 +020016116main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016117{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016118
16119 extern void* shl_load();
16120 shl_load();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016121
16122 ;
16123 return 0;
16124}
16125_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016126if ac_fn_c_try_link "$LINENO"
16127then :
16128 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16129printf "%s\n" "yes" >&6; };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016130
Illia Bobyra96d5442023-08-30 16:30:15 +020016131printf "%s\n" "#define HAVE_SHL_LOAD 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016132
Illia Bobyra96d5442023-08-30 16:30:15 +020016133else $as_nop
16134 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16135printf "%s\n" "no" >&6; };
Bram Moolenaar071d4272004-06-13 20:20:40 +000016136 LIBS=$olibs
16137fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016138rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016139 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000016140fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016141rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016142 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000016143fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016144ac_fn_c_check_header_compile "$LINENO" "setjmp.h" "ac_cv_header_setjmp_h" "$ac_includes_default"
16145if test "x$ac_cv_header_setjmp_h" = xyes
16146then :
16147 printf "%s\n" "#define HAVE_SETJMP_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016148
16149fi
16150
Bram Moolenaar071d4272004-06-13 20:20:40 +000016151
Bram Moolenaard0573012017-10-28 21:11:06 +020016152if test "x$MACOS_X" = "xyes" -a -n "$PERL"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000016153 if echo $LIBS | grep -e '-ldl' >/dev/null; then
16154 LIBS=`echo $LIBS | sed s/-ldl//`
16155 PERL_LIBS="$PERL_LIBS -ldl"
16156 fi
16157fi
16158
Bram Moolenaard0573012017-10-28 21:11:06 +020016159if test "$MACOS_X" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016160 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need macOS frameworks" >&5
16161printf %s "checking whether we need macOS frameworks... " >&6; }
Bram Moolenaar097148e2020-08-11 21:58:20 +020016162 if test "$MACOS_X_DARWIN" = "yes"; then
Bram Moolenaard0573012017-10-28 21:11:06 +020016163 if test "$features" = "tiny"; then
16164 OS_EXTRA_SRC=`echo "$OS_EXTRA_SRC" | sed -e 's+os_macosx.m++'`
16165 OS_EXTRA_OBJ=`echo "$OS_EXTRA_OBJ" | sed -e 's+objects/os_macosx.o++'`
Illia Bobyra96d5442023-08-30 16:30:15 +020016166 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, we need CoreServices" >&5
16167printf "%s\n" "yes, we need CoreServices" >&6; }
Bram Moolenaar2be7cb72019-01-12 16:10:51 +010016168 LIBS="$LIBS -framework CoreServices"
Bram Moolenaard0573012017-10-28 21:11:06 +020016169 else
Illia Bobyra96d5442023-08-30 16:30:15 +020016170 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, we need AppKit" >&5
16171printf "%s\n" "yes, we need AppKit" >&6; }
Bram Moolenaard0573012017-10-28 21:11:06 +020016172 LIBS="$LIBS -framework AppKit"
Bram Moolenaard0573012017-10-28 21:11:06 +020016173 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000016174 else
Illia Bobyra96d5442023-08-30 16:30:15 +020016175 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16176printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000016177 fi
16178fi
16179
Christian Brabandt6b9efdd2021-09-09 17:14:50 +020016180if `echo "$CFLAGS" | grep -v D_REENTRANT >/dev/null`; then
Bram Moolenaar3ae5fc92021-09-06 18:57:30 +020016181 CFLAGS="$CFLAGS -D_REENTRANT"
16182fi
16183
Bram Moolenaard5cdbeb2005-10-10 20:59:28 +000016184DEPEND_CFLAGS_FILTER=
16185if test "$GCC" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016186 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GCC 3 or later" >&5
16187printf %s "checking for GCC 3 or later... " >&6; }
Bram Moolenaar348808f2020-02-07 20:50:07 +010016188 gccmajor=`echo "$gccversion" | sed -e 's/^\([1-9][0-9]*\)\..*$/\1/g'`
Bram Moolenaarf740b292006-02-16 22:11:02 +000016189 if test "$gccmajor" -gt "2"; then
Bram Moolenaard5cdbeb2005-10-10 20:59:28 +000016190 DEPEND_CFLAGS_FILTER="| sed 's+-I */+-isystem /+g'"
Illia Bobyra96d5442023-08-30 16:30:15 +020016191 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16192printf "%s\n" "yes" >&6; }
Bram Moolenaar0cd49302008-11-20 09:37:01 +000016193 else
Illia Bobyra96d5442023-08-30 16:30:15 +020016194 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16195printf "%s\n" "no" >&6; }
Bram Moolenaar0cd49302008-11-20 09:37:01 +000016196 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016197 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D_FORTIFY_SOURCE=1" >&5
16198printf %s "checking whether we need -D_FORTIFY_SOURCE=1... " >&6; }
Bram Moolenaar0cd49302008-11-20 09:37:01 +000016199 if test "$gccmajor" -gt "3"; then
Zdenek Dohnal42196982023-01-18 16:09:51 +000016200 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/'`
16201 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 +020016202 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16203printf "%s\n" "yes" >&6; }
Bram Moolenaar0cd49302008-11-20 09:37:01 +000016204 else
Illia Bobyra96d5442023-08-30 16:30:15 +020016205 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16206printf "%s\n" "no" >&6; }
Bram Moolenaar0cd49302008-11-20 09:37:01 +000016207 fi
Bram Moolenaara5792f52005-11-23 21:25:05 +000016208fi
Bram Moolenaard5cdbeb2005-10-10 20:59:28 +000016209
Bram Moolenaar071d4272004-06-13 20:20:40 +000016210
Illia Bobyra96d5442023-08-30 16:30:15 +020016211{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need to force -D_FILE_OFFSET_BITS=64" >&5
16212printf %s "checking whether we need to force -D_FILE_OFFSET_BITS=64... " >&6; }
Bram Moolenaar9ce42132018-04-11 22:19:36 +020016213if 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 +020016214 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16215printf "%s\n" "yes" >&6; }
16216 printf "%s\n" "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Bram Moolenaarec0557f2018-01-31 14:41:37 +010016217
16218else
Illia Bobyra96d5442023-08-30 16:30:15 +020016219 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16220printf "%s\n" "no" >&6; }
Bram Moolenaarec0557f2018-01-31 14:41:37 +010016221fi
16222
Bram Moolenaar6cd42db2020-12-04 18:09:54 +010016223LDFLAGS=`echo "$LDFLAGS" | sed -e 's/-L /-L/g'`
16224
Illia Bobyra96d5442023-08-30 16:30:15 +020016225{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking linker --as-needed support" >&5
16226printf %s "checking linker --as-needed support... " >&6; }
Bram Moolenaar22e193d2010-11-03 22:32:24 +010016227LINK_AS_NEEDED=
16228# Check if linker supports --as-needed and --no-as-needed options
16229if $CC -Wl,--help 2>/dev/null | grep as-needed > /dev/null; then
Natanael Copa761ead42021-05-15 14:25:37 +020016230 if ! echo "$LDFLAGS" | grep -q -- '-Wl,[^[:space:]]*--as-needed'; then
16231 LDFLAGS="$LDFLAGS -Wl,--as-needed"
16232 fi
Bram Moolenaar22e193d2010-11-03 22:32:24 +010016233 LINK_AS_NEEDED=yes
16234fi
16235if test "$LINK_AS_NEEDED" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016236 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16237printf "%s\n" "yes" >&6; }
Bram Moolenaar22e193d2010-11-03 22:32:24 +010016238else
Illia Bobyra96d5442023-08-30 16:30:15 +020016239 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16240printf "%s\n" "no" >&6; }
Bram Moolenaar22e193d2010-11-03 22:32:24 +010016241fi
16242
16243
Bram Moolenaar77c19352012-06-13 19:19:41 +020016244# IBM z/OS reset CFLAGS for config.mk
16245if test "$zOSUnix" = "yes"; then
16246 CFLAGS="-D_ALL_SOURCE -Wc,float\(ieee\),dll"
16247fi
16248
Bram Moolenaar446cb832008-06-24 21:56:24 +000016249ac_config_files="$ac_config_files auto/config.mk:config.mk.in"
16250
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016251cat >confcache <<\_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000016252# This file is a shell script that caches the results of configure
16253# tests run on this system so they can be shared between configure
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016254# scripts and configure runs, see configure's option --config-cache.
16255# It is not useful on other systems. If it contains results you don't
16256# want to keep, you may remove or edit it.
Bram Moolenaar071d4272004-06-13 20:20:40 +000016257#
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016258# config.status only pays attention to the cache file if you give it
16259# the --recheck option to rerun configure.
Bram Moolenaar071d4272004-06-13 20:20:40 +000016260#
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016261# `ac_cv_env_foo' variables (set or unset) will be overridden when
16262# loading this file, other *unset* `ac_cv_foo' will be assigned the
16263# following values.
16264
16265_ACEOF
16266
Bram Moolenaar071d4272004-06-13 20:20:40 +000016267# The following way of writing the cache mishandles newlines in values,
16268# but we know of no workaround that is simple, portable, and efficient.
Bram Moolenaar446cb832008-06-24 21:56:24 +000016269# So, we kill variables containing newlines.
Bram Moolenaar071d4272004-06-13 20:20:40 +000016270# Ultrix sh set writes to stderr and can't be redirected directly,
16271# and sets the high bit in the cache file unless we assign to the vars.
Bram Moolenaar446cb832008-06-24 21:56:24 +000016272(
16273 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16274 eval ac_val=\$$ac_var
16275 case $ac_val in #(
16276 *${as_nl}*)
16277 case $ac_var in #(
Illia Bobyra96d5442023-08-30 16:30:15 +020016278 *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16279printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016280 esac
16281 case $ac_var in #(
16282 _ | IFS | as_nl) ;; #(
16283 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016284 *) { eval $ac_var=; unset $ac_var;} ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016285 esac ;;
16286 esac
16287 done
16288
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016289 (set) 2>&1 |
Bram Moolenaar446cb832008-06-24 21:56:24 +000016290 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16291 *${as_nl}ac_space=\ *)
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016292 # `set' does not quote correctly, so add quotes: double-quote
16293 # substitution turns \\\\ into \\, and sed turns \\ into \.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016294 sed -n \
16295 "s/'/'\\\\''/g;
16296 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Bram Moolenaar446cb832008-06-24 21:56:24 +000016297 ;; #(
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016298 *)
16299 # `set' quotes correctly as required by POSIX, so do not add quotes.
Bram Moolenaar446cb832008-06-24 21:56:24 +000016300 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016301 ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016302 esac |
16303 sort
16304) |
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016305 sed '
Bram Moolenaar446cb832008-06-24 21:56:24 +000016306 /^ac_cv_env_/b end
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016307 t clear
Bram Moolenaar446cb832008-06-24 21:56:24 +000016308 :clear
Illia Bobyra96d5442023-08-30 16:30:15 +020016309 s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016310 t end
Bram Moolenaar446cb832008-06-24 21:56:24 +000016311 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16312 :end' >>confcache
16313if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16314 if test -w "$cache_file"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010016315 if test "x$cache_file" != "x/dev/null"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016316 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16317printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
Bram Moolenaar7db77842014-03-27 17:40:59 +010016318 if test ! -f "$cache_file" || test -h "$cache_file"; then
16319 cat confcache >"$cache_file"
16320 else
16321 case $cache_file in #(
16322 */* | ?:*)
16323 mv -f confcache "$cache_file"$$ &&
16324 mv -f "$cache_file"$$ "$cache_file" ;; #(
16325 *)
16326 mv -f confcache "$cache_file" ;;
16327 esac
16328 fi
16329 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000016330 else
Illia Bobyra96d5442023-08-30 16:30:15 +020016331 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16332printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
Bram Moolenaar071d4272004-06-13 20:20:40 +000016333 fi
16334fi
16335rm -f confcache
16336
Bram Moolenaar071d4272004-06-13 20:20:40 +000016337test "x$prefix" = xNONE && prefix=$ac_default_prefix
16338# Let make expand exec_prefix.
16339test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16340
Bram Moolenaar071d4272004-06-13 20:20:40 +000016341DEFS=-DHAVE_CONFIG_H
16342
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016343ac_libobjs=
16344ac_ltlibobjs=
Bram Moolenaar7db77842014-03-27 17:40:59 +010016345U=
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016346for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16347 # 1. Remove the extension, and $U if already installed.
Bram Moolenaar446cb832008-06-24 21:56:24 +000016348 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Illia Bobyra96d5442023-08-30 16:30:15 +020016349 ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
Bram Moolenaar446cb832008-06-24 21:56:24 +000016350 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16351 # will be set to the directory where LIBOBJS objects are built.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016352 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16353 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016354done
16355LIBOBJS=$ac_libobjs
16356
16357LTLIBOBJS=$ac_ltlibobjs
16358
16359
16360
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020016361
Bram Moolenaar7db77842014-03-27 17:40:59 +010016362: "${CONFIG_STATUS=./config.status}"
Bram Moolenaar446cb832008-06-24 21:56:24 +000016363ac_write_fail=0
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016364ac_clean_files_save=$ac_clean_files
16365ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Illia Bobyra96d5442023-08-30 16:30:15 +020016366{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16367printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016368as_write_fail=0
16369cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016370#! $SHELL
16371# Generated by $as_me.
Bram Moolenaar071d4272004-06-13 20:20:40 +000016372# Run this file to recreate the current configuration.
Bram Moolenaar071d4272004-06-13 20:20:40 +000016373# Compiler output produced by configure, useful for debugging
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016374# configure, is in config.log if it exists.
Bram Moolenaar071d4272004-06-13 20:20:40 +000016375
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016376debug=false
16377ac_cs_recheck=false
16378ac_cs_silent=false
Bram Moolenaar071d4272004-06-13 20:20:40 +000016379
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016380SHELL=\${CONFIG_SHELL-$SHELL}
16381export SHELL
16382_ASEOF
16383cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16384## -------------------- ##
16385## M4sh Initialization. ##
16386## -------------------- ##
Bram Moolenaar071d4272004-06-13 20:20:40 +000016387
Bram Moolenaar446cb832008-06-24 21:56:24 +000016388# Be more Bourne compatible
16389DUALCASE=1; export DUALCASE # for MKS sh
Illia Bobyra96d5442023-08-30 16:30:15 +020016390as_nop=:
16391if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
16392then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016393 emulate sh
16394 NULLCMD=:
Bram Moolenaar446cb832008-06-24 21:56:24 +000016395 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016396 # is contrary to our usage. Disable this feature.
16397 alias -g '${1+"$@"}'='"$@"'
Bram Moolenaar446cb832008-06-24 21:56:24 +000016398 setopt NO_GLOB_SUBST
Illia Bobyra96d5442023-08-30 16:30:15 +020016399else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016400 case `(set -o) 2>/dev/null` in #(
16401 *posix*) :
16402 set -o posix ;; #(
16403 *) :
16404 ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016405esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000016406fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000016407
16408
Illia Bobyra96d5442023-08-30 16:30:15 +020016409
16410# Reset variables that may have inherited troublesome values from
16411# the environment.
16412
16413# IFS needs to be set, to space, tab, and newline, in precisely that order.
16414# (If _AS_PATH_WALK were called with IFS unset, it would have the
16415# side effect of setting IFS to empty, thus disabling word splitting.)
16416# Quoting is to prevent editors from complaining about space-tab.
Bram Moolenaar446cb832008-06-24 21:56:24 +000016417as_nl='
16418'
16419export as_nl
Illia Bobyra96d5442023-08-30 16:30:15 +020016420IFS=" "" $as_nl"
16421
16422PS1='$ '
16423PS2='> '
16424PS4='+ '
16425
16426# Ensure predictable behavior from utilities with locale-dependent output.
16427LC_ALL=C
16428export LC_ALL
16429LANGUAGE=C
16430export LANGUAGE
16431
16432# We cannot yet rely on "unset" to work, but we need these variables
16433# to be unset--not just set to an empty or harmless value--now, to
16434# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
16435# also avoids known problems related to "unset" and subshell syntax
16436# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
16437for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
16438do eval test \${$as_var+y} \
16439 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
16440done
16441
16442# Ensure that fds 0, 1, and 2 are open.
16443if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
16444if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
16445if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000016446
16447# The user is always right.
Illia Bobyra96d5442023-08-30 16:30:15 +020016448if ${PATH_SEPARATOR+false} :; then
Bram Moolenaar446cb832008-06-24 21:56:24 +000016449 PATH_SEPARATOR=:
16450 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16451 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16452 PATH_SEPARATOR=';'
16453 }
16454fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000016455
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016456
Bram Moolenaar446cb832008-06-24 21:56:24 +000016457# Find who we are. Look in the path if we contain no directory separator.
Bram Moolenaar7db77842014-03-27 17:40:59 +010016458as_myself=
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016459case $0 in #((
Bram Moolenaar446cb832008-06-24 21:56:24 +000016460 *[\\/]* ) as_myself=$0 ;;
16461 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16462for as_dir in $PATH
16463do
16464 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +020016465 case $as_dir in #(((
16466 '') as_dir=./ ;;
16467 */) ;;
16468 *) as_dir=$as_dir/ ;;
16469 esac
16470 test -r "$as_dir$0" && as_myself=$as_dir$0 && break
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016471 done
Bram Moolenaar446cb832008-06-24 21:56:24 +000016472IFS=$as_save_IFS
16473
16474 ;;
16475esac
16476# We did not find ourselves, most probably we were run as `sh COMMAND'
16477# in which case we are not to be found in the path.
16478if test "x$as_myself" = x; then
16479 as_myself=$0
16480fi
16481if test ! -f "$as_myself"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016482 printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016483 exit 1
Bram Moolenaar446cb832008-06-24 21:56:24 +000016484fi
16485
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016486
16487
Bram Moolenaar7db77842014-03-27 17:40:59 +010016488# as_fn_error STATUS ERROR [LINENO LOG_FD]
16489# ----------------------------------------
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016490# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16491# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Bram Moolenaar7db77842014-03-27 17:40:59 +010016492# script with STATUS, using 1 if that was 0.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016493as_fn_error ()
16494{
Bram Moolenaar7db77842014-03-27 17:40:59 +010016495 as_status=$1; test $as_status -eq 0 && as_status=1
16496 if test "$4"; then
16497 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +020016498 printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016499 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016500 printf "%s\n" "$as_me: error: $2" >&2
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016501 as_fn_exit $as_status
16502} # as_fn_error
16503
16504
Illia Bobyra96d5442023-08-30 16:30:15 +020016505
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016506# as_fn_set_status STATUS
16507# -----------------------
16508# Set $? to STATUS, without forking.
16509as_fn_set_status ()
16510{
16511 return $1
16512} # as_fn_set_status
16513
16514# as_fn_exit STATUS
16515# -----------------
16516# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16517as_fn_exit ()
16518{
16519 set +e
16520 as_fn_set_status $1
16521 exit $1
16522} # as_fn_exit
16523
16524# as_fn_unset VAR
16525# ---------------
16526# Portably unset VAR.
16527as_fn_unset ()
16528{
16529 { eval $1=; unset $1;}
16530}
16531as_unset=as_fn_unset
Illia Bobyra96d5442023-08-30 16:30:15 +020016532
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016533# as_fn_append VAR VALUE
16534# ----------------------
16535# Append the text in VALUE to the end of the definition contained in VAR. Take
16536# advantage of any shell optimizations that allow amortized linear growth over
16537# repeated appends, instead of the typical quadratic growth present in naive
16538# implementations.
Illia Bobyra96d5442023-08-30 16:30:15 +020016539if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
16540then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016541 eval 'as_fn_append ()
16542 {
16543 eval $1+=\$2
16544 }'
Illia Bobyra96d5442023-08-30 16:30:15 +020016545else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016546 as_fn_append ()
16547 {
16548 eval $1=\$$1\$2
16549 }
16550fi # as_fn_append
16551
16552# as_fn_arith ARG...
16553# ------------------
16554# Perform arithmetic evaluation on the ARGs, and store the result in the
16555# global $as_val. Take advantage of shells that can avoid forks. The arguments
16556# must be portable across $(()) and expr.
Illia Bobyra96d5442023-08-30 16:30:15 +020016557if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
16558then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016559 eval 'as_fn_arith ()
16560 {
16561 as_val=$(( $* ))
16562 }'
Illia Bobyra96d5442023-08-30 16:30:15 +020016563else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016564 as_fn_arith ()
16565 {
16566 as_val=`expr "$@" || test $? -eq 1`
16567 }
16568fi # as_fn_arith
16569
16570
Bram Moolenaar446cb832008-06-24 21:56:24 +000016571if expr a : '\(a\)' >/dev/null 2>&1 &&
16572 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016573 as_expr=expr
16574else
16575 as_expr=false
16576fi
16577
Bram Moolenaar446cb832008-06-24 21:56:24 +000016578if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016579 as_basename=basename
16580else
16581 as_basename=false
16582fi
16583
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016584if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16585 as_dirname=dirname
16586else
16587 as_dirname=false
16588fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016589
Bram Moolenaar446cb832008-06-24 21:56:24 +000016590as_me=`$as_basename -- "$0" ||
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016591$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16592 X"$0" : 'X\(//\)$' \| \
Bram Moolenaar446cb832008-06-24 21:56:24 +000016593 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Illia Bobyra96d5442023-08-30 16:30:15 +020016594printf "%s\n" X/"$0" |
Bram Moolenaar446cb832008-06-24 21:56:24 +000016595 sed '/^.*\/\([^/][^/]*\)\/*$/{
16596 s//\1/
16597 q
16598 }
16599 /^X\/\(\/\/\)$/{
16600 s//\1/
16601 q
16602 }
16603 /^X\/\(\/\).*/{
16604 s//\1/
16605 q
16606 }
16607 s/.*/./; q'`
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016608
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016609# Avoid depending upon Character Ranges.
16610as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16611as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16612as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16613as_cr_digits='0123456789'
16614as_cr_alnum=$as_cr_Letters$as_cr_digits
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016615
Illia Bobyra96d5442023-08-30 16:30:15 +020016616
16617# Determine whether it's possible to make 'echo' print without a newline.
16618# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
16619# for compatibility with existing Makefiles.
Bram Moolenaar446cb832008-06-24 21:56:24 +000016620ECHO_C= ECHO_N= ECHO_T=
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016621case `echo -n x` in #(((((
Bram Moolenaar446cb832008-06-24 21:56:24 +000016622-n*)
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016623 case `echo 'xy\c'` in
Bram Moolenaar446cb832008-06-24 21:56:24 +000016624 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016625 xy) ECHO_C='\c';;
16626 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16627 ECHO_T=' ';;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016628 esac;;
16629*)
16630 ECHO_N='-n';;
16631esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016632
Illia Bobyra96d5442023-08-30 16:30:15 +020016633# For backward compatibility with old third-party macros, we provide
16634# the shell variables $as_echo and $as_echo_n. New code should use
16635# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
16636as_echo='printf %s\n'
16637as_echo_n='printf %s'
16638
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016639rm -f conf$$ conf$$.exe conf$$.file
Bram Moolenaar446cb832008-06-24 21:56:24 +000016640if test -d conf$$.dir; then
16641 rm -f conf$$.dir/conf$$.file
16642else
16643 rm -f conf$$.dir
16644 mkdir conf$$.dir 2>/dev/null
16645fi
16646if (echo >conf$$.file) 2>/dev/null; then
16647 if ln -s conf$$.file conf$$ 2>/dev/null; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016648 as_ln_s='ln -s'
Bram Moolenaar446cb832008-06-24 21:56:24 +000016649 # ... but there are two gotchas:
16650 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16651 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Bram Moolenaar7db77842014-03-27 17:40:59 +010016652 # In both cases, we have to default to `cp -pR'.
Bram Moolenaar446cb832008-06-24 21:56:24 +000016653 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Bram Moolenaar7db77842014-03-27 17:40:59 +010016654 as_ln_s='cp -pR'
Bram Moolenaar446cb832008-06-24 21:56:24 +000016655 elif ln conf$$.file conf$$ 2>/dev/null; then
16656 as_ln_s=ln
16657 else
Bram Moolenaar7db77842014-03-27 17:40:59 +010016658 as_ln_s='cp -pR'
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016659 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016660else
Bram Moolenaar7db77842014-03-27 17:40:59 +010016661 as_ln_s='cp -pR'
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016662fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000016663rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16664rmdir conf$$.dir 2>/dev/null
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016665
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016666
16667# as_fn_mkdir_p
16668# -------------
16669# Create "$as_dir" as a directory, including parents if necessary.
16670as_fn_mkdir_p ()
16671{
16672
16673 case $as_dir in #(
16674 -*) as_dir=./$as_dir;;
16675 esac
16676 test -d "$as_dir" || eval $as_mkdir_p || {
16677 as_dirs=
16678 while :; do
16679 case $as_dir in #(
Illia Bobyra96d5442023-08-30 16:30:15 +020016680 *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016681 *) as_qdir=$as_dir;;
16682 esac
16683 as_dirs="'$as_qdir' $as_dirs"
16684 as_dir=`$as_dirname -- "$as_dir" ||
16685$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16686 X"$as_dir" : 'X\(//\)[^/]' \| \
16687 X"$as_dir" : 'X\(//\)$' \| \
16688 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Illia Bobyra96d5442023-08-30 16:30:15 +020016689printf "%s\n" X"$as_dir" |
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016690 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16691 s//\1/
16692 q
16693 }
16694 /^X\(\/\/\)[^/].*/{
16695 s//\1/
16696 q
16697 }
16698 /^X\(\/\/\)$/{
16699 s//\1/
16700 q
16701 }
16702 /^X\(\/\).*/{
16703 s//\1/
16704 q
16705 }
16706 s/.*/./; q'`
16707 test -d "$as_dir" && break
16708 done
16709 test -z "$as_dirs" || eval "mkdir $as_dirs"
Bram Moolenaar7db77842014-03-27 17:40:59 +010016710 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016711
16712
16713} # as_fn_mkdir_p
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016714if mkdir -p . 2>/dev/null; then
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016715 as_mkdir_p='mkdir -p "$as_dir"'
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016716else
16717 test -d ./-p && rmdir ./-p
16718 as_mkdir_p=false
16719fi
16720
Bram Moolenaar7db77842014-03-27 17:40:59 +010016721
16722# as_fn_executable_p FILE
16723# -----------------------
16724# Test if FILE is an executable regular file.
16725as_fn_executable_p ()
16726{
16727 test -f "$1" && test -x "$1"
16728} # as_fn_executable_p
16729as_test_x='test -x'
16730as_executable_p=as_fn_executable_p
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016731
16732# Sed expression to map a string onto a valid CPP name.
16733as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
16734
16735# Sed expression to map a string onto a valid variable name.
16736as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
16737
16738
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016739exec 6>&1
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016740## ----------------------------------- ##
16741## Main body of $CONFIG_STATUS script. ##
16742## ----------------------------------- ##
16743_ASEOF
16744test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016745
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016746cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16747# Save the log message, to keep $0 and so on meaningful, and to
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016748# report actual input values of CONFIG_FILES etc. instead of their
Bram Moolenaar446cb832008-06-24 21:56:24 +000016749# values after options handling.
16750ac_log="
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016751This file was extended by $as_me, which was
Illia Bobyra96d5442023-08-30 16:30:15 +020016752generated by GNU Autoconf 2.71. Invocation command line was
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016753
16754 CONFIG_FILES = $CONFIG_FILES
16755 CONFIG_HEADERS = $CONFIG_HEADERS
16756 CONFIG_LINKS = $CONFIG_LINKS
16757 CONFIG_COMMANDS = $CONFIG_COMMANDS
16758 $ $0 $@
16759
Bram Moolenaar446cb832008-06-24 21:56:24 +000016760on `(hostname || uname -n) 2>/dev/null | sed 1q`
16761"
16762
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016763_ACEOF
16764
Bram Moolenaar32f31b12009-05-21 13:20:59 +000016765case $ac_config_files in *"
16766"*) set x $ac_config_files; shift; ac_config_files=$*;;
16767esac
16768
16769case $ac_config_headers in *"
16770"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16771esac
16772
16773
Bram Moolenaar446cb832008-06-24 21:56:24 +000016774cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016775# Files that config.status was made for.
Bram Moolenaar446cb832008-06-24 21:56:24 +000016776config_files="$ac_config_files"
16777config_headers="$ac_config_headers"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016778
Bram Moolenaar446cb832008-06-24 21:56:24 +000016779_ACEOF
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016780
Bram Moolenaar446cb832008-06-24 21:56:24 +000016781cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016782ac_cs_usage="\
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016783\`$as_me' instantiates files and other configuration actions
16784from templates according to the current configuration. Unless the files
16785and actions are specified as TAGs, all are instantiated by default.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016786
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016787Usage: $0 [OPTION]... [TAG]...
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016788
16789 -h, --help print this help, then exit
Bram Moolenaar446cb832008-06-24 21:56:24 +000016790 -V, --version print version number and configuration settings, then exit
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016791 --config print configuration, then exit
Bram Moolenaar32f31b12009-05-21 13:20:59 +000016792 -q, --quiet, --silent
16793 do not print progress messages
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016794 -d, --debug don't remove temporary files
16795 --recheck update $as_me by reconfiguring in the same conditions
Bram Moolenaar32f31b12009-05-21 13:20:59 +000016796 --file=FILE[:TEMPLATE]
Bram Moolenaar446cb832008-06-24 21:56:24 +000016797 instantiate the configuration file FILE
Bram Moolenaar32f31b12009-05-21 13:20:59 +000016798 --header=FILE[:TEMPLATE]
Bram Moolenaar446cb832008-06-24 21:56:24 +000016799 instantiate the configuration header FILE
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016800
16801Configuration files:
16802$config_files
16803
16804Configuration headers:
16805$config_headers
16806
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016807Report bugs to the package provider."
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016808
Bram Moolenaar446cb832008-06-24 21:56:24 +000016809_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016810ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
16811ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
Bram Moolenaar446cb832008-06-24 21:56:24 +000016812cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Illia Bobyra96d5442023-08-30 16:30:15 +020016813ac_cs_config='$ac_cs_config_escaped'
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016814ac_cs_version="\\
16815config.status
Illia Bobyra96d5442023-08-30 16:30:15 +020016816configured by $0, generated by GNU Autoconf 2.71,
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016817 with options \\"\$ac_cs_config\\"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016818
Illia Bobyra96d5442023-08-30 16:30:15 +020016819Copyright (C) 2021 Free Software Foundation, Inc.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016820This config.status script is free software; the Free Software Foundation
16821gives unlimited permission to copy, distribute and modify it."
Bram Moolenaar446cb832008-06-24 21:56:24 +000016822
16823ac_pwd='$ac_pwd'
16824srcdir='$srcdir'
16825AWK='$AWK'
16826test -n "\$AWK" || AWK=awk
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016827_ACEOF
16828
Bram Moolenaar446cb832008-06-24 21:56:24 +000016829cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16830# The default lists apply if the user does not specify any file.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016831ac_need_defaults=:
16832while test $# != 0
16833do
16834 case $1 in
Bram Moolenaar7db77842014-03-27 17:40:59 +010016835 --*=?*)
Bram Moolenaar446cb832008-06-24 21:56:24 +000016836 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16837 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016838 ac_shift=:
16839 ;;
Bram Moolenaar7db77842014-03-27 17:40:59 +010016840 --*=)
16841 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16842 ac_optarg=
16843 ac_shift=:
16844 ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016845 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016846 ac_option=$1
16847 ac_optarg=$2
16848 ac_shift=shift
16849 ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016850 esac
16851
16852 case $ac_option in
16853 # Handling of the options.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016854 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16855 ac_cs_recheck=: ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016856 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Illia Bobyra96d5442023-08-30 16:30:15 +020016857 printf "%s\n" "$ac_cs_version"; exit ;;
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016858 --config | --confi | --conf | --con | --co | --c )
Illia Bobyra96d5442023-08-30 16:30:15 +020016859 printf "%s\n" "$ac_cs_config"; exit ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016860 --debug | --debu | --deb | --de | --d | -d )
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016861 debug=: ;;
16862 --file | --fil | --fi | --f )
16863 $ac_shift
Bram Moolenaar446cb832008-06-24 21:56:24 +000016864 case $ac_optarg in
Illia Bobyra96d5442023-08-30 16:30:15 +020016865 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Bram Moolenaar7db77842014-03-27 17:40:59 +010016866 '') as_fn_error $? "missing file argument" ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016867 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016868 as_fn_append CONFIG_FILES " '$ac_optarg'"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016869 ac_need_defaults=false;;
16870 --header | --heade | --head | --hea )
16871 $ac_shift
Bram Moolenaar446cb832008-06-24 21:56:24 +000016872 case $ac_optarg in
Illia Bobyra96d5442023-08-30 16:30:15 +020016873 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016874 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016875 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016876 ac_need_defaults=false;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016877 --he | --h)
16878 # Conflict between --help and --header
Bram Moolenaar7db77842014-03-27 17:40:59 +010016879 as_fn_error $? "ambiguous option: \`$1'
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016880Try \`$0 --help' for more information.";;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016881 --help | --hel | -h )
Illia Bobyra96d5442023-08-30 16:30:15 +020016882 printf "%s\n" "$ac_cs_usage"; exit ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016883 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16884 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16885 ac_cs_silent=: ;;
16886
16887 # This is an error.
Bram Moolenaar7db77842014-03-27 17:40:59 +010016888 -*) as_fn_error $? "unrecognized option: \`$1'
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016889Try \`$0 --help' for more information." ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016890
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016891 *) as_fn_append ac_config_targets " $1"
Bram Moolenaar446cb832008-06-24 21:56:24 +000016892 ac_need_defaults=false ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016893
16894 esac
16895 shift
16896done
16897
16898ac_configure_extra_args=
16899
16900if $ac_cs_silent; then
16901 exec 6>/dev/null
16902 ac_configure_extra_args="$ac_configure_extra_args --silent"
16903fi
16904
16905_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +000016906cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016907if \$ac_cs_recheck; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010016908 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Bram Moolenaar446cb832008-06-24 21:56:24 +000016909 shift
Illia Bobyra96d5442023-08-30 16:30:15 +020016910 \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
Bram Moolenaar446cb832008-06-24 21:56:24 +000016911 CONFIG_SHELL='$SHELL'
16912 export CONFIG_SHELL
16913 exec "\$@"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016914fi
16915
16916_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +000016917cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16918exec 5>>auto/config.log
16919{
16920 echo
16921 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16922## Running $as_me. ##
16923_ASBOX
Illia Bobyra96d5442023-08-30 16:30:15 +020016924 printf "%s\n" "$ac_log"
Bram Moolenaar446cb832008-06-24 21:56:24 +000016925} >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016926
Bram Moolenaar446cb832008-06-24 21:56:24 +000016927_ACEOF
16928cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16929_ACEOF
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016930
Bram Moolenaar446cb832008-06-24 21:56:24 +000016931cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016932
Bram Moolenaar446cb832008-06-24 21:56:24 +000016933# Handling of arguments.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016934for ac_config_target in $ac_config_targets
16935do
Bram Moolenaar446cb832008-06-24 21:56:24 +000016936 case $ac_config_target in
16937 "auto/config.h") CONFIG_HEADERS="$CONFIG_HEADERS auto/config.h:config.h.in" ;;
16938 "auto/config.mk") CONFIG_FILES="$CONFIG_FILES auto/config.mk:config.mk.in" ;;
16939
Bram Moolenaar7db77842014-03-27 17:40:59 +010016940 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016941 esac
16942done
16943
Bram Moolenaar446cb832008-06-24 21:56:24 +000016944
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016945# If the user did not use the arguments to specify the items to instantiate,
16946# then the envvar interface is used. Set only those that are not.
16947# We use the long form for the default assignment because of an extremely
16948# bizarre bug on SunOS 4.1.3.
16949if $ac_need_defaults; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016950 test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
16951 test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016952fi
16953
16954# Have a temporary directory for convenience. Make it in the build tree
Bram Moolenaar446cb832008-06-24 21:56:24 +000016955# simply because there is no reason against having it here, and in addition,
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016956# creating and moving files from /tmp can sometimes cause problems.
Bram Moolenaar446cb832008-06-24 21:56:24 +000016957# Hook for its removal unless debugging.
16958# Note that there is a small window in which the directory will not be cleaned:
16959# after its creation but before its name has been assigned to `$tmp'.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016960$debug ||
16961{
Bram Moolenaar7db77842014-03-27 17:40:59 +010016962 tmp= ac_tmp=
Bram Moolenaar446cb832008-06-24 21:56:24 +000016963 trap 'exit_status=$?
Bram Moolenaar7db77842014-03-27 17:40:59 +010016964 : "${ac_tmp:=$tmp}"
16965 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Bram Moolenaar446cb832008-06-24 21:56:24 +000016966' 0
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016967 trap 'as_fn_exit 1' 1 2 13 15
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016968}
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016969# Create a (secure) tmp directory for tmp files.
16970
16971{
Bram Moolenaar446cb832008-06-24 21:56:24 +000016972 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Bram Moolenaar7db77842014-03-27 17:40:59 +010016973 test -d "$tmp"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016974} ||
16975{
Bram Moolenaar446cb832008-06-24 21:56:24 +000016976 tmp=./conf$$-$RANDOM
16977 (umask 077 && mkdir "$tmp")
Bram Moolenaar7db77842014-03-27 17:40:59 +010016978} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
16979ac_tmp=$tmp
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016980
Bram Moolenaar446cb832008-06-24 21:56:24 +000016981# Set up the scripts for CONFIG_FILES section.
16982# No need to generate them if there are no CONFIG_FILES.
16983# This happens for instance with `./config.status config.h'.
16984if test -n "$CONFIG_FILES"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016985
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016986
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016987ac_cr=`echo X | tr X '\015'`
16988# On cygwin, bash can eat \r inside `` if the user requested igncr.
16989# But we know of no other shell where ac_cr would be empty at this
16990# point, so we can use a bashism as a fallback.
16991if test "x$ac_cr" = x; then
16992 eval ac_cr=\$\'\\r\'
16993fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000016994ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
16995if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010016996 ac_cs_awk_cr='\\r'
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016997else
Bram Moolenaar446cb832008-06-24 21:56:24 +000016998 ac_cs_awk_cr=$ac_cr
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016999fi
17000
Bram Moolenaar7db77842014-03-27 17:40:59 +010017001echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017002_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000017003
Bram Moolenaar446cb832008-06-24 21:56:24 +000017004
17005{
17006 echo "cat >conf$$subs.awk <<_ACEOF" &&
17007 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17008 echo "_ACEOF"
17009} >conf$$subs.sh ||
Bram Moolenaar7db77842014-03-27 17:40:59 +010017010 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17011ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Bram Moolenaar446cb832008-06-24 21:56:24 +000017012ac_delim='%!_!# '
17013for ac_last_try in false false false false false :; do
17014 . ./conf$$subs.sh ||
Bram Moolenaar7db77842014-03-27 17:40:59 +010017015 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017016
Bram Moolenaar32f31b12009-05-21 13:20:59 +000017017 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17018 if test $ac_delim_n = $ac_delim_num; then
Bram Moolenaar446cb832008-06-24 21:56:24 +000017019 break
17020 elif $ac_last_try; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010017021 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017022 else
17023 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17024 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017025done
Bram Moolenaar446cb832008-06-24 21:56:24 +000017026rm -f conf$$subs.sh
17027
17028cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Bram Moolenaar7db77842014-03-27 17:40:59 +010017029cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017030_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +000017031sed -n '
17032h
17033s/^/S["/; s/!.*/"]=/
17034p
17035g
17036s/^[^!]*!//
17037:repl
17038t repl
17039s/'"$ac_delim"'$//
17040t delim
17041:nl
17042h
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017043s/\(.\{148\}\)..*/\1/
Bram Moolenaar446cb832008-06-24 21:56:24 +000017044t more1
17045s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17046p
17047n
17048b repl
17049:more1
17050s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17051p
17052g
17053s/.\{148\}//
17054t nl
17055:delim
17056h
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017057s/\(.\{148\}\)..*/\1/
Bram Moolenaar446cb832008-06-24 21:56:24 +000017058t more2
17059s/["\\]/\\&/g; s/^/"/; s/$/"/
17060p
17061b
17062:more2
17063s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17064p
17065g
17066s/.\{148\}//
17067t delim
17068' <conf$$subs.awk | sed '
17069/^[^""]/{
17070 N
17071 s/\n//
17072}
17073' >>$CONFIG_STATUS || ac_write_fail=1
17074rm -f conf$$subs.awk
17075cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17076_ACAWK
Bram Moolenaar7db77842014-03-27 17:40:59 +010017077cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Bram Moolenaar446cb832008-06-24 21:56:24 +000017078 for (key in S) S_is_set[key] = 1
17079 FS = ""
Bram Moolenaar071d4272004-06-13 20:20:40 +000017080
Bram Moolenaar446cb832008-06-24 21:56:24 +000017081}
17082{
17083 line = $ 0
17084 nfields = split(line, field, "@")
17085 substed = 0
17086 len = length(field[1])
17087 for (i = 2; i < nfields; i++) {
17088 key = field[i]
17089 keylen = length(key)
17090 if (S_is_set[key]) {
17091 value = S[key]
17092 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17093 len += length(value) + length(field[++i])
17094 substed = 1
17095 } else
17096 len += 1 + keylen
17097 }
Bram Moolenaar071d4272004-06-13 20:20:40 +000017098
Bram Moolenaar446cb832008-06-24 21:56:24 +000017099 print line
17100}
Bram Moolenaar071d4272004-06-13 20:20:40 +000017101
Bram Moolenaar446cb832008-06-24 21:56:24 +000017102_ACAWK
17103_ACEOF
17104cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17105if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17106 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17107else
17108 cat
Bram Moolenaar7db77842014-03-27 17:40:59 +010017109fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
17110 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017111_ACEOF
17112
Bram Moolenaar7db77842014-03-27 17:40:59 +010017113# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17114# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Bram Moolenaar446cb832008-06-24 21:56:24 +000017115# trailing colons and then remove the whole line if VPATH becomes empty
17116# (actually we leave an empty line to preserve line numbers).
17117if test "x$srcdir" = x.; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010017118 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17119h
17120s///
17121s/^/:/
17122s/[ ]*$/:/
17123s/:\$(srcdir):/:/g
17124s/:\${srcdir}:/:/g
17125s/:@srcdir@:/:/g
17126s/^:*//
Bram Moolenaar446cb832008-06-24 21:56:24 +000017127s/:*$//
Bram Moolenaar7db77842014-03-27 17:40:59 +010017128x
17129s/\(=[ ]*\).*/\1/
17130G
17131s/\n//
Bram Moolenaar446cb832008-06-24 21:56:24 +000017132s/^[^=]*=[ ]*$//
17133}'
17134fi
17135
17136cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17137fi # test -n "$CONFIG_FILES"
17138
17139# Set up the scripts for CONFIG_HEADERS section.
17140# No need to generate them if there are no CONFIG_HEADERS.
17141# This happens for instance with `./config.status Makefile'.
17142if test -n "$CONFIG_HEADERS"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010017143cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Bram Moolenaar446cb832008-06-24 21:56:24 +000017144BEGIN {
17145_ACEOF
17146
17147# Transform confdefs.h into an awk script `defines.awk', embedded as
17148# here-document in config.status, that substitutes the proper values into
17149# config.h.in to produce config.h.
17150
17151# Create a delimiter string that does not exist in confdefs.h, to ease
17152# handling of long lines.
17153ac_delim='%!_!# '
17154for ac_last_try in false false :; do
Bram Moolenaar7db77842014-03-27 17:40:59 +010017155 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17156 if test -z "$ac_tt"; then
Bram Moolenaar446cb832008-06-24 21:56:24 +000017157 break
17158 elif $ac_last_try; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010017159 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017160 else
17161 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17162 fi
17163done
17164
17165# For the awk script, D is an array of macro values keyed by name,
17166# likewise P contains macro parameters if any. Preserve backslash
17167# newline sequences.
17168
17169ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17170sed -n '
17171s/.\{148\}/&'"$ac_delim"'/g
17172t rset
17173:rset
17174s/^[ ]*#[ ]*define[ ][ ]*/ /
17175t def
17176d
17177:def
17178s/\\$//
17179t bsnl
17180s/["\\]/\\&/g
17181s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17182D["\1"]=" \3"/p
17183s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17184d
17185:bsnl
17186s/["\\]/\\&/g
17187s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17188D["\1"]=" \3\\\\\\n"\\/p
17189t cont
17190s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17191t cont
17192d
17193:cont
17194n
17195s/.\{148\}/&'"$ac_delim"'/g
17196t clear
17197:clear
17198s/\\$//
17199t bsnlc
17200s/["\\]/\\&/g; s/^/"/; s/$/"/p
17201d
17202:bsnlc
17203s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17204b cont
17205' <confdefs.h | sed '
17206s/'"$ac_delim"'/"\\\
17207"/g' >>$CONFIG_STATUS || ac_write_fail=1
17208
17209cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17210 for (key in D) D_is_set[key] = 1
17211 FS = ""
17212}
17213/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17214 line = \$ 0
17215 split(line, arg, " ")
17216 if (arg[1] == "#") {
17217 defundef = arg[2]
17218 mac1 = arg[3]
17219 } else {
17220 defundef = substr(arg[1], 2)
17221 mac1 = arg[2]
17222 }
17223 split(mac1, mac2, "(") #)
17224 macro = mac2[1]
Bram Moolenaar32f31b12009-05-21 13:20:59 +000017225 prefix = substr(line, 1, index(line, defundef) - 1)
Bram Moolenaar446cb832008-06-24 21:56:24 +000017226 if (D_is_set[macro]) {
17227 # Preserve the white space surrounding the "#".
Bram Moolenaar446cb832008-06-24 21:56:24 +000017228 print prefix "define", macro P[macro] D[macro]
17229 next
17230 } else {
17231 # Replace #undef with comments. This is necessary, for example,
17232 # in the case of _POSIX_SOURCE, which is predefined and required
17233 # on some systems where configure will not decide to define it.
17234 if (defundef == "undef") {
Bram Moolenaar32f31b12009-05-21 13:20:59 +000017235 print "/*", prefix defundef, macro, "*/"
Bram Moolenaar446cb832008-06-24 21:56:24 +000017236 next
17237 }
17238 }
17239}
17240{ print }
17241_ACAWK
17242_ACEOF
17243cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Bram Moolenaar7db77842014-03-27 17:40:59 +010017244 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017245fi # test -n "$CONFIG_HEADERS"
17246
17247
17248eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17249shift
17250for ac_tag
17251do
17252 case $ac_tag in
17253 :[FHLC]) ac_mode=$ac_tag; continue;;
17254 esac
17255 case $ac_mode$ac_tag in
17256 :[FHL]*:*);;
Bram Moolenaar7db77842014-03-27 17:40:59 +010017257 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017258 :[FH]-) ac_tag=-:-;;
17259 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17260 esac
17261 ac_save_IFS=$IFS
17262 IFS=:
17263 set x $ac_tag
17264 IFS=$ac_save_IFS
17265 shift
17266 ac_file=$1
17267 shift
17268
17269 case $ac_mode in
17270 :L) ac_source=$1;;
17271 :[FH])
17272 ac_file_inputs=
17273 for ac_f
17274 do
17275 case $ac_f in
Bram Moolenaar7db77842014-03-27 17:40:59 +010017276 -) ac_f="$ac_tmp/stdin";;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017277 *) # Look for the file first in the build tree, then in the source tree
17278 # (if the path is not absolute). The absolute path cannot be DOS-style,
17279 # because $ac_f cannot contain `:'.
17280 test -f "$ac_f" ||
17281 case $ac_f in
17282 [\\/$]*) false;;
17283 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17284 esac ||
Bram Moolenaar7db77842014-03-27 17:40:59 +010017285 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017286 esac
Illia Bobyra96d5442023-08-30 16:30:15 +020017287 case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017288 as_fn_append ac_file_inputs " '$ac_f'"
Bram Moolenaar446cb832008-06-24 21:56:24 +000017289 done
17290
17291 # Let's still pretend it is `configure' which instantiates (i.e., don't
17292 # use $as_me), people would be surprised to read:
17293 # /* config.h. Generated by config.status. */
17294 configure_input='Generated from '`
Illia Bobyra96d5442023-08-30 16:30:15 +020017295 printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
Bram Moolenaar446cb832008-06-24 21:56:24 +000017296 `' by configure.'
17297 if test x"$ac_file" != x-; then
17298 configure_input="$ac_file. $configure_input"
Illia Bobyra96d5442023-08-30 16:30:15 +020017299 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17300printf "%s\n" "$as_me: creating $ac_file" >&6;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000017301 fi
17302 # Neutralize special characters interpreted by sed in replacement strings.
17303 case $configure_input in #(
17304 *\&* | *\|* | *\\* )
Illia Bobyra96d5442023-08-30 16:30:15 +020017305 ac_sed_conf_input=`printf "%s\n" "$configure_input" |
Bram Moolenaar446cb832008-06-24 21:56:24 +000017306 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17307 *) ac_sed_conf_input=$configure_input;;
17308 esac
17309
17310 case $ac_tag in
Bram Moolenaar7db77842014-03-27 17:40:59 +010017311 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17312 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017313 esac
17314 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +000017315 esac
17316
Bram Moolenaar446cb832008-06-24 21:56:24 +000017317 ac_dir=`$as_dirname -- "$ac_file" ||
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017318$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17319 X"$ac_file" : 'X\(//\)[^/]' \| \
17320 X"$ac_file" : 'X\(//\)$' \| \
Bram Moolenaar446cb832008-06-24 21:56:24 +000017321 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Illia Bobyra96d5442023-08-30 16:30:15 +020017322printf "%s\n" X"$ac_file" |
Bram Moolenaar446cb832008-06-24 21:56:24 +000017323 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17324 s//\1/
17325 q
17326 }
17327 /^X\(\/\/\)[^/].*/{
17328 s//\1/
17329 q
17330 }
17331 /^X\(\/\/\)$/{
17332 s//\1/
17333 q
17334 }
17335 /^X\(\/\).*/{
17336 s//\1/
17337 q
17338 }
17339 s/.*/./; q'`
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017340 as_dir="$ac_dir"; as_fn_mkdir_p
Bram Moolenaar446cb832008-06-24 21:56:24 +000017341 ac_builddir=.
Bram Moolenaar071d4272004-06-13 20:20:40 +000017342
Bram Moolenaar446cb832008-06-24 21:56:24 +000017343case "$ac_dir" in
17344.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17345*)
Illia Bobyra96d5442023-08-30 16:30:15 +020017346 ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
Bram Moolenaar446cb832008-06-24 21:56:24 +000017347 # A ".." for each directory in $ac_dir_suffix.
Illia Bobyra96d5442023-08-30 16:30:15 +020017348 ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Bram Moolenaar446cb832008-06-24 21:56:24 +000017349 case $ac_top_builddir_sub in
17350 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17351 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17352 esac ;;
17353esac
17354ac_abs_top_builddir=$ac_pwd
17355ac_abs_builddir=$ac_pwd$ac_dir_suffix
17356# for backward compatibility:
17357ac_top_builddir=$ac_top_build_prefix
17358
17359case $srcdir in
17360 .) # We are building in place.
17361 ac_srcdir=.
17362 ac_top_srcdir=$ac_top_builddir_sub
17363 ac_abs_top_srcdir=$ac_pwd ;;
17364 [\\/]* | ?:[\\/]* ) # Absolute name.
17365 ac_srcdir=$srcdir$ac_dir_suffix;
17366 ac_top_srcdir=$srcdir
17367 ac_abs_top_srcdir=$srcdir ;;
17368 *) # Relative name.
17369 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17370 ac_top_srcdir=$ac_top_build_prefix$srcdir
17371 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
17372esac
17373ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
17374
17375
17376 case $ac_mode in
17377 :F)
17378 #
17379 # CONFIG_FILE
17380 #
17381
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017382_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000017383
Bram Moolenaar446cb832008-06-24 21:56:24 +000017384cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17385# If the template does not know about datarootdir, expand it.
17386# FIXME: This hack should be removed a few years after 2.60.
17387ac_datarootdir_hack=; ac_datarootdir_seen=
Bram Moolenaar446cb832008-06-24 21:56:24 +000017388ac_sed_dataroot='
17389/datarootdir/ {
17390 p
17391 q
17392}
17393/@datadir@/p
17394/@docdir@/p
17395/@infodir@/p
17396/@localedir@/p
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017397/@mandir@/p'
Bram Moolenaar446cb832008-06-24 21:56:24 +000017398case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
17399*datarootdir*) ac_datarootdir_seen=yes;;
17400*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Illia Bobyra96d5442023-08-30 16:30:15 +020017401 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17402printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000017403_ACEOF
17404cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17405 ac_datarootdir_hack='
17406 s&@datadir@&$datadir&g
17407 s&@docdir@&$docdir&g
17408 s&@infodir@&$infodir&g
17409 s&@localedir@&$localedir&g
17410 s&@mandir@&$mandir&g
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017411 s&\\\${datarootdir}&$datarootdir&g' ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017412esac
17413_ACEOF
17414
17415# Neutralize VPATH when `$srcdir' = `.'.
17416# Shell code in configure.ac might set extrasub.
17417# FIXME: do we really want to maintain this feature?
17418cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17419ac_sed_extra="$ac_vpsub
17420$extrasub
17421_ACEOF
17422cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17423:t
17424/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
17425s|@configure_input@|$ac_sed_conf_input|;t t
17426s&@top_builddir@&$ac_top_builddir_sub&;t t
17427s&@top_build_prefix@&$ac_top_build_prefix&;t t
17428s&@srcdir@&$ac_srcdir&;t t
17429s&@abs_srcdir@&$ac_abs_srcdir&;t t
17430s&@top_srcdir@&$ac_top_srcdir&;t t
17431s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17432s&@builddir@&$ac_builddir&;t t
17433s&@abs_builddir@&$ac_abs_builddir&;t t
17434s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17435$ac_datarootdir_hack
17436"
Bram Moolenaar7db77842014-03-27 17:40:59 +010017437eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17438 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017439
17440test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Bram Moolenaar7db77842014-03-27 17:40:59 +010017441 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17442 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17443 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Illia Bobyra96d5442023-08-30 16:30:15 +020017444 { 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 +010017445which seems to be undefined. Please make sure it is defined" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +020017446printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Bram Moolenaar7db77842014-03-27 17:40:59 +010017447which seems to be undefined. Please make sure it is defined" >&2;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000017448
Bram Moolenaar7db77842014-03-27 17:40:59 +010017449 rm -f "$ac_tmp/stdin"
Bram Moolenaar446cb832008-06-24 21:56:24 +000017450 case $ac_file in
Bram Moolenaar7db77842014-03-27 17:40:59 +010017451 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17452 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017453 esac \
Bram Moolenaar7db77842014-03-27 17:40:59 +010017454 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017455 ;;
17456 :H)
17457 #
17458 # CONFIG_HEADER
17459 #
17460 if test x"$ac_file" != x-; then
17461 {
Illia Bobyra96d5442023-08-30 16:30:15 +020017462 printf "%s\n" "/* $configure_input */" >&1 \
Bram Moolenaar7db77842014-03-27 17:40:59 +010017463 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17464 } >"$ac_tmp/config.h" \
17465 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
17466 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Illia Bobyra96d5442023-08-30 16:30:15 +020017467 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17468printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000017469 else
17470 rm -f "$ac_file"
Bram Moolenaar7db77842014-03-27 17:40:59 +010017471 mv "$ac_tmp/config.h" "$ac_file" \
17472 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017473 fi
17474 else
Illia Bobyra96d5442023-08-30 16:30:15 +020017475 printf "%s\n" "/* $configure_input */" >&1 \
Bram Moolenaar7db77842014-03-27 17:40:59 +010017476 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
17477 || as_fn_error $? "could not create -" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017478 fi
17479 ;;
17480
17481
17482 esac
17483
17484done # for ac_tag
17485
Bram Moolenaar071d4272004-06-13 20:20:40 +000017486
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017487as_fn_exit 0
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017488_ACEOF
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017489ac_clean_files=$ac_clean_files_save
17490
Bram Moolenaar446cb832008-06-24 21:56:24 +000017491test $ac_write_fail = 0 ||
Bram Moolenaar7db77842014-03-27 17:40:59 +010017492 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017493
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017494
17495# configure is writing to config.log, and then calls config.status.
17496# config.status does its own redirection, appending to config.log.
17497# Unfortunately, on DOS this fails, as config.log is still kept open
17498# by configure, so config.status won't be able to write to it; its
17499# output is simply discarded. So we exec the FD to /dev/null,
17500# effectively closing config.log, so it can be properly (re)opened and
17501# appended to by config.status. When coming back to configure, we
17502# need to make the FD available again.
17503if test "$no_create" != yes; then
17504 ac_cs_success=:
17505 ac_config_status_args=
17506 test "$silent" = yes &&
17507 ac_config_status_args="$ac_config_status_args --quiet"
17508 exec 5>/dev/null
17509 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Bram Moolenaarc7453f52006-02-10 23:20:28 +000017510 exec 5>>auto/config.log
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017511 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17512 # would make configure fail if this is the last instruction.
Bram Moolenaar7db77842014-03-27 17:40:59 +010017513 $ac_cs_success || as_fn_exit 1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017514fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000017515if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
Illia Bobyra96d5442023-08-30 16:30:15 +020017516 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17517printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000017518fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000017519
17520
Illia Bobyra96d5442023-08-30 16:30:15 +020017521