blob: 4a99071c8477b23a48fcaba3e28a095c67c49268 [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
RestorerZe498caf2024-03-12 22:11:36 +0100653MSGFMTCMD
Bram Moolenaar26096cc2019-04-11 15:25:40 +0200654MSGFMT_DESKTOP
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000655MAKEMO
656MSGFMT
657INSTALL_TOOL_LANGS
658INSTALL_LANGS
659TAGPRG
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000660GUI_X_LIBS
661GUITYPE
662GUI_LIB_LOC
663GUI_INC_LOC
664NARROW_PROTO
665MOTIF_LIBNAME
Bram Moolenaar36e294c2015-12-29 18:55:46 +0100666GRESOURCE_OBJ
667GRESOURCE_SRC
Bram Moolenaar4adfaab2016-04-21 18:20:11 +0200668UPDATE_DESKTOP_DATABASE
669GTK_UPDATE_ICON_CACHE
Bram Moolenaar36e294c2015-12-29 18:55:46 +0100670GLIB_COMPILE_RESOURCES
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000671GNOME_INCLUDEDIR
672GNOME_LIBDIR
673GNOME_LIBS
674GTK_LIBNAME
675GTK_LIBS
676GTK_CFLAGS
677PKG_CONFIG
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000678X_LIB
679X_EXTRA_LIBS
680X_LIBS
681X_PRE_LIBS
682X_CFLAGS
683XMKMF
684xmkmfpath
Bram Moolenaar823edd12019-10-23 22:35:36 +0200685TERM_TEST
Bram Moolenaare4f25e42017-07-07 11:54:15 +0200686TERM_OBJ
687TERM_SRC
Bram Moolenaare0874f82016-01-24 20:36:41 +0100688CHANNEL_OBJ
689CHANNEL_SRC
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000690NETBEANS_OBJ
691NETBEANS_SRC
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000692RUBY_LIBS
ichizok8bb3fe42021-12-28 15:51:45 +0000693RUBY_CFLAGS_EXTRA
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000694RUBY_CFLAGS
695RUBY_PRO
696RUBY_OBJ
697RUBY_SRC
698vi_cv_path_ruby
699TCL_LIBS
ichizok8bb3fe42021-12-28 15:51:45 +0000700TCL_CFLAGS_EXTRA
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000701TCL_CFLAGS
702TCL_PRO
703TCL_OBJ
704TCL_SRC
705vi_cv_path_tcl
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200706PYTHON3_OBJ
707PYTHON3_SRC
ichizok8bb3fe42021-12-28 15:51:45 +0000708PYTHON3_CFLAGS_EXTRA
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200709PYTHON3_CFLAGS
710PYTHON3_LIBS
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +0200711vi_cv_var_python3_stable_abi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200712vi_cv_path_python3
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000713PYTHON_OBJ
714PYTHON_SRC
ichizok8bb3fe42021-12-28 15:51:45 +0000715PYTHON_CFLAGS_EXTRA
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000716PYTHON_CFLAGS
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000717PYTHON_LIBS
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000718vi_cv_path_python
719PERL_LIBS
ichizok8bb3fe42021-12-28 15:51:45 +0000720PERL_CFLAGS_EXTRA
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000721PERL_CFLAGS
722PERL_PRO
723PERL_OBJ
724PERL_SRC
725shrpenv
Bram Moolenaard5f62b12014-08-17 17:05:44 +0200726vi_cv_perl_xsubpp
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000727vi_cv_perllib
728vi_cv_path_perl
Bram Moolenaar9e70cf12009-05-26 20:59:55 +0000729MZSCHEME_MZC
730MZSCHEME_EXTRA
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000731MZSCHEME_CFLAGS
732MZSCHEME_LIBS
733MZSCHEME_PRO
734MZSCHEME_OBJ
735MZSCHEME_SRC
736vi_cv_path_mzscheme
ichizok8bb3fe42021-12-28 15:51:45 +0000737LUA_CFLAGS_EXTRA
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200738LUA_CFLAGS
739LUA_LIBS
740LUA_PRO
741LUA_OBJ
742LUA_SRC
Bram Moolenaare855ccf2013-07-28 13:32:15 +0200743vi_cv_path_plain_lua
744vi_cv_path_luajit
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200745vi_cv_path_lua
Bram Moolenaar67ffb412022-01-08 13:36:57 +0000746XDIFF_OBJS_USED
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000747compiledby
748dogvimdiff
749dovimdiff
Bram Moolenaar2c704a72010-06-03 21:17:25 +0200750QUOTESED
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000751line_break
752VIEWNAME
753EXNAME
754VIMNAME
755OS_EXTRA_OBJ
756OS_EXTRA_SRC
Bram Moolenaar595a7be2010-03-10 16:28:12 +0100757XCODE_SELECT
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000758CPP_MM
Bram Moolenaar839e9542016-04-14 16:46:02 +0200759CROSS_COMPILING
Bram Moolenaar8f1dde52020-06-05 23:16:29 +0200760BUILD_DATE_MSG
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000761STRIP
762AWK
Bram Moolenaar2bcaec32014-03-27 18:51:11 +0100763FGREP
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000764EGREP
765GREP
766CPP
767OBJEXT
768EXEEXT
769ac_ct_CC
770CPPFLAGS
771LDFLAGS
772CFLAGS
773CC
774SET_MAKE
775target_alias
776host_alias
777build_alias
778LIBS
779ECHO_T
780ECHO_N
781ECHO_C
782DEFS
783mandir
784localedir
785libdir
786psdir
787pdfdir
788dvidir
789htmldir
790infodir
791docdir
792oldincludedir
793includedir
Illia Bobyrf39842f2023-08-27 18:21:23 +0200794runstatedir
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000795localstatedir
796sharedstatedir
797sysconfdir
798datadir
799datarootdir
800libexecdir
801sbindir
802bindir
803program_transform_name
804prefix
805exec_prefix
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200806PACKAGE_URL
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000807PACKAGE_BUGREPORT
808PACKAGE_STRING
809PACKAGE_VERSION
810PACKAGE_TARNAME
811PACKAGE_NAME
812PATH_SEPARATOR
813SHELL'
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000814ac_subst_files=''
Bram Moolenaar446cb832008-06-24 21:56:24 +0000815ac_user_opts='
816enable_option_checking
Bram Moolenaarf788a062011-12-14 20:51:25 +0100817enable_fail_if_missing
Bram Moolenaar446cb832008-06-24 21:56:24 +0000818enable_darwin
819with_mac_arch
Bram Moolenaar595a7be2010-03-10 16:28:12 +0100820with_developer_dir
Bram Moolenaarc236c162008-07-13 17:41:49 +0000821with_local_dir
Bram Moolenaar446cb832008-06-24 21:56:24 +0000822with_vim_name
823with_ex_name
824with_view_name
825with_global_runtime
826with_modified_by
Bram Moolenaar5bd32f42014-04-02 14:05:38 +0200827enable_smack
Bram Moolenaar446cb832008-06-24 21:56:24 +0000828enable_selinux
Christian Brabandte085dfd2023-09-30 12:49:18 +0200829enable_xattr
Bram Moolenaar446cb832008-06-24 21:56:24 +0000830with_features
831with_compiledby
832enable_xsmp
833enable_xsmp_interact
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200834enable_luainterp
835with_lua_prefix
Bram Moolenaare855ccf2013-07-28 13:32:15 +0200836with_luajit
Bram Moolenaar446cb832008-06-24 21:56:24 +0000837enable_mzschemeinterp
838with_plthome
839enable_perlinterp
Zdenek Dohnal1b1c9f22023-11-02 20:19:06 +0100840with_xsubpp
Bram Moolenaar446cb832008-06-24 21:56:24 +0000841enable_pythoninterp
Bram Moolenaare1a32312018-04-15 16:03:25 +0200842with_python_command
Bram Moolenaar446cb832008-06-24 21:56:24 +0000843with_python_config_dir
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200844enable_python3interp
Bram Moolenaare1a32312018-04-15 16:03:25 +0200845with_python3_command
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +0200846with_python3_stable_abi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200847with_python3_config_dir
Bram Moolenaar446cb832008-06-24 21:56:24 +0000848enable_tclinterp
849with_tclsh
850enable_rubyinterp
Bram Moolenaar165641d2010-02-17 16:23:09 +0100851with_ruby_command
Bram Moolenaar446cb832008-06-24 21:56:24 +0000852enable_cscope
Bram Moolenaar446cb832008-06-24 21:56:24 +0000853enable_netbeans
Bram Moolenaare0874f82016-01-24 20:36:41 +0100854enable_channel
Bram Moolenaare4f25e42017-07-07 11:54:15 +0200855enable_terminal
Bram Moolenaare42a6d22017-11-12 19:21:51 +0100856enable_autoservername
Bram Moolenaar446cb832008-06-24 21:56:24 +0000857enable_multibyte
Bram Moolenaar5c5697f2018-12-12 20:34:09 +0100858enable_rightleft
859enable_arabic
860enable_farsi
Bram Moolenaar446cb832008-06-24 21:56:24 +0000861enable_xim
862enable_fontset
863with_x
864enable_gui
Bram Moolenaar446cb832008-06-24 21:56:24 +0000865enable_gtk2_check
866enable_gnome_check
Bram Moolenaar98921892016-02-23 17:14:37 +0100867enable_gtk3_check
Bram Moolenaar446cb832008-06-24 21:56:24 +0000868enable_motif_check
Bram Moolenaar446cb832008-06-24 21:56:24 +0000869enable_gtktest
870with_gnome_includes
871with_gnome_libs
872with_gnome
Bram Moolenaar4adfaab2016-04-21 18:20:11 +0200873enable_icon_cache_update
874enable_desktop_database_update
Bram Moolenaar446cb832008-06-24 21:56:24 +0000875with_motif_lib
876with_tlib
Bram Moolenaar317fd3a2010-05-07 16:05:55 +0200877enable_largefile
Bram Moolenaar21606672019-06-14 20:40:58 +0200878enable_canberra
Christian Brabandtf573c6e2021-06-20 14:02:16 +0200879enable_libsodium
Bram Moolenaar446cb832008-06-24 21:56:24 +0000880enable_acl
881enable_gpm
882enable_sysmouse
883enable_nls
884'
885 ac_precious_vars='build_alias
886host_alias
887target_alias
888CC
889CFLAGS
890LDFLAGS
891LIBS
892CPPFLAGS
893CPP
894XMKMF'
895
Bram Moolenaar071d4272004-06-13 20:20:40 +0000896
897# Initialize some variables set by options.
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000898ac_init_help=
899ac_init_version=false
Bram Moolenaar446cb832008-06-24 21:56:24 +0000900ac_unrecognized_opts=
901ac_unrecognized_sep=
Bram Moolenaar071d4272004-06-13 20:20:40 +0000902# The variables have the same names as the options, with
903# dashes changed to underlines.
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000904cache_file=/dev/null
Bram Moolenaar071d4272004-06-13 20:20:40 +0000905exec_prefix=NONE
Bram Moolenaar071d4272004-06-13 20:20:40 +0000906no_create=
Bram Moolenaar071d4272004-06-13 20:20:40 +0000907no_recursion=
908prefix=NONE
909program_prefix=NONE
910program_suffix=NONE
911program_transform_name=s,x,x,
912silent=
913site=
914srcdir=
Bram Moolenaar071d4272004-06-13 20:20:40 +0000915verbose=
916x_includes=NONE
917x_libraries=NONE
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000918
919# Installation directory options.
920# These are left unexpanded so users can "make install exec_prefix=/foo"
921# and all the variables that are supposed to be based on exec_prefix
922# by default will actually change.
923# Use braces instead of parens because sh, perl, etc. also accept them.
Bram Moolenaar446cb832008-06-24 21:56:24 +0000924# (The list follows the same order as the GNU Coding Standards.)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000925bindir='${exec_prefix}/bin'
926sbindir='${exec_prefix}/sbin'
927libexecdir='${exec_prefix}/libexec'
Bram Moolenaar446cb832008-06-24 21:56:24 +0000928datarootdir='${prefix}/share'
929datadir='${datarootdir}'
Bram Moolenaar071d4272004-06-13 20:20:40 +0000930sysconfdir='${prefix}/etc'
931sharedstatedir='${prefix}/com'
932localstatedir='${prefix}/var'
Illia Bobyrf39842f2023-08-27 18:21:23 +0200933runstatedir='${localstatedir}/run'
Bram Moolenaar071d4272004-06-13 20:20:40 +0000934includedir='${prefix}/include'
935oldincludedir='/usr/include'
Bram Moolenaar446cb832008-06-24 21:56:24 +0000936docdir='${datarootdir}/doc/${PACKAGE}'
937infodir='${datarootdir}/info'
938htmldir='${docdir}'
939dvidir='${docdir}'
940pdfdir='${docdir}'
941psdir='${docdir}'
942libdir='${exec_prefix}/lib'
943localedir='${datarootdir}/locale'
944mandir='${datarootdir}/man'
Bram Moolenaar071d4272004-06-13 20:20:40 +0000945
Bram Moolenaar071d4272004-06-13 20:20:40 +0000946ac_prev=
Bram Moolenaar446cb832008-06-24 21:56:24 +0000947ac_dashdash=
Bram Moolenaar071d4272004-06-13 20:20:40 +0000948for ac_option
949do
Bram Moolenaar071d4272004-06-13 20:20:40 +0000950 # If the previous option needs an argument, assign it.
951 if test -n "$ac_prev"; then
Bram Moolenaar446cb832008-06-24 21:56:24 +0000952 eval $ac_prev=\$ac_option
Bram Moolenaar071d4272004-06-13 20:20:40 +0000953 ac_prev=
954 continue
955 fi
956
Bram Moolenaar446cb832008-06-24 21:56:24 +0000957 case $ac_option in
Bram Moolenaar7db77842014-03-27 17:40:59 +0100958 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
959 *=) ac_optarg= ;;
960 *) ac_optarg=yes ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +0000961 esac
Bram Moolenaar071d4272004-06-13 20:20:40 +0000962
Bram Moolenaar446cb832008-06-24 21:56:24 +0000963 case $ac_dashdash$ac_option in
964 --)
965 ac_dashdash=yes ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +0000966
967 -bindir | --bindir | --bindi | --bind | --bin | --bi)
968 ac_prev=bindir ;;
969 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000970 bindir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +0000971
972 -build | --build | --buil | --bui | --bu)
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000973 ac_prev=build_alias ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +0000974 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000975 build_alias=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +0000976
977 -cache-file | --cache-file | --cache-fil | --cache-fi \
978 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
979 ac_prev=cache_file ;;
980 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
981 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000982 cache_file=$ac_optarg ;;
983
984 --config-cache | -C)
985 cache_file=config.cache ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +0000986
Bram Moolenaar446cb832008-06-24 21:56:24 +0000987 -datadir | --datadir | --datadi | --datad)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000988 ac_prev=datadir ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +0000989 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000990 datadir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +0000991
Bram Moolenaar446cb832008-06-24 21:56:24 +0000992 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
993 | --dataroo | --dataro | --datar)
994 ac_prev=datarootdir ;;
995 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
996 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
997 datarootdir=$ac_optarg ;;
998
Bram Moolenaar071d4272004-06-13 20:20:40 +0000999 -disable-* | --disable-*)
Bram Moolenaar446cb832008-06-24 21:56:24 +00001000 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Bram Moolenaar071d4272004-06-13 20:20:40 +00001001 # Reject names that are not valid shell variable names.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001002 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Illia Bobyra96d5442023-08-30 16:30:15 +02001003 as_fn_error $? "invalid feature name: \`$ac_useropt'"
Bram Moolenaar446cb832008-06-24 21:56:24 +00001004 ac_useropt_orig=$ac_useropt
Illia Bobyra96d5442023-08-30 16:30:15 +02001005 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
Bram Moolenaar446cb832008-06-24 21:56:24 +00001006 case $ac_user_opts in
1007 *"
1008"enable_$ac_useropt"
1009"*) ;;
1010 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1011 ac_unrecognized_sep=', ';;
1012 esac
1013 eval enable_$ac_useropt=no ;;
1014
1015 -docdir | --docdir | --docdi | --doc | --do)
1016 ac_prev=docdir ;;
1017 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1018 docdir=$ac_optarg ;;
1019
1020 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1021 ac_prev=dvidir ;;
1022 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1023 dvidir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001024
1025 -enable-* | --enable-*)
Bram Moolenaar446cb832008-06-24 21:56:24 +00001026 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Bram Moolenaar071d4272004-06-13 20:20:40 +00001027 # Reject names that are not valid shell variable names.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001028 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Illia Bobyra96d5442023-08-30 16:30:15 +02001029 as_fn_error $? "invalid feature name: \`$ac_useropt'"
Bram Moolenaar446cb832008-06-24 21:56:24 +00001030 ac_useropt_orig=$ac_useropt
Illia Bobyra96d5442023-08-30 16:30:15 +02001031 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
Bram Moolenaar446cb832008-06-24 21:56:24 +00001032 case $ac_user_opts in
1033 *"
1034"enable_$ac_useropt"
1035"*) ;;
1036 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1037 ac_unrecognized_sep=', ';;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001038 esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00001039 eval enable_$ac_useropt=\$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001040
1041 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1042 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1043 | --exec | --exe | --ex)
1044 ac_prev=exec_prefix ;;
1045 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1046 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1047 | --exec=* | --exe=* | --ex=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001048 exec_prefix=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001049
1050 -gas | --gas | --ga | --g)
1051 # Obsolete; use --with-gas.
1052 with_gas=yes ;;
1053
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001054 -help | --help | --hel | --he | -h)
1055 ac_init_help=long ;;
1056 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1057 ac_init_help=recursive ;;
1058 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1059 ac_init_help=short ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001060
1061 -host | --host | --hos | --ho)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001062 ac_prev=host_alias ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001063 -host=* | --host=* | --hos=* | --ho=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001064 host_alias=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001065
Bram Moolenaar446cb832008-06-24 21:56:24 +00001066 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1067 ac_prev=htmldir ;;
1068 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1069 | --ht=*)
1070 htmldir=$ac_optarg ;;
1071
Bram Moolenaar071d4272004-06-13 20:20:40 +00001072 -includedir | --includedir | --includedi | --included | --include \
1073 | --includ | --inclu | --incl | --inc)
1074 ac_prev=includedir ;;
1075 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1076 | --includ=* | --inclu=* | --incl=* | --inc=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001077 includedir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001078
1079 -infodir | --infodir | --infodi | --infod | --info | --inf)
1080 ac_prev=infodir ;;
1081 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001082 infodir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001083
1084 -libdir | --libdir | --libdi | --libd)
1085 ac_prev=libdir ;;
1086 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001087 libdir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001088
1089 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1090 | --libexe | --libex | --libe)
1091 ac_prev=libexecdir ;;
1092 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1093 | --libexe=* | --libex=* | --libe=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001094 libexecdir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001095
Bram Moolenaar446cb832008-06-24 21:56:24 +00001096 -localedir | --localedir | --localedi | --localed | --locale)
1097 ac_prev=localedir ;;
1098 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1099 localedir=$ac_optarg ;;
1100
Bram Moolenaar071d4272004-06-13 20:20:40 +00001101 -localstatedir | --localstatedir | --localstatedi | --localstated \
Bram Moolenaar446cb832008-06-24 21:56:24 +00001102 | --localstate | --localstat | --localsta | --localst | --locals)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001103 ac_prev=localstatedir ;;
1104 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Bram Moolenaar446cb832008-06-24 21:56:24 +00001105 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001106 localstatedir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001107
1108 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1109 ac_prev=mandir ;;
1110 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001111 mandir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001112
1113 -nfp | --nfp | --nf)
1114 # Obsolete; use --without-fp.
1115 with_fp=no ;;
1116
1117 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001118 | --no-cr | --no-c | -n)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001119 no_create=yes ;;
1120
1121 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1122 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1123 no_recursion=yes ;;
1124
1125 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1126 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1127 | --oldin | --oldi | --old | --ol | --o)
1128 ac_prev=oldincludedir ;;
1129 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1130 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1131 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001132 oldincludedir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001133
1134 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1135 ac_prev=prefix ;;
1136 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001137 prefix=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001138
1139 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1140 | --program-pre | --program-pr | --program-p)
1141 ac_prev=program_prefix ;;
1142 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1143 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001144 program_prefix=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001145
1146 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1147 | --program-suf | --program-su | --program-s)
1148 ac_prev=program_suffix ;;
1149 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1150 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001151 program_suffix=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001152
1153 -program-transform-name | --program-transform-name \
1154 | --program-transform-nam | --program-transform-na \
1155 | --program-transform-n | --program-transform- \
1156 | --program-transform | --program-transfor \
1157 | --program-transfo | --program-transf \
1158 | --program-trans | --program-tran \
1159 | --progr-tra | --program-tr | --program-t)
1160 ac_prev=program_transform_name ;;
1161 -program-transform-name=* | --program-transform-name=* \
1162 | --program-transform-nam=* | --program-transform-na=* \
1163 | --program-transform-n=* | --program-transform-=* \
1164 | --program-transform=* | --program-transfor=* \
1165 | --program-transfo=* | --program-transf=* \
1166 | --program-trans=* | --program-tran=* \
1167 | --progr-tra=* | --program-tr=* | --program-t=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001168 program_transform_name=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001169
Bram Moolenaar446cb832008-06-24 21:56:24 +00001170 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1171 ac_prev=pdfdir ;;
1172 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1173 pdfdir=$ac_optarg ;;
1174
1175 -psdir | --psdir | --psdi | --psd | --ps)
1176 ac_prev=psdir ;;
1177 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1178 psdir=$ac_optarg ;;
1179
Bram Moolenaar071d4272004-06-13 20:20:40 +00001180 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1181 | -silent | --silent | --silen | --sile | --sil)
1182 silent=yes ;;
1183
Illia Bobyrf39842f2023-08-27 18:21:23 +02001184 -runstatedir | --runstatedir | --runstatedi | --runstated \
1185 | --runstate | --runstat | --runsta | --runst | --runs \
1186 | --run | --ru | --r)
1187 ac_prev=runstatedir ;;
1188 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1189 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1190 | --run=* | --ru=* | --r=*)
1191 runstatedir=$ac_optarg ;;
1192
Bram Moolenaar071d4272004-06-13 20:20:40 +00001193 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1194 ac_prev=sbindir ;;
1195 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1196 | --sbi=* | --sb=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001197 sbindir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001198
1199 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1200 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1201 | --sharedst | --shareds | --shared | --share | --shar \
1202 | --sha | --sh)
1203 ac_prev=sharedstatedir ;;
1204 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1205 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1206 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1207 | --sha=* | --sh=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001208 sharedstatedir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001209
1210 -site | --site | --sit)
1211 ac_prev=site ;;
1212 -site=* | --site=* | --sit=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001213 site=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001214
1215 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1216 ac_prev=srcdir ;;
1217 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001218 srcdir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001219
1220 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1221 | --syscon | --sysco | --sysc | --sys | --sy)
1222 ac_prev=sysconfdir ;;
1223 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1224 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001225 sysconfdir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001226
1227 -target | --target | --targe | --targ | --tar | --ta | --t)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001228 ac_prev=target_alias ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001229 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001230 target_alias=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001231
1232 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1233 verbose=yes ;;
1234
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001235 -version | --version | --versio | --versi | --vers | -V)
1236 ac_init_version=: ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001237
1238 -with-* | --with-*)
Bram Moolenaar446cb832008-06-24 21:56:24 +00001239 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Bram Moolenaar071d4272004-06-13 20:20:40 +00001240 # Reject names that are not valid shell variable names.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001241 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Illia Bobyra96d5442023-08-30 16:30:15 +02001242 as_fn_error $? "invalid package name: \`$ac_useropt'"
Bram Moolenaar446cb832008-06-24 21:56:24 +00001243 ac_useropt_orig=$ac_useropt
Illia Bobyra96d5442023-08-30 16:30:15 +02001244 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
Bram Moolenaar446cb832008-06-24 21:56:24 +00001245 case $ac_user_opts in
1246 *"
1247"with_$ac_useropt"
1248"*) ;;
1249 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1250 ac_unrecognized_sep=', ';;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001251 esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00001252 eval with_$ac_useropt=\$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001253
1254 -without-* | --without-*)
Bram Moolenaar446cb832008-06-24 21:56:24 +00001255 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Bram Moolenaar071d4272004-06-13 20:20:40 +00001256 # Reject names that are not valid shell variable names.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001257 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Illia Bobyra96d5442023-08-30 16:30:15 +02001258 as_fn_error $? "invalid package name: \`$ac_useropt'"
Bram Moolenaar446cb832008-06-24 21:56:24 +00001259 ac_useropt_orig=$ac_useropt
Illia Bobyra96d5442023-08-30 16:30:15 +02001260 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
Bram Moolenaar446cb832008-06-24 21:56:24 +00001261 case $ac_user_opts in
1262 *"
1263"with_$ac_useropt"
1264"*) ;;
1265 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1266 ac_unrecognized_sep=', ';;
1267 esac
1268 eval with_$ac_useropt=no ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001269
1270 --x)
1271 # Obsolete; use --with-x.
1272 with_x=yes ;;
1273
1274 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1275 | --x-incl | --x-inc | --x-in | --x-i)
1276 ac_prev=x_includes ;;
1277 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1278 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001279 x_includes=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001280
1281 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1282 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1283 ac_prev=x_libraries ;;
1284 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1285 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001286 x_libraries=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001287
Bram Moolenaar7db77842014-03-27 17:40:59 +01001288 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1289Try \`$0 --help' for more information"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001290 ;;
1291
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001292 *=*)
1293 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1294 # Reject names that are not valid shell variable names.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001295 case $ac_envvar in #(
1296 '' | [0-9]* | *[!_$as_cr_alnum]* )
Bram Moolenaar7db77842014-03-27 17:40:59 +01001297 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001298 esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00001299 eval $ac_envvar=\$ac_optarg
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001300 export $ac_envvar ;;
1301
Bram Moolenaar071d4272004-06-13 20:20:40 +00001302 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001303 # FIXME: should be removed in autoconf 3.0.
Illia Bobyra96d5442023-08-30 16:30:15 +02001304 printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001305 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Illia Bobyra96d5442023-08-30 16:30:15 +02001306 printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
Bram Moolenaar7db77842014-03-27 17:40:59 +01001307 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001308 ;;
1309
1310 esac
1311done
1312
1313if test -n "$ac_prev"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001314 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Bram Moolenaar7db77842014-03-27 17:40:59 +01001315 as_fn_error $? "missing argument to $ac_option"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001316fi
1317
Bram Moolenaar446cb832008-06-24 21:56:24 +00001318if test -n "$ac_unrecognized_opts"; then
1319 case $enable_option_checking in
1320 no) ;;
Bram Moolenaar7db77842014-03-27 17:40:59 +01001321 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Illia Bobyra96d5442023-08-30 16:30:15 +02001322 *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001323 esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00001324fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00001325
Bram Moolenaar446cb832008-06-24 21:56:24 +00001326# Check all directory arguments for consistency.
1327for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1328 datadir sysconfdir sharedstatedir localstatedir includedir \
1329 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Illia Bobyrf39842f2023-08-27 18:21:23 +02001330 libdir localedir mandir runstatedir
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001331do
Bram Moolenaar446cb832008-06-24 21:56:24 +00001332 eval ac_val=\$$ac_var
1333 # Remove trailing slashes.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001334 case $ac_val in
Bram Moolenaar446cb832008-06-24 21:56:24 +00001335 */ )
1336 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1337 eval $ac_var=\$ac_val;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001338 esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00001339 # Be sure to have absolute directory names.
1340 case $ac_val in
1341 [\\/$]* | ?:[\\/]* ) continue;;
1342 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1343 esac
Bram Moolenaar7db77842014-03-27 17:40:59 +01001344 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001345done
Bram Moolenaar071d4272004-06-13 20:20:40 +00001346
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001347# There might be people who depend on the old broken behavior: `$host'
1348# used to hold the argument of --host etc.
1349# FIXME: To remove some day.
1350build=$build_alias
1351host=$host_alias
1352target=$target_alias
Bram Moolenaar071d4272004-06-13 20:20:40 +00001353
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001354# FIXME: To remove some day.
1355if test "x$host_alias" != x; then
1356 if test "x$build_alias" = x; then
1357 cross_compiling=maybe
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001358 elif test "x$build_alias" != "x$host_alias"; then
1359 cross_compiling=yes
1360 fi
1361fi
1362
1363ac_tool_prefix=
1364test -n "$host_alias" && ac_tool_prefix=$host_alias-
1365
1366test "$silent" = yes && exec 6>/dev/null
1367
Bram Moolenaar071d4272004-06-13 20:20:40 +00001368
Bram Moolenaar446cb832008-06-24 21:56:24 +00001369ac_pwd=`pwd` && test -n "$ac_pwd" &&
1370ac_ls_di=`ls -di .` &&
1371ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Bram Moolenaar7db77842014-03-27 17:40:59 +01001372 as_fn_error $? "working directory cannot be determined"
Bram Moolenaar446cb832008-06-24 21:56:24 +00001373test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Bram Moolenaar7db77842014-03-27 17:40:59 +01001374 as_fn_error $? "pwd does not report name of working directory"
Bram Moolenaar446cb832008-06-24 21:56:24 +00001375
1376
Bram Moolenaar071d4272004-06-13 20:20:40 +00001377# Find the source files, if location was not specified.
1378if test -z "$srcdir"; then
1379 ac_srcdir_defaulted=yes
Bram Moolenaar446cb832008-06-24 21:56:24 +00001380 # Try the directory containing this script, then the parent directory.
1381 ac_confdir=`$as_dirname -- "$as_myself" ||
1382$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1383 X"$as_myself" : 'X\(//\)[^/]' \| \
1384 X"$as_myself" : 'X\(//\)$' \| \
1385 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
Illia Bobyra96d5442023-08-30 16:30:15 +02001386printf "%s\n" X"$as_myself" |
Bram Moolenaar446cb832008-06-24 21:56:24 +00001387 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1388 s//\1/
1389 q
1390 }
1391 /^X\(\/\/\)[^/].*/{
1392 s//\1/
1393 q
1394 }
1395 /^X\(\/\/\)$/{
1396 s//\1/
1397 q
1398 }
1399 /^X\(\/\).*/{
1400 s//\1/
1401 q
1402 }
1403 s/.*/./; q'`
Bram Moolenaar071d4272004-06-13 20:20:40 +00001404 srcdir=$ac_confdir
Bram Moolenaar446cb832008-06-24 21:56:24 +00001405 if test ! -r "$srcdir/$ac_unique_file"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00001406 srcdir=..
1407 fi
1408else
1409 ac_srcdir_defaulted=no
1410fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00001411if test ! -r "$srcdir/$ac_unique_file"; then
1412 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Bram Moolenaar7db77842014-03-27 17:40:59 +01001413 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001414fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00001415ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1416ac_abs_confdir=`(
Bram Moolenaar7db77842014-03-27 17:40:59 +01001417 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Bram Moolenaar446cb832008-06-24 21:56:24 +00001418 pwd)`
1419# When building in place, set srcdir=.
1420if test "$ac_abs_confdir" = "$ac_pwd"; then
1421 srcdir=.
1422fi
1423# Remove unnecessary trailing slashes from srcdir.
1424# Double slashes in file names in object file debugging info
1425# mess up M-x gdb in Emacs.
1426case $srcdir in
1427*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1428esac
1429for ac_var in $ac_precious_vars; do
1430 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1431 eval ac_env_${ac_var}_value=\$${ac_var}
1432 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1433 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1434done
Bram Moolenaar071d4272004-06-13 20:20:40 +00001435
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001436#
1437# Report the --help message.
1438#
1439if test "$ac_init_help" = "long"; then
1440 # Omit some internal or obsolete options to make the list less imposing.
1441 # This message is too long to be a string in the A/UX 3.1 sh.
1442 cat <<_ACEOF
1443\`configure' configures this package to adapt to many kinds of systems.
1444
1445Usage: $0 [OPTION]... [VAR=VALUE]...
1446
1447To assign environment variables (e.g., CC, CFLAGS...), specify them as
1448VAR=VALUE. See below for descriptions of some of the useful variables.
1449
1450Defaults for the options are specified in brackets.
1451
1452Configuration:
1453 -h, --help display this help and exit
1454 --help=short display options specific to this package
1455 --help=recursive display the short help of all the included packages
1456 -V, --version display version information and exit
Bram Moolenaar7db77842014-03-27 17:40:59 +01001457 -q, --quiet, --silent do not print \`checking ...' messages
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001458 --cache-file=FILE cache test results in FILE [disabled]
1459 -C, --config-cache alias for \`--cache-file=config.cache'
1460 -n, --no-create do not create output files
1461 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1462
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001463Installation directories:
1464 --prefix=PREFIX install architecture-independent files in PREFIX
Bram Moolenaar446cb832008-06-24 21:56:24 +00001465 [$ac_default_prefix]
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001466 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Bram Moolenaar446cb832008-06-24 21:56:24 +00001467 [PREFIX]
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001468
1469By default, \`make install' will install all the files in
1470\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1471an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1472for instance \`--prefix=\$HOME'.
1473
1474For better control, use the options below.
1475
1476Fine tuning of the installation directories:
Bram Moolenaar446cb832008-06-24 21:56:24 +00001477 --bindir=DIR user executables [EPREFIX/bin]
1478 --sbindir=DIR system admin executables [EPREFIX/sbin]
1479 --libexecdir=DIR program executables [EPREFIX/libexec]
1480 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1481 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1482 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
Illia Bobyrf39842f2023-08-27 18:21:23 +02001483 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Bram Moolenaar446cb832008-06-24 21:56:24 +00001484 --libdir=DIR object code libraries [EPREFIX/lib]
1485 --includedir=DIR C header files [PREFIX/include]
1486 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1487 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1488 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1489 --infodir=DIR info documentation [DATAROOTDIR/info]
1490 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1491 --mandir=DIR man documentation [DATAROOTDIR/man]
1492 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1493 --htmldir=DIR html documentation [DOCDIR]
1494 --dvidir=DIR dvi documentation [DOCDIR]
1495 --pdfdir=DIR pdf documentation [DOCDIR]
1496 --psdir=DIR ps documentation [DOCDIR]
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001497_ACEOF
1498
1499 cat <<\_ACEOF
1500
1501X features:
1502 --x-includes=DIR X include files are in DIR
1503 --x-libraries=DIR X library files are in DIR
1504_ACEOF
1505fi
1506
1507if test -n "$ac_init_help"; then
1508
1509 cat <<\_ACEOF
1510
1511Optional Features:
Bram Moolenaar446cb832008-06-24 21:56:24 +00001512 --disable-option-checking ignore unrecognized --enable/--with options
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001513 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1514 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Bram Moolenaarf788a062011-12-14 20:51:25 +01001515 --enable-fail-if-missing Fail if dependencies on additional features
1516 specified on the command line are missing.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001517 --disable-darwin Disable Darwin (Mac OS X) support.
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02001518 --disable-smack Do not check for Smack support.
1519 --disable-selinux Do not check for SELinux support.
Christian Brabandte085dfd2023-09-30 12:49:18 +02001520 --disable-xattr Do not check for XATTR support.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001521 --disable-xsmp Disable XSMP session management
1522 --disable-xsmp-interact Disable XSMP interaction
Bram Moolenaar8008b632017-07-18 21:33:20 +02001523 --enable-luainterp=OPTS Include Lua interpreter. default=no OPTS=no/yes/dynamic
1524 --enable-mzschemeinterp Include MzScheme interpreter.
Bram Moolenaare06c1882010-07-21 22:05:20 +02001525 --enable-perlinterp=OPTS Include Perl interpreter. default=no OPTS=no/yes/dynamic
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02001526 --enable-pythoninterp=OPTS Include Python interpreter. default=no OPTS=no/yes/dynamic
Bram Moolenaar8008b632017-07-18 21:33:20 +02001527 --enable-python3interp=OPTS Include Python3 interpreter. default=no OPTS=no/yes/dynamic
Bram Moolenaar8a5115c2016-01-09 19:41:11 +01001528 --enable-tclinterp=OPTS Include Tcl interpreter. default=no OPTS=no/yes/dynamic
Bram Moolenaar3ca71f12010-10-27 16:49:47 +02001529 --enable-rubyinterp=OPTS Include Ruby interpreter. default=no OPTS=no/yes/dynamic
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001530 --enable-cscope Include cscope interface.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001531 --disable-netbeans Disable NetBeans integration support.
Bram Moolenaar8008b632017-07-18 21:33:20 +02001532 --disable-channel Disable process communication support.
1533 --enable-terminal Enable terminal emulation support.
Bram Moolenaare42a6d22017-11-12 19:21:51 +01001534 --enable-autoservername Automatically define servername at vim startup.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001535 --enable-multibyte Include multibyte editing support.
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01001536 --disable-rightleft Do not include Right-to-Left language support.
1537 --disable-arabic Do not include Arabic language support.
Bram Moolenaar14184a32019-02-16 15:10:30 +01001538 --disable-farsi Deprecated.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001539 --enable-xim Include XIM input support.
1540 --enable-fontset Include X fontset output support.
Bram Moolenaarf52fac22022-03-11 16:01:26 +00001541 --enable-gui=OPTS X11 GUI. default=auto OPTS=auto/no/gtk2/gnome2/gtk3/motif/haiku/photon/carbon
Bram Moolenaar182c5be2010-06-25 05:37:59 +02001542 --enable-gtk2-check If auto-select GUI, check for GTK+ 2 default=yes
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001543 --enable-gnome-check If GTK GUI, check for GNOME default=no
Bram Moolenaar98921892016-02-23 17:14:37 +01001544 --enable-gtk3-check If auto-select GUI, check for GTK+ 3 default=yes
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001545 --enable-motif-check If auto-select GUI, check for Motif default=yes
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001546 --disable-gtktest Do not try to compile and run a test GTK program
Bram Moolenaar4adfaab2016-04-21 18:20:11 +02001547 --disable-icon-cache-update update disabled
1548 --disable-desktop-database-update update disabled
Bram Moolenaar317fd3a2010-05-07 16:05:55 +02001549 --disable-largefile omit support for large files
Bram Moolenaar21606672019-06-14 20:40:58 +02001550 --disable-canberra Do not use libcanberra.
Christian Brabandtf573c6e2021-06-20 14:02:16 +02001551 --disable-libsodium Do not use libsodium.
Bram Moolenaard6d30422018-01-28 22:48:55 +01001552 --disable-acl No check for ACL support.
Bram Moolenaar0b40d082022-03-08 13:32:37 +00001553 --enable-gpm=OPTS Use gpm (Linux mouse daemon). default=yes OPTS=yes/no/dynamic
Bram Moolenaar8008b632017-07-18 21:33:20 +02001554 --disable-sysmouse Don't use sysmouse (mouse in *BSD console).
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001555 --disable-nls Don't support NLS (gettext()).
1556
1557Optional Packages:
1558 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1559 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Bram Moolenaar899dddf2006-03-26 21:06:50 +00001560 --with-mac-arch=ARCH current, intel, ppc or both
Bram Moolenaar595a7be2010-03-10 16:28:12 +01001561 --with-developer-dir=PATH use PATH as location for Xcode developer tools
Bram Moolenaarc236c162008-07-13 17:41:49 +00001562 --with-local-dir=PATH search PATH instead of /usr/local for local libraries.
1563 --without-local-dir do not search /usr/local for local libraries.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001564 --with-vim-name=NAME what to call the Vim executable
1565 --with-ex-name=NAME what to call the Ex executable
1566 --with-view-name=NAME what to call the View executable
Bram Moolenaar9d302ad2018-12-21 11:48:51 +01001567 --with-global-runtime=DIR global runtime directory in 'runtimepath', comma-separated for multiple directories
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001568 --with-modified-by=NAME name of who modified a release version
Martin Tournoij25f3a142022-10-08 19:26:41 +01001569 --with-features=TYPE tiny, normal or huge (default: huge)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001570 --with-compiledby=NAME name to show in :version message
Bram Moolenaar0ba04292010-07-14 23:23:17 +02001571 --with-lua-prefix=PFX Prefix where Lua is installed.
Bram Moolenaare855ccf2013-07-28 13:32:15 +02001572 --with-luajit Link with LuaJIT instead of Lua.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001573 --with-plthome=PLTHOME Use PLTHOME.
Zdenek Dohnal1b1c9f22023-11-02 20:19:06 +01001574 --with-xsubpp=PATH path to the xsubpp command
Bram Moolenaare1a32312018-04-15 16:03:25 +02001575 --with-python-command=NAME name of the Python 2 command (default: python2 or python)
1576 --with-python-config-dir=PATH Python's config directory (deprecated)
1577 --with-python3-command=NAME name of the Python 3 command (default: python3 or python)
Ken Takata1c032e32024-08-11 18:41:41 +02001578 --with-python3-stable-abi=VERSION stable ABI version to target (default: 3.8)
Bram Moolenaare1a32312018-04-15 16:03:25 +02001579 --with-python3-config-dir=PATH Python's config directory (deprecated)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001580 --with-tclsh=PATH which tclsh to use (default: tclsh8.0)
Bram Moolenaar165641d2010-02-17 16:23:09 +01001581 --with-ruby-command=RUBY name of the Ruby command (default: ruby)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001582 --with-x use the X Window System
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001583 --with-gnome-includes=DIR Specify location of GNOME headers
1584 --with-gnome-libs=DIR Specify location of GNOME libs
1585 --with-gnome Specify prefix for GNOME files
Bram Moolenaar8008b632017-07-18 21:33:20 +02001586 --with-motif-lib=STRING Library for Motif
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001587 --with-tlib=library terminal library to be used
1588
1589Some influential environment variables:
1590 CC C compiler command
1591 CFLAGS C compiler flags
1592 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1593 nonstandard directory <lib dir>
Bram Moolenaar446cb832008-06-24 21:56:24 +00001594 LIBS libraries to pass to the linker, e.g. -l<library>
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001595 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Bram Moolenaar446cb832008-06-24 21:56:24 +00001596 you have headers in a nonstandard directory <include dir>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001597 CPP C preprocessor
Bram Moolenaar446cb832008-06-24 21:56:24 +00001598 XMKMF Path to xmkmf, Makefile generator for X Window System
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001599
1600Use these variables to override the choices made by `configure' or to help
1601it to find libraries and programs with nonstandard names/locations.
1602
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001603Report bugs to the package provider.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001604_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +00001605ac_status=$?
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001606fi
1607
1608if test "$ac_init_help" = "recursive"; then
1609 # If there are subdirs, report their specific --help.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001610 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Bram Moolenaar446cb832008-06-24 21:56:24 +00001611 test -d "$ac_dir" ||
1612 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1613 continue
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001614 ac_builddir=.
1615
Bram Moolenaar446cb832008-06-24 21:56:24 +00001616case "$ac_dir" in
1617.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1618*)
Illia Bobyra96d5442023-08-30 16:30:15 +02001619 ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
Bram Moolenaar446cb832008-06-24 21:56:24 +00001620 # A ".." for each directory in $ac_dir_suffix.
Illia Bobyra96d5442023-08-30 16:30:15 +02001621 ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Bram Moolenaar446cb832008-06-24 21:56:24 +00001622 case $ac_top_builddir_sub in
1623 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1624 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1625 esac ;;
1626esac
1627ac_abs_top_builddir=$ac_pwd
1628ac_abs_builddir=$ac_pwd$ac_dir_suffix
1629# for backward compatibility:
1630ac_top_builddir=$ac_top_build_prefix
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001631
1632case $srcdir in
Bram Moolenaar446cb832008-06-24 21:56:24 +00001633 .) # We are building in place.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001634 ac_srcdir=.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001635 ac_top_srcdir=$ac_top_builddir_sub
1636 ac_abs_top_srcdir=$ac_pwd ;;
1637 [\\/]* | ?:[\\/]* ) # Absolute name.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001638 ac_srcdir=$srcdir$ac_dir_suffix;
Bram Moolenaar446cb832008-06-24 21:56:24 +00001639 ac_top_srcdir=$srcdir
1640 ac_abs_top_srcdir=$srcdir ;;
1641 *) # Relative name.
1642 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1643 ac_top_srcdir=$ac_top_build_prefix$srcdir
1644 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001645esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00001646ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001647
Bram Moolenaar446cb832008-06-24 21:56:24 +00001648 cd "$ac_dir" || { ac_status=$?; continue; }
Illia Bobyra96d5442023-08-30 16:30:15 +02001649 # Check for configure.gnu first; this name is used for a wrapper for
1650 # Metaconfig's "Configure" on case-insensitive file systems.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001651 if test -f "$ac_srcdir/configure.gnu"; then
1652 echo &&
1653 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1654 elif test -f "$ac_srcdir/configure"; then
1655 echo &&
1656 $SHELL "$ac_srcdir/configure" --help=recursive
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001657 else
Illia Bobyra96d5442023-08-30 16:30:15 +02001658 printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Bram Moolenaar446cb832008-06-24 21:56:24 +00001659 fi || ac_status=$?
1660 cd "$ac_pwd" || { ac_status=$?; break; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001661 done
1662fi
1663
Bram Moolenaar446cb832008-06-24 21:56:24 +00001664test -n "$ac_init_help" && exit $ac_status
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001665if $ac_init_version; then
1666 cat <<\_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +00001667configure
Illia Bobyra96d5442023-08-30 16:30:15 +02001668generated by GNU Autoconf 2.71
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001669
Illia Bobyra96d5442023-08-30 16:30:15 +02001670Copyright (C) 2021 Free Software Foundation, Inc.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001671This configure script is free software; the Free Software Foundation
1672gives unlimited permission to copy, distribute and modify it.
1673_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +00001674 exit
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001675fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001676
1677## ------------------------ ##
1678## Autoconf initialization. ##
1679## ------------------------ ##
1680
1681# ac_fn_c_try_compile LINENO
1682# --------------------------
1683# Try to compile conftest.$ac_ext, and return whether this succeeded.
1684ac_fn_c_try_compile ()
1685{
1686 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +02001687 rm -f conftest.$ac_objext conftest.beam
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001688 if { { ac_try="$ac_compile"
1689case "(($ac_try" in
1690 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1691 *) ac_try_echo=$ac_try;;
1692esac
1693eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Illia Bobyra96d5442023-08-30 16:30:15 +02001694printf "%s\n" "$ac_try_echo"; } >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001695 (eval "$ac_compile") 2>conftest.err
1696 ac_status=$?
1697 if test -s conftest.err; then
1698 grep -v '^ *+' conftest.err >conftest.er1
1699 cat conftest.er1 >&5
1700 mv -f conftest.er1 conftest.err
1701 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02001702 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001703 test $ac_status = 0; } && {
1704 test -z "$ac_c_werror_flag" ||
1705 test ! -s conftest.err
Illia Bobyra96d5442023-08-30 16:30:15 +02001706 } && test -s conftest.$ac_objext
1707then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001708 ac_retval=0
Illia Bobyra96d5442023-08-30 16:30:15 +02001709else $as_nop
1710 printf "%s\n" "$as_me: failed program was:" >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001711sed 's/^/| /' conftest.$ac_ext >&5
1712
1713 ac_retval=1
1714fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01001715 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001716 as_fn_set_status $ac_retval
1717
1718} # ac_fn_c_try_compile
1719
1720# ac_fn_c_try_cpp LINENO
1721# ----------------------
1722# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1723ac_fn_c_try_cpp ()
1724{
1725 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1726 if { { ac_try="$ac_cpp conftest.$ac_ext"
1727case "(($ac_try" in
1728 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1729 *) ac_try_echo=$ac_try;;
1730esac
1731eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Illia Bobyra96d5442023-08-30 16:30:15 +02001732printf "%s\n" "$ac_try_echo"; } >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001733 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1734 ac_status=$?
1735 if test -s conftest.err; then
1736 grep -v '^ *+' conftest.err >conftest.er1
1737 cat conftest.er1 >&5
1738 mv -f conftest.er1 conftest.err
1739 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02001740 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Bram Moolenaar7db77842014-03-27 17:40:59 +01001741 test $ac_status = 0; } > conftest.i && {
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001742 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1743 test ! -s conftest.err
Illia Bobyra96d5442023-08-30 16:30:15 +02001744 }
1745then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001746 ac_retval=0
Illia Bobyra96d5442023-08-30 16:30:15 +02001747else $as_nop
1748 printf "%s\n" "$as_me: failed program was:" >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001749sed 's/^/| /' conftest.$ac_ext >&5
1750
1751 ac_retval=1
1752fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01001753 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001754 as_fn_set_status $ac_retval
1755
1756} # ac_fn_c_try_cpp
1757
1758# ac_fn_c_try_link LINENO
1759# -----------------------
1760# Try to link conftest.$ac_ext, and return whether this succeeded.
1761ac_fn_c_try_link ()
1762{
1763 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +02001764 rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001765 if { { ac_try="$ac_link"
1766case "(($ac_try" in
1767 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1768 *) ac_try_echo=$ac_try;;
1769esac
1770eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Illia Bobyra96d5442023-08-30 16:30:15 +02001771printf "%s\n" "$ac_try_echo"; } >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001772 (eval "$ac_link") 2>conftest.err
1773 ac_status=$?
1774 if test -s conftest.err; then
1775 grep -v '^ *+' conftest.err >conftest.er1
1776 cat conftest.er1 >&5
1777 mv -f conftest.er1 conftest.err
1778 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02001779 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001780 test $ac_status = 0; } && {
1781 test -z "$ac_c_werror_flag" ||
1782 test ! -s conftest.err
1783 } && test -s conftest$ac_exeext && {
1784 test "$cross_compiling" = yes ||
Bram Moolenaar7db77842014-03-27 17:40:59 +01001785 test -x conftest$ac_exeext
Illia Bobyra96d5442023-08-30 16:30:15 +02001786 }
1787then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001788 ac_retval=0
Illia Bobyra96d5442023-08-30 16:30:15 +02001789else $as_nop
1790 printf "%s\n" "$as_me: failed program was:" >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001791sed 's/^/| /' conftest.$ac_ext >&5
1792
1793 ac_retval=1
1794fi
1795 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1796 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1797 # interfere with the next link command; also delete a directory that is
1798 # left behind by Apple's compiler. We do this before executing the actions.
1799 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Bram Moolenaar7db77842014-03-27 17:40:59 +01001800 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001801 as_fn_set_status $ac_retval
1802
1803} # ac_fn_c_try_link
1804
Illia Bobyr0e82b592023-08-29 21:16:29 +02001805# ac_fn_c_try_run LINENO
1806# ----------------------
Illia Bobyra96d5442023-08-30 16:30:15 +02001807# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
1808# executables *can* be run.
Illia Bobyr0e82b592023-08-29 21:16:29 +02001809ac_fn_c_try_run ()
1810{
1811 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1812 if { { ac_try="$ac_link"
1813case "(($ac_try" in
1814 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1815 *) ac_try_echo=$ac_try;;
1816esac
1817eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Illia Bobyra96d5442023-08-30 16:30:15 +02001818printf "%s\n" "$ac_try_echo"; } >&5
Illia Bobyr0e82b592023-08-29 21:16:29 +02001819 (eval "$ac_link") 2>&5
1820 ac_status=$?
Illia Bobyra96d5442023-08-30 16:30:15 +02001821 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Illia Bobyr0e82b592023-08-29 21:16:29 +02001822 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1823 { { case "(($ac_try" in
1824 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1825 *) ac_try_echo=$ac_try;;
1826esac
1827eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Illia Bobyra96d5442023-08-30 16:30:15 +02001828printf "%s\n" "$ac_try_echo"; } >&5
Illia Bobyr0e82b592023-08-29 21:16:29 +02001829 (eval "$ac_try") 2>&5
1830 ac_status=$?
Illia Bobyra96d5442023-08-30 16:30:15 +02001831 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1832 test $ac_status = 0; }; }
1833then :
Illia Bobyr0e82b592023-08-29 21:16:29 +02001834 ac_retval=0
Illia Bobyra96d5442023-08-30 16:30:15 +02001835else $as_nop
1836 printf "%s\n" "$as_me: program exited with status $ac_status" >&5
1837 printf "%s\n" "$as_me: failed program was:" >&5
Illia Bobyr0e82b592023-08-29 21:16:29 +02001838sed 's/^/| /' conftest.$ac_ext >&5
1839
1840 ac_retval=$ac_status
1841fi
1842 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1843 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1844 as_fn_set_status $ac_retval
1845
1846} # ac_fn_c_try_run
1847
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001848# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1849# -------------------------------------------------------
1850# Tests whether HEADER exists and can be compiled using the include files in
1851# INCLUDES, setting the cache variable VAR accordingly.
1852ac_fn_c_check_header_compile ()
1853{
1854 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +02001855 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1856printf %s "checking for $2... " >&6; }
1857if eval test \${$3+y}
1858then :
1859 printf %s "(cached) " >&6
1860else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1862/* end confdefs.h. */
1863$4
1864#include <$2>
1865_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02001866if ac_fn_c_try_compile "$LINENO"
1867then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001868 eval "$3=yes"
Illia Bobyra96d5442023-08-30 16:30:15 +02001869else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001870 eval "$3=no"
1871fi
Illia Bobyra96d5442023-08-30 16:30:15 +02001872rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001873fi
1874eval ac_res=\$$3
Illia Bobyra96d5442023-08-30 16:30:15 +02001875 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1876printf "%s\n" "$ac_res" >&6; }
Bram Moolenaar7db77842014-03-27 17:40:59 +01001877 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001878
1879} # ac_fn_c_check_header_compile
1880
1881# ac_fn_c_check_func LINENO FUNC VAR
1882# ----------------------------------
1883# Tests whether FUNC exists, setting the cache variable VAR accordingly
1884ac_fn_c_check_func ()
1885{
1886 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +02001887 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1888printf %s "checking for $2... " >&6; }
1889if eval test \${$3+y}
1890then :
1891 printf %s "(cached) " >&6
1892else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1894/* end confdefs.h. */
1895/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1896 For example, HP-UX 11i <limits.h> declares gettimeofday. */
1897#define $2 innocuous_$2
1898
1899/* System header to define __stub macros and hopefully few prototypes,
Illia Bobyra96d5442023-08-30 16:30:15 +02001900 which can conflict with char $2 (); below. */
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001901
Illia Bobyra96d5442023-08-30 16:30:15 +02001902#include <limits.h>
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001903#undef $2
1904
1905/* Override any GCC internal prototype to avoid an error.
1906 Use char because int might match the return type of a GCC
1907 builtin and then its argument prototype would still apply. */
1908#ifdef __cplusplus
1909extern "C"
1910#endif
1911char $2 ();
1912/* The GNU C library defines this for functions which it implements
1913 to always fail with ENOSYS. Some functions are actually named
1914 something starting with __ and the normal name is an alias. */
1915#if defined __stub_$2 || defined __stub___$2
1916choke me
1917#endif
1918
1919int
Illia Bobyra96d5442023-08-30 16:30:15 +02001920main (void)
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001921{
1922return $2 ();
1923 ;
1924 return 0;
1925}
1926_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02001927if ac_fn_c_try_link "$LINENO"
1928then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001929 eval "$3=yes"
Illia Bobyra96d5442023-08-30 16:30:15 +02001930else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001931 eval "$3=no"
1932fi
Illia Bobyra96d5442023-08-30 16:30:15 +02001933rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001934 conftest$ac_exeext conftest.$ac_ext
1935fi
1936eval ac_res=\$$3
Illia Bobyra96d5442023-08-30 16:30:15 +02001937 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1938printf "%s\n" "$ac_res" >&6; }
Bram Moolenaar7db77842014-03-27 17:40:59 +01001939 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001940
1941} # ac_fn_c_check_func
1942
Bram Moolenaar914703b2010-05-31 21:59:46 +02001943# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1944# --------------------------------------------
1945# Tries to find the compile-time value of EXPR in a program that includes
1946# INCLUDES, setting VAR accordingly. Returns whether the value could be
1947# computed
1948ac_fn_c_compute_int ()
1949{
1950 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1951 if test "$cross_compiling" = yes; then
1952 # Depending upon the size, compute the lo and hi bounds.
1953cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1954/* end confdefs.h. */
1955$4
1956int
Illia Bobyra96d5442023-08-30 16:30:15 +02001957main (void)
Bram Moolenaar914703b2010-05-31 21:59:46 +02001958{
1959static int test_array [1 - 2 * !(($2) >= 0)];
Bram Moolenaar7db77842014-03-27 17:40:59 +01001960test_array [0] = 0;
1961return test_array [0];
Bram Moolenaar914703b2010-05-31 21:59:46 +02001962
1963 ;
1964 return 0;
1965}
1966_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02001967if ac_fn_c_try_compile "$LINENO"
1968then :
Bram Moolenaar914703b2010-05-31 21:59:46 +02001969 ac_lo=0 ac_mid=0
1970 while :; do
1971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1972/* end confdefs.h. */
1973$4
1974int
Illia Bobyra96d5442023-08-30 16:30:15 +02001975main (void)
Bram Moolenaar914703b2010-05-31 21:59:46 +02001976{
1977static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Bram Moolenaar7db77842014-03-27 17:40:59 +01001978test_array [0] = 0;
1979return test_array [0];
Bram Moolenaar914703b2010-05-31 21:59:46 +02001980
1981 ;
1982 return 0;
1983}
1984_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02001985if ac_fn_c_try_compile "$LINENO"
1986then :
Bram Moolenaar914703b2010-05-31 21:59:46 +02001987 ac_hi=$ac_mid; break
Illia Bobyra96d5442023-08-30 16:30:15 +02001988else $as_nop
Bram Moolenaar914703b2010-05-31 21:59:46 +02001989 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
1990 if test $ac_lo -le $ac_mid; then
1991 ac_lo= ac_hi=
1992 break
1993 fi
1994 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
1995fi
Illia Bobyra96d5442023-08-30 16:30:15 +02001996rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar914703b2010-05-31 21:59:46 +02001997 done
Illia Bobyra96d5442023-08-30 16:30:15 +02001998else $as_nop
Bram Moolenaar914703b2010-05-31 21:59:46 +02001999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2000/* end confdefs.h. */
2001$4
2002int
Illia Bobyra96d5442023-08-30 16:30:15 +02002003main (void)
Bram Moolenaar914703b2010-05-31 21:59:46 +02002004{
2005static int test_array [1 - 2 * !(($2) < 0)];
Bram Moolenaar7db77842014-03-27 17:40:59 +01002006test_array [0] = 0;
2007return test_array [0];
Bram Moolenaar914703b2010-05-31 21:59:46 +02002008
2009 ;
2010 return 0;
2011}
2012_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02002013if ac_fn_c_try_compile "$LINENO"
2014then :
Bram Moolenaar914703b2010-05-31 21:59:46 +02002015 ac_hi=-1 ac_mid=-1
2016 while :; do
2017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2018/* end confdefs.h. */
2019$4
2020int
Illia Bobyra96d5442023-08-30 16:30:15 +02002021main (void)
Bram Moolenaar914703b2010-05-31 21:59:46 +02002022{
2023static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Bram Moolenaar7db77842014-03-27 17:40:59 +01002024test_array [0] = 0;
2025return test_array [0];
Bram Moolenaar914703b2010-05-31 21:59:46 +02002026
2027 ;
2028 return 0;
2029}
2030_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02002031if ac_fn_c_try_compile "$LINENO"
2032then :
Bram Moolenaar914703b2010-05-31 21:59:46 +02002033 ac_lo=$ac_mid; break
Illia Bobyra96d5442023-08-30 16:30:15 +02002034else $as_nop
Bram Moolenaar914703b2010-05-31 21:59:46 +02002035 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2036 if test $ac_mid -le $ac_hi; then
2037 ac_lo= ac_hi=
2038 break
2039 fi
2040 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2041fi
Illia Bobyra96d5442023-08-30 16:30:15 +02002042rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar914703b2010-05-31 21:59:46 +02002043 done
Illia Bobyra96d5442023-08-30 16:30:15 +02002044else $as_nop
Bram Moolenaar914703b2010-05-31 21:59:46 +02002045 ac_lo= ac_hi=
2046fi
Illia Bobyra96d5442023-08-30 16:30:15 +02002047rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar914703b2010-05-31 21:59:46 +02002048fi
Illia Bobyra96d5442023-08-30 16:30:15 +02002049rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar914703b2010-05-31 21:59:46 +02002050# Binary search between lo and hi bounds.
2051while test "x$ac_lo" != "x$ac_hi"; do
2052 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2054/* end confdefs.h. */
2055$4
2056int
Illia Bobyra96d5442023-08-30 16:30:15 +02002057main (void)
Bram Moolenaar914703b2010-05-31 21:59:46 +02002058{
2059static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Bram Moolenaar7db77842014-03-27 17:40:59 +01002060test_array [0] = 0;
2061return test_array [0];
Bram Moolenaar914703b2010-05-31 21:59:46 +02002062
2063 ;
2064 return 0;
2065}
2066_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02002067if ac_fn_c_try_compile "$LINENO"
2068then :
Bram Moolenaar914703b2010-05-31 21:59:46 +02002069 ac_hi=$ac_mid
Illia Bobyra96d5442023-08-30 16:30:15 +02002070else $as_nop
Bram Moolenaar914703b2010-05-31 21:59:46 +02002071 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2072fi
Illia Bobyra96d5442023-08-30 16:30:15 +02002073rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar914703b2010-05-31 21:59:46 +02002074done
2075case $ac_lo in #((
2076?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2077'') ac_retval=1 ;;
2078esac
2079 else
2080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2081/* end confdefs.h. */
2082$4
Illia Bobyra96d5442023-08-30 16:30:15 +02002083static long int longval (void) { return $2; }
2084static unsigned long int ulongval (void) { return $2; }
Bram Moolenaar914703b2010-05-31 21:59:46 +02002085#include <stdio.h>
2086#include <stdlib.h>
2087int
Illia Bobyra96d5442023-08-30 16:30:15 +02002088main (void)
Bram Moolenaar914703b2010-05-31 21:59:46 +02002089{
2090
2091 FILE *f = fopen ("conftest.val", "w");
2092 if (! f)
2093 return 1;
2094 if (($2) < 0)
2095 {
2096 long int i = longval ();
2097 if (i != ($2))
2098 return 1;
2099 fprintf (f, "%ld", i);
2100 }
2101 else
2102 {
2103 unsigned long int i = ulongval ();
2104 if (i != ($2))
2105 return 1;
2106 fprintf (f, "%lu", i);
2107 }
2108 /* Do not output a trailing newline, as this causes \r\n confusion
2109 on some platforms. */
2110 return ferror (f) || fclose (f) != 0;
2111
2112 ;
2113 return 0;
2114}
2115_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02002116if ac_fn_c_try_run "$LINENO"
2117then :
Bram Moolenaar914703b2010-05-31 21:59:46 +02002118 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
Illia Bobyra96d5442023-08-30 16:30:15 +02002119else $as_nop
Bram Moolenaar914703b2010-05-31 21:59:46 +02002120 ac_retval=1
2121fi
2122rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2123 conftest.$ac_objext conftest.beam conftest.$ac_ext
2124rm -f conftest.val
2125
2126 fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01002127 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Bram Moolenaar914703b2010-05-31 21:59:46 +02002128 as_fn_set_status $ac_retval
2129
2130} # ac_fn_c_compute_int
Mike Gilberta055b442023-08-20 19:01:41 +02002131
2132# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2133# -------------------------------------------
2134# Tests whether TYPE exists after having included INCLUDES, setting cache
2135# variable VAR accordingly.
2136ac_fn_c_check_type ()
2137{
2138 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +02002139 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2140printf %s "checking for $2... " >&6; }
2141if eval test \${$3+y}
2142then :
2143 printf %s "(cached) " >&6
2144else $as_nop
Mike Gilberta055b442023-08-20 19:01:41 +02002145 eval "$3=no"
2146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2147/* end confdefs.h. */
2148$4
2149int
Illia Bobyra96d5442023-08-30 16:30:15 +02002150main (void)
Mike Gilberta055b442023-08-20 19:01:41 +02002151{
2152if (sizeof ($2))
2153 return 0;
2154 ;
2155 return 0;
2156}
2157_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02002158if ac_fn_c_try_compile "$LINENO"
2159then :
Mike Gilberta055b442023-08-20 19:01:41 +02002160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2161/* end confdefs.h. */
2162$4
2163int
Illia Bobyra96d5442023-08-30 16:30:15 +02002164main (void)
Mike Gilberta055b442023-08-20 19:01:41 +02002165{
2166if (sizeof (($2)))
2167 return 0;
2168 ;
2169 return 0;
2170}
2171_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02002172if ac_fn_c_try_compile "$LINENO"
2173then :
Mike Gilberta055b442023-08-20 19:01:41 +02002174
Illia Bobyra96d5442023-08-30 16:30:15 +02002175else $as_nop
Mike Gilberta055b442023-08-20 19:01:41 +02002176 eval "$3=yes"
2177fi
Illia Bobyra96d5442023-08-30 16:30:15 +02002178rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Mike Gilberta055b442023-08-20 19:01:41 +02002179fi
Illia Bobyra96d5442023-08-30 16:30:15 +02002180rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Mike Gilberta055b442023-08-20 19:01:41 +02002181fi
2182eval ac_res=\$$3
Illia Bobyra96d5442023-08-30 16:30:15 +02002183 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2184printf "%s\n" "$ac_res" >&6; }
Mike Gilberta055b442023-08-20 19:01:41 +02002185 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2186
2187} # ac_fn_c_check_type
2188
2189# ac_fn_c_find_uintX_t LINENO BITS VAR
2190# ------------------------------------
2191# Finds an unsigned integer type with width BITS, setting cache variable VAR
2192# accordingly.
2193ac_fn_c_find_uintX_t ()
2194{
2195 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +02002196 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
2197printf %s "checking for uint$2_t... " >&6; }
2198if eval test \${$3+y}
2199then :
2200 printf %s "(cached) " >&6
2201else $as_nop
Mike Gilberta055b442023-08-20 19:01:41 +02002202 eval "$3=no"
2203 # Order is important - never check a type that is potentially smaller
2204 # than half of the expected target width.
2205 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
2206 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
2207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2208/* end confdefs.h. */
2209$ac_includes_default
2210int
Illia Bobyra96d5442023-08-30 16:30:15 +02002211main (void)
Mike Gilberta055b442023-08-20 19:01:41 +02002212{
2213static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
2214test_array [0] = 0;
2215return test_array [0];
2216
2217 ;
2218 return 0;
2219}
2220_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02002221if ac_fn_c_try_compile "$LINENO"
2222then :
Mike Gilberta055b442023-08-20 19:01:41 +02002223 case $ac_type in #(
2224 uint$2_t) :
2225 eval "$3=yes" ;; #(
2226 *) :
2227 eval "$3=\$ac_type" ;;
2228esac
2229fi
Illia Bobyra96d5442023-08-30 16:30:15 +02002230rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2231 if eval test \"x\$"$3"\" = x"no"
2232then :
Mike Gilberta055b442023-08-20 19:01:41 +02002233
Illia Bobyra96d5442023-08-30 16:30:15 +02002234else $as_nop
Mike Gilberta055b442023-08-20 19:01:41 +02002235 break
2236fi
2237 done
2238fi
2239eval ac_res=\$$3
Illia Bobyra96d5442023-08-30 16:30:15 +02002240 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2241printf "%s\n" "$ac_res" >&6; }
Mike Gilberta055b442023-08-20 19:01:41 +02002242 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2243
2244} # ac_fn_c_find_uintX_t
Illia Bobyra96d5442023-08-30 16:30:15 +02002245ac_configure_args_raw=
2246for ac_arg
2247do
2248 case $ac_arg in
2249 *\'*)
2250 ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2251 esac
2252 as_fn_append ac_configure_args_raw " '$ac_arg'"
2253done
2254
2255case $ac_configure_args_raw in
2256 *$as_nl*)
2257 ac_safe_unquote= ;;
2258 *)
2259 ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab.
2260 ac_unsafe_a="$ac_unsafe_z#~"
2261 ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
2262 ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
2263esac
2264
Bram Moolenaar446cb832008-06-24 21:56:24 +00002265cat >auto/config.log <<_ACEOF
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002266This file contains any messages produced by compilers while
2267running configure, to aid debugging if configure makes a mistake.
2268
2269It was created by $as_me, which was
Illia Bobyra96d5442023-08-30 16:30:15 +02002270generated by GNU Autoconf 2.71. Invocation command line was
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002271
Illia Bobyra96d5442023-08-30 16:30:15 +02002272 $ $0$ac_configure_args_raw
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002273
2274_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +00002275exec 5>>auto/config.log
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002276{
2277cat <<_ASUNAME
2278## --------- ##
2279## Platform. ##
2280## --------- ##
2281
2282hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2283uname -m = `(uname -m) 2>/dev/null || echo unknown`
2284uname -r = `(uname -r) 2>/dev/null || echo unknown`
2285uname -s = `(uname -s) 2>/dev/null || echo unknown`
2286uname -v = `(uname -v) 2>/dev/null || echo unknown`
2287
2288/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2289/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2290
2291/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2292/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2293/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Bram Moolenaar446cb832008-06-24 21:56:24 +00002294/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002295/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2296/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2297/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2298
2299_ASUNAME
2300
2301as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2302for as_dir in $PATH
2303do
2304 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02002305 case $as_dir in #(((
2306 '') as_dir=./ ;;
2307 */) ;;
2308 *) as_dir=$as_dir/ ;;
2309 esac
2310 printf "%s\n" "PATH: $as_dir"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002311 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00002312IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002313
2314} >&5
2315
2316cat >&5 <<_ACEOF
2317
2318
2319## ----------- ##
2320## Core tests. ##
2321## ----------- ##
2322
2323_ACEOF
2324
2325
2326# Keep a trace of the command line.
2327# Strip out --no-create and --no-recursion so they do not pile up.
2328# Strip out --silent because we don't want to record it for future runs.
2329# Also quote any args containing shell meta-characters.
2330# Make two passes to allow for proper duplicate-argument suppression.
2331ac_configure_args=
2332ac_configure_args0=
2333ac_configure_args1=
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002334ac_must_keep_next=false
2335for ac_pass in 1 2
2336do
2337 for ac_arg
2338 do
2339 case $ac_arg in
2340 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2341 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2342 | -silent | --silent | --silen | --sile | --sil)
2343 continue ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +00002344 *\'*)
Illia Bobyra96d5442023-08-30 16:30:15 +02002345 ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002346 esac
2347 case $ac_pass in
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002348 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002349 2)
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002350 as_fn_append ac_configure_args1 " '$ac_arg'"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002351 if test $ac_must_keep_next = true; then
2352 ac_must_keep_next=false # Got value, back to normal.
2353 else
2354 case $ac_arg in
2355 *=* | --config-cache | -C | -disable-* | --disable-* \
2356 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2357 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2358 | -with-* | --with-* | -without-* | --without-* | --x)
2359 case "$ac_configure_args0 " in
2360 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2361 esac
2362 ;;
2363 -* ) ac_must_keep_next=true ;;
2364 esac
2365 fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002366 as_fn_append ac_configure_args " '$ac_arg'"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002367 ;;
2368 esac
2369 done
2370done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002371{ ac_configure_args0=; unset ac_configure_args0;}
2372{ ac_configure_args1=; unset ac_configure_args1;}
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002373
2374# When interrupted or exit'd, cleanup temporary files, and complete
2375# config.log. We remove comments because anyway the quotes in there
2376# would cause problems or look ugly.
Bram Moolenaar446cb832008-06-24 21:56:24 +00002377# WARNING: Use '\'' to represent an apostrophe within the trap.
2378# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002379trap 'exit_status=$?
Illia Bobyra96d5442023-08-30 16:30:15 +02002380 # Sanitize IFS.
2381 IFS=" "" $as_nl"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002382 # Save into config.log some information that might help in debugging.
2383 {
2384 echo
2385
Illia Bobyra96d5442023-08-30 16:30:15 +02002386 printf "%s\n" "## ---------------- ##
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002387## Cache variables. ##
Bram Moolenaar7db77842014-03-27 17:40:59 +01002388## ---------------- ##"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002389 echo
2390 # The following way of writing the cache mishandles newlines in values,
Bram Moolenaar446cb832008-06-24 21:56:24 +00002391(
2392 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2393 eval ac_val=\$$ac_var
2394 case $ac_val in #(
2395 *${as_nl}*)
2396 case $ac_var in #(
Illia Bobyra96d5442023-08-30 16:30:15 +02002397 *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2398printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +00002399 esac
2400 case $ac_var in #(
2401 _ | IFS | as_nl) ;; #(
2402 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002403 *) { eval $ac_var=; unset $ac_var;} ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +00002404 esac ;;
2405 esac
2406 done
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002407 (set) 2>&1 |
Bram Moolenaar446cb832008-06-24 21:56:24 +00002408 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2409 *${as_nl}ac_space=\ *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002410 sed -n \
Bram Moolenaar446cb832008-06-24 21:56:24 +00002411 "s/'\''/'\''\\\\'\'''\''/g;
2412 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2413 ;; #(
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002414 *)
Bram Moolenaar446cb832008-06-24 21:56:24 +00002415 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002416 ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +00002417 esac |
2418 sort
2419)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002420 echo
2421
Illia Bobyra96d5442023-08-30 16:30:15 +02002422 printf "%s\n" "## ----------------- ##
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002423## Output variables. ##
Bram Moolenaar7db77842014-03-27 17:40:59 +01002424## ----------------- ##"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002425 echo
2426 for ac_var in $ac_subst_vars
2427 do
Bram Moolenaar446cb832008-06-24 21:56:24 +00002428 eval ac_val=\$$ac_var
2429 case $ac_val in
Illia Bobyra96d5442023-08-30 16:30:15 +02002430 *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Bram Moolenaar446cb832008-06-24 21:56:24 +00002431 esac
Illia Bobyra96d5442023-08-30 16:30:15 +02002432 printf "%s\n" "$ac_var='\''$ac_val'\''"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002433 done | sort
2434 echo
2435
2436 if test -n "$ac_subst_files"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02002437 printf "%s\n" "## ------------------- ##
Bram Moolenaar446cb832008-06-24 21:56:24 +00002438## File substitutions. ##
Bram Moolenaar7db77842014-03-27 17:40:59 +01002439## ------------------- ##"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002440 echo
2441 for ac_var in $ac_subst_files
2442 do
Bram Moolenaar446cb832008-06-24 21:56:24 +00002443 eval ac_val=\$$ac_var
2444 case $ac_val in
Illia Bobyra96d5442023-08-30 16:30:15 +02002445 *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Bram Moolenaar446cb832008-06-24 21:56:24 +00002446 esac
Illia Bobyra96d5442023-08-30 16:30:15 +02002447 printf "%s\n" "$ac_var='\''$ac_val'\''"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002448 done | sort
2449 echo
2450 fi
2451
2452 if test -s confdefs.h; then
Illia Bobyra96d5442023-08-30 16:30:15 +02002453 printf "%s\n" "## ----------- ##
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002454## confdefs.h. ##
Bram Moolenaar7db77842014-03-27 17:40:59 +01002455## ----------- ##"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002456 echo
Bram Moolenaar446cb832008-06-24 21:56:24 +00002457 cat confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002458 echo
2459 fi
2460 test "$ac_signal" != 0 &&
Illia Bobyra96d5442023-08-30 16:30:15 +02002461 printf "%s\n" "$as_me: caught signal $ac_signal"
2462 printf "%s\n" "$as_me: exit $exit_status"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002463 } >&5
Bram Moolenaar446cb832008-06-24 21:56:24 +00002464 rm -f core *.core core.conftest.* &&
2465 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002466 exit $exit_status
Bram Moolenaar446cb832008-06-24 21:56:24 +00002467' 0
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002468for ac_signal in 1 2 13 15; do
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002469 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002470done
2471ac_signal=0
2472
2473# confdefs.h avoids OS command line length limits that DEFS can exceed.
Bram Moolenaar446cb832008-06-24 21:56:24 +00002474rm -f -r conftest* confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002475
Illia Bobyra96d5442023-08-30 16:30:15 +02002476printf "%s\n" "/* confdefs.h */" > confdefs.h
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002477
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002478# Predefined preprocessor variables.
2479
Illia Bobyra96d5442023-08-30 16:30:15 +02002480printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002481
Illia Bobyra96d5442023-08-30 16:30:15 +02002482printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002483
Illia Bobyra96d5442023-08-30 16:30:15 +02002484printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002485
Illia Bobyra96d5442023-08-30 16:30:15 +02002486printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002487
Illia Bobyra96d5442023-08-30 16:30:15 +02002488printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002489
Illia Bobyra96d5442023-08-30 16:30:15 +02002490printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002491
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002492
2493# Let the site file select an alternate cache file if it wants to.
Bram Moolenaar446cb832008-06-24 21:56:24 +00002494# Prefer an explicitly selected file to automatically selected ones.
Bram Moolenaar446cb832008-06-24 21:56:24 +00002495if test -n "$CONFIG_SITE"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02002496 ac_site_files="$CONFIG_SITE"
Bram Moolenaar446cb832008-06-24 21:56:24 +00002497elif test "x$prefix" != xNONE; then
Illia Bobyra96d5442023-08-30 16:30:15 +02002498 ac_site_files="$prefix/share/config.site $prefix/etc/config.site"
Bram Moolenaar446cb832008-06-24 21:56:24 +00002499else
Illia Bobyra96d5442023-08-30 16:30:15 +02002500 ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
Bram Moolenaar071d4272004-06-13 20:20:40 +00002501fi
Illia Bobyra96d5442023-08-30 16:30:15 +02002502
2503for ac_site_file in $ac_site_files
Bram Moolenaar446cb832008-06-24 21:56:24 +00002504do
Illia Bobyra96d5442023-08-30 16:30:15 +02002505 case $ac_site_file in #(
2506 */*) :
2507 ;; #(
2508 *) :
2509 ac_site_file=./$ac_site_file ;;
2510esac
2511 if test -f "$ac_site_file" && test -r "$ac_site_file"; then
2512 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2513printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002514 sed 's/^/| /' "$ac_site_file" >&5
Bram Moolenaar7db77842014-03-27 17:40:59 +01002515 . "$ac_site_file" \
Illia Bobyra96d5442023-08-30 16:30:15 +02002516 || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2517printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +01002518as_fn_error $? "failed to load site script $ac_site_file
2519See \`config.log' for more details" "$LINENO" 5; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00002520 fi
2521done
2522
2523if test -r "$cache_file"; then
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002524 # Some versions of bash will fail to source /dev/null (special files
2525 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2526 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02002527 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2528printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002529 case $cache_file in
Bram Moolenaar446cb832008-06-24 21:56:24 +00002530 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2531 *) . "./$cache_file";;
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002532 esac
2533 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00002534else
Illia Bobyra96d5442023-08-30 16:30:15 +02002535 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2536printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002537 >$cache_file
2538fi
2539
Illia Bobyra96d5442023-08-30 16:30:15 +02002540# Test code for whether the C compiler supports C89 (global declarations)
2541ac_c_conftest_c89_globals='
2542/* Does the compiler advertise C89 conformance?
2543 Do not test the value of __STDC__, because some compilers set it to 0
2544 while being otherwise adequately conformant. */
2545#if !defined __STDC__
2546# error "Compiler does not advertise C89 conformance"
Bram Moolenaar071d4272004-06-13 20:20:40 +00002547#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +00002548
Illia Bobyra96d5442023-08-30 16:30:15 +02002549#include <stddef.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002550#include <stdarg.h>
Bram Moolenaar7db77842014-03-27 17:40:59 +01002551struct stat;
Illia Bobyra96d5442023-08-30 16:30:15 +02002552/* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002553struct buf { int x; };
Illia Bobyra96d5442023-08-30 16:30:15 +02002554struct buf * (*rcsopen) (struct buf *, struct stat *, int);
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002555static char *e (p, i)
2556 char **p;
2557 int i;
2558{
2559 return p[i];
2560}
2561static char *f (char * (*g) (char **, int), char **p, ...)
2562{
2563 char *s;
2564 va_list v;
2565 va_start (v,p);
2566 s = g (p, va_arg (v,int));
2567 va_end (v);
2568 return s;
2569}
2570
2571/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
Illia Bobyra96d5442023-08-30 16:30:15 +02002572 function prototypes and stuff, but not \xHH hex character constants.
2573 These do not provoke an error unfortunately, instead are silently treated
2574 as an "x". The following induces an error, until -std is added to get
2575 proper ANSI mode. Curiously \x00 != x always comes out true, for an
2576 array size at least. It is necessary to write \x00 == 0 to get something
2577 that is true only with -std. */
2578int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1];
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002579
Bram Moolenaar446cb832008-06-24 21:56:24 +00002580/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
2581 inside strings and character constants. */
Illia Bobyra96d5442023-08-30 16:30:15 +02002582#define FOO(x) '\''x'\''
2583int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1];
Bram Moolenaar446cb832008-06-24 21:56:24 +00002584
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002585int test (int i, double x);
2586struct s1 {int (*f) (int a);};
2587struct s2 {int (*f) (double a);};
Illia Bobyra96d5442023-08-30 16:30:15 +02002588int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int),
2589 int, int);'
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002590
Illia Bobyra96d5442023-08-30 16:30:15 +02002591# Test code for whether the C compiler supports C89 (body of main).
2592ac_c_conftest_c89_main='
2593ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
2594'
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002595
Illia Bobyra96d5442023-08-30 16:30:15 +02002596# Test code for whether the C compiler supports C99 (global declarations)
2597ac_c_conftest_c99_globals='
2598// Does the compiler advertise C99 conformance?
2599#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
2600# error "Compiler does not advertise C99 conformance"
2601#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002602
Bram Moolenaar22640082018-04-19 20:39:41 +02002603#include <stdbool.h>
Illia Bobyra96d5442023-08-30 16:30:15 +02002604extern int puts (const char *);
2605extern int printf (const char *, ...);
2606extern int dprintf (int, const char *, ...);
2607extern void *malloc (size_t);
Bram Moolenaar22640082018-04-19 20:39:41 +02002608
2609// Check varargs macros. These examples are taken from C99 6.10.3.5.
Illia Bobyra96d5442023-08-30 16:30:15 +02002610// dprintf is used instead of fprintf to avoid needing to declare
2611// FILE and stderr.
2612#define debug(...) dprintf (2, __VA_ARGS__)
Bram Moolenaar22640082018-04-19 20:39:41 +02002613#define showlist(...) puts (#__VA_ARGS__)
2614#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
2615static void
2616test_varargs_macros (void)
Bram Moolenaar2e324952018-04-14 14:37:07 +02002617{
Bram Moolenaar22640082018-04-19 20:39:41 +02002618 int x = 1234;
2619 int y = 5678;
2620 debug ("Flag");
2621 debug ("X = %d\n", x);
2622 showlist (The first, second, and third items.);
2623 report (x>y, "x is %d but y is %d", x, y);
Bram Moolenaar2e324952018-04-14 14:37:07 +02002624}
2625
Bram Moolenaar22640082018-04-19 20:39:41 +02002626// Check long long types.
2627#define BIG64 18446744073709551615ull
2628#define BIG32 4294967295ul
2629#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
2630#if !BIG_OK
Illia Bobyra96d5442023-08-30 16:30:15 +02002631 #error "your preprocessor is broken"
Bram Moolenaar22640082018-04-19 20:39:41 +02002632#endif
2633#if BIG_OK
2634#else
Illia Bobyra96d5442023-08-30 16:30:15 +02002635 #error "your preprocessor is broken"
Bram Moolenaar22640082018-04-19 20:39:41 +02002636#endif
2637static long long int bignum = -9223372036854775807LL;
2638static unsigned long long int ubignum = BIG64;
Bram Moolenaar2e324952018-04-14 14:37:07 +02002639
Bram Moolenaar22640082018-04-19 20:39:41 +02002640struct incomplete_array
2641{
2642 int datasize;
2643 double data[];
2644};
Bram Moolenaar2e324952018-04-14 14:37:07 +02002645
Bram Moolenaar22640082018-04-19 20:39:41 +02002646struct named_init {
2647 int number;
2648 const wchar_t *name;
2649 double average;
2650};
2651
2652typedef const char *ccp;
2653
2654static inline int
2655test_restrict (ccp restrict text)
2656{
2657 // See if C++-style comments work.
2658 // Iterate through items via the restricted pointer.
2659 // Also check for declarations in for loops.
Illia Bobyra96d5442023-08-30 16:30:15 +02002660 for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
Bram Moolenaar22640082018-04-19 20:39:41 +02002661 continue;
2662 return 0;
2663}
2664
2665// Check varargs and va_copy.
Illia Bobyra96d5442023-08-30 16:30:15 +02002666static bool
Bram Moolenaar22640082018-04-19 20:39:41 +02002667test_varargs (const char *format, ...)
2668{
2669 va_list args;
2670 va_start (args, format);
2671 va_list args_copy;
2672 va_copy (args_copy, args);
2673
Illia Bobyra96d5442023-08-30 16:30:15 +02002674 const char *str = "";
2675 int number = 0;
2676 float fnumber = 0;
Bram Moolenaar22640082018-04-19 20:39:41 +02002677
2678 while (*format)
2679 {
2680 switch (*format++)
2681 {
Illia Bobyra96d5442023-08-30 16:30:15 +02002682 case '\''s'\'': // string
Bram Moolenaar22640082018-04-19 20:39:41 +02002683 str = va_arg (args_copy, const char *);
2684 break;
Illia Bobyra96d5442023-08-30 16:30:15 +02002685 case '\''d'\'': // int
Bram Moolenaar22640082018-04-19 20:39:41 +02002686 number = va_arg (args_copy, int);
2687 break;
Illia Bobyra96d5442023-08-30 16:30:15 +02002688 case '\''f'\'': // float
Bram Moolenaar22640082018-04-19 20:39:41 +02002689 fnumber = va_arg (args_copy, double);
2690 break;
2691 default:
2692 break;
2693 }
2694 }
2695 va_end (args_copy);
2696 va_end (args);
Illia Bobyra96d5442023-08-30 16:30:15 +02002697
2698 return *str && number && fnumber;
Bram Moolenaar22640082018-04-19 20:39:41 +02002699}
Illia Bobyra96d5442023-08-30 16:30:15 +02002700'
Bram Moolenaar22640082018-04-19 20:39:41 +02002701
Illia Bobyra96d5442023-08-30 16:30:15 +02002702# Test code for whether the C compiler supports C99 (body of main).
2703ac_c_conftest_c99_main='
Bram Moolenaar22640082018-04-19 20:39:41 +02002704 // Check bool.
2705 _Bool success = false;
Illia Bobyra96d5442023-08-30 16:30:15 +02002706 success |= (argc != 0);
Bram Moolenaar22640082018-04-19 20:39:41 +02002707
2708 // Check restrict.
2709 if (test_restrict ("String literal") == 0)
2710 success = true;
2711 char *restrict newvar = "Another string";
2712
2713 // Check varargs.
Illia Bobyra96d5442023-08-30 16:30:15 +02002714 success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234);
Bram Moolenaar22640082018-04-19 20:39:41 +02002715 test_varargs_macros ();
2716
2717 // Check flexible array members.
2718 struct incomplete_array *ia =
2719 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
2720 ia->datasize = 10;
2721 for (int i = 0; i < ia->datasize; ++i)
2722 ia->data[i] = i * 1.234;
2723
2724 // Check named initializers.
2725 struct named_init ni = {
2726 .number = 34,
2727 .name = L"Test wide string",
2728 .average = 543.34343,
2729 };
2730
2731 ni.number = 58;
2732
2733 int dynamic_array[ni.number];
Illia Bobyra96d5442023-08-30 16:30:15 +02002734 dynamic_array[0] = argv[0][0];
Bram Moolenaar22640082018-04-19 20:39:41 +02002735 dynamic_array[ni.number - 1] = 543;
2736
2737 // work around unused variable warnings
Illia Bobyra96d5442023-08-30 16:30:15 +02002738 ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\''
2739 || dynamic_array[ni.number - 1] != 543);
2740'
2741
2742# Test code for whether the C compiler supports C11 (global declarations)
2743ac_c_conftest_c11_globals='
2744// Does the compiler advertise C11 conformance?
2745#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
2746# error "Compiler does not advertise C11 conformance"
2747#endif
2748
2749// Check _Alignas.
2750char _Alignas (double) aligned_as_double;
2751char _Alignas (0) no_special_alignment;
2752extern char aligned_as_int;
2753char _Alignas (0) _Alignas (int) aligned_as_int;
2754
2755// Check _Alignof.
2756enum
2757{
2758 int_alignment = _Alignof (int),
2759 int_array_alignment = _Alignof (int[100]),
2760 char_alignment = _Alignof (char)
2761};
2762_Static_assert (0 < -_Alignof (int), "_Alignof is signed");
2763
2764// Check _Noreturn.
2765int _Noreturn does_not_return (void) { for (;;) continue; }
2766
2767// Check _Static_assert.
2768struct test_static_assert
2769{
2770 int x;
2771 _Static_assert (sizeof (int) <= sizeof (long int),
2772 "_Static_assert does not work in struct");
2773 long int y;
2774};
2775
2776// Check UTF-8 literals.
2777#define u8 syntax error!
2778char const utf8_literal[] = u8"happens to be ASCII" "another string";
2779
2780// Check duplicate typedefs.
2781typedef long *long_ptr;
2782typedef long int *long_ptr;
2783typedef long_ptr long_ptr;
2784
2785// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
2786struct anonymous
2787{
2788 union {
2789 struct { int i; int j; };
2790 struct { int k; long int l; } w;
2791 };
2792 int m;
2793} v1;
2794'
2795
2796# Test code for whether the C compiler supports C11 (body of main).
2797ac_c_conftest_c11_main='
2798 _Static_assert ((offsetof (struct anonymous, i)
2799 == offsetof (struct anonymous, w.k)),
2800 "Anonymous union alignment botch");
2801 v1.i = 2;
2802 v1.w.k = 5;
2803 ok |= v1.i != 5;
2804'
2805
2806# Test code for whether the C compiler supports C11 (complete).
2807ac_c_conftest_c11_program="${ac_c_conftest_c89_globals}
2808${ac_c_conftest_c99_globals}
2809${ac_c_conftest_c11_globals}
2810
2811int
2812main (int argc, char **argv)
2813{
2814 int ok = 0;
2815 ${ac_c_conftest_c89_main}
2816 ${ac_c_conftest_c99_main}
2817 ${ac_c_conftest_c11_main}
2818 return ok;
2819}
2820"
2821
2822# Test code for whether the C compiler supports C99 (complete).
2823ac_c_conftest_c99_program="${ac_c_conftest_c89_globals}
2824${ac_c_conftest_c99_globals}
2825
2826int
2827main (int argc, char **argv)
2828{
2829 int ok = 0;
2830 ${ac_c_conftest_c89_main}
2831 ${ac_c_conftest_c99_main}
2832 return ok;
2833}
2834"
2835
2836# Test code for whether the C compiler supports C89 (complete).
2837ac_c_conftest_c89_program="${ac_c_conftest_c89_globals}
2838
2839int
2840main (int argc, char **argv)
2841{
2842 int ok = 0;
2843 ${ac_c_conftest_c89_main}
2844 return ok;
2845}
2846"
2847
2848as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H"
2849as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H"
2850as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H"
2851as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
2852as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
2853as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
2854as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
2855as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
2856as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
2857as_fn_append ac_header_c_list " sys/time.h sys_time_h HAVE_SYS_TIME_H"
2858as_fn_append ac_header_c_list " sys/select.h sys_select_h HAVE_SYS_SELECT_H"
2859as_fn_append ac_header_c_list " sys/socket.h sys_socket_h HAVE_SYS_SOCKET_H"
2860# Check that the precious variables saved in the cache have kept the same
2861# value.
2862ac_cache_corrupted=false
2863for ac_var in $ac_precious_vars; do
2864 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2865 eval ac_new_set=\$ac_env_${ac_var}_set
2866 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2867 eval ac_new_val=\$ac_env_${ac_var}_value
2868 case $ac_old_set,$ac_new_set in
2869 set,)
2870 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2871printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2872 ac_cache_corrupted=: ;;
2873 ,set)
2874 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2875printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2876 ac_cache_corrupted=: ;;
2877 ,);;
2878 *)
2879 if test "x$ac_old_val" != "x$ac_new_val"; then
2880 # differences in whitespace do not lead to failure.
2881 ac_old_val_w=`echo x $ac_old_val`
2882 ac_new_val_w=`echo x $ac_new_val`
2883 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2884 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2885printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2886 ac_cache_corrupted=:
2887 else
2888 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2889printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2890 eval $ac_var=\$ac_old_val
2891 fi
2892 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2893printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;}
2894 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2895printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;}
2896 fi;;
2897 esac
2898 # Pass precious variables to config.status.
2899 if test "$ac_new_set" = set; then
2900 case $ac_new_val in
2901 *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2902 *) ac_arg=$ac_var=$ac_new_val ;;
2903 esac
2904 case " $ac_configure_args " in
2905 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2906 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2907 esac
2908 fi
2909done
2910if $ac_cache_corrupted; then
2911 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2912printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
2913 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2914printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
2915 as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file'
2916 and start over" "$LINENO" 5
2917fi
2918## -------------------- ##
2919## Main body of script. ##
2920## -------------------- ##
2921
2922ac_ext=c
2923ac_cpp='$CPP $CPPFLAGS'
2924ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2925ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2926ac_compiler_gnu=$ac_cv_c_compiler_gnu
2927
2928
2929
2930ac_config_headers="$ac_config_headers auto/config.h:config.h.in"
2931
2932
2933printf "%s\n" "#define UNIX 1" >>confdefs.h
2934
2935{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
2936printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
2937set x ${MAKE-make}
2938ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
2939if eval test \${ac_cv_prog_make_${ac_make}_set+y}
2940then :
2941 printf %s "(cached) " >&6
2942else $as_nop
2943 cat >conftest.make <<\_ACEOF
2944SHELL = /bin/sh
2945all:
2946 @echo '@@@%%%=$(MAKE)=@@@%%%'
2947_ACEOF
2948# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
2949case `${MAKE-make} -f conftest.make 2>/dev/null` in
2950 *@@@%%%=?*=@@@%%%*)
2951 eval ac_cv_prog_make_${ac_make}_set=yes;;
2952 *)
2953 eval ac_cv_prog_make_${ac_make}_set=no;;
2954esac
2955rm -f conftest.make
2956fi
2957if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
2958 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
2959printf "%s\n" "yes" >&6; }
2960 SET_MAKE=
2961else
2962 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
2963printf "%s\n" "no" >&6; }
2964 SET_MAKE="MAKE=${MAKE-make}"
2965fi
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977ac_ext=c
2978ac_cpp='$CPP $CPPFLAGS'
2979ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2980ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2981ac_compiler_gnu=$ac_cv_c_compiler_gnu
2982if test -n "$ac_tool_prefix"; then
2983 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2984set dummy ${ac_tool_prefix}gcc; ac_word=$2
2985{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2986printf %s "checking for $ac_word... " >&6; }
2987if test ${ac_cv_prog_CC+y}
2988then :
2989 printf %s "(cached) " >&6
2990else $as_nop
2991 if test -n "$CC"; then
2992 ac_cv_prog_CC="$CC" # Let the user override the test.
2993else
2994as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2995for as_dir in $PATH
2996do
2997 IFS=$as_save_IFS
2998 case $as_dir in #(((
2999 '') as_dir=./ ;;
3000 */) ;;
3001 *) as_dir=$as_dir/ ;;
3002 esac
3003 for ac_exec_ext in '' $ac_executable_extensions; do
3004 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3005 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3006 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3007 break 2
3008 fi
3009done
3010 done
3011IFS=$as_save_IFS
3012
3013fi
3014fi
3015CC=$ac_cv_prog_CC
3016if test -n "$CC"; then
3017 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3018printf "%s\n" "$CC" >&6; }
3019else
3020 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3021printf "%s\n" "no" >&6; }
3022fi
3023
3024
3025fi
3026if test -z "$ac_cv_prog_CC"; then
3027 ac_ct_CC=$CC
3028 # Extract the first word of "gcc", so it can be a program name with args.
3029set dummy gcc; ac_word=$2
3030{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3031printf %s "checking for $ac_word... " >&6; }
3032if test ${ac_cv_prog_ac_ct_CC+y}
3033then :
3034 printf %s "(cached) " >&6
3035else $as_nop
3036 if test -n "$ac_ct_CC"; then
3037 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3038else
3039as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3040for as_dir in $PATH
3041do
3042 IFS=$as_save_IFS
3043 case $as_dir in #(((
3044 '') as_dir=./ ;;
3045 */) ;;
3046 *) as_dir=$as_dir/ ;;
3047 esac
3048 for ac_exec_ext in '' $ac_executable_extensions; do
3049 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3050 ac_cv_prog_ac_ct_CC="gcc"
3051 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3052 break 2
3053 fi
3054done
3055 done
3056IFS=$as_save_IFS
3057
3058fi
3059fi
3060ac_ct_CC=$ac_cv_prog_ac_ct_CC
3061if test -n "$ac_ct_CC"; then
3062 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3063printf "%s\n" "$ac_ct_CC" >&6; }
3064else
3065 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3066printf "%s\n" "no" >&6; }
3067fi
3068
3069 if test "x$ac_ct_CC" = x; then
3070 CC=""
3071 else
3072 case $cross_compiling:$ac_tool_warned in
3073yes:)
3074{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3075printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3076ac_tool_warned=yes ;;
3077esac
3078 CC=$ac_ct_CC
3079 fi
3080else
3081 CC="$ac_cv_prog_CC"
3082fi
3083
3084if test -z "$CC"; then
3085 if test -n "$ac_tool_prefix"; then
3086 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3087set dummy ${ac_tool_prefix}cc; ac_word=$2
3088{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3089printf %s "checking for $ac_word... " >&6; }
3090if test ${ac_cv_prog_CC+y}
3091then :
3092 printf %s "(cached) " >&6
3093else $as_nop
3094 if test -n "$CC"; then
3095 ac_cv_prog_CC="$CC" # Let the user override the test.
3096else
3097as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3098for as_dir in $PATH
3099do
3100 IFS=$as_save_IFS
3101 case $as_dir in #(((
3102 '') as_dir=./ ;;
3103 */) ;;
3104 *) as_dir=$as_dir/ ;;
3105 esac
3106 for ac_exec_ext in '' $ac_executable_extensions; do
3107 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3108 ac_cv_prog_CC="${ac_tool_prefix}cc"
3109 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3110 break 2
3111 fi
3112done
3113 done
3114IFS=$as_save_IFS
3115
3116fi
3117fi
3118CC=$ac_cv_prog_CC
3119if test -n "$CC"; then
3120 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3121printf "%s\n" "$CC" >&6; }
3122else
3123 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3124printf "%s\n" "no" >&6; }
3125fi
3126
3127
3128 fi
3129fi
3130if test -z "$CC"; then
3131 # Extract the first word of "cc", so it can be a program name with args.
3132set dummy cc; ac_word=$2
3133{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3134printf %s "checking for $ac_word... " >&6; }
3135if test ${ac_cv_prog_CC+y}
3136then :
3137 printf %s "(cached) " >&6
3138else $as_nop
3139 if test -n "$CC"; then
3140 ac_cv_prog_CC="$CC" # Let the user override the test.
3141else
3142 ac_prog_rejected=no
3143as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3144for as_dir in $PATH
3145do
3146 IFS=$as_save_IFS
3147 case $as_dir in #(((
3148 '') as_dir=./ ;;
3149 */) ;;
3150 *) as_dir=$as_dir/ ;;
3151 esac
3152 for ac_exec_ext in '' $ac_executable_extensions; do
3153 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3154 if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3155 ac_prog_rejected=yes
3156 continue
3157 fi
3158 ac_cv_prog_CC="cc"
3159 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3160 break 2
3161 fi
3162done
3163 done
3164IFS=$as_save_IFS
3165
3166if test $ac_prog_rejected = yes; then
3167 # We found a bogon in the path, so make sure we never use it.
3168 set dummy $ac_cv_prog_CC
3169 shift
3170 if test $# != 0; then
3171 # We chose a different compiler from the bogus one.
3172 # However, it has the same basename, so the bogon will be chosen
3173 # first if we set CC to just the basename; use the full file name.
3174 shift
3175 ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
3176 fi
3177fi
3178fi
3179fi
3180CC=$ac_cv_prog_CC
3181if test -n "$CC"; then
3182 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3183printf "%s\n" "$CC" >&6; }
3184else
3185 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3186printf "%s\n" "no" >&6; }
3187fi
3188
3189
3190fi
3191if test -z "$CC"; then
3192 if test -n "$ac_tool_prefix"; then
3193 for ac_prog in cl.exe
3194 do
3195 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3196set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3197{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3198printf %s "checking for $ac_word... " >&6; }
3199if test ${ac_cv_prog_CC+y}
3200then :
3201 printf %s "(cached) " >&6
3202else $as_nop
3203 if test -n "$CC"; then
3204 ac_cv_prog_CC="$CC" # Let the user override the test.
3205else
3206as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3207for as_dir in $PATH
3208do
3209 IFS=$as_save_IFS
3210 case $as_dir in #(((
3211 '') as_dir=./ ;;
3212 */) ;;
3213 *) as_dir=$as_dir/ ;;
3214 esac
3215 for ac_exec_ext in '' $ac_executable_extensions; do
3216 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3217 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3218 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3219 break 2
3220 fi
3221done
3222 done
3223IFS=$as_save_IFS
3224
3225fi
3226fi
3227CC=$ac_cv_prog_CC
3228if test -n "$CC"; then
3229 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3230printf "%s\n" "$CC" >&6; }
3231else
3232 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3233printf "%s\n" "no" >&6; }
3234fi
3235
3236
3237 test -n "$CC" && break
3238 done
3239fi
3240if test -z "$CC"; then
3241 ac_ct_CC=$CC
3242 for ac_prog in cl.exe
3243do
3244 # Extract the first word of "$ac_prog", so it can be a program name with args.
3245set dummy $ac_prog; ac_word=$2
3246{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3247printf %s "checking for $ac_word... " >&6; }
3248if test ${ac_cv_prog_ac_ct_CC+y}
3249then :
3250 printf %s "(cached) " >&6
3251else $as_nop
3252 if test -n "$ac_ct_CC"; then
3253 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3254else
3255as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3256for as_dir in $PATH
3257do
3258 IFS=$as_save_IFS
3259 case $as_dir in #(((
3260 '') as_dir=./ ;;
3261 */) ;;
3262 *) as_dir=$as_dir/ ;;
3263 esac
3264 for ac_exec_ext in '' $ac_executable_extensions; do
3265 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3266 ac_cv_prog_ac_ct_CC="$ac_prog"
3267 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3268 break 2
3269 fi
3270done
3271 done
3272IFS=$as_save_IFS
3273
3274fi
3275fi
3276ac_ct_CC=$ac_cv_prog_ac_ct_CC
3277if test -n "$ac_ct_CC"; then
3278 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3279printf "%s\n" "$ac_ct_CC" >&6; }
3280else
3281 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3282printf "%s\n" "no" >&6; }
3283fi
3284
3285
3286 test -n "$ac_ct_CC" && break
3287done
3288
3289 if test "x$ac_ct_CC" = x; then
3290 CC=""
3291 else
3292 case $cross_compiling:$ac_tool_warned in
3293yes:)
3294{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3295printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3296ac_tool_warned=yes ;;
3297esac
3298 CC=$ac_ct_CC
3299 fi
3300fi
3301
3302fi
3303if test -z "$CC"; then
3304 if test -n "$ac_tool_prefix"; then
3305 # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
3306set dummy ${ac_tool_prefix}clang; ac_word=$2
3307{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3308printf %s "checking for $ac_word... " >&6; }
3309if test ${ac_cv_prog_CC+y}
3310then :
3311 printf %s "(cached) " >&6
3312else $as_nop
3313 if test -n "$CC"; then
3314 ac_cv_prog_CC="$CC" # Let the user override the test.
3315else
3316as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3317for as_dir in $PATH
3318do
3319 IFS=$as_save_IFS
3320 case $as_dir in #(((
3321 '') as_dir=./ ;;
3322 */) ;;
3323 *) as_dir=$as_dir/ ;;
3324 esac
3325 for ac_exec_ext in '' $ac_executable_extensions; do
3326 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3327 ac_cv_prog_CC="${ac_tool_prefix}clang"
3328 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3329 break 2
3330 fi
3331done
3332 done
3333IFS=$as_save_IFS
3334
3335fi
3336fi
3337CC=$ac_cv_prog_CC
3338if test -n "$CC"; then
3339 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3340printf "%s\n" "$CC" >&6; }
3341else
3342 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3343printf "%s\n" "no" >&6; }
3344fi
3345
3346
3347fi
3348if test -z "$ac_cv_prog_CC"; then
3349 ac_ct_CC=$CC
3350 # Extract the first word of "clang", so it can be a program name with args.
3351set dummy clang; ac_word=$2
3352{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3353printf %s "checking for $ac_word... " >&6; }
3354if test ${ac_cv_prog_ac_ct_CC+y}
3355then :
3356 printf %s "(cached) " >&6
3357else $as_nop
3358 if test -n "$ac_ct_CC"; then
3359 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3360else
3361as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3362for as_dir in $PATH
3363do
3364 IFS=$as_save_IFS
3365 case $as_dir in #(((
3366 '') as_dir=./ ;;
3367 */) ;;
3368 *) as_dir=$as_dir/ ;;
3369 esac
3370 for ac_exec_ext in '' $ac_executable_extensions; do
3371 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3372 ac_cv_prog_ac_ct_CC="clang"
3373 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3374 break 2
3375 fi
3376done
3377 done
3378IFS=$as_save_IFS
3379
3380fi
3381fi
3382ac_ct_CC=$ac_cv_prog_ac_ct_CC
3383if test -n "$ac_ct_CC"; then
3384 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3385printf "%s\n" "$ac_ct_CC" >&6; }
3386else
3387 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3388printf "%s\n" "no" >&6; }
3389fi
3390
3391 if test "x$ac_ct_CC" = x; then
3392 CC=""
3393 else
3394 case $cross_compiling:$ac_tool_warned in
3395yes:)
3396{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3397printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3398ac_tool_warned=yes ;;
3399esac
3400 CC=$ac_ct_CC
3401 fi
3402else
3403 CC="$ac_cv_prog_CC"
3404fi
3405
3406fi
3407
3408
3409test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3410printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3411as_fn_error $? "no acceptable C compiler found in \$PATH
3412See \`config.log' for more details" "$LINENO" 5; }
3413
3414# Provide some information about the compiler.
3415printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3416set X $ac_compile
3417ac_compiler=$2
3418for ac_option in --version -v -V -qversion -version; do
3419 { { ac_try="$ac_compiler $ac_option >&5"
3420case "(($ac_try" in
3421 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3422 *) ac_try_echo=$ac_try;;
3423esac
3424eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3425printf "%s\n" "$ac_try_echo"; } >&5
3426 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3427 ac_status=$?
3428 if test -s conftest.err; then
3429 sed '10a\
3430... rest of stderr output deleted ...
3431 10q' conftest.err >conftest.er1
3432 cat conftest.er1 >&5
3433 fi
3434 rm -f conftest.er1 conftest.err
3435 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3436 test $ac_status = 0; }
3437done
3438
3439cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3440/* end confdefs.h. */
3441
3442int
3443main (void)
3444{
Bram Moolenaar22640082018-04-19 20:39:41 +02003445
Bram Moolenaar2e324952018-04-14 14:37:07 +02003446 ;
3447 return 0;
3448}
3449_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02003450ac_clean_files_save=$ac_clean_files
3451ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3452# Try to create an executable without -o first, disregard a.out.
3453# It will help us diagnose broken compilers, and finding out an intuition
3454# of exeext.
3455{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3456printf %s "checking whether the C compiler works... " >&6; }
3457ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3458
3459# The possible output files:
3460ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3461
3462ac_rmfiles=
3463for ac_file in $ac_files
3464do
3465 case $ac_file in
3466 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3467 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3468 esac
3469done
3470rm -f $ac_rmfiles
3471
3472if { { ac_try="$ac_link_default"
3473case "(($ac_try" in
3474 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3475 *) ac_try_echo=$ac_try;;
3476esac
3477eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3478printf "%s\n" "$ac_try_echo"; } >&5
3479 (eval "$ac_link_default") 2>&5
3480 ac_status=$?
3481 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3482 test $ac_status = 0; }
3483then :
3484 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3485# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3486# in a Makefile. We should not override ac_cv_exeext if it was cached,
3487# so that the user can short-circuit this test for compilers unknown to
3488# Autoconf.
3489for ac_file in $ac_files ''
3490do
3491 test -f "$ac_file" || continue
3492 case $ac_file in
3493 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3494 ;;
3495 [ab].out )
3496 # We found the default executable, but exeext='' is most
3497 # certainly right.
3498 break;;
3499 *.* )
3500 if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
3501 then :; else
3502 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3503 fi
3504 # We set ac_cv_exeext here because the later test for it is not
3505 # safe: cross compilers may not add the suffix if given an `-o'
3506 # argument, so we may need to know it at that point already.
3507 # Even if this section looks crufty: it has the advantage of
3508 # actually working.
3509 break;;
3510 * )
3511 break;;
3512 esac
3513done
3514test "$ac_cv_exeext" = no && ac_cv_exeext=
3515
3516else $as_nop
3517 ac_file=''
3518fi
3519if test -z "$ac_file"
3520then :
3521 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3522printf "%s\n" "no" >&6; }
3523printf "%s\n" "$as_me: failed program was:" >&5
3524sed 's/^/| /' conftest.$ac_ext >&5
3525
3526{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3527printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3528as_fn_error 77 "C compiler cannot create executables
3529See \`config.log' for more details" "$LINENO" 5; }
3530else $as_nop
3531 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3532printf "%s\n" "yes" >&6; }
3533fi
3534{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3535printf %s "checking for C compiler default output file name... " >&6; }
3536{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3537printf "%s\n" "$ac_file" >&6; }
3538ac_exeext=$ac_cv_exeext
3539
3540rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3541ac_clean_files=$ac_clean_files_save
3542{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3543printf %s "checking for suffix of executables... " >&6; }
3544if { { ac_try="$ac_link"
3545case "(($ac_try" in
3546 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3547 *) ac_try_echo=$ac_try;;
3548esac
3549eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3550printf "%s\n" "$ac_try_echo"; } >&5
3551 (eval "$ac_link") 2>&5
3552 ac_status=$?
3553 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3554 test $ac_status = 0; }
3555then :
3556 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3557# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3558# work properly (i.e., refer to `conftest.exe'), while it won't with
3559# `rm'.
3560for ac_file in conftest.exe conftest conftest.*; do
3561 test -f "$ac_file" || continue
3562 case $ac_file in
3563 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3564 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3565 break;;
3566 * ) break;;
3567 esac
3568done
3569else $as_nop
3570 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3571printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3572as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3573See \`config.log' for more details" "$LINENO" 5; }
3574fi
3575rm -f conftest conftest$ac_cv_exeext
3576{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3577printf "%s\n" "$ac_cv_exeext" >&6; }
3578
3579rm -f conftest.$ac_ext
3580EXEEXT=$ac_cv_exeext
3581ac_exeext=$EXEEXT
3582cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3583/* end confdefs.h. */
3584#include <stdio.h>
3585int
3586main (void)
3587{
3588FILE *f = fopen ("conftest.out", "w");
3589 return ferror (f) || fclose (f) != 0;
3590
3591 ;
3592 return 0;
3593}
3594_ACEOF
3595ac_clean_files="$ac_clean_files conftest.out"
3596# Check that the compiler produces executables we can run. If not, either
3597# the compiler is broken, or we cross compile.
3598{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3599printf %s "checking whether we are cross compiling... " >&6; }
3600if test "$cross_compiling" != yes; then
3601 { { ac_try="$ac_link"
3602case "(($ac_try" in
3603 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3604 *) ac_try_echo=$ac_try;;
3605esac
3606eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3607printf "%s\n" "$ac_try_echo"; } >&5
3608 (eval "$ac_link") 2>&5
3609 ac_status=$?
3610 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3611 test $ac_status = 0; }
3612 if { ac_try='./conftest$ac_cv_exeext'
3613 { { case "(($ac_try" in
3614 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3615 *) ac_try_echo=$ac_try;;
3616esac
3617eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3618printf "%s\n" "$ac_try_echo"; } >&5
3619 (eval "$ac_try") 2>&5
3620 ac_status=$?
3621 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3622 test $ac_status = 0; }; }; then
3623 cross_compiling=no
3624 else
3625 if test "$cross_compiling" = maybe; then
3626 cross_compiling=yes
3627 else
3628 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3629printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3630as_fn_error 77 "cannot run C compiled programs.
3631If you meant to cross compile, use \`--host'.
3632See \`config.log' for more details" "$LINENO" 5; }
3633 fi
3634 fi
3635fi
3636{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3637printf "%s\n" "$cross_compiling" >&6; }
3638
3639rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3640ac_clean_files=$ac_clean_files_save
3641{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3642printf %s "checking for suffix of object files... " >&6; }
3643if test ${ac_cv_objext+y}
3644then :
3645 printf %s "(cached) " >&6
3646else $as_nop
3647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3648/* end confdefs.h. */
3649
3650int
3651main (void)
3652{
3653
3654 ;
3655 return 0;
3656}
3657_ACEOF
3658rm -f conftest.o conftest.obj
3659if { { ac_try="$ac_compile"
3660case "(($ac_try" in
3661 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3662 *) ac_try_echo=$ac_try;;
3663esac
3664eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3665printf "%s\n" "$ac_try_echo"; } >&5
3666 (eval "$ac_compile") 2>&5
3667 ac_status=$?
3668 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3669 test $ac_status = 0; }
3670then :
3671 for ac_file in conftest.o conftest.obj conftest.*; do
3672 test -f "$ac_file" || continue;
3673 case $ac_file in
3674 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3675 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3676 break;;
3677 esac
3678done
3679else $as_nop
3680 printf "%s\n" "$as_me: failed program was:" >&5
3681sed 's/^/| /' conftest.$ac_ext >&5
3682
3683{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3684printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3685as_fn_error $? "cannot compute suffix of object files: cannot compile
3686See \`config.log' for more details" "$LINENO" 5; }
3687fi
3688rm -f conftest.$ac_cv_objext conftest.$ac_ext
3689fi
3690{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3691printf "%s\n" "$ac_cv_objext" >&6; }
3692OBJEXT=$ac_cv_objext
3693ac_objext=$OBJEXT
3694{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
3695printf %s "checking whether the compiler supports GNU C... " >&6; }
3696if test ${ac_cv_c_compiler_gnu+y}
3697then :
3698 printf %s "(cached) " >&6
3699else $as_nop
3700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3701/* end confdefs.h. */
3702
3703int
3704main (void)
3705{
3706#ifndef __GNUC__
3707 choke me
3708#endif
3709
3710 ;
3711 return 0;
3712}
3713_ACEOF
3714if ac_fn_c_try_compile "$LINENO"
3715then :
3716 ac_compiler_gnu=yes
3717else $as_nop
3718 ac_compiler_gnu=no
3719fi
3720rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3721ac_cv_c_compiler_gnu=$ac_compiler_gnu
3722
3723fi
3724{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3725printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
3726ac_compiler_gnu=$ac_cv_c_compiler_gnu
3727
3728if test $ac_compiler_gnu = yes; then
3729 GCC=yes
3730else
3731 GCC=
3732fi
3733ac_test_CFLAGS=${CFLAGS+y}
3734ac_save_CFLAGS=$CFLAGS
3735{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3736printf %s "checking whether $CC accepts -g... " >&6; }
3737if test ${ac_cv_prog_cc_g+y}
3738then :
3739 printf %s "(cached) " >&6
3740else $as_nop
3741 ac_save_c_werror_flag=$ac_c_werror_flag
3742 ac_c_werror_flag=yes
3743 ac_cv_prog_cc_g=no
3744 CFLAGS="-g"
3745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3746/* end confdefs.h. */
3747
3748int
3749main (void)
3750{
3751
3752 ;
3753 return 0;
3754}
3755_ACEOF
3756if ac_fn_c_try_compile "$LINENO"
3757then :
3758 ac_cv_prog_cc_g=yes
3759else $as_nop
3760 CFLAGS=""
3761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3762/* end confdefs.h. */
3763
3764int
3765main (void)
3766{
3767
3768 ;
3769 return 0;
3770}
3771_ACEOF
3772if ac_fn_c_try_compile "$LINENO"
3773then :
3774
3775else $as_nop
3776 ac_c_werror_flag=$ac_save_c_werror_flag
3777 CFLAGS="-g"
3778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3779/* end confdefs.h. */
3780
3781int
3782main (void)
3783{
3784
3785 ;
3786 return 0;
3787}
3788_ACEOF
3789if ac_fn_c_try_compile "$LINENO"
3790then :
3791 ac_cv_prog_cc_g=yes
3792fi
3793rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3794fi
3795rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3796fi
3797rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3798 ac_c_werror_flag=$ac_save_c_werror_flag
3799fi
3800{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3801printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
3802if test $ac_test_CFLAGS; then
3803 CFLAGS=$ac_save_CFLAGS
3804elif test $ac_cv_prog_cc_g = yes; then
3805 if test "$GCC" = yes; then
3806 CFLAGS="-g -O2"
3807 else
3808 CFLAGS="-g"
3809 fi
3810else
3811 if test "$GCC" = yes; then
3812 CFLAGS="-O2"
3813 else
3814 CFLAGS=
3815 fi
3816fi
3817ac_prog_cc_stdc=no
3818if test x$ac_prog_cc_stdc = xno
3819then :
3820 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
3821printf %s "checking for $CC option to enable C11 features... " >&6; }
3822if test ${ac_cv_prog_cc_c11+y}
3823then :
3824 printf %s "(cached) " >&6
3825else $as_nop
3826 ac_cv_prog_cc_c11=no
3827ac_save_CC=$CC
3828cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3829/* end confdefs.h. */
3830$ac_c_conftest_c11_program
3831_ACEOF
3832for ac_arg in '' -std=gnu11
Bram Moolenaar2e324952018-04-14 14:37:07 +02003833do
3834 CC="$ac_save_CC $ac_arg"
Illia Bobyra96d5442023-08-30 16:30:15 +02003835 if ac_fn_c_try_compile "$LINENO"
3836then :
3837 ac_cv_prog_cc_c11=$ac_arg
3838fi
3839rm -f core conftest.err conftest.$ac_objext conftest.beam
3840 test "x$ac_cv_prog_cc_c11" != "xno" && break
3841done
3842rm -f conftest.$ac_ext
3843CC=$ac_save_CC
3844fi
3845
3846if test "x$ac_cv_prog_cc_c11" = xno
3847then :
3848 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3849printf "%s\n" "unsupported" >&6; }
3850else $as_nop
3851 if test "x$ac_cv_prog_cc_c11" = x
3852then :
3853 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3854printf "%s\n" "none needed" >&6; }
3855else $as_nop
3856 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
3857printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
3858 CC="$CC $ac_cv_prog_cc_c11"
3859fi
3860 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
3861 ac_prog_cc_stdc=c11
3862fi
3863fi
3864if test x$ac_prog_cc_stdc = xno
3865then :
3866 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
3867printf %s "checking for $CC option to enable C99 features... " >&6; }
3868if test ${ac_cv_prog_cc_c99+y}
3869then :
3870 printf %s "(cached) " >&6
3871else $as_nop
3872 ac_cv_prog_cc_c99=no
3873ac_save_CC=$CC
3874cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3875/* end confdefs.h. */
3876$ac_c_conftest_c99_program
3877_ACEOF
3878for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
3879do
3880 CC="$ac_save_CC $ac_arg"
3881 if ac_fn_c_try_compile "$LINENO"
3882then :
Bram Moolenaar22640082018-04-19 20:39:41 +02003883 ac_cv_prog_cc_c99=$ac_arg
Bram Moolenaar2e324952018-04-14 14:37:07 +02003884fi
Illia Bobyra96d5442023-08-30 16:30:15 +02003885rm -f core conftest.err conftest.$ac_objext conftest.beam
Bram Moolenaar22640082018-04-19 20:39:41 +02003886 test "x$ac_cv_prog_cc_c99" != "xno" && break
Bram Moolenaar2e324952018-04-14 14:37:07 +02003887done
3888rm -f conftest.$ac_ext
3889CC=$ac_save_CC
Bram Moolenaar2e324952018-04-14 14:37:07 +02003890fi
3891
Illia Bobyra96d5442023-08-30 16:30:15 +02003892if test "x$ac_cv_prog_cc_c99" = xno
3893then :
3894 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3895printf "%s\n" "unsupported" >&6; }
3896else $as_nop
3897 if test "x$ac_cv_prog_cc_c99" = x
3898then :
3899 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3900printf "%s\n" "none needed" >&6; }
3901else $as_nop
3902 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
3903printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
3904 CC="$CC $ac_cv_prog_cc_c99"
3905fi
3906 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
3907 ac_prog_cc_stdc=c99
3908fi
3909fi
3910if test x$ac_prog_cc_stdc = xno
3911then :
3912 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
3913printf %s "checking for $CC option to enable C89 features... " >&6; }
3914if test ${ac_cv_prog_cc_c89+y}
3915then :
3916 printf %s "(cached) " >&6
3917else $as_nop
3918 ac_cv_prog_cc_c89=no
3919ac_save_CC=$CC
3920cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3921/* end confdefs.h. */
3922$ac_c_conftest_c89_program
3923_ACEOF
3924for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3925do
3926 CC="$ac_save_CC $ac_arg"
3927 if ac_fn_c_try_compile "$LINENO"
3928then :
3929 ac_cv_prog_cc_c89=$ac_arg
3930fi
3931rm -f core conftest.err conftest.$ac_objext conftest.beam
3932 test "x$ac_cv_prog_cc_c89" != "xno" && break
3933done
3934rm -f conftest.$ac_ext
3935CC=$ac_save_CC
3936fi
3937
3938if test "x$ac_cv_prog_cc_c89" = xno
3939then :
3940 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3941printf "%s\n" "unsupported" >&6; }
3942else $as_nop
3943 if test "x$ac_cv_prog_cc_c89" = x
3944then :
3945 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3946printf "%s\n" "none needed" >&6; }
3947else $as_nop
3948 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3949printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
3950 CC="$CC $ac_cv_prog_cc_c89"
3951fi
3952 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
3953 ac_prog_cc_stdc=c89
3954fi
3955fi
3956
3957ac_ext=c
3958ac_cpp='$CPP $CPPFLAGS'
3959ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3960ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3961ac_compiler_gnu=$ac_cv_c_compiler_gnu
Bram Moolenaarc0394412017-04-20 20:20:23 +02003962 ac_ext=c
Bram Moolenaar495de9c2005-01-25 22:03:25 +00003963ac_cpp='$CPP $CPPFLAGS'
3964ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3965ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3966ac_compiler_gnu=$ac_cv_c_compiler_gnu
Illia Bobyra96d5442023-08-30 16:30:15 +02003967{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3968printf %s "checking how to run the C preprocessor... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00003969# On Suns, sometimes $CPP names a directory.
3970if test -n "$CPP" && test -d "$CPP"; then
3971 CPP=
3972fi
3973if test -z "$CPP"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02003974 if test ${ac_cv_prog_CPP+y}
3975then :
3976 printf %s "(cached) " >&6
3977else $as_nop
3978 # Double quotes because $CC needs to be expanded
3979 for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp
Bram Moolenaar495de9c2005-01-25 22:03:25 +00003980 do
3981 ac_preproc_ok=false
3982for ac_c_preproc_warn_flag in '' yes
3983do
3984 # Use a header file that comes with gcc, so configuring glibc
3985 # with a fresh cross-compiler works.
Bram Moolenaar071d4272004-06-13 20:20:40 +00003986 # On the NeXT, cc -E runs the code through the compiler's parser,
Bram Moolenaar495de9c2005-01-25 22:03:25 +00003987 # not just through cpp. "Syntax error" is here to catch this case.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02003988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00003989/* end confdefs.h. */
Illia Bobyra96d5442023-08-30 16:30:15 +02003990#include <limits.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00003991 Syntax error
3992_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02003993if ac_fn_c_try_cpp "$LINENO"
3994then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00003995
Illia Bobyra96d5442023-08-30 16:30:15 +02003996else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00003997 # Broken: fails on valid input.
3998continue
3999fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01004000rm -f conftest.err conftest.i conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004001
Bram Moolenaar446cb832008-06-24 21:56:24 +00004002 # OK, works on sane cases. Now check whether nonexistent headers
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004003 # can be detected and how.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004005/* end confdefs.h. */
4006#include <ac_nonexistent.h>
4007_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004008if ac_fn_c_try_cpp "$LINENO"
4009then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004010 # Broken: success on invalid input.
4011continue
Illia Bobyra96d5442023-08-30 16:30:15 +02004012else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004013 # Passes both tests.
4014ac_preproc_ok=:
4015break
4016fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01004017rm -f conftest.err conftest.i conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004018
4019done
4020# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Bram Moolenaar7db77842014-03-27 17:40:59 +01004021rm -f conftest.i conftest.err conftest.$ac_ext
Illia Bobyra96d5442023-08-30 16:30:15 +02004022if $ac_preproc_ok
4023then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004024 break
4025fi
4026
4027 done
4028 ac_cv_prog_CPP=$CPP
4029
4030fi
4031 CPP=$ac_cv_prog_CPP
4032else
4033 ac_cv_prog_CPP=$CPP
4034fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004035{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4036printf "%s\n" "$CPP" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004037ac_preproc_ok=false
4038for ac_c_preproc_warn_flag in '' yes
Bram Moolenaar071d4272004-06-13 20:20:40 +00004039do
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004040 # Use a header file that comes with gcc, so configuring glibc
4041 # with a fresh cross-compiler works.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004042 # On the NeXT, cc -E runs the code through the compiler's parser,
4043 # not just through cpp. "Syntax error" is here to catch this case.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004045/* end confdefs.h. */
Illia Bobyra96d5442023-08-30 16:30:15 +02004046#include <limits.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004047 Syntax error
4048_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004049if ac_fn_c_try_cpp "$LINENO"
4050then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004051
Illia Bobyra96d5442023-08-30 16:30:15 +02004052else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004053 # Broken: fails on valid input.
4054continue
4055fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01004056rm -f conftest.err conftest.i conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004057
Bram Moolenaar446cb832008-06-24 21:56:24 +00004058 # OK, works on sane cases. Now check whether nonexistent headers
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004059 # can be detected and how.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004061/* end confdefs.h. */
4062#include <ac_nonexistent.h>
4063_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004064if ac_fn_c_try_cpp "$LINENO"
4065then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004066 # Broken: success on invalid input.
4067continue
Illia Bobyra96d5442023-08-30 16:30:15 +02004068else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004069 # Passes both tests.
4070ac_preproc_ok=:
4071break
4072fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01004073rm -f conftest.err conftest.i conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004074
4075done
4076# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Bram Moolenaar7db77842014-03-27 17:40:59 +01004077rm -f conftest.i conftest.err conftest.$ac_ext
Illia Bobyra96d5442023-08-30 16:30:15 +02004078if $ac_preproc_ok
4079then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004080
Illia Bobyra96d5442023-08-30 16:30:15 +02004081else $as_nop
4082 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4083printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +01004084as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4085See \`config.log' for more details" "$LINENO" 5; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004086fi
4087
4088ac_ext=c
4089ac_cpp='$CPP $CPPFLAGS'
4090ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4091ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4092ac_compiler_gnu=$ac_cv_c_compiler_gnu
Illia Bobyra96d5442023-08-30 16:30:15 +02004093 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4094printf %s "checking for grep that handles long lines and -e... " >&6; }
4095if test ${ac_cv_path_GREP+y}
4096then :
4097 printf %s "(cached) " >&6
4098else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +00004099 if test -z "$GREP"; then
4100 ac_path_GREP_found=false
4101 # Loop through the user's path and test for each of PROGNAME-LIST
4102 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4103for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4104do
4105 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02004106 case $as_dir in #(((
4107 '') as_dir=./ ;;
4108 */) ;;
4109 *) as_dir=$as_dir/ ;;
4110 esac
4111 for ac_prog in grep ggrep
4112 do
Bram Moolenaar446cb832008-06-24 21:56:24 +00004113 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02004114 ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
Bram Moolenaar7db77842014-03-27 17:40:59 +01004115 as_fn_executable_p "$ac_path_GREP" || continue
Bram Moolenaar446cb832008-06-24 21:56:24 +00004116# Check for GNU ac_path_GREP and select it if it is found.
4117 # Check for GNU $ac_path_GREP
4118case `"$ac_path_GREP" --version 2>&1` in
4119*GNU*)
4120 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4121*)
4122 ac_count=0
Illia Bobyra96d5442023-08-30 16:30:15 +02004123 printf %s 0123456789 >"conftest.in"
Bram Moolenaar446cb832008-06-24 21:56:24 +00004124 while :
4125 do
4126 cat "conftest.in" "conftest.in" >"conftest.tmp"
4127 mv "conftest.tmp" "conftest.in"
4128 cp "conftest.in" "conftest.nl"
Illia Bobyra96d5442023-08-30 16:30:15 +02004129 printf "%s\n" 'GREP' >> "conftest.nl"
Bram Moolenaar446cb832008-06-24 21:56:24 +00004130 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4131 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004132 as_fn_arith $ac_count + 1 && ac_count=$as_val
Bram Moolenaar446cb832008-06-24 21:56:24 +00004133 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4134 # Best one so far, save it but keep looking for a better one
4135 ac_cv_path_GREP="$ac_path_GREP"
4136 ac_path_GREP_max=$ac_count
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004137 fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00004138 # 10*(2^10) chars as input seems more than enough
4139 test $ac_count -gt 10 && break
4140 done
4141 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4142esac
4143
4144 $ac_path_GREP_found && break 3
4145 done
4146 done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004147 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00004148IFS=$as_save_IFS
4149 if test -z "$ac_cv_path_GREP"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01004150 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 +00004151 fi
4152else
4153 ac_cv_path_GREP=$GREP
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004154fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00004155
4156fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004157{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4158printf "%s\n" "$ac_cv_path_GREP" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004159 GREP="$ac_cv_path_GREP"
4160
4161
Illia Bobyra96d5442023-08-30 16:30:15 +02004162{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4163printf %s "checking for egrep... " >&6; }
4164if test ${ac_cv_path_EGREP+y}
4165then :
4166 printf %s "(cached) " >&6
4167else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +00004168 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4169 then ac_cv_path_EGREP="$GREP -E"
4170 else
4171 if test -z "$EGREP"; then
4172 ac_path_EGREP_found=false
4173 # Loop through the user's path and test for each of PROGNAME-LIST
4174 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4175for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4176do
4177 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02004178 case $as_dir in #(((
4179 '') as_dir=./ ;;
4180 */) ;;
4181 *) as_dir=$as_dir/ ;;
4182 esac
4183 for ac_prog in egrep
4184 do
Bram Moolenaar446cb832008-06-24 21:56:24 +00004185 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02004186 ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
Bram Moolenaar7db77842014-03-27 17:40:59 +01004187 as_fn_executable_p "$ac_path_EGREP" || continue
Bram Moolenaar446cb832008-06-24 21:56:24 +00004188# Check for GNU ac_path_EGREP and select it if it is found.
4189 # Check for GNU $ac_path_EGREP
4190case `"$ac_path_EGREP" --version 2>&1` in
4191*GNU*)
4192 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4193*)
4194 ac_count=0
Illia Bobyra96d5442023-08-30 16:30:15 +02004195 printf %s 0123456789 >"conftest.in"
Bram Moolenaar446cb832008-06-24 21:56:24 +00004196 while :
4197 do
4198 cat "conftest.in" "conftest.in" >"conftest.tmp"
4199 mv "conftest.tmp" "conftest.in"
4200 cp "conftest.in" "conftest.nl"
Illia Bobyra96d5442023-08-30 16:30:15 +02004201 printf "%s\n" 'EGREP' >> "conftest.nl"
Bram Moolenaar446cb832008-06-24 21:56:24 +00004202 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4203 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004204 as_fn_arith $ac_count + 1 && ac_count=$as_val
Bram Moolenaar446cb832008-06-24 21:56:24 +00004205 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4206 # Best one so far, save it but keep looking for a better one
4207 ac_cv_path_EGREP="$ac_path_EGREP"
4208 ac_path_EGREP_max=$ac_count
4209 fi
4210 # 10*(2^10) chars as input seems more than enough
4211 test $ac_count -gt 10 && break
4212 done
4213 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4214esac
4215
4216 $ac_path_EGREP_found && break 3
4217 done
4218 done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004219 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00004220IFS=$as_save_IFS
4221 if test -z "$ac_cv_path_EGREP"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01004222 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 +00004223 fi
4224else
4225 ac_cv_path_EGREP=$EGREP
4226fi
4227
4228 fi
4229fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004230{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4231printf "%s\n" "$ac_cv_path_EGREP" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004232 EGREP="$ac_cv_path_EGREP"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004233
Illia Bobyra96d5442023-08-30 16:30:15 +02004234 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
4235printf %s "checking for fgrep... " >&6; }
4236if test ${ac_cv_path_FGREP+y}
4237then :
4238 printf %s "(cached) " >&6
4239else $as_nop
Bram Moolenaar2bcaec32014-03-27 18:51:11 +01004240 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
4241 then ac_cv_path_FGREP="$GREP -F"
4242 else
4243 if test -z "$FGREP"; then
4244 ac_path_FGREP_found=false
4245 # Loop through the user's path and test for each of PROGNAME-LIST
4246 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4247for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4248do
4249 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02004250 case $as_dir in #(((
4251 '') as_dir=./ ;;
4252 */) ;;
4253 *) as_dir=$as_dir/ ;;
4254 esac
4255 for ac_prog in fgrep
4256 do
Bram Moolenaar2bcaec32014-03-27 18:51:11 +01004257 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02004258 ac_path_FGREP="$as_dir$ac_prog$ac_exec_ext"
Bram Moolenaar2bcaec32014-03-27 18:51:11 +01004259 as_fn_executable_p "$ac_path_FGREP" || continue
4260# Check for GNU ac_path_FGREP and select it if it is found.
4261 # Check for GNU $ac_path_FGREP
4262case `"$ac_path_FGREP" --version 2>&1` in
4263*GNU*)
4264 ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
4265*)
4266 ac_count=0
Illia Bobyra96d5442023-08-30 16:30:15 +02004267 printf %s 0123456789 >"conftest.in"
Bram Moolenaar2bcaec32014-03-27 18:51:11 +01004268 while :
4269 do
4270 cat "conftest.in" "conftest.in" >"conftest.tmp"
4271 mv "conftest.tmp" "conftest.in"
4272 cp "conftest.in" "conftest.nl"
Illia Bobyra96d5442023-08-30 16:30:15 +02004273 printf "%s\n" 'FGREP' >> "conftest.nl"
Bram Moolenaar2bcaec32014-03-27 18:51:11 +01004274 "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
4275 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4276 as_fn_arith $ac_count + 1 && ac_count=$as_val
4277 if test $ac_count -gt ${ac_path_FGREP_max-0}; then
4278 # Best one so far, save it but keep looking for a better one
4279 ac_cv_path_FGREP="$ac_path_FGREP"
4280 ac_path_FGREP_max=$ac_count
4281 fi
4282 # 10*(2^10) chars as input seems more than enough
4283 test $ac_count -gt 10 && break
4284 done
4285 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4286esac
4287
4288 $ac_path_FGREP_found && break 3
4289 done
4290 done
4291 done
4292IFS=$as_save_IFS
4293 if test -z "$ac_cv_path_FGREP"; then
4294 as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4295 fi
4296else
4297 ac_cv_path_FGREP=$FGREP
4298fi
4299
4300 fi
4301fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004302{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
4303printf "%s\n" "$ac_cv_path_FGREP" >&6; }
Bram Moolenaar2bcaec32014-03-27 18:51:11 +01004304 FGREP="$ac_cv_path_FGREP"
4305
Bram Moolenaarc0394412017-04-20 20:20:23 +02004306 for ac_prog in gawk mawk nawk awk
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004307do
4308 # Extract the first word of "$ac_prog", so it can be a program name with args.
Bram Moolenaar071d4272004-06-13 20:20:40 +00004309set dummy $ac_prog; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02004310{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4311printf %s "checking for $ac_word... " >&6; }
4312if test ${ac_cv_prog_AWK+y}
4313then :
4314 printf %s "(cached) " >&6
4315else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00004316 if test -n "$AWK"; then
4317 ac_cv_prog_AWK="$AWK" # Let the user override the test.
4318else
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004319as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4320for as_dir in $PATH
4321do
4322 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02004323 case $as_dir in #(((
4324 '') as_dir=./ ;;
4325 */) ;;
4326 *) as_dir=$as_dir/ ;;
4327 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004328 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02004329 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004330 ac_cv_prog_AWK="$ac_prog"
Illia Bobyra96d5442023-08-30 16:30:15 +02004331 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004332 break 2
4333 fi
4334done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004335 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00004336IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004337
Bram Moolenaar071d4272004-06-13 20:20:40 +00004338fi
4339fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004340AWK=$ac_cv_prog_AWK
Bram Moolenaar071d4272004-06-13 20:20:40 +00004341if test -n "$AWK"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004342 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4343printf "%s\n" "$AWK" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00004344else
Illia Bobyra96d5442023-08-30 16:30:15 +02004345 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4346printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00004347fi
4348
Bram Moolenaar446cb832008-06-24 21:56:24 +00004349
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004350 test -n "$AWK" && break
Bram Moolenaar071d4272004-06-13 20:20:40 +00004351done
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004352
Bram Moolenaar071d4272004-06-13 20:20:40 +00004353# Extract the first word of "strip", so it can be a program name with args.
4354set dummy strip; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02004355{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4356printf %s "checking for $ac_word... " >&6; }
4357if test ${ac_cv_prog_STRIP+y}
4358then :
4359 printf %s "(cached) " >&6
4360else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00004361 if test -n "$STRIP"; then
4362 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4363else
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004364as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4365for as_dir in $PATH
4366do
4367 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02004368 case $as_dir in #(((
4369 '') as_dir=./ ;;
4370 */) ;;
4371 *) as_dir=$as_dir/ ;;
4372 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004373 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02004374 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004375 ac_cv_prog_STRIP="strip"
Illia Bobyra96d5442023-08-30 16:30:15 +02004376 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004377 break 2
4378 fi
4379done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004380 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00004381IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004382
Bram Moolenaar071d4272004-06-13 20:20:40 +00004383 test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4384fi
4385fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004386STRIP=$ac_cv_prog_STRIP
Bram Moolenaar071d4272004-06-13 20:20:40 +00004387if test -n "$STRIP"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004388 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4389printf "%s\n" "$STRIP" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00004390else
Illia Bobyra96d5442023-08-30 16:30:15 +02004391 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4392printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00004393fi
4394
4395
Bram Moolenaar071d4272004-06-13 20:20:40 +00004396
4397
Bram Moolenaar071d4272004-06-13 20:20:40 +00004398
Illia Bobyrf39842f2023-08-27 18:21:23 +02004399
Illia Bobyra96d5442023-08-30 16:30:15 +02004400{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
4401printf %s "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
4402if test ${ac_cv_header_sys_wait_h+y}
4403then :
4404 printf %s "(cached) " >&6
4405else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +00004407/* end confdefs.h. */
4408#include <sys/types.h>
4409#include <sys/wait.h>
4410#ifndef WEXITSTATUS
4411# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
4412#endif
4413#ifndef WIFEXITED
4414# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4415#endif
4416
4417int
Illia Bobyra96d5442023-08-30 16:30:15 +02004418main (void)
Bram Moolenaar446cb832008-06-24 21:56:24 +00004419{
4420 int s;
4421 wait (&s);
4422 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4423 ;
4424 return 0;
4425}
4426_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004427if ac_fn_c_try_compile "$LINENO"
4428then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00004429 ac_cv_header_sys_wait_h=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02004430else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004431 ac_cv_header_sys_wait_h=no
Bram Moolenaar446cb832008-06-24 21:56:24 +00004432fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004433rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +00004434fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004435{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
4436printf "%s\n" "$ac_cv_header_sys_wait_h" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004437if test $ac_cv_header_sys_wait_h = yes; then
4438
Illia Bobyra96d5442023-08-30 16:30:15 +02004439printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +00004440
4441fi
4442
4443
Bram Moolenaar22640082018-04-19 20:39:41 +02004444if test x"$ac_cv_prog_cc_c99" != xno; then
4445
4446
Illia Bobyra96d5442023-08-30 16:30:15 +02004447 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
4448printf %s "checking for unsigned long long int... " >&6; }
4449if test ${ac_cv_type_unsigned_long_long_int+y}
4450then :
4451 printf %s "(cached) " >&6
4452else $as_nop
Bram Moolenaar22640082018-04-19 20:39:41 +02004453 ac_cv_type_unsigned_long_long_int=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02004454 case $ac_prog_cc_stdc in
4455 no | c89) ;;
4456 *)
4457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar561f8a52018-04-17 22:02:45 +02004458/* end confdefs.h. */
Bram Moolenaar22640082018-04-19 20:39:41 +02004459
4460 /* For now, do not test the preprocessor; as of 2007 there are too many
4461 implementations with broken preprocessors. Perhaps this can
4462 be revisited in 2012. In the meantime, code should not expect
4463 #if to work with literals wider than 32 bits. */
4464 /* Test literals. */
4465 long long int ll = 9223372036854775807ll;
4466 long long int nll = -9223372036854775807LL;
4467 unsigned long long int ull = 18446744073709551615ULL;
4468 /* Test constant expressions. */
4469 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
4470 ? 1 : -1)];
4471 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
4472 ? 1 : -1)];
4473 int i = 63;
4474int
Illia Bobyra96d5442023-08-30 16:30:15 +02004475main (void)
Bram Moolenaar22640082018-04-19 20:39:41 +02004476{
4477/* Test availability of runtime routines for shift and division. */
4478 long long int llmax = 9223372036854775807ll;
4479 unsigned long long int ullmax = 18446744073709551615ull;
4480 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
4481 | (llmax / ll) | (llmax % ll)
4482 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
4483 | (ullmax / ull) | (ullmax % ull));
4484 ;
4485 return 0;
4486}
4487
4488_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004489if ac_fn_c_try_link "$LINENO"
4490then :
Bram Moolenaar22640082018-04-19 20:39:41 +02004491
Illia Bobyra96d5442023-08-30 16:30:15 +02004492else $as_nop
Bram Moolenaar22640082018-04-19 20:39:41 +02004493 ac_cv_type_unsigned_long_long_int=no
4494fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004495rm -f core conftest.err conftest.$ac_objext conftest.beam \
4496 conftest$ac_exeext conftest.$ac_ext;;
4497 esac
Bram Moolenaar22640082018-04-19 20:39:41 +02004498fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004499{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
4500printf "%s\n" "$ac_cv_type_unsigned_long_long_int" >&6; }
Bram Moolenaar22640082018-04-19 20:39:41 +02004501 if test $ac_cv_type_unsigned_long_long_int = yes; then
4502
Illia Bobyra96d5442023-08-30 16:30:15 +02004503printf "%s\n" "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
Bram Moolenaar22640082018-04-19 20:39:41 +02004504
4505 fi
4506
4507
4508
Illia Bobyra96d5442023-08-30 16:30:15 +02004509 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
4510printf %s "checking for long long int... " >&6; }
4511if test ${ac_cv_type_long_long_int+y}
4512then :
4513 printf %s "(cached) " >&6
4514else $as_nop
Bram Moolenaar22640082018-04-19 20:39:41 +02004515 ac_cv_type_long_long_int=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02004516 case $ac_prog_cc_stdc in
4517 no | c89) ;;
4518 *)
4519 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
4520 if test $ac_cv_type_long_long_int = yes; then
4521 if test "$cross_compiling" = yes
4522then :
Bram Moolenaar22640082018-04-19 20:39:41 +02004523 :
Illia Bobyra96d5442023-08-30 16:30:15 +02004524else $as_nop
Bram Moolenaar22640082018-04-19 20:39:41 +02004525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4526/* end confdefs.h. */
4527#include <limits.h>
Illia Bobyra96d5442023-08-30 16:30:15 +02004528 #ifndef LLONG_MAX
4529 # define HALF \
4530 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
4531 # define LLONG_MAX (HALF - 1 + HALF)
4532 #endif
Bram Moolenaar22640082018-04-19 20:39:41 +02004533int
Illia Bobyra96d5442023-08-30 16:30:15 +02004534main (void)
Bram Moolenaar22640082018-04-19 20:39:41 +02004535{
4536long long int n = 1;
Illia Bobyra96d5442023-08-30 16:30:15 +02004537 int i;
4538 for (i = 0; ; i++)
4539 {
4540 long long int m = n << i;
4541 if (m >> i != n)
4542 return 1;
4543 if (LLONG_MAX / 2 < m)
4544 break;
4545 }
4546 return 0;
Bram Moolenaar22640082018-04-19 20:39:41 +02004547 ;
4548 return 0;
4549}
4550_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004551if ac_fn_c_try_run "$LINENO"
4552then :
Bram Moolenaar22640082018-04-19 20:39:41 +02004553
Illia Bobyra96d5442023-08-30 16:30:15 +02004554else $as_nop
Bram Moolenaar22640082018-04-19 20:39:41 +02004555 ac_cv_type_long_long_int=no
4556fi
4557rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4558 conftest.$ac_objext conftest.beam conftest.$ac_ext
4559fi
4560
Illia Bobyra96d5442023-08-30 16:30:15 +02004561 fi;;
4562 esac
Bram Moolenaar22640082018-04-19 20:39:41 +02004563fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004564{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
4565printf "%s\n" "$ac_cv_type_long_long_int" >&6; }
Bram Moolenaar22640082018-04-19 20:39:41 +02004566 if test $ac_cv_type_long_long_int = yes; then
4567
Illia Bobyra96d5442023-08-30 16:30:15 +02004568printf "%s\n" "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
Bram Moolenaar22640082018-04-19 20:39:41 +02004569
4570 fi
4571
4572 if test "$ac_cv_type_long_long_int" = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004573 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4574printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar22640082018-04-19 20:39:41 +02004575as_fn_error $? "Compiler does not support long long int
4576See \`config.log' for more details" "$LINENO" 5; }
4577 fi
4578
Illia Bobyra96d5442023-08-30 16:30:15 +02004579 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the compiler supports trailing commas" >&5
4580printf %s "checking if the compiler supports trailing commas... " >&6; }
Bram Moolenaar22640082018-04-19 20:39:41 +02004581 trailing_commas=no
4582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4583/* end confdefs.h. */
4584
Bram Moolenaar561f8a52018-04-17 22:02:45 +02004585int
Illia Bobyra96d5442023-08-30 16:30:15 +02004586main (void)
Bram Moolenaar561f8a52018-04-17 22:02:45 +02004587{
4588
Bram Moolenaar22640082018-04-19 20:39:41 +02004589 enum {
4590 one,
4591 };
Bram Moolenaar561f8a52018-04-17 22:02:45 +02004592 ;
4593 return 0;
4594}
4595_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004596if ac_fn_c_try_compile "$LINENO"
4597then :
4598 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4599printf "%s\n" "yes" >&6; }; trailing_commas=yes
4600else $as_nop
4601 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4602printf "%s\n" "no" >&6; }
Bram Moolenaar561f8a52018-04-17 22:02:45 +02004603fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004604rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar22640082018-04-19 20:39:41 +02004605 if test "$trailing_commas" = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004606 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4607printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar22640082018-04-19 20:39:41 +02004608as_fn_error $? "Compiler does not support trailing comma in enum
4609See \`config.log' for more details" "$LINENO" 5; }
4610 fi
4611
Illia Bobyra96d5442023-08-30 16:30:15 +02004612 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the compiler supports C++ comments" >&5
4613printf %s "checking if the compiler supports C++ comments... " >&6; }
Bram Moolenaar22640082018-04-19 20:39:41 +02004614 slash_comments=no
4615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4616/* end confdefs.h. */
4617
4618int
Illia Bobyra96d5442023-08-30 16:30:15 +02004619main (void)
Bram Moolenaar22640082018-04-19 20:39:41 +02004620{
4621// C++ comments?
4622 ;
4623 return 0;
4624}
4625_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004626if ac_fn_c_try_compile "$LINENO"
4627then :
4628 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4629printf "%s\n" "yes" >&6; }; slash_comments=yes
4630else $as_nop
4631 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4632printf "%s\n" "no" >&6; }
Bram Moolenaar22640082018-04-19 20:39:41 +02004633fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004634rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar22640082018-04-19 20:39:41 +02004635 if test "$slash_comments" = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004636 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4637printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar22640082018-04-19 20:39:41 +02004638as_fn_error $? "Compiler does not support C++ comments
4639See \`config.log' for more details" "$LINENO" 5; }
4640 fi
4641fi
Bram Moolenaar561f8a52018-04-17 22:02:45 +02004642
Bram Moolenaar8f1dde52020-06-05 23:16:29 +02004643if test -n "$SOURCE_DATE_EPOCH"; then
4644 DATE_FMT="%b %d %Y %H:%M:%S"
4645 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 +02004646 printf "%s\n" "#define BUILD_DATE \"$BUILD_DATE\"" >>confdefs.h
Bram Moolenaar8f1dde52020-06-05 23:16:29 +02004647
4648 BUILD_DATE_MSG=-"echo -e '=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\nNOTE: build date/time is fixed: $BUILD_DATE\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-='"
4649
4650fi
4651
Bram Moolenaarf788a062011-12-14 20:51:25 +01004652
Illia Bobyra96d5442023-08-30 16:30:15 +02004653{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-fail-if-missing argument" >&5
4654printf %s "checking --enable-fail-if-missing argument... " >&6; }
Bram Moolenaarf788a062011-12-14 20:51:25 +01004655# Check whether --enable-fail_if_missing was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02004656if test ${enable_fail_if_missing+y}
4657then :
Bram Moolenaarf788a062011-12-14 20:51:25 +01004658 enableval=$enable_fail_if_missing; fail_if_missing="yes"
Illia Bobyra96d5442023-08-30 16:30:15 +02004659else $as_nop
Bram Moolenaarf788a062011-12-14 20:51:25 +01004660 fail_if_missing="no"
4661fi
4662
Illia Bobyra96d5442023-08-30 16:30:15 +02004663{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $fail_if_missing" >&5
4664printf "%s\n" "$fail_if_missing" >&6; }
Bram Moolenaarf788a062011-12-14 20:51:25 +01004665
Bram Moolenaard2a05492018-07-27 22:35:15 +02004666with_x_arg="$with_x"
4667
Bram Moolenaar446cb832008-06-24 21:56:24 +00004668if test -z "$CFLAGS"; then
4669 CFLAGS="-O"
Bram Moolenaar4d8479b2021-01-31 14:36:06 +01004670 test "$GCC" = yes && CFLAGS="-O2 -fno-strength-reduce -Wall -Wno-deprecated-declarations"
Bram Moolenaar446cb832008-06-24 21:56:24 +00004671fi
Rose00d07e72023-05-06 18:07:14 +01004672
Bram Moolenaar446cb832008-06-24 21:56:24 +00004673if test "$GCC" = yes; then
Bram Moolenaarc8836f72014-04-12 13:12:24 +02004674 gccversion=`$CC -dumpversion`
Bram Moolenaar446cb832008-06-24 21:56:24 +00004675 if test "x$gccversion" = "x"; then
Bram Moolenaarc8836f72014-04-12 13:12:24 +02004676 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 +00004677 fi
Rose00d07e72023-05-06 18:07:14 +01004678
4679 if test "$gccversion" = "3.0.1" -o "$gccversion" = "3.0.2" -o "$gccversion" = "4.0.1"; then
Bram Moolenaar446cb832008-06-24 21:56:24 +00004680 echo 'GCC [34].0.[12] has a bug in the optimizer, disabling "-O#"'
4681 CFLAGS=`echo "$CFLAGS" | sed 's/-O[23456789]/-O/'`
4682 else
4683 if test "$gccversion" = "3.1" -o "$gccversion" = "3.2" -o "$gccversion" = "3.2.1" && `echo "$CFLAGS" | grep -v fno-strength-reduce >/dev/null`; then
4684 echo 'GCC 3.1 and 3.2 have a bug in the optimizer, adding "-fno-strength-reduce"'
4685 CFLAGS="$CFLAGS -fno-strength-reduce"
4686 fi
4687 fi
4688fi
4689
Illia Bobyra96d5442023-08-30 16:30:15 +02004690{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clang version" >&5
4691printf %s "checking for clang version... " >&6; }
Bram Moolenaar5f69fee2017-03-09 11:58:40 +01004692CLANG_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 +02004693if test x"$CLANG_VERSION_STRING" != x"" ; then
4694 CLANG_MAJOR=`echo "$CLANG_VERSION_STRING" | sed -n -e 's/\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*/\1/p'`
4695 CLANG_MINOR=`echo "$CLANG_VERSION_STRING" | sed -n -e 's/[0-9][0-9]*\.\([0-9][0-9]*\)\.[0-9][0-9]*/\1/p'`
4696 CLANG_REVISION=`echo "$CLANG_VERSION_STRING" | sed -n -e 's/[0-9][0-9]*\.[0-9][0-9]*\.\([0-9][0-9]*\)/\1/p'`
4697 CLANG_VERSION=`expr $CLANG_MAJOR '*' 1000000 '+' $CLANG_MINOR '*' 1000 '+' $CLANG_REVISION`
Illia Bobyra96d5442023-08-30 16:30:15 +02004698 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CLANG_VERSION" >&5
4699printf "%s\n" "$CLANG_VERSION" >&6; }
4700 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if clang supports -fno-strength-reduce" >&5
4701printf %s "checking if clang supports -fno-strength-reduce... " >&6; }
Bram Moolenaarebd211c2021-01-30 19:33:36 +01004702 if test "$CLANG_MAJOR" -ge 10 -o "$CLANG_VERSION" -ge 500002075 ; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004703 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4704printf "%s\n" "no" >&6; }
Bram Moolenaar5f69fee2017-03-09 11:58:40 +01004705 CFLAGS=`echo "$CFLAGS" | sed -e 's/-fno-strength-reduce/ /'`
4706 else
Illia Bobyra96d5442023-08-30 16:30:15 +02004707 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4708printf "%s\n" "yes" >&6; }
Bram Moolenaar0c6ccfd2013-10-02 18:23:07 +02004709 fi
4710else
Illia Bobyra96d5442023-08-30 16:30:15 +02004711 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: N/A" >&5
4712printf "%s\n" "N/A" >&6; }
Bram Moolenaar0c6ccfd2013-10-02 18:23:07 +02004713fi
4714
Bram Moolenaar839e9542016-04-14 16:46:02 +02004715CROSS_COMPILING=
Bram Moolenaar446cb832008-06-24 21:56:24 +00004716if test "$cross_compiling" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004717 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot compile a simple program; if not cross compiling check CC and CFLAGS" >&5
4718printf "%s\n" "cannot compile a simple program; if not cross compiling check CC and CFLAGS" >&6; }
Bram Moolenaar839e9542016-04-14 16:46:02 +02004719 CROSS_COMPILING=1
Bram Moolenaar446cb832008-06-24 21:56:24 +00004720fi
4721
Bram Moolenaar839e9542016-04-14 16:46:02 +02004722
Bram Moolenaar446cb832008-06-24 21:56:24 +00004723test "$GCC" = yes && CPP_MM=M;
4724
4725if test -f ./toolcheck; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004726 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for buggy tools" >&5
4727printf %s "checking for buggy tools... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004728 sh ./toolcheck 1>&6
4729fi
4730
4731OS_EXTRA_SRC=""; OS_EXTRA_OBJ=""
4732
Illia Bobyra96d5442023-08-30 16:30:15 +02004733{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking uname" >&5
4734printf %s "checking uname... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004735if test "x$vim_cv_uname_output" = "x" ; then
4736 vim_cv_uname_output=`(uname) 2>/dev/null`
Illia Bobyra96d5442023-08-30 16:30:15 +02004737 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_uname_output" >&5
4738printf "%s\n" "$vim_cv_uname_output" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004739else
Illia Bobyra96d5442023-08-30 16:30:15 +02004740 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_uname_output (cached)" >&5
4741printf "%s\n" "$vim_cv_uname_output (cached)" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004742fi
4743
Illia Bobyra96d5442023-08-30 16:30:15 +02004744{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking uname -r" >&5
4745printf %s "checking uname -r... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004746if test "x$vim_cv_uname_r_output" = "x" ; then
4747 vim_cv_uname_r_output=`(uname -r) 2>/dev/null`
Illia Bobyra96d5442023-08-30 16:30:15 +02004748 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_uname_r_output" >&5
4749printf "%s\n" "$vim_cv_uname_r_output" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004750else
Illia Bobyra96d5442023-08-30 16:30:15 +02004751 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_uname_r_output (cached)" >&5
4752printf "%s\n" "$vim_cv_uname_r_output (cached)" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004753fi
4754
Illia Bobyra96d5442023-08-30 16:30:15 +02004755{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking uname -m" >&5
4756printf %s "checking uname -m... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004757if test "x$vim_cv_uname_m_output" = "x" ; then
4758 vim_cv_uname_m_output=`(uname -m) 2>/dev/null`
Illia Bobyra96d5442023-08-30 16:30:15 +02004759 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_uname_m_output" >&5
4760printf "%s\n" "$vim_cv_uname_m_output" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004761else
Illia Bobyra96d5442023-08-30 16:30:15 +02004762 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_uname_m_output (cached)" >&5
4763printf "%s\n" "$vim_cv_uname_m_output (cached)" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004764fi
4765
Illia Bobyra96d5442023-08-30 16:30:15 +02004766{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Haiku" >&5
4767printf %s "checking for Haiku... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004768case $vim_cv_uname_output in
Illia Bobyra96d5442023-08-30 16:30:15 +02004769 Haiku) HAIKU=yes; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4770printf "%s\n" "yes" >&6; };;
4771 *) HAIKU=no; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4772printf "%s\n" "no" >&6; };;
Bram Moolenaarb3f74062020-02-26 16:16:53 +01004773esac
4774
Illia Bobyra96d5442023-08-30 16:30:15 +02004775{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for QNX" >&5
4776printf %s "checking for QNX... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004777case $vim_cv_uname_output in
Bram Moolenaar446cb832008-06-24 21:56:24 +00004778 QNX) OS_EXTRA_SRC=os_qnx.c; OS_EXTRA_OBJ=objects/os_qnx.o
4779 test -z "$with_x" && with_x=no
Illia Bobyra96d5442023-08-30 16:30:15 +02004780 QNX=yes; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4781printf "%s\n" "yes" >&6; };;
4782 *) QNX=no; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4783printf "%s\n" "no" >&6; };;
Bram Moolenaar446cb832008-06-24 21:56:24 +00004784esac
4785
Illia Bobyra96d5442023-08-30 16:30:15 +02004786{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Darwin (Mac OS X)" >&5
4787printf %s "checking for Darwin (Mac OS X)... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004788if test "$vim_cv_uname_output" = Darwin; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004789 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4790printf "%s\n" "yes" >&6; }
Bram Moolenaard0573012017-10-28 21:11:06 +02004791 MACOS_X=yes
Bram Moolenaar52ecaaa2018-05-12 21:38:13 +02004792 CPPFLAGS="$CPPFLAGS -DMACOS_X"
Bram Moolenaar446cb832008-06-24 21:56:24 +00004793
Illia Bobyra96d5442023-08-30 16:30:15 +02004794 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-darwin argument" >&5
4795printf %s "checking --disable-darwin argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004796 # Check whether --enable-darwin was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02004797if test ${enable_darwin+y}
4798then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00004799 enableval=$enable_darwin;
Illia Bobyra96d5442023-08-30 16:30:15 +02004800else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +00004801 enable_darwin="yes"
4802fi
4803
4804 if test "$enable_darwin" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004805 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4806printf "%s\n" "no" >&6; }
4807 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if Darwin files are there" >&5
4808printf %s "checking if Darwin files are there... " >&6; }
Bram Moolenaar164fca32010-07-14 13:58:07 +02004809 if test -f os_macosx.m; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004810 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4811printf "%s\n" "yes" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004812 else
Illia Bobyra96d5442023-08-30 16:30:15 +02004813 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, Darwin support disabled" >&5
4814printf "%s\n" "no, Darwin support disabled" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004815 enable_darwin=no
4816 fi
4817 else
Illia Bobyra96d5442023-08-30 16:30:15 +02004818 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, Darwin support excluded" >&5
4819printf "%s\n" "yes, Darwin support excluded" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004820 fi
4821
Illia Bobyra96d5442023-08-30 16:30:15 +02004822 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-mac-arch argument" >&5
4823printf %s "checking --with-mac-arch argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004824
4825# Check whether --with-mac-arch was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02004826if test ${with_mac_arch+y}
4827then :
4828 withval=$with_mac_arch; MACARCH="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MACARCH" >&5
4829printf "%s\n" "$MACARCH" >&6; }
4830else $as_nop
4831 MACARCH="current"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: defaulting to $MACARCH" >&5
4832printf "%s\n" "defaulting to $MACARCH" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004833fi
4834
4835
Illia Bobyra96d5442023-08-30 16:30:15 +02004836 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-developer-dir argument" >&5
4837printf %s "checking --with-developer-dir argument... " >&6; }
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004838
4839# Check whether --with-developer-dir was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02004840if test ${with_developer_dir+y}
4841then :
4842 withval=$with_developer_dir; DEVELOPER_DIR="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DEVELOPER_DIR" >&5
4843printf "%s\n" "$DEVELOPER_DIR" >&6; }
4844else $as_nop
4845 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not present" >&5
4846printf "%s\n" "not present" >&6; }
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004847fi
4848
4849
4850 if test "x$DEVELOPER_DIR" = "x"; then
4851 # Extract the first word of "xcode-select", so it can be a program name with args.
4852set dummy xcode-select; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02004853{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4854printf %s "checking for $ac_word... " >&6; }
4855if test ${ac_cv_path_XCODE_SELECT+y}
4856then :
4857 printf %s "(cached) " >&6
4858else $as_nop
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004859 case $XCODE_SELECT in
4860 [\\/]* | ?:[\\/]*)
4861 ac_cv_path_XCODE_SELECT="$XCODE_SELECT" # Let the user override the test with a path.
4862 ;;
4863 *)
4864 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4865for as_dir in $PATH
4866do
4867 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02004868 case $as_dir in #(((
4869 '') as_dir=./ ;;
4870 */) ;;
4871 *) as_dir=$as_dir/ ;;
4872 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004873 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02004874 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4875 ac_cv_path_XCODE_SELECT="$as_dir$ac_word$ac_exec_ext"
4876 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004877 break 2
4878 fi
4879done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004880 done
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004881IFS=$as_save_IFS
4882
4883 ;;
4884esac
4885fi
4886XCODE_SELECT=$ac_cv_path_XCODE_SELECT
4887if test -n "$XCODE_SELECT"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004888 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XCODE_SELECT" >&5
4889printf "%s\n" "$XCODE_SELECT" >&6; }
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004890else
Illia Bobyra96d5442023-08-30 16:30:15 +02004891 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4892printf "%s\n" "no" >&6; }
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004893fi
4894
4895
4896 if test "x$XCODE_SELECT" != "x"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004897 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for developer dir using xcode-select" >&5
4898printf %s "checking for developer dir using xcode-select... " >&6; }
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004899 DEVELOPER_DIR=`$XCODE_SELECT -print-path`
Illia Bobyra96d5442023-08-30 16:30:15 +02004900 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DEVELOPER_DIR" >&5
4901printf "%s\n" "$DEVELOPER_DIR" >&6; }
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004902 else
4903 DEVELOPER_DIR=/Developer
4904 fi
4905 fi
4906
Bram Moolenaar446cb832008-06-24 21:56:24 +00004907 if test "x$MACARCH" = "xboth"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004908 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 10.4 universal SDK" >&5
4909printf %s "checking for 10.4 universal SDK... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004910 save_cppflags="$CPPFLAGS"
4911 save_cflags="$CFLAGS"
4912 save_ldflags="$LDFLAGS"
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004913 CFLAGS="$CFLAGS -isysroot $DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +00004915/* end confdefs.h. */
4916
4917int
Illia Bobyra96d5442023-08-30 16:30:15 +02004918main (void)
Bram Moolenaar446cb832008-06-24 21:56:24 +00004919{
4920
4921 ;
4922 return 0;
4923}
4924_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004925if ac_fn_c_try_link "$LINENO"
4926then :
4927 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found" >&5
4928printf "%s\n" "found" >&6; }
4929else $as_nop
4930 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4931printf "%s\n" "not found" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004932 CFLAGS="$save_cflags"
Illia Bobyra96d5442023-08-30 16:30:15 +02004933 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if Intel architecture is supported" >&5
4934printf %s "checking if Intel architecture is supported... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004935 CPPFLAGS="$CPPFLAGS -arch i386"
4936 LDFLAGS="$save_ldflags -arch i386"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +00004938/* end confdefs.h. */
4939
4940int
Illia Bobyra96d5442023-08-30 16:30:15 +02004941main (void)
Bram Moolenaar446cb832008-06-24 21:56:24 +00004942{
4943
4944 ;
4945 return 0;
4946}
4947_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004948if ac_fn_c_try_link "$LINENO"
4949then :
4950 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4951printf "%s\n" "yes" >&6; }; MACARCH="intel"
4952else $as_nop
4953 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4954printf "%s\n" "no" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004955 MACARCH="ppc"
4956 CPPFLAGS="$save_cppflags -arch ppc"
4957 LDFLAGS="$save_ldflags -arch ppc"
4958fi
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 +00004961fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004962rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004963 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +00004964 elif test "x$MACARCH" = "xintel"; then
4965 CPPFLAGS="$CPPFLAGS -arch intel"
4966 LDFLAGS="$LDFLAGS -arch intel"
4967 elif test "x$MACARCH" = "xppc"; then
4968 CPPFLAGS="$CPPFLAGS -arch ppc"
4969 LDFLAGS="$LDFLAGS -arch ppc"
4970 fi
4971
4972 if test "$enable_darwin" = "yes"; then
Bram Moolenaard0573012017-10-28 21:11:06 +02004973 MACOS_X_DARWIN=yes
Bram Moolenaar164fca32010-07-14 13:58:07 +02004974 OS_EXTRA_SRC="os_macosx.m os_mac_conv.c";
Bram Moolenaar446cb832008-06-24 21:56:24 +00004975 OS_EXTRA_OBJ="objects/os_macosx.o objects/os_mac_conv.o"
Illia Bobyra96d5442023-08-30 16:30:15 +02004976 printf "%s\n" "#define HAVE_TIMER_CREATE 1" >>confdefs.h
Bram Moolenaare5303952022-06-19 17:05:47 +01004977
Bram Moolenaard0573012017-10-28 21:11:06 +02004978 CPPFLAGS="$CPPFLAGS -DMACOS_X_DARWIN"
Bram Moolenaar040f9752020-08-11 23:08:48 +02004979
Bram Moolenaar0b40d082022-03-08 13:32:37 +00004980 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 +02004981 with_x=no
4982 fi
Bram Moolenaar097148e2020-08-11 21:58:20 +02004983 fi
Bram Moolenaar097148e2020-08-11 21:58:20 +02004984else
Illia Bobyra96d5442023-08-30 16:30:15 +02004985 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4986printf "%s\n" "no" >&6; }
Bram Moolenaar097148e2020-08-11 21:58:20 +02004987fi
4988
Illia Bobyra96d5442023-08-30 16:30:15 +02004989ac_header= ac_cache=
4990for ac_item in $ac_header_c_list
4991do
4992 if test $ac_cache; then
4993 ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
4994 if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
4995 printf "%s\n" "#define $ac_item 1" >> confdefs.h
4996 fi
4997 ac_header= ac_cache=
4998 elif test $ac_header; then
4999 ac_cache=$ac_item
5000 else
5001 ac_header=$ac_item
5002 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005003done
5004
5005
Illia Bobyra96d5442023-08-30 16:30:15 +02005006
5007
5008
5009
5010
5011
5012if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
5013then :
5014
5015printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
Bram Moolenaar18e54692013-11-03 20:26:31 +01005016
Bram Moolenaar39766a72013-11-03 00:41:00 +01005017fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005018ac_fn_c_check_header_compile "$LINENO" "AvailabilityMacros.h" "ac_cv_header_AvailabilityMacros_h" "$ac_includes_default"
5019if test "x$ac_cv_header_AvailabilityMacros_h" = xyes
5020then :
5021 printf "%s\n" "#define HAVE_AVAILABILITYMACROS_H 1" >>confdefs.h
Bram Moolenaar39766a72013-11-03 00:41:00 +01005022
Illia Bobyra96d5442023-08-30 16:30:15 +02005023fi
Bram Moolenaar39766a72013-11-03 00:41:00 +01005024
Evan Miller25448072022-12-30 10:42:23 +00005025# 10.5 and earlier lack dispatch
Illia Bobyra96d5442023-08-30 16:30:15 +02005026ac_fn_c_check_header_compile "$LINENO" "dispatch/dispatch.h" "ac_cv_header_dispatch_dispatch_h" "$ac_includes_default"
5027if test "x$ac_cv_header_dispatch_dispatch_h" = xyes
5028then :
5029 printf "%s\n" "#define HAVE_DISPATCH_DISPATCH_H 1" >>confdefs.h
Evan Miller25448072022-12-30 10:42:23 +00005030
5031fi
5032
Bram Moolenaar39766a72013-11-03 00:41:00 +01005033
Bram Moolenaar071d4272004-06-13 20:20:40 +00005034
5035
5036
Bram Moolenaar446cb832008-06-24 21:56:24 +00005037if test "$cross_compiling" = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005038 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-local-dir argument" >&5
5039printf %s "checking --with-local-dir argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005040 have_local_include=''
5041 have_local_lib=''
Bram Moolenaarc236c162008-07-13 17:41:49 +00005042
5043# Check whether --with-local-dir was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005044if test ${with_local_dir+y}
5045then :
Bram Moolenaarc236c162008-07-13 17:41:49 +00005046 withval=$with_local_dir;
5047 local_dir="$withval"
5048 case "$withval" in
5049 */*) ;;
5050 no)
5051 # avoid adding local dir to LDFLAGS and CPPFLAGS
Bram Moolenaare06c1882010-07-21 22:05:20 +02005052 have_local_include=yes
Bram Moolenaarc236c162008-07-13 17:41:49 +00005053 have_local_lib=yes
5054 ;;
Bram Moolenaar7db77842014-03-27 17:40:59 +01005055 *) as_fn_error $? "must pass path argument to --with-local-dir" "$LINENO" 5 ;;
Bram Moolenaarc236c162008-07-13 17:41:49 +00005056 esac
Illia Bobyra96d5442023-08-30 16:30:15 +02005057 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $local_dir" >&5
5058printf "%s\n" "$local_dir" >&6; }
Bram Moolenaarc236c162008-07-13 17:41:49 +00005059
Illia Bobyra96d5442023-08-30 16:30:15 +02005060else $as_nop
Bram Moolenaarc236c162008-07-13 17:41:49 +00005061
5062 local_dir=/usr/local
Illia Bobyra96d5442023-08-30 16:30:15 +02005063 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to $local_dir" >&5
5064printf "%s\n" "Defaulting to $local_dir" >&6; }
Bram Moolenaarc236c162008-07-13 17:41:49 +00005065
5066fi
5067
5068 if test "$GCC" = yes -a "$local_dir" != no; then
Bram Moolenaar446cb832008-06-24 21:56:24 +00005069 echo 'void f(){}' > conftest.c
Bram Moolenaar0958e0f2013-11-04 04:57:50 +01005070 have_local_include=`${CC-cc} -c -v conftest.c 2>&1 | grep "${local_dir}/include"`
Bram Moolenaarc236c162008-07-13 17:41:49 +00005071 have_local_lib=`${CC-cc} -c -v conftest.c 2>&1 | grep "${local_dir}/lib"`
Bram Moolenaar446cb832008-06-24 21:56:24 +00005072 rm -f conftest.c conftest.o
Bram Moolenaar071d4272004-06-13 20:20:40 +00005073 fi
Bram Moolenaarc236c162008-07-13 17:41:49 +00005074 if test -z "$have_local_lib" -a -d "${local_dir}/lib"; then
5075 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 +00005076 if test "$tt" = "$LDFLAGS"; then
Bram Moolenaarc236c162008-07-13 17:41:49 +00005077 LDFLAGS="$LDFLAGS -L${local_dir}/lib"
Bram Moolenaar446cb832008-06-24 21:56:24 +00005078 fi
5079 fi
Bram Moolenaarc236c162008-07-13 17:41:49 +00005080 if test -z "$have_local_include" -a -d "${local_dir}/include"; then
5081 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 +00005082 if test "$tt" = "$CPPFLAGS"; then
Bram Moolenaarc236c162008-07-13 17:41:49 +00005083 CPPFLAGS="$CPPFLAGS -I${local_dir}/include"
Bram Moolenaar446cb832008-06-24 21:56:24 +00005084 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005085 fi
5086fi
5087
Illia Bobyra96d5442023-08-30 16:30:15 +02005088{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-vim-name argument" >&5
5089printf %s "checking --with-vim-name argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005090
Bram Moolenaar446cb832008-06-24 21:56:24 +00005091# Check whether --with-vim-name was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005092if test ${with_vim_name+y}
5093then :
5094 withval=$with_vim_name; VIMNAME="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $VIMNAME" >&5
5095printf "%s\n" "$VIMNAME" >&6; }
5096else $as_nop
5097 VIMNAME="vim"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to $VIMNAME" >&5
5098printf "%s\n" "Defaulting to $VIMNAME" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005099fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005100
5101
Illia Bobyra96d5442023-08-30 16:30:15 +02005102{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-ex-name argument" >&5
5103printf %s "checking --with-ex-name argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005104
5105# Check whether --with-ex-name was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005106if test ${with_ex_name+y}
5107then :
5108 withval=$with_ex_name; EXNAME="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $EXNAME" >&5
5109printf "%s\n" "$EXNAME" >&6; }
5110else $as_nop
5111 EXNAME="ex"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to ex" >&5
5112printf "%s\n" "Defaulting to ex" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005113fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005114
5115
Illia Bobyra96d5442023-08-30 16:30:15 +02005116{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-view-name argument" >&5
5117printf %s "checking --with-view-name argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005118
5119# Check whether --with-view-name was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005120if test ${with_view_name+y}
5121then :
5122 withval=$with_view_name; VIEWNAME="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $VIEWNAME" >&5
5123printf "%s\n" "$VIEWNAME" >&6; }
5124else $as_nop
5125 VIEWNAME="view"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to view" >&5
5126printf "%s\n" "Defaulting to view" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005127fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005128
5129
5130
Illia Bobyra96d5442023-08-30 16:30:15 +02005131{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-global-runtime argument" >&5
5132printf %s "checking --with-global-runtime argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005133
5134# Check whether --with-global-runtime was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005135if test ${with_global_runtime+y}
5136then :
5137 withval=$with_global_runtime; RUNTIME_GLOBAL="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
5138printf "%s\n" "$withval" >&6; }
5139else $as_nop
5140 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5141printf "%s\n" "no" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005142fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005143
5144
Bram Moolenaar9d302ad2018-12-21 11:48:51 +01005145if test "X$RUNTIME_GLOBAL" != "X"; then
5146 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 +02005147 printf "%s\n" "#define RUNTIME_GLOBAL \"$RUNTIME_GLOBAL\"" >>confdefs.h
Bram Moolenaar9d302ad2018-12-21 11:48:51 +01005148
Illia Bobyra96d5442023-08-30 16:30:15 +02005149 printf "%s\n" "#define RUNTIME_GLOBAL_AFTER \"$RUNTIME_GLOBAL_AFTER\"" >>confdefs.h
Bram Moolenaar9d302ad2018-12-21 11:48:51 +01005150
5151fi
5152
Illia Bobyra96d5442023-08-30 16:30:15 +02005153{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-modified-by argument" >&5
5154printf %s "checking --with-modified-by argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005155
5156# Check whether --with-modified-by was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005157if test ${with_modified_by+y}
5158then :
5159 withval=$with_modified_by; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
5160printf "%s\n" "$withval" >&6; }; printf "%s\n" "#define MODIFIED_BY \"$withval\"" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00005161
Illia Bobyra96d5442023-08-30 16:30:15 +02005162else $as_nop
5163 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5164printf "%s\n" "no" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005165fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005166
Bram Moolenaar446cb832008-06-24 21:56:24 +00005167
Illia Bobyra96d5442023-08-30 16:30:15 +02005168{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if character set is EBCDIC" >&5
5169printf %s "checking if character set is EBCDIC... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02005170cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005171/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00005172
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005173int
Illia Bobyra96d5442023-08-30 16:30:15 +02005174main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005175{
Bram Moolenaar071d4272004-06-13 20:20:40 +00005176 /* TryCompile function for CharSet.
5177 Treat any failure as ASCII for compatibility with existing art.
5178 Use compile-time rather than run-time tests for cross-compiler
5179 tolerance. */
5180#if '0'!=240
5181make an error "Character set is not EBCDIC"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005182#endif
5183 ;
5184 return 0;
5185}
5186_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02005187if ac_fn_c_try_compile "$LINENO"
5188then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00005189 # TryCompile action if true
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005190cf_cv_ebcdic=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02005191else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02005192 # TryCompile action if false
Bram Moolenaar071d4272004-06-13 20:20:40 +00005193cf_cv_ebcdic=no
5194fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005195rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +00005196# end of TryCompile ])
5197# end of CacheVal CvEbcdic
Illia Bobyra96d5442023-08-30 16:30:15 +02005198{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cf_cv_ebcdic" >&5
5199printf "%s\n" "$cf_cv_ebcdic" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00005200case "$cf_cv_ebcdic" in #(vi
Illia Bobyra96d5442023-08-30 16:30:15 +02005201 yes) printf "%s\n" "#define EBCDIC 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00005202
5203 line_break='"\\n"'
5204 ;;
5205 *) line_break='"\\012"';;
5206esac
5207
5208
5209if test "$cf_cv_ebcdic" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005210{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for z/OS Unix" >&5
5211printf %s "checking for z/OS Unix... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00005212case $vim_cv_uname_output in
Bram Moolenaar2c704a72010-06-03 21:17:25 +02005213 OS/390) zOSUnix="yes";
Bram Moolenaar071d4272004-06-13 20:20:40 +00005214 if test "$CC" = "cc"; then
5215 ccm="$_CC_CCMODE"
5216 ccn="CC"
5217 else
5218 if test "$CC" = "c89"; then
5219 ccm="$_CC_C89MODE"
5220 ccn="C89"
5221 else
5222 ccm=1
5223 fi
5224 fi
5225 if test "$ccm" != "1"; then
5226 echo ""
5227 echo "------------------------------------------"
Bram Moolenaar2c704a72010-06-03 21:17:25 +02005228 echo " On z/OS Unix, the environment variable"
Bram Moolenaar77c19352012-06-13 19:19:41 +02005229 echo " _CC_${ccn}MODE must be set to \"1\"!"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005230 echo " Do:"
5231 echo " export _CC_${ccn}MODE=1"
5232 echo " and then call configure again."
5233 echo "------------------------------------------"
5234 exit 1
5235 fi
Bram Moolenaar77c19352012-06-13 19:19:41 +02005236 # Set CFLAGS for configure process.
5237 # This will be reset later for config.mk.
5238 # Use haltonmsg to force error for missing H files.
5239 CFLAGS="$CFLAGS -D_ALL_SOURCE -Wc,float(ieee),haltonmsg(3296)";
5240 LDFLAGS="$LDFLAGS -Wl,EDIT=NO"
Illia Bobyra96d5442023-08-30 16:30:15 +02005241 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5242printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00005243 ;;
Bram Moolenaar2c704a72010-06-03 21:17:25 +02005244 *) zOSUnix="no";
Illia Bobyra96d5442023-08-30 16:30:15 +02005245 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5246printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00005247 ;;
5248esac
5249fi
5250
Bram Moolenaar2c704a72010-06-03 21:17:25 +02005251if test "$zOSUnix" = "yes"; then
Bram Moolenaarabcbb0e2020-12-23 12:33:42 +01005252 QUOTESED="sed -e 's/[\\\\\"]/\\\\\\\\&/g' -e 's/\\\\\\\\\"/\"/' -e 's/\\\\\\\\\";\$\$/\";/' -e 's/ */ /g'"
Bram Moolenaar2c704a72010-06-03 21:17:25 +02005253else
Bram Moolenaarabcbb0e2020-12-23 12:33:42 +01005254 QUOTESED="sed -e 's/[\\\\\"]/\\\\&/g' -e 's/\\\\\"/\"/' -e 's/\\\\\";\$\$/\";/' -e 's/ */ /g'"
Bram Moolenaar2c704a72010-06-03 21:17:25 +02005255fi
5256
5257
5258
Illia Bobyra96d5442023-08-30 16:30:15 +02005259{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-smack argument" >&5
5260printf %s "checking --disable-smack argument... " >&6; }
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005261# Check whether --enable-smack was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005262if test ${enable_smack+y}
5263then :
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005264 enableval=$enable_smack;
Illia Bobyra96d5442023-08-30 16:30:15 +02005265else $as_nop
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005266 enable_smack="yes"
5267fi
5268
5269if test "$enable_smack" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005270 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5271printf "%s\n" "no" >&6; }
5272 ac_fn_c_check_header_compile "$LINENO" "linux/xattr.h" "ac_cv_header_linux_xattr_h" "$ac_includes_default"
5273if test "x$ac_cv_header_linux_xattr_h" = xyes
5274then :
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005275 true
Illia Bobyra96d5442023-08-30 16:30:15 +02005276else $as_nop
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005277 enable_smack="no"
5278fi
5279
Bram Moolenaar4ed89cd2014-04-05 12:02:25 +02005280else
Illia Bobyra96d5442023-08-30 16:30:15 +02005281 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5282printf "%s\n" "yes" >&6; }
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005283fi
5284if test "$enable_smack" = "yes"; then
Illia Bobyr8c358e02023-09-30 22:57:19 +02005285 ac_fn_c_check_header_compile "$LINENO" "sys/xattr.h" "ac_cv_header_sys_xattr_h" "$ac_includes_default"
5286if test "x$ac_cv_header_sys_xattr_h" = xyes
Illia Bobyra96d5442023-08-30 16:30:15 +02005287then :
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005288 true
Illia Bobyra96d5442023-08-30 16:30:15 +02005289else $as_nop
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005290 enable_smack="no"
5291fi
5292
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005293fi
5294if test "$enable_smack" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005295 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XATTR_NAME_SMACKEXEC in linux/xattr.h" >&5
5296printf %s "checking for XATTR_NAME_SMACKEXEC in linux/xattr.h... " >&6; }
5297
5298cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005299/* end confdefs.h. */
5300#include <linux/xattr.h>
5301_ACEOF
5302if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Illia Bobyra96d5442023-08-30 16:30:15 +02005303 $EGREP "XATTR_NAME_SMACKEXEC" >/dev/null 2>&1
5304then :
5305 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5306printf "%s\n" "yes" >&6; }
5307else $as_nop
5308 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5309printf "%s\n" "no" >&6; }; enable_smack="no"
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005310fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005311rm -rf conftest*
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005312
5313fi
5314if test "$enable_smack" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005315 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for setxattr in -lattr" >&5
5316printf %s "checking for setxattr in -lattr... " >&6; }
5317if test ${ac_cv_lib_attr_setxattr+y}
5318then :
5319 printf %s "(cached) " >&6
5320else $as_nop
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005321 ac_check_lib_save_LIBS=$LIBS
5322LIBS="-lattr $LIBS"
5323cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5324/* end confdefs.h. */
5325
5326/* Override any GCC internal prototype to avoid an error.
5327 Use char because int might match the return type of a GCC
5328 builtin and then its argument prototype would still apply. */
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005329char setxattr ();
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005330int
Illia Bobyra96d5442023-08-30 16:30:15 +02005331main (void)
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005332{
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005333return setxattr ();
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005334 ;
5335 return 0;
5336}
5337_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02005338if ac_fn_c_try_link "$LINENO"
5339then :
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005340 ac_cv_lib_attr_setxattr=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02005341else $as_nop
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005342 ac_cv_lib_attr_setxattr=no
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005343fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005344rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005345 conftest$ac_exeext conftest.$ac_ext
5346LIBS=$ac_check_lib_save_LIBS
5347fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005348{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_attr_setxattr" >&5
5349printf "%s\n" "$ac_cv_lib_attr_setxattr" >&6; }
5350if test "x$ac_cv_lib_attr_setxattr" = xyes
5351then :
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005352 LIBS="$LIBS -lattr"
5353 found_smack="yes"
Illia Bobyra96d5442023-08-30 16:30:15 +02005354 printf "%s\n" "#define HAVE_SMACK 1" >>confdefs.h
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005355
5356fi
5357
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005358fi
5359
5360if test "x$found_smack" = "x"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005361 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-selinux argument" >&5
5362printf %s "checking --disable-selinux argument... " >&6; }
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005363 # Check whether --enable-selinux was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005364if test ${enable_selinux+y}
5365then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00005366 enableval=$enable_selinux;
Illia Bobyra96d5442023-08-30 16:30:15 +02005367else $as_nop
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005368 enable_selinux="yes"
Bram Moolenaar446cb832008-06-24 21:56:24 +00005369fi
5370
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005371 if test "$enable_selinux" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005372 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5373printf "%s\n" "no" >&6; }
5374 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for is_selinux_enabled in -lselinux" >&5
5375printf %s "checking for is_selinux_enabled in -lselinux... " >&6; }
5376if test ${ac_cv_lib_selinux_is_selinux_enabled+y}
5377then :
5378 printf %s "(cached) " >&6
5379else $as_nop
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005380 ac_check_lib_save_LIBS=$LIBS
5381LIBS="-lselinux $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02005382cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005383/* end confdefs.h. */
5384
Bram Moolenaar446cb832008-06-24 21:56:24 +00005385/* Override any GCC internal prototype to avoid an error.
5386 Use char because int might match the return type of a GCC
5387 builtin and then its argument prototype would still apply. */
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005388char is_selinux_enabled ();
5389int
Illia Bobyra96d5442023-08-30 16:30:15 +02005390main (void)
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005391{
Bram Moolenaar446cb832008-06-24 21:56:24 +00005392return is_selinux_enabled ();
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005393 ;
5394 return 0;
5395}
5396_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02005397if ac_fn_c_try_link "$LINENO"
5398then :
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005399 ac_cv_lib_selinux_is_selinux_enabled=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02005400else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02005401 ac_cv_lib_selinux_is_selinux_enabled=no
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005402fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005403rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02005404 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005405LIBS=$ac_check_lib_save_LIBS
5406fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005407{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_is_selinux_enabled" >&5
5408printf "%s\n" "$ac_cv_lib_selinux_is_selinux_enabled" >&6; }
5409if test "x$ac_cv_lib_selinux_is_selinux_enabled" = xyes
5410then :
5411 ac_fn_c_check_header_compile "$LINENO" "selinux/selinux.h" "ac_cv_header_selinux_selinux_h" "$ac_includes_default"
5412if test "x$ac_cv_header_selinux_selinux_h" = xyes
5413then :
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005414 LIBS="$LIBS -lselinux"
Illia Bobyra96d5442023-08-30 16:30:15 +02005415 printf "%s\n" "#define HAVE_SELINUX 1" >>confdefs.h
Bram Moolenaare4b78e22017-12-07 22:29:11 +01005416
5417fi
5418
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005419fi
5420
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005421 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005422 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5423printf "%s\n" "yes" >&6; }
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005424 fi
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005425fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005426
Christian Brabandte085dfd2023-09-30 12:49:18 +02005427{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-xattr argument" >&5
5428printf %s "checking --enable-xattr argument... " >&6; }
5429# Check whether --enable-xattr was given.
5430if test ${enable_xattr+y}
5431then :
5432 enableval=$enable_xattr;
5433else $as_nop
5434 enable_xattr="yes"
5435fi
5436
5437if test "$enable_xattr" = "yes"; then
5438 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5439printf "%s\n" "yes" >&6; }
Illia Bobyr8c358e02023-09-30 22:57:19 +02005440 ac_fn_c_check_header_compile "$LINENO" "sys/xattr.h" "ac_cv_header_sys_xattr_h" "$ac_includes_default"
5441if test "x$ac_cv_header_sys_xattr_h" = xyes
Christian Brabandte085dfd2023-09-30 12:49:18 +02005442then :
5443 printf "%s\n" "#define HAVE_XATTR 1" >>confdefs.h
5444
5445fi
5446
5447else
5448 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5449printf "%s\n" "no" >&6; }
5450fi
5451
5452
Illia Bobyra96d5442023-08-30 16:30:15 +02005453{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-features argument" >&5
5454printf %s "checking --with-features argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005455
Bram Moolenaar446cb832008-06-24 21:56:24 +00005456# Check whether --with-features was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005457if test ${with_features+y}
5458then :
5459 withval=$with_features; features="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $features" >&5
5460printf "%s\n" "$features" >&6; }
5461else $as_nop
5462 features="huge"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to huge" >&5
5463printf "%s\n" "Defaulting to huge" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005464fi
5465
Bram Moolenaar071d4272004-06-13 20:20:40 +00005466
Martin Tournoij7904fa42022-10-04 16:28:45 +01005467case "$features" in
Martin Tournoij25f3a142022-10-08 19:26:41 +01005468 small) features="tiny" ;;
5469 big) features="normal" ;;
Martin Tournoij7904fa42022-10-04 16:28:45 +01005470esac
5471
Bram Moolenaar071d4272004-06-13 20:20:40 +00005472dovimdiff=""
5473dogvimdiff=""
5474case "$features" in
Illia Bobyra96d5442023-08-30 16:30:15 +02005475 tiny) printf "%s\n" "#define FEAT_TINY 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00005476 ;;
Illia Bobyra96d5442023-08-30 16:30:15 +02005477 normal) printf "%s\n" "#define FEAT_NORMAL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00005478 dovimdiff="installvimdiff";
5479 dogvimdiff="installgvimdiff" ;;
Illia Bobyra96d5442023-08-30 16:30:15 +02005480 huge) printf "%s\n" "#define FEAT_HUGE 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00005481 dovimdiff="installvimdiff";
5482 dogvimdiff="installgvimdiff" ;;
Illia Bobyra96d5442023-08-30 16:30:15 +02005483 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Sorry, $features is not supported" >&5
5484printf "%s\n" "Sorry, $features is not supported" >&6; } ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00005485esac
5486
5487
5488
5489
Martin Tournoij7904fa42022-10-04 16:28:45 +01005490if test "x$features" = "xtiny"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00005491 has_eval=no
5492else
5493 has_eval=yes
5494fi
5495
Illia Bobyra96d5442023-08-30 16:30:15 +02005496{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-compiledby argument" >&5
5497printf %s "checking --with-compiledby argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005498
Bram Moolenaar446cb832008-06-24 21:56:24 +00005499# Check whether --with-compiledby was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005500if test ${with_compiledby+y}
5501then :
5502 withval=$with_compiledby; compiledby="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
5503printf "%s\n" "$withval" >&6; }
5504else $as_nop
5505 compiledby=""; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5506printf "%s\n" "no" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005507fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005508
5509
Bram Moolenaar446cb832008-06-24 21:56:24 +00005510
Illia Bobyra96d5442023-08-30 16:30:15 +02005511{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-xsmp argument" >&5
5512printf %s "checking --disable-xsmp argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005513# Check whether --enable-xsmp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005514if test ${enable_xsmp+y}
5515then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00005516 enableval=$enable_xsmp;
Illia Bobyra96d5442023-08-30 16:30:15 +02005517else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00005518 enable_xsmp="yes"
Bram Moolenaar446cb832008-06-24 21:56:24 +00005519fi
5520
Bram Moolenaar071d4272004-06-13 20:20:40 +00005521
5522if test "$enable_xsmp" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005523 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5524printf "%s\n" "no" >&6; }
5525 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-xsmp-interact argument" >&5
5526printf %s "checking --disable-xsmp-interact argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005527 # Check whether --enable-xsmp-interact was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005528if test ${enable_xsmp_interact+y}
5529then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00005530 enableval=$enable_xsmp_interact;
Illia Bobyra96d5442023-08-30 16:30:15 +02005531else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00005532 enable_xsmp_interact="yes"
Bram Moolenaar446cb832008-06-24 21:56:24 +00005533fi
5534
Bram Moolenaar071d4272004-06-13 20:20:40 +00005535 if test "$enable_xsmp_interact" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005536 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5537printf "%s\n" "no" >&6; }
5538 printf "%s\n" "#define USE_XSMP_INTERACT 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00005539
5540 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005541 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5542printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00005543 fi
5544else
Illia Bobyra96d5442023-08-30 16:30:15 +02005545 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5546printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00005547fi
5548
Illia Bobyra96d5442023-08-30 16:30:15 +02005549{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking diff feature" >&5
5550printf %s "checking diff feature... " >&6; }
Martin Tournoij7904fa42022-10-04 16:28:45 +01005551if test "x$features" = "xtiny"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005552 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: disabled in $features version" >&5
5553printf "%s\n" "disabled in $features version" >&6; }
Bram Moolenaar67ffb412022-01-08 13:36:57 +00005554else
Illia Bobyra96d5442023-08-30 16:30:15 +02005555 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: enabled" >&5
5556printf "%s\n" "enabled" >&6; }
5557 printf "%s\n" "#define FEAT_DIFF 1" >>confdefs.h
Bram Moolenaar67ffb412022-01-08 13:36:57 +00005558
5559 XDIFF_OBJS_USED="\$(XDIFF_OBJS)"
5560
5561fi
5562
Illia Bobyra96d5442023-08-30 16:30:15 +02005563{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-luainterp argument" >&5
5564printf %s "checking --enable-luainterp argument... " >&6; }
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005565# Check whether --enable-luainterp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005566if test ${enable_luainterp+y}
5567then :
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005568 enableval=$enable_luainterp;
Illia Bobyra96d5442023-08-30 16:30:15 +02005569else $as_nop
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005570 enable_luainterp="no"
5571fi
5572
Illia Bobyra96d5442023-08-30 16:30:15 +02005573{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_luainterp" >&5
5574printf "%s\n" "$enable_luainterp" >&6; }
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005575
Bram Moolenaar2334b6d2010-07-22 21:32:16 +02005576if test "$enable_luainterp" = "yes" -o "$enable_luainterp" = "dynamic"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00005577 if test "$has_eval" = "no"; then
Martin Tournoij7904fa42022-10-04 16:28:45 +01005578 as_fn_error $? "cannot use Lua with tiny features" "$LINENO" 5
Bram Moolenaar3c124e32016-01-31 14:36:58 +01005579 fi
5580
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005581
5582
Illia Bobyra96d5442023-08-30 16:30:15 +02005583 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-lua-prefix argument" >&5
5584printf %s "checking --with-lua-prefix argument... " >&6; }
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005585
5586# Check whether --with-lua_prefix was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005587if test ${with_lua_prefix+y}
5588then :
5589 withval=$with_lua_prefix; with_lua_prefix="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_lua_prefix" >&5
5590printf "%s\n" "$with_lua_prefix" >&6; }
5591else $as_nop
5592 with_lua_prefix="";{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5593printf "%s\n" "no" >&6; }
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005594fi
5595
5596
5597 if test "X$with_lua_prefix" != "X"; then
5598 vi_cv_path_lua_pfx="$with_lua_prefix"
5599 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005600 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking LUA_PREFIX environment var" >&5
5601printf %s "checking LUA_PREFIX environment var... " >&6; }
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005602 if test "X$LUA_PREFIX" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005603 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: \"$LUA_PREFIX\"" >&5
5604printf "%s\n" "\"$LUA_PREFIX\"" >&6; }
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005605 vi_cv_path_lua_pfx="$LUA_PREFIX"
5606 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005607 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not set, default to /usr" >&5
5608printf "%s\n" "not set, default to /usr" >&6; }
Bram Moolenaar0d2e4fc2010-07-18 12:35:47 +02005609 vi_cv_path_lua_pfx="/usr"
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005610 fi
5611 fi
5612
Illia Bobyra96d5442023-08-30 16:30:15 +02005613 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-luajit" >&5
5614printf %s "checking --with-luajit... " >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005615
5616# Check whether --with-luajit was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005617if test ${with_luajit+y}
5618then :
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005619 withval=$with_luajit; vi_cv_with_luajit="$withval"
Illia Bobyra96d5442023-08-30 16:30:15 +02005620else $as_nop
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005621 vi_cv_with_luajit="no"
5622fi
5623
Illia Bobyra96d5442023-08-30 16:30:15 +02005624 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_with_luajit" >&5
5625printf "%s\n" "$vi_cv_with_luajit" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005626
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005627 LUA_INC=
5628 if test "X$vi_cv_path_lua_pfx" != "X"; then
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005629 if test "x$vi_cv_with_luajit" != "xno"; then
5630 # Extract the first word of "luajit", so it can be a program name with args.
5631set dummy luajit; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02005632{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5633printf %s "checking for $ac_word... " >&6; }
5634if test ${ac_cv_path_vi_cv_path_luajit+y}
5635then :
5636 printf %s "(cached) " >&6
5637else $as_nop
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005638 case $vi_cv_path_luajit in
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005639 [\\/]* | ?:[\\/]*)
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005640 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 +02005641 ;;
5642 *)
5643 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5644for as_dir in $PATH
5645do
5646 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02005647 case $as_dir in #(((
5648 '') as_dir=./ ;;
5649 */) ;;
5650 *) as_dir=$as_dir/ ;;
5651 esac
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005652 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02005653 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5654 ac_cv_path_vi_cv_path_luajit="$as_dir$ac_word$ac_exec_ext"
5655 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005656 break 2
5657 fi
5658done
5659 done
5660IFS=$as_save_IFS
5661
5662 ;;
5663esac
5664fi
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005665vi_cv_path_luajit=$ac_cv_path_vi_cv_path_luajit
5666if test -n "$vi_cv_path_luajit"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005667 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_luajit" >&5
5668printf "%s\n" "$vi_cv_path_luajit" >&6; }
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005669else
Illia Bobyra96d5442023-08-30 16:30:15 +02005670 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5671printf "%s\n" "no" >&6; }
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005672fi
5673
5674
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005675 if test "X$vi_cv_path_luajit" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005676 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking LuaJIT version" >&5
5677printf %s "checking LuaJIT version... " >&6; }
5678if test ${vi_cv_version_luajit+y}
5679then :
5680 printf %s "(cached) " >&6
5681else $as_nop
ichizokbddc6ad2023-08-29 20:54:32 +02005682 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 +02005683fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005684{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_version_luajit" >&5
5685printf "%s\n" "$vi_cv_version_luajit" >&6; }
5686 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Lua version of LuaJIT" >&5
5687printf %s "checking Lua version of LuaJIT... " >&6; }
5688if test ${vi_cv_version_lua_luajit+y}
5689then :
5690 printf %s "(cached) " >&6
5691else $as_nop
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005692 vi_cv_version_lua_luajit=`${vi_cv_path_luajit} -e "print(_VERSION)" | sed 's/.* //'`
5693fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005694{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_version_lua_luajit" >&5
5695printf "%s\n" "$vi_cv_version_lua_luajit" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005696 vi_cv_path_lua="$vi_cv_path_luajit"
5697 vi_cv_version_lua="$vi_cv_version_lua_luajit"
5698 fi
Bram Moolenaar1e91f262012-10-03 14:48:08 +02005699 else
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005700 # Extract the first word of "lua", so it can be a program name with args.
5701set dummy lua; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02005702{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5703printf %s "checking for $ac_word... " >&6; }
5704if test ${ac_cv_path_vi_cv_path_plain_lua+y}
5705then :
5706 printf %s "(cached) " >&6
5707else $as_nop
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005708 case $vi_cv_path_plain_lua in
5709 [\\/]* | ?:[\\/]*)
5710 ac_cv_path_vi_cv_path_plain_lua="$vi_cv_path_plain_lua" # Let the user override the test with a path.
5711 ;;
5712 *)
5713 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5714for as_dir in $PATH
5715do
5716 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02005717 case $as_dir in #(((
5718 '') as_dir=./ ;;
5719 */) ;;
5720 *) as_dir=$as_dir/ ;;
5721 esac
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005722 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02005723 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5724 ac_cv_path_vi_cv_path_plain_lua="$as_dir$ac_word$ac_exec_ext"
5725 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005726 break 2
5727 fi
5728done
5729 done
5730IFS=$as_save_IFS
5731
5732 ;;
5733esac
5734fi
5735vi_cv_path_plain_lua=$ac_cv_path_vi_cv_path_plain_lua
5736if test -n "$vi_cv_path_plain_lua"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005737 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_plain_lua" >&5
5738printf "%s\n" "$vi_cv_path_plain_lua" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005739else
Illia Bobyra96d5442023-08-30 16:30:15 +02005740 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5741printf "%s\n" "no" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005742fi
5743
5744
5745 if test "X$vi_cv_path_plain_lua" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005746 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Lua version" >&5
5747printf %s "checking Lua version... " >&6; }
5748if test ${vi_cv_version_plain_lua+y}
5749then :
5750 printf %s "(cached) " >&6
5751else $as_nop
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005752 vi_cv_version_plain_lua=`${vi_cv_path_plain_lua} -e "print(_VERSION)" | sed 's/.* //'`
5753fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005754{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_version_plain_lua" >&5
5755printf "%s\n" "$vi_cv_version_plain_lua" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005756 fi
5757 vi_cv_path_lua="$vi_cv_path_plain_lua"
5758 vi_cv_version_lua="$vi_cv_version_plain_lua"
5759 fi
5760 if test "x$vi_cv_with_luajit" != "xno" && test "X$vi_cv_version_luajit" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005761 { 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
5762printf %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 +01005763 if test -f "$vi_cv_path_lua_pfx/include/luajit-$vi_cv_version_luajit/lua.h"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005764 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5765printf "%s\n" "yes" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005766 LUA_INC=/luajit-$vi_cv_version_luajit
5767 fi
5768 fi
5769 if test "X$LUA_INC" = "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005770 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if lua.h can be found in $vi_cv_path_lua_pfx/include" >&5
5771printf %s "checking if lua.h can be found in $vi_cv_path_lua_pfx/include... " >&6; }
Bram Moolenaar49222be2015-12-11 18:11:30 +01005772 if test -f "$vi_cv_path_lua_pfx/include/lua.h"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005773 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5774printf "%s\n" "yes" >&6; }
Bram Moolenaar1e91f262012-10-03 14:48:08 +02005775 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005776 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5777printf "%s\n" "no" >&6; }
5778 { 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
5779printf %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 +01005780 if test -f "$vi_cv_path_lua_pfx/include/lua$vi_cv_version_lua/lua.h"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005781 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5782printf "%s\n" "yes" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005783 LUA_INC=/lua$vi_cv_version_lua
5784 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005785 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5786printf "%s\n" "no" >&6; }
Bram Moolenaarf49e5642020-04-19 17:46:53 +02005787
5788 # Detect moonjit:
5789 # https://groups.google.com/forum/#!topic/vim_use/O0vek60WuTk
5790 lua_suf=/moonjit-2.3
5791 inc_path="$vi_cv_path_lua_pfx/include"
Bram Moolenaarad4dc832020-04-20 16:21:53 +02005792 for dir in "$inc_path"/moonjit-[0-9]* ; do
Bram Moolenaarf49e5642020-04-19 17:46:53 +02005793 if test -d "$dir" ; then
Bram Moolenaara79a8942020-12-17 20:50:25 +01005794 lua_suf=`basename "$dir"`
Bram Moolenaarf49e5642020-04-19 17:46:53 +02005795 lua_suf="/$lua_suf"
5796 break
5797 fi
5798 done
Illia Bobyra96d5442023-08-30 16:30:15 +02005799 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if lua.h can be found in $inc_path$lua_suf" >&5
5800printf %s "checking if lua.h can be found in $inc_path$lua_suf... " >&6; }
Bram Moolenaarf49e5642020-04-19 17:46:53 +02005801 if test -f "$inc_path$lua_suf/lua.h"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005802 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5803printf "%s\n" "yes" >&6; }
Bram Moolenaarf49e5642020-04-19 17:46:53 +02005804 LUA_INC=$lua_suf
5805 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005806 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5807printf "%s\n" "no" >&6; }
Bram Moolenaarf49e5642020-04-19 17:46:53 +02005808 vi_cv_path_lua_pfx=
5809 fi
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005810 fi
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005811 fi
5812 fi
5813 fi
5814
5815 if test "X$vi_cv_path_lua_pfx" != "X"; then
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005816 if test "x$vi_cv_with_luajit" != "xno"; then
5817 multiarch=`dpkg-architecture -qDEB_HOST_MULTIARCH 2> /dev/null`
5818 if test "X$multiarch" != "X"; then
5819 lib_multiarch="lib/${multiarch}"
5820 else
5821 lib_multiarch="lib"
5822 fi
5823 if test "X$vi_cv_version_lua" = "X"; then
5824 LUA_LIBS="-L${vi_cv_path_lua_pfx}/${lib_multiarch} -lluajit"
5825 else
5826 LUA_LIBS="-L${vi_cv_path_lua_pfx}/${lib_multiarch} -lluajit-$vi_cv_version_lua"
5827 fi
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005828 else
Bram Moolenaar869113f2023-03-31 21:29:00 +01005829 if test -d "${vi_cv_path_lua_pfx}/lib/lua$vi_cv_version_lua"; then
5830 LUALIBDIR="lib/lua$vi_cv_version_lua"
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005831 else
Bram Moolenaar869113f2023-03-31 21:29:00 +01005832 LUALIBDIR=lib
5833 fi
5834 if test "X$LUA_INC" != "X"; then
5835 LUA_LIBS="-L${vi_cv_path_lua_pfx}/${LUALIBDIR} -llua$vi_cv_version_lua"
5836 else
5837 LUA_LIBS="-L${vi_cv_path_lua_pfx}/${LUALIBDIR} -llua"
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005838 fi
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005839 fi
Bram Moolenaar2334b6d2010-07-22 21:32:16 +02005840 if test "$enable_luainterp" = "dynamic"; then
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005841 lua_ok="yes"
5842 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005843 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if link with ${LUA_LIBS} is sane" >&5
5844printf %s "checking if link with ${LUA_LIBS} is sane... " >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005845 libs_save=$LIBS
5846 LIBS="$LIBS $LUA_LIBS"
5847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5848/* end confdefs.h. */
5849
5850int
Illia Bobyra96d5442023-08-30 16:30:15 +02005851main (void)
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005852{
5853
5854 ;
5855 return 0;
5856}
5857_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02005858if ac_fn_c_try_link "$LINENO"
5859then :
5860 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5861printf "%s\n" "yes" >&6; }; lua_ok="yes"
5862else $as_nop
5863 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5864printf "%s\n" "no" >&6; }; lua_ok="no"; LUA_LIBS=""
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005865fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005866rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005867 conftest$ac_exeext conftest.$ac_ext
5868 LIBS=$libs_save
5869 fi
5870 if test "x$lua_ok" = "xyes"; then
5871 LUA_CFLAGS="-I${vi_cv_path_lua_pfx}/include${LUA_INC}"
5872 LUA_SRC="if_lua.c"
5873 LUA_OBJ="objects/if_lua.o"
5874 LUA_PRO="if_lua.pro"
Illia Bobyra96d5442023-08-30 16:30:15 +02005875 printf "%s\n" "#define FEAT_LUA 1" >>confdefs.h
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005876
5877 fi
5878 if test "$enable_luainterp" = "dynamic"; then
5879 if test "x$vi_cv_with_luajit" != "xno"; then
5880 luajit="jit"
5881 fi
Bram Moolenaar1e91f262012-10-03 14:48:08 +02005882 if test -f "${vi_cv_path_lua_pfx}/bin/cyglua-${vi_cv_version_lua}.dll"; then
5883 vi_cv_dll_name_lua="cyglua-${vi_cv_version_lua}.dll"
5884 else
Bram Moolenaard0573012017-10-28 21:11:06 +02005885 if test "x$MACOS_X" = "xyes"; then
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005886 ext="dylib"
5887 indexes=""
5888 else
5889 ext="so"
5890 indexes=".0 .1 .2 .3 .4 .5 .6 .7 .8 .9"
5891 multiarch=`dpkg-architecture -qDEB_HOST_MULTIARCH 2> /dev/null`
5892 if test "X$multiarch" != "X"; then
5893 lib_multiarch="lib/${multiarch}"
5894 fi
Bram Moolenaar768baac2013-04-15 14:44:57 +02005895 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005896 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if liblua${luajit}*.${ext}* can be found in $vi_cv_path_lua_pfx" >&5
5897printf %s "checking if liblua${luajit}*.${ext}* can be found in $vi_cv_path_lua_pfx... " >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005898 for subdir in "${lib_multiarch}" lib64 lib; do
Bram Moolenaar768baac2013-04-15 14:44:57 +02005899 if test -z "$subdir"; then
5900 continue
5901 fi
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005902 for sover in "${vi_cv_version_lua}.${ext}" "-${vi_cv_version_lua}.${ext}" \
5903 ".${vi_cv_version_lua}.${ext}" ".${ext}.${vi_cv_version_lua}"; do
5904 for i in $indexes ""; do
5905 if test -f "${vi_cv_path_lua_pfx}/${subdir}/liblua${luajit}${sover}$i"; then
Bram Moolenaar768baac2013-04-15 14:44:57 +02005906 sover2="$i"
5907 break 3
5908 fi
5909 done
Bram Moolenaar07e1da62013-02-06 19:49:43 +01005910 done
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005911 sover=""
Bram Moolenaar1e91f262012-10-03 14:48:08 +02005912 done
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005913 if test "X$sover" = "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005914 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5915printf "%s\n" "no" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005916 lua_ok="no"
5917 vi_cv_dll_name_lua="liblua${luajit}.${ext}"
5918 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005919 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5920printf "%s\n" "yes" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005921 lua_ok="yes"
5922 vi_cv_dll_name_lua="liblua${luajit}${sover}$sover2"
5923 fi
Bram Moolenaar1e91f262012-10-03 14:48:08 +02005924 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005925 printf "%s\n" "#define DYNAMIC_LUA 1" >>confdefs.h
Bram Moolenaar2334b6d2010-07-22 21:32:16 +02005926
5927 LUA_LIBS=""
Bram Moolenaar1e91f262012-10-03 14:48:08 +02005928 LUA_CFLAGS="-DDYNAMIC_LUA_DLL=\\\"${vi_cv_dll_name_lua}\\\" $LUA_CFLAGS"
Bram Moolenaar2334b6d2010-07-22 21:32:16 +02005929 fi
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005930 if test "X$LUA_CFLAGS$LUA_LIBS" != "X" && \
Bram Moolenaard0573012017-10-28 21:11:06 +02005931 test "x$MACOS_X" = "xyes" && test "x$vi_cv_with_luajit" != "xno" && \
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00005932 test "$vim_cv_uname_m_output" = "x86_64"; then
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005933 LUA_LIBS="-pagezero_size 10000 -image_base 100000000 $LUA_LIBS"
5934 fi
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005935 fi
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005936 if test "$fail_if_missing" = "yes" -a "$lua_ok" != "yes"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01005937 as_fn_error $? "could not configure lua" "$LINENO" 5
Bram Moolenaarf788a062011-12-14 20:51:25 +01005938 fi
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005939
5940
5941
5942
5943
ichizok8bb3fe42021-12-28 15:51:45 +00005944
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005945fi
5946
5947
Illia Bobyra96d5442023-08-30 16:30:15 +02005948{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-mzschemeinterp argument" >&5
5949printf %s "checking --enable-mzschemeinterp argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005950# Check whether --enable-mzschemeinterp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005951if test ${enable_mzschemeinterp+y}
5952then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00005953 enableval=$enable_mzschemeinterp;
Illia Bobyra96d5442023-08-30 16:30:15 +02005954else $as_nop
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005955 enable_mzschemeinterp="no"
Bram Moolenaar446cb832008-06-24 21:56:24 +00005956fi
5957
Illia Bobyra96d5442023-08-30 16:30:15 +02005958{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_mzschemeinterp" >&5
5959printf "%s\n" "$enable_mzschemeinterp" >&6; }
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005960
5961if test "$enable_mzschemeinterp" = "yes"; then
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005962
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005963
Illia Bobyra96d5442023-08-30 16:30:15 +02005964 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-plthome argument" >&5
5965printf %s "checking --with-plthome argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005966
Bram Moolenaar446cb832008-06-24 21:56:24 +00005967# Check whether --with-plthome was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005968if test ${with_plthome+y}
5969then :
5970 withval=$with_plthome; with_plthome="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_plthome" >&5
5971printf "%s\n" "$with_plthome" >&6; }
5972else $as_nop
5973 with_plthome="";{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: \"no\"" >&5
5974printf "%s\n" "\"no\"" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005975fi
5976
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005977
5978 if test "X$with_plthome" != "X"; then
5979 vi_cv_path_mzscheme_pfx="$with_plthome"
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01005980 vi_cv_path_mzscheme="${vi_cv_path_mzscheme_pfx}/bin/mzscheme"
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005981 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005982 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking PLTHOME environment var" >&5
5983printf %s "checking PLTHOME environment var... " >&6; }
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005984 if test "X$PLTHOME" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005985 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: \"$PLTHOME\"" >&5
5986printf "%s\n" "\"$PLTHOME\"" >&6; }
Bram Moolenaarc9b4b052006-04-30 18:54:39 +00005987 vi_cv_path_mzscheme_pfx="$PLTHOME"
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01005988 vi_cv_path_mzscheme="${vi_cv_path_mzscheme_pfx}/bin/mzscheme"
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005989 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005990 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not set" >&5
5991printf "%s\n" "not set" >&6; }
Bram Moolenaarc9b4b052006-04-30 18:54:39 +00005992 # Extract the first word of "mzscheme", so it can be a program name with args.
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005993set dummy mzscheme; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02005994{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5995printf %s "checking for $ac_word... " >&6; }
5996if test ${ac_cv_path_vi_cv_path_mzscheme+y}
5997then :
5998 printf %s "(cached) " >&6
5999else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006000 case $vi_cv_path_mzscheme in
6001 [\\/]* | ?:[\\/]*)
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006002 ac_cv_path_vi_cv_path_mzscheme="$vi_cv_path_mzscheme" # Let the user override the test with a path.
6003 ;;
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006004 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006005 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6006for as_dir in $PATH
6007do
6008 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02006009 case $as_dir in #(((
6010 '') as_dir=./ ;;
6011 */) ;;
6012 *) as_dir=$as_dir/ ;;
6013 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006014 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02006015 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6016 ac_cv_path_vi_cv_path_mzscheme="$as_dir$ac_word$ac_exec_ext"
6017 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006018 break 2
6019 fi
6020done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006021 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00006022IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006023
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006024 ;;
6025esac
6026fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006027vi_cv_path_mzscheme=$ac_cv_path_vi_cv_path_mzscheme
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006028if test -n "$vi_cv_path_mzscheme"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006029 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_mzscheme" >&5
6030printf "%s\n" "$vi_cv_path_mzscheme" >&6; }
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006031else
Illia Bobyra96d5442023-08-30 16:30:15 +02006032 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6033printf "%s\n" "no" >&6; }
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006034fi
6035
6036
Bram Moolenaar446cb832008-06-24 21:56:24 +00006037
Bram Moolenaarc9b4b052006-04-30 18:54:39 +00006038 if test "X$vi_cv_path_mzscheme" != "X"; then
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006039 lsout=`ls -l $vi_cv_path_mzscheme`
6040 if echo "$lsout" | grep -e '->' >/dev/null 2>/dev/null; then
6041 vi_cv_path_mzscheme=`echo "$lsout" | sed 's/.*-> \(.*\)/\1/'`
6042 fi
6043 fi
6044
Bram Moolenaarc9b4b052006-04-30 18:54:39 +00006045 if test "X$vi_cv_path_mzscheme" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006046 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking MzScheme install prefix" >&5
6047printf %s "checking MzScheme install prefix... " >&6; }
6048if test ${vi_cv_path_mzscheme_pfx+y}
6049then :
6050 printf %s "(cached) " >&6
6051else $as_nop
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006052 echo "(display (simplify-path \
Bram Moolenaarc9b4b052006-04-30 18:54:39 +00006053 (build-path (call-with-values \
6054 (lambda () (split-path (find-system-path (quote exec-file)))) \
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006055 (lambda (base name must-be-dir?) base)) (quote up))))" > mzdirs.scm
6056 vi_cv_path_mzscheme_pfx=`${vi_cv_path_mzscheme} -r mzdirs.scm | \
6057 sed -e 's+/$++'`
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006058fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006059{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_mzscheme_pfx" >&5
6060printf "%s\n" "$vi_cv_path_mzscheme_pfx" >&6; }
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006061 rm -f mzdirs.scm
Bram Moolenaarc9b4b052006-04-30 18:54:39 +00006062 fi
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006063 fi
6064 fi
6065
6066 if test "X$vi_cv_path_mzscheme_pfx" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006067 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for racket include directory" >&5
6068printf %s "checking for racket include directory... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006069 SCHEME_INC=`${vi_cv_path_mzscheme} -e '(require setup/dirs)(let ((p (find-include-dir))) (when (path? p) (display p)))'`
6070 if test "X$SCHEME_INC" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006071 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${SCHEME_INC}" >&5
6072printf "%s\n" "${SCHEME_INC}" >&6; }
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006073 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006074 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6075printf "%s\n" "not found" >&6; }
6076 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include" >&5
6077printf %s "checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006078 if test -f "$vi_cv_path_mzscheme_pfx/include/scheme.h"; then
6079 SCHEME_INC=${vi_cv_path_mzscheme_pfx}/include
Illia Bobyra96d5442023-08-30 16:30:15 +02006080 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6081printf "%s\n" "yes" >&6; }
Bram Moolenaarff4a37e2007-05-06 13:18:29 +00006082 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006083 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6084printf "%s\n" "no" >&6; }
6085 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include/plt" >&5
6086printf %s "checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include/plt... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006087 if test -f "$vi_cv_path_mzscheme_pfx/include/plt/scheme.h"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006088 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6089printf "%s\n" "yes" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006090 SCHEME_INC=${vi_cv_path_mzscheme_pfx}/include/plt
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006091 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006092 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6093printf "%s\n" "no" >&6; }
6094 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include/racket" >&5
6095printf %s "checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include/racket... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006096 if test -f "$vi_cv_path_mzscheme_pfx/include/racket/scheme.h"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006097 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6098printf "%s\n" "yes" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006099 SCHEME_INC=${vi_cv_path_mzscheme_pfx}/include/racket
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006100 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006101 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6102printf "%s\n" "no" >&6; }
6103 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in /usr/include/plt/" >&5
6104printf %s "checking if scheme.h can be found in /usr/include/plt/... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006105 if test -f /usr/include/plt/scheme.h; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006106 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6107printf "%s\n" "yes" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006108 SCHEME_INC=/usr/include/plt
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006109 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006110 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6111printf "%s\n" "no" >&6; }
6112 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in /usr/include/racket/" >&5
6113printf %s "checking if scheme.h can be found in /usr/include/racket/... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006114 if test -f /usr/include/racket/scheme.h; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006115 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6116printf "%s\n" "yes" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006117 SCHEME_INC=/usr/include/racket
6118 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006119 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6120printf "%s\n" "no" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006121 vi_cv_path_mzscheme_pfx=
6122 fi
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006123 fi
6124 fi
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006125 fi
Bram Moolenaarff4a37e2007-05-06 13:18:29 +00006126 fi
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006127 fi
6128 fi
6129
6130 if test "X$vi_cv_path_mzscheme_pfx" != "X"; then
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006131
Illia Bobyra96d5442023-08-30 16:30:15 +02006132 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for racket lib directory" >&5
6133printf %s "checking for racket lib directory... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006134 SCHEME_LIB=`${vi_cv_path_mzscheme} -e '(require setup/dirs)(let ((p (find-lib-dir))) (when (path? p) (display p)))'`
6135 if test "X$SCHEME_LIB" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006136 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${SCHEME_LIB}" >&5
6137printf "%s\n" "${SCHEME_LIB}" >&6; }
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006138 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006139 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6140printf "%s\n" "not found" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006141 fi
6142
6143 for path in "${vi_cv_path_mzscheme_pfx}/lib" "${SCHEME_LIB}"; do
6144 if test "X$path" != "X"; then
Bram Moolenaard0573012017-10-28 21:11:06 +02006145 if test "x$MACOS_X" = "xyes"; then
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006146 MZSCHEME_LIBS="-framework Racket"
6147 MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
6148 elif test -f "${path}/libmzscheme3m.a"; then
6149 MZSCHEME_LIBS="${path}/libmzscheme3m.a"
6150 MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
6151 elif test -f "${path}/libracket3m.a"; then
6152 MZSCHEME_LIBS="${path}/libracket3m.a"
Bram Moolenaar588d2412020-10-03 14:24:19 +02006153 if test -f "${path}/librktio.a"; then
6154 MZSCHEME_LIBS="${MZSCHEME_LIBS} ${path}/librktio.a"
6155 fi
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006156 MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
6157 elif test -f "${path}/libracket.a"; then
6158 MZSCHEME_LIBS="${path}/libracket.a ${path}/libmzgc.a"
6159 elif test -f "${path}/libmzscheme.a"; then
6160 MZSCHEME_LIBS="${path}/libmzscheme.a ${path}/libmzgc.a"
6161 else
6162 if test -f "${path}/libmzscheme3m.so"; then
6163 MZSCHEME_LIBS="-L${path} -lmzscheme3m"
6164 MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
6165 elif test -f "${path}/libracket3m.so"; then
6166 MZSCHEME_LIBS="-L${path} -lracket3m"
6167 MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
6168 elif test -f "${path}/libracket.so"; then
6169 MZSCHEME_LIBS="-L${path} -lracket -lmzgc"
6170 else
6171 if test "$path" != "$SCHEME_LIB"; then
6172 continue
6173 fi
6174 MZSCHEME_LIBS="-L${path} -lmzscheme -lmzgc"
6175 fi
6176 if test "$GCC" = yes; then
6177 MZSCHEME_LIBS="${MZSCHEME_LIBS} -Wl,-rpath -Wl,${path}"
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00006178 elif test "$vim_cv_uname_output" = SunOS &&
6179 echo $vim_cv_uname_r_output | grep '^5' >/dev/null; then
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006180 MZSCHEME_LIBS="${MZSCHEME_LIBS} -R ${path}"
6181 fi
6182 fi
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006183 fi
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006184 if test "X$MZSCHEME_LIBS" != "X"; then
6185 break
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006186 fi
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006187 done
6188
Illia Bobyra96d5442023-08-30 16:30:15 +02006189 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if racket requires -pthread" >&5
6190printf %s "checking if racket requires -pthread... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006191 if test "X$SCHEME_LIB" != "X" && $FGREP -e -pthread "$SCHEME_LIB/buildinfo" >/dev/null ; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006192 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6193printf "%s\n" "yes" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006194 MZSCHEME_LIBS="${MZSCHEME_LIBS} -pthread"
6195 MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -pthread"
6196 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006197 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6198printf "%s\n" "no" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006199 fi
6200
Illia Bobyra96d5442023-08-30 16:30:15 +02006201 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for racket config directory" >&5
6202printf %s "checking for racket config directory... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006203 SCHEME_CONFIGDIR=`${vi_cv_path_mzscheme} -e '(require setup/dirs)(let ((p (find-config-dir))) (when (path? p) (display p)))'`
6204 if test "X$SCHEME_CONFIGDIR" != "X"; then
6205 MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -DMZSCHEME_CONFIGDIR='\"${SCHEME_CONFIGDIR}\"'"
Illia Bobyra96d5442023-08-30 16:30:15 +02006206 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${SCHEME_CONFIGDIR}" >&5
6207printf "%s\n" "${SCHEME_CONFIGDIR}" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006208 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006209 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6210printf "%s\n" "not found" >&6; }
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006211 fi
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006212
Illia Bobyra96d5442023-08-30 16:30:15 +02006213 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for racket collects directory" >&5
6214printf %s "checking for racket collects directory... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006215 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))))'`
6216 if test "X$SCHEME_COLLECTS" = "X"; then
6217 if test -d "$vi_cv_path_mzscheme_pfx/lib/plt/collects"; then
6218 SCHEME_COLLECTS=$vi_cv_path_mzscheme_pfx/lib/plt/
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006219 else
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006220 if test -d "$vi_cv_path_mzscheme_pfx/lib/racket/collects"; then
6221 SCHEME_COLLECTS=$vi_cv_path_mzscheme_pfx/lib/racket/
Bram Moolenaar75676462013-01-30 14:55:42 +01006222 else
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006223 if test -d "$vi_cv_path_mzscheme_pfx/share/racket/collects"; then
6224 SCHEME_COLLECTS=$vi_cv_path_mzscheme_pfx/share/racket/
6225 else
6226 if test -d "$vi_cv_path_mzscheme_pfx/collects"; then
6227 SCHEME_COLLECTS=$vi_cv_path_mzscheme_pfx/
6228 fi
Bram Moolenaar75676462013-01-30 14:55:42 +01006229 fi
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006230 fi
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006231 fi
Bram Moolenaarff4a37e2007-05-06 13:18:29 +00006232 fi
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006233 if test "X$SCHEME_COLLECTS" != "X" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006234 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${SCHEME_COLLECTS}" >&5
6235printf "%s\n" "${SCHEME_COLLECTS}" >&6; }
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006236 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006237 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6238printf "%s\n" "not found" >&6; }
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006239 fi
6240
Illia Bobyra96d5442023-08-30 16:30:15 +02006241 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mzscheme_base.c" >&5
6242printf %s "checking for mzscheme_base.c... " >&6; }
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006243 if test -f "${SCHEME_COLLECTS}collects/scheme/base.ss" ; then
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006244 MZSCHEME_EXTRA="mzscheme_base.c"
Bram Moolenaara2aa31a2014-02-23 22:52:40 +01006245 MZSCHEME_MZC="${vi_cv_path_mzscheme_pfx}/bin/mzc"
6246 MZSCHEME_MOD="++lib scheme/base"
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006247 else
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006248 if test -f "${SCHEME_COLLECTS}collects/scheme/base.rkt" ; then
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006249 MZSCHEME_EXTRA="mzscheme_base.c"
Bram Moolenaara2aa31a2014-02-23 22:52:40 +01006250 MZSCHEME_MZC="${vi_cv_path_mzscheme_pfx}/bin/mzc"
6251 MZSCHEME_MOD="++lib scheme/base"
6252 else
6253 if test -f "${SCHEME_COLLECTS}collects/racket/base.rkt" ; then
6254 MZSCHEME_EXTRA="mzscheme_base.c"
6255 MZSCHEME_MZC="${vi_cv_path_mzscheme_pfx}/bin/raco ctool"
6256 MZSCHEME_MOD=""
6257 fi
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006258 fi
6259 fi
6260 if test "X$MZSCHEME_EXTRA" != "X" ; then
6261 MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -DINCLUDE_MZSCHEME_BASE"
Illia Bobyra96d5442023-08-30 16:30:15 +02006262 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: needed" >&5
6263printf "%s\n" "needed" >&6; }
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006264 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006265 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not needed" >&5
6266printf "%s\n" "not needed" >&6; }
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006267 fi
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006268
Illia Bobyra96d5442023-08-30 16:30:15 +02006269 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ffi_type_void in -lffi" >&5
6270printf %s "checking for ffi_type_void in -lffi... " >&6; }
6271if test ${ac_cv_lib_ffi_ffi_type_void+y}
6272then :
6273 printf %s "(cached) " >&6
6274else $as_nop
Bram Moolenaar9e902192013-07-17 18:58:11 +02006275 ac_check_lib_save_LIBS=$LIBS
6276LIBS="-lffi $LIBS"
6277cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6278/* end confdefs.h. */
6279
6280/* Override any GCC internal prototype to avoid an error.
6281 Use char because int might match the return type of a GCC
6282 builtin and then its argument prototype would still apply. */
Bram Moolenaar9e902192013-07-17 18:58:11 +02006283char ffi_type_void ();
6284int
Illia Bobyra96d5442023-08-30 16:30:15 +02006285main (void)
Bram Moolenaar9e902192013-07-17 18:58:11 +02006286{
6287return ffi_type_void ();
6288 ;
6289 return 0;
6290}
6291_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02006292if ac_fn_c_try_link "$LINENO"
6293then :
Bram Moolenaar9e902192013-07-17 18:58:11 +02006294 ac_cv_lib_ffi_ffi_type_void=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02006295else $as_nop
Bram Moolenaar9e902192013-07-17 18:58:11 +02006296 ac_cv_lib_ffi_ffi_type_void=no
6297fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006298rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar9e902192013-07-17 18:58:11 +02006299 conftest$ac_exeext conftest.$ac_ext
6300LIBS=$ac_check_lib_save_LIBS
6301fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006302{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ffi_ffi_type_void" >&5
6303printf "%s\n" "$ac_cv_lib_ffi_ffi_type_void" >&6; }
6304if test "x$ac_cv_lib_ffi_ffi_type_void" = xyes
6305then :
Bram Moolenaar9e902192013-07-17 18:58:11 +02006306 MZSCHEME_LIBS="$MZSCHEME_LIBS -lffi"
6307fi
6308
6309
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006310 MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -I${SCHEME_INC} \
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006311 -DMZSCHEME_COLLECTS='\"${SCHEME_COLLECTS}collects\"'"
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006312
Illia Bobyra96d5442023-08-30 16:30:15 +02006313 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compile and link flags for MzScheme are sane" >&5
6314printf %s "checking if compile and link flags for MzScheme are sane... " >&6; }
Bram Moolenaar9e902192013-07-17 18:58:11 +02006315 cflags_save=$CFLAGS
6316 libs_save=$LIBS
6317 CFLAGS="$CFLAGS $MZSCHEME_CFLAGS"
6318 LIBS="$LIBS $MZSCHEME_LIBS"
6319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6320/* end confdefs.h. */
6321
6322int
Illia Bobyra96d5442023-08-30 16:30:15 +02006323main (void)
Bram Moolenaar9e902192013-07-17 18:58:11 +02006324{
6325
6326 ;
6327 return 0;
6328}
6329_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02006330if ac_fn_c_try_link "$LINENO"
6331then :
6332 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6333printf "%s\n" "yes" >&6; }; mzs_ok=yes
6334else $as_nop
6335 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no: MZSCHEME DISABLED" >&5
6336printf "%s\n" "no: MZSCHEME DISABLED" >&6; }; mzs_ok=no
Bram Moolenaar9e902192013-07-17 18:58:11 +02006337fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006338rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar9e902192013-07-17 18:58:11 +02006339 conftest$ac_exeext conftest.$ac_ext
6340 CFLAGS=$cflags_save
6341 LIBS=$libs_save
6342 if test $mzs_ok = yes; then
6343 MZSCHEME_SRC="if_mzsch.c"
6344 MZSCHEME_OBJ="objects/if_mzsch.o"
6345 MZSCHEME_PRO="if_mzsch.pro"
Illia Bobyra96d5442023-08-30 16:30:15 +02006346 printf "%s\n" "#define FEAT_MZSCHEME 1" >>confdefs.h
Bram Moolenaar9e902192013-07-17 18:58:11 +02006347
6348 else
6349 MZSCHEME_CFLAGS=
6350 MZSCHEME_LIBS=
6351 MZSCHEME_EXTRA=
6352 MZSCHEME_MZC=
6353 fi
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006354 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006355
6356
6357
6358
6359
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006360
6361
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006362fi
6363
6364
Illia Bobyra96d5442023-08-30 16:30:15 +02006365{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-perlinterp argument" >&5
6366printf %s "checking --enable-perlinterp argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00006367# Check whether --enable-perlinterp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02006368if test ${enable_perlinterp+y}
6369then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00006370 enableval=$enable_perlinterp;
Illia Bobyra96d5442023-08-30 16:30:15 +02006371else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00006372 enable_perlinterp="no"
Bram Moolenaar446cb832008-06-24 21:56:24 +00006373fi
6374
Illia Bobyra96d5442023-08-30 16:30:15 +02006375{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_perlinterp" >&5
6376printf "%s\n" "$enable_perlinterp" >&6; }
Bram Moolenaare06c1882010-07-21 22:05:20 +02006377if test "$enable_perlinterp" = "yes" -o "$enable_perlinterp" = "dynamic"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00006378 if test "$has_eval" = "no"; then
Martin Tournoij7904fa42022-10-04 16:28:45 +01006379 as_fn_error $? "cannot use Perl with tiny features" "$LINENO" 5
Bram Moolenaar3c124e32016-01-31 14:36:58 +01006380 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006381
Bram Moolenaar071d4272004-06-13 20:20:40 +00006382 # Extract the first word of "perl", so it can be a program name with args.
6383set dummy perl; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02006384{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6385printf %s "checking for $ac_word... " >&6; }
6386if test ${ac_cv_path_vi_cv_path_perl+y}
6387then :
6388 printf %s "(cached) " >&6
6389else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006390 case $vi_cv_path_perl in
6391 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00006392 ac_cv_path_vi_cv_path_perl="$vi_cv_path_perl" # Let the user override the test with a path.
6393 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00006394 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006395 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6396for as_dir in $PATH
6397do
6398 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02006399 case $as_dir in #(((
6400 '') as_dir=./ ;;
6401 */) ;;
6402 *) as_dir=$as_dir/ ;;
6403 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006404 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02006405 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6406 ac_cv_path_vi_cv_path_perl="$as_dir$ac_word$ac_exec_ext"
6407 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006408 break 2
6409 fi
6410done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006411 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00006412IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006413
Bram Moolenaar071d4272004-06-13 20:20:40 +00006414 ;;
6415esac
6416fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006417vi_cv_path_perl=$ac_cv_path_vi_cv_path_perl
Bram Moolenaar071d4272004-06-13 20:20:40 +00006418if test -n "$vi_cv_path_perl"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006419 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_perl" >&5
6420printf "%s\n" "$vi_cv_path_perl" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006421else
Illia Bobyra96d5442023-08-30 16:30:15 +02006422 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6423printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006424fi
6425
Bram Moolenaar446cb832008-06-24 21:56:24 +00006426
Bram Moolenaar071d4272004-06-13 20:20:40 +00006427 if test "X$vi_cv_path_perl" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006428 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Perl version" >&5
6429printf %s "checking Perl version... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006430 if $vi_cv_path_perl -e 'require 5.003_01' >/dev/null 2>/dev/null; then
6431 eval `$vi_cv_path_perl -V:usethreads`
Bram Moolenaare06c1882010-07-21 22:05:20 +02006432 eval `$vi_cv_path_perl -V:libperl`
Bram Moolenaar071d4272004-06-13 20:20:40 +00006433 if test "X$usethreads" = "XUNKNOWN" -o "X$usethreads" = "Xundef"; then
6434 badthreads=no
6435 else
6436 if $vi_cv_path_perl -e 'require 5.6.0' >/dev/null 2>/dev/null; then
6437 eval `$vi_cv_path_perl -V:use5005threads`
6438 if test "X$use5005threads" = "XUNKNOWN" -o "X$use5005threads" = "Xundef"; then
6439 badthreads=no
6440 else
6441 badthreads=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02006442 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: >>> Perl > 5.6 with 5.5 threads cannot be used <<<" >&5
6443printf "%s\n" ">>> Perl > 5.6 with 5.5 threads cannot be used <<<" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006444 fi
6445 else
6446 badthreads=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02006447 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: >>> Perl 5.5 with threads cannot be used <<<" >&5
6448printf "%s\n" ">>> Perl 5.5 with threads cannot be used <<<" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006449 fi
6450 fi
6451 if test $badthreads = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006452 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: OK" >&5
6453printf "%s\n" "OK" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006454 eval `$vi_cv_path_perl -V:shrpenv`
6455 if test "X$shrpenv" = "XUNKNOWN"; then # pre 5.003_04
6456 shrpenv=""
6457 fi
6458 vi_cv_perllib=`$vi_cv_path_perl -MConfig -e 'print $Config{privlibexp}'`
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006459
Bram Moolenaard5f62b12014-08-17 17:05:44 +02006460 vi_cv_perl_extutils=unknown_perl_extutils_path
Zdenek Dohnal1b1c9f22023-11-02 20:19:06 +01006461
6462 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-xsubpp path" >&5
6463printf %s "checking --with-xsubpp path... " >&6; }
6464 vi_cv_perl_xsubpp=
6465
6466# Check whether --with-xsubpp was given.
6467if test ${with_xsubpp+y}
6468then :
6469 withval=$with_xsubpp;
6470 if test -f "$withval"
6471 then
6472 vi_cv_perl_xsubpp="$withval"
6473 fi
6474
6475fi
6476
6477
6478 if test "x$vi_cv_perl_xsubpp" = "x"
6479 then
6480 for extutils_rel_path in ExtUtils vendor_perl/ExtUtils; do
6481 xsubpp_path="$vi_cv_perllib/$extutils_rel_path/xsubpp"
6482 if test -f "$xsubpp_path"; then
6483 vi_cv_perl_xsubpp="$xsubpp_path"
6484 fi
6485 done
6486 fi
6487
6488 if test "x$vi_cv_perl_xsubpp" = "x"
6489 then
6490 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: empty" >&5
6491printf "%s\n" "empty" >&6; }
6492 else
6493 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_perl_xsubpp" >&5
6494printf "%s\n" "$vi_cv_perl_xsubpp" >&6; }
6495 fi
6496
Bram Moolenaard5f62b12014-08-17 17:05:44 +02006497
Christian Brabandt2f9aef42024-02-12 23:12:26 +01006498 perlcppflags=`$vi_cv_path_perl -Mlib=$srcdir -MExtUtils::Embed \
Bram Moolenaare8ff56b2017-09-14 23:06:23 +02006499 -e 'ccflags;perl_inc;print"\n"' | sed -e 's/-fno[^ ]*//' \
6500 -e 's/-fdebug-prefix-map[^ ]*//g' \
Bram Moolenaar1ec96c92017-09-27 21:42:08 +02006501 -e 's/-pipe //' \
Christian Brabandt2f9aef42024-02-12 23:12:26 +01006502 -e 's/-flto\(=auto\)\? //' \
Bram Moolenaar1ec96c92017-09-27 21:42:08 +02006503 -e 's/-W[^ ]*//g' \
Bram Moolenaar92021622017-10-12 12:33:43 +02006504 -e 's/-D_FORTIFY_SOURCE=.//g'`
Christian Brabandt9c0ff472024-05-11 20:18:21 +02006505 perllibs=`cd $srcdir; $vi_cv_path_perl -MExtUtils::Embed -e 'ldopts' | \
Bram Moolenaar071d4272004-06-13 20:20:40 +00006506 sed -e '/Warning/d' -e '/Note (probably harmless)/d' \
Christian Brabandt9c0ff472024-05-11 20:18:21 +02006507 -e 's/-specs=[^ ]*//g' \
Bram Moolenaar071d4272004-06-13 20:20:40 +00006508 -e 's/-bE:perl.exp//' -e 's/-lc //'`
Christian Brabandt9c0ff472024-05-11 20:18:21 +02006509 perlldflags=`cd $srcdir; $vi_cv_path_perl -MExtUtils::Embed \
6510 -e 'ccdlflags' | sed -e 's/-bE:perl.exp//' \
6511 -e 's/-specs=[^ ]*//g' `
Bram Moolenaar071d4272004-06-13 20:20:40 +00006512
Illia Bobyra96d5442023-08-30 16:30:15 +02006513 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compile and link flags for Perl are sane" >&5
6514printf %s "checking if compile and link flags for Perl are sane... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006515 cflags_save=$CFLAGS
6516 libs_save=$LIBS
6517 ldflags_save=$LDFLAGS
6518 CFLAGS="$CFLAGS $perlcppflags"
6519 LIBS="$LIBS $perllibs"
Bram Moolenaara6cc0312013-06-18 23:31:55 +02006520 perlldflags=`echo "$perlldflags" | sed -e 's/^ *//g'`
Bram Moolenaar071d4272004-06-13 20:20:40 +00006521 LDFLAGS="$perlldflags $LDFLAGS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006523/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00006524
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006525int
Illia Bobyra96d5442023-08-30 16:30:15 +02006526main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006527{
6528
6529 ;
6530 return 0;
6531}
6532_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02006533if ac_fn_c_try_link "$LINENO"
6534then :
6535 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6536printf "%s\n" "yes" >&6; }; perl_ok=yes
6537else $as_nop
6538 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no: PERL DISABLED" >&5
6539printf "%s\n" "no: PERL DISABLED" >&6; }; perl_ok=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00006540fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006541rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006542 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +00006543 CFLAGS=$cflags_save
6544 LIBS=$libs_save
6545 LDFLAGS=$ldflags_save
6546 if test $perl_ok = yes; then
6547 if test "X$perlcppflags" != "X"; then
Bram Moolenaar1ec96c92017-09-27 21:42:08 +02006548 PERL_CFLAGS=$perlcppflags
Bram Moolenaar071d4272004-06-13 20:20:40 +00006549 fi
6550 if test "X$perlldflags" != "X"; then
Bram Moolenaar2bcaec32014-03-27 18:51:11 +01006551 if test "X`echo \"$LDFLAGS\" | $FGREP -e \"$perlldflags\"`" = "X"; then
Bram Moolenaara6cc0312013-06-18 23:31:55 +02006552 LDFLAGS="$perlldflags $LDFLAGS"
6553 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006554 fi
6555 PERL_LIBS=$perllibs
6556 PERL_SRC="auto/if_perl.c if_perlsfio.c"
6557 PERL_OBJ="objects/if_perl.o objects/if_perlsfio.o"
6558 PERL_PRO="if_perl.pro if_perlsfio.pro"
Illia Bobyra96d5442023-08-30 16:30:15 +02006559 printf "%s\n" "#define FEAT_PERL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00006560
6561 fi
6562 fi
6563 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006564 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: >>> too old; need Perl version 5.003_01 or later <<<" >&5
6565printf "%s\n" ">>> too old; need Perl version 5.003_01 or later <<<" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006566 fi
6567 fi
6568
Bram Moolenaard0573012017-10-28 21:11:06 +02006569 if test "x$MACOS_X" = "xyes"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00006570 dir=/System/Library/Perl
6571 darwindir=$dir/darwin
6572 if test -d $darwindir; then
6573 PERL=/usr/bin/perl
6574 else
6575 dir=/System/Library/Perl/5.8.1
6576 darwindir=$dir/darwin-thread-multi-2level
6577 if test -d $darwindir; then
6578 PERL=/usr/bin/perl
6579 fi
6580 fi
6581 if test -n "$PERL"; then
6582 PERL_DIR="$dir"
6583 PERL_CFLAGS="-DFEAT_PERL -I$darwindir/CORE"
6584 PERL_OBJ="objects/if_perl.o objects/if_perlsfio.o $darwindir/auto/DynaLoader/DynaLoader.a"
6585 PERL_LIBS="-L$darwindir/CORE -lperl"
6586 fi
Bram Moolenaar5dff57d2010-07-24 16:19:44 +02006587 PERL_LIBS=`echo "$PERL_LIBS" | sed -e 's/-arch\ ppc//' -e 's/-arch\ i386//' -e 's/-arch\ x86_64//'`
6588 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 +00006589 fi
Bram Moolenaare06c1882010-07-21 22:05:20 +02006590 if test "$enable_perlinterp" = "dynamic"; then
6591 if test "$perl_ok" = "yes" -a "X$libperl" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006592 printf "%s\n" "#define DYNAMIC_PERL 1" >>confdefs.h
Bram Moolenaare06c1882010-07-21 22:05:20 +02006593
6594 PERL_CFLAGS="-DDYNAMIC_PERL_DLL=\\\"$libperl\\\" $PERL_CFLAGS"
Christian Brabandt55460da2023-08-29 21:31:28 +02006595 PERL_LIBS=""
Bram Moolenaare06c1882010-07-21 22:05:20 +02006596 fi
6597 fi
Bram Moolenaarf788a062011-12-14 20:51:25 +01006598
6599 if test "$fail_if_missing" = "yes" -a "$perl_ok" != "yes"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01006600 as_fn_error $? "could not configure perl" "$LINENO" 5
Bram Moolenaarf788a062011-12-14 20:51:25 +01006601 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006602fi
6603
6604
6605
6606
6607
6608
6609
ichizok8bb3fe42021-12-28 15:51:45 +00006610
Illia Bobyra96d5442023-08-30 16:30:15 +02006611{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-pythoninterp argument" >&5
6612printf %s "checking --enable-pythoninterp argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00006613# Check whether --enable-pythoninterp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02006614if test ${enable_pythoninterp+y}
6615then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00006616 enableval=$enable_pythoninterp;
Illia Bobyra96d5442023-08-30 16:30:15 +02006617else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00006618 enable_pythoninterp="no"
Bram Moolenaar446cb832008-06-24 21:56:24 +00006619fi
6620
Illia Bobyra96d5442023-08-30 16:30:15 +02006621{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_pythoninterp" >&5
6622printf "%s\n" "$enable_pythoninterp" >&6; }
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02006623if test "$enable_pythoninterp" = "yes" -o "$enable_pythoninterp" = "dynamic"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00006624 if test "$has_eval" = "no"; then
Martin Tournoij7904fa42022-10-04 16:28:45 +01006625 as_fn_error $? "cannot use Python with tiny features" "$LINENO" 5
Bram Moolenaar0b105412014-11-30 13:34:23 +01006626 fi
6627
Illia Bobyra96d5442023-08-30 16:30:15 +02006628 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-python-command argument" >&5
6629printf %s "checking --with-python-command argument... " >&6; }
Bram Moolenaare1a32312018-04-15 16:03:25 +02006630
6631
6632# Check whether --with-python-command was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02006633if test ${with_python_command+y}
6634then :
6635 withval=$with_python_command; vi_cv_path_python="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python" >&5
6636printf "%s\n" "$vi_cv_path_python" >&6; }
6637else $as_nop
6638 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6639printf "%s\n" "no" >&6; }
Bram Moolenaare1a32312018-04-15 16:03:25 +02006640fi
6641
6642
6643 if test "X$vi_cv_path_python" = "X"; then
Bram Moolenaar09ba6d72012-12-12 14:25:05 +01006644 for ac_prog in python2 python
6645do
6646 # Extract the first word of "$ac_prog", so it can be a program name with args.
6647set dummy $ac_prog; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02006648{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6649printf %s "checking for $ac_word... " >&6; }
6650if test ${ac_cv_path_vi_cv_path_python+y}
6651then :
6652 printf %s "(cached) " >&6
6653else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006654 case $vi_cv_path_python in
6655 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00006656 ac_cv_path_vi_cv_path_python="$vi_cv_path_python" # Let the user override the test with a path.
6657 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00006658 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006659 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6660for as_dir in $PATH
6661do
6662 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02006663 case $as_dir in #(((
6664 '') as_dir=./ ;;
6665 */) ;;
6666 *) as_dir=$as_dir/ ;;
6667 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006668 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02006669 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6670 ac_cv_path_vi_cv_path_python="$as_dir$ac_word$ac_exec_ext"
6671 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006672 break 2
6673 fi
6674done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006675 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00006676IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006677
Bram Moolenaar071d4272004-06-13 20:20:40 +00006678 ;;
6679esac
6680fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006681vi_cv_path_python=$ac_cv_path_vi_cv_path_python
Bram Moolenaar071d4272004-06-13 20:20:40 +00006682if test -n "$vi_cv_path_python"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006683 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python" >&5
6684printf "%s\n" "$vi_cv_path_python" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006685else
Illia Bobyra96d5442023-08-30 16:30:15 +02006686 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6687printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006688fi
6689
Bram Moolenaar446cb832008-06-24 21:56:24 +00006690
Bram Moolenaar09ba6d72012-12-12 14:25:05 +01006691 test -n "$vi_cv_path_python" && break
6692done
6693
Bram Moolenaare1a32312018-04-15 16:03:25 +02006694 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006695 if test "X$vi_cv_path_python" != "X"; then
6696
Illia Bobyra96d5442023-08-30 16:30:15 +02006697 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python version" >&5
6698printf %s "checking Python version... " >&6; }
6699if test ${vi_cv_var_python_version+y}
6700then :
6701 printf %s "(cached) " >&6
6702else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00006703 vi_cv_var_python_version=`
6704 ${vi_cv_path_python} -c 'import sys; print sys.version[:3]'`
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006705
Bram Moolenaar071d4272004-06-13 20:20:40 +00006706fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006707{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_var_python_version" >&5
6708printf "%s\n" "$vi_cv_var_python_version" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006709
Illia Bobyra96d5442023-08-30 16:30:15 +02006710 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python is 2.3 or better" >&5
6711printf %s "checking Python is 2.3 or better... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006712 if ${vi_cv_path_python} -c \
Bram Moolenaarc09a6d62013-06-10 21:27:29 +02006713 "import sys; sys.exit(${vi_cv_var_python_version} < 2.3)"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006714 then
Illia Bobyra96d5442023-08-30 16:30:15 +02006715 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yep" >&5
6716printf "%s\n" "yep" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006717
Illia Bobyra96d5442023-08-30 16:30:15 +02006718 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's install prefix" >&5
6719printf %s "checking Python's install prefix... " >&6; }
6720if test ${vi_cv_path_python_pfx+y}
6721then :
6722 printf %s "(cached) " >&6
6723else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00006724 vi_cv_path_python_pfx=`
6725 ${vi_cv_path_python} -c \
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006726 "import sys; print sys.prefix"`
Bram Moolenaar071d4272004-06-13 20:20:40 +00006727fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006728{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python_pfx" >&5
6729printf "%s\n" "$vi_cv_path_python_pfx" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006730
Illia Bobyra96d5442023-08-30 16:30:15 +02006731 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's execution prefix" >&5
6732printf %s "checking Python's execution prefix... " >&6; }
6733if test ${vi_cv_path_python_epfx+y}
6734then :
6735 printf %s "(cached) " >&6
6736else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00006737 vi_cv_path_python_epfx=`
6738 ${vi_cv_path_python} -c \
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006739 "import sys; print sys.exec_prefix"`
Bram Moolenaar071d4272004-06-13 20:20:40 +00006740fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006741{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python_epfx" >&5
6742printf "%s\n" "$vi_cv_path_python_epfx" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006743
Bram Moolenaar071d4272004-06-13 20:20:40 +00006744
Illia Bobyra96d5442023-08-30 16:30:15 +02006745 if test ${vi_cv_path_pythonpath+y}
6746then :
6747 printf %s "(cached) " >&6
6748else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00006749 vi_cv_path_pythonpath=`
6750 unset PYTHONPATH;
6751 ${vi_cv_path_python} -c \
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006752 "import sys, string; print string.join(sys.path,':')"`
Bram Moolenaar071d4272004-06-13 20:20:40 +00006753fi
6754
6755
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006756
6757
Bram Moolenaar446cb832008-06-24 21:56:24 +00006758# Check whether --with-python-config-dir was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02006759if test ${with_python_config_dir+y}
6760then :
Bram Moolenaard0882402018-04-10 18:13:05 +02006761 withval=$with_python_config_dir; vi_cv_path_python_conf="${withval}"; have_python_config_dir=1
Bram Moolenaar446cb832008-06-24 21:56:24 +00006762fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006763
Bram Moolenaar446cb832008-06-24 21:56:24 +00006764
Illia Bobyra96d5442023-08-30 16:30:15 +02006765 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's configuration directory" >&5
6766printf %s "checking Python's configuration directory... " >&6; }
6767if test ${vi_cv_path_python_conf+y}
6768then :
6769 printf %s "(cached) " >&6
6770else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006771
Bram Moolenaar071d4272004-06-13 20:20:40 +00006772 vi_cv_path_python_conf=
Bram Moolenaarac499e32013-06-02 19:14:17 +02006773 d=`${vi_cv_path_python} -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('LIBPL')"`
6774 if test -d "$d" && test -f "$d/config.c"; then
6775 vi_cv_path_python_conf="$d"
6776 else
6777 for path in "${vi_cv_path_python_pfx}" "${vi_cv_path_python_epfx}"; do
6778 for subdir in lib64 lib share; do
6779 d="${path}/${subdir}/python${vi_cv_var_python_version}/config"
6780 if test -d "$d" && test -f "$d/config.c"; then
6781 vi_cv_path_python_conf="$d"
6782 fi
6783 done
Bram Moolenaar071d4272004-06-13 20:20:40 +00006784 done
Bram Moolenaarac499e32013-06-02 19:14:17 +02006785 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006786
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006787fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006788{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python_conf" >&5
6789printf "%s\n" "$vi_cv_path_python_conf" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006790
6791 PYTHON_CONFDIR="${vi_cv_path_python_conf}"
6792
6793 if test "X$PYTHON_CONFDIR" = "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006794 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: can't find it!" >&5
6795printf "%s\n" "can't find it!" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006796 else
6797
Illia Bobyra96d5442023-08-30 16:30:15 +02006798 if test ${vi_cv_path_python_plibs+y}
6799then :
6800 printf %s "(cached) " >&6
6801else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006802
Bram Moolenaar01dd60c2008-07-24 14:24:48 +00006803 pwd=`pwd`
6804 tmp_mkf="$pwd/config-PyMake$$"
6805 cat -- "${PYTHON_CONFDIR}/Makefile" - <<'eof' >"${tmp_mkf}"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006806__:
Bram Moolenaar218116c2010-05-20 21:46:00 +02006807 @echo "python_BASEMODLIBS='$(BASEMODLIBS)'"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006808 @echo "python_LIBS='$(LIBS)'"
6809 @echo "python_SYSLIBS='$(SYSLIBS)'"
6810 @echo "python_LINKFORSHARED='$(LINKFORSHARED)'"
Bram Moolenaarf94a13c2012-09-21 13:26:49 +02006811 @echo "python_DLLLIBRARY='$(DLLLIBRARY)'"
Bram Moolenaar2a7e2a62010-07-24 15:19:11 +02006812 @echo "python_INSTSONAME='$(INSTSONAME)'"
Bram Moolenaar6c927552015-03-24 12:21:33 +01006813 @echo "python_PYTHONFRAMEWORK='$(PYTHONFRAMEWORK)'"
6814 @echo "python_PYTHONFRAMEWORKPREFIX='$(PYTHONFRAMEWORKPREFIX)'"
6815 @echo "python_PYTHONFRAMEWORKINSTALLDIR='$(PYTHONFRAMEWORKINSTALLDIR)'"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006816eof
Bram Moolenaar01dd60c2008-07-24 14:24:48 +00006817 eval "`cd ${PYTHON_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`"
6818 rm -f -- "${tmp_mkf}"
Bram Moolenaard0573012017-10-28 21:11:06 +02006819 if test "x$MACOS_X" = "xyes" && test -n "${python_PYTHONFRAMEWORK}" && ${vi_cv_path_python} -c \
Bram Moolenaar071d4272004-06-13 20:20:40 +00006820 "import sys; sys.exit(${vi_cv_var_python_version} < 2.3)"; then
6821 vi_cv_path_python_plibs="-framework Python"
Bram Moolenaar6c927552015-03-24 12:21:33 +01006822 if test "x${vi_cv_path_python}" != "x/usr/bin/python" && test -n "${python_PYTHONFRAMEWORKPREFIX}"; then
6823 vi_cv_path_python_plibs="-F${python_PYTHONFRAMEWORKPREFIX} -framework Python"
6824 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006825 else
Bram Moolenaar9ce42132018-04-11 22:19:36 +02006826 vi_cv_path_python_plibs="-L${PYTHON_CONFDIR} -lpython${vi_cv_var_python_version}"
Bram Moolenaara161e262015-03-24 15:14:27 +01006827 if test -n "${python_LINKFORSHARED}" && test -n "${python_PYTHONFRAMEWORKPREFIX}"; then
Bram Moolenaar6c927552015-03-24 12:21:33 +01006828 python_link_symbol=`echo ${python_LINKFORSHARED} | sed 's/\([^ \t][^ \t]*[ \t][ \t]*[^ \t][^ \t]*\)[ \t].*/\1/'`
6829 python_link_path=`echo ${python_LINKFORSHARED} | sed 's/\([^ \t][^ \t]*[ \t][ \t]*[^ \t][^ \t]*\)[ \t][ \t]*\(.*\)/\2/'`
6830 if test -n "${python_link_path}" && ! test -x "${python_link_path}"; then
6831 python_link_path="${python_PYTHONFRAMEWORKPREFIX}/${python_link_path}"
6832 if test -n "${python_link_path}" && ! test -x "${python_link_path}"; then
6833 python_link_path="${python_PYTHONFRAMEWORKINSTALLDIR}/Versions/${vi_cv_var_python_version}/${python_PYTHONFRAMEWORK}"
6834 fi
6835 python_LINKFORSHARED="${python_link_symbol} ${python_link_path}"
6836 fi
6837 fi
Bram Moolenaar218116c2010-05-20 21:46:00 +02006838 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 +00006839 vi_cv_path_python_plibs=`echo $vi_cv_path_python_plibs | sed s/-ltermcap//`
6840 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006841
Bram Moolenaar071d4272004-06-13 20:20:40 +00006842fi
6843
Illia Bobyra96d5442023-08-30 16:30:15 +02006844 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's dll name" >&5
6845printf %s "checking Python's dll name... " >&6; }
6846if test ${vi_cv_dll_name_python+y}
6847then :
6848 printf %s "(cached) " >&6
6849else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00006850
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02006851 if test "X$python_DLLLIBRARY" != "X"; then
6852 vi_cv_dll_name_python="$python_DLLLIBRARY"
6853 else
6854 vi_cv_dll_name_python="$python_INSTSONAME"
6855 fi
6856
6857fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006858{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_dll_name_python" >&5
6859printf "%s\n" "$vi_cv_dll_name_python" >&6; }
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02006860
Bram Moolenaar071d4272004-06-13 20:20:40 +00006861 PYTHON_LIBS="${vi_cv_path_python_plibs}"
6862 if test "${vi_cv_path_python_pfx}" = "${vi_cv_path_python_epfx}"; then
Bram Moolenaar04249582018-04-10 13:29:34 +02006863 PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version}"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006864 else
Bram Moolenaar04249582018-04-10 13:29:34 +02006865 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 +00006866 fi
Bram Moolenaar3a21d9c2018-04-10 20:26:20 +02006867 if test "X$have_python_config_dir" = "X1" -a "$enable_pythoninterp" = "dynamic"; then
Bram Moolenaard0882402018-04-10 18:13:05 +02006868 PYTHON_CFLAGS="${PYTHON_CFLAGS} -DPYTHON_HOME='\"${vi_cv_path_python_pfx}\"'"
6869
6870 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006871 PYTHON_SRC="if_python.c"
Bram Moolenaar9bdb9a02012-07-25 16:32:08 +02006872 PYTHON_OBJ="objects/if_python.o"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006873
Illia Bobyra96d5442023-08-30 16:30:15 +02006874 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -pthread should be used" >&5
6875printf %s "checking if -pthread should be used... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006876 threadsafe_flag=
6877 thread_lib=
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00006878 if test "$vim_cv_uname_output" != Darwin; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00006879 test "$GCC" = yes && threadsafe_flag="-pthread"
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00006880 if test "$vim_cv_uname_output" = FreeBSD; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00006881 threadsafe_flag="-D_THREAD_SAFE"
6882 thread_lib="-pthread"
6883 fi
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00006884 if test "$vim_cv_uname_output" = SunOS; then
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02006885 threadsafe_flag="-pthreads"
6886 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006887 fi
6888 libs_save_old=$LIBS
6889 if test -n "$threadsafe_flag"; then
6890 cflags_save=$CFLAGS
6891 CFLAGS="$CFLAGS $threadsafe_flag"
6892 LIBS="$LIBS $thread_lib"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006894/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00006895
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006896int
Illia Bobyra96d5442023-08-30 16:30:15 +02006897main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006898{
6899
6900 ;
6901 return 0;
6902}
6903_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02006904if ac_fn_c_try_link "$LINENO"
6905then :
6906 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6907printf "%s\n" "yes" >&6; }; PYTHON_CFLAGS="$PYTHON_CFLAGS $threadsafe_flag"
6908else $as_nop
6909 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6910printf "%s\n" "no" >&6; }; LIBS=$libs_save_old
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006911
Bram Moolenaar071d4272004-06-13 20:20:40 +00006912fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006913rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006914 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +00006915 CFLAGS=$cflags_save
6916 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006917 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6918printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006919 fi
6920
Illia Bobyra96d5442023-08-30 16:30:15 +02006921 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compile and link flags for Python are sane" >&5
6922printf %s "checking if compile and link flags for Python are sane... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006923 cflags_save=$CFLAGS
6924 libs_save=$LIBS
Bram Moolenaar69f787a2010-07-11 20:52:58 +02006925 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006926 LIBS="$LIBS $PYTHON_LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006928/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00006929
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006930int
Illia Bobyra96d5442023-08-30 16:30:15 +02006931main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006932{
6933
6934 ;
6935 return 0;
6936}
6937_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02006938if ac_fn_c_try_link "$LINENO"
6939then :
6940 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6941printf "%s\n" "yes" >&6; }; python_ok=yes
6942else $as_nop
6943 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no: PYTHON DISABLED" >&5
6944printf "%s\n" "no: PYTHON DISABLED" >&6; }; python_ok=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00006945fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006946rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006947 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +00006948 CFLAGS=$cflags_save
6949 LIBS=$libs_save
6950 if test $python_ok = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006951 printf "%s\n" "#define FEAT_PYTHON 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00006952
6953 else
6954 LIBS=$libs_save_old
6955 PYTHON_SRC=
6956 PYTHON_OBJ=
6957 PYTHON_LIBS=
6958 PYTHON_CFLAGS=
6959 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006960 fi
6961 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006962 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: too old" >&5
6963printf "%s\n" "too old" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006964 fi
6965 fi
Bram Moolenaarf788a062011-12-14 20:51:25 +01006966
6967 if test "$fail_if_missing" = "yes" -a "$python_ok" != "yes"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01006968 as_fn_error $? "could not configure python" "$LINENO" 5
Bram Moolenaarf788a062011-12-14 20:51:25 +01006969 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006970fi
6971
6972
6973
6974
6975
6976
6977
ichizok8bb3fe42021-12-28 15:51:45 +00006978
Illia Bobyra96d5442023-08-30 16:30:15 +02006979{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-python3interp argument" >&5
6980printf %s "checking --enable-python3interp argument... " >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02006981# Check whether --enable-python3interp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02006982if test ${enable_python3interp+y}
6983then :
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02006984 enableval=$enable_python3interp;
Illia Bobyra96d5442023-08-30 16:30:15 +02006985else $as_nop
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02006986 enable_python3interp="no"
6987fi
6988
Illia Bobyra96d5442023-08-30 16:30:15 +02006989{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_python3interp" >&5
6990printf "%s\n" "$enable_python3interp" >&6; }
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02006991if test "$enable_python3interp" = "yes" -o "$enable_python3interp" = "dynamic"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00006992 if test "$has_eval" = "no"; then
Martin Tournoij7904fa42022-10-04 16:28:45 +01006993 as_fn_error $? "cannot use Python with tiny features" "$LINENO" 5
Bram Moolenaar0b105412014-11-30 13:34:23 +01006994 fi
6995
Illia Bobyra96d5442023-08-30 16:30:15 +02006996 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-python3-command argument" >&5
6997printf %s "checking --with-python3-command argument... " >&6; }
Bram Moolenaare1a32312018-04-15 16:03:25 +02006998
6999
7000# Check whether --with-python3-command was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02007001if test ${with_python3_command+y}
7002then :
7003 withval=$with_python3_command; vi_cv_path_python3="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3" >&5
7004printf "%s\n" "$vi_cv_path_python3" >&6; }
7005else $as_nop
7006 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7007printf "%s\n" "no" >&6; }
Bram Moolenaare1a32312018-04-15 16:03:25 +02007008fi
7009
7010
7011 if test "X$vi_cv_path_python3" = "X"; then
Bram Moolenaar09ba6d72012-12-12 14:25:05 +01007012 for ac_prog in python3 python
7013do
7014 # Extract the first word of "$ac_prog", so it can be a program name with args.
7015set dummy $ac_prog; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02007016{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7017printf %s "checking for $ac_word... " >&6; }
7018if test ${ac_cv_path_vi_cv_path_python3+y}
7019then :
7020 printf %s "(cached) " >&6
7021else $as_nop
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007022 case $vi_cv_path_python3 in
7023 [\\/]* | ?:[\\/]*)
7024 ac_cv_path_vi_cv_path_python3="$vi_cv_path_python3" # Let the user override the test with a path.
7025 ;;
7026 *)
7027 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7028for as_dir in $PATH
7029do
7030 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02007031 case $as_dir in #(((
7032 '') as_dir=./ ;;
7033 */) ;;
7034 *) as_dir=$as_dir/ ;;
7035 esac
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007036 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02007037 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7038 ac_cv_path_vi_cv_path_python3="$as_dir$ac_word$ac_exec_ext"
7039 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007040 break 2
7041 fi
7042done
7043 done
7044IFS=$as_save_IFS
7045
7046 ;;
7047esac
7048fi
7049vi_cv_path_python3=$ac_cv_path_vi_cv_path_python3
7050if test -n "$vi_cv_path_python3"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007051 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3" >&5
7052printf "%s\n" "$vi_cv_path_python3" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007053else
Illia Bobyra96d5442023-08-30 16:30:15 +02007054 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7055printf "%s\n" "no" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007056fi
7057
7058
Bram Moolenaar09ba6d72012-12-12 14:25:05 +01007059 test -n "$vi_cv_path_python3" && break
7060done
7061
Bram Moolenaare1a32312018-04-15 16:03:25 +02007062 fi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007063 if test "X$vi_cv_path_python3" != "X"; then
7064
Illia Bobyra96d5442023-08-30 16:30:15 +02007065 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python version" >&5
7066printf %s "checking Python version... " >&6; }
7067if test ${vi_cv_var_python3_version+y}
7068then :
7069 printf %s "(cached) " >&6
7070else $as_nop
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007071 vi_cv_var_python3_version=`
Bram Moolenaar23c01922021-05-21 11:43:58 +02007072 ${vi_cv_path_python3} -c 'import sys; print("{}.{}".format(sys.version_info.major, sys.version_info.minor))'`
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007073
7074fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007075{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_var_python3_version" >&5
7076printf "%s\n" "$vi_cv_var_python3_version" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007077
Illia Bobyra96d5442023-08-30 16:30:15 +02007078 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python is 3.0 or better" >&5
7079printf %s "checking Python is 3.0 or better... " >&6; }
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007080 if ${vi_cv_path_python3} -c \
7081 "import sys; sys.exit(${vi_cv_var_python3_version} < 3.0)"
7082 then
Illia Bobyra96d5442023-08-30 16:30:15 +02007083 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yep" >&5
7084printf "%s\n" "yep" >&6; }
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007085
Ken Takata1c032e32024-08-11 18:41:41 +02007086 python3_stable_abi_default=3.8
7087 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-python3-stable-abi argument" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +02007088printf %s "checking --with-python3-stable-abi argument... " >&6; }
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007089
7090
7091# Check whether --with-python3-stable-abi was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02007092if test ${with_python3_stable_abi+y}
7093then :
Ken Takata1c032e32024-08-11 18:41:41 +02007094 withval=$with_python3_stable_abi;
Christian Brabandt3f7024c2024-08-23 18:39:08 +02007095 if test "X$withval" = "Xyes"; then
7096 vi_cv_var_python3_stable_abi=$python3_stable_abi_default
7097 else
7098 vi_cv_var_python3_stable_abi="$withval"
7099 fi
7100 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_var_python3_stable_abi" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +02007101printf "%s\n" "$vi_cv_var_python3_stable_abi" >&6; }
Ken Takatadc2c75c2024-08-24 16:27:50 +02007102else $as_nop
7103 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7104printf "%s\n" "no" >&6; }
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007105fi
7106
Christian Brabandt3f7024c2024-08-23 18:39:08 +02007107 if test "X$vi_cv_var_python3_stable_abi" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007108 if test ${vi_cv_var_python3_stable_abi_hex+y}
7109then :
7110 printf %s "(cached) " >&6
7111else $as_nop
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007112
7113 vi_cv_var_python3_stable_abi_hex=`
7114 ${vi_cv_path_python3} -c \
7115 "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) ))"`
7116fi
7117
Yee Cheng Chine7d79eb2023-09-16 13:38:26 +02007118 if test "X$vi_cv_var_python3_stable_abi_hex" = "X"; then
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007119 as_fn_error $? "can't parse Python 3 stable ABI version. It should be \"<major>.<minor>\"" "$LINENO" 5
7120 fi
7121 fi
7122
Illia Bobyra96d5442023-08-30 16:30:15 +02007123 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's abiflags" >&5
7124printf %s "checking Python's abiflags... " >&6; }
7125if test ${vi_cv_var_python3_abiflags+y}
7126then :
7127 printf %s "(cached) " >&6
7128else $as_nop
Bram Moolenaar456f2bb2011-06-12 21:37:13 +02007129
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007130 vi_cv_var_python3_abiflags=
7131 if ${vi_cv_path_python3} -c \
7132 "import sys; sys.exit(${vi_cv_var_python3_version} < 3.2)"
7133 then
7134 vi_cv_var_python3_abiflags=`${vi_cv_path_python3} -c \
7135 "import sys; print(sys.abiflags)"`
7136 fi
Bram Moolenaar456f2bb2011-06-12 21:37:13 +02007137fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007138{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_var_python3_abiflags" >&5
7139printf "%s\n" "$vi_cv_var_python3_abiflags" >&6; }
Bram Moolenaar456f2bb2011-06-12 21:37:13 +02007140
Illia Bobyra96d5442023-08-30 16:30:15 +02007141 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's install prefix" >&5
7142printf %s "checking Python's install prefix... " >&6; }
7143if test ${vi_cv_path_python3_pfx+y}
7144then :
7145 printf %s "(cached) " >&6
7146else $as_nop
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007147 vi_cv_path_python3_pfx=`
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007148 ${vi_cv_path_python3} -c \
7149 "import sys; print(sys.prefix)"`
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007150fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007151{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3_pfx" >&5
7152printf "%s\n" "$vi_cv_path_python3_pfx" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007153
Illia Bobyra96d5442023-08-30 16:30:15 +02007154 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's execution prefix" >&5
7155printf %s "checking Python's execution prefix... " >&6; }
7156if test ${vi_cv_path_python3_epfx+y}
7157then :
7158 printf %s "(cached) " >&6
7159else $as_nop
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007160 vi_cv_path_python3_epfx=`
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007161 ${vi_cv_path_python3} -c \
7162 "import sys; print(sys.exec_prefix)"`
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007163fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007164{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3_epfx" >&5
7165printf "%s\n" "$vi_cv_path_python3_epfx" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007166
Illia Bobyra96d5442023-08-30 16:30:15 +02007167 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's include path" >&5
7168printf %s "checking Python's include path... " >&6; }
7169if test ${vi_cv_path_python3_include+y}
7170then :
7171 printf %s "(cached) " >&6
7172else $as_nop
Illia Bobyr74e1dad2023-08-27 18:26:54 +02007173 vi_cv_path_python3_include=`
7174 ${vi_cv_path_python3} -c \
7175 "import sysconfig; print(sysconfig.get_path(\"include\"))"`
7176fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007177{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3_include" >&5
7178printf "%s\n" "$vi_cv_path_python3_include" >&6; }
Illia Bobyr74e1dad2023-08-27 18:26:54 +02007179
Illia Bobyra96d5442023-08-30 16:30:15 +02007180 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's include path" >&5
7181printf %s "checking Python's include path... " >&6; }
7182if test ${vi_cv_path_python3_platinclude+y}
7183then :
7184 printf %s "(cached) " >&6
7185else $as_nop
Illia Bobyr74e1dad2023-08-27 18:26:54 +02007186 vi_cv_path_python3_platinclude=`
7187 ${vi_cv_path_python3} -c \
7188 "import sysconfig; print(sysconfig.get_path(\"platinclude\"))"`
7189fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007190{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3_platinclude" >&5
7191printf "%s\n" "$vi_cv_path_python3_platinclude" >&6; }
Illia Bobyr74e1dad2023-08-27 18:26:54 +02007192
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007193
Illia Bobyra96d5442023-08-30 16:30:15 +02007194 if test ${vi_cv_path_python3path+y}
7195then :
7196 printf %s "(cached) " >&6
7197else $as_nop
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007198 vi_cv_path_python3path=`
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007199 unset PYTHONPATH;
7200 ${vi_cv_path_python3} -c \
7201 "import sys, string; print(':'.join(sys.path))"`
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007202fi
7203
7204
7205
7206
7207# Check whether --with-python3-config-dir was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02007208if test ${with_python3_config_dir+y}
7209then :
Bram Moolenaard0882402018-04-10 18:13:05 +02007210 withval=$with_python3_config_dir; vi_cv_path_python3_conf="${withval}"; have_python3_config_dir=1
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007211fi
7212
7213
Illia Bobyra96d5442023-08-30 16:30:15 +02007214 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's configuration directory" >&5
7215printf %s "checking Python's configuration directory... " >&6; }
7216if test ${vi_cv_path_python3_conf+y}
7217then :
7218 printf %s "(cached) " >&6
7219else $as_nop
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007220
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007221 vi_cv_path_python3_conf=
Bram Moolenaarfee496d2013-07-12 20:07:24 +02007222 config_dir="config-${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags}"
Zdenek Dohnal31e299c2021-06-10 18:50:55 +02007223 d=`${vi_cv_path_python3} -c "import sysconfig; print(sysconfig.get_config_var('LIBPL'))" 2> /dev/null`
7224 if test "x$d" = "x"; then
7225 d=`${vi_cv_path_python3} -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('LIBPL'))"`
7226 fi
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007227 if test -d "$d" && test -f "$d/config.c"; then
7228 vi_cv_path_python3_conf="$d"
7229 else
7230 for path in "${vi_cv_path_python3_pfx}" "${vi_cv_path_python3_epfx}"; do
7231 for subdir in lib64 lib share; do
7232 d="${path}/${subdir}/python${vi_cv_var_python3_version}/${config_dir}"
7233 if test -d "$d" && test -f "$d/config.c"; then
7234 vi_cv_path_python3_conf="$d"
7235 fi
7236 done
7237 done
7238 fi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007239
7240fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007241{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3_conf" >&5
7242printf "%s\n" "$vi_cv_path_python3_conf" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007243
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007244 PYTHON3_CONFDIR="${vi_cv_path_python3_conf}"
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007245
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007246 if test "X$PYTHON3_CONFDIR" = "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007247 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: can't find it!" >&5
7248printf "%s\n" "can't find it!" >&6; }
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007249 else
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007250
Illia Bobyra96d5442023-08-30 16:30:15 +02007251 if test ${vi_cv_path_python3_plibs+y}
7252then :
7253 printf %s "(cached) " >&6
7254else $as_nop
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007255
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007256 pwd=`pwd`
7257 tmp_mkf="$pwd/config-PyMake$$"
7258 cat -- "${PYTHON3_CONFDIR}/Makefile" - <<'eof' >"${tmp_mkf}"
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007259__:
Bram Moolenaar3804aeb2010-07-19 21:18:54 +02007260 @echo "python3_BASEMODLIBS='$(BASEMODLIBS)'"
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007261 @echo "python3_LIBS='$(LIBS)'"
7262 @echo "python3_SYSLIBS='$(SYSLIBS)'"
Bram Moolenaarf94a13c2012-09-21 13:26:49 +02007263 @echo "python3_DLLLIBRARY='$(DLLLIBRARY)'"
Bram Moolenaar2a7e2a62010-07-24 15:19:11 +02007264 @echo "python3_INSTSONAME='$(INSTSONAME)'"
Yee Cheng Chinb6ebe5a2023-04-05 18:24:50 +01007265 @echo "python3_PYTHONFRAMEWORKPREFIX='$(PYTHONFRAMEWORKPREFIX)'"
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007266eof
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007267 eval "`cd ${PYTHON3_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`"
7268 rm -f -- "${tmp_mkf}"
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007269 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 +02007270 vi_cv_path_python3_plibs="${vi_cv_path_python3_plibs} ${python3_BASEMODLIBS} ${python3_LIBS} ${python3_SYSLIBS}"
7271 vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-ltermcap//`
7272 vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-lffi//`
7273
7274fi
7275
Illia Bobyra96d5442023-08-30 16:30:15 +02007276 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python3's dll name" >&5
7277printf %s "checking Python3's dll name... " >&6; }
7278if test ${vi_cv_dll_name_python3+y}
7279then :
7280 printf %s "(cached) " >&6
7281else $as_nop
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007282
7283 if test "X$python3_DLLLIBRARY" != "X"; then
7284 vi_cv_dll_name_python3="$python3_DLLLIBRARY"
Yee Cheng Chinb6ebe5a2023-04-05 18:24:50 +01007285 elif test "X$python3_PYTHONFRAMEWORKPREFIX" != "X"; then
7286 vi_cv_dll_name_python3="${python3_PYTHONFRAMEWORKPREFIX}/${python3_INSTSONAME}"
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007287 else
7288 vi_cv_dll_name_python3="$python3_INSTSONAME"
7289 fi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007290
7291fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007292{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_dll_name_python3" >&5
7293printf "%s\n" "$vi_cv_dll_name_python3" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007294
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007295 PYTHON3_LIBS="${vi_cv_path_python3_plibs}"
Illia Bobyr74e1dad2023-08-27 18:26:54 +02007296 if test "${vi_cv_path_python3_include}" = "${vi_cv_path_python3_platinclude}"; then
7297 PYTHON3_CFLAGS="-I${vi_cv_path_python3_include}"
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007298 else
Illia Bobyr74e1dad2023-08-27 18:26:54 +02007299 PYTHON3_CFLAGS="-I${vi_cv_path_python3_include} -I${vi_cv_path_python3_platinclude}"
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007300 fi
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007301 if test "X$have_python3_config_dir" = "X1" -a "$enable_python3interp" = "dynamic"; then
7302 PYTHON3_CFLAGS="${PYTHON3_CFLAGS} -DPYTHON3_HOME='L\"${vi_cv_path_python3_pfx}\"'"
7303 fi
7304 if test "X$vi_cv_var_python3_stable_abi_hex" != "X"; then
7305 PYTHON3_CFLAGS="${PYTHON3_CFLAGS} -DPy_LIMITED_API=${vi_cv_var_python3_stable_abi_hex}"
7306 fi
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007307 PYTHON3_SRC="if_python3.c"
7308 PYTHON3_OBJ="objects/if_python3.o"
7309
Illia Bobyra96d5442023-08-30 16:30:15 +02007310 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -pthread should be used" >&5
7311printf %s "checking if -pthread should be used... " >&6; }
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007312 threadsafe_flag=
7313 thread_lib=
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00007314 if test "$vim_cv_uname_output" != Darwin; then
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007315 test "$GCC" = yes && threadsafe_flag="-pthread"
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00007316 if test "$vim_cv_uname_output" = FreeBSD; then
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007317 threadsafe_flag="-D_THREAD_SAFE"
7318 thread_lib="-pthread"
7319 fi
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00007320 if test "$vim_cv_uname_output" = SunOS; then
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007321 threadsafe_flag="-pthreads"
7322 fi
7323 fi
7324 libs_save_old=$LIBS
7325 if test -n "$threadsafe_flag"; then
7326 cflags_save=$CFLAGS
7327 CFLAGS="$CFLAGS $threadsafe_flag"
7328 LIBS="$LIBS $thread_lib"
7329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007330/* end confdefs.h. */
7331
7332int
Illia Bobyra96d5442023-08-30 16:30:15 +02007333main (void)
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007334{
7335
7336 ;
7337 return 0;
7338}
7339_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02007340if ac_fn_c_try_link "$LINENO"
7341then :
7342 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7343printf "%s\n" "yes" >&6; }; PYTHON3_CFLAGS="$PYTHON3_CFLAGS $threadsafe_flag"
7344else $as_nop
7345 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7346printf "%s\n" "no" >&6; }; LIBS=$libs_save_old
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007347
7348fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007349rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007350 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007351 CFLAGS=$cflags_save
7352 else
Illia Bobyra96d5442023-08-30 16:30:15 +02007353 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7354printf "%s\n" "no" >&6; }
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007355 fi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007356
Illia Bobyra96d5442023-08-30 16:30:15 +02007357 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compile and link flags for Python 3 are sane" >&5
7358printf %s "checking if compile and link flags for Python 3 are sane... " >&6; }
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007359 cflags_save=$CFLAGS
7360 libs_save=$LIBS
7361 CFLAGS="$CFLAGS $PYTHON3_CFLAGS"
7362 LIBS="$LIBS $PYTHON3_LIBS"
7363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007364/* end confdefs.h. */
7365
7366int
Illia Bobyra96d5442023-08-30 16:30:15 +02007367main (void)
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007368{
7369
7370 ;
7371 return 0;
7372}
7373_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02007374if ac_fn_c_try_link "$LINENO"
7375then :
7376 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7377printf "%s\n" "yes" >&6; }; python3_ok=yes
7378else $as_nop
7379 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no: PYTHON3 DISABLED" >&5
7380printf "%s\n" "no: PYTHON3 DISABLED" >&6; }; python3_ok=no
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007381fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007382rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007383 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007384 CFLAGS=$cflags_save
7385 LIBS=$libs_save
7386 if test "$python3_ok" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007387 printf "%s\n" "#define FEAT_PYTHON3 1" >>confdefs.h
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007388
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007389 else
7390 LIBS=$libs_save_old
7391 PYTHON3_SRC=
7392 PYTHON3_OBJ=
7393 PYTHON3_LIBS=
7394 PYTHON3_CFLAGS=
7395 fi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007396 fi
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007397 else
Illia Bobyra96d5442023-08-30 16:30:15 +02007398 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: too old" >&5
7399printf "%s\n" "too old" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007400 fi
7401 fi
Bram Moolenaar1612b1a2013-06-14 21:22:39 +02007402 if test "$fail_if_missing" = "yes" -a "$python3_ok" != "yes"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01007403 as_fn_error $? "could not configure python3" "$LINENO" 5
Bram Moolenaar1612b1a2013-06-14 21:22:39 +02007404 fi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007405fi
7406
7407
7408
7409
7410
7411
ichizok8bb3fe42021-12-28 15:51:45 +00007412
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007413if test "$python_ok" = yes && test "$python3_ok" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007414 printf "%s\n" "#define DYNAMIC_PYTHON 1" >>confdefs.h
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007415
Illia Bobyra96d5442023-08-30 16:30:15 +02007416 printf "%s\n" "#define DYNAMIC_PYTHON3 1" >>confdefs.h
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007417
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007418 if test "X$vi_cv_var_python3_stable_abi_hex" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007419 printf "%s\n" "#define DYNAMIC_PYTHON3_STABLE_ABI 1" >>confdefs.h
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007420
7421 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007422 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we can do without RTLD_GLOBAL for Python" >&5
7423printf %s "checking whether we can do without RTLD_GLOBAL for Python... " >&6; }
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007424 cflags_save=$CFLAGS
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007425 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
Bram Moolenaar5d3fbf32015-03-05 16:47:20 +01007426 libs_save=$LIBS
7427 LIBS="-ldl $LIBS"
Illia Bobyra96d5442023-08-30 16:30:15 +02007428 if test "$cross_compiling" = yes
7429then :
7430 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7431printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +01007432as_fn_error $? "cannot run test program while cross compiling
7433See \`config.log' for more details" "$LINENO" 5; }
Illia Bobyra96d5442023-08-30 16:30:15 +02007434else $as_nop
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7436/* end confdefs.h. */
7437
7438 #include <dlfcn.h>
7439 /* If this program fails, then RTLD_GLOBAL is needed.
7440 * RTLD_GLOBAL will be used and then it is not possible to
7441 * have both python versions enabled in the same vim instance.
Bram Moolenaar84a05ac2013-05-06 04:24:17 +02007442 * Only the first python version used will be switched on.
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007443 */
7444
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +01007445 static int no_rtl_global_needed_for(char *python_instsoname, char *prefix)
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007446 {
7447 int needed = 0;
Bram Moolenaarba59ddb2016-01-28 15:34:25 +01007448 void* pylib = dlopen(python_instsoname, RTLD_LAZY|RTLD_LOCAL);
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007449 if (pylib != 0)
7450 {
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007451 void (*pfx)(char *home) = dlsym(pylib, "Py_SetPythonHome");
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007452 void (*init)(void) = dlsym(pylib, "Py_Initialize");
7453 int (*simple)(char*) = dlsym(pylib, "PyRun_SimpleString");
7454 void (*final)(void) = dlsym(pylib, "Py_Finalize");
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007455 (*pfx)(prefix);
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007456 (*init)();
7457 needed = (*simple)("import termios") == -1;
7458 (*final)();
7459 dlclose(pylib);
7460 }
7461 return !needed;
7462 }
7463
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +01007464 int main()
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007465 {
7466 int not_needed = 0;
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007467 if (no_rtl_global_needed_for("${vi_cv_dll_name_python}", "${vi_cv_path_python_pfx}"))
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007468 not_needed = 1;
7469 return !not_needed;
7470 }
7471_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02007472if ac_fn_c_try_run "$LINENO"
7473then :
7474 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7475printf "%s\n" "yes" >&6; };printf "%s\n" "#define PY_NO_RTLD_GLOBAL 1" >>confdefs.h
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007476
Illia Bobyra96d5442023-08-30 16:30:15 +02007477else $as_nop
7478 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7479printf "%s\n" "no" >&6; }
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007480fi
7481rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7482 conftest.$ac_objext conftest.beam conftest.$ac_ext
7483fi
7484
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007485
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007486 CFLAGS=$cflags_save
Bram Moolenaar5d3fbf32015-03-05 16:47:20 +01007487 LIBS=$libs_save
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007488
Illia Bobyra96d5442023-08-30 16:30:15 +02007489 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we can do without RTLD_GLOBAL for Python3" >&5
7490printf %s "checking whether we can do without RTLD_GLOBAL for Python3... " >&6; }
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007491 cflags_save=$CFLAGS
7492 CFLAGS="$CFLAGS $PYTHON3_CFLAGS"
Bram Moolenaar5d3fbf32015-03-05 16:47:20 +01007493 libs_save=$LIBS
7494 LIBS="-ldl $LIBS"
Illia Bobyra96d5442023-08-30 16:30:15 +02007495 if test "$cross_compiling" = yes
7496then :
7497 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7498printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +01007499as_fn_error $? "cannot run test program while cross compiling
7500See \`config.log' for more details" "$LINENO" 5; }
Illia Bobyra96d5442023-08-30 16:30:15 +02007501else $as_nop
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7503/* end confdefs.h. */
7504
7505 #include <dlfcn.h>
7506 #include <wchar.h>
7507 /* If this program fails, then RTLD_GLOBAL is needed.
7508 * RTLD_GLOBAL will be used and then it is not possible to
7509 * have both python versions enabled in the same vim instance.
Bram Moolenaar84a05ac2013-05-06 04:24:17 +02007510 * Only the first python version used will be switched on.
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007511 */
7512
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +01007513 static int no_rtl_global_needed_for(char *python_instsoname, wchar_t *prefix)
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007514 {
7515 int needed = 0;
Bram Moolenaarba59ddb2016-01-28 15:34:25 +01007516 void* pylib = dlopen(python_instsoname, RTLD_LAZY|RTLD_LOCAL);
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007517 if (pylib != 0)
7518 {
7519 void (*pfx)(wchar_t *home) = dlsym(pylib, "Py_SetPythonHome");
7520 void (*init)(void) = dlsym(pylib, "Py_Initialize");
7521 int (*simple)(char*) = dlsym(pylib, "PyRun_SimpleString");
7522 void (*final)(void) = dlsym(pylib, "Py_Finalize");
7523 (*pfx)(prefix);
7524 (*init)();
7525 needed = (*simple)("import termios") == -1;
7526 (*final)();
7527 dlclose(pylib);
7528 }
7529 return !needed;
7530 }
7531
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +01007532 int main()
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007533 {
7534 int not_needed = 0;
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007535 if (no_rtl_global_needed_for("${vi_cv_dll_name_python3}", L"${vi_cv_path_python3_pfx}"))
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007536 not_needed = 1;
7537 return !not_needed;
7538 }
7539_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02007540if ac_fn_c_try_run "$LINENO"
7541then :
7542 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7543printf "%s\n" "yes" >&6; };printf "%s\n" "#define PY3_NO_RTLD_GLOBAL 1" >>confdefs.h
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007544
Illia Bobyra96d5442023-08-30 16:30:15 +02007545else $as_nop
7546 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7547printf "%s\n" "no" >&6; }
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007548fi
7549rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7550 conftest.$ac_objext conftest.beam conftest.$ac_ext
7551fi
7552
7553
7554 CFLAGS=$cflags_save
Bram Moolenaar5d3fbf32015-03-05 16:47:20 +01007555 LIBS=$libs_save
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007556
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007557 PYTHON_SRC="if_python.c"
7558 PYTHON_OBJ="objects/if_python.o"
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007559 PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${vi_cv_dll_name_python}\\\""
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007560 PYTHON_LIBS=
7561 PYTHON3_SRC="if_python3.c"
7562 PYTHON3_OBJ="objects/if_python3.o"
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007563 PYTHON3_CFLAGS="$PYTHON3_CFLAGS -DDYNAMIC_PYTHON3_DLL=\\\"${vi_cv_dll_name_python3}\\\""
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007564 PYTHON3_LIBS=
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007565elif test "$python_ok" = yes && test "$enable_pythoninterp" = "dynamic"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007566 printf "%s\n" "#define DYNAMIC_PYTHON 1" >>confdefs.h
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007567
7568 PYTHON_SRC="if_python.c"
7569 PYTHON_OBJ="objects/if_python.o"
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007570 PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${vi_cv_dll_name_python}\\\""
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007571 PYTHON_LIBS=
Bram Moolenaare741f272013-07-09 21:57:52 +02007572elif test "$python_ok" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007573 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -fPIE can be added for Python" >&5
7574printf %s "checking if -fPIE can be added for Python... " >&6; }
Bram Moolenaare741f272013-07-09 21:57:52 +02007575 cflags_save=$CFLAGS
7576 libs_save=$LIBS
7577 CFLAGS="$CFLAGS $PYTHON_CFLAGS -fPIE"
7578 LIBS="$LIBS $PYTHON_LIBS"
7579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7580/* end confdefs.h. */
7581
7582int
Illia Bobyra96d5442023-08-30 16:30:15 +02007583main (void)
Bram Moolenaare741f272013-07-09 21:57:52 +02007584{
7585
7586 ;
7587 return 0;
7588}
7589_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02007590if ac_fn_c_try_link "$LINENO"
7591then :
7592 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7593printf "%s\n" "yes" >&6; }; fpie_ok=yes
7594else $as_nop
7595 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7596printf "%s\n" "no" >&6; }; fpie_ok=no
Bram Moolenaare741f272013-07-09 21:57:52 +02007597fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007598rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaare741f272013-07-09 21:57:52 +02007599 conftest$ac_exeext conftest.$ac_ext
7600 CFLAGS=$cflags_save
7601 LIBS=$libs_save
7602 if test $fpie_ok = yes; then
7603 PYTHON_CFLAGS="$PYTHON_CFLAGS -fPIE"
7604 fi
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007605elif test "$python3_ok" = yes && test "$enable_python3interp" = "dynamic"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007606 printf "%s\n" "#define DYNAMIC_PYTHON3 1" >>confdefs.h
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007607
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007608 if test "X$vi_cv_var_python3_stable_abi_hex" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007609 printf "%s\n" "#define DYNAMIC_PYTHON3_STABLE_ABI 1" >>confdefs.h
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007610
7611 fi
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007612 PYTHON3_SRC="if_python3.c"
7613 PYTHON3_OBJ="objects/if_python3.o"
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007614 PYTHON3_CFLAGS="$PYTHON3_CFLAGS -DDYNAMIC_PYTHON3_DLL=\\\"${vi_cv_dll_name_python3}\\\""
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007615 PYTHON3_LIBS=
Bram Moolenaare741f272013-07-09 21:57:52 +02007616elif test "$python3_ok" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007617 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -fPIE can be added for Python3" >&5
7618printf %s "checking if -fPIE can be added for Python3... " >&6; }
Bram Moolenaare741f272013-07-09 21:57:52 +02007619 cflags_save=$CFLAGS
7620 libs_save=$LIBS
7621 CFLAGS="$CFLAGS $PYTHON3_CFLAGS -fPIE"
7622 LIBS="$LIBS $PYTHON3_LIBS"
7623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7624/* end confdefs.h. */
7625
7626int
Illia Bobyra96d5442023-08-30 16:30:15 +02007627main (void)
Bram Moolenaare741f272013-07-09 21:57:52 +02007628{
7629
7630 ;
7631 return 0;
7632}
7633_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02007634if ac_fn_c_try_link "$LINENO"
7635then :
7636 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7637printf "%s\n" "yes" >&6; }; fpie_ok=yes
7638else $as_nop
7639 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7640printf "%s\n" "no" >&6; }; fpie_ok=no
Bram Moolenaare741f272013-07-09 21:57:52 +02007641fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007642rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaare741f272013-07-09 21:57:52 +02007643 conftest$ac_exeext conftest.$ac_ext
7644 CFLAGS=$cflags_save
7645 LIBS=$libs_save
7646 if test $fpie_ok = yes; then
7647 PYTHON3_CFLAGS="$PYTHON3_CFLAGS -fPIE"
7648 fi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007649fi
7650
Illia Bobyra96d5442023-08-30 16:30:15 +02007651{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-tclinterp argument" >&5
7652printf %s "checking --enable-tclinterp argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00007653# Check whether --enable-tclinterp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02007654if test ${enable_tclinterp+y}
7655then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00007656 enableval=$enable_tclinterp;
Illia Bobyra96d5442023-08-30 16:30:15 +02007657else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00007658 enable_tclinterp="no"
Bram Moolenaar446cb832008-06-24 21:56:24 +00007659fi
7660
Illia Bobyra96d5442023-08-30 16:30:15 +02007661{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_tclinterp" >&5
7662printf "%s\n" "$enable_tclinterp" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007663
Bram Moolenaar8a5115c2016-01-09 19:41:11 +01007664if test "$enable_tclinterp" = "yes" -o "$enable_tclinterp" = "dynamic"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007665
Illia Bobyra96d5442023-08-30 16:30:15 +02007666 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-tclsh argument" >&5
7667printf %s "checking --with-tclsh argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007668
Bram Moolenaar446cb832008-06-24 21:56:24 +00007669# Check whether --with-tclsh was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02007670if test ${with_tclsh+y}
7671then :
7672 withval=$with_tclsh; tclsh_name="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tclsh_name" >&5
7673printf "%s\n" "$tclsh_name" >&6; }
7674else $as_nop
7675 tclsh_name="tclsh8.5"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7676printf "%s\n" "no" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00007677fi
7678
Bram Moolenaar071d4272004-06-13 20:20:40 +00007679 # Extract the first word of "$tclsh_name", so it can be a program name with args.
7680set dummy $tclsh_name; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02007681{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7682printf %s "checking for $ac_word... " >&6; }
7683if test ${ac_cv_path_vi_cv_path_tcl+y}
7684then :
7685 printf %s "(cached) " >&6
7686else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007687 case $vi_cv_path_tcl in
7688 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00007689 ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
7690 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00007691 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007692 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7693for as_dir in $PATH
7694do
7695 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02007696 case $as_dir in #(((
7697 '') as_dir=./ ;;
7698 */) ;;
7699 *) as_dir=$as_dir/ ;;
7700 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007701 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02007702 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7703 ac_cv_path_vi_cv_path_tcl="$as_dir$ac_word$ac_exec_ext"
7704 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007705 break 2
7706 fi
7707done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007708 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00007709IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007710
Bram Moolenaar071d4272004-06-13 20:20:40 +00007711 ;;
7712esac
7713fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007714vi_cv_path_tcl=$ac_cv_path_vi_cv_path_tcl
Bram Moolenaar071d4272004-06-13 20:20:40 +00007715if test -n "$vi_cv_path_tcl"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007716 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_tcl" >&5
7717printf "%s\n" "$vi_cv_path_tcl" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007718else
Illia Bobyra96d5442023-08-30 16:30:15 +02007719 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7720printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007721fi
7722
Bram Moolenaar071d4272004-06-13 20:20:40 +00007723
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007724
Bram Moolenaar446cb832008-06-24 21:56:24 +00007725
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00007726 if test "X$vi_cv_path_tcl" = "X" -a $tclsh_name = "tclsh8.5"; then
7727 tclsh_name="tclsh8.4"
7728 # Extract the first word of "$tclsh_name", so it can be a program name with args.
7729set dummy $tclsh_name; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02007730{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7731printf %s "checking for $ac_word... " >&6; }
7732if test ${ac_cv_path_vi_cv_path_tcl+y}
7733then :
7734 printf %s "(cached) " >&6
7735else $as_nop
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00007736 case $vi_cv_path_tcl in
7737 [\\/]* | ?:[\\/]*)
7738 ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
7739 ;;
7740 *)
7741 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7742for as_dir in $PATH
7743do
7744 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02007745 case $as_dir in #(((
7746 '') as_dir=./ ;;
7747 */) ;;
7748 *) as_dir=$as_dir/ ;;
7749 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007750 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02007751 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7752 ac_cv_path_vi_cv_path_tcl="$as_dir$ac_word$ac_exec_ext"
7753 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00007754 break 2
7755 fi
7756done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007757 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00007758IFS=$as_save_IFS
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00007759
7760 ;;
7761esac
7762fi
7763vi_cv_path_tcl=$ac_cv_path_vi_cv_path_tcl
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00007764if test -n "$vi_cv_path_tcl"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007765 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_tcl" >&5
7766printf "%s\n" "$vi_cv_path_tcl" >&6; }
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00007767else
Illia Bobyra96d5442023-08-30 16:30:15 +02007768 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7769printf "%s\n" "no" >&6; }
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00007770fi
7771
Bram Moolenaar446cb832008-06-24 21:56:24 +00007772
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00007773 fi
7774 if test "X$vi_cv_path_tcl" = "X" -a $tclsh_name = "tclsh8.4"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007775 tclsh_name="tclsh8.2"
7776 # Extract the first word of "$tclsh_name", so it can be a program name with args.
7777set dummy $tclsh_name; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02007778{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7779printf %s "checking for $ac_word... " >&6; }
7780if test ${ac_cv_path_vi_cv_path_tcl+y}
7781then :
7782 printf %s "(cached) " >&6
7783else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007784 case $vi_cv_path_tcl in
7785 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00007786 ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
7787 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00007788 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007789 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7790for as_dir in $PATH
7791do
7792 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02007793 case $as_dir in #(((
7794 '') as_dir=./ ;;
7795 */) ;;
7796 *) as_dir=$as_dir/ ;;
7797 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007798 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02007799 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7800 ac_cv_path_vi_cv_path_tcl="$as_dir$ac_word$ac_exec_ext"
7801 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007802 break 2
7803 fi
7804done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007805 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00007806IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007807
Bram Moolenaar071d4272004-06-13 20:20:40 +00007808 ;;
7809esac
7810fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007811vi_cv_path_tcl=$ac_cv_path_vi_cv_path_tcl
Bram Moolenaar071d4272004-06-13 20:20:40 +00007812if test -n "$vi_cv_path_tcl"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007813 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_tcl" >&5
7814printf "%s\n" "$vi_cv_path_tcl" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007815else
Illia Bobyra96d5442023-08-30 16:30:15 +02007816 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7817printf "%s\n" "no" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007818fi
7819
Bram Moolenaar446cb832008-06-24 21:56:24 +00007820
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007821 fi
7822 if test "X$vi_cv_path_tcl" = "X" -a $tclsh_name = "tclsh8.2"; then
7823 tclsh_name="tclsh8.0"
7824 # Extract the first word of "$tclsh_name", so it can be a program name with args.
7825set dummy $tclsh_name; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02007826{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7827printf %s "checking for $ac_word... " >&6; }
7828if test ${ac_cv_path_vi_cv_path_tcl+y}
7829then :
7830 printf %s "(cached) " >&6
7831else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007832 case $vi_cv_path_tcl in
7833 [\\/]* | ?:[\\/]*)
7834 ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
7835 ;;
7836 *)
7837 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7838for as_dir in $PATH
7839do
7840 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02007841 case $as_dir in #(((
7842 '') as_dir=./ ;;
7843 */) ;;
7844 *) as_dir=$as_dir/ ;;
7845 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007846 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02007847 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7848 ac_cv_path_vi_cv_path_tcl="$as_dir$ac_word$ac_exec_ext"
7849 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007850 break 2
7851 fi
7852done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007853 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00007854IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007855
7856 ;;
7857esac
7858fi
7859vi_cv_path_tcl=$ac_cv_path_vi_cv_path_tcl
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007860if test -n "$vi_cv_path_tcl"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007861 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_tcl" >&5
7862printf "%s\n" "$vi_cv_path_tcl" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007863else
Illia Bobyra96d5442023-08-30 16:30:15 +02007864 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7865printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007866fi
7867
Bram Moolenaar446cb832008-06-24 21:56:24 +00007868
Bram Moolenaar071d4272004-06-13 20:20:40 +00007869 fi
7870 if test "X$vi_cv_path_tcl" = "X"; then
7871 tclsh_name="tclsh"
7872 # Extract the first word of "$tclsh_name", so it can be a program name with args.
7873set dummy $tclsh_name; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02007874{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7875printf %s "checking for $ac_word... " >&6; }
7876if test ${ac_cv_path_vi_cv_path_tcl+y}
7877then :
7878 printf %s "(cached) " >&6
7879else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007880 case $vi_cv_path_tcl in
7881 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00007882 ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
7883 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00007884 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007885 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7886for as_dir in $PATH
7887do
7888 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02007889 case $as_dir in #(((
7890 '') as_dir=./ ;;
7891 */) ;;
7892 *) as_dir=$as_dir/ ;;
7893 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007894 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02007895 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7896 ac_cv_path_vi_cv_path_tcl="$as_dir$ac_word$ac_exec_ext"
7897 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007898 break 2
7899 fi
7900done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007901 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00007902IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007903
Bram Moolenaar071d4272004-06-13 20:20:40 +00007904 ;;
7905esac
7906fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007907vi_cv_path_tcl=$ac_cv_path_vi_cv_path_tcl
Bram Moolenaar071d4272004-06-13 20:20:40 +00007908if test -n "$vi_cv_path_tcl"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007909 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_tcl" >&5
7910printf "%s\n" "$vi_cv_path_tcl" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007911else
Illia Bobyra96d5442023-08-30 16:30:15 +02007912 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7913printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007914fi
7915
Bram Moolenaar446cb832008-06-24 21:56:24 +00007916
Bram Moolenaar071d4272004-06-13 20:20:40 +00007917 fi
7918 if test "X$vi_cv_path_tcl" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007919 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Tcl version" >&5
7920printf %s "checking Tcl version... " >&6; }
Bram Moolenaar49222be2015-12-11 18:11:30 +01007921 if echo 'exit [expr [info tclversion] < 8.0]' | "$vi_cv_path_tcl" - ; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007922 tclver=`echo 'puts [info tclversion]' | $vi_cv_path_tcl -`
Illia Bobyra96d5442023-08-30 16:30:15 +02007923 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tclver - OK" >&5
7924printf "%s\n" "$tclver - OK" >&6; };
Bram Moolenaar071d4272004-06-13 20:20:40 +00007925 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 +01007926 tcldll=`echo 'puts libtcl[info tclversion][info sharedlibextension]' | $vi_cv_path_tcl -`
Bram Moolenaar071d4272004-06-13 20:20:40 +00007927
Illia Bobyra96d5442023-08-30 16:30:15 +02007928 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for location of Tcl include" >&5
7929printf %s "checking for location of Tcl include... " >&6; }
Bram Moolenaard0573012017-10-28 21:11:06 +02007930 if test "x$MACOS_X" != "xyes"; then
Bram Moolenaar446cb832008-06-24 21:56:24 +00007931 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 +00007932 else
Bram Moolenaarf4ee5282020-07-30 20:18:08 +02007933 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 +00007934 fi
Bram Moolenaar0ff8f602008-02-20 11:44:03 +00007935 TCL_INC=
Bram Moolenaar071d4272004-06-13 20:20:40 +00007936 for try in $tclinc; do
7937 if test -f "$try/tcl.h"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007938 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $try/tcl.h" >&5
7939printf "%s\n" "$try/tcl.h" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007940 TCL_INC=$try
7941 break
7942 fi
7943 done
7944 if test -z "$TCL_INC"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007945 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <not found>" >&5
7946printf "%s\n" "<not found>" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007947 SKIP_TCL=YES
7948 fi
7949 if test -z "$SKIP_TCL"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007950 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for location of tclConfig.sh script" >&5
7951printf %s "checking for location of tclConfig.sh script... " >&6; }
Bram Moolenaard0573012017-10-28 21:11:06 +02007952 if test "x$MACOS_X" != "xyes"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007953 tclcnf=`echo $tclinc | sed s/include/lib/g`
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00007954 tclcnf="$tclcnf `echo $tclinc | sed s/include/lib64/g`"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007955 else
Bram Moolenaarf4ee5282020-07-30 20:18:08 +02007956 tclcnf=`echo $tclinc | sed s/include/lib/g`
7957 tclcnf="$tclcnf /System/Library/Frameworks/Tcl.framework `xcrun --show-sdk-path`/System/Library/Frameworks/Tcl.framework"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007958 fi
7959 for try in $tclcnf; do
Bram Moolenaar49222be2015-12-11 18:11:30 +01007960 if test -f "$try/tclConfig.sh"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007961 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $try/tclConfig.sh" >&5
7962printf "%s\n" "$try/tclConfig.sh" >&6; }
Bram Moolenaar49222be2015-12-11 18:11:30 +01007963 . "$try/tclConfig.sh"
Bram Moolenaar8a5115c2016-01-09 19:41:11 +01007964 if test "$enable_tclinterp" = "dynamic"; then
7965 TCL_LIBS=`eval echo "$TCL_STUB_LIB_SPEC $TCL_LIBS"`
7966 else
7967 TCL_LIBS=`eval echo "$TCL_LIB_SPEC $TCL_LIBS"`
7968 fi
Bram Moolenaar4394bff2008-07-24 11:21:31 +00007969 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 +00007970 break
7971 fi
7972 done
7973 if test -z "$TCL_LIBS"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007974 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <not found>" >&5
7975printf "%s\n" "<not found>" >&6; }
7976 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Tcl library by myself" >&5
7977printf %s "checking for Tcl library by myself... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007978 tcllib=`echo $tclinc | sed s/include/lib/g`
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00007979 tcllib="$tcllib `echo $tclinc | sed s/include/lib64/g`"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007980 for ext in .so .a ; do
7981 for ver in "" $tclver ; do
7982 for try in $tcllib ; do
7983 trylib=tcl$ver$ext
Bram Moolenaar49222be2015-12-11 18:11:30 +01007984 if test -f "$try/lib$trylib" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007985 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $try/lib$trylib" >&5
7986printf "%s\n" "$try/lib$trylib" >&6; }
Bram Moolenaar49222be2015-12-11 18:11:30 +01007987 TCL_LIBS="-L\"$try\" -ltcl$ver -ldl -lm"
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00007988 if test "$vim_cv_uname_output" = SunOS &&
7989 echo $vim_cv_uname_r_output | grep '^5' >/dev/null; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007990 TCL_LIBS="$TCL_LIBS -R $try"
7991 fi
7992 break 3
7993 fi
7994 done
7995 done
7996 done
7997 if test -z "$TCL_LIBS"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007998 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <not found>" >&5
7999printf "%s\n" "<not found>" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008000 SKIP_TCL=YES
8001 fi
8002 fi
8003 if test -z "$SKIP_TCL"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008004 printf "%s\n" "#define FEAT_TCL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00008005
8006 TCL_SRC=if_tcl.c
8007 TCL_OBJ=objects/if_tcl.o
8008 TCL_PRO=if_tcl.pro
8009 TCL_CFLAGS="-I$TCL_INC $TCL_DEFS"
8010 fi
8011 fi
8012 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008013 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: too old; need Tcl version 8.0 or later" >&5
8014printf "%s\n" "too old; need Tcl version 8.0 or later" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008015 fi
8016 fi
Bram Moolenaar8a5115c2016-01-09 19:41:11 +01008017 if test "$enable_tclinterp" = "dynamic"; then
8018 if test "X$TCL_SRC" != "X" -a "X$tcldll" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008019 printf "%s\n" "#define DYNAMIC_TCL 1" >>confdefs.h
Bram Moolenaar8a5115c2016-01-09 19:41:11 +01008020
8021 TCL_CFLAGS="-DDYNAMIC_TCL_DLL=\\\"$tcldll\\\" -DDYNAMIC_TCL_VER=\\\"$tclver\\\" $TCL_CFLAGS"
8022 fi
8023 fi
Bram Moolenaarf788a062011-12-14 20:51:25 +01008024 if test "$fail_if_missing" = "yes" -a -z "$TCL_SRC"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01008025 as_fn_error $? "could not configure Tcl" "$LINENO" 5
Bram Moolenaarf788a062011-12-14 20:51:25 +01008026 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00008027fi
8028
8029
8030
8031
8032
8033
ichizok8bb3fe42021-12-28 15:51:45 +00008034
Illia Bobyra96d5442023-08-30 16:30:15 +02008035{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-rubyinterp argument" >&5
8036printf %s "checking --enable-rubyinterp argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00008037# Check whether --enable-rubyinterp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008038if test ${enable_rubyinterp+y}
8039then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00008040 enableval=$enable_rubyinterp;
Illia Bobyra96d5442023-08-30 16:30:15 +02008041else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00008042 enable_rubyinterp="no"
Bram Moolenaar446cb832008-06-24 21:56:24 +00008043fi
8044
Illia Bobyra96d5442023-08-30 16:30:15 +02008045{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_rubyinterp" >&5
8046printf "%s\n" "$enable_rubyinterp" >&6; }
Bram Moolenaar3ca71f12010-10-27 16:49:47 +02008047if test "$enable_rubyinterp" = "yes" -o "$enable_rubyinterp" = "dynamic"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00008048 if test "$has_eval" = "no"; then
Martin Tournoij7904fa42022-10-04 16:28:45 +01008049 as_fn_error $? "cannot use Ruby with tiny features" "$LINENO" 5
Bram Moolenaar0b105412014-11-30 13:34:23 +01008050 fi
8051
Illia Bobyra96d5442023-08-30 16:30:15 +02008052 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-ruby-command argument" >&5
8053printf %s "checking --with-ruby-command argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008054
Bram Moolenaar948733a2011-05-05 18:10:16 +02008055
Bram Moolenaar165641d2010-02-17 16:23:09 +01008056# Check whether --with-ruby-command was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008057if test ${with_ruby_command+y}
8058then :
8059 withval=$with_ruby_command; RUBY_CMD="$withval"; vi_cv_path_ruby="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RUBY_CMD" >&5
8060printf "%s\n" "$RUBY_CMD" >&6; }
8061else $as_nop
8062 RUBY_CMD="ruby"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: defaulting to $RUBY_CMD" >&5
8063printf "%s\n" "defaulting to $RUBY_CMD" >&6; }
Bram Moolenaar165641d2010-02-17 16:23:09 +01008064fi
8065
Bram Moolenaar165641d2010-02-17 16:23:09 +01008066 # Extract the first word of "$RUBY_CMD", so it can be a program name with args.
8067set dummy $RUBY_CMD; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02008068{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8069printf %s "checking for $ac_word... " >&6; }
8070if test ${ac_cv_path_vi_cv_path_ruby+y}
8071then :
8072 printf %s "(cached) " >&6
8073else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008074 case $vi_cv_path_ruby in
8075 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00008076 ac_cv_path_vi_cv_path_ruby="$vi_cv_path_ruby" # Let the user override the test with a path.
8077 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00008078 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008079 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8080for as_dir in $PATH
8081do
8082 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02008083 case $as_dir in #(((
8084 '') as_dir=./ ;;
8085 */) ;;
8086 *) as_dir=$as_dir/ ;;
8087 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008088 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02008089 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8090 ac_cv_path_vi_cv_path_ruby="$as_dir$ac_word$ac_exec_ext"
8091 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008092 break 2
8093 fi
8094done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008095 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00008096IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008097
Bram Moolenaar071d4272004-06-13 20:20:40 +00008098 ;;
8099esac
8100fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008101vi_cv_path_ruby=$ac_cv_path_vi_cv_path_ruby
Bram Moolenaar071d4272004-06-13 20:20:40 +00008102if test -n "$vi_cv_path_ruby"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008103 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_ruby" >&5
8104printf "%s\n" "$vi_cv_path_ruby" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008105else
Illia Bobyra96d5442023-08-30 16:30:15 +02008106 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8107printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008108fi
8109
Bram Moolenaar446cb832008-06-24 21:56:24 +00008110
Bram Moolenaar071d4272004-06-13 20:20:40 +00008111 if test "X$vi_cv_path_ruby" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008112 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Ruby version" >&5
8113printf %s "checking Ruby version... " >&6; }
K.Takata236ccbf2022-09-22 16:12:06 +01008114 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 +02008115 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: OK" >&5
8116printf "%s\n" "OK" >&6; }
8117 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Ruby rbconfig" >&5
8118printf %s "checking Ruby rbconfig... " >&6; }
Bram Moolenaar81398892012-10-03 21:09:35 +02008119 ruby_rbconfig="RbConfig"
8120 if ! $vi_cv_path_ruby -r rbconfig -e 'RbConfig' >/dev/null 2>/dev/null; then
8121 ruby_rbconfig="Config"
8122 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008123 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ruby_rbconfig" >&5
8124printf "%s\n" "$ruby_rbconfig" >&6; }
8125 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Ruby header files" >&5
8126printf %s "checking Ruby header files... " >&6; }
Bram Moolenaar81398892012-10-03 21:09:35 +02008127 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 +00008128 if test "X$rubyhdrdir" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008129 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $rubyhdrdir" >&5
8130printf "%s\n" "$rubyhdrdir" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008131 RUBY_CFLAGS="-I$rubyhdrdir"
Bram Moolenaara6fd37b2014-03-27 17:19:09 +01008132 rubyarchdir=`$vi_cv_path_ruby -r rbconfig -e "print ($ruby_rbconfig::CONFIG.has_key? 'rubyarchhdrdir') ? $ruby_rbconfig::CONFIG['rubyarchhdrdir'] : '$rubyhdrdir/'+$ruby_rbconfig::CONFIG['arch']"`
8133 if test -d "$rubyarchdir"; then
8134 RUBY_CFLAGS="$RUBY_CFLAGS -I$rubyarchdir"
Bram Moolenaar165641d2010-02-17 16:23:09 +01008135 fi
Bram Moolenaar81398892012-10-03 21:09:35 +02008136 rubyversion=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG['ruby_version'].gsub(/\./, '')[0,2]"`
Bram Moolenaar026a4452013-08-07 15:22:23 +02008137 if test "X$rubyversion" = "X"; then
K.Takata236ccbf2022-09-22 16:12:06 +01008138 rubyversion=`$vi_cv_path_ruby -e "print RUBY_VERSION.gsub(/\./, '')[0,2]"`
Bram Moolenaar026a4452013-08-07 15:22:23 +02008139 fi
Bram Moolenaar165641d2010-02-17 16:23:09 +01008140 RUBY_CFLAGS="$RUBY_CFLAGS -DRUBY_VERSION=$rubyversion"
Bram Moolenaar81398892012-10-03 21:09:35 +02008141 rubylibs=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG['LIBS']"`
Bram Moolenaar071d4272004-06-13 20:20:40 +00008142 if test "X$rubylibs" != "X"; then
8143 RUBY_LIBS="$rubylibs"
8144 fi
Bram Moolenaar81398892012-10-03 21:09:35 +02008145 librubyarg=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG['LIBRUBYARG'])"`
8146 librubya=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG['LIBRUBY_A'])"`
Bram Moolenaarac499e32013-06-02 19:14:17 +02008147 rubylibdir=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG['libdir'])"`
Illia Bobyre379e212023-09-30 22:59:27 +02008148 if test -f "$rubylibdir/$librubya" || expr "$librubyarg" : "-lruby" >/dev/null; then
Bram Moolenaarac499e32013-06-02 19:14:17 +02008149 RUBY_LIBS="$RUBY_LIBS -L$rubylibdir"
8150 elif test "$librubyarg" = "libruby.a"; then
8151 librubyarg="-lruby"
8152 RUBY_LIBS="$RUBY_LIBS -L$rubylibdir"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008153 fi
8154
8155 if test "X$librubyarg" != "X"; then
8156 RUBY_LIBS="$librubyarg $RUBY_LIBS"
8157 fi
Zdenek Dohnal1d822af2022-11-23 12:06:08 +00008158
8159
Bram Moolenaar071d4272004-06-13 20:20:40 +00008160 RUBY_SRC="if_ruby.c"
8161 RUBY_OBJ="objects/if_ruby.o"
8162 RUBY_PRO="if_ruby.pro"
Illia Bobyra96d5442023-08-30 16:30:15 +02008163 printf "%s\n" "#define FEAT_RUBY 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00008164
Bram Moolenaar3ca71f12010-10-27 16:49:47 +02008165 if test "$enable_rubyinterp" = "dynamic"; then
Bram Moolenaar92021622017-10-12 12:33:43 +02008166 libruby_soname=`$vi_cv_path_ruby -r rbconfig -e "puts $ruby_rbconfig::CONFIG['LIBRUBY_ALIASES'].split[0]"`
Bram Moolenaar87ea64c2018-08-04 15:13:34 +02008167 if test -z "$libruby_soname"; then
8168 libruby_soname=`$vi_cv_path_ruby -r rbconfig -e "puts $ruby_rbconfig::CONFIG['LIBRUBY_SO']"`
8169 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008170 printf "%s\n" "#define DYNAMIC_RUBY 1" >>confdefs.h
Bram Moolenaar3ca71f12010-10-27 16:49:47 +02008171
Bram Moolenaar41a41412020-01-07 21:32:19 +01008172 RUBY_CFLAGS="-DDYNAMIC_RUBY_DLL=\\\"$libruby_soname\\\" $RUBY_CFLAGS"
Bram Moolenaar3ca71f12010-10-27 16:49:47 +02008173 RUBY_LIBS=
8174 fi
Bram Moolenaar864a28b2020-12-28 21:36:56 +01008175 if test "X$CLANG_VERSION" != "X" -a "$rubyversion" -ge 30; then
8176 RUBY_CFLAGS="$RUBY_CFLAGS -fdeclspec"
8177 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00008178 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008179 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found; disabling Ruby" >&5
8180printf "%s\n" "not found; disabling Ruby" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008181 fi
8182 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008183 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: too old; need Ruby version 1.9.1 or later" >&5
8184printf "%s\n" "too old; need Ruby version 1.9.1 or later" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008185 fi
8186 fi
Bram Moolenaarf788a062011-12-14 20:51:25 +01008187
8188 if test "$fail_if_missing" = "yes" -a -z "$RUBY_OBJ"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01008189 as_fn_error $? "could not configure Ruby" "$LINENO" 5
Bram Moolenaarf788a062011-12-14 20:51:25 +01008190 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00008191fi
8192
8193
8194
8195
8196
8197
ichizok8bb3fe42021-12-28 15:51:45 +00008198
Illia Bobyra96d5442023-08-30 16:30:15 +02008199{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-cscope argument" >&5
8200printf %s "checking --enable-cscope argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00008201# Check whether --enable-cscope was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008202if test ${enable_cscope+y}
8203then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00008204 enableval=$enable_cscope;
Illia Bobyra96d5442023-08-30 16:30:15 +02008205else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00008206 enable_cscope="no"
Bram Moolenaar446cb832008-06-24 21:56:24 +00008207fi
8208
Illia Bobyra96d5442023-08-30 16:30:15 +02008209{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_cscope" >&5
8210printf "%s\n" "$enable_cscope" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008211if test "$enable_cscope" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008212 printf "%s\n" "#define FEAT_CSCOPE 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00008213
8214fi
8215
Illia Bobyra96d5442023-08-30 16:30:15 +02008216{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-netbeans argument" >&5
8217printf %s "checking --disable-netbeans argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00008218# Check whether --enable-netbeans was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008219if test ${enable_netbeans+y}
8220then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00008221 enableval=$enable_netbeans;
Illia Bobyra96d5442023-08-30 16:30:15 +02008222else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00008223 enable_netbeans="yes"
Bram Moolenaar446cb832008-06-24 21:56:24 +00008224fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008225
Bram Moolenaar446cb832008-06-24 21:56:24 +00008226if test "$enable_netbeans" = "yes"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00008227 if test "$has_eval" = "no"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008228 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot use NetBeans with tiny features" >&5
8229printf "%s\n" "cannot use NetBeans with tiny features" >&6; }
Bram Moolenaar3c124e32016-01-31 14:36:58 +01008230 enable_netbeans="no"
8231 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008232 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8233printf "%s\n" "no" >&6; }
Bram Moolenaar3c124e32016-01-31 14:36:58 +01008234 fi
Bram Moolenaare0874f82016-01-24 20:36:41 +01008235else
Illia Bobyra96d5442023-08-30 16:30:15 +02008236 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8237printf "%s\n" "yes" >&6; }
Bram Moolenaare0874f82016-01-24 20:36:41 +01008238fi
8239
Illia Bobyra96d5442023-08-30 16:30:15 +02008240{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-channel argument" >&5
8241printf %s "checking --disable-channel argument... " >&6; }
Bram Moolenaare0874f82016-01-24 20:36:41 +01008242# Check whether --enable-channel was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008243if test ${enable_channel+y}
8244then :
Bram Moolenaare0874f82016-01-24 20:36:41 +01008245 enableval=$enable_channel;
Illia Bobyra96d5442023-08-30 16:30:15 +02008246else $as_nop
Bram Moolenaare0874f82016-01-24 20:36:41 +01008247 enable_channel="yes"
8248fi
8249
8250if test "$enable_channel" = "yes"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00008251 if test "$has_eval" = "no"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008252 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot use channels with tiny features" >&5
8253printf "%s\n" "cannot use channels with tiny features" >&6; }
Bram Moolenaar3c124e32016-01-31 14:36:58 +01008254 enable_channel="no"
8255 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008256 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8257printf "%s\n" "no" >&6; }
Bram Moolenaar3c124e32016-01-31 14:36:58 +01008258 fi
Bram Moolenaare0874f82016-01-24 20:36:41 +01008259else
Bram Moolenaar16435482016-01-24 21:31:54 +01008260 if test "$enable_netbeans" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008261 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, netbeans also disabled" >&5
8262printf "%s\n" "yes, netbeans also disabled" >&6; }
Bram Moolenaar16435482016-01-24 21:31:54 +01008263 enable_netbeans="no"
8264 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008265 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8266printf "%s\n" "yes" >&6; }
Bram Moolenaar16435482016-01-24 21:31:54 +01008267 fi
Bram Moolenaare0874f82016-01-24 20:36:41 +01008268fi
8269
Bram Moolenaar16435482016-01-24 21:31:54 +01008270if test "$enable_channel" = "yes"; then
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008271 if test "x$HAIKU" = "xyes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008272 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socket in -lnetwork" >&5
8273printf %s "checking for socket in -lnetwork... " >&6; }
8274if test ${ac_cv_lib_network_socket+y}
8275then :
8276 printf %s "(cached) " >&6
8277else $as_nop
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008278 ac_check_lib_save_LIBS=$LIBS
8279LIBS="-lnetwork $LIBS"
8280cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8281/* end confdefs.h. */
8282
8283/* Override any GCC internal prototype to avoid an error.
8284 Use char because int might match the return type of a GCC
8285 builtin and then its argument prototype would still apply. */
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008286char socket ();
8287int
Illia Bobyra96d5442023-08-30 16:30:15 +02008288main (void)
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008289{
8290return socket ();
8291 ;
8292 return 0;
8293}
8294_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02008295if ac_fn_c_try_link "$LINENO"
8296then :
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008297 ac_cv_lib_network_socket=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02008298else $as_nop
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008299 ac_cv_lib_network_socket=no
8300fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008301rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008302 conftest$ac_exeext conftest.$ac_ext
8303LIBS=$ac_check_lib_save_LIBS
8304fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008305{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_network_socket" >&5
8306printf "%s\n" "$ac_cv_lib_network_socket" >&6; }
8307if test "x$ac_cv_lib_network_socket" = xyes
8308then :
8309 printf "%s\n" "#define HAVE_LIBNETWORK 1" >>confdefs.h
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008310
8311 LIBS="-lnetwork $LIBS"
8312
8313fi
8314
8315 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008316 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8317printf %s "checking for socket in -lsocket... " >&6; }
8318if test ${ac_cv_lib_socket_socket+y}
8319then :
8320 printf %s "(cached) " >&6
8321else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008322 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00008323LIBS="-lsocket $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008324cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008325/* end confdefs.h. */
8326
Bram Moolenaar446cb832008-06-24 21:56:24 +00008327/* Override any GCC internal prototype to avoid an error.
8328 Use char because int might match the return type of a GCC
8329 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008330char socket ();
8331int
Illia Bobyra96d5442023-08-30 16:30:15 +02008332main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008333{
Bram Moolenaar446cb832008-06-24 21:56:24 +00008334return socket ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008335 ;
8336 return 0;
8337}
8338_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02008339if ac_fn_c_try_link "$LINENO"
8340then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008341 ac_cv_lib_socket_socket=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02008342else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008343 ac_cv_lib_socket_socket=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00008344fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008345rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008346 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008347LIBS=$ac_check_lib_save_LIBS
8348fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008349{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8350printf "%s\n" "$ac_cv_lib_socket_socket" >&6; }
8351if test "x$ac_cv_lib_socket_socket" = xyes
8352then :
8353 printf "%s\n" "#define HAVE_LIBSOCKET 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00008354
8355 LIBS="-lsocket $LIBS"
8356
Bram Moolenaar071d4272004-06-13 20:20:40 +00008357fi
8358
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008359 fi
8360
Illia Bobyra96d5442023-08-30 16:30:15 +02008361 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether compiling with IPv6 networking is possible" >&5
8362printf %s "checking whether compiling with IPv6 networking is possible... " >&6; }
8363if test ${vim_cv_ipv6_networking+y}
8364then :
8365 printf %s "(cached) " >&6
8366else $as_nop
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8368/* end confdefs.h. */
8369
8370#include <stdio.h>
8371#include <stdlib.h>
8372#include <stdarg.h>
8373#include <fcntl.h>
8374#include <netdb.h>
8375#include <netinet/in.h>
8376#include <errno.h>
8377#include <sys/types.h>
8378#include <sys/socket.h>
8379 /* Check bitfields */
8380 struct nbbuf {
8381 unsigned int initDone:1;
8382 unsigned short signmaplen;
8383 };
8384
8385int
Illia Bobyra96d5442023-08-30 16:30:15 +02008386main (void)
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008387{
8388
8389 /* Check creating a socket. */
8390 struct sockaddr_in server;
8391 struct addrinfo *res;
8392 (void)socket(AF_INET, SOCK_STREAM, 0);
8393 (void)htons(100);
8394 (void)getaddrinfo("microsoft.com", NULL, NULL, &res);
8395 if (errno == ECONNREFUSED)
8396 (void)connect(1, (struct sockaddr *)&server, sizeof(server));
8397 (void)freeaddrinfo(res);
8398
8399 ;
8400 return 0;
8401}
8402_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02008403if ac_fn_c_try_link "$LINENO"
8404then :
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008405 vim_cv_ipv6_networking="yes"
Illia Bobyra96d5442023-08-30 16:30:15 +02008406else $as_nop
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008407 vim_cv_ipv6_networking="no"
8408fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008409rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008410 conftest$ac_exeext conftest.$ac_ext
8411fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008412{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_ipv6_networking" >&5
8413printf "%s\n" "$vim_cv_ipv6_networking" >&6; }
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008414
8415 if test "x$vim_cv_ipv6_networking" = "xyes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008416 printf "%s\n" "#define FEAT_IPV6 1" >>confdefs.h
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008417
Illia Bobyra96d5442023-08-30 16:30:15 +02008418 ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
8419if test "x$ac_cv_func_inet_ntop" = xyes
8420then :
8421 printf "%s\n" "#define HAVE_INET_NTOP 1" >>confdefs.h
Bram Moolenaarb6fb0512020-04-18 18:24:18 +02008422
8423fi
Bram Moolenaarb6fb0512020-04-18 18:24:18 +02008424
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008425 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008426 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
8427printf %s "checking for gethostbyname in -lnsl... " >&6; }
8428if test ${ac_cv_lib_nsl_gethostbyname+y}
8429then :
8430 printf %s "(cached) " >&6
8431else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008432 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00008433LIBS="-lnsl $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008434cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008435/* end confdefs.h. */
8436
Bram Moolenaar446cb832008-06-24 21:56:24 +00008437/* Override any GCC internal prototype to avoid an error.
8438 Use char because int might match the return type of a GCC
8439 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008440char gethostbyname ();
8441int
Illia Bobyra96d5442023-08-30 16:30:15 +02008442main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008443{
Bram Moolenaar446cb832008-06-24 21:56:24 +00008444return gethostbyname ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008445 ;
8446 return 0;
8447}
8448_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02008449if ac_fn_c_try_link "$LINENO"
8450then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008451 ac_cv_lib_nsl_gethostbyname=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02008452else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008453 ac_cv_lib_nsl_gethostbyname=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00008454fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008455rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008456 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008457LIBS=$ac_check_lib_save_LIBS
8458fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008459{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
8460printf "%s\n" "$ac_cv_lib_nsl_gethostbyname" >&6; }
8461if test "x$ac_cv_lib_nsl_gethostbyname" = xyes
8462then :
8463 printf "%s\n" "#define HAVE_LIBNSL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00008464
8465 LIBS="-lnsl $LIBS"
8466
Bram Moolenaar071d4272004-06-13 20:20:40 +00008467fi
8468
Illia Bobyra96d5442023-08-30 16:30:15 +02008469 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether compiling with IPv4 networking is possible" >&5
8470printf %s "checking whether compiling with IPv4 networking is possible... " >&6; }
8471if test ${vim_cv_ipv4_networking+y}
8472then :
8473 printf %s "(cached) " >&6
8474else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008476/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00008477
8478#include <stdio.h>
8479#include <stdlib.h>
8480#include <stdarg.h>
8481#include <fcntl.h>
8482#include <netdb.h>
8483#include <netinet/in.h>
8484#include <errno.h>
8485#include <sys/types.h>
8486#include <sys/socket.h>
8487 /* Check bitfields */
8488 struct nbbuf {
8489 unsigned int initDone:1;
Bram Moolenaar63de19e2016-12-09 20:11:26 +01008490 unsigned short signmaplen;
Bram Moolenaar071d4272004-06-13 20:20:40 +00008491 };
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008492
8493int
Illia Bobyra96d5442023-08-30 16:30:15 +02008494main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008495{
Bram Moolenaar071d4272004-06-13 20:20:40 +00008496
8497 /* Check creating a socket. */
8498 struct sockaddr_in server;
8499 (void)socket(AF_INET, SOCK_STREAM, 0);
8500 (void)htons(100);
8501 (void)gethostbyname("microsoft.com");
8502 if (errno == ECONNREFUSED)
8503 (void)connect(1, (struct sockaddr *)&server, sizeof(server));
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008504
8505 ;
8506 return 0;
8507}
8508_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02008509if ac_fn_c_try_link "$LINENO"
8510then :
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008511 vim_cv_ipv4_networking="yes"
Illia Bobyra96d5442023-08-30 16:30:15 +02008512else $as_nop
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008513 vim_cv_ipv4_networking="no"; enable_netbeans="no"; enable_channel="no"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008514fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008515rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008516 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +00008517fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008518{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_ipv4_networking" >&5
8519printf "%s\n" "$vim_cv_ipv4_networking" >&6; }
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008520 fi
8521fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00008522if test "$enable_netbeans" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008523 printf "%s\n" "#define FEAT_NETBEANS_INTG 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00008524
8525 NETBEANS_SRC="netbeans.c"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008526
Bram Moolenaar071d4272004-06-13 20:20:40 +00008527 NETBEANS_OBJ="objects/netbeans.o"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008528
Bram Moolenaar071d4272004-06-13 20:20:40 +00008529fi
Bram Moolenaare0874f82016-01-24 20:36:41 +01008530if test "$enable_channel" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008531 printf "%s\n" "#define FEAT_JOB_CHANNEL 1" >>confdefs.h
Bram Moolenaare0874f82016-01-24 20:36:41 +01008532
Bram Moolenaar8b5866d2020-09-05 15:48:51 +02008533 CHANNEL_SRC="job.c channel.c"
Bram Moolenaare0874f82016-01-24 20:36:41 +01008534
Bram Moolenaar8b5866d2020-09-05 15:48:51 +02008535 CHANNEL_OBJ="objects/job.o objects/channel.o"
Bram Moolenaare0874f82016-01-24 20:36:41 +01008536
8537fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00008538
Illia Bobyra96d5442023-08-30 16:30:15 +02008539{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-terminal argument" >&5
8540printf %s "checking --enable-terminal argument... " >&6; }
Bram Moolenaare4f25e42017-07-07 11:54:15 +02008541# Check whether --enable-terminal was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008542if test ${enable_terminal+y}
8543then :
Bram Moolenaaref839562017-10-28 20:28:23 +02008544 enableval=$enable_terminal;
Illia Bobyra96d5442023-08-30 16:30:15 +02008545else $as_nop
Bram Moolenaar595a4022017-09-03 19:15:57 +02008546 enable_terminal="auto"
Bram Moolenaare4f25e42017-07-07 11:54:15 +02008547fi
8548
Bram Moolenaar595a4022017-09-03 19:15:57 +02008549if test "$enable_terminal" = "yes" || test "$enable_terminal" = "auto" -a "x$features" = "xhuge" ; then
Bram Moolenaar12471262022-01-18 11:11:25 +00008550 if test "$has_eval" = "no"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008551 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot use terminal emulator with tiny features" >&5
8552printf "%s\n" "cannot use terminal emulator with tiny features" >&6; }
Bram Moolenaare4f25e42017-07-07 11:54:15 +02008553 enable_terminal="no"
8554 else
Bram Moolenaar595a4022017-09-03 19:15:57 +02008555 if test "$enable_terminal" = "auto"; then
8556 enable_terminal="yes"
Illia Bobyra96d5442023-08-30 16:30:15 +02008557 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: defaulting to yes" >&5
8558printf "%s\n" "defaulting to yes" >&6; }
Bram Moolenaar595a4022017-09-03 19:15:57 +02008559 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008560 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8561printf "%s\n" "yes" >&6; }
Bram Moolenaar595a4022017-09-03 19:15:57 +02008562 fi
Bram Moolenaare4f25e42017-07-07 11:54:15 +02008563 fi
8564else
Bram Moolenaar595a4022017-09-03 19:15:57 +02008565 if test "$enable_terminal" = "auto"; then
8566 enable_terminal="no"
Illia Bobyra96d5442023-08-30 16:30:15 +02008567 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: defaulting to no" >&5
8568printf "%s\n" "defaulting to no" >&6; }
Bram Moolenaar595a4022017-09-03 19:15:57 +02008569 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008570 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8571printf "%s\n" "no" >&6; }
Bram Moolenaar595a4022017-09-03 19:15:57 +02008572 fi
Bram Moolenaare4f25e42017-07-07 11:54:15 +02008573fi
Bram Moolenaar8b423282017-12-16 14:37:06 +01008574if test "$enable_terminal" = "yes" -a "$enable_channel" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008575 printf "%s\n" "#define FEAT_TERMINAL 1" >>confdefs.h
Bram Moolenaare4f25e42017-07-07 11:54:15 +02008576
Bram Moolenaar93268052019-10-10 13:22:54 +02008577 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 +02008578
Bram Moolenaar93268052019-10-10 13:22:54 +02008579 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 +02008580
Bram Moolenaar823edd12019-10-23 22:35:36 +02008581 TERM_TEST="test_libvterm"
8582
Bram Moolenaare4f25e42017-07-07 11:54:15 +02008583fi
8584
Illia Bobyra96d5442023-08-30 16:30:15 +02008585{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-autoservername argument" >&5
8586printf %s "checking --enable-autoservername argument... " >&6; }
Bram Moolenaare42a6d22017-11-12 19:21:51 +01008587# Check whether --enable-autoservername was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008588if test ${enable_autoservername+y}
8589then :
Bram Moolenaare42a6d22017-11-12 19:21:51 +01008590 enableval=$enable_autoservername;
Illia Bobyra96d5442023-08-30 16:30:15 +02008591else $as_nop
Bram Moolenaare42a6d22017-11-12 19:21:51 +01008592 enable_autoservername="no"
8593fi
8594
Illia Bobyra96d5442023-08-30 16:30:15 +02008595{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_autoservername" >&5
8596printf "%s\n" "$enable_autoservername" >&6; }
Bram Moolenaare42a6d22017-11-12 19:21:51 +01008597if test "$enable_autoservername" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008598 printf "%s\n" "#define FEAT_AUTOSERVERNAME 1" >>confdefs.h
Bram Moolenaare42a6d22017-11-12 19:21:51 +01008599
8600fi
8601
Illia Bobyra96d5442023-08-30 16:30:15 +02008602{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-multibyte argument" >&5
8603printf %s "checking --enable-multibyte argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00008604# Check whether --enable-multibyte was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008605if test ${enable_multibyte+y}
8606then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00008607 enableval=$enable_multibyte;
Illia Bobyra96d5442023-08-30 16:30:15 +02008608else $as_nop
Bram Moolenaar2be7cb72019-01-12 16:10:51 +01008609 enable_multibyte="yes"
Bram Moolenaar446cb832008-06-24 21:56:24 +00008610fi
8611
Illia Bobyra96d5442023-08-30 16:30:15 +02008612{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_multibyte" >&5
8613printf "%s\n" "$enable_multibyte" >&6; }
Bram Moolenaar30276f22019-01-24 17:59:39 +01008614if test "$enable_multibyte" != "yes"; then
Bram Moolenaar2be7cb72019-01-12 16:10:51 +01008615 as_fn_error $? "The multi-byte feature can no longer be disabled. If you have
8616 a problem with this, discuss on the Vim mailing list." "$LINENO" 5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008617fi
8618
Illia Bobyra96d5442023-08-30 16:30:15 +02008619{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-rightleft argument" >&5
8620printf %s "checking --disable-rightleft argument... " >&6; }
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008621# Check whether --enable-rightleft was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008622if test ${enable_rightleft+y}
8623then :
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008624 enableval=$enable_rightleft;
Illia Bobyra96d5442023-08-30 16:30:15 +02008625else $as_nop
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008626 enable_rightleft="yes"
8627fi
8628
8629if test "$enable_rightleft" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008630 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8631printf "%s\n" "no" >&6; }
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008632else
Illia Bobyra96d5442023-08-30 16:30:15 +02008633 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8634printf "%s\n" "yes" >&6; }
8635 printf "%s\n" "#define DISABLE_RIGHTLEFT 1" >>confdefs.h
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008636
8637fi
8638
Illia Bobyra96d5442023-08-30 16:30:15 +02008639{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-arabic argument" >&5
8640printf %s "checking --disable-arabic argument... " >&6; }
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008641# Check whether --enable-arabic was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008642if test ${enable_arabic+y}
8643then :
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008644 enableval=$enable_arabic;
Illia Bobyra96d5442023-08-30 16:30:15 +02008645else $as_nop
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008646 enable_arabic="yes"
8647fi
8648
8649if test "$enable_arabic" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008650 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8651printf "%s\n" "no" >&6; }
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008652else
Illia Bobyra96d5442023-08-30 16:30:15 +02008653 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8654printf "%s\n" "yes" >&6; }
8655 printf "%s\n" "#define DISABLE_ARABIC 1" >>confdefs.h
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008656
8657fi
8658
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008659# Check whether --enable-farsi was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008660if test ${enable_farsi+y}
8661then :
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008662 enableval=$enable_farsi;
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008663fi
8664
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008665
Illia Bobyra96d5442023-08-30 16:30:15 +02008666{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-xim argument" >&5
8667printf %s "checking --enable-xim argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00008668# Check whether --enable-xim was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008669if test ${enable_xim+y}
8670then :
8671 enableval=$enable_xim; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_xim" >&5
8672printf "%s\n" "$enable_xim" >&6; }
8673else $as_nop
8674 enable_xim="auto"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: defaulting to auto" >&5
8675printf "%s\n" "defaulting to auto" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00008676fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00008677
Bram Moolenaar446cb832008-06-24 21:56:24 +00008678
Illia Bobyra96d5442023-08-30 16:30:15 +02008679{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-fontset argument" >&5
8680printf %s "checking --enable-fontset argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00008681# Check whether --enable-fontset was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008682if test ${enable_fontset+y}
8683then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00008684 enableval=$enable_fontset;
Illia Bobyra96d5442023-08-30 16:30:15 +02008685else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00008686 enable_fontset="no"
Bram Moolenaar446cb832008-06-24 21:56:24 +00008687fi
8688
Illia Bobyra96d5442023-08-30 16:30:15 +02008689{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_fontset" >&5
8690printf "%s\n" "$enable_fontset" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008691
8692test -z "$with_x" && with_x=yes
Bram Moolenaard0573012017-10-28 21:11:06 +02008693test "${enable_gui-yes}" != no -a "x$MACOS_X" != "xyes" -a "x$QNX" != "xyes" && with_x=yes
Bram Moolenaar071d4272004-06-13 20:20:40 +00008694if test "$with_x" = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008695 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: defaulting to: don't HAVE_X11" >&5
8696printf "%s\n" "defaulting to: don't HAVE_X11" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008697else
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008698
Bram Moolenaar071d4272004-06-13 20:20:40 +00008699 # Extract the first word of "xmkmf", so it can be a program name with args.
8700set dummy xmkmf; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02008701{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8702printf %s "checking for $ac_word... " >&6; }
8703if test ${ac_cv_path_xmkmfpath+y}
8704then :
8705 printf %s "(cached) " >&6
8706else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008707 case $xmkmfpath in
8708 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00008709 ac_cv_path_xmkmfpath="$xmkmfpath" # Let the user override the test with a path.
8710 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00008711 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008712 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8713for as_dir in $PATH
8714do
8715 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02008716 case $as_dir in #(((
8717 '') as_dir=./ ;;
8718 */) ;;
8719 *) as_dir=$as_dir/ ;;
8720 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008721 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02008722 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8723 ac_cv_path_xmkmfpath="$as_dir$ac_word$ac_exec_ext"
8724 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008725 break 2
8726 fi
8727done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008728 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00008729IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008730
Bram Moolenaar071d4272004-06-13 20:20:40 +00008731 ;;
8732esac
8733fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008734xmkmfpath=$ac_cv_path_xmkmfpath
Bram Moolenaar071d4272004-06-13 20:20:40 +00008735if test -n "$xmkmfpath"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008736 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xmkmfpath" >&5
8737printf "%s\n" "$xmkmfpath" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008738else
Illia Bobyra96d5442023-08-30 16:30:15 +02008739 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8740printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008741fi
8742
8743
Bram Moolenaar446cb832008-06-24 21:56:24 +00008744
Illia Bobyra96d5442023-08-30 16:30:15 +02008745 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for X" >&5
8746printf %s "checking for X... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008747
Bram Moolenaar071d4272004-06-13 20:20:40 +00008748
Bram Moolenaar446cb832008-06-24 21:56:24 +00008749# Check whether --with-x was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008750if test ${with_x+y}
8751then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00008752 withval=$with_x;
8753fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00008754
8755# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
8756if test "x$with_x" = xno; then
8757 # The user explicitly disabled X.
8758 have_x=disabled
8759else
Bram Moolenaar446cb832008-06-24 21:56:24 +00008760 case $x_includes,$x_libraries in #(
Bram Moolenaar7db77842014-03-27 17:40:59 +01008761 *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
Illia Bobyra96d5442023-08-30 16:30:15 +02008762 *,NONE | NONE,*) if test ${ac_cv_have_x+y}
8763then :
8764 printf %s "(cached) " >&6
8765else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00008766 # One or both of the vars are not set, and there is no cached value.
Illia Bobyra96d5442023-08-30 16:30:15 +02008767ac_x_includes=no
8768ac_x_libraries=no
8769# Do we need to do anything special at all?
8770ac_save_LIBS=$LIBS
8771LIBS="-lX11 $LIBS"
8772cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8773/* end confdefs.h. */
8774#include <X11/Xlib.h>
8775int
8776main (void)
8777{
8778XrmInitialize ()
8779 ;
8780 return 0;
8781}
8782_ACEOF
8783if ac_fn_c_try_link "$LINENO"
8784then :
8785 # We can compile and link X programs with no special options.
8786 ac_x_includes=
8787 ac_x_libraries=
8788fi
8789rm -f core conftest.err conftest.$ac_objext conftest.beam \
8790 conftest$ac_exeext conftest.$ac_ext
8791LIBS="$ac_save_LIBS"
8792# If that didn't work, only try xmkmf and file system searches
8793# for native compilation.
8794if test x"$ac_x_includes" = xno && test "$cross_compiling" = no
8795then :
8796 rm -f -r conftest.dir
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008797if mkdir conftest.dir; then
8798 cd conftest.dir
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008799 cat >Imakefile <<'_ACEOF'
Bram Moolenaar446cb832008-06-24 21:56:24 +00008800incroot:
8801 @echo incroot='${INCROOT}'
8802usrlibdir:
8803 @echo usrlibdir='${USRLIBDIR}'
8804libdir:
8805 @echo libdir='${LIBDIR}'
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008806_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +00008807 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01008808 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
Bram Moolenaar446cb832008-06-24 21:56:24 +00008809 for ac_var in incroot usrlibdir libdir; do
8810 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
8811 done
Bram Moolenaar071d4272004-06-13 20:20:40 +00008812 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
Bram Moolenaar446cb832008-06-24 21:56:24 +00008813 for ac_extension in a so sl dylib la dll; do
8814 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
8815 test -f "$ac_im_libdir/libX11.$ac_extension"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008816 ac_im_usrlibdir=$ac_im_libdir; break
Bram Moolenaar071d4272004-06-13 20:20:40 +00008817 fi
8818 done
8819 # Screen out bogus values from the imake configuration. They are
8820 # bogus both because they are the default anyway, and because
8821 # using them would break gcc on systems where it needs fixed includes.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008822 case $ac_im_incroot in
Bram Moolenaar446cb832008-06-24 21:56:24 +00008823 /usr/include) ac_x_includes= ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008824 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00008825 esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008826 case $ac_im_usrlibdir in
Bram Moolenaar32f31b12009-05-21 13:20:59 +00008827 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008828 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00008829 esac
8830 fi
8831 cd ..
Bram Moolenaar446cb832008-06-24 21:56:24 +00008832 rm -f -r conftest.dir
Bram Moolenaar071d4272004-06-13 20:20:40 +00008833fi
8834
Illia Bobyra96d5442023-08-30 16:30:15 +02008835 # Standard set of common directories for X headers.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008836# Check X11 before X11Rn because it is often a symlink to the current release.
8837ac_x_header_dirs='
8838/usr/X11/include
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008839/usr/X11R7/include
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008840/usr/X11R6/include
8841/usr/X11R5/include
8842/usr/X11R4/include
Bram Moolenaar071d4272004-06-13 20:20:40 +00008843
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008844/usr/include/X11
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008845/usr/include/X11R7
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008846/usr/include/X11R6
8847/usr/include/X11R5
8848/usr/include/X11R4
8849
8850/usr/local/X11/include
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008851/usr/local/X11R7/include
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008852/usr/local/X11R6/include
8853/usr/local/X11R5/include
8854/usr/local/X11R4/include
8855
8856/usr/local/include/X11
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008857/usr/local/include/X11R7
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008858/usr/local/include/X11R6
8859/usr/local/include/X11R5
8860/usr/local/include/X11R4
8861
Illia Bobyra96d5442023-08-30 16:30:15 +02008862/opt/X11/include
8863
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008864/usr/X386/include
8865/usr/x386/include
8866/usr/XFree86/include/X11
8867
8868/usr/include
8869/usr/local/include
8870/usr/unsupported/include
8871/usr/athena/include
8872/usr/local/x11r5/include
8873/usr/lpp/Xamples/include
8874
8875/usr/openwin/include
8876/usr/openwin/share/include'
8877
8878if test "$ac_x_includes" = no; then
Bram Moolenaar446cb832008-06-24 21:56:24 +00008879 # Guess where to find include files, by looking for Xlib.h.
Bram Moolenaar071d4272004-06-13 20:20:40 +00008880 # First, try using that file with no special directory specified.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008882/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +00008883#include <X11/Xlib.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008884_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02008885if ac_fn_c_try_cpp "$LINENO"
8886then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00008887 # We can compile using X headers with no special include directory.
8888ac_x_includes=
Illia Bobyra96d5442023-08-30 16:30:15 +02008889else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008890 for ac_dir in $ac_x_header_dirs; do
Bram Moolenaar446cb832008-06-24 21:56:24 +00008891 if test -r "$ac_dir/X11/Xlib.h"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008892 ac_x_includes=$ac_dir
8893 break
8894 fi
8895done
Bram Moolenaar071d4272004-06-13 20:20:40 +00008896fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01008897rm -f conftest.err conftest.i conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008898fi # $ac_x_includes = no
Bram Moolenaar071d4272004-06-13 20:20:40 +00008899
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008900if test "$ac_x_libraries" = no; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008901 # Check for the libraries.
Bram Moolenaar071d4272004-06-13 20:20:40 +00008902 # See if we find them without any special options.
8903 # Don't add to $LIBS permanently.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008904 ac_save_LIBS=$LIBS
Bram Moolenaar446cb832008-06-24 21:56:24 +00008905 LIBS="-lX11 $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008907/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +00008908#include <X11/Xlib.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008909int
Illia Bobyra96d5442023-08-30 16:30:15 +02008910main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008911{
Bram Moolenaar446cb832008-06-24 21:56:24 +00008912XrmInitialize ()
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008913 ;
8914 return 0;
8915}
8916_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02008917if ac_fn_c_try_link "$LINENO"
8918then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008919 LIBS=$ac_save_LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00008920# We can link X programs with no special library path.
8921ac_x_libraries=
Illia Bobyra96d5442023-08-30 16:30:15 +02008922else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008923 LIBS=$ac_save_LIBS
Illia Bobyra96d5442023-08-30 16:30:15 +02008924for 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 +00008925do
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008926 # Don't even attempt the hair of trying to link an X program!
Bram Moolenaar446cb832008-06-24 21:56:24 +00008927 for ac_extension in a so sl dylib la dll; do
8928 if test -r "$ac_dir/libX11.$ac_extension"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008929 ac_x_libraries=$ac_dir
8930 break 2
8931 fi
8932 done
8933done
8934fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008935rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008936 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008937fi # $ac_x_libraries = no
Bram Moolenaar071d4272004-06-13 20:20:40 +00008938
Illia Bobyra96d5442023-08-30 16:30:15 +02008939fi
8940# Record the results.
Bram Moolenaar446cb832008-06-24 21:56:24 +00008941case $ac_x_includes,$ac_x_libraries in #(
Illia Bobyra96d5442023-08-30 16:30:15 +02008942 no,* | *,no | *\'*) :
Bram Moolenaar446cb832008-06-24 21:56:24 +00008943 # Didn't find X, or a directory has "'" in its name.
Illia Bobyra96d5442023-08-30 16:30:15 +02008944 ac_cv_have_x="have_x=no" ;; #(
8945 *) :
Bram Moolenaar446cb832008-06-24 21:56:24 +00008946 # Record where we found X for the cache.
8947 ac_cv_have_x="have_x=yes\
8948 ac_x_includes='$ac_x_includes'\
Illia Bobyra96d5442023-08-30 16:30:15 +02008949 ac_x_libraries='$ac_x_libraries'" ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +00008950esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00008951fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00008952;; #(
8953 *) have_x=yes;;
8954 esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00008955 eval "$ac_cv_have_x"
8956fi # $with_x != no
8957
8958if test "$have_x" != yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008959 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
8960printf "%s\n" "$have_x" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008961 no_x=yes
8962else
8963 # If each of the values was on the command line, it overrides each guess.
8964 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
8965 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
8966 # Update the cache value to reflect the command line values.
Bram Moolenaar446cb832008-06-24 21:56:24 +00008967 ac_cv_have_x="have_x=yes\
8968 ac_x_includes='$x_includes'\
8969 ac_x_libraries='$x_libraries'"
Illia Bobyra96d5442023-08-30 16:30:15 +02008970 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
8971printf "%s\n" "libraries $x_libraries, headers $x_includes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008972fi
8973
8974if test "$no_x" = yes; then
8975 # Not all programs may use this symbol, but it does not hurt to define it.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008976
Illia Bobyra96d5442023-08-30 16:30:15 +02008977printf "%s\n" "#define X_DISPLAY_MISSING 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00008978
8979 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
8980else
8981 if test -n "$x_includes"; then
8982 X_CFLAGS="$X_CFLAGS -I$x_includes"
8983 fi
8984
8985 # It would also be nice to do this for all -L options, not just this one.
8986 if test -n "$x_libraries"; then
8987 X_LIBS="$X_LIBS -L$x_libraries"
8988 # For Solaris; some versions of Sun CC require a space after -R and
8989 # others require no space. Words are not sufficient . . . .
Illia Bobyra96d5442023-08-30 16:30:15 +02008990 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
8991printf %s "checking whether -R must be followed by a space... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00008992 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
8993 ac_xsave_c_werror_flag=$ac_c_werror_flag
8994 ac_c_werror_flag=yes
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008996/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00008997
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008998int
Illia Bobyra96d5442023-08-30 16:30:15 +02008999main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009000{
Bram Moolenaar071d4272004-06-13 20:20:40 +00009001
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009002 ;
9003 return 0;
9004}
9005_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009006if ac_fn_c_try_link "$LINENO"
9007then :
9008 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9009printf "%s\n" "no" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00009010 X_LIBS="$X_LIBS -R$x_libraries"
Illia Bobyra96d5442023-08-30 16:30:15 +02009011else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009012 LIBS="$ac_xsave_LIBS -R $x_libraries"
9013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009014/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00009015
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009016int
Illia Bobyra96d5442023-08-30 16:30:15 +02009017main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009018{
Bram Moolenaar071d4272004-06-13 20:20:40 +00009019
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009020 ;
9021 return 0;
9022}
9023_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009024if ac_fn_c_try_link "$LINENO"
9025then :
9026 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9027printf "%s\n" "yes" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00009028 X_LIBS="$X_LIBS -R $x_libraries"
Illia Bobyra96d5442023-08-30 16:30:15 +02009029else $as_nop
9030 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
9031printf "%s\n" "neither works" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009032fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009033rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009034 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +00009035fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009036rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009037 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +00009038 ac_c_werror_flag=$ac_xsave_c_werror_flag
9039 LIBS=$ac_xsave_LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009040 fi
9041
9042 # Check for system-dependent libraries X programs must link with.
9043 # Do this before checking for the system-independent R6 libraries
9044 # (-lICE), since we may need -lsocket or whatever for X linking.
9045
9046 if test "$ISC" = yes; then
9047 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
9048 else
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009049 # Martyn Johnson says this is needed for Ultrix, if the X
9050 # libraries were built with DECnet support. And Karl Berry says
Bram Moolenaar071d4272004-06-13 20:20:40 +00009051 # the Alpha needs dnet_stub (dnet does not exist).
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009052 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009054/* end confdefs.h. */
9055
Bram Moolenaar446cb832008-06-24 21:56:24 +00009056/* Override any GCC internal prototype to avoid an error.
9057 Use char because int might match the return type of a GCC
9058 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009059char XOpenDisplay ();
9060int
Illia Bobyra96d5442023-08-30 16:30:15 +02009061main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009062{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009063return XOpenDisplay ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009064 ;
9065 return 0;
9066}
9067_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009068if ac_fn_c_try_link "$LINENO"
9069then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009070
Illia Bobyra96d5442023-08-30 16:30:15 +02009071else $as_nop
9072 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
9073printf %s "checking for dnet_ntoa in -ldnet... " >&6; }
9074if test ${ac_cv_lib_dnet_dnet_ntoa+y}
9075then :
9076 printf %s "(cached) " >&6
9077else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009078 ac_check_lib_save_LIBS=$LIBS
9079LIBS="-ldnet $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009080cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009081/* end confdefs.h. */
9082
Bram Moolenaar446cb832008-06-24 21:56:24 +00009083/* Override any GCC internal prototype to avoid an error.
9084 Use char because int might match the return type of a GCC
9085 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009086char dnet_ntoa ();
9087int
Illia Bobyra96d5442023-08-30 16:30:15 +02009088main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009089{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009090return dnet_ntoa ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009091 ;
9092 return 0;
9093}
9094_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009095if ac_fn_c_try_link "$LINENO"
9096then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009097 ac_cv_lib_dnet_dnet_ntoa=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009098else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009099 ac_cv_lib_dnet_dnet_ntoa=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009100fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009101rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009102 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009103LIBS=$ac_check_lib_save_LIBS
9104fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009105{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
9106printf "%s\n" "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
9107if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes
9108then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009109 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009110fi
9111
9112 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009113 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
9114printf %s "checking for dnet_ntoa in -ldnet_stub... " >&6; }
9115if test ${ac_cv_lib_dnet_stub_dnet_ntoa+y}
9116then :
9117 printf %s "(cached) " >&6
9118else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009119 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009120LIBS="-ldnet_stub $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009121cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009122/* end confdefs.h. */
9123
Bram Moolenaar446cb832008-06-24 21:56:24 +00009124/* Override any GCC internal prototype to avoid an error.
9125 Use char because int might match the return type of a GCC
9126 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009127char dnet_ntoa ();
9128int
Illia Bobyra96d5442023-08-30 16:30:15 +02009129main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009130{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009131return dnet_ntoa ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009132 ;
9133 return 0;
9134}
9135_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009136if ac_fn_c_try_link "$LINENO"
9137then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009138 ac_cv_lib_dnet_stub_dnet_ntoa=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009139else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009140 ac_cv_lib_dnet_stub_dnet_ntoa=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009141fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009142rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009143 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009144LIBS=$ac_check_lib_save_LIBS
9145fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009146{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
9147printf "%s\n" "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
9148if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes
9149then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009150 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009151fi
9152
9153 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009154fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009155rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009156 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009157 LIBS="$ac_xsave_LIBS"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009158
9159 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
9160 # to get the SysV transport functions.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009161 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
Bram Moolenaar071d4272004-06-13 20:20:40 +00009162 # needs -lnsl.
9163 # The nsl library prevents programs from opening the X display
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009164 # on Irix 5.2, according to T.E. Dickey.
9165 # The functions gethostbyname, getservbyname, and inet_addr are
9166 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009167 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Illia Bobyra96d5442023-08-30 16:30:15 +02009168if test "x$ac_cv_func_gethostbyname" = xyes
9169then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009170
Bram Moolenaar071d4272004-06-13 20:20:40 +00009171fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00009172
Bram Moolenaar071d4272004-06-13 20:20:40 +00009173 if test $ac_cv_func_gethostbyname = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009174 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
9175printf %s "checking for gethostbyname in -lnsl... " >&6; }
9176if test ${ac_cv_lib_nsl_gethostbyname+y}
9177then :
9178 printf %s "(cached) " >&6
9179else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009180 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009181LIBS="-lnsl $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009182cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009183/* end confdefs.h. */
9184
Bram Moolenaar446cb832008-06-24 21:56:24 +00009185/* Override any GCC internal prototype to avoid an error.
9186 Use char because int might match the return type of a GCC
9187 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009188char gethostbyname ();
9189int
Illia Bobyra96d5442023-08-30 16:30:15 +02009190main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009191{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009192return gethostbyname ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009193 ;
9194 return 0;
9195}
9196_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009197if ac_fn_c_try_link "$LINENO"
9198then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009199 ac_cv_lib_nsl_gethostbyname=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009200else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009201 ac_cv_lib_nsl_gethostbyname=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009202fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009203rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009204 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009205LIBS=$ac_check_lib_save_LIBS
9206fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009207{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
9208printf "%s\n" "$ac_cv_lib_nsl_gethostbyname" >&6; }
9209if test "x$ac_cv_lib_nsl_gethostbyname" = xyes
9210then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009211 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009212fi
9213
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009214 if test $ac_cv_lib_nsl_gethostbyname = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009215 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
9216printf %s "checking for gethostbyname in -lbsd... " >&6; }
9217if test ${ac_cv_lib_bsd_gethostbyname+y}
9218then :
9219 printf %s "(cached) " >&6
9220else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009221 ac_check_lib_save_LIBS=$LIBS
9222LIBS="-lbsd $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009223cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009224/* end confdefs.h. */
9225
Bram Moolenaar446cb832008-06-24 21:56:24 +00009226/* Override any GCC internal prototype to avoid an error.
9227 Use char because int might match the return type of a GCC
9228 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009229char gethostbyname ();
9230int
Illia Bobyra96d5442023-08-30 16:30:15 +02009231main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009232{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009233return gethostbyname ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009234 ;
9235 return 0;
9236}
9237_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009238if ac_fn_c_try_link "$LINENO"
9239then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009240 ac_cv_lib_bsd_gethostbyname=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009241else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009242 ac_cv_lib_bsd_gethostbyname=no
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009243fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009244rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009245 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009246LIBS=$ac_check_lib_save_LIBS
9247fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009248{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
9249printf "%s\n" "$ac_cv_lib_bsd_gethostbyname" >&6; }
9250if test "x$ac_cv_lib_bsd_gethostbyname" = xyes
9251then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009252 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
9253fi
9254
9255 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00009256 fi
9257
9258 # lieder@skyler.mavd.honeywell.com says without -lsocket,
9259 # socket/setsockopt and other routines are undefined under SCO ODT
9260 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009261 # on later versions), says Simon Leinen: it contains gethostby*
9262 # variants that don't use the name server (or something). -lsocket
9263 # must be given before -lnsl if both are needed. We assume that
9264 # if connect needs -lnsl, so does gethostbyname.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009265 ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect"
Illia Bobyra96d5442023-08-30 16:30:15 +02009266if test "x$ac_cv_func_connect" = xyes
9267then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009268
Bram Moolenaar071d4272004-06-13 20:20:40 +00009269fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00009270
Bram Moolenaar071d4272004-06-13 20:20:40 +00009271 if test $ac_cv_func_connect = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009272 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
9273printf %s "checking for connect in -lsocket... " >&6; }
9274if test ${ac_cv_lib_socket_connect+y}
9275then :
9276 printf %s "(cached) " >&6
9277else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009278 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009279LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009280cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009281/* end confdefs.h. */
9282
Bram Moolenaar446cb832008-06-24 21:56:24 +00009283/* Override any GCC internal prototype to avoid an error.
9284 Use char because int might match the return type of a GCC
9285 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009286char connect ();
9287int
Illia Bobyra96d5442023-08-30 16:30:15 +02009288main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009289{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009290return connect ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009291 ;
9292 return 0;
9293}
9294_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009295if ac_fn_c_try_link "$LINENO"
9296then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009297 ac_cv_lib_socket_connect=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009298else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009299 ac_cv_lib_socket_connect=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009300fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009301rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009302 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009303LIBS=$ac_check_lib_save_LIBS
9304fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009305{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
9306printf "%s\n" "$ac_cv_lib_socket_connect" >&6; }
9307if test "x$ac_cv_lib_socket_connect" = xyes
9308then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009309 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009310fi
9311
9312 fi
9313
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009314 # Guillermo Gomez says -lposix is necessary on A/UX.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009315 ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove"
Illia Bobyra96d5442023-08-30 16:30:15 +02009316if test "x$ac_cv_func_remove" = xyes
9317then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009318
Bram Moolenaar071d4272004-06-13 20:20:40 +00009319fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00009320
Bram Moolenaar071d4272004-06-13 20:20:40 +00009321 if test $ac_cv_func_remove = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009322 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
9323printf %s "checking for remove in -lposix... " >&6; }
9324if test ${ac_cv_lib_posix_remove+y}
9325then :
9326 printf %s "(cached) " >&6
9327else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009328 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009329LIBS="-lposix $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009330cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009331/* end confdefs.h. */
9332
Bram Moolenaar446cb832008-06-24 21:56:24 +00009333/* Override any GCC internal prototype to avoid an error.
9334 Use char because int might match the return type of a GCC
9335 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009336char remove ();
9337int
Illia Bobyra96d5442023-08-30 16:30:15 +02009338main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009339{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009340return remove ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009341 ;
9342 return 0;
9343}
9344_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009345if ac_fn_c_try_link "$LINENO"
9346then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009347 ac_cv_lib_posix_remove=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009348else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009349 ac_cv_lib_posix_remove=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009350fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009351rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009352 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009353LIBS=$ac_check_lib_save_LIBS
9354fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009355{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
9356printf "%s\n" "$ac_cv_lib_posix_remove" >&6; }
9357if test "x$ac_cv_lib_posix_remove" = xyes
9358then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009359 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009360fi
9361
9362 fi
9363
9364 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009365 ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
Illia Bobyra96d5442023-08-30 16:30:15 +02009366if test "x$ac_cv_func_shmat" = xyes
9367then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009368
Bram Moolenaar071d4272004-06-13 20:20:40 +00009369fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00009370
Bram Moolenaar071d4272004-06-13 20:20:40 +00009371 if test $ac_cv_func_shmat = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009372 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
9373printf %s "checking for shmat in -lipc... " >&6; }
9374if test ${ac_cv_lib_ipc_shmat+y}
9375then :
9376 printf %s "(cached) " >&6
9377else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009378 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009379LIBS="-lipc $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009380cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009381/* end confdefs.h. */
9382
Bram Moolenaar446cb832008-06-24 21:56:24 +00009383/* Override any GCC internal prototype to avoid an error.
9384 Use char because int might match the return type of a GCC
9385 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009386char shmat ();
9387int
Illia Bobyra96d5442023-08-30 16:30:15 +02009388main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009389{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009390return shmat ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009391 ;
9392 return 0;
9393}
9394_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009395if ac_fn_c_try_link "$LINENO"
9396then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009397 ac_cv_lib_ipc_shmat=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009398else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009399 ac_cv_lib_ipc_shmat=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009400fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009401rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009402 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009403LIBS=$ac_check_lib_save_LIBS
9404fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009405{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
9406printf "%s\n" "$ac_cv_lib_ipc_shmat" >&6; }
9407if test "x$ac_cv_lib_ipc_shmat" = xyes
9408then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009409 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009410fi
9411
9412 fi
9413 fi
9414
9415 # Check for libraries that X11R6 Xt/Xaw programs need.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009416 ac_save_LDFLAGS=$LDFLAGS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009417 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
9418 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
9419 # check for ICE first), but we must link in the order -lSM -lICE or
9420 # we get undefined symbols. So assume we have SM if we have ICE.
9421 # These have to be linked with before -lX11, unlike the other
9422 # libraries we check for below, so use a different variable.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009423 # John Interrante, Karl Berry
Illia Bobyra96d5442023-08-30 16:30:15 +02009424 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
9425printf %s "checking for IceConnectionNumber in -lICE... " >&6; }
9426if test ${ac_cv_lib_ICE_IceConnectionNumber+y}
9427then :
9428 printf %s "(cached) " >&6
9429else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009430 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009431LIBS="-lICE $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009432cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009433/* end confdefs.h. */
9434
Bram Moolenaar446cb832008-06-24 21:56:24 +00009435/* Override any GCC internal prototype to avoid an error.
9436 Use char because int might match the return type of a GCC
9437 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009438char IceConnectionNumber ();
9439int
Illia Bobyra96d5442023-08-30 16:30:15 +02009440main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009441{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009442return IceConnectionNumber ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009443 ;
9444 return 0;
9445}
9446_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009447if ac_fn_c_try_link "$LINENO"
9448then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009449 ac_cv_lib_ICE_IceConnectionNumber=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009450else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009451 ac_cv_lib_ICE_IceConnectionNumber=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009452fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009453rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009454 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009455LIBS=$ac_check_lib_save_LIBS
9456fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009457{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
9458printf "%s\n" "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
9459if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes
9460then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009461 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009462fi
9463
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009464 LDFLAGS=$ac_save_LDFLAGS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009465
9466fi
9467
9468
Bram Moolenaar2c704a72010-06-03 21:17:25 +02009469 if test "$zOSUnix" = "yes"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00009470 CFLAGS="$CFLAGS -W c,dll"
9471 LDFLAGS="$LDFLAGS -W l,dll"
9472 X_EXTRA_LIBS="$X_EXTRA_LIBS -lSM -lICE -lXmu"
9473 fi
9474
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009475
Bram Moolenaar071d4272004-06-13 20:20:40 +00009476 if test -d "$x_includes" && test ! -d "$x_libraries"; then
9477 x_libraries=`echo "$x_includes" | sed s/include/lib/`
Illia Bobyra96d5442023-08-30 16:30:15 +02009478 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Corrected X libraries to $x_libraries" >&5
9479printf "%s\n" "Corrected X libraries to $x_libraries" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009480 X_LIBS="$X_LIBS -L$x_libraries"
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00009481 if test "$vim_cv_uname_output" = SunOS &&
9482 echo $vim_cv_uname_r_output | grep '^5' >/dev/null; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00009483 X_LIBS="$X_LIBS -R $x_libraries"
9484 fi
9485 fi
9486
9487 if test -d "$x_libraries" && test ! -d "$x_includes"; then
9488 x_includes=`echo "$x_libraries" | sed s/lib/include/`
Illia Bobyra96d5442023-08-30 16:30:15 +02009489 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Corrected X includes to $x_includes" >&5
9490printf "%s\n" "Corrected X includes to $x_includes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009491 X_CFLAGS="$X_CFLAGS -I$x_includes"
9492 fi
9493
9494 X_CFLAGS="`echo $X_CFLAGS\ | sed 's%-I/usr/include %%'`"
9495 X_LIBS="`echo $X_LIBS\ | sed 's%-L/usr/lib %%'`"
9496 X_LIBS="`echo $X_LIBS\ | sed -e 's%-R/usr/lib %%' -e 's%-R /usr/lib %%'`"
9497
9498
Illia Bobyra96d5442023-08-30 16:30:15 +02009499 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if X11 header files can be found" >&5
9500printf %s "checking if X11 header files can be found... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009501 cflags_save=$CFLAGS
9502 CFLAGS="$CFLAGS $X_CFLAGS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009504/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00009505#include <X11/Xlib.h>
Bram Moolenaar00ca2842008-06-26 20:14:00 +00009506#include <X11/Intrinsic.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009507int
Illia Bobyra96d5442023-08-30 16:30:15 +02009508main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009509{
Bram Moolenaar071d4272004-06-13 20:20:40 +00009510
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009511 ;
9512 return 0;
9513}
9514_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009515if ac_fn_c_try_compile "$LINENO"
9516then :
9517 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9518printf "%s\n" "yes" >&6; }
9519else $as_nop
9520 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9521printf "%s\n" "no" >&6; }; no_x=yes
Bram Moolenaar071d4272004-06-13 20:20:40 +00009522fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009523rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +00009524 CFLAGS=$cflags_save
9525
9526 if test "${no_x-no}" = yes; then
9527 with_x=no
9528 else
Illia Bobyra96d5442023-08-30 16:30:15 +02009529 printf "%s\n" "#define HAVE_X11 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00009530
9531 X_LIB="-lXt -lX11";
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009532
Bram Moolenaar071d4272004-06-13 20:20:40 +00009533
9534 ac_save_LDFLAGS="$LDFLAGS"
9535 LDFLAGS="-L$x_libraries $LDFLAGS"
9536
Illia Bobyra96d5442023-08-30 16:30:15 +02009537 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _XdmcpAuthDoIt in -lXdmcp" >&5
9538printf %s "checking for _XdmcpAuthDoIt in -lXdmcp... " >&6; }
9539if test ${ac_cv_lib_Xdmcp__XdmcpAuthDoIt+y}
9540then :
9541 printf %s "(cached) " >&6
9542else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009543 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009544LIBS="-lXdmcp -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS -lXdmcp $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009545cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009546/* end confdefs.h. */
9547
Bram Moolenaar446cb832008-06-24 21:56:24 +00009548/* Override any GCC internal prototype to avoid an error.
9549 Use char because int might match the return type of a GCC
9550 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009551char _XdmcpAuthDoIt ();
9552int
Illia Bobyra96d5442023-08-30 16:30:15 +02009553main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009554{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009555return _XdmcpAuthDoIt ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009556 ;
9557 return 0;
9558}
9559_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009560if ac_fn_c_try_link "$LINENO"
9561then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009562 ac_cv_lib_Xdmcp__XdmcpAuthDoIt=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009563else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009564 ac_cv_lib_Xdmcp__XdmcpAuthDoIt=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009565fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009566rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009567 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009568LIBS=$ac_check_lib_save_LIBS
9569fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009570{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xdmcp__XdmcpAuthDoIt" >&5
9571printf "%s\n" "$ac_cv_lib_Xdmcp__XdmcpAuthDoIt" >&6; }
9572if test "x$ac_cv_lib_Xdmcp__XdmcpAuthDoIt" = xyes
9573then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009574 X_EXTRA_LIBS="$X_EXTRA_LIBS -lXdmcp"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009575fi
9576
9577
Illia Bobyra96d5442023-08-30 16:30:15 +02009578 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IceOpenConnection in -lICE" >&5
9579printf %s "checking for IceOpenConnection in -lICE... " >&6; }
9580if test ${ac_cv_lib_ICE_IceOpenConnection+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="-lICE $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 IceOpenConnection ();
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 IceOpenConnection ();
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_ICE_IceOpenConnection=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009604else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009605 ac_cv_lib_ICE_IceOpenConnection=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_ICE_IceOpenConnection" >&5
9612printf "%s\n" "$ac_cv_lib_ICE_IceOpenConnection" >&6; }
9613if test "x$ac_cv_lib_ICE_IceOpenConnection" = xyes
9614then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009615 X_EXTRA_LIBS="$X_EXTRA_LIBS -lSM -lICE"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009616fi
9617
9618
9619 LDFLAGS="$X_LIBS $ac_save_LDFLAGS"
Illia Bobyra96d5442023-08-30 16:30:15 +02009620 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XpmCreatePixmapFromData in -lXpm" >&5
9621printf %s "checking for XpmCreatePixmapFromData in -lXpm... " >&6; }
9622if test ${ac_cv_lib_Xpm_XpmCreatePixmapFromData+y}
9623then :
9624 printf %s "(cached) " >&6
9625else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009626 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009627LIBS="-lXpm -lXt $X_PRE_LIBS -lXpm -lX11 $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009628cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009629/* end confdefs.h. */
9630
Bram Moolenaar446cb832008-06-24 21:56:24 +00009631/* Override any GCC internal prototype to avoid an error.
9632 Use char because int might match the return type of a GCC
9633 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009634char XpmCreatePixmapFromData ();
9635int
Illia Bobyra96d5442023-08-30 16:30:15 +02009636main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009637{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009638return XpmCreatePixmapFromData ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009639 ;
9640 return 0;
9641}
9642_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009643if ac_fn_c_try_link "$LINENO"
9644then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009645 ac_cv_lib_Xpm_XpmCreatePixmapFromData=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009646else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009647 ac_cv_lib_Xpm_XpmCreatePixmapFromData=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009648fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009649rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009650 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009651LIBS=$ac_check_lib_save_LIBS
9652fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009653{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmCreatePixmapFromData" >&5
9654printf "%s\n" "$ac_cv_lib_Xpm_XpmCreatePixmapFromData" >&6; }
9655if test "x$ac_cv_lib_Xpm_XpmCreatePixmapFromData" = xyes
9656then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009657 X_PRE_LIBS="$X_PRE_LIBS -lXpm"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009658fi
9659
9660
Illia Bobyra96d5442023-08-30 16:30:15 +02009661 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if X11 header files implicitly declare return values" >&5
9662printf %s "checking if X11 header files implicitly declare return values... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009663 cflags_save=$CFLAGS
Bram Moolenaard1864592013-05-04 04:40:15 +02009664 if test "$GCC" = yes; then
9665 CFLAGS="$CFLAGS $X_CFLAGS -Werror"
9666 else
9667 CFLAGS="$CFLAGS $X_CFLAGS"
9668 fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009670/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00009671#include <X11/Xlib.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009672int
Illia Bobyra96d5442023-08-30 16:30:15 +02009673main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009674{
Bram Moolenaar071d4272004-06-13 20:20:40 +00009675
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009676 ;
9677 return 0;
9678}
9679_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009680if ac_fn_c_try_compile "$LINENO"
9681then :
9682 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9683printf "%s\n" "no" >&6; }
9684else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009685 CFLAGS="$CFLAGS -Wno-implicit-int"
9686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009687/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00009688#include <X11/Xlib.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009689int
Illia Bobyra96d5442023-08-30 16:30:15 +02009690main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009691{
Bram Moolenaar071d4272004-06-13 20:20:40 +00009692
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009693 ;
9694 return 0;
9695}
9696_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009697if ac_fn_c_try_compile "$LINENO"
9698then :
9699 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9700printf "%s\n" "yes" >&6; }; cflags_save="$cflags_save -Wno-implicit-int"
9701else $as_nop
9702 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: test failed" >&5
9703printf "%s\n" "test failed" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009704
Bram Moolenaar071d4272004-06-13 20:20:40 +00009705fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009706rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009707
Bram Moolenaar071d4272004-06-13 20:20:40 +00009708fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009709rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +00009710 CFLAGS=$cflags_save
9711
9712 LDFLAGS="$ac_save_LDFLAGS"
9713
Mike Gilberta055b442023-08-20 19:01:41 +02009714 # The cast to long int works around a bug in the HP C Compiler
9715# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9716# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9717# This bug is HP SR number 8606223364.
Illia Bobyra96d5442023-08-30 16:30:15 +02009718{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
9719printf %s "checking size of wchar_t... " >&6; }
9720if test ${ac_cv_sizeof_wchar_t+y}
9721then :
9722 printf %s "(cached) " >&6
9723else $as_nop
9724 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "$ac_includes_default"
9725then :
Bram Moolenaar4bdbbf72009-05-21 21:27:43 +00009726
Illia Bobyra96d5442023-08-30 16:30:15 +02009727else $as_nop
Mike Gilberta055b442023-08-20 19:01:41 +02009728 if test "$ac_cv_type_wchar_t" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009729 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9730printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Mike Gilberta055b442023-08-20 19:01:41 +02009731as_fn_error 77 "cannot compute sizeof (wchar_t)
9732See \`config.log' for more details" "$LINENO" 5; }
9733 else
9734 ac_cv_sizeof_wchar_t=0
9735 fi
9736fi
9737
9738fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009739{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
9740printf "%s\n" "$ac_cv_sizeof_wchar_t" >&6; }
Mike Gilberta055b442023-08-20 19:01:41 +02009741
9742
9743
Illia Bobyra96d5442023-08-30 16:30:15 +02009744printf "%s\n" "#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t" >>confdefs.h
Bram Moolenaar4bdbbf72009-05-21 21:27:43 +00009745
Bram Moolenaar4bdbbf72009-05-21 21:27:43 +00009746
Mike Gilberta055b442023-08-20 19:01:41 +02009747 if test "$ac_cv_sizeof_wchar_t" -le 2; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009748 printf "%s\n" "#define SMALL_WCHAR_T 1" >>confdefs.h
Bram Moolenaar4bdbbf72009-05-21 21:27:43 +00009749
9750 fi
9751
Bram Moolenaar071d4272004-06-13 20:20:40 +00009752 fi
9753fi
9754
Bram Moolenaard2a05492018-07-27 22:35:15 +02009755if test "x$with_x" = xno -a "x$with_x_arg" = xyes; then
9756 as_fn_error $? "could not configure X" "$LINENO" 5
9757fi
9758
Bram Moolenaarb3f74062020-02-26 16:16:53 +01009759test "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 +00009760
Illia Bobyra96d5442023-08-30 16:30:15 +02009761{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-gui argument" >&5
9762printf %s "checking --enable-gui argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00009763# Check whether --enable-gui was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02009764if test ${enable_gui+y}
9765then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00009766 enableval=$enable_gui;
Illia Bobyra96d5442023-08-30 16:30:15 +02009767else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00009768 enable_gui="auto"
Bram Moolenaar446cb832008-06-24 21:56:24 +00009769fi
9770
Bram Moolenaar071d4272004-06-13 20:20:40 +00009771
9772enable_gui_canon=`echo "_$enable_gui" | \
9773 sed 's/[ _+-]//g;y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
9774
Bram Moolenaar071d4272004-06-13 20:20:40 +00009775SKIP_GTK2=YES
Bram Moolenaar1858a842016-02-23 22:30:31 +01009776SKIP_GTK3=YES
Bram Moolenaar071d4272004-06-13 20:20:40 +00009777SKIP_GNOME=YES
9778SKIP_MOTIF=YES
Bram Moolenaar071d4272004-06-13 20:20:40 +00009779SKIP_PHOTON=YES
Bram Moolenaarb3f74062020-02-26 16:16:53 +01009780SKIP_HAIKU=YES
Bram Moolenaar071d4272004-06-13 20:20:40 +00009781GUITYPE=NONE
9782
Bram Moolenaarb3f74062020-02-26 16:16:53 +01009783if test "x$HAIKU" = "xyes"; then
9784 SKIP_HAIKU=
9785 case "$enable_gui_canon" in
Illia Bobyra96d5442023-08-30 16:30:15 +02009786 no) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no GUI support" >&5
9787printf "%s\n" "no GUI support" >&6; }
Bram Moolenaarb3f74062020-02-26 16:16:53 +01009788 SKIP_HAIKU=YES ;;
Illia Bobyra96d5442023-08-30 16:30:15 +02009789 yes|"") { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes - automatic GUI support" >&5
9790printf "%s\n" "yes - automatic GUI support" >&6; } ;;
9791 auto) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: auto - automatic GUI support" >&5
9792printf "%s\n" "auto - automatic GUI support" >&6; } ;;
9793 haiku) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Haiku GUI support" >&5
9794printf "%s\n" "Haiku GUI support" >&6; } ;;
9795 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Sorry, $enable_gui GUI is not supported" >&5
9796printf "%s\n" "Sorry, $enable_gui GUI is not supported" >&6; }
Bram Moolenaarb3f74062020-02-26 16:16:53 +01009797 SKIP_HAIKU=YES ;;
9798 esac
9799elif test "x$QNX" = "xyes" -a "x$with_x" = "xno" ; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00009800 SKIP_PHOTON=
9801 case "$enable_gui_canon" in
Illia Bobyra96d5442023-08-30 16:30:15 +02009802 no) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no GUI support" >&5
9803printf "%s\n" "no GUI support" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009804 SKIP_PHOTON=YES ;;
Illia Bobyra96d5442023-08-30 16:30:15 +02009805 yes|""|auto) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: automatic GUI support" >&5
9806printf "%s\n" "automatic GUI support" >&6; }
Bram Moolenaaraf0839a2018-12-30 22:55:47 +01009807 gui_auto=yes ;;
Illia Bobyra96d5442023-08-30 16:30:15 +02009808 photon) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Photon GUI support" >&5
9809printf "%s\n" "Photon GUI support" >&6; } ;;
9810 *) { 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 SKIP_PHOTON=YES ;;
9813 esac
9814
Bram Moolenaar040f9752020-08-11 23:08:48 +02009815elif test "x$MACOS_X" = "xyes" -a "x$with_x" = "xno" ; then
9816 case "$enable_gui_canon" in
Illia Bobyra96d5442023-08-30 16:30:15 +02009817 no) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no GUI support" >&5
9818printf "%s\n" "no GUI support" >&6; } ;;
9819 yes|"") { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes - automatic GUI support" >&5
9820printf "%s\n" "yes - automatic GUI support" >&6; }
Bram Moolenaar040f9752020-08-11 23:08:48 +02009821 gui_auto=yes ;;
Illia Bobyra96d5442023-08-30 16:30:15 +02009822 auto) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: auto - disable GUI support for Mac OS" >&5
9823printf "%s\n" "auto - disable GUI support for Mac OS" >&6; } ;;
9824 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Sorry, $enable_gui GUI is not supported" >&5
9825printf "%s\n" "Sorry, $enable_gui GUI is not supported" >&6; } ;;
Bram Moolenaar040f9752020-08-11 23:08:48 +02009826 esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00009827else
9828
Bram Moolenaar071d4272004-06-13 20:20:40 +00009829 case "$enable_gui_canon" in
Illia Bobyra96d5442023-08-30 16:30:15 +02009830 no|none) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no GUI support" >&5
9831printf "%s\n" "no GUI support" >&6; } ;;
9832 yes|""|auto) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes/auto - automatic GUI support" >&5
9833printf "%s\n" "yes/auto - automatic GUI support" >&6; }
Bram Moolenaaraf0839a2018-12-30 22:55:47 +01009834 gui_auto=yes
Bram Moolenaar071d4272004-06-13 20:20:40 +00009835 SKIP_GTK2=
Bram Moolenaarf272ae12021-01-31 19:52:50 +01009836 SKIP_GTK3=
Bram Moolenaar071d4272004-06-13 20:20:40 +00009837 SKIP_GNOME=
Bram Moolenaarf52fac22022-03-11 16:01:26 +00009838 SKIP_MOTIF=;;
Illia Bobyra96d5442023-08-30 16:30:15 +02009839 gtk2) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: GTK+ 2.x GUI support" >&5
9840printf "%s\n" "GTK+ 2.x GUI support" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009841 SKIP_GTK2=;;
Illia Bobyra96d5442023-08-30 16:30:15 +02009842 gnome2) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: GNOME 2.x GUI support" >&5
9843printf "%s\n" "GNOME 2.x GUI support" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009844 SKIP_GNOME=
Bram Moolenaar071d4272004-06-13 20:20:40 +00009845 SKIP_GTK2=;;
Illia Bobyra96d5442023-08-30 16:30:15 +02009846 gtk3) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: GTK+ 3.x GUI support" >&5
9847printf "%s\n" "GTK+ 3.x GUI support" >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +01009848 SKIP_GTK3=;;
Illia Bobyra96d5442023-08-30 16:30:15 +02009849 motif) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Motif GUI support" >&5
9850printf "%s\n" "Motif GUI support" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009851 SKIP_MOTIF=;;
Illia Bobyra96d5442023-08-30 16:30:15 +02009852 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Sorry, $enable_gui GUI is not supported" >&5
9853printf "%s\n" "Sorry, $enable_gui GUI is not supported" >&6; } ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00009854 esac
9855
9856fi
9857
Bram Moolenaar071d4272004-06-13 20:20:40 +00009858if test "x$SKIP_GTK2" != "xYES" -a "$enable_gui_canon" != "gtk2" \
9859 -a "$enable_gui_canon" != "gnome2"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009860 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether or not to look for GTK+ 2" >&5
9861printf %s "checking whether or not to look for GTK+ 2... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00009862 # Check whether --enable-gtk2-check was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02009863if test ${enable_gtk2_check+y}
9864then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00009865 enableval=$enable_gtk2_check;
Illia Bobyra96d5442023-08-30 16:30:15 +02009866else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00009867 enable_gtk2_check="yes"
Bram Moolenaar446cb832008-06-24 21:56:24 +00009868fi
9869
Illia Bobyra96d5442023-08-30 16:30:15 +02009870 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_gtk2_check" >&5
9871printf "%s\n" "$enable_gtk2_check" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009872 if test "x$enable_gtk2_check" = "xno"; then
9873 SKIP_GTK2=YES
Bram Moolenaar182c5be2010-06-25 05:37:59 +02009874 SKIP_GNOME=YES
Bram Moolenaar071d4272004-06-13 20:20:40 +00009875 fi
9876fi
9877
Bram Moolenaar182c5be2010-06-25 05:37:59 +02009878if test "x$SKIP_GNOME" != "xYES" -a "$enable_gui_canon" != "gnome2"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009879 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether or not to look for GNOME" >&5
9880printf %s "checking whether or not to look for GNOME... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00009881 # Check whether --enable-gnome-check was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02009882if test ${enable_gnome_check+y}
9883then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00009884 enableval=$enable_gnome_check;
Illia Bobyra96d5442023-08-30 16:30:15 +02009885else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00009886 enable_gnome_check="no"
Bram Moolenaar446cb832008-06-24 21:56:24 +00009887fi
9888
Illia Bobyra96d5442023-08-30 16:30:15 +02009889 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_gnome_check" >&5
9890printf "%s\n" "$enable_gnome_check" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009891 if test "x$enable_gnome_check" = "xno"; then
9892 SKIP_GNOME=YES
9893 fi
9894fi
9895
Bram Moolenaar98921892016-02-23 17:14:37 +01009896if test "x$SKIP_GTK3" != "xYES" -a "$enable_gui_canon" != "gtk3"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009897 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether or not to look for GTK+ 3" >&5
9898printf %s "checking whether or not to look for GTK+ 3... " >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +01009899 # Check whether --enable-gtk3-check was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02009900if test ${enable_gtk3_check+y}
9901then :
Bram Moolenaar98921892016-02-23 17:14:37 +01009902 enableval=$enable_gtk3_check;
Illia Bobyra96d5442023-08-30 16:30:15 +02009903else $as_nop
Bram Moolenaar98921892016-02-23 17:14:37 +01009904 enable_gtk3_check="yes"
9905fi
9906
Illia Bobyra96d5442023-08-30 16:30:15 +02009907 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_gtk3_check" >&5
9908printf "%s\n" "$enable_gtk3_check" >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +01009909 if test "x$enable_gtk3_check" = "xno"; then
9910 SKIP_GTK3=YES
9911 fi
9912fi
9913
Bram Moolenaar071d4272004-06-13 20:20:40 +00009914if test "x$SKIP_MOTIF" != "xYES" -a "$enable_gui_canon" != "motif"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009915 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether or not to look for Motif" >&5
9916printf %s "checking whether or not to look for Motif... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00009917 # Check whether --enable-motif-check was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02009918if test ${enable_motif_check+y}
9919then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00009920 enableval=$enable_motif_check;
Illia Bobyra96d5442023-08-30 16:30:15 +02009921else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00009922 enable_motif_check="yes"
Bram Moolenaar446cb832008-06-24 21:56:24 +00009923fi
9924
Illia Bobyra96d5442023-08-30 16:30:15 +02009925 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_motif_check" >&5
9926printf "%s\n" "$enable_motif_check" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009927 if test "x$enable_motif_check" = "xno"; then
9928 SKIP_MOTIF=YES
9929 fi
9930fi
9931
Bram Moolenaar071d4272004-06-13 20:20:40 +00009932
9933
9934
9935
9936
9937
Bram Moolenaar427f5b62019-06-09 13:43:51 +02009938if test "X$PKG_CONFIG" = "X"; then
9939 if test -n "$ac_tool_prefix"; then
Bram Moolenaard6d30422018-01-28 22:48:55 +01009940 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9941set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02009942{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9943printf %s "checking for $ac_word... " >&6; }
9944if test ${ac_cv_path_PKG_CONFIG+y}
9945then :
9946 printf %s "(cached) " >&6
9947else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009948 case $PKG_CONFIG in
9949 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00009950 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9951 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00009952 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009953 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9954for as_dir in $PATH
9955do
9956 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02009957 case $as_dir in #(((
9958 '') as_dir=./ ;;
9959 */) ;;
9960 *) as_dir=$as_dir/ ;;
9961 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009962 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02009963 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9964 ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
9965 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009966 break 2
9967 fi
9968done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009969 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00009970IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009971
Bram Moolenaar071d4272004-06-13 20:20:40 +00009972 ;;
9973esac
9974fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009975PKG_CONFIG=$ac_cv_path_PKG_CONFIG
Bram Moolenaar071d4272004-06-13 20:20:40 +00009976if test -n "$PKG_CONFIG"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009977 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9978printf "%s\n" "$PKG_CONFIG" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009979else
Illia Bobyra96d5442023-08-30 16:30:15 +02009980 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9981printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009982fi
9983
Bram Moolenaar446cb832008-06-24 21:56:24 +00009984
Bram Moolenaard6d30422018-01-28 22:48:55 +01009985fi
9986if test -z "$ac_cv_path_PKG_CONFIG"; then
9987 ac_pt_PKG_CONFIG=$PKG_CONFIG
9988 # Extract the first word of "pkg-config", so it can be a program name with args.
9989set dummy pkg-config; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02009990{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9991printf %s "checking for $ac_word... " >&6; }
9992if test ${ac_cv_path_ac_pt_PKG_CONFIG+y}
9993then :
9994 printf %s "(cached) " >&6
9995else $as_nop
Bram Moolenaard6d30422018-01-28 22:48:55 +01009996 case $ac_pt_PKG_CONFIG in
9997 [\\/]* | ?:[\\/]*)
9998 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9999 ;;
10000 *)
10001 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10002for as_dir in $PATH
10003do
10004 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +020010005 case $as_dir in #(((
10006 '') as_dir=./ ;;
10007 */) ;;
10008 *) as_dir=$as_dir/ ;;
10009 esac
Bram Moolenaard6d30422018-01-28 22:48:55 +010010010 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +020010011 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10012 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
10013 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaard6d30422018-01-28 22:48:55 +010010014 break 2
10015 fi
10016done
10017 done
10018IFS=$as_save_IFS
10019
10020 ;;
10021esac
10022fi
10023ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10024if test -n "$ac_pt_PKG_CONFIG"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010025 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10026printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; }
Bram Moolenaard6d30422018-01-28 22:48:55 +010010027else
Illia Bobyra96d5442023-08-30 16:30:15 +020010028 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10029printf "%s\n" "no" >&6; }
Bram Moolenaard6d30422018-01-28 22:48:55 +010010030fi
10031
10032 if test "x$ac_pt_PKG_CONFIG" = x; then
10033 PKG_CONFIG="no"
10034 else
10035 case $cross_compiling:$ac_tool_warned in
10036yes:)
Illia Bobyra96d5442023-08-30 16:30:15 +020010037{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10038printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Bram Moolenaard6d30422018-01-28 22:48:55 +010010039ac_tool_warned=yes ;;
10040esac
10041 PKG_CONFIG=$ac_pt_PKG_CONFIG
10042 fi
10043else
10044 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10045fi
10046
Bram Moolenaar427f5b62019-06-09 13:43:51 +020010047fi
10048
10049
10050if test -z "$SKIP_GTK2"; then
10051
Illia Bobyra96d5442023-08-30 16:30:15 +020010052 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-gtktest argument" >&5
10053printf %s "checking --disable-gtktest argument... " >&6; }
Bram Moolenaar427f5b62019-06-09 13:43:51 +020010054 # Check whether --enable-gtktest was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010055if test ${enable_gtktest+y}
10056then :
Bram Moolenaar427f5b62019-06-09 13:43:51 +020010057 enableval=$enable_gtktest;
Illia Bobyra96d5442023-08-30 16:30:15 +020010058else $as_nop
Bram Moolenaar427f5b62019-06-09 13:43:51 +020010059 enable_gtktest=yes
10060fi
10061
10062 if test "x$enable_gtktest" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010063 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gtk test enabled" >&5
10064printf "%s\n" "gtk test enabled" >&6; }
Bram Moolenaar427f5b62019-06-09 13:43:51 +020010065 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010066 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gtk test disabled" >&5
10067printf "%s\n" "gtk test disabled" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010068 fi
10069
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010070 if test "x$PKG_CONFIG" != "xno"; then
Bram Moolenaarf272ae12021-01-31 19:52:50 +010010071 save_skip_gtk3=$SKIP_GTK3
10072 SKIP_GTK3=YES
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010073
Bram Moolenaar071d4272004-06-13 20:20:40 +000010074 if test "X$GTK_CONFIG" != "Xno" -o "X$PKG_CONFIG" != "Xno"; then
10075 {
Bram Moolenaar071d4272004-06-13 20:20:40 +000010076 no_gtk=""
10077 if (test "X$SKIP_GTK2" != "XYES" -a "X$PKG_CONFIG" != "Xno") \
10078 && $PKG_CONFIG --exists gtk+-2.0; then
10079 {
Bram Moolenaar98921892016-02-23 17:14:37 +010010080 min_gtk_version=2.2.0
Illia Bobyra96d5442023-08-30 16:30:15 +020010081 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GTK - version >= $min_gtk_version" >&5
10082printf %s "checking for GTK - version >= $min_gtk_version... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010083 GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-2.0`
Bram Moolenaar7b0294c2004-10-11 10:16:09 +000010084 GTK_LIBDIR=`$PKG_CONFIG --libs-only-L gtk+-2.0`
Bram Moolenaar071d4272004-06-13 20:20:40 +000010085 GTK_LIBS=`$PKG_CONFIG --libs gtk+-2.0`
10086 gtk_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
10087 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
10088 gtk_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
10089 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
10090 gtk_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
10091 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
10092 }
Bram Moolenaar98921892016-02-23 17:14:37 +010010093 elif (test "X$SKIP_GTK3" != "XYES" -a "X$PKG_CONFIG" != "Xno") \
10094 && $PKG_CONFIG --exists gtk+-3.0; then
10095 {
10096 min_gtk_version=2.2.0
Illia Bobyra96d5442023-08-30 16:30:15 +020010097 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GTK - version >= $min_gtk_version" >&5
10098printf %s "checking for GTK - version >= $min_gtk_version... " >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010099
10100 GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-3.0`
10101 GTK_LIBDIR=`$PKG_CONFIG --libs-only-L gtk+-3.0`
10102 GTK_LIBS=`$PKG_CONFIG --libs gtk+-3.0`
10103 gtk_major_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
10104 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
10105 gtk_minor_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
10106 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
10107 gtk_micro_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
10108 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
10109 }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010110 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010111 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GTK -dev package" >&5
10112printf %s "checking for GTK -dev package... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010113 no_gtk=yes
10114 fi
10115
10116 if test "x$enable_gtktest" = "xyes" -a "x$no_gtk" = "x"; then
10117 {
10118 ac_save_CFLAGS="$CFLAGS"
10119 ac_save_LIBS="$LIBS"
10120 CFLAGS="$CFLAGS $GTK_CFLAGS"
10121 LIBS="$LIBS $GTK_LIBS"
10122
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010123 rm -f conf.gtktest
Illia Bobyra96d5442023-08-30 16:30:15 +020010124 if test "$cross_compiling" = yes
10125then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000010126 echo $ac_n "cross compiling; assumed OK... $ac_c"
Illia Bobyra96d5442023-08-30 16:30:15 +020010127else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010129/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000010130
10131#include <gtk/gtk.h>
10132#include <stdio.h>
Bram Moolenaar446cb832008-06-24 21:56:24 +000010133#if STDC_HEADERS
10134# include <stdlib.h>
10135# include <stddef.h>
10136#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000010137
10138int
10139main ()
10140{
10141int major, minor, micro;
10142char *tmp_version;
10143
10144system ("touch conf.gtktest");
10145
10146/* HP/UX 9 (%@#!) writes to sscanf strings */
10147tmp_version = g_strdup("$min_gtk_version");
10148if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
10149 printf("%s, bad version string\n", "$min_gtk_version");
Zdenek Dohnal549f8c02023-12-14 20:22:49 +010010150 g_free(tmp_version);
Bram Moolenaar071d4272004-06-13 20:20:40 +000010151 exit(1);
10152 }
10153
Zdenek Dohnal549f8c02023-12-14 20:22:49 +010010154g_free(tmp_version);
10155
Bram Moolenaar071d4272004-06-13 20:20:40 +000010156if ((gtk_major_version > major) ||
10157 ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
10158 ((gtk_major_version == major) && (gtk_minor_version == minor) &&
10159 (gtk_micro_version >= micro)))
10160{
10161 return 0;
10162}
10163return 1;
10164}
10165
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010166_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020010167if ac_fn_c_try_run "$LINENO"
10168then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010169
Illia Bobyra96d5442023-08-30 16:30:15 +020010170else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010171 no_gtk=yes
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010172fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010173rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10174 conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010175fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000010176
Bram Moolenaar071d4272004-06-13 20:20:40 +000010177 CFLAGS="$ac_save_CFLAGS"
10178 LIBS="$ac_save_LIBS"
10179 }
10180 fi
10181 if test "x$no_gtk" = x ; then
10182 if test "x$enable_gtktest" = "xyes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010183 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&5
10184printf "%s\n" "yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010185 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010186 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&5
10187printf "%s\n" "found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010188 fi
Bram Moolenaar7b0294c2004-10-11 10:16:09 +000010189 GUI_LIB_LOC="$GTK_LIBDIR"
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010190 GTK_LIBNAME="$GTK_LIBS"
10191 GUI_INC_LOC="$GTK_CFLAGS"
Bram Moolenaar071d4272004-06-13 20:20:40 +000010192 else
10193 {
Illia Bobyra96d5442023-08-30 16:30:15 +020010194 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10195printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010196 GTK_CFLAGS=""
10197 GTK_LIBS=""
10198 :
Bram Moolenaaraf0839a2018-12-30 22:55:47 +010010199 if test "$fail_if_missing" = "yes" -a "X$gui_auto" != "Xyes"; then
10200 as_fn_error $? "could not configure GTK" "$LINENO" 5
10201 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000010202 }
10203 fi
10204 }
10205 else
10206 GTK_CFLAGS=""
10207 GTK_LIBS=""
10208 :
10209 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010210
10211
Bram Moolenaar071d4272004-06-13 20:20:40 +000010212 rm -f conf.gtktest
10213
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010214 if test "x$GTK_CFLAGS" != "x"; then
Bram Moolenaar98921892016-02-23 17:14:37 +010010215 SKIP_GTK3=YES
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010216 SKIP_MOTIF=YES
10217 GUITYPE=GTK
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010218
Bram Moolenaarf272ae12021-01-31 19:52:50 +010010219 else
10220 SKIP_GTK3=$save_skip_gtk3
Bram Moolenaar071d4272004-06-13 20:20:40 +000010221 fi
10222 fi
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010223 if test "x$GUITYPE" = "xGTK"; then
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010224 if test -z "$SKIP_GNOME"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000010225 {
Bram Moolenaar071d4272004-06-13 20:20:40 +000010226
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010227
10228
10229
10230
10231
Bram Moolenaar446cb832008-06-24 21:56:24 +000010232# Check whether --with-gnome-includes was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010233if test ${with_gnome_includes+y}
10234then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000010235 withval=$with_gnome_includes; CFLAGS="$CFLAGS -I$withval"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010236
Bram Moolenaar446cb832008-06-24 21:56:24 +000010237fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000010238
10239
Bram Moolenaar446cb832008-06-24 21:56:24 +000010240
10241# Check whether --with-gnome-libs was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010242if test ${with_gnome_libs+y}
10243then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000010244 withval=$with_gnome_libs; LDFLAGS="$LDFLAGS -L$withval" gnome_prefix=$withval
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010245
Bram Moolenaar446cb832008-06-24 21:56:24 +000010246fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000010247
10248
Bram Moolenaar446cb832008-06-24 21:56:24 +000010249
10250# Check whether --with-gnome was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010251if test ${with_gnome+y}
10252then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000010253 withval=$with_gnome; if test x$withval = xyes; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000010254 want_gnome=yes
10255 have_gnome=yes
10256 else
10257 if test "x$withval" = xno; then
10258 want_gnome=no
10259 else
10260 want_gnome=yes
10261 LDFLAGS="$LDFLAGS -L$withval/lib"
10262 CFLAGS="$CFLAGS -I$withval/include"
10263 gnome_prefix=$withval/lib
10264 fi
10265 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010266else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000010267 want_gnome=yes
Bram Moolenaar446cb832008-06-24 21:56:24 +000010268fi
10269
Bram Moolenaar071d4272004-06-13 20:20:40 +000010270
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010271 if test "x$want_gnome" = xyes; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000010272 {
Illia Bobyra96d5442023-08-30 16:30:15 +020010273 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libgnomeui-2.0" >&5
10274printf %s "checking for libgnomeui-2.0... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010275 if $PKG_CONFIG --exists libgnomeui-2.0; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010276 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10277printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010278 GNOME_LIBS=`$PKG_CONFIG --libs-only-l libgnomeui-2.0`
10279 GNOME_LIBDIR=`$PKG_CONFIG --libs-only-L libgnomeui-2.0`
10280 GNOME_INCLUDEDIR=`$PKG_CONFIG --cflags libgnomeui-2.0`
Bram Moolenaar97b2ad32006-03-18 21:40:56 +000010281
Illia Bobyra96d5442023-08-30 16:30:15 +020010282 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FreeBSD" >&5
10283printf %s "checking for FreeBSD... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +000010284 if test "$vim_cv_uname_output" = FreeBSD; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010285 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10286printf "%s\n" "yes" >&6; }
Bram Moolenaarc9b4b052006-04-30 18:54:39 +000010287 GNOME_INCLUDEDIR="$GNOME_INCLUDEDIR -D_THREAD_SAFE"
Bram Moolenaar97b2ad32006-03-18 21:40:56 +000010288 GNOME_LIBS="$GNOME_LIBS -pthread"
10289 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010290 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10291printf "%s\n" "no" >&6; }
Bram Moolenaar97b2ad32006-03-18 21:40:56 +000010292 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000010293 have_gnome=yes
10294 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010295 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10296printf "%s\n" "not found" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010297 if test "x" = xfail; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010010298 as_fn_error $? "Could not find libgnomeui-2.0 via pkg-config" "$LINENO" 5
Bram Moolenaar071d4272004-06-13 20:20:40 +000010299 fi
10300 fi
10301 }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010302 fi
10303
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010304 if test "x$have_gnome" = xyes ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010305 printf "%s\n" "#define FEAT_GUI_GNOME 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000010306
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010307 GUI_INC_LOC="$GUI_INC_LOC $GNOME_INCLUDEDIR"
10308 GTK_LIBNAME="$GTK_LIBNAME $GNOME_LIBDIR $GNOME_LIBS"
Bram Moolenaar071d4272004-06-13 20:20:40 +000010309 fi
10310 }
10311 fi
10312 fi
10313fi
10314
Bram Moolenaar98921892016-02-23 17:14:37 +010010315
10316if test -z "$SKIP_GTK3"; then
10317
Illia Bobyra96d5442023-08-30 16:30:15 +020010318 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-gtktest argument" >&5
10319printf %s "checking --disable-gtktest argument... " >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010320 # Check whether --enable-gtktest was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010321if test ${enable_gtktest+y}
10322then :
Bram Moolenaar98921892016-02-23 17:14:37 +010010323 enableval=$enable_gtktest;
Illia Bobyra96d5442023-08-30 16:30:15 +020010324else $as_nop
Bram Moolenaar98921892016-02-23 17:14:37 +010010325 enable_gtktest=yes
10326fi
10327
10328 if test "x$enable_gtktest" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010329 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gtk test enabled" >&5
10330printf "%s\n" "gtk test enabled" >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010331 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010332 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gtk test disabled" >&5
10333printf "%s\n" "gtk test disabled" >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010334 fi
10335
Bram Moolenaar98921892016-02-23 17:14:37 +010010336 if test "x$PKG_CONFIG" != "xno"; then
Bram Moolenaarf272ae12021-01-31 19:52:50 +010010337 save_skip_gtk2=$SKIP_GTK2
10338 SKIP_GTK2=YES
Bram Moolenaar98921892016-02-23 17:14:37 +010010339
10340 if test "X$GTK_CONFIG" != "Xno" -o "X$PKG_CONFIG" != "Xno"; then
10341 {
10342 no_gtk=""
10343 if (test "X$SKIP_GTK2" != "XYES" -a "X$PKG_CONFIG" != "Xno") \
10344 && $PKG_CONFIG --exists gtk+-2.0; then
10345 {
10346 min_gtk_version=3.0.0
Illia Bobyra96d5442023-08-30 16:30:15 +020010347 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GTK - version >= $min_gtk_version" >&5
10348printf %s "checking for GTK - version >= $min_gtk_version... " >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010349 GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-2.0`
10350 GTK_LIBDIR=`$PKG_CONFIG --libs-only-L gtk+-2.0`
10351 GTK_LIBS=`$PKG_CONFIG --libs gtk+-2.0`
10352 gtk_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
10353 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
10354 gtk_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
10355 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
10356 gtk_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
10357 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
10358 }
10359 elif (test "X$SKIP_GTK3" != "XYES" -a "X$PKG_CONFIG" != "Xno") \
10360 && $PKG_CONFIG --exists gtk+-3.0; then
10361 {
10362 min_gtk_version=3.0.0
Illia Bobyra96d5442023-08-30 16:30:15 +020010363 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GTK - version >= $min_gtk_version" >&5
10364printf %s "checking for GTK - version >= $min_gtk_version... " >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010365
10366 GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-3.0`
10367 GTK_LIBDIR=`$PKG_CONFIG --libs-only-L gtk+-3.0`
10368 GTK_LIBS=`$PKG_CONFIG --libs gtk+-3.0`
10369 gtk_major_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
10370 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
10371 gtk_minor_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
10372 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
10373 gtk_micro_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
10374 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
10375 }
10376 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010377 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GTK -dev package" >&5
10378printf %s "checking for GTK -dev package... " >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010379 no_gtk=yes
10380 fi
10381
10382 if test "x$enable_gtktest" = "xyes" -a "x$no_gtk" = "x"; then
10383 {
10384 ac_save_CFLAGS="$CFLAGS"
10385 ac_save_LIBS="$LIBS"
10386 CFLAGS="$CFLAGS $GTK_CFLAGS"
10387 LIBS="$LIBS $GTK_LIBS"
10388
10389 rm -f conf.gtktest
Illia Bobyra96d5442023-08-30 16:30:15 +020010390 if test "$cross_compiling" = yes
10391then :
Bram Moolenaar98921892016-02-23 17:14:37 +010010392 echo $ac_n "cross compiling; assumed OK... $ac_c"
Illia Bobyra96d5442023-08-30 16:30:15 +020010393else $as_nop
Bram Moolenaar98921892016-02-23 17:14:37 +010010394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10395/* end confdefs.h. */
10396
10397#include <gtk/gtk.h>
10398#include <stdio.h>
10399#if STDC_HEADERS
10400# include <stdlib.h>
10401# include <stddef.h>
10402#endif
10403
10404int
10405main ()
10406{
10407int major, minor, micro;
10408char *tmp_version;
10409
10410system ("touch conf.gtktest");
10411
10412/* HP/UX 9 (%@#!) writes to sscanf strings */
10413tmp_version = g_strdup("$min_gtk_version");
10414if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
10415 printf("%s, bad version string\n", "$min_gtk_version");
Christian Brabandt2f9aef42024-02-12 23:12:26 +010010416 g_free(tmp_version);
Bram Moolenaar98921892016-02-23 17:14:37 +010010417 exit(1);
10418 }
10419
Christian Brabandt2f9aef42024-02-12 23:12:26 +010010420g_free(tmp_version);
10421
Bram Moolenaar98921892016-02-23 17:14:37 +010010422if ((gtk_major_version > major) ||
10423 ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
10424 ((gtk_major_version == major) && (gtk_minor_version == minor) &&
10425 (gtk_micro_version >= micro)))
10426{
10427 return 0;
10428}
10429return 1;
10430}
10431
10432_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020010433if ac_fn_c_try_run "$LINENO"
10434then :
Bram Moolenaar98921892016-02-23 17:14:37 +010010435
Illia Bobyra96d5442023-08-30 16:30:15 +020010436else $as_nop
Bram Moolenaar98921892016-02-23 17:14:37 +010010437 no_gtk=yes
10438fi
10439rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10440 conftest.$ac_objext conftest.beam conftest.$ac_ext
10441fi
10442
10443 CFLAGS="$ac_save_CFLAGS"
10444 LIBS="$ac_save_LIBS"
10445 }
10446 fi
10447 if test "x$no_gtk" = x ; then
10448 if test "x$enable_gtktest" = "xyes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010449 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&5
10450printf "%s\n" "yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010451 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010452 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&5
10453printf "%s\n" "found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010454 fi
10455 GUI_LIB_LOC="$GTK_LIBDIR"
10456 GTK_LIBNAME="$GTK_LIBS"
10457 GUI_INC_LOC="$GTK_CFLAGS"
10458 else
10459 {
Illia Bobyra96d5442023-08-30 16:30:15 +020010460 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10461printf "%s\n" "no" >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010462 GTK_CFLAGS=""
10463 GTK_LIBS=""
10464 :
Bram Moolenaaraf0839a2018-12-30 22:55:47 +010010465 if test "$fail_if_missing" = "yes" -a "X$gui_auto" != "Xyes"; then
10466 as_fn_error $? "could not configure GTK" "$LINENO" 5
10467 fi
Bram Moolenaar98921892016-02-23 17:14:37 +010010468 }
10469 fi
10470 }
10471 else
10472 GTK_CFLAGS=""
10473 GTK_LIBS=""
10474 :
10475 fi
10476
10477
10478 rm -f conf.gtktest
10479
10480 if test "x$GTK_CFLAGS" != "x"; then
10481 SKIP_GTK2=YES
10482 SKIP_GNOME=YES
Bram Moolenaar98921892016-02-23 17:14:37 +010010483 SKIP_MOTIF=YES
10484 GUITYPE=GTK
10485
Illia Bobyra96d5442023-08-30 16:30:15 +020010486 printf "%s\n" "#define USE_GTK3 1" >>confdefs.h
Bram Moolenaar98921892016-02-23 17:14:37 +010010487
Bram Moolenaarf272ae12021-01-31 19:52:50 +010010488 else
10489 SKIP_GTK2=$save_skip_gtk2
Bram Moolenaar98921892016-02-23 17:14:37 +010010490 fi
10491 fi
10492fi
10493
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010494if test "x$GUITYPE" = "xGTK"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010495 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking version of Gdk-Pixbuf" >&5
10496printf %s "checking version of Gdk-Pixbuf... " >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010497 gdk_pixbuf_version=`$PKG_CONFIG --modversion gdk-pixbuf-2.0`
10498 if test "x$gdk_pixbuf_version" != x ; then
10499 gdk_pixbuf_version_minor=`echo $gdk_pixbuf_version | \
10500 sed -e 's/[0-9][0-9]*\.\([0-9][0-9]*\)\.[0-9][0-9]*/\1/'`
10501 if test "x$gdk_pixbuf_version_minor" != x -a \
Bram Moolenaar33c31d52016-02-22 21:07:06 +010010502 $gdk_pixbuf_version_minor -ge 31 ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010503 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: OK." >&5
10504printf "%s\n" "OK." >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010505 # Extract the first word of "glib-compile-resources", so it can be a program name with args.
10506set dummy glib-compile-resources; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +020010507{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10508printf %s "checking for $ac_word... " >&6; }
10509if test ${ac_cv_path_GLIB_COMPILE_RESOURCES+y}
10510then :
10511 printf %s "(cached) " >&6
10512else $as_nop
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010513 case $GLIB_COMPILE_RESOURCES in
10514 [\\/]* | ?:[\\/]*)
10515 ac_cv_path_GLIB_COMPILE_RESOURCES="$GLIB_COMPILE_RESOURCES" # Let the user override the test with a path.
10516 ;;
10517 *)
10518 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10519for as_dir in $PATH
10520do
10521 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +020010522 case $as_dir in #(((
10523 '') as_dir=./ ;;
10524 */) ;;
10525 *) as_dir=$as_dir/ ;;
10526 esac
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010527 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +020010528 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10529 ac_cv_path_GLIB_COMPILE_RESOURCES="$as_dir$ac_word$ac_exec_ext"
10530 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010531 break 2
10532 fi
10533done
10534 done
10535IFS=$as_save_IFS
10536
10537 test -z "$ac_cv_path_GLIB_COMPILE_RESOURCES" && ac_cv_path_GLIB_COMPILE_RESOURCES="no"
10538 ;;
10539esac
10540fi
10541GLIB_COMPILE_RESOURCES=$ac_cv_path_GLIB_COMPILE_RESOURCES
10542if test -n "$GLIB_COMPILE_RESOURCES"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010543 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GLIB_COMPILE_RESOURCES" >&5
10544printf "%s\n" "$GLIB_COMPILE_RESOURCES" >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010545else
Illia Bobyra96d5442023-08-30 16:30:15 +020010546 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10547printf "%s\n" "no" >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010548fi
10549
10550
Illia Bobyra96d5442023-08-30 16:30:15 +020010551 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking glib-compile-resources" >&5
10552printf %s "checking glib-compile-resources... " >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010553 if test "x$GLIB_COMPILE_RESOURCES" = xno ; then
Bram Moolenaar33c31d52016-02-22 21:07:06 +010010554 GLIB_COMPILE_RESOURCES=""
Illia Bobyra96d5442023-08-30 16:30:15 +020010555 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot be found in PATH." >&5
10556printf "%s\n" "cannot be found in PATH." >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010557 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010558 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: usable." >&5
10559printf "%s\n" "usable." >&6; }
10560 printf "%s\n" "#define USE_GRESOURCE 1" >>confdefs.h
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010561
Bram Moolenaar33c31d52016-02-22 21:07:06 +010010562 GRESOURCE_SRC="auto/gui_gtk_gresources.c"
10563 GRESOURCE_OBJ="objects/gui_gtk_gresources.o"
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010564 fi
10565 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010566 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable." >&5
10567printf "%s\n" "not usable." >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010568 fi
10569 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010570 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot obtain from pkg_config." >&5
10571printf "%s\n" "cannot obtain from pkg_config." >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010572 fi
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010573
Illia Bobyra96d5442023-08-30 16:30:15 +020010574 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-icon-cache-update argument" >&5
10575printf %s "checking --disable-icon-cache-update argument... " >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010576 # Check whether --enable-icon_cache_update was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010577if test ${enable_icon_cache_update+y}
10578then :
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010579 enableval=$enable_icon_cache_update;
Illia Bobyra96d5442023-08-30 16:30:15 +020010580else $as_nop
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010581 enable_icon_cache_update="yes"
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010582fi
10583
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010584 if test "$enable_icon_cache_update" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010585 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not set" >&5
10586printf "%s\n" "not set" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010587 # Extract the first word of "gtk-update-icon-cache", so it can be a program name with args.
10588set dummy gtk-update-icon-cache; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +020010589{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10590printf %s "checking for $ac_word... " >&6; }
10591if test ${ac_cv_path_GTK_UPDATE_ICON_CACHE+y}
10592then :
10593 printf %s "(cached) " >&6
10594else $as_nop
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010595 case $GTK_UPDATE_ICON_CACHE in
10596 [\\/]* | ?:[\\/]*)
10597 ac_cv_path_GTK_UPDATE_ICON_CACHE="$GTK_UPDATE_ICON_CACHE" # Let the user override the test with a path.
10598 ;;
10599 *)
10600 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10601for as_dir in $PATH
10602do
10603 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +020010604 case $as_dir in #(((
10605 '') as_dir=./ ;;
10606 */) ;;
10607 *) as_dir=$as_dir/ ;;
10608 esac
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010609 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +020010610 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10611 ac_cv_path_GTK_UPDATE_ICON_CACHE="$as_dir$ac_word$ac_exec_ext"
10612 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010613 break 2
10614 fi
10615done
10616 done
10617IFS=$as_save_IFS
10618
10619 test -z "$ac_cv_path_GTK_UPDATE_ICON_CACHE" && ac_cv_path_GTK_UPDATE_ICON_CACHE="no"
10620 ;;
10621esac
10622fi
10623GTK_UPDATE_ICON_CACHE=$ac_cv_path_GTK_UPDATE_ICON_CACHE
10624if test -n "$GTK_UPDATE_ICON_CACHE"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010625 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GTK_UPDATE_ICON_CACHE" >&5
10626printf "%s\n" "$GTK_UPDATE_ICON_CACHE" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010627else
Illia Bobyra96d5442023-08-30 16:30:15 +020010628 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10629printf "%s\n" "no" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010630fi
10631
10632
10633 if test "x$GTK_UPDATE_ICON_CACHE" = "xno" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010634 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found in PATH." >&5
10635printf "%s\n" "not found in PATH." >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010636 fi
10637 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010638 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: update disabled" >&5
10639printf "%s\n" "update disabled" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010640 fi
10641
Illia Bobyra96d5442023-08-30 16:30:15 +020010642 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-desktop-database-update argument" >&5
10643printf %s "checking --disable-desktop-database-update argument... " >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010644 # Check whether --enable-desktop_database_update was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010645if test ${enable_desktop_database_update+y}
10646then :
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010647 enableval=$enable_desktop_database_update;
Illia Bobyra96d5442023-08-30 16:30:15 +020010648else $as_nop
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010649 enable_desktop_database_update="yes"
10650fi
10651
10652 if test "$enable_desktop_database_update" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010653 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not set" >&5
10654printf "%s\n" "not set" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010655 # Extract the first word of "update-desktop-database", so it can be a program name with args.
10656set dummy update-desktop-database; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +020010657{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10658printf %s "checking for $ac_word... " >&6; }
10659if test ${ac_cv_path_UPDATE_DESKTOP_DATABASE+y}
10660then :
10661 printf %s "(cached) " >&6
10662else $as_nop
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010663 case $UPDATE_DESKTOP_DATABASE in
10664 [\\/]* | ?:[\\/]*)
10665 ac_cv_path_UPDATE_DESKTOP_DATABASE="$UPDATE_DESKTOP_DATABASE" # Let the user override the test with a path.
10666 ;;
10667 *)
10668 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10669for as_dir in $PATH
10670do
10671 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +020010672 case $as_dir in #(((
10673 '') as_dir=./ ;;
10674 */) ;;
10675 *) as_dir=$as_dir/ ;;
10676 esac
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010677 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +020010678 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10679 ac_cv_path_UPDATE_DESKTOP_DATABASE="$as_dir$ac_word$ac_exec_ext"
10680 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010681 break 2
10682 fi
10683done
10684 done
10685IFS=$as_save_IFS
10686
10687 test -z "$ac_cv_path_UPDATE_DESKTOP_DATABASE" && ac_cv_path_UPDATE_DESKTOP_DATABASE="no"
10688 ;;
10689esac
10690fi
10691UPDATE_DESKTOP_DATABASE=$ac_cv_path_UPDATE_DESKTOP_DATABASE
10692if test -n "$UPDATE_DESKTOP_DATABASE"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010693 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $UPDATE_DESKTOP_DATABASE" >&5
10694printf "%s\n" "$UPDATE_DESKTOP_DATABASE" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010695else
Illia Bobyra96d5442023-08-30 16:30:15 +020010696 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10697printf "%s\n" "no" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010698fi
10699
10700
10701 if test "x$UPDATE_DESKTOP_DATABASE" = "xno" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010702 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found in PATH." >&5
10703printf "%s\n" "not found in PATH." >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010704 fi
10705 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010706 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: update disabled" >&5
10707printf "%s\n" "update disabled" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010708 fi
10709fi
10710
10711
10712
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010713
10714
10715
10716
Bram Moolenaar071d4272004-06-13 20:20:40 +000010717if test -z "$SKIP_MOTIF"; then
10718 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"
10719 GUI_INC_LOC="`echo $GUI_INC_LOC|sed 's%-I%%g'`"
10720
Illia Bobyra96d5442023-08-30 16:30:15 +020010721 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for location of Motif GUI includes" >&5
10722printf %s "checking for location of Motif GUI includes... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010723 gui_includes="`echo $x_includes|sed 's%/^/^/*$%%'` `echo "$gui_XXX" | sed s/XXX/include/g` $GUI_INC_LOC"
10724 GUI_INC_LOC=
10725 for try in $gui_includes; do
10726 if test -f "$try/Xm/Xm.h"; then
10727 GUI_INC_LOC=$try
10728 fi
10729 done
10730 if test -n "$GUI_INC_LOC"; then
10731 if test "$GUI_INC_LOC" = /usr/include; then
10732 GUI_INC_LOC=
Illia Bobyra96d5442023-08-30 16:30:15 +020010733 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: in default path" >&5
10734printf "%s\n" "in default path" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010735 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010736 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GUI_INC_LOC" >&5
10737printf "%s\n" "$GUI_INC_LOC" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010738 fi
10739 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010740 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <not found>" >&5
10741printf "%s\n" "<not found>" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010742 SKIP_MOTIF=YES
10743 fi
10744fi
10745
10746
10747if test -z "$SKIP_MOTIF"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010748 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-motif-lib argument" >&5
10749printf %s "checking --with-motif-lib argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010750
Bram Moolenaar446cb832008-06-24 21:56:24 +000010751# Check whether --with-motif-lib was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010752if test ${with_motif_lib+y}
10753then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000010754 withval=$with_motif_lib; MOTIF_LIBNAME="${withval}"
10755fi
10756
Bram Moolenaar071d4272004-06-13 20:20:40 +000010757
10758 if test -n "$MOTIF_LIBNAME"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010759 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MOTIF_LIBNAME" >&5
10760printf "%s\n" "$MOTIF_LIBNAME" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010761 GUI_LIB_LOC=
10762 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010763 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10764printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010765
10766 GUI_LIB_LOC="`echo $GUI_LIB_LOC|sed 's%-L%%g'`"
10767
Illia Bobyra96d5442023-08-30 16:30:15 +020010768 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for location of Motif GUI libs" >&5
10769printf %s "checking for location of Motif GUI libs... " >&6; }
Bram Moolenaar01967f52023-04-12 16:24:03 +010010770 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 +000010771 GUI_LIB_LOC=
10772 for try in $gui_libs; do
Kelvin Leeb4716902022-04-04 17:20:01 +010010773 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 +000010774 if test -f "$libtry"; then
10775 GUI_LIB_LOC=$try
10776 fi
10777 done
10778 done
10779 if test -n "$GUI_LIB_LOC"; then
Bram Moolenaar01967f52023-04-12 16:24:03 +010010780 if test "$GUI_LIB_LOC" = /usr/lib \
10781 -o "$GUI_LIB_LOC" = /usr/lib64 \
Bram Moolenaar6324c3b2013-06-17 20:27:18 +020010782 -o "$GUI_LIB_LOC" = /usr/lib/i386-linux-gnu \
10783 -o "$GUI_LIB_LOC" = /usr/lib/x86_64-linux-gnu; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000010784 GUI_LIB_LOC=
Illia Bobyra96d5442023-08-30 16:30:15 +020010785 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: in default path" >&5
10786printf "%s\n" "in default path" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010787 else
10788 if test -n "$GUI_LIB_LOC"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010789 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GUI_LIB_LOC" >&5
10790printf "%s\n" "$GUI_LIB_LOC" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +000010791 if test "$vim_cv_uname_output" = SunOS &&
10792 echo $vim_cv_uname_r_output | grep '^5' >/dev/null; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000010793 GUI_LIB_LOC="$GUI_LIB_LOC -R $GUI_LIB_LOC"
10794 fi
10795 fi
10796 fi
10797 MOTIF_LIBNAME=-lXm
10798 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010799 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <not found>" >&5
10800printf "%s\n" "<not found>" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010801 SKIP_MOTIF=YES
10802 fi
10803 fi
10804fi
10805
10806if test -z "$SKIP_MOTIF"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000010807 GUITYPE=MOTIF
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010808
Bram Moolenaar071d4272004-06-13 20:20:40 +000010809fi
10810
Bram Moolenaare2adcf32022-03-12 11:57:25 +000010811if test -z "$SKIP_MOTIF"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000010812 if test -n "$GUI_INC_LOC"; then
10813 GUI_INC_LOC=-I"`echo $GUI_INC_LOC|sed 's%-I%%'`"
10814 fi
10815 if test -n "$GUI_LIB_LOC"; then
10816 GUI_LIB_LOC=-L"`echo $GUI_LIB_LOC|sed 's%-L%%'`"
10817 fi
10818
10819 ldflags_save=$LDFLAGS
10820 LDFLAGS="$X_LIBS $LDFLAGS"
Illia Bobyra96d5442023-08-30 16:30:15 +020010821 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XShapeQueryExtension in -lXext" >&5
10822printf %s "checking for XShapeQueryExtension in -lXext... " >&6; }
10823if test ${ac_cv_lib_Xext_XShapeQueryExtension+y}
10824then :
10825 printf %s "(cached) " >&6
10826else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010827 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000010828LIBS="-lXext -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010829cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010830/* end confdefs.h. */
10831
Bram Moolenaar446cb832008-06-24 21:56:24 +000010832/* Override any GCC internal prototype to avoid an error.
10833 Use char because int might match the return type of a GCC
10834 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010835char XShapeQueryExtension ();
10836int
Illia Bobyra96d5442023-08-30 16:30:15 +020010837main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010838{
Bram Moolenaar446cb832008-06-24 21:56:24 +000010839return XShapeQueryExtension ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010840 ;
10841 return 0;
10842}
10843_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020010844if ac_fn_c_try_link "$LINENO"
10845then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010846 ac_cv_lib_Xext_XShapeQueryExtension=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020010847else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010848 ac_cv_lib_Xext_XShapeQueryExtension=no
Bram Moolenaar071d4272004-06-13 20:20:40 +000010849fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010850rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010851 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010852LIBS=$ac_check_lib_save_LIBS
10853fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010854{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
10855printf "%s\n" "$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
10856if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = xyes
10857then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000010858 GUI_X_LIBS="-lXext"
Bram Moolenaar071d4272004-06-13 20:20:40 +000010859fi
10860
Illia Bobyra96d5442023-08-30 16:30:15 +020010861 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wslen in -lw" >&5
10862printf %s "checking for wslen in -lw... " >&6; }
10863if test ${ac_cv_lib_w_wslen+y}
10864then :
10865 printf %s "(cached) " >&6
10866else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010867 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000010868LIBS="-lw $GUI_X_LIBS -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010869cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010870/* end confdefs.h. */
10871
Bram Moolenaar446cb832008-06-24 21:56:24 +000010872/* Override any GCC internal prototype to avoid an error.
10873 Use char because int might match the return type of a GCC
10874 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010875char wslen ();
10876int
Illia Bobyra96d5442023-08-30 16:30:15 +020010877main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010878{
Bram Moolenaar446cb832008-06-24 21:56:24 +000010879return wslen ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010880 ;
10881 return 0;
10882}
10883_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020010884if ac_fn_c_try_link "$LINENO"
10885then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010886 ac_cv_lib_w_wslen=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020010887else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010888 ac_cv_lib_w_wslen=no
Bram Moolenaar071d4272004-06-13 20:20:40 +000010889fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010890rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010891 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010892LIBS=$ac_check_lib_save_LIBS
10893fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010894{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wslen" >&5
10895printf "%s\n" "$ac_cv_lib_w_wslen" >&6; }
10896if test "x$ac_cv_lib_w_wslen" = xyes
10897then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000010898 X_EXTRA_LIBS="$X_EXTRA_LIBS -lw"
Bram Moolenaar071d4272004-06-13 20:20:40 +000010899fi
10900
Illia Bobyra96d5442023-08-30 16:30:15 +020010901 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlsym in -ldl" >&5
10902printf %s "checking for dlsym in -ldl... " >&6; }
10903if test ${ac_cv_lib_dl_dlsym+y}
10904then :
10905 printf %s "(cached) " >&6
10906else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010907 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000010908LIBS="-ldl $GUI_X_LIBS -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010909cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010910/* end confdefs.h. */
10911
Bram Moolenaar446cb832008-06-24 21:56:24 +000010912/* Override any GCC internal prototype to avoid an error.
10913 Use char because int might match the return type of a GCC
10914 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010915char dlsym ();
10916int
Illia Bobyra96d5442023-08-30 16:30:15 +020010917main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010918{
Bram Moolenaar446cb832008-06-24 21:56:24 +000010919return dlsym ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010920 ;
10921 return 0;
10922}
10923_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020010924if ac_fn_c_try_link "$LINENO"
10925then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010926 ac_cv_lib_dl_dlsym=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020010927else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010928 ac_cv_lib_dl_dlsym=no
Bram Moolenaar071d4272004-06-13 20:20:40 +000010929fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010930rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010931 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010932LIBS=$ac_check_lib_save_LIBS
10933fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010934{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlsym" >&5
10935printf "%s\n" "$ac_cv_lib_dl_dlsym" >&6; }
10936if test "x$ac_cv_lib_dl_dlsym" = xyes
10937then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000010938 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldl"
Bram Moolenaar071d4272004-06-13 20:20:40 +000010939fi
10940
Illia Bobyra96d5442023-08-30 16:30:15 +020010941 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XmuCreateStippledPixmap in -lXmu" >&5
10942printf %s "checking for XmuCreateStippledPixmap in -lXmu... " >&6; }
10943if test ${ac_cv_lib_Xmu_XmuCreateStippledPixmap+y}
10944then :
10945 printf %s "(cached) " >&6
10946else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010947 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000010948LIBS="-lXmu $GUI_X_LIBS -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010949cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010950/* end confdefs.h. */
10951
Bram Moolenaar446cb832008-06-24 21:56:24 +000010952/* Override any GCC internal prototype to avoid an error.
10953 Use char because int might match the return type of a GCC
10954 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010955char XmuCreateStippledPixmap ();
10956int
Illia Bobyra96d5442023-08-30 16:30:15 +020010957main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010958{
Bram Moolenaar446cb832008-06-24 21:56:24 +000010959return XmuCreateStippledPixmap ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010960 ;
10961 return 0;
10962}
10963_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020010964if ac_fn_c_try_link "$LINENO"
10965then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010966 ac_cv_lib_Xmu_XmuCreateStippledPixmap=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020010967else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010968 ac_cv_lib_Xmu_XmuCreateStippledPixmap=no
Bram Moolenaar071d4272004-06-13 20:20:40 +000010969fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010970rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010971 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010972LIBS=$ac_check_lib_save_LIBS
10973fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010974{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuCreateStippledPixmap" >&5
10975printf "%s\n" "$ac_cv_lib_Xmu_XmuCreateStippledPixmap" >&6; }
10976if test "x$ac_cv_lib_Xmu_XmuCreateStippledPixmap" = xyes
10977then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000010978 GUI_X_LIBS="-lXmu $GUI_X_LIBS"
Bram Moolenaar071d4272004-06-13 20:20:40 +000010979fi
10980
10981 if test -z "$SKIP_MOTIF"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010982 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XpEndJob in -lXp" >&5
10983printf %s "checking for XpEndJob in -lXp... " >&6; }
10984if test ${ac_cv_lib_Xp_XpEndJob+y}
10985then :
10986 printf %s "(cached) " >&6
10987else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010988 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000010989LIBS="-lXp $GUI_X_LIBS -lXm -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010990cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010991/* end confdefs.h. */
10992
Bram Moolenaar446cb832008-06-24 21:56:24 +000010993/* Override any GCC internal prototype to avoid an error.
10994 Use char because int might match the return type of a GCC
10995 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010996char XpEndJob ();
10997int
Illia Bobyra96d5442023-08-30 16:30:15 +020010998main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010999{
Bram Moolenaar446cb832008-06-24 21:56:24 +000011000return XpEndJob ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011001 ;
11002 return 0;
11003}
11004_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011005if ac_fn_c_try_link "$LINENO"
11006then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011007 ac_cv_lib_Xp_XpEndJob=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020011008else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011009 ac_cv_lib_Xp_XpEndJob=no
Bram Moolenaar071d4272004-06-13 20:20:40 +000011010fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011011rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011012 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011013LIBS=$ac_check_lib_save_LIBS
11014fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011015{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpEndJob" >&5
11016printf "%s\n" "$ac_cv_lib_Xp_XpEndJob" >&6; }
11017if test "x$ac_cv_lib_Xp_XpEndJob" = xyes
11018then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000011019 GUI_X_LIBS="-lXp $GUI_X_LIBS"
Bram Moolenaar071d4272004-06-13 20:20:40 +000011020fi
11021
11022 fi
11023 LDFLAGS=$ldflags_save
11024
Illia Bobyra96d5442023-08-30 16:30:15 +020011025 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for extra X11 defines" >&5
11026printf %s "checking for extra X11 defines... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011027 NARROW_PROTO=
11028 rm -fr conftestdir
11029 if mkdir conftestdir; then
11030 cd conftestdir
11031 cat > Imakefile <<'EOF'
11032acfindx:
11033 @echo 'NARROW_PROTO="${PROTO_DEFINES}"'
11034EOF
11035 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
11036 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
11037 fi
11038 cd ..
11039 rm -fr conftestdir
11040 fi
11041 if test -z "$NARROW_PROTO"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011042 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11043printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011044 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011045 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NARROW_PROTO" >&5
11046printf "%s\n" "$NARROW_PROTO" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011047 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011048
Bram Moolenaar071d4272004-06-13 20:20:40 +000011049fi
11050
11051if test "$enable_xsmp" = "yes"; then
11052 cppflags_save=$CPPFLAGS
11053 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
Illia Bobyra96d5442023-08-30 16:30:15 +020011054 ac_fn_c_check_header_compile "$LINENO" "X11/SM/SMlib.h" "ac_cv_header_X11_SM_SMlib_h" "$ac_includes_default"
11055if test "x$ac_cv_header_X11_SM_SMlib_h" = xyes
11056then :
11057 printf "%s\n" "#define HAVE_X11_SM_SMLIB_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011058
11059fi
11060
Bram Moolenaar071d4272004-06-13 20:20:40 +000011061 CPPFLAGS=$cppflags_save
11062fi
11063
11064
Bram Moolenaarf52fac22022-03-11 16:01:26 +000011065if test -z "$SKIP_MOTIF" -o -z "$SKIP_GTK2" -o -z "$SKIP_GTK3"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000011066 cppflags_save=$CPPFLAGS
11067 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
Illia Bobyra96d5442023-08-30 16:30:15 +020011068 ac_fn_c_check_header_compile "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default"
11069if test "x$ac_cv_header_X11_xpm_h" = xyes
11070then :
11071 printf "%s\n" "#define HAVE_X11_XPM_H 1" >>confdefs.h
11072
11073fi
11074ac_fn_c_check_header_compile "$LINENO" "X11/Sunkeysym.h" "ac_cv_header_X11_Sunkeysym_h" "$ac_includes_default"
11075if test "x$ac_cv_header_X11_Sunkeysym_h" = xyes
11076then :
11077 printf "%s\n" "#define HAVE_X11_SUNKEYSYM_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011078
11079fi
11080
Bram Moolenaar071d4272004-06-13 20:20:40 +000011081
11082 if test ! "$enable_xim" = "no"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011083 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XIMText in X11/Xlib.h" >&5
11084printf %s "checking for XIMText in X11/Xlib.h... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011086/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000011087#include <X11/Xlib.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011088_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000011089if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Illia Bobyra96d5442023-08-30 16:30:15 +020011090 $EGREP "XIMText" >/dev/null 2>&1
11091then :
11092 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11093printf "%s\n" "yes" >&6; }
11094else $as_nop
11095 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no; xim has been disabled" >&5
11096printf "%s\n" "no; xim has been disabled" >&6; }; enable_xim="no"
Bram Moolenaar071d4272004-06-13 20:20:40 +000011097fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011098rm -rf conftest*
Bram Moolenaar071d4272004-06-13 20:20:40 +000011099
11100 fi
11101 CPPFLAGS=$cppflags_save
11102
Bram Moolenaar54612582019-11-21 17:13:31 +010011103 if test "$enable_xim" = "auto" -a "x$GUITYPE" != "xNONE" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011104 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: X GUI selected; xim has been enabled" >&5
11105printf "%s\n" "X GUI selected; xim has been enabled" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011106 enable_xim="yes"
11107 fi
11108fi
11109
Bram Moolenaarf52fac22022-03-11 16:01:26 +000011110if test -z "$SKIP_MOTIF"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000011111 cppflags_save=$CPPFLAGS
11112 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
Illia Bobyra96d5442023-08-30 16:30:15 +020011113 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for X11/Xmu/Editres.h" >&5
11114printf %s "checking for X11/Xmu/Editres.h... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011116/* end confdefs.h. */
Bram Moolenaar2ce06f62005-01-31 19:19:04 +000011117
11118#include <X11/Intrinsic.h>
11119#include <X11/Xmu/Editres.h>
11120int
Illia Bobyra96d5442023-08-30 16:30:15 +020011121main (void)
Bram Moolenaar2ce06f62005-01-31 19:19:04 +000011122{
11123int i; i = 0;
11124 ;
11125 return 0;
11126}
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011127_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011128if ac_fn_c_try_compile "$LINENO"
11129then :
11130 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11131printf "%s\n" "yes" >&6; }
11132 printf "%s\n" "#define HAVE_X11_XMU_EDITRES_H 1" >>confdefs.h
Bram Moolenaar2ce06f62005-01-31 19:19:04 +000011133
Illia Bobyra96d5442023-08-30 16:30:15 +020011134else $as_nop
11135 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11136printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011137fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011138rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000011139 CPPFLAGS=$cppflags_save
11140fi
11141
11142if test -z "$SKIP_MOTIF"; then
11143 cppflags_save=$CPPFLAGS
11144 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
Bram Moolenaar77c19352012-06-13 19:19:41 +020011145 if test "$zOSUnix" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011146 ac_fn_c_check_header_compile "$LINENO" "Xm/Xm.h" "ac_cv_header_Xm_Xm_h" "$ac_includes_default"
11147if test "x$ac_cv_header_Xm_Xm_h" = xyes
11148then :
11149 printf "%s\n" "#define HAVE_XM_XM_H 1" >>confdefs.h
Bram Moolenaar1004b3d2022-06-05 19:51:55 +010011150
11151fi
11152
Bram Moolenaar77c19352012-06-13 19:19:41 +020011153 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011154 ac_fn_c_check_header_compile "$LINENO" "Xm/Xm.h" "ac_cv_header_Xm_Xm_h" "$ac_includes_default"
11155if test "x$ac_cv_header_Xm_Xm_h" = xyes
11156then :
11157 printf "%s\n" "#define HAVE_XM_XM_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011158
11159fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011160ac_fn_c_check_header_compile "$LINENO" "Xm/XpmP.h" "ac_cv_header_Xm_XpmP_h" "$ac_includes_default"
11161if test "x$ac_cv_header_Xm_XpmP_h" = xyes
11162then :
11163 printf "%s\n" "#define HAVE_XM_XPMP_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011164
Illia Bobyra96d5442023-08-30 16:30:15 +020011165fi
11166ac_fn_c_check_header_compile "$LINENO" "Xm/JoinSideT.h" "ac_cv_header_Xm_JoinSideT_h" "$ac_includes_default"
11167if test "x$ac_cv_header_Xm_JoinSideT_h" = xyes
11168then :
11169 printf "%s\n" "#define HAVE_XM_JOINSIDET_H 1" >>confdefs.h
11170
11171fi
11172ac_fn_c_check_header_compile "$LINENO" "Xm/TraitP.h" "ac_cv_header_Xm_TraitP_h" "$ac_includes_default"
11173if test "x$ac_cv_header_Xm_TraitP_h" = xyes
11174then :
11175 printf "%s\n" "#define HAVE_XM_TRAITP_H 1" >>confdefs.h
11176
11177fi
11178ac_fn_c_check_header_compile "$LINENO" "Xm/Manager.h" "ac_cv_header_Xm_Manager_h" "$ac_includes_default"
11179if test "x$ac_cv_header_Xm_Manager_h" = xyes
11180then :
11181 printf "%s\n" "#define HAVE_XM_MANAGER_H 1" >>confdefs.h
11182
11183fi
11184ac_fn_c_check_header_compile "$LINENO" "Xm/UnhighlightT.h" "ac_cv_header_Xm_UnhighlightT_h" "$ac_includes_default"
11185if test "x$ac_cv_header_Xm_UnhighlightT_h" = xyes
11186then :
11187 printf "%s\n" "#define HAVE_XM_UNHIGHLIGHTT_H 1" >>confdefs.h
11188
11189fi
11190ac_fn_c_check_header_compile "$LINENO" "Xm/Notebook.h" "ac_cv_header_Xm_Notebook_h" "$ac_includes_default"
11191if test "x$ac_cv_header_Xm_Notebook_h" = xyes
11192then :
11193 printf "%s\n" "#define HAVE_XM_NOTEBOOK_H 1" >>confdefs.h
11194
11195fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000011196
Bram Moolenaar1004b3d2022-06-05 19:51:55 +010011197 fi
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011198
Bram Moolenaar77c19352012-06-13 19:19:41 +020011199 if test "x$ac_cv_header_Xm_XpmP_h" = "xyes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011200 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XpmAttributes_21 in Xm/XpmP.h" >&5
11201printf %s "checking for XpmAttributes_21 in Xm/XpmP.h... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011203/* end confdefs.h. */
11204#include <Xm/XpmP.h>
11205int
Illia Bobyra96d5442023-08-30 16:30:15 +020011206main (void)
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011207{
11208XpmAttributes_21 attr;
11209 ;
11210 return 0;
11211}
11212_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011213if ac_fn_c_try_compile "$LINENO"
11214then :
11215 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11216printf "%s\n" "yes" >&6; }; printf "%s\n" "#define XPMATTRIBUTES_TYPE XpmAttributes_21" >>confdefs.h
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011217
Illia Bobyra96d5442023-08-30 16:30:15 +020011218else $as_nop
11219 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11220printf "%s\n" "no" >&6; }; printf "%s\n" "#define XPMATTRIBUTES_TYPE XpmAttributes" >>confdefs.h
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011221
11222
11223fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011224rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011225 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011226 printf "%s\n" "#define XPMATTRIBUTES_TYPE XpmAttributes" >>confdefs.h
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011227
11228 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000011229 CPPFLAGS=$cppflags_save
11230fi
11231
11232if test "x$GUITYPE" = "xNONE" -a "$enable_xim" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011233 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no GUI selected; xim has been disabled" >&5
11234printf "%s\n" "no GUI selected; xim has been disabled" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011235 enable_xim="no"
11236fi
11237if test "x$GUITYPE" = "xNONE" -a "$enable_fontset" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011238 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no GUI selected; fontset has been disabled" >&5
11239printf "%s\n" "no GUI selected; fontset has been disabled" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011240 enable_fontset="no"
11241fi
Bram Moolenaar182c5be2010-06-25 05:37:59 +020011242if test "x$GUITYPE:$enable_fontset" = "xGTK:yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011243 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: GTK+ 2 GUI selected; fontset has been disabled" >&5
11244printf "%s\n" "GTK+ 2 GUI selected; fontset has been disabled" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011245 enable_fontset="no"
11246fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000011247
Bram Moolenaarb3f74062020-02-26 16:16:53 +010011248if test -z "$SKIP_HAIKU"; then
11249 GUITYPE=HAIKUGUI
11250fi
11251
Bram Moolenaar071d4272004-06-13 20:20:40 +000011252if test -z "$SKIP_PHOTON"; then
11253 GUITYPE=PHOTONGUI
11254fi
11255
11256
11257
11258
11259
11260
11261if test "$enable_workshop" = "yes" -a -n "$SKIP_MOTIF"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010011262 as_fn_error $? "cannot use workshop without Motif" "$LINENO" 5
Bram Moolenaar071d4272004-06-13 20:20:40 +000011263fi
11264
11265if test "$enable_xim" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011266 printf "%s\n" "#define FEAT_XIM 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000011267
11268fi
11269if test "$enable_fontset" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011270 printf "%s\n" "#define FEAT_XFONTSET 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000011271
11272fi
11273
11274
11275
Illia Bobyra96d5442023-08-30 16:30:15 +020011276{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for /proc link to executable" >&5
11277printf %s "checking for /proc link to executable... " >&6; }
Bram Moolenaar5f69fee2017-03-09 11:58:40 +010011278if test -L "/proc/self/exe"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011279 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: /proc/self/exe" >&5
11280printf "%s\n" "/proc/self/exe" >&6; }
11281 printf "%s\n" "#define PROC_EXE_LINK \"/proc/self/exe\"" >>confdefs.h
Bram Moolenaarf3757f02017-03-16 15:13:45 +010011282
11283elif test -L "/proc/self/path/a.out"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011284 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: /proc/self/path/a.out" >&5
11285printf "%s\n" "/proc/self/path/a.out" >&6; }
11286 printf "%s\n" "#define PROC_EXE_LINK \"/proc/self/path/a.out\"" >>confdefs.h
Bram Moolenaarf3757f02017-03-16 15:13:45 +010011287
11288elif test -L "/proc/curproc/file"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011289 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: /proc/curproc/file" >&5
11290printf "%s\n" "/proc/curproc/file" >&6; }
11291 printf "%s\n" "#define PROC_EXE_LINK \"/proc/curproc/file\"" >>confdefs.h
Bram Moolenaar5f69fee2017-03-09 11:58:40 +010011292
11293else
Illia Bobyra96d5442023-08-30 16:30:15 +020011294 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11295printf "%s\n" "no" >&6; }
Bram Moolenaar5f69fee2017-03-09 11:58:40 +010011296fi
11297
Illia Bobyra96d5442023-08-30 16:30:15 +020011298{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CYGWIN or MSYS environment" >&5
11299printf %s "checking for CYGWIN or MSYS environment... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +000011300case $vim_cv_uname_output in
Illia Bobyra96d5442023-08-30 16:30:15 +020011301 CYGWIN*|MSYS*) CYGWIN=yes; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11302printf "%s\n" "yes" >&6; }
11303 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CYGWIN clipboard support" >&5
11304printf %s "checking for CYGWIN clipboard support... " >&6; }
Bram Moolenaar693e40c2013-02-26 14:56:42 +010011305 if test "x$with_x" = "xno" ; then
11306 OS_EXTRA_SRC=winclip.c; OS_EXTRA_OBJ=objects/winclip.o
Illia Bobyra96d5442023-08-30 16:30:15 +020011307 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11308printf "%s\n" "yes" >&6; }
11309 printf "%s\n" "#define FEAT_CYGWIN_WIN32_CLIPBOARD 1" >>confdefs.h
Bram Moolenaar693e40c2013-02-26 14:56:42 +010011310
11311 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011312 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no - using X11" >&5
11313printf "%s\n" "no - using X11" >&6; }
Bram Moolenaar693e40c2013-02-26 14:56:42 +010011314 fi ;;
11315
Illia Bobyra96d5442023-08-30 16:30:15 +020011316 *) CYGWIN=no; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11317printf "%s\n" "no" >&6; };;
Bram Moolenaar693e40c2013-02-26 14:56:42 +010011318esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000011319
Bram Moolenaar071d4272004-06-13 20:20:40 +000011320
Illia Bobyra96d5442023-08-30 16:30:15 +020011321{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether toupper is broken" >&5
11322printf %s "checking whether toupper is broken... " >&6; }
11323if test ${vim_cv_toupper_broken+y}
11324then :
11325 printf %s "(cached) " >&6
11326else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000011327
Illia Bobyra96d5442023-08-30 16:30:15 +020011328 if test "$cross_compiling" = yes
11329then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000011330
Bram Moolenaar7db77842014-03-27 17:40:59 +010011331 as_fn_error $? "cross-compiling: please set 'vim_cv_toupper_broken'" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000011332
Illia Bobyra96d5442023-08-30 16:30:15 +020011333else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11335/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000011336
11337#include "confdefs.h"
Bram Moolenaar071d4272004-06-13 20:20:40 +000011338#include <ctype.h>
Bram Moolenaar446cb832008-06-24 21:56:24 +000011339#if STDC_HEADERS
11340# include <stdlib.h>
11341# include <stddef.h>
11342#endif
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010011343int main() { exit(toupper('A') == 'A' && tolower('z') == 'z'); }
Bram Moolenaar446cb832008-06-24 21:56:24 +000011344
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011345_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011346if ac_fn_c_try_run "$LINENO"
11347then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000011348
11349 vim_cv_toupper_broken=yes
11350
Illia Bobyra96d5442023-08-30 16:30:15 +020011351else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000011352
11353 vim_cv_toupper_broken=no
11354
Bram Moolenaar071d4272004-06-13 20:20:40 +000011355fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011356rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11357 conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000011358fi
11359
Bram Moolenaar446cb832008-06-24 21:56:24 +000011360fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011361{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_toupper_broken" >&5
11362printf "%s\n" "$vim_cv_toupper_broken" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000011363
11364if test "x$vim_cv_toupper_broken" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011365 printf "%s\n" "#define BROKEN_TOUPPER 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000011366
11367fi
11368
Illia Bobyra96d5442023-08-30 16:30:15 +020011369{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __DATE__ and __TIME__ work" >&5
11370printf %s "checking whether __DATE__ and __TIME__ work... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011371cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011372/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000011373#include <stdio.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011374int
Illia Bobyra96d5442023-08-30 16:30:15 +020011375main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011376{
Bram Moolenaar071d4272004-06-13 20:20:40 +000011377printf("(" __DATE__ " " __TIME__ ")");
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011378 ;
11379 return 0;
11380}
11381_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011382if ac_fn_c_try_compile "$LINENO"
11383then :
11384 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11385printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_DATE_TIME 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000011386
Illia Bobyra96d5442023-08-30 16:30:15 +020011387else $as_nop
11388 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11389printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011390fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011391rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000011392
Illia Bobyra96d5442023-08-30 16:30:15 +020011393{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __attribute__((unused)) is allowed" >&5
11394printf %s "checking whether __attribute__((unused)) is allowed... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011395cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar0c094b92009-05-14 20:20:33 +000011396/* end confdefs.h. */
11397#include <stdio.h>
11398int
Illia Bobyra96d5442023-08-30 16:30:15 +020011399main (void)
Bram Moolenaar0c094b92009-05-14 20:20:33 +000011400{
11401int x __attribute__((unused));
11402 ;
11403 return 0;
11404}
11405_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011406if ac_fn_c_try_compile "$LINENO"
11407then :
11408 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11409printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_ATTRIBUTE_UNUSED 1" >>confdefs.h
Bram Moolenaar0c094b92009-05-14 20:20:33 +000011410
Illia Bobyra96d5442023-08-30 16:30:15 +020011411else $as_nop
11412 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11413printf "%s\n" "no" >&6; }
Bram Moolenaar0c094b92009-05-14 20:20:33 +000011414fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011415rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0c094b92009-05-14 20:20:33 +000011416
Bram Moolenaar071d4272004-06-13 20:20:40 +000011417ac_header_dirent=no
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011418for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Illia Bobyra96d5442023-08-30 16:30:15 +020011419 as_ac_Header=`printf "%s\n" "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
11420{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
11421printf %s "checking for $ac_hdr that defines DIR... " >&6; }
11422if eval test \${$as_ac_Header+y}
11423then :
11424 printf %s "(cached) " >&6
11425else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011427/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000011428#include <sys/types.h>
11429#include <$ac_hdr>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011430
11431int
Illia Bobyra96d5442023-08-30 16:30:15 +020011432main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011433{
11434if ((DIR *) 0)
11435return 0;
11436 ;
11437 return 0;
11438}
11439_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011440if ac_fn_c_try_compile "$LINENO"
11441then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011442 eval "$as_ac_Header=yes"
Illia Bobyra96d5442023-08-30 16:30:15 +020011443else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011444 eval "$as_ac_Header=no"
Bram Moolenaar071d4272004-06-13 20:20:40 +000011445fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011446rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000011447fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011448eval ac_res=\$$as_ac_Header
Illia Bobyra96d5442023-08-30 16:30:15 +020011449 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11450printf "%s\n" "$ac_res" >&6; }
11451if eval test \"x\$"$as_ac_Header"\" = x"yes"
11452then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011453 cat >>confdefs.h <<_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011454#define `printf "%s\n" "HAVE_$ac_hdr" | $as_tr_cpp` 1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011455_ACEOF
11456
11457ac_header_dirent=$ac_hdr; break
Bram Moolenaar071d4272004-06-13 20:20:40 +000011458fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011459
Bram Moolenaar071d4272004-06-13 20:20:40 +000011460done
11461# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
11462if test $ac_header_dirent = dirent.h; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011463 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
11464printf %s "checking for library containing opendir... " >&6; }
11465if test ${ac_cv_search_opendir+y}
11466then :
11467 printf %s "(cached) " >&6
11468else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011469 ac_func_search_save_LIBS=$LIBS
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011470cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011471/* end confdefs.h. */
11472
Bram Moolenaar446cb832008-06-24 21:56:24 +000011473/* Override any GCC internal prototype to avoid an error.
11474 Use char because int might match the return type of a GCC
11475 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011476char opendir ();
11477int
Illia Bobyra96d5442023-08-30 16:30:15 +020011478main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011479{
Bram Moolenaar446cb832008-06-24 21:56:24 +000011480return opendir ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011481 ;
11482 return 0;
11483}
11484_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011485for ac_lib in '' dir
11486do
Bram Moolenaar446cb832008-06-24 21:56:24 +000011487 if test -z "$ac_lib"; then
11488 ac_res="none required"
11489 else
11490 ac_res=-l$ac_lib
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011491 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Bram Moolenaar446cb832008-06-24 21:56:24 +000011492 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011493 if ac_fn_c_try_link "$LINENO"
11494then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000011495 ac_cv_search_opendir=$ac_res
Bram Moolenaar071d4272004-06-13 20:20:40 +000011496fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011497rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011498 conftest$ac_exeext
Illia Bobyra96d5442023-08-30 16:30:15 +020011499 if test ${ac_cv_search_opendir+y}
11500then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000011501 break
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011502fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000011503done
Illia Bobyra96d5442023-08-30 16:30:15 +020011504if test ${ac_cv_search_opendir+y}
11505then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011506
Illia Bobyra96d5442023-08-30 16:30:15 +020011507else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000011508 ac_cv_search_opendir=no
11509fi
11510rm conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011511LIBS=$ac_func_search_save_LIBS
11512fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011513{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
11514printf "%s\n" "$ac_cv_search_opendir" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000011515ac_res=$ac_cv_search_opendir
Illia Bobyra96d5442023-08-30 16:30:15 +020011516if test "$ac_res" != no
11517then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000011518 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011519
11520fi
11521
Bram Moolenaar071d4272004-06-13 20:20:40 +000011522else
Illia Bobyra96d5442023-08-30 16:30:15 +020011523 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
11524printf %s "checking for library containing opendir... " >&6; }
11525if test ${ac_cv_search_opendir+y}
11526then :
11527 printf %s "(cached) " >&6
11528else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011529 ac_func_search_save_LIBS=$LIBS
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011530cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011531/* end confdefs.h. */
11532
Bram Moolenaar446cb832008-06-24 21:56:24 +000011533/* Override any GCC internal prototype to avoid an error.
11534 Use char because int might match the return type of a GCC
11535 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011536char opendir ();
11537int
Illia Bobyra96d5442023-08-30 16:30:15 +020011538main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011539{
Bram Moolenaar446cb832008-06-24 21:56:24 +000011540return opendir ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011541 ;
11542 return 0;
11543}
11544_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011545for ac_lib in '' x
11546do
Bram Moolenaar446cb832008-06-24 21:56:24 +000011547 if test -z "$ac_lib"; then
11548 ac_res="none required"
11549 else
11550 ac_res=-l$ac_lib
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011551 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Bram Moolenaar446cb832008-06-24 21:56:24 +000011552 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011553 if ac_fn_c_try_link "$LINENO"
11554then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000011555 ac_cv_search_opendir=$ac_res
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011556fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011557rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011558 conftest$ac_exeext
Illia Bobyra96d5442023-08-30 16:30:15 +020011559 if test ${ac_cv_search_opendir+y}
11560then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000011561 break
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011562fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000011563done
Illia Bobyra96d5442023-08-30 16:30:15 +020011564if test ${ac_cv_search_opendir+y}
11565then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011566
Illia Bobyra96d5442023-08-30 16:30:15 +020011567else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000011568 ac_cv_search_opendir=no
11569fi
11570rm conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011571LIBS=$ac_func_search_save_LIBS
11572fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011573{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
11574printf "%s\n" "$ac_cv_search_opendir" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000011575ac_res=$ac_cv_search_opendir
Illia Bobyra96d5442023-08-30 16:30:15 +020011576if test "$ac_res" != no
11577then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000011578 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011579
11580fi
11581
11582fi
11583
11584
Bram Moolenaar071d4272004-06-13 20:20:40 +000011585if test $ac_cv_header_sys_wait_h = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011586 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that defines union wait" >&5
11587printf %s "checking for sys/wait.h that defines union wait... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011589/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000011590#include <sys/wait.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011591int
Illia Bobyra96d5442023-08-30 16:30:15 +020011592main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011593{
Bram Moolenaar071d4272004-06-13 20:20:40 +000011594union wait xx, yy; xx = yy
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011595 ;
11596 return 0;
11597}
11598_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011599if ac_fn_c_try_compile "$LINENO"
11600then :
11601 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11602printf "%s\n" "yes" >&6; }
11603 printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000011604
Illia Bobyra96d5442023-08-30 16:30:15 +020011605 printf "%s\n" "#define HAVE_UNION_WAIT 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000011606
Illia Bobyra96d5442023-08-30 16:30:15 +020011607else $as_nop
11608 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11609printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011610fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011611rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000011612fi
11613
Illia Bobyra96d5442023-08-30 16:30:15 +020011614ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
11615if test "x$ac_cv_header_stdint_h" = xyes
11616then :
11617 printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h
11618
11619fi
11620ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
11621if test "x$ac_cv_header_stdlib_h" = xyes
11622then :
11623 printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h
11624
11625fi
11626ac_fn_c_check_header_compile "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default"
11627if test "x$ac_cv_header_string_h" = xyes
11628then :
11629 printf "%s\n" "#define HAVE_STRING_H 1" >>confdefs.h
11630
11631fi
11632ac_fn_c_check_header_compile "$LINENO" "sys/select.h" "ac_cv_header_sys_select_h" "$ac_includes_default"
11633if test "x$ac_cv_header_sys_select_h" = xyes
11634then :
11635 printf "%s\n" "#define HAVE_SYS_SELECT_H 1" >>confdefs.h
11636
11637fi
11638ac_fn_c_check_header_compile "$LINENO" "sys/utsname.h" "ac_cv_header_sys_utsname_h" "$ac_includes_default"
11639if test "x$ac_cv_header_sys_utsname_h" = xyes
11640then :
11641 printf "%s\n" "#define HAVE_SYS_UTSNAME_H 1" >>confdefs.h
11642
11643fi
11644ac_fn_c_check_header_compile "$LINENO" "termcap.h" "ac_cv_header_termcap_h" "$ac_includes_default"
11645if test "x$ac_cv_header_termcap_h" = xyes
11646then :
11647 printf "%s\n" "#define HAVE_TERMCAP_H 1" >>confdefs.h
11648
11649fi
11650ac_fn_c_check_header_compile "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default"
11651if test "x$ac_cv_header_fcntl_h" = xyes
11652then :
11653 printf "%s\n" "#define HAVE_FCNTL_H 1" >>confdefs.h
11654
11655fi
11656ac_fn_c_check_header_compile "$LINENO" "sgtty.h" "ac_cv_header_sgtty_h" "$ac_includes_default"
11657if test "x$ac_cv_header_sgtty_h" = xyes
11658then :
11659 printf "%s\n" "#define HAVE_SGTTY_H 1" >>confdefs.h
11660
11661fi
11662ac_fn_c_check_header_compile "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "$ac_includes_default"
11663if test "x$ac_cv_header_sys_ioctl_h" = xyes
11664then :
11665 printf "%s\n" "#define HAVE_SYS_IOCTL_H 1" >>confdefs.h
11666
11667fi
11668ac_fn_c_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default"
11669if test "x$ac_cv_header_sys_time_h" = xyes
11670then :
11671 printf "%s\n" "#define HAVE_SYS_TIME_H 1" >>confdefs.h
11672
11673fi
11674ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$ac_includes_default"
11675if test "x$ac_cv_header_sys_types_h" = xyes
11676then :
11677 printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h
11678
11679fi
11680ac_fn_c_check_header_compile "$LINENO" "termio.h" "ac_cv_header_termio_h" "$ac_includes_default"
11681if test "x$ac_cv_header_termio_h" = xyes
11682then :
11683 printf "%s\n" "#define HAVE_TERMIO_H 1" >>confdefs.h
11684
11685fi
11686ac_fn_c_check_header_compile "$LINENO" "iconv.h" "ac_cv_header_iconv_h" "$ac_includes_default"
11687if test "x$ac_cv_header_iconv_h" = xyes
11688then :
11689 printf "%s\n" "#define HAVE_ICONV_H 1" >>confdefs.h
11690
11691fi
11692ac_fn_c_check_header_compile "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
11693if test "x$ac_cv_header_inttypes_h" = xyes
11694then :
11695 printf "%s\n" "#define HAVE_INTTYPES_H 1" >>confdefs.h
11696
11697fi
11698ac_fn_c_check_header_compile "$LINENO" "langinfo.h" "ac_cv_header_langinfo_h" "$ac_includes_default"
11699if test "x$ac_cv_header_langinfo_h" = xyes
11700then :
11701 printf "%s\n" "#define HAVE_LANGINFO_H 1" >>confdefs.h
11702
11703fi
11704ac_fn_c_check_header_compile "$LINENO" "math.h" "ac_cv_header_math_h" "$ac_includes_default"
11705if test "x$ac_cv_header_math_h" = xyes
11706then :
11707 printf "%s\n" "#define HAVE_MATH_H 1" >>confdefs.h
11708
11709fi
11710ac_fn_c_check_header_compile "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
11711if test "x$ac_cv_header_unistd_h" = xyes
11712then :
11713 printf "%s\n" "#define HAVE_UNISTD_H 1" >>confdefs.h
11714
11715fi
11716ac_fn_c_check_header_compile "$LINENO" "stropts.h" "ac_cv_header_stropts_h" "$ac_includes_default"
11717if test "x$ac_cv_header_stropts_h" = xyes
11718then :
11719 printf "%s\n" "#define HAVE_STROPTS_H 1" >>confdefs.h
11720
11721fi
11722ac_fn_c_check_header_compile "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default"
11723if test "x$ac_cv_header_errno_h" = xyes
11724then :
11725 printf "%s\n" "#define HAVE_ERRNO_H 1" >>confdefs.h
11726
11727fi
11728ac_fn_c_check_header_compile "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" "$ac_includes_default"
11729if test "x$ac_cv_header_sys_resource_h" = xyes
11730then :
11731 printf "%s\n" "#define HAVE_SYS_RESOURCE_H 1" >>confdefs.h
11732
11733fi
11734ac_fn_c_check_header_compile "$LINENO" "sys/systeminfo.h" "ac_cv_header_sys_systeminfo_h" "$ac_includes_default"
11735if test "x$ac_cv_header_sys_systeminfo_h" = xyes
11736then :
11737 printf "%s\n" "#define HAVE_SYS_SYSTEMINFO_H 1" >>confdefs.h
11738
11739fi
11740ac_fn_c_check_header_compile "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default"
11741if test "x$ac_cv_header_locale_h" = xyes
11742then :
11743 printf "%s\n" "#define HAVE_LOCALE_H 1" >>confdefs.h
11744
11745fi
11746ac_fn_c_check_header_compile "$LINENO" "sys/stream.h" "ac_cv_header_sys_stream_h" "$ac_includes_default"
11747if test "x$ac_cv_header_sys_stream_h" = xyes
11748then :
11749 printf "%s\n" "#define HAVE_SYS_STREAM_H 1" >>confdefs.h
11750
11751fi
11752ac_fn_c_check_header_compile "$LINENO" "termios.h" "ac_cv_header_termios_h" "$ac_includes_default"
11753if test "x$ac_cv_header_termios_h" = xyes
11754then :
11755 printf "%s\n" "#define HAVE_TERMIOS_H 1" >>confdefs.h
11756
11757fi
11758ac_fn_c_check_header_compile "$LINENO" "libc.h" "ac_cv_header_libc_h" "$ac_includes_default"
11759if test "x$ac_cv_header_libc_h" = xyes
11760then :
11761 printf "%s\n" "#define HAVE_LIBC_H 1" >>confdefs.h
11762
11763fi
11764ac_fn_c_check_header_compile "$LINENO" "sys/statfs.h" "ac_cv_header_sys_statfs_h" "$ac_includes_default"
11765if test "x$ac_cv_header_sys_statfs_h" = xyes
11766then :
11767 printf "%s\n" "#define HAVE_SYS_STATFS_H 1" >>confdefs.h
11768
11769fi
11770ac_fn_c_check_header_compile "$LINENO" "poll.h" "ac_cv_header_poll_h" "$ac_includes_default"
11771if test "x$ac_cv_header_poll_h" = xyes
11772then :
11773 printf "%s\n" "#define HAVE_POLL_H 1" >>confdefs.h
11774
11775fi
11776ac_fn_c_check_header_compile "$LINENO" "sys/poll.h" "ac_cv_header_sys_poll_h" "$ac_includes_default"
11777if test "x$ac_cv_header_sys_poll_h" = xyes
11778then :
11779 printf "%s\n" "#define HAVE_SYS_POLL_H 1" >>confdefs.h
11780
11781fi
11782ac_fn_c_check_header_compile "$LINENO" "pwd.h" "ac_cv_header_pwd_h" "$ac_includes_default"
11783if test "x$ac_cv_header_pwd_h" = xyes
11784then :
11785 printf "%s\n" "#define HAVE_PWD_H 1" >>confdefs.h
11786
11787fi
11788ac_fn_c_check_header_compile "$LINENO" "utime.h" "ac_cv_header_utime_h" "$ac_includes_default"
11789if test "x$ac_cv_header_utime_h" = xyes
11790then :
11791 printf "%s\n" "#define HAVE_UTIME_H 1" >>confdefs.h
11792
11793fi
11794ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
11795if test "x$ac_cv_header_sys_param_h" = xyes
11796then :
11797 printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h
11798
11799fi
11800ac_fn_c_check_header_compile "$LINENO" "sys/ptms.h" "ac_cv_header_sys_ptms_h" "$ac_includes_default"
11801if test "x$ac_cv_header_sys_ptms_h" = xyes
11802then :
11803 printf "%s\n" "#define HAVE_SYS_PTMS_H 1" >>confdefs.h
11804
11805fi
11806ac_fn_c_check_header_compile "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
11807if test "x$ac_cv_header_libintl_h" = xyes
11808then :
11809 printf "%s\n" "#define HAVE_LIBINTL_H 1" >>confdefs.h
11810
11811fi
11812ac_fn_c_check_header_compile "$LINENO" "libgen.h" "ac_cv_header_libgen_h" "$ac_includes_default"
11813if test "x$ac_cv_header_libgen_h" = xyes
11814then :
11815 printf "%s\n" "#define HAVE_LIBGEN_H 1" >>confdefs.h
11816
11817fi
11818ac_fn_c_check_header_compile "$LINENO" "util/debug.h" "ac_cv_header_util_debug_h" "$ac_includes_default"
11819if test "x$ac_cv_header_util_debug_h" = xyes
11820then :
11821 printf "%s\n" "#define HAVE_UTIL_DEBUG_H 1" >>confdefs.h
11822
11823fi
11824ac_fn_c_check_header_compile "$LINENO" "util/msg18n.h" "ac_cv_header_util_msg18n_h" "$ac_includes_default"
11825if test "x$ac_cv_header_util_msg18n_h" = xyes
11826then :
11827 printf "%s\n" "#define HAVE_UTIL_MSG18N_H 1" >>confdefs.h
11828
11829fi
11830ac_fn_c_check_header_compile "$LINENO" "frame.h" "ac_cv_header_frame_h" "$ac_includes_default"
11831if test "x$ac_cv_header_frame_h" = xyes
11832then :
11833 printf "%s\n" "#define HAVE_FRAME_H 1" >>confdefs.h
11834
11835fi
11836ac_fn_c_check_header_compile "$LINENO" "sys/acl.h" "ac_cv_header_sys_acl_h" "$ac_includes_default"
11837if test "x$ac_cv_header_sys_acl_h" = xyes
11838then :
11839 printf "%s\n" "#define HAVE_SYS_ACL_H 1" >>confdefs.h
11840
11841fi
11842ac_fn_c_check_header_compile "$LINENO" "sys/access.h" "ac_cv_header_sys_access_h" "$ac_includes_default"
11843if test "x$ac_cv_header_sys_access_h" = xyes
11844then :
11845 printf "%s\n" "#define HAVE_SYS_ACCESS_H 1" >>confdefs.h
11846
11847fi
11848ac_fn_c_check_header_compile "$LINENO" "sys/sysinfo.h" "ac_cv_header_sys_sysinfo_h" "$ac_includes_default"
11849if test "x$ac_cv_header_sys_sysinfo_h" = xyes
11850then :
11851 printf "%s\n" "#define HAVE_SYS_SYSINFO_H 1" >>confdefs.h
11852
11853fi
11854ac_fn_c_check_header_compile "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
11855if test "x$ac_cv_header_wchar_h" = xyes
11856then :
11857 printf "%s\n" "#define HAVE_WCHAR_H 1" >>confdefs.h
11858
11859fi
11860ac_fn_c_check_header_compile "$LINENO" "wctype.h" "ac_cv_header_wctype_h" "$ac_includes_default"
11861if test "x$ac_cv_header_wctype_h" = xyes
11862then :
11863 printf "%s\n" "#define HAVE_WCTYPE_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011864
11865fi
11866
Bram Moolenaar071d4272004-06-13 20:20:40 +000011867
Illia Bobyra96d5442023-08-30 16:30:15 +020011868ac_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 +000011869# include <sys/stream.h>
11870#endif
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011871"
Illia Bobyra96d5442023-08-30 16:30:15 +020011872if test "x$ac_cv_header_sys_ptem_h" = xyes
11873then :
11874 printf "%s\n" "#define HAVE_SYS_PTEM_H 1" >>confdefs.h
Bram Moolenaar32f31b12009-05-21 13:20:59 +000011875
11876fi
11877
Bram Moolenaar32f31b12009-05-21 13:20:59 +000011878
Illia Bobyra96d5442023-08-30 16:30:15 +020011879ac_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 +000011880# include <sys/param.h>
11881#endif
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011882"
Illia Bobyra96d5442023-08-30 16:30:15 +020011883if test "x$ac_cv_header_sys_sysctl_h" = xyes
11884then :
11885 printf "%s\n" "#define HAVE_SYS_SYSCTL_H 1" >>confdefs.h
Bram Moolenaar00ca2842008-06-26 20:14:00 +000011886
11887fi
11888
Bram Moolenaar00ca2842008-06-26 20:14:00 +000011889
11890
Illia Bobyra96d5442023-08-30 16:30:15 +020011891{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_np.h" >&5
11892printf %s "checking for pthread_np.h... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011893cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011894/* end confdefs.h. */
11895
11896#include <pthread.h>
11897#include <pthread_np.h>
11898int
Illia Bobyra96d5442023-08-30 16:30:15 +020011899main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011900{
11901int i; i = 0;
11902 ;
11903 return 0;
11904}
11905_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011906if ac_fn_c_try_compile "$LINENO"
11907then :
11908 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11909printf "%s\n" "yes" >&6; }
11910 printf "%s\n" "#define HAVE_PTHREAD_NP_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011911
Illia Bobyra96d5442023-08-30 16:30:15 +020011912else $as_nop
11913 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11914printf "%s\n" "no" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011915fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011916rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011917
Illia Bobyra96d5442023-08-30 16:30:15 +020011918ac_fn_c_check_header_compile "$LINENO" "strings.h" "ac_cv_header_strings_h" "$ac_includes_default"
11919if test "x$ac_cv_header_strings_h" = xyes
11920then :
11921 printf "%s\n" "#define HAVE_STRINGS_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011922
11923fi
11924
Bram Moolenaard0573012017-10-28 21:11:06 +020011925if test "x$MACOS_X" = "xyes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011926 printf "%s\n" "#define NO_STRINGS_WITH_STRING_H 1" >>confdefs.h
Bram Moolenaar9372a112005-12-06 19:59:18 +000011927
11928else
Bram Moolenaar071d4272004-06-13 20:20:40 +000011929
Illia Bobyra96d5442023-08-30 16:30:15 +020011930{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strings.h can be included after string.h" >&5
11931printf %s "checking if strings.h can be included after string.h... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011932cppflags_save=$CPPFLAGS
11933CPPFLAGS="$CPPFLAGS $X_CFLAGS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011934cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011935/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000011936
11937#if defined(_AIX) && !defined(_AIX51) && !defined(_NO_PROTO)
11938# define _NO_PROTO /* like in os_unix.h, causes conflict for AIX (Winn) */
11939 /* but don't do it on AIX 5.1 (Uribarri) */
11940#endif
11941#ifdef HAVE_XM_XM_H
11942# include <Xm/Xm.h> /* This breaks it for HP-UX 11 (Squassabia) */
11943#endif
11944#ifdef HAVE_STRING_H
11945# include <string.h>
11946#endif
11947#if defined(HAVE_STRINGS_H)
11948# include <strings.h>
11949#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000011950
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011951int
Illia Bobyra96d5442023-08-30 16:30:15 +020011952main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011953{
11954int i; i = 0;
11955 ;
11956 return 0;
11957}
11958_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011959if ac_fn_c_try_compile "$LINENO"
11960then :
11961 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11962printf "%s\n" "yes" >&6; }
11963else $as_nop
11964 printf "%s\n" "#define NO_STRINGS_WITH_STRING_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011965
Illia Bobyra96d5442023-08-30 16:30:15 +020011966 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11967printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011968fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011969rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000011970CPPFLAGS=$cppflags_save
Bram Moolenaar9372a112005-12-06 19:59:18 +000011971fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000011972
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011973if test $ac_cv_c_compiler_gnu = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011974 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5
11975printf %s "checking whether $CC needs -traditional... " >&6; }
11976if test ${ac_cv_prog_gcc_traditional+y}
11977then :
11978 printf %s "(cached) " >&6
11979else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000011980 ac_pattern="Autoconf.*'x'"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011982/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000011983#include <sgtty.h>
11984Autoconf TIOCGETP
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011985_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000011986if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Illia Bobyra96d5442023-08-30 16:30:15 +020011987 $EGREP "$ac_pattern" >/dev/null 2>&1
11988then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000011989 ac_cv_prog_gcc_traditional=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020011990else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000011991 ac_cv_prog_gcc_traditional=no
11992fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011993rm -rf conftest*
Bram Moolenaar071d4272004-06-13 20:20:40 +000011994
11995
11996 if test $ac_cv_prog_gcc_traditional = no; then
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011998/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000011999#include <termio.h>
12000Autoconf TCGETA
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012001_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000012002if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Illia Bobyra96d5442023-08-30 16:30:15 +020012003 $EGREP "$ac_pattern" >/dev/null 2>&1
12004then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012005 ac_cv_prog_gcc_traditional=yes
12006fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012007rm -rf conftest*
Bram Moolenaar071d4272004-06-13 20:20:40 +000012008
12009 fi
12010fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012011{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5
12012printf "%s\n" "$ac_cv_prog_gcc_traditional" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012013 if test $ac_cv_prog_gcc_traditional = yes; then
12014 CC="$CC -traditional"
12015 fi
12016fi
12017
Illia Bobyra96d5442023-08-30 16:30:15 +020012018{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12019printf %s "checking for an ANSI C-conforming const... " >&6; }
12020if test ${ac_cv_c_const+y}
12021then :
12022 printf %s "(cached) " >&6
12023else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012025/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012026
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012027int
Illia Bobyra96d5442023-08-30 16:30:15 +020012028main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012029{
Bram Moolenaar7db77842014-03-27 17:40:59 +010012030
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012031#ifndef __cplusplus
Bram Moolenaar7db77842014-03-27 17:40:59 +010012032 /* Ultrix mips cc rejects this sort of thing. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012033 typedef int charset[2];
Bram Moolenaar7db77842014-03-27 17:40:59 +010012034 const charset cs = { 0, 0 };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012035 /* SunOS 4.1.1 cc rejects this. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000012036 char const *const *pcpcc;
12037 char **ppc;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012038 /* NEC SVR4.0.2 mips cc rejects this. */
12039 struct point {int x, y;};
12040 static struct point const zero = {0,0};
Illia Bobyra96d5442023-08-30 16:30:15 +020012041 /* IBM XL C 1.02.0.0 rejects this.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012042 It does not let you subtract one const X* pointer from another in
12043 an arm of an if-expression whose if-part is not a constant
12044 expression */
12045 const char *g = "string";
Bram Moolenaar446cb832008-06-24 21:56:24 +000012046 pcpcc = &g + (g ? g-g : 0);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012047 /* HPUX 7.0 cc rejects these. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000012048 ++pcpcc;
12049 ppc = (char**) pcpcc;
12050 pcpcc = (char const *const *) ppc;
Bram Moolenaar7db77842014-03-27 17:40:59 +010012051 { /* SCO 3.2v4 cc rejects this sort of thing. */
12052 char tx;
12053 char *t = &tx;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012054 char const *s = 0 ? (char *) 0 : (char const *) 0;
Bram Moolenaar071d4272004-06-13 20:20:40 +000012055
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012056 *t++ = 0;
Bram Moolenaar446cb832008-06-24 21:56:24 +000012057 if (s) return 0;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012058 }
12059 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12060 int x[] = {25, 17};
12061 const int *foo = &x[0];
12062 ++foo;
12063 }
12064 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12065 typedef const int *iptr;
12066 iptr p = 0;
12067 ++p;
12068 }
Illia Bobyra96d5442023-08-30 16:30:15 +020012069 { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012070 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Bram Moolenaar7db77842014-03-27 17:40:59 +010012071 struct s { int j; const int *ap[3]; } bx;
12072 struct s *b = &bx; b->j = 5;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012073 }
12074 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12075 const int foo = 10;
Bram Moolenaar446cb832008-06-24 21:56:24 +000012076 if (!foo) return 0;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012077 }
Bram Moolenaar446cb832008-06-24 21:56:24 +000012078 return !cs[0] && !zero.x;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012079#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000012080
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012081 ;
12082 return 0;
Bram Moolenaar071d4272004-06-13 20:20:40 +000012083}
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012084_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012085if ac_fn_c_try_compile "$LINENO"
12086then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012087 ac_cv_c_const=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020012088else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012089 ac_cv_c_const=no
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012090fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012091rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012092fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012093{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12094printf "%s\n" "$ac_cv_c_const" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012095if test $ac_cv_c_const = no; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012096
Illia Bobyra96d5442023-08-30 16:30:15 +020012097printf "%s\n" "#define const /**/" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000012098
12099fi
12100
Illia Bobyra96d5442023-08-30 16:30:15 +020012101{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12102printf %s "checking for working volatile... " >&6; }
12103if test ${ac_cv_c_volatile+y}
12104then :
12105 printf %s "(cached) " >&6
12106else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012108/* end confdefs.h. */
12109
12110int
Illia Bobyra96d5442023-08-30 16:30:15 +020012111main (void)
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012112{
12113
12114volatile int x;
12115int * volatile y = (int *) 0;
12116return !x && !y;
12117 ;
12118 return 0;
12119}
12120_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012121if ac_fn_c_try_compile "$LINENO"
12122then :
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012123 ac_cv_c_volatile=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020012124else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012125 ac_cv_c_volatile=no
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012126fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012127rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012128fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012129{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5
12130printf "%s\n" "$ac_cv_c_volatile" >&6; }
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012131if test $ac_cv_c_volatile = no; then
12132
Illia Bobyra96d5442023-08-30 16:30:15 +020012133printf "%s\n" "#define volatile /**/" >>confdefs.h
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012134
12135fi
12136
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012137ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Illia Bobyra96d5442023-08-30 16:30:15 +020012138if test "x$ac_cv_type_mode_t" = xyes
12139then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012140
Illia Bobyra96d5442023-08-30 16:30:15 +020012141else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012142
Illia Bobyra96d5442023-08-30 16:30:15 +020012143printf "%s\n" "#define mode_t int" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012144
12145fi
12146
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012147ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Illia Bobyra96d5442023-08-30 16:30:15 +020012148if test "x$ac_cv_type_off_t" = xyes
12149then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012150
Illia Bobyra96d5442023-08-30 16:30:15 +020012151else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012152
Illia Bobyra96d5442023-08-30 16:30:15 +020012153printf "%s\n" "#define off_t long int" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012154
12155fi
12156
Bram Moolenaar071d4272004-06-13 20:20:40 +000012157
Illia Bobyra96d5442023-08-30 16:30:15 +020012158 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default
12159"
12160if test "x$ac_cv_type_pid_t" = xyes
12161then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012162
Illia Bobyra96d5442023-08-30 16:30:15 +020012163else $as_nop
12164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12165/* end confdefs.h. */
12166
12167 #if defined _WIN64 && !defined __CYGWIN__
12168 LLP64
12169 #endif
12170
12171int
12172main (void)
12173{
12174
12175 ;
12176 return 0;
12177}
12178
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012179_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012180if ac_fn_c_try_compile "$LINENO"
12181then :
12182 ac_pid_type='int'
12183else $as_nop
12184 ac_pid_type='__int64'
12185fi
12186rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
12187
12188printf "%s\n" "#define pid_t $ac_pid_type" >>confdefs.h
12189
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012190
12191fi
12192
Illia Bobyra96d5442023-08-30 16:30:15 +020012193
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012194ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Illia Bobyra96d5442023-08-30 16:30:15 +020012195if test "x$ac_cv_type_size_t" = xyes
12196then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012197
Illia Bobyra96d5442023-08-30 16:30:15 +020012198else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012199
Illia Bobyra96d5442023-08-30 16:30:15 +020012200printf "%s\n" "#define size_t unsigned int" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012201
12202fi
12203
Illia Bobyra96d5442023-08-30 16:30:15 +020012204{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
12205printf %s "checking for uid_t in sys/types.h... " >&6; }
12206if test ${ac_cv_type_uid_t+y}
12207then :
12208 printf %s "(cached) " >&6
12209else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012211/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012212#include <sys/types.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012213
12214_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000012215if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Illia Bobyra96d5442023-08-30 16:30:15 +020012216 $EGREP "uid_t" >/dev/null 2>&1
12217then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012218 ac_cv_type_uid_t=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020012219else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000012220 ac_cv_type_uid_t=no
12221fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012222rm -rf conftest*
Bram Moolenaar071d4272004-06-13 20:20:40 +000012223
12224fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012225{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
12226printf "%s\n" "$ac_cv_type_uid_t" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012227if test $ac_cv_type_uid_t = no; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000012228
Illia Bobyra96d5442023-08-30 16:30:15 +020012229printf "%s\n" "#define uid_t int" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012230
12231
Illia Bobyra96d5442023-08-30 16:30:15 +020012232printf "%s\n" "#define gid_t int" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000012233
12234fi
12235
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012236ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
12237case $ac_cv_c_uint32_t in #(
12238 no|yes) ;; #(
12239 *)
12240
Illia Bobyra96d5442023-08-30 16:30:15 +020012241printf "%s\n" "#define _UINT32_T 1" >>confdefs.h
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012242
12243
Illia Bobyra96d5442023-08-30 16:30:15 +020012244printf "%s\n" "#define uint32_t $ac_cv_c_uint32_t" >>confdefs.h
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012245;;
12246 esac
12247
Bram Moolenaarfa7584c2010-05-19 21:57:45 +020012248
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012249
Illia Bobyrf39842f2023-08-27 18:21:23 +020012250
12251
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012252ac_fn_c_check_type "$LINENO" "ino_t" "ac_cv_type_ino_t" "$ac_includes_default"
Illia Bobyra96d5442023-08-30 16:30:15 +020012253if test "x$ac_cv_type_ino_t" = xyes
12254then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012255
Illia Bobyra96d5442023-08-30 16:30:15 +020012256else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012257
Illia Bobyra96d5442023-08-30 16:30:15 +020012258printf "%s\n" "#define ino_t long" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012259
12260fi
12261
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012262ac_fn_c_check_type "$LINENO" "dev_t" "ac_cv_type_dev_t" "$ac_includes_default"
Illia Bobyra96d5442023-08-30 16:30:15 +020012263if test "x$ac_cv_type_dev_t" = xyes
12264then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012265
Illia Bobyra96d5442023-08-30 16:30:15 +020012266else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012267
Illia Bobyra96d5442023-08-30 16:30:15 +020012268printf "%s\n" "#define dev_t unsigned" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012269
12270fi
12271
Illia Bobyra96d5442023-08-30 16:30:15 +020012272 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12273printf %s "checking whether byte ordering is bigendian... " >&6; }
12274if test ${ac_cv_c_bigendian+y}
12275then :
12276 printf %s "(cached) " >&6
12277else $as_nop
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012278 ac_cv_c_bigendian=unknown
12279 # See if we're dealing with a universal compiler.
12280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12281/* end confdefs.h. */
12282#ifndef __APPLE_CC__
12283 not a universal capable compiler
12284 #endif
12285 typedef int dummy;
12286
12287_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012288if ac_fn_c_try_compile "$LINENO"
12289then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012290
12291 # Check for potential -arch flags. It is not universal unless
12292 # there are at least two -arch flags with different values.
12293 ac_arch=
12294 ac_prev=
12295 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12296 if test -n "$ac_prev"; then
12297 case $ac_word in
12298 i?86 | x86_64 | ppc | ppc64)
12299 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12300 ac_arch=$ac_word
12301 else
12302 ac_cv_c_bigendian=universal
12303 break
12304 fi
12305 ;;
12306 esac
12307 ac_prev=
12308 elif test "x$ac_word" = "x-arch"; then
12309 ac_prev=arch
12310 fi
12311 done
12312fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012313rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012314 if test $ac_cv_c_bigendian = unknown; then
12315 # See if sys/param.h defines the BYTE_ORDER macro.
12316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12317/* end confdefs.h. */
12318#include <sys/types.h>
12319 #include <sys/param.h>
12320
12321int
Illia Bobyra96d5442023-08-30 16:30:15 +020012322main (void)
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012323{
12324#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12325 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12326 && LITTLE_ENDIAN)
12327 bogus endian macros
12328 #endif
12329
12330 ;
12331 return 0;
12332}
12333_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012334if ac_fn_c_try_compile "$LINENO"
12335then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012336 # It does; now see whether it defined to BIG_ENDIAN or not.
12337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12338/* end confdefs.h. */
12339#include <sys/types.h>
12340 #include <sys/param.h>
12341
12342int
Illia Bobyra96d5442023-08-30 16:30:15 +020012343main (void)
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012344{
12345#if BYTE_ORDER != BIG_ENDIAN
12346 not big endian
12347 #endif
12348
12349 ;
12350 return 0;
12351}
12352_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012353if ac_fn_c_try_compile "$LINENO"
12354then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012355 ac_cv_c_bigendian=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020012356else $as_nop
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012357 ac_cv_c_bigendian=no
12358fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012359rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012360fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012361rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012362 fi
12363 if test $ac_cv_c_bigendian = unknown; then
12364 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12366/* end confdefs.h. */
12367#include <limits.h>
12368
12369int
Illia Bobyra96d5442023-08-30 16:30:15 +020012370main (void)
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012371{
12372#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12373 bogus endian macros
12374 #endif
12375
12376 ;
12377 return 0;
12378}
12379_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012380if ac_fn_c_try_compile "$LINENO"
12381then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012382 # It does; now see whether it defined to _BIG_ENDIAN or not.
12383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12384/* end confdefs.h. */
12385#include <limits.h>
12386
12387int
Illia Bobyra96d5442023-08-30 16:30:15 +020012388main (void)
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012389{
12390#ifndef _BIG_ENDIAN
12391 not big endian
12392 #endif
12393
12394 ;
12395 return 0;
12396}
12397_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012398if ac_fn_c_try_compile "$LINENO"
12399then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012400 ac_cv_c_bigendian=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020012401else $as_nop
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012402 ac_cv_c_bigendian=no
12403fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012404rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012405fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012406rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012407 fi
12408 if test $ac_cv_c_bigendian = unknown; then
12409 # Compile a test program.
Illia Bobyra96d5442023-08-30 16:30:15 +020012410 if test "$cross_compiling" = yes
12411then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012412 # Try to guess by grepping values from an object file.
12413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12414/* end confdefs.h. */
Illia Bobyra96d5442023-08-30 16:30:15 +020012415unsigned short int ascii_mm[] =
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012416 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
Illia Bobyra96d5442023-08-30 16:30:15 +020012417 unsigned short int ascii_ii[] =
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012418 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12419 int use_ascii (int i) {
12420 return ascii_mm[i] + ascii_ii[i];
12421 }
Illia Bobyra96d5442023-08-30 16:30:15 +020012422 unsigned short int ebcdic_ii[] =
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012423 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
Illia Bobyra96d5442023-08-30 16:30:15 +020012424 unsigned short int ebcdic_mm[] =
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012425 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12426 int use_ebcdic (int i) {
12427 return ebcdic_mm[i] + ebcdic_ii[i];
12428 }
12429 extern int foo;
12430
12431int
Illia Bobyra96d5442023-08-30 16:30:15 +020012432main (void)
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012433{
12434return use_ascii (foo) == use_ebcdic (foo);
12435 ;
12436 return 0;
12437}
12438_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012439if ac_fn_c_try_compile "$LINENO"
12440then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012441 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12442 ac_cv_c_bigendian=yes
12443 fi
12444 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12445 if test "$ac_cv_c_bigendian" = unknown; then
12446 ac_cv_c_bigendian=no
12447 else
12448 # finding both strings is unlikely to happen, but who knows?
12449 ac_cv_c_bigendian=unknown
12450 fi
12451 fi
12452fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012453rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
12454else $as_nop
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12456/* end confdefs.h. */
12457$ac_includes_default
12458int
Illia Bobyra96d5442023-08-30 16:30:15 +020012459main (void)
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012460{
12461
12462 /* Are we little or big endian? From Harbison&Steele. */
12463 union
12464 {
12465 long int l;
12466 char c[sizeof (long int)];
12467 } u;
12468 u.l = 1;
12469 return u.c[sizeof (long int) - 1] == 1;
12470
12471 ;
12472 return 0;
12473}
12474_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012475if ac_fn_c_try_run "$LINENO"
12476then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012477 ac_cv_c_bigendian=no
Illia Bobyra96d5442023-08-30 16:30:15 +020012478else $as_nop
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012479 ac_cv_c_bigendian=yes
12480fi
12481rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12482 conftest.$ac_objext conftest.beam conftest.$ac_ext
12483fi
12484
12485 fi
12486fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012487{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12488printf "%s\n" "$ac_cv_c_bigendian" >&6; }
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012489 case $ac_cv_c_bigendian in #(
12490 yes)
Illia Bobyra96d5442023-08-30 16:30:15 +020012491 printf "%s\n" "#define WORDS_BIGENDIAN 1" >>confdefs.h
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012492;; #(
12493 no)
12494 ;; #(
12495 universal)
12496
Illia Bobyra96d5442023-08-30 16:30:15 +020012497printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012498
12499 ;; #(
12500 *)
Bram Moolenaar7db77842014-03-27 17:40:59 +010012501 as_fn_error $? "unknown endianness
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012502 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12503 esac
12504
Illia Bobyra96d5442023-08-30 16:30:15 +020012505{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
12506printf %s "checking for inline... " >&6; }
12507if test ${ac_cv_c_inline+y}
12508then :
12509 printf %s "(cached) " >&6
12510else $as_nop
Bram Moolenaar136f29a2016-02-27 20:14:15 +010012511 ac_cv_c_inline=no
12512for ac_kw in inline __inline__ __inline; do
12513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12514/* end confdefs.h. */
12515#ifndef __cplusplus
12516typedef int foo_t;
Illia Bobyra96d5442023-08-30 16:30:15 +020012517static $ac_kw foo_t static_foo (void) {return 0; }
12518$ac_kw foo_t foo (void) {return 0; }
Bram Moolenaar136f29a2016-02-27 20:14:15 +010012519#endif
12520
12521_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012522if ac_fn_c_try_compile "$LINENO"
12523then :
Bram Moolenaar136f29a2016-02-27 20:14:15 +010012524 ac_cv_c_inline=$ac_kw
12525fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012526rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar136f29a2016-02-27 20:14:15 +010012527 test "$ac_cv_c_inline" != no && break
12528done
12529
12530fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012531{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
12532printf "%s\n" "$ac_cv_c_inline" >&6; }
Bram Moolenaar136f29a2016-02-27 20:14:15 +010012533
12534case $ac_cv_c_inline in
12535 inline | yes) ;;
12536 *)
12537 case $ac_cv_c_inline in
12538 no) ac_val=;;
12539 *) ac_val=$ac_cv_c_inline;;
12540 esac
12541 cat >>confdefs.h <<_ACEOF
12542#ifndef __cplusplus
12543#define inline $ac_val
12544#endif
12545_ACEOF
12546 ;;
12547esac
12548
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012549
Illia Bobyra96d5442023-08-30 16:30:15 +020012550{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for rlim_t" >&5
12551printf %s "checking for rlim_t... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012552if eval "test \"`echo '$''{'ac_cv_type_rlim_t'+set}'`\" = set"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012553 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: (cached) $ac_cv_type_rlim_t" >&5
12554printf "%s\n" "(cached) $ac_cv_type_rlim_t" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012555else
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012557/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012558
12559#include <sys/types.h>
12560#if STDC_HEADERS
Bram Moolenaar446cb832008-06-24 21:56:24 +000012561# include <stdlib.h>
12562# include <stddef.h>
Bram Moolenaar071d4272004-06-13 20:20:40 +000012563#endif
12564#ifdef HAVE_SYS_RESOURCE_H
Bram Moolenaar446cb832008-06-24 21:56:24 +000012565# include <sys/resource.h>
Bram Moolenaar071d4272004-06-13 20:20:40 +000012566#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012567
12568_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000012569if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Illia Bobyra96d5442023-08-30 16:30:15 +020012570 $EGREP "(^|[^a-zA-Z_0-9])rlim_t[^a-zA-Z_0-9]" >/dev/null 2>&1
12571then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012572 ac_cv_type_rlim_t=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020012573else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000012574 ac_cv_type_rlim_t=no
12575fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012576rm -rf conftest*
Bram Moolenaar071d4272004-06-13 20:20:40 +000012577
Illia Bobyra96d5442023-08-30 16:30:15 +020012578 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_rlim_t" >&5
12579printf "%s\n" "$ac_cv_type_rlim_t" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012580fi
12581if test $ac_cv_type_rlim_t = no; then
12582 cat >> confdefs.h <<\EOF
12583#define rlim_t unsigned long
12584EOF
12585fi
12586
Illia Bobyra96d5442023-08-30 16:30:15 +020012587{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stack_t" >&5
12588printf %s "checking for stack_t... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012589if eval "test \"`echo '$''{'ac_cv_type_stack_t'+set}'`\" = set"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012590 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: (cached) $ac_cv_type_stack_t" >&5
12591printf "%s\n" "(cached) $ac_cv_type_stack_t" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012592else
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012594/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012595
12596#include <sys/types.h>
12597#if STDC_HEADERS
Bram Moolenaar446cb832008-06-24 21:56:24 +000012598# include <stdlib.h>
12599# include <stddef.h>
Bram Moolenaar071d4272004-06-13 20:20:40 +000012600#endif
12601#include <signal.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012602
12603_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000012604if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Illia Bobyra96d5442023-08-30 16:30:15 +020012605 $EGREP "stack_t" >/dev/null 2>&1
12606then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012607 ac_cv_type_stack_t=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020012608else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000012609 ac_cv_type_stack_t=no
12610fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012611rm -rf conftest*
Bram Moolenaar071d4272004-06-13 20:20:40 +000012612
Illia Bobyra96d5442023-08-30 16:30:15 +020012613 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_stack_t" >&5
12614printf "%s\n" "$ac_cv_type_stack_t" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012615fi
12616if test $ac_cv_type_stack_t = no; then
12617 cat >> confdefs.h <<\EOF
12618#define stack_t struct sigaltstack
12619EOF
12620fi
12621
Illia Bobyra96d5442023-08-30 16:30:15 +020012622{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stack_t has an ss_base field" >&5
12623printf %s "checking whether stack_t has an ss_base field... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012624cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012625/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012626
12627#include <sys/types.h>
12628#if STDC_HEADERS
Bram Moolenaar446cb832008-06-24 21:56:24 +000012629# include <stdlib.h>
12630# include <stddef.h>
Bram Moolenaar071d4272004-06-13 20:20:40 +000012631#endif
12632#include <signal.h>
12633#include "confdefs.h"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012634
12635int
Illia Bobyra96d5442023-08-30 16:30:15 +020012636main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012637{
12638stack_t sigstk; sigstk.ss_base = 0;
12639 ;
12640 return 0;
12641}
12642_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012643if ac_fn_c_try_compile "$LINENO"
12644then :
12645 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12646printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SS_BASE 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000012647
Illia Bobyra96d5442023-08-30 16:30:15 +020012648else $as_nop
12649 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12650printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012651fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012652rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000012653
12654olibs="$LIBS"
Illia Bobyra96d5442023-08-30 16:30:15 +020012655{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-tlib argument" >&5
12656printf %s "checking --with-tlib argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012657
Bram Moolenaar446cb832008-06-24 21:56:24 +000012658# Check whether --with-tlib was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020012659if test ${with_tlib+y}
12660then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000012661 withval=$with_tlib;
12662fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000012663
12664if test -n "$with_tlib"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012665 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_tlib" >&5
12666printf "%s\n" "$with_tlib" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012667 LIBS="$LIBS -l$with_tlib"
Illia Bobyra96d5442023-08-30 16:30:15 +020012668 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for linking with $with_tlib library" >&5
12669printf %s "checking for linking with $with_tlib library... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012671/* end confdefs.h. */
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000012672
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012673int
Illia Bobyra96d5442023-08-30 16:30:15 +020012674main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012675{
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000012676
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012677 ;
12678 return 0;
12679}
12680_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012681if ac_fn_c_try_link "$LINENO"
12682then :
12683 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: OK" >&5
12684printf "%s\n" "OK" >&6; }
12685else $as_nop
Bram Moolenaar7db77842014-03-27 17:40:59 +010012686 as_fn_error $? "FAILED" "$LINENO" 5
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000012687fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012688rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012689 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000012690 olibs="$LIBS"
12691else
Illia Bobyra96d5442023-08-30 16:30:15 +020012692 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: empty: automatic terminal library selection" >&5
12693printf "%s\n" "empty: automatic terminal library selection" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +000012694 case "$vim_cv_uname_output" in
Bram Moolenaar4e509b62011-02-09 17:42:57 +010012695 OSF1|SCO_SV) tlibs="tinfo ncurses curses termlib termcap";;
12696 *) tlibs="tinfo ncurses termlib termcap curses";;
Bram Moolenaar071d4272004-06-13 20:20:40 +000012697 esac
12698 for libname in $tlibs; do
Illia Bobyra96d5442023-08-30 16:30:15 +020012699 as_ac_Lib=`printf "%s\n" "ac_cv_lib_${libname}""_tgetent" | $as_tr_sh`
12700{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tgetent in -l${libname}" >&5
12701printf %s "checking for tgetent in -l${libname}... " >&6; }
12702if eval test \${$as_ac_Lib+y}
12703then :
12704 printf %s "(cached) " >&6
12705else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012706 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000012707LIBS="-l${libname} $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012708cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012709/* end confdefs.h. */
12710
Bram Moolenaar446cb832008-06-24 21:56:24 +000012711/* Override any GCC internal prototype to avoid an error.
12712 Use char because int might match the return type of a GCC
12713 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012714char tgetent ();
12715int
Illia Bobyra96d5442023-08-30 16:30:15 +020012716main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012717{
Bram Moolenaar446cb832008-06-24 21:56:24 +000012718return tgetent ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012719 ;
12720 return 0;
12721}
12722_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012723if ac_fn_c_try_link "$LINENO"
12724then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012725 eval "$as_ac_Lib=yes"
Illia Bobyra96d5442023-08-30 16:30:15 +020012726else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012727 eval "$as_ac_Lib=no"
Bram Moolenaar071d4272004-06-13 20:20:40 +000012728fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012729rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012730 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012731LIBS=$ac_check_lib_save_LIBS
12732fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012733eval ac_res=\$$as_ac_Lib
Illia Bobyra96d5442023-08-30 16:30:15 +020012734 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12735printf "%s\n" "$ac_res" >&6; }
12736if eval test \"x\$"$as_ac_Lib"\" = x"yes"
12737then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012738 cat >>confdefs.h <<_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012739#define `printf "%s\n" "HAVE_LIB${libname}" | $as_tr_cpp` 1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012740_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000012741
12742 LIBS="-l${libname} $LIBS"
12743
Bram Moolenaar071d4272004-06-13 20:20:40 +000012744fi
12745
12746 if test "x$olibs" != "x$LIBS"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012747 if test "$cross_compiling" = yes
12748then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012749 res="FAIL"
Illia Bobyra96d5442023-08-30 16:30:15 +020012750else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012752/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012753
12754#ifdef HAVE_TERMCAP_H
12755# include <termcap.h>
12756#endif
Bram Moolenaar446cb832008-06-24 21:56:24 +000012757#if STDC_HEADERS
12758# include <stdlib.h>
12759# include <stddef.h>
12760#endif
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010012761int main() {char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(0); }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012762_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012763if ac_fn_c_try_run "$LINENO"
12764then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012765 res="OK"
Illia Bobyra96d5442023-08-30 16:30:15 +020012766else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012767 res="FAIL"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012768fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012769rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12770 conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012771fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000012772
Bram Moolenaar071d4272004-06-13 20:20:40 +000012773 if test "$res" = "OK"; then
12774 break
12775 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012776 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libname library is not usable" >&5
12777printf "%s\n" "$libname library is not usable" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012778 LIBS="$olibs"
12779 fi
12780 done
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000012781 if test "x$olibs" = "x$LIBS"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012782 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no terminal library found" >&5
12783printf "%s\n" "no terminal library found" >&6; }
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000012784 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000012785fi
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000012786
12787if test "x$olibs" = "x$LIBS"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012788 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tgetent()" >&5
12789printf %s "checking for tgetent()... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012791/* end confdefs.h. */
Bram Moolenaarbd7f7c12020-07-28 21:03:37 +020012792int tgetent(char *, const char *);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012793int
Illia Bobyra96d5442023-08-30 16:30:15 +020012794main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012795{
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000012796char s[10000]; int res = tgetent(s, "thisterminaldoesnotexist");
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012797 ;
12798 return 0;
12799}
12800_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012801if ac_fn_c_try_link "$LINENO"
12802then :
12803 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12804printf "%s\n" "yes" >&6; }
12805else $as_nop
Bram Moolenaar7db77842014-03-27 17:40:59 +010012806 as_fn_error $? "NOT FOUND!
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000012807 You need to install a terminal library; for example ncurses.
Bram Moolenaar16678eb2021-04-21 11:57:59 +020012808 On Linux that would be the libncurses-dev package.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012809 Or specify the name of the library with --with-tlib." "$LINENO" 5
12810fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012811rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012812 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000012813fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000012814
Illia Bobyra96d5442023-08-30 16:30:15 +020012815{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we talk terminfo" >&5
12816printf %s "checking whether we talk terminfo... " >&6; }
12817if test ${vim_cv_terminfo+y}
12818then :
12819 printf %s "(cached) " >&6
12820else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000012821
Illia Bobyra96d5442023-08-30 16:30:15 +020012822 if test "$cross_compiling" = yes
12823then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000012824
Bram Moolenaar7db77842014-03-27 17:40:59 +010012825 as_fn_error $? "cross-compiling: please set 'vim_cv_terminfo'" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000012826
Illia Bobyra96d5442023-08-30 16:30:15 +020012827else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12829/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012830
Bram Moolenaar446cb832008-06-24 21:56:24 +000012831#include "confdefs.h"
Bram Moolenaar071d4272004-06-13 20:20:40 +000012832#ifdef HAVE_TERMCAP_H
12833# include <termcap.h>
12834#endif
Bram Moolenaar446cb832008-06-24 21:56:24 +000012835#ifdef HAVE_STRING_H
12836# include <string.h>
12837#endif
12838#if STDC_HEADERS
12839# include <stdlib.h>
12840# include <stddef.h>
12841#endif
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010012842int main()
Bram Moolenaar071d4272004-06-13 20:20:40 +000012843{char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(!strcmp(s==0 ? "" : s, "1")); }
Bram Moolenaar446cb832008-06-24 21:56:24 +000012844
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012845_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012846if ac_fn_c_try_run "$LINENO"
12847then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000012848
12849 vim_cv_terminfo=no
12850
Illia Bobyra96d5442023-08-30 16:30:15 +020012851else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000012852
12853 vim_cv_terminfo=yes
12854
12855fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012856rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12857 conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000012858fi
12859
12860
Bram Moolenaar446cb832008-06-24 21:56:24 +000012861fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012862{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_terminfo" >&5
12863printf "%s\n" "$vim_cv_terminfo" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000012864
12865if test "x$vim_cv_terminfo" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012866 printf "%s\n" "#define TERMINFO 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000012867
12868fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000012869
Illia Bobyra96d5442023-08-30 16:30:15 +020012870{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking what tgetent() returns for an unknown terminal" >&5
12871printf %s "checking what tgetent() returns for an unknown terminal... " >&6; }
12872if test ${vim_cv_tgetent+y}
12873then :
12874 printf %s "(cached) " >&6
12875else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000012876
Illia Bobyra96d5442023-08-30 16:30:15 +020012877 if test "$cross_compiling" = yes
12878then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000012879
Bram Moolenaar696cbd22017-04-28 15:45:46 +020012880 as_fn_error $? "failed to compile test program." "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000012881
Illia Bobyra96d5442023-08-30 16:30:15 +020012882else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12884/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012885
Bram Moolenaar446cb832008-06-24 21:56:24 +000012886#include "confdefs.h"
Bram Moolenaar071d4272004-06-13 20:20:40 +000012887#ifdef HAVE_TERMCAP_H
12888# include <termcap.h>
12889#endif
Bram Moolenaar446cb832008-06-24 21:56:24 +000012890#if STDC_HEADERS
12891# include <stdlib.h>
12892# include <stddef.h>
12893#endif
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010012894int main()
Bram Moolenaar071d4272004-06-13 20:20:40 +000012895{char s[10000]; int res = tgetent(s, "thisterminaldoesnotexist"); exit(res != 0); }
Bram Moolenaar446cb832008-06-24 21:56:24 +000012896
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012897_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012898if ac_fn_c_try_run "$LINENO"
12899then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000012900
Bram Moolenaara88254f2017-11-02 23:04:14 +010012901 vim_cv_tgetent=zero
Bram Moolenaar071d4272004-06-13 20:20:40 +000012902
Illia Bobyra96d5442023-08-30 16:30:15 +020012903else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000012904
Bram Moolenaara88254f2017-11-02 23:04:14 +010012905 vim_cv_tgetent=non-zero
Bram Moolenaar446cb832008-06-24 21:56:24 +000012906
Bram Moolenaar071d4272004-06-13 20:20:40 +000012907fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012908rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12909 conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000012910fi
12911
Bram Moolenaar446cb832008-06-24 21:56:24 +000012912
Bram Moolenaar446cb832008-06-24 21:56:24 +000012913fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012914{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_tgetent" >&5
12915printf "%s\n" "$vim_cv_tgetent" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000012916
Bram Moolenaara88254f2017-11-02 23:04:14 +010012917if test "x$vim_cv_tgetent" = "xzero" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012918 printf "%s\n" "#define TGETENT_ZERO_ERR 0" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000012919
Bram Moolenaar446cb832008-06-24 21:56:24 +000012920fi
12921
Illia Bobyra96d5442023-08-30 16:30:15 +020012922{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether termcap.h contains ospeed" >&5
12923printf %s "checking whether termcap.h contains ospeed... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012924cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012925/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012926
12927#ifdef HAVE_TERMCAP_H
12928# include <termcap.h>
12929#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012930
12931int
Illia Bobyra96d5442023-08-30 16:30:15 +020012932main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012933{
Bram Moolenaar071d4272004-06-13 20:20:40 +000012934ospeed = 20000
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012935 ;
12936 return 0;
12937}
12938_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012939if ac_fn_c_try_link "$LINENO"
12940then :
12941 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12942printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_OSPEED 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000012943
Illia Bobyra96d5442023-08-30 16:30:15 +020012944else $as_nop
12945 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12946printf "%s\n" "no" >&6; }
12947 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ospeed can be extern" >&5
12948printf %s "checking whether ospeed can be extern... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012950/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012951
12952#ifdef HAVE_TERMCAP_H
12953# include <termcap.h>
12954#endif
12955extern short ospeed;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012956
12957int
Illia Bobyra96d5442023-08-30 16:30:15 +020012958main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012959{
Bram Moolenaar071d4272004-06-13 20:20:40 +000012960ospeed = 20000
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012961 ;
12962 return 0;
12963}
12964_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012965if ac_fn_c_try_link "$LINENO"
12966then :
12967 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12968printf "%s\n" "yes" >&6; }; printf "%s\n" "#define OSPEED_EXTERN 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000012969
Illia Bobyra96d5442023-08-30 16:30:15 +020012970else $as_nop
12971 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12972printf "%s\n" "no" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012973fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012974rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012975 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012976
12977fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012978rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012979 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000012980
Illia Bobyra96d5442023-08-30 16:30:15 +020012981{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether termcap.h contains UP, BC and PC" >&5
12982printf %s "checking whether termcap.h contains UP, BC and PC... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012983cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012984/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012985
12986#ifdef HAVE_TERMCAP_H
12987# include <termcap.h>
12988#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012989
12990int
Illia Bobyra96d5442023-08-30 16:30:15 +020012991main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012992{
Bram Moolenaar071d4272004-06-13 20:20:40 +000012993if (UP == 0 && BC == 0) PC = 1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012994 ;
12995 return 0;
12996}
12997_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012998if ac_fn_c_try_link "$LINENO"
12999then :
13000 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13001printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_UP_BC_PC 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013002
Illia Bobyra96d5442023-08-30 16:30:15 +020013003else $as_nop
13004 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13005printf "%s\n" "no" >&6; }
13006 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether UP, BC and PC can be extern" >&5
13007printf %s "checking whether UP, BC and PC can be extern... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013009/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013010
13011#ifdef HAVE_TERMCAP_H
13012# include <termcap.h>
13013#endif
13014extern char *UP, *BC, PC;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013015
13016int
Illia Bobyra96d5442023-08-30 16:30:15 +020013017main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013018{
Bram Moolenaar071d4272004-06-13 20:20:40 +000013019if (UP == 0 && BC == 0) PC = 1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013020 ;
13021 return 0;
13022}
13023_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013024if ac_fn_c_try_link "$LINENO"
13025then :
13026 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13027printf "%s\n" "yes" >&6; }; printf "%s\n" "#define UP_BC_PC_EXTERN 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013028
Illia Bobyra96d5442023-08-30 16:30:15 +020013029else $as_nop
13030 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13031printf "%s\n" "no" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013032fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013033rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013034 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013035
13036fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013037rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013038 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000013039
Illia Bobyra96d5442023-08-30 16:30:15 +020013040{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether tputs() uses outfuntype" >&5
13041printf %s "checking whether tputs() uses outfuntype... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013042cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013043/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013044
13045#ifdef HAVE_TERMCAP_H
13046# include <termcap.h>
13047#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013048
13049int
Illia Bobyra96d5442023-08-30 16:30:15 +020013050main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013051{
Bram Moolenaar071d4272004-06-13 20:20:40 +000013052extern int xx(); tputs("test", 1, (outfuntype)xx)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013053 ;
13054 return 0;
13055}
13056_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013057if ac_fn_c_try_compile "$LINENO"
13058then :
13059 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13060printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_OUTFUNTYPE 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013061
Illia Bobyra96d5442023-08-30 16:30:15 +020013062else $as_nop
13063 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13064printf "%s\n" "no" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013065fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013066rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000013067
Illia Bobyra96d5442023-08-30 16:30:15 +020013068{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether del_curterm() can be used" >&5
13069printf %s "checking whether del_curterm() can be used... " >&6; }
Bram Moolenaarb3a29552021-11-19 11:28:04 +000013070cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13071/* end confdefs.h. */
13072
13073#ifdef HAVE_TERMCAP_H
13074# include <termcap.h>
13075#endif
13076#include <term.h>
13077
13078int
Illia Bobyra96d5442023-08-30 16:30:15 +020013079main (void)
Bram Moolenaarb3a29552021-11-19 11:28:04 +000013080{
13081if (cur_term) del_curterm(cur_term);
13082 ;
13083 return 0;
13084}
13085_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013086if ac_fn_c_try_link "$LINENO"
13087then :
13088 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13089printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_DEL_CURTERM 1" >>confdefs.h
Bram Moolenaarb3a29552021-11-19 11:28:04 +000013090
Illia Bobyra96d5442023-08-30 16:30:15 +020013091else $as_nop
13092 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13093printf "%s\n" "no" >&6; }
Bram Moolenaarb3a29552021-11-19 11:28:04 +000013094fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013095rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarb3a29552021-11-19 11:28:04 +000013096 conftest$ac_exeext conftest.$ac_ext
13097
Illia Bobyra96d5442023-08-30 16:30:15 +020013098{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13099printf %s "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013100cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013101/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013102
13103#include <sys/types.h>
13104#include <sys/time.h>
13105#include <sys/select.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013106int
Illia Bobyra96d5442023-08-30 16:30:15 +020013107main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013108{
Bram Moolenaar071d4272004-06-13 20:20:40 +000013109
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013110 ;
13111 return 0;
13112}
13113_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013114if ac_fn_c_try_compile "$LINENO"
13115then :
13116 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13117printf "%s\n" "yes" >&6; }
13118 printf "%s\n" "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013119
Illia Bobyra96d5442023-08-30 16:30:15 +020013120else $as_nop
13121 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13122printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013123fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013124rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000013125
Illia Bobyra96d5442023-08-30 16:30:15 +020013126{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13127printf %s "checking for /dev/ptc... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013128if test -r /dev/ptc; then
Illia Bobyra96d5442023-08-30 16:30:15 +020013129 printf "%s\n" "#define HAVE_DEV_PTC 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013130
Illia Bobyra96d5442023-08-30 16:30:15 +020013131 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13132printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013133else
Illia Bobyra96d5442023-08-30 16:30:15 +020013134 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13135printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013136fi
13137
Illia Bobyra96d5442023-08-30 16:30:15 +020013138{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SVR4 ptys" >&5
13139printf %s "checking for SVR4 ptys... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013140if test -c /dev/ptmx ; then
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013142/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013143
Bram Moolenaarce7be3a2020-11-26 20:11:11 +010013144// These should be in stdlib.h, but it depends on _XOPEN_SOURCE.
13145char *ptsname(int);
13146int unlockpt(int);
13147int grantpt(int);
13148
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013149int
Illia Bobyra96d5442023-08-30 16:30:15 +020013150main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013151{
Bram Moolenaarce7be3a2020-11-26 20:11:11 +010013152
13153 ptsname(0);
13154 grantpt(0);
13155 unlockpt(0);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013156 ;
13157 return 0;
13158}
13159_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013160if ac_fn_c_try_link "$LINENO"
13161then :
13162 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13163printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SVR4_PTYS 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013164
Illia Bobyra96d5442023-08-30 16:30:15 +020013165else $as_nop
13166 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13167printf "%s\n" "no" >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013168fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013169rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013170 conftest$ac_exeext conftest.$ac_ext
13171else
Illia Bobyra96d5442023-08-30 16:30:15 +020013172 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13173printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013174fi
13175
Illia Bobyra96d5442023-08-30 16:30:15 +020013176{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ptyranges" >&5
13177printf %s "checking for ptyranges... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013178if test -d /dev/ptym ; then
13179 pdir='/dev/ptym'
13180else
13181 pdir='/dev'
13182fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013183cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013184/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013185#ifdef M_UNIX
13186 yes;
13187#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013188
13189_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000013190if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Illia Bobyra96d5442023-08-30 16:30:15 +020013191 $EGREP "yes" >/dev/null 2>&1
13192then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000013193 ptys=`echo /dev/ptyp??`
Illia Bobyra96d5442023-08-30 16:30:15 +020013194else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000013195 ptys=`echo $pdir/pty??`
13196fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013197rm -rf conftest*
Bram Moolenaar071d4272004-06-13 20:20:40 +000013198
13199if test "$ptys" != "$pdir/pty??" ; then
13200 p0=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\).$/\1/g' | sort -u | tr -d '\012'`
13201 p1=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\)$/\1/g' | sort -u | tr -d '\012'`
Illia Bobyra96d5442023-08-30 16:30:15 +020013202 printf "%s\n" "#define PTYRANGE0 \"$p0\"" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013203
Illia Bobyra96d5442023-08-30 16:30:15 +020013204 printf "%s\n" "#define PTYRANGE1 \"$p1\"" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013205
Illia Bobyra96d5442023-08-30 16:30:15 +020013206 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $p0 / $p1" >&5
13207printf "%s\n" "$p0 / $p1" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013208else
Illia Bobyra96d5442023-08-30 16:30:15 +020013209 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: don't know" >&5
13210printf "%s\n" "don't know" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013211fi
13212
Bram Moolenaar446cb832008-06-24 21:56:24 +000013213
Illia Bobyra96d5442023-08-30 16:30:15 +020013214{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct sigcontext" >&5
13215printf %s "checking for struct sigcontext... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013216cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013217/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013218
13219#include <signal.h>
Sam Jamesf8ea1062022-11-05 15:13:50 +000013220int test_sig()
Bram Moolenaar071d4272004-06-13 20:20:40 +000013221{
13222 struct sigcontext *scont;
13223 scont = (struct sigcontext *)0;
13224 return 1;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013225}
13226int
Illia Bobyra96d5442023-08-30 16:30:15 +020013227main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013228{
Bram Moolenaar071d4272004-06-13 20:20:40 +000013229
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013230 ;
13231 return 0;
13232}
13233_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013234if ac_fn_c_try_compile "$LINENO"
13235then :
13236 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13237printf "%s\n" "yes" >&6; }
13238 printf "%s\n" "#define HAVE_SIGCONTEXT 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013239
Illia Bobyra96d5442023-08-30 16:30:15 +020013240else $as_nop
13241 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13242printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013243fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013244rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000013245
Illia Bobyra96d5442023-08-30 16:30:15 +020013246{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking getcwd implementation is broken" >&5
13247printf %s "checking getcwd implementation is broken... " >&6; }
13248if test ${vim_cv_getcwd_broken+y}
13249then :
13250 printf %s "(cached) " >&6
13251else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000013252
Illia Bobyra96d5442023-08-30 16:30:15 +020013253 if test "$cross_compiling" = yes
13254then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000013255
Bram Moolenaar7db77842014-03-27 17:40:59 +010013256 as_fn_error $? "cross-compiling: please set 'vim_cv_getcwd_broken'" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000013257
Illia Bobyra96d5442023-08-30 16:30:15 +020013258else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13260/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013261
Bram Moolenaar446cb832008-06-24 21:56:24 +000013262#include "confdefs.h"
13263#ifdef HAVE_UNISTD_H
13264#include <unistd.h>
13265#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000013266char *dagger[] = { "IFS=pwd", 0 };
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010013267int main()
Bram Moolenaar071d4272004-06-13 20:20:40 +000013268{
13269 char buffer[500];
13270 extern char **environ;
13271 environ = dagger;
13272 return getcwd(buffer, 500) ? 0 : 1;
13273}
Bram Moolenaar446cb832008-06-24 21:56:24 +000013274
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013275_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013276if ac_fn_c_try_run "$LINENO"
13277then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000013278
13279 vim_cv_getcwd_broken=no
13280
Illia Bobyra96d5442023-08-30 16:30:15 +020013281else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000013282
13283 vim_cv_getcwd_broken=yes
13284
13285fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013286rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13287 conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000013288fi
13289
13290
Bram Moolenaar446cb832008-06-24 21:56:24 +000013291fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013292{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_getcwd_broken" >&5
13293printf "%s\n" "$vim_cv_getcwd_broken" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000013294
13295if test "x$vim_cv_getcwd_broken" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020013296 printf "%s\n" "#define BAD_GETCWD 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013297
Bram Moolenaar63d25552019-05-10 21:28:38 +020013298 ac_fn_c_check_func "$LINENO" "getwd" "ac_cv_func_getwd"
Illia Bobyra96d5442023-08-30 16:30:15 +020013299if test "x$ac_cv_func_getwd" = xyes
13300then :
13301 printf "%s\n" "#define HAVE_GETWD 1" >>confdefs.h
Bram Moolenaar63d25552019-05-10 21:28:38 +020013302
Bram Moolenaar071d4272004-06-13 20:20:40 +000013303fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000013304
Illia Bobyra96d5442023-08-30 16:30:15 +020013305fi
13306
13307ac_fn_c_check_func "$LINENO" "fchdir" "ac_cv_func_fchdir"
13308if test "x$ac_cv_func_fchdir" = xyes
13309then :
13310 printf "%s\n" "#define HAVE_FCHDIR 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013311
Bram Moolenaar071d4272004-06-13 20:20:40 +000013312fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013313ac_fn_c_check_func "$LINENO" "fchown" "ac_cv_func_fchown"
13314if test "x$ac_cv_func_fchown" = xyes
13315then :
13316 printf "%s\n" "#define HAVE_FCHOWN 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013317
Illia Bobyra96d5442023-08-30 16:30:15 +020013318fi
13319ac_fn_c_check_func "$LINENO" "fchmod" "ac_cv_func_fchmod"
13320if test "x$ac_cv_func_fchmod" = xyes
13321then :
13322 printf "%s\n" "#define HAVE_FCHMOD 1" >>confdefs.h
13323
13324fi
13325ac_fn_c_check_func "$LINENO" "fsync" "ac_cv_func_fsync"
13326if test "x$ac_cv_func_fsync" = xyes
13327then :
13328 printf "%s\n" "#define HAVE_FSYNC 1" >>confdefs.h
13329
13330fi
13331ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
13332if test "x$ac_cv_func_getcwd" = xyes
13333then :
13334 printf "%s\n" "#define HAVE_GETCWD 1" >>confdefs.h
13335
13336fi
13337ac_fn_c_check_func "$LINENO" "getpseudotty" "ac_cv_func_getpseudotty"
13338if test "x$ac_cv_func_getpseudotty" = xyes
13339then :
13340 printf "%s\n" "#define HAVE_GETPSEUDOTTY 1" >>confdefs.h
13341
13342fi
13343ac_fn_c_check_func "$LINENO" "getpwent" "ac_cv_func_getpwent"
13344if test "x$ac_cv_func_getpwent" = xyes
13345then :
13346 printf "%s\n" "#define HAVE_GETPWENT 1" >>confdefs.h
13347
13348fi
13349ac_fn_c_check_func "$LINENO" "getpwnam" "ac_cv_func_getpwnam"
13350if test "x$ac_cv_func_getpwnam" = xyes
13351then :
13352 printf "%s\n" "#define HAVE_GETPWNAM 1" >>confdefs.h
13353
13354fi
13355ac_fn_c_check_func "$LINENO" "getpwuid" "ac_cv_func_getpwuid"
13356if test "x$ac_cv_func_getpwuid" = xyes
13357then :
13358 printf "%s\n" "#define HAVE_GETPWUID 1" >>confdefs.h
13359
13360fi
13361ac_fn_c_check_func "$LINENO" "getrlimit" "ac_cv_func_getrlimit"
13362if test "x$ac_cv_func_getrlimit" = xyes
13363then :
13364 printf "%s\n" "#define HAVE_GETRLIMIT 1" >>confdefs.h
13365
13366fi
13367ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
13368if test "x$ac_cv_func_gettimeofday" = xyes
13369then :
13370 printf "%s\n" "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
13371
13372fi
13373ac_fn_c_check_func "$LINENO" "localtime_r" "ac_cv_func_localtime_r"
13374if test "x$ac_cv_func_localtime_r" = xyes
13375then :
13376 printf "%s\n" "#define HAVE_LOCALTIME_R 1" >>confdefs.h
13377
13378fi
13379ac_fn_c_check_func "$LINENO" "lstat" "ac_cv_func_lstat"
13380if test "x$ac_cv_func_lstat" = xyes
13381then :
13382 printf "%s\n" "#define HAVE_LSTAT 1" >>confdefs.h
13383
13384fi
13385ac_fn_c_check_func "$LINENO" "memset" "ac_cv_func_memset"
13386if test "x$ac_cv_func_memset" = xyes
13387then :
13388 printf "%s\n" "#define HAVE_MEMSET 1" >>confdefs.h
13389
13390fi
13391ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
13392if test "x$ac_cv_func_mkdtemp" = xyes
13393then :
13394 printf "%s\n" "#define HAVE_MKDTEMP 1" >>confdefs.h
13395
13396fi
13397ac_fn_c_check_func "$LINENO" "nanosleep" "ac_cv_func_nanosleep"
13398if test "x$ac_cv_func_nanosleep" = xyes
13399then :
13400 printf "%s\n" "#define HAVE_NANOSLEEP 1" >>confdefs.h
13401
13402fi
13403ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
13404if test "x$ac_cv_func_opendir" = xyes
13405then :
13406 printf "%s\n" "#define HAVE_OPENDIR 1" >>confdefs.h
13407
13408fi
13409ac_fn_c_check_func "$LINENO" "putenv" "ac_cv_func_putenv"
13410if test "x$ac_cv_func_putenv" = xyes
13411then :
13412 printf "%s\n" "#define HAVE_PUTENV 1" >>confdefs.h
13413
13414fi
13415ac_fn_c_check_func "$LINENO" "qsort" "ac_cv_func_qsort"
13416if test "x$ac_cv_func_qsort" = xyes
13417then :
13418 printf "%s\n" "#define HAVE_QSORT 1" >>confdefs.h
13419
13420fi
13421ac_fn_c_check_func "$LINENO" "readlink" "ac_cv_func_readlink"
13422if test "x$ac_cv_func_readlink" = xyes
13423then :
13424 printf "%s\n" "#define HAVE_READLINK 1" >>confdefs.h
13425
13426fi
13427ac_fn_c_check_func "$LINENO" "select" "ac_cv_func_select"
13428if test "x$ac_cv_func_select" = xyes
13429then :
13430 printf "%s\n" "#define HAVE_SELECT 1" >>confdefs.h
13431
13432fi
13433ac_fn_c_check_func "$LINENO" "setenv" "ac_cv_func_setenv"
13434if test "x$ac_cv_func_setenv" = xyes
13435then :
13436 printf "%s\n" "#define HAVE_SETENV 1" >>confdefs.h
13437
13438fi
13439ac_fn_c_check_func "$LINENO" "getpgid" "ac_cv_func_getpgid"
13440if test "x$ac_cv_func_getpgid" = xyes
13441then :
13442 printf "%s\n" "#define HAVE_GETPGID 1" >>confdefs.h
13443
13444fi
13445ac_fn_c_check_func "$LINENO" "setpgid" "ac_cv_func_setpgid"
13446if test "x$ac_cv_func_setpgid" = xyes
13447then :
13448 printf "%s\n" "#define HAVE_SETPGID 1" >>confdefs.h
13449
13450fi
13451ac_fn_c_check_func "$LINENO" "setsid" "ac_cv_func_setsid"
13452if test "x$ac_cv_func_setsid" = xyes
13453then :
13454 printf "%s\n" "#define HAVE_SETSID 1" >>confdefs.h
13455
13456fi
13457ac_fn_c_check_func "$LINENO" "sigaltstack" "ac_cv_func_sigaltstack"
13458if test "x$ac_cv_func_sigaltstack" = xyes
13459then :
13460 printf "%s\n" "#define HAVE_SIGALTSTACK 1" >>confdefs.h
13461
13462fi
13463ac_fn_c_check_func "$LINENO" "sigstack" "ac_cv_func_sigstack"
13464if test "x$ac_cv_func_sigstack" = xyes
13465then :
13466 printf "%s\n" "#define HAVE_SIGSTACK 1" >>confdefs.h
13467
13468fi
13469ac_fn_c_check_func "$LINENO" "sigset" "ac_cv_func_sigset"
13470if test "x$ac_cv_func_sigset" = xyes
13471then :
13472 printf "%s\n" "#define HAVE_SIGSET 1" >>confdefs.h
13473
13474fi
13475ac_fn_c_check_func "$LINENO" "sigsetjmp" "ac_cv_func_sigsetjmp"
13476if test "x$ac_cv_func_sigsetjmp" = xyes
13477then :
13478 printf "%s\n" "#define HAVE_SIGSETJMP 1" >>confdefs.h
13479
13480fi
13481ac_fn_c_check_func "$LINENO" "sigaction" "ac_cv_func_sigaction"
13482if test "x$ac_cv_func_sigaction" = xyes
13483then :
13484 printf "%s\n" "#define HAVE_SIGACTION 1" >>confdefs.h
13485
13486fi
13487ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
13488if test "x$ac_cv_func_sigprocmask" = xyes
13489then :
13490 printf "%s\n" "#define HAVE_SIGPROCMASK 1" >>confdefs.h
13491
13492fi
13493ac_fn_c_check_func "$LINENO" "sigvec" "ac_cv_func_sigvec"
13494if test "x$ac_cv_func_sigvec" = xyes
13495then :
13496 printf "%s\n" "#define HAVE_SIGVEC 1" >>confdefs.h
13497
13498fi
13499ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
13500if test "x$ac_cv_func_strcasecmp" = xyes
13501then :
13502 printf "%s\n" "#define HAVE_STRCASECMP 1" >>confdefs.h
13503
13504fi
13505ac_fn_c_check_func "$LINENO" "strcoll" "ac_cv_func_strcoll"
13506if test "x$ac_cv_func_strcoll" = xyes
13507then :
13508 printf "%s\n" "#define HAVE_STRCOLL 1" >>confdefs.h
13509
13510fi
13511ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror"
13512if test "x$ac_cv_func_strerror" = xyes
13513then :
13514 printf "%s\n" "#define HAVE_STRERROR 1" >>confdefs.h
13515
13516fi
13517ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
13518if test "x$ac_cv_func_strftime" = xyes
13519then :
13520 printf "%s\n" "#define HAVE_STRFTIME 1" >>confdefs.h
13521
13522fi
13523ac_fn_c_check_func "$LINENO" "stricmp" "ac_cv_func_stricmp"
13524if test "x$ac_cv_func_stricmp" = xyes
13525then :
13526 printf "%s\n" "#define HAVE_STRICMP 1" >>confdefs.h
13527
13528fi
13529ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp"
13530if test "x$ac_cv_func_strncasecmp" = xyes
13531then :
13532 printf "%s\n" "#define HAVE_STRNCASECMP 1" >>confdefs.h
13533
13534fi
13535ac_fn_c_check_func "$LINENO" "strnicmp" "ac_cv_func_strnicmp"
13536if test "x$ac_cv_func_strnicmp" = xyes
13537then :
13538 printf "%s\n" "#define HAVE_STRNICMP 1" >>confdefs.h
13539
13540fi
13541ac_fn_c_check_func "$LINENO" "strpbrk" "ac_cv_func_strpbrk"
13542if test "x$ac_cv_func_strpbrk" = xyes
13543then :
13544 printf "%s\n" "#define HAVE_STRPBRK 1" >>confdefs.h
13545
13546fi
13547ac_fn_c_check_func "$LINENO" "strptime" "ac_cv_func_strptime"
13548if test "x$ac_cv_func_strptime" = xyes
13549then :
13550 printf "%s\n" "#define HAVE_STRPTIME 1" >>confdefs.h
13551
13552fi
13553ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol"
13554if test "x$ac_cv_func_strtol" = xyes
13555then :
13556 printf "%s\n" "#define HAVE_STRTOL 1" >>confdefs.h
13557
13558fi
13559ac_fn_c_check_func "$LINENO" "tgetent" "ac_cv_func_tgetent"
13560if test "x$ac_cv_func_tgetent" = xyes
13561then :
13562 printf "%s\n" "#define HAVE_TGETENT 1" >>confdefs.h
13563
13564fi
13565ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
13566if test "x$ac_cv_func_towlower" = xyes
13567then :
13568 printf "%s\n" "#define HAVE_TOWLOWER 1" >>confdefs.h
13569
13570fi
13571ac_fn_c_check_func "$LINENO" "towupper" "ac_cv_func_towupper"
13572if test "x$ac_cv_func_towupper" = xyes
13573then :
13574 printf "%s\n" "#define HAVE_TOWUPPER 1" >>confdefs.h
13575
13576fi
13577ac_fn_c_check_func "$LINENO" "iswupper" "ac_cv_func_iswupper"
13578if test "x$ac_cv_func_iswupper" = xyes
13579then :
13580 printf "%s\n" "#define HAVE_ISWUPPER 1" >>confdefs.h
13581
13582fi
13583ac_fn_c_check_func "$LINENO" "tzset" "ac_cv_func_tzset"
13584if test "x$ac_cv_func_tzset" = xyes
13585then :
13586 printf "%s\n" "#define HAVE_TZSET 1" >>confdefs.h
13587
13588fi
13589ac_fn_c_check_func "$LINENO" "usleep" "ac_cv_func_usleep"
13590if test "x$ac_cv_func_usleep" = xyes
13591then :
13592 printf "%s\n" "#define HAVE_USLEEP 1" >>confdefs.h
13593
13594fi
13595ac_fn_c_check_func "$LINENO" "utime" "ac_cv_func_utime"
13596if test "x$ac_cv_func_utime" = xyes
13597then :
13598 printf "%s\n" "#define HAVE_UTIME 1" >>confdefs.h
13599
13600fi
13601ac_fn_c_check_func "$LINENO" "utimes" "ac_cv_func_utimes"
13602if test "x$ac_cv_func_utimes" = xyes
13603then :
13604 printf "%s\n" "#define HAVE_UTIMES 1" >>confdefs.h
13605
13606fi
13607ac_fn_c_check_func "$LINENO" "mblen" "ac_cv_func_mblen"
13608if test "x$ac_cv_func_mblen" = xyes
13609then :
13610 printf "%s\n" "#define HAVE_MBLEN 1" >>confdefs.h
13611
13612fi
13613ac_fn_c_check_func "$LINENO" "ftruncate" "ac_cv_func_ftruncate"
13614if test "x$ac_cv_func_ftruncate" = xyes
13615then :
13616 printf "%s\n" "#define HAVE_FTRUNCATE 1" >>confdefs.h
13617
13618fi
13619ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
13620if test "x$ac_cv_func_unsetenv" = xyes
13621then :
13622 printf "%s\n" "#define HAVE_UNSETENV 1" >>confdefs.h
13623
13624fi
13625ac_fn_c_check_func "$LINENO" "posix_openpt" "ac_cv_func_posix_openpt"
13626if test "x$ac_cv_func_posix_openpt" = xyes
13627then :
13628 printf "%s\n" "#define HAVE_POSIX_OPENPT 1" >>confdefs.h
13629
13630fi
13631ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
13632if test "x$ac_cv_func_clock_gettime" = xyes
13633then :
13634 printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
Bram Moolenaar643b6142018-09-12 20:29:09 +020013635
13636fi
13637
Bram Moolenaar643b6142018-09-12 20:29:09 +020013638
Illia Bobyra96d5442023-08-30 16:30:15 +020013639
13640
13641{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking types of arguments for select" >&5
13642printf %s "checking types of arguments for select... " >&6; }
13643if test ${ac_cv_func_select_args+y}
13644then :
13645 printf %s "(cached) " >&6
13646else $as_nop
13647 ac_cv_func_select_args='int,int *,struct timeval *'
13648for ac_arg234 in 'fd_set *' 'int *' 'void *'; do
Bram Moolenaar643b6142018-09-12 20:29:09 +020013649 for ac_arg1 in 'int' 'size_t' 'unsigned long int' 'unsigned int'; do
13650 for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do
13651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13652/* end confdefs.h. */
13653$ac_includes_default
13654#ifdef HAVE_SYS_SELECT_H
13655# include <sys/select.h>
13656#endif
13657#ifdef HAVE_SYS_SOCKET_H
13658# include <sys/socket.h>
13659#endif
13660
13661int
Illia Bobyra96d5442023-08-30 16:30:15 +020013662main (void)
Bram Moolenaar643b6142018-09-12 20:29:09 +020013663{
13664extern int select ($ac_arg1,
13665 $ac_arg234, $ac_arg234, $ac_arg234,
13666 $ac_arg5);
13667 ;
13668 return 0;
13669}
13670_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013671if ac_fn_c_try_compile "$LINENO"
13672then :
Bram Moolenaar643b6142018-09-12 20:29:09 +020013673 ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3
13674fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013675rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar643b6142018-09-12 20:29:09 +020013676 done
13677 done
13678done
Bram Moolenaar643b6142018-09-12 20:29:09 +020013679
13680fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013681{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_select_args" >&5
13682printf "%s\n" "$ac_cv_func_select_args" >&6; }
Bram Moolenaar643b6142018-09-12 20:29:09 +020013683ac_save_IFS=$IFS; IFS=','
13684set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'`
13685IFS=$ac_save_IFS
13686shift
13687
Illia Bobyra96d5442023-08-30 16:30:15 +020013688printf "%s\n" "#define SELECT_TYPE_ARG1 $1" >>confdefs.h
Bram Moolenaar643b6142018-09-12 20:29:09 +020013689
13690
Illia Bobyra96d5442023-08-30 16:30:15 +020013691printf "%s\n" "#define SELECT_TYPE_ARG234 ($2)" >>confdefs.h
Bram Moolenaar643b6142018-09-12 20:29:09 +020013692
13693
Illia Bobyra96d5442023-08-30 16:30:15 +020013694printf "%s\n" "#define SELECT_TYPE_ARG5 ($3)" >>confdefs.h
Bram Moolenaar643b6142018-09-12 20:29:09 +020013695
Illia Bobyra96d5442023-08-30 16:30:15 +020013696rm -rf conftest*
Bram Moolenaar643b6142018-09-12 20:29:09 +020013697
Illia Bobyra96d5442023-08-30 16:30:15 +020013698{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
13699printf %s "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
13700if test ${ac_cv_sys_largefile_source+y}
13701then :
13702 printf %s "(cached) " >&6
13703else $as_nop
Bram Moolenaar25153e12010-02-24 14:47:08 +010013704 while :; do
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar25153e12010-02-24 14:47:08 +010013706/* end confdefs.h. */
13707#include <sys/types.h> /* for off_t */
13708 #include <stdio.h>
13709int
Illia Bobyra96d5442023-08-30 16:30:15 +020013710main (void)
Bram Moolenaar25153e12010-02-24 14:47:08 +010013711{
13712int (*fp) (FILE *, off_t, int) = fseeko;
13713 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
13714 ;
13715 return 0;
13716}
13717_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013718if ac_fn_c_try_link "$LINENO"
13719then :
Bram Moolenaar25153e12010-02-24 14:47:08 +010013720 ac_cv_sys_largefile_source=no; break
Bram Moolenaar25153e12010-02-24 14:47:08 +010013721fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013722rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013723 conftest$ac_exeext conftest.$ac_ext
13724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar25153e12010-02-24 14:47:08 +010013725/* end confdefs.h. */
13726#define _LARGEFILE_SOURCE 1
13727#include <sys/types.h> /* for off_t */
13728 #include <stdio.h>
13729int
Illia Bobyra96d5442023-08-30 16:30:15 +020013730main (void)
Bram Moolenaar25153e12010-02-24 14:47:08 +010013731{
13732int (*fp) (FILE *, off_t, int) = fseeko;
13733 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
13734 ;
13735 return 0;
13736}
13737_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013738if ac_fn_c_try_link "$LINENO"
13739then :
Bram Moolenaar25153e12010-02-24 14:47:08 +010013740 ac_cv_sys_largefile_source=1; break
Bram Moolenaar25153e12010-02-24 14:47:08 +010013741fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013742rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013743 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar25153e12010-02-24 14:47:08 +010013744 ac_cv_sys_largefile_source=unknown
13745 break
13746done
13747fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013748{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
13749printf "%s\n" "$ac_cv_sys_largefile_source" >&6; }
Bram Moolenaar25153e12010-02-24 14:47:08 +010013750case $ac_cv_sys_largefile_source in #(
13751 no | unknown) ;;
13752 *)
Illia Bobyra96d5442023-08-30 16:30:15 +020013753printf "%s\n" "#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source" >>confdefs.h
Bram Moolenaar25153e12010-02-24 14:47:08 +010013754;;
13755esac
13756rm -rf conftest*
13757
13758# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
13759# in glibc 2.1.3, but that breaks too many other things.
13760# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
13761if test $ac_cv_sys_largefile_source != unknown; then
13762
Illia Bobyra96d5442023-08-30 16:30:15 +020013763printf "%s\n" "#define HAVE_FSEEKO 1" >>confdefs.h
Bram Moolenaar25153e12010-02-24 14:47:08 +010013764
13765fi
13766
Bram Moolenaar071d4272004-06-13 20:20:40 +000013767
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013768# Check whether --enable-largefile was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020013769if test ${enable_largefile+y}
13770then :
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013771 enableval=$enable_largefile;
13772fi
13773
13774if test "$enable_largefile" != no; then
13775
Illia Bobyra96d5442023-08-30 16:30:15 +020013776 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
13777printf %s "checking for special C compiler options needed for large files... " >&6; }
13778if test ${ac_cv_sys_largefile_CC+y}
13779then :
13780 printf %s "(cached) " >&6
13781else $as_nop
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013782 ac_cv_sys_largefile_CC=no
13783 if test "$GCC" != yes; then
13784 ac_save_CC=$CC
13785 while :; do
13786 # IRIX 6.2 and later do not support large files by default,
13787 # so use the C compiler's -n32 option if that helps.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013789/* end confdefs.h. */
13790#include <sys/types.h>
13791 /* Check that off_t can represent 2**63 - 1 correctly.
13792 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13793 since some C++ compilers masquerading as C compilers
13794 incorrectly reject 9223372036854775807. */
Illia Bobyra96d5442023-08-30 16:30:15 +020013795#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013796 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13797 && LARGE_OFF_T % 2147483647 == 1)
13798 ? 1 : -1];
13799int
Illia Bobyra96d5442023-08-30 16:30:15 +020013800main (void)
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013801{
13802
13803 ;
13804 return 0;
13805}
13806_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013807 if ac_fn_c_try_compile "$LINENO"
13808then :
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013809 break
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013810fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013811rm -f core conftest.err conftest.$ac_objext conftest.beam
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013812 CC="$CC -n32"
Illia Bobyra96d5442023-08-30 16:30:15 +020013813 if ac_fn_c_try_compile "$LINENO"
13814then :
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013815 ac_cv_sys_largefile_CC=' -n32'; break
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013816fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013817rm -f core conftest.err conftest.$ac_objext conftest.beam
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013818 break
13819 done
13820 CC=$ac_save_CC
13821 rm -f conftest.$ac_ext
13822 fi
13823fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013824{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
13825printf "%s\n" "$ac_cv_sys_largefile_CC" >&6; }
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013826 if test "$ac_cv_sys_largefile_CC" != no; then
13827 CC=$CC$ac_cv_sys_largefile_CC
13828 fi
13829
Illia Bobyra96d5442023-08-30 16:30:15 +020013830 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
13831printf %s "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
13832if test ${ac_cv_sys_file_offset_bits+y}
13833then :
13834 printf %s "(cached) " >&6
13835else $as_nop
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013836 while :; do
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013838/* end confdefs.h. */
13839#include <sys/types.h>
13840 /* Check that off_t can represent 2**63 - 1 correctly.
13841 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13842 since some C++ compilers masquerading as C compilers
13843 incorrectly reject 9223372036854775807. */
Illia Bobyra96d5442023-08-30 16:30:15 +020013844#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013845 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13846 && LARGE_OFF_T % 2147483647 == 1)
13847 ? 1 : -1];
13848int
Illia Bobyra96d5442023-08-30 16:30:15 +020013849main (void)
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013850{
13851
13852 ;
13853 return 0;
13854}
13855_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013856if ac_fn_c_try_compile "$LINENO"
13857then :
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013858 ac_cv_sys_file_offset_bits=no; break
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013859fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013860rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013862/* end confdefs.h. */
13863#define _FILE_OFFSET_BITS 64
13864#include <sys/types.h>
13865 /* Check that off_t can represent 2**63 - 1 correctly.
13866 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13867 since some C++ compilers masquerading as C compilers
13868 incorrectly reject 9223372036854775807. */
Illia Bobyra96d5442023-08-30 16:30:15 +020013869#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013870 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13871 && LARGE_OFF_T % 2147483647 == 1)
13872 ? 1 : -1];
13873int
Illia Bobyra96d5442023-08-30 16:30:15 +020013874main (void)
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013875{
13876
13877 ;
13878 return 0;
13879}
13880_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013881if ac_fn_c_try_compile "$LINENO"
13882then :
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013883 ac_cv_sys_file_offset_bits=64; break
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013884fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013885rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013886 ac_cv_sys_file_offset_bits=unknown
13887 break
13888done
13889fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013890{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
13891printf "%s\n" "$ac_cv_sys_file_offset_bits" >&6; }
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013892case $ac_cv_sys_file_offset_bits in #(
13893 no | unknown) ;;
13894 *)
Illia Bobyra96d5442023-08-30 16:30:15 +020013895printf "%s\n" "#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits" >>confdefs.h
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013896;;
13897esac
13898rm -rf conftest*
13899 if test $ac_cv_sys_file_offset_bits = unknown; then
Illia Bobyra96d5442023-08-30 16:30:15 +020013900 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
13901printf %s "checking for _LARGE_FILES value needed for large files... " >&6; }
13902if test ${ac_cv_sys_large_files+y}
13903then :
13904 printf %s "(cached) " >&6
13905else $as_nop
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013906 while :; do
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013908/* end confdefs.h. */
13909#include <sys/types.h>
13910 /* Check that off_t can represent 2**63 - 1 correctly.
13911 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13912 since some C++ compilers masquerading as C compilers
13913 incorrectly reject 9223372036854775807. */
Illia Bobyra96d5442023-08-30 16:30:15 +020013914#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013915 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13916 && LARGE_OFF_T % 2147483647 == 1)
13917 ? 1 : -1];
13918int
Illia Bobyra96d5442023-08-30 16:30:15 +020013919main (void)
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013920{
13921
13922 ;
13923 return 0;
13924}
13925_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013926if ac_fn_c_try_compile "$LINENO"
13927then :
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013928 ac_cv_sys_large_files=no; break
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013929fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013930rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013932/* end confdefs.h. */
13933#define _LARGE_FILES 1
13934#include <sys/types.h>
13935 /* Check that off_t can represent 2**63 - 1 correctly.
13936 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13937 since some C++ compilers masquerading as C compilers
13938 incorrectly reject 9223372036854775807. */
Illia Bobyra96d5442023-08-30 16:30:15 +020013939#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013940 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13941 && LARGE_OFF_T % 2147483647 == 1)
13942 ? 1 : -1];
13943int
Illia Bobyra96d5442023-08-30 16:30:15 +020013944main (void)
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013945{
13946
13947 ;
13948 return 0;
13949}
13950_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013951if ac_fn_c_try_compile "$LINENO"
13952then :
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013953 ac_cv_sys_large_files=1; break
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013954fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013955rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013956 ac_cv_sys_large_files=unknown
13957 break
13958done
13959fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013960{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
13961printf "%s\n" "$ac_cv_sys_large_files" >&6; }
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013962case $ac_cv_sys_large_files in #(
13963 no | unknown) ;;
13964 *)
Illia Bobyra96d5442023-08-30 16:30:15 +020013965printf "%s\n" "#define _LARGE_FILES $ac_cv_sys_large_files" >>confdefs.h
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013966;;
13967esac
13968rm -rf conftest*
13969 fi
13970fi
13971
13972
Illia Bobyra96d5442023-08-30 16:30:15 +020013973{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-canberra argument" >&5
13974printf %s "checking --enable-canberra argument... " >&6; }
Bram Moolenaar21606672019-06-14 20:40:58 +020013975# Check whether --enable-canberra was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020013976if test ${enable_canberra+y}
13977then :
Bram Moolenaar21606672019-06-14 20:40:58 +020013978 enableval=$enable_canberra;
Illia Bobyra96d5442023-08-30 16:30:15 +020013979else $as_nop
Bram Moolenaar21606672019-06-14 20:40:58 +020013980 enable_canberra="maybe"
13981fi
Bram Moolenaar427f5b62019-06-09 13:43:51 +020013982
Bram Moolenaar21606672019-06-14 20:40:58 +020013983
13984if test "$enable_canberra" = "maybe"; then
Martin Tournoij25f3a142022-10-08 19:26:41 +010013985 if test "$features" = "huge"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020013986 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to yes" >&5
13987printf "%s\n" "Defaulting to yes" >&6; }
Bram Moolenaar21606672019-06-14 20:40:58 +020013988 enable_canberra="yes"
13989 else
Illia Bobyra96d5442023-08-30 16:30:15 +020013990 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to no" >&5
13991printf "%s\n" "Defaulting to no" >&6; }
Bram Moolenaar21606672019-06-14 20:40:58 +020013992 enable_canberra="no"
13993 fi
13994else
Bram Moolenaar12471262022-01-18 11:11:25 +000013995 if test "$enable_canberra" = "yes" -a "$has_eval" = "no"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020013996 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot use sound with tiny features" >&5
13997printf "%s\n" "cannot use sound with tiny features" >&6; }
Bram Moolenaar12471262022-01-18 11:11:25 +000013998 enable_canberra="no"
13999 else
Illia Bobyra96d5442023-08-30 16:30:15 +020014000 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_canberra" >&5
14001printf "%s\n" "$enable_canberra" >&6; }
Bram Moolenaar12471262022-01-18 11:11:25 +000014002 fi
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014003fi
Bram Moolenaar21606672019-06-14 20:40:58 +020014004if test "$enable_canberra" = "yes"; then
14005 if test "x$PKG_CONFIG" != "xno"; then
14006 canberra_lib=`$PKG_CONFIG --libs libcanberra 2>/dev/null`
14007 canberra_cflags=`$PKG_CONFIG --cflags libcanberra 2>/dev/null`
14008 fi
14009 if test "x$canberra_lib" = "x"; then
14010 canberra_lib=-lcanberra
14011 canberra_cflags=-D_REENTRANT
14012 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014013 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcanberra" >&5
14014printf %s "checking for libcanberra... " >&6; }
Bram Moolenaar21606672019-06-14 20:40:58 +020014015 ac_save_CFLAGS="$CFLAGS"
14016 ac_save_LIBS="$LIBS"
Bram Moolenaar12471262022-01-18 11:11:25 +000014017 if `echo "$CFLAGS" | grep -v "$canberra_cflags" 2>/dev/null`; then
Christian Brabandt6b9efdd2021-09-09 17:14:50 +020014018 CFLAGS="$CFLAGS $canberra_cflags"
14019 fi
Bram Moolenaar21606672019-06-14 20:40:58 +020014020 LIBS="$LIBS $canberra_lib"
14021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014022/* end confdefs.h. */
14023
Bram Moolenaar21606672019-06-14 20:40:58 +020014024 # include <canberra.h>
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014025
14026int
Illia Bobyra96d5442023-08-30 16:30:15 +020014027main (void)
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014028{
14029
Bram Moolenaar21606672019-06-14 20:40:58 +020014030 ca_context *hello;
14031 ca_context_create(&hello);
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014032 ;
14033 return 0;
14034}
14035_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014036if ac_fn_c_try_link "$LINENO"
14037then :
14038 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14039printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_CANBERRA 1" >>confdefs.h
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014040
Illia Bobyra96d5442023-08-30 16:30:15 +020014041else $as_nop
14042 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no; try installing libcanberra-dev" >&5
14043printf "%s\n" "no; try installing libcanberra-dev" >&6; }; CFLAGS="$ac_save_CFLAGS"; LIBS="$ac_save_LIBS"
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014044fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014045rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014046 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar21606672019-06-14 20:40:58 +020014047fi
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014048
Illia Bobyra96d5442023-08-30 16:30:15 +020014049{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-libsodium argument" >&5
14050printf %s "checking --enable-libsodium argument... " >&6; }
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014051# Check whether --enable-libsodium was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020014052if test ${enable_libsodium+y}
14053then :
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014054 enableval=$enable_libsodium;
Illia Bobyra96d5442023-08-30 16:30:15 +020014055else $as_nop
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014056 enable_libsodium="maybe"
14057fi
14058
14059
14060if test "$enable_libsodium" = "maybe"; then
Martin Tournoij25f3a142022-10-08 19:26:41 +010014061 if test "$features" = "huge"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014062 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to yes" >&5
14063printf "%s\n" "Defaulting to yes" >&6; }
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014064 enable_libsodium="yes"
14065 else
Illia Bobyra96d5442023-08-30 16:30:15 +020014066 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to no" >&5
14067printf "%s\n" "Defaulting to no" >&6; }
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014068 enable_libsodium="no"
14069 fi
14070else
Illia Bobyra96d5442023-08-30 16:30:15 +020014071 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_libsodium" >&5
14072printf "%s\n" "$enable_libsodium" >&6; }
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014073fi
14074if test "$enable_libsodium" = "yes"; then
14075 if test "x$PKG_CONFIG" != "xno"; then
14076 libsodium_lib=`$PKG_CONFIG --libs libsodium 2>/dev/null`
14077 libsodium_cflags=`$PKG_CONFIG --cflags libsodium 2>/dev/null`
14078 fi
14079 if test "x$libsodium_lib" = "x"; then
14080 libsodium_lib=-lsodium
14081 libsodium_cflags=
14082 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014083 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libsodium" >&5
14084printf %s "checking for libsodium... " >&6; }
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014085 ac_save_CFLAGS="$CFLAGS"
14086 ac_save_LIBS="$LIBS"
14087 CFLAGS="$CFLAGS $libsodium_cflags"
14088 LIBS="$LIBS $libsodium_lib"
14089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14090/* end confdefs.h. */
14091
14092 # include <sodium.h>
14093
14094int
Illia Bobyra96d5442023-08-30 16:30:15 +020014095main (void)
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014096{
14097
14098 printf("%d", sodium_init());
14099 ;
14100 return 0;
14101}
14102_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014103if ac_fn_c_try_link "$LINENO"
14104then :
14105 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14106printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SODIUM 1" >>confdefs.h
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014107
Illia Bobyra96d5442023-08-30 16:30:15 +020014108else $as_nop
14109 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no; try installing libsodium-dev" >&5
14110printf "%s\n" "no; try installing libsodium-dev" >&6; }; CFLAGS="$ac_save_CFLAGS"; LIBS="$ac_save_LIBS"
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014111fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014112rm -f core conftest.err conftest.$ac_objext conftest.beam \
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014113 conftest$ac_exeext conftest.$ac_ext
14114fi
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014115
Illia Bobyra96d5442023-08-30 16:30:15 +020014116{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for st_blksize" >&5
14117printf %s "checking for st_blksize... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014118cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014119/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000014120#include <sys/types.h>
14121#include <sys/stat.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014122int
Illia Bobyra96d5442023-08-30 16:30:15 +020014123main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014124{
Bram Moolenaar071d4272004-06-13 20:20:40 +000014125 struct stat st;
14126 int n;
14127
14128 stat("/", &st);
14129 n = (int)st.st_blksize;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014130 ;
14131 return 0;
14132}
14133_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014134if ac_fn_c_try_compile "$LINENO"
14135then :
14136 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14137printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_ST_BLKSIZE 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000014138
Illia Bobyra96d5442023-08-30 16:30:15 +020014139else $as_nop
14140 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14141printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000014142fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014143rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000014144
Illia Bobyra96d5442023-08-30 16:30:15 +020014145{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for timer_create without -lrt" >&5
14146printf %s "checking for timer_create without -lrt... " >&6; }
14147if test ${vim_cv_timer_create+y}
14148then :
14149 printf %s "(cached) " >&6
14150else $as_nop
Bram Moolenaar5748b7f2022-07-28 12:09:04 +010014151
Illia Bobyra96d5442023-08-30 16:30:15 +020014152if test "$cross_compiling" = yes
14153then :
14154 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: failed to build test program; if cross-compiling please set 'vim_cv_timer_create'" >&5
14155printf "%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 +010014156
Illia Bobyra96d5442023-08-30 16:30:15 +020014157else $as_nop
Bram Moolenaarf2ce76a2022-07-02 11:40:40 +010014158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Paul Ollis65745772022-06-05 16:55:54 +010014159/* end confdefs.h. */
14160
Bram Moolenaar5748b7f2022-07-28 12:09:04 +010014161#if STDC_HEADERS
14162# include <stdlib.h>
14163# include <stddef.h>
14164#endif
14165#include <signal.h>
14166#include <time.h>
Bram Moolenaare5303952022-06-19 17:05:47 +010014167static void set_flag(union sigval sv) {}
Paul Ollis65745772022-06-05 16:55:54 +010014168
14169int
Illia Bobyra96d5442023-08-30 16:30:15 +020014170main (void)
Paul Ollis65745772022-06-05 16:55:54 +010014171{
14172
14173 struct timespec ts;
14174 struct sigevent action = {0};
14175 timer_t timer_id;
14176
14177 action.sigev_notify = SIGEV_THREAD;
14178 action.sigev_notify_function = set_flag;
Bram Moolenaarf2ce76a2022-07-02 11:40:40 +010014179 if (timer_create(CLOCK_MONOTONIC, &action, &timer_id) < 0)
14180 exit(1); // cannot create a monotonic timer
Paul Ollis65745772022-06-05 16:55:54 +010014181
14182 ;
14183 return 0;
14184}
14185_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014186if ac_fn_c_try_run "$LINENO"
14187then :
Richard Purdie509695c2022-07-24 20:48:00 +010014188 vim_cv_timer_create=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020014189else $as_nop
Richard Purdie509695c2022-07-24 20:48:00 +010014190 vim_cv_timer_create=no
Paul Ollis65745772022-06-05 16:55:54 +010014191fi
Bram Moolenaarf2ce76a2022-07-02 11:40:40 +010014192rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14193 conftest.$ac_objext conftest.beam conftest.$ac_ext
Paul Ollis65745772022-06-05 16:55:54 +010014194fi
Bram Moolenaarf2ce76a2022-07-02 11:40:40 +010014195
14196fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014197{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_timer_create" >&5
14198printf "%s\n" "$vim_cv_timer_create" >&6; }
Bram Moolenaarefffa532022-07-28 22:39:54 +010014199
14200if test "x$vim_cv_timer_create" = "xno" ; then
14201 save_LIBS="$LIBS"
14202 LIBS="$LIBS -lrt"
Illia Bobyra96d5442023-08-30 16:30:15 +020014203 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for timer_create with -lrt" >&5
14204printf %s "checking for timer_create with -lrt... " >&6; }
14205if test ${vim_cv_timer_create_with_lrt+y}
14206then :
14207 printf %s "(cached) " >&6
14208else $as_nop
Bram Moolenaarefffa532022-07-28 22:39:54 +010014209
Illia Bobyra96d5442023-08-30 16:30:15 +020014210 if test "$cross_compiling" = yes
14211then :
14212 { 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
14213printf "%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 +010014214
Illia Bobyra96d5442023-08-30 16:30:15 +020014215else $as_nop
Bram Moolenaarefffa532022-07-28 22:39:54 +010014216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14217/* end confdefs.h. */
14218
14219 #if STDC_HEADERS
14220 # include <stdlib.h>
14221 # include <stddef.h>
14222 #endif
14223 #include <signal.h>
14224 #include <time.h>
14225 static void set_flag(union sigval sv) {}
14226
14227int
Illia Bobyra96d5442023-08-30 16:30:15 +020014228main (void)
Bram Moolenaarefffa532022-07-28 22:39:54 +010014229{
14230
14231 struct timespec ts;
14232 struct sigevent action = {0};
14233 timer_t timer_id;
14234
14235 action.sigev_notify = SIGEV_THREAD;
14236 action.sigev_notify_function = set_flag;
14237 if (timer_create(CLOCK_MONOTONIC, &action, &timer_id) < 0)
14238 exit(1); // cannot create a monotonic timer
14239
14240 ;
14241 return 0;
14242}
14243_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014244if ac_fn_c_try_run "$LINENO"
14245then :
Bram Moolenaarefffa532022-07-28 22:39:54 +010014246 vim_cv_timer_create_with_lrt=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020014247else $as_nop
Bram Moolenaarefffa532022-07-28 22:39:54 +010014248 vim_cv_timer_create_with_lrt=no
14249fi
Bram Moolenaarf2ce76a2022-07-02 11:40:40 +010014250rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14251 conftest.$ac_objext conftest.beam conftest.$ac_ext
14252fi
14253
Richard Purdie509695c2022-07-24 20:48:00 +010014254fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014255{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_timer_create_with_lrt" >&5
14256printf "%s\n" "$vim_cv_timer_create_with_lrt" >&6; }
Bram Moolenaarefffa532022-07-28 22:39:54 +010014257 LIBS="$save_LIBS"
14258else
14259 vim_cv_timer_create_with_lrt=no
14260fi
Richard Purdie509695c2022-07-24 20:48:00 +010014261
14262if test "x$vim_cv_timer_create" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014263 printf "%s\n" "#define HAVE_TIMER_CREATE 1" >>confdefs.h
Richard Purdie509695c2022-07-24 20:48:00 +010014264
14265fi
Bram Moolenaarefffa532022-07-28 22:39:54 +010014266if test "x$vim_cv_timer_create_with_lrt" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014267 printf "%s\n" "#define HAVE_TIMER_CREATE 1" >>confdefs.h
Richard Purdie509695c2022-07-24 20:48:00 +010014268
Bram Moolenaarefffa532022-07-28 22:39:54 +010014269 LIBS="$LIBS -lrt"
14270fi
Richard Purdie509695c2022-07-24 20:48:00 +010014271
Illia Bobyra96d5442023-08-30 16:30:15 +020014272{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat() ignores a trailing slash" >&5
14273printf %s "checking whether stat() ignores a trailing slash... " >&6; }
14274if test ${vim_cv_stat_ignores_slash+y}
14275then :
14276 printf %s "(cached) " >&6
14277else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000014278
Illia Bobyra96d5442023-08-30 16:30:15 +020014279 if test "$cross_compiling" = yes
14280then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000014281
Bram Moolenaar7db77842014-03-27 17:40:59 +010014282 as_fn_error $? "cross-compiling: please set 'vim_cv_stat_ignores_slash'" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000014283
Illia Bobyra96d5442023-08-30 16:30:15 +020014284else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14286/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000014287
14288#include "confdefs.h"
14289#if STDC_HEADERS
14290# include <stdlib.h>
14291# include <stddef.h>
14292#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000014293#include <sys/types.h>
14294#include <sys/stat.h>
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010014295int main() {struct stat st; exit(stat("configure/", &st) != 0); }
Bram Moolenaar446cb832008-06-24 21:56:24 +000014296
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014297_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014298if ac_fn_c_try_run "$LINENO"
14299then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000014300
14301 vim_cv_stat_ignores_slash=yes
Bram Moolenaar071d4272004-06-13 20:20:40 +000014302
Illia Bobyra96d5442023-08-30 16:30:15 +020014303else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000014304
14305 vim_cv_stat_ignores_slash=no
14306
Bram Moolenaar071d4272004-06-13 20:20:40 +000014307fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014308rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14309 conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000014310fi
14311
Bram Moolenaar446cb832008-06-24 21:56:24 +000014312
Bram Moolenaar446cb832008-06-24 21:56:24 +000014313fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014314{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_stat_ignores_slash" >&5
14315printf "%s\n" "$vim_cv_stat_ignores_slash" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000014316
14317if test "x$vim_cv_stat_ignores_slash" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014318 printf "%s\n" "#define STAT_IGNORES_SLASH 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000014319
14320fi
14321
Illia Bobyra96d5442023-08-30 16:30:15 +020014322{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nanoseconds field of struct stat" >&5
14323printf %s "checking for nanoseconds field of struct stat... " >&6; }
14324if test ${ac_cv_struct_st_mtim_nsec+y}
14325then :
14326 printf %s "(cached) " >&6
14327else $as_nop
Leah Neukirchen0a7984a2021-10-14 21:27:55 +010014328 ac_save_CPPFLAGS="$CPPFLAGS"
14329 ac_cv_struct_st_mtim_nsec=no
14330 # st_mtim.tv_nsec -- the usual case
14331 # st_mtim._tv_nsec -- Solaris 2.6, if
14332 # (defined _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED == 1
14333 # && !defined __EXTENSIONS__)
14334 # st_mtim.st__tim.tv_nsec -- UnixWare 2.1.2
14335 # st_mtime_n -- AIX 5.2 and above
14336 # st_mtimespec.tv_nsec -- Darwin (Mac OSX)
14337 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
14338 CPPFLAGS="$ac_save_CPPFLAGS -DST_MTIM_NSEC=$ac_val"
14339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14340/* end confdefs.h. */
14341#include <sys/types.h>
14342#include <sys/stat.h>
14343int
Illia Bobyra96d5442023-08-30 16:30:15 +020014344main (void)
Leah Neukirchen0a7984a2021-10-14 21:27:55 +010014345{
14346struct stat s; s.ST_MTIM_NSEC;
14347 ;
14348 return 0;
14349}
14350_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014351if ac_fn_c_try_compile "$LINENO"
14352then :
Leah Neukirchen0a7984a2021-10-14 21:27:55 +010014353 ac_cv_struct_st_mtim_nsec=$ac_val; break
14354fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014355rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Leah Neukirchen0a7984a2021-10-14 21:27:55 +010014356 done
14357 CPPFLAGS="$ac_save_CPPFLAGS"
14358
14359fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014360{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_st_mtim_nsec" >&5
14361printf "%s\n" "$ac_cv_struct_st_mtim_nsec" >&6; }
Leah Neukirchen0a7984a2021-10-14 21:27:55 +010014362if test $ac_cv_struct_st_mtim_nsec != no; then
14363
Illia Bobyra96d5442023-08-30 16:30:15 +020014364printf "%s\n" "#define ST_MTIM_NSEC $ac_cv_struct_st_mtim_nsec" >>confdefs.h
Leah Neukirchen0a7984a2021-10-14 21:27:55 +010014365
14366fi
14367
Illia Bobyra96d5442023-08-30 16:30:15 +020014368{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv_open()" >&5
14369printf %s "checking for iconv_open()... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000014370save_LIBS="$LIBS"
14371LIBS="$LIBS -liconv"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014372cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014373/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000014374
14375#ifdef HAVE_ICONV_H
14376# include <iconv.h>
14377#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014378
14379int
Illia Bobyra96d5442023-08-30 16:30:15 +020014380main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014381{
Bram Moolenaar071d4272004-06-13 20:20:40 +000014382iconv_open("fr", "to");
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014383 ;
14384 return 0;
14385}
14386_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014387if ac_fn_c_try_link "$LINENO"
14388then :
14389 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes; with -liconv" >&5
14390printf "%s\n" "yes; with -liconv" >&6; }; printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000014391
Illia Bobyra96d5442023-08-30 16:30:15 +020014392else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014393 LIBS="$save_LIBS"
14394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014395/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000014396
14397#ifdef HAVE_ICONV_H
14398# include <iconv.h>
14399#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014400
14401int
Illia Bobyra96d5442023-08-30 16:30:15 +020014402main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014403{
Bram Moolenaar071d4272004-06-13 20:20:40 +000014404iconv_open("fr", "to");
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014405 ;
14406 return 0;
14407}
14408_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014409if ac_fn_c_try_link "$LINENO"
14410then :
14411 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14412printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000014413
Illia Bobyra96d5442023-08-30 16:30:15 +020014414else $as_nop
14415 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14416printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000014417fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014418rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014419 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000014420fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014421rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014422 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000014423
14424
Illia Bobyra96d5442023-08-30 16:30:15 +020014425{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo(CODESET)" >&5
14426printf %s "checking for nl_langinfo(CODESET)... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014427cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014428/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000014429
14430#ifdef HAVE_LANGINFO_H
14431# include <langinfo.h>
14432#endif
14433
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014434int
Illia Bobyra96d5442023-08-30 16:30:15 +020014435main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014436{
Bram Moolenaar071d4272004-06-13 20:20:40 +000014437char *cs = nl_langinfo(CODESET);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014438 ;
14439 return 0;
14440}
14441_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014442if ac_fn_c_try_link "$LINENO"
14443then :
14444 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14445printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_NL_LANGINFO_CODESET 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000014446
Illia Bobyra96d5442023-08-30 16:30:15 +020014447else $as_nop
14448 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14449printf "%s\n" "no" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014450fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014451rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014452 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000014453
Illia Bobyra96d5442023-08-30 16:30:15 +020014454{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for strtod in -lm" >&5
14455printf %s "checking for strtod in -lm... " >&6; }
14456if test ${ac_cv_lib_m_strtod+y}
14457then :
14458 printf %s "(cached) " >&6
14459else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000014460 ac_check_lib_save_LIBS=$LIBS
14461LIBS="-lm $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014462cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000014463/* end confdefs.h. */
14464
14465/* Override any GCC internal prototype to avoid an error.
14466 Use char because int might match the return type of a GCC
14467 builtin and then its argument prototype would still apply. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000014468char strtod ();
14469int
Illia Bobyra96d5442023-08-30 16:30:15 +020014470main (void)
Bram Moolenaar446cb832008-06-24 21:56:24 +000014471{
14472return strtod ();
14473 ;
14474 return 0;
14475}
14476_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014477if ac_fn_c_try_link "$LINENO"
14478then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000014479 ac_cv_lib_m_strtod=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020014480else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014481 ac_cv_lib_m_strtod=no
Bram Moolenaar446cb832008-06-24 21:56:24 +000014482fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014483rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014484 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000014485LIBS=$ac_check_lib_save_LIBS
14486fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014487{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_strtod" >&5
14488printf "%s\n" "$ac_cv_lib_m_strtod" >&6; }
14489if test "x$ac_cv_lib_m_strtod" = xyes
14490then :
14491 printf "%s\n" "#define HAVE_LIBM 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000014492
14493 LIBS="-lm $LIBS"
14494
14495fi
14496
Bram Moolenaar446cb832008-06-24 21:56:24 +000014497
Illia Bobyra96d5442023-08-30 16:30:15 +020014498{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for isinf()" >&5
14499printf %s "checking for isinf()... " >&6; }
Bram Moolenaara6b89762016-02-29 21:38:26 +010014500cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14501/* end confdefs.h. */
14502
14503#ifdef HAVE_MATH_H
14504# include <math.h>
14505#endif
14506#if STDC_HEADERS
14507# include <stdlib.h>
14508# include <stddef.h>
14509#endif
14510
14511int
Illia Bobyra96d5442023-08-30 16:30:15 +020014512main (void)
Bram Moolenaara6b89762016-02-29 21:38:26 +010014513{
14514int r = isinf(1.11);
14515 ;
14516 return 0;
14517}
14518_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014519if ac_fn_c_try_link "$LINENO"
14520then :
14521 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14522printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_ISINF 1" >>confdefs.h
Bram Moolenaara6b89762016-02-29 21:38:26 +010014523
Illia Bobyra96d5442023-08-30 16:30:15 +020014524else $as_nop
14525 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14526printf "%s\n" "no" >&6; }
Bram Moolenaara6b89762016-02-29 21:38:26 +010014527fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014528rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaara6b89762016-02-29 21:38:26 +010014529 conftest$ac_exeext conftest.$ac_ext
14530
Illia Bobyra96d5442023-08-30 16:30:15 +020014531{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for isnan()" >&5
14532printf %s "checking for isnan()... " >&6; }
Bram Moolenaara6b89762016-02-29 21:38:26 +010014533cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14534/* end confdefs.h. */
14535
14536#ifdef HAVE_MATH_H
14537# include <math.h>
14538#endif
14539#if STDC_HEADERS
14540# include <stdlib.h>
14541# include <stddef.h>
14542#endif
14543
14544int
Illia Bobyra96d5442023-08-30 16:30:15 +020014545main (void)
Bram Moolenaara6b89762016-02-29 21:38:26 +010014546{
14547int r = isnan(1.11);
14548 ;
14549 return 0;
14550}
14551_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014552if ac_fn_c_try_link "$LINENO"
14553then :
14554 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14555printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_ISNAN 1" >>confdefs.h
Bram Moolenaara6b89762016-02-29 21:38:26 +010014556
Illia Bobyra96d5442023-08-30 16:30:15 +020014557else $as_nop
14558 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14559printf "%s\n" "no" >&6; }
Bram Moolenaara6b89762016-02-29 21:38:26 +010014560fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014561rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaara6b89762016-02-29 21:38:26 +010014562 conftest$ac_exeext conftest.$ac_ext
14563
Illia Bobyra96d5442023-08-30 16:30:15 +020014564{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-acl argument" >&5
14565printf %s "checking --disable-acl argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000014566# Check whether --enable-acl was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020014567if test ${enable_acl+y}
14568then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000014569 enableval=$enable_acl;
Illia Bobyra96d5442023-08-30 16:30:15 +020014570else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000014571 enable_acl="yes"
Bram Moolenaar446cb832008-06-24 21:56:24 +000014572fi
14573
Bram Moolenaar071d4272004-06-13 20:20:40 +000014574if test "$enable_acl" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014575 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14576printf "%s\n" "no" >&6; }
14577 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for acl_get_file in -lposix1e" >&5
14578printf %s "checking for acl_get_file in -lposix1e... " >&6; }
14579if test ${ac_cv_lib_posix1e_acl_get_file+y}
14580then :
14581 printf %s "(cached) " >&6
14582else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014583 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000014584LIBS="-lposix1e $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014585cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014586/* end confdefs.h. */
14587
Bram Moolenaar446cb832008-06-24 21:56:24 +000014588/* Override any GCC internal prototype to avoid an error.
14589 Use char because int might match the return type of a GCC
14590 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014591char acl_get_file ();
14592int
Illia Bobyra96d5442023-08-30 16:30:15 +020014593main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014594{
Bram Moolenaar446cb832008-06-24 21:56:24 +000014595return acl_get_file ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014596 ;
14597 return 0;
14598}
14599_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014600if ac_fn_c_try_link "$LINENO"
14601then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014602 ac_cv_lib_posix1e_acl_get_file=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020014603else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014604 ac_cv_lib_posix1e_acl_get_file=no
Bram Moolenaar071d4272004-06-13 20:20:40 +000014605fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014606rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014607 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014608LIBS=$ac_check_lib_save_LIBS
14609fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014610{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix1e_acl_get_file" >&5
14611printf "%s\n" "$ac_cv_lib_posix1e_acl_get_file" >&6; }
14612if test "x$ac_cv_lib_posix1e_acl_get_file" = xyes
14613then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000014614 LIBS="$LIBS -lposix1e"
Illia Bobyra96d5442023-08-30 16:30:15 +020014615else $as_nop
14616 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for acl_get_file in -lacl" >&5
14617printf %s "checking for acl_get_file in -lacl... " >&6; }
14618if test ${ac_cv_lib_acl_acl_get_file+y}
14619then :
14620 printf %s "(cached) " >&6
14621else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014622 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000014623LIBS="-lacl $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014624cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014625/* end confdefs.h. */
14626
Bram Moolenaar446cb832008-06-24 21:56:24 +000014627/* Override any GCC internal prototype to avoid an error.
14628 Use char because int might match the return type of a GCC
14629 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014630char acl_get_file ();
14631int
Illia Bobyra96d5442023-08-30 16:30:15 +020014632main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014633{
Bram Moolenaar446cb832008-06-24 21:56:24 +000014634return acl_get_file ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014635 ;
14636 return 0;
14637}
14638_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014639if ac_fn_c_try_link "$LINENO"
14640then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014641 ac_cv_lib_acl_acl_get_file=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020014642else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014643 ac_cv_lib_acl_acl_get_file=no
Bram Moolenaar071d4272004-06-13 20:20:40 +000014644fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014645rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014646 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014647LIBS=$ac_check_lib_save_LIBS
14648fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014649{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_acl_acl_get_file" >&5
14650printf "%s\n" "$ac_cv_lib_acl_acl_get_file" >&6; }
14651if test "x$ac_cv_lib_acl_acl_get_file" = xyes
14652then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000014653 LIBS="$LIBS -lacl"
Illia Bobyra96d5442023-08-30 16:30:15 +020014654 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgetxattr in -lattr" >&5
14655printf %s "checking for fgetxattr in -lattr... " >&6; }
14656if test ${ac_cv_lib_attr_fgetxattr+y}
14657then :
14658 printf %s "(cached) " >&6
14659else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014660 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000014661LIBS="-lattr $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014662cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014663/* end confdefs.h. */
14664
Bram Moolenaar446cb832008-06-24 21:56:24 +000014665/* Override any GCC internal prototype to avoid an error.
14666 Use char because int might match the return type of a GCC
14667 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014668char fgetxattr ();
14669int
Illia Bobyra96d5442023-08-30 16:30:15 +020014670main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014671{
Bram Moolenaar446cb832008-06-24 21:56:24 +000014672return fgetxattr ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014673 ;
14674 return 0;
14675}
14676_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014677if ac_fn_c_try_link "$LINENO"
14678then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014679 ac_cv_lib_attr_fgetxattr=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020014680else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014681 ac_cv_lib_attr_fgetxattr=no
Bram Moolenaar071d4272004-06-13 20:20:40 +000014682fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014683rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014684 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014685LIBS=$ac_check_lib_save_LIBS
14686fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014687{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_attr_fgetxattr" >&5
14688printf "%s\n" "$ac_cv_lib_attr_fgetxattr" >&6; }
14689if test "x$ac_cv_lib_attr_fgetxattr" = xyes
14690then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000014691 LIBS="$LIBS -lattr"
Bram Moolenaar071d4272004-06-13 20:20:40 +000014692fi
14693
Bram Moolenaar071d4272004-06-13 20:20:40 +000014694fi
14695
14696fi
14697
14698
Illia Bobyra96d5442023-08-30 16:30:15 +020014699 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for POSIX ACL support" >&5
14700printf %s "checking for POSIX ACL support... " >&6; }
Bram Moolenaard6d30422018-01-28 22:48:55 +010014701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014702/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000014703
14704#include <sys/types.h>
14705#ifdef HAVE_SYS_ACL_H
14706# include <sys/acl.h>
14707#endif
14708acl_t acl;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014709int
Illia Bobyra96d5442023-08-30 16:30:15 +020014710main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014711{
Bram Moolenaar071d4272004-06-13 20:20:40 +000014712acl = acl_get_file("foo", ACL_TYPE_ACCESS);
14713 acl_set_file("foo", ACL_TYPE_ACCESS, acl);
14714 acl_free(acl);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014715 ;
14716 return 0;
14717}
14718_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014719if ac_fn_c_try_link "$LINENO"
14720then :
14721 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14722printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_POSIX_ACL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000014723
Illia Bobyra96d5442023-08-30 16:30:15 +020014724else $as_nop
14725 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14726printf "%s\n" "no" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014727fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014728rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014729 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000014730
Illia Bobyra96d5442023-08-30 16:30:15 +020014731 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for acl_get in -lsec" >&5
14732printf %s "checking for acl_get in -lsec... " >&6; }
14733if test ${ac_cv_lib_sec_acl_get+y}
14734then :
14735 printf %s "(cached) " >&6
14736else $as_nop
Bram Moolenaar8d462f92012-02-05 22:51:33 +010014737 ac_check_lib_save_LIBS=$LIBS
14738LIBS="-lsec $LIBS"
14739cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14740/* end confdefs.h. */
14741
14742/* Override any GCC internal prototype to avoid an error.
14743 Use char because int might match the return type of a GCC
14744 builtin and then its argument prototype would still apply. */
Bram Moolenaar8d462f92012-02-05 22:51:33 +010014745char acl_get ();
14746int
Illia Bobyra96d5442023-08-30 16:30:15 +020014747main (void)
Bram Moolenaar8d462f92012-02-05 22:51:33 +010014748{
14749return acl_get ();
14750 ;
14751 return 0;
14752}
14753_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014754if ac_fn_c_try_link "$LINENO"
14755then :
Bram Moolenaar8d462f92012-02-05 22:51:33 +010014756 ac_cv_lib_sec_acl_get=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020014757else $as_nop
Bram Moolenaar8d462f92012-02-05 22:51:33 +010014758 ac_cv_lib_sec_acl_get=no
14759fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014760rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar8d462f92012-02-05 22:51:33 +010014761 conftest$ac_exeext conftest.$ac_ext
14762LIBS=$ac_check_lib_save_LIBS
14763fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014764{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sec_acl_get" >&5
14765printf "%s\n" "$ac_cv_lib_sec_acl_get" >&6; }
14766if test "x$ac_cv_lib_sec_acl_get" = xyes
14767then :
14768 LIBS="$LIBS -lsec"; printf "%s\n" "#define HAVE_SOLARIS_ZFS_ACL 1" >>confdefs.h
Bram Moolenaar8d462f92012-02-05 22:51:33 +010014769
Illia Bobyra96d5442023-08-30 16:30:15 +020014770else $as_nop
14771 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Solaris ACL support" >&5
14772printf %s "checking for Solaris ACL support... " >&6; }
Bram Moolenaard6d30422018-01-28 22:48:55 +010014773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014774/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000014775
14776#ifdef HAVE_SYS_ACL_H
14777# include <sys/acl.h>
14778#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014779int
Illia Bobyra96d5442023-08-30 16:30:15 +020014780main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014781{
Bram Moolenaar071d4272004-06-13 20:20:40 +000014782acl("foo", GETACLCNT, 0, NULL);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014783
14784 ;
14785 return 0;
14786}
14787_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014788if ac_fn_c_try_link "$LINENO"
14789then :
14790 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14791printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SOLARIS_ACL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000014792
Illia Bobyra96d5442023-08-30 16:30:15 +020014793else $as_nop
14794 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14795printf "%s\n" "no" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014796fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014797rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014798 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar8d462f92012-02-05 22:51:33 +010014799fi
14800
Bram Moolenaar446cb832008-06-24 21:56:24 +000014801
Illia Bobyra96d5442023-08-30 16:30:15 +020014802 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for AIX ACL support" >&5
14803printf %s "checking for AIX ACL support... " >&6; }
Bram Moolenaard6d30422018-01-28 22:48:55 +010014804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014805/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000014806
Bram Moolenaar446cb832008-06-24 21:56:24 +000014807#if STDC_HEADERS
14808# include <stdlib.h>
14809# include <stddef.h>
14810#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000014811#ifdef HAVE_SYS_ACL_H
14812# include <sys/acl.h>
14813#endif
14814#ifdef HAVE_SYS_ACCESS_H
14815# include <sys/access.h>
14816#endif
14817#define _ALL_SOURCE
14818
14819#include <sys/stat.h>
14820
14821int aclsize;
14822struct acl *aclent;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014823int
Illia Bobyra96d5442023-08-30 16:30:15 +020014824main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014825{
Bram Moolenaar071d4272004-06-13 20:20:40 +000014826aclsize = sizeof(struct acl);
14827 aclent = (void *)malloc(aclsize);
14828 statacl("foo", STX_NORMAL, aclent, aclsize);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014829
14830 ;
14831 return 0;
14832}
14833_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014834if ac_fn_c_try_link "$LINENO"
14835then :
14836 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14837printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_AIX_ACL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000014838
Illia Bobyra96d5442023-08-30 16:30:15 +020014839else $as_nop
14840 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14841printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000014842fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014843rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014844 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000014845else
Illia Bobyra96d5442023-08-30 16:30:15 +020014846 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14847printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000014848fi
14849
Bram Moolenaar3cbe0c02015-09-08 20:00:22 +020014850if test "x$GTK_CFLAGS" != "x"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014851 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pango_shape_full" >&5
14852printf %s "checking for pango_shape_full... " >&6; }
Bram Moolenaar3cbe0c02015-09-08 20:00:22 +020014853 ac_save_CFLAGS="$CFLAGS"
14854 ac_save_LIBS="$LIBS"
14855 CFLAGS="$CFLAGS $GTK_CFLAGS"
14856 LIBS="$LIBS $GTK_LIBS"
14857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14858/* end confdefs.h. */
14859#include <gtk/gtk.h>
14860int
Illia Bobyra96d5442023-08-30 16:30:15 +020014861main (void)
Bram Moolenaar3cbe0c02015-09-08 20:00:22 +020014862{
14863 pango_shape_full(NULL, 0, NULL, 0, NULL, NULL);
14864 ;
14865 return 0;
14866}
14867_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014868if ac_fn_c_try_link "$LINENO"
14869then :
14870 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14871printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_PANGO_SHAPE_FULL 1" >>confdefs.h
Bram Moolenaar3cbe0c02015-09-08 20:00:22 +020014872
Illia Bobyra96d5442023-08-30 16:30:15 +020014873else $as_nop
14874 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14875printf "%s\n" "no" >&6; }
Bram Moolenaar3cbe0c02015-09-08 20:00:22 +020014876fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014877rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar5325b9b2015-09-09 20:27:02 +020014878 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar3cbe0c02015-09-08 20:00:22 +020014879 CFLAGS="$ac_save_CFLAGS"
14880 LIBS="$ac_save_LIBS"
14881fi
14882
Illia Bobyra96d5442023-08-30 16:30:15 +020014883{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-gpm argument" >&5
14884printf %s "checking --enable-gpm argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000014885# Check whether --enable-gpm was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020014886if test ${enable_gpm+y}
14887then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000014888 enableval=$enable_gpm;
Illia Bobyra96d5442023-08-30 16:30:15 +020014889else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000014890 enable_gpm="yes"
Bram Moolenaar446cb832008-06-24 21:56:24 +000014891fi
14892
Bram Moolenaar071d4272004-06-13 20:20:40 +000014893
Bram Moolenaar0b40d082022-03-08 13:32:37 +000014894if test "$enable_gpm" = "yes" -o "$enable_gpm" = "dynamic"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014895 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_gpm" >&5
14896printf "%s\n" "$enable_gpm" >&6; }
14897 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gpm" >&5
14898printf %s "checking for gpm... " >&6; }
14899if test ${vi_cv_have_gpm+y}
14900then :
14901 printf %s "(cached) " >&6
14902else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000014903 olibs="$LIBS" ; LIBS="-lgpm"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014905/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000014906#include <gpm.h>
14907 #include <linux/keyboard.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014908int
Illia Bobyra96d5442023-08-30 16:30:15 +020014909main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014910{
Bram Moolenaar071d4272004-06-13 20:20:40 +000014911Gpm_GetLibVersion(NULL);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014912 ;
14913 return 0;
14914}
14915_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014916if ac_fn_c_try_link "$LINENO"
14917then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000014918 vi_cv_have_gpm=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020014919else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014920 vi_cv_have_gpm=no
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014921fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014922rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014923 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014924 LIBS="$olibs"
14925
14926fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014927{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_have_gpm" >&5
14928printf "%s\n" "$vi_cv_have_gpm" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000014929 if test $vi_cv_have_gpm = yes; then
Bram Moolenaar0b40d082022-03-08 13:32:37 +000014930 if test "$enable_gpm" = "yes"; then
14931 LIBS="$LIBS -lgpm"
14932 else
Illia Bobyra96d5442023-08-30 16:30:15 +020014933 printf "%s\n" "#define DYNAMIC_GPM 1" >>confdefs.h
Bram Moolenaar0b40d082022-03-08 13:32:37 +000014934
14935 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014936 printf "%s\n" "#define HAVE_GPM 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000014937
14938 fi
14939else
Illia Bobyra96d5442023-08-30 16:30:15 +020014940 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14941printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000014942fi
14943
Illia Bobyra96d5442023-08-30 16:30:15 +020014944{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-sysmouse argument" >&5
14945printf %s "checking --disable-sysmouse argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000014946# Check whether --enable-sysmouse was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020014947if test ${enable_sysmouse+y}
14948then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000014949 enableval=$enable_sysmouse;
Illia Bobyra96d5442023-08-30 16:30:15 +020014950else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000014951 enable_sysmouse="yes"
14952fi
14953
14954
14955if test "$enable_sysmouse" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014956 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14957printf "%s\n" "no" >&6; }
14958 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysmouse" >&5
14959printf %s "checking for sysmouse... " >&6; }
14960if test ${vi_cv_have_sysmouse+y}
14961then :
14962 printf %s "(cached) " >&6
14963else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000014965/* end confdefs.h. */
14966#include <sys/consio.h>
14967 #include <signal.h>
14968 #include <sys/fbio.h>
14969int
Illia Bobyra96d5442023-08-30 16:30:15 +020014970main (void)
Bram Moolenaar446cb832008-06-24 21:56:24 +000014971{
14972struct mouse_info mouse;
14973 mouse.operation = MOUSE_MODE;
14974 mouse.operation = MOUSE_SHOW;
14975 mouse.u.mode.mode = 0;
14976 mouse.u.mode.signal = SIGUSR2;
14977 ;
14978 return 0;
14979}
14980_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014981if ac_fn_c_try_link "$LINENO"
14982then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000014983 vi_cv_have_sysmouse=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020014984else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014985 vi_cv_have_sysmouse=no
Bram Moolenaar446cb832008-06-24 21:56:24 +000014986fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014987rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014988 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000014989
14990fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014991{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_have_sysmouse" >&5
14992printf "%s\n" "$vi_cv_have_sysmouse" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000014993 if test $vi_cv_have_sysmouse = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014994 printf "%s\n" "#define HAVE_SYSMOUSE 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000014995
14996 fi
14997else
Illia Bobyra96d5442023-08-30 16:30:15 +020014998 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14999printf "%s\n" "yes" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000015000fi
15001
Illia Bobyra96d5442023-08-30 16:30:15 +020015002{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FD_CLOEXEC" >&5
15003printf %s "checking for FD_CLOEXEC... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015004cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarf05da212009-11-17 16:13:15 +000015005/* end confdefs.h. */
15006#if HAVE_FCNTL_H
15007# include <fcntl.h>
15008#endif
15009int
Illia Bobyra96d5442023-08-30 16:30:15 +020015010main (void)
Bram Moolenaarf05da212009-11-17 16:13:15 +000015011{
15012 int flag = FD_CLOEXEC;
15013 ;
15014 return 0;
15015}
15016_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015017if ac_fn_c_try_compile "$LINENO"
15018then :
15019 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15020printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_FD_CLOEXEC 1" >>confdefs.h
Bram Moolenaarf05da212009-11-17 16:13:15 +000015021
Illia Bobyra96d5442023-08-30 16:30:15 +020015022else $as_nop
15023 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15024printf "%s\n" "not usable" >&6; }
Bram Moolenaarf05da212009-11-17 16:13:15 +000015025fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015026rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaarf05da212009-11-17 16:13:15 +000015027
Illia Bobyra96d5442023-08-30 16:30:15 +020015028{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for rename" >&5
15029printf %s "checking for rename... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015030cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015031/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015032#include <stdio.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015033int
Illia Bobyra96d5442023-08-30 16:30:15 +020015034main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015035{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015036rename("this", "that")
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015037 ;
15038 return 0;
15039}
15040_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015041if ac_fn_c_try_link "$LINENO"
15042then :
15043 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15044printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_RENAME 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015045
Illia Bobyra96d5442023-08-30 16:30:15 +020015046else $as_nop
15047 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15048printf "%s\n" "no" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015049fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015050rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015051 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015052
Illia Bobyra96d5442023-08-30 16:30:15 +020015053{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dirfd" >&5
15054printf %s "checking for dirfd... " >&6; }
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015055cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15056/* end confdefs.h. */
15057#include <sys/types.h>
15058#include <dirent.h>
15059int
Illia Bobyra96d5442023-08-30 16:30:15 +020015060main (void)
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015061{
15062DIR * dir=opendir("dirname"); dirfd(dir);
15063 ;
15064 return 0;
15065}
15066_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015067if ac_fn_c_try_link "$LINENO"
15068then :
15069 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15070printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_DIRFD 1" >>confdefs.h
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015071
Illia Bobyra96d5442023-08-30 16:30:15 +020015072else $as_nop
15073 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15074printf "%s\n" "not usable" >&6; }
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015075fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015076rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar9d8bfae2020-09-02 21:21:35 +020015077 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015078
Illia Bobyra96d5442023-08-30 16:30:15 +020015079{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for flock" >&5
15080printf %s "checking for flock... " >&6; }
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015081cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15082/* end confdefs.h. */
15083#include <sys/file.h>
15084int
Illia Bobyra96d5442023-08-30 16:30:15 +020015085main (void)
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015086{
15087flock(10, LOCK_SH);
15088 ;
15089 return 0;
15090}
15091_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015092if ac_fn_c_try_link "$LINENO"
15093then :
15094 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15095printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_FLOCK 1" >>confdefs.h
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015096
Illia Bobyra96d5442023-08-30 16:30:15 +020015097else $as_nop
15098 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15099printf "%s\n" "not usable" >&6; }
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015100fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015101rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar9d8bfae2020-09-02 21:21:35 +020015102 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015103
Illia Bobyra96d5442023-08-30 16:30:15 +020015104{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysctl" >&5
15105printf %s "checking for sysctl... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015106cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015107/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015108#include <sys/types.h>
15109#include <sys/sysctl.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015110int
Illia Bobyra96d5442023-08-30 16:30:15 +020015111main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015112{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015113 int mib[2], r;
15114 size_t len;
15115
15116 mib[0] = CTL_HW;
15117 mib[1] = HW_USERMEM;
15118 len = sizeof(r);
15119 (void)sysctl(mib, 2, &r, &len, (void *)0, (size_t)0);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015120
15121 ;
15122 return 0;
15123}
15124_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015125if ac_fn_c_try_compile "$LINENO"
15126then :
15127 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15128printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SYSCTL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015129
Illia Bobyra96d5442023-08-30 16:30:15 +020015130else $as_nop
15131 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15132printf "%s\n" "not usable" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015133fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015134rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015135
Illia Bobyra96d5442023-08-30 16:30:15 +020015136{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysinfo" >&5
15137printf %s "checking for sysinfo... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015138cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015139/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015140#include <sys/types.h>
15141#include <sys/sysinfo.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015142int
Illia Bobyra96d5442023-08-30 16:30:15 +020015143main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015144{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015145 struct sysinfo sinfo;
15146 int t;
15147
15148 (void)sysinfo(&sinfo);
15149 t = sinfo.totalram;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015150
15151 ;
15152 return 0;
15153}
15154_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015155if ac_fn_c_try_link "$LINENO"
15156then :
15157 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15158printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SYSINFO 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015159
Illia Bobyra96d5442023-08-30 16:30:15 +020015160else $as_nop
15161 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15162printf "%s\n" "not usable" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015163fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015164rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaare2982d62021-10-06 11:27:21 +010015165 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015166
Illia Bobyra96d5442023-08-30 16:30:15 +020015167{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysinfo.mem_unit" >&5
15168printf %s "checking for sysinfo.mem_unit... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015169cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar914572a2007-05-01 11:37:47 +000015170/* end confdefs.h. */
15171#include <sys/types.h>
15172#include <sys/sysinfo.h>
15173int
Illia Bobyra96d5442023-08-30 16:30:15 +020015174main (void)
Bram Moolenaar914572a2007-05-01 11:37:47 +000015175{
15176 struct sysinfo sinfo;
Bram Moolenaar3c7ad012013-06-11 19:53:45 +020015177 sinfo.mem_unit = 1;
Bram Moolenaar914572a2007-05-01 11:37:47 +000015178
15179 ;
15180 return 0;
15181}
15182_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015183if ac_fn_c_try_compile "$LINENO"
15184then :
15185 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15186printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SYSINFO_MEM_UNIT 1" >>confdefs.h
Bram Moolenaar914572a2007-05-01 11:37:47 +000015187
Illia Bobyra96d5442023-08-30 16:30:15 +020015188else $as_nop
15189 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15190printf "%s\n" "no" >&6; }
Bram Moolenaar914572a2007-05-01 11:37:47 +000015191fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015192rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015193
Illia Bobyra96d5442023-08-30 16:30:15 +020015194{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysinfo.uptime" >&5
15195printf %s "checking for sysinfo.uptime... " >&6; }
Bram Moolenaarf52f0602021-03-10 21:26:37 +010015196cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15197/* end confdefs.h. */
15198#include <sys/types.h>
15199#include <sys/sysinfo.h>
15200int
Illia Bobyra96d5442023-08-30 16:30:15 +020015201main (void)
Bram Moolenaarf52f0602021-03-10 21:26:37 +010015202{
15203 struct sysinfo sinfo;
15204 long ut;
15205
15206 (void)sysinfo(&sinfo);
15207 ut = sinfo.uptime;
15208
15209 ;
15210 return 0;
15211}
15212_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015213if ac_fn_c_try_compile "$LINENO"
15214then :
15215 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15216printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SYSINFO_UPTIME 1" >>confdefs.h
Bram Moolenaarf52f0602021-03-10 21:26:37 +010015217
Illia Bobyra96d5442023-08-30 16:30:15 +020015218else $as_nop
15219 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15220printf "%s\n" "no" >&6; }
Bram Moolenaarf52f0602021-03-10 21:26:37 +010015221fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015222rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaarf52f0602021-03-10 21:26:37 +010015223
Illia Bobyra96d5442023-08-30 16:30:15 +020015224{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysconf" >&5
15225printf %s "checking for sysconf... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015226cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015227/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015228#include <unistd.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015229int
Illia Bobyra96d5442023-08-30 16:30:15 +020015230main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015231{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015232 (void)sysconf(_SC_PAGESIZE);
15233 (void)sysconf(_SC_PHYS_PAGES);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015234
15235 ;
15236 return 0;
15237}
15238_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015239if ac_fn_c_try_compile "$LINENO"
15240then :
15241 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15242printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SYSCONF 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015243
Illia Bobyra96d5442023-08-30 16:30:15 +020015244else $as_nop
15245 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15246printf "%s\n" "not usable" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015247fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015248rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000015249
Illia Bobyra96d5442023-08-30 16:30:15 +020015250{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _SC_SIGSTKSZ via sysconf()" >&5
15251printf %s "checking for _SC_SIGSTKSZ via sysconf()... " >&6; }
Bram Moolenaar0e62a672021-02-25 17:17:56 +010015252cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15253/* end confdefs.h. */
15254#include <unistd.h>
15255int
Illia Bobyra96d5442023-08-30 16:30:15 +020015256main (void)
Bram Moolenaar0e62a672021-02-25 17:17:56 +010015257{
15258 (void)sysconf(_SC_SIGSTKSZ);
15259
15260 ;
15261 return 0;
15262}
15263_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015264if ac_fn_c_try_compile "$LINENO"
15265then :
15266 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15267printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SYSCONF_SIGSTKSZ 1" >>confdefs.h
Bram Moolenaar0e62a672021-02-25 17:17:56 +010015268
Illia Bobyra96d5442023-08-30 16:30:15 +020015269else $as_nop
15270 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15271printf "%s\n" "not usable" >&6; }
Bram Moolenaar0e62a672021-02-25 17:17:56 +010015272fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015273rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0e62a672021-02-25 17:17:56 +010015274
Bram Moolenaar914703b2010-05-31 21:59:46 +020015275# The cast to long int works around a bug in the HP C Compiler
15276# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15277# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15278# This bug is HP SR number 8606223364.
Illia Bobyra96d5442023-08-30 16:30:15 +020015279{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
15280printf %s "checking size of int... " >&6; }
15281if test ${ac_cv_sizeof_int+y}
15282then :
15283 printf %s "(cached) " >&6
15284else $as_nop
15285 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"
15286then :
Bram Moolenaar914703b2010-05-31 21:59:46 +020015287
Illia Bobyra96d5442023-08-30 16:30:15 +020015288else $as_nop
Bram Moolenaar914703b2010-05-31 21:59:46 +020015289 if test "$ac_cv_type_int" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015290 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15291printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +010015292as_fn_error 77 "cannot compute sizeof (int)
15293See \`config.log' for more details" "$LINENO" 5; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020015294 else
15295 ac_cv_sizeof_int=0
15296 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000015297fi
15298
Bram Moolenaar446cb832008-06-24 21:56:24 +000015299fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015300{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
15301printf "%s\n" "$ac_cv_sizeof_int" >&6; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020015302
15303
15304
Illia Bobyra96d5442023-08-30 16:30:15 +020015305printf "%s\n" "#define SIZEOF_INT $ac_cv_sizeof_int" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015306
15307
Bram Moolenaar914703b2010-05-31 21:59:46 +020015308# The cast to long int works around a bug in the HP C Compiler
15309# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15310# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15311# This bug is HP SR number 8606223364.
Illia Bobyra96d5442023-08-30 16:30:15 +020015312{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
15313printf %s "checking size of long... " >&6; }
15314if test ${ac_cv_sizeof_long+y}
15315then :
15316 printf %s "(cached) " >&6
15317else $as_nop
15318 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"
15319then :
Bram Moolenaar914703b2010-05-31 21:59:46 +020015320
Illia Bobyra96d5442023-08-30 16:30:15 +020015321else $as_nop
Bram Moolenaar914703b2010-05-31 21:59:46 +020015322 if test "$ac_cv_type_long" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015323 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15324printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +010015325as_fn_error 77 "cannot compute sizeof (long)
15326See \`config.log' for more details" "$LINENO" 5; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020015327 else
15328 ac_cv_sizeof_long=0
15329 fi
15330fi
15331
15332fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015333{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
15334printf "%s\n" "$ac_cv_sizeof_long" >&6; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020015335
15336
15337
Illia Bobyra96d5442023-08-30 16:30:15 +020015338printf "%s\n" "#define SIZEOF_LONG $ac_cv_sizeof_long" >>confdefs.h
Bram Moolenaar914703b2010-05-31 21:59:46 +020015339
15340
15341# The cast to long int works around a bug in the HP C Compiler
15342# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15343# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15344# This bug is HP SR number 8606223364.
Illia Bobyra96d5442023-08-30 16:30:15 +020015345{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
15346printf %s "checking size of time_t... " >&6; }
15347if test ${ac_cv_sizeof_time_t+y}
15348then :
15349 printf %s "(cached) " >&6
15350else $as_nop
15351 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "$ac_includes_default"
15352then :
Bram Moolenaar914703b2010-05-31 21:59:46 +020015353
Illia Bobyra96d5442023-08-30 16:30:15 +020015354else $as_nop
Bram Moolenaar914703b2010-05-31 21:59:46 +020015355 if test "$ac_cv_type_time_t" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015356 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15357printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +010015358as_fn_error 77 "cannot compute sizeof (time_t)
15359See \`config.log' for more details" "$LINENO" 5; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020015360 else
15361 ac_cv_sizeof_time_t=0
15362 fi
Bram Moolenaar644fdff2010-05-30 13:26:21 +020015363fi
15364
15365fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015366{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
15367printf "%s\n" "$ac_cv_sizeof_time_t" >&6; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020015368
15369
15370
Illia Bobyra96d5442023-08-30 16:30:15 +020015371printf "%s\n" "#define SIZEOF_TIME_T $ac_cv_sizeof_time_t" >>confdefs.h
Bram Moolenaar644fdff2010-05-30 13:26:21 +020015372
15373
Bram Moolenaar914703b2010-05-31 21:59:46 +020015374# The cast to long int works around a bug in the HP C Compiler
15375# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15376# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15377# This bug is HP SR number 8606223364.
Illia Bobyra96d5442023-08-30 16:30:15 +020015378{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
15379printf %s "checking size of off_t... " >&6; }
15380if test ${ac_cv_sizeof_off_t+y}
15381then :
15382 printf %s "(cached) " >&6
15383else $as_nop
15384 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default"
15385then :
Bram Moolenaar914703b2010-05-31 21:59:46 +020015386
Illia Bobyra96d5442023-08-30 16:30:15 +020015387else $as_nop
Bram Moolenaar914703b2010-05-31 21:59:46 +020015388 if test "$ac_cv_type_off_t" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015389 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15390printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +010015391as_fn_error 77 "cannot compute sizeof (off_t)
15392See \`config.log' for more details" "$LINENO" 5; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020015393 else
15394 ac_cv_sizeof_off_t=0
15395 fi
15396fi
15397
15398fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015399{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
15400printf "%s\n" "$ac_cv_sizeof_off_t" >&6; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020015401
15402
15403
Illia Bobyra96d5442023-08-30 16:30:15 +020015404printf "%s\n" "#define SIZEOF_OFF_T $ac_cv_sizeof_off_t" >>confdefs.h
Bram Moolenaar914703b2010-05-31 21:59:46 +020015405
15406
15407
Illia Bobyra96d5442023-08-30 16:30:15 +020015408printf "%s\n" "#define VIM_SIZEOF_INT $ac_cv_sizeof_int" >>confdefs.h
Bram Moolenaara2aa31a2014-02-23 22:52:40 +010015409
Illia Bobyra96d5442023-08-30 16:30:15 +020015410printf "%s\n" "#define VIM_SIZEOF_LONG $ac_cv_sizeof_long" >>confdefs.h
Bram Moolenaara2aa31a2014-02-23 22:52:40 +010015411
15412
Illia Bobyra96d5442023-08-30 16:30:15 +020015413{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking uint32_t is 32 bits" >&5
15414printf %s "checking uint32_t is 32 bits... " >&6; }
15415if test "$cross_compiling" = yes
15416then :
15417 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check uint32_t when cross-compiling." >&5
15418printf "%s\n" "$as_me: WARNING: cannot check uint32_t when cross-compiling." >&2;}
15419else $as_nop
Bram Moolenaarfa7584c2010-05-19 21:57:45 +020015420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15421/* end confdefs.h. */
15422
15423#ifdef HAVE_STDINT_H
15424# include <stdint.h>
15425#endif
15426#ifdef HAVE_INTTYPES_H
15427# include <inttypes.h>
15428#endif
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010015429int main() {
Bram Moolenaarfa7584c2010-05-19 21:57:45 +020015430 uint32_t nr1 = (uint32_t)-1;
15431 uint32_t nr2 = (uint32_t)0xffffffffUL;
Bram Moolenaar52897832020-07-02 22:50:37 +020015432 if (sizeof(uint32_t) != 4 || nr1 != 0xffffffffUL || nr2 + 1 != 0) return 1;
15433 return 0;
Bram Moolenaarfa7584c2010-05-19 21:57:45 +020015434}
15435_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015436if ac_fn_c_try_run "$LINENO"
15437then :
15438 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15439printf "%s\n" "ok" >&6; }
15440else $as_nop
Bram Moolenaar7db77842014-03-27 17:40:59 +010015441 as_fn_error $? "WRONG! uint32_t not defined correctly." "$LINENO" 5
Bram Moolenaarfa7584c2010-05-19 21:57:45 +020015442fi
15443rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15444 conftest.$ac_objext conftest.beam conftest.$ac_ext
15445fi
15446
15447
Bram Moolenaar446cb832008-06-24 21:56:24 +000015448
Bram Moolenaar071d4272004-06-13 20:20:40 +000015449bcopy_test_prog='
Bram Moolenaar446cb832008-06-24 21:56:24 +000015450#include "confdefs.h"
15451#ifdef HAVE_STRING_H
15452# include <string.h>
15453#endif
15454#if STDC_HEADERS
15455# include <stdlib.h>
15456# include <stddef.h>
15457#endif
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010015458int main() {
Bram Moolenaar071d4272004-06-13 20:20:40 +000015459 char buf[10];
15460 strcpy(buf, "abcdefghi");
15461 mch_memmove(buf, buf + 2, 3);
15462 if (strncmp(buf, "ababcf", 6))
15463 exit(1);
15464 strcpy(buf, "abcdefghi");
15465 mch_memmove(buf + 2, buf, 3);
15466 if (strncmp(buf, "cdedef", 6))
15467 exit(1);
15468 exit(0); /* libc version works properly. */
15469}'
15470
Illia Bobyra96d5442023-08-30 16:30:15 +020015471{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether memmove handles overlaps" >&5
15472printf %s "checking whether memmove handles overlaps... " >&6; }
15473if test ${vim_cv_memmove_handles_overlap+y}
15474then :
15475 printf %s "(cached) " >&6
15476else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000015477
Illia Bobyra96d5442023-08-30 16:30:15 +020015478 if test "$cross_compiling" = yes
15479then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015480
Bram Moolenaar7db77842014-03-27 17:40:59 +010015481 as_fn_error $? "cross-compiling: please set 'vim_cv_memmove_handles_overlap'" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000015482
Illia Bobyra96d5442023-08-30 16:30:15 +020015483else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15485/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015486#define mch_memmove(s,d,l) memmove(d,s,l) $bcopy_test_prog
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015487_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015488if ac_fn_c_try_run "$LINENO"
15489then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015490
15491 vim_cv_memmove_handles_overlap=yes
15492
Illia Bobyra96d5442023-08-30 16:30:15 +020015493else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000015494
15495 vim_cv_memmove_handles_overlap=no
15496
15497fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015498rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15499 conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015500fi
15501
15502
Bram Moolenaar446cb832008-06-24 21:56:24 +000015503fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015504{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_memmove_handles_overlap" >&5
15505printf "%s\n" "$vim_cv_memmove_handles_overlap" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000015506
15507if test "x$vim_cv_memmove_handles_overlap" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015508 printf "%s\n" "#define USEMEMMOVE 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000015509
Bram Moolenaar071d4272004-06-13 20:20:40 +000015510else
Illia Bobyra96d5442023-08-30 16:30:15 +020015511 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether bcopy handles overlaps" >&5
15512printf %s "checking whether bcopy handles overlaps... " >&6; }
15513if test ${vim_cv_bcopy_handles_overlap+y}
15514then :
15515 printf %s "(cached) " >&6
15516else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000015517
Illia Bobyra96d5442023-08-30 16:30:15 +020015518 if test "$cross_compiling" = yes
15519then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015520
Bram Moolenaar7db77842014-03-27 17:40:59 +010015521 as_fn_error $? "cross-compiling: please set 'vim_cv_bcopy_handles_overlap'" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000015522
Illia Bobyra96d5442023-08-30 16:30:15 +020015523else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15525/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000015526#define mch_bcopy(s,d,l) bcopy(d,s,l) $bcopy_test_prog
15527_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015528if ac_fn_c_try_run "$LINENO"
15529then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015530
15531 vim_cv_bcopy_handles_overlap=yes
15532
Illia Bobyra96d5442023-08-30 16:30:15 +020015533else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000015534
15535 vim_cv_bcopy_handles_overlap=no
15536
15537fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015538rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15539 conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015540fi
15541
15542
Bram Moolenaar446cb832008-06-24 21:56:24 +000015543fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015544{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_bcopy_handles_overlap" >&5
15545printf "%s\n" "$vim_cv_bcopy_handles_overlap" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000015546
15547 if test "x$vim_cv_bcopy_handles_overlap" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015548 printf "%s\n" "#define USEBCOPY 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015549
Bram Moolenaar446cb832008-06-24 21:56:24 +000015550 else
Illia Bobyra96d5442023-08-30 16:30:15 +020015551 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether memcpy handles overlaps" >&5
15552printf %s "checking whether memcpy handles overlaps... " >&6; }
15553if test ${vim_cv_memcpy_handles_overlap+y}
15554then :
15555 printf %s "(cached) " >&6
15556else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000015557
Illia Bobyra96d5442023-08-30 16:30:15 +020015558 if test "$cross_compiling" = yes
15559then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015560
Bram Moolenaar7db77842014-03-27 17:40:59 +010015561 as_fn_error $? "cross-compiling: please set 'vim_cv_memcpy_handles_overlap'" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000015562
Illia Bobyra96d5442023-08-30 16:30:15 +020015563else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15565/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000015566#define mch_memcpy(s,d,l) memcpy(d,s,l) $bcopy_test_prog
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015567_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015568if ac_fn_c_try_run "$LINENO"
15569then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015570
15571 vim_cv_memcpy_handles_overlap=yes
15572
Illia Bobyra96d5442023-08-30 16:30:15 +020015573else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000015574
15575 vim_cv_memcpy_handles_overlap=no
15576
Bram Moolenaar071d4272004-06-13 20:20:40 +000015577fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015578rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15579 conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000015580fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000015581
15582
Bram Moolenaar071d4272004-06-13 20:20:40 +000015583fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015584{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_memcpy_handles_overlap" >&5
15585printf "%s\n" "$vim_cv_memcpy_handles_overlap" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000015586
15587 if test "x$vim_cv_memcpy_handles_overlap" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015588 printf "%s\n" "#define USEMEMCPY 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000015589
15590 fi
15591 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000015592fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000015593
Bram Moolenaar071d4272004-06-13 20:20:40 +000015594
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015595if test "x$with_x" = "xyes"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000015596 cflags_save=$CFLAGS
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015597 libs_save=$LIBS
15598 LIBS="$LIBS $X_LIBS $GUI_LIB_LOC $GUI_X_LIBS $X_PRE_LIBS $X_LIB $X_EXTRA_LIBS"
15599 CFLAGS="$CFLAGS $X_CFLAGS"
15600
Illia Bobyra96d5442023-08-30 16:30:15 +020015601 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether X_LOCALE needed" >&5
15602printf %s "checking whether X_LOCALE needed... " >&6; }
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015604/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015605#include <X11/Xlocale.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015606int
Illia Bobyra96d5442023-08-30 16:30:15 +020015607main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015608{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015609
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015610 ;
15611 return 0;
15612}
15613_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015614if ac_fn_c_try_compile "$LINENO"
15615then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015617/* end confdefs.h. */
15618
Bram Moolenaar446cb832008-06-24 21:56:24 +000015619/* Override any GCC internal prototype to avoid an error.
15620 Use char because int might match the return type of a GCC
15621 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015622char _Xsetlocale ();
15623int
Illia Bobyra96d5442023-08-30 16:30:15 +020015624main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015625{
Bram Moolenaar446cb832008-06-24 21:56:24 +000015626return _Xsetlocale ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015627 ;
15628 return 0;
15629}
15630_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015631if ac_fn_c_try_link "$LINENO"
15632then :
15633 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15634printf "%s\n" "yes" >&6; }
15635 printf "%s\n" "#define X_LOCALE 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015636
Illia Bobyra96d5442023-08-30 16:30:15 +020015637else $as_nop
15638 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15639printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015640fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015641rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015642 conftest$ac_exeext conftest.$ac_ext
Illia Bobyra96d5442023-08-30 16:30:15 +020015643else $as_nop
15644 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15645printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015646fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015647rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015648
Illia Bobyra96d5442023-08-30 16:30:15 +020015649 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether Xutf8SetWMProperties() can be used" >&5
15650printf %s "checking whether Xutf8SetWMProperties() can be used... " >&6; }
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15652/* end confdefs.h. */
15653
15654/* Override any GCC internal prototype to avoid an error.
15655 Use char because int might match the return type of a GCC
15656 builtin and then its argument prototype would still apply. */
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015657char Xutf8SetWMProperties ();
15658int
Illia Bobyra96d5442023-08-30 16:30:15 +020015659main (void)
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015660{
15661return Xutf8SetWMProperties ();
15662 ;
15663 return 0;
15664}
15665_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015666if ac_fn_c_try_link "$LINENO"
15667then :
15668 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15669printf "%s\n" "yes" >&6; }
15670 printf "%s\n" "#define HAVE_XUTF8SETWMPROPERTIES 1" >>confdefs.h
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015671
Illia Bobyra96d5442023-08-30 16:30:15 +020015672else $as_nop
15673 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15674printf "%s\n" "no" >&6; }
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015675fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015676rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015677 conftest$ac_exeext conftest.$ac_ext
15678
Bram Moolenaar071d4272004-06-13 20:20:40 +000015679 CFLAGS=$cflags_save
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015680 LIBS=$libs_save
Bram Moolenaar071d4272004-06-13 20:20:40 +000015681fi
15682
Illia Bobyra96d5442023-08-30 16:30:15 +020015683{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _xpg4_setrunelocale in -lxpg4" >&5
15684printf %s "checking for _xpg4_setrunelocale in -lxpg4... " >&6; }
15685if test ${ac_cv_lib_xpg4__xpg4_setrunelocale+y}
15686then :
15687 printf %s "(cached) " >&6
15688else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015689 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000015690LIBS="-lxpg4 $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015691cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015692/* end confdefs.h. */
15693
Bram Moolenaar446cb832008-06-24 21:56:24 +000015694/* Override any GCC internal prototype to avoid an error.
15695 Use char because int might match the return type of a GCC
15696 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015697char _xpg4_setrunelocale ();
15698int
Illia Bobyra96d5442023-08-30 16:30:15 +020015699main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015700{
Bram Moolenaar446cb832008-06-24 21:56:24 +000015701return _xpg4_setrunelocale ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015702 ;
15703 return 0;
15704}
15705_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015706if ac_fn_c_try_link "$LINENO"
15707then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015708 ac_cv_lib_xpg4__xpg4_setrunelocale=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020015709else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015710 ac_cv_lib_xpg4__xpg4_setrunelocale=no
Bram Moolenaar071d4272004-06-13 20:20:40 +000015711fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015712rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015713 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015714LIBS=$ac_check_lib_save_LIBS
15715fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015716{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xpg4__xpg4_setrunelocale" >&5
15717printf "%s\n" "$ac_cv_lib_xpg4__xpg4_setrunelocale" >&6; }
15718if test "x$ac_cv_lib_xpg4__xpg4_setrunelocale" = xyes
15719then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000015720 LIBS="$LIBS -lxpg4"
Bram Moolenaar071d4272004-06-13 20:20:40 +000015721fi
15722
15723
Illia Bobyra96d5442023-08-30 16:30:15 +020015724{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to create tags" >&5
15725printf %s "checking how to create tags... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015726test -f tags && mv tags tags.save
Bram Moolenaar5897e0c2011-05-10 15:42:03 +020015727if (eval ctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then
Bram Moolenaar509ff062020-01-02 22:38:49 +010015728 TAGPRG="ctags -I INIT+,INIT2+,INIT3+,INIT4+,INIT5+ --fields=+S"
Bram Moolenaar5897e0c2011-05-10 15:42:03 +020015729elif (eval exctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then
Bram Moolenaar509ff062020-01-02 22:38:49 +010015730 TAGPRG="exctags -I INIT+,INIT2+,INIT3+,INIT4+,INIT5+ --fields=+S"
Bram Moolenaar5897e0c2011-05-10 15:42:03 +020015731elif (eval exuberant-ctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then
Bram Moolenaar509ff062020-01-02 22:38:49 +010015732 TAGPRG="exuberant-ctags -I INIT+,INIT2+,INIT3+,INIT4+,INIT5+ --fields=+S"
Bram Moolenaar071d4272004-06-13 20:20:40 +000015733else
Bram Moolenaar0c7ce772009-05-13 12:49:39 +000015734 TAGPRG="ctags"
Bram Moolenaar071d4272004-06-13 20:20:40 +000015735 (eval etags /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="etags"
15736 (eval etags -c /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="etags -c"
15737 (eval ctags /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags"
15738 (eval ctags -t /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -t"
15739 (eval ctags -ts /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -ts"
15740 (eval ctags -tvs /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -tvs"
15741 (eval ctags -i+m /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -i+m"
15742fi
15743test -f tags.save && mv tags.save tags
Illia Bobyra96d5442023-08-30 16:30:15 +020015744{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $TAGPRG" >&5
15745printf "%s\n" "$TAGPRG" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015746
Illia Bobyra96d5442023-08-30 16:30:15 +020015747{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run man with a section nr" >&5
15748printf %s "checking how to run man with a section nr... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015749MANDEF="man"
Bram Moolenaar8b131502008-02-13 09:28:19 +000015750(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 +020015751{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MANDEF" >&5
15752printf "%s\n" "$MANDEF" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015753if test "$MANDEF" = "man -s"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015754 printf "%s\n" "#define USEMAN_S 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015755
15756fi
15757
Illia Bobyra96d5442023-08-30 16:30:15 +020015758{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-nls argument" >&5
15759printf %s "checking --disable-nls argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000015760# Check whether --enable-nls was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020015761if test ${enable_nls+y}
15762then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015763 enableval=$enable_nls;
Illia Bobyra96d5442023-08-30 16:30:15 +020015764else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000015765 enable_nls="yes"
Bram Moolenaar446cb832008-06-24 21:56:24 +000015766fi
15767
Bram Moolenaar071d4272004-06-13 20:20:40 +000015768
15769if test "$enable_nls" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015770 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15771printf "%s\n" "no" >&6; }
Bram Moolenaar2389c3c2005-05-22 22:07:59 +000015772
15773 INSTALL_LANGS=install-languages
15774
15775 INSTALL_TOOL_LANGS=install-tool-languages
15776
15777
Bram Moolenaar071d4272004-06-13 20:20:40 +000015778 # Extract the first word of "msgfmt", so it can be a program name with args.
15779set dummy msgfmt; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +020015780{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15781printf %s "checking for $ac_word... " >&6; }
15782if test ${ac_cv_prog_MSGFMT+y}
15783then :
15784 printf %s "(cached) " >&6
15785else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000015786 if test -n "$MSGFMT"; then
15787 ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
15788else
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015789as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15790for as_dir in $PATH
15791do
15792 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +020015793 case $as_dir in #(((
15794 '') as_dir=./ ;;
15795 */) ;;
15796 *) as_dir=$as_dir/ ;;
15797 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015798 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +020015799 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015800 ac_cv_prog_MSGFMT="msgfmt"
Illia Bobyra96d5442023-08-30 16:30:15 +020015801 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015802 break 2
15803 fi
15804done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015805 done
Bram Moolenaar446cb832008-06-24 21:56:24 +000015806IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015807
Bram Moolenaar071d4272004-06-13 20:20:40 +000015808fi
15809fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015810MSGFMT=$ac_cv_prog_MSGFMT
Bram Moolenaar071d4272004-06-13 20:20:40 +000015811if test -n "$MSGFMT"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015812 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
15813printf "%s\n" "$MSGFMT" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015814else
Illia Bobyra96d5442023-08-30 16:30:15 +020015815 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15816printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015817fi
15818
Bram Moolenaar446cb832008-06-24 21:56:24 +000015819
Illia Bobyra96d5442023-08-30 16:30:15 +020015820 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for NLS" >&5
15821printf %s "checking for NLS... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015822 if test -f po/Makefile; then
15823 have_gettext="no"
15824 if test -n "$MSGFMT"; then
Bram Moolenaar49b6a572013-11-17 20:32:54 +010015825 olibs=$LIBS
15826 LIBS=""
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015828/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015829#include <libintl.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015830int
Illia Bobyra96d5442023-08-30 16:30:15 +020015831main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015832{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015833gettext("Test");
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015834 ;
15835 return 0;
15836}
15837_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015838if ac_fn_c_try_link "$LINENO"
15839then :
15840 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gettext() works" >&5
15841printf "%s\n" "gettext() works" >&6; }; have_gettext="yes"; LIBS=$olibs
15842else $as_nop
Bram Moolenaar49b6a572013-11-17 20:32:54 +010015843 LIBS="-lintl"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015845/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015846#include <libintl.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015847int
Illia Bobyra96d5442023-08-30 16:30:15 +020015848main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015849{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015850gettext("Test");
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015851 ;
15852 return 0;
15853}
15854_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015855if ac_fn_c_try_link "$LINENO"
15856then :
15857 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gettext() works with -lintl" >&5
15858printf "%s\n" "gettext() works with -lintl" >&6; }; have_gettext="yes";
Bram Moolenaar49b6a572013-11-17 20:32:54 +010015859 LIBS="$olibs -lintl"
Illia Bobyra96d5442023-08-30 16:30:15 +020015860else $as_nop
15861 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gettext() doesn't work" >&5
15862printf "%s\n" "gettext() doesn't work" >&6; };
Bram Moolenaar071d4272004-06-13 20:20:40 +000015863 LIBS=$olibs
15864fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015865rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015866 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000015867fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015868rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015869 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000015870 else
Illia Bobyra96d5442023-08-30 16:30:15 +020015871 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: msgfmt not found - disabled" >&5
15872printf "%s\n" "msgfmt not found - disabled" >&6; };
Bram Moolenaar071d4272004-06-13 20:20:40 +000015873 fi
Martin Tournoij7904fa42022-10-04 16:28:45 +010015874 if test $have_gettext = "yes" -a "x$features" != "xtiny"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015875 printf "%s\n" "#define HAVE_GETTEXT 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015876
15877 MAKEMO=yes
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015878
Illia Bobyra96d5442023-08-30 16:30:15 +020015879 ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset"
15880if test "x$ac_cv_func_bind_textdomain_codeset" = xyes
15881then :
15882 printf "%s\n" "#define HAVE_BIND_TEXTDOMAIN_CODESET 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015883
Bram Moolenaar071d4272004-06-13 20:20:40 +000015884fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000015885
Christ van Willegence0ef912024-06-20 23:41:59 +020015886 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dgettext" >&5
15887printf %s "checking for dgettext... " >&6; }
15888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15889/* end confdefs.h. */
15890#include <libintl.h>
15891int
15892main (void)
15893{
15894dgettext("Test", "Test");
15895 ;
15896 return 0;
15897}
15898_ACEOF
15899if ac_fn_c_try_link "$LINENO"
15900then :
15901 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15902printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_DGETTEXT 1" >>confdefs.h
15903
15904else $as_nop
15905 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15906printf "%s\n" "no" >&6; }
15907fi
15908rm -f core conftest.err conftest.$ac_objext conftest.beam \
15909 conftest$ac_exeext conftest.$ac_ext
Illia Bobyra96d5442023-08-30 16:30:15 +020015910 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _nl_msg_cat_cntr" >&5
15911printf %s "checking for _nl_msg_cat_cntr... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015913/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015914#include <libintl.h>
15915 extern int _nl_msg_cat_cntr;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015916int
Illia Bobyra96d5442023-08-30 16:30:15 +020015917main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015918{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015919++_nl_msg_cat_cntr;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015920 ;
15921 return 0;
15922}
15923_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015924if ac_fn_c_try_link "$LINENO"
15925then :
15926 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15927printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_NL_MSG_CAT_CNTR 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015928
Illia Bobyra96d5442023-08-30 16:30:15 +020015929else $as_nop
15930 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15931printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015932fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015933rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015934 conftest$ac_exeext conftest.$ac_ext
Illia Bobyra96d5442023-08-30 16:30:15 +020015935 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if msgfmt supports --desktop" >&5
15936printf %s "checking if msgfmt supports --desktop... " >&6; }
Bram Moolenaar26096cc2019-04-11 15:25:40 +020015937 MSGFMT_DESKTOP=
15938 if "$MSGFMT" --help | grep -e '--desktop' >/dev/null; then
Bram Moolenaar62a88f42019-06-07 20:44:40 +020015939 if "$MSGFMT" --version | grep '0.19.[3-7]$' >/dev/null; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015940 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: broken" >&5
15941printf "%s\n" "broken" >&6; }
Bram Moolenaar62a88f42019-06-07 20:44:40 +020015942 else
Illia Bobyra96d5442023-08-30 16:30:15 +020015943 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15944printf "%s\n" "yes" >&6; }
Bram Moolenaar62a88f42019-06-07 20:44:40 +020015945 MSGFMT_DESKTOP="gvim.desktop vim.desktop"
15946 fi
Bram Moolenaar26096cc2019-04-11 15:25:40 +020015947 else
Illia Bobyra96d5442023-08-30 16:30:15 +020015948 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15949printf "%s\n" "no" >&6; }
Bram Moolenaar26096cc2019-04-11 15:25:40 +020015950 fi
15951
Vladimír Marek87319172024-04-11 21:54:34 +020015952 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $MSGFMT supports --no-convert" >&5
15953printf %s "checking if $MSGFMT supports --no-convert... " >&6; }
RestorerZe498caf2024-03-12 22:11:36 +010015954 if "$MSGFMT" --help | grep -q -- '--no-convert' >/dev/null; then
15955 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15956printf "%s\n" "yes" >&6; }
Vladimír Marek87319172024-04-11 21:54:34 +020015957 MSGFMTCMD="OLD_PO_FILE_INPUT=yes $MSGFMT --no-convert -v"
RestorerZe498caf2024-03-12 22:11:36 +010015958 else
15959 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15960printf "%s\n" "no" >&6; }
Vladimír Marek87319172024-04-11 21:54:34 +020015961 MSGFMTCMD="OLD_PO_FILE_INPUT=yes $MSGFMT -v"
RestorerZe498caf2024-03-12 22:11:36 +010015962 fi
15963
Bram Moolenaar071d4272004-06-13 20:20:40 +000015964 fi
15965 else
Illia Bobyra96d5442023-08-30 16:30:15 +020015966 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no \"po/Makefile\" - disabled" >&5
15967printf "%s\n" "no \"po/Makefile\" - disabled" >&6; };
Bram Moolenaar071d4272004-06-13 20:20:40 +000015968 fi
15969else
Illia Bobyra96d5442023-08-30 16:30:15 +020015970 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15971printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015972fi
15973
Illia Bobyra96d5442023-08-30 16:30:15 +020015974ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
15975if test "x$ac_cv_header_dlfcn_h" = xyes
15976then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000015977 DLL=dlfcn.h
Illia Bobyra96d5442023-08-30 16:30:15 +020015978else $as_nop
15979 ac_fn_c_check_header_compile "$LINENO" "dl.h" "ac_cv_header_dl_h" "$ac_includes_default"
15980if test "x$ac_cv_header_dl_h" = xyes
15981then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015982 DLL=dl.h
15983fi
15984
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015985fi
15986
Bram Moolenaar071d4272004-06-13 20:20:40 +000015987if test x${DLL} = xdlfcn.h; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015988
Illia Bobyra96d5442023-08-30 16:30:15 +020015989printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015990
Illia Bobyra96d5442023-08-30 16:30:15 +020015991 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen()" >&5
15992printf %s "checking for dlopen()... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015994/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015995
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015996int
Illia Bobyra96d5442023-08-30 16:30:15 +020015997main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015998{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015999
16000 extern void* dlopen();
16001 dlopen();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016002
16003 ;
16004 return 0;
16005}
16006_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016007if ac_fn_c_try_link "$LINENO"
16008then :
16009 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16010printf "%s\n" "yes" >&6; };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016011
Illia Bobyra96d5442023-08-30 16:30:15 +020016012printf "%s\n" "#define HAVE_DLOPEN 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016013
Illia Bobyra96d5442023-08-30 16:30:15 +020016014else $as_nop
16015 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16016printf "%s\n" "no" >&6; };
16017 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen() in -ldl" >&5
16018printf %s "checking for dlopen() in -ldl... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000016019 olibs=$LIBS
16020 LIBS="$LIBS -ldl"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016022/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016023
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016024int
Illia Bobyra96d5442023-08-30 16:30:15 +020016025main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016026{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016027
16028 extern void* dlopen();
16029 dlopen();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016030
16031 ;
16032 return 0;
16033}
16034_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016035if ac_fn_c_try_link "$LINENO"
16036then :
16037 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16038printf "%s\n" "yes" >&6; };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016039
Illia Bobyra96d5442023-08-30 16:30:15 +020016040printf "%s\n" "#define HAVE_DLOPEN 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016041
Illia Bobyra96d5442023-08-30 16:30:15 +020016042else $as_nop
16043 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16044printf "%s\n" "no" >&6; };
Bram Moolenaar071d4272004-06-13 20:20:40 +000016045 LIBS=$olibs
16046fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016047rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016048 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000016049fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016050rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016051 conftest$ac_exeext conftest.$ac_ext
Illia Bobyra96d5442023-08-30 16:30:15 +020016052 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlsym()" >&5
16053printf %s "checking for dlsym()... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016055/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016056
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016057int
Illia Bobyra96d5442023-08-30 16:30:15 +020016058main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016059{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016060
16061 extern void* dlsym();
16062 dlsym();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016063
16064 ;
16065 return 0;
16066}
16067_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016068if ac_fn_c_try_link "$LINENO"
16069then :
16070 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16071printf "%s\n" "yes" >&6; };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016072
Illia Bobyra96d5442023-08-30 16:30:15 +020016073printf "%s\n" "#define HAVE_DLSYM 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016074
Illia Bobyra96d5442023-08-30 16:30:15 +020016075else $as_nop
16076 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16077printf "%s\n" "no" >&6; };
16078 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlsym() in -ldl" >&5
16079printf %s "checking for dlsym() in -ldl... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000016080 olibs=$LIBS
16081 LIBS="$LIBS -ldl"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016083/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016084
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016085int
Illia Bobyra96d5442023-08-30 16:30:15 +020016086main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016087{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016088
16089 extern void* dlsym();
16090 dlsym();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016091
16092 ;
16093 return 0;
16094}
16095_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016096if ac_fn_c_try_link "$LINENO"
16097then :
16098 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16099printf "%s\n" "yes" >&6; };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016100
Illia Bobyra96d5442023-08-30 16:30:15 +020016101printf "%s\n" "#define HAVE_DLSYM 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016102
Illia Bobyra96d5442023-08-30 16:30:15 +020016103else $as_nop
16104 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16105printf "%s\n" "no" >&6; };
Bram Moolenaar071d4272004-06-13 20:20:40 +000016106 LIBS=$olibs
16107fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016108rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016109 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000016110fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016111rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016112 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000016113elif test x${DLL} = xdl.h; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016114
Illia Bobyra96d5442023-08-30 16:30:15 +020016115printf "%s\n" "#define HAVE_DL_H 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016116
Illia Bobyra96d5442023-08-30 16:30:15 +020016117 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load()" >&5
16118printf %s "checking for shl_load()... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016120/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016121
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016122int
Illia Bobyra96d5442023-08-30 16:30:15 +020016123main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016124{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016125
16126 extern void* shl_load();
16127 shl_load();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016128
16129 ;
16130 return 0;
16131}
16132_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016133if ac_fn_c_try_link "$LINENO"
16134then :
16135 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16136printf "%s\n" "yes" >&6; };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016137
Illia Bobyra96d5442023-08-30 16:30:15 +020016138printf "%s\n" "#define HAVE_SHL_LOAD 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016139
Illia Bobyra96d5442023-08-30 16:30:15 +020016140else $as_nop
16141 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16142printf "%s\n" "no" >&6; };
16143 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load() in -ldld" >&5
16144printf %s "checking for shl_load() in -ldld... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000016145 olibs=$LIBS
16146 LIBS="$LIBS -ldld"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016148/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016149
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016150int
Illia Bobyra96d5442023-08-30 16:30:15 +020016151main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016152{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016153
16154 extern void* shl_load();
16155 shl_load();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016156
16157 ;
16158 return 0;
16159}
16160_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016161if ac_fn_c_try_link "$LINENO"
16162then :
16163 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16164printf "%s\n" "yes" >&6; };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016165
Illia Bobyra96d5442023-08-30 16:30:15 +020016166printf "%s\n" "#define HAVE_SHL_LOAD 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016167
Illia Bobyra96d5442023-08-30 16:30:15 +020016168else $as_nop
16169 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16170printf "%s\n" "no" >&6; };
Bram Moolenaar071d4272004-06-13 20:20:40 +000016171 LIBS=$olibs
16172fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016173rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016174 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000016175fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016176rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016177 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000016178fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016179ac_fn_c_check_header_compile "$LINENO" "setjmp.h" "ac_cv_header_setjmp_h" "$ac_includes_default"
16180if test "x$ac_cv_header_setjmp_h" = xyes
16181then :
16182 printf "%s\n" "#define HAVE_SETJMP_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016183
16184fi
16185
Bram Moolenaar071d4272004-06-13 20:20:40 +000016186
Bram Moolenaard0573012017-10-28 21:11:06 +020016187if test "x$MACOS_X" = "xyes" -a -n "$PERL"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000016188 if echo $LIBS | grep -e '-ldl' >/dev/null; then
16189 LIBS=`echo $LIBS | sed s/-ldl//`
16190 PERL_LIBS="$PERL_LIBS -ldl"
16191 fi
16192fi
16193
Bram Moolenaard0573012017-10-28 21:11:06 +020016194if test "$MACOS_X" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016195 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need macOS frameworks" >&5
16196printf %s "checking whether we need macOS frameworks... " >&6; }
Bram Moolenaar097148e2020-08-11 21:58:20 +020016197 if test "$MACOS_X_DARWIN" = "yes"; then
Bram Moolenaard0573012017-10-28 21:11:06 +020016198 if test "$features" = "tiny"; then
16199 OS_EXTRA_SRC=`echo "$OS_EXTRA_SRC" | sed -e 's+os_macosx.m++'`
16200 OS_EXTRA_OBJ=`echo "$OS_EXTRA_OBJ" | sed -e 's+objects/os_macosx.o++'`
Illia Bobyra96d5442023-08-30 16:30:15 +020016201 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, we need CoreServices" >&5
16202printf "%s\n" "yes, we need CoreServices" >&6; }
Bram Moolenaar2be7cb72019-01-12 16:10:51 +010016203 LIBS="$LIBS -framework CoreServices"
Bram Moolenaard0573012017-10-28 21:11:06 +020016204 else
Illia Bobyra96d5442023-08-30 16:30:15 +020016205 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, we need AppKit" >&5
16206printf "%s\n" "yes, we need AppKit" >&6; }
Bram Moolenaard0573012017-10-28 21:11:06 +020016207 LIBS="$LIBS -framework AppKit"
Bram Moolenaard0573012017-10-28 21:11:06 +020016208 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000016209 else
Illia Bobyra96d5442023-08-30 16:30:15 +020016210 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16211printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000016212 fi
16213fi
16214
Christian Brabandt6b9efdd2021-09-09 17:14:50 +020016215if `echo "$CFLAGS" | grep -v D_REENTRANT >/dev/null`; then
Bram Moolenaar3ae5fc92021-09-06 18:57:30 +020016216 CFLAGS="$CFLAGS -D_REENTRANT"
16217fi
16218
Bram Moolenaard5cdbeb2005-10-10 20:59:28 +000016219DEPEND_CFLAGS_FILTER=
16220if test "$GCC" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016221 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GCC 3 or later" >&5
16222printf %s "checking for GCC 3 or later... " >&6; }
Bram Moolenaar348808f2020-02-07 20:50:07 +010016223 gccmajor=`echo "$gccversion" | sed -e 's/^\([1-9][0-9]*\)\..*$/\1/g'`
Bram Moolenaarf740b292006-02-16 22:11:02 +000016224 if test "$gccmajor" -gt "2"; then
Bram Moolenaard5cdbeb2005-10-10 20:59:28 +000016225 DEPEND_CFLAGS_FILTER="| sed 's+-I */+-isystem /+g'"
Illia Bobyra96d5442023-08-30 16:30:15 +020016226 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16227printf "%s\n" "yes" >&6; }
Bram Moolenaar0cd49302008-11-20 09:37:01 +000016228 else
Illia Bobyra96d5442023-08-30 16:30:15 +020016229 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16230printf "%s\n" "no" >&6; }
Bram Moolenaar0cd49302008-11-20 09:37:01 +000016231 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016232 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D_FORTIFY_SOURCE=1" >&5
16233printf %s "checking whether we need -D_FORTIFY_SOURCE=1... " >&6; }
Bram Moolenaar0cd49302008-11-20 09:37:01 +000016234 if test "$gccmajor" -gt "3"; then
Zdenek Dohnal42196982023-01-18 16:09:51 +000016235 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/'`
16236 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 +020016237 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16238printf "%s\n" "yes" >&6; }
Bram Moolenaar0cd49302008-11-20 09:37:01 +000016239 else
Illia Bobyra96d5442023-08-30 16:30:15 +020016240 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16241printf "%s\n" "no" >&6; }
Bram Moolenaar0cd49302008-11-20 09:37:01 +000016242 fi
Bram Moolenaara5792f52005-11-23 21:25:05 +000016243fi
Bram Moolenaard5cdbeb2005-10-10 20:59:28 +000016244
Bram Moolenaar071d4272004-06-13 20:20:40 +000016245
Illia Bobyra96d5442023-08-30 16:30:15 +020016246{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need to force -D_FILE_OFFSET_BITS=64" >&5
16247printf %s "checking whether we need to force -D_FILE_OFFSET_BITS=64... " >&6; }
Bram Moolenaar9ce42132018-04-11 22:19:36 +020016248if 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 +020016249 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16250printf "%s\n" "yes" >&6; }
16251 printf "%s\n" "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Bram Moolenaarec0557f2018-01-31 14:41:37 +010016252
16253else
Illia Bobyra96d5442023-08-30 16:30:15 +020016254 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16255printf "%s\n" "no" >&6; }
Bram Moolenaarec0557f2018-01-31 14:41:37 +010016256fi
16257
Bram Moolenaar6cd42db2020-12-04 18:09:54 +010016258LDFLAGS=`echo "$LDFLAGS" | sed -e 's/-L /-L/g'`
16259
Illia Bobyra96d5442023-08-30 16:30:15 +020016260{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking linker --as-needed support" >&5
16261printf %s "checking linker --as-needed support... " >&6; }
Bram Moolenaar22e193d2010-11-03 22:32:24 +010016262LINK_AS_NEEDED=
16263# Check if linker supports --as-needed and --no-as-needed options
16264if $CC -Wl,--help 2>/dev/null | grep as-needed > /dev/null; then
Natanael Copa761ead42021-05-15 14:25:37 +020016265 if ! echo "$LDFLAGS" | grep -q -- '-Wl,[^[:space:]]*--as-needed'; then
16266 LDFLAGS="$LDFLAGS -Wl,--as-needed"
16267 fi
Bram Moolenaar22e193d2010-11-03 22:32:24 +010016268 LINK_AS_NEEDED=yes
16269fi
16270if test "$LINK_AS_NEEDED" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016271 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16272printf "%s\n" "yes" >&6; }
Bram Moolenaar22e193d2010-11-03 22:32:24 +010016273else
Illia Bobyra96d5442023-08-30 16:30:15 +020016274 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16275printf "%s\n" "no" >&6; }
Bram Moolenaar22e193d2010-11-03 22:32:24 +010016276fi
16277
16278
Bram Moolenaar77c19352012-06-13 19:19:41 +020016279# IBM z/OS reset CFLAGS for config.mk
16280if test "$zOSUnix" = "yes"; then
16281 CFLAGS="-D_ALL_SOURCE -Wc,float\(ieee\),dll"
16282fi
16283
Bram Moolenaar446cb832008-06-24 21:56:24 +000016284ac_config_files="$ac_config_files auto/config.mk:config.mk.in"
16285
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016286cat >confcache <<\_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000016287# This file is a shell script that caches the results of configure
16288# tests run on this system so they can be shared between configure
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016289# scripts and configure runs, see configure's option --config-cache.
16290# It is not useful on other systems. If it contains results you don't
16291# want to keep, you may remove or edit it.
Bram Moolenaar071d4272004-06-13 20:20:40 +000016292#
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016293# config.status only pays attention to the cache file if you give it
16294# the --recheck option to rerun configure.
Bram Moolenaar071d4272004-06-13 20:20:40 +000016295#
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016296# `ac_cv_env_foo' variables (set or unset) will be overridden when
16297# loading this file, other *unset* `ac_cv_foo' will be assigned the
16298# following values.
16299
16300_ACEOF
16301
Bram Moolenaar071d4272004-06-13 20:20:40 +000016302# The following way of writing the cache mishandles newlines in values,
16303# but we know of no workaround that is simple, portable, and efficient.
Bram Moolenaar446cb832008-06-24 21:56:24 +000016304# So, we kill variables containing newlines.
Bram Moolenaar071d4272004-06-13 20:20:40 +000016305# Ultrix sh set writes to stderr and can't be redirected directly,
16306# and sets the high bit in the cache file unless we assign to the vars.
Bram Moolenaar446cb832008-06-24 21:56:24 +000016307(
16308 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16309 eval ac_val=\$$ac_var
16310 case $ac_val in #(
16311 *${as_nl}*)
16312 case $ac_var in #(
Illia Bobyra96d5442023-08-30 16:30:15 +020016313 *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16314printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016315 esac
16316 case $ac_var in #(
16317 _ | IFS | as_nl) ;; #(
16318 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016319 *) { eval $ac_var=; unset $ac_var;} ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016320 esac ;;
16321 esac
16322 done
16323
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016324 (set) 2>&1 |
Bram Moolenaar446cb832008-06-24 21:56:24 +000016325 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16326 *${as_nl}ac_space=\ *)
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016327 # `set' does not quote correctly, so add quotes: double-quote
16328 # substitution turns \\\\ into \\, and sed turns \\ into \.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016329 sed -n \
16330 "s/'/'\\\\''/g;
16331 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Bram Moolenaar446cb832008-06-24 21:56:24 +000016332 ;; #(
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016333 *)
16334 # `set' quotes correctly as required by POSIX, so do not add quotes.
Bram Moolenaar446cb832008-06-24 21:56:24 +000016335 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016336 ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016337 esac |
16338 sort
16339) |
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016340 sed '
Bram Moolenaar446cb832008-06-24 21:56:24 +000016341 /^ac_cv_env_/b end
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016342 t clear
Bram Moolenaar446cb832008-06-24 21:56:24 +000016343 :clear
Illia Bobyra96d5442023-08-30 16:30:15 +020016344 s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016345 t end
Bram Moolenaar446cb832008-06-24 21:56:24 +000016346 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16347 :end' >>confcache
16348if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16349 if test -w "$cache_file"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010016350 if test "x$cache_file" != "x/dev/null"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016351 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16352printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
Bram Moolenaar7db77842014-03-27 17:40:59 +010016353 if test ! -f "$cache_file" || test -h "$cache_file"; then
16354 cat confcache >"$cache_file"
16355 else
16356 case $cache_file in #(
16357 */* | ?:*)
16358 mv -f confcache "$cache_file"$$ &&
16359 mv -f "$cache_file"$$ "$cache_file" ;; #(
16360 *)
16361 mv -f confcache "$cache_file" ;;
16362 esac
16363 fi
16364 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000016365 else
Illia Bobyra96d5442023-08-30 16:30:15 +020016366 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16367printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
Bram Moolenaar071d4272004-06-13 20:20:40 +000016368 fi
16369fi
16370rm -f confcache
16371
Bram Moolenaar071d4272004-06-13 20:20:40 +000016372test "x$prefix" = xNONE && prefix=$ac_default_prefix
16373# Let make expand exec_prefix.
16374test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16375
Bram Moolenaar071d4272004-06-13 20:20:40 +000016376DEFS=-DHAVE_CONFIG_H
16377
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016378ac_libobjs=
16379ac_ltlibobjs=
Bram Moolenaar7db77842014-03-27 17:40:59 +010016380U=
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016381for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16382 # 1. Remove the extension, and $U if already installed.
Bram Moolenaar446cb832008-06-24 21:56:24 +000016383 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Illia Bobyra96d5442023-08-30 16:30:15 +020016384 ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
Bram Moolenaar446cb832008-06-24 21:56:24 +000016385 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16386 # will be set to the directory where LIBOBJS objects are built.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016387 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16388 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016389done
16390LIBOBJS=$ac_libobjs
16391
16392LTLIBOBJS=$ac_ltlibobjs
16393
16394
16395
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020016396
Bram Moolenaar7db77842014-03-27 17:40:59 +010016397: "${CONFIG_STATUS=./config.status}"
Bram Moolenaar446cb832008-06-24 21:56:24 +000016398ac_write_fail=0
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016399ac_clean_files_save=$ac_clean_files
16400ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Illia Bobyra96d5442023-08-30 16:30:15 +020016401{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16402printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016403as_write_fail=0
16404cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016405#! $SHELL
16406# Generated by $as_me.
Bram Moolenaar071d4272004-06-13 20:20:40 +000016407# Run this file to recreate the current configuration.
Bram Moolenaar071d4272004-06-13 20:20:40 +000016408# Compiler output produced by configure, useful for debugging
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016409# configure, is in config.log if it exists.
Bram Moolenaar071d4272004-06-13 20:20:40 +000016410
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016411debug=false
16412ac_cs_recheck=false
16413ac_cs_silent=false
Bram Moolenaar071d4272004-06-13 20:20:40 +000016414
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016415SHELL=\${CONFIG_SHELL-$SHELL}
16416export SHELL
16417_ASEOF
16418cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16419## -------------------- ##
16420## M4sh Initialization. ##
16421## -------------------- ##
Bram Moolenaar071d4272004-06-13 20:20:40 +000016422
Bram Moolenaar446cb832008-06-24 21:56:24 +000016423# Be more Bourne compatible
16424DUALCASE=1; export DUALCASE # for MKS sh
Illia Bobyra96d5442023-08-30 16:30:15 +020016425as_nop=:
16426if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
16427then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016428 emulate sh
16429 NULLCMD=:
Bram Moolenaar446cb832008-06-24 21:56:24 +000016430 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016431 # is contrary to our usage. Disable this feature.
16432 alias -g '${1+"$@"}'='"$@"'
Bram Moolenaar446cb832008-06-24 21:56:24 +000016433 setopt NO_GLOB_SUBST
Illia Bobyra96d5442023-08-30 16:30:15 +020016434else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016435 case `(set -o) 2>/dev/null` in #(
16436 *posix*) :
16437 set -o posix ;; #(
16438 *) :
16439 ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016440esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000016441fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000016442
16443
Illia Bobyra96d5442023-08-30 16:30:15 +020016444
16445# Reset variables that may have inherited troublesome values from
16446# the environment.
16447
16448# IFS needs to be set, to space, tab, and newline, in precisely that order.
16449# (If _AS_PATH_WALK were called with IFS unset, it would have the
16450# side effect of setting IFS to empty, thus disabling word splitting.)
16451# Quoting is to prevent editors from complaining about space-tab.
Bram Moolenaar446cb832008-06-24 21:56:24 +000016452as_nl='
16453'
16454export as_nl
Illia Bobyra96d5442023-08-30 16:30:15 +020016455IFS=" "" $as_nl"
16456
16457PS1='$ '
16458PS2='> '
16459PS4='+ '
16460
16461# Ensure predictable behavior from utilities with locale-dependent output.
16462LC_ALL=C
16463export LC_ALL
16464LANGUAGE=C
16465export LANGUAGE
16466
16467# We cannot yet rely on "unset" to work, but we need these variables
16468# to be unset--not just set to an empty or harmless value--now, to
16469# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
16470# also avoids known problems related to "unset" and subshell syntax
16471# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
16472for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
16473do eval test \${$as_var+y} \
16474 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
16475done
16476
16477# Ensure that fds 0, 1, and 2 are open.
16478if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
16479if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
16480if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000016481
16482# The user is always right.
Illia Bobyra96d5442023-08-30 16:30:15 +020016483if ${PATH_SEPARATOR+false} :; then
Bram Moolenaar446cb832008-06-24 21:56:24 +000016484 PATH_SEPARATOR=:
16485 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16486 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16487 PATH_SEPARATOR=';'
16488 }
16489fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000016490
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016491
Bram Moolenaar446cb832008-06-24 21:56:24 +000016492# Find who we are. Look in the path if we contain no directory separator.
Bram Moolenaar7db77842014-03-27 17:40:59 +010016493as_myself=
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016494case $0 in #((
Bram Moolenaar446cb832008-06-24 21:56:24 +000016495 *[\\/]* ) as_myself=$0 ;;
16496 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16497for as_dir in $PATH
16498do
16499 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +020016500 case $as_dir in #(((
16501 '') as_dir=./ ;;
16502 */) ;;
16503 *) as_dir=$as_dir/ ;;
16504 esac
16505 test -r "$as_dir$0" && as_myself=$as_dir$0 && break
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016506 done
Bram Moolenaar446cb832008-06-24 21:56:24 +000016507IFS=$as_save_IFS
16508
16509 ;;
16510esac
16511# We did not find ourselves, most probably we were run as `sh COMMAND'
16512# in which case we are not to be found in the path.
16513if test "x$as_myself" = x; then
16514 as_myself=$0
16515fi
16516if test ! -f "$as_myself"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016517 printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016518 exit 1
Bram Moolenaar446cb832008-06-24 21:56:24 +000016519fi
16520
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016521
16522
Bram Moolenaar7db77842014-03-27 17:40:59 +010016523# as_fn_error STATUS ERROR [LINENO LOG_FD]
16524# ----------------------------------------
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016525# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16526# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Bram Moolenaar7db77842014-03-27 17:40:59 +010016527# script with STATUS, using 1 if that was 0.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016528as_fn_error ()
16529{
Bram Moolenaar7db77842014-03-27 17:40:59 +010016530 as_status=$1; test $as_status -eq 0 && as_status=1
16531 if test "$4"; then
16532 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +020016533 printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016534 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016535 printf "%s\n" "$as_me: error: $2" >&2
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016536 as_fn_exit $as_status
16537} # as_fn_error
16538
16539
Illia Bobyra96d5442023-08-30 16:30:15 +020016540
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016541# as_fn_set_status STATUS
16542# -----------------------
16543# Set $? to STATUS, without forking.
16544as_fn_set_status ()
16545{
16546 return $1
16547} # as_fn_set_status
16548
16549# as_fn_exit STATUS
16550# -----------------
16551# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16552as_fn_exit ()
16553{
16554 set +e
16555 as_fn_set_status $1
16556 exit $1
16557} # as_fn_exit
16558
16559# as_fn_unset VAR
16560# ---------------
16561# Portably unset VAR.
16562as_fn_unset ()
16563{
16564 { eval $1=; unset $1;}
16565}
16566as_unset=as_fn_unset
Illia Bobyra96d5442023-08-30 16:30:15 +020016567
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016568# as_fn_append VAR VALUE
16569# ----------------------
16570# Append the text in VALUE to the end of the definition contained in VAR. Take
16571# advantage of any shell optimizations that allow amortized linear growth over
16572# repeated appends, instead of the typical quadratic growth present in naive
16573# implementations.
Illia Bobyra96d5442023-08-30 16:30:15 +020016574if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
16575then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016576 eval 'as_fn_append ()
16577 {
16578 eval $1+=\$2
16579 }'
Illia Bobyra96d5442023-08-30 16:30:15 +020016580else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016581 as_fn_append ()
16582 {
16583 eval $1=\$$1\$2
16584 }
16585fi # as_fn_append
16586
16587# as_fn_arith ARG...
16588# ------------------
16589# Perform arithmetic evaluation on the ARGs, and store the result in the
16590# global $as_val. Take advantage of shells that can avoid forks. The arguments
16591# must be portable across $(()) and expr.
Illia Bobyra96d5442023-08-30 16:30:15 +020016592if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
16593then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016594 eval 'as_fn_arith ()
16595 {
16596 as_val=$(( $* ))
16597 }'
Illia Bobyra96d5442023-08-30 16:30:15 +020016598else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016599 as_fn_arith ()
16600 {
16601 as_val=`expr "$@" || test $? -eq 1`
16602 }
16603fi # as_fn_arith
16604
16605
Bram Moolenaar446cb832008-06-24 21:56:24 +000016606if expr a : '\(a\)' >/dev/null 2>&1 &&
16607 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016608 as_expr=expr
16609else
16610 as_expr=false
16611fi
16612
Bram Moolenaar446cb832008-06-24 21:56:24 +000016613if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016614 as_basename=basename
16615else
16616 as_basename=false
16617fi
16618
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016619if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16620 as_dirname=dirname
16621else
16622 as_dirname=false
16623fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016624
Bram Moolenaar446cb832008-06-24 21:56:24 +000016625as_me=`$as_basename -- "$0" ||
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016626$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16627 X"$0" : 'X\(//\)$' \| \
Bram Moolenaar446cb832008-06-24 21:56:24 +000016628 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Illia Bobyra96d5442023-08-30 16:30:15 +020016629printf "%s\n" X/"$0" |
Bram Moolenaar446cb832008-06-24 21:56:24 +000016630 sed '/^.*\/\([^/][^/]*\)\/*$/{
16631 s//\1/
16632 q
16633 }
16634 /^X\/\(\/\/\)$/{
16635 s//\1/
16636 q
16637 }
16638 /^X\/\(\/\).*/{
16639 s//\1/
16640 q
16641 }
16642 s/.*/./; q'`
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016643
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016644# Avoid depending upon Character Ranges.
16645as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16646as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16647as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16648as_cr_digits='0123456789'
16649as_cr_alnum=$as_cr_Letters$as_cr_digits
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016650
Illia Bobyra96d5442023-08-30 16:30:15 +020016651
16652# Determine whether it's possible to make 'echo' print without a newline.
16653# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
16654# for compatibility with existing Makefiles.
Bram Moolenaar446cb832008-06-24 21:56:24 +000016655ECHO_C= ECHO_N= ECHO_T=
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016656case `echo -n x` in #(((((
Bram Moolenaar446cb832008-06-24 21:56:24 +000016657-n*)
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016658 case `echo 'xy\c'` in
Bram Moolenaar446cb832008-06-24 21:56:24 +000016659 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016660 xy) ECHO_C='\c';;
16661 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16662 ECHO_T=' ';;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016663 esac;;
16664*)
16665 ECHO_N='-n';;
16666esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016667
Illia Bobyra96d5442023-08-30 16:30:15 +020016668# For backward compatibility with old third-party macros, we provide
16669# the shell variables $as_echo and $as_echo_n. New code should use
16670# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
16671as_echo='printf %s\n'
16672as_echo_n='printf %s'
16673
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016674rm -f conf$$ conf$$.exe conf$$.file
Bram Moolenaar446cb832008-06-24 21:56:24 +000016675if test -d conf$$.dir; then
16676 rm -f conf$$.dir/conf$$.file
16677else
16678 rm -f conf$$.dir
16679 mkdir conf$$.dir 2>/dev/null
16680fi
16681if (echo >conf$$.file) 2>/dev/null; then
16682 if ln -s conf$$.file conf$$ 2>/dev/null; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016683 as_ln_s='ln -s'
Bram Moolenaar446cb832008-06-24 21:56:24 +000016684 # ... but there are two gotchas:
16685 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16686 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Bram Moolenaar7db77842014-03-27 17:40:59 +010016687 # In both cases, we have to default to `cp -pR'.
Bram Moolenaar446cb832008-06-24 21:56:24 +000016688 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Bram Moolenaar7db77842014-03-27 17:40:59 +010016689 as_ln_s='cp -pR'
Bram Moolenaar446cb832008-06-24 21:56:24 +000016690 elif ln conf$$.file conf$$ 2>/dev/null; then
16691 as_ln_s=ln
16692 else
Bram Moolenaar7db77842014-03-27 17:40:59 +010016693 as_ln_s='cp -pR'
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016694 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016695else
Bram Moolenaar7db77842014-03-27 17:40:59 +010016696 as_ln_s='cp -pR'
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016697fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000016698rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16699rmdir conf$$.dir 2>/dev/null
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016700
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016701
16702# as_fn_mkdir_p
16703# -------------
16704# Create "$as_dir" as a directory, including parents if necessary.
16705as_fn_mkdir_p ()
16706{
16707
16708 case $as_dir in #(
16709 -*) as_dir=./$as_dir;;
16710 esac
16711 test -d "$as_dir" || eval $as_mkdir_p || {
16712 as_dirs=
16713 while :; do
16714 case $as_dir in #(
Illia Bobyra96d5442023-08-30 16:30:15 +020016715 *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016716 *) as_qdir=$as_dir;;
16717 esac
16718 as_dirs="'$as_qdir' $as_dirs"
16719 as_dir=`$as_dirname -- "$as_dir" ||
16720$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16721 X"$as_dir" : 'X\(//\)[^/]' \| \
16722 X"$as_dir" : 'X\(//\)$' \| \
16723 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Illia Bobyra96d5442023-08-30 16:30:15 +020016724printf "%s\n" X"$as_dir" |
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016725 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16726 s//\1/
16727 q
16728 }
16729 /^X\(\/\/\)[^/].*/{
16730 s//\1/
16731 q
16732 }
16733 /^X\(\/\/\)$/{
16734 s//\1/
16735 q
16736 }
16737 /^X\(\/\).*/{
16738 s//\1/
16739 q
16740 }
16741 s/.*/./; q'`
16742 test -d "$as_dir" && break
16743 done
16744 test -z "$as_dirs" || eval "mkdir $as_dirs"
Bram Moolenaar7db77842014-03-27 17:40:59 +010016745 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016746
16747
16748} # as_fn_mkdir_p
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016749if mkdir -p . 2>/dev/null; then
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016750 as_mkdir_p='mkdir -p "$as_dir"'
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016751else
16752 test -d ./-p && rmdir ./-p
16753 as_mkdir_p=false
16754fi
16755
Bram Moolenaar7db77842014-03-27 17:40:59 +010016756
16757# as_fn_executable_p FILE
16758# -----------------------
16759# Test if FILE is an executable regular file.
16760as_fn_executable_p ()
16761{
16762 test -f "$1" && test -x "$1"
16763} # as_fn_executable_p
16764as_test_x='test -x'
16765as_executable_p=as_fn_executable_p
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016766
16767# Sed expression to map a string onto a valid CPP name.
16768as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
16769
16770# Sed expression to map a string onto a valid variable name.
16771as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
16772
16773
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016774exec 6>&1
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016775## ----------------------------------- ##
16776## Main body of $CONFIG_STATUS script. ##
16777## ----------------------------------- ##
16778_ASEOF
16779test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016780
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016781cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16782# Save the log message, to keep $0 and so on meaningful, and to
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016783# report actual input values of CONFIG_FILES etc. instead of their
Bram Moolenaar446cb832008-06-24 21:56:24 +000016784# values after options handling.
16785ac_log="
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016786This file was extended by $as_me, which was
Illia Bobyra96d5442023-08-30 16:30:15 +020016787generated by GNU Autoconf 2.71. Invocation command line was
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016788
16789 CONFIG_FILES = $CONFIG_FILES
16790 CONFIG_HEADERS = $CONFIG_HEADERS
16791 CONFIG_LINKS = $CONFIG_LINKS
16792 CONFIG_COMMANDS = $CONFIG_COMMANDS
16793 $ $0 $@
16794
Bram Moolenaar446cb832008-06-24 21:56:24 +000016795on `(hostname || uname -n) 2>/dev/null | sed 1q`
16796"
16797
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016798_ACEOF
16799
Bram Moolenaar32f31b12009-05-21 13:20:59 +000016800case $ac_config_files in *"
16801"*) set x $ac_config_files; shift; ac_config_files=$*;;
16802esac
16803
16804case $ac_config_headers in *"
16805"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16806esac
16807
16808
Bram Moolenaar446cb832008-06-24 21:56:24 +000016809cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016810# Files that config.status was made for.
Bram Moolenaar446cb832008-06-24 21:56:24 +000016811config_files="$ac_config_files"
16812config_headers="$ac_config_headers"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016813
Bram Moolenaar446cb832008-06-24 21:56:24 +000016814_ACEOF
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016815
Bram Moolenaar446cb832008-06-24 21:56:24 +000016816cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016817ac_cs_usage="\
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016818\`$as_me' instantiates files and other configuration actions
16819from templates according to the current configuration. Unless the files
16820and actions are specified as TAGs, all are instantiated by default.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016821
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016822Usage: $0 [OPTION]... [TAG]...
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016823
16824 -h, --help print this help, then exit
Bram Moolenaar446cb832008-06-24 21:56:24 +000016825 -V, --version print version number and configuration settings, then exit
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016826 --config print configuration, then exit
Bram Moolenaar32f31b12009-05-21 13:20:59 +000016827 -q, --quiet, --silent
16828 do not print progress messages
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016829 -d, --debug don't remove temporary files
16830 --recheck update $as_me by reconfiguring in the same conditions
Bram Moolenaar32f31b12009-05-21 13:20:59 +000016831 --file=FILE[:TEMPLATE]
Bram Moolenaar446cb832008-06-24 21:56:24 +000016832 instantiate the configuration file FILE
Bram Moolenaar32f31b12009-05-21 13:20:59 +000016833 --header=FILE[:TEMPLATE]
Bram Moolenaar446cb832008-06-24 21:56:24 +000016834 instantiate the configuration header FILE
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016835
16836Configuration files:
16837$config_files
16838
16839Configuration headers:
16840$config_headers
16841
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016842Report bugs to the package provider."
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016843
Bram Moolenaar446cb832008-06-24 21:56:24 +000016844_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016845ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
16846ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
Bram Moolenaar446cb832008-06-24 21:56:24 +000016847cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Illia Bobyra96d5442023-08-30 16:30:15 +020016848ac_cs_config='$ac_cs_config_escaped'
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016849ac_cs_version="\\
16850config.status
Illia Bobyra96d5442023-08-30 16:30:15 +020016851configured by $0, generated by GNU Autoconf 2.71,
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016852 with options \\"\$ac_cs_config\\"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016853
Illia Bobyra96d5442023-08-30 16:30:15 +020016854Copyright (C) 2021 Free Software Foundation, Inc.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016855This config.status script is free software; the Free Software Foundation
16856gives unlimited permission to copy, distribute and modify it."
Bram Moolenaar446cb832008-06-24 21:56:24 +000016857
16858ac_pwd='$ac_pwd'
16859srcdir='$srcdir'
16860AWK='$AWK'
16861test -n "\$AWK" || AWK=awk
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016862_ACEOF
16863
Bram Moolenaar446cb832008-06-24 21:56:24 +000016864cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16865# The default lists apply if the user does not specify any file.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016866ac_need_defaults=:
16867while test $# != 0
16868do
16869 case $1 in
Bram Moolenaar7db77842014-03-27 17:40:59 +010016870 --*=?*)
Bram Moolenaar446cb832008-06-24 21:56:24 +000016871 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16872 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016873 ac_shift=:
16874 ;;
Bram Moolenaar7db77842014-03-27 17:40:59 +010016875 --*=)
16876 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16877 ac_optarg=
16878 ac_shift=:
16879 ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016880 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016881 ac_option=$1
16882 ac_optarg=$2
16883 ac_shift=shift
16884 ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016885 esac
16886
16887 case $ac_option in
16888 # Handling of the options.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016889 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16890 ac_cs_recheck=: ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016891 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Illia Bobyra96d5442023-08-30 16:30:15 +020016892 printf "%s\n" "$ac_cs_version"; exit ;;
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016893 --config | --confi | --conf | --con | --co | --c )
Illia Bobyra96d5442023-08-30 16:30:15 +020016894 printf "%s\n" "$ac_cs_config"; exit ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016895 --debug | --debu | --deb | --de | --d | -d )
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016896 debug=: ;;
16897 --file | --fil | --fi | --f )
16898 $ac_shift
Bram Moolenaar446cb832008-06-24 21:56:24 +000016899 case $ac_optarg in
Illia Bobyra96d5442023-08-30 16:30:15 +020016900 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Bram Moolenaar7db77842014-03-27 17:40:59 +010016901 '') as_fn_error $? "missing file argument" ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016902 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016903 as_fn_append CONFIG_FILES " '$ac_optarg'"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016904 ac_need_defaults=false;;
16905 --header | --heade | --head | --hea )
16906 $ac_shift
Bram Moolenaar446cb832008-06-24 21:56:24 +000016907 case $ac_optarg in
Illia Bobyra96d5442023-08-30 16:30:15 +020016908 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016909 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016910 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016911 ac_need_defaults=false;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016912 --he | --h)
16913 # Conflict between --help and --header
Bram Moolenaar7db77842014-03-27 17:40:59 +010016914 as_fn_error $? "ambiguous option: \`$1'
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016915Try \`$0 --help' for more information.";;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016916 --help | --hel | -h )
Illia Bobyra96d5442023-08-30 16:30:15 +020016917 printf "%s\n" "$ac_cs_usage"; exit ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016918 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16919 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16920 ac_cs_silent=: ;;
16921
16922 # This is an error.
Bram Moolenaar7db77842014-03-27 17:40:59 +010016923 -*) as_fn_error $? "unrecognized option: \`$1'
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016924Try \`$0 --help' for more information." ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016925
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016926 *) as_fn_append ac_config_targets " $1"
Bram Moolenaar446cb832008-06-24 21:56:24 +000016927 ac_need_defaults=false ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016928
16929 esac
16930 shift
16931done
16932
16933ac_configure_extra_args=
16934
16935if $ac_cs_silent; then
16936 exec 6>/dev/null
16937 ac_configure_extra_args="$ac_configure_extra_args --silent"
16938fi
16939
16940_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +000016941cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016942if \$ac_cs_recheck; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010016943 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Bram Moolenaar446cb832008-06-24 21:56:24 +000016944 shift
Illia Bobyra96d5442023-08-30 16:30:15 +020016945 \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
Bram Moolenaar446cb832008-06-24 21:56:24 +000016946 CONFIG_SHELL='$SHELL'
16947 export CONFIG_SHELL
16948 exec "\$@"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016949fi
16950
16951_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +000016952cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16953exec 5>>auto/config.log
16954{
16955 echo
16956 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16957## Running $as_me. ##
16958_ASBOX
Illia Bobyra96d5442023-08-30 16:30:15 +020016959 printf "%s\n" "$ac_log"
Bram Moolenaar446cb832008-06-24 21:56:24 +000016960} >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016961
Bram Moolenaar446cb832008-06-24 21:56:24 +000016962_ACEOF
16963cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16964_ACEOF
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016965
Bram Moolenaar446cb832008-06-24 21:56:24 +000016966cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016967
Bram Moolenaar446cb832008-06-24 21:56:24 +000016968# Handling of arguments.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016969for ac_config_target in $ac_config_targets
16970do
Bram Moolenaar446cb832008-06-24 21:56:24 +000016971 case $ac_config_target in
16972 "auto/config.h") CONFIG_HEADERS="$CONFIG_HEADERS auto/config.h:config.h.in" ;;
16973 "auto/config.mk") CONFIG_FILES="$CONFIG_FILES auto/config.mk:config.mk.in" ;;
16974
Bram Moolenaar7db77842014-03-27 17:40:59 +010016975 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016976 esac
16977done
16978
Bram Moolenaar446cb832008-06-24 21:56:24 +000016979
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016980# If the user did not use the arguments to specify the items to instantiate,
16981# then the envvar interface is used. Set only those that are not.
16982# We use the long form for the default assignment because of an extremely
16983# bizarre bug on SunOS 4.1.3.
16984if $ac_need_defaults; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016985 test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
16986 test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016987fi
16988
16989# Have a temporary directory for convenience. Make it in the build tree
Bram Moolenaar446cb832008-06-24 21:56:24 +000016990# simply because there is no reason against having it here, and in addition,
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016991# creating and moving files from /tmp can sometimes cause problems.
Bram Moolenaar446cb832008-06-24 21:56:24 +000016992# Hook for its removal unless debugging.
16993# Note that there is a small window in which the directory will not be cleaned:
16994# after its creation but before its name has been assigned to `$tmp'.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016995$debug ||
16996{
Bram Moolenaar7db77842014-03-27 17:40:59 +010016997 tmp= ac_tmp=
Bram Moolenaar446cb832008-06-24 21:56:24 +000016998 trap 'exit_status=$?
Bram Moolenaar7db77842014-03-27 17:40:59 +010016999 : "${ac_tmp:=$tmp}"
17000 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Bram Moolenaar446cb832008-06-24 21:56:24 +000017001' 0
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017002 trap 'as_fn_exit 1' 1 2 13 15
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017003}
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017004# Create a (secure) tmp directory for tmp files.
17005
17006{
Bram Moolenaar446cb832008-06-24 21:56:24 +000017007 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Bram Moolenaar7db77842014-03-27 17:40:59 +010017008 test -d "$tmp"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017009} ||
17010{
Bram Moolenaar446cb832008-06-24 21:56:24 +000017011 tmp=./conf$$-$RANDOM
17012 (umask 077 && mkdir "$tmp")
Bram Moolenaar7db77842014-03-27 17:40:59 +010017013} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
17014ac_tmp=$tmp
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017015
Bram Moolenaar446cb832008-06-24 21:56:24 +000017016# Set up the scripts for CONFIG_FILES section.
17017# No need to generate them if there are no CONFIG_FILES.
17018# This happens for instance with `./config.status config.h'.
17019if test -n "$CONFIG_FILES"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017020
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017021
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017022ac_cr=`echo X | tr X '\015'`
17023# On cygwin, bash can eat \r inside `` if the user requested igncr.
17024# But we know of no other shell where ac_cr would be empty at this
17025# point, so we can use a bashism as a fallback.
17026if test "x$ac_cr" = x; then
17027 eval ac_cr=\$\'\\r\'
17028fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000017029ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17030if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010017031 ac_cs_awk_cr='\\r'
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017032else
Bram Moolenaar446cb832008-06-24 21:56:24 +000017033 ac_cs_awk_cr=$ac_cr
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017034fi
17035
Bram Moolenaar7db77842014-03-27 17:40:59 +010017036echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017037_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000017038
Bram Moolenaar446cb832008-06-24 21:56:24 +000017039
17040{
17041 echo "cat >conf$$subs.awk <<_ACEOF" &&
17042 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17043 echo "_ACEOF"
17044} >conf$$subs.sh ||
Bram Moolenaar7db77842014-03-27 17:40:59 +010017045 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17046ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Bram Moolenaar446cb832008-06-24 21:56:24 +000017047ac_delim='%!_!# '
17048for ac_last_try in false false false false false :; do
17049 . ./conf$$subs.sh ||
Bram Moolenaar7db77842014-03-27 17:40:59 +010017050 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017051
Bram Moolenaar32f31b12009-05-21 13:20:59 +000017052 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17053 if test $ac_delim_n = $ac_delim_num; then
Bram Moolenaar446cb832008-06-24 21:56:24 +000017054 break
17055 elif $ac_last_try; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010017056 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017057 else
17058 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17059 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017060done
Bram Moolenaar446cb832008-06-24 21:56:24 +000017061rm -f conf$$subs.sh
17062
17063cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Bram Moolenaar7db77842014-03-27 17:40:59 +010017064cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017065_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +000017066sed -n '
17067h
17068s/^/S["/; s/!.*/"]=/
17069p
17070g
17071s/^[^!]*!//
17072:repl
17073t repl
17074s/'"$ac_delim"'$//
17075t delim
17076:nl
17077h
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017078s/\(.\{148\}\)..*/\1/
Bram Moolenaar446cb832008-06-24 21:56:24 +000017079t more1
17080s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17081p
17082n
17083b repl
17084:more1
17085s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17086p
17087g
17088s/.\{148\}//
17089t nl
17090:delim
17091h
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017092s/\(.\{148\}\)..*/\1/
Bram Moolenaar446cb832008-06-24 21:56:24 +000017093t more2
17094s/["\\]/\\&/g; s/^/"/; s/$/"/
17095p
17096b
17097:more2
17098s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17099p
17100g
17101s/.\{148\}//
17102t delim
17103' <conf$$subs.awk | sed '
17104/^[^""]/{
17105 N
17106 s/\n//
17107}
17108' >>$CONFIG_STATUS || ac_write_fail=1
17109rm -f conf$$subs.awk
17110cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17111_ACAWK
Bram Moolenaar7db77842014-03-27 17:40:59 +010017112cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Bram Moolenaar446cb832008-06-24 21:56:24 +000017113 for (key in S) S_is_set[key] = 1
17114 FS = ""
Bram Moolenaar071d4272004-06-13 20:20:40 +000017115
Bram Moolenaar446cb832008-06-24 21:56:24 +000017116}
17117{
17118 line = $ 0
17119 nfields = split(line, field, "@")
17120 substed = 0
17121 len = length(field[1])
17122 for (i = 2; i < nfields; i++) {
17123 key = field[i]
17124 keylen = length(key)
17125 if (S_is_set[key]) {
17126 value = S[key]
17127 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17128 len += length(value) + length(field[++i])
17129 substed = 1
17130 } else
17131 len += 1 + keylen
17132 }
Bram Moolenaar071d4272004-06-13 20:20:40 +000017133
Bram Moolenaar446cb832008-06-24 21:56:24 +000017134 print line
17135}
Bram Moolenaar071d4272004-06-13 20:20:40 +000017136
Bram Moolenaar446cb832008-06-24 21:56:24 +000017137_ACAWK
17138_ACEOF
17139cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17140if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17141 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17142else
17143 cat
Bram Moolenaar7db77842014-03-27 17:40:59 +010017144fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
17145 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017146_ACEOF
17147
Bram Moolenaar7db77842014-03-27 17:40:59 +010017148# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17149# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Bram Moolenaar446cb832008-06-24 21:56:24 +000017150# trailing colons and then remove the whole line if VPATH becomes empty
17151# (actually we leave an empty line to preserve line numbers).
17152if test "x$srcdir" = x.; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010017153 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17154h
17155s///
17156s/^/:/
17157s/[ ]*$/:/
17158s/:\$(srcdir):/:/g
17159s/:\${srcdir}:/:/g
17160s/:@srcdir@:/:/g
17161s/^:*//
Bram Moolenaar446cb832008-06-24 21:56:24 +000017162s/:*$//
Bram Moolenaar7db77842014-03-27 17:40:59 +010017163x
17164s/\(=[ ]*\).*/\1/
17165G
17166s/\n//
Bram Moolenaar446cb832008-06-24 21:56:24 +000017167s/^[^=]*=[ ]*$//
17168}'
17169fi
17170
17171cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17172fi # test -n "$CONFIG_FILES"
17173
17174# Set up the scripts for CONFIG_HEADERS section.
17175# No need to generate them if there are no CONFIG_HEADERS.
17176# This happens for instance with `./config.status Makefile'.
17177if test -n "$CONFIG_HEADERS"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010017178cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Bram Moolenaar446cb832008-06-24 21:56:24 +000017179BEGIN {
17180_ACEOF
17181
17182# Transform confdefs.h into an awk script `defines.awk', embedded as
17183# here-document in config.status, that substitutes the proper values into
17184# config.h.in to produce config.h.
17185
17186# Create a delimiter string that does not exist in confdefs.h, to ease
17187# handling of long lines.
17188ac_delim='%!_!# '
17189for ac_last_try in false false :; do
Bram Moolenaar7db77842014-03-27 17:40:59 +010017190 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17191 if test -z "$ac_tt"; then
Bram Moolenaar446cb832008-06-24 21:56:24 +000017192 break
17193 elif $ac_last_try; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010017194 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017195 else
17196 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17197 fi
17198done
17199
17200# For the awk script, D is an array of macro values keyed by name,
17201# likewise P contains macro parameters if any. Preserve backslash
17202# newline sequences.
17203
17204ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17205sed -n '
17206s/.\{148\}/&'"$ac_delim"'/g
17207t rset
17208:rset
17209s/^[ ]*#[ ]*define[ ][ ]*/ /
17210t def
17211d
17212:def
17213s/\\$//
17214t bsnl
17215s/["\\]/\\&/g
17216s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17217D["\1"]=" \3"/p
17218s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17219d
17220:bsnl
17221s/["\\]/\\&/g
17222s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17223D["\1"]=" \3\\\\\\n"\\/p
17224t cont
17225s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17226t cont
17227d
17228:cont
17229n
17230s/.\{148\}/&'"$ac_delim"'/g
17231t clear
17232:clear
17233s/\\$//
17234t bsnlc
17235s/["\\]/\\&/g; s/^/"/; s/$/"/p
17236d
17237:bsnlc
17238s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17239b cont
17240' <confdefs.h | sed '
17241s/'"$ac_delim"'/"\\\
17242"/g' >>$CONFIG_STATUS || ac_write_fail=1
17243
17244cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17245 for (key in D) D_is_set[key] = 1
17246 FS = ""
17247}
17248/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17249 line = \$ 0
17250 split(line, arg, " ")
17251 if (arg[1] == "#") {
17252 defundef = arg[2]
17253 mac1 = arg[3]
17254 } else {
17255 defundef = substr(arg[1], 2)
17256 mac1 = arg[2]
17257 }
17258 split(mac1, mac2, "(") #)
17259 macro = mac2[1]
Bram Moolenaar32f31b12009-05-21 13:20:59 +000017260 prefix = substr(line, 1, index(line, defundef) - 1)
Bram Moolenaar446cb832008-06-24 21:56:24 +000017261 if (D_is_set[macro]) {
17262 # Preserve the white space surrounding the "#".
Bram Moolenaar446cb832008-06-24 21:56:24 +000017263 print prefix "define", macro P[macro] D[macro]
17264 next
17265 } else {
17266 # Replace #undef with comments. This is necessary, for example,
17267 # in the case of _POSIX_SOURCE, which is predefined and required
17268 # on some systems where configure will not decide to define it.
17269 if (defundef == "undef") {
Bram Moolenaar32f31b12009-05-21 13:20:59 +000017270 print "/*", prefix defundef, macro, "*/"
Bram Moolenaar446cb832008-06-24 21:56:24 +000017271 next
17272 }
17273 }
17274}
17275{ print }
17276_ACAWK
17277_ACEOF
17278cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Bram Moolenaar7db77842014-03-27 17:40:59 +010017279 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017280fi # test -n "$CONFIG_HEADERS"
17281
17282
17283eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17284shift
17285for ac_tag
17286do
17287 case $ac_tag in
17288 :[FHLC]) ac_mode=$ac_tag; continue;;
17289 esac
17290 case $ac_mode$ac_tag in
17291 :[FHL]*:*);;
Bram Moolenaar7db77842014-03-27 17:40:59 +010017292 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017293 :[FH]-) ac_tag=-:-;;
17294 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17295 esac
17296 ac_save_IFS=$IFS
17297 IFS=:
17298 set x $ac_tag
17299 IFS=$ac_save_IFS
17300 shift
17301 ac_file=$1
17302 shift
17303
17304 case $ac_mode in
17305 :L) ac_source=$1;;
17306 :[FH])
17307 ac_file_inputs=
17308 for ac_f
17309 do
17310 case $ac_f in
Bram Moolenaar7db77842014-03-27 17:40:59 +010017311 -) ac_f="$ac_tmp/stdin";;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017312 *) # Look for the file first in the build tree, then in the source tree
17313 # (if the path is not absolute). The absolute path cannot be DOS-style,
17314 # because $ac_f cannot contain `:'.
17315 test -f "$ac_f" ||
17316 case $ac_f in
17317 [\\/$]*) false;;
17318 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17319 esac ||
Bram Moolenaar7db77842014-03-27 17:40:59 +010017320 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017321 esac
Illia Bobyra96d5442023-08-30 16:30:15 +020017322 case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017323 as_fn_append ac_file_inputs " '$ac_f'"
Bram Moolenaar446cb832008-06-24 21:56:24 +000017324 done
17325
17326 # Let's still pretend it is `configure' which instantiates (i.e., don't
17327 # use $as_me), people would be surprised to read:
17328 # /* config.h. Generated by config.status. */
17329 configure_input='Generated from '`
Illia Bobyra96d5442023-08-30 16:30:15 +020017330 printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
Bram Moolenaar446cb832008-06-24 21:56:24 +000017331 `' by configure.'
17332 if test x"$ac_file" != x-; then
17333 configure_input="$ac_file. $configure_input"
Illia Bobyra96d5442023-08-30 16:30:15 +020017334 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17335printf "%s\n" "$as_me: creating $ac_file" >&6;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000017336 fi
17337 # Neutralize special characters interpreted by sed in replacement strings.
17338 case $configure_input in #(
17339 *\&* | *\|* | *\\* )
Illia Bobyra96d5442023-08-30 16:30:15 +020017340 ac_sed_conf_input=`printf "%s\n" "$configure_input" |
Bram Moolenaar446cb832008-06-24 21:56:24 +000017341 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17342 *) ac_sed_conf_input=$configure_input;;
17343 esac
17344
17345 case $ac_tag in
Bram Moolenaar7db77842014-03-27 17:40:59 +010017346 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17347 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017348 esac
17349 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +000017350 esac
17351
Bram Moolenaar446cb832008-06-24 21:56:24 +000017352 ac_dir=`$as_dirname -- "$ac_file" ||
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017353$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17354 X"$ac_file" : 'X\(//\)[^/]' \| \
17355 X"$ac_file" : 'X\(//\)$' \| \
Bram Moolenaar446cb832008-06-24 21:56:24 +000017356 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Illia Bobyra96d5442023-08-30 16:30:15 +020017357printf "%s\n" X"$ac_file" |
Bram Moolenaar446cb832008-06-24 21:56:24 +000017358 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17359 s//\1/
17360 q
17361 }
17362 /^X\(\/\/\)[^/].*/{
17363 s//\1/
17364 q
17365 }
17366 /^X\(\/\/\)$/{
17367 s//\1/
17368 q
17369 }
17370 /^X\(\/\).*/{
17371 s//\1/
17372 q
17373 }
17374 s/.*/./; q'`
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017375 as_dir="$ac_dir"; as_fn_mkdir_p
Bram Moolenaar446cb832008-06-24 21:56:24 +000017376 ac_builddir=.
Bram Moolenaar071d4272004-06-13 20:20:40 +000017377
Bram Moolenaar446cb832008-06-24 21:56:24 +000017378case "$ac_dir" in
17379.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17380*)
Illia Bobyra96d5442023-08-30 16:30:15 +020017381 ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
Bram Moolenaar446cb832008-06-24 21:56:24 +000017382 # A ".." for each directory in $ac_dir_suffix.
Illia Bobyra96d5442023-08-30 16:30:15 +020017383 ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Bram Moolenaar446cb832008-06-24 21:56:24 +000017384 case $ac_top_builddir_sub in
17385 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17386 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17387 esac ;;
17388esac
17389ac_abs_top_builddir=$ac_pwd
17390ac_abs_builddir=$ac_pwd$ac_dir_suffix
17391# for backward compatibility:
17392ac_top_builddir=$ac_top_build_prefix
17393
17394case $srcdir in
17395 .) # We are building in place.
17396 ac_srcdir=.
17397 ac_top_srcdir=$ac_top_builddir_sub
17398 ac_abs_top_srcdir=$ac_pwd ;;
17399 [\\/]* | ?:[\\/]* ) # Absolute name.
17400 ac_srcdir=$srcdir$ac_dir_suffix;
17401 ac_top_srcdir=$srcdir
17402 ac_abs_top_srcdir=$srcdir ;;
17403 *) # Relative name.
17404 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17405 ac_top_srcdir=$ac_top_build_prefix$srcdir
17406 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
17407esac
17408ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
17409
17410
17411 case $ac_mode in
17412 :F)
17413 #
17414 # CONFIG_FILE
17415 #
17416
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017417_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000017418
Bram Moolenaar446cb832008-06-24 21:56:24 +000017419cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17420# If the template does not know about datarootdir, expand it.
17421# FIXME: This hack should be removed a few years after 2.60.
17422ac_datarootdir_hack=; ac_datarootdir_seen=
Bram Moolenaar446cb832008-06-24 21:56:24 +000017423ac_sed_dataroot='
17424/datarootdir/ {
17425 p
17426 q
17427}
17428/@datadir@/p
17429/@docdir@/p
17430/@infodir@/p
17431/@localedir@/p
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017432/@mandir@/p'
Bram Moolenaar446cb832008-06-24 21:56:24 +000017433case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
17434*datarootdir*) ac_datarootdir_seen=yes;;
17435*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Illia Bobyra96d5442023-08-30 16:30:15 +020017436 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17437printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000017438_ACEOF
17439cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17440 ac_datarootdir_hack='
17441 s&@datadir@&$datadir&g
17442 s&@docdir@&$docdir&g
17443 s&@infodir@&$infodir&g
17444 s&@localedir@&$localedir&g
17445 s&@mandir@&$mandir&g
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017446 s&\\\${datarootdir}&$datarootdir&g' ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017447esac
17448_ACEOF
17449
17450# Neutralize VPATH when `$srcdir' = `.'.
17451# Shell code in configure.ac might set extrasub.
17452# FIXME: do we really want to maintain this feature?
17453cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17454ac_sed_extra="$ac_vpsub
17455$extrasub
17456_ACEOF
17457cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17458:t
17459/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
17460s|@configure_input@|$ac_sed_conf_input|;t t
17461s&@top_builddir@&$ac_top_builddir_sub&;t t
17462s&@top_build_prefix@&$ac_top_build_prefix&;t t
17463s&@srcdir@&$ac_srcdir&;t t
17464s&@abs_srcdir@&$ac_abs_srcdir&;t t
17465s&@top_srcdir@&$ac_top_srcdir&;t t
17466s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17467s&@builddir@&$ac_builddir&;t t
17468s&@abs_builddir@&$ac_abs_builddir&;t t
17469s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17470$ac_datarootdir_hack
17471"
Bram Moolenaar7db77842014-03-27 17:40:59 +010017472eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17473 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017474
17475test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Bram Moolenaar7db77842014-03-27 17:40:59 +010017476 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17477 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17478 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Illia Bobyra96d5442023-08-30 16:30:15 +020017479 { 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 +010017480which seems to be undefined. Please make sure it is defined" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +020017481printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Bram Moolenaar7db77842014-03-27 17:40:59 +010017482which seems to be undefined. Please make sure it is defined" >&2;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000017483
Bram Moolenaar7db77842014-03-27 17:40:59 +010017484 rm -f "$ac_tmp/stdin"
Bram Moolenaar446cb832008-06-24 21:56:24 +000017485 case $ac_file in
Bram Moolenaar7db77842014-03-27 17:40:59 +010017486 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17487 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017488 esac \
Bram Moolenaar7db77842014-03-27 17:40:59 +010017489 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017490 ;;
17491 :H)
17492 #
17493 # CONFIG_HEADER
17494 #
17495 if test x"$ac_file" != x-; then
17496 {
Illia Bobyra96d5442023-08-30 16:30:15 +020017497 printf "%s\n" "/* $configure_input */" >&1 \
Bram Moolenaar7db77842014-03-27 17:40:59 +010017498 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17499 } >"$ac_tmp/config.h" \
17500 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
17501 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Illia Bobyra96d5442023-08-30 16:30:15 +020017502 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17503printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000017504 else
17505 rm -f "$ac_file"
Bram Moolenaar7db77842014-03-27 17:40:59 +010017506 mv "$ac_tmp/config.h" "$ac_file" \
17507 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017508 fi
17509 else
Illia Bobyra96d5442023-08-30 16:30:15 +020017510 printf "%s\n" "/* $configure_input */" >&1 \
Bram Moolenaar7db77842014-03-27 17:40:59 +010017511 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
17512 || as_fn_error $? "could not create -" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017513 fi
17514 ;;
17515
17516
17517 esac
17518
17519done # for ac_tag
17520
Bram Moolenaar071d4272004-06-13 20:20:40 +000017521
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017522as_fn_exit 0
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017523_ACEOF
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017524ac_clean_files=$ac_clean_files_save
17525
Bram Moolenaar446cb832008-06-24 21:56:24 +000017526test $ac_write_fail = 0 ||
Bram Moolenaar7db77842014-03-27 17:40:59 +010017527 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017528
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017529
17530# configure is writing to config.log, and then calls config.status.
17531# config.status does its own redirection, appending to config.log.
17532# Unfortunately, on DOS this fails, as config.log is still kept open
17533# by configure, so config.status won't be able to write to it; its
17534# output is simply discarded. So we exec the FD to /dev/null,
17535# effectively closing config.log, so it can be properly (re)opened and
17536# appended to by config.status. When coming back to configure, we
17537# need to make the FD available again.
17538if test "$no_create" != yes; then
17539 ac_cs_success=:
17540 ac_config_status_args=
17541 test "$silent" = yes &&
17542 ac_config_status_args="$ac_config_status_args --quiet"
17543 exec 5>/dev/null
17544 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Bram Moolenaarc7453f52006-02-10 23:20:28 +000017545 exec 5>>auto/config.log
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017546 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17547 # would make configure fail if this is the last instruction.
Bram Moolenaar7db77842014-03-27 17:40:59 +010017548 $ac_cs_success || as_fn_exit 1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017549fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000017550if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
Illia Bobyra96d5442023-08-30 16:30:15 +020017551 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17552printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000017553fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000017554
17555
Illia Bobyra96d5442023-08-30 16:30:15 +020017556