blob: 8e665eb50b0ea7191f833a3dc9063eb0741211e9 [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001#! /bin/sh
Bram Moolenaar071d4272004-06-13 20:20:40 +00002# Guess values for system-dependent variables and create Makefiles.
Illia Bobyra96d5442023-08-30 16:30:15 +02003# Generated by GNU Autoconf 2.71.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004#
Bram Moolenaar071d4272004-06-13 20:20:40 +00005#
Illia Bobyra96d5442023-08-30 16:30:15 +02006# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,
7# Inc.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008#
9#
Bram Moolenaar071d4272004-06-13 20:20:40 +000010# This configure script is free software; the Free Software Foundation
11# gives unlimited permission to copy, distribute and modify it.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012## -------------------- ##
13## M4sh Initialization. ##
14## -------------------- ##
Bram Moolenaar071d4272004-06-13 20:20:40 +000015
Bram Moolenaar446cb832008-06-24 21:56:24 +000016# Be more Bourne compatible
17DUALCASE=1; export DUALCASE # for MKS sh
Illia Bobyra96d5442023-08-30 16:30:15 +020018as_nop=:
19if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
20then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000021 emulate sh
22 NULLCMD=:
Bram Moolenaar446cb832008-06-24 21:56:24 +000023 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Bram Moolenaar495de9c2005-01-25 22:03:25 +000024 # is contrary to our usage. Disable this feature.
25 alias -g '${1+"$@"}'='"$@"'
Bram Moolenaar446cb832008-06-24 21:56:24 +000026 setopt NO_GLOB_SUBST
Illia Bobyra96d5442023-08-30 16:30:15 +020027else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020028 case `(set -o) 2>/dev/null` in #(
29 *posix*) :
30 set -o posix ;; #(
31 *) :
32 ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000033esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000034fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000035
36
Illia Bobyra96d5442023-08-30 16:30:15 +020037
38# Reset variables that may have inherited troublesome values from
39# the environment.
40
41# IFS needs to be set, to space, tab, and newline, in precisely that order.
42# (If _AS_PATH_WALK were called with IFS unset, it would have the
43# side effect of setting IFS to empty, thus disabling word splitting.)
44# Quoting is to prevent editors from complaining about space-tab.
Bram Moolenaar446cb832008-06-24 21:56:24 +000045as_nl='
46'
47export as_nl
Illia Bobyra96d5442023-08-30 16:30:15 +020048IFS=" "" $as_nl"
49
50PS1='$ '
51PS2='> '
52PS4='+ '
53
54# Ensure predictable behavior from utilities with locale-dependent output.
55LC_ALL=C
56export LC_ALL
57LANGUAGE=C
58export LANGUAGE
59
60# We cannot yet rely on "unset" to work, but we need these variables
61# to be unset--not just set to an empty or harmless value--now, to
62# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
63# also avoids known problems related to "unset" and subshell syntax
64# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
65for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
66do eval test \${$as_var+y} \
67 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
68done
69
70# Ensure that fds 0, 1, and 2 are open.
71if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
72if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
73if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000074
75# The user is always right.
Illia Bobyra96d5442023-08-30 16:30:15 +020076if ${PATH_SEPARATOR+false} :; then
Bram Moolenaar446cb832008-06-24 21:56:24 +000077 PATH_SEPARATOR=:
78 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
79 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
80 PATH_SEPARATOR=';'
81 }
82fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000083
Bram Moolenaar495de9c2005-01-25 22:03:25 +000084
Bram Moolenaar446cb832008-06-24 21:56:24 +000085# Find who we are. Look in the path if we contain no directory separator.
Bram Moolenaar7db77842014-03-27 17:40:59 +010086as_myself=
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020087case $0 in #((
Bram Moolenaar446cb832008-06-24 21:56:24 +000088 *[\\/]* ) as_myself=$0 ;;
89 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
90for as_dir in $PATH
91do
92 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +020093 case $as_dir in #(((
94 '') as_dir=./ ;;
95 */) ;;
96 *) as_dir=$as_dir/ ;;
97 esac
98 test -r "$as_dir$0" && as_myself=$as_dir$0 && break
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020099 done
Bram Moolenaar446cb832008-06-24 21:56:24 +0000100IFS=$as_save_IFS
101
102 ;;
103esac
104# We did not find ourselves, most probably we were run as `sh COMMAND'
105# in which case we are not to be found in the path.
106if test "x$as_myself" = x; then
107 as_myself=$0
108fi
109if test ! -f "$as_myself"; then
Illia Bobyra96d5442023-08-30 16:30:15 +0200110 printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200111 exit 1
Bram Moolenaar446cb832008-06-24 21:56:24 +0000112fi
113
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200114
Bram Moolenaar7db77842014-03-27 17:40:59 +0100115# Use a proper internal environment variable to ensure we don't fall
116 # into an infinite loop, continuously re-executing ourselves.
117 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
118 _as_can_reexec=no; export _as_can_reexec;
119 # We cannot yet assume a decent shell, so we have to provide a
120# neutralization value for shells without unset; and this also
121# works around shells that cannot unset nonexistent variables.
122# Preserve -v and -x to the replacement shell.
123BASH_ENV=/dev/null
124ENV=/dev/null
125(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
126case $- in # ((((
127 *v*x* | *x*v* ) as_opts=-vx ;;
128 *v* ) as_opts=-v ;;
129 *x* ) as_opts=-x ;;
130 * ) as_opts= ;;
131esac
132exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
133# Admittedly, this is quite paranoid, since all the known shells bail
134# out after a failed `exec'.
Illia Bobyra96d5442023-08-30 16:30:15 +0200135printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
136exit 255
Bram Moolenaar7db77842014-03-27 17:40:59 +0100137 fi
138 # We don't want this to propagate to other subprocesses.
139 { _as_can_reexec=; unset _as_can_reexec;}
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200140if test "x$CONFIG_SHELL" = x; then
Illia Bobyra96d5442023-08-30 16:30:15 +0200141 as_bourne_compatible="as_nop=:
142if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
143then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200144 emulate sh
145 NULLCMD=:
146 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
147 # is contrary to our usage. Disable this feature.
148 alias -g '\${1+\"\$@\"}'='\"\$@\"'
149 setopt NO_GLOB_SUBST
Illia Bobyra96d5442023-08-30 16:30:15 +0200150else \$as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200151 case \`(set -o) 2>/dev/null\` in #(
152 *posix*) :
153 set -o posix ;; #(
154 *) :
155 ;;
156esac
157fi
158"
159 as_required="as_fn_return () { (exit \$1); }
160as_fn_success () { as_fn_return 0; }
161as_fn_failure () { as_fn_return 1; }
162as_fn_ret_success () { return 0; }
163as_fn_ret_failure () { return 1; }
164
165exitcode=0
166as_fn_success || { exitcode=1; echo as_fn_success failed.; }
167as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
168as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
169as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
Illia Bobyra96d5442023-08-30 16:30:15 +0200170if ( set x; as_fn_ret_success y && test x = \"\$1\" )
171then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200172
Illia Bobyra96d5442023-08-30 16:30:15 +0200173else \$as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200174 exitcode=1; echo positional parameters were not saved.
175fi
Bram Moolenaar7db77842014-03-27 17:40:59 +0100176test x\$exitcode = x0 || exit 1
Illia Bobyra96d5442023-08-30 16:30:15 +0200177blah=\$(echo \$(echo blah))
178test x\"\$blah\" = xblah || exit 1
Bram Moolenaar7db77842014-03-27 17:40:59 +0100179test -x / || exit 1"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200180 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
181 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
182 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
183 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
184test \$(( 1 + 1 )) = 2 || exit 1"
Illia Bobyra96d5442023-08-30 16:30:15 +0200185 if (eval "$as_required") 2>/dev/null
186then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200187 as_have_required=yes
Illia Bobyra96d5442023-08-30 16:30:15 +0200188else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200189 as_have_required=no
190fi
Illia Bobyra96d5442023-08-30 16:30:15 +0200191 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null
192then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200193
Illia Bobyra96d5442023-08-30 16:30:15 +0200194else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200195 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
196as_found=false
197for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
198do
199 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +0200200 case $as_dir in #(((
201 '') as_dir=./ ;;
202 */) ;;
203 *) as_dir=$as_dir/ ;;
204 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200205 as_found=:
206 case $as_dir in #(
207 /*)
208 for as_base in sh bash ksh sh5; do
209 # Try only shells that exist, to save several forks.
Illia Bobyra96d5442023-08-30 16:30:15 +0200210 as_shell=$as_dir$as_base
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200211 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
Illia Bobyra96d5442023-08-30 16:30:15 +0200212 as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null
213then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200214 CONFIG_SHELL=$as_shell as_have_required=yes
Illia Bobyra96d5442023-08-30 16:30:15 +0200215 if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null
216then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200217 break 2
218fi
219fi
220 done;;
221 esac
222 as_found=false
223done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200224IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +0200225if $as_found
226then :
227
228else $as_nop
229 if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
230 as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null
231then :
232 CONFIG_SHELL=$SHELL as_have_required=yes
233fi
234fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200235
236
Illia Bobyra96d5442023-08-30 16:30:15 +0200237 if test "x$CONFIG_SHELL" != x
238then :
Bram Moolenaar7db77842014-03-27 17:40:59 +0100239 export CONFIG_SHELL
240 # We cannot yet assume a decent shell, so we have to provide a
241# neutralization value for shells without unset; and this also
242# works around shells that cannot unset nonexistent variables.
243# Preserve -v and -x to the replacement shell.
244BASH_ENV=/dev/null
245ENV=/dev/null
246(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
247case $- in # ((((
248 *v*x* | *x*v* ) as_opts=-vx ;;
249 *v* ) as_opts=-v ;;
250 *x* ) as_opts=-x ;;
251 * ) as_opts= ;;
252esac
253exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
254# Admittedly, this is quite paranoid, since all the known shells bail
255# out after a failed `exec'.
Illia Bobyra96d5442023-08-30 16:30:15 +0200256printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
Bram Moolenaar7db77842014-03-27 17:40:59 +0100257exit 255
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200258fi
259
Illia Bobyra96d5442023-08-30 16:30:15 +0200260 if test x$as_have_required = xno
261then :
262 printf "%s\n" "$0: This script requires a shell more modern than all"
263 printf "%s\n" "$0: the shells that I found on your system."
264 if test ${ZSH_VERSION+y} ; then
265 printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should"
266 printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later."
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200267 else
Illia Bobyra96d5442023-08-30 16:30:15 +0200268 printf "%s\n" "$0: Please tell bug-autoconf@gnu.org about your system,
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200269$0: including any error possibly output before this
270$0: message. Then install a modern shell, or manually run
271$0: the script under such a shell if you do have one."
272 fi
273 exit 1
274fi
275fi
276fi
277SHELL=${CONFIG_SHELL-/bin/sh}
278export SHELL
279# Unset more variables known to interfere with behavior of common tools.
280CLICOLOR_FORCE= GREP_OPTIONS=
281unset CLICOLOR_FORCE GREP_OPTIONS
282
283## --------------------- ##
284## M4sh Shell Functions. ##
285## --------------------- ##
286# as_fn_unset VAR
287# ---------------
288# Portably unset VAR.
289as_fn_unset ()
290{
291 { eval $1=; unset $1;}
292}
293as_unset=as_fn_unset
294
Illia Bobyra96d5442023-08-30 16:30:15 +0200295
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200296# as_fn_set_status STATUS
297# -----------------------
298# Set $? to STATUS, without forking.
299as_fn_set_status ()
300{
301 return $1
302} # as_fn_set_status
303
304# as_fn_exit STATUS
305# -----------------
306# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
307as_fn_exit ()
308{
309 set +e
310 as_fn_set_status $1
311 exit $1
312} # as_fn_exit
Illia Bobyra96d5442023-08-30 16:30:15 +0200313# as_fn_nop
314# ---------
315# Do nothing but, unlike ":", preserve the value of $?.
316as_fn_nop ()
317{
318 return $?
319}
320as_nop=as_fn_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200321
322# as_fn_mkdir_p
323# -------------
324# Create "$as_dir" as a directory, including parents if necessary.
325as_fn_mkdir_p ()
326{
327
328 case $as_dir in #(
329 -*) as_dir=./$as_dir;;
330 esac
331 test -d "$as_dir" || eval $as_mkdir_p || {
332 as_dirs=
333 while :; do
334 case $as_dir in #(
Illia Bobyra96d5442023-08-30 16:30:15 +0200335 *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200336 *) as_qdir=$as_dir;;
337 esac
338 as_dirs="'$as_qdir' $as_dirs"
339 as_dir=`$as_dirname -- "$as_dir" ||
340$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
341 X"$as_dir" : 'X\(//\)[^/]' \| \
342 X"$as_dir" : 'X\(//\)$' \| \
343 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Illia Bobyra96d5442023-08-30 16:30:15 +0200344printf "%s\n" X"$as_dir" |
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200345 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
346 s//\1/
347 q
348 }
349 /^X\(\/\/\)[^/].*/{
350 s//\1/
351 q
352 }
353 /^X\(\/\/\)$/{
354 s//\1/
355 q
356 }
357 /^X\(\/\).*/{
358 s//\1/
359 q
360 }
361 s/.*/./; q'`
362 test -d "$as_dir" && break
363 done
364 test -z "$as_dirs" || eval "mkdir $as_dirs"
Bram Moolenaar7db77842014-03-27 17:40:59 +0100365 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200366
367
368} # as_fn_mkdir_p
Bram Moolenaar7db77842014-03-27 17:40:59 +0100369
370# as_fn_executable_p FILE
371# -----------------------
372# Test if FILE is an executable regular file.
373as_fn_executable_p ()
374{
375 test -f "$1" && test -x "$1"
376} # as_fn_executable_p
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200377# as_fn_append VAR VALUE
378# ----------------------
379# Append the text in VALUE to the end of the definition contained in VAR. Take
380# advantage of any shell optimizations that allow amortized linear growth over
381# repeated appends, instead of the typical quadratic growth present in naive
382# implementations.
Illia Bobyra96d5442023-08-30 16:30:15 +0200383if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
384then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200385 eval 'as_fn_append ()
386 {
387 eval $1+=\$2
388 }'
Illia Bobyra96d5442023-08-30 16:30:15 +0200389else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200390 as_fn_append ()
391 {
392 eval $1=\$$1\$2
393 }
394fi # as_fn_append
395
396# as_fn_arith ARG...
397# ------------------
398# Perform arithmetic evaluation on the ARGs, and store the result in the
399# global $as_val. Take advantage of shells that can avoid forks. The arguments
400# must be portable across $(()) and expr.
Illia Bobyra96d5442023-08-30 16:30:15 +0200401if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
402then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200403 eval 'as_fn_arith ()
404 {
405 as_val=$(( $* ))
406 }'
Illia Bobyra96d5442023-08-30 16:30:15 +0200407else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200408 as_fn_arith ()
409 {
410 as_val=`expr "$@" || test $? -eq 1`
411 }
412fi # as_fn_arith
413
Illia Bobyra96d5442023-08-30 16:30:15 +0200414# as_fn_nop
415# ---------
416# Do nothing but, unlike ":", preserve the value of $?.
417as_fn_nop ()
418{
419 return $?
420}
421as_nop=as_fn_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200422
Bram Moolenaar7db77842014-03-27 17:40:59 +0100423# as_fn_error STATUS ERROR [LINENO LOG_FD]
424# ----------------------------------------
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200425# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
426# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Bram Moolenaar7db77842014-03-27 17:40:59 +0100427# script with STATUS, using 1 if that was 0.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200428as_fn_error ()
429{
Bram Moolenaar7db77842014-03-27 17:40:59 +0100430 as_status=$1; test $as_status -eq 0 && as_status=1
431 if test "$4"; then
432 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +0200433 printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200434 fi
Illia Bobyra96d5442023-08-30 16:30:15 +0200435 printf "%s\n" "$as_me: error: $2" >&2
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200436 as_fn_exit $as_status
437} # as_fn_error
438
Bram Moolenaar446cb832008-06-24 21:56:24 +0000439if expr a : '\(a\)' >/dev/null 2>&1 &&
440 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000441 as_expr=expr
442else
443 as_expr=false
444fi
445
Bram Moolenaar446cb832008-06-24 21:56:24 +0000446if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000447 as_basename=basename
448else
449 as_basename=false
450fi
451
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200452if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
453 as_dirname=dirname
454else
455 as_dirname=false
456fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000457
Bram Moolenaar446cb832008-06-24 21:56:24 +0000458as_me=`$as_basename -- "$0" ||
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000459$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
460 X"$0" : 'X\(//\)$' \| \
Bram Moolenaar446cb832008-06-24 21:56:24 +0000461 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Illia Bobyra96d5442023-08-30 16:30:15 +0200462printf "%s\n" X/"$0" |
Bram Moolenaar446cb832008-06-24 21:56:24 +0000463 sed '/^.*\/\([^/][^/]*\)\/*$/{
464 s//\1/
465 q
466 }
467 /^X\/\(\/\/\)$/{
468 s//\1/
469 q
470 }
471 /^X\/\(\/\).*/{
472 s//\1/
473 q
474 }
475 s/.*/./; q'`
476
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200477# Avoid depending upon Character Ranges.
478as_cr_letters='abcdefghijklmnopqrstuvwxyz'
479as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
480as_cr_Letters=$as_cr_letters$as_cr_LETTERS
481as_cr_digits='0123456789'
482as_cr_alnum=$as_cr_Letters$as_cr_digits
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000483
484
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200485 as_lineno_1=$LINENO as_lineno_1a=$LINENO
486 as_lineno_2=$LINENO as_lineno_2a=$LINENO
487 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
488 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
489 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Bram Moolenaar446cb832008-06-24 21:56:24 +0000490 sed -n '
491 p
492 /[$]LINENO/=
493 ' <$as_myself |
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000494 sed '
Bram Moolenaar446cb832008-06-24 21:56:24 +0000495 s/[$]LINENO.*/&-/
496 t lineno
497 b
498 :lineno
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000499 N
Bram Moolenaar446cb832008-06-24 21:56:24 +0000500 :loop
501 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000502 t loop
Bram Moolenaar446cb832008-06-24 21:56:24 +0000503 s/-\n.*//
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000504 ' >$as_me.lineno &&
Bram Moolenaar446cb832008-06-24 21:56:24 +0000505 chmod +x "$as_me.lineno" ||
Illia Bobyra96d5442023-08-30 16:30:15 +0200506 { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000507
Bram Moolenaar7db77842014-03-27 17:40:59 +0100508 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
509 # already done that, so ensure we don't try to do so again and fall
510 # in an infinite loop. This has already happened in practice.
511 _as_can_reexec=no; export _as_can_reexec
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000512 # Don't try to exec as it changes $[0], causing all sort of problems
513 # (the dirname of $[0] is not the place where we might find the
Bram Moolenaar446cb832008-06-24 21:56:24 +0000514 # original and so on. Autoconf is especially sensitive to this).
515 . "./$as_me.lineno"
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000516 # Exit status is that of the last command.
517 exit
518}
519
Illia Bobyra96d5442023-08-30 16:30:15 +0200520
521# Determine whether it's possible to make 'echo' print without a newline.
522# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
523# for compatibility with existing Makefiles.
Bram Moolenaar446cb832008-06-24 21:56:24 +0000524ECHO_C= ECHO_N= ECHO_T=
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200525case `echo -n x` in #(((((
Bram Moolenaar446cb832008-06-24 21:56:24 +0000526-n*)
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200527 case `echo 'xy\c'` in
Bram Moolenaar446cb832008-06-24 21:56:24 +0000528 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200529 xy) ECHO_C='\c';;
530 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
531 ECHO_T=' ';;
Bram Moolenaar446cb832008-06-24 21:56:24 +0000532 esac;;
533*)
534 ECHO_N='-n';;
535esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000536
Illia Bobyra96d5442023-08-30 16:30:15 +0200537# For backward compatibility with old third-party macros, we provide
538# the shell variables $as_echo and $as_echo_n. New code should use
539# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
540as_echo='printf %s\n'
541as_echo_n='printf %s'
542
543
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000544rm -f conf$$ conf$$.exe conf$$.file
Bram Moolenaar446cb832008-06-24 21:56:24 +0000545if test -d conf$$.dir; then
546 rm -f conf$$.dir/conf$$.file
547else
548 rm -f conf$$.dir
549 mkdir conf$$.dir 2>/dev/null
550fi
551if (echo >conf$$.file) 2>/dev/null; then
552 if ln -s conf$$.file conf$$ 2>/dev/null; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000553 as_ln_s='ln -s'
Bram Moolenaar446cb832008-06-24 21:56:24 +0000554 # ... but there are two gotchas:
555 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
556 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Bram Moolenaar7db77842014-03-27 17:40:59 +0100557 # In both cases, we have to default to `cp -pR'.
Bram Moolenaar446cb832008-06-24 21:56:24 +0000558 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Bram Moolenaar7db77842014-03-27 17:40:59 +0100559 as_ln_s='cp -pR'
Bram Moolenaar446cb832008-06-24 21:56:24 +0000560 elif ln conf$$.file conf$$ 2>/dev/null; then
561 as_ln_s=ln
562 else
Bram Moolenaar7db77842014-03-27 17:40:59 +0100563 as_ln_s='cp -pR'
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000564 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000565else
Bram Moolenaar7db77842014-03-27 17:40:59 +0100566 as_ln_s='cp -pR'
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000567fi
Bram Moolenaar446cb832008-06-24 21:56:24 +0000568rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
569rmdir conf$$.dir 2>/dev/null
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000570
571if mkdir -p . 2>/dev/null; then
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200572 as_mkdir_p='mkdir -p "$as_dir"'
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000573else
574 test -d ./-p && rmdir ./-p
575 as_mkdir_p=false
576fi
577
Bram Moolenaar7db77842014-03-27 17:40:59 +0100578as_test_x='test -x'
579as_executable_p=as_fn_executable_p
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000580
581# Sed expression to map a string onto a valid CPP name.
582as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
583
584# Sed expression to map a string onto a valid variable name.
585as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
586
587
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200588test -n "$DJDIR" || exec 7<&0 </dev/null
589exec 6>&1
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000590
591# Name of the host.
Bram Moolenaar7db77842014-03-27 17:40:59 +0100592# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000593# so uname gets run too.
594ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
595
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000596#
597# Initializations.
598#
Bram Moolenaar071d4272004-06-13 20:20:40 +0000599ac_default_prefix=/usr/local
Bram Moolenaar446cb832008-06-24 21:56:24 +0000600ac_clean_files=
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000601ac_config_libobj_dir=.
Bram Moolenaar446cb832008-06-24 21:56:24 +0000602LIBOBJS=
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000603cross_compiling=no
604subdirs=
605MFLAGS=
606MAKEFLAGS=
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000607
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000608# Identity of this package.
Illia Bobyra96d5442023-08-30 16:30:15 +0200609PACKAGE_NAME=''
610PACKAGE_TARNAME=''
611PACKAGE_VERSION=''
612PACKAGE_STRING=''
613PACKAGE_BUGREPORT=''
614PACKAGE_URL=''
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000615
616ac_unique_file="vim.h"
617# Factoring default headers for most tests.
618ac_includes_default="\
Illia Bobyra96d5442023-08-30 16:30:15 +0200619#include <stddef.h>
620#ifdef HAVE_STDIO_H
621# include <stdio.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000622#endif
Illia Bobyra96d5442023-08-30 16:30:15 +0200623#ifdef HAVE_STDLIB_H
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000624# include <stdlib.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000625#endif
Bram Moolenaar446cb832008-06-24 21:56:24 +0000626#ifdef HAVE_STRING_H
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000627# include <string.h>
628#endif
Bram Moolenaar446cb832008-06-24 21:56:24 +0000629#ifdef HAVE_INTTYPES_H
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000630# include <inttypes.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000631#endif
Bram Moolenaar446cb832008-06-24 21:56:24 +0000632#ifdef HAVE_STDINT_H
633# include <stdint.h>
634#endif
Illia Bobyra96d5442023-08-30 16:30:15 +0200635#ifdef HAVE_STRINGS_H
636# include <strings.h>
637#endif
638#ifdef HAVE_SYS_TYPES_H
639# include <sys/types.h>
640#endif
641#ifdef HAVE_SYS_STAT_H
642# include <sys/stat.h>
643#endif
Bram Moolenaar446cb832008-06-24 21:56:24 +0000644#ifdef HAVE_UNISTD_H
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000645# include <unistd.h>
646#endif"
647
Illia Bobyra96d5442023-08-30 16:30:15 +0200648ac_header_c_list=
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000649ac_subst_vars='LTLIBOBJS
Bram Moolenaar446cb832008-06-24 21:56:24 +0000650LIBOBJS
Bram Moolenaar22e193d2010-11-03 22:32:24 +0100651LINK_AS_NEEDED
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000652DEPEND_CFLAGS_FILTER
Bram Moolenaar26096cc2019-04-11 15:25:40 +0200653MSGFMT_DESKTOP
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000654MAKEMO
655MSGFMT
656INSTALL_TOOL_LANGS
657INSTALL_LANGS
658TAGPRG
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000659GUI_X_LIBS
660GUITYPE
661GUI_LIB_LOC
662GUI_INC_LOC
663NARROW_PROTO
664MOTIF_LIBNAME
Bram Moolenaar36e294c2015-12-29 18:55:46 +0100665GRESOURCE_OBJ
666GRESOURCE_SRC
Bram Moolenaar4adfaab2016-04-21 18:20:11 +0200667UPDATE_DESKTOP_DATABASE
668GTK_UPDATE_ICON_CACHE
Bram Moolenaar36e294c2015-12-29 18:55:46 +0100669GLIB_COMPILE_RESOURCES
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000670GNOME_INCLUDEDIR
671GNOME_LIBDIR
672GNOME_LIBS
673GTK_LIBNAME
674GTK_LIBS
675GTK_CFLAGS
676PKG_CONFIG
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000677X_LIB
678X_EXTRA_LIBS
679X_LIBS
680X_PRE_LIBS
681X_CFLAGS
682XMKMF
683xmkmfpath
Bram Moolenaar823edd12019-10-23 22:35:36 +0200684TERM_TEST
Bram Moolenaare4f25e42017-07-07 11:54:15 +0200685TERM_OBJ
686TERM_SRC
Bram Moolenaare0874f82016-01-24 20:36:41 +0100687CHANNEL_OBJ
688CHANNEL_SRC
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000689NETBEANS_OBJ
690NETBEANS_SRC
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000691RUBY_LIBS
ichizok8bb3fe42021-12-28 15:51:45 +0000692RUBY_CFLAGS_EXTRA
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000693RUBY_CFLAGS
694RUBY_PRO
695RUBY_OBJ
696RUBY_SRC
697vi_cv_path_ruby
698TCL_LIBS
ichizok8bb3fe42021-12-28 15:51:45 +0000699TCL_CFLAGS_EXTRA
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000700TCL_CFLAGS
701TCL_PRO
702TCL_OBJ
703TCL_SRC
704vi_cv_path_tcl
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200705PYTHON3_OBJ
706PYTHON3_SRC
ichizok8bb3fe42021-12-28 15:51:45 +0000707PYTHON3_CFLAGS_EXTRA
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200708PYTHON3_CFLAGS
709PYTHON3_LIBS
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +0200710vi_cv_var_python3_stable_abi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200711vi_cv_path_python3
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000712PYTHON_OBJ
713PYTHON_SRC
ichizok8bb3fe42021-12-28 15:51:45 +0000714PYTHON_CFLAGS_EXTRA
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000715PYTHON_CFLAGS
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000716PYTHON_LIBS
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000717vi_cv_path_python
718PERL_LIBS
ichizok8bb3fe42021-12-28 15:51:45 +0000719PERL_CFLAGS_EXTRA
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000720PERL_CFLAGS
721PERL_PRO
722PERL_OBJ
723PERL_SRC
724shrpenv
Bram Moolenaard5f62b12014-08-17 17:05:44 +0200725vi_cv_perl_xsubpp
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000726vi_cv_perllib
727vi_cv_path_perl
Bram Moolenaar9e70cf12009-05-26 20:59:55 +0000728MZSCHEME_MZC
729MZSCHEME_EXTRA
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000730MZSCHEME_CFLAGS
731MZSCHEME_LIBS
732MZSCHEME_PRO
733MZSCHEME_OBJ
734MZSCHEME_SRC
735vi_cv_path_mzscheme
ichizok8bb3fe42021-12-28 15:51:45 +0000736LUA_CFLAGS_EXTRA
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200737LUA_CFLAGS
738LUA_LIBS
739LUA_PRO
740LUA_OBJ
741LUA_SRC
Bram Moolenaare855ccf2013-07-28 13:32:15 +0200742vi_cv_path_plain_lua
743vi_cv_path_luajit
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200744vi_cv_path_lua
Bram Moolenaar67ffb412022-01-08 13:36:57 +0000745XDIFF_OBJS_USED
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000746compiledby
747dogvimdiff
748dovimdiff
Bram Moolenaar2c704a72010-06-03 21:17:25 +0200749QUOTESED
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000750line_break
751VIEWNAME
752EXNAME
753VIMNAME
754OS_EXTRA_OBJ
755OS_EXTRA_SRC
Bram Moolenaar595a7be2010-03-10 16:28:12 +0100756XCODE_SELECT
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000757CPP_MM
Bram Moolenaar839e9542016-04-14 16:46:02 +0200758CROSS_COMPILING
Bram Moolenaar8f1dde52020-06-05 23:16:29 +0200759BUILD_DATE_MSG
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000760STRIP
761AWK
Bram Moolenaar2bcaec32014-03-27 18:51:11 +0100762FGREP
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000763EGREP
764GREP
765CPP
766OBJEXT
767EXEEXT
768ac_ct_CC
769CPPFLAGS
770LDFLAGS
771CFLAGS
772CC
773SET_MAKE
774target_alias
775host_alias
776build_alias
777LIBS
778ECHO_T
779ECHO_N
780ECHO_C
781DEFS
782mandir
783localedir
784libdir
785psdir
786pdfdir
787dvidir
788htmldir
789infodir
790docdir
791oldincludedir
792includedir
Illia Bobyrf39842f2023-08-27 18:21:23 +0200793runstatedir
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000794localstatedir
795sharedstatedir
796sysconfdir
797datadir
798datarootdir
799libexecdir
800sbindir
801bindir
802program_transform_name
803prefix
804exec_prefix
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200805PACKAGE_URL
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000806PACKAGE_BUGREPORT
807PACKAGE_STRING
808PACKAGE_VERSION
809PACKAGE_TARNAME
810PACKAGE_NAME
811PATH_SEPARATOR
812SHELL'
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000813ac_subst_files=''
Bram Moolenaar446cb832008-06-24 21:56:24 +0000814ac_user_opts='
815enable_option_checking
Bram Moolenaarf788a062011-12-14 20:51:25 +0100816enable_fail_if_missing
Bram Moolenaar446cb832008-06-24 21:56:24 +0000817enable_darwin
818with_mac_arch
Bram Moolenaar595a7be2010-03-10 16:28:12 +0100819with_developer_dir
Bram Moolenaarc236c162008-07-13 17:41:49 +0000820with_local_dir
Bram Moolenaar446cb832008-06-24 21:56:24 +0000821with_vim_name
822with_ex_name
823with_view_name
824with_global_runtime
825with_modified_by
Bram Moolenaar5bd32f42014-04-02 14:05:38 +0200826enable_smack
Bram Moolenaar446cb832008-06-24 21:56:24 +0000827enable_selinux
828with_features
829with_compiledby
830enable_xsmp
831enable_xsmp_interact
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200832enable_luainterp
833with_lua_prefix
Bram Moolenaare855ccf2013-07-28 13:32:15 +0200834with_luajit
Bram Moolenaar446cb832008-06-24 21:56:24 +0000835enable_mzschemeinterp
836with_plthome
837enable_perlinterp
838enable_pythoninterp
Bram Moolenaare1a32312018-04-15 16:03:25 +0200839with_python_command
Bram Moolenaar446cb832008-06-24 21:56:24 +0000840with_python_config_dir
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200841enable_python3interp
Bram Moolenaare1a32312018-04-15 16:03:25 +0200842with_python3_command
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +0200843with_python3_stable_abi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200844with_python3_config_dir
Bram Moolenaar446cb832008-06-24 21:56:24 +0000845enable_tclinterp
846with_tclsh
847enable_rubyinterp
Bram Moolenaar165641d2010-02-17 16:23:09 +0100848with_ruby_command
Bram Moolenaar446cb832008-06-24 21:56:24 +0000849enable_cscope
Bram Moolenaar446cb832008-06-24 21:56:24 +0000850enable_netbeans
Bram Moolenaare0874f82016-01-24 20:36:41 +0100851enable_channel
Bram Moolenaare4f25e42017-07-07 11:54:15 +0200852enable_terminal
Bram Moolenaare42a6d22017-11-12 19:21:51 +0100853enable_autoservername
Bram Moolenaar446cb832008-06-24 21:56:24 +0000854enable_multibyte
Bram Moolenaar5c5697f2018-12-12 20:34:09 +0100855enable_rightleft
856enable_arabic
857enable_farsi
Bram Moolenaar446cb832008-06-24 21:56:24 +0000858enable_xim
859enable_fontset
860with_x
861enable_gui
Bram Moolenaar446cb832008-06-24 21:56:24 +0000862enable_gtk2_check
863enable_gnome_check
Bram Moolenaar98921892016-02-23 17:14:37 +0100864enable_gtk3_check
Bram Moolenaar446cb832008-06-24 21:56:24 +0000865enable_motif_check
Bram Moolenaar446cb832008-06-24 21:56:24 +0000866enable_gtktest
867with_gnome_includes
868with_gnome_libs
869with_gnome
Bram Moolenaar4adfaab2016-04-21 18:20:11 +0200870enable_icon_cache_update
871enable_desktop_database_update
Bram Moolenaar446cb832008-06-24 21:56:24 +0000872with_motif_lib
873with_tlib
Bram Moolenaar317fd3a2010-05-07 16:05:55 +0200874enable_largefile
Bram Moolenaar21606672019-06-14 20:40:58 +0200875enable_canberra
Christian Brabandtf573c6e2021-06-20 14:02:16 +0200876enable_libsodium
Bram Moolenaar446cb832008-06-24 21:56:24 +0000877enable_acl
878enable_gpm
879enable_sysmouse
880enable_nls
881'
882 ac_precious_vars='build_alias
883host_alias
884target_alias
885CC
886CFLAGS
887LDFLAGS
888LIBS
889CPPFLAGS
890CPP
891XMKMF'
892
Bram Moolenaar071d4272004-06-13 20:20:40 +0000893
894# Initialize some variables set by options.
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000895ac_init_help=
896ac_init_version=false
Bram Moolenaar446cb832008-06-24 21:56:24 +0000897ac_unrecognized_opts=
898ac_unrecognized_sep=
Bram Moolenaar071d4272004-06-13 20:20:40 +0000899# The variables have the same names as the options, with
900# dashes changed to underlines.
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000901cache_file=/dev/null
Bram Moolenaar071d4272004-06-13 20:20:40 +0000902exec_prefix=NONE
Bram Moolenaar071d4272004-06-13 20:20:40 +0000903no_create=
Bram Moolenaar071d4272004-06-13 20:20:40 +0000904no_recursion=
905prefix=NONE
906program_prefix=NONE
907program_suffix=NONE
908program_transform_name=s,x,x,
909silent=
910site=
911srcdir=
Bram Moolenaar071d4272004-06-13 20:20:40 +0000912verbose=
913x_includes=NONE
914x_libraries=NONE
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000915
916# Installation directory options.
917# These are left unexpanded so users can "make install exec_prefix=/foo"
918# and all the variables that are supposed to be based on exec_prefix
919# by default will actually change.
920# Use braces instead of parens because sh, perl, etc. also accept them.
Bram Moolenaar446cb832008-06-24 21:56:24 +0000921# (The list follows the same order as the GNU Coding Standards.)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000922bindir='${exec_prefix}/bin'
923sbindir='${exec_prefix}/sbin'
924libexecdir='${exec_prefix}/libexec'
Bram Moolenaar446cb832008-06-24 21:56:24 +0000925datarootdir='${prefix}/share'
926datadir='${datarootdir}'
Bram Moolenaar071d4272004-06-13 20:20:40 +0000927sysconfdir='${prefix}/etc'
928sharedstatedir='${prefix}/com'
929localstatedir='${prefix}/var'
Illia Bobyrf39842f2023-08-27 18:21:23 +0200930runstatedir='${localstatedir}/run'
Bram Moolenaar071d4272004-06-13 20:20:40 +0000931includedir='${prefix}/include'
932oldincludedir='/usr/include'
Bram Moolenaar446cb832008-06-24 21:56:24 +0000933docdir='${datarootdir}/doc/${PACKAGE}'
934infodir='${datarootdir}/info'
935htmldir='${docdir}'
936dvidir='${docdir}'
937pdfdir='${docdir}'
938psdir='${docdir}'
939libdir='${exec_prefix}/lib'
940localedir='${datarootdir}/locale'
941mandir='${datarootdir}/man'
Bram Moolenaar071d4272004-06-13 20:20:40 +0000942
Bram Moolenaar071d4272004-06-13 20:20:40 +0000943ac_prev=
Bram Moolenaar446cb832008-06-24 21:56:24 +0000944ac_dashdash=
Bram Moolenaar071d4272004-06-13 20:20:40 +0000945for ac_option
946do
Bram Moolenaar071d4272004-06-13 20:20:40 +0000947 # If the previous option needs an argument, assign it.
948 if test -n "$ac_prev"; then
Bram Moolenaar446cb832008-06-24 21:56:24 +0000949 eval $ac_prev=\$ac_option
Bram Moolenaar071d4272004-06-13 20:20:40 +0000950 ac_prev=
951 continue
952 fi
953
Bram Moolenaar446cb832008-06-24 21:56:24 +0000954 case $ac_option in
Bram Moolenaar7db77842014-03-27 17:40:59 +0100955 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
956 *=) ac_optarg= ;;
957 *) ac_optarg=yes ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +0000958 esac
Bram Moolenaar071d4272004-06-13 20:20:40 +0000959
Bram Moolenaar446cb832008-06-24 21:56:24 +0000960 case $ac_dashdash$ac_option in
961 --)
962 ac_dashdash=yes ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +0000963
964 -bindir | --bindir | --bindi | --bind | --bin | --bi)
965 ac_prev=bindir ;;
966 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000967 bindir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +0000968
969 -build | --build | --buil | --bui | --bu)
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000970 ac_prev=build_alias ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +0000971 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000972 build_alias=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +0000973
974 -cache-file | --cache-file | --cache-fil | --cache-fi \
975 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
976 ac_prev=cache_file ;;
977 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
978 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000979 cache_file=$ac_optarg ;;
980
981 --config-cache | -C)
982 cache_file=config.cache ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +0000983
Bram Moolenaar446cb832008-06-24 21:56:24 +0000984 -datadir | --datadir | --datadi | --datad)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000985 ac_prev=datadir ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +0000986 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000987 datadir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +0000988
Bram Moolenaar446cb832008-06-24 21:56:24 +0000989 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
990 | --dataroo | --dataro | --datar)
991 ac_prev=datarootdir ;;
992 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
993 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
994 datarootdir=$ac_optarg ;;
995
Bram Moolenaar071d4272004-06-13 20:20:40 +0000996 -disable-* | --disable-*)
Bram Moolenaar446cb832008-06-24 21:56:24 +0000997 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Bram Moolenaar071d4272004-06-13 20:20:40 +0000998 # Reject names that are not valid shell variable names.
Bram Moolenaar446cb832008-06-24 21:56:24 +0000999 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Illia Bobyra96d5442023-08-30 16:30:15 +02001000 as_fn_error $? "invalid feature name: \`$ac_useropt'"
Bram Moolenaar446cb832008-06-24 21:56:24 +00001001 ac_useropt_orig=$ac_useropt
Illia Bobyra96d5442023-08-30 16:30:15 +02001002 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
Bram Moolenaar446cb832008-06-24 21:56:24 +00001003 case $ac_user_opts in
1004 *"
1005"enable_$ac_useropt"
1006"*) ;;
1007 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1008 ac_unrecognized_sep=', ';;
1009 esac
1010 eval enable_$ac_useropt=no ;;
1011
1012 -docdir | --docdir | --docdi | --doc | --do)
1013 ac_prev=docdir ;;
1014 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1015 docdir=$ac_optarg ;;
1016
1017 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1018 ac_prev=dvidir ;;
1019 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1020 dvidir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001021
1022 -enable-* | --enable-*)
Bram Moolenaar446cb832008-06-24 21:56:24 +00001023 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Bram Moolenaar071d4272004-06-13 20:20:40 +00001024 # Reject names that are not valid shell variable names.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001025 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Illia Bobyra96d5442023-08-30 16:30:15 +02001026 as_fn_error $? "invalid feature name: \`$ac_useropt'"
Bram Moolenaar446cb832008-06-24 21:56:24 +00001027 ac_useropt_orig=$ac_useropt
Illia Bobyra96d5442023-08-30 16:30:15 +02001028 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
Bram Moolenaar446cb832008-06-24 21:56:24 +00001029 case $ac_user_opts in
1030 *"
1031"enable_$ac_useropt"
1032"*) ;;
1033 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1034 ac_unrecognized_sep=', ';;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001035 esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00001036 eval enable_$ac_useropt=\$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001037
1038 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1039 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1040 | --exec | --exe | --ex)
1041 ac_prev=exec_prefix ;;
1042 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1043 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1044 | --exec=* | --exe=* | --ex=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001045 exec_prefix=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001046
1047 -gas | --gas | --ga | --g)
1048 # Obsolete; use --with-gas.
1049 with_gas=yes ;;
1050
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001051 -help | --help | --hel | --he | -h)
1052 ac_init_help=long ;;
1053 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1054 ac_init_help=recursive ;;
1055 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1056 ac_init_help=short ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001057
1058 -host | --host | --hos | --ho)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001059 ac_prev=host_alias ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001060 -host=* | --host=* | --hos=* | --ho=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001061 host_alias=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001062
Bram Moolenaar446cb832008-06-24 21:56:24 +00001063 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1064 ac_prev=htmldir ;;
1065 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1066 | --ht=*)
1067 htmldir=$ac_optarg ;;
1068
Bram Moolenaar071d4272004-06-13 20:20:40 +00001069 -includedir | --includedir | --includedi | --included | --include \
1070 | --includ | --inclu | --incl | --inc)
1071 ac_prev=includedir ;;
1072 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1073 | --includ=* | --inclu=* | --incl=* | --inc=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001074 includedir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001075
1076 -infodir | --infodir | --infodi | --infod | --info | --inf)
1077 ac_prev=infodir ;;
1078 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001079 infodir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001080
1081 -libdir | --libdir | --libdi | --libd)
1082 ac_prev=libdir ;;
1083 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001084 libdir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001085
1086 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1087 | --libexe | --libex | --libe)
1088 ac_prev=libexecdir ;;
1089 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1090 | --libexe=* | --libex=* | --libe=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001091 libexecdir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001092
Bram Moolenaar446cb832008-06-24 21:56:24 +00001093 -localedir | --localedir | --localedi | --localed | --locale)
1094 ac_prev=localedir ;;
1095 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1096 localedir=$ac_optarg ;;
1097
Bram Moolenaar071d4272004-06-13 20:20:40 +00001098 -localstatedir | --localstatedir | --localstatedi | --localstated \
Bram Moolenaar446cb832008-06-24 21:56:24 +00001099 | --localstate | --localstat | --localsta | --localst | --locals)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001100 ac_prev=localstatedir ;;
1101 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Bram Moolenaar446cb832008-06-24 21:56:24 +00001102 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001103 localstatedir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001104
1105 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1106 ac_prev=mandir ;;
1107 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001108 mandir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001109
1110 -nfp | --nfp | --nf)
1111 # Obsolete; use --without-fp.
1112 with_fp=no ;;
1113
1114 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001115 | --no-cr | --no-c | -n)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001116 no_create=yes ;;
1117
1118 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1119 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1120 no_recursion=yes ;;
1121
1122 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1123 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1124 | --oldin | --oldi | --old | --ol | --o)
1125 ac_prev=oldincludedir ;;
1126 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1127 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1128 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001129 oldincludedir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001130
1131 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1132 ac_prev=prefix ;;
1133 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001134 prefix=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001135
1136 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1137 | --program-pre | --program-pr | --program-p)
1138 ac_prev=program_prefix ;;
1139 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1140 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001141 program_prefix=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001142
1143 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1144 | --program-suf | --program-su | --program-s)
1145 ac_prev=program_suffix ;;
1146 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1147 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001148 program_suffix=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001149
1150 -program-transform-name | --program-transform-name \
1151 | --program-transform-nam | --program-transform-na \
1152 | --program-transform-n | --program-transform- \
1153 | --program-transform | --program-transfor \
1154 | --program-transfo | --program-transf \
1155 | --program-trans | --program-tran \
1156 | --progr-tra | --program-tr | --program-t)
1157 ac_prev=program_transform_name ;;
1158 -program-transform-name=* | --program-transform-name=* \
1159 | --program-transform-nam=* | --program-transform-na=* \
1160 | --program-transform-n=* | --program-transform-=* \
1161 | --program-transform=* | --program-transfor=* \
1162 | --program-transfo=* | --program-transf=* \
1163 | --program-trans=* | --program-tran=* \
1164 | --progr-tra=* | --program-tr=* | --program-t=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001165 program_transform_name=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001166
Bram Moolenaar446cb832008-06-24 21:56:24 +00001167 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1168 ac_prev=pdfdir ;;
1169 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1170 pdfdir=$ac_optarg ;;
1171
1172 -psdir | --psdir | --psdi | --psd | --ps)
1173 ac_prev=psdir ;;
1174 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1175 psdir=$ac_optarg ;;
1176
Bram Moolenaar071d4272004-06-13 20:20:40 +00001177 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1178 | -silent | --silent | --silen | --sile | --sil)
1179 silent=yes ;;
1180
Illia Bobyrf39842f2023-08-27 18:21:23 +02001181 -runstatedir | --runstatedir | --runstatedi | --runstated \
1182 | --runstate | --runstat | --runsta | --runst | --runs \
1183 | --run | --ru | --r)
1184 ac_prev=runstatedir ;;
1185 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1186 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1187 | --run=* | --ru=* | --r=*)
1188 runstatedir=$ac_optarg ;;
1189
Bram Moolenaar071d4272004-06-13 20:20:40 +00001190 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1191 ac_prev=sbindir ;;
1192 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1193 | --sbi=* | --sb=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001194 sbindir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001195
1196 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1197 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1198 | --sharedst | --shareds | --shared | --share | --shar \
1199 | --sha | --sh)
1200 ac_prev=sharedstatedir ;;
1201 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1202 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1203 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1204 | --sha=* | --sh=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001205 sharedstatedir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001206
1207 -site | --site | --sit)
1208 ac_prev=site ;;
1209 -site=* | --site=* | --sit=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001210 site=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001211
1212 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1213 ac_prev=srcdir ;;
1214 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001215 srcdir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001216
1217 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1218 | --syscon | --sysco | --sysc | --sys | --sy)
1219 ac_prev=sysconfdir ;;
1220 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1221 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001222 sysconfdir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001223
1224 -target | --target | --targe | --targ | --tar | --ta | --t)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001225 ac_prev=target_alias ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001226 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001227 target_alias=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001228
1229 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1230 verbose=yes ;;
1231
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001232 -version | --version | --versio | --versi | --vers | -V)
1233 ac_init_version=: ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001234
1235 -with-* | --with-*)
Bram Moolenaar446cb832008-06-24 21:56:24 +00001236 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Bram Moolenaar071d4272004-06-13 20:20:40 +00001237 # Reject names that are not valid shell variable names.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001238 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Illia Bobyra96d5442023-08-30 16:30:15 +02001239 as_fn_error $? "invalid package name: \`$ac_useropt'"
Bram Moolenaar446cb832008-06-24 21:56:24 +00001240 ac_useropt_orig=$ac_useropt
Illia Bobyra96d5442023-08-30 16:30:15 +02001241 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
Bram Moolenaar446cb832008-06-24 21:56:24 +00001242 case $ac_user_opts in
1243 *"
1244"with_$ac_useropt"
1245"*) ;;
1246 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1247 ac_unrecognized_sep=', ';;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001248 esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00001249 eval with_$ac_useropt=\$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001250
1251 -without-* | --without-*)
Bram Moolenaar446cb832008-06-24 21:56:24 +00001252 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Bram Moolenaar071d4272004-06-13 20:20:40 +00001253 # Reject names that are not valid shell variable names.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001254 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Illia Bobyra96d5442023-08-30 16:30:15 +02001255 as_fn_error $? "invalid package name: \`$ac_useropt'"
Bram Moolenaar446cb832008-06-24 21:56:24 +00001256 ac_useropt_orig=$ac_useropt
Illia Bobyra96d5442023-08-30 16:30:15 +02001257 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
Bram Moolenaar446cb832008-06-24 21:56:24 +00001258 case $ac_user_opts in
1259 *"
1260"with_$ac_useropt"
1261"*) ;;
1262 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1263 ac_unrecognized_sep=', ';;
1264 esac
1265 eval with_$ac_useropt=no ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001266
1267 --x)
1268 # Obsolete; use --with-x.
1269 with_x=yes ;;
1270
1271 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1272 | --x-incl | --x-inc | --x-in | --x-i)
1273 ac_prev=x_includes ;;
1274 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1275 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001276 x_includes=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001277
1278 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1279 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1280 ac_prev=x_libraries ;;
1281 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1282 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001283 x_libraries=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001284
Bram Moolenaar7db77842014-03-27 17:40:59 +01001285 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1286Try \`$0 --help' for more information"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001287 ;;
1288
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001289 *=*)
1290 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1291 # Reject names that are not valid shell variable names.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001292 case $ac_envvar in #(
1293 '' | [0-9]* | *[!_$as_cr_alnum]* )
Bram Moolenaar7db77842014-03-27 17:40:59 +01001294 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001295 esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00001296 eval $ac_envvar=\$ac_optarg
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001297 export $ac_envvar ;;
1298
Bram Moolenaar071d4272004-06-13 20:20:40 +00001299 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001300 # FIXME: should be removed in autoconf 3.0.
Illia Bobyra96d5442023-08-30 16:30:15 +02001301 printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001302 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Illia Bobyra96d5442023-08-30 16:30:15 +02001303 printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
Bram Moolenaar7db77842014-03-27 17:40:59 +01001304 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001305 ;;
1306
1307 esac
1308done
1309
1310if test -n "$ac_prev"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001311 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Bram Moolenaar7db77842014-03-27 17:40:59 +01001312 as_fn_error $? "missing argument to $ac_option"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001313fi
1314
Bram Moolenaar446cb832008-06-24 21:56:24 +00001315if test -n "$ac_unrecognized_opts"; then
1316 case $enable_option_checking in
1317 no) ;;
Bram Moolenaar7db77842014-03-27 17:40:59 +01001318 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Illia Bobyra96d5442023-08-30 16:30:15 +02001319 *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001320 esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00001321fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00001322
Bram Moolenaar446cb832008-06-24 21:56:24 +00001323# Check all directory arguments for consistency.
1324for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1325 datadir sysconfdir sharedstatedir localstatedir includedir \
1326 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Illia Bobyrf39842f2023-08-27 18:21:23 +02001327 libdir localedir mandir runstatedir
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001328do
Bram Moolenaar446cb832008-06-24 21:56:24 +00001329 eval ac_val=\$$ac_var
1330 # Remove trailing slashes.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001331 case $ac_val in
Bram Moolenaar446cb832008-06-24 21:56:24 +00001332 */ )
1333 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1334 eval $ac_var=\$ac_val;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001335 esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00001336 # Be sure to have absolute directory names.
1337 case $ac_val in
1338 [\\/$]* | ?:[\\/]* ) continue;;
1339 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1340 esac
Bram Moolenaar7db77842014-03-27 17:40:59 +01001341 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001342done
Bram Moolenaar071d4272004-06-13 20:20:40 +00001343
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001344# There might be people who depend on the old broken behavior: `$host'
1345# used to hold the argument of --host etc.
1346# FIXME: To remove some day.
1347build=$build_alias
1348host=$host_alias
1349target=$target_alias
Bram Moolenaar071d4272004-06-13 20:20:40 +00001350
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001351# FIXME: To remove some day.
1352if test "x$host_alias" != x; then
1353 if test "x$build_alias" = x; then
1354 cross_compiling=maybe
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001355 elif test "x$build_alias" != "x$host_alias"; then
1356 cross_compiling=yes
1357 fi
1358fi
1359
1360ac_tool_prefix=
1361test -n "$host_alias" && ac_tool_prefix=$host_alias-
1362
1363test "$silent" = yes && exec 6>/dev/null
1364
Bram Moolenaar071d4272004-06-13 20:20:40 +00001365
Bram Moolenaar446cb832008-06-24 21:56:24 +00001366ac_pwd=`pwd` && test -n "$ac_pwd" &&
1367ac_ls_di=`ls -di .` &&
1368ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Bram Moolenaar7db77842014-03-27 17:40:59 +01001369 as_fn_error $? "working directory cannot be determined"
Bram Moolenaar446cb832008-06-24 21:56:24 +00001370test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Bram Moolenaar7db77842014-03-27 17:40:59 +01001371 as_fn_error $? "pwd does not report name of working directory"
Bram Moolenaar446cb832008-06-24 21:56:24 +00001372
1373
Bram Moolenaar071d4272004-06-13 20:20:40 +00001374# Find the source files, if location was not specified.
1375if test -z "$srcdir"; then
1376 ac_srcdir_defaulted=yes
Bram Moolenaar446cb832008-06-24 21:56:24 +00001377 # Try the directory containing this script, then the parent directory.
1378 ac_confdir=`$as_dirname -- "$as_myself" ||
1379$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1380 X"$as_myself" : 'X\(//\)[^/]' \| \
1381 X"$as_myself" : 'X\(//\)$' \| \
1382 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
Illia Bobyra96d5442023-08-30 16:30:15 +02001383printf "%s\n" X"$as_myself" |
Bram Moolenaar446cb832008-06-24 21:56:24 +00001384 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1385 s//\1/
1386 q
1387 }
1388 /^X\(\/\/\)[^/].*/{
1389 s//\1/
1390 q
1391 }
1392 /^X\(\/\/\)$/{
1393 s//\1/
1394 q
1395 }
1396 /^X\(\/\).*/{
1397 s//\1/
1398 q
1399 }
1400 s/.*/./; q'`
Bram Moolenaar071d4272004-06-13 20:20:40 +00001401 srcdir=$ac_confdir
Bram Moolenaar446cb832008-06-24 21:56:24 +00001402 if test ! -r "$srcdir/$ac_unique_file"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00001403 srcdir=..
1404 fi
1405else
1406 ac_srcdir_defaulted=no
1407fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00001408if test ! -r "$srcdir/$ac_unique_file"; then
1409 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Bram Moolenaar7db77842014-03-27 17:40:59 +01001410 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001411fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00001412ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1413ac_abs_confdir=`(
Bram Moolenaar7db77842014-03-27 17:40:59 +01001414 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Bram Moolenaar446cb832008-06-24 21:56:24 +00001415 pwd)`
1416# When building in place, set srcdir=.
1417if test "$ac_abs_confdir" = "$ac_pwd"; then
1418 srcdir=.
1419fi
1420# Remove unnecessary trailing slashes from srcdir.
1421# Double slashes in file names in object file debugging info
1422# mess up M-x gdb in Emacs.
1423case $srcdir in
1424*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1425esac
1426for ac_var in $ac_precious_vars; do
1427 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1428 eval ac_env_${ac_var}_value=\$${ac_var}
1429 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1430 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1431done
Bram Moolenaar071d4272004-06-13 20:20:40 +00001432
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001433#
1434# Report the --help message.
1435#
1436if test "$ac_init_help" = "long"; then
1437 # Omit some internal or obsolete options to make the list less imposing.
1438 # This message is too long to be a string in the A/UX 3.1 sh.
1439 cat <<_ACEOF
1440\`configure' configures this package to adapt to many kinds of systems.
1441
1442Usage: $0 [OPTION]... [VAR=VALUE]...
1443
1444To assign environment variables (e.g., CC, CFLAGS...), specify them as
1445VAR=VALUE. See below for descriptions of some of the useful variables.
1446
1447Defaults for the options are specified in brackets.
1448
1449Configuration:
1450 -h, --help display this help and exit
1451 --help=short display options specific to this package
1452 --help=recursive display the short help of all the included packages
1453 -V, --version display version information and exit
Bram Moolenaar7db77842014-03-27 17:40:59 +01001454 -q, --quiet, --silent do not print \`checking ...' messages
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001455 --cache-file=FILE cache test results in FILE [disabled]
1456 -C, --config-cache alias for \`--cache-file=config.cache'
1457 -n, --no-create do not create output files
1458 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1459
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001460Installation directories:
1461 --prefix=PREFIX install architecture-independent files in PREFIX
Bram Moolenaar446cb832008-06-24 21:56:24 +00001462 [$ac_default_prefix]
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001463 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Bram Moolenaar446cb832008-06-24 21:56:24 +00001464 [PREFIX]
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001465
1466By default, \`make install' will install all the files in
1467\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1468an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1469for instance \`--prefix=\$HOME'.
1470
1471For better control, use the options below.
1472
1473Fine tuning of the installation directories:
Bram Moolenaar446cb832008-06-24 21:56:24 +00001474 --bindir=DIR user executables [EPREFIX/bin]
1475 --sbindir=DIR system admin executables [EPREFIX/sbin]
1476 --libexecdir=DIR program executables [EPREFIX/libexec]
1477 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1478 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1479 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
Illia Bobyrf39842f2023-08-27 18:21:23 +02001480 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Bram Moolenaar446cb832008-06-24 21:56:24 +00001481 --libdir=DIR object code libraries [EPREFIX/lib]
1482 --includedir=DIR C header files [PREFIX/include]
1483 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1484 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1485 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1486 --infodir=DIR info documentation [DATAROOTDIR/info]
1487 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1488 --mandir=DIR man documentation [DATAROOTDIR/man]
1489 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1490 --htmldir=DIR html documentation [DOCDIR]
1491 --dvidir=DIR dvi documentation [DOCDIR]
1492 --pdfdir=DIR pdf documentation [DOCDIR]
1493 --psdir=DIR ps documentation [DOCDIR]
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001494_ACEOF
1495
1496 cat <<\_ACEOF
1497
1498X features:
1499 --x-includes=DIR X include files are in DIR
1500 --x-libraries=DIR X library files are in DIR
1501_ACEOF
1502fi
1503
1504if test -n "$ac_init_help"; then
1505
1506 cat <<\_ACEOF
1507
1508Optional Features:
Bram Moolenaar446cb832008-06-24 21:56:24 +00001509 --disable-option-checking ignore unrecognized --enable/--with options
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001510 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1511 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Bram Moolenaarf788a062011-12-14 20:51:25 +01001512 --enable-fail-if-missing Fail if dependencies on additional features
1513 specified on the command line are missing.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001514 --disable-darwin Disable Darwin (Mac OS X) support.
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02001515 --disable-smack Do not check for Smack support.
1516 --disable-selinux Do not check for SELinux support.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001517 --disable-xsmp Disable XSMP session management
1518 --disable-xsmp-interact Disable XSMP interaction
Bram Moolenaar8008b632017-07-18 21:33:20 +02001519 --enable-luainterp=OPTS Include Lua interpreter. default=no OPTS=no/yes/dynamic
1520 --enable-mzschemeinterp Include MzScheme interpreter.
Bram Moolenaare06c1882010-07-21 22:05:20 +02001521 --enable-perlinterp=OPTS Include Perl interpreter. default=no OPTS=no/yes/dynamic
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02001522 --enable-pythoninterp=OPTS Include Python interpreter. default=no OPTS=no/yes/dynamic
Bram Moolenaar8008b632017-07-18 21:33:20 +02001523 --enable-python3interp=OPTS Include Python3 interpreter. default=no OPTS=no/yes/dynamic
Bram Moolenaar8a5115c2016-01-09 19:41:11 +01001524 --enable-tclinterp=OPTS Include Tcl interpreter. default=no OPTS=no/yes/dynamic
Bram Moolenaar3ca71f12010-10-27 16:49:47 +02001525 --enable-rubyinterp=OPTS Include Ruby interpreter. default=no OPTS=no/yes/dynamic
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001526 --enable-cscope Include cscope interface.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001527 --disable-netbeans Disable NetBeans integration support.
Bram Moolenaar8008b632017-07-18 21:33:20 +02001528 --disable-channel Disable process communication support.
1529 --enable-terminal Enable terminal emulation support.
Bram Moolenaare42a6d22017-11-12 19:21:51 +01001530 --enable-autoservername Automatically define servername at vim startup.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001531 --enable-multibyte Include multibyte editing support.
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01001532 --disable-rightleft Do not include Right-to-Left language support.
1533 --disable-arabic Do not include Arabic language support.
Bram Moolenaar14184a32019-02-16 15:10:30 +01001534 --disable-farsi Deprecated.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001535 --enable-xim Include XIM input support.
1536 --enable-fontset Include X fontset output support.
Bram Moolenaarf52fac22022-03-11 16:01:26 +00001537 --enable-gui=OPTS X11 GUI. default=auto OPTS=auto/no/gtk2/gnome2/gtk3/motif/haiku/photon/carbon
Bram Moolenaar182c5be2010-06-25 05:37:59 +02001538 --enable-gtk2-check If auto-select GUI, check for GTK+ 2 default=yes
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001539 --enable-gnome-check If GTK GUI, check for GNOME default=no
Bram Moolenaar98921892016-02-23 17:14:37 +01001540 --enable-gtk3-check If auto-select GUI, check for GTK+ 3 default=yes
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001541 --enable-motif-check If auto-select GUI, check for Motif default=yes
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001542 --disable-gtktest Do not try to compile and run a test GTK program
Bram Moolenaar4adfaab2016-04-21 18:20:11 +02001543 --disable-icon-cache-update update disabled
1544 --disable-desktop-database-update update disabled
Bram Moolenaar317fd3a2010-05-07 16:05:55 +02001545 --disable-largefile omit support for large files
Bram Moolenaar21606672019-06-14 20:40:58 +02001546 --disable-canberra Do not use libcanberra.
Christian Brabandtf573c6e2021-06-20 14:02:16 +02001547 --disable-libsodium Do not use libsodium.
Bram Moolenaard6d30422018-01-28 22:48:55 +01001548 --disable-acl No check for ACL support.
Bram Moolenaar0b40d082022-03-08 13:32:37 +00001549 --enable-gpm=OPTS Use gpm (Linux mouse daemon). default=yes OPTS=yes/no/dynamic
Bram Moolenaar8008b632017-07-18 21:33:20 +02001550 --disable-sysmouse Don't use sysmouse (mouse in *BSD console).
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001551 --disable-nls Don't support NLS (gettext()).
1552
1553Optional Packages:
1554 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1555 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Bram Moolenaar899dddf2006-03-26 21:06:50 +00001556 --with-mac-arch=ARCH current, intel, ppc or both
Bram Moolenaar595a7be2010-03-10 16:28:12 +01001557 --with-developer-dir=PATH use PATH as location for Xcode developer tools
Bram Moolenaarc236c162008-07-13 17:41:49 +00001558 --with-local-dir=PATH search PATH instead of /usr/local for local libraries.
1559 --without-local-dir do not search /usr/local for local libraries.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001560 --with-vim-name=NAME what to call the Vim executable
1561 --with-ex-name=NAME what to call the Ex executable
1562 --with-view-name=NAME what to call the View executable
Bram Moolenaar9d302ad2018-12-21 11:48:51 +01001563 --with-global-runtime=DIR global runtime directory in 'runtimepath', comma-separated for multiple directories
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001564 --with-modified-by=NAME name of who modified a release version
Martin Tournoij25f3a142022-10-08 19:26:41 +01001565 --with-features=TYPE tiny, normal or huge (default: huge)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001566 --with-compiledby=NAME name to show in :version message
Bram Moolenaar0ba04292010-07-14 23:23:17 +02001567 --with-lua-prefix=PFX Prefix where Lua is installed.
Bram Moolenaare855ccf2013-07-28 13:32:15 +02001568 --with-luajit Link with LuaJIT instead of Lua.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001569 --with-plthome=PLTHOME Use PLTHOME.
Bram Moolenaare1a32312018-04-15 16:03:25 +02001570 --with-python-command=NAME name of the Python 2 command (default: python2 or python)
1571 --with-python-config-dir=PATH Python's config directory (deprecated)
1572 --with-python3-command=NAME name of the Python 3 command (default: python3 or python)
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02001573 --with-python3-stable-abi=VERSION stable ABI version to target (e.g. 3.8)
Bram Moolenaare1a32312018-04-15 16:03:25 +02001574 --with-python3-config-dir=PATH Python's config directory (deprecated)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001575 --with-tclsh=PATH which tclsh to use (default: tclsh8.0)
Bram Moolenaar165641d2010-02-17 16:23:09 +01001576 --with-ruby-command=RUBY name of the Ruby command (default: ruby)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001577 --with-x use the X Window System
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001578 --with-gnome-includes=DIR Specify location of GNOME headers
1579 --with-gnome-libs=DIR Specify location of GNOME libs
1580 --with-gnome Specify prefix for GNOME files
Bram Moolenaar8008b632017-07-18 21:33:20 +02001581 --with-motif-lib=STRING Library for Motif
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001582 --with-tlib=library terminal library to be used
1583
1584Some influential environment variables:
1585 CC C compiler command
1586 CFLAGS C compiler flags
1587 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1588 nonstandard directory <lib dir>
Bram Moolenaar446cb832008-06-24 21:56:24 +00001589 LIBS libraries to pass to the linker, e.g. -l<library>
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001590 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Bram Moolenaar446cb832008-06-24 21:56:24 +00001591 you have headers in a nonstandard directory <include dir>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001592 CPP C preprocessor
Bram Moolenaar446cb832008-06-24 21:56:24 +00001593 XMKMF Path to xmkmf, Makefile generator for X Window System
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001594
1595Use these variables to override the choices made by `configure' or to help
1596it to find libraries and programs with nonstandard names/locations.
1597
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001598Report bugs to the package provider.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001599_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +00001600ac_status=$?
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001601fi
1602
1603if test "$ac_init_help" = "recursive"; then
1604 # If there are subdirs, report their specific --help.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001605 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Bram Moolenaar446cb832008-06-24 21:56:24 +00001606 test -d "$ac_dir" ||
1607 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1608 continue
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001609 ac_builddir=.
1610
Bram Moolenaar446cb832008-06-24 21:56:24 +00001611case "$ac_dir" in
1612.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1613*)
Illia Bobyra96d5442023-08-30 16:30:15 +02001614 ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
Bram Moolenaar446cb832008-06-24 21:56:24 +00001615 # A ".." for each directory in $ac_dir_suffix.
Illia Bobyra96d5442023-08-30 16:30:15 +02001616 ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Bram Moolenaar446cb832008-06-24 21:56:24 +00001617 case $ac_top_builddir_sub in
1618 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1619 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1620 esac ;;
1621esac
1622ac_abs_top_builddir=$ac_pwd
1623ac_abs_builddir=$ac_pwd$ac_dir_suffix
1624# for backward compatibility:
1625ac_top_builddir=$ac_top_build_prefix
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001626
1627case $srcdir in
Bram Moolenaar446cb832008-06-24 21:56:24 +00001628 .) # We are building in place.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001629 ac_srcdir=.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001630 ac_top_srcdir=$ac_top_builddir_sub
1631 ac_abs_top_srcdir=$ac_pwd ;;
1632 [\\/]* | ?:[\\/]* ) # Absolute name.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001633 ac_srcdir=$srcdir$ac_dir_suffix;
Bram Moolenaar446cb832008-06-24 21:56:24 +00001634 ac_top_srcdir=$srcdir
1635 ac_abs_top_srcdir=$srcdir ;;
1636 *) # Relative name.
1637 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1638 ac_top_srcdir=$ac_top_build_prefix$srcdir
1639 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001640esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00001641ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001642
Bram Moolenaar446cb832008-06-24 21:56:24 +00001643 cd "$ac_dir" || { ac_status=$?; continue; }
Illia Bobyra96d5442023-08-30 16:30:15 +02001644 # Check for configure.gnu first; this name is used for a wrapper for
1645 # Metaconfig's "Configure" on case-insensitive file systems.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001646 if test -f "$ac_srcdir/configure.gnu"; then
1647 echo &&
1648 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1649 elif test -f "$ac_srcdir/configure"; then
1650 echo &&
1651 $SHELL "$ac_srcdir/configure" --help=recursive
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001652 else
Illia Bobyra96d5442023-08-30 16:30:15 +02001653 printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Bram Moolenaar446cb832008-06-24 21:56:24 +00001654 fi || ac_status=$?
1655 cd "$ac_pwd" || { ac_status=$?; break; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001656 done
1657fi
1658
Bram Moolenaar446cb832008-06-24 21:56:24 +00001659test -n "$ac_init_help" && exit $ac_status
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001660if $ac_init_version; then
1661 cat <<\_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +00001662configure
Illia Bobyra96d5442023-08-30 16:30:15 +02001663generated by GNU Autoconf 2.71
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001664
Illia Bobyra96d5442023-08-30 16:30:15 +02001665Copyright (C) 2021 Free Software Foundation, Inc.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001666This configure script is free software; the Free Software Foundation
1667gives unlimited permission to copy, distribute and modify it.
1668_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +00001669 exit
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001670fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001671
1672## ------------------------ ##
1673## Autoconf initialization. ##
1674## ------------------------ ##
1675
1676# ac_fn_c_try_compile LINENO
1677# --------------------------
1678# Try to compile conftest.$ac_ext, and return whether this succeeded.
1679ac_fn_c_try_compile ()
1680{
1681 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +02001682 rm -f conftest.$ac_objext conftest.beam
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001683 if { { ac_try="$ac_compile"
1684case "(($ac_try" in
1685 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1686 *) ac_try_echo=$ac_try;;
1687esac
1688eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Illia Bobyra96d5442023-08-30 16:30:15 +02001689printf "%s\n" "$ac_try_echo"; } >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001690 (eval "$ac_compile") 2>conftest.err
1691 ac_status=$?
1692 if test -s conftest.err; then
1693 grep -v '^ *+' conftest.err >conftest.er1
1694 cat conftest.er1 >&5
1695 mv -f conftest.er1 conftest.err
1696 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02001697 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001698 test $ac_status = 0; } && {
1699 test -z "$ac_c_werror_flag" ||
1700 test ! -s conftest.err
Illia Bobyra96d5442023-08-30 16:30:15 +02001701 } && test -s conftest.$ac_objext
1702then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001703 ac_retval=0
Illia Bobyra96d5442023-08-30 16:30:15 +02001704else $as_nop
1705 printf "%s\n" "$as_me: failed program was:" >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001706sed 's/^/| /' conftest.$ac_ext >&5
1707
1708 ac_retval=1
1709fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01001710 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001711 as_fn_set_status $ac_retval
1712
1713} # ac_fn_c_try_compile
1714
1715# ac_fn_c_try_cpp LINENO
1716# ----------------------
1717# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1718ac_fn_c_try_cpp ()
1719{
1720 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1721 if { { ac_try="$ac_cpp conftest.$ac_ext"
1722case "(($ac_try" in
1723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1724 *) ac_try_echo=$ac_try;;
1725esac
1726eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Illia Bobyra96d5442023-08-30 16:30:15 +02001727printf "%s\n" "$ac_try_echo"; } >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001728 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1729 ac_status=$?
1730 if test -s conftest.err; then
1731 grep -v '^ *+' conftest.err >conftest.er1
1732 cat conftest.er1 >&5
1733 mv -f conftest.er1 conftest.err
1734 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02001735 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Bram Moolenaar7db77842014-03-27 17:40:59 +01001736 test $ac_status = 0; } > conftest.i && {
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001737 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1738 test ! -s conftest.err
Illia Bobyra96d5442023-08-30 16:30:15 +02001739 }
1740then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001741 ac_retval=0
Illia Bobyra96d5442023-08-30 16:30:15 +02001742else $as_nop
1743 printf "%s\n" "$as_me: failed program was:" >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001744sed 's/^/| /' conftest.$ac_ext >&5
1745
1746 ac_retval=1
1747fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01001748 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001749 as_fn_set_status $ac_retval
1750
1751} # ac_fn_c_try_cpp
1752
1753# ac_fn_c_try_link LINENO
1754# -----------------------
1755# Try to link conftest.$ac_ext, and return whether this succeeded.
1756ac_fn_c_try_link ()
1757{
1758 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +02001759 rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001760 if { { ac_try="$ac_link"
1761case "(($ac_try" in
1762 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1763 *) ac_try_echo=$ac_try;;
1764esac
1765eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Illia Bobyra96d5442023-08-30 16:30:15 +02001766printf "%s\n" "$ac_try_echo"; } >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001767 (eval "$ac_link") 2>conftest.err
1768 ac_status=$?
1769 if test -s conftest.err; then
1770 grep -v '^ *+' conftest.err >conftest.er1
1771 cat conftest.er1 >&5
1772 mv -f conftest.er1 conftest.err
1773 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02001774 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001775 test $ac_status = 0; } && {
1776 test -z "$ac_c_werror_flag" ||
1777 test ! -s conftest.err
1778 } && test -s conftest$ac_exeext && {
1779 test "$cross_compiling" = yes ||
Bram Moolenaar7db77842014-03-27 17:40:59 +01001780 test -x conftest$ac_exeext
Illia Bobyra96d5442023-08-30 16:30:15 +02001781 }
1782then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001783 ac_retval=0
Illia Bobyra96d5442023-08-30 16:30:15 +02001784else $as_nop
1785 printf "%s\n" "$as_me: failed program was:" >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001786sed 's/^/| /' conftest.$ac_ext >&5
1787
1788 ac_retval=1
1789fi
1790 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1791 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1792 # interfere with the next link command; also delete a directory that is
1793 # left behind by Apple's compiler. We do this before executing the actions.
1794 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Bram Moolenaar7db77842014-03-27 17:40:59 +01001795 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001796 as_fn_set_status $ac_retval
1797
1798} # ac_fn_c_try_link
1799
Illia Bobyr0e82b592023-08-29 21:16:29 +02001800# ac_fn_c_try_run LINENO
1801# ----------------------
Illia Bobyra96d5442023-08-30 16:30:15 +02001802# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
1803# executables *can* be run.
Illia Bobyr0e82b592023-08-29 21:16:29 +02001804ac_fn_c_try_run ()
1805{
1806 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1807 if { { ac_try="$ac_link"
1808case "(($ac_try" in
1809 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1810 *) ac_try_echo=$ac_try;;
1811esac
1812eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Illia Bobyra96d5442023-08-30 16:30:15 +02001813printf "%s\n" "$ac_try_echo"; } >&5
Illia Bobyr0e82b592023-08-29 21:16:29 +02001814 (eval "$ac_link") 2>&5
1815 ac_status=$?
Illia Bobyra96d5442023-08-30 16:30:15 +02001816 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Illia Bobyr0e82b592023-08-29 21:16:29 +02001817 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1818 { { case "(($ac_try" in
1819 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1820 *) ac_try_echo=$ac_try;;
1821esac
1822eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Illia Bobyra96d5442023-08-30 16:30:15 +02001823printf "%s\n" "$ac_try_echo"; } >&5
Illia Bobyr0e82b592023-08-29 21:16:29 +02001824 (eval "$ac_try") 2>&5
1825 ac_status=$?
Illia Bobyra96d5442023-08-30 16:30:15 +02001826 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1827 test $ac_status = 0; }; }
1828then :
Illia Bobyr0e82b592023-08-29 21:16:29 +02001829 ac_retval=0
Illia Bobyra96d5442023-08-30 16:30:15 +02001830else $as_nop
1831 printf "%s\n" "$as_me: program exited with status $ac_status" >&5
1832 printf "%s\n" "$as_me: failed program was:" >&5
Illia Bobyr0e82b592023-08-29 21:16:29 +02001833sed 's/^/| /' conftest.$ac_ext >&5
1834
1835 ac_retval=$ac_status
1836fi
1837 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1838 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1839 as_fn_set_status $ac_retval
1840
1841} # ac_fn_c_try_run
1842
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001843# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1844# -------------------------------------------------------
1845# Tests whether HEADER exists and can be compiled using the include files in
1846# INCLUDES, setting the cache variable VAR accordingly.
1847ac_fn_c_check_header_compile ()
1848{
1849 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +02001850 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1851printf %s "checking for $2... " >&6; }
1852if eval test \${$3+y}
1853then :
1854 printf %s "(cached) " >&6
1855else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1857/* end confdefs.h. */
1858$4
1859#include <$2>
1860_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02001861if ac_fn_c_try_compile "$LINENO"
1862then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001863 eval "$3=yes"
Illia Bobyra96d5442023-08-30 16:30:15 +02001864else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001865 eval "$3=no"
1866fi
Illia Bobyra96d5442023-08-30 16:30:15 +02001867rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001868fi
1869eval ac_res=\$$3
Illia Bobyra96d5442023-08-30 16:30:15 +02001870 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1871printf "%s\n" "$ac_res" >&6; }
Bram Moolenaar7db77842014-03-27 17:40:59 +01001872 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001873
1874} # ac_fn_c_check_header_compile
1875
1876# ac_fn_c_check_func LINENO FUNC VAR
1877# ----------------------------------
1878# Tests whether FUNC exists, setting the cache variable VAR accordingly
1879ac_fn_c_check_func ()
1880{
1881 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +02001882 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1883printf %s "checking for $2... " >&6; }
1884if eval test \${$3+y}
1885then :
1886 printf %s "(cached) " >&6
1887else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1889/* end confdefs.h. */
1890/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1891 For example, HP-UX 11i <limits.h> declares gettimeofday. */
1892#define $2 innocuous_$2
1893
1894/* System header to define __stub macros and hopefully few prototypes,
Illia Bobyra96d5442023-08-30 16:30:15 +02001895 which can conflict with char $2 (); below. */
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001896
Illia Bobyra96d5442023-08-30 16:30:15 +02001897#include <limits.h>
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001898#undef $2
1899
1900/* Override any GCC internal prototype to avoid an error.
1901 Use char because int might match the return type of a GCC
1902 builtin and then its argument prototype would still apply. */
1903#ifdef __cplusplus
1904extern "C"
1905#endif
1906char $2 ();
1907/* The GNU C library defines this for functions which it implements
1908 to always fail with ENOSYS. Some functions are actually named
1909 something starting with __ and the normal name is an alias. */
1910#if defined __stub_$2 || defined __stub___$2
1911choke me
1912#endif
1913
1914int
Illia Bobyra96d5442023-08-30 16:30:15 +02001915main (void)
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001916{
1917return $2 ();
1918 ;
1919 return 0;
1920}
1921_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02001922if ac_fn_c_try_link "$LINENO"
1923then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001924 eval "$3=yes"
Illia Bobyra96d5442023-08-30 16:30:15 +02001925else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001926 eval "$3=no"
1927fi
Illia Bobyra96d5442023-08-30 16:30:15 +02001928rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001929 conftest$ac_exeext conftest.$ac_ext
1930fi
1931eval ac_res=\$$3
Illia Bobyra96d5442023-08-30 16:30:15 +02001932 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1933printf "%s\n" "$ac_res" >&6; }
Bram Moolenaar7db77842014-03-27 17:40:59 +01001934 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001935
1936} # ac_fn_c_check_func
1937
Bram Moolenaar914703b2010-05-31 21:59:46 +02001938# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1939# --------------------------------------------
1940# Tries to find the compile-time value of EXPR in a program that includes
1941# INCLUDES, setting VAR accordingly. Returns whether the value could be
1942# computed
1943ac_fn_c_compute_int ()
1944{
1945 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1946 if test "$cross_compiling" = yes; then
1947 # Depending upon the size, compute the lo and hi bounds.
1948cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1949/* end confdefs.h. */
1950$4
1951int
Illia Bobyra96d5442023-08-30 16:30:15 +02001952main (void)
Bram Moolenaar914703b2010-05-31 21:59:46 +02001953{
1954static int test_array [1 - 2 * !(($2) >= 0)];
Bram Moolenaar7db77842014-03-27 17:40:59 +01001955test_array [0] = 0;
1956return test_array [0];
Bram Moolenaar914703b2010-05-31 21:59:46 +02001957
1958 ;
1959 return 0;
1960}
1961_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02001962if ac_fn_c_try_compile "$LINENO"
1963then :
Bram Moolenaar914703b2010-05-31 21:59:46 +02001964 ac_lo=0 ac_mid=0
1965 while :; do
1966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1967/* end confdefs.h. */
1968$4
1969int
Illia Bobyra96d5442023-08-30 16:30:15 +02001970main (void)
Bram Moolenaar914703b2010-05-31 21:59:46 +02001971{
1972static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Bram Moolenaar7db77842014-03-27 17:40:59 +01001973test_array [0] = 0;
1974return test_array [0];
Bram Moolenaar914703b2010-05-31 21:59:46 +02001975
1976 ;
1977 return 0;
1978}
1979_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02001980if ac_fn_c_try_compile "$LINENO"
1981then :
Bram Moolenaar914703b2010-05-31 21:59:46 +02001982 ac_hi=$ac_mid; break
Illia Bobyra96d5442023-08-30 16:30:15 +02001983else $as_nop
Bram Moolenaar914703b2010-05-31 21:59:46 +02001984 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
1985 if test $ac_lo -le $ac_mid; then
1986 ac_lo= ac_hi=
1987 break
1988 fi
1989 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
1990fi
Illia Bobyra96d5442023-08-30 16:30:15 +02001991rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar914703b2010-05-31 21:59:46 +02001992 done
Illia Bobyra96d5442023-08-30 16:30:15 +02001993else $as_nop
Bram Moolenaar914703b2010-05-31 21:59:46 +02001994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1995/* end confdefs.h. */
1996$4
1997int
Illia Bobyra96d5442023-08-30 16:30:15 +02001998main (void)
Bram Moolenaar914703b2010-05-31 21:59:46 +02001999{
2000static int test_array [1 - 2 * !(($2) < 0)];
Bram Moolenaar7db77842014-03-27 17:40:59 +01002001test_array [0] = 0;
2002return test_array [0];
Bram Moolenaar914703b2010-05-31 21:59:46 +02002003
2004 ;
2005 return 0;
2006}
2007_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02002008if ac_fn_c_try_compile "$LINENO"
2009then :
Bram Moolenaar914703b2010-05-31 21:59:46 +02002010 ac_hi=-1 ac_mid=-1
2011 while :; do
2012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2013/* end confdefs.h. */
2014$4
2015int
Illia Bobyra96d5442023-08-30 16:30:15 +02002016main (void)
Bram Moolenaar914703b2010-05-31 21:59:46 +02002017{
2018static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Bram Moolenaar7db77842014-03-27 17:40:59 +01002019test_array [0] = 0;
2020return test_array [0];
Bram Moolenaar914703b2010-05-31 21:59:46 +02002021
2022 ;
2023 return 0;
2024}
2025_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02002026if ac_fn_c_try_compile "$LINENO"
2027then :
Bram Moolenaar914703b2010-05-31 21:59:46 +02002028 ac_lo=$ac_mid; break
Illia Bobyra96d5442023-08-30 16:30:15 +02002029else $as_nop
Bram Moolenaar914703b2010-05-31 21:59:46 +02002030 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2031 if test $ac_mid -le $ac_hi; then
2032 ac_lo= ac_hi=
2033 break
2034 fi
2035 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2036fi
Illia Bobyra96d5442023-08-30 16:30:15 +02002037rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar914703b2010-05-31 21:59:46 +02002038 done
Illia Bobyra96d5442023-08-30 16:30:15 +02002039else $as_nop
Bram Moolenaar914703b2010-05-31 21:59:46 +02002040 ac_lo= ac_hi=
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 +02002043fi
Illia Bobyra96d5442023-08-30 16:30:15 +02002044rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar914703b2010-05-31 21:59:46 +02002045# Binary search between lo and hi bounds.
2046while test "x$ac_lo" != "x$ac_hi"; do
2047 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2049/* end confdefs.h. */
2050$4
2051int
Illia Bobyra96d5442023-08-30 16:30:15 +02002052main (void)
Bram Moolenaar914703b2010-05-31 21:59:46 +02002053{
2054static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Bram Moolenaar7db77842014-03-27 17:40:59 +01002055test_array [0] = 0;
2056return test_array [0];
Bram Moolenaar914703b2010-05-31 21:59:46 +02002057
2058 ;
2059 return 0;
2060}
2061_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02002062if ac_fn_c_try_compile "$LINENO"
2063then :
Bram Moolenaar914703b2010-05-31 21:59:46 +02002064 ac_hi=$ac_mid
Illia Bobyra96d5442023-08-30 16:30:15 +02002065else $as_nop
Bram Moolenaar914703b2010-05-31 21:59:46 +02002066 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2067fi
Illia Bobyra96d5442023-08-30 16:30:15 +02002068rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar914703b2010-05-31 21:59:46 +02002069done
2070case $ac_lo in #((
2071?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2072'') ac_retval=1 ;;
2073esac
2074 else
2075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2076/* end confdefs.h. */
2077$4
Illia Bobyra96d5442023-08-30 16:30:15 +02002078static long int longval (void) { return $2; }
2079static unsigned long int ulongval (void) { return $2; }
Bram Moolenaar914703b2010-05-31 21:59:46 +02002080#include <stdio.h>
2081#include <stdlib.h>
2082int
Illia Bobyra96d5442023-08-30 16:30:15 +02002083main (void)
Bram Moolenaar914703b2010-05-31 21:59:46 +02002084{
2085
2086 FILE *f = fopen ("conftest.val", "w");
2087 if (! f)
2088 return 1;
2089 if (($2) < 0)
2090 {
2091 long int i = longval ();
2092 if (i != ($2))
2093 return 1;
2094 fprintf (f, "%ld", i);
2095 }
2096 else
2097 {
2098 unsigned long int i = ulongval ();
2099 if (i != ($2))
2100 return 1;
2101 fprintf (f, "%lu", i);
2102 }
2103 /* Do not output a trailing newline, as this causes \r\n confusion
2104 on some platforms. */
2105 return ferror (f) || fclose (f) != 0;
2106
2107 ;
2108 return 0;
2109}
2110_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02002111if ac_fn_c_try_run "$LINENO"
2112then :
Bram Moolenaar914703b2010-05-31 21:59:46 +02002113 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
Illia Bobyra96d5442023-08-30 16:30:15 +02002114else $as_nop
Bram Moolenaar914703b2010-05-31 21:59:46 +02002115 ac_retval=1
2116fi
2117rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2118 conftest.$ac_objext conftest.beam conftest.$ac_ext
2119rm -f conftest.val
2120
2121 fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01002122 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Bram Moolenaar914703b2010-05-31 21:59:46 +02002123 as_fn_set_status $ac_retval
2124
2125} # ac_fn_c_compute_int
Mike Gilberta055b442023-08-20 19:01:41 +02002126
2127# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2128# -------------------------------------------
2129# Tests whether TYPE exists after having included INCLUDES, setting cache
2130# variable VAR accordingly.
2131ac_fn_c_check_type ()
2132{
2133 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +02002134 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2135printf %s "checking for $2... " >&6; }
2136if eval test \${$3+y}
2137then :
2138 printf %s "(cached) " >&6
2139else $as_nop
Mike Gilberta055b442023-08-20 19:01:41 +02002140 eval "$3=no"
2141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2142/* end confdefs.h. */
2143$4
2144int
Illia Bobyra96d5442023-08-30 16:30:15 +02002145main (void)
Mike Gilberta055b442023-08-20 19:01:41 +02002146{
2147if (sizeof ($2))
2148 return 0;
2149 ;
2150 return 0;
2151}
2152_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02002153if ac_fn_c_try_compile "$LINENO"
2154then :
Mike Gilberta055b442023-08-20 19:01:41 +02002155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2156/* end confdefs.h. */
2157$4
2158int
Illia Bobyra96d5442023-08-30 16:30:15 +02002159main (void)
Mike Gilberta055b442023-08-20 19:01:41 +02002160{
2161if (sizeof (($2)))
2162 return 0;
2163 ;
2164 return 0;
2165}
2166_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02002167if ac_fn_c_try_compile "$LINENO"
2168then :
Mike Gilberta055b442023-08-20 19:01:41 +02002169
Illia Bobyra96d5442023-08-30 16:30:15 +02002170else $as_nop
Mike Gilberta055b442023-08-20 19:01:41 +02002171 eval "$3=yes"
2172fi
Illia Bobyra96d5442023-08-30 16:30:15 +02002173rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Mike Gilberta055b442023-08-20 19:01:41 +02002174fi
Illia Bobyra96d5442023-08-30 16:30:15 +02002175rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Mike Gilberta055b442023-08-20 19:01:41 +02002176fi
2177eval ac_res=\$$3
Illia Bobyra96d5442023-08-30 16:30:15 +02002178 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2179printf "%s\n" "$ac_res" >&6; }
Mike Gilberta055b442023-08-20 19:01:41 +02002180 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2181
2182} # ac_fn_c_check_type
2183
2184# ac_fn_c_find_uintX_t LINENO BITS VAR
2185# ------------------------------------
2186# Finds an unsigned integer type with width BITS, setting cache variable VAR
2187# accordingly.
2188ac_fn_c_find_uintX_t ()
2189{
2190 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +02002191 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
2192printf %s "checking for uint$2_t... " >&6; }
2193if eval test \${$3+y}
2194then :
2195 printf %s "(cached) " >&6
2196else $as_nop
Mike Gilberta055b442023-08-20 19:01:41 +02002197 eval "$3=no"
2198 # Order is important - never check a type that is potentially smaller
2199 # than half of the expected target width.
2200 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
2201 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
2202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2203/* end confdefs.h. */
2204$ac_includes_default
2205int
Illia Bobyra96d5442023-08-30 16:30:15 +02002206main (void)
Mike Gilberta055b442023-08-20 19:01:41 +02002207{
2208static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
2209test_array [0] = 0;
2210return test_array [0];
2211
2212 ;
2213 return 0;
2214}
2215_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02002216if ac_fn_c_try_compile "$LINENO"
2217then :
Mike Gilberta055b442023-08-20 19:01:41 +02002218 case $ac_type in #(
2219 uint$2_t) :
2220 eval "$3=yes" ;; #(
2221 *) :
2222 eval "$3=\$ac_type" ;;
2223esac
2224fi
Illia Bobyra96d5442023-08-30 16:30:15 +02002225rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2226 if eval test \"x\$"$3"\" = x"no"
2227then :
Mike Gilberta055b442023-08-20 19:01:41 +02002228
Illia Bobyra96d5442023-08-30 16:30:15 +02002229else $as_nop
Mike Gilberta055b442023-08-20 19:01:41 +02002230 break
2231fi
2232 done
2233fi
2234eval ac_res=\$$3
Illia Bobyra96d5442023-08-30 16:30:15 +02002235 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2236printf "%s\n" "$ac_res" >&6; }
Mike Gilberta055b442023-08-20 19:01:41 +02002237 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2238
2239} # ac_fn_c_find_uintX_t
Illia Bobyra96d5442023-08-30 16:30:15 +02002240ac_configure_args_raw=
2241for ac_arg
2242do
2243 case $ac_arg in
2244 *\'*)
2245 ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2246 esac
2247 as_fn_append ac_configure_args_raw " '$ac_arg'"
2248done
2249
2250case $ac_configure_args_raw in
2251 *$as_nl*)
2252 ac_safe_unquote= ;;
2253 *)
2254 ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab.
2255 ac_unsafe_a="$ac_unsafe_z#~"
2256 ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
2257 ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
2258esac
2259
Bram Moolenaar446cb832008-06-24 21:56:24 +00002260cat >auto/config.log <<_ACEOF
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002261This file contains any messages produced by compilers while
2262running configure, to aid debugging if configure makes a mistake.
2263
2264It was created by $as_me, which was
Illia Bobyra96d5442023-08-30 16:30:15 +02002265generated by GNU Autoconf 2.71. Invocation command line was
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002266
Illia Bobyra96d5442023-08-30 16:30:15 +02002267 $ $0$ac_configure_args_raw
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002268
2269_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +00002270exec 5>>auto/config.log
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002271{
2272cat <<_ASUNAME
2273## --------- ##
2274## Platform. ##
2275## --------- ##
2276
2277hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2278uname -m = `(uname -m) 2>/dev/null || echo unknown`
2279uname -r = `(uname -r) 2>/dev/null || echo unknown`
2280uname -s = `(uname -s) 2>/dev/null || echo unknown`
2281uname -v = `(uname -v) 2>/dev/null || echo unknown`
2282
2283/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2284/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2285
2286/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2287/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2288/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Bram Moolenaar446cb832008-06-24 21:56:24 +00002289/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002290/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2291/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2292/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2293
2294_ASUNAME
2295
2296as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2297for as_dir in $PATH
2298do
2299 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02002300 case $as_dir in #(((
2301 '') as_dir=./ ;;
2302 */) ;;
2303 *) as_dir=$as_dir/ ;;
2304 esac
2305 printf "%s\n" "PATH: $as_dir"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002306 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00002307IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002308
2309} >&5
2310
2311cat >&5 <<_ACEOF
2312
2313
2314## ----------- ##
2315## Core tests. ##
2316## ----------- ##
2317
2318_ACEOF
2319
2320
2321# Keep a trace of the command line.
2322# Strip out --no-create and --no-recursion so they do not pile up.
2323# Strip out --silent because we don't want to record it for future runs.
2324# Also quote any args containing shell meta-characters.
2325# Make two passes to allow for proper duplicate-argument suppression.
2326ac_configure_args=
2327ac_configure_args0=
2328ac_configure_args1=
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002329ac_must_keep_next=false
2330for ac_pass in 1 2
2331do
2332 for ac_arg
2333 do
2334 case $ac_arg in
2335 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2336 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2337 | -silent | --silent | --silen | --sile | --sil)
2338 continue ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +00002339 *\'*)
Illia Bobyra96d5442023-08-30 16:30:15 +02002340 ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002341 esac
2342 case $ac_pass in
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002343 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002344 2)
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002345 as_fn_append ac_configure_args1 " '$ac_arg'"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002346 if test $ac_must_keep_next = true; then
2347 ac_must_keep_next=false # Got value, back to normal.
2348 else
2349 case $ac_arg in
2350 *=* | --config-cache | -C | -disable-* | --disable-* \
2351 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2352 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2353 | -with-* | --with-* | -without-* | --without-* | --x)
2354 case "$ac_configure_args0 " in
2355 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2356 esac
2357 ;;
2358 -* ) ac_must_keep_next=true ;;
2359 esac
2360 fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002361 as_fn_append ac_configure_args " '$ac_arg'"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002362 ;;
2363 esac
2364 done
2365done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002366{ ac_configure_args0=; unset ac_configure_args0;}
2367{ ac_configure_args1=; unset ac_configure_args1;}
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002368
2369# When interrupted or exit'd, cleanup temporary files, and complete
2370# config.log. We remove comments because anyway the quotes in there
2371# would cause problems or look ugly.
Bram Moolenaar446cb832008-06-24 21:56:24 +00002372# WARNING: Use '\'' to represent an apostrophe within the trap.
2373# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002374trap 'exit_status=$?
Illia Bobyra96d5442023-08-30 16:30:15 +02002375 # Sanitize IFS.
2376 IFS=" "" $as_nl"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002377 # Save into config.log some information that might help in debugging.
2378 {
2379 echo
2380
Illia Bobyra96d5442023-08-30 16:30:15 +02002381 printf "%s\n" "## ---------------- ##
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002382## Cache variables. ##
Bram Moolenaar7db77842014-03-27 17:40:59 +01002383## ---------------- ##"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002384 echo
2385 # The following way of writing the cache mishandles newlines in values,
Bram Moolenaar446cb832008-06-24 21:56:24 +00002386(
2387 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2388 eval ac_val=\$$ac_var
2389 case $ac_val in #(
2390 *${as_nl}*)
2391 case $ac_var in #(
Illia Bobyra96d5442023-08-30 16:30:15 +02002392 *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2393printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +00002394 esac
2395 case $ac_var in #(
2396 _ | IFS | as_nl) ;; #(
2397 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002398 *) { eval $ac_var=; unset $ac_var;} ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +00002399 esac ;;
2400 esac
2401 done
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002402 (set) 2>&1 |
Bram Moolenaar446cb832008-06-24 21:56:24 +00002403 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2404 *${as_nl}ac_space=\ *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002405 sed -n \
Bram Moolenaar446cb832008-06-24 21:56:24 +00002406 "s/'\''/'\''\\\\'\'''\''/g;
2407 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2408 ;; #(
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002409 *)
Bram Moolenaar446cb832008-06-24 21:56:24 +00002410 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002411 ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +00002412 esac |
2413 sort
2414)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002415 echo
2416
Illia Bobyra96d5442023-08-30 16:30:15 +02002417 printf "%s\n" "## ----------------- ##
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002418## Output variables. ##
Bram Moolenaar7db77842014-03-27 17:40:59 +01002419## ----------------- ##"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002420 echo
2421 for ac_var in $ac_subst_vars
2422 do
Bram Moolenaar446cb832008-06-24 21:56:24 +00002423 eval ac_val=\$$ac_var
2424 case $ac_val in
Illia Bobyra96d5442023-08-30 16:30:15 +02002425 *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Bram Moolenaar446cb832008-06-24 21:56:24 +00002426 esac
Illia Bobyra96d5442023-08-30 16:30:15 +02002427 printf "%s\n" "$ac_var='\''$ac_val'\''"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002428 done | sort
2429 echo
2430
2431 if test -n "$ac_subst_files"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02002432 printf "%s\n" "## ------------------- ##
Bram Moolenaar446cb832008-06-24 21:56:24 +00002433## File substitutions. ##
Bram Moolenaar7db77842014-03-27 17:40:59 +01002434## ------------------- ##"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002435 echo
2436 for ac_var in $ac_subst_files
2437 do
Bram Moolenaar446cb832008-06-24 21:56:24 +00002438 eval ac_val=\$$ac_var
2439 case $ac_val in
Illia Bobyra96d5442023-08-30 16:30:15 +02002440 *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Bram Moolenaar446cb832008-06-24 21:56:24 +00002441 esac
Illia Bobyra96d5442023-08-30 16:30:15 +02002442 printf "%s\n" "$ac_var='\''$ac_val'\''"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002443 done | sort
2444 echo
2445 fi
2446
2447 if test -s confdefs.h; then
Illia Bobyra96d5442023-08-30 16:30:15 +02002448 printf "%s\n" "## ----------- ##
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002449## confdefs.h. ##
Bram Moolenaar7db77842014-03-27 17:40:59 +01002450## ----------- ##"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002451 echo
Bram Moolenaar446cb832008-06-24 21:56:24 +00002452 cat confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002453 echo
2454 fi
2455 test "$ac_signal" != 0 &&
Illia Bobyra96d5442023-08-30 16:30:15 +02002456 printf "%s\n" "$as_me: caught signal $ac_signal"
2457 printf "%s\n" "$as_me: exit $exit_status"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002458 } >&5
Bram Moolenaar446cb832008-06-24 21:56:24 +00002459 rm -f core *.core core.conftest.* &&
2460 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002461 exit $exit_status
Bram Moolenaar446cb832008-06-24 21:56:24 +00002462' 0
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002463for ac_signal in 1 2 13 15; do
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002464 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002465done
2466ac_signal=0
2467
2468# confdefs.h avoids OS command line length limits that DEFS can exceed.
Bram Moolenaar446cb832008-06-24 21:56:24 +00002469rm -f -r conftest* confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002470
Illia Bobyra96d5442023-08-30 16:30:15 +02002471printf "%s\n" "/* confdefs.h */" > confdefs.h
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002472
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002473# Predefined preprocessor variables.
2474
Illia Bobyra96d5442023-08-30 16:30:15 +02002475printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002476
Illia Bobyra96d5442023-08-30 16:30:15 +02002477printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002478
Illia Bobyra96d5442023-08-30 16:30:15 +02002479printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002480
Illia Bobyra96d5442023-08-30 16:30:15 +02002481printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002482
Illia Bobyra96d5442023-08-30 16:30:15 +02002483printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002484
Illia Bobyra96d5442023-08-30 16:30:15 +02002485printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002486
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002487
2488# Let the site file select an alternate cache file if it wants to.
Bram Moolenaar446cb832008-06-24 21:56:24 +00002489# Prefer an explicitly selected file to automatically selected ones.
Bram Moolenaar446cb832008-06-24 21:56:24 +00002490if test -n "$CONFIG_SITE"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02002491 ac_site_files="$CONFIG_SITE"
Bram Moolenaar446cb832008-06-24 21:56:24 +00002492elif test "x$prefix" != xNONE; then
Illia Bobyra96d5442023-08-30 16:30:15 +02002493 ac_site_files="$prefix/share/config.site $prefix/etc/config.site"
Bram Moolenaar446cb832008-06-24 21:56:24 +00002494else
Illia Bobyra96d5442023-08-30 16:30:15 +02002495 ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
Bram Moolenaar071d4272004-06-13 20:20:40 +00002496fi
Illia Bobyra96d5442023-08-30 16:30:15 +02002497
2498for ac_site_file in $ac_site_files
Bram Moolenaar446cb832008-06-24 21:56:24 +00002499do
Illia Bobyra96d5442023-08-30 16:30:15 +02002500 case $ac_site_file in #(
2501 */*) :
2502 ;; #(
2503 *) :
2504 ac_site_file=./$ac_site_file ;;
2505esac
2506 if test -f "$ac_site_file" && test -r "$ac_site_file"; then
2507 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2508printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002509 sed 's/^/| /' "$ac_site_file" >&5
Bram Moolenaar7db77842014-03-27 17:40:59 +01002510 . "$ac_site_file" \
Illia Bobyra96d5442023-08-30 16:30:15 +02002511 || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2512printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +01002513as_fn_error $? "failed to load site script $ac_site_file
2514See \`config.log' for more details" "$LINENO" 5; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00002515 fi
2516done
2517
2518if test -r "$cache_file"; then
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002519 # Some versions of bash will fail to source /dev/null (special files
2520 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2521 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02002522 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2523printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002524 case $cache_file in
Bram Moolenaar446cb832008-06-24 21:56:24 +00002525 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2526 *) . "./$cache_file";;
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002527 esac
2528 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00002529else
Illia Bobyra96d5442023-08-30 16:30:15 +02002530 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2531printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002532 >$cache_file
2533fi
2534
Illia Bobyra96d5442023-08-30 16:30:15 +02002535# Test code for whether the C compiler supports C89 (global declarations)
2536ac_c_conftest_c89_globals='
2537/* Does the compiler advertise C89 conformance?
2538 Do not test the value of __STDC__, because some compilers set it to 0
2539 while being otherwise adequately conformant. */
2540#if !defined __STDC__
2541# error "Compiler does not advertise C89 conformance"
Bram Moolenaar071d4272004-06-13 20:20:40 +00002542#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +00002543
Illia Bobyra96d5442023-08-30 16:30:15 +02002544#include <stddef.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002545#include <stdarg.h>
Bram Moolenaar7db77842014-03-27 17:40:59 +01002546struct stat;
Illia Bobyra96d5442023-08-30 16:30:15 +02002547/* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002548struct buf { int x; };
Illia Bobyra96d5442023-08-30 16:30:15 +02002549struct buf * (*rcsopen) (struct buf *, struct stat *, int);
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002550static char *e (p, i)
2551 char **p;
2552 int i;
2553{
2554 return p[i];
2555}
2556static char *f (char * (*g) (char **, int), char **p, ...)
2557{
2558 char *s;
2559 va_list v;
2560 va_start (v,p);
2561 s = g (p, va_arg (v,int));
2562 va_end (v);
2563 return s;
2564}
2565
2566/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
Illia Bobyra96d5442023-08-30 16:30:15 +02002567 function prototypes and stuff, but not \xHH hex character constants.
2568 These do not provoke an error unfortunately, instead are silently treated
2569 as an "x". The following induces an error, until -std is added to get
2570 proper ANSI mode. Curiously \x00 != x always comes out true, for an
2571 array size at least. It is necessary to write \x00 == 0 to get something
2572 that is true only with -std. */
2573int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1];
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002574
Bram Moolenaar446cb832008-06-24 21:56:24 +00002575/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
2576 inside strings and character constants. */
Illia Bobyra96d5442023-08-30 16:30:15 +02002577#define FOO(x) '\''x'\''
2578int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1];
Bram Moolenaar446cb832008-06-24 21:56:24 +00002579
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002580int test (int i, double x);
2581struct s1 {int (*f) (int a);};
2582struct s2 {int (*f) (double a);};
Illia Bobyra96d5442023-08-30 16:30:15 +02002583int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int),
2584 int, int);'
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002585
Illia Bobyra96d5442023-08-30 16:30:15 +02002586# Test code for whether the C compiler supports C89 (body of main).
2587ac_c_conftest_c89_main='
2588ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
2589'
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002590
Illia Bobyra96d5442023-08-30 16:30:15 +02002591# Test code for whether the C compiler supports C99 (global declarations)
2592ac_c_conftest_c99_globals='
2593// Does the compiler advertise C99 conformance?
2594#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
2595# error "Compiler does not advertise C99 conformance"
2596#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002597
Bram Moolenaar22640082018-04-19 20:39:41 +02002598#include <stdbool.h>
Illia Bobyra96d5442023-08-30 16:30:15 +02002599extern int puts (const char *);
2600extern int printf (const char *, ...);
2601extern int dprintf (int, const char *, ...);
2602extern void *malloc (size_t);
Bram Moolenaar22640082018-04-19 20:39:41 +02002603
2604// Check varargs macros. These examples are taken from C99 6.10.3.5.
Illia Bobyra96d5442023-08-30 16:30:15 +02002605// dprintf is used instead of fprintf to avoid needing to declare
2606// FILE and stderr.
2607#define debug(...) dprintf (2, __VA_ARGS__)
Bram Moolenaar22640082018-04-19 20:39:41 +02002608#define showlist(...) puts (#__VA_ARGS__)
2609#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
2610static void
2611test_varargs_macros (void)
Bram Moolenaar2e324952018-04-14 14:37:07 +02002612{
Bram Moolenaar22640082018-04-19 20:39:41 +02002613 int x = 1234;
2614 int y = 5678;
2615 debug ("Flag");
2616 debug ("X = %d\n", x);
2617 showlist (The first, second, and third items.);
2618 report (x>y, "x is %d but y is %d", x, y);
Bram Moolenaar2e324952018-04-14 14:37:07 +02002619}
2620
Bram Moolenaar22640082018-04-19 20:39:41 +02002621// Check long long types.
2622#define BIG64 18446744073709551615ull
2623#define BIG32 4294967295ul
2624#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
2625#if !BIG_OK
Illia Bobyra96d5442023-08-30 16:30:15 +02002626 #error "your preprocessor is broken"
Bram Moolenaar22640082018-04-19 20:39:41 +02002627#endif
2628#if BIG_OK
2629#else
Illia Bobyra96d5442023-08-30 16:30:15 +02002630 #error "your preprocessor is broken"
Bram Moolenaar22640082018-04-19 20:39:41 +02002631#endif
2632static long long int bignum = -9223372036854775807LL;
2633static unsigned long long int ubignum = BIG64;
Bram Moolenaar2e324952018-04-14 14:37:07 +02002634
Bram Moolenaar22640082018-04-19 20:39:41 +02002635struct incomplete_array
2636{
2637 int datasize;
2638 double data[];
2639};
Bram Moolenaar2e324952018-04-14 14:37:07 +02002640
Bram Moolenaar22640082018-04-19 20:39:41 +02002641struct named_init {
2642 int number;
2643 const wchar_t *name;
2644 double average;
2645};
2646
2647typedef const char *ccp;
2648
2649static inline int
2650test_restrict (ccp restrict text)
2651{
2652 // See if C++-style comments work.
2653 // Iterate through items via the restricted pointer.
2654 // Also check for declarations in for loops.
Illia Bobyra96d5442023-08-30 16:30:15 +02002655 for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
Bram Moolenaar22640082018-04-19 20:39:41 +02002656 continue;
2657 return 0;
2658}
2659
2660// Check varargs and va_copy.
Illia Bobyra96d5442023-08-30 16:30:15 +02002661static bool
Bram Moolenaar22640082018-04-19 20:39:41 +02002662test_varargs (const char *format, ...)
2663{
2664 va_list args;
2665 va_start (args, format);
2666 va_list args_copy;
2667 va_copy (args_copy, args);
2668
Illia Bobyra96d5442023-08-30 16:30:15 +02002669 const char *str = "";
2670 int number = 0;
2671 float fnumber = 0;
Bram Moolenaar22640082018-04-19 20:39:41 +02002672
2673 while (*format)
2674 {
2675 switch (*format++)
2676 {
Illia Bobyra96d5442023-08-30 16:30:15 +02002677 case '\''s'\'': // string
Bram Moolenaar22640082018-04-19 20:39:41 +02002678 str = va_arg (args_copy, const char *);
2679 break;
Illia Bobyra96d5442023-08-30 16:30:15 +02002680 case '\''d'\'': // int
Bram Moolenaar22640082018-04-19 20:39:41 +02002681 number = va_arg (args_copy, int);
2682 break;
Illia Bobyra96d5442023-08-30 16:30:15 +02002683 case '\''f'\'': // float
Bram Moolenaar22640082018-04-19 20:39:41 +02002684 fnumber = va_arg (args_copy, double);
2685 break;
2686 default:
2687 break;
2688 }
2689 }
2690 va_end (args_copy);
2691 va_end (args);
Illia Bobyra96d5442023-08-30 16:30:15 +02002692
2693 return *str && number && fnumber;
Bram Moolenaar22640082018-04-19 20:39:41 +02002694}
Illia Bobyra96d5442023-08-30 16:30:15 +02002695'
Bram Moolenaar22640082018-04-19 20:39:41 +02002696
Illia Bobyra96d5442023-08-30 16:30:15 +02002697# Test code for whether the C compiler supports C99 (body of main).
2698ac_c_conftest_c99_main='
Bram Moolenaar22640082018-04-19 20:39:41 +02002699 // Check bool.
2700 _Bool success = false;
Illia Bobyra96d5442023-08-30 16:30:15 +02002701 success |= (argc != 0);
Bram Moolenaar22640082018-04-19 20:39:41 +02002702
2703 // Check restrict.
2704 if (test_restrict ("String literal") == 0)
2705 success = true;
2706 char *restrict newvar = "Another string";
2707
2708 // Check varargs.
Illia Bobyra96d5442023-08-30 16:30:15 +02002709 success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234);
Bram Moolenaar22640082018-04-19 20:39:41 +02002710 test_varargs_macros ();
2711
2712 // Check flexible array members.
2713 struct incomplete_array *ia =
2714 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
2715 ia->datasize = 10;
2716 for (int i = 0; i < ia->datasize; ++i)
2717 ia->data[i] = i * 1.234;
2718
2719 // Check named initializers.
2720 struct named_init ni = {
2721 .number = 34,
2722 .name = L"Test wide string",
2723 .average = 543.34343,
2724 };
2725
2726 ni.number = 58;
2727
2728 int dynamic_array[ni.number];
Illia Bobyra96d5442023-08-30 16:30:15 +02002729 dynamic_array[0] = argv[0][0];
Bram Moolenaar22640082018-04-19 20:39:41 +02002730 dynamic_array[ni.number - 1] = 543;
2731
2732 // work around unused variable warnings
Illia Bobyra96d5442023-08-30 16:30:15 +02002733 ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\''
2734 || dynamic_array[ni.number - 1] != 543);
2735'
2736
2737# Test code for whether the C compiler supports C11 (global declarations)
2738ac_c_conftest_c11_globals='
2739// Does the compiler advertise C11 conformance?
2740#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
2741# error "Compiler does not advertise C11 conformance"
2742#endif
2743
2744// Check _Alignas.
2745char _Alignas (double) aligned_as_double;
2746char _Alignas (0) no_special_alignment;
2747extern char aligned_as_int;
2748char _Alignas (0) _Alignas (int) aligned_as_int;
2749
2750// Check _Alignof.
2751enum
2752{
2753 int_alignment = _Alignof (int),
2754 int_array_alignment = _Alignof (int[100]),
2755 char_alignment = _Alignof (char)
2756};
2757_Static_assert (0 < -_Alignof (int), "_Alignof is signed");
2758
2759// Check _Noreturn.
2760int _Noreturn does_not_return (void) { for (;;) continue; }
2761
2762// Check _Static_assert.
2763struct test_static_assert
2764{
2765 int x;
2766 _Static_assert (sizeof (int) <= sizeof (long int),
2767 "_Static_assert does not work in struct");
2768 long int y;
2769};
2770
2771// Check UTF-8 literals.
2772#define u8 syntax error!
2773char const utf8_literal[] = u8"happens to be ASCII" "another string";
2774
2775// Check duplicate typedefs.
2776typedef long *long_ptr;
2777typedef long int *long_ptr;
2778typedef long_ptr long_ptr;
2779
2780// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
2781struct anonymous
2782{
2783 union {
2784 struct { int i; int j; };
2785 struct { int k; long int l; } w;
2786 };
2787 int m;
2788} v1;
2789'
2790
2791# Test code for whether the C compiler supports C11 (body of main).
2792ac_c_conftest_c11_main='
2793 _Static_assert ((offsetof (struct anonymous, i)
2794 == offsetof (struct anonymous, w.k)),
2795 "Anonymous union alignment botch");
2796 v1.i = 2;
2797 v1.w.k = 5;
2798 ok |= v1.i != 5;
2799'
2800
2801# Test code for whether the C compiler supports C11 (complete).
2802ac_c_conftest_c11_program="${ac_c_conftest_c89_globals}
2803${ac_c_conftest_c99_globals}
2804${ac_c_conftest_c11_globals}
2805
2806int
2807main (int argc, char **argv)
2808{
2809 int ok = 0;
2810 ${ac_c_conftest_c89_main}
2811 ${ac_c_conftest_c99_main}
2812 ${ac_c_conftest_c11_main}
2813 return ok;
2814}
2815"
2816
2817# Test code for whether the C compiler supports C99 (complete).
2818ac_c_conftest_c99_program="${ac_c_conftest_c89_globals}
2819${ac_c_conftest_c99_globals}
2820
2821int
2822main (int argc, char **argv)
2823{
2824 int ok = 0;
2825 ${ac_c_conftest_c89_main}
2826 ${ac_c_conftest_c99_main}
2827 return ok;
2828}
2829"
2830
2831# Test code for whether the C compiler supports C89 (complete).
2832ac_c_conftest_c89_program="${ac_c_conftest_c89_globals}
2833
2834int
2835main (int argc, char **argv)
2836{
2837 int ok = 0;
2838 ${ac_c_conftest_c89_main}
2839 return ok;
2840}
2841"
2842
2843as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H"
2844as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H"
2845as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H"
2846as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
2847as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
2848as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
2849as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
2850as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
2851as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
2852as_fn_append ac_header_c_list " sys/time.h sys_time_h HAVE_SYS_TIME_H"
2853as_fn_append ac_header_c_list " sys/select.h sys_select_h HAVE_SYS_SELECT_H"
2854as_fn_append ac_header_c_list " sys/socket.h sys_socket_h HAVE_SYS_SOCKET_H"
2855# Check that the precious variables saved in the cache have kept the same
2856# value.
2857ac_cache_corrupted=false
2858for ac_var in $ac_precious_vars; do
2859 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2860 eval ac_new_set=\$ac_env_${ac_var}_set
2861 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2862 eval ac_new_val=\$ac_env_${ac_var}_value
2863 case $ac_old_set,$ac_new_set in
2864 set,)
2865 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2866printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2867 ac_cache_corrupted=: ;;
2868 ,set)
2869 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2870printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2871 ac_cache_corrupted=: ;;
2872 ,);;
2873 *)
2874 if test "x$ac_old_val" != "x$ac_new_val"; then
2875 # differences in whitespace do not lead to failure.
2876 ac_old_val_w=`echo x $ac_old_val`
2877 ac_new_val_w=`echo x $ac_new_val`
2878 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2879 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2880printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2881 ac_cache_corrupted=:
2882 else
2883 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2884printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2885 eval $ac_var=\$ac_old_val
2886 fi
2887 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2888printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;}
2889 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2890printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;}
2891 fi;;
2892 esac
2893 # Pass precious variables to config.status.
2894 if test "$ac_new_set" = set; then
2895 case $ac_new_val in
2896 *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2897 *) ac_arg=$ac_var=$ac_new_val ;;
2898 esac
2899 case " $ac_configure_args " in
2900 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2901 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2902 esac
2903 fi
2904done
2905if $ac_cache_corrupted; then
2906 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2907printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
2908 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2909printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
2910 as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file'
2911 and start over" "$LINENO" 5
2912fi
2913## -------------------- ##
2914## Main body of script. ##
2915## -------------------- ##
2916
2917ac_ext=c
2918ac_cpp='$CPP $CPPFLAGS'
2919ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2920ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2921ac_compiler_gnu=$ac_cv_c_compiler_gnu
2922
2923
2924
2925ac_config_headers="$ac_config_headers auto/config.h:config.h.in"
2926
2927
2928printf "%s\n" "#define UNIX 1" >>confdefs.h
2929
2930{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
2931printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
2932set x ${MAKE-make}
2933ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
2934if eval test \${ac_cv_prog_make_${ac_make}_set+y}
2935then :
2936 printf %s "(cached) " >&6
2937else $as_nop
2938 cat >conftest.make <<\_ACEOF
2939SHELL = /bin/sh
2940all:
2941 @echo '@@@%%%=$(MAKE)=@@@%%%'
2942_ACEOF
2943# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
2944case `${MAKE-make} -f conftest.make 2>/dev/null` in
2945 *@@@%%%=?*=@@@%%%*)
2946 eval ac_cv_prog_make_${ac_make}_set=yes;;
2947 *)
2948 eval ac_cv_prog_make_${ac_make}_set=no;;
2949esac
2950rm -f conftest.make
2951fi
2952if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
2953 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
2954printf "%s\n" "yes" >&6; }
2955 SET_MAKE=
2956else
2957 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
2958printf "%s\n" "no" >&6; }
2959 SET_MAKE="MAKE=${MAKE-make}"
2960fi
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972ac_ext=c
2973ac_cpp='$CPP $CPPFLAGS'
2974ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2975ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2976ac_compiler_gnu=$ac_cv_c_compiler_gnu
2977if test -n "$ac_tool_prefix"; then
2978 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2979set dummy ${ac_tool_prefix}gcc; ac_word=$2
2980{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2981printf %s "checking for $ac_word... " >&6; }
2982if test ${ac_cv_prog_CC+y}
2983then :
2984 printf %s "(cached) " >&6
2985else $as_nop
2986 if test -n "$CC"; then
2987 ac_cv_prog_CC="$CC" # Let the user override the test.
2988else
2989as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2990for as_dir in $PATH
2991do
2992 IFS=$as_save_IFS
2993 case $as_dir in #(((
2994 '') as_dir=./ ;;
2995 */) ;;
2996 *) as_dir=$as_dir/ ;;
2997 esac
2998 for ac_exec_ext in '' $ac_executable_extensions; do
2999 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3000 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3001 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3002 break 2
3003 fi
3004done
3005 done
3006IFS=$as_save_IFS
3007
3008fi
3009fi
3010CC=$ac_cv_prog_CC
3011if test -n "$CC"; then
3012 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3013printf "%s\n" "$CC" >&6; }
3014else
3015 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3016printf "%s\n" "no" >&6; }
3017fi
3018
3019
3020fi
3021if test -z "$ac_cv_prog_CC"; then
3022 ac_ct_CC=$CC
3023 # Extract the first word of "gcc", so it can be a program name with args.
3024set dummy gcc; ac_word=$2
3025{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3026printf %s "checking for $ac_word... " >&6; }
3027if test ${ac_cv_prog_ac_ct_CC+y}
3028then :
3029 printf %s "(cached) " >&6
3030else $as_nop
3031 if test -n "$ac_ct_CC"; then
3032 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3033else
3034as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3035for as_dir in $PATH
3036do
3037 IFS=$as_save_IFS
3038 case $as_dir in #(((
3039 '') as_dir=./ ;;
3040 */) ;;
3041 *) as_dir=$as_dir/ ;;
3042 esac
3043 for ac_exec_ext in '' $ac_executable_extensions; do
3044 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3045 ac_cv_prog_ac_ct_CC="gcc"
3046 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3047 break 2
3048 fi
3049done
3050 done
3051IFS=$as_save_IFS
3052
3053fi
3054fi
3055ac_ct_CC=$ac_cv_prog_ac_ct_CC
3056if test -n "$ac_ct_CC"; then
3057 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3058printf "%s\n" "$ac_ct_CC" >&6; }
3059else
3060 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3061printf "%s\n" "no" >&6; }
3062fi
3063
3064 if test "x$ac_ct_CC" = x; then
3065 CC=""
3066 else
3067 case $cross_compiling:$ac_tool_warned in
3068yes:)
3069{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3070printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3071ac_tool_warned=yes ;;
3072esac
3073 CC=$ac_ct_CC
3074 fi
3075else
3076 CC="$ac_cv_prog_CC"
3077fi
3078
3079if test -z "$CC"; then
3080 if test -n "$ac_tool_prefix"; then
3081 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3082set dummy ${ac_tool_prefix}cc; ac_word=$2
3083{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3084printf %s "checking for $ac_word... " >&6; }
3085if test ${ac_cv_prog_CC+y}
3086then :
3087 printf %s "(cached) " >&6
3088else $as_nop
3089 if test -n "$CC"; then
3090 ac_cv_prog_CC="$CC" # Let the user override the test.
3091else
3092as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3093for as_dir in $PATH
3094do
3095 IFS=$as_save_IFS
3096 case $as_dir in #(((
3097 '') as_dir=./ ;;
3098 */) ;;
3099 *) as_dir=$as_dir/ ;;
3100 esac
3101 for ac_exec_ext in '' $ac_executable_extensions; do
3102 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3103 ac_cv_prog_CC="${ac_tool_prefix}cc"
3104 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3105 break 2
3106 fi
3107done
3108 done
3109IFS=$as_save_IFS
3110
3111fi
3112fi
3113CC=$ac_cv_prog_CC
3114if test -n "$CC"; then
3115 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3116printf "%s\n" "$CC" >&6; }
3117else
3118 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3119printf "%s\n" "no" >&6; }
3120fi
3121
3122
3123 fi
3124fi
3125if test -z "$CC"; then
3126 # Extract the first word of "cc", so it can be a program name with args.
3127set dummy cc; ac_word=$2
3128{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3129printf %s "checking for $ac_word... " >&6; }
3130if test ${ac_cv_prog_CC+y}
3131then :
3132 printf %s "(cached) " >&6
3133else $as_nop
3134 if test -n "$CC"; then
3135 ac_cv_prog_CC="$CC" # Let the user override the test.
3136else
3137 ac_prog_rejected=no
3138as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3139for as_dir in $PATH
3140do
3141 IFS=$as_save_IFS
3142 case $as_dir in #(((
3143 '') as_dir=./ ;;
3144 */) ;;
3145 *) as_dir=$as_dir/ ;;
3146 esac
3147 for ac_exec_ext in '' $ac_executable_extensions; do
3148 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3149 if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3150 ac_prog_rejected=yes
3151 continue
3152 fi
3153 ac_cv_prog_CC="cc"
3154 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3155 break 2
3156 fi
3157done
3158 done
3159IFS=$as_save_IFS
3160
3161if test $ac_prog_rejected = yes; then
3162 # We found a bogon in the path, so make sure we never use it.
3163 set dummy $ac_cv_prog_CC
3164 shift
3165 if test $# != 0; then
3166 # We chose a different compiler from the bogus one.
3167 # However, it has the same basename, so the bogon will be chosen
3168 # first if we set CC to just the basename; use the full file name.
3169 shift
3170 ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
3171 fi
3172fi
3173fi
3174fi
3175CC=$ac_cv_prog_CC
3176if test -n "$CC"; then
3177 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3178printf "%s\n" "$CC" >&6; }
3179else
3180 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3181printf "%s\n" "no" >&6; }
3182fi
3183
3184
3185fi
3186if test -z "$CC"; then
3187 if test -n "$ac_tool_prefix"; then
3188 for ac_prog in cl.exe
3189 do
3190 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3191set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3192{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3193printf %s "checking for $ac_word... " >&6; }
3194if test ${ac_cv_prog_CC+y}
3195then :
3196 printf %s "(cached) " >&6
3197else $as_nop
3198 if test -n "$CC"; then
3199 ac_cv_prog_CC="$CC" # Let the user override the test.
3200else
3201as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3202for as_dir in $PATH
3203do
3204 IFS=$as_save_IFS
3205 case $as_dir in #(((
3206 '') as_dir=./ ;;
3207 */) ;;
3208 *) as_dir=$as_dir/ ;;
3209 esac
3210 for ac_exec_ext in '' $ac_executable_extensions; do
3211 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3212 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3213 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3214 break 2
3215 fi
3216done
3217 done
3218IFS=$as_save_IFS
3219
3220fi
3221fi
3222CC=$ac_cv_prog_CC
3223if test -n "$CC"; then
3224 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3225printf "%s\n" "$CC" >&6; }
3226else
3227 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3228printf "%s\n" "no" >&6; }
3229fi
3230
3231
3232 test -n "$CC" && break
3233 done
3234fi
3235if test -z "$CC"; then
3236 ac_ct_CC=$CC
3237 for ac_prog in cl.exe
3238do
3239 # Extract the first word of "$ac_prog", so it can be a program name with args.
3240set dummy $ac_prog; ac_word=$2
3241{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3242printf %s "checking for $ac_word... " >&6; }
3243if test ${ac_cv_prog_ac_ct_CC+y}
3244then :
3245 printf %s "(cached) " >&6
3246else $as_nop
3247 if test -n "$ac_ct_CC"; then
3248 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3249else
3250as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3251for as_dir in $PATH
3252do
3253 IFS=$as_save_IFS
3254 case $as_dir in #(((
3255 '') as_dir=./ ;;
3256 */) ;;
3257 *) as_dir=$as_dir/ ;;
3258 esac
3259 for ac_exec_ext in '' $ac_executable_extensions; do
3260 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3261 ac_cv_prog_ac_ct_CC="$ac_prog"
3262 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3263 break 2
3264 fi
3265done
3266 done
3267IFS=$as_save_IFS
3268
3269fi
3270fi
3271ac_ct_CC=$ac_cv_prog_ac_ct_CC
3272if test -n "$ac_ct_CC"; then
3273 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3274printf "%s\n" "$ac_ct_CC" >&6; }
3275else
3276 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3277printf "%s\n" "no" >&6; }
3278fi
3279
3280
3281 test -n "$ac_ct_CC" && break
3282done
3283
3284 if test "x$ac_ct_CC" = x; then
3285 CC=""
3286 else
3287 case $cross_compiling:$ac_tool_warned in
3288yes:)
3289{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3290printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3291ac_tool_warned=yes ;;
3292esac
3293 CC=$ac_ct_CC
3294 fi
3295fi
3296
3297fi
3298if test -z "$CC"; then
3299 if test -n "$ac_tool_prefix"; then
3300 # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
3301set dummy ${ac_tool_prefix}clang; ac_word=$2
3302{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3303printf %s "checking for $ac_word... " >&6; }
3304if test ${ac_cv_prog_CC+y}
3305then :
3306 printf %s "(cached) " >&6
3307else $as_nop
3308 if test -n "$CC"; then
3309 ac_cv_prog_CC="$CC" # Let the user override the test.
3310else
3311as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3312for as_dir in $PATH
3313do
3314 IFS=$as_save_IFS
3315 case $as_dir in #(((
3316 '') as_dir=./ ;;
3317 */) ;;
3318 *) as_dir=$as_dir/ ;;
3319 esac
3320 for ac_exec_ext in '' $ac_executable_extensions; do
3321 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3322 ac_cv_prog_CC="${ac_tool_prefix}clang"
3323 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3324 break 2
3325 fi
3326done
3327 done
3328IFS=$as_save_IFS
3329
3330fi
3331fi
3332CC=$ac_cv_prog_CC
3333if test -n "$CC"; then
3334 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3335printf "%s\n" "$CC" >&6; }
3336else
3337 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3338printf "%s\n" "no" >&6; }
3339fi
3340
3341
3342fi
3343if test -z "$ac_cv_prog_CC"; then
3344 ac_ct_CC=$CC
3345 # Extract the first word of "clang", so it can be a program name with args.
3346set dummy clang; ac_word=$2
3347{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3348printf %s "checking for $ac_word... " >&6; }
3349if test ${ac_cv_prog_ac_ct_CC+y}
3350then :
3351 printf %s "(cached) " >&6
3352else $as_nop
3353 if test -n "$ac_ct_CC"; then
3354 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3355else
3356as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3357for as_dir in $PATH
3358do
3359 IFS=$as_save_IFS
3360 case $as_dir in #(((
3361 '') as_dir=./ ;;
3362 */) ;;
3363 *) as_dir=$as_dir/ ;;
3364 esac
3365 for ac_exec_ext in '' $ac_executable_extensions; do
3366 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3367 ac_cv_prog_ac_ct_CC="clang"
3368 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3369 break 2
3370 fi
3371done
3372 done
3373IFS=$as_save_IFS
3374
3375fi
3376fi
3377ac_ct_CC=$ac_cv_prog_ac_ct_CC
3378if test -n "$ac_ct_CC"; then
3379 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3380printf "%s\n" "$ac_ct_CC" >&6; }
3381else
3382 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3383printf "%s\n" "no" >&6; }
3384fi
3385
3386 if test "x$ac_ct_CC" = x; then
3387 CC=""
3388 else
3389 case $cross_compiling:$ac_tool_warned in
3390yes:)
3391{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3392printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3393ac_tool_warned=yes ;;
3394esac
3395 CC=$ac_ct_CC
3396 fi
3397else
3398 CC="$ac_cv_prog_CC"
3399fi
3400
3401fi
3402
3403
3404test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3405printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3406as_fn_error $? "no acceptable C compiler found in \$PATH
3407See \`config.log' for more details" "$LINENO" 5; }
3408
3409# Provide some information about the compiler.
3410printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3411set X $ac_compile
3412ac_compiler=$2
3413for ac_option in --version -v -V -qversion -version; do
3414 { { ac_try="$ac_compiler $ac_option >&5"
3415case "(($ac_try" in
3416 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3417 *) ac_try_echo=$ac_try;;
3418esac
3419eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3420printf "%s\n" "$ac_try_echo"; } >&5
3421 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3422 ac_status=$?
3423 if test -s conftest.err; then
3424 sed '10a\
3425... rest of stderr output deleted ...
3426 10q' conftest.err >conftest.er1
3427 cat conftest.er1 >&5
3428 fi
3429 rm -f conftest.er1 conftest.err
3430 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3431 test $ac_status = 0; }
3432done
3433
3434cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3435/* end confdefs.h. */
3436
3437int
3438main (void)
3439{
Bram Moolenaar22640082018-04-19 20:39:41 +02003440
Bram Moolenaar2e324952018-04-14 14:37:07 +02003441 ;
3442 return 0;
3443}
3444_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02003445ac_clean_files_save=$ac_clean_files
3446ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3447# Try to create an executable without -o first, disregard a.out.
3448# It will help us diagnose broken compilers, and finding out an intuition
3449# of exeext.
3450{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3451printf %s "checking whether the C compiler works... " >&6; }
3452ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3453
3454# The possible output files:
3455ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3456
3457ac_rmfiles=
3458for ac_file in $ac_files
3459do
3460 case $ac_file in
3461 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3462 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3463 esac
3464done
3465rm -f $ac_rmfiles
3466
3467if { { ac_try="$ac_link_default"
3468case "(($ac_try" in
3469 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3470 *) ac_try_echo=$ac_try;;
3471esac
3472eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3473printf "%s\n" "$ac_try_echo"; } >&5
3474 (eval "$ac_link_default") 2>&5
3475 ac_status=$?
3476 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3477 test $ac_status = 0; }
3478then :
3479 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3480# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3481# in a Makefile. We should not override ac_cv_exeext if it was cached,
3482# so that the user can short-circuit this test for compilers unknown to
3483# Autoconf.
3484for ac_file in $ac_files ''
3485do
3486 test -f "$ac_file" || continue
3487 case $ac_file in
3488 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3489 ;;
3490 [ab].out )
3491 # We found the default executable, but exeext='' is most
3492 # certainly right.
3493 break;;
3494 *.* )
3495 if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
3496 then :; else
3497 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3498 fi
3499 # We set ac_cv_exeext here because the later test for it is not
3500 # safe: cross compilers may not add the suffix if given an `-o'
3501 # argument, so we may need to know it at that point already.
3502 # Even if this section looks crufty: it has the advantage of
3503 # actually working.
3504 break;;
3505 * )
3506 break;;
3507 esac
3508done
3509test "$ac_cv_exeext" = no && ac_cv_exeext=
3510
3511else $as_nop
3512 ac_file=''
3513fi
3514if test -z "$ac_file"
3515then :
3516 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3517printf "%s\n" "no" >&6; }
3518printf "%s\n" "$as_me: failed program was:" >&5
3519sed 's/^/| /' conftest.$ac_ext >&5
3520
3521{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3522printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3523as_fn_error 77 "C compiler cannot create executables
3524See \`config.log' for more details" "$LINENO" 5; }
3525else $as_nop
3526 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3527printf "%s\n" "yes" >&6; }
3528fi
3529{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3530printf %s "checking for C compiler default output file name... " >&6; }
3531{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3532printf "%s\n" "$ac_file" >&6; }
3533ac_exeext=$ac_cv_exeext
3534
3535rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3536ac_clean_files=$ac_clean_files_save
3537{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3538printf %s "checking for suffix of executables... " >&6; }
3539if { { ac_try="$ac_link"
3540case "(($ac_try" in
3541 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3542 *) ac_try_echo=$ac_try;;
3543esac
3544eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3545printf "%s\n" "$ac_try_echo"; } >&5
3546 (eval "$ac_link") 2>&5
3547 ac_status=$?
3548 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3549 test $ac_status = 0; }
3550then :
3551 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3552# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3553# work properly (i.e., refer to `conftest.exe'), while it won't with
3554# `rm'.
3555for ac_file in conftest.exe conftest conftest.*; do
3556 test -f "$ac_file" || continue
3557 case $ac_file in
3558 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3559 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3560 break;;
3561 * ) break;;
3562 esac
3563done
3564else $as_nop
3565 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3566printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3567as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3568See \`config.log' for more details" "$LINENO" 5; }
3569fi
3570rm -f conftest conftest$ac_cv_exeext
3571{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3572printf "%s\n" "$ac_cv_exeext" >&6; }
3573
3574rm -f conftest.$ac_ext
3575EXEEXT=$ac_cv_exeext
3576ac_exeext=$EXEEXT
3577cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3578/* end confdefs.h. */
3579#include <stdio.h>
3580int
3581main (void)
3582{
3583FILE *f = fopen ("conftest.out", "w");
3584 return ferror (f) || fclose (f) != 0;
3585
3586 ;
3587 return 0;
3588}
3589_ACEOF
3590ac_clean_files="$ac_clean_files conftest.out"
3591# Check that the compiler produces executables we can run. If not, either
3592# the compiler is broken, or we cross compile.
3593{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3594printf %s "checking whether we are cross compiling... " >&6; }
3595if test "$cross_compiling" != yes; then
3596 { { ac_try="$ac_link"
3597case "(($ac_try" in
3598 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3599 *) ac_try_echo=$ac_try;;
3600esac
3601eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3602printf "%s\n" "$ac_try_echo"; } >&5
3603 (eval "$ac_link") 2>&5
3604 ac_status=$?
3605 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3606 test $ac_status = 0; }
3607 if { ac_try='./conftest$ac_cv_exeext'
3608 { { case "(($ac_try" in
3609 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3610 *) ac_try_echo=$ac_try;;
3611esac
3612eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3613printf "%s\n" "$ac_try_echo"; } >&5
3614 (eval "$ac_try") 2>&5
3615 ac_status=$?
3616 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3617 test $ac_status = 0; }; }; then
3618 cross_compiling=no
3619 else
3620 if test "$cross_compiling" = maybe; then
3621 cross_compiling=yes
3622 else
3623 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3624printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3625as_fn_error 77 "cannot run C compiled programs.
3626If you meant to cross compile, use \`--host'.
3627See \`config.log' for more details" "$LINENO" 5; }
3628 fi
3629 fi
3630fi
3631{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3632printf "%s\n" "$cross_compiling" >&6; }
3633
3634rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3635ac_clean_files=$ac_clean_files_save
3636{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3637printf %s "checking for suffix of object files... " >&6; }
3638if test ${ac_cv_objext+y}
3639then :
3640 printf %s "(cached) " >&6
3641else $as_nop
3642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3643/* end confdefs.h. */
3644
3645int
3646main (void)
3647{
3648
3649 ;
3650 return 0;
3651}
3652_ACEOF
3653rm -f conftest.o conftest.obj
3654if { { ac_try="$ac_compile"
3655case "(($ac_try" in
3656 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3657 *) ac_try_echo=$ac_try;;
3658esac
3659eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3660printf "%s\n" "$ac_try_echo"; } >&5
3661 (eval "$ac_compile") 2>&5
3662 ac_status=$?
3663 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3664 test $ac_status = 0; }
3665then :
3666 for ac_file in conftest.o conftest.obj conftest.*; do
3667 test -f "$ac_file" || continue;
3668 case $ac_file in
3669 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3670 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3671 break;;
3672 esac
3673done
3674else $as_nop
3675 printf "%s\n" "$as_me: failed program was:" >&5
3676sed 's/^/| /' conftest.$ac_ext >&5
3677
3678{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3679printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3680as_fn_error $? "cannot compute suffix of object files: cannot compile
3681See \`config.log' for more details" "$LINENO" 5; }
3682fi
3683rm -f conftest.$ac_cv_objext conftest.$ac_ext
3684fi
3685{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3686printf "%s\n" "$ac_cv_objext" >&6; }
3687OBJEXT=$ac_cv_objext
3688ac_objext=$OBJEXT
3689{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
3690printf %s "checking whether the compiler supports GNU C... " >&6; }
3691if test ${ac_cv_c_compiler_gnu+y}
3692then :
3693 printf %s "(cached) " >&6
3694else $as_nop
3695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3696/* end confdefs.h. */
3697
3698int
3699main (void)
3700{
3701#ifndef __GNUC__
3702 choke me
3703#endif
3704
3705 ;
3706 return 0;
3707}
3708_ACEOF
3709if ac_fn_c_try_compile "$LINENO"
3710then :
3711 ac_compiler_gnu=yes
3712else $as_nop
3713 ac_compiler_gnu=no
3714fi
3715rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3716ac_cv_c_compiler_gnu=$ac_compiler_gnu
3717
3718fi
3719{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3720printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
3721ac_compiler_gnu=$ac_cv_c_compiler_gnu
3722
3723if test $ac_compiler_gnu = yes; then
3724 GCC=yes
3725else
3726 GCC=
3727fi
3728ac_test_CFLAGS=${CFLAGS+y}
3729ac_save_CFLAGS=$CFLAGS
3730{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3731printf %s "checking whether $CC accepts -g... " >&6; }
3732if test ${ac_cv_prog_cc_g+y}
3733then :
3734 printf %s "(cached) " >&6
3735else $as_nop
3736 ac_save_c_werror_flag=$ac_c_werror_flag
3737 ac_c_werror_flag=yes
3738 ac_cv_prog_cc_g=no
3739 CFLAGS="-g"
3740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3741/* end confdefs.h. */
3742
3743int
3744main (void)
3745{
3746
3747 ;
3748 return 0;
3749}
3750_ACEOF
3751if ac_fn_c_try_compile "$LINENO"
3752then :
3753 ac_cv_prog_cc_g=yes
3754else $as_nop
3755 CFLAGS=""
3756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3757/* end confdefs.h. */
3758
3759int
3760main (void)
3761{
3762
3763 ;
3764 return 0;
3765}
3766_ACEOF
3767if ac_fn_c_try_compile "$LINENO"
3768then :
3769
3770else $as_nop
3771 ac_c_werror_flag=$ac_save_c_werror_flag
3772 CFLAGS="-g"
3773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3774/* end confdefs.h. */
3775
3776int
3777main (void)
3778{
3779
3780 ;
3781 return 0;
3782}
3783_ACEOF
3784if ac_fn_c_try_compile "$LINENO"
3785then :
3786 ac_cv_prog_cc_g=yes
3787fi
3788rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3789fi
3790rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3791fi
3792rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3793 ac_c_werror_flag=$ac_save_c_werror_flag
3794fi
3795{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3796printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
3797if test $ac_test_CFLAGS; then
3798 CFLAGS=$ac_save_CFLAGS
3799elif test $ac_cv_prog_cc_g = yes; then
3800 if test "$GCC" = yes; then
3801 CFLAGS="-g -O2"
3802 else
3803 CFLAGS="-g"
3804 fi
3805else
3806 if test "$GCC" = yes; then
3807 CFLAGS="-O2"
3808 else
3809 CFLAGS=
3810 fi
3811fi
3812ac_prog_cc_stdc=no
3813if test x$ac_prog_cc_stdc = xno
3814then :
3815 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
3816printf %s "checking for $CC option to enable C11 features... " >&6; }
3817if test ${ac_cv_prog_cc_c11+y}
3818then :
3819 printf %s "(cached) " >&6
3820else $as_nop
3821 ac_cv_prog_cc_c11=no
3822ac_save_CC=$CC
3823cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3824/* end confdefs.h. */
3825$ac_c_conftest_c11_program
3826_ACEOF
3827for ac_arg in '' -std=gnu11
Bram Moolenaar2e324952018-04-14 14:37:07 +02003828do
3829 CC="$ac_save_CC $ac_arg"
Illia Bobyra96d5442023-08-30 16:30:15 +02003830 if ac_fn_c_try_compile "$LINENO"
3831then :
3832 ac_cv_prog_cc_c11=$ac_arg
3833fi
3834rm -f core conftest.err conftest.$ac_objext conftest.beam
3835 test "x$ac_cv_prog_cc_c11" != "xno" && break
3836done
3837rm -f conftest.$ac_ext
3838CC=$ac_save_CC
3839fi
3840
3841if test "x$ac_cv_prog_cc_c11" = xno
3842then :
3843 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3844printf "%s\n" "unsupported" >&6; }
3845else $as_nop
3846 if test "x$ac_cv_prog_cc_c11" = x
3847then :
3848 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3849printf "%s\n" "none needed" >&6; }
3850else $as_nop
3851 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
3852printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
3853 CC="$CC $ac_cv_prog_cc_c11"
3854fi
3855 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
3856 ac_prog_cc_stdc=c11
3857fi
3858fi
3859if test x$ac_prog_cc_stdc = xno
3860then :
3861 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
3862printf %s "checking for $CC option to enable C99 features... " >&6; }
3863if test ${ac_cv_prog_cc_c99+y}
3864then :
3865 printf %s "(cached) " >&6
3866else $as_nop
3867 ac_cv_prog_cc_c99=no
3868ac_save_CC=$CC
3869cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3870/* end confdefs.h. */
3871$ac_c_conftest_c99_program
3872_ACEOF
3873for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
3874do
3875 CC="$ac_save_CC $ac_arg"
3876 if ac_fn_c_try_compile "$LINENO"
3877then :
Bram Moolenaar22640082018-04-19 20:39:41 +02003878 ac_cv_prog_cc_c99=$ac_arg
Bram Moolenaar2e324952018-04-14 14:37:07 +02003879fi
Illia Bobyra96d5442023-08-30 16:30:15 +02003880rm -f core conftest.err conftest.$ac_objext conftest.beam
Bram Moolenaar22640082018-04-19 20:39:41 +02003881 test "x$ac_cv_prog_cc_c99" != "xno" && break
Bram Moolenaar2e324952018-04-14 14:37:07 +02003882done
3883rm -f conftest.$ac_ext
3884CC=$ac_save_CC
Bram Moolenaar2e324952018-04-14 14:37:07 +02003885fi
3886
Illia Bobyra96d5442023-08-30 16:30:15 +02003887if test "x$ac_cv_prog_cc_c99" = xno
3888then :
3889 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3890printf "%s\n" "unsupported" >&6; }
3891else $as_nop
3892 if test "x$ac_cv_prog_cc_c99" = x
3893then :
3894 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3895printf "%s\n" "none needed" >&6; }
3896else $as_nop
3897 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
3898printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
3899 CC="$CC $ac_cv_prog_cc_c99"
3900fi
3901 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
3902 ac_prog_cc_stdc=c99
3903fi
3904fi
3905if test x$ac_prog_cc_stdc = xno
3906then :
3907 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
3908printf %s "checking for $CC option to enable C89 features... " >&6; }
3909if test ${ac_cv_prog_cc_c89+y}
3910then :
3911 printf %s "(cached) " >&6
3912else $as_nop
3913 ac_cv_prog_cc_c89=no
3914ac_save_CC=$CC
3915cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3916/* end confdefs.h. */
3917$ac_c_conftest_c89_program
3918_ACEOF
3919for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3920do
3921 CC="$ac_save_CC $ac_arg"
3922 if ac_fn_c_try_compile "$LINENO"
3923then :
3924 ac_cv_prog_cc_c89=$ac_arg
3925fi
3926rm -f core conftest.err conftest.$ac_objext conftest.beam
3927 test "x$ac_cv_prog_cc_c89" != "xno" && break
3928done
3929rm -f conftest.$ac_ext
3930CC=$ac_save_CC
3931fi
3932
3933if test "x$ac_cv_prog_cc_c89" = xno
3934then :
3935 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3936printf "%s\n" "unsupported" >&6; }
3937else $as_nop
3938 if test "x$ac_cv_prog_cc_c89" = x
3939then :
3940 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3941printf "%s\n" "none needed" >&6; }
3942else $as_nop
3943 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3944printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
3945 CC="$CC $ac_cv_prog_cc_c89"
3946fi
3947 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
3948 ac_prog_cc_stdc=c89
3949fi
3950fi
3951
3952ac_ext=c
3953ac_cpp='$CPP $CPPFLAGS'
3954ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3955ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3956ac_compiler_gnu=$ac_cv_c_compiler_gnu
Bram Moolenaarc0394412017-04-20 20:20:23 +02003957 ac_ext=c
Bram Moolenaar495de9c2005-01-25 22:03:25 +00003958ac_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
Illia Bobyra96d5442023-08-30 16:30:15 +02003962{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3963printf %s "checking how to run the C preprocessor... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00003964# On Suns, sometimes $CPP names a directory.
3965if test -n "$CPP" && test -d "$CPP"; then
3966 CPP=
3967fi
3968if test -z "$CPP"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02003969 if test ${ac_cv_prog_CPP+y}
3970then :
3971 printf %s "(cached) " >&6
3972else $as_nop
3973 # Double quotes because $CC needs to be expanded
3974 for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp
Bram Moolenaar495de9c2005-01-25 22:03:25 +00003975 do
3976 ac_preproc_ok=false
3977for ac_c_preproc_warn_flag in '' yes
3978do
3979 # Use a header file that comes with gcc, so configuring glibc
3980 # with a fresh cross-compiler works.
Bram Moolenaar071d4272004-06-13 20:20:40 +00003981 # On the NeXT, cc -E runs the code through the compiler's parser,
Bram Moolenaar495de9c2005-01-25 22:03:25 +00003982 # not just through cpp. "Syntax error" is here to catch this case.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02003983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00003984/* end confdefs.h. */
Illia Bobyra96d5442023-08-30 16:30:15 +02003985#include <limits.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00003986 Syntax error
3987_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02003988if ac_fn_c_try_cpp "$LINENO"
3989then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00003990
Illia Bobyra96d5442023-08-30 16:30:15 +02003991else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00003992 # Broken: fails on valid input.
3993continue
3994fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01003995rm -f conftest.err conftest.i conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00003996
Bram Moolenaar446cb832008-06-24 21:56:24 +00003997 # OK, works on sane cases. Now check whether nonexistent headers
Bram Moolenaar495de9c2005-01-25 22:03:25 +00003998 # can be detected and how.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02003999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004000/* end confdefs.h. */
4001#include <ac_nonexistent.h>
4002_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004003if ac_fn_c_try_cpp "$LINENO"
4004then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004005 # Broken: success on invalid input.
4006continue
Illia Bobyra96d5442023-08-30 16:30:15 +02004007else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004008 # Passes both tests.
4009ac_preproc_ok=:
4010break
4011fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01004012rm -f conftest.err conftest.i conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004013
4014done
4015# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Bram Moolenaar7db77842014-03-27 17:40:59 +01004016rm -f conftest.i conftest.err conftest.$ac_ext
Illia Bobyra96d5442023-08-30 16:30:15 +02004017if $ac_preproc_ok
4018then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004019 break
4020fi
4021
4022 done
4023 ac_cv_prog_CPP=$CPP
4024
4025fi
4026 CPP=$ac_cv_prog_CPP
4027else
4028 ac_cv_prog_CPP=$CPP
4029fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004030{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4031printf "%s\n" "$CPP" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004032ac_preproc_ok=false
4033for ac_c_preproc_warn_flag in '' yes
Bram Moolenaar071d4272004-06-13 20:20:40 +00004034do
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004035 # Use a header file that comes with gcc, so configuring glibc
4036 # with a fresh cross-compiler works.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004037 # On the NeXT, cc -E runs the code through the compiler's parser,
4038 # not just through cpp. "Syntax error" is here to catch this case.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004040/* end confdefs.h. */
Illia Bobyra96d5442023-08-30 16:30:15 +02004041#include <limits.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004042 Syntax error
4043_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004044if ac_fn_c_try_cpp "$LINENO"
4045then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004046
Illia Bobyra96d5442023-08-30 16:30:15 +02004047else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004048 # Broken: fails on valid input.
4049continue
4050fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01004051rm -f conftest.err conftest.i conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004052
Bram Moolenaar446cb832008-06-24 21:56:24 +00004053 # OK, works on sane cases. Now check whether nonexistent headers
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004054 # can be detected and how.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004056/* end confdefs.h. */
4057#include <ac_nonexistent.h>
4058_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004059if ac_fn_c_try_cpp "$LINENO"
4060then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004061 # Broken: success on invalid input.
4062continue
Illia Bobyra96d5442023-08-30 16:30:15 +02004063else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004064 # Passes both tests.
4065ac_preproc_ok=:
4066break
4067fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01004068rm -f conftest.err conftest.i conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004069
4070done
4071# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Bram Moolenaar7db77842014-03-27 17:40:59 +01004072rm -f conftest.i conftest.err conftest.$ac_ext
Illia Bobyra96d5442023-08-30 16:30:15 +02004073if $ac_preproc_ok
4074then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004075
Illia Bobyra96d5442023-08-30 16:30:15 +02004076else $as_nop
4077 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4078printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +01004079as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4080See \`config.log' for more details" "$LINENO" 5; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004081fi
4082
4083ac_ext=c
4084ac_cpp='$CPP $CPPFLAGS'
4085ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4086ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4087ac_compiler_gnu=$ac_cv_c_compiler_gnu
Illia Bobyra96d5442023-08-30 16:30:15 +02004088 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4089printf %s "checking for grep that handles long lines and -e... " >&6; }
4090if test ${ac_cv_path_GREP+y}
4091then :
4092 printf %s "(cached) " >&6
4093else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +00004094 if test -z "$GREP"; then
4095 ac_path_GREP_found=false
4096 # Loop through the user's path and test for each of PROGNAME-LIST
4097 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4098for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4099do
4100 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02004101 case $as_dir in #(((
4102 '') as_dir=./ ;;
4103 */) ;;
4104 *) as_dir=$as_dir/ ;;
4105 esac
4106 for ac_prog in grep ggrep
4107 do
Bram Moolenaar446cb832008-06-24 21:56:24 +00004108 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02004109 ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
Bram Moolenaar7db77842014-03-27 17:40:59 +01004110 as_fn_executable_p "$ac_path_GREP" || continue
Bram Moolenaar446cb832008-06-24 21:56:24 +00004111# Check for GNU ac_path_GREP and select it if it is found.
4112 # Check for GNU $ac_path_GREP
4113case `"$ac_path_GREP" --version 2>&1` in
4114*GNU*)
4115 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4116*)
4117 ac_count=0
Illia Bobyra96d5442023-08-30 16:30:15 +02004118 printf %s 0123456789 >"conftest.in"
Bram Moolenaar446cb832008-06-24 21:56:24 +00004119 while :
4120 do
4121 cat "conftest.in" "conftest.in" >"conftest.tmp"
4122 mv "conftest.tmp" "conftest.in"
4123 cp "conftest.in" "conftest.nl"
Illia Bobyra96d5442023-08-30 16:30:15 +02004124 printf "%s\n" 'GREP' >> "conftest.nl"
Bram Moolenaar446cb832008-06-24 21:56:24 +00004125 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4126 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004127 as_fn_arith $ac_count + 1 && ac_count=$as_val
Bram Moolenaar446cb832008-06-24 21:56:24 +00004128 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4129 # Best one so far, save it but keep looking for a better one
4130 ac_cv_path_GREP="$ac_path_GREP"
4131 ac_path_GREP_max=$ac_count
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004132 fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00004133 # 10*(2^10) chars as input seems more than enough
4134 test $ac_count -gt 10 && break
4135 done
4136 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4137esac
4138
4139 $ac_path_GREP_found && break 3
4140 done
4141 done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004142 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00004143IFS=$as_save_IFS
4144 if test -z "$ac_cv_path_GREP"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01004145 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 +00004146 fi
4147else
4148 ac_cv_path_GREP=$GREP
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004149fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00004150
4151fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004152{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4153printf "%s\n" "$ac_cv_path_GREP" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004154 GREP="$ac_cv_path_GREP"
4155
4156
Illia Bobyra96d5442023-08-30 16:30:15 +02004157{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4158printf %s "checking for egrep... " >&6; }
4159if test ${ac_cv_path_EGREP+y}
4160then :
4161 printf %s "(cached) " >&6
4162else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +00004163 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4164 then ac_cv_path_EGREP="$GREP -E"
4165 else
4166 if test -z "$EGREP"; then
4167 ac_path_EGREP_found=false
4168 # Loop through the user's path and test for each of PROGNAME-LIST
4169 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4170for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4171do
4172 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02004173 case $as_dir in #(((
4174 '') as_dir=./ ;;
4175 */) ;;
4176 *) as_dir=$as_dir/ ;;
4177 esac
4178 for ac_prog in egrep
4179 do
Bram Moolenaar446cb832008-06-24 21:56:24 +00004180 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02004181 ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
Bram Moolenaar7db77842014-03-27 17:40:59 +01004182 as_fn_executable_p "$ac_path_EGREP" || continue
Bram Moolenaar446cb832008-06-24 21:56:24 +00004183# Check for GNU ac_path_EGREP and select it if it is found.
4184 # Check for GNU $ac_path_EGREP
4185case `"$ac_path_EGREP" --version 2>&1` in
4186*GNU*)
4187 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4188*)
4189 ac_count=0
Illia Bobyra96d5442023-08-30 16:30:15 +02004190 printf %s 0123456789 >"conftest.in"
Bram Moolenaar446cb832008-06-24 21:56:24 +00004191 while :
4192 do
4193 cat "conftest.in" "conftest.in" >"conftest.tmp"
4194 mv "conftest.tmp" "conftest.in"
4195 cp "conftest.in" "conftest.nl"
Illia Bobyra96d5442023-08-30 16:30:15 +02004196 printf "%s\n" 'EGREP' >> "conftest.nl"
Bram Moolenaar446cb832008-06-24 21:56:24 +00004197 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4198 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004199 as_fn_arith $ac_count + 1 && ac_count=$as_val
Bram Moolenaar446cb832008-06-24 21:56:24 +00004200 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4201 # Best one so far, save it but keep looking for a better one
4202 ac_cv_path_EGREP="$ac_path_EGREP"
4203 ac_path_EGREP_max=$ac_count
4204 fi
4205 # 10*(2^10) chars as input seems more than enough
4206 test $ac_count -gt 10 && break
4207 done
4208 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4209esac
4210
4211 $ac_path_EGREP_found && break 3
4212 done
4213 done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004214 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00004215IFS=$as_save_IFS
4216 if test -z "$ac_cv_path_EGREP"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01004217 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 +00004218 fi
4219else
4220 ac_cv_path_EGREP=$EGREP
4221fi
4222
4223 fi
4224fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004225{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4226printf "%s\n" "$ac_cv_path_EGREP" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004227 EGREP="$ac_cv_path_EGREP"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004228
Illia Bobyra96d5442023-08-30 16:30:15 +02004229 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
4230printf %s "checking for fgrep... " >&6; }
4231if test ${ac_cv_path_FGREP+y}
4232then :
4233 printf %s "(cached) " >&6
4234else $as_nop
Bram Moolenaar2bcaec32014-03-27 18:51:11 +01004235 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
4236 then ac_cv_path_FGREP="$GREP -F"
4237 else
4238 if test -z "$FGREP"; then
4239 ac_path_FGREP_found=false
4240 # Loop through the user's path and test for each of PROGNAME-LIST
4241 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4242for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4243do
4244 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02004245 case $as_dir in #(((
4246 '') as_dir=./ ;;
4247 */) ;;
4248 *) as_dir=$as_dir/ ;;
4249 esac
4250 for ac_prog in fgrep
4251 do
Bram Moolenaar2bcaec32014-03-27 18:51:11 +01004252 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02004253 ac_path_FGREP="$as_dir$ac_prog$ac_exec_ext"
Bram Moolenaar2bcaec32014-03-27 18:51:11 +01004254 as_fn_executable_p "$ac_path_FGREP" || continue
4255# Check for GNU ac_path_FGREP and select it if it is found.
4256 # Check for GNU $ac_path_FGREP
4257case `"$ac_path_FGREP" --version 2>&1` in
4258*GNU*)
4259 ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
4260*)
4261 ac_count=0
Illia Bobyra96d5442023-08-30 16:30:15 +02004262 printf %s 0123456789 >"conftest.in"
Bram Moolenaar2bcaec32014-03-27 18:51:11 +01004263 while :
4264 do
4265 cat "conftest.in" "conftest.in" >"conftest.tmp"
4266 mv "conftest.tmp" "conftest.in"
4267 cp "conftest.in" "conftest.nl"
Illia Bobyra96d5442023-08-30 16:30:15 +02004268 printf "%s\n" 'FGREP' >> "conftest.nl"
Bram Moolenaar2bcaec32014-03-27 18:51:11 +01004269 "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
4270 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4271 as_fn_arith $ac_count + 1 && ac_count=$as_val
4272 if test $ac_count -gt ${ac_path_FGREP_max-0}; then
4273 # Best one so far, save it but keep looking for a better one
4274 ac_cv_path_FGREP="$ac_path_FGREP"
4275 ac_path_FGREP_max=$ac_count
4276 fi
4277 # 10*(2^10) chars as input seems more than enough
4278 test $ac_count -gt 10 && break
4279 done
4280 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4281esac
4282
4283 $ac_path_FGREP_found && break 3
4284 done
4285 done
4286 done
4287IFS=$as_save_IFS
4288 if test -z "$ac_cv_path_FGREP"; then
4289 as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4290 fi
4291else
4292 ac_cv_path_FGREP=$FGREP
4293fi
4294
4295 fi
4296fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004297{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
4298printf "%s\n" "$ac_cv_path_FGREP" >&6; }
Bram Moolenaar2bcaec32014-03-27 18:51:11 +01004299 FGREP="$ac_cv_path_FGREP"
4300
Bram Moolenaarc0394412017-04-20 20:20:23 +02004301 for ac_prog in gawk mawk nawk awk
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004302do
4303 # Extract the first word of "$ac_prog", so it can be a program name with args.
Bram Moolenaar071d4272004-06-13 20:20:40 +00004304set dummy $ac_prog; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02004305{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4306printf %s "checking for $ac_word... " >&6; }
4307if test ${ac_cv_prog_AWK+y}
4308then :
4309 printf %s "(cached) " >&6
4310else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00004311 if test -n "$AWK"; then
4312 ac_cv_prog_AWK="$AWK" # Let the user override the test.
4313else
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004314as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4315for as_dir in $PATH
4316do
4317 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02004318 case $as_dir in #(((
4319 '') as_dir=./ ;;
4320 */) ;;
4321 *) as_dir=$as_dir/ ;;
4322 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004323 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02004324 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004325 ac_cv_prog_AWK="$ac_prog"
Illia Bobyra96d5442023-08-30 16:30:15 +02004326 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004327 break 2
4328 fi
4329done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004330 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00004331IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004332
Bram Moolenaar071d4272004-06-13 20:20:40 +00004333fi
4334fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004335AWK=$ac_cv_prog_AWK
Bram Moolenaar071d4272004-06-13 20:20:40 +00004336if test -n "$AWK"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004337 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4338printf "%s\n" "$AWK" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00004339else
Illia Bobyra96d5442023-08-30 16:30:15 +02004340 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4341printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00004342fi
4343
Bram Moolenaar446cb832008-06-24 21:56:24 +00004344
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004345 test -n "$AWK" && break
Bram Moolenaar071d4272004-06-13 20:20:40 +00004346done
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004347
Bram Moolenaar071d4272004-06-13 20:20:40 +00004348# Extract the first word of "strip", so it can be a program name with args.
4349set dummy strip; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02004350{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4351printf %s "checking for $ac_word... " >&6; }
4352if test ${ac_cv_prog_STRIP+y}
4353then :
4354 printf %s "(cached) " >&6
4355else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00004356 if test -n "$STRIP"; then
4357 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4358else
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004359as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4360for as_dir in $PATH
4361do
4362 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02004363 case $as_dir in #(((
4364 '') as_dir=./ ;;
4365 */) ;;
4366 *) as_dir=$as_dir/ ;;
4367 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004368 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02004369 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004370 ac_cv_prog_STRIP="strip"
Illia Bobyra96d5442023-08-30 16:30:15 +02004371 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004372 break 2
4373 fi
4374done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004375 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00004376IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004377
Bram Moolenaar071d4272004-06-13 20:20:40 +00004378 test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4379fi
4380fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004381STRIP=$ac_cv_prog_STRIP
Bram Moolenaar071d4272004-06-13 20:20:40 +00004382if test -n "$STRIP"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004383 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4384printf "%s\n" "$STRIP" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00004385else
Illia Bobyra96d5442023-08-30 16:30:15 +02004386 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4387printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00004388fi
4389
4390
Bram Moolenaar071d4272004-06-13 20:20:40 +00004391
4392
Bram Moolenaar071d4272004-06-13 20:20:40 +00004393
Illia Bobyrf39842f2023-08-27 18:21:23 +02004394
Illia Bobyra96d5442023-08-30 16:30:15 +02004395{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
4396printf %s "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
4397if test ${ac_cv_header_sys_wait_h+y}
4398then :
4399 printf %s "(cached) " >&6
4400else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +00004402/* end confdefs.h. */
4403#include <sys/types.h>
4404#include <sys/wait.h>
4405#ifndef WEXITSTATUS
4406# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
4407#endif
4408#ifndef WIFEXITED
4409# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4410#endif
4411
4412int
Illia Bobyra96d5442023-08-30 16:30:15 +02004413main (void)
Bram Moolenaar446cb832008-06-24 21:56:24 +00004414{
4415 int s;
4416 wait (&s);
4417 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4418 ;
4419 return 0;
4420}
4421_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004422if ac_fn_c_try_compile "$LINENO"
4423then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00004424 ac_cv_header_sys_wait_h=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02004425else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004426 ac_cv_header_sys_wait_h=no
Bram Moolenaar446cb832008-06-24 21:56:24 +00004427fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004428rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +00004429fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004430{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
4431printf "%s\n" "$ac_cv_header_sys_wait_h" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004432if test $ac_cv_header_sys_wait_h = yes; then
4433
Illia Bobyra96d5442023-08-30 16:30:15 +02004434printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +00004435
4436fi
4437
4438
Bram Moolenaar22640082018-04-19 20:39:41 +02004439if test x"$ac_cv_prog_cc_c99" != xno; then
4440
4441
Illia Bobyra96d5442023-08-30 16:30:15 +02004442 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
4443printf %s "checking for unsigned long long int... " >&6; }
4444if test ${ac_cv_type_unsigned_long_long_int+y}
4445then :
4446 printf %s "(cached) " >&6
4447else $as_nop
Bram Moolenaar22640082018-04-19 20:39:41 +02004448 ac_cv_type_unsigned_long_long_int=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02004449 case $ac_prog_cc_stdc in
4450 no | c89) ;;
4451 *)
4452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar561f8a52018-04-17 22:02:45 +02004453/* end confdefs.h. */
Bram Moolenaar22640082018-04-19 20:39:41 +02004454
4455 /* For now, do not test the preprocessor; as of 2007 there are too many
4456 implementations with broken preprocessors. Perhaps this can
4457 be revisited in 2012. In the meantime, code should not expect
4458 #if to work with literals wider than 32 bits. */
4459 /* Test literals. */
4460 long long int ll = 9223372036854775807ll;
4461 long long int nll = -9223372036854775807LL;
4462 unsigned long long int ull = 18446744073709551615ULL;
4463 /* Test constant expressions. */
4464 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
4465 ? 1 : -1)];
4466 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
4467 ? 1 : -1)];
4468 int i = 63;
4469int
Illia Bobyra96d5442023-08-30 16:30:15 +02004470main (void)
Bram Moolenaar22640082018-04-19 20:39:41 +02004471{
4472/* Test availability of runtime routines for shift and division. */
4473 long long int llmax = 9223372036854775807ll;
4474 unsigned long long int ullmax = 18446744073709551615ull;
4475 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
4476 | (llmax / ll) | (llmax % ll)
4477 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
4478 | (ullmax / ull) | (ullmax % ull));
4479 ;
4480 return 0;
4481}
4482
4483_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004484if ac_fn_c_try_link "$LINENO"
4485then :
Bram Moolenaar22640082018-04-19 20:39:41 +02004486
Illia Bobyra96d5442023-08-30 16:30:15 +02004487else $as_nop
Bram Moolenaar22640082018-04-19 20:39:41 +02004488 ac_cv_type_unsigned_long_long_int=no
4489fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004490rm -f core conftest.err conftest.$ac_objext conftest.beam \
4491 conftest$ac_exeext conftest.$ac_ext;;
4492 esac
Bram Moolenaar22640082018-04-19 20:39:41 +02004493fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004494{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
4495printf "%s\n" "$ac_cv_type_unsigned_long_long_int" >&6; }
Bram Moolenaar22640082018-04-19 20:39:41 +02004496 if test $ac_cv_type_unsigned_long_long_int = yes; then
4497
Illia Bobyra96d5442023-08-30 16:30:15 +02004498printf "%s\n" "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
Bram Moolenaar22640082018-04-19 20:39:41 +02004499
4500 fi
4501
4502
4503
Illia Bobyra96d5442023-08-30 16:30:15 +02004504 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
4505printf %s "checking for long long int... " >&6; }
4506if test ${ac_cv_type_long_long_int+y}
4507then :
4508 printf %s "(cached) " >&6
4509else $as_nop
Bram Moolenaar22640082018-04-19 20:39:41 +02004510 ac_cv_type_long_long_int=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02004511 case $ac_prog_cc_stdc in
4512 no | c89) ;;
4513 *)
4514 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
4515 if test $ac_cv_type_long_long_int = yes; then
4516 if test "$cross_compiling" = yes
4517then :
Bram Moolenaar22640082018-04-19 20:39:41 +02004518 :
Illia Bobyra96d5442023-08-30 16:30:15 +02004519else $as_nop
Bram Moolenaar22640082018-04-19 20:39:41 +02004520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4521/* end confdefs.h. */
4522#include <limits.h>
Illia Bobyra96d5442023-08-30 16:30:15 +02004523 #ifndef LLONG_MAX
4524 # define HALF \
4525 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
4526 # define LLONG_MAX (HALF - 1 + HALF)
4527 #endif
Bram Moolenaar22640082018-04-19 20:39:41 +02004528int
Illia Bobyra96d5442023-08-30 16:30:15 +02004529main (void)
Bram Moolenaar22640082018-04-19 20:39:41 +02004530{
4531long long int n = 1;
Illia Bobyra96d5442023-08-30 16:30:15 +02004532 int i;
4533 for (i = 0; ; i++)
4534 {
4535 long long int m = n << i;
4536 if (m >> i != n)
4537 return 1;
4538 if (LLONG_MAX / 2 < m)
4539 break;
4540 }
4541 return 0;
Bram Moolenaar22640082018-04-19 20:39:41 +02004542 ;
4543 return 0;
4544}
4545_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004546if ac_fn_c_try_run "$LINENO"
4547then :
Bram Moolenaar22640082018-04-19 20:39:41 +02004548
Illia Bobyra96d5442023-08-30 16:30:15 +02004549else $as_nop
Bram Moolenaar22640082018-04-19 20:39:41 +02004550 ac_cv_type_long_long_int=no
4551fi
4552rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4553 conftest.$ac_objext conftest.beam conftest.$ac_ext
4554fi
4555
Illia Bobyra96d5442023-08-30 16:30:15 +02004556 fi;;
4557 esac
Bram Moolenaar22640082018-04-19 20:39:41 +02004558fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004559{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
4560printf "%s\n" "$ac_cv_type_long_long_int" >&6; }
Bram Moolenaar22640082018-04-19 20:39:41 +02004561 if test $ac_cv_type_long_long_int = yes; then
4562
Illia Bobyra96d5442023-08-30 16:30:15 +02004563printf "%s\n" "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
Bram Moolenaar22640082018-04-19 20:39:41 +02004564
4565 fi
4566
4567 if test "$ac_cv_type_long_long_int" = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004568 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4569printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar22640082018-04-19 20:39:41 +02004570as_fn_error $? "Compiler does not support long long int
4571See \`config.log' for more details" "$LINENO" 5; }
4572 fi
4573
Illia Bobyra96d5442023-08-30 16:30:15 +02004574 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the compiler supports trailing commas" >&5
4575printf %s "checking if the compiler supports trailing commas... " >&6; }
Bram Moolenaar22640082018-04-19 20:39:41 +02004576 trailing_commas=no
4577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4578/* end confdefs.h. */
4579
Bram Moolenaar561f8a52018-04-17 22:02:45 +02004580int
Illia Bobyra96d5442023-08-30 16:30:15 +02004581main (void)
Bram Moolenaar561f8a52018-04-17 22:02:45 +02004582{
4583
Bram Moolenaar22640082018-04-19 20:39:41 +02004584 enum {
4585 one,
4586 };
Bram Moolenaar561f8a52018-04-17 22:02:45 +02004587 ;
4588 return 0;
4589}
4590_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004591if ac_fn_c_try_compile "$LINENO"
4592then :
4593 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4594printf "%s\n" "yes" >&6; }; trailing_commas=yes
4595else $as_nop
4596 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4597printf "%s\n" "no" >&6; }
Bram Moolenaar561f8a52018-04-17 22:02:45 +02004598fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004599rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar22640082018-04-19 20:39:41 +02004600 if test "$trailing_commas" = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004601 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4602printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar22640082018-04-19 20:39:41 +02004603as_fn_error $? "Compiler does not support trailing comma in enum
4604See \`config.log' for more details" "$LINENO" 5; }
4605 fi
4606
Illia Bobyra96d5442023-08-30 16:30:15 +02004607 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the compiler supports C++ comments" >&5
4608printf %s "checking if the compiler supports C++ comments... " >&6; }
Bram Moolenaar22640082018-04-19 20:39:41 +02004609 slash_comments=no
4610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4611/* end confdefs.h. */
4612
4613int
Illia Bobyra96d5442023-08-30 16:30:15 +02004614main (void)
Bram Moolenaar22640082018-04-19 20:39:41 +02004615{
4616// C++ comments?
4617 ;
4618 return 0;
4619}
4620_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004621if ac_fn_c_try_compile "$LINENO"
4622then :
4623 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4624printf "%s\n" "yes" >&6; }; slash_comments=yes
4625else $as_nop
4626 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4627printf "%s\n" "no" >&6; }
Bram Moolenaar22640082018-04-19 20:39:41 +02004628fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004629rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar22640082018-04-19 20:39:41 +02004630 if test "$slash_comments" = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004631 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4632printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar22640082018-04-19 20:39:41 +02004633as_fn_error $? "Compiler does not support C++ comments
4634See \`config.log' for more details" "$LINENO" 5; }
4635 fi
4636fi
Bram Moolenaar561f8a52018-04-17 22:02:45 +02004637
Bram Moolenaar8f1dde52020-06-05 23:16:29 +02004638if test -n "$SOURCE_DATE_EPOCH"; then
4639 DATE_FMT="%b %d %Y %H:%M:%S"
4640 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 +02004641 printf "%s\n" "#define BUILD_DATE \"$BUILD_DATE\"" >>confdefs.h
Bram Moolenaar8f1dde52020-06-05 23:16:29 +02004642
4643 BUILD_DATE_MSG=-"echo -e '=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\nNOTE: build date/time is fixed: $BUILD_DATE\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-='"
4644
4645fi
4646
Bram Moolenaarf788a062011-12-14 20:51:25 +01004647
Illia Bobyra96d5442023-08-30 16:30:15 +02004648{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-fail-if-missing argument" >&5
4649printf %s "checking --enable-fail-if-missing argument... " >&6; }
Bram Moolenaarf788a062011-12-14 20:51:25 +01004650# Check whether --enable-fail_if_missing was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02004651if test ${enable_fail_if_missing+y}
4652then :
Bram Moolenaarf788a062011-12-14 20:51:25 +01004653 enableval=$enable_fail_if_missing; fail_if_missing="yes"
Illia Bobyra96d5442023-08-30 16:30:15 +02004654else $as_nop
Bram Moolenaarf788a062011-12-14 20:51:25 +01004655 fail_if_missing="no"
4656fi
4657
Illia Bobyra96d5442023-08-30 16:30:15 +02004658{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $fail_if_missing" >&5
4659printf "%s\n" "$fail_if_missing" >&6; }
Bram Moolenaarf788a062011-12-14 20:51:25 +01004660
Bram Moolenaard2a05492018-07-27 22:35:15 +02004661with_x_arg="$with_x"
4662
Bram Moolenaar446cb832008-06-24 21:56:24 +00004663if test -z "$CFLAGS"; then
4664 CFLAGS="-O"
Bram Moolenaar4d8479b2021-01-31 14:36:06 +01004665 test "$GCC" = yes && CFLAGS="-O2 -fno-strength-reduce -Wall -Wno-deprecated-declarations"
Bram Moolenaar446cb832008-06-24 21:56:24 +00004666fi
Rose00d07e72023-05-06 18:07:14 +01004667
Bram Moolenaar446cb832008-06-24 21:56:24 +00004668if test "$GCC" = yes; then
Bram Moolenaarc8836f72014-04-12 13:12:24 +02004669 gccversion=`$CC -dumpversion`
Bram Moolenaar446cb832008-06-24 21:56:24 +00004670 if test "x$gccversion" = "x"; then
Bram Moolenaarc8836f72014-04-12 13:12:24 +02004671 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 +00004672 fi
Rose00d07e72023-05-06 18:07:14 +01004673
4674 if test "$gccversion" = "3.0.1" -o "$gccversion" = "3.0.2" -o "$gccversion" = "4.0.1"; then
Bram Moolenaar446cb832008-06-24 21:56:24 +00004675 echo 'GCC [34].0.[12] has a bug in the optimizer, disabling "-O#"'
4676 CFLAGS=`echo "$CFLAGS" | sed 's/-O[23456789]/-O/'`
4677 else
4678 if test "$gccversion" = "3.1" -o "$gccversion" = "3.2" -o "$gccversion" = "3.2.1" && `echo "$CFLAGS" | grep -v fno-strength-reduce >/dev/null`; then
4679 echo 'GCC 3.1 and 3.2 have a bug in the optimizer, adding "-fno-strength-reduce"'
4680 CFLAGS="$CFLAGS -fno-strength-reduce"
4681 fi
4682 fi
4683fi
4684
Illia Bobyra96d5442023-08-30 16:30:15 +02004685{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clang version" >&5
4686printf %s "checking for clang version... " >&6; }
Bram Moolenaar5f69fee2017-03-09 11:58:40 +01004687CLANG_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 +02004688if test x"$CLANG_VERSION_STRING" != x"" ; then
4689 CLANG_MAJOR=`echo "$CLANG_VERSION_STRING" | sed -n -e 's/\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*/\1/p'`
4690 CLANG_MINOR=`echo "$CLANG_VERSION_STRING" | sed -n -e 's/[0-9][0-9]*\.\([0-9][0-9]*\)\.[0-9][0-9]*/\1/p'`
4691 CLANG_REVISION=`echo "$CLANG_VERSION_STRING" | sed -n -e 's/[0-9][0-9]*\.[0-9][0-9]*\.\([0-9][0-9]*\)/\1/p'`
4692 CLANG_VERSION=`expr $CLANG_MAJOR '*' 1000000 '+' $CLANG_MINOR '*' 1000 '+' $CLANG_REVISION`
Illia Bobyra96d5442023-08-30 16:30:15 +02004693 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CLANG_VERSION" >&5
4694printf "%s\n" "$CLANG_VERSION" >&6; }
4695 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if clang supports -fno-strength-reduce" >&5
4696printf %s "checking if clang supports -fno-strength-reduce... " >&6; }
Bram Moolenaarebd211c2021-01-30 19:33:36 +01004697 if test "$CLANG_MAJOR" -ge 10 -o "$CLANG_VERSION" -ge 500002075 ; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004698 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4699printf "%s\n" "no" >&6; }
Bram Moolenaar5f69fee2017-03-09 11:58:40 +01004700 CFLAGS=`echo "$CFLAGS" | sed -e 's/-fno-strength-reduce/ /'`
4701 else
Illia Bobyra96d5442023-08-30 16:30:15 +02004702 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4703printf "%s\n" "yes" >&6; }
Bram Moolenaar0c6ccfd2013-10-02 18:23:07 +02004704 fi
4705else
Illia Bobyra96d5442023-08-30 16:30:15 +02004706 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: N/A" >&5
4707printf "%s\n" "N/A" >&6; }
Bram Moolenaar0c6ccfd2013-10-02 18:23:07 +02004708fi
4709
Bram Moolenaar839e9542016-04-14 16:46:02 +02004710CROSS_COMPILING=
Bram Moolenaar446cb832008-06-24 21:56:24 +00004711if test "$cross_compiling" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004712 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot compile a simple program; if not cross compiling check CC and CFLAGS" >&5
4713printf "%s\n" "cannot compile a simple program; if not cross compiling check CC and CFLAGS" >&6; }
Bram Moolenaar839e9542016-04-14 16:46:02 +02004714 CROSS_COMPILING=1
Bram Moolenaar446cb832008-06-24 21:56:24 +00004715fi
4716
Bram Moolenaar839e9542016-04-14 16:46:02 +02004717
Bram Moolenaar446cb832008-06-24 21:56:24 +00004718test "$GCC" = yes && CPP_MM=M;
4719
4720if test -f ./toolcheck; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004721 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for buggy tools" >&5
4722printf %s "checking for buggy tools... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004723 sh ./toolcheck 1>&6
4724fi
4725
4726OS_EXTRA_SRC=""; OS_EXTRA_OBJ=""
4727
Illia Bobyra96d5442023-08-30 16:30:15 +02004728{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking uname" >&5
4729printf %s "checking uname... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004730if test "x$vim_cv_uname_output" = "x" ; then
4731 vim_cv_uname_output=`(uname) 2>/dev/null`
Illia Bobyra96d5442023-08-30 16:30:15 +02004732 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_uname_output" >&5
4733printf "%s\n" "$vim_cv_uname_output" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004734else
Illia Bobyra96d5442023-08-30 16:30:15 +02004735 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_uname_output (cached)" >&5
4736printf "%s\n" "$vim_cv_uname_output (cached)" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004737fi
4738
Illia Bobyra96d5442023-08-30 16:30:15 +02004739{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking uname -r" >&5
4740printf %s "checking uname -r... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004741if test "x$vim_cv_uname_r_output" = "x" ; then
4742 vim_cv_uname_r_output=`(uname -r) 2>/dev/null`
Illia Bobyra96d5442023-08-30 16:30:15 +02004743 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_uname_r_output" >&5
4744printf "%s\n" "$vim_cv_uname_r_output" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004745else
Illia Bobyra96d5442023-08-30 16:30:15 +02004746 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_uname_r_output (cached)" >&5
4747printf "%s\n" "$vim_cv_uname_r_output (cached)" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004748fi
4749
Illia Bobyra96d5442023-08-30 16:30:15 +02004750{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking uname -m" >&5
4751printf %s "checking uname -m... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004752if test "x$vim_cv_uname_m_output" = "x" ; then
4753 vim_cv_uname_m_output=`(uname -m) 2>/dev/null`
Illia Bobyra96d5442023-08-30 16:30:15 +02004754 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_uname_m_output" >&5
4755printf "%s\n" "$vim_cv_uname_m_output" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004756else
Illia Bobyra96d5442023-08-30 16:30:15 +02004757 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_uname_m_output (cached)" >&5
4758printf "%s\n" "$vim_cv_uname_m_output (cached)" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004759fi
4760
Illia Bobyra96d5442023-08-30 16:30:15 +02004761{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Haiku" >&5
4762printf %s "checking for Haiku... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004763case $vim_cv_uname_output in
Illia Bobyra96d5442023-08-30 16:30:15 +02004764 Haiku) HAIKU=yes; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4765printf "%s\n" "yes" >&6; };;
4766 *) HAIKU=no; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4767printf "%s\n" "no" >&6; };;
Bram Moolenaarb3f74062020-02-26 16:16:53 +01004768esac
4769
Illia Bobyra96d5442023-08-30 16:30:15 +02004770{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for QNX" >&5
4771printf %s "checking for QNX... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004772case $vim_cv_uname_output in
Bram Moolenaar446cb832008-06-24 21:56:24 +00004773 QNX) OS_EXTRA_SRC=os_qnx.c; OS_EXTRA_OBJ=objects/os_qnx.o
4774 test -z "$with_x" && with_x=no
Illia Bobyra96d5442023-08-30 16:30:15 +02004775 QNX=yes; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4776printf "%s\n" "yes" >&6; };;
4777 *) QNX=no; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4778printf "%s\n" "no" >&6; };;
Bram Moolenaar446cb832008-06-24 21:56:24 +00004779esac
4780
Illia Bobyra96d5442023-08-30 16:30:15 +02004781{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Darwin (Mac OS X)" >&5
4782printf %s "checking for Darwin (Mac OS X)... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004783if test "$vim_cv_uname_output" = Darwin; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004784 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4785printf "%s\n" "yes" >&6; }
Bram Moolenaard0573012017-10-28 21:11:06 +02004786 MACOS_X=yes
Bram Moolenaar52ecaaa2018-05-12 21:38:13 +02004787 CPPFLAGS="$CPPFLAGS -DMACOS_X"
Bram Moolenaar446cb832008-06-24 21:56:24 +00004788
Illia Bobyra96d5442023-08-30 16:30:15 +02004789 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-darwin argument" >&5
4790printf %s "checking --disable-darwin argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004791 # Check whether --enable-darwin was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02004792if test ${enable_darwin+y}
4793then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00004794 enableval=$enable_darwin;
Illia Bobyra96d5442023-08-30 16:30:15 +02004795else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +00004796 enable_darwin="yes"
4797fi
4798
4799 if test "$enable_darwin" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004800 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4801printf "%s\n" "no" >&6; }
4802 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if Darwin files are there" >&5
4803printf %s "checking if Darwin files are there... " >&6; }
Bram Moolenaar164fca32010-07-14 13:58:07 +02004804 if test -f os_macosx.m; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004805 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4806printf "%s\n" "yes" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004807 else
Illia Bobyra96d5442023-08-30 16:30:15 +02004808 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, Darwin support disabled" >&5
4809printf "%s\n" "no, Darwin support disabled" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004810 enable_darwin=no
4811 fi
4812 else
Illia Bobyra96d5442023-08-30 16:30:15 +02004813 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, Darwin support excluded" >&5
4814printf "%s\n" "yes, Darwin support excluded" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004815 fi
4816
Illia Bobyra96d5442023-08-30 16:30:15 +02004817 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-mac-arch argument" >&5
4818printf %s "checking --with-mac-arch argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004819
4820# Check whether --with-mac-arch was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02004821if test ${with_mac_arch+y}
4822then :
4823 withval=$with_mac_arch; MACARCH="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MACARCH" >&5
4824printf "%s\n" "$MACARCH" >&6; }
4825else $as_nop
4826 MACARCH="current"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: defaulting to $MACARCH" >&5
4827printf "%s\n" "defaulting to $MACARCH" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004828fi
4829
4830
Illia Bobyra96d5442023-08-30 16:30:15 +02004831 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-developer-dir argument" >&5
4832printf %s "checking --with-developer-dir argument... " >&6; }
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004833
4834# Check whether --with-developer-dir was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02004835if test ${with_developer_dir+y}
4836then :
4837 withval=$with_developer_dir; DEVELOPER_DIR="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DEVELOPER_DIR" >&5
4838printf "%s\n" "$DEVELOPER_DIR" >&6; }
4839else $as_nop
4840 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not present" >&5
4841printf "%s\n" "not present" >&6; }
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004842fi
4843
4844
4845 if test "x$DEVELOPER_DIR" = "x"; then
4846 # Extract the first word of "xcode-select", so it can be a program name with args.
4847set dummy xcode-select; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02004848{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4849printf %s "checking for $ac_word... " >&6; }
4850if test ${ac_cv_path_XCODE_SELECT+y}
4851then :
4852 printf %s "(cached) " >&6
4853else $as_nop
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004854 case $XCODE_SELECT in
4855 [\\/]* | ?:[\\/]*)
4856 ac_cv_path_XCODE_SELECT="$XCODE_SELECT" # Let the user override the test with a path.
4857 ;;
4858 *)
4859 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4860for as_dir in $PATH
4861do
4862 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02004863 case $as_dir in #(((
4864 '') as_dir=./ ;;
4865 */) ;;
4866 *) as_dir=$as_dir/ ;;
4867 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004868 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02004869 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4870 ac_cv_path_XCODE_SELECT="$as_dir$ac_word$ac_exec_ext"
4871 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004872 break 2
4873 fi
4874done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004875 done
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004876IFS=$as_save_IFS
4877
4878 ;;
4879esac
4880fi
4881XCODE_SELECT=$ac_cv_path_XCODE_SELECT
4882if test -n "$XCODE_SELECT"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004883 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XCODE_SELECT" >&5
4884printf "%s\n" "$XCODE_SELECT" >&6; }
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004885else
Illia Bobyra96d5442023-08-30 16:30:15 +02004886 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4887printf "%s\n" "no" >&6; }
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004888fi
4889
4890
4891 if test "x$XCODE_SELECT" != "x"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004892 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for developer dir using xcode-select" >&5
4893printf %s "checking for developer dir using xcode-select... " >&6; }
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004894 DEVELOPER_DIR=`$XCODE_SELECT -print-path`
Illia Bobyra96d5442023-08-30 16:30:15 +02004895 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DEVELOPER_DIR" >&5
4896printf "%s\n" "$DEVELOPER_DIR" >&6; }
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004897 else
4898 DEVELOPER_DIR=/Developer
4899 fi
4900 fi
4901
Bram Moolenaar446cb832008-06-24 21:56:24 +00004902 if test "x$MACARCH" = "xboth"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004903 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 10.4 universal SDK" >&5
4904printf %s "checking for 10.4 universal SDK... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004905 save_cppflags="$CPPFLAGS"
4906 save_cflags="$CFLAGS"
4907 save_ldflags="$LDFLAGS"
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004908 CFLAGS="$CFLAGS -isysroot $DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +00004910/* end confdefs.h. */
4911
4912int
Illia Bobyra96d5442023-08-30 16:30:15 +02004913main (void)
Bram Moolenaar446cb832008-06-24 21:56:24 +00004914{
4915
4916 ;
4917 return 0;
4918}
4919_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004920if ac_fn_c_try_link "$LINENO"
4921then :
4922 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found" >&5
4923printf "%s\n" "found" >&6; }
4924else $as_nop
4925 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4926printf "%s\n" "not found" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004927 CFLAGS="$save_cflags"
Illia Bobyra96d5442023-08-30 16:30:15 +02004928 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if Intel architecture is supported" >&5
4929printf %s "checking if Intel architecture is supported... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004930 CPPFLAGS="$CPPFLAGS -arch i386"
4931 LDFLAGS="$save_ldflags -arch i386"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +00004933/* end confdefs.h. */
4934
4935int
Illia Bobyra96d5442023-08-30 16:30:15 +02004936main (void)
Bram Moolenaar446cb832008-06-24 21:56:24 +00004937{
4938
4939 ;
4940 return 0;
4941}
4942_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004943if ac_fn_c_try_link "$LINENO"
4944then :
4945 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4946printf "%s\n" "yes" >&6; }; MACARCH="intel"
4947else $as_nop
4948 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4949printf "%s\n" "no" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004950 MACARCH="ppc"
4951 CPPFLAGS="$save_cppflags -arch ppc"
4952 LDFLAGS="$save_ldflags -arch ppc"
4953fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004954rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004955 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +00004956fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004957rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004958 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +00004959 elif test "x$MACARCH" = "xintel"; then
4960 CPPFLAGS="$CPPFLAGS -arch intel"
4961 LDFLAGS="$LDFLAGS -arch intel"
4962 elif test "x$MACARCH" = "xppc"; then
4963 CPPFLAGS="$CPPFLAGS -arch ppc"
4964 LDFLAGS="$LDFLAGS -arch ppc"
4965 fi
4966
4967 if test "$enable_darwin" = "yes"; then
Bram Moolenaard0573012017-10-28 21:11:06 +02004968 MACOS_X_DARWIN=yes
Bram Moolenaar164fca32010-07-14 13:58:07 +02004969 OS_EXTRA_SRC="os_macosx.m os_mac_conv.c";
Bram Moolenaar446cb832008-06-24 21:56:24 +00004970 OS_EXTRA_OBJ="objects/os_macosx.o objects/os_mac_conv.o"
Illia Bobyra96d5442023-08-30 16:30:15 +02004971 printf "%s\n" "#define HAVE_TIMER_CREATE 1" >>confdefs.h
Bram Moolenaare5303952022-06-19 17:05:47 +01004972
Bram Moolenaard0573012017-10-28 21:11:06 +02004973 CPPFLAGS="$CPPFLAGS -DMACOS_X_DARWIN"
Bram Moolenaar040f9752020-08-11 23:08:48 +02004974
Bram Moolenaar0b40d082022-03-08 13:32:37 +00004975 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 +02004976 with_x=no
4977 fi
Bram Moolenaar097148e2020-08-11 21:58:20 +02004978 fi
Bram Moolenaar097148e2020-08-11 21:58:20 +02004979else
Illia Bobyra96d5442023-08-30 16:30:15 +02004980 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4981printf "%s\n" "no" >&6; }
Bram Moolenaar097148e2020-08-11 21:58:20 +02004982fi
4983
Illia Bobyra96d5442023-08-30 16:30:15 +02004984ac_header= ac_cache=
4985for ac_item in $ac_header_c_list
4986do
4987 if test $ac_cache; then
4988 ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
4989 if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
4990 printf "%s\n" "#define $ac_item 1" >> confdefs.h
4991 fi
4992 ac_header= ac_cache=
4993 elif test $ac_header; then
4994 ac_cache=$ac_item
4995 else
4996 ac_header=$ac_item
4997 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004998done
4999
5000
Illia Bobyra96d5442023-08-30 16:30:15 +02005001
5002
5003
5004
5005
5006
5007if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
5008then :
5009
5010printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
Bram Moolenaar18e54692013-11-03 20:26:31 +01005011
Bram Moolenaar39766a72013-11-03 00:41:00 +01005012fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005013ac_fn_c_check_header_compile "$LINENO" "AvailabilityMacros.h" "ac_cv_header_AvailabilityMacros_h" "$ac_includes_default"
5014if test "x$ac_cv_header_AvailabilityMacros_h" = xyes
5015then :
5016 printf "%s\n" "#define HAVE_AVAILABILITYMACROS_H 1" >>confdefs.h
Bram Moolenaar39766a72013-11-03 00:41:00 +01005017
Illia Bobyra96d5442023-08-30 16:30:15 +02005018fi
Bram Moolenaar39766a72013-11-03 00:41:00 +01005019
Evan Miller25448072022-12-30 10:42:23 +00005020# 10.5 and earlier lack dispatch
Illia Bobyra96d5442023-08-30 16:30:15 +02005021ac_fn_c_check_header_compile "$LINENO" "dispatch/dispatch.h" "ac_cv_header_dispatch_dispatch_h" "$ac_includes_default"
5022if test "x$ac_cv_header_dispatch_dispatch_h" = xyes
5023then :
5024 printf "%s\n" "#define HAVE_DISPATCH_DISPATCH_H 1" >>confdefs.h
Evan Miller25448072022-12-30 10:42:23 +00005025
5026fi
5027
Bram Moolenaar39766a72013-11-03 00:41:00 +01005028
Bram Moolenaar071d4272004-06-13 20:20:40 +00005029
5030
5031
Bram Moolenaar446cb832008-06-24 21:56:24 +00005032if test "$cross_compiling" = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005033 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-local-dir argument" >&5
5034printf %s "checking --with-local-dir argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005035 have_local_include=''
5036 have_local_lib=''
Bram Moolenaarc236c162008-07-13 17:41:49 +00005037
5038# Check whether --with-local-dir was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005039if test ${with_local_dir+y}
5040then :
Bram Moolenaarc236c162008-07-13 17:41:49 +00005041 withval=$with_local_dir;
5042 local_dir="$withval"
5043 case "$withval" in
5044 */*) ;;
5045 no)
5046 # avoid adding local dir to LDFLAGS and CPPFLAGS
Bram Moolenaare06c1882010-07-21 22:05:20 +02005047 have_local_include=yes
Bram Moolenaarc236c162008-07-13 17:41:49 +00005048 have_local_lib=yes
5049 ;;
Bram Moolenaar7db77842014-03-27 17:40:59 +01005050 *) as_fn_error $? "must pass path argument to --with-local-dir" "$LINENO" 5 ;;
Bram Moolenaarc236c162008-07-13 17:41:49 +00005051 esac
Illia Bobyra96d5442023-08-30 16:30:15 +02005052 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $local_dir" >&5
5053printf "%s\n" "$local_dir" >&6; }
Bram Moolenaarc236c162008-07-13 17:41:49 +00005054
Illia Bobyra96d5442023-08-30 16:30:15 +02005055else $as_nop
Bram Moolenaarc236c162008-07-13 17:41:49 +00005056
5057 local_dir=/usr/local
Illia Bobyra96d5442023-08-30 16:30:15 +02005058 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to $local_dir" >&5
5059printf "%s\n" "Defaulting to $local_dir" >&6; }
Bram Moolenaarc236c162008-07-13 17:41:49 +00005060
5061fi
5062
5063 if test "$GCC" = yes -a "$local_dir" != no; then
Bram Moolenaar446cb832008-06-24 21:56:24 +00005064 echo 'void f(){}' > conftest.c
Bram Moolenaar0958e0f2013-11-04 04:57:50 +01005065 have_local_include=`${CC-cc} -c -v conftest.c 2>&1 | grep "${local_dir}/include"`
Bram Moolenaarc236c162008-07-13 17:41:49 +00005066 have_local_lib=`${CC-cc} -c -v conftest.c 2>&1 | grep "${local_dir}/lib"`
Bram Moolenaar446cb832008-06-24 21:56:24 +00005067 rm -f conftest.c conftest.o
Bram Moolenaar071d4272004-06-13 20:20:40 +00005068 fi
Bram Moolenaarc236c162008-07-13 17:41:49 +00005069 if test -z "$have_local_lib" -a -d "${local_dir}/lib"; then
5070 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 +00005071 if test "$tt" = "$LDFLAGS"; then
Bram Moolenaarc236c162008-07-13 17:41:49 +00005072 LDFLAGS="$LDFLAGS -L${local_dir}/lib"
Bram Moolenaar446cb832008-06-24 21:56:24 +00005073 fi
5074 fi
Bram Moolenaarc236c162008-07-13 17:41:49 +00005075 if test -z "$have_local_include" -a -d "${local_dir}/include"; then
5076 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 +00005077 if test "$tt" = "$CPPFLAGS"; then
Bram Moolenaarc236c162008-07-13 17:41:49 +00005078 CPPFLAGS="$CPPFLAGS -I${local_dir}/include"
Bram Moolenaar446cb832008-06-24 21:56:24 +00005079 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005080 fi
5081fi
5082
Illia Bobyra96d5442023-08-30 16:30:15 +02005083{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-vim-name argument" >&5
5084printf %s "checking --with-vim-name argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005085
Bram Moolenaar446cb832008-06-24 21:56:24 +00005086# Check whether --with-vim-name was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005087if test ${with_vim_name+y}
5088then :
5089 withval=$with_vim_name; VIMNAME="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $VIMNAME" >&5
5090printf "%s\n" "$VIMNAME" >&6; }
5091else $as_nop
5092 VIMNAME="vim"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to $VIMNAME" >&5
5093printf "%s\n" "Defaulting to $VIMNAME" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005094fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005095
5096
Illia Bobyra96d5442023-08-30 16:30:15 +02005097{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-ex-name argument" >&5
5098printf %s "checking --with-ex-name argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005099
5100# Check whether --with-ex-name was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005101if test ${with_ex_name+y}
5102then :
5103 withval=$with_ex_name; EXNAME="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $EXNAME" >&5
5104printf "%s\n" "$EXNAME" >&6; }
5105else $as_nop
5106 EXNAME="ex"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to ex" >&5
5107printf "%s\n" "Defaulting to ex" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005108fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005109
5110
Illia Bobyra96d5442023-08-30 16:30:15 +02005111{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-view-name argument" >&5
5112printf %s "checking --with-view-name argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005113
5114# Check whether --with-view-name was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005115if test ${with_view_name+y}
5116then :
5117 withval=$with_view_name; VIEWNAME="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $VIEWNAME" >&5
5118printf "%s\n" "$VIEWNAME" >&6; }
5119else $as_nop
5120 VIEWNAME="view"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to view" >&5
5121printf "%s\n" "Defaulting to view" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005122fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005123
5124
5125
Illia Bobyra96d5442023-08-30 16:30:15 +02005126{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-global-runtime argument" >&5
5127printf %s "checking --with-global-runtime argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005128
5129# Check whether --with-global-runtime was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005130if test ${with_global_runtime+y}
5131then :
5132 withval=$with_global_runtime; RUNTIME_GLOBAL="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
5133printf "%s\n" "$withval" >&6; }
5134else $as_nop
5135 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5136printf "%s\n" "no" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005137fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005138
5139
Bram Moolenaar9d302ad2018-12-21 11:48:51 +01005140if test "X$RUNTIME_GLOBAL" != "X"; then
5141 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 +02005142 printf "%s\n" "#define RUNTIME_GLOBAL \"$RUNTIME_GLOBAL\"" >>confdefs.h
Bram Moolenaar9d302ad2018-12-21 11:48:51 +01005143
Illia Bobyra96d5442023-08-30 16:30:15 +02005144 printf "%s\n" "#define RUNTIME_GLOBAL_AFTER \"$RUNTIME_GLOBAL_AFTER\"" >>confdefs.h
Bram Moolenaar9d302ad2018-12-21 11:48:51 +01005145
5146fi
5147
Illia Bobyra96d5442023-08-30 16:30:15 +02005148{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-modified-by argument" >&5
5149printf %s "checking --with-modified-by argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005150
5151# Check whether --with-modified-by was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005152if test ${with_modified_by+y}
5153then :
5154 withval=$with_modified_by; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
5155printf "%s\n" "$withval" >&6; }; printf "%s\n" "#define MODIFIED_BY \"$withval\"" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00005156
Illia Bobyra96d5442023-08-30 16:30:15 +02005157else $as_nop
5158 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5159printf "%s\n" "no" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005160fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005161
Bram Moolenaar446cb832008-06-24 21:56:24 +00005162
Illia Bobyra96d5442023-08-30 16:30:15 +02005163{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if character set is EBCDIC" >&5
5164printf %s "checking if character set is EBCDIC... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02005165cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005166/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00005167
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005168int
Illia Bobyra96d5442023-08-30 16:30:15 +02005169main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005170{
Bram Moolenaar071d4272004-06-13 20:20:40 +00005171 /* TryCompile function for CharSet.
5172 Treat any failure as ASCII for compatibility with existing art.
5173 Use compile-time rather than run-time tests for cross-compiler
5174 tolerance. */
5175#if '0'!=240
5176make an error "Character set is not EBCDIC"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005177#endif
5178 ;
5179 return 0;
5180}
5181_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02005182if ac_fn_c_try_compile "$LINENO"
5183then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00005184 # TryCompile action if true
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005185cf_cv_ebcdic=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02005186else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02005187 # TryCompile action if false
Bram Moolenaar071d4272004-06-13 20:20:40 +00005188cf_cv_ebcdic=no
5189fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005190rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +00005191# end of TryCompile ])
5192# end of CacheVal CvEbcdic
Illia Bobyra96d5442023-08-30 16:30:15 +02005193{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cf_cv_ebcdic" >&5
5194printf "%s\n" "$cf_cv_ebcdic" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00005195case "$cf_cv_ebcdic" in #(vi
Illia Bobyra96d5442023-08-30 16:30:15 +02005196 yes) printf "%s\n" "#define EBCDIC 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00005197
5198 line_break='"\\n"'
5199 ;;
5200 *) line_break='"\\012"';;
5201esac
5202
5203
5204if test "$cf_cv_ebcdic" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005205{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for z/OS Unix" >&5
5206printf %s "checking for z/OS Unix... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00005207case $vim_cv_uname_output in
Bram Moolenaar2c704a72010-06-03 21:17:25 +02005208 OS/390) zOSUnix="yes";
Bram Moolenaar071d4272004-06-13 20:20:40 +00005209 if test "$CC" = "cc"; then
5210 ccm="$_CC_CCMODE"
5211 ccn="CC"
5212 else
5213 if test "$CC" = "c89"; then
5214 ccm="$_CC_C89MODE"
5215 ccn="C89"
5216 else
5217 ccm=1
5218 fi
5219 fi
5220 if test "$ccm" != "1"; then
5221 echo ""
5222 echo "------------------------------------------"
Bram Moolenaar2c704a72010-06-03 21:17:25 +02005223 echo " On z/OS Unix, the environment variable"
Bram Moolenaar77c19352012-06-13 19:19:41 +02005224 echo " _CC_${ccn}MODE must be set to \"1\"!"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005225 echo " Do:"
5226 echo " export _CC_${ccn}MODE=1"
5227 echo " and then call configure again."
5228 echo "------------------------------------------"
5229 exit 1
5230 fi
Bram Moolenaar77c19352012-06-13 19:19:41 +02005231 # Set CFLAGS for configure process.
5232 # This will be reset later for config.mk.
5233 # Use haltonmsg to force error for missing H files.
5234 CFLAGS="$CFLAGS -D_ALL_SOURCE -Wc,float(ieee),haltonmsg(3296)";
5235 LDFLAGS="$LDFLAGS -Wl,EDIT=NO"
Illia Bobyra96d5442023-08-30 16:30:15 +02005236 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5237printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00005238 ;;
Bram Moolenaar2c704a72010-06-03 21:17:25 +02005239 *) zOSUnix="no";
Illia Bobyra96d5442023-08-30 16:30:15 +02005240 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5241printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00005242 ;;
5243esac
5244fi
5245
Bram Moolenaar2c704a72010-06-03 21:17:25 +02005246if test "$zOSUnix" = "yes"; then
Bram Moolenaarabcbb0e2020-12-23 12:33:42 +01005247 QUOTESED="sed -e 's/[\\\\\"]/\\\\\\\\&/g' -e 's/\\\\\\\\\"/\"/' -e 's/\\\\\\\\\";\$\$/\";/' -e 's/ */ /g'"
Bram Moolenaar2c704a72010-06-03 21:17:25 +02005248else
Bram Moolenaarabcbb0e2020-12-23 12:33:42 +01005249 QUOTESED="sed -e 's/[\\\\\"]/\\\\&/g' -e 's/\\\\\"/\"/' -e 's/\\\\\";\$\$/\";/' -e 's/ */ /g'"
Bram Moolenaar2c704a72010-06-03 21:17:25 +02005250fi
5251
5252
5253
Illia Bobyra96d5442023-08-30 16:30:15 +02005254{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-smack argument" >&5
5255printf %s "checking --disable-smack argument... " >&6; }
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005256# Check whether --enable-smack was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005257if test ${enable_smack+y}
5258then :
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005259 enableval=$enable_smack;
Illia Bobyra96d5442023-08-30 16:30:15 +02005260else $as_nop
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005261 enable_smack="yes"
5262fi
5263
5264if test "$enable_smack" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005265 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5266printf "%s\n" "no" >&6; }
5267 ac_fn_c_check_header_compile "$LINENO" "linux/xattr.h" "ac_cv_header_linux_xattr_h" "$ac_includes_default"
5268if test "x$ac_cv_header_linux_xattr_h" = xyes
5269then :
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005270 true
Illia Bobyra96d5442023-08-30 16:30:15 +02005271else $as_nop
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005272 enable_smack="no"
5273fi
5274
Bram Moolenaar4ed89cd2014-04-05 12:02:25 +02005275else
Illia Bobyra96d5442023-08-30 16:30:15 +02005276 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5277printf "%s\n" "yes" >&6; }
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005278fi
5279if test "$enable_smack" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005280 ac_fn_c_check_header_compile "$LINENO" "attr/xattr.h" "ac_cv_header_attr_xattr_h" "$ac_includes_default"
5281if test "x$ac_cv_header_attr_xattr_h" = xyes
5282then :
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005283 true
Illia Bobyra96d5442023-08-30 16:30:15 +02005284else $as_nop
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005285 enable_smack="no"
5286fi
5287
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005288fi
5289if test "$enable_smack" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005290 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XATTR_NAME_SMACKEXEC in linux/xattr.h" >&5
5291printf %s "checking for XATTR_NAME_SMACKEXEC in linux/xattr.h... " >&6; }
5292
5293cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005294/* end confdefs.h. */
5295#include <linux/xattr.h>
5296_ACEOF
5297if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Illia Bobyra96d5442023-08-30 16:30:15 +02005298 $EGREP "XATTR_NAME_SMACKEXEC" >/dev/null 2>&1
5299then :
5300 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5301printf "%s\n" "yes" >&6; }
5302else $as_nop
5303 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5304printf "%s\n" "no" >&6; }; enable_smack="no"
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005305fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005306rm -rf conftest*
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005307
5308fi
5309if test "$enable_smack" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005310 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for setxattr in -lattr" >&5
5311printf %s "checking for setxattr in -lattr... " >&6; }
5312if test ${ac_cv_lib_attr_setxattr+y}
5313then :
5314 printf %s "(cached) " >&6
5315else $as_nop
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005316 ac_check_lib_save_LIBS=$LIBS
5317LIBS="-lattr $LIBS"
5318cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5319/* end confdefs.h. */
5320
5321/* Override any GCC internal prototype to avoid an error.
5322 Use char because int might match the return type of a GCC
5323 builtin and then its argument prototype would still apply. */
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005324char setxattr ();
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005325int
Illia Bobyra96d5442023-08-30 16:30:15 +02005326main (void)
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005327{
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005328return setxattr ();
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005329 ;
5330 return 0;
5331}
5332_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02005333if ac_fn_c_try_link "$LINENO"
5334then :
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005335 ac_cv_lib_attr_setxattr=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02005336else $as_nop
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005337 ac_cv_lib_attr_setxattr=no
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005338fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005339rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005340 conftest$ac_exeext conftest.$ac_ext
5341LIBS=$ac_check_lib_save_LIBS
5342fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005343{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_attr_setxattr" >&5
5344printf "%s\n" "$ac_cv_lib_attr_setxattr" >&6; }
5345if test "x$ac_cv_lib_attr_setxattr" = xyes
5346then :
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005347 LIBS="$LIBS -lattr"
5348 found_smack="yes"
Illia Bobyra96d5442023-08-30 16:30:15 +02005349 printf "%s\n" "#define HAVE_SMACK 1" >>confdefs.h
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005350
5351fi
5352
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005353fi
5354
5355if test "x$found_smack" = "x"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005356 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-selinux argument" >&5
5357printf %s "checking --disable-selinux argument... " >&6; }
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005358 # Check whether --enable-selinux was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005359if test ${enable_selinux+y}
5360then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00005361 enableval=$enable_selinux;
Illia Bobyra96d5442023-08-30 16:30:15 +02005362else $as_nop
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005363 enable_selinux="yes"
Bram Moolenaar446cb832008-06-24 21:56:24 +00005364fi
5365
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005366 if test "$enable_selinux" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005367 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5368printf "%s\n" "no" >&6; }
5369 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for is_selinux_enabled in -lselinux" >&5
5370printf %s "checking for is_selinux_enabled in -lselinux... " >&6; }
5371if test ${ac_cv_lib_selinux_is_selinux_enabled+y}
5372then :
5373 printf %s "(cached) " >&6
5374else $as_nop
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005375 ac_check_lib_save_LIBS=$LIBS
5376LIBS="-lselinux $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02005377cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005378/* end confdefs.h. */
5379
Bram Moolenaar446cb832008-06-24 21:56:24 +00005380/* Override any GCC internal prototype to avoid an error.
5381 Use char because int might match the return type of a GCC
5382 builtin and then its argument prototype would still apply. */
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005383char is_selinux_enabled ();
5384int
Illia Bobyra96d5442023-08-30 16:30:15 +02005385main (void)
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005386{
Bram Moolenaar446cb832008-06-24 21:56:24 +00005387return is_selinux_enabled ();
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005388 ;
5389 return 0;
5390}
5391_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02005392if ac_fn_c_try_link "$LINENO"
5393then :
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005394 ac_cv_lib_selinux_is_selinux_enabled=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02005395else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02005396 ac_cv_lib_selinux_is_selinux_enabled=no
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005397fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005398rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02005399 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005400LIBS=$ac_check_lib_save_LIBS
5401fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005402{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_is_selinux_enabled" >&5
5403printf "%s\n" "$ac_cv_lib_selinux_is_selinux_enabled" >&6; }
5404if test "x$ac_cv_lib_selinux_is_selinux_enabled" = xyes
5405then :
5406 ac_fn_c_check_header_compile "$LINENO" "selinux/selinux.h" "ac_cv_header_selinux_selinux_h" "$ac_includes_default"
5407if test "x$ac_cv_header_selinux_selinux_h" = xyes
5408then :
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005409 LIBS="$LIBS -lselinux"
Illia Bobyra96d5442023-08-30 16:30:15 +02005410 printf "%s\n" "#define HAVE_SELINUX 1" >>confdefs.h
Bram Moolenaare4b78e22017-12-07 22:29:11 +01005411
5412fi
5413
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005414fi
5415
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005416 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005417 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5418printf "%s\n" "yes" >&6; }
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005419 fi
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005420fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005421
5422
Illia Bobyra96d5442023-08-30 16:30:15 +02005423{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-features argument" >&5
5424printf %s "checking --with-features argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005425
Bram Moolenaar446cb832008-06-24 21:56:24 +00005426# Check whether --with-features was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005427if test ${with_features+y}
5428then :
5429 withval=$with_features; features="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $features" >&5
5430printf "%s\n" "$features" >&6; }
5431else $as_nop
5432 features="huge"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to huge" >&5
5433printf "%s\n" "Defaulting to huge" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005434fi
5435
Bram Moolenaar071d4272004-06-13 20:20:40 +00005436
Martin Tournoij7904fa42022-10-04 16:28:45 +01005437case "$features" in
Martin Tournoij25f3a142022-10-08 19:26:41 +01005438 small) features="tiny" ;;
5439 big) features="normal" ;;
Martin Tournoij7904fa42022-10-04 16:28:45 +01005440esac
5441
Bram Moolenaar071d4272004-06-13 20:20:40 +00005442dovimdiff=""
5443dogvimdiff=""
5444case "$features" in
Illia Bobyra96d5442023-08-30 16:30:15 +02005445 tiny) printf "%s\n" "#define FEAT_TINY 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00005446 ;;
Illia Bobyra96d5442023-08-30 16:30:15 +02005447 normal) printf "%s\n" "#define FEAT_NORMAL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00005448 dovimdiff="installvimdiff";
5449 dogvimdiff="installgvimdiff" ;;
Illia Bobyra96d5442023-08-30 16:30:15 +02005450 huge) printf "%s\n" "#define FEAT_HUGE 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00005451 dovimdiff="installvimdiff";
5452 dogvimdiff="installgvimdiff" ;;
Illia Bobyra96d5442023-08-30 16:30:15 +02005453 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Sorry, $features is not supported" >&5
5454printf "%s\n" "Sorry, $features is not supported" >&6; } ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00005455esac
5456
5457
5458
5459
Martin Tournoij7904fa42022-10-04 16:28:45 +01005460if test "x$features" = "xtiny"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00005461 has_eval=no
5462else
5463 has_eval=yes
5464fi
5465
Illia Bobyra96d5442023-08-30 16:30:15 +02005466{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-compiledby argument" >&5
5467printf %s "checking --with-compiledby argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005468
Bram Moolenaar446cb832008-06-24 21:56:24 +00005469# Check whether --with-compiledby was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005470if test ${with_compiledby+y}
5471then :
5472 withval=$with_compiledby; compiledby="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
5473printf "%s\n" "$withval" >&6; }
5474else $as_nop
5475 compiledby=""; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5476printf "%s\n" "no" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005477fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005478
5479
Bram Moolenaar446cb832008-06-24 21:56:24 +00005480
Illia Bobyra96d5442023-08-30 16:30:15 +02005481{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-xsmp argument" >&5
5482printf %s "checking --disable-xsmp argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005483# Check whether --enable-xsmp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005484if test ${enable_xsmp+y}
5485then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00005486 enableval=$enable_xsmp;
Illia Bobyra96d5442023-08-30 16:30:15 +02005487else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00005488 enable_xsmp="yes"
Bram Moolenaar446cb832008-06-24 21:56:24 +00005489fi
5490
Bram Moolenaar071d4272004-06-13 20:20:40 +00005491
5492if test "$enable_xsmp" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005493 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5494printf "%s\n" "no" >&6; }
5495 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-xsmp-interact argument" >&5
5496printf %s "checking --disable-xsmp-interact argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005497 # Check whether --enable-xsmp-interact was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005498if test ${enable_xsmp_interact+y}
5499then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00005500 enableval=$enable_xsmp_interact;
Illia Bobyra96d5442023-08-30 16:30:15 +02005501else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00005502 enable_xsmp_interact="yes"
Bram Moolenaar446cb832008-06-24 21:56:24 +00005503fi
5504
Bram Moolenaar071d4272004-06-13 20:20:40 +00005505 if test "$enable_xsmp_interact" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005506 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5507printf "%s\n" "no" >&6; }
5508 printf "%s\n" "#define USE_XSMP_INTERACT 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00005509
5510 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005511 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5512printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00005513 fi
5514else
Illia Bobyra96d5442023-08-30 16:30:15 +02005515 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5516printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00005517fi
5518
Illia Bobyra96d5442023-08-30 16:30:15 +02005519{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking diff feature" >&5
5520printf %s "checking diff feature... " >&6; }
Martin Tournoij7904fa42022-10-04 16:28:45 +01005521if test "x$features" = "xtiny"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005522 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: disabled in $features version" >&5
5523printf "%s\n" "disabled in $features version" >&6; }
Bram Moolenaar67ffb412022-01-08 13:36:57 +00005524else
Illia Bobyra96d5442023-08-30 16:30:15 +02005525 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: enabled" >&5
5526printf "%s\n" "enabled" >&6; }
5527 printf "%s\n" "#define FEAT_DIFF 1" >>confdefs.h
Bram Moolenaar67ffb412022-01-08 13:36:57 +00005528
5529 XDIFF_OBJS_USED="\$(XDIFF_OBJS)"
5530
5531fi
5532
Illia Bobyra96d5442023-08-30 16:30:15 +02005533{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-luainterp argument" >&5
5534printf %s "checking --enable-luainterp argument... " >&6; }
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005535# Check whether --enable-luainterp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005536if test ${enable_luainterp+y}
5537then :
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005538 enableval=$enable_luainterp;
Illia Bobyra96d5442023-08-30 16:30:15 +02005539else $as_nop
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005540 enable_luainterp="no"
5541fi
5542
Illia Bobyra96d5442023-08-30 16:30:15 +02005543{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_luainterp" >&5
5544printf "%s\n" "$enable_luainterp" >&6; }
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005545
Bram Moolenaar2334b6d2010-07-22 21:32:16 +02005546if test "$enable_luainterp" = "yes" -o "$enable_luainterp" = "dynamic"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00005547 if test "$has_eval" = "no"; then
Martin Tournoij7904fa42022-10-04 16:28:45 +01005548 as_fn_error $? "cannot use Lua with tiny features" "$LINENO" 5
Bram Moolenaar3c124e32016-01-31 14:36:58 +01005549 fi
5550
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005551
5552
Illia Bobyra96d5442023-08-30 16:30:15 +02005553 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-lua-prefix argument" >&5
5554printf %s "checking --with-lua-prefix argument... " >&6; }
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005555
5556# Check whether --with-lua_prefix was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005557if test ${with_lua_prefix+y}
5558then :
5559 withval=$with_lua_prefix; with_lua_prefix="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_lua_prefix" >&5
5560printf "%s\n" "$with_lua_prefix" >&6; }
5561else $as_nop
5562 with_lua_prefix="";{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5563printf "%s\n" "no" >&6; }
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005564fi
5565
5566
5567 if test "X$with_lua_prefix" != "X"; then
5568 vi_cv_path_lua_pfx="$with_lua_prefix"
5569 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005570 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking LUA_PREFIX environment var" >&5
5571printf %s "checking LUA_PREFIX environment var... " >&6; }
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005572 if test "X$LUA_PREFIX" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005573 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: \"$LUA_PREFIX\"" >&5
5574printf "%s\n" "\"$LUA_PREFIX\"" >&6; }
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005575 vi_cv_path_lua_pfx="$LUA_PREFIX"
5576 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005577 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not set, default to /usr" >&5
5578printf "%s\n" "not set, default to /usr" >&6; }
Bram Moolenaar0d2e4fc2010-07-18 12:35:47 +02005579 vi_cv_path_lua_pfx="/usr"
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005580 fi
5581 fi
5582
Illia Bobyra96d5442023-08-30 16:30:15 +02005583 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-luajit" >&5
5584printf %s "checking --with-luajit... " >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005585
5586# Check whether --with-luajit was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005587if test ${with_luajit+y}
5588then :
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005589 withval=$with_luajit; vi_cv_with_luajit="$withval"
Illia Bobyra96d5442023-08-30 16:30:15 +02005590else $as_nop
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005591 vi_cv_with_luajit="no"
5592fi
5593
Illia Bobyra96d5442023-08-30 16:30:15 +02005594 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_with_luajit" >&5
5595printf "%s\n" "$vi_cv_with_luajit" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005596
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005597 LUA_INC=
5598 if test "X$vi_cv_path_lua_pfx" != "X"; then
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005599 if test "x$vi_cv_with_luajit" != "xno"; then
5600 # Extract the first word of "luajit", so it can be a program name with args.
5601set dummy luajit; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02005602{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5603printf %s "checking for $ac_word... " >&6; }
5604if test ${ac_cv_path_vi_cv_path_luajit+y}
5605then :
5606 printf %s "(cached) " >&6
5607else $as_nop
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005608 case $vi_cv_path_luajit in
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005609 [\\/]* | ?:[\\/]*)
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005610 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 +02005611 ;;
5612 *)
5613 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5614for as_dir in $PATH
5615do
5616 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02005617 case $as_dir in #(((
5618 '') as_dir=./ ;;
5619 */) ;;
5620 *) as_dir=$as_dir/ ;;
5621 esac
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005622 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02005623 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5624 ac_cv_path_vi_cv_path_luajit="$as_dir$ac_word$ac_exec_ext"
5625 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005626 break 2
5627 fi
5628done
5629 done
5630IFS=$as_save_IFS
5631
5632 ;;
5633esac
5634fi
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005635vi_cv_path_luajit=$ac_cv_path_vi_cv_path_luajit
5636if test -n "$vi_cv_path_luajit"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005637 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_luajit" >&5
5638printf "%s\n" "$vi_cv_path_luajit" >&6; }
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005639else
Illia Bobyra96d5442023-08-30 16:30:15 +02005640 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5641printf "%s\n" "no" >&6; }
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005642fi
5643
5644
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005645 if test "X$vi_cv_path_luajit" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005646 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking LuaJIT version" >&5
5647printf %s "checking LuaJIT version... " >&6; }
5648if test ${vi_cv_version_luajit+y}
5649then :
5650 printf %s "(cached) " >&6
5651else $as_nop
ichizokbddc6ad2023-08-29 20:54:32 +02005652 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 +02005653fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005654{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_version_luajit" >&5
5655printf "%s\n" "$vi_cv_version_luajit" >&6; }
5656 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Lua version of LuaJIT" >&5
5657printf %s "checking Lua version of LuaJIT... " >&6; }
5658if test ${vi_cv_version_lua_luajit+y}
5659then :
5660 printf %s "(cached) " >&6
5661else $as_nop
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005662 vi_cv_version_lua_luajit=`${vi_cv_path_luajit} -e "print(_VERSION)" | sed 's/.* //'`
5663fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005664{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_version_lua_luajit" >&5
5665printf "%s\n" "$vi_cv_version_lua_luajit" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005666 vi_cv_path_lua="$vi_cv_path_luajit"
5667 vi_cv_version_lua="$vi_cv_version_lua_luajit"
5668 fi
Bram Moolenaar1e91f262012-10-03 14:48:08 +02005669 else
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005670 # Extract the first word of "lua", so it can be a program name with args.
5671set dummy lua; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02005672{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5673printf %s "checking for $ac_word... " >&6; }
5674if test ${ac_cv_path_vi_cv_path_plain_lua+y}
5675then :
5676 printf %s "(cached) " >&6
5677else $as_nop
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005678 case $vi_cv_path_plain_lua in
5679 [\\/]* | ?:[\\/]*)
5680 ac_cv_path_vi_cv_path_plain_lua="$vi_cv_path_plain_lua" # Let the user override the test with a path.
5681 ;;
5682 *)
5683 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5684for as_dir in $PATH
5685do
5686 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02005687 case $as_dir in #(((
5688 '') as_dir=./ ;;
5689 */) ;;
5690 *) as_dir=$as_dir/ ;;
5691 esac
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005692 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02005693 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5694 ac_cv_path_vi_cv_path_plain_lua="$as_dir$ac_word$ac_exec_ext"
5695 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005696 break 2
5697 fi
5698done
5699 done
5700IFS=$as_save_IFS
5701
5702 ;;
5703esac
5704fi
5705vi_cv_path_plain_lua=$ac_cv_path_vi_cv_path_plain_lua
5706if test -n "$vi_cv_path_plain_lua"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005707 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_plain_lua" >&5
5708printf "%s\n" "$vi_cv_path_plain_lua" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005709else
Illia Bobyra96d5442023-08-30 16:30:15 +02005710 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5711printf "%s\n" "no" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005712fi
5713
5714
5715 if test "X$vi_cv_path_plain_lua" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005716 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Lua version" >&5
5717printf %s "checking Lua version... " >&6; }
5718if test ${vi_cv_version_plain_lua+y}
5719then :
5720 printf %s "(cached) " >&6
5721else $as_nop
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005722 vi_cv_version_plain_lua=`${vi_cv_path_plain_lua} -e "print(_VERSION)" | sed 's/.* //'`
5723fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005724{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_version_plain_lua" >&5
5725printf "%s\n" "$vi_cv_version_plain_lua" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005726 fi
5727 vi_cv_path_lua="$vi_cv_path_plain_lua"
5728 vi_cv_version_lua="$vi_cv_version_plain_lua"
5729 fi
5730 if test "x$vi_cv_with_luajit" != "xno" && test "X$vi_cv_version_luajit" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005731 { 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
5732printf %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 +01005733 if test -f "$vi_cv_path_lua_pfx/include/luajit-$vi_cv_version_luajit/lua.h"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005734 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5735printf "%s\n" "yes" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005736 LUA_INC=/luajit-$vi_cv_version_luajit
5737 fi
5738 fi
5739 if test "X$LUA_INC" = "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005740 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if lua.h can be found in $vi_cv_path_lua_pfx/include" >&5
5741printf %s "checking if lua.h can be found in $vi_cv_path_lua_pfx/include... " >&6; }
Bram Moolenaar49222be2015-12-11 18:11:30 +01005742 if test -f "$vi_cv_path_lua_pfx/include/lua.h"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005743 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5744printf "%s\n" "yes" >&6; }
Bram Moolenaar1e91f262012-10-03 14:48:08 +02005745 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005746 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5747printf "%s\n" "no" >&6; }
5748 { 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
5749printf %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 +01005750 if test -f "$vi_cv_path_lua_pfx/include/lua$vi_cv_version_lua/lua.h"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005751 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5752printf "%s\n" "yes" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005753 LUA_INC=/lua$vi_cv_version_lua
5754 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005755 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5756printf "%s\n" "no" >&6; }
Bram Moolenaarf49e5642020-04-19 17:46:53 +02005757
5758 # Detect moonjit:
5759 # https://groups.google.com/forum/#!topic/vim_use/O0vek60WuTk
5760 lua_suf=/moonjit-2.3
5761 inc_path="$vi_cv_path_lua_pfx/include"
Bram Moolenaarad4dc832020-04-20 16:21:53 +02005762 for dir in "$inc_path"/moonjit-[0-9]* ; do
Bram Moolenaarf49e5642020-04-19 17:46:53 +02005763 if test -d "$dir" ; then
Bram Moolenaara79a8942020-12-17 20:50:25 +01005764 lua_suf=`basename "$dir"`
Bram Moolenaarf49e5642020-04-19 17:46:53 +02005765 lua_suf="/$lua_suf"
5766 break
5767 fi
5768 done
Illia Bobyra96d5442023-08-30 16:30:15 +02005769 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if lua.h can be found in $inc_path$lua_suf" >&5
5770printf %s "checking if lua.h can be found in $inc_path$lua_suf... " >&6; }
Bram Moolenaarf49e5642020-04-19 17:46:53 +02005771 if test -f "$inc_path$lua_suf/lua.h"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005772 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5773printf "%s\n" "yes" >&6; }
Bram Moolenaarf49e5642020-04-19 17:46:53 +02005774 LUA_INC=$lua_suf
5775 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; }
Bram Moolenaarf49e5642020-04-19 17:46:53 +02005778 vi_cv_path_lua_pfx=
5779 fi
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005780 fi
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005781 fi
5782 fi
5783 fi
5784
5785 if test "X$vi_cv_path_lua_pfx" != "X"; then
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005786 if test "x$vi_cv_with_luajit" != "xno"; then
5787 multiarch=`dpkg-architecture -qDEB_HOST_MULTIARCH 2> /dev/null`
5788 if test "X$multiarch" != "X"; then
5789 lib_multiarch="lib/${multiarch}"
5790 else
5791 lib_multiarch="lib"
5792 fi
5793 if test "X$vi_cv_version_lua" = "X"; then
5794 LUA_LIBS="-L${vi_cv_path_lua_pfx}/${lib_multiarch} -lluajit"
5795 else
5796 LUA_LIBS="-L${vi_cv_path_lua_pfx}/${lib_multiarch} -lluajit-$vi_cv_version_lua"
5797 fi
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005798 else
Bram Moolenaar869113f2023-03-31 21:29:00 +01005799 if test -d "${vi_cv_path_lua_pfx}/lib/lua$vi_cv_version_lua"; then
5800 LUALIBDIR="lib/lua$vi_cv_version_lua"
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005801 else
Bram Moolenaar869113f2023-03-31 21:29:00 +01005802 LUALIBDIR=lib
5803 fi
5804 if test "X$LUA_INC" != "X"; then
5805 LUA_LIBS="-L${vi_cv_path_lua_pfx}/${LUALIBDIR} -llua$vi_cv_version_lua"
5806 else
5807 LUA_LIBS="-L${vi_cv_path_lua_pfx}/${LUALIBDIR} -llua"
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005808 fi
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005809 fi
Bram Moolenaar2334b6d2010-07-22 21:32:16 +02005810 if test "$enable_luainterp" = "dynamic"; then
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005811 lua_ok="yes"
5812 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005813 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if link with ${LUA_LIBS} is sane" >&5
5814printf %s "checking if link with ${LUA_LIBS} is sane... " >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005815 libs_save=$LIBS
5816 LIBS="$LIBS $LUA_LIBS"
5817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5818/* end confdefs.h. */
5819
5820int
Illia Bobyra96d5442023-08-30 16:30:15 +02005821main (void)
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005822{
5823
5824 ;
5825 return 0;
5826}
5827_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02005828if ac_fn_c_try_link "$LINENO"
5829then :
5830 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5831printf "%s\n" "yes" >&6; }; lua_ok="yes"
5832else $as_nop
5833 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5834printf "%s\n" "no" >&6; }; lua_ok="no"; LUA_LIBS=""
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005835fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005836rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005837 conftest$ac_exeext conftest.$ac_ext
5838 LIBS=$libs_save
5839 fi
5840 if test "x$lua_ok" = "xyes"; then
5841 LUA_CFLAGS="-I${vi_cv_path_lua_pfx}/include${LUA_INC}"
5842 LUA_SRC="if_lua.c"
5843 LUA_OBJ="objects/if_lua.o"
5844 LUA_PRO="if_lua.pro"
Illia Bobyra96d5442023-08-30 16:30:15 +02005845 printf "%s\n" "#define FEAT_LUA 1" >>confdefs.h
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005846
5847 fi
5848 if test "$enable_luainterp" = "dynamic"; then
5849 if test "x$vi_cv_with_luajit" != "xno"; then
5850 luajit="jit"
5851 fi
Bram Moolenaar1e91f262012-10-03 14:48:08 +02005852 if test -f "${vi_cv_path_lua_pfx}/bin/cyglua-${vi_cv_version_lua}.dll"; then
5853 vi_cv_dll_name_lua="cyglua-${vi_cv_version_lua}.dll"
5854 else
Bram Moolenaard0573012017-10-28 21:11:06 +02005855 if test "x$MACOS_X" = "xyes"; then
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005856 ext="dylib"
5857 indexes=""
5858 else
5859 ext="so"
5860 indexes=".0 .1 .2 .3 .4 .5 .6 .7 .8 .9"
5861 multiarch=`dpkg-architecture -qDEB_HOST_MULTIARCH 2> /dev/null`
5862 if test "X$multiarch" != "X"; then
5863 lib_multiarch="lib/${multiarch}"
5864 fi
Bram Moolenaar768baac2013-04-15 14:44:57 +02005865 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005866 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if liblua${luajit}*.${ext}* can be found in $vi_cv_path_lua_pfx" >&5
5867printf %s "checking if liblua${luajit}*.${ext}* can be found in $vi_cv_path_lua_pfx... " >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005868 for subdir in "${lib_multiarch}" lib64 lib; do
Bram Moolenaar768baac2013-04-15 14:44:57 +02005869 if test -z "$subdir"; then
5870 continue
5871 fi
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005872 for sover in "${vi_cv_version_lua}.${ext}" "-${vi_cv_version_lua}.${ext}" \
5873 ".${vi_cv_version_lua}.${ext}" ".${ext}.${vi_cv_version_lua}"; do
5874 for i in $indexes ""; do
5875 if test -f "${vi_cv_path_lua_pfx}/${subdir}/liblua${luajit}${sover}$i"; then
Bram Moolenaar768baac2013-04-15 14:44:57 +02005876 sover2="$i"
5877 break 3
5878 fi
5879 done
Bram Moolenaar07e1da62013-02-06 19:49:43 +01005880 done
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005881 sover=""
Bram Moolenaar1e91f262012-10-03 14:48:08 +02005882 done
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005883 if test "X$sover" = "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005884 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5885printf "%s\n" "no" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005886 lua_ok="no"
5887 vi_cv_dll_name_lua="liblua${luajit}.${ext}"
5888 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005889 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5890printf "%s\n" "yes" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005891 lua_ok="yes"
5892 vi_cv_dll_name_lua="liblua${luajit}${sover}$sover2"
5893 fi
Bram Moolenaar1e91f262012-10-03 14:48:08 +02005894 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005895 printf "%s\n" "#define DYNAMIC_LUA 1" >>confdefs.h
Bram Moolenaar2334b6d2010-07-22 21:32:16 +02005896
5897 LUA_LIBS=""
Bram Moolenaar1e91f262012-10-03 14:48:08 +02005898 LUA_CFLAGS="-DDYNAMIC_LUA_DLL=\\\"${vi_cv_dll_name_lua}\\\" $LUA_CFLAGS"
Bram Moolenaar2334b6d2010-07-22 21:32:16 +02005899 fi
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005900 if test "X$LUA_CFLAGS$LUA_LIBS" != "X" && \
Bram Moolenaard0573012017-10-28 21:11:06 +02005901 test "x$MACOS_X" = "xyes" && test "x$vi_cv_with_luajit" != "xno" && \
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00005902 test "$vim_cv_uname_m_output" = "x86_64"; then
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005903 LUA_LIBS="-pagezero_size 10000 -image_base 100000000 $LUA_LIBS"
5904 fi
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005905 fi
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005906 if test "$fail_if_missing" = "yes" -a "$lua_ok" != "yes"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01005907 as_fn_error $? "could not configure lua" "$LINENO" 5
Bram Moolenaarf788a062011-12-14 20:51:25 +01005908 fi
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005909
5910
5911
5912
5913
ichizok8bb3fe42021-12-28 15:51:45 +00005914
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005915fi
5916
5917
Illia Bobyra96d5442023-08-30 16:30:15 +02005918{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-mzschemeinterp argument" >&5
5919printf %s "checking --enable-mzschemeinterp argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005920# Check whether --enable-mzschemeinterp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005921if test ${enable_mzschemeinterp+y}
5922then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00005923 enableval=$enable_mzschemeinterp;
Illia Bobyra96d5442023-08-30 16:30:15 +02005924else $as_nop
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005925 enable_mzschemeinterp="no"
Bram Moolenaar446cb832008-06-24 21:56:24 +00005926fi
5927
Illia Bobyra96d5442023-08-30 16:30:15 +02005928{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_mzschemeinterp" >&5
5929printf "%s\n" "$enable_mzschemeinterp" >&6; }
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005930
5931if test "$enable_mzschemeinterp" = "yes"; then
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005932
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005933
Illia Bobyra96d5442023-08-30 16:30:15 +02005934 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-plthome argument" >&5
5935printf %s "checking --with-plthome argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005936
Bram Moolenaar446cb832008-06-24 21:56:24 +00005937# Check whether --with-plthome was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005938if test ${with_plthome+y}
5939then :
5940 withval=$with_plthome; with_plthome="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_plthome" >&5
5941printf "%s\n" "$with_plthome" >&6; }
5942else $as_nop
5943 with_plthome="";{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: \"no\"" >&5
5944printf "%s\n" "\"no\"" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005945fi
5946
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005947
5948 if test "X$with_plthome" != "X"; then
5949 vi_cv_path_mzscheme_pfx="$with_plthome"
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01005950 vi_cv_path_mzscheme="${vi_cv_path_mzscheme_pfx}/bin/mzscheme"
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005951 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005952 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking PLTHOME environment var" >&5
5953printf %s "checking PLTHOME environment var... " >&6; }
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005954 if test "X$PLTHOME" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005955 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: \"$PLTHOME\"" >&5
5956printf "%s\n" "\"$PLTHOME\"" >&6; }
Bram Moolenaarc9b4b052006-04-30 18:54:39 +00005957 vi_cv_path_mzscheme_pfx="$PLTHOME"
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01005958 vi_cv_path_mzscheme="${vi_cv_path_mzscheme_pfx}/bin/mzscheme"
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005959 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005960 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not set" >&5
5961printf "%s\n" "not set" >&6; }
Bram Moolenaarc9b4b052006-04-30 18:54:39 +00005962 # Extract the first word of "mzscheme", so it can be a program name with args.
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005963set dummy mzscheme; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02005964{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5965printf %s "checking for $ac_word... " >&6; }
5966if test ${ac_cv_path_vi_cv_path_mzscheme+y}
5967then :
5968 printf %s "(cached) " >&6
5969else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005970 case $vi_cv_path_mzscheme in
5971 [\\/]* | ?:[\\/]*)
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005972 ac_cv_path_vi_cv_path_mzscheme="$vi_cv_path_mzscheme" # Let the user override the test with a path.
5973 ;;
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005974 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005975 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5976for as_dir in $PATH
5977do
5978 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02005979 case $as_dir in #(((
5980 '') as_dir=./ ;;
5981 */) ;;
5982 *) as_dir=$as_dir/ ;;
5983 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02005984 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02005985 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5986 ac_cv_path_vi_cv_path_mzscheme="$as_dir$ac_word$ac_exec_ext"
5987 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005988 break 2
5989 fi
5990done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02005991 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00005992IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005993
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005994 ;;
5995esac
5996fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005997vi_cv_path_mzscheme=$ac_cv_path_vi_cv_path_mzscheme
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005998if test -n "$vi_cv_path_mzscheme"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005999 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_mzscheme" >&5
6000printf "%s\n" "$vi_cv_path_mzscheme" >&6; }
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006001else
Illia Bobyra96d5442023-08-30 16:30:15 +02006002 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6003printf "%s\n" "no" >&6; }
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006004fi
6005
6006
Bram Moolenaar446cb832008-06-24 21:56:24 +00006007
Bram Moolenaarc9b4b052006-04-30 18:54:39 +00006008 if test "X$vi_cv_path_mzscheme" != "X"; then
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006009 lsout=`ls -l $vi_cv_path_mzscheme`
6010 if echo "$lsout" | grep -e '->' >/dev/null 2>/dev/null; then
6011 vi_cv_path_mzscheme=`echo "$lsout" | sed 's/.*-> \(.*\)/\1/'`
6012 fi
6013 fi
6014
Bram Moolenaarc9b4b052006-04-30 18:54:39 +00006015 if test "X$vi_cv_path_mzscheme" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006016 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking MzScheme install prefix" >&5
6017printf %s "checking MzScheme install prefix... " >&6; }
6018if test ${vi_cv_path_mzscheme_pfx+y}
6019then :
6020 printf %s "(cached) " >&6
6021else $as_nop
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006022 echo "(display (simplify-path \
Bram Moolenaarc9b4b052006-04-30 18:54:39 +00006023 (build-path (call-with-values \
6024 (lambda () (split-path (find-system-path (quote exec-file)))) \
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006025 (lambda (base name must-be-dir?) base)) (quote up))))" > mzdirs.scm
6026 vi_cv_path_mzscheme_pfx=`${vi_cv_path_mzscheme} -r mzdirs.scm | \
6027 sed -e 's+/$++'`
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006028fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006029{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_mzscheme_pfx" >&5
6030printf "%s\n" "$vi_cv_path_mzscheme_pfx" >&6; }
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006031 rm -f mzdirs.scm
Bram Moolenaarc9b4b052006-04-30 18:54:39 +00006032 fi
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006033 fi
6034 fi
6035
6036 if test "X$vi_cv_path_mzscheme_pfx" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006037 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for racket include directory" >&5
6038printf %s "checking for racket include directory... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006039 SCHEME_INC=`${vi_cv_path_mzscheme} -e '(require setup/dirs)(let ((p (find-include-dir))) (when (path? p) (display p)))'`
6040 if test "X$SCHEME_INC" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006041 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${SCHEME_INC}" >&5
6042printf "%s\n" "${SCHEME_INC}" >&6; }
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006043 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006044 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6045printf "%s\n" "not found" >&6; }
6046 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include" >&5
6047printf %s "checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006048 if test -f "$vi_cv_path_mzscheme_pfx/include/scheme.h"; then
6049 SCHEME_INC=${vi_cv_path_mzscheme_pfx}/include
Illia Bobyra96d5442023-08-30 16:30:15 +02006050 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6051printf "%s\n" "yes" >&6; }
Bram Moolenaarff4a37e2007-05-06 13:18:29 +00006052 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006053 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6054printf "%s\n" "no" >&6; }
6055 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include/plt" >&5
6056printf %s "checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include/plt... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006057 if test -f "$vi_cv_path_mzscheme_pfx/include/plt/scheme.h"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006058 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6059printf "%s\n" "yes" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006060 SCHEME_INC=${vi_cv_path_mzscheme_pfx}/include/plt
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006061 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006062 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6063printf "%s\n" "no" >&6; }
6064 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include/racket" >&5
6065printf %s "checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include/racket... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006066 if test -f "$vi_cv_path_mzscheme_pfx/include/racket/scheme.h"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006067 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6068printf "%s\n" "yes" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006069 SCHEME_INC=${vi_cv_path_mzscheme_pfx}/include/racket
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006070 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006071 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6072printf "%s\n" "no" >&6; }
6073 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in /usr/include/plt/" >&5
6074printf %s "checking if scheme.h can be found in /usr/include/plt/... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006075 if test -f /usr/include/plt/scheme.h; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006076 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6077printf "%s\n" "yes" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006078 SCHEME_INC=/usr/include/plt
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006079 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006080 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6081printf "%s\n" "no" >&6; }
6082 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in /usr/include/racket/" >&5
6083printf %s "checking if scheme.h can be found in /usr/include/racket/... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006084 if test -f /usr/include/racket/scheme.h; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006085 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6086printf "%s\n" "yes" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006087 SCHEME_INC=/usr/include/racket
6088 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006089 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6090printf "%s\n" "no" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006091 vi_cv_path_mzscheme_pfx=
6092 fi
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006093 fi
6094 fi
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006095 fi
Bram Moolenaarff4a37e2007-05-06 13:18:29 +00006096 fi
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006097 fi
6098 fi
6099
6100 if test "X$vi_cv_path_mzscheme_pfx" != "X"; then
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006101
Illia Bobyra96d5442023-08-30 16:30:15 +02006102 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for racket lib directory" >&5
6103printf %s "checking for racket lib directory... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006104 SCHEME_LIB=`${vi_cv_path_mzscheme} -e '(require setup/dirs)(let ((p (find-lib-dir))) (when (path? p) (display p)))'`
6105 if test "X$SCHEME_LIB" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006106 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${SCHEME_LIB}" >&5
6107printf "%s\n" "${SCHEME_LIB}" >&6; }
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006108 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006109 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6110printf "%s\n" "not found" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006111 fi
6112
6113 for path in "${vi_cv_path_mzscheme_pfx}/lib" "${SCHEME_LIB}"; do
6114 if test "X$path" != "X"; then
Bram Moolenaard0573012017-10-28 21:11:06 +02006115 if test "x$MACOS_X" = "xyes"; then
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006116 MZSCHEME_LIBS="-framework Racket"
6117 MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
6118 elif test -f "${path}/libmzscheme3m.a"; then
6119 MZSCHEME_LIBS="${path}/libmzscheme3m.a"
6120 MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
6121 elif test -f "${path}/libracket3m.a"; then
6122 MZSCHEME_LIBS="${path}/libracket3m.a"
Bram Moolenaar588d2412020-10-03 14:24:19 +02006123 if test -f "${path}/librktio.a"; then
6124 MZSCHEME_LIBS="${MZSCHEME_LIBS} ${path}/librktio.a"
6125 fi
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006126 MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
6127 elif test -f "${path}/libracket.a"; then
6128 MZSCHEME_LIBS="${path}/libracket.a ${path}/libmzgc.a"
6129 elif test -f "${path}/libmzscheme.a"; then
6130 MZSCHEME_LIBS="${path}/libmzscheme.a ${path}/libmzgc.a"
6131 else
6132 if test -f "${path}/libmzscheme3m.so"; then
6133 MZSCHEME_LIBS="-L${path} -lmzscheme3m"
6134 MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
6135 elif test -f "${path}/libracket3m.so"; then
6136 MZSCHEME_LIBS="-L${path} -lracket3m"
6137 MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
6138 elif test -f "${path}/libracket.so"; then
6139 MZSCHEME_LIBS="-L${path} -lracket -lmzgc"
6140 else
6141 if test "$path" != "$SCHEME_LIB"; then
6142 continue
6143 fi
6144 MZSCHEME_LIBS="-L${path} -lmzscheme -lmzgc"
6145 fi
6146 if test "$GCC" = yes; then
6147 MZSCHEME_LIBS="${MZSCHEME_LIBS} -Wl,-rpath -Wl,${path}"
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00006148 elif test "$vim_cv_uname_output" = SunOS &&
6149 echo $vim_cv_uname_r_output | grep '^5' >/dev/null; then
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006150 MZSCHEME_LIBS="${MZSCHEME_LIBS} -R ${path}"
6151 fi
6152 fi
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006153 fi
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006154 if test "X$MZSCHEME_LIBS" != "X"; then
6155 break
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006156 fi
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006157 done
6158
Illia Bobyra96d5442023-08-30 16:30:15 +02006159 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if racket requires -pthread" >&5
6160printf %s "checking if racket requires -pthread... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006161 if test "X$SCHEME_LIB" != "X" && $FGREP -e -pthread "$SCHEME_LIB/buildinfo" >/dev/null ; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006162 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6163printf "%s\n" "yes" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006164 MZSCHEME_LIBS="${MZSCHEME_LIBS} -pthread"
6165 MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -pthread"
6166 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006167 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6168printf "%s\n" "no" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006169 fi
6170
Illia Bobyra96d5442023-08-30 16:30:15 +02006171 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for racket config directory" >&5
6172printf %s "checking for racket config directory... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006173 SCHEME_CONFIGDIR=`${vi_cv_path_mzscheme} -e '(require setup/dirs)(let ((p (find-config-dir))) (when (path? p) (display p)))'`
6174 if test "X$SCHEME_CONFIGDIR" != "X"; then
6175 MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -DMZSCHEME_CONFIGDIR='\"${SCHEME_CONFIGDIR}\"'"
Illia Bobyra96d5442023-08-30 16:30:15 +02006176 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${SCHEME_CONFIGDIR}" >&5
6177printf "%s\n" "${SCHEME_CONFIGDIR}" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006178 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006179 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6180printf "%s\n" "not found" >&6; }
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006181 fi
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006182
Illia Bobyra96d5442023-08-30 16:30:15 +02006183 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for racket collects directory" >&5
6184printf %s "checking for racket collects directory... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006185 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))))'`
6186 if test "X$SCHEME_COLLECTS" = "X"; then
6187 if test -d "$vi_cv_path_mzscheme_pfx/lib/plt/collects"; then
6188 SCHEME_COLLECTS=$vi_cv_path_mzscheme_pfx/lib/plt/
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006189 else
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006190 if test -d "$vi_cv_path_mzscheme_pfx/lib/racket/collects"; then
6191 SCHEME_COLLECTS=$vi_cv_path_mzscheme_pfx/lib/racket/
Bram Moolenaar75676462013-01-30 14:55:42 +01006192 else
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006193 if test -d "$vi_cv_path_mzscheme_pfx/share/racket/collects"; then
6194 SCHEME_COLLECTS=$vi_cv_path_mzscheme_pfx/share/racket/
6195 else
6196 if test -d "$vi_cv_path_mzscheme_pfx/collects"; then
6197 SCHEME_COLLECTS=$vi_cv_path_mzscheme_pfx/
6198 fi
Bram Moolenaar75676462013-01-30 14:55:42 +01006199 fi
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006200 fi
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006201 fi
Bram Moolenaarff4a37e2007-05-06 13:18:29 +00006202 fi
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006203 if test "X$SCHEME_COLLECTS" != "X" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006204 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${SCHEME_COLLECTS}" >&5
6205printf "%s\n" "${SCHEME_COLLECTS}" >&6; }
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006206 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006207 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6208printf "%s\n" "not found" >&6; }
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006209 fi
6210
Illia Bobyra96d5442023-08-30 16:30:15 +02006211 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mzscheme_base.c" >&5
6212printf %s "checking for mzscheme_base.c... " >&6; }
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006213 if test -f "${SCHEME_COLLECTS}collects/scheme/base.ss" ; then
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006214 MZSCHEME_EXTRA="mzscheme_base.c"
Bram Moolenaara2aa31a2014-02-23 22:52:40 +01006215 MZSCHEME_MZC="${vi_cv_path_mzscheme_pfx}/bin/mzc"
6216 MZSCHEME_MOD="++lib scheme/base"
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006217 else
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006218 if test -f "${SCHEME_COLLECTS}collects/scheme/base.rkt" ; then
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006219 MZSCHEME_EXTRA="mzscheme_base.c"
Bram Moolenaara2aa31a2014-02-23 22:52:40 +01006220 MZSCHEME_MZC="${vi_cv_path_mzscheme_pfx}/bin/mzc"
6221 MZSCHEME_MOD="++lib scheme/base"
6222 else
6223 if test -f "${SCHEME_COLLECTS}collects/racket/base.rkt" ; then
6224 MZSCHEME_EXTRA="mzscheme_base.c"
6225 MZSCHEME_MZC="${vi_cv_path_mzscheme_pfx}/bin/raco ctool"
6226 MZSCHEME_MOD=""
6227 fi
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006228 fi
6229 fi
6230 if test "X$MZSCHEME_EXTRA" != "X" ; then
6231 MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -DINCLUDE_MZSCHEME_BASE"
Illia Bobyra96d5442023-08-30 16:30:15 +02006232 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: needed" >&5
6233printf "%s\n" "needed" >&6; }
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006234 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006235 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not needed" >&5
6236printf "%s\n" "not needed" >&6; }
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006237 fi
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006238
Illia Bobyra96d5442023-08-30 16:30:15 +02006239 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ffi_type_void in -lffi" >&5
6240printf %s "checking for ffi_type_void in -lffi... " >&6; }
6241if test ${ac_cv_lib_ffi_ffi_type_void+y}
6242then :
6243 printf %s "(cached) " >&6
6244else $as_nop
Bram Moolenaar9e902192013-07-17 18:58:11 +02006245 ac_check_lib_save_LIBS=$LIBS
6246LIBS="-lffi $LIBS"
6247cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6248/* end confdefs.h. */
6249
6250/* Override any GCC internal prototype to avoid an error.
6251 Use char because int might match the return type of a GCC
6252 builtin and then its argument prototype would still apply. */
Bram Moolenaar9e902192013-07-17 18:58:11 +02006253char ffi_type_void ();
6254int
Illia Bobyra96d5442023-08-30 16:30:15 +02006255main (void)
Bram Moolenaar9e902192013-07-17 18:58:11 +02006256{
6257return ffi_type_void ();
6258 ;
6259 return 0;
6260}
6261_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02006262if ac_fn_c_try_link "$LINENO"
6263then :
Bram Moolenaar9e902192013-07-17 18:58:11 +02006264 ac_cv_lib_ffi_ffi_type_void=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02006265else $as_nop
Bram Moolenaar9e902192013-07-17 18:58:11 +02006266 ac_cv_lib_ffi_ffi_type_void=no
6267fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006268rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar9e902192013-07-17 18:58:11 +02006269 conftest$ac_exeext conftest.$ac_ext
6270LIBS=$ac_check_lib_save_LIBS
6271fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006272{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ffi_ffi_type_void" >&5
6273printf "%s\n" "$ac_cv_lib_ffi_ffi_type_void" >&6; }
6274if test "x$ac_cv_lib_ffi_ffi_type_void" = xyes
6275then :
Bram Moolenaar9e902192013-07-17 18:58:11 +02006276 MZSCHEME_LIBS="$MZSCHEME_LIBS -lffi"
6277fi
6278
6279
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006280 MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -I${SCHEME_INC} \
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006281 -DMZSCHEME_COLLECTS='\"${SCHEME_COLLECTS}collects\"'"
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006282
Illia Bobyra96d5442023-08-30 16:30:15 +02006283 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compile and link flags for MzScheme are sane" >&5
6284printf %s "checking if compile and link flags for MzScheme are sane... " >&6; }
Bram Moolenaar9e902192013-07-17 18:58:11 +02006285 cflags_save=$CFLAGS
6286 libs_save=$LIBS
6287 CFLAGS="$CFLAGS $MZSCHEME_CFLAGS"
6288 LIBS="$LIBS $MZSCHEME_LIBS"
6289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6290/* end confdefs.h. */
6291
6292int
Illia Bobyra96d5442023-08-30 16:30:15 +02006293main (void)
Bram Moolenaar9e902192013-07-17 18:58:11 +02006294{
6295
6296 ;
6297 return 0;
6298}
6299_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02006300if ac_fn_c_try_link "$LINENO"
6301then :
6302 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6303printf "%s\n" "yes" >&6; }; mzs_ok=yes
6304else $as_nop
6305 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no: MZSCHEME DISABLED" >&5
6306printf "%s\n" "no: MZSCHEME DISABLED" >&6; }; mzs_ok=no
Bram Moolenaar9e902192013-07-17 18:58:11 +02006307fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006308rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar9e902192013-07-17 18:58:11 +02006309 conftest$ac_exeext conftest.$ac_ext
6310 CFLAGS=$cflags_save
6311 LIBS=$libs_save
6312 if test $mzs_ok = yes; then
6313 MZSCHEME_SRC="if_mzsch.c"
6314 MZSCHEME_OBJ="objects/if_mzsch.o"
6315 MZSCHEME_PRO="if_mzsch.pro"
Illia Bobyra96d5442023-08-30 16:30:15 +02006316 printf "%s\n" "#define FEAT_MZSCHEME 1" >>confdefs.h
Bram Moolenaar9e902192013-07-17 18:58:11 +02006317
6318 else
6319 MZSCHEME_CFLAGS=
6320 MZSCHEME_LIBS=
6321 MZSCHEME_EXTRA=
6322 MZSCHEME_MZC=
6323 fi
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006324 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006325
6326
6327
6328
6329
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006330
6331
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006332fi
6333
6334
Illia Bobyra96d5442023-08-30 16:30:15 +02006335{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-perlinterp argument" >&5
6336printf %s "checking --enable-perlinterp argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00006337# Check whether --enable-perlinterp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02006338if test ${enable_perlinterp+y}
6339then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00006340 enableval=$enable_perlinterp;
Illia Bobyra96d5442023-08-30 16:30:15 +02006341else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00006342 enable_perlinterp="no"
Bram Moolenaar446cb832008-06-24 21:56:24 +00006343fi
6344
Illia Bobyra96d5442023-08-30 16:30:15 +02006345{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_perlinterp" >&5
6346printf "%s\n" "$enable_perlinterp" >&6; }
Bram Moolenaare06c1882010-07-21 22:05:20 +02006347if test "$enable_perlinterp" = "yes" -o "$enable_perlinterp" = "dynamic"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00006348 if test "$has_eval" = "no"; then
Martin Tournoij7904fa42022-10-04 16:28:45 +01006349 as_fn_error $? "cannot use Perl with tiny features" "$LINENO" 5
Bram Moolenaar3c124e32016-01-31 14:36:58 +01006350 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006351
Bram Moolenaar071d4272004-06-13 20:20:40 +00006352 # Extract the first word of "perl", so it can be a program name with args.
6353set dummy perl; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02006354{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6355printf %s "checking for $ac_word... " >&6; }
6356if test ${ac_cv_path_vi_cv_path_perl+y}
6357then :
6358 printf %s "(cached) " >&6
6359else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006360 case $vi_cv_path_perl in
6361 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00006362 ac_cv_path_vi_cv_path_perl="$vi_cv_path_perl" # Let the user override the test with a path.
6363 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00006364 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006365 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6366for as_dir in $PATH
6367do
6368 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02006369 case $as_dir in #(((
6370 '') as_dir=./ ;;
6371 */) ;;
6372 *) as_dir=$as_dir/ ;;
6373 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006374 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02006375 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6376 ac_cv_path_vi_cv_path_perl="$as_dir$ac_word$ac_exec_ext"
6377 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006378 break 2
6379 fi
6380done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006381 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00006382IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006383
Bram Moolenaar071d4272004-06-13 20:20:40 +00006384 ;;
6385esac
6386fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006387vi_cv_path_perl=$ac_cv_path_vi_cv_path_perl
Bram Moolenaar071d4272004-06-13 20:20:40 +00006388if test -n "$vi_cv_path_perl"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006389 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_perl" >&5
6390printf "%s\n" "$vi_cv_path_perl" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006391else
Illia Bobyra96d5442023-08-30 16:30:15 +02006392 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6393printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006394fi
6395
Bram Moolenaar446cb832008-06-24 21:56:24 +00006396
Bram Moolenaar071d4272004-06-13 20:20:40 +00006397 if test "X$vi_cv_path_perl" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006398 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Perl version" >&5
6399printf %s "checking Perl version... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006400 if $vi_cv_path_perl -e 'require 5.003_01' >/dev/null 2>/dev/null; then
6401 eval `$vi_cv_path_perl -V:usethreads`
Bram Moolenaare06c1882010-07-21 22:05:20 +02006402 eval `$vi_cv_path_perl -V:libperl`
Bram Moolenaar071d4272004-06-13 20:20:40 +00006403 if test "X$usethreads" = "XUNKNOWN" -o "X$usethreads" = "Xundef"; then
6404 badthreads=no
6405 else
6406 if $vi_cv_path_perl -e 'require 5.6.0' >/dev/null 2>/dev/null; then
6407 eval `$vi_cv_path_perl -V:use5005threads`
6408 if test "X$use5005threads" = "XUNKNOWN" -o "X$use5005threads" = "Xundef"; then
6409 badthreads=no
6410 else
6411 badthreads=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02006412 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: >>> Perl > 5.6 with 5.5 threads cannot be used <<<" >&5
6413printf "%s\n" ">>> Perl > 5.6 with 5.5 threads cannot be used <<<" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006414 fi
6415 else
6416 badthreads=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02006417 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: >>> Perl 5.5 with threads cannot be used <<<" >&5
6418printf "%s\n" ">>> Perl 5.5 with threads cannot be used <<<" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006419 fi
6420 fi
6421 if test $badthreads = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006422 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: OK" >&5
6423printf "%s\n" "OK" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006424 eval `$vi_cv_path_perl -V:shrpenv`
6425 if test "X$shrpenv" = "XUNKNOWN"; then # pre 5.003_04
6426 shrpenv=""
6427 fi
6428 vi_cv_perllib=`$vi_cv_path_perl -MConfig -e 'print $Config{privlibexp}'`
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006429
Bram Moolenaard5f62b12014-08-17 17:05:44 +02006430 vi_cv_perl_extutils=unknown_perl_extutils_path
6431 for extutils_rel_path in ExtUtils vendor_perl/ExtUtils; do
6432 xsubpp_path="$vi_cv_perllib/$extutils_rel_path/xsubpp"
6433 if test -f "$xsubpp_path"; then
6434 vi_cv_perl_xsubpp="$xsubpp_path"
6435 fi
6436 done
6437
Bram Moolenaar1ec96c92017-09-27 21:42:08 +02006438 perlcppflags=`$vi_cv_path_perl -Mlib=$srcdir -MExtUtils::Embed \
Bram Moolenaare8ff56b2017-09-14 23:06:23 +02006439 -e 'ccflags;perl_inc;print"\n"' | sed -e 's/-fno[^ ]*//' \
6440 -e 's/-fdebug-prefix-map[^ ]*//g' \
Bram Moolenaar1ec96c92017-09-27 21:42:08 +02006441 -e 's/-pipe //' \
6442 -e 's/-W[^ ]*//g' \
Bram Moolenaar92021622017-10-12 12:33:43 +02006443 -e 's/-D_FORTIFY_SOURCE=.//g'`
Bram Moolenaar071d4272004-06-13 20:20:40 +00006444 perllibs=`cd $srcdir; $vi_cv_path_perl -MExtUtils::Embed -e 'ldopts' | \
6445 sed -e '/Warning/d' -e '/Note (probably harmless)/d' \
6446 -e 's/-bE:perl.exp//' -e 's/-lc //'`
6447 perlldflags=`cd $srcdir; $vi_cv_path_perl -MExtUtils::Embed \
6448 -e 'ccdlflags' | sed -e 's/-bE:perl.exp//'`
6449
Illia Bobyra96d5442023-08-30 16:30:15 +02006450 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compile and link flags for Perl are sane" >&5
6451printf %s "checking if compile and link flags for Perl are sane... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006452 cflags_save=$CFLAGS
6453 libs_save=$LIBS
6454 ldflags_save=$LDFLAGS
6455 CFLAGS="$CFLAGS $perlcppflags"
6456 LIBS="$LIBS $perllibs"
Bram Moolenaara6cc0312013-06-18 23:31:55 +02006457 perlldflags=`echo "$perlldflags" | sed -e 's/^ *//g'`
Bram Moolenaar071d4272004-06-13 20:20:40 +00006458 LDFLAGS="$perlldflags $LDFLAGS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006460/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00006461
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006462int
Illia Bobyra96d5442023-08-30 16:30:15 +02006463main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006464{
6465
6466 ;
6467 return 0;
6468}
6469_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02006470if ac_fn_c_try_link "$LINENO"
6471then :
6472 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6473printf "%s\n" "yes" >&6; }; perl_ok=yes
6474else $as_nop
6475 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no: PERL DISABLED" >&5
6476printf "%s\n" "no: PERL DISABLED" >&6; }; perl_ok=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00006477fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006478rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006479 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +00006480 CFLAGS=$cflags_save
6481 LIBS=$libs_save
6482 LDFLAGS=$ldflags_save
6483 if test $perl_ok = yes; then
6484 if test "X$perlcppflags" != "X"; then
Bram Moolenaar1ec96c92017-09-27 21:42:08 +02006485 PERL_CFLAGS=$perlcppflags
Bram Moolenaar071d4272004-06-13 20:20:40 +00006486 fi
6487 if test "X$perlldflags" != "X"; then
Bram Moolenaar2bcaec32014-03-27 18:51:11 +01006488 if test "X`echo \"$LDFLAGS\" | $FGREP -e \"$perlldflags\"`" = "X"; then
Bram Moolenaara6cc0312013-06-18 23:31:55 +02006489 LDFLAGS="$perlldflags $LDFLAGS"
6490 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006491 fi
6492 PERL_LIBS=$perllibs
6493 PERL_SRC="auto/if_perl.c if_perlsfio.c"
6494 PERL_OBJ="objects/if_perl.o objects/if_perlsfio.o"
6495 PERL_PRO="if_perl.pro if_perlsfio.pro"
Illia Bobyra96d5442023-08-30 16:30:15 +02006496 printf "%s\n" "#define FEAT_PERL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00006497
6498 fi
6499 fi
6500 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006501 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: >>> too old; need Perl version 5.003_01 or later <<<" >&5
6502printf "%s\n" ">>> too old; need Perl version 5.003_01 or later <<<" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006503 fi
6504 fi
6505
Bram Moolenaard0573012017-10-28 21:11:06 +02006506 if test "x$MACOS_X" = "xyes"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00006507 dir=/System/Library/Perl
6508 darwindir=$dir/darwin
6509 if test -d $darwindir; then
6510 PERL=/usr/bin/perl
6511 else
6512 dir=/System/Library/Perl/5.8.1
6513 darwindir=$dir/darwin-thread-multi-2level
6514 if test -d $darwindir; then
6515 PERL=/usr/bin/perl
6516 fi
6517 fi
6518 if test -n "$PERL"; then
6519 PERL_DIR="$dir"
6520 PERL_CFLAGS="-DFEAT_PERL -I$darwindir/CORE"
6521 PERL_OBJ="objects/if_perl.o objects/if_perlsfio.o $darwindir/auto/DynaLoader/DynaLoader.a"
6522 PERL_LIBS="-L$darwindir/CORE -lperl"
6523 fi
Bram Moolenaar5dff57d2010-07-24 16:19:44 +02006524 PERL_LIBS=`echo "$PERL_LIBS" | sed -e 's/-arch\ ppc//' -e 's/-arch\ i386//' -e 's/-arch\ x86_64//'`
6525 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 +00006526 fi
Bram Moolenaare06c1882010-07-21 22:05:20 +02006527 if test "$enable_perlinterp" = "dynamic"; then
6528 if test "$perl_ok" = "yes" -a "X$libperl" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006529 printf "%s\n" "#define DYNAMIC_PERL 1" >>confdefs.h
Bram Moolenaare06c1882010-07-21 22:05:20 +02006530
6531 PERL_CFLAGS="-DDYNAMIC_PERL_DLL=\\\"$libperl\\\" $PERL_CFLAGS"
Christian Brabandt55460da2023-08-29 21:31:28 +02006532 PERL_LIBS=""
Bram Moolenaare06c1882010-07-21 22:05:20 +02006533 fi
6534 fi
Bram Moolenaarf788a062011-12-14 20:51:25 +01006535
6536 if test "$fail_if_missing" = "yes" -a "$perl_ok" != "yes"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01006537 as_fn_error $? "could not configure perl" "$LINENO" 5
Bram Moolenaarf788a062011-12-14 20:51:25 +01006538 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006539fi
6540
6541
6542
6543
6544
6545
6546
ichizok8bb3fe42021-12-28 15:51:45 +00006547
Illia Bobyra96d5442023-08-30 16:30:15 +02006548{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-pythoninterp argument" >&5
6549printf %s "checking --enable-pythoninterp argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00006550# Check whether --enable-pythoninterp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02006551if test ${enable_pythoninterp+y}
6552then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00006553 enableval=$enable_pythoninterp;
Illia Bobyra96d5442023-08-30 16:30:15 +02006554else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00006555 enable_pythoninterp="no"
Bram Moolenaar446cb832008-06-24 21:56:24 +00006556fi
6557
Illia Bobyra96d5442023-08-30 16:30:15 +02006558{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_pythoninterp" >&5
6559printf "%s\n" "$enable_pythoninterp" >&6; }
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02006560if test "$enable_pythoninterp" = "yes" -o "$enable_pythoninterp" = "dynamic"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00006561 if test "$has_eval" = "no"; then
Martin Tournoij7904fa42022-10-04 16:28:45 +01006562 as_fn_error $? "cannot use Python with tiny features" "$LINENO" 5
Bram Moolenaar0b105412014-11-30 13:34:23 +01006563 fi
6564
Illia Bobyra96d5442023-08-30 16:30:15 +02006565 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-python-command argument" >&5
6566printf %s "checking --with-python-command argument... " >&6; }
Bram Moolenaare1a32312018-04-15 16:03:25 +02006567
6568
6569# Check whether --with-python-command was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02006570if test ${with_python_command+y}
6571then :
6572 withval=$with_python_command; vi_cv_path_python="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python" >&5
6573printf "%s\n" "$vi_cv_path_python" >&6; }
6574else $as_nop
6575 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6576printf "%s\n" "no" >&6; }
Bram Moolenaare1a32312018-04-15 16:03:25 +02006577fi
6578
6579
6580 if test "X$vi_cv_path_python" = "X"; then
Bram Moolenaar09ba6d72012-12-12 14:25:05 +01006581 for ac_prog in python2 python
6582do
6583 # Extract the first word of "$ac_prog", so it can be a program name with args.
6584set dummy $ac_prog; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02006585{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6586printf %s "checking for $ac_word... " >&6; }
6587if test ${ac_cv_path_vi_cv_path_python+y}
6588then :
6589 printf %s "(cached) " >&6
6590else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006591 case $vi_cv_path_python in
6592 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00006593 ac_cv_path_vi_cv_path_python="$vi_cv_path_python" # Let the user override the test with a path.
6594 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00006595 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006596 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6597for as_dir in $PATH
6598do
6599 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02006600 case $as_dir in #(((
6601 '') as_dir=./ ;;
6602 */) ;;
6603 *) as_dir=$as_dir/ ;;
6604 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006605 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02006606 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6607 ac_cv_path_vi_cv_path_python="$as_dir$ac_word$ac_exec_ext"
6608 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006609 break 2
6610 fi
6611done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006612 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00006613IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006614
Bram Moolenaar071d4272004-06-13 20:20:40 +00006615 ;;
6616esac
6617fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006618vi_cv_path_python=$ac_cv_path_vi_cv_path_python
Bram Moolenaar071d4272004-06-13 20:20:40 +00006619if test -n "$vi_cv_path_python"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006620 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python" >&5
6621printf "%s\n" "$vi_cv_path_python" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006622else
Illia Bobyra96d5442023-08-30 16:30:15 +02006623 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6624printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006625fi
6626
Bram Moolenaar446cb832008-06-24 21:56:24 +00006627
Bram Moolenaar09ba6d72012-12-12 14:25:05 +01006628 test -n "$vi_cv_path_python" && break
6629done
6630
Bram Moolenaare1a32312018-04-15 16:03:25 +02006631 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006632 if test "X$vi_cv_path_python" != "X"; then
6633
Illia Bobyra96d5442023-08-30 16:30:15 +02006634 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python version" >&5
6635printf %s "checking Python version... " >&6; }
6636if test ${vi_cv_var_python_version+y}
6637then :
6638 printf %s "(cached) " >&6
6639else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00006640 vi_cv_var_python_version=`
6641 ${vi_cv_path_python} -c 'import sys; print sys.version[:3]'`
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006642
Bram Moolenaar071d4272004-06-13 20:20:40 +00006643fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006644{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_var_python_version" >&5
6645printf "%s\n" "$vi_cv_var_python_version" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006646
Illia Bobyra96d5442023-08-30 16:30:15 +02006647 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python is 2.3 or better" >&5
6648printf %s "checking Python is 2.3 or better... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006649 if ${vi_cv_path_python} -c \
Bram Moolenaarc09a6d62013-06-10 21:27:29 +02006650 "import sys; sys.exit(${vi_cv_var_python_version} < 2.3)"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006651 then
Illia Bobyra96d5442023-08-30 16:30:15 +02006652 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yep" >&5
6653printf "%s\n" "yep" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006654
Illia Bobyra96d5442023-08-30 16:30:15 +02006655 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's install prefix" >&5
6656printf %s "checking Python's install prefix... " >&6; }
6657if test ${vi_cv_path_python_pfx+y}
6658then :
6659 printf %s "(cached) " >&6
6660else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00006661 vi_cv_path_python_pfx=`
6662 ${vi_cv_path_python} -c \
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006663 "import sys; print sys.prefix"`
Bram Moolenaar071d4272004-06-13 20:20:40 +00006664fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006665{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python_pfx" >&5
6666printf "%s\n" "$vi_cv_path_python_pfx" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006667
Illia Bobyra96d5442023-08-30 16:30:15 +02006668 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's execution prefix" >&5
6669printf %s "checking Python's execution prefix... " >&6; }
6670if test ${vi_cv_path_python_epfx+y}
6671then :
6672 printf %s "(cached) " >&6
6673else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00006674 vi_cv_path_python_epfx=`
6675 ${vi_cv_path_python} -c \
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006676 "import sys; print sys.exec_prefix"`
Bram Moolenaar071d4272004-06-13 20:20:40 +00006677fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006678{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python_epfx" >&5
6679printf "%s\n" "$vi_cv_path_python_epfx" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006680
Bram Moolenaar071d4272004-06-13 20:20:40 +00006681
Illia Bobyra96d5442023-08-30 16:30:15 +02006682 if test ${vi_cv_path_pythonpath+y}
6683then :
6684 printf %s "(cached) " >&6
6685else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00006686 vi_cv_path_pythonpath=`
6687 unset PYTHONPATH;
6688 ${vi_cv_path_python} -c \
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006689 "import sys, string; print string.join(sys.path,':')"`
Bram Moolenaar071d4272004-06-13 20:20:40 +00006690fi
6691
6692
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006693
6694
Bram Moolenaar446cb832008-06-24 21:56:24 +00006695# Check whether --with-python-config-dir was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02006696if test ${with_python_config_dir+y}
6697then :
Bram Moolenaard0882402018-04-10 18:13:05 +02006698 withval=$with_python_config_dir; vi_cv_path_python_conf="${withval}"; have_python_config_dir=1
Bram Moolenaar446cb832008-06-24 21:56:24 +00006699fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006700
Bram Moolenaar446cb832008-06-24 21:56:24 +00006701
Illia Bobyra96d5442023-08-30 16:30:15 +02006702 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's configuration directory" >&5
6703printf %s "checking Python's configuration directory... " >&6; }
6704if test ${vi_cv_path_python_conf+y}
6705then :
6706 printf %s "(cached) " >&6
6707else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006708
Bram Moolenaar071d4272004-06-13 20:20:40 +00006709 vi_cv_path_python_conf=
Bram Moolenaarac499e32013-06-02 19:14:17 +02006710 d=`${vi_cv_path_python} -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('LIBPL')"`
6711 if test -d "$d" && test -f "$d/config.c"; then
6712 vi_cv_path_python_conf="$d"
6713 else
6714 for path in "${vi_cv_path_python_pfx}" "${vi_cv_path_python_epfx}"; do
6715 for subdir in lib64 lib share; do
6716 d="${path}/${subdir}/python${vi_cv_var_python_version}/config"
6717 if test -d "$d" && test -f "$d/config.c"; then
6718 vi_cv_path_python_conf="$d"
6719 fi
6720 done
Bram Moolenaar071d4272004-06-13 20:20:40 +00006721 done
Bram Moolenaarac499e32013-06-02 19:14:17 +02006722 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006723
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006724fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006725{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python_conf" >&5
6726printf "%s\n" "$vi_cv_path_python_conf" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006727
6728 PYTHON_CONFDIR="${vi_cv_path_python_conf}"
6729
6730 if test "X$PYTHON_CONFDIR" = "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006731 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: can't find it!" >&5
6732printf "%s\n" "can't find it!" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006733 else
6734
Illia Bobyra96d5442023-08-30 16:30:15 +02006735 if test ${vi_cv_path_python_plibs+y}
6736then :
6737 printf %s "(cached) " >&6
6738else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006739
Bram Moolenaar01dd60c2008-07-24 14:24:48 +00006740 pwd=`pwd`
6741 tmp_mkf="$pwd/config-PyMake$$"
6742 cat -- "${PYTHON_CONFDIR}/Makefile" - <<'eof' >"${tmp_mkf}"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006743__:
Bram Moolenaar218116c2010-05-20 21:46:00 +02006744 @echo "python_BASEMODLIBS='$(BASEMODLIBS)'"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006745 @echo "python_LIBS='$(LIBS)'"
6746 @echo "python_SYSLIBS='$(SYSLIBS)'"
6747 @echo "python_LINKFORSHARED='$(LINKFORSHARED)'"
Bram Moolenaarf94a13c2012-09-21 13:26:49 +02006748 @echo "python_DLLLIBRARY='$(DLLLIBRARY)'"
Bram Moolenaar2a7e2a62010-07-24 15:19:11 +02006749 @echo "python_INSTSONAME='$(INSTSONAME)'"
Bram Moolenaar6c927552015-03-24 12:21:33 +01006750 @echo "python_PYTHONFRAMEWORK='$(PYTHONFRAMEWORK)'"
6751 @echo "python_PYTHONFRAMEWORKPREFIX='$(PYTHONFRAMEWORKPREFIX)'"
6752 @echo "python_PYTHONFRAMEWORKINSTALLDIR='$(PYTHONFRAMEWORKINSTALLDIR)'"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006753eof
Bram Moolenaar01dd60c2008-07-24 14:24:48 +00006754 eval "`cd ${PYTHON_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`"
6755 rm -f -- "${tmp_mkf}"
Bram Moolenaard0573012017-10-28 21:11:06 +02006756 if test "x$MACOS_X" = "xyes" && test -n "${python_PYTHONFRAMEWORK}" && ${vi_cv_path_python} -c \
Bram Moolenaar071d4272004-06-13 20:20:40 +00006757 "import sys; sys.exit(${vi_cv_var_python_version} < 2.3)"; then
6758 vi_cv_path_python_plibs="-framework Python"
Bram Moolenaar6c927552015-03-24 12:21:33 +01006759 if test "x${vi_cv_path_python}" != "x/usr/bin/python" && test -n "${python_PYTHONFRAMEWORKPREFIX}"; then
6760 vi_cv_path_python_plibs="-F${python_PYTHONFRAMEWORKPREFIX} -framework Python"
6761 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006762 else
Bram Moolenaar9ce42132018-04-11 22:19:36 +02006763 vi_cv_path_python_plibs="-L${PYTHON_CONFDIR} -lpython${vi_cv_var_python_version}"
Bram Moolenaara161e262015-03-24 15:14:27 +01006764 if test -n "${python_LINKFORSHARED}" && test -n "${python_PYTHONFRAMEWORKPREFIX}"; then
Bram Moolenaar6c927552015-03-24 12:21:33 +01006765 python_link_symbol=`echo ${python_LINKFORSHARED} | sed 's/\([^ \t][^ \t]*[ \t][ \t]*[^ \t][^ \t]*\)[ \t].*/\1/'`
6766 python_link_path=`echo ${python_LINKFORSHARED} | sed 's/\([^ \t][^ \t]*[ \t][ \t]*[^ \t][^ \t]*\)[ \t][ \t]*\(.*\)/\2/'`
6767 if test -n "${python_link_path}" && ! test -x "${python_link_path}"; then
6768 python_link_path="${python_PYTHONFRAMEWORKPREFIX}/${python_link_path}"
6769 if test -n "${python_link_path}" && ! test -x "${python_link_path}"; then
6770 python_link_path="${python_PYTHONFRAMEWORKINSTALLDIR}/Versions/${vi_cv_var_python_version}/${python_PYTHONFRAMEWORK}"
6771 fi
6772 python_LINKFORSHARED="${python_link_symbol} ${python_link_path}"
6773 fi
6774 fi
Bram Moolenaar218116c2010-05-20 21:46:00 +02006775 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 +00006776 vi_cv_path_python_plibs=`echo $vi_cv_path_python_plibs | sed s/-ltermcap//`
6777 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006778
Bram Moolenaar071d4272004-06-13 20:20:40 +00006779fi
6780
Illia Bobyra96d5442023-08-30 16:30:15 +02006781 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's dll name" >&5
6782printf %s "checking Python's dll name... " >&6; }
6783if test ${vi_cv_dll_name_python+y}
6784then :
6785 printf %s "(cached) " >&6
6786else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00006787
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02006788 if test "X$python_DLLLIBRARY" != "X"; then
6789 vi_cv_dll_name_python="$python_DLLLIBRARY"
6790 else
6791 vi_cv_dll_name_python="$python_INSTSONAME"
6792 fi
6793
6794fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006795{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_dll_name_python" >&5
6796printf "%s\n" "$vi_cv_dll_name_python" >&6; }
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02006797
Bram Moolenaar071d4272004-06-13 20:20:40 +00006798 PYTHON_LIBS="${vi_cv_path_python_plibs}"
6799 if test "${vi_cv_path_python_pfx}" = "${vi_cv_path_python_epfx}"; then
Bram Moolenaar04249582018-04-10 13:29:34 +02006800 PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version}"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006801 else
Bram Moolenaar04249582018-04-10 13:29:34 +02006802 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 +00006803 fi
Bram Moolenaar3a21d9c2018-04-10 20:26:20 +02006804 if test "X$have_python_config_dir" = "X1" -a "$enable_pythoninterp" = "dynamic"; then
Bram Moolenaard0882402018-04-10 18:13:05 +02006805 PYTHON_CFLAGS="${PYTHON_CFLAGS} -DPYTHON_HOME='\"${vi_cv_path_python_pfx}\"'"
6806
6807 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006808 PYTHON_SRC="if_python.c"
Bram Moolenaar9bdb9a02012-07-25 16:32:08 +02006809 PYTHON_OBJ="objects/if_python.o"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006810
Illia Bobyra96d5442023-08-30 16:30:15 +02006811 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -pthread should be used" >&5
6812printf %s "checking if -pthread should be used... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006813 threadsafe_flag=
6814 thread_lib=
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00006815 if test "$vim_cv_uname_output" != Darwin; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00006816 test "$GCC" = yes && threadsafe_flag="-pthread"
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00006817 if test "$vim_cv_uname_output" = FreeBSD; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00006818 threadsafe_flag="-D_THREAD_SAFE"
6819 thread_lib="-pthread"
6820 fi
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00006821 if test "$vim_cv_uname_output" = SunOS; then
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02006822 threadsafe_flag="-pthreads"
6823 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006824 fi
6825 libs_save_old=$LIBS
6826 if test -n "$threadsafe_flag"; then
6827 cflags_save=$CFLAGS
6828 CFLAGS="$CFLAGS $threadsafe_flag"
6829 LIBS="$LIBS $thread_lib"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006831/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00006832
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006833int
Illia Bobyra96d5442023-08-30 16:30:15 +02006834main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006835{
6836
6837 ;
6838 return 0;
6839}
6840_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02006841if ac_fn_c_try_link "$LINENO"
6842then :
6843 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6844printf "%s\n" "yes" >&6; }; PYTHON_CFLAGS="$PYTHON_CFLAGS $threadsafe_flag"
6845else $as_nop
6846 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6847printf "%s\n" "no" >&6; }; LIBS=$libs_save_old
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006848
Bram Moolenaar071d4272004-06-13 20:20:40 +00006849fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006850rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006851 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +00006852 CFLAGS=$cflags_save
6853 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006854 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6855printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006856 fi
6857
Illia Bobyra96d5442023-08-30 16:30:15 +02006858 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compile and link flags for Python are sane" >&5
6859printf %s "checking if compile and link flags for Python are sane... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006860 cflags_save=$CFLAGS
6861 libs_save=$LIBS
Bram Moolenaar69f787a2010-07-11 20:52:58 +02006862 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006863 LIBS="$LIBS $PYTHON_LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006865/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00006866
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006867int
Illia Bobyra96d5442023-08-30 16:30:15 +02006868main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006869{
6870
6871 ;
6872 return 0;
6873}
6874_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02006875if ac_fn_c_try_link "$LINENO"
6876then :
6877 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6878printf "%s\n" "yes" >&6; }; python_ok=yes
6879else $as_nop
6880 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no: PYTHON DISABLED" >&5
6881printf "%s\n" "no: PYTHON DISABLED" >&6; }; python_ok=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00006882fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006883rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006884 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +00006885 CFLAGS=$cflags_save
6886 LIBS=$libs_save
6887 if test $python_ok = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006888 printf "%s\n" "#define FEAT_PYTHON 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00006889
6890 else
6891 LIBS=$libs_save_old
6892 PYTHON_SRC=
6893 PYTHON_OBJ=
6894 PYTHON_LIBS=
6895 PYTHON_CFLAGS=
6896 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006897 fi
6898 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006899 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: too old" >&5
6900printf "%s\n" "too old" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006901 fi
6902 fi
Bram Moolenaarf788a062011-12-14 20:51:25 +01006903
6904 if test "$fail_if_missing" = "yes" -a "$python_ok" != "yes"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01006905 as_fn_error $? "could not configure python" "$LINENO" 5
Bram Moolenaarf788a062011-12-14 20:51:25 +01006906 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006907fi
6908
6909
6910
6911
6912
6913
6914
ichizok8bb3fe42021-12-28 15:51:45 +00006915
Illia Bobyra96d5442023-08-30 16:30:15 +02006916{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-python3interp argument" >&5
6917printf %s "checking --enable-python3interp argument... " >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02006918# Check whether --enable-python3interp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02006919if test ${enable_python3interp+y}
6920then :
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02006921 enableval=$enable_python3interp;
Illia Bobyra96d5442023-08-30 16:30:15 +02006922else $as_nop
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02006923 enable_python3interp="no"
6924fi
6925
Illia Bobyra96d5442023-08-30 16:30:15 +02006926{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_python3interp" >&5
6927printf "%s\n" "$enable_python3interp" >&6; }
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02006928if test "$enable_python3interp" = "yes" -o "$enable_python3interp" = "dynamic"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00006929 if test "$has_eval" = "no"; then
Martin Tournoij7904fa42022-10-04 16:28:45 +01006930 as_fn_error $? "cannot use Python with tiny features" "$LINENO" 5
Bram Moolenaar0b105412014-11-30 13:34:23 +01006931 fi
6932
Illia Bobyra96d5442023-08-30 16:30:15 +02006933 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-python3-command argument" >&5
6934printf %s "checking --with-python3-command argument... " >&6; }
Bram Moolenaare1a32312018-04-15 16:03:25 +02006935
6936
6937# Check whether --with-python3-command was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02006938if test ${with_python3_command+y}
6939then :
6940 withval=$with_python3_command; vi_cv_path_python3="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3" >&5
6941printf "%s\n" "$vi_cv_path_python3" >&6; }
6942else $as_nop
6943 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6944printf "%s\n" "no" >&6; }
Bram Moolenaare1a32312018-04-15 16:03:25 +02006945fi
6946
6947
6948 if test "X$vi_cv_path_python3" = "X"; then
Bram Moolenaar09ba6d72012-12-12 14:25:05 +01006949 for ac_prog in python3 python
6950do
6951 # Extract the first word of "$ac_prog", so it can be a program name with args.
6952set dummy $ac_prog; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02006953{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6954printf %s "checking for $ac_word... " >&6; }
6955if test ${ac_cv_path_vi_cv_path_python3+y}
6956then :
6957 printf %s "(cached) " >&6
6958else $as_nop
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02006959 case $vi_cv_path_python3 in
6960 [\\/]* | ?:[\\/]*)
6961 ac_cv_path_vi_cv_path_python3="$vi_cv_path_python3" # Let the user override the test with a path.
6962 ;;
6963 *)
6964 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6965for as_dir in $PATH
6966do
6967 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02006968 case $as_dir in #(((
6969 '') as_dir=./ ;;
6970 */) ;;
6971 *) as_dir=$as_dir/ ;;
6972 esac
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02006973 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02006974 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6975 ac_cv_path_vi_cv_path_python3="$as_dir$ac_word$ac_exec_ext"
6976 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02006977 break 2
6978 fi
6979done
6980 done
6981IFS=$as_save_IFS
6982
6983 ;;
6984esac
6985fi
6986vi_cv_path_python3=$ac_cv_path_vi_cv_path_python3
6987if test -n "$vi_cv_path_python3"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006988 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3" >&5
6989printf "%s\n" "$vi_cv_path_python3" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02006990else
Illia Bobyra96d5442023-08-30 16:30:15 +02006991 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6992printf "%s\n" "no" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02006993fi
6994
6995
Bram Moolenaar09ba6d72012-12-12 14:25:05 +01006996 test -n "$vi_cv_path_python3" && break
6997done
6998
Bram Moolenaare1a32312018-04-15 16:03:25 +02006999 fi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007000 if test "X$vi_cv_path_python3" != "X"; then
7001
Illia Bobyra96d5442023-08-30 16:30:15 +02007002 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python version" >&5
7003printf %s "checking Python version... " >&6; }
7004if test ${vi_cv_var_python3_version+y}
7005then :
7006 printf %s "(cached) " >&6
7007else $as_nop
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007008 vi_cv_var_python3_version=`
Bram Moolenaar23c01922021-05-21 11:43:58 +02007009 ${vi_cv_path_python3} -c 'import sys; print("{}.{}".format(sys.version_info.major, sys.version_info.minor))'`
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007010
7011fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007012{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_var_python3_version" >&5
7013printf "%s\n" "$vi_cv_var_python3_version" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007014
Illia Bobyra96d5442023-08-30 16:30:15 +02007015 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python is 3.0 or better" >&5
7016printf %s "checking Python is 3.0 or better... " >&6; }
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007017 if ${vi_cv_path_python3} -c \
7018 "import sys; sys.exit(${vi_cv_var_python3_version} < 3.0)"
7019 then
Illia Bobyra96d5442023-08-30 16:30:15 +02007020 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yep" >&5
7021printf "%s\n" "yep" >&6; }
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007022
Illia Bobyra96d5442023-08-30 16:30:15 +02007023 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-python3-stable-abi argument" >&5
7024printf %s "checking --with-python3-stable-abi argument... " >&6; }
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007025
7026
7027# Check whether --with-python3-stable-abi was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02007028if test ${with_python3_stable_abi+y}
7029then :
7030 withval=$with_python3_stable_abi; vi_cv_var_python3_stable_abi="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_var_python3_stable_abi" >&5
7031printf "%s\n" "$vi_cv_var_python3_stable_abi" >&6; }
7032else $as_nop
7033 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7034printf "%s\n" "no" >&6; }
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007035fi
7036
7037 if test "X$vi_cv_var_python3_stable_abi" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007038 if test ${vi_cv_var_python3_stable_abi_hex+y}
7039then :
7040 printf %s "(cached) " >&6
7041else $as_nop
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007042
7043 vi_cv_var_python3_stable_abi_hex=`
7044 ${vi_cv_path_python3} -c \
7045 "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) ))"`
7046fi
7047
7048 if test "X$vi_cv_var_python3_stable_abi_hex" == "X"; then
7049 as_fn_error $? "can't parse Python 3 stable ABI version. It should be \"<major>.<minor>\"" "$LINENO" 5
7050 fi
7051 fi
7052
Illia Bobyra96d5442023-08-30 16:30:15 +02007053 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's abiflags" >&5
7054printf %s "checking Python's abiflags... " >&6; }
7055if test ${vi_cv_var_python3_abiflags+y}
7056then :
7057 printf %s "(cached) " >&6
7058else $as_nop
Bram Moolenaar456f2bb2011-06-12 21:37:13 +02007059
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007060 vi_cv_var_python3_abiflags=
7061 if ${vi_cv_path_python3} -c \
7062 "import sys; sys.exit(${vi_cv_var_python3_version} < 3.2)"
7063 then
7064 vi_cv_var_python3_abiflags=`${vi_cv_path_python3} -c \
7065 "import sys; print(sys.abiflags)"`
7066 fi
Bram Moolenaar456f2bb2011-06-12 21:37:13 +02007067fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007068{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_var_python3_abiflags" >&5
7069printf "%s\n" "$vi_cv_var_python3_abiflags" >&6; }
Bram Moolenaar456f2bb2011-06-12 21:37:13 +02007070
Illia Bobyra96d5442023-08-30 16:30:15 +02007071 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's install prefix" >&5
7072printf %s "checking Python's install prefix... " >&6; }
7073if test ${vi_cv_path_python3_pfx+y}
7074then :
7075 printf %s "(cached) " >&6
7076else $as_nop
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007077 vi_cv_path_python3_pfx=`
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007078 ${vi_cv_path_python3} -c \
7079 "import sys; print(sys.prefix)"`
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007080fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007081{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3_pfx" >&5
7082printf "%s\n" "$vi_cv_path_python3_pfx" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007083
Illia Bobyra96d5442023-08-30 16:30:15 +02007084 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's execution prefix" >&5
7085printf %s "checking Python's execution prefix... " >&6; }
7086if test ${vi_cv_path_python3_epfx+y}
7087then :
7088 printf %s "(cached) " >&6
7089else $as_nop
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007090 vi_cv_path_python3_epfx=`
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007091 ${vi_cv_path_python3} -c \
7092 "import sys; print(sys.exec_prefix)"`
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007093fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007094{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3_epfx" >&5
7095printf "%s\n" "$vi_cv_path_python3_epfx" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007096
Illia Bobyra96d5442023-08-30 16:30:15 +02007097 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's include path" >&5
7098printf %s "checking Python's include path... " >&6; }
7099if test ${vi_cv_path_python3_include+y}
7100then :
7101 printf %s "(cached) " >&6
7102else $as_nop
Illia Bobyr74e1dad2023-08-27 18:26:54 +02007103 vi_cv_path_python3_include=`
7104 ${vi_cv_path_python3} -c \
7105 "import sysconfig; print(sysconfig.get_path(\"include\"))"`
7106fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007107{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3_include" >&5
7108printf "%s\n" "$vi_cv_path_python3_include" >&6; }
Illia Bobyr74e1dad2023-08-27 18:26:54 +02007109
Illia Bobyra96d5442023-08-30 16:30:15 +02007110 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's include path" >&5
7111printf %s "checking Python's include path... " >&6; }
7112if test ${vi_cv_path_python3_platinclude+y}
7113then :
7114 printf %s "(cached) " >&6
7115else $as_nop
Illia Bobyr74e1dad2023-08-27 18:26:54 +02007116 vi_cv_path_python3_platinclude=`
7117 ${vi_cv_path_python3} -c \
7118 "import sysconfig; print(sysconfig.get_path(\"platinclude\"))"`
7119fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007120{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3_platinclude" >&5
7121printf "%s\n" "$vi_cv_path_python3_platinclude" >&6; }
Illia Bobyr74e1dad2023-08-27 18:26:54 +02007122
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007123
Illia Bobyra96d5442023-08-30 16:30:15 +02007124 if test ${vi_cv_path_python3path+y}
7125then :
7126 printf %s "(cached) " >&6
7127else $as_nop
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007128 vi_cv_path_python3path=`
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007129 unset PYTHONPATH;
7130 ${vi_cv_path_python3} -c \
7131 "import sys, string; print(':'.join(sys.path))"`
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007132fi
7133
7134
7135
7136
7137# Check whether --with-python3-config-dir was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02007138if test ${with_python3_config_dir+y}
7139then :
Bram Moolenaard0882402018-04-10 18:13:05 +02007140 withval=$with_python3_config_dir; vi_cv_path_python3_conf="${withval}"; have_python3_config_dir=1
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007141fi
7142
7143
Illia Bobyra96d5442023-08-30 16:30:15 +02007144 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's configuration directory" >&5
7145printf %s "checking Python's configuration directory... " >&6; }
7146if test ${vi_cv_path_python3_conf+y}
7147then :
7148 printf %s "(cached) " >&6
7149else $as_nop
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007150
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007151 vi_cv_path_python3_conf=
Bram Moolenaarfee496d2013-07-12 20:07:24 +02007152 config_dir="config-${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags}"
Zdenek Dohnal31e299c2021-06-10 18:50:55 +02007153 d=`${vi_cv_path_python3} -c "import sysconfig; print(sysconfig.get_config_var('LIBPL'))" 2> /dev/null`
7154 if test "x$d" = "x"; then
7155 d=`${vi_cv_path_python3} -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('LIBPL'))"`
7156 fi
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007157 if test -d "$d" && test -f "$d/config.c"; then
7158 vi_cv_path_python3_conf="$d"
7159 else
7160 for path in "${vi_cv_path_python3_pfx}" "${vi_cv_path_python3_epfx}"; do
7161 for subdir in lib64 lib share; do
7162 d="${path}/${subdir}/python${vi_cv_var_python3_version}/${config_dir}"
7163 if test -d "$d" && test -f "$d/config.c"; then
7164 vi_cv_path_python3_conf="$d"
7165 fi
7166 done
7167 done
7168 fi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007169
7170fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007171{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3_conf" >&5
7172printf "%s\n" "$vi_cv_path_python3_conf" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007173
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007174 PYTHON3_CONFDIR="${vi_cv_path_python3_conf}"
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007175
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007176 if test "X$PYTHON3_CONFDIR" = "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007177 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: can't find it!" >&5
7178printf "%s\n" "can't find it!" >&6; }
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007179 else
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007180
Illia Bobyra96d5442023-08-30 16:30:15 +02007181 if test ${vi_cv_path_python3_plibs+y}
7182then :
7183 printf %s "(cached) " >&6
7184else $as_nop
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007185
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007186 pwd=`pwd`
7187 tmp_mkf="$pwd/config-PyMake$$"
7188 cat -- "${PYTHON3_CONFDIR}/Makefile" - <<'eof' >"${tmp_mkf}"
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007189__:
Bram Moolenaar3804aeb2010-07-19 21:18:54 +02007190 @echo "python3_BASEMODLIBS='$(BASEMODLIBS)'"
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007191 @echo "python3_LIBS='$(LIBS)'"
7192 @echo "python3_SYSLIBS='$(SYSLIBS)'"
Bram Moolenaarf94a13c2012-09-21 13:26:49 +02007193 @echo "python3_DLLLIBRARY='$(DLLLIBRARY)'"
Bram Moolenaar2a7e2a62010-07-24 15:19:11 +02007194 @echo "python3_INSTSONAME='$(INSTSONAME)'"
Yee Cheng Chinb6ebe5a2023-04-05 18:24:50 +01007195 @echo "python3_PYTHONFRAMEWORKPREFIX='$(PYTHONFRAMEWORKPREFIX)'"
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007196eof
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007197 eval "`cd ${PYTHON3_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`"
7198 rm -f -- "${tmp_mkf}"
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007199 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 +02007200 vi_cv_path_python3_plibs="${vi_cv_path_python3_plibs} ${python3_BASEMODLIBS} ${python3_LIBS} ${python3_SYSLIBS}"
7201 vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-ltermcap//`
7202 vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-lffi//`
7203
7204fi
7205
Illia Bobyra96d5442023-08-30 16:30:15 +02007206 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python3's dll name" >&5
7207printf %s "checking Python3's dll name... " >&6; }
7208if test ${vi_cv_dll_name_python3+y}
7209then :
7210 printf %s "(cached) " >&6
7211else $as_nop
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007212
7213 if test "X$python3_DLLLIBRARY" != "X"; then
7214 vi_cv_dll_name_python3="$python3_DLLLIBRARY"
Yee Cheng Chinb6ebe5a2023-04-05 18:24:50 +01007215 elif test "X$python3_PYTHONFRAMEWORKPREFIX" != "X"; then
7216 vi_cv_dll_name_python3="${python3_PYTHONFRAMEWORKPREFIX}/${python3_INSTSONAME}"
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007217 else
7218 vi_cv_dll_name_python3="$python3_INSTSONAME"
7219 fi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007220
7221fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007222{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_dll_name_python3" >&5
7223printf "%s\n" "$vi_cv_dll_name_python3" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007224
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007225 PYTHON3_LIBS="${vi_cv_path_python3_plibs}"
Illia Bobyr74e1dad2023-08-27 18:26:54 +02007226 if test "${vi_cv_path_python3_include}" = "${vi_cv_path_python3_platinclude}"; then
7227 PYTHON3_CFLAGS="-I${vi_cv_path_python3_include}"
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007228 else
Illia Bobyr74e1dad2023-08-27 18:26:54 +02007229 PYTHON3_CFLAGS="-I${vi_cv_path_python3_include} -I${vi_cv_path_python3_platinclude}"
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007230 fi
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007231 if test "X$have_python3_config_dir" = "X1" -a "$enable_python3interp" = "dynamic"; then
7232 PYTHON3_CFLAGS="${PYTHON3_CFLAGS} -DPYTHON3_HOME='L\"${vi_cv_path_python3_pfx}\"'"
7233 fi
7234 if test "X$vi_cv_var_python3_stable_abi_hex" != "X"; then
7235 PYTHON3_CFLAGS="${PYTHON3_CFLAGS} -DPy_LIMITED_API=${vi_cv_var_python3_stable_abi_hex}"
7236 fi
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007237 PYTHON3_SRC="if_python3.c"
7238 PYTHON3_OBJ="objects/if_python3.o"
7239
Illia Bobyra96d5442023-08-30 16:30:15 +02007240 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -pthread should be used" >&5
7241printf %s "checking if -pthread should be used... " >&6; }
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007242 threadsafe_flag=
7243 thread_lib=
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00007244 if test "$vim_cv_uname_output" != Darwin; then
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007245 test "$GCC" = yes && threadsafe_flag="-pthread"
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00007246 if test "$vim_cv_uname_output" = FreeBSD; then
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007247 threadsafe_flag="-D_THREAD_SAFE"
7248 thread_lib="-pthread"
7249 fi
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00007250 if test "$vim_cv_uname_output" = SunOS; then
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007251 threadsafe_flag="-pthreads"
7252 fi
7253 fi
7254 libs_save_old=$LIBS
7255 if test -n "$threadsafe_flag"; then
7256 cflags_save=$CFLAGS
7257 CFLAGS="$CFLAGS $threadsafe_flag"
7258 LIBS="$LIBS $thread_lib"
7259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007260/* end confdefs.h. */
7261
7262int
Illia Bobyra96d5442023-08-30 16:30:15 +02007263main (void)
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007264{
7265
7266 ;
7267 return 0;
7268}
7269_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02007270if ac_fn_c_try_link "$LINENO"
7271then :
7272 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7273printf "%s\n" "yes" >&6; }; PYTHON3_CFLAGS="$PYTHON3_CFLAGS $threadsafe_flag"
7274else $as_nop
7275 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7276printf "%s\n" "no" >&6; }; LIBS=$libs_save_old
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007277
7278fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007279rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007280 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007281 CFLAGS=$cflags_save
7282 else
Illia Bobyra96d5442023-08-30 16:30:15 +02007283 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7284printf "%s\n" "no" >&6; }
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007285 fi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007286
Illia Bobyra96d5442023-08-30 16:30:15 +02007287 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compile and link flags for Python 3 are sane" >&5
7288printf %s "checking if compile and link flags for Python 3 are sane... " >&6; }
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007289 cflags_save=$CFLAGS
7290 libs_save=$LIBS
7291 CFLAGS="$CFLAGS $PYTHON3_CFLAGS"
7292 LIBS="$LIBS $PYTHON3_LIBS"
7293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007294/* end confdefs.h. */
7295
7296int
Illia Bobyra96d5442023-08-30 16:30:15 +02007297main (void)
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007298{
7299
7300 ;
7301 return 0;
7302}
7303_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02007304if ac_fn_c_try_link "$LINENO"
7305then :
7306 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7307printf "%s\n" "yes" >&6; }; python3_ok=yes
7308else $as_nop
7309 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no: PYTHON3 DISABLED" >&5
7310printf "%s\n" "no: PYTHON3 DISABLED" >&6; }; python3_ok=no
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007311fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007312rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007313 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007314 CFLAGS=$cflags_save
7315 LIBS=$libs_save
7316 if test "$python3_ok" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007317 printf "%s\n" "#define FEAT_PYTHON3 1" >>confdefs.h
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007318
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007319 else
7320 LIBS=$libs_save_old
7321 PYTHON3_SRC=
7322 PYTHON3_OBJ=
7323 PYTHON3_LIBS=
7324 PYTHON3_CFLAGS=
7325 fi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007326 fi
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007327 else
Illia Bobyra96d5442023-08-30 16:30:15 +02007328 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: too old" >&5
7329printf "%s\n" "too old" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007330 fi
7331 fi
Bram Moolenaar1612b1a2013-06-14 21:22:39 +02007332 if test "$fail_if_missing" = "yes" -a "$python3_ok" != "yes"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01007333 as_fn_error $? "could not configure python3" "$LINENO" 5
Bram Moolenaar1612b1a2013-06-14 21:22:39 +02007334 fi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007335fi
7336
7337
7338
7339
7340
7341
ichizok8bb3fe42021-12-28 15:51:45 +00007342
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007343if test "$python_ok" = yes && test "$python3_ok" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007344 printf "%s\n" "#define DYNAMIC_PYTHON 1" >>confdefs.h
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007345
Illia Bobyra96d5442023-08-30 16:30:15 +02007346 printf "%s\n" "#define DYNAMIC_PYTHON3 1" >>confdefs.h
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007347
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007348 if test "X$vi_cv_var_python3_stable_abi_hex" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007349 printf "%s\n" "#define DYNAMIC_PYTHON3_STABLE_ABI 1" >>confdefs.h
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007350
7351 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007352 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we can do without RTLD_GLOBAL for Python" >&5
7353printf %s "checking whether we can do without RTLD_GLOBAL for Python... " >&6; }
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007354 cflags_save=$CFLAGS
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007355 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
Bram Moolenaar5d3fbf32015-03-05 16:47:20 +01007356 libs_save=$LIBS
7357 LIBS="-ldl $LIBS"
Illia Bobyra96d5442023-08-30 16:30:15 +02007358 if test "$cross_compiling" = yes
7359then :
7360 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7361printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +01007362as_fn_error $? "cannot run test program while cross compiling
7363See \`config.log' for more details" "$LINENO" 5; }
Illia Bobyra96d5442023-08-30 16:30:15 +02007364else $as_nop
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7366/* end confdefs.h. */
7367
7368 #include <dlfcn.h>
7369 /* If this program fails, then RTLD_GLOBAL is needed.
7370 * RTLD_GLOBAL will be used and then it is not possible to
7371 * have both python versions enabled in the same vim instance.
Bram Moolenaar84a05ac2013-05-06 04:24:17 +02007372 * Only the first python version used will be switched on.
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007373 */
7374
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +01007375 static int no_rtl_global_needed_for(char *python_instsoname, char *prefix)
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007376 {
7377 int needed = 0;
Bram Moolenaarba59ddb2016-01-28 15:34:25 +01007378 void* pylib = dlopen(python_instsoname, RTLD_LAZY|RTLD_LOCAL);
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007379 if (pylib != 0)
7380 {
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007381 void (*pfx)(char *home) = dlsym(pylib, "Py_SetPythonHome");
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007382 void (*init)(void) = dlsym(pylib, "Py_Initialize");
7383 int (*simple)(char*) = dlsym(pylib, "PyRun_SimpleString");
7384 void (*final)(void) = dlsym(pylib, "Py_Finalize");
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007385 (*pfx)(prefix);
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007386 (*init)();
7387 needed = (*simple)("import termios") == -1;
7388 (*final)();
7389 dlclose(pylib);
7390 }
7391 return !needed;
7392 }
7393
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +01007394 int main()
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007395 {
7396 int not_needed = 0;
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007397 if (no_rtl_global_needed_for("${vi_cv_dll_name_python}", "${vi_cv_path_python_pfx}"))
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007398 not_needed = 1;
7399 return !not_needed;
7400 }
7401_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02007402if ac_fn_c_try_run "$LINENO"
7403then :
7404 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7405printf "%s\n" "yes" >&6; };printf "%s\n" "#define PY_NO_RTLD_GLOBAL 1" >>confdefs.h
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007406
Illia Bobyra96d5442023-08-30 16:30:15 +02007407else $as_nop
7408 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7409printf "%s\n" "no" >&6; }
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007410fi
7411rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7412 conftest.$ac_objext conftest.beam conftest.$ac_ext
7413fi
7414
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007415
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007416 CFLAGS=$cflags_save
Bram Moolenaar5d3fbf32015-03-05 16:47:20 +01007417 LIBS=$libs_save
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007418
Illia Bobyra96d5442023-08-30 16:30:15 +02007419 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we can do without RTLD_GLOBAL for Python3" >&5
7420printf %s "checking whether we can do without RTLD_GLOBAL for Python3... " >&6; }
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007421 cflags_save=$CFLAGS
7422 CFLAGS="$CFLAGS $PYTHON3_CFLAGS"
Bram Moolenaar5d3fbf32015-03-05 16:47:20 +01007423 libs_save=$LIBS
7424 LIBS="-ldl $LIBS"
Illia Bobyra96d5442023-08-30 16:30:15 +02007425 if test "$cross_compiling" = yes
7426then :
7427 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7428printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +01007429as_fn_error $? "cannot run test program while cross compiling
7430See \`config.log' for more details" "$LINENO" 5; }
Illia Bobyra96d5442023-08-30 16:30:15 +02007431else $as_nop
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7433/* end confdefs.h. */
7434
7435 #include <dlfcn.h>
7436 #include <wchar.h>
7437 /* If this program fails, then RTLD_GLOBAL is needed.
7438 * RTLD_GLOBAL will be used and then it is not possible to
7439 * have both python versions enabled in the same vim instance.
Bram Moolenaar84a05ac2013-05-06 04:24:17 +02007440 * Only the first python version used will be switched on.
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007441 */
7442
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +01007443 static int no_rtl_global_needed_for(char *python_instsoname, wchar_t *prefix)
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007444 {
7445 int needed = 0;
Bram Moolenaarba59ddb2016-01-28 15:34:25 +01007446 void* pylib = dlopen(python_instsoname, RTLD_LAZY|RTLD_LOCAL);
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007447 if (pylib != 0)
7448 {
7449 void (*pfx)(wchar_t *home) = dlsym(pylib, "Py_SetPythonHome");
7450 void (*init)(void) = dlsym(pylib, "Py_Initialize");
7451 int (*simple)(char*) = dlsym(pylib, "PyRun_SimpleString");
7452 void (*final)(void) = dlsym(pylib, "Py_Finalize");
7453 (*pfx)(prefix);
7454 (*init)();
7455 needed = (*simple)("import termios") == -1;
7456 (*final)();
7457 dlclose(pylib);
7458 }
7459 return !needed;
7460 }
7461
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +01007462 int main()
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007463 {
7464 int not_needed = 0;
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007465 if (no_rtl_global_needed_for("${vi_cv_dll_name_python3}", L"${vi_cv_path_python3_pfx}"))
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007466 not_needed = 1;
7467 return !not_needed;
7468 }
7469_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02007470if ac_fn_c_try_run "$LINENO"
7471then :
7472 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7473printf "%s\n" "yes" >&6; };printf "%s\n" "#define PY3_NO_RTLD_GLOBAL 1" >>confdefs.h
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007474
Illia Bobyra96d5442023-08-30 16:30:15 +02007475else $as_nop
7476 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7477printf "%s\n" "no" >&6; }
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007478fi
7479rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7480 conftest.$ac_objext conftest.beam conftest.$ac_ext
7481fi
7482
7483
7484 CFLAGS=$cflags_save
Bram Moolenaar5d3fbf32015-03-05 16:47:20 +01007485 LIBS=$libs_save
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007486
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007487 PYTHON_SRC="if_python.c"
7488 PYTHON_OBJ="objects/if_python.o"
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007489 PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${vi_cv_dll_name_python}\\\""
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007490 PYTHON_LIBS=
7491 PYTHON3_SRC="if_python3.c"
7492 PYTHON3_OBJ="objects/if_python3.o"
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007493 PYTHON3_CFLAGS="$PYTHON3_CFLAGS -DDYNAMIC_PYTHON3_DLL=\\\"${vi_cv_dll_name_python3}\\\""
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007494 PYTHON3_LIBS=
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007495elif test "$python_ok" = yes && test "$enable_pythoninterp" = "dynamic"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007496 printf "%s\n" "#define DYNAMIC_PYTHON 1" >>confdefs.h
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007497
7498 PYTHON_SRC="if_python.c"
7499 PYTHON_OBJ="objects/if_python.o"
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007500 PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${vi_cv_dll_name_python}\\\""
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007501 PYTHON_LIBS=
Bram Moolenaare741f272013-07-09 21:57:52 +02007502elif test "$python_ok" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007503 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -fPIE can be added for Python" >&5
7504printf %s "checking if -fPIE can be added for Python... " >&6; }
Bram Moolenaare741f272013-07-09 21:57:52 +02007505 cflags_save=$CFLAGS
7506 libs_save=$LIBS
7507 CFLAGS="$CFLAGS $PYTHON_CFLAGS -fPIE"
7508 LIBS="$LIBS $PYTHON_LIBS"
7509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7510/* end confdefs.h. */
7511
7512int
Illia Bobyra96d5442023-08-30 16:30:15 +02007513main (void)
Bram Moolenaare741f272013-07-09 21:57:52 +02007514{
7515
7516 ;
7517 return 0;
7518}
7519_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02007520if ac_fn_c_try_link "$LINENO"
7521then :
7522 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7523printf "%s\n" "yes" >&6; }; fpie_ok=yes
7524else $as_nop
7525 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7526printf "%s\n" "no" >&6; }; fpie_ok=no
Bram Moolenaare741f272013-07-09 21:57:52 +02007527fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007528rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaare741f272013-07-09 21:57:52 +02007529 conftest$ac_exeext conftest.$ac_ext
7530 CFLAGS=$cflags_save
7531 LIBS=$libs_save
7532 if test $fpie_ok = yes; then
7533 PYTHON_CFLAGS="$PYTHON_CFLAGS -fPIE"
7534 fi
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007535elif test "$python3_ok" = yes && test "$enable_python3interp" = "dynamic"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007536 printf "%s\n" "#define DYNAMIC_PYTHON3 1" >>confdefs.h
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007537
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007538 if test "X$vi_cv_var_python3_stable_abi_hex" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007539 printf "%s\n" "#define DYNAMIC_PYTHON3_STABLE_ABI 1" >>confdefs.h
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007540
7541 fi
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007542 PYTHON3_SRC="if_python3.c"
7543 PYTHON3_OBJ="objects/if_python3.o"
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007544 PYTHON3_CFLAGS="$PYTHON3_CFLAGS -DDYNAMIC_PYTHON3_DLL=\\\"${vi_cv_dll_name_python3}\\\""
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007545 PYTHON3_LIBS=
Bram Moolenaare741f272013-07-09 21:57:52 +02007546elif test "$python3_ok" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007547 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -fPIE can be added for Python3" >&5
7548printf %s "checking if -fPIE can be added for Python3... " >&6; }
Bram Moolenaare741f272013-07-09 21:57:52 +02007549 cflags_save=$CFLAGS
7550 libs_save=$LIBS
7551 CFLAGS="$CFLAGS $PYTHON3_CFLAGS -fPIE"
7552 LIBS="$LIBS $PYTHON3_LIBS"
7553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7554/* end confdefs.h. */
7555
7556int
Illia Bobyra96d5442023-08-30 16:30:15 +02007557main (void)
Bram Moolenaare741f272013-07-09 21:57:52 +02007558{
7559
7560 ;
7561 return 0;
7562}
7563_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02007564if ac_fn_c_try_link "$LINENO"
7565then :
7566 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7567printf "%s\n" "yes" >&6; }; fpie_ok=yes
7568else $as_nop
7569 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7570printf "%s\n" "no" >&6; }; fpie_ok=no
Bram Moolenaare741f272013-07-09 21:57:52 +02007571fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007572rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaare741f272013-07-09 21:57:52 +02007573 conftest$ac_exeext conftest.$ac_ext
7574 CFLAGS=$cflags_save
7575 LIBS=$libs_save
7576 if test $fpie_ok = yes; then
7577 PYTHON3_CFLAGS="$PYTHON3_CFLAGS -fPIE"
7578 fi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007579fi
7580
Illia Bobyra96d5442023-08-30 16:30:15 +02007581{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-tclinterp argument" >&5
7582printf %s "checking --enable-tclinterp argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00007583# Check whether --enable-tclinterp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02007584if test ${enable_tclinterp+y}
7585then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00007586 enableval=$enable_tclinterp;
Illia Bobyra96d5442023-08-30 16:30:15 +02007587else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00007588 enable_tclinterp="no"
Bram Moolenaar446cb832008-06-24 21:56:24 +00007589fi
7590
Illia Bobyra96d5442023-08-30 16:30:15 +02007591{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_tclinterp" >&5
7592printf "%s\n" "$enable_tclinterp" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007593
Bram Moolenaar8a5115c2016-01-09 19:41:11 +01007594if test "$enable_tclinterp" = "yes" -o "$enable_tclinterp" = "dynamic"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007595
Illia Bobyra96d5442023-08-30 16:30:15 +02007596 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-tclsh argument" >&5
7597printf %s "checking --with-tclsh argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007598
Bram Moolenaar446cb832008-06-24 21:56:24 +00007599# Check whether --with-tclsh was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02007600if test ${with_tclsh+y}
7601then :
7602 withval=$with_tclsh; tclsh_name="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tclsh_name" >&5
7603printf "%s\n" "$tclsh_name" >&6; }
7604else $as_nop
7605 tclsh_name="tclsh8.5"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7606printf "%s\n" "no" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00007607fi
7608
Bram Moolenaar071d4272004-06-13 20:20:40 +00007609 # Extract the first word of "$tclsh_name", so it can be a program name with args.
7610set dummy $tclsh_name; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02007611{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7612printf %s "checking for $ac_word... " >&6; }
7613if test ${ac_cv_path_vi_cv_path_tcl+y}
7614then :
7615 printf %s "(cached) " >&6
7616else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007617 case $vi_cv_path_tcl in
7618 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00007619 ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
7620 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00007621 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007622 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7623for as_dir in $PATH
7624do
7625 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02007626 case $as_dir in #(((
7627 '') as_dir=./ ;;
7628 */) ;;
7629 *) as_dir=$as_dir/ ;;
7630 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007631 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02007632 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7633 ac_cv_path_vi_cv_path_tcl="$as_dir$ac_word$ac_exec_ext"
7634 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007635 break 2
7636 fi
7637done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007638 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00007639IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007640
Bram Moolenaar071d4272004-06-13 20:20:40 +00007641 ;;
7642esac
7643fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007644vi_cv_path_tcl=$ac_cv_path_vi_cv_path_tcl
Bram Moolenaar071d4272004-06-13 20:20:40 +00007645if test -n "$vi_cv_path_tcl"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007646 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_tcl" >&5
7647printf "%s\n" "$vi_cv_path_tcl" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007648else
Illia Bobyra96d5442023-08-30 16:30:15 +02007649 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7650printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007651fi
7652
Bram Moolenaar071d4272004-06-13 20:20:40 +00007653
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007654
Bram Moolenaar446cb832008-06-24 21:56:24 +00007655
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00007656 if test "X$vi_cv_path_tcl" = "X" -a $tclsh_name = "tclsh8.5"; then
7657 tclsh_name="tclsh8.4"
7658 # Extract the first word of "$tclsh_name", so it can be a program name with args.
7659set dummy $tclsh_name; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02007660{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7661printf %s "checking for $ac_word... " >&6; }
7662if test ${ac_cv_path_vi_cv_path_tcl+y}
7663then :
7664 printf %s "(cached) " >&6
7665else $as_nop
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00007666 case $vi_cv_path_tcl in
7667 [\\/]* | ?:[\\/]*)
7668 ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
7669 ;;
7670 *)
7671 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7672for as_dir in $PATH
7673do
7674 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02007675 case $as_dir in #(((
7676 '') as_dir=./ ;;
7677 */) ;;
7678 *) as_dir=$as_dir/ ;;
7679 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007680 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02007681 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7682 ac_cv_path_vi_cv_path_tcl="$as_dir$ac_word$ac_exec_ext"
7683 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00007684 break 2
7685 fi
7686done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007687 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00007688IFS=$as_save_IFS
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00007689
7690 ;;
7691esac
7692fi
7693vi_cv_path_tcl=$ac_cv_path_vi_cv_path_tcl
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00007694if test -n "$vi_cv_path_tcl"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007695 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_tcl" >&5
7696printf "%s\n" "$vi_cv_path_tcl" >&6; }
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00007697else
Illia Bobyra96d5442023-08-30 16:30:15 +02007698 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7699printf "%s\n" "no" >&6; }
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00007700fi
7701
Bram Moolenaar446cb832008-06-24 21:56:24 +00007702
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00007703 fi
7704 if test "X$vi_cv_path_tcl" = "X" -a $tclsh_name = "tclsh8.4"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007705 tclsh_name="tclsh8.2"
7706 # Extract the first word of "$tclsh_name", so it can be a program name with args.
7707set dummy $tclsh_name; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02007708{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7709printf %s "checking for $ac_word... " >&6; }
7710if test ${ac_cv_path_vi_cv_path_tcl+y}
7711then :
7712 printf %s "(cached) " >&6
7713else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007714 case $vi_cv_path_tcl in
7715 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00007716 ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
7717 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00007718 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007719 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7720for as_dir in $PATH
7721do
7722 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02007723 case $as_dir in #(((
7724 '') as_dir=./ ;;
7725 */) ;;
7726 *) as_dir=$as_dir/ ;;
7727 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007728 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02007729 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7730 ac_cv_path_vi_cv_path_tcl="$as_dir$ac_word$ac_exec_ext"
7731 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007732 break 2
7733 fi
7734done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007735 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00007736IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007737
Bram Moolenaar071d4272004-06-13 20:20:40 +00007738 ;;
7739esac
7740fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007741vi_cv_path_tcl=$ac_cv_path_vi_cv_path_tcl
Bram Moolenaar071d4272004-06-13 20:20:40 +00007742if test -n "$vi_cv_path_tcl"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007743 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_tcl" >&5
7744printf "%s\n" "$vi_cv_path_tcl" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007745else
Illia Bobyra96d5442023-08-30 16:30:15 +02007746 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7747printf "%s\n" "no" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007748fi
7749
Bram Moolenaar446cb832008-06-24 21:56:24 +00007750
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007751 fi
7752 if test "X$vi_cv_path_tcl" = "X" -a $tclsh_name = "tclsh8.2"; then
7753 tclsh_name="tclsh8.0"
7754 # Extract the first word of "$tclsh_name", so it can be a program name with args.
7755set dummy $tclsh_name; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02007756{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7757printf %s "checking for $ac_word... " >&6; }
7758if test ${ac_cv_path_vi_cv_path_tcl+y}
7759then :
7760 printf %s "(cached) " >&6
7761else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007762 case $vi_cv_path_tcl in
7763 [\\/]* | ?:[\\/]*)
7764 ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
7765 ;;
7766 *)
7767 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7768for as_dir in $PATH
7769do
7770 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02007771 case $as_dir in #(((
7772 '') as_dir=./ ;;
7773 */) ;;
7774 *) as_dir=$as_dir/ ;;
7775 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007776 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02007777 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7778 ac_cv_path_vi_cv_path_tcl="$as_dir$ac_word$ac_exec_ext"
7779 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007780 break 2
7781 fi
7782done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007783 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00007784IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007785
7786 ;;
7787esac
7788fi
7789vi_cv_path_tcl=$ac_cv_path_vi_cv_path_tcl
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007790if test -n "$vi_cv_path_tcl"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007791 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_tcl" >&5
7792printf "%s\n" "$vi_cv_path_tcl" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007793else
Illia Bobyra96d5442023-08-30 16:30:15 +02007794 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7795printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007796fi
7797
Bram Moolenaar446cb832008-06-24 21:56:24 +00007798
Bram Moolenaar071d4272004-06-13 20:20:40 +00007799 fi
7800 if test "X$vi_cv_path_tcl" = "X"; then
7801 tclsh_name="tclsh"
7802 # Extract the first word of "$tclsh_name", so it can be a program name with args.
7803set dummy $tclsh_name; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02007804{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7805printf %s "checking for $ac_word... " >&6; }
7806if test ${ac_cv_path_vi_cv_path_tcl+y}
7807then :
7808 printf %s "(cached) " >&6
7809else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007810 case $vi_cv_path_tcl in
7811 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00007812 ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
7813 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00007814 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007815 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7816for as_dir in $PATH
7817do
7818 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02007819 case $as_dir in #(((
7820 '') as_dir=./ ;;
7821 */) ;;
7822 *) as_dir=$as_dir/ ;;
7823 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007824 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02007825 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7826 ac_cv_path_vi_cv_path_tcl="$as_dir$ac_word$ac_exec_ext"
7827 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007828 break 2
7829 fi
7830done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007831 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00007832IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007833
Bram Moolenaar071d4272004-06-13 20:20:40 +00007834 ;;
7835esac
7836fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007837vi_cv_path_tcl=$ac_cv_path_vi_cv_path_tcl
Bram Moolenaar071d4272004-06-13 20:20:40 +00007838if test -n "$vi_cv_path_tcl"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007839 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_tcl" >&5
7840printf "%s\n" "$vi_cv_path_tcl" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007841else
Illia Bobyra96d5442023-08-30 16:30:15 +02007842 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7843printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007844fi
7845
Bram Moolenaar446cb832008-06-24 21:56:24 +00007846
Bram Moolenaar071d4272004-06-13 20:20:40 +00007847 fi
7848 if test "X$vi_cv_path_tcl" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007849 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Tcl version" >&5
7850printf %s "checking Tcl version... " >&6; }
Bram Moolenaar49222be2015-12-11 18:11:30 +01007851 if echo 'exit [expr [info tclversion] < 8.0]' | "$vi_cv_path_tcl" - ; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007852 tclver=`echo 'puts [info tclversion]' | $vi_cv_path_tcl -`
Illia Bobyra96d5442023-08-30 16:30:15 +02007853 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tclver - OK" >&5
7854printf "%s\n" "$tclver - OK" >&6; };
Bram Moolenaar071d4272004-06-13 20:20:40 +00007855 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 +01007856 tcldll=`echo 'puts libtcl[info tclversion][info sharedlibextension]' | $vi_cv_path_tcl -`
Bram Moolenaar071d4272004-06-13 20:20:40 +00007857
Illia Bobyra96d5442023-08-30 16:30:15 +02007858 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for location of Tcl include" >&5
7859printf %s "checking for location of Tcl include... " >&6; }
Bram Moolenaard0573012017-10-28 21:11:06 +02007860 if test "x$MACOS_X" != "xyes"; then
Bram Moolenaar446cb832008-06-24 21:56:24 +00007861 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 +00007862 else
Bram Moolenaarf4ee5282020-07-30 20:18:08 +02007863 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 +00007864 fi
Bram Moolenaar0ff8f602008-02-20 11:44:03 +00007865 TCL_INC=
Bram Moolenaar071d4272004-06-13 20:20:40 +00007866 for try in $tclinc; do
7867 if test -f "$try/tcl.h"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007868 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $try/tcl.h" >&5
7869printf "%s\n" "$try/tcl.h" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007870 TCL_INC=$try
7871 break
7872 fi
7873 done
7874 if test -z "$TCL_INC"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007875 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <not found>" >&5
7876printf "%s\n" "<not found>" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007877 SKIP_TCL=YES
7878 fi
7879 if test -z "$SKIP_TCL"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007880 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for location of tclConfig.sh script" >&5
7881printf %s "checking for location of tclConfig.sh script... " >&6; }
Bram Moolenaard0573012017-10-28 21:11:06 +02007882 if test "x$MACOS_X" != "xyes"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007883 tclcnf=`echo $tclinc | sed s/include/lib/g`
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00007884 tclcnf="$tclcnf `echo $tclinc | sed s/include/lib64/g`"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007885 else
Bram Moolenaarf4ee5282020-07-30 20:18:08 +02007886 tclcnf=`echo $tclinc | sed s/include/lib/g`
7887 tclcnf="$tclcnf /System/Library/Frameworks/Tcl.framework `xcrun --show-sdk-path`/System/Library/Frameworks/Tcl.framework"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007888 fi
7889 for try in $tclcnf; do
Bram Moolenaar49222be2015-12-11 18:11:30 +01007890 if test -f "$try/tclConfig.sh"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007891 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $try/tclConfig.sh" >&5
7892printf "%s\n" "$try/tclConfig.sh" >&6; }
Bram Moolenaar49222be2015-12-11 18:11:30 +01007893 . "$try/tclConfig.sh"
Bram Moolenaar8a5115c2016-01-09 19:41:11 +01007894 if test "$enable_tclinterp" = "dynamic"; then
7895 TCL_LIBS=`eval echo "$TCL_STUB_LIB_SPEC $TCL_LIBS"`
7896 else
7897 TCL_LIBS=`eval echo "$TCL_LIB_SPEC $TCL_LIBS"`
7898 fi
Bram Moolenaar4394bff2008-07-24 11:21:31 +00007899 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 +00007900 break
7901 fi
7902 done
7903 if test -z "$TCL_LIBS"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007904 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <not found>" >&5
7905printf "%s\n" "<not found>" >&6; }
7906 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Tcl library by myself" >&5
7907printf %s "checking for Tcl library by myself... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007908 tcllib=`echo $tclinc | sed s/include/lib/g`
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00007909 tcllib="$tcllib `echo $tclinc | sed s/include/lib64/g`"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007910 for ext in .so .a ; do
7911 for ver in "" $tclver ; do
7912 for try in $tcllib ; do
7913 trylib=tcl$ver$ext
Bram Moolenaar49222be2015-12-11 18:11:30 +01007914 if test -f "$try/lib$trylib" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007915 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $try/lib$trylib" >&5
7916printf "%s\n" "$try/lib$trylib" >&6; }
Bram Moolenaar49222be2015-12-11 18:11:30 +01007917 TCL_LIBS="-L\"$try\" -ltcl$ver -ldl -lm"
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00007918 if test "$vim_cv_uname_output" = SunOS &&
7919 echo $vim_cv_uname_r_output | grep '^5' >/dev/null; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007920 TCL_LIBS="$TCL_LIBS -R $try"
7921 fi
7922 break 3
7923 fi
7924 done
7925 done
7926 done
7927 if test -z "$TCL_LIBS"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007928 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <not found>" >&5
7929printf "%s\n" "<not found>" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007930 SKIP_TCL=YES
7931 fi
7932 fi
7933 if test -z "$SKIP_TCL"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007934 printf "%s\n" "#define FEAT_TCL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00007935
7936 TCL_SRC=if_tcl.c
7937 TCL_OBJ=objects/if_tcl.o
7938 TCL_PRO=if_tcl.pro
7939 TCL_CFLAGS="-I$TCL_INC $TCL_DEFS"
7940 fi
7941 fi
7942 else
Illia Bobyra96d5442023-08-30 16:30:15 +02007943 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: too old; need Tcl version 8.0 or later" >&5
7944printf "%s\n" "too old; need Tcl version 8.0 or later" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007945 fi
7946 fi
Bram Moolenaar8a5115c2016-01-09 19:41:11 +01007947 if test "$enable_tclinterp" = "dynamic"; then
7948 if test "X$TCL_SRC" != "X" -a "X$tcldll" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007949 printf "%s\n" "#define DYNAMIC_TCL 1" >>confdefs.h
Bram Moolenaar8a5115c2016-01-09 19:41:11 +01007950
7951 TCL_CFLAGS="-DDYNAMIC_TCL_DLL=\\\"$tcldll\\\" -DDYNAMIC_TCL_VER=\\\"$tclver\\\" $TCL_CFLAGS"
7952 fi
7953 fi
Bram Moolenaarf788a062011-12-14 20:51:25 +01007954 if test "$fail_if_missing" = "yes" -a -z "$TCL_SRC"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01007955 as_fn_error $? "could not configure Tcl" "$LINENO" 5
Bram Moolenaarf788a062011-12-14 20:51:25 +01007956 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00007957fi
7958
7959
7960
7961
7962
7963
ichizok8bb3fe42021-12-28 15:51:45 +00007964
Illia Bobyra96d5442023-08-30 16:30:15 +02007965{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-rubyinterp argument" >&5
7966printf %s "checking --enable-rubyinterp argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00007967# Check whether --enable-rubyinterp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02007968if test ${enable_rubyinterp+y}
7969then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00007970 enableval=$enable_rubyinterp;
Illia Bobyra96d5442023-08-30 16:30:15 +02007971else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00007972 enable_rubyinterp="no"
Bram Moolenaar446cb832008-06-24 21:56:24 +00007973fi
7974
Illia Bobyra96d5442023-08-30 16:30:15 +02007975{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_rubyinterp" >&5
7976printf "%s\n" "$enable_rubyinterp" >&6; }
Bram Moolenaar3ca71f12010-10-27 16:49:47 +02007977if test "$enable_rubyinterp" = "yes" -o "$enable_rubyinterp" = "dynamic"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00007978 if test "$has_eval" = "no"; then
Martin Tournoij7904fa42022-10-04 16:28:45 +01007979 as_fn_error $? "cannot use Ruby with tiny features" "$LINENO" 5
Bram Moolenaar0b105412014-11-30 13:34:23 +01007980 fi
7981
Illia Bobyra96d5442023-08-30 16:30:15 +02007982 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-ruby-command argument" >&5
7983printf %s "checking --with-ruby-command argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007984
Bram Moolenaar948733a2011-05-05 18:10:16 +02007985
Bram Moolenaar165641d2010-02-17 16:23:09 +01007986# Check whether --with-ruby-command was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02007987if test ${with_ruby_command+y}
7988then :
7989 withval=$with_ruby_command; RUBY_CMD="$withval"; vi_cv_path_ruby="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RUBY_CMD" >&5
7990printf "%s\n" "$RUBY_CMD" >&6; }
7991else $as_nop
7992 RUBY_CMD="ruby"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: defaulting to $RUBY_CMD" >&5
7993printf "%s\n" "defaulting to $RUBY_CMD" >&6; }
Bram Moolenaar165641d2010-02-17 16:23:09 +01007994fi
7995
Bram Moolenaar165641d2010-02-17 16:23:09 +01007996 # Extract the first word of "$RUBY_CMD", so it can be a program name with args.
7997set dummy $RUBY_CMD; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02007998{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7999printf %s "checking for $ac_word... " >&6; }
8000if test ${ac_cv_path_vi_cv_path_ruby+y}
8001then :
8002 printf %s "(cached) " >&6
8003else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008004 case $vi_cv_path_ruby in
8005 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00008006 ac_cv_path_vi_cv_path_ruby="$vi_cv_path_ruby" # Let the user override the test with a path.
8007 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00008008 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008009 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8010for as_dir in $PATH
8011do
8012 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02008013 case $as_dir in #(((
8014 '') as_dir=./ ;;
8015 */) ;;
8016 *) as_dir=$as_dir/ ;;
8017 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008018 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02008019 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8020 ac_cv_path_vi_cv_path_ruby="$as_dir$ac_word$ac_exec_ext"
8021 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008022 break 2
8023 fi
8024done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008025 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00008026IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008027
Bram Moolenaar071d4272004-06-13 20:20:40 +00008028 ;;
8029esac
8030fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008031vi_cv_path_ruby=$ac_cv_path_vi_cv_path_ruby
Bram Moolenaar071d4272004-06-13 20:20:40 +00008032if test -n "$vi_cv_path_ruby"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008033 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_ruby" >&5
8034printf "%s\n" "$vi_cv_path_ruby" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008035else
Illia Bobyra96d5442023-08-30 16:30:15 +02008036 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8037printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008038fi
8039
Bram Moolenaar446cb832008-06-24 21:56:24 +00008040
Bram Moolenaar071d4272004-06-13 20:20:40 +00008041 if test "X$vi_cv_path_ruby" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008042 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Ruby version" >&5
8043printf %s "checking Ruby version... " >&6; }
K.Takata236ccbf2022-09-22 16:12:06 +01008044 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 +02008045 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: OK" >&5
8046printf "%s\n" "OK" >&6; }
8047 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Ruby rbconfig" >&5
8048printf %s "checking Ruby rbconfig... " >&6; }
Bram Moolenaar81398892012-10-03 21:09:35 +02008049 ruby_rbconfig="RbConfig"
8050 if ! $vi_cv_path_ruby -r rbconfig -e 'RbConfig' >/dev/null 2>/dev/null; then
8051 ruby_rbconfig="Config"
8052 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008053 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ruby_rbconfig" >&5
8054printf "%s\n" "$ruby_rbconfig" >&6; }
8055 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Ruby header files" >&5
8056printf %s "checking Ruby header files... " >&6; }
Bram Moolenaar81398892012-10-03 21:09:35 +02008057 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 +00008058 if test "X$rubyhdrdir" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008059 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $rubyhdrdir" >&5
8060printf "%s\n" "$rubyhdrdir" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008061 RUBY_CFLAGS="-I$rubyhdrdir"
Bram Moolenaara6fd37b2014-03-27 17:19:09 +01008062 rubyarchdir=`$vi_cv_path_ruby -r rbconfig -e "print ($ruby_rbconfig::CONFIG.has_key? 'rubyarchhdrdir') ? $ruby_rbconfig::CONFIG['rubyarchhdrdir'] : '$rubyhdrdir/'+$ruby_rbconfig::CONFIG['arch']"`
8063 if test -d "$rubyarchdir"; then
8064 RUBY_CFLAGS="$RUBY_CFLAGS -I$rubyarchdir"
Bram Moolenaar165641d2010-02-17 16:23:09 +01008065 fi
Bram Moolenaar81398892012-10-03 21:09:35 +02008066 rubyversion=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG['ruby_version'].gsub(/\./, '')[0,2]"`
Bram Moolenaar026a4452013-08-07 15:22:23 +02008067 if test "X$rubyversion" = "X"; then
K.Takata236ccbf2022-09-22 16:12:06 +01008068 rubyversion=`$vi_cv_path_ruby -e "print RUBY_VERSION.gsub(/\./, '')[0,2]"`
Bram Moolenaar026a4452013-08-07 15:22:23 +02008069 fi
Bram Moolenaar165641d2010-02-17 16:23:09 +01008070 RUBY_CFLAGS="$RUBY_CFLAGS -DRUBY_VERSION=$rubyversion"
Bram Moolenaar81398892012-10-03 21:09:35 +02008071 rubylibs=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG['LIBS']"`
Bram Moolenaar071d4272004-06-13 20:20:40 +00008072 if test "X$rubylibs" != "X"; then
8073 RUBY_LIBS="$rubylibs"
8074 fi
Bram Moolenaar81398892012-10-03 21:09:35 +02008075 librubyarg=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG['LIBRUBYARG'])"`
8076 librubya=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG['LIBRUBY_A'])"`
Bram Moolenaarac499e32013-06-02 19:14:17 +02008077 rubylibdir=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG['libdir'])"`
Bram Moolenaard5a986f2020-12-06 21:11:31 +01008078 if test -f "$rubylibdir/$librubya" || expr "$librubyarg" : "-lruby"; then
Bram Moolenaarac499e32013-06-02 19:14:17 +02008079 RUBY_LIBS="$RUBY_LIBS -L$rubylibdir"
8080 elif test "$librubyarg" = "libruby.a"; then
8081 librubyarg="-lruby"
8082 RUBY_LIBS="$RUBY_LIBS -L$rubylibdir"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008083 fi
8084
8085 if test "X$librubyarg" != "X"; then
8086 RUBY_LIBS="$librubyarg $RUBY_LIBS"
8087 fi
Zdenek Dohnal1d822af2022-11-23 12:06:08 +00008088
8089
Bram Moolenaar071d4272004-06-13 20:20:40 +00008090 RUBY_SRC="if_ruby.c"
8091 RUBY_OBJ="objects/if_ruby.o"
8092 RUBY_PRO="if_ruby.pro"
Illia Bobyra96d5442023-08-30 16:30:15 +02008093 printf "%s\n" "#define FEAT_RUBY 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00008094
Bram Moolenaar3ca71f12010-10-27 16:49:47 +02008095 if test "$enable_rubyinterp" = "dynamic"; then
Bram Moolenaar92021622017-10-12 12:33:43 +02008096 libruby_soname=`$vi_cv_path_ruby -r rbconfig -e "puts $ruby_rbconfig::CONFIG['LIBRUBY_ALIASES'].split[0]"`
Bram Moolenaar87ea64c2018-08-04 15:13:34 +02008097 if test -z "$libruby_soname"; then
8098 libruby_soname=`$vi_cv_path_ruby -r rbconfig -e "puts $ruby_rbconfig::CONFIG['LIBRUBY_SO']"`
8099 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008100 printf "%s\n" "#define DYNAMIC_RUBY 1" >>confdefs.h
Bram Moolenaar3ca71f12010-10-27 16:49:47 +02008101
Bram Moolenaar41a41412020-01-07 21:32:19 +01008102 RUBY_CFLAGS="-DDYNAMIC_RUBY_DLL=\\\"$libruby_soname\\\" $RUBY_CFLAGS"
Bram Moolenaar3ca71f12010-10-27 16:49:47 +02008103 RUBY_LIBS=
8104 fi
Bram Moolenaar864a28b2020-12-28 21:36:56 +01008105 if test "X$CLANG_VERSION" != "X" -a "$rubyversion" -ge 30; then
8106 RUBY_CFLAGS="$RUBY_CFLAGS -fdeclspec"
8107 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00008108 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008109 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found; disabling Ruby" >&5
8110printf "%s\n" "not found; disabling Ruby" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008111 fi
8112 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008113 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: too old; need Ruby version 1.9.1 or later" >&5
8114printf "%s\n" "too old; need Ruby version 1.9.1 or later" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008115 fi
8116 fi
Bram Moolenaarf788a062011-12-14 20:51:25 +01008117
8118 if test "$fail_if_missing" = "yes" -a -z "$RUBY_OBJ"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01008119 as_fn_error $? "could not configure Ruby" "$LINENO" 5
Bram Moolenaarf788a062011-12-14 20:51:25 +01008120 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00008121fi
8122
8123
8124
8125
8126
8127
ichizok8bb3fe42021-12-28 15:51:45 +00008128
Illia Bobyra96d5442023-08-30 16:30:15 +02008129{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-cscope argument" >&5
8130printf %s "checking --enable-cscope argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00008131# Check whether --enable-cscope was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008132if test ${enable_cscope+y}
8133then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00008134 enableval=$enable_cscope;
Illia Bobyra96d5442023-08-30 16:30:15 +02008135else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00008136 enable_cscope="no"
Bram Moolenaar446cb832008-06-24 21:56:24 +00008137fi
8138
Illia Bobyra96d5442023-08-30 16:30:15 +02008139{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_cscope" >&5
8140printf "%s\n" "$enable_cscope" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008141if test "$enable_cscope" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008142 printf "%s\n" "#define FEAT_CSCOPE 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00008143
8144fi
8145
Illia Bobyra96d5442023-08-30 16:30:15 +02008146{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-netbeans argument" >&5
8147printf %s "checking --disable-netbeans argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00008148# Check whether --enable-netbeans was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008149if test ${enable_netbeans+y}
8150then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00008151 enableval=$enable_netbeans;
Illia Bobyra96d5442023-08-30 16:30:15 +02008152else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00008153 enable_netbeans="yes"
Bram Moolenaar446cb832008-06-24 21:56:24 +00008154fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008155
Bram Moolenaar446cb832008-06-24 21:56:24 +00008156if test "$enable_netbeans" = "yes"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00008157 if test "$has_eval" = "no"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008158 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot use NetBeans with tiny features" >&5
8159printf "%s\n" "cannot use NetBeans with tiny features" >&6; }
Bram Moolenaar3c124e32016-01-31 14:36:58 +01008160 enable_netbeans="no"
8161 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008162 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8163printf "%s\n" "no" >&6; }
Bram Moolenaar3c124e32016-01-31 14:36:58 +01008164 fi
Bram Moolenaare0874f82016-01-24 20:36:41 +01008165else
Illia Bobyra96d5442023-08-30 16:30:15 +02008166 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8167printf "%s\n" "yes" >&6; }
Bram Moolenaare0874f82016-01-24 20:36:41 +01008168fi
8169
Illia Bobyra96d5442023-08-30 16:30:15 +02008170{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-channel argument" >&5
8171printf %s "checking --disable-channel argument... " >&6; }
Bram Moolenaare0874f82016-01-24 20:36:41 +01008172# Check whether --enable-channel was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008173if test ${enable_channel+y}
8174then :
Bram Moolenaare0874f82016-01-24 20:36:41 +01008175 enableval=$enable_channel;
Illia Bobyra96d5442023-08-30 16:30:15 +02008176else $as_nop
Bram Moolenaare0874f82016-01-24 20:36:41 +01008177 enable_channel="yes"
8178fi
8179
8180if test "$enable_channel" = "yes"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00008181 if test "$has_eval" = "no"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008182 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot use channels with tiny features" >&5
8183printf "%s\n" "cannot use channels with tiny features" >&6; }
Bram Moolenaar3c124e32016-01-31 14:36:58 +01008184 enable_channel="no"
8185 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008186 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8187printf "%s\n" "no" >&6; }
Bram Moolenaar3c124e32016-01-31 14:36:58 +01008188 fi
Bram Moolenaare0874f82016-01-24 20:36:41 +01008189else
Bram Moolenaar16435482016-01-24 21:31:54 +01008190 if test "$enable_netbeans" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008191 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, netbeans also disabled" >&5
8192printf "%s\n" "yes, netbeans also disabled" >&6; }
Bram Moolenaar16435482016-01-24 21:31:54 +01008193 enable_netbeans="no"
8194 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008195 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8196printf "%s\n" "yes" >&6; }
Bram Moolenaar16435482016-01-24 21:31:54 +01008197 fi
Bram Moolenaare0874f82016-01-24 20:36:41 +01008198fi
8199
Bram Moolenaar16435482016-01-24 21:31:54 +01008200if test "$enable_channel" = "yes"; then
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008201 if test "x$HAIKU" = "xyes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008202 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socket in -lnetwork" >&5
8203printf %s "checking for socket in -lnetwork... " >&6; }
8204if test ${ac_cv_lib_network_socket+y}
8205then :
8206 printf %s "(cached) " >&6
8207else $as_nop
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008208 ac_check_lib_save_LIBS=$LIBS
8209LIBS="-lnetwork $LIBS"
8210cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8211/* end confdefs.h. */
8212
8213/* Override any GCC internal prototype to avoid an error.
8214 Use char because int might match the return type of a GCC
8215 builtin and then its argument prototype would still apply. */
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008216char socket ();
8217int
Illia Bobyra96d5442023-08-30 16:30:15 +02008218main (void)
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008219{
8220return socket ();
8221 ;
8222 return 0;
8223}
8224_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02008225if ac_fn_c_try_link "$LINENO"
8226then :
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008227 ac_cv_lib_network_socket=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02008228else $as_nop
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008229 ac_cv_lib_network_socket=no
8230fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008231rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008232 conftest$ac_exeext conftest.$ac_ext
8233LIBS=$ac_check_lib_save_LIBS
8234fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008235{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_network_socket" >&5
8236printf "%s\n" "$ac_cv_lib_network_socket" >&6; }
8237if test "x$ac_cv_lib_network_socket" = xyes
8238then :
8239 printf "%s\n" "#define HAVE_LIBNETWORK 1" >>confdefs.h
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008240
8241 LIBS="-lnetwork $LIBS"
8242
8243fi
8244
8245 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008246 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8247printf %s "checking for socket in -lsocket... " >&6; }
8248if test ${ac_cv_lib_socket_socket+y}
8249then :
8250 printf %s "(cached) " >&6
8251else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008252 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00008253LIBS="-lsocket $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008254cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008255/* end confdefs.h. */
8256
Bram Moolenaar446cb832008-06-24 21:56:24 +00008257/* Override any GCC internal prototype to avoid an error.
8258 Use char because int might match the return type of a GCC
8259 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008260char socket ();
8261int
Illia Bobyra96d5442023-08-30 16:30:15 +02008262main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008263{
Bram Moolenaar446cb832008-06-24 21:56:24 +00008264return socket ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008265 ;
8266 return 0;
8267}
8268_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02008269if ac_fn_c_try_link "$LINENO"
8270then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008271 ac_cv_lib_socket_socket=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02008272else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008273 ac_cv_lib_socket_socket=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00008274fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008275rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008276 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008277LIBS=$ac_check_lib_save_LIBS
8278fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008279{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8280printf "%s\n" "$ac_cv_lib_socket_socket" >&6; }
8281if test "x$ac_cv_lib_socket_socket" = xyes
8282then :
8283 printf "%s\n" "#define HAVE_LIBSOCKET 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00008284
8285 LIBS="-lsocket $LIBS"
8286
Bram Moolenaar071d4272004-06-13 20:20:40 +00008287fi
8288
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008289 fi
8290
Illia Bobyra96d5442023-08-30 16:30:15 +02008291 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether compiling with IPv6 networking is possible" >&5
8292printf %s "checking whether compiling with IPv6 networking is possible... " >&6; }
8293if test ${vim_cv_ipv6_networking+y}
8294then :
8295 printf %s "(cached) " >&6
8296else $as_nop
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8298/* end confdefs.h. */
8299
8300#include <stdio.h>
8301#include <stdlib.h>
8302#include <stdarg.h>
8303#include <fcntl.h>
8304#include <netdb.h>
8305#include <netinet/in.h>
8306#include <errno.h>
8307#include <sys/types.h>
8308#include <sys/socket.h>
8309 /* Check bitfields */
8310 struct nbbuf {
8311 unsigned int initDone:1;
8312 unsigned short signmaplen;
8313 };
8314
8315int
Illia Bobyra96d5442023-08-30 16:30:15 +02008316main (void)
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008317{
8318
8319 /* Check creating a socket. */
8320 struct sockaddr_in server;
8321 struct addrinfo *res;
8322 (void)socket(AF_INET, SOCK_STREAM, 0);
8323 (void)htons(100);
8324 (void)getaddrinfo("microsoft.com", NULL, NULL, &res);
8325 if (errno == ECONNREFUSED)
8326 (void)connect(1, (struct sockaddr *)&server, sizeof(server));
8327 (void)freeaddrinfo(res);
8328
8329 ;
8330 return 0;
8331}
8332_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02008333if ac_fn_c_try_link "$LINENO"
8334then :
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008335 vim_cv_ipv6_networking="yes"
Illia Bobyra96d5442023-08-30 16:30:15 +02008336else $as_nop
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008337 vim_cv_ipv6_networking="no"
8338fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008339rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008340 conftest$ac_exeext conftest.$ac_ext
8341fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008342{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_ipv6_networking" >&5
8343printf "%s\n" "$vim_cv_ipv6_networking" >&6; }
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008344
8345 if test "x$vim_cv_ipv6_networking" = "xyes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008346 printf "%s\n" "#define FEAT_IPV6 1" >>confdefs.h
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008347
Illia Bobyra96d5442023-08-30 16:30:15 +02008348 ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
8349if test "x$ac_cv_func_inet_ntop" = xyes
8350then :
8351 printf "%s\n" "#define HAVE_INET_NTOP 1" >>confdefs.h
Bram Moolenaarb6fb0512020-04-18 18:24:18 +02008352
8353fi
Bram Moolenaarb6fb0512020-04-18 18:24:18 +02008354
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008355 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008356 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
8357printf %s "checking for gethostbyname in -lnsl... " >&6; }
8358if test ${ac_cv_lib_nsl_gethostbyname+y}
8359then :
8360 printf %s "(cached) " >&6
8361else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008362 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00008363LIBS="-lnsl $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008364cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008365/* end confdefs.h. */
8366
Bram Moolenaar446cb832008-06-24 21:56:24 +00008367/* Override any GCC internal prototype to avoid an error.
8368 Use char because int might match the return type of a GCC
8369 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008370char gethostbyname ();
8371int
Illia Bobyra96d5442023-08-30 16:30:15 +02008372main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008373{
Bram Moolenaar446cb832008-06-24 21:56:24 +00008374return gethostbyname ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008375 ;
8376 return 0;
8377}
8378_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02008379if ac_fn_c_try_link "$LINENO"
8380then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008381 ac_cv_lib_nsl_gethostbyname=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02008382else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008383 ac_cv_lib_nsl_gethostbyname=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00008384fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008385rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008386 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008387LIBS=$ac_check_lib_save_LIBS
8388fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008389{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
8390printf "%s\n" "$ac_cv_lib_nsl_gethostbyname" >&6; }
8391if test "x$ac_cv_lib_nsl_gethostbyname" = xyes
8392then :
8393 printf "%s\n" "#define HAVE_LIBNSL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00008394
8395 LIBS="-lnsl $LIBS"
8396
Bram Moolenaar071d4272004-06-13 20:20:40 +00008397fi
8398
Illia Bobyra96d5442023-08-30 16:30:15 +02008399 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether compiling with IPv4 networking is possible" >&5
8400printf %s "checking whether compiling with IPv4 networking is possible... " >&6; }
8401if test ${vim_cv_ipv4_networking+y}
8402then :
8403 printf %s "(cached) " >&6
8404else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008406/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00008407
8408#include <stdio.h>
8409#include <stdlib.h>
8410#include <stdarg.h>
8411#include <fcntl.h>
8412#include <netdb.h>
8413#include <netinet/in.h>
8414#include <errno.h>
8415#include <sys/types.h>
8416#include <sys/socket.h>
8417 /* Check bitfields */
8418 struct nbbuf {
8419 unsigned int initDone:1;
Bram Moolenaar63de19e2016-12-09 20:11:26 +01008420 unsigned short signmaplen;
Bram Moolenaar071d4272004-06-13 20:20:40 +00008421 };
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008422
8423int
Illia Bobyra96d5442023-08-30 16:30:15 +02008424main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008425{
Bram Moolenaar071d4272004-06-13 20:20:40 +00008426
8427 /* Check creating a socket. */
8428 struct sockaddr_in server;
8429 (void)socket(AF_INET, SOCK_STREAM, 0);
8430 (void)htons(100);
8431 (void)gethostbyname("microsoft.com");
8432 if (errno == ECONNREFUSED)
8433 (void)connect(1, (struct sockaddr *)&server, sizeof(server));
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008434
8435 ;
8436 return 0;
8437}
8438_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02008439if ac_fn_c_try_link "$LINENO"
8440then :
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008441 vim_cv_ipv4_networking="yes"
Illia Bobyra96d5442023-08-30 16:30:15 +02008442else $as_nop
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008443 vim_cv_ipv4_networking="no"; enable_netbeans="no"; enable_channel="no"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008444fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008445rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008446 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +00008447fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008448{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_ipv4_networking" >&5
8449printf "%s\n" "$vim_cv_ipv4_networking" >&6; }
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008450 fi
8451fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00008452if test "$enable_netbeans" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008453 printf "%s\n" "#define FEAT_NETBEANS_INTG 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00008454
8455 NETBEANS_SRC="netbeans.c"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008456
Bram Moolenaar071d4272004-06-13 20:20:40 +00008457 NETBEANS_OBJ="objects/netbeans.o"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008458
Bram Moolenaar071d4272004-06-13 20:20:40 +00008459fi
Bram Moolenaare0874f82016-01-24 20:36:41 +01008460if test "$enable_channel" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008461 printf "%s\n" "#define FEAT_JOB_CHANNEL 1" >>confdefs.h
Bram Moolenaare0874f82016-01-24 20:36:41 +01008462
Bram Moolenaar8b5866d2020-09-05 15:48:51 +02008463 CHANNEL_SRC="job.c channel.c"
Bram Moolenaare0874f82016-01-24 20:36:41 +01008464
Bram Moolenaar8b5866d2020-09-05 15:48:51 +02008465 CHANNEL_OBJ="objects/job.o objects/channel.o"
Bram Moolenaare0874f82016-01-24 20:36:41 +01008466
8467fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00008468
Illia Bobyra96d5442023-08-30 16:30:15 +02008469{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-terminal argument" >&5
8470printf %s "checking --enable-terminal argument... " >&6; }
Bram Moolenaare4f25e42017-07-07 11:54:15 +02008471# Check whether --enable-terminal was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008472if test ${enable_terminal+y}
8473then :
Bram Moolenaaref839562017-10-28 20:28:23 +02008474 enableval=$enable_terminal;
Illia Bobyra96d5442023-08-30 16:30:15 +02008475else $as_nop
Bram Moolenaar595a4022017-09-03 19:15:57 +02008476 enable_terminal="auto"
Bram Moolenaare4f25e42017-07-07 11:54:15 +02008477fi
8478
Bram Moolenaar595a4022017-09-03 19:15:57 +02008479if test "$enable_terminal" = "yes" || test "$enable_terminal" = "auto" -a "x$features" = "xhuge" ; then
Bram Moolenaar12471262022-01-18 11:11:25 +00008480 if test "$has_eval" = "no"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008481 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot use terminal emulator with tiny features" >&5
8482printf "%s\n" "cannot use terminal emulator with tiny features" >&6; }
Bram Moolenaare4f25e42017-07-07 11:54:15 +02008483 enable_terminal="no"
8484 else
Bram Moolenaar595a4022017-09-03 19:15:57 +02008485 if test "$enable_terminal" = "auto"; then
8486 enable_terminal="yes"
Illia Bobyra96d5442023-08-30 16:30:15 +02008487 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: defaulting to yes" >&5
8488printf "%s\n" "defaulting to yes" >&6; }
Bram Moolenaar595a4022017-09-03 19:15:57 +02008489 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008490 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8491printf "%s\n" "yes" >&6; }
Bram Moolenaar595a4022017-09-03 19:15:57 +02008492 fi
Bram Moolenaare4f25e42017-07-07 11:54:15 +02008493 fi
8494else
Bram Moolenaar595a4022017-09-03 19:15:57 +02008495 if test "$enable_terminal" = "auto"; then
8496 enable_terminal="no"
Illia Bobyra96d5442023-08-30 16:30:15 +02008497 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: defaulting to no" >&5
8498printf "%s\n" "defaulting to no" >&6; }
Bram Moolenaar595a4022017-09-03 19:15:57 +02008499 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008500 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8501printf "%s\n" "no" >&6; }
Bram Moolenaar595a4022017-09-03 19:15:57 +02008502 fi
Bram Moolenaare4f25e42017-07-07 11:54:15 +02008503fi
Bram Moolenaar8b423282017-12-16 14:37:06 +01008504if test "$enable_terminal" = "yes" -a "$enable_channel" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008505 printf "%s\n" "#define FEAT_TERMINAL 1" >>confdefs.h
Bram Moolenaare4f25e42017-07-07 11:54:15 +02008506
Bram Moolenaar93268052019-10-10 13:22:54 +02008507 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 +02008508
Bram Moolenaar93268052019-10-10 13:22:54 +02008509 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 +02008510
Bram Moolenaar823edd12019-10-23 22:35:36 +02008511 TERM_TEST="test_libvterm"
8512
Bram Moolenaare4f25e42017-07-07 11:54:15 +02008513fi
8514
Illia Bobyra96d5442023-08-30 16:30:15 +02008515{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-autoservername argument" >&5
8516printf %s "checking --enable-autoservername argument... " >&6; }
Bram Moolenaare42a6d22017-11-12 19:21:51 +01008517# Check whether --enable-autoservername was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008518if test ${enable_autoservername+y}
8519then :
Bram Moolenaare42a6d22017-11-12 19:21:51 +01008520 enableval=$enable_autoservername;
Illia Bobyra96d5442023-08-30 16:30:15 +02008521else $as_nop
Bram Moolenaare42a6d22017-11-12 19:21:51 +01008522 enable_autoservername="no"
8523fi
8524
Illia Bobyra96d5442023-08-30 16:30:15 +02008525{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_autoservername" >&5
8526printf "%s\n" "$enable_autoservername" >&6; }
Bram Moolenaare42a6d22017-11-12 19:21:51 +01008527if test "$enable_autoservername" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008528 printf "%s\n" "#define FEAT_AUTOSERVERNAME 1" >>confdefs.h
Bram Moolenaare42a6d22017-11-12 19:21:51 +01008529
8530fi
8531
Illia Bobyra96d5442023-08-30 16:30:15 +02008532{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-multibyte argument" >&5
8533printf %s "checking --enable-multibyte argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00008534# Check whether --enable-multibyte was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008535if test ${enable_multibyte+y}
8536then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00008537 enableval=$enable_multibyte;
Illia Bobyra96d5442023-08-30 16:30:15 +02008538else $as_nop
Bram Moolenaar2be7cb72019-01-12 16:10:51 +01008539 enable_multibyte="yes"
Bram Moolenaar446cb832008-06-24 21:56:24 +00008540fi
8541
Illia Bobyra96d5442023-08-30 16:30:15 +02008542{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_multibyte" >&5
8543printf "%s\n" "$enable_multibyte" >&6; }
Bram Moolenaar30276f22019-01-24 17:59:39 +01008544if test "$enable_multibyte" != "yes"; then
Bram Moolenaar2be7cb72019-01-12 16:10:51 +01008545 as_fn_error $? "The multi-byte feature can no longer be disabled. If you have
8546 a problem with this, discuss on the Vim mailing list." "$LINENO" 5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008547fi
8548
Illia Bobyra96d5442023-08-30 16:30:15 +02008549{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-rightleft argument" >&5
8550printf %s "checking --disable-rightleft argument... " >&6; }
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008551# Check whether --enable-rightleft was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008552if test ${enable_rightleft+y}
8553then :
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008554 enableval=$enable_rightleft;
Illia Bobyra96d5442023-08-30 16:30:15 +02008555else $as_nop
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008556 enable_rightleft="yes"
8557fi
8558
8559if test "$enable_rightleft" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008560 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8561printf "%s\n" "no" >&6; }
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008562else
Illia Bobyra96d5442023-08-30 16:30:15 +02008563 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8564printf "%s\n" "yes" >&6; }
8565 printf "%s\n" "#define DISABLE_RIGHTLEFT 1" >>confdefs.h
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008566
8567fi
8568
Illia Bobyra96d5442023-08-30 16:30:15 +02008569{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-arabic argument" >&5
8570printf %s "checking --disable-arabic argument... " >&6; }
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008571# Check whether --enable-arabic was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008572if test ${enable_arabic+y}
8573then :
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008574 enableval=$enable_arabic;
Illia Bobyra96d5442023-08-30 16:30:15 +02008575else $as_nop
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008576 enable_arabic="yes"
8577fi
8578
8579if test "$enable_arabic" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008580 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8581printf "%s\n" "no" >&6; }
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008582else
Illia Bobyra96d5442023-08-30 16:30:15 +02008583 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8584printf "%s\n" "yes" >&6; }
8585 printf "%s\n" "#define DISABLE_ARABIC 1" >>confdefs.h
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008586
8587fi
8588
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008589# Check whether --enable-farsi was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008590if test ${enable_farsi+y}
8591then :
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008592 enableval=$enable_farsi;
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008593fi
8594
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008595
Illia Bobyra96d5442023-08-30 16:30:15 +02008596{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-xim argument" >&5
8597printf %s "checking --enable-xim argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00008598# Check whether --enable-xim was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008599if test ${enable_xim+y}
8600then :
8601 enableval=$enable_xim; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_xim" >&5
8602printf "%s\n" "$enable_xim" >&6; }
8603else $as_nop
8604 enable_xim="auto"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: defaulting to auto" >&5
8605printf "%s\n" "defaulting to auto" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00008606fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00008607
Bram Moolenaar446cb832008-06-24 21:56:24 +00008608
Illia Bobyra96d5442023-08-30 16:30:15 +02008609{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-fontset argument" >&5
8610printf %s "checking --enable-fontset argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00008611# Check whether --enable-fontset was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008612if test ${enable_fontset+y}
8613then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00008614 enableval=$enable_fontset;
Illia Bobyra96d5442023-08-30 16:30:15 +02008615else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00008616 enable_fontset="no"
Bram Moolenaar446cb832008-06-24 21:56:24 +00008617fi
8618
Illia Bobyra96d5442023-08-30 16:30:15 +02008619{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_fontset" >&5
8620printf "%s\n" "$enable_fontset" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008621
8622test -z "$with_x" && with_x=yes
Bram Moolenaard0573012017-10-28 21:11:06 +02008623test "${enable_gui-yes}" != no -a "x$MACOS_X" != "xyes" -a "x$QNX" != "xyes" && with_x=yes
Bram Moolenaar071d4272004-06-13 20:20:40 +00008624if test "$with_x" = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008625 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: defaulting to: don't HAVE_X11" >&5
8626printf "%s\n" "defaulting to: don't HAVE_X11" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008627else
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008628
Bram Moolenaar071d4272004-06-13 20:20:40 +00008629 # Extract the first word of "xmkmf", so it can be a program name with args.
8630set dummy xmkmf; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02008631{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8632printf %s "checking for $ac_word... " >&6; }
8633if test ${ac_cv_path_xmkmfpath+y}
8634then :
8635 printf %s "(cached) " >&6
8636else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008637 case $xmkmfpath in
8638 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00008639 ac_cv_path_xmkmfpath="$xmkmfpath" # Let the user override the test with a path.
8640 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00008641 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008642 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8643for as_dir in $PATH
8644do
8645 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02008646 case $as_dir in #(((
8647 '') as_dir=./ ;;
8648 */) ;;
8649 *) as_dir=$as_dir/ ;;
8650 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008651 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02008652 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8653 ac_cv_path_xmkmfpath="$as_dir$ac_word$ac_exec_ext"
8654 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008655 break 2
8656 fi
8657done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008658 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00008659IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008660
Bram Moolenaar071d4272004-06-13 20:20:40 +00008661 ;;
8662esac
8663fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008664xmkmfpath=$ac_cv_path_xmkmfpath
Bram Moolenaar071d4272004-06-13 20:20:40 +00008665if test -n "$xmkmfpath"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008666 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xmkmfpath" >&5
8667printf "%s\n" "$xmkmfpath" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008668else
Illia Bobyra96d5442023-08-30 16:30:15 +02008669 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8670printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008671fi
8672
8673
Bram Moolenaar446cb832008-06-24 21:56:24 +00008674
Illia Bobyra96d5442023-08-30 16:30:15 +02008675 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for X" >&5
8676printf %s "checking for X... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008677
Bram Moolenaar071d4272004-06-13 20:20:40 +00008678
Bram Moolenaar446cb832008-06-24 21:56:24 +00008679# Check whether --with-x was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008680if test ${with_x+y}
8681then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00008682 withval=$with_x;
8683fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00008684
8685# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
8686if test "x$with_x" = xno; then
8687 # The user explicitly disabled X.
8688 have_x=disabled
8689else
Bram Moolenaar446cb832008-06-24 21:56:24 +00008690 case $x_includes,$x_libraries in #(
Bram Moolenaar7db77842014-03-27 17:40:59 +01008691 *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
Illia Bobyra96d5442023-08-30 16:30:15 +02008692 *,NONE | NONE,*) if test ${ac_cv_have_x+y}
8693then :
8694 printf %s "(cached) " >&6
8695else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00008696 # One or both of the vars are not set, and there is no cached value.
Illia Bobyra96d5442023-08-30 16:30:15 +02008697ac_x_includes=no
8698ac_x_libraries=no
8699# Do we need to do anything special at all?
8700ac_save_LIBS=$LIBS
8701LIBS="-lX11 $LIBS"
8702cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8703/* end confdefs.h. */
8704#include <X11/Xlib.h>
8705int
8706main (void)
8707{
8708XrmInitialize ()
8709 ;
8710 return 0;
8711}
8712_ACEOF
8713if ac_fn_c_try_link "$LINENO"
8714then :
8715 # We can compile and link X programs with no special options.
8716 ac_x_includes=
8717 ac_x_libraries=
8718fi
8719rm -f core conftest.err conftest.$ac_objext conftest.beam \
8720 conftest$ac_exeext conftest.$ac_ext
8721LIBS="$ac_save_LIBS"
8722# If that didn't work, only try xmkmf and file system searches
8723# for native compilation.
8724if test x"$ac_x_includes" = xno && test "$cross_compiling" = no
8725then :
8726 rm -f -r conftest.dir
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008727if mkdir conftest.dir; then
8728 cd conftest.dir
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008729 cat >Imakefile <<'_ACEOF'
Bram Moolenaar446cb832008-06-24 21:56:24 +00008730incroot:
8731 @echo incroot='${INCROOT}'
8732usrlibdir:
8733 @echo usrlibdir='${USRLIBDIR}'
8734libdir:
8735 @echo libdir='${LIBDIR}'
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008736_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +00008737 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01008738 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
Bram Moolenaar446cb832008-06-24 21:56:24 +00008739 for ac_var in incroot usrlibdir libdir; do
8740 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
8741 done
Bram Moolenaar071d4272004-06-13 20:20:40 +00008742 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
Bram Moolenaar446cb832008-06-24 21:56:24 +00008743 for ac_extension in a so sl dylib la dll; do
8744 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
8745 test -f "$ac_im_libdir/libX11.$ac_extension"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008746 ac_im_usrlibdir=$ac_im_libdir; break
Bram Moolenaar071d4272004-06-13 20:20:40 +00008747 fi
8748 done
8749 # Screen out bogus values from the imake configuration. They are
8750 # bogus both because they are the default anyway, and because
8751 # using them would break gcc on systems where it needs fixed includes.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008752 case $ac_im_incroot in
Bram Moolenaar446cb832008-06-24 21:56:24 +00008753 /usr/include) ac_x_includes= ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008754 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00008755 esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008756 case $ac_im_usrlibdir in
Bram Moolenaar32f31b12009-05-21 13:20:59 +00008757 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008758 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00008759 esac
8760 fi
8761 cd ..
Bram Moolenaar446cb832008-06-24 21:56:24 +00008762 rm -f -r conftest.dir
Bram Moolenaar071d4272004-06-13 20:20:40 +00008763fi
8764
Illia Bobyra96d5442023-08-30 16:30:15 +02008765 # Standard set of common directories for X headers.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008766# Check X11 before X11Rn because it is often a symlink to the current release.
8767ac_x_header_dirs='
8768/usr/X11/include
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008769/usr/X11R7/include
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008770/usr/X11R6/include
8771/usr/X11R5/include
8772/usr/X11R4/include
Bram Moolenaar071d4272004-06-13 20:20:40 +00008773
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008774/usr/include/X11
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008775/usr/include/X11R7
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008776/usr/include/X11R6
8777/usr/include/X11R5
8778/usr/include/X11R4
8779
8780/usr/local/X11/include
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008781/usr/local/X11R7/include
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008782/usr/local/X11R6/include
8783/usr/local/X11R5/include
8784/usr/local/X11R4/include
8785
8786/usr/local/include/X11
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008787/usr/local/include/X11R7
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008788/usr/local/include/X11R6
8789/usr/local/include/X11R5
8790/usr/local/include/X11R4
8791
Illia Bobyra96d5442023-08-30 16:30:15 +02008792/opt/X11/include
8793
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008794/usr/X386/include
8795/usr/x386/include
8796/usr/XFree86/include/X11
8797
8798/usr/include
8799/usr/local/include
8800/usr/unsupported/include
8801/usr/athena/include
8802/usr/local/x11r5/include
8803/usr/lpp/Xamples/include
8804
8805/usr/openwin/include
8806/usr/openwin/share/include'
8807
8808if test "$ac_x_includes" = no; then
Bram Moolenaar446cb832008-06-24 21:56:24 +00008809 # Guess where to find include files, by looking for Xlib.h.
Bram Moolenaar071d4272004-06-13 20:20:40 +00008810 # First, try using that file with no special directory specified.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008812/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +00008813#include <X11/Xlib.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008814_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02008815if ac_fn_c_try_cpp "$LINENO"
8816then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00008817 # We can compile using X headers with no special include directory.
8818ac_x_includes=
Illia Bobyra96d5442023-08-30 16:30:15 +02008819else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008820 for ac_dir in $ac_x_header_dirs; do
Bram Moolenaar446cb832008-06-24 21:56:24 +00008821 if test -r "$ac_dir/X11/Xlib.h"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008822 ac_x_includes=$ac_dir
8823 break
8824 fi
8825done
Bram Moolenaar071d4272004-06-13 20:20:40 +00008826fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01008827rm -f conftest.err conftest.i conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008828fi # $ac_x_includes = no
Bram Moolenaar071d4272004-06-13 20:20:40 +00008829
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008830if test "$ac_x_libraries" = no; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008831 # Check for the libraries.
Bram Moolenaar071d4272004-06-13 20:20:40 +00008832 # See if we find them without any special options.
8833 # Don't add to $LIBS permanently.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008834 ac_save_LIBS=$LIBS
Bram Moolenaar446cb832008-06-24 21:56:24 +00008835 LIBS="-lX11 $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008837/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +00008838#include <X11/Xlib.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008839int
Illia Bobyra96d5442023-08-30 16:30:15 +02008840main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008841{
Bram Moolenaar446cb832008-06-24 21:56:24 +00008842XrmInitialize ()
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008843 ;
8844 return 0;
8845}
8846_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02008847if ac_fn_c_try_link "$LINENO"
8848then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008849 LIBS=$ac_save_LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00008850# We can link X programs with no special library path.
8851ac_x_libraries=
Illia Bobyra96d5442023-08-30 16:30:15 +02008852else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008853 LIBS=$ac_save_LIBS
Illia Bobyra96d5442023-08-30 16:30:15 +02008854for 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 +00008855do
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008856 # Don't even attempt the hair of trying to link an X program!
Bram Moolenaar446cb832008-06-24 21:56:24 +00008857 for ac_extension in a so sl dylib la dll; do
8858 if test -r "$ac_dir/libX11.$ac_extension"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008859 ac_x_libraries=$ac_dir
8860 break 2
8861 fi
8862 done
8863done
8864fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008865rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008866 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008867fi # $ac_x_libraries = no
Bram Moolenaar071d4272004-06-13 20:20:40 +00008868
Illia Bobyra96d5442023-08-30 16:30:15 +02008869fi
8870# Record the results.
Bram Moolenaar446cb832008-06-24 21:56:24 +00008871case $ac_x_includes,$ac_x_libraries in #(
Illia Bobyra96d5442023-08-30 16:30:15 +02008872 no,* | *,no | *\'*) :
Bram Moolenaar446cb832008-06-24 21:56:24 +00008873 # Didn't find X, or a directory has "'" in its name.
Illia Bobyra96d5442023-08-30 16:30:15 +02008874 ac_cv_have_x="have_x=no" ;; #(
8875 *) :
Bram Moolenaar446cb832008-06-24 21:56:24 +00008876 # Record where we found X for the cache.
8877 ac_cv_have_x="have_x=yes\
8878 ac_x_includes='$ac_x_includes'\
Illia Bobyra96d5442023-08-30 16:30:15 +02008879 ac_x_libraries='$ac_x_libraries'" ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +00008880esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00008881fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00008882;; #(
8883 *) have_x=yes;;
8884 esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00008885 eval "$ac_cv_have_x"
8886fi # $with_x != no
8887
8888if test "$have_x" != yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008889 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
8890printf "%s\n" "$have_x" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008891 no_x=yes
8892else
8893 # If each of the values was on the command line, it overrides each guess.
8894 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
8895 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
8896 # Update the cache value to reflect the command line values.
Bram Moolenaar446cb832008-06-24 21:56:24 +00008897 ac_cv_have_x="have_x=yes\
8898 ac_x_includes='$x_includes'\
8899 ac_x_libraries='$x_libraries'"
Illia Bobyra96d5442023-08-30 16:30:15 +02008900 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
8901printf "%s\n" "libraries $x_libraries, headers $x_includes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008902fi
8903
8904if test "$no_x" = yes; then
8905 # Not all programs may use this symbol, but it does not hurt to define it.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008906
Illia Bobyra96d5442023-08-30 16:30:15 +02008907printf "%s\n" "#define X_DISPLAY_MISSING 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00008908
8909 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
8910else
8911 if test -n "$x_includes"; then
8912 X_CFLAGS="$X_CFLAGS -I$x_includes"
8913 fi
8914
8915 # It would also be nice to do this for all -L options, not just this one.
8916 if test -n "$x_libraries"; then
8917 X_LIBS="$X_LIBS -L$x_libraries"
8918 # For Solaris; some versions of Sun CC require a space after -R and
8919 # others require no space. Words are not sufficient . . . .
Illia Bobyra96d5442023-08-30 16:30:15 +02008920 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
8921printf %s "checking whether -R must be followed by a space... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00008922 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
8923 ac_xsave_c_werror_flag=$ac_c_werror_flag
8924 ac_c_werror_flag=yes
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008926/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00008927
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008928int
Illia Bobyra96d5442023-08-30 16:30:15 +02008929main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008930{
Bram Moolenaar071d4272004-06-13 20:20:40 +00008931
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008932 ;
8933 return 0;
8934}
8935_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02008936if ac_fn_c_try_link "$LINENO"
8937then :
8938 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8939printf "%s\n" "no" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00008940 X_LIBS="$X_LIBS -R$x_libraries"
Illia Bobyra96d5442023-08-30 16:30:15 +02008941else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008942 LIBS="$ac_xsave_LIBS -R $x_libraries"
8943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008944/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00008945
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008946int
Illia Bobyra96d5442023-08-30 16:30:15 +02008947main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008948{
Bram Moolenaar071d4272004-06-13 20:20:40 +00008949
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008950 ;
8951 return 0;
8952}
8953_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02008954if ac_fn_c_try_link "$LINENO"
8955then :
8956 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8957printf "%s\n" "yes" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00008958 X_LIBS="$X_LIBS -R $x_libraries"
Illia Bobyra96d5442023-08-30 16:30:15 +02008959else $as_nop
8960 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
8961printf "%s\n" "neither works" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008962fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008963rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008964 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +00008965fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008966rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008967 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +00008968 ac_c_werror_flag=$ac_xsave_c_werror_flag
8969 LIBS=$ac_xsave_LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00008970 fi
8971
8972 # Check for system-dependent libraries X programs must link with.
8973 # Do this before checking for the system-independent R6 libraries
8974 # (-lICE), since we may need -lsocket or whatever for X linking.
8975
8976 if test "$ISC" = yes; then
8977 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
8978 else
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008979 # Martyn Johnson says this is needed for Ultrix, if the X
8980 # libraries were built with DECnet support. And Karl Berry says
Bram Moolenaar071d4272004-06-13 20:20:40 +00008981 # the Alpha needs dnet_stub (dnet does not exist).
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008982 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008984/* end confdefs.h. */
8985
Bram Moolenaar446cb832008-06-24 21:56:24 +00008986/* Override any GCC internal prototype to avoid an error.
8987 Use char because int might match the return type of a GCC
8988 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008989char XOpenDisplay ();
8990int
Illia Bobyra96d5442023-08-30 16:30:15 +02008991main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008992{
Bram Moolenaar446cb832008-06-24 21:56:24 +00008993return XOpenDisplay ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008994 ;
8995 return 0;
8996}
8997_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02008998if ac_fn_c_try_link "$LINENO"
8999then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009000
Illia Bobyra96d5442023-08-30 16:30:15 +02009001else $as_nop
9002 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
9003printf %s "checking for dnet_ntoa in -ldnet... " >&6; }
9004if test ${ac_cv_lib_dnet_dnet_ntoa+y}
9005then :
9006 printf %s "(cached) " >&6
9007else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009008 ac_check_lib_save_LIBS=$LIBS
9009LIBS="-ldnet $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009010cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009011/* end confdefs.h. */
9012
Bram Moolenaar446cb832008-06-24 21:56:24 +00009013/* Override any GCC internal prototype to avoid an error.
9014 Use char because int might match the return type of a GCC
9015 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009016char dnet_ntoa ();
9017int
Illia Bobyra96d5442023-08-30 16:30:15 +02009018main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009019{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009020return dnet_ntoa ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009021 ;
9022 return 0;
9023}
9024_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009025if ac_fn_c_try_link "$LINENO"
9026then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009027 ac_cv_lib_dnet_dnet_ntoa=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009028else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009029 ac_cv_lib_dnet_dnet_ntoa=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009030fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009031rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009032 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009033LIBS=$ac_check_lib_save_LIBS
9034fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009035{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
9036printf "%s\n" "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
9037if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes
9038then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009039 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009040fi
9041
9042 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009043 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
9044printf %s "checking for dnet_ntoa in -ldnet_stub... " >&6; }
9045if test ${ac_cv_lib_dnet_stub_dnet_ntoa+y}
9046then :
9047 printf %s "(cached) " >&6
9048else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009049 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009050LIBS="-ldnet_stub $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009051cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009052/* end confdefs.h. */
9053
Bram Moolenaar446cb832008-06-24 21:56:24 +00009054/* Override any GCC internal prototype to avoid an error.
9055 Use char because int might match the return type of a GCC
9056 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009057char dnet_ntoa ();
9058int
Illia Bobyra96d5442023-08-30 16:30:15 +02009059main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009060{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009061return dnet_ntoa ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009062 ;
9063 return 0;
9064}
9065_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009066if ac_fn_c_try_link "$LINENO"
9067then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009068 ac_cv_lib_dnet_stub_dnet_ntoa=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009069else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009070 ac_cv_lib_dnet_stub_dnet_ntoa=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009071fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009072rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009073 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009074LIBS=$ac_check_lib_save_LIBS
9075fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009076{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
9077printf "%s\n" "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
9078if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes
9079then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009080 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009081fi
9082
9083 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009084fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009085rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009086 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009087 LIBS="$ac_xsave_LIBS"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009088
9089 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
9090 # to get the SysV transport functions.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009091 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
Bram Moolenaar071d4272004-06-13 20:20:40 +00009092 # needs -lnsl.
9093 # The nsl library prevents programs from opening the X display
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009094 # on Irix 5.2, according to T.E. Dickey.
9095 # The functions gethostbyname, getservbyname, and inet_addr are
9096 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009097 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Illia Bobyra96d5442023-08-30 16:30:15 +02009098if test "x$ac_cv_func_gethostbyname" = xyes
9099then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009100
Bram Moolenaar071d4272004-06-13 20:20:40 +00009101fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00009102
Bram Moolenaar071d4272004-06-13 20:20:40 +00009103 if test $ac_cv_func_gethostbyname = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009104 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
9105printf %s "checking for gethostbyname in -lnsl... " >&6; }
9106if test ${ac_cv_lib_nsl_gethostbyname+y}
9107then :
9108 printf %s "(cached) " >&6
9109else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009110 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009111LIBS="-lnsl $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009112cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009113/* end confdefs.h. */
9114
Bram Moolenaar446cb832008-06-24 21:56:24 +00009115/* Override any GCC internal prototype to avoid an error.
9116 Use char because int might match the return type of a GCC
9117 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009118char gethostbyname ();
9119int
Illia Bobyra96d5442023-08-30 16:30:15 +02009120main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009121{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009122return gethostbyname ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009123 ;
9124 return 0;
9125}
9126_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009127if ac_fn_c_try_link "$LINENO"
9128then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009129 ac_cv_lib_nsl_gethostbyname=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009130else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009131 ac_cv_lib_nsl_gethostbyname=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009132fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009133rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009134 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009135LIBS=$ac_check_lib_save_LIBS
9136fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009137{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
9138printf "%s\n" "$ac_cv_lib_nsl_gethostbyname" >&6; }
9139if test "x$ac_cv_lib_nsl_gethostbyname" = xyes
9140then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009141 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009142fi
9143
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009144 if test $ac_cv_lib_nsl_gethostbyname = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009145 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
9146printf %s "checking for gethostbyname in -lbsd... " >&6; }
9147if test ${ac_cv_lib_bsd_gethostbyname+y}
9148then :
9149 printf %s "(cached) " >&6
9150else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009151 ac_check_lib_save_LIBS=$LIBS
9152LIBS="-lbsd $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009153cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009154/* end confdefs.h. */
9155
Bram Moolenaar446cb832008-06-24 21:56:24 +00009156/* Override any GCC internal prototype to avoid an error.
9157 Use char because int might match the return type of a GCC
9158 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009159char gethostbyname ();
9160int
Illia Bobyra96d5442023-08-30 16:30:15 +02009161main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009162{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009163return gethostbyname ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009164 ;
9165 return 0;
9166}
9167_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009168if ac_fn_c_try_link "$LINENO"
9169then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009170 ac_cv_lib_bsd_gethostbyname=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009171else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009172 ac_cv_lib_bsd_gethostbyname=no
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009173fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009174rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009175 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009176LIBS=$ac_check_lib_save_LIBS
9177fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009178{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
9179printf "%s\n" "$ac_cv_lib_bsd_gethostbyname" >&6; }
9180if test "x$ac_cv_lib_bsd_gethostbyname" = xyes
9181then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009182 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
9183fi
9184
9185 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00009186 fi
9187
9188 # lieder@skyler.mavd.honeywell.com says without -lsocket,
9189 # socket/setsockopt and other routines are undefined under SCO ODT
9190 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009191 # on later versions), says Simon Leinen: it contains gethostby*
9192 # variants that don't use the name server (or something). -lsocket
9193 # must be given before -lnsl if both are needed. We assume that
9194 # if connect needs -lnsl, so does gethostbyname.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009195 ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect"
Illia Bobyra96d5442023-08-30 16:30:15 +02009196if test "x$ac_cv_func_connect" = xyes
9197then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009198
Bram Moolenaar071d4272004-06-13 20:20:40 +00009199fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00009200
Bram Moolenaar071d4272004-06-13 20:20:40 +00009201 if test $ac_cv_func_connect = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009202 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
9203printf %s "checking for connect in -lsocket... " >&6; }
9204if test ${ac_cv_lib_socket_connect+y}
9205then :
9206 printf %s "(cached) " >&6
9207else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009208 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009209LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009210cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009211/* end confdefs.h. */
9212
Bram Moolenaar446cb832008-06-24 21:56:24 +00009213/* Override any GCC internal prototype to avoid an error.
9214 Use char because int might match the return type of a GCC
9215 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009216char connect ();
9217int
Illia Bobyra96d5442023-08-30 16:30:15 +02009218main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009219{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009220return connect ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009221 ;
9222 return 0;
9223}
9224_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009225if ac_fn_c_try_link "$LINENO"
9226then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009227 ac_cv_lib_socket_connect=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009228else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009229 ac_cv_lib_socket_connect=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009230fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009231rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009232 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009233LIBS=$ac_check_lib_save_LIBS
9234fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009235{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
9236printf "%s\n" "$ac_cv_lib_socket_connect" >&6; }
9237if test "x$ac_cv_lib_socket_connect" = xyes
9238then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009239 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009240fi
9241
9242 fi
9243
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009244 # Guillermo Gomez says -lposix is necessary on A/UX.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009245 ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove"
Illia Bobyra96d5442023-08-30 16:30:15 +02009246if test "x$ac_cv_func_remove" = xyes
9247then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009248
Bram Moolenaar071d4272004-06-13 20:20:40 +00009249fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00009250
Bram Moolenaar071d4272004-06-13 20:20:40 +00009251 if test $ac_cv_func_remove = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009252 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
9253printf %s "checking for remove in -lposix... " >&6; }
9254if test ${ac_cv_lib_posix_remove+y}
9255then :
9256 printf %s "(cached) " >&6
9257else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009258 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009259LIBS="-lposix $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009260cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009261/* end confdefs.h. */
9262
Bram Moolenaar446cb832008-06-24 21:56:24 +00009263/* Override any GCC internal prototype to avoid an error.
9264 Use char because int might match the return type of a GCC
9265 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009266char remove ();
9267int
Illia Bobyra96d5442023-08-30 16:30:15 +02009268main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009269{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009270return remove ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009271 ;
9272 return 0;
9273}
9274_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009275if ac_fn_c_try_link "$LINENO"
9276then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009277 ac_cv_lib_posix_remove=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009278else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009279 ac_cv_lib_posix_remove=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009280fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009281rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009282 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009283LIBS=$ac_check_lib_save_LIBS
9284fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009285{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
9286printf "%s\n" "$ac_cv_lib_posix_remove" >&6; }
9287if test "x$ac_cv_lib_posix_remove" = xyes
9288then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009289 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009290fi
9291
9292 fi
9293
9294 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009295 ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
Illia Bobyra96d5442023-08-30 16:30:15 +02009296if test "x$ac_cv_func_shmat" = xyes
9297then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009298
Bram Moolenaar071d4272004-06-13 20:20:40 +00009299fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00009300
Bram Moolenaar071d4272004-06-13 20:20:40 +00009301 if test $ac_cv_func_shmat = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009302 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
9303printf %s "checking for shmat in -lipc... " >&6; }
9304if test ${ac_cv_lib_ipc_shmat+y}
9305then :
9306 printf %s "(cached) " >&6
9307else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009308 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009309LIBS="-lipc $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009310cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009311/* end confdefs.h. */
9312
Bram Moolenaar446cb832008-06-24 21:56:24 +00009313/* Override any GCC internal prototype to avoid an error.
9314 Use char because int might match the return type of a GCC
9315 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009316char shmat ();
9317int
Illia Bobyra96d5442023-08-30 16:30:15 +02009318main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009319{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009320return shmat ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009321 ;
9322 return 0;
9323}
9324_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009325if ac_fn_c_try_link "$LINENO"
9326then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009327 ac_cv_lib_ipc_shmat=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009328else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009329 ac_cv_lib_ipc_shmat=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009330fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009331rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009332 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009333LIBS=$ac_check_lib_save_LIBS
9334fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009335{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
9336printf "%s\n" "$ac_cv_lib_ipc_shmat" >&6; }
9337if test "x$ac_cv_lib_ipc_shmat" = xyes
9338then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009339 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009340fi
9341
9342 fi
9343 fi
9344
9345 # Check for libraries that X11R6 Xt/Xaw programs need.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009346 ac_save_LDFLAGS=$LDFLAGS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009347 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
9348 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
9349 # check for ICE first), but we must link in the order -lSM -lICE or
9350 # we get undefined symbols. So assume we have SM if we have ICE.
9351 # These have to be linked with before -lX11, unlike the other
9352 # libraries we check for below, so use a different variable.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009353 # John Interrante, Karl Berry
Illia Bobyra96d5442023-08-30 16:30:15 +02009354 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
9355printf %s "checking for IceConnectionNumber in -lICE... " >&6; }
9356if test ${ac_cv_lib_ICE_IceConnectionNumber+y}
9357then :
9358 printf %s "(cached) " >&6
9359else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009360 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009361LIBS="-lICE $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009362cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009363/* end confdefs.h. */
9364
Bram Moolenaar446cb832008-06-24 21:56:24 +00009365/* Override any GCC internal prototype to avoid an error.
9366 Use char because int might match the return type of a GCC
9367 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009368char IceConnectionNumber ();
9369int
Illia Bobyra96d5442023-08-30 16:30:15 +02009370main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009371{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009372return IceConnectionNumber ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009373 ;
9374 return 0;
9375}
9376_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009377if ac_fn_c_try_link "$LINENO"
9378then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009379 ac_cv_lib_ICE_IceConnectionNumber=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009380else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009381 ac_cv_lib_ICE_IceConnectionNumber=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009382fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009383rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009384 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009385LIBS=$ac_check_lib_save_LIBS
9386fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009387{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
9388printf "%s\n" "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
9389if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes
9390then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009391 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009392fi
9393
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009394 LDFLAGS=$ac_save_LDFLAGS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009395
9396fi
9397
9398
Bram Moolenaar2c704a72010-06-03 21:17:25 +02009399 if test "$zOSUnix" = "yes"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00009400 CFLAGS="$CFLAGS -W c,dll"
9401 LDFLAGS="$LDFLAGS -W l,dll"
9402 X_EXTRA_LIBS="$X_EXTRA_LIBS -lSM -lICE -lXmu"
9403 fi
9404
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009405
Bram Moolenaar071d4272004-06-13 20:20:40 +00009406 if test -d "$x_includes" && test ! -d "$x_libraries"; then
9407 x_libraries=`echo "$x_includes" | sed s/include/lib/`
Illia Bobyra96d5442023-08-30 16:30:15 +02009408 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Corrected X libraries to $x_libraries" >&5
9409printf "%s\n" "Corrected X libraries to $x_libraries" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009410 X_LIBS="$X_LIBS -L$x_libraries"
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00009411 if test "$vim_cv_uname_output" = SunOS &&
9412 echo $vim_cv_uname_r_output | grep '^5' >/dev/null; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00009413 X_LIBS="$X_LIBS -R $x_libraries"
9414 fi
9415 fi
9416
9417 if test -d "$x_libraries" && test ! -d "$x_includes"; then
9418 x_includes=`echo "$x_libraries" | sed s/lib/include/`
Illia Bobyra96d5442023-08-30 16:30:15 +02009419 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Corrected X includes to $x_includes" >&5
9420printf "%s\n" "Corrected X includes to $x_includes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009421 X_CFLAGS="$X_CFLAGS -I$x_includes"
9422 fi
9423
9424 X_CFLAGS="`echo $X_CFLAGS\ | sed 's%-I/usr/include %%'`"
9425 X_LIBS="`echo $X_LIBS\ | sed 's%-L/usr/lib %%'`"
9426 X_LIBS="`echo $X_LIBS\ | sed -e 's%-R/usr/lib %%' -e 's%-R /usr/lib %%'`"
9427
9428
Illia Bobyra96d5442023-08-30 16:30:15 +02009429 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if X11 header files can be found" >&5
9430printf %s "checking if X11 header files can be found... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009431 cflags_save=$CFLAGS
9432 CFLAGS="$CFLAGS $X_CFLAGS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009434/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00009435#include <X11/Xlib.h>
Bram Moolenaar00ca2842008-06-26 20:14:00 +00009436#include <X11/Intrinsic.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009437int
Illia Bobyra96d5442023-08-30 16:30:15 +02009438main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009439{
Bram Moolenaar071d4272004-06-13 20:20:40 +00009440
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009441 ;
9442 return 0;
9443}
9444_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009445if ac_fn_c_try_compile "$LINENO"
9446then :
9447 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9448printf "%s\n" "yes" >&6; }
9449else $as_nop
9450 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9451printf "%s\n" "no" >&6; }; no_x=yes
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 conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +00009454 CFLAGS=$cflags_save
9455
9456 if test "${no_x-no}" = yes; then
9457 with_x=no
9458 else
Illia Bobyra96d5442023-08-30 16:30:15 +02009459 printf "%s\n" "#define HAVE_X11 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00009460
9461 X_LIB="-lXt -lX11";
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009462
Bram Moolenaar071d4272004-06-13 20:20:40 +00009463
9464 ac_save_LDFLAGS="$LDFLAGS"
9465 LDFLAGS="-L$x_libraries $LDFLAGS"
9466
Illia Bobyra96d5442023-08-30 16:30:15 +02009467 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _XdmcpAuthDoIt in -lXdmcp" >&5
9468printf %s "checking for _XdmcpAuthDoIt in -lXdmcp... " >&6; }
9469if test ${ac_cv_lib_Xdmcp__XdmcpAuthDoIt+y}
9470then :
9471 printf %s "(cached) " >&6
9472else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009473 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009474LIBS="-lXdmcp -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS -lXdmcp $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009475cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009476/* end confdefs.h. */
9477
Bram Moolenaar446cb832008-06-24 21:56:24 +00009478/* Override any GCC internal prototype to avoid an error.
9479 Use char because int might match the return type of a GCC
9480 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009481char _XdmcpAuthDoIt ();
9482int
Illia Bobyra96d5442023-08-30 16:30:15 +02009483main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009484{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009485return _XdmcpAuthDoIt ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009486 ;
9487 return 0;
9488}
9489_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009490if ac_fn_c_try_link "$LINENO"
9491then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009492 ac_cv_lib_Xdmcp__XdmcpAuthDoIt=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009493else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009494 ac_cv_lib_Xdmcp__XdmcpAuthDoIt=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009495fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009496rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009497 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009498LIBS=$ac_check_lib_save_LIBS
9499fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009500{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xdmcp__XdmcpAuthDoIt" >&5
9501printf "%s\n" "$ac_cv_lib_Xdmcp__XdmcpAuthDoIt" >&6; }
9502if test "x$ac_cv_lib_Xdmcp__XdmcpAuthDoIt" = xyes
9503then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009504 X_EXTRA_LIBS="$X_EXTRA_LIBS -lXdmcp"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009505fi
9506
9507
Illia Bobyra96d5442023-08-30 16:30:15 +02009508 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IceOpenConnection in -lICE" >&5
9509printf %s "checking for IceOpenConnection in -lICE... " >&6; }
9510if test ${ac_cv_lib_ICE_IceOpenConnection+y}
9511then :
9512 printf %s "(cached) " >&6
9513else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009514 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009515LIBS="-lICE $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009516cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009517/* end confdefs.h. */
9518
Bram Moolenaar446cb832008-06-24 21:56:24 +00009519/* Override any GCC internal prototype to avoid an error.
9520 Use char because int might match the return type of a GCC
9521 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009522char IceOpenConnection ();
9523int
Illia Bobyra96d5442023-08-30 16:30:15 +02009524main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009525{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009526return IceOpenConnection ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009527 ;
9528 return 0;
9529}
9530_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009531if ac_fn_c_try_link "$LINENO"
9532then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009533 ac_cv_lib_ICE_IceOpenConnection=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009534else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009535 ac_cv_lib_ICE_IceOpenConnection=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009536fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009537rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009538 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009539LIBS=$ac_check_lib_save_LIBS
9540fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009541{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceOpenConnection" >&5
9542printf "%s\n" "$ac_cv_lib_ICE_IceOpenConnection" >&6; }
9543if test "x$ac_cv_lib_ICE_IceOpenConnection" = xyes
9544then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009545 X_EXTRA_LIBS="$X_EXTRA_LIBS -lSM -lICE"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009546fi
9547
9548
9549 LDFLAGS="$X_LIBS $ac_save_LDFLAGS"
Illia Bobyra96d5442023-08-30 16:30:15 +02009550 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XpmCreatePixmapFromData in -lXpm" >&5
9551printf %s "checking for XpmCreatePixmapFromData in -lXpm... " >&6; }
9552if test ${ac_cv_lib_Xpm_XpmCreatePixmapFromData+y}
9553then :
9554 printf %s "(cached) " >&6
9555else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009556 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009557LIBS="-lXpm -lXt $X_PRE_LIBS -lXpm -lX11 $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009558cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009559/* end confdefs.h. */
9560
Bram Moolenaar446cb832008-06-24 21:56:24 +00009561/* Override any GCC internal prototype to avoid an error.
9562 Use char because int might match the return type of a GCC
9563 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009564char XpmCreatePixmapFromData ();
9565int
Illia Bobyra96d5442023-08-30 16:30:15 +02009566main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009567{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009568return XpmCreatePixmapFromData ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009569 ;
9570 return 0;
9571}
9572_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009573if ac_fn_c_try_link "$LINENO"
9574then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009575 ac_cv_lib_Xpm_XpmCreatePixmapFromData=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009576else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009577 ac_cv_lib_Xpm_XpmCreatePixmapFromData=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009578fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009579rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009580 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009581LIBS=$ac_check_lib_save_LIBS
9582fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009583{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmCreatePixmapFromData" >&5
9584printf "%s\n" "$ac_cv_lib_Xpm_XpmCreatePixmapFromData" >&6; }
9585if test "x$ac_cv_lib_Xpm_XpmCreatePixmapFromData" = xyes
9586then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009587 X_PRE_LIBS="$X_PRE_LIBS -lXpm"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009588fi
9589
9590
Illia Bobyra96d5442023-08-30 16:30:15 +02009591 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if X11 header files implicitly declare return values" >&5
9592printf %s "checking if X11 header files implicitly declare return values... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009593 cflags_save=$CFLAGS
Bram Moolenaard1864592013-05-04 04:40:15 +02009594 if test "$GCC" = yes; then
9595 CFLAGS="$CFLAGS $X_CFLAGS -Werror"
9596 else
9597 CFLAGS="$CFLAGS $X_CFLAGS"
9598 fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009600/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00009601#include <X11/Xlib.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009602int
Illia Bobyra96d5442023-08-30 16:30:15 +02009603main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009604{
Bram Moolenaar071d4272004-06-13 20:20:40 +00009605
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009606 ;
9607 return 0;
9608}
9609_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009610if ac_fn_c_try_compile "$LINENO"
9611then :
9612 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9613printf "%s\n" "no" >&6; }
9614else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009615 CFLAGS="$CFLAGS -Wno-implicit-int"
9616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009617/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00009618#include <X11/Xlib.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009619int
Illia Bobyra96d5442023-08-30 16:30:15 +02009620main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009621{
Bram Moolenaar071d4272004-06-13 20:20:40 +00009622
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009623 ;
9624 return 0;
9625}
9626_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009627if ac_fn_c_try_compile "$LINENO"
9628then :
9629 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9630printf "%s\n" "yes" >&6; }; cflags_save="$cflags_save -Wno-implicit-int"
9631else $as_nop
9632 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: test failed" >&5
9633printf "%s\n" "test failed" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009634
Bram Moolenaar071d4272004-06-13 20:20:40 +00009635fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009636rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009637
Bram Moolenaar071d4272004-06-13 20:20:40 +00009638fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009639rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +00009640 CFLAGS=$cflags_save
9641
9642 LDFLAGS="$ac_save_LDFLAGS"
9643
Mike Gilberta055b442023-08-20 19:01:41 +02009644 # The cast to long int works around a bug in the HP C Compiler
9645# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9646# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9647# This bug is HP SR number 8606223364.
Illia Bobyra96d5442023-08-30 16:30:15 +02009648{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
9649printf %s "checking size of wchar_t... " >&6; }
9650if test ${ac_cv_sizeof_wchar_t+y}
9651then :
9652 printf %s "(cached) " >&6
9653else $as_nop
9654 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "$ac_includes_default"
9655then :
Bram Moolenaar4bdbbf72009-05-21 21:27:43 +00009656
Illia Bobyra96d5442023-08-30 16:30:15 +02009657else $as_nop
Mike Gilberta055b442023-08-20 19:01:41 +02009658 if test "$ac_cv_type_wchar_t" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009659 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9660printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Mike Gilberta055b442023-08-20 19:01:41 +02009661as_fn_error 77 "cannot compute sizeof (wchar_t)
9662See \`config.log' for more details" "$LINENO" 5; }
9663 else
9664 ac_cv_sizeof_wchar_t=0
9665 fi
9666fi
9667
9668fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009669{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
9670printf "%s\n" "$ac_cv_sizeof_wchar_t" >&6; }
Mike Gilberta055b442023-08-20 19:01:41 +02009671
9672
9673
Illia Bobyra96d5442023-08-30 16:30:15 +02009674printf "%s\n" "#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t" >>confdefs.h
Bram Moolenaar4bdbbf72009-05-21 21:27:43 +00009675
Bram Moolenaar4bdbbf72009-05-21 21:27:43 +00009676
Mike Gilberta055b442023-08-20 19:01:41 +02009677 if test "$ac_cv_sizeof_wchar_t" -le 2; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009678 printf "%s\n" "#define SMALL_WCHAR_T 1" >>confdefs.h
Bram Moolenaar4bdbbf72009-05-21 21:27:43 +00009679
9680 fi
9681
Bram Moolenaar071d4272004-06-13 20:20:40 +00009682 fi
9683fi
9684
Bram Moolenaard2a05492018-07-27 22:35:15 +02009685if test "x$with_x" = xno -a "x$with_x_arg" = xyes; then
9686 as_fn_error $? "could not configure X" "$LINENO" 5
9687fi
9688
Bram Moolenaarb3f74062020-02-26 16:16:53 +01009689test "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 +00009690
Illia Bobyra96d5442023-08-30 16:30:15 +02009691{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-gui argument" >&5
9692printf %s "checking --enable-gui argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00009693# Check whether --enable-gui was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02009694if test ${enable_gui+y}
9695then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00009696 enableval=$enable_gui;
Illia Bobyra96d5442023-08-30 16:30:15 +02009697else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00009698 enable_gui="auto"
Bram Moolenaar446cb832008-06-24 21:56:24 +00009699fi
9700
Bram Moolenaar071d4272004-06-13 20:20:40 +00009701
9702enable_gui_canon=`echo "_$enable_gui" | \
9703 sed 's/[ _+-]//g;y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
9704
Bram Moolenaar071d4272004-06-13 20:20:40 +00009705SKIP_GTK2=YES
Bram Moolenaar1858a842016-02-23 22:30:31 +01009706SKIP_GTK3=YES
Bram Moolenaar071d4272004-06-13 20:20:40 +00009707SKIP_GNOME=YES
9708SKIP_MOTIF=YES
Bram Moolenaar071d4272004-06-13 20:20:40 +00009709SKIP_PHOTON=YES
Bram Moolenaarb3f74062020-02-26 16:16:53 +01009710SKIP_HAIKU=YES
Bram Moolenaar071d4272004-06-13 20:20:40 +00009711GUITYPE=NONE
9712
Bram Moolenaarb3f74062020-02-26 16:16:53 +01009713if test "x$HAIKU" = "xyes"; then
9714 SKIP_HAIKU=
9715 case "$enable_gui_canon" in
Illia Bobyra96d5442023-08-30 16:30:15 +02009716 no) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no GUI support" >&5
9717printf "%s\n" "no GUI support" >&6; }
Bram Moolenaarb3f74062020-02-26 16:16:53 +01009718 SKIP_HAIKU=YES ;;
Illia Bobyra96d5442023-08-30 16:30:15 +02009719 yes|"") { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes - automatic GUI support" >&5
9720printf "%s\n" "yes - automatic GUI support" >&6; } ;;
9721 auto) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: auto - automatic GUI support" >&5
9722printf "%s\n" "auto - automatic GUI support" >&6; } ;;
9723 haiku) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Haiku GUI support" >&5
9724printf "%s\n" "Haiku GUI support" >&6; } ;;
9725 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Sorry, $enable_gui GUI is not supported" >&5
9726printf "%s\n" "Sorry, $enable_gui GUI is not supported" >&6; }
Bram Moolenaarb3f74062020-02-26 16:16:53 +01009727 SKIP_HAIKU=YES ;;
9728 esac
9729elif test "x$QNX" = "xyes" -a "x$with_x" = "xno" ; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00009730 SKIP_PHOTON=
9731 case "$enable_gui_canon" in
Illia Bobyra96d5442023-08-30 16:30:15 +02009732 no) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no GUI support" >&5
9733printf "%s\n" "no GUI support" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009734 SKIP_PHOTON=YES ;;
Illia Bobyra96d5442023-08-30 16:30:15 +02009735 yes|""|auto) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: automatic GUI support" >&5
9736printf "%s\n" "automatic GUI support" >&6; }
Bram Moolenaaraf0839a2018-12-30 22:55:47 +01009737 gui_auto=yes ;;
Illia Bobyra96d5442023-08-30 16:30:15 +02009738 photon) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Photon GUI support" >&5
9739printf "%s\n" "Photon GUI support" >&6; } ;;
9740 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Sorry, $enable_gui GUI is not supported" >&5
9741printf "%s\n" "Sorry, $enable_gui GUI is not supported" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009742 SKIP_PHOTON=YES ;;
9743 esac
9744
Bram Moolenaar040f9752020-08-11 23:08:48 +02009745elif test "x$MACOS_X" = "xyes" -a "x$with_x" = "xno" ; then
9746 case "$enable_gui_canon" in
Illia Bobyra96d5442023-08-30 16:30:15 +02009747 no) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no GUI support" >&5
9748printf "%s\n" "no GUI support" >&6; } ;;
9749 yes|"") { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes - automatic GUI support" >&5
9750printf "%s\n" "yes - automatic GUI support" >&6; }
Bram Moolenaar040f9752020-08-11 23:08:48 +02009751 gui_auto=yes ;;
Illia Bobyra96d5442023-08-30 16:30:15 +02009752 auto) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: auto - disable GUI support for Mac OS" >&5
9753printf "%s\n" "auto - disable GUI support for Mac OS" >&6; } ;;
9754 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Sorry, $enable_gui GUI is not supported" >&5
9755printf "%s\n" "Sorry, $enable_gui GUI is not supported" >&6; } ;;
Bram Moolenaar040f9752020-08-11 23:08:48 +02009756 esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00009757else
9758
Bram Moolenaar071d4272004-06-13 20:20:40 +00009759 case "$enable_gui_canon" in
Illia Bobyra96d5442023-08-30 16:30:15 +02009760 no|none) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no GUI support" >&5
9761printf "%s\n" "no GUI support" >&6; } ;;
9762 yes|""|auto) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes/auto - automatic GUI support" >&5
9763printf "%s\n" "yes/auto - automatic GUI support" >&6; }
Bram Moolenaaraf0839a2018-12-30 22:55:47 +01009764 gui_auto=yes
Bram Moolenaar071d4272004-06-13 20:20:40 +00009765 SKIP_GTK2=
Bram Moolenaarf272ae12021-01-31 19:52:50 +01009766 SKIP_GTK3=
Bram Moolenaar071d4272004-06-13 20:20:40 +00009767 SKIP_GNOME=
Bram Moolenaarf52fac22022-03-11 16:01:26 +00009768 SKIP_MOTIF=;;
Illia Bobyra96d5442023-08-30 16:30:15 +02009769 gtk2) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: GTK+ 2.x GUI support" >&5
9770printf "%s\n" "GTK+ 2.x GUI support" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009771 SKIP_GTK2=;;
Illia Bobyra96d5442023-08-30 16:30:15 +02009772 gnome2) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: GNOME 2.x GUI support" >&5
9773printf "%s\n" "GNOME 2.x GUI support" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009774 SKIP_GNOME=
Bram Moolenaar071d4272004-06-13 20:20:40 +00009775 SKIP_GTK2=;;
Illia Bobyra96d5442023-08-30 16:30:15 +02009776 gtk3) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: GTK+ 3.x GUI support" >&5
9777printf "%s\n" "GTK+ 3.x GUI support" >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +01009778 SKIP_GTK3=;;
Illia Bobyra96d5442023-08-30 16:30:15 +02009779 motif) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Motif GUI support" >&5
9780printf "%s\n" "Motif GUI support" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009781 SKIP_MOTIF=;;
Illia Bobyra96d5442023-08-30 16:30:15 +02009782 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Sorry, $enable_gui GUI is not supported" >&5
9783printf "%s\n" "Sorry, $enable_gui GUI is not supported" >&6; } ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00009784 esac
9785
9786fi
9787
Bram Moolenaar071d4272004-06-13 20:20:40 +00009788if test "x$SKIP_GTK2" != "xYES" -a "$enable_gui_canon" != "gtk2" \
9789 -a "$enable_gui_canon" != "gnome2"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009790 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether or not to look for GTK+ 2" >&5
9791printf %s "checking whether or not to look for GTK+ 2... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00009792 # Check whether --enable-gtk2-check was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02009793if test ${enable_gtk2_check+y}
9794then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00009795 enableval=$enable_gtk2_check;
Illia Bobyra96d5442023-08-30 16:30:15 +02009796else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00009797 enable_gtk2_check="yes"
Bram Moolenaar446cb832008-06-24 21:56:24 +00009798fi
9799
Illia Bobyra96d5442023-08-30 16:30:15 +02009800 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_gtk2_check" >&5
9801printf "%s\n" "$enable_gtk2_check" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009802 if test "x$enable_gtk2_check" = "xno"; then
9803 SKIP_GTK2=YES
Bram Moolenaar182c5be2010-06-25 05:37:59 +02009804 SKIP_GNOME=YES
Bram Moolenaar071d4272004-06-13 20:20:40 +00009805 fi
9806fi
9807
Bram Moolenaar182c5be2010-06-25 05:37:59 +02009808if test "x$SKIP_GNOME" != "xYES" -a "$enable_gui_canon" != "gnome2"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009809 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether or not to look for GNOME" >&5
9810printf %s "checking whether or not to look for GNOME... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00009811 # Check whether --enable-gnome-check was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02009812if test ${enable_gnome_check+y}
9813then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00009814 enableval=$enable_gnome_check;
Illia Bobyra96d5442023-08-30 16:30:15 +02009815else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00009816 enable_gnome_check="no"
Bram Moolenaar446cb832008-06-24 21:56:24 +00009817fi
9818
Illia Bobyra96d5442023-08-30 16:30:15 +02009819 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_gnome_check" >&5
9820printf "%s\n" "$enable_gnome_check" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009821 if test "x$enable_gnome_check" = "xno"; then
9822 SKIP_GNOME=YES
9823 fi
9824fi
9825
Bram Moolenaar98921892016-02-23 17:14:37 +01009826if test "x$SKIP_GTK3" != "xYES" -a "$enable_gui_canon" != "gtk3"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009827 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether or not to look for GTK+ 3" >&5
9828printf %s "checking whether or not to look for GTK+ 3... " >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +01009829 # Check whether --enable-gtk3-check was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02009830if test ${enable_gtk3_check+y}
9831then :
Bram Moolenaar98921892016-02-23 17:14:37 +01009832 enableval=$enable_gtk3_check;
Illia Bobyra96d5442023-08-30 16:30:15 +02009833else $as_nop
Bram Moolenaar98921892016-02-23 17:14:37 +01009834 enable_gtk3_check="yes"
9835fi
9836
Illia Bobyra96d5442023-08-30 16:30:15 +02009837 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_gtk3_check" >&5
9838printf "%s\n" "$enable_gtk3_check" >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +01009839 if test "x$enable_gtk3_check" = "xno"; then
9840 SKIP_GTK3=YES
9841 fi
9842fi
9843
Bram Moolenaar071d4272004-06-13 20:20:40 +00009844if test "x$SKIP_MOTIF" != "xYES" -a "$enable_gui_canon" != "motif"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009845 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether or not to look for Motif" >&5
9846printf %s "checking whether or not to look for Motif... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00009847 # Check whether --enable-motif-check was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02009848if test ${enable_motif_check+y}
9849then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00009850 enableval=$enable_motif_check;
Illia Bobyra96d5442023-08-30 16:30:15 +02009851else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00009852 enable_motif_check="yes"
Bram Moolenaar446cb832008-06-24 21:56:24 +00009853fi
9854
Illia Bobyra96d5442023-08-30 16:30:15 +02009855 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_motif_check" >&5
9856printf "%s\n" "$enable_motif_check" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009857 if test "x$enable_motif_check" = "xno"; then
9858 SKIP_MOTIF=YES
9859 fi
9860fi
9861
Bram Moolenaar071d4272004-06-13 20:20:40 +00009862
9863
9864
9865
9866
9867
Bram Moolenaar427f5b62019-06-09 13:43:51 +02009868if test "X$PKG_CONFIG" = "X"; then
9869 if test -n "$ac_tool_prefix"; then
Bram Moolenaard6d30422018-01-28 22:48:55 +01009870 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9871set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02009872{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9873printf %s "checking for $ac_word... " >&6; }
9874if test ${ac_cv_path_PKG_CONFIG+y}
9875then :
9876 printf %s "(cached) " >&6
9877else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009878 case $PKG_CONFIG in
9879 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00009880 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9881 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00009882 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009883 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9884for as_dir in $PATH
9885do
9886 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02009887 case $as_dir in #(((
9888 '') as_dir=./ ;;
9889 */) ;;
9890 *) as_dir=$as_dir/ ;;
9891 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009892 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02009893 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9894 ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
9895 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009896 break 2
9897 fi
9898done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009899 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00009900IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009901
Bram Moolenaar071d4272004-06-13 20:20:40 +00009902 ;;
9903esac
9904fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009905PKG_CONFIG=$ac_cv_path_PKG_CONFIG
Bram Moolenaar071d4272004-06-13 20:20:40 +00009906if test -n "$PKG_CONFIG"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009907 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9908printf "%s\n" "$PKG_CONFIG" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009909else
Illia Bobyra96d5442023-08-30 16:30:15 +02009910 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9911printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009912fi
9913
Bram Moolenaar446cb832008-06-24 21:56:24 +00009914
Bram Moolenaard6d30422018-01-28 22:48:55 +01009915fi
9916if test -z "$ac_cv_path_PKG_CONFIG"; then
9917 ac_pt_PKG_CONFIG=$PKG_CONFIG
9918 # Extract the first word of "pkg-config", so it can be a program name with args.
9919set dummy pkg-config; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02009920{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9921printf %s "checking for $ac_word... " >&6; }
9922if test ${ac_cv_path_ac_pt_PKG_CONFIG+y}
9923then :
9924 printf %s "(cached) " >&6
9925else $as_nop
Bram Moolenaard6d30422018-01-28 22:48:55 +01009926 case $ac_pt_PKG_CONFIG in
9927 [\\/]* | ?:[\\/]*)
9928 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9929 ;;
9930 *)
9931 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9932for as_dir in $PATH
9933do
9934 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02009935 case $as_dir in #(((
9936 '') as_dir=./ ;;
9937 */) ;;
9938 *) as_dir=$as_dir/ ;;
9939 esac
Bram Moolenaard6d30422018-01-28 22:48:55 +01009940 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02009941 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9942 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
9943 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaard6d30422018-01-28 22:48:55 +01009944 break 2
9945 fi
9946done
9947 done
9948IFS=$as_save_IFS
9949
9950 ;;
9951esac
9952fi
9953ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9954if test -n "$ac_pt_PKG_CONFIG"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009955 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9956printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; }
Bram Moolenaard6d30422018-01-28 22:48:55 +01009957else
Illia Bobyra96d5442023-08-30 16:30:15 +02009958 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9959printf "%s\n" "no" >&6; }
Bram Moolenaard6d30422018-01-28 22:48:55 +01009960fi
9961
9962 if test "x$ac_pt_PKG_CONFIG" = x; then
9963 PKG_CONFIG="no"
9964 else
9965 case $cross_compiling:$ac_tool_warned in
9966yes:)
Illia Bobyra96d5442023-08-30 16:30:15 +02009967{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9968printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Bram Moolenaard6d30422018-01-28 22:48:55 +01009969ac_tool_warned=yes ;;
9970esac
9971 PKG_CONFIG=$ac_pt_PKG_CONFIG
9972 fi
9973else
9974 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9975fi
9976
Bram Moolenaar427f5b62019-06-09 13:43:51 +02009977fi
9978
9979
9980if test -z "$SKIP_GTK2"; then
9981
Illia Bobyra96d5442023-08-30 16:30:15 +02009982 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-gtktest argument" >&5
9983printf %s "checking --disable-gtktest argument... " >&6; }
Bram Moolenaar427f5b62019-06-09 13:43:51 +02009984 # Check whether --enable-gtktest was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02009985if test ${enable_gtktest+y}
9986then :
Bram Moolenaar427f5b62019-06-09 13:43:51 +02009987 enableval=$enable_gtktest;
Illia Bobyra96d5442023-08-30 16:30:15 +02009988else $as_nop
Bram Moolenaar427f5b62019-06-09 13:43:51 +02009989 enable_gtktest=yes
9990fi
9991
9992 if test "x$enable_gtktest" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009993 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gtk test enabled" >&5
9994printf "%s\n" "gtk test enabled" >&6; }
Bram Moolenaar427f5b62019-06-09 13:43:51 +02009995 else
Illia Bobyra96d5442023-08-30 16:30:15 +02009996 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gtk test disabled" >&5
9997printf "%s\n" "gtk test disabled" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009998 fi
9999
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010000 if test "x$PKG_CONFIG" != "xno"; then
Bram Moolenaarf272ae12021-01-31 19:52:50 +010010001 save_skip_gtk3=$SKIP_GTK3
10002 SKIP_GTK3=YES
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010003
Bram Moolenaar071d4272004-06-13 20:20:40 +000010004 if test "X$GTK_CONFIG" != "Xno" -o "X$PKG_CONFIG" != "Xno"; then
10005 {
Bram Moolenaar071d4272004-06-13 20:20:40 +000010006 no_gtk=""
10007 if (test "X$SKIP_GTK2" != "XYES" -a "X$PKG_CONFIG" != "Xno") \
10008 && $PKG_CONFIG --exists gtk+-2.0; then
10009 {
Bram Moolenaar98921892016-02-23 17:14:37 +010010010 min_gtk_version=2.2.0
Illia Bobyra96d5442023-08-30 16:30:15 +020010011 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GTK - version >= $min_gtk_version" >&5
10012printf %s "checking for GTK - version >= $min_gtk_version... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010013 GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-2.0`
Bram Moolenaar7b0294c2004-10-11 10:16:09 +000010014 GTK_LIBDIR=`$PKG_CONFIG --libs-only-L gtk+-2.0`
Bram Moolenaar071d4272004-06-13 20:20:40 +000010015 GTK_LIBS=`$PKG_CONFIG --libs gtk+-2.0`
10016 gtk_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
10017 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
10018 gtk_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
10019 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
10020 gtk_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
10021 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
10022 }
Bram Moolenaar98921892016-02-23 17:14:37 +010010023 elif (test "X$SKIP_GTK3" != "XYES" -a "X$PKG_CONFIG" != "Xno") \
10024 && $PKG_CONFIG --exists gtk+-3.0; then
10025 {
10026 min_gtk_version=2.2.0
Illia Bobyra96d5442023-08-30 16:30:15 +020010027 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GTK - version >= $min_gtk_version" >&5
10028printf %s "checking for GTK - version >= $min_gtk_version... " >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010029
10030 GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-3.0`
10031 GTK_LIBDIR=`$PKG_CONFIG --libs-only-L gtk+-3.0`
10032 GTK_LIBS=`$PKG_CONFIG --libs gtk+-3.0`
10033 gtk_major_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
10034 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
10035 gtk_minor_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
10036 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
10037 gtk_micro_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
10038 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
10039 }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010040 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010041 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GTK -dev package" >&5
10042printf %s "checking for GTK -dev package... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010043 no_gtk=yes
10044 fi
10045
10046 if test "x$enable_gtktest" = "xyes" -a "x$no_gtk" = "x"; then
10047 {
10048 ac_save_CFLAGS="$CFLAGS"
10049 ac_save_LIBS="$LIBS"
10050 CFLAGS="$CFLAGS $GTK_CFLAGS"
10051 LIBS="$LIBS $GTK_LIBS"
10052
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010053 rm -f conf.gtktest
Illia Bobyra96d5442023-08-30 16:30:15 +020010054 if test "$cross_compiling" = yes
10055then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000010056 echo $ac_n "cross compiling; assumed OK... $ac_c"
Illia Bobyra96d5442023-08-30 16:30:15 +020010057else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010059/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000010060
10061#include <gtk/gtk.h>
10062#include <stdio.h>
Bram Moolenaar446cb832008-06-24 21:56:24 +000010063#if STDC_HEADERS
10064# include <stdlib.h>
10065# include <stddef.h>
10066#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000010067
10068int
10069main ()
10070{
10071int major, minor, micro;
10072char *tmp_version;
10073
10074system ("touch conf.gtktest");
10075
10076/* HP/UX 9 (%@#!) writes to sscanf strings */
10077tmp_version = g_strdup("$min_gtk_version");
10078if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
10079 printf("%s, bad version string\n", "$min_gtk_version");
10080 exit(1);
10081 }
10082
10083if ((gtk_major_version > major) ||
10084 ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
10085 ((gtk_major_version == major) && (gtk_minor_version == minor) &&
10086 (gtk_micro_version >= micro)))
10087{
10088 return 0;
10089}
10090return 1;
10091}
10092
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010093_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020010094if ac_fn_c_try_run "$LINENO"
10095then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010096
Illia Bobyra96d5442023-08-30 16:30:15 +020010097else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010098 no_gtk=yes
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010099fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010100rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10101 conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010102fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000010103
Bram Moolenaar071d4272004-06-13 20:20:40 +000010104 CFLAGS="$ac_save_CFLAGS"
10105 LIBS="$ac_save_LIBS"
10106 }
10107 fi
10108 if test "x$no_gtk" = x ; then
10109 if test "x$enable_gtktest" = "xyes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010110 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&5
10111printf "%s\n" "yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010112 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010113 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&5
10114printf "%s\n" "found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010115 fi
Bram Moolenaar7b0294c2004-10-11 10:16:09 +000010116 GUI_LIB_LOC="$GTK_LIBDIR"
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010117 GTK_LIBNAME="$GTK_LIBS"
10118 GUI_INC_LOC="$GTK_CFLAGS"
Bram Moolenaar071d4272004-06-13 20:20:40 +000010119 else
10120 {
Illia Bobyra96d5442023-08-30 16:30:15 +020010121 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10122printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010123 GTK_CFLAGS=""
10124 GTK_LIBS=""
10125 :
Bram Moolenaaraf0839a2018-12-30 22:55:47 +010010126 if test "$fail_if_missing" = "yes" -a "X$gui_auto" != "Xyes"; then
10127 as_fn_error $? "could not configure GTK" "$LINENO" 5
10128 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000010129 }
10130 fi
10131 }
10132 else
10133 GTK_CFLAGS=""
10134 GTK_LIBS=""
10135 :
10136 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010137
10138
Bram Moolenaar071d4272004-06-13 20:20:40 +000010139 rm -f conf.gtktest
10140
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010141 if test "x$GTK_CFLAGS" != "x"; then
Bram Moolenaar98921892016-02-23 17:14:37 +010010142 SKIP_GTK3=YES
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010143 SKIP_MOTIF=YES
10144 GUITYPE=GTK
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010145
Bram Moolenaarf272ae12021-01-31 19:52:50 +010010146 else
10147 SKIP_GTK3=$save_skip_gtk3
Bram Moolenaar071d4272004-06-13 20:20:40 +000010148 fi
10149 fi
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010150 if test "x$GUITYPE" = "xGTK"; then
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010151 if test -z "$SKIP_GNOME"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000010152 {
Bram Moolenaar071d4272004-06-13 20:20:40 +000010153
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010154
10155
10156
10157
10158
Bram Moolenaar446cb832008-06-24 21:56:24 +000010159# Check whether --with-gnome-includes was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010160if test ${with_gnome_includes+y}
10161then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000010162 withval=$with_gnome_includes; CFLAGS="$CFLAGS -I$withval"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010163
Bram Moolenaar446cb832008-06-24 21:56:24 +000010164fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000010165
10166
Bram Moolenaar446cb832008-06-24 21:56:24 +000010167
10168# Check whether --with-gnome-libs was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010169if test ${with_gnome_libs+y}
10170then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000010171 withval=$with_gnome_libs; LDFLAGS="$LDFLAGS -L$withval" gnome_prefix=$withval
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010172
Bram Moolenaar446cb832008-06-24 21:56:24 +000010173fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000010174
10175
Bram Moolenaar446cb832008-06-24 21:56:24 +000010176
10177# Check whether --with-gnome was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010178if test ${with_gnome+y}
10179then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000010180 withval=$with_gnome; if test x$withval = xyes; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000010181 want_gnome=yes
10182 have_gnome=yes
10183 else
10184 if test "x$withval" = xno; then
10185 want_gnome=no
10186 else
10187 want_gnome=yes
10188 LDFLAGS="$LDFLAGS -L$withval/lib"
10189 CFLAGS="$CFLAGS -I$withval/include"
10190 gnome_prefix=$withval/lib
10191 fi
10192 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010193else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000010194 want_gnome=yes
Bram Moolenaar446cb832008-06-24 21:56:24 +000010195fi
10196
Bram Moolenaar071d4272004-06-13 20:20:40 +000010197
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010198 if test "x$want_gnome" = xyes; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000010199 {
Illia Bobyra96d5442023-08-30 16:30:15 +020010200 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libgnomeui-2.0" >&5
10201printf %s "checking for libgnomeui-2.0... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010202 if $PKG_CONFIG --exists libgnomeui-2.0; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010203 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10204printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010205 GNOME_LIBS=`$PKG_CONFIG --libs-only-l libgnomeui-2.0`
10206 GNOME_LIBDIR=`$PKG_CONFIG --libs-only-L libgnomeui-2.0`
10207 GNOME_INCLUDEDIR=`$PKG_CONFIG --cflags libgnomeui-2.0`
Bram Moolenaar97b2ad32006-03-18 21:40:56 +000010208
Illia Bobyra96d5442023-08-30 16:30:15 +020010209 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FreeBSD" >&5
10210printf %s "checking for FreeBSD... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +000010211 if test "$vim_cv_uname_output" = FreeBSD; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010212 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10213printf "%s\n" "yes" >&6; }
Bram Moolenaarc9b4b052006-04-30 18:54:39 +000010214 GNOME_INCLUDEDIR="$GNOME_INCLUDEDIR -D_THREAD_SAFE"
Bram Moolenaar97b2ad32006-03-18 21:40:56 +000010215 GNOME_LIBS="$GNOME_LIBS -pthread"
10216 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010217 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10218printf "%s\n" "no" >&6; }
Bram Moolenaar97b2ad32006-03-18 21:40:56 +000010219 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000010220 have_gnome=yes
10221 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010222 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10223printf "%s\n" "not found" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010224 if test "x" = xfail; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010010225 as_fn_error $? "Could not find libgnomeui-2.0 via pkg-config" "$LINENO" 5
Bram Moolenaar071d4272004-06-13 20:20:40 +000010226 fi
10227 fi
10228 }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010229 fi
10230
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010231 if test "x$have_gnome" = xyes ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010232 printf "%s\n" "#define FEAT_GUI_GNOME 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000010233
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010234 GUI_INC_LOC="$GUI_INC_LOC $GNOME_INCLUDEDIR"
10235 GTK_LIBNAME="$GTK_LIBNAME $GNOME_LIBDIR $GNOME_LIBS"
Bram Moolenaar071d4272004-06-13 20:20:40 +000010236 fi
10237 }
10238 fi
10239 fi
10240fi
10241
Bram Moolenaar98921892016-02-23 17:14:37 +010010242
10243if test -z "$SKIP_GTK3"; then
10244
Illia Bobyra96d5442023-08-30 16:30:15 +020010245 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-gtktest argument" >&5
10246printf %s "checking --disable-gtktest argument... " >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010247 # Check whether --enable-gtktest was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010248if test ${enable_gtktest+y}
10249then :
Bram Moolenaar98921892016-02-23 17:14:37 +010010250 enableval=$enable_gtktest;
Illia Bobyra96d5442023-08-30 16:30:15 +020010251else $as_nop
Bram Moolenaar98921892016-02-23 17:14:37 +010010252 enable_gtktest=yes
10253fi
10254
10255 if test "x$enable_gtktest" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010256 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gtk test enabled" >&5
10257printf "%s\n" "gtk test enabled" >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010258 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010259 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gtk test disabled" >&5
10260printf "%s\n" "gtk test disabled" >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010261 fi
10262
Bram Moolenaar98921892016-02-23 17:14:37 +010010263 if test "x$PKG_CONFIG" != "xno"; then
Bram Moolenaarf272ae12021-01-31 19:52:50 +010010264 save_skip_gtk2=$SKIP_GTK2
10265 SKIP_GTK2=YES
Bram Moolenaar98921892016-02-23 17:14:37 +010010266
10267 if test "X$GTK_CONFIG" != "Xno" -o "X$PKG_CONFIG" != "Xno"; then
10268 {
10269 no_gtk=""
10270 if (test "X$SKIP_GTK2" != "XYES" -a "X$PKG_CONFIG" != "Xno") \
10271 && $PKG_CONFIG --exists gtk+-2.0; then
10272 {
10273 min_gtk_version=3.0.0
Illia Bobyra96d5442023-08-30 16:30:15 +020010274 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GTK - version >= $min_gtk_version" >&5
10275printf %s "checking for GTK - version >= $min_gtk_version... " >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010276 GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-2.0`
10277 GTK_LIBDIR=`$PKG_CONFIG --libs-only-L gtk+-2.0`
10278 GTK_LIBS=`$PKG_CONFIG --libs gtk+-2.0`
10279 gtk_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
10280 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
10281 gtk_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
10282 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
10283 gtk_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
10284 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
10285 }
10286 elif (test "X$SKIP_GTK3" != "XYES" -a "X$PKG_CONFIG" != "Xno") \
10287 && $PKG_CONFIG --exists gtk+-3.0; then
10288 {
10289 min_gtk_version=3.0.0
Illia Bobyra96d5442023-08-30 16:30:15 +020010290 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GTK - version >= $min_gtk_version" >&5
10291printf %s "checking for GTK - version >= $min_gtk_version... " >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010292
10293 GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-3.0`
10294 GTK_LIBDIR=`$PKG_CONFIG --libs-only-L gtk+-3.0`
10295 GTK_LIBS=`$PKG_CONFIG --libs gtk+-3.0`
10296 gtk_major_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
10297 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
10298 gtk_minor_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
10299 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
10300 gtk_micro_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
10301 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
10302 }
10303 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010304 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GTK -dev package" >&5
10305printf %s "checking for GTK -dev package... " >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010306 no_gtk=yes
10307 fi
10308
10309 if test "x$enable_gtktest" = "xyes" -a "x$no_gtk" = "x"; then
10310 {
10311 ac_save_CFLAGS="$CFLAGS"
10312 ac_save_LIBS="$LIBS"
10313 CFLAGS="$CFLAGS $GTK_CFLAGS"
10314 LIBS="$LIBS $GTK_LIBS"
10315
10316 rm -f conf.gtktest
Illia Bobyra96d5442023-08-30 16:30:15 +020010317 if test "$cross_compiling" = yes
10318then :
Bram Moolenaar98921892016-02-23 17:14:37 +010010319 echo $ac_n "cross compiling; assumed OK... $ac_c"
Illia Bobyra96d5442023-08-30 16:30:15 +020010320else $as_nop
Bram Moolenaar98921892016-02-23 17:14:37 +010010321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10322/* end confdefs.h. */
10323
10324#include <gtk/gtk.h>
10325#include <stdio.h>
10326#if STDC_HEADERS
10327# include <stdlib.h>
10328# include <stddef.h>
10329#endif
10330
10331int
10332main ()
10333{
10334int major, minor, micro;
10335char *tmp_version;
10336
10337system ("touch conf.gtktest");
10338
10339/* HP/UX 9 (%@#!) writes to sscanf strings */
10340tmp_version = g_strdup("$min_gtk_version");
10341if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
10342 printf("%s, bad version string\n", "$min_gtk_version");
10343 exit(1);
10344 }
10345
10346if ((gtk_major_version > major) ||
10347 ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
10348 ((gtk_major_version == major) && (gtk_minor_version == minor) &&
10349 (gtk_micro_version >= micro)))
10350{
10351 return 0;
10352}
10353return 1;
10354}
10355
10356_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020010357if ac_fn_c_try_run "$LINENO"
10358then :
Bram Moolenaar98921892016-02-23 17:14:37 +010010359
Illia Bobyra96d5442023-08-30 16:30:15 +020010360else $as_nop
Bram Moolenaar98921892016-02-23 17:14:37 +010010361 no_gtk=yes
10362fi
10363rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10364 conftest.$ac_objext conftest.beam conftest.$ac_ext
10365fi
10366
10367 CFLAGS="$ac_save_CFLAGS"
10368 LIBS="$ac_save_LIBS"
10369 }
10370 fi
10371 if test "x$no_gtk" = x ; then
10372 if test "x$enable_gtktest" = "xyes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010373 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&5
10374printf "%s\n" "yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010375 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010376 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&5
10377printf "%s\n" "found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010378 fi
10379 GUI_LIB_LOC="$GTK_LIBDIR"
10380 GTK_LIBNAME="$GTK_LIBS"
10381 GUI_INC_LOC="$GTK_CFLAGS"
10382 else
10383 {
Illia Bobyra96d5442023-08-30 16:30:15 +020010384 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10385printf "%s\n" "no" >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010386 GTK_CFLAGS=""
10387 GTK_LIBS=""
10388 :
Bram Moolenaaraf0839a2018-12-30 22:55:47 +010010389 if test "$fail_if_missing" = "yes" -a "X$gui_auto" != "Xyes"; then
10390 as_fn_error $? "could not configure GTK" "$LINENO" 5
10391 fi
Bram Moolenaar98921892016-02-23 17:14:37 +010010392 }
10393 fi
10394 }
10395 else
10396 GTK_CFLAGS=""
10397 GTK_LIBS=""
10398 :
10399 fi
10400
10401
10402 rm -f conf.gtktest
10403
10404 if test "x$GTK_CFLAGS" != "x"; then
10405 SKIP_GTK2=YES
10406 SKIP_GNOME=YES
Bram Moolenaar98921892016-02-23 17:14:37 +010010407 SKIP_MOTIF=YES
10408 GUITYPE=GTK
10409
Illia Bobyra96d5442023-08-30 16:30:15 +020010410 printf "%s\n" "#define USE_GTK3 1" >>confdefs.h
Bram Moolenaar98921892016-02-23 17:14:37 +010010411
Bram Moolenaarf272ae12021-01-31 19:52:50 +010010412 else
10413 SKIP_GTK2=$save_skip_gtk2
Bram Moolenaar98921892016-02-23 17:14:37 +010010414 fi
10415 fi
10416fi
10417
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010418if test "x$GUITYPE" = "xGTK"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010419 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking version of Gdk-Pixbuf" >&5
10420printf %s "checking version of Gdk-Pixbuf... " >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010421 gdk_pixbuf_version=`$PKG_CONFIG --modversion gdk-pixbuf-2.0`
10422 if test "x$gdk_pixbuf_version" != x ; then
10423 gdk_pixbuf_version_minor=`echo $gdk_pixbuf_version | \
10424 sed -e 's/[0-9][0-9]*\.\([0-9][0-9]*\)\.[0-9][0-9]*/\1/'`
10425 if test "x$gdk_pixbuf_version_minor" != x -a \
Bram Moolenaar33c31d52016-02-22 21:07:06 +010010426 $gdk_pixbuf_version_minor -ge 31 ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010427 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: OK." >&5
10428printf "%s\n" "OK." >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010429 # Extract the first word of "glib-compile-resources", so it can be a program name with args.
10430set dummy glib-compile-resources; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +020010431{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10432printf %s "checking for $ac_word... " >&6; }
10433if test ${ac_cv_path_GLIB_COMPILE_RESOURCES+y}
10434then :
10435 printf %s "(cached) " >&6
10436else $as_nop
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010437 case $GLIB_COMPILE_RESOURCES in
10438 [\\/]* | ?:[\\/]*)
10439 ac_cv_path_GLIB_COMPILE_RESOURCES="$GLIB_COMPILE_RESOURCES" # Let the user override the test with a path.
10440 ;;
10441 *)
10442 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10443for as_dir in $PATH
10444do
10445 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +020010446 case $as_dir in #(((
10447 '') as_dir=./ ;;
10448 */) ;;
10449 *) as_dir=$as_dir/ ;;
10450 esac
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010451 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +020010452 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10453 ac_cv_path_GLIB_COMPILE_RESOURCES="$as_dir$ac_word$ac_exec_ext"
10454 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010455 break 2
10456 fi
10457done
10458 done
10459IFS=$as_save_IFS
10460
10461 test -z "$ac_cv_path_GLIB_COMPILE_RESOURCES" && ac_cv_path_GLIB_COMPILE_RESOURCES="no"
10462 ;;
10463esac
10464fi
10465GLIB_COMPILE_RESOURCES=$ac_cv_path_GLIB_COMPILE_RESOURCES
10466if test -n "$GLIB_COMPILE_RESOURCES"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010467 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GLIB_COMPILE_RESOURCES" >&5
10468printf "%s\n" "$GLIB_COMPILE_RESOURCES" >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010469else
Illia Bobyra96d5442023-08-30 16:30:15 +020010470 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10471printf "%s\n" "no" >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010472fi
10473
10474
Illia Bobyra96d5442023-08-30 16:30:15 +020010475 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking glib-compile-resources" >&5
10476printf %s "checking glib-compile-resources... " >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010477 if test "x$GLIB_COMPILE_RESOURCES" = xno ; then
Bram Moolenaar33c31d52016-02-22 21:07:06 +010010478 GLIB_COMPILE_RESOURCES=""
Illia Bobyra96d5442023-08-30 16:30:15 +020010479 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot be found in PATH." >&5
10480printf "%s\n" "cannot be found in PATH." >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010481 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010482 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: usable." >&5
10483printf "%s\n" "usable." >&6; }
10484 printf "%s\n" "#define USE_GRESOURCE 1" >>confdefs.h
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010485
Bram Moolenaar33c31d52016-02-22 21:07:06 +010010486 GRESOURCE_SRC="auto/gui_gtk_gresources.c"
10487 GRESOURCE_OBJ="objects/gui_gtk_gresources.o"
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010488 fi
10489 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010490 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable." >&5
10491printf "%s\n" "not usable." >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010492 fi
10493 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010494 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot obtain from pkg_config." >&5
10495printf "%s\n" "cannot obtain from pkg_config." >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010496 fi
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010497
Illia Bobyra96d5442023-08-30 16:30:15 +020010498 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-icon-cache-update argument" >&5
10499printf %s "checking --disable-icon-cache-update argument... " >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010500 # Check whether --enable-icon_cache_update was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010501if test ${enable_icon_cache_update+y}
10502then :
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010503 enableval=$enable_icon_cache_update;
Illia Bobyra96d5442023-08-30 16:30:15 +020010504else $as_nop
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010505 enable_icon_cache_update="yes"
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010506fi
10507
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010508 if test "$enable_icon_cache_update" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010509 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not set" >&5
10510printf "%s\n" "not set" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010511 # Extract the first word of "gtk-update-icon-cache", so it can be a program name with args.
10512set dummy gtk-update-icon-cache; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +020010513{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10514printf %s "checking for $ac_word... " >&6; }
10515if test ${ac_cv_path_GTK_UPDATE_ICON_CACHE+y}
10516then :
10517 printf %s "(cached) " >&6
10518else $as_nop
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010519 case $GTK_UPDATE_ICON_CACHE in
10520 [\\/]* | ?:[\\/]*)
10521 ac_cv_path_GTK_UPDATE_ICON_CACHE="$GTK_UPDATE_ICON_CACHE" # Let the user override the test with a path.
10522 ;;
10523 *)
10524 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10525for as_dir in $PATH
10526do
10527 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +020010528 case $as_dir in #(((
10529 '') as_dir=./ ;;
10530 */) ;;
10531 *) as_dir=$as_dir/ ;;
10532 esac
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010533 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +020010534 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10535 ac_cv_path_GTK_UPDATE_ICON_CACHE="$as_dir$ac_word$ac_exec_ext"
10536 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010537 break 2
10538 fi
10539done
10540 done
10541IFS=$as_save_IFS
10542
10543 test -z "$ac_cv_path_GTK_UPDATE_ICON_CACHE" && ac_cv_path_GTK_UPDATE_ICON_CACHE="no"
10544 ;;
10545esac
10546fi
10547GTK_UPDATE_ICON_CACHE=$ac_cv_path_GTK_UPDATE_ICON_CACHE
10548if test -n "$GTK_UPDATE_ICON_CACHE"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010549 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GTK_UPDATE_ICON_CACHE" >&5
10550printf "%s\n" "$GTK_UPDATE_ICON_CACHE" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010551else
Illia Bobyra96d5442023-08-30 16:30:15 +020010552 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10553printf "%s\n" "no" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010554fi
10555
10556
10557 if test "x$GTK_UPDATE_ICON_CACHE" = "xno" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010558 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found in PATH." >&5
10559printf "%s\n" "not found in PATH." >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010560 fi
10561 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010562 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: update disabled" >&5
10563printf "%s\n" "update disabled" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010564 fi
10565
Illia Bobyra96d5442023-08-30 16:30:15 +020010566 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-desktop-database-update argument" >&5
10567printf %s "checking --disable-desktop-database-update argument... " >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010568 # Check whether --enable-desktop_database_update was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010569if test ${enable_desktop_database_update+y}
10570then :
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010571 enableval=$enable_desktop_database_update;
Illia Bobyra96d5442023-08-30 16:30:15 +020010572else $as_nop
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010573 enable_desktop_database_update="yes"
10574fi
10575
10576 if test "$enable_desktop_database_update" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010577 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not set" >&5
10578printf "%s\n" "not set" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010579 # Extract the first word of "update-desktop-database", so it can be a program name with args.
10580set dummy update-desktop-database; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +020010581{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10582printf %s "checking for $ac_word... " >&6; }
10583if test ${ac_cv_path_UPDATE_DESKTOP_DATABASE+y}
10584then :
10585 printf %s "(cached) " >&6
10586else $as_nop
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010587 case $UPDATE_DESKTOP_DATABASE in
10588 [\\/]* | ?:[\\/]*)
10589 ac_cv_path_UPDATE_DESKTOP_DATABASE="$UPDATE_DESKTOP_DATABASE" # Let the user override the test with a path.
10590 ;;
10591 *)
10592 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10593for as_dir in $PATH
10594do
10595 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +020010596 case $as_dir in #(((
10597 '') as_dir=./ ;;
10598 */) ;;
10599 *) as_dir=$as_dir/ ;;
10600 esac
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010601 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +020010602 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10603 ac_cv_path_UPDATE_DESKTOP_DATABASE="$as_dir$ac_word$ac_exec_ext"
10604 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010605 break 2
10606 fi
10607done
10608 done
10609IFS=$as_save_IFS
10610
10611 test -z "$ac_cv_path_UPDATE_DESKTOP_DATABASE" && ac_cv_path_UPDATE_DESKTOP_DATABASE="no"
10612 ;;
10613esac
10614fi
10615UPDATE_DESKTOP_DATABASE=$ac_cv_path_UPDATE_DESKTOP_DATABASE
10616if test -n "$UPDATE_DESKTOP_DATABASE"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010617 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $UPDATE_DESKTOP_DATABASE" >&5
10618printf "%s\n" "$UPDATE_DESKTOP_DATABASE" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010619else
Illia Bobyra96d5442023-08-30 16:30:15 +020010620 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10621printf "%s\n" "no" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010622fi
10623
10624
10625 if test "x$UPDATE_DESKTOP_DATABASE" = "xno" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010626 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found in PATH." >&5
10627printf "%s\n" "not found in PATH." >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010628 fi
10629 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010630 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: update disabled" >&5
10631printf "%s\n" "update disabled" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010632 fi
10633fi
10634
10635
10636
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010637
10638
10639
10640
Bram Moolenaar071d4272004-06-13 20:20:40 +000010641if test -z "$SKIP_MOTIF"; then
10642 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"
10643 GUI_INC_LOC="`echo $GUI_INC_LOC|sed 's%-I%%g'`"
10644
Illia Bobyra96d5442023-08-30 16:30:15 +020010645 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for location of Motif GUI includes" >&5
10646printf %s "checking for location of Motif GUI includes... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010647 gui_includes="`echo $x_includes|sed 's%/^/^/*$%%'` `echo "$gui_XXX" | sed s/XXX/include/g` $GUI_INC_LOC"
10648 GUI_INC_LOC=
10649 for try in $gui_includes; do
10650 if test -f "$try/Xm/Xm.h"; then
10651 GUI_INC_LOC=$try
10652 fi
10653 done
10654 if test -n "$GUI_INC_LOC"; then
10655 if test "$GUI_INC_LOC" = /usr/include; then
10656 GUI_INC_LOC=
Illia Bobyra96d5442023-08-30 16:30:15 +020010657 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: in default path" >&5
10658printf "%s\n" "in default path" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010659 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010660 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GUI_INC_LOC" >&5
10661printf "%s\n" "$GUI_INC_LOC" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010662 fi
10663 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010664 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <not found>" >&5
10665printf "%s\n" "<not found>" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010666 SKIP_MOTIF=YES
10667 fi
10668fi
10669
10670
10671if test -z "$SKIP_MOTIF"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010672 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-motif-lib argument" >&5
10673printf %s "checking --with-motif-lib argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010674
Bram Moolenaar446cb832008-06-24 21:56:24 +000010675# Check whether --with-motif-lib was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010676if test ${with_motif_lib+y}
10677then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000010678 withval=$with_motif_lib; MOTIF_LIBNAME="${withval}"
10679fi
10680
Bram Moolenaar071d4272004-06-13 20:20:40 +000010681
10682 if test -n "$MOTIF_LIBNAME"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010683 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MOTIF_LIBNAME" >&5
10684printf "%s\n" "$MOTIF_LIBNAME" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010685 GUI_LIB_LOC=
10686 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010687 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10688printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010689
10690 GUI_LIB_LOC="`echo $GUI_LIB_LOC|sed 's%-L%%g'`"
10691
Illia Bobyra96d5442023-08-30 16:30:15 +020010692 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for location of Motif GUI libs" >&5
10693printf %s "checking for location of Motif GUI libs... " >&6; }
Bram Moolenaar01967f52023-04-12 16:24:03 +010010694 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 +000010695 GUI_LIB_LOC=
10696 for try in $gui_libs; do
Kelvin Leeb4716902022-04-04 17:20:01 +010010697 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 +000010698 if test -f "$libtry"; then
10699 GUI_LIB_LOC=$try
10700 fi
10701 done
10702 done
10703 if test -n "$GUI_LIB_LOC"; then
Bram Moolenaar01967f52023-04-12 16:24:03 +010010704 if test "$GUI_LIB_LOC" = /usr/lib \
10705 -o "$GUI_LIB_LOC" = /usr/lib64 \
Bram Moolenaar6324c3b2013-06-17 20:27:18 +020010706 -o "$GUI_LIB_LOC" = /usr/lib/i386-linux-gnu \
10707 -o "$GUI_LIB_LOC" = /usr/lib/x86_64-linux-gnu; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000010708 GUI_LIB_LOC=
Illia Bobyra96d5442023-08-30 16:30:15 +020010709 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: in default path" >&5
10710printf "%s\n" "in default path" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010711 else
10712 if test -n "$GUI_LIB_LOC"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010713 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GUI_LIB_LOC" >&5
10714printf "%s\n" "$GUI_LIB_LOC" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +000010715 if test "$vim_cv_uname_output" = SunOS &&
10716 echo $vim_cv_uname_r_output | grep '^5' >/dev/null; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000010717 GUI_LIB_LOC="$GUI_LIB_LOC -R $GUI_LIB_LOC"
10718 fi
10719 fi
10720 fi
10721 MOTIF_LIBNAME=-lXm
10722 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010723 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <not found>" >&5
10724printf "%s\n" "<not found>" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010725 SKIP_MOTIF=YES
10726 fi
10727 fi
10728fi
10729
10730if test -z "$SKIP_MOTIF"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000010731 GUITYPE=MOTIF
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010732
Bram Moolenaar071d4272004-06-13 20:20:40 +000010733fi
10734
Bram Moolenaare2adcf32022-03-12 11:57:25 +000010735if test -z "$SKIP_MOTIF"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000010736 if test -n "$GUI_INC_LOC"; then
10737 GUI_INC_LOC=-I"`echo $GUI_INC_LOC|sed 's%-I%%'`"
10738 fi
10739 if test -n "$GUI_LIB_LOC"; then
10740 GUI_LIB_LOC=-L"`echo $GUI_LIB_LOC|sed 's%-L%%'`"
10741 fi
10742
10743 ldflags_save=$LDFLAGS
10744 LDFLAGS="$X_LIBS $LDFLAGS"
Illia Bobyra96d5442023-08-30 16:30:15 +020010745 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XShapeQueryExtension in -lXext" >&5
10746printf %s "checking for XShapeQueryExtension in -lXext... " >&6; }
10747if test ${ac_cv_lib_Xext_XShapeQueryExtension+y}
10748then :
10749 printf %s "(cached) " >&6
10750else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010751 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000010752LIBS="-lXext -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010753cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010754/* end confdefs.h. */
10755
Bram Moolenaar446cb832008-06-24 21:56:24 +000010756/* Override any GCC internal prototype to avoid an error.
10757 Use char because int might match the return type of a GCC
10758 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010759char XShapeQueryExtension ();
10760int
Illia Bobyra96d5442023-08-30 16:30:15 +020010761main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010762{
Bram Moolenaar446cb832008-06-24 21:56:24 +000010763return XShapeQueryExtension ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010764 ;
10765 return 0;
10766}
10767_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020010768if ac_fn_c_try_link "$LINENO"
10769then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010770 ac_cv_lib_Xext_XShapeQueryExtension=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020010771else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010772 ac_cv_lib_Xext_XShapeQueryExtension=no
Bram Moolenaar071d4272004-06-13 20:20:40 +000010773fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010774rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010775 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010776LIBS=$ac_check_lib_save_LIBS
10777fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010778{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
10779printf "%s\n" "$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
10780if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = xyes
10781then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000010782 GUI_X_LIBS="-lXext"
Bram Moolenaar071d4272004-06-13 20:20:40 +000010783fi
10784
Illia Bobyra96d5442023-08-30 16:30:15 +020010785 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wslen in -lw" >&5
10786printf %s "checking for wslen in -lw... " >&6; }
10787if test ${ac_cv_lib_w_wslen+y}
10788then :
10789 printf %s "(cached) " >&6
10790else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010791 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000010792LIBS="-lw $GUI_X_LIBS -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010793cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010794/* end confdefs.h. */
10795
Bram Moolenaar446cb832008-06-24 21:56:24 +000010796/* Override any GCC internal prototype to avoid an error.
10797 Use char because int might match the return type of a GCC
10798 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010799char wslen ();
10800int
Illia Bobyra96d5442023-08-30 16:30:15 +020010801main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010802{
Bram Moolenaar446cb832008-06-24 21:56:24 +000010803return wslen ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010804 ;
10805 return 0;
10806}
10807_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020010808if ac_fn_c_try_link "$LINENO"
10809then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010810 ac_cv_lib_w_wslen=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020010811else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010812 ac_cv_lib_w_wslen=no
Bram Moolenaar071d4272004-06-13 20:20:40 +000010813fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010814rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010815 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010816LIBS=$ac_check_lib_save_LIBS
10817fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010818{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wslen" >&5
10819printf "%s\n" "$ac_cv_lib_w_wslen" >&6; }
10820if test "x$ac_cv_lib_w_wslen" = xyes
10821then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000010822 X_EXTRA_LIBS="$X_EXTRA_LIBS -lw"
Bram Moolenaar071d4272004-06-13 20:20:40 +000010823fi
10824
Illia Bobyra96d5442023-08-30 16:30:15 +020010825 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlsym in -ldl" >&5
10826printf %s "checking for dlsym in -ldl... " >&6; }
10827if test ${ac_cv_lib_dl_dlsym+y}
10828then :
10829 printf %s "(cached) " >&6
10830else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010831 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000010832LIBS="-ldl $GUI_X_LIBS -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010833cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010834/* end confdefs.h. */
10835
Bram Moolenaar446cb832008-06-24 21:56:24 +000010836/* Override any GCC internal prototype to avoid an error.
10837 Use char because int might match the return type of a GCC
10838 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010839char dlsym ();
10840int
Illia Bobyra96d5442023-08-30 16:30:15 +020010841main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010842{
Bram Moolenaar446cb832008-06-24 21:56:24 +000010843return dlsym ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010844 ;
10845 return 0;
10846}
10847_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020010848if ac_fn_c_try_link "$LINENO"
10849then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010850 ac_cv_lib_dl_dlsym=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020010851else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010852 ac_cv_lib_dl_dlsym=no
Bram Moolenaar071d4272004-06-13 20:20:40 +000010853fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010854rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010855 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010856LIBS=$ac_check_lib_save_LIBS
10857fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010858{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlsym" >&5
10859printf "%s\n" "$ac_cv_lib_dl_dlsym" >&6; }
10860if test "x$ac_cv_lib_dl_dlsym" = xyes
10861then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000010862 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldl"
Bram Moolenaar071d4272004-06-13 20:20:40 +000010863fi
10864
Illia Bobyra96d5442023-08-30 16:30:15 +020010865 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XmuCreateStippledPixmap in -lXmu" >&5
10866printf %s "checking for XmuCreateStippledPixmap in -lXmu... " >&6; }
10867if test ${ac_cv_lib_Xmu_XmuCreateStippledPixmap+y}
10868then :
10869 printf %s "(cached) " >&6
10870else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010871 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000010872LIBS="-lXmu $GUI_X_LIBS -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010873cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010874/* end confdefs.h. */
10875
Bram Moolenaar446cb832008-06-24 21:56:24 +000010876/* Override any GCC internal prototype to avoid an error.
10877 Use char because int might match the return type of a GCC
10878 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010879char XmuCreateStippledPixmap ();
10880int
Illia Bobyra96d5442023-08-30 16:30:15 +020010881main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010882{
Bram Moolenaar446cb832008-06-24 21:56:24 +000010883return XmuCreateStippledPixmap ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010884 ;
10885 return 0;
10886}
10887_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020010888if ac_fn_c_try_link "$LINENO"
10889then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010890 ac_cv_lib_Xmu_XmuCreateStippledPixmap=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020010891else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010892 ac_cv_lib_Xmu_XmuCreateStippledPixmap=no
Bram Moolenaar071d4272004-06-13 20:20:40 +000010893fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010894rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010895 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010896LIBS=$ac_check_lib_save_LIBS
10897fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010898{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuCreateStippledPixmap" >&5
10899printf "%s\n" "$ac_cv_lib_Xmu_XmuCreateStippledPixmap" >&6; }
10900if test "x$ac_cv_lib_Xmu_XmuCreateStippledPixmap" = xyes
10901then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000010902 GUI_X_LIBS="-lXmu $GUI_X_LIBS"
Bram Moolenaar071d4272004-06-13 20:20:40 +000010903fi
10904
10905 if test -z "$SKIP_MOTIF"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010906 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XpEndJob in -lXp" >&5
10907printf %s "checking for XpEndJob in -lXp... " >&6; }
10908if test ${ac_cv_lib_Xp_XpEndJob+y}
10909then :
10910 printf %s "(cached) " >&6
10911else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010912 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000010913LIBS="-lXp $GUI_X_LIBS -lXm -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010914cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010915/* end confdefs.h. */
10916
Bram Moolenaar446cb832008-06-24 21:56:24 +000010917/* Override any GCC internal prototype to avoid an error.
10918 Use char because int might match the return type of a GCC
10919 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010920char XpEndJob ();
10921int
Illia Bobyra96d5442023-08-30 16:30:15 +020010922main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010923{
Bram Moolenaar446cb832008-06-24 21:56:24 +000010924return XpEndJob ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010925 ;
10926 return 0;
10927}
10928_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020010929if ac_fn_c_try_link "$LINENO"
10930then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010931 ac_cv_lib_Xp_XpEndJob=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020010932else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010933 ac_cv_lib_Xp_XpEndJob=no
Bram Moolenaar071d4272004-06-13 20:20:40 +000010934fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010935rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010936 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010937LIBS=$ac_check_lib_save_LIBS
10938fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010939{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpEndJob" >&5
10940printf "%s\n" "$ac_cv_lib_Xp_XpEndJob" >&6; }
10941if test "x$ac_cv_lib_Xp_XpEndJob" = xyes
10942then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000010943 GUI_X_LIBS="-lXp $GUI_X_LIBS"
Bram Moolenaar071d4272004-06-13 20:20:40 +000010944fi
10945
10946 fi
10947 LDFLAGS=$ldflags_save
10948
Illia Bobyra96d5442023-08-30 16:30:15 +020010949 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for extra X11 defines" >&5
10950printf %s "checking for extra X11 defines... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010951 NARROW_PROTO=
10952 rm -fr conftestdir
10953 if mkdir conftestdir; then
10954 cd conftestdir
10955 cat > Imakefile <<'EOF'
10956acfindx:
10957 @echo 'NARROW_PROTO="${PROTO_DEFINES}"'
10958EOF
10959 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
10960 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
10961 fi
10962 cd ..
10963 rm -fr conftestdir
10964 fi
10965 if test -z "$NARROW_PROTO"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010966 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10967printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010968 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010969 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NARROW_PROTO" >&5
10970printf "%s\n" "$NARROW_PROTO" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010971 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010972
Bram Moolenaar071d4272004-06-13 20:20:40 +000010973fi
10974
10975if test "$enable_xsmp" = "yes"; then
10976 cppflags_save=$CPPFLAGS
10977 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
Illia Bobyra96d5442023-08-30 16:30:15 +020010978 ac_fn_c_check_header_compile "$LINENO" "X11/SM/SMlib.h" "ac_cv_header_X11_SM_SMlib_h" "$ac_includes_default"
10979if test "x$ac_cv_header_X11_SM_SMlib_h" = xyes
10980then :
10981 printf "%s\n" "#define HAVE_X11_SM_SMLIB_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010982
10983fi
10984
Bram Moolenaar071d4272004-06-13 20:20:40 +000010985 CPPFLAGS=$cppflags_save
10986fi
10987
10988
Bram Moolenaarf52fac22022-03-11 16:01:26 +000010989if test -z "$SKIP_MOTIF" -o -z "$SKIP_GTK2" -o -z "$SKIP_GTK3"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000010990 cppflags_save=$CPPFLAGS
10991 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
Illia Bobyra96d5442023-08-30 16:30:15 +020010992 ac_fn_c_check_header_compile "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default"
10993if test "x$ac_cv_header_X11_xpm_h" = xyes
10994then :
10995 printf "%s\n" "#define HAVE_X11_XPM_H 1" >>confdefs.h
10996
10997fi
10998ac_fn_c_check_header_compile "$LINENO" "X11/Sunkeysym.h" "ac_cv_header_X11_Sunkeysym_h" "$ac_includes_default"
10999if test "x$ac_cv_header_X11_Sunkeysym_h" = xyes
11000then :
11001 printf "%s\n" "#define HAVE_X11_SUNKEYSYM_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011002
11003fi
11004
Bram Moolenaar071d4272004-06-13 20:20:40 +000011005
11006 if test ! "$enable_xim" = "no"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011007 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XIMText in X11/Xlib.h" >&5
11008printf %s "checking for XIMText in X11/Xlib.h... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011010/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000011011#include <X11/Xlib.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011012_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000011013if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Illia Bobyra96d5442023-08-30 16:30:15 +020011014 $EGREP "XIMText" >/dev/null 2>&1
11015then :
11016 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11017printf "%s\n" "yes" >&6; }
11018else $as_nop
11019 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no; xim has been disabled" >&5
11020printf "%s\n" "no; xim has been disabled" >&6; }; enable_xim="no"
Bram Moolenaar071d4272004-06-13 20:20:40 +000011021fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011022rm -rf conftest*
Bram Moolenaar071d4272004-06-13 20:20:40 +000011023
11024 fi
11025 CPPFLAGS=$cppflags_save
11026
Bram Moolenaar54612582019-11-21 17:13:31 +010011027 if test "$enable_xim" = "auto" -a "x$GUITYPE" != "xNONE" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011028 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: X GUI selected; xim has been enabled" >&5
11029printf "%s\n" "X GUI selected; xim has been enabled" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011030 enable_xim="yes"
11031 fi
11032fi
11033
Bram Moolenaarf52fac22022-03-11 16:01:26 +000011034if test -z "$SKIP_MOTIF"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000011035 cppflags_save=$CPPFLAGS
11036 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
Illia Bobyra96d5442023-08-30 16:30:15 +020011037 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for X11/Xmu/Editres.h" >&5
11038printf %s "checking for X11/Xmu/Editres.h... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011040/* end confdefs.h. */
Bram Moolenaar2ce06f62005-01-31 19:19:04 +000011041
11042#include <X11/Intrinsic.h>
11043#include <X11/Xmu/Editres.h>
11044int
Illia Bobyra96d5442023-08-30 16:30:15 +020011045main (void)
Bram Moolenaar2ce06f62005-01-31 19:19:04 +000011046{
11047int i; i = 0;
11048 ;
11049 return 0;
11050}
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011051_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011052if ac_fn_c_try_compile "$LINENO"
11053then :
11054 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11055printf "%s\n" "yes" >&6; }
11056 printf "%s\n" "#define HAVE_X11_XMU_EDITRES_H 1" >>confdefs.h
Bram Moolenaar2ce06f62005-01-31 19:19:04 +000011057
Illia Bobyra96d5442023-08-30 16:30:15 +020011058else $as_nop
11059 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11060printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011061fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011062rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000011063 CPPFLAGS=$cppflags_save
11064fi
11065
11066if test -z "$SKIP_MOTIF"; then
11067 cppflags_save=$CPPFLAGS
11068 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
Bram Moolenaar77c19352012-06-13 19:19:41 +020011069 if test "$zOSUnix" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011070 ac_fn_c_check_header_compile "$LINENO" "Xm/Xm.h" "ac_cv_header_Xm_Xm_h" "$ac_includes_default"
11071if test "x$ac_cv_header_Xm_Xm_h" = xyes
11072then :
11073 printf "%s\n" "#define HAVE_XM_XM_H 1" >>confdefs.h
Bram Moolenaar1004b3d2022-06-05 19:51:55 +010011074
11075fi
11076
Bram Moolenaar77c19352012-06-13 19:19:41 +020011077 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011078 ac_fn_c_check_header_compile "$LINENO" "Xm/Xm.h" "ac_cv_header_Xm_Xm_h" "$ac_includes_default"
11079if test "x$ac_cv_header_Xm_Xm_h" = xyes
11080then :
11081 printf "%s\n" "#define HAVE_XM_XM_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011082
11083fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011084ac_fn_c_check_header_compile "$LINENO" "Xm/XpmP.h" "ac_cv_header_Xm_XpmP_h" "$ac_includes_default"
11085if test "x$ac_cv_header_Xm_XpmP_h" = xyes
11086then :
11087 printf "%s\n" "#define HAVE_XM_XPMP_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011088
Illia Bobyra96d5442023-08-30 16:30:15 +020011089fi
11090ac_fn_c_check_header_compile "$LINENO" "Xm/JoinSideT.h" "ac_cv_header_Xm_JoinSideT_h" "$ac_includes_default"
11091if test "x$ac_cv_header_Xm_JoinSideT_h" = xyes
11092then :
11093 printf "%s\n" "#define HAVE_XM_JOINSIDET_H 1" >>confdefs.h
11094
11095fi
11096ac_fn_c_check_header_compile "$LINENO" "Xm/TraitP.h" "ac_cv_header_Xm_TraitP_h" "$ac_includes_default"
11097if test "x$ac_cv_header_Xm_TraitP_h" = xyes
11098then :
11099 printf "%s\n" "#define HAVE_XM_TRAITP_H 1" >>confdefs.h
11100
11101fi
11102ac_fn_c_check_header_compile "$LINENO" "Xm/Manager.h" "ac_cv_header_Xm_Manager_h" "$ac_includes_default"
11103if test "x$ac_cv_header_Xm_Manager_h" = xyes
11104then :
11105 printf "%s\n" "#define HAVE_XM_MANAGER_H 1" >>confdefs.h
11106
11107fi
11108ac_fn_c_check_header_compile "$LINENO" "Xm/UnhighlightT.h" "ac_cv_header_Xm_UnhighlightT_h" "$ac_includes_default"
11109if test "x$ac_cv_header_Xm_UnhighlightT_h" = xyes
11110then :
11111 printf "%s\n" "#define HAVE_XM_UNHIGHLIGHTT_H 1" >>confdefs.h
11112
11113fi
11114ac_fn_c_check_header_compile "$LINENO" "Xm/Notebook.h" "ac_cv_header_Xm_Notebook_h" "$ac_includes_default"
11115if test "x$ac_cv_header_Xm_Notebook_h" = xyes
11116then :
11117 printf "%s\n" "#define HAVE_XM_NOTEBOOK_H 1" >>confdefs.h
11118
11119fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000011120
Bram Moolenaar1004b3d2022-06-05 19:51:55 +010011121 fi
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011122
Bram Moolenaar77c19352012-06-13 19:19:41 +020011123 if test "x$ac_cv_header_Xm_XpmP_h" = "xyes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011124 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XpmAttributes_21 in Xm/XpmP.h" >&5
11125printf %s "checking for XpmAttributes_21 in Xm/XpmP.h... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011127/* end confdefs.h. */
11128#include <Xm/XpmP.h>
11129int
Illia Bobyra96d5442023-08-30 16:30:15 +020011130main (void)
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011131{
11132XpmAttributes_21 attr;
11133 ;
11134 return 0;
11135}
11136_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011137if ac_fn_c_try_compile "$LINENO"
11138then :
11139 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11140printf "%s\n" "yes" >&6; }; printf "%s\n" "#define XPMATTRIBUTES_TYPE XpmAttributes_21" >>confdefs.h
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011141
Illia Bobyra96d5442023-08-30 16:30:15 +020011142else $as_nop
11143 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11144printf "%s\n" "no" >&6; }; printf "%s\n" "#define XPMATTRIBUTES_TYPE XpmAttributes" >>confdefs.h
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011145
11146
11147fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011148rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011149 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011150 printf "%s\n" "#define XPMATTRIBUTES_TYPE XpmAttributes" >>confdefs.h
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011151
11152 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000011153 CPPFLAGS=$cppflags_save
11154fi
11155
11156if test "x$GUITYPE" = "xNONE" -a "$enable_xim" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011157 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no GUI selected; xim has been disabled" >&5
11158printf "%s\n" "no GUI selected; xim has been disabled" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011159 enable_xim="no"
11160fi
11161if test "x$GUITYPE" = "xNONE" -a "$enable_fontset" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011162 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no GUI selected; fontset has been disabled" >&5
11163printf "%s\n" "no GUI selected; fontset has been disabled" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011164 enable_fontset="no"
11165fi
Bram Moolenaar182c5be2010-06-25 05:37:59 +020011166if test "x$GUITYPE:$enable_fontset" = "xGTK:yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011167 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: GTK+ 2 GUI selected; fontset has been disabled" >&5
11168printf "%s\n" "GTK+ 2 GUI selected; fontset has been disabled" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011169 enable_fontset="no"
11170fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000011171
Bram Moolenaarb3f74062020-02-26 16:16:53 +010011172if test -z "$SKIP_HAIKU"; then
11173 GUITYPE=HAIKUGUI
11174fi
11175
Bram Moolenaar071d4272004-06-13 20:20:40 +000011176if test -z "$SKIP_PHOTON"; then
11177 GUITYPE=PHOTONGUI
11178fi
11179
11180
11181
11182
11183
11184
11185if test "$enable_workshop" = "yes" -a -n "$SKIP_MOTIF"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010011186 as_fn_error $? "cannot use workshop without Motif" "$LINENO" 5
Bram Moolenaar071d4272004-06-13 20:20:40 +000011187fi
11188
11189if test "$enable_xim" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011190 printf "%s\n" "#define FEAT_XIM 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000011191
11192fi
11193if test "$enable_fontset" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011194 printf "%s\n" "#define FEAT_XFONTSET 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000011195
11196fi
11197
11198
11199
Illia Bobyra96d5442023-08-30 16:30:15 +020011200{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for /proc link to executable" >&5
11201printf %s "checking for /proc link to executable... " >&6; }
Bram Moolenaar5f69fee2017-03-09 11:58:40 +010011202if test -L "/proc/self/exe"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011203 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: /proc/self/exe" >&5
11204printf "%s\n" "/proc/self/exe" >&6; }
11205 printf "%s\n" "#define PROC_EXE_LINK \"/proc/self/exe\"" >>confdefs.h
Bram Moolenaarf3757f02017-03-16 15:13:45 +010011206
11207elif test -L "/proc/self/path/a.out"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011208 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: /proc/self/path/a.out" >&5
11209printf "%s\n" "/proc/self/path/a.out" >&6; }
11210 printf "%s\n" "#define PROC_EXE_LINK \"/proc/self/path/a.out\"" >>confdefs.h
Bram Moolenaarf3757f02017-03-16 15:13:45 +010011211
11212elif test -L "/proc/curproc/file"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011213 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: /proc/curproc/file" >&5
11214printf "%s\n" "/proc/curproc/file" >&6; }
11215 printf "%s\n" "#define PROC_EXE_LINK \"/proc/curproc/file\"" >>confdefs.h
Bram Moolenaar5f69fee2017-03-09 11:58:40 +010011216
11217else
Illia Bobyra96d5442023-08-30 16:30:15 +020011218 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11219printf "%s\n" "no" >&6; }
Bram Moolenaar5f69fee2017-03-09 11:58:40 +010011220fi
11221
Illia Bobyra96d5442023-08-30 16:30:15 +020011222{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CYGWIN or MSYS environment" >&5
11223printf %s "checking for CYGWIN or MSYS environment... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +000011224case $vim_cv_uname_output in
Illia Bobyra96d5442023-08-30 16:30:15 +020011225 CYGWIN*|MSYS*) CYGWIN=yes; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11226printf "%s\n" "yes" >&6; }
11227 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CYGWIN clipboard support" >&5
11228printf %s "checking for CYGWIN clipboard support... " >&6; }
Bram Moolenaar693e40c2013-02-26 14:56:42 +010011229 if test "x$with_x" = "xno" ; then
11230 OS_EXTRA_SRC=winclip.c; OS_EXTRA_OBJ=objects/winclip.o
Illia Bobyra96d5442023-08-30 16:30:15 +020011231 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11232printf "%s\n" "yes" >&6; }
11233 printf "%s\n" "#define FEAT_CYGWIN_WIN32_CLIPBOARD 1" >>confdefs.h
Bram Moolenaar693e40c2013-02-26 14:56:42 +010011234
11235 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011236 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no - using X11" >&5
11237printf "%s\n" "no - using X11" >&6; }
Bram Moolenaar693e40c2013-02-26 14:56:42 +010011238 fi ;;
11239
Illia Bobyra96d5442023-08-30 16:30:15 +020011240 *) CYGWIN=no; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11241printf "%s\n" "no" >&6; };;
Bram Moolenaar693e40c2013-02-26 14:56:42 +010011242esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000011243
Bram Moolenaar071d4272004-06-13 20:20:40 +000011244
Illia Bobyra96d5442023-08-30 16:30:15 +020011245{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether toupper is broken" >&5
11246printf %s "checking whether toupper is broken... " >&6; }
11247if test ${vim_cv_toupper_broken+y}
11248then :
11249 printf %s "(cached) " >&6
11250else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000011251
Illia Bobyra96d5442023-08-30 16:30:15 +020011252 if test "$cross_compiling" = yes
11253then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000011254
Bram Moolenaar7db77842014-03-27 17:40:59 +010011255 as_fn_error $? "cross-compiling: please set 'vim_cv_toupper_broken'" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000011256
Illia Bobyra96d5442023-08-30 16:30:15 +020011257else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11259/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000011260
11261#include "confdefs.h"
Bram Moolenaar071d4272004-06-13 20:20:40 +000011262#include <ctype.h>
Bram Moolenaar446cb832008-06-24 21:56:24 +000011263#if STDC_HEADERS
11264# include <stdlib.h>
11265# include <stddef.h>
11266#endif
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010011267int main() { exit(toupper('A') == 'A' && tolower('z') == 'z'); }
Bram Moolenaar446cb832008-06-24 21:56:24 +000011268
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011269_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011270if ac_fn_c_try_run "$LINENO"
11271then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000011272
11273 vim_cv_toupper_broken=yes
11274
Illia Bobyra96d5442023-08-30 16:30:15 +020011275else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000011276
11277 vim_cv_toupper_broken=no
11278
Bram Moolenaar071d4272004-06-13 20:20:40 +000011279fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011280rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11281 conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000011282fi
11283
Bram Moolenaar446cb832008-06-24 21:56:24 +000011284fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011285{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_toupper_broken" >&5
11286printf "%s\n" "$vim_cv_toupper_broken" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000011287
11288if test "x$vim_cv_toupper_broken" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011289 printf "%s\n" "#define BROKEN_TOUPPER 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000011290
11291fi
11292
Illia Bobyra96d5442023-08-30 16:30:15 +020011293{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __DATE__ and __TIME__ work" >&5
11294printf %s "checking whether __DATE__ and __TIME__ work... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011295cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011296/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000011297#include <stdio.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011298int
Illia Bobyra96d5442023-08-30 16:30:15 +020011299main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011300{
Bram Moolenaar071d4272004-06-13 20:20:40 +000011301printf("(" __DATE__ " " __TIME__ ")");
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011302 ;
11303 return 0;
11304}
11305_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011306if ac_fn_c_try_compile "$LINENO"
11307then :
11308 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11309printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_DATE_TIME 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000011310
Illia Bobyra96d5442023-08-30 16:30:15 +020011311else $as_nop
11312 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11313printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011314fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011315rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000011316
Illia Bobyra96d5442023-08-30 16:30:15 +020011317{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __attribute__((unused)) is allowed" >&5
11318printf %s "checking whether __attribute__((unused)) is allowed... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011319cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar0c094b92009-05-14 20:20:33 +000011320/* end confdefs.h. */
11321#include <stdio.h>
11322int
Illia Bobyra96d5442023-08-30 16:30:15 +020011323main (void)
Bram Moolenaar0c094b92009-05-14 20:20:33 +000011324{
11325int x __attribute__((unused));
11326 ;
11327 return 0;
11328}
11329_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011330if ac_fn_c_try_compile "$LINENO"
11331then :
11332 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11333printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_ATTRIBUTE_UNUSED 1" >>confdefs.h
Bram Moolenaar0c094b92009-05-14 20:20:33 +000011334
Illia Bobyra96d5442023-08-30 16:30:15 +020011335else $as_nop
11336 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11337printf "%s\n" "no" >&6; }
Bram Moolenaar0c094b92009-05-14 20:20:33 +000011338fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011339rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0c094b92009-05-14 20:20:33 +000011340
Illia Bobyra96d5442023-08-30 16:30:15 +020011341ac_fn_c_check_header_compile "$LINENO" "elf.h" "ac_cv_header_elf_h" "$ac_includes_default"
11342if test "x$ac_cv_header_elf_h" = xyes
11343then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000011344 HAS_ELF=1
Bram Moolenaar071d4272004-06-13 20:20:40 +000011345fi
11346
11347if test "$HAS_ELF" = 1; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011348 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for main in -lelf" >&5
11349printf %s "checking for main in -lelf... " >&6; }
11350if test ${ac_cv_lib_elf_main+y}
11351then :
11352 printf %s "(cached) " >&6
11353else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011354 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000011355LIBS="-lelf $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011356cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011357/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000011358
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011359
11360int
Illia Bobyra96d5442023-08-30 16:30:15 +020011361main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011362{
Bram Moolenaar446cb832008-06-24 21:56:24 +000011363return main ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011364 ;
11365 return 0;
11366}
11367_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011368if ac_fn_c_try_link "$LINENO"
11369then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011370 ac_cv_lib_elf_main=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020011371else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011372 ac_cv_lib_elf_main=no
Bram Moolenaar071d4272004-06-13 20:20:40 +000011373fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011374rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011375 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011376LIBS=$ac_check_lib_save_LIBS
11377fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011378{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_main" >&5
11379printf "%s\n" "$ac_cv_lib_elf_main" >&6; }
11380if test "x$ac_cv_lib_elf_main" = xyes
11381then :
11382 printf "%s\n" "#define HAVE_LIBELF 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000011383
11384 LIBS="-lelf $LIBS"
11385
Bram Moolenaar071d4272004-06-13 20:20:40 +000011386fi
11387
11388fi
11389
11390ac_header_dirent=no
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011391for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Illia Bobyra96d5442023-08-30 16:30:15 +020011392 as_ac_Header=`printf "%s\n" "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
11393{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
11394printf %s "checking for $ac_hdr that defines DIR... " >&6; }
11395if eval test \${$as_ac_Header+y}
11396then :
11397 printf %s "(cached) " >&6
11398else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011400/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000011401#include <sys/types.h>
11402#include <$ac_hdr>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011403
11404int
Illia Bobyra96d5442023-08-30 16:30:15 +020011405main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011406{
11407if ((DIR *) 0)
11408return 0;
11409 ;
11410 return 0;
11411}
11412_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011413if ac_fn_c_try_compile "$LINENO"
11414then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011415 eval "$as_ac_Header=yes"
Illia Bobyra96d5442023-08-30 16:30:15 +020011416else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011417 eval "$as_ac_Header=no"
Bram Moolenaar071d4272004-06-13 20:20:40 +000011418fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011419rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000011420fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011421eval ac_res=\$$as_ac_Header
Illia Bobyra96d5442023-08-30 16:30:15 +020011422 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11423printf "%s\n" "$ac_res" >&6; }
11424if eval test \"x\$"$as_ac_Header"\" = x"yes"
11425then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011426 cat >>confdefs.h <<_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011427#define `printf "%s\n" "HAVE_$ac_hdr" | $as_tr_cpp` 1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011428_ACEOF
11429
11430ac_header_dirent=$ac_hdr; break
Bram Moolenaar071d4272004-06-13 20:20:40 +000011431fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011432
Bram Moolenaar071d4272004-06-13 20:20:40 +000011433done
11434# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
11435if test $ac_header_dirent = dirent.h; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011436 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
11437printf %s "checking for library containing opendir... " >&6; }
11438if test ${ac_cv_search_opendir+y}
11439then :
11440 printf %s "(cached) " >&6
11441else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011442 ac_func_search_save_LIBS=$LIBS
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011443cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011444/* end confdefs.h. */
11445
Bram Moolenaar446cb832008-06-24 21:56:24 +000011446/* Override any GCC internal prototype to avoid an error.
11447 Use char because int might match the return type of a GCC
11448 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011449char opendir ();
11450int
Illia Bobyra96d5442023-08-30 16:30:15 +020011451main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011452{
Bram Moolenaar446cb832008-06-24 21:56:24 +000011453return opendir ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011454 ;
11455 return 0;
11456}
11457_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011458for ac_lib in '' dir
11459do
Bram Moolenaar446cb832008-06-24 21:56:24 +000011460 if test -z "$ac_lib"; then
11461 ac_res="none required"
11462 else
11463 ac_res=-l$ac_lib
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011464 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Bram Moolenaar446cb832008-06-24 21:56:24 +000011465 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011466 if ac_fn_c_try_link "$LINENO"
11467then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000011468 ac_cv_search_opendir=$ac_res
Bram Moolenaar071d4272004-06-13 20:20:40 +000011469fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011470rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011471 conftest$ac_exeext
Illia Bobyra96d5442023-08-30 16:30:15 +020011472 if test ${ac_cv_search_opendir+y}
11473then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000011474 break
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011475fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000011476done
Illia Bobyra96d5442023-08-30 16:30:15 +020011477if test ${ac_cv_search_opendir+y}
11478then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011479
Illia Bobyra96d5442023-08-30 16:30:15 +020011480else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000011481 ac_cv_search_opendir=no
11482fi
11483rm conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011484LIBS=$ac_func_search_save_LIBS
11485fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011486{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
11487printf "%s\n" "$ac_cv_search_opendir" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000011488ac_res=$ac_cv_search_opendir
Illia Bobyra96d5442023-08-30 16:30:15 +020011489if test "$ac_res" != no
11490then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000011491 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011492
11493fi
11494
Bram Moolenaar071d4272004-06-13 20:20:40 +000011495else
Illia Bobyra96d5442023-08-30 16:30:15 +020011496 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
11497printf %s "checking for library containing opendir... " >&6; }
11498if test ${ac_cv_search_opendir+y}
11499then :
11500 printf %s "(cached) " >&6
11501else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011502 ac_func_search_save_LIBS=$LIBS
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011503cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011504/* end confdefs.h. */
11505
Bram Moolenaar446cb832008-06-24 21:56:24 +000011506/* Override any GCC internal prototype to avoid an error.
11507 Use char because int might match the return type of a GCC
11508 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011509char opendir ();
11510int
Illia Bobyra96d5442023-08-30 16:30:15 +020011511main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011512{
Bram Moolenaar446cb832008-06-24 21:56:24 +000011513return opendir ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011514 ;
11515 return 0;
11516}
11517_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011518for ac_lib in '' x
11519do
Bram Moolenaar446cb832008-06-24 21:56:24 +000011520 if test -z "$ac_lib"; then
11521 ac_res="none required"
11522 else
11523 ac_res=-l$ac_lib
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011524 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Bram Moolenaar446cb832008-06-24 21:56:24 +000011525 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011526 if ac_fn_c_try_link "$LINENO"
11527then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000011528 ac_cv_search_opendir=$ac_res
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011529fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011530rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011531 conftest$ac_exeext
Illia Bobyra96d5442023-08-30 16:30:15 +020011532 if test ${ac_cv_search_opendir+y}
11533then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000011534 break
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011535fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000011536done
Illia Bobyra96d5442023-08-30 16:30:15 +020011537if test ${ac_cv_search_opendir+y}
11538then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011539
Illia Bobyra96d5442023-08-30 16:30:15 +020011540else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000011541 ac_cv_search_opendir=no
11542fi
11543rm conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011544LIBS=$ac_func_search_save_LIBS
11545fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011546{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
11547printf "%s\n" "$ac_cv_search_opendir" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000011548ac_res=$ac_cv_search_opendir
Illia Bobyra96d5442023-08-30 16:30:15 +020011549if test "$ac_res" != no
11550then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000011551 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011552
11553fi
11554
11555fi
11556
11557
Bram Moolenaar071d4272004-06-13 20:20:40 +000011558if test $ac_cv_header_sys_wait_h = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011559 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that defines union wait" >&5
11560printf %s "checking for sys/wait.h that defines union wait... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011562/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000011563#include <sys/wait.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011564int
Illia Bobyra96d5442023-08-30 16:30:15 +020011565main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011566{
Bram Moolenaar071d4272004-06-13 20:20:40 +000011567union wait xx, yy; xx = yy
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011568 ;
11569 return 0;
11570}
11571_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011572if ac_fn_c_try_compile "$LINENO"
11573then :
11574 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11575printf "%s\n" "yes" >&6; }
11576 printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000011577
Illia Bobyra96d5442023-08-30 16:30:15 +020011578 printf "%s\n" "#define HAVE_UNION_WAIT 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000011579
Illia Bobyra96d5442023-08-30 16:30:15 +020011580else $as_nop
11581 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11582printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011583fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011584rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000011585fi
11586
Illia Bobyra96d5442023-08-30 16:30:15 +020011587ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
11588if test "x$ac_cv_header_stdint_h" = xyes
11589then :
11590 printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h
11591
11592fi
11593ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
11594if test "x$ac_cv_header_stdlib_h" = xyes
11595then :
11596 printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h
11597
11598fi
11599ac_fn_c_check_header_compile "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default"
11600if test "x$ac_cv_header_string_h" = xyes
11601then :
11602 printf "%s\n" "#define HAVE_STRING_H 1" >>confdefs.h
11603
11604fi
11605ac_fn_c_check_header_compile "$LINENO" "sys/select.h" "ac_cv_header_sys_select_h" "$ac_includes_default"
11606if test "x$ac_cv_header_sys_select_h" = xyes
11607then :
11608 printf "%s\n" "#define HAVE_SYS_SELECT_H 1" >>confdefs.h
11609
11610fi
11611ac_fn_c_check_header_compile "$LINENO" "sys/utsname.h" "ac_cv_header_sys_utsname_h" "$ac_includes_default"
11612if test "x$ac_cv_header_sys_utsname_h" = xyes
11613then :
11614 printf "%s\n" "#define HAVE_SYS_UTSNAME_H 1" >>confdefs.h
11615
11616fi
11617ac_fn_c_check_header_compile "$LINENO" "termcap.h" "ac_cv_header_termcap_h" "$ac_includes_default"
11618if test "x$ac_cv_header_termcap_h" = xyes
11619then :
11620 printf "%s\n" "#define HAVE_TERMCAP_H 1" >>confdefs.h
11621
11622fi
11623ac_fn_c_check_header_compile "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default"
11624if test "x$ac_cv_header_fcntl_h" = xyes
11625then :
11626 printf "%s\n" "#define HAVE_FCNTL_H 1" >>confdefs.h
11627
11628fi
11629ac_fn_c_check_header_compile "$LINENO" "sgtty.h" "ac_cv_header_sgtty_h" "$ac_includes_default"
11630if test "x$ac_cv_header_sgtty_h" = xyes
11631then :
11632 printf "%s\n" "#define HAVE_SGTTY_H 1" >>confdefs.h
11633
11634fi
11635ac_fn_c_check_header_compile "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "$ac_includes_default"
11636if test "x$ac_cv_header_sys_ioctl_h" = xyes
11637then :
11638 printf "%s\n" "#define HAVE_SYS_IOCTL_H 1" >>confdefs.h
11639
11640fi
11641ac_fn_c_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default"
11642if test "x$ac_cv_header_sys_time_h" = xyes
11643then :
11644 printf "%s\n" "#define HAVE_SYS_TIME_H 1" >>confdefs.h
11645
11646fi
11647ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$ac_includes_default"
11648if test "x$ac_cv_header_sys_types_h" = xyes
11649then :
11650 printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h
11651
11652fi
11653ac_fn_c_check_header_compile "$LINENO" "termio.h" "ac_cv_header_termio_h" "$ac_includes_default"
11654if test "x$ac_cv_header_termio_h" = xyes
11655then :
11656 printf "%s\n" "#define HAVE_TERMIO_H 1" >>confdefs.h
11657
11658fi
11659ac_fn_c_check_header_compile "$LINENO" "iconv.h" "ac_cv_header_iconv_h" "$ac_includes_default"
11660if test "x$ac_cv_header_iconv_h" = xyes
11661then :
11662 printf "%s\n" "#define HAVE_ICONV_H 1" >>confdefs.h
11663
11664fi
11665ac_fn_c_check_header_compile "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
11666if test "x$ac_cv_header_inttypes_h" = xyes
11667then :
11668 printf "%s\n" "#define HAVE_INTTYPES_H 1" >>confdefs.h
11669
11670fi
11671ac_fn_c_check_header_compile "$LINENO" "langinfo.h" "ac_cv_header_langinfo_h" "$ac_includes_default"
11672if test "x$ac_cv_header_langinfo_h" = xyes
11673then :
11674 printf "%s\n" "#define HAVE_LANGINFO_H 1" >>confdefs.h
11675
11676fi
11677ac_fn_c_check_header_compile "$LINENO" "math.h" "ac_cv_header_math_h" "$ac_includes_default"
11678if test "x$ac_cv_header_math_h" = xyes
11679then :
11680 printf "%s\n" "#define HAVE_MATH_H 1" >>confdefs.h
11681
11682fi
11683ac_fn_c_check_header_compile "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
11684if test "x$ac_cv_header_unistd_h" = xyes
11685then :
11686 printf "%s\n" "#define HAVE_UNISTD_H 1" >>confdefs.h
11687
11688fi
11689ac_fn_c_check_header_compile "$LINENO" "stropts.h" "ac_cv_header_stropts_h" "$ac_includes_default"
11690if test "x$ac_cv_header_stropts_h" = xyes
11691then :
11692 printf "%s\n" "#define HAVE_STROPTS_H 1" >>confdefs.h
11693
11694fi
11695ac_fn_c_check_header_compile "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default"
11696if test "x$ac_cv_header_errno_h" = xyes
11697then :
11698 printf "%s\n" "#define HAVE_ERRNO_H 1" >>confdefs.h
11699
11700fi
11701ac_fn_c_check_header_compile "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" "$ac_includes_default"
11702if test "x$ac_cv_header_sys_resource_h" = xyes
11703then :
11704 printf "%s\n" "#define HAVE_SYS_RESOURCE_H 1" >>confdefs.h
11705
11706fi
11707ac_fn_c_check_header_compile "$LINENO" "sys/systeminfo.h" "ac_cv_header_sys_systeminfo_h" "$ac_includes_default"
11708if test "x$ac_cv_header_sys_systeminfo_h" = xyes
11709then :
11710 printf "%s\n" "#define HAVE_SYS_SYSTEMINFO_H 1" >>confdefs.h
11711
11712fi
11713ac_fn_c_check_header_compile "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default"
11714if test "x$ac_cv_header_locale_h" = xyes
11715then :
11716 printf "%s\n" "#define HAVE_LOCALE_H 1" >>confdefs.h
11717
11718fi
11719ac_fn_c_check_header_compile "$LINENO" "sys/stream.h" "ac_cv_header_sys_stream_h" "$ac_includes_default"
11720if test "x$ac_cv_header_sys_stream_h" = xyes
11721then :
11722 printf "%s\n" "#define HAVE_SYS_STREAM_H 1" >>confdefs.h
11723
11724fi
11725ac_fn_c_check_header_compile "$LINENO" "termios.h" "ac_cv_header_termios_h" "$ac_includes_default"
11726if test "x$ac_cv_header_termios_h" = xyes
11727then :
11728 printf "%s\n" "#define HAVE_TERMIOS_H 1" >>confdefs.h
11729
11730fi
11731ac_fn_c_check_header_compile "$LINENO" "libc.h" "ac_cv_header_libc_h" "$ac_includes_default"
11732if test "x$ac_cv_header_libc_h" = xyes
11733then :
11734 printf "%s\n" "#define HAVE_LIBC_H 1" >>confdefs.h
11735
11736fi
11737ac_fn_c_check_header_compile "$LINENO" "sys/statfs.h" "ac_cv_header_sys_statfs_h" "$ac_includes_default"
11738if test "x$ac_cv_header_sys_statfs_h" = xyes
11739then :
11740 printf "%s\n" "#define HAVE_SYS_STATFS_H 1" >>confdefs.h
11741
11742fi
11743ac_fn_c_check_header_compile "$LINENO" "poll.h" "ac_cv_header_poll_h" "$ac_includes_default"
11744if test "x$ac_cv_header_poll_h" = xyes
11745then :
11746 printf "%s\n" "#define HAVE_POLL_H 1" >>confdefs.h
11747
11748fi
11749ac_fn_c_check_header_compile "$LINENO" "sys/poll.h" "ac_cv_header_sys_poll_h" "$ac_includes_default"
11750if test "x$ac_cv_header_sys_poll_h" = xyes
11751then :
11752 printf "%s\n" "#define HAVE_SYS_POLL_H 1" >>confdefs.h
11753
11754fi
11755ac_fn_c_check_header_compile "$LINENO" "pwd.h" "ac_cv_header_pwd_h" "$ac_includes_default"
11756if test "x$ac_cv_header_pwd_h" = xyes
11757then :
11758 printf "%s\n" "#define HAVE_PWD_H 1" >>confdefs.h
11759
11760fi
11761ac_fn_c_check_header_compile "$LINENO" "utime.h" "ac_cv_header_utime_h" "$ac_includes_default"
11762if test "x$ac_cv_header_utime_h" = xyes
11763then :
11764 printf "%s\n" "#define HAVE_UTIME_H 1" >>confdefs.h
11765
11766fi
11767ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
11768if test "x$ac_cv_header_sys_param_h" = xyes
11769then :
11770 printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h
11771
11772fi
11773ac_fn_c_check_header_compile "$LINENO" "sys/ptms.h" "ac_cv_header_sys_ptms_h" "$ac_includes_default"
11774if test "x$ac_cv_header_sys_ptms_h" = xyes
11775then :
11776 printf "%s\n" "#define HAVE_SYS_PTMS_H 1" >>confdefs.h
11777
11778fi
11779ac_fn_c_check_header_compile "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
11780if test "x$ac_cv_header_libintl_h" = xyes
11781then :
11782 printf "%s\n" "#define HAVE_LIBINTL_H 1" >>confdefs.h
11783
11784fi
11785ac_fn_c_check_header_compile "$LINENO" "libgen.h" "ac_cv_header_libgen_h" "$ac_includes_default"
11786if test "x$ac_cv_header_libgen_h" = xyes
11787then :
11788 printf "%s\n" "#define HAVE_LIBGEN_H 1" >>confdefs.h
11789
11790fi
11791ac_fn_c_check_header_compile "$LINENO" "util/debug.h" "ac_cv_header_util_debug_h" "$ac_includes_default"
11792if test "x$ac_cv_header_util_debug_h" = xyes
11793then :
11794 printf "%s\n" "#define HAVE_UTIL_DEBUG_H 1" >>confdefs.h
11795
11796fi
11797ac_fn_c_check_header_compile "$LINENO" "util/msg18n.h" "ac_cv_header_util_msg18n_h" "$ac_includes_default"
11798if test "x$ac_cv_header_util_msg18n_h" = xyes
11799then :
11800 printf "%s\n" "#define HAVE_UTIL_MSG18N_H 1" >>confdefs.h
11801
11802fi
11803ac_fn_c_check_header_compile "$LINENO" "frame.h" "ac_cv_header_frame_h" "$ac_includes_default"
11804if test "x$ac_cv_header_frame_h" = xyes
11805then :
11806 printf "%s\n" "#define HAVE_FRAME_H 1" >>confdefs.h
11807
11808fi
11809ac_fn_c_check_header_compile "$LINENO" "sys/acl.h" "ac_cv_header_sys_acl_h" "$ac_includes_default"
11810if test "x$ac_cv_header_sys_acl_h" = xyes
11811then :
11812 printf "%s\n" "#define HAVE_SYS_ACL_H 1" >>confdefs.h
11813
11814fi
11815ac_fn_c_check_header_compile "$LINENO" "sys/access.h" "ac_cv_header_sys_access_h" "$ac_includes_default"
11816if test "x$ac_cv_header_sys_access_h" = xyes
11817then :
11818 printf "%s\n" "#define HAVE_SYS_ACCESS_H 1" >>confdefs.h
11819
11820fi
11821ac_fn_c_check_header_compile "$LINENO" "sys/sysinfo.h" "ac_cv_header_sys_sysinfo_h" "$ac_includes_default"
11822if test "x$ac_cv_header_sys_sysinfo_h" = xyes
11823then :
11824 printf "%s\n" "#define HAVE_SYS_SYSINFO_H 1" >>confdefs.h
11825
11826fi
11827ac_fn_c_check_header_compile "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
11828if test "x$ac_cv_header_wchar_h" = xyes
11829then :
11830 printf "%s\n" "#define HAVE_WCHAR_H 1" >>confdefs.h
11831
11832fi
11833ac_fn_c_check_header_compile "$LINENO" "wctype.h" "ac_cv_header_wctype_h" "$ac_includes_default"
11834if test "x$ac_cv_header_wctype_h" = xyes
11835then :
11836 printf "%s\n" "#define HAVE_WCTYPE_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011837
11838fi
11839
Bram Moolenaar071d4272004-06-13 20:20:40 +000011840
Illia Bobyra96d5442023-08-30 16:30:15 +020011841ac_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 +000011842# include <sys/stream.h>
11843#endif
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011844"
Illia Bobyra96d5442023-08-30 16:30:15 +020011845if test "x$ac_cv_header_sys_ptem_h" = xyes
11846then :
11847 printf "%s\n" "#define HAVE_SYS_PTEM_H 1" >>confdefs.h
Bram Moolenaar32f31b12009-05-21 13:20:59 +000011848
11849fi
11850
Bram Moolenaar32f31b12009-05-21 13:20:59 +000011851
Illia Bobyra96d5442023-08-30 16:30:15 +020011852ac_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 +000011853# include <sys/param.h>
11854#endif
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011855"
Illia Bobyra96d5442023-08-30 16:30:15 +020011856if test "x$ac_cv_header_sys_sysctl_h" = xyes
11857then :
11858 printf "%s\n" "#define HAVE_SYS_SYSCTL_H 1" >>confdefs.h
Bram Moolenaar00ca2842008-06-26 20:14:00 +000011859
11860fi
11861
Bram Moolenaar00ca2842008-06-26 20:14:00 +000011862
11863
Illia Bobyra96d5442023-08-30 16:30:15 +020011864{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_np.h" >&5
11865printf %s "checking for pthread_np.h... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011866cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011867/* end confdefs.h. */
11868
11869#include <pthread.h>
11870#include <pthread_np.h>
11871int
Illia Bobyra96d5442023-08-30 16:30:15 +020011872main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011873{
11874int i; i = 0;
11875 ;
11876 return 0;
11877}
11878_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011879if ac_fn_c_try_compile "$LINENO"
11880then :
11881 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11882printf "%s\n" "yes" >&6; }
11883 printf "%s\n" "#define HAVE_PTHREAD_NP_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011884
Illia Bobyra96d5442023-08-30 16:30:15 +020011885else $as_nop
11886 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11887printf "%s\n" "no" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011888fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011889rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011890
Illia Bobyra96d5442023-08-30 16:30:15 +020011891ac_fn_c_check_header_compile "$LINENO" "strings.h" "ac_cv_header_strings_h" "$ac_includes_default"
11892if test "x$ac_cv_header_strings_h" = xyes
11893then :
11894 printf "%s\n" "#define HAVE_STRINGS_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011895
11896fi
11897
Bram Moolenaard0573012017-10-28 21:11:06 +020011898if test "x$MACOS_X" = "xyes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011899 printf "%s\n" "#define NO_STRINGS_WITH_STRING_H 1" >>confdefs.h
Bram Moolenaar9372a112005-12-06 19:59:18 +000011900
11901else
Bram Moolenaar071d4272004-06-13 20:20:40 +000011902
Illia Bobyra96d5442023-08-30 16:30:15 +020011903{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strings.h can be included after string.h" >&5
11904printf %s "checking if strings.h can be included after string.h... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011905cppflags_save=$CPPFLAGS
11906CPPFLAGS="$CPPFLAGS $X_CFLAGS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011907cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011908/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000011909
11910#if defined(_AIX) && !defined(_AIX51) && !defined(_NO_PROTO)
11911# define _NO_PROTO /* like in os_unix.h, causes conflict for AIX (Winn) */
11912 /* but don't do it on AIX 5.1 (Uribarri) */
11913#endif
11914#ifdef HAVE_XM_XM_H
11915# include <Xm/Xm.h> /* This breaks it for HP-UX 11 (Squassabia) */
11916#endif
11917#ifdef HAVE_STRING_H
11918# include <string.h>
11919#endif
11920#if defined(HAVE_STRINGS_H)
11921# include <strings.h>
11922#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000011923
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011924int
Illia Bobyra96d5442023-08-30 16:30:15 +020011925main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011926{
11927int i; i = 0;
11928 ;
11929 return 0;
11930}
11931_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011932if ac_fn_c_try_compile "$LINENO"
11933then :
11934 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11935printf "%s\n" "yes" >&6; }
11936else $as_nop
11937 printf "%s\n" "#define NO_STRINGS_WITH_STRING_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011938
Illia Bobyra96d5442023-08-30 16:30:15 +020011939 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11940printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011941fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011942rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000011943CPPFLAGS=$cppflags_save
Bram Moolenaar9372a112005-12-06 19:59:18 +000011944fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000011945
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011946if test $ac_cv_c_compiler_gnu = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011947 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5
11948printf %s "checking whether $CC needs -traditional... " >&6; }
11949if test ${ac_cv_prog_gcc_traditional+y}
11950then :
11951 printf %s "(cached) " >&6
11952else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000011953 ac_pattern="Autoconf.*'x'"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011955/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000011956#include <sgtty.h>
11957Autoconf TIOCGETP
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011958_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000011959if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Illia Bobyra96d5442023-08-30 16:30:15 +020011960 $EGREP "$ac_pattern" >/dev/null 2>&1
11961then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000011962 ac_cv_prog_gcc_traditional=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020011963else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000011964 ac_cv_prog_gcc_traditional=no
11965fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011966rm -rf conftest*
Bram Moolenaar071d4272004-06-13 20:20:40 +000011967
11968
11969 if test $ac_cv_prog_gcc_traditional = no; then
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011971/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000011972#include <termio.h>
11973Autoconf TCGETA
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011974_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000011975if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Illia Bobyra96d5442023-08-30 16:30:15 +020011976 $EGREP "$ac_pattern" >/dev/null 2>&1
11977then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000011978 ac_cv_prog_gcc_traditional=yes
11979fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011980rm -rf conftest*
Bram Moolenaar071d4272004-06-13 20:20:40 +000011981
11982 fi
11983fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011984{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5
11985printf "%s\n" "$ac_cv_prog_gcc_traditional" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011986 if test $ac_cv_prog_gcc_traditional = yes; then
11987 CC="$CC -traditional"
11988 fi
11989fi
11990
Illia Bobyra96d5442023-08-30 16:30:15 +020011991{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11992printf %s "checking for an ANSI C-conforming const... " >&6; }
11993if test ${ac_cv_c_const+y}
11994then :
11995 printf %s "(cached) " >&6
11996else $as_nop
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
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012000int
Illia Bobyra96d5442023-08-30 16:30:15 +020012001main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012002{
Bram Moolenaar7db77842014-03-27 17:40:59 +010012003
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012004#ifndef __cplusplus
Bram Moolenaar7db77842014-03-27 17:40:59 +010012005 /* Ultrix mips cc rejects this sort of thing. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012006 typedef int charset[2];
Bram Moolenaar7db77842014-03-27 17:40:59 +010012007 const charset cs = { 0, 0 };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012008 /* SunOS 4.1.1 cc rejects this. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000012009 char const *const *pcpcc;
12010 char **ppc;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012011 /* NEC SVR4.0.2 mips cc rejects this. */
12012 struct point {int x, y;};
12013 static struct point const zero = {0,0};
Illia Bobyra96d5442023-08-30 16:30:15 +020012014 /* IBM XL C 1.02.0.0 rejects this.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012015 It does not let you subtract one const X* pointer from another in
12016 an arm of an if-expression whose if-part is not a constant
12017 expression */
12018 const char *g = "string";
Bram Moolenaar446cb832008-06-24 21:56:24 +000012019 pcpcc = &g + (g ? g-g : 0);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012020 /* HPUX 7.0 cc rejects these. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000012021 ++pcpcc;
12022 ppc = (char**) pcpcc;
12023 pcpcc = (char const *const *) ppc;
Bram Moolenaar7db77842014-03-27 17:40:59 +010012024 { /* SCO 3.2v4 cc rejects this sort of thing. */
12025 char tx;
12026 char *t = &tx;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012027 char const *s = 0 ? (char *) 0 : (char const *) 0;
Bram Moolenaar071d4272004-06-13 20:20:40 +000012028
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012029 *t++ = 0;
Bram Moolenaar446cb832008-06-24 21:56:24 +000012030 if (s) return 0;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012031 }
12032 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12033 int x[] = {25, 17};
12034 const int *foo = &x[0];
12035 ++foo;
12036 }
12037 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12038 typedef const int *iptr;
12039 iptr p = 0;
12040 ++p;
12041 }
Illia Bobyra96d5442023-08-30 16:30:15 +020012042 { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012043 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Bram Moolenaar7db77842014-03-27 17:40:59 +010012044 struct s { int j; const int *ap[3]; } bx;
12045 struct s *b = &bx; b->j = 5;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012046 }
12047 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12048 const int foo = 10;
Bram Moolenaar446cb832008-06-24 21:56:24 +000012049 if (!foo) return 0;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012050 }
Bram Moolenaar446cb832008-06-24 21:56:24 +000012051 return !cs[0] && !zero.x;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012052#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000012053
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012054 ;
12055 return 0;
Bram Moolenaar071d4272004-06-13 20:20:40 +000012056}
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012057_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012058if ac_fn_c_try_compile "$LINENO"
12059then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012060 ac_cv_c_const=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020012061else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012062 ac_cv_c_const=no
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012063fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012064rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012065fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012066{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12067printf "%s\n" "$ac_cv_c_const" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012068if test $ac_cv_c_const = no; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012069
Illia Bobyra96d5442023-08-30 16:30:15 +020012070printf "%s\n" "#define const /**/" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000012071
12072fi
12073
Illia Bobyra96d5442023-08-30 16:30:15 +020012074{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12075printf %s "checking for working volatile... " >&6; }
12076if test ${ac_cv_c_volatile+y}
12077then :
12078 printf %s "(cached) " >&6
12079else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012081/* end confdefs.h. */
12082
12083int
Illia Bobyra96d5442023-08-30 16:30:15 +020012084main (void)
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012085{
12086
12087volatile int x;
12088int * volatile y = (int *) 0;
12089return !x && !y;
12090 ;
12091 return 0;
12092}
12093_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012094if ac_fn_c_try_compile "$LINENO"
12095then :
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012096 ac_cv_c_volatile=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020012097else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012098 ac_cv_c_volatile=no
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012099fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012100rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012101fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012102{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5
12103printf "%s\n" "$ac_cv_c_volatile" >&6; }
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012104if test $ac_cv_c_volatile = no; then
12105
Illia Bobyra96d5442023-08-30 16:30:15 +020012106printf "%s\n" "#define volatile /**/" >>confdefs.h
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012107
12108fi
12109
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012110ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Illia Bobyra96d5442023-08-30 16:30:15 +020012111if test "x$ac_cv_type_mode_t" = xyes
12112then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012113
Illia Bobyra96d5442023-08-30 16:30:15 +020012114else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012115
Illia Bobyra96d5442023-08-30 16:30:15 +020012116printf "%s\n" "#define mode_t int" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012117
12118fi
12119
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012120ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Illia Bobyra96d5442023-08-30 16:30:15 +020012121if test "x$ac_cv_type_off_t" = xyes
12122then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012123
Illia Bobyra96d5442023-08-30 16:30:15 +020012124else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012125
Illia Bobyra96d5442023-08-30 16:30:15 +020012126printf "%s\n" "#define off_t long int" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012127
12128fi
12129
Bram Moolenaar071d4272004-06-13 20:20:40 +000012130
Illia Bobyra96d5442023-08-30 16:30:15 +020012131 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default
12132"
12133if test "x$ac_cv_type_pid_t" = xyes
12134then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012135
Illia Bobyra96d5442023-08-30 16:30:15 +020012136else $as_nop
12137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12138/* end confdefs.h. */
12139
12140 #if defined _WIN64 && !defined __CYGWIN__
12141 LLP64
12142 #endif
12143
12144int
12145main (void)
12146{
12147
12148 ;
12149 return 0;
12150}
12151
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012152_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012153if ac_fn_c_try_compile "$LINENO"
12154then :
12155 ac_pid_type='int'
12156else $as_nop
12157 ac_pid_type='__int64'
12158fi
12159rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
12160
12161printf "%s\n" "#define pid_t $ac_pid_type" >>confdefs.h
12162
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012163
12164fi
12165
Illia Bobyra96d5442023-08-30 16:30:15 +020012166
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012167ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Illia Bobyra96d5442023-08-30 16:30:15 +020012168if test "x$ac_cv_type_size_t" = xyes
12169then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012170
Illia Bobyra96d5442023-08-30 16:30:15 +020012171else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012172
Illia Bobyra96d5442023-08-30 16:30:15 +020012173printf "%s\n" "#define size_t unsigned int" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012174
12175fi
12176
Illia Bobyra96d5442023-08-30 16:30:15 +020012177{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
12178printf %s "checking for uid_t in sys/types.h... " >&6; }
12179if test ${ac_cv_type_uid_t+y}
12180then :
12181 printf %s "(cached) " >&6
12182else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012184/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012185#include <sys/types.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012186
12187_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000012188if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Illia Bobyra96d5442023-08-30 16:30:15 +020012189 $EGREP "uid_t" >/dev/null 2>&1
12190then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012191 ac_cv_type_uid_t=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020012192else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000012193 ac_cv_type_uid_t=no
12194fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012195rm -rf conftest*
Bram Moolenaar071d4272004-06-13 20:20:40 +000012196
12197fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012198{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
12199printf "%s\n" "$ac_cv_type_uid_t" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012200if test $ac_cv_type_uid_t = no; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000012201
Illia Bobyra96d5442023-08-30 16:30:15 +020012202printf "%s\n" "#define uid_t int" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012203
12204
Illia Bobyra96d5442023-08-30 16:30:15 +020012205printf "%s\n" "#define gid_t int" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000012206
12207fi
12208
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012209ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
12210case $ac_cv_c_uint32_t in #(
12211 no|yes) ;; #(
12212 *)
12213
Illia Bobyra96d5442023-08-30 16:30:15 +020012214printf "%s\n" "#define _UINT32_T 1" >>confdefs.h
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012215
12216
Illia Bobyra96d5442023-08-30 16:30:15 +020012217printf "%s\n" "#define uint32_t $ac_cv_c_uint32_t" >>confdefs.h
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012218;;
12219 esac
12220
Bram Moolenaarfa7584c2010-05-19 21:57:45 +020012221
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012222
Illia Bobyrf39842f2023-08-27 18:21:23 +020012223
12224
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012225ac_fn_c_check_type "$LINENO" "ino_t" "ac_cv_type_ino_t" "$ac_includes_default"
Illia Bobyra96d5442023-08-30 16:30:15 +020012226if test "x$ac_cv_type_ino_t" = xyes
12227then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012228
Illia Bobyra96d5442023-08-30 16:30:15 +020012229else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012230
Illia Bobyra96d5442023-08-30 16:30:15 +020012231printf "%s\n" "#define ino_t long" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012232
12233fi
12234
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012235ac_fn_c_check_type "$LINENO" "dev_t" "ac_cv_type_dev_t" "$ac_includes_default"
Illia Bobyra96d5442023-08-30 16:30:15 +020012236if test "x$ac_cv_type_dev_t" = xyes
12237then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012238
Illia Bobyra96d5442023-08-30 16:30:15 +020012239else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012240
Illia Bobyra96d5442023-08-30 16:30:15 +020012241printf "%s\n" "#define dev_t unsigned" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012242
12243fi
12244
Illia Bobyra96d5442023-08-30 16:30:15 +020012245 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12246printf %s "checking whether byte ordering is bigendian... " >&6; }
12247if test ${ac_cv_c_bigendian+y}
12248then :
12249 printf %s "(cached) " >&6
12250else $as_nop
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012251 ac_cv_c_bigendian=unknown
12252 # See if we're dealing with a universal compiler.
12253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12254/* end confdefs.h. */
12255#ifndef __APPLE_CC__
12256 not a universal capable compiler
12257 #endif
12258 typedef int dummy;
12259
12260_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012261if ac_fn_c_try_compile "$LINENO"
12262then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012263
12264 # Check for potential -arch flags. It is not universal unless
12265 # there are at least two -arch flags with different values.
12266 ac_arch=
12267 ac_prev=
12268 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12269 if test -n "$ac_prev"; then
12270 case $ac_word in
12271 i?86 | x86_64 | ppc | ppc64)
12272 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12273 ac_arch=$ac_word
12274 else
12275 ac_cv_c_bigendian=universal
12276 break
12277 fi
12278 ;;
12279 esac
12280 ac_prev=
12281 elif test "x$ac_word" = "x-arch"; then
12282 ac_prev=arch
12283 fi
12284 done
12285fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012286rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012287 if test $ac_cv_c_bigendian = unknown; then
12288 # See if sys/param.h defines the BYTE_ORDER macro.
12289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12290/* end confdefs.h. */
12291#include <sys/types.h>
12292 #include <sys/param.h>
12293
12294int
Illia Bobyra96d5442023-08-30 16:30:15 +020012295main (void)
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012296{
12297#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12298 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12299 && LITTLE_ENDIAN)
12300 bogus endian macros
12301 #endif
12302
12303 ;
12304 return 0;
12305}
12306_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012307if ac_fn_c_try_compile "$LINENO"
12308then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012309 # It does; now see whether it defined to BIG_ENDIAN or not.
12310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12311/* end confdefs.h. */
12312#include <sys/types.h>
12313 #include <sys/param.h>
12314
12315int
Illia Bobyra96d5442023-08-30 16:30:15 +020012316main (void)
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012317{
12318#if BYTE_ORDER != BIG_ENDIAN
12319 not big endian
12320 #endif
12321
12322 ;
12323 return 0;
12324}
12325_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012326if ac_fn_c_try_compile "$LINENO"
12327then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012328 ac_cv_c_bigendian=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020012329else $as_nop
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012330 ac_cv_c_bigendian=no
12331fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012332rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012333fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012334rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012335 fi
12336 if test $ac_cv_c_bigendian = unknown; then
12337 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12339/* end confdefs.h. */
12340#include <limits.h>
12341
12342int
Illia Bobyra96d5442023-08-30 16:30:15 +020012343main (void)
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012344{
12345#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12346 bogus endian macros
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 # It does; now see whether it defined to _BIG_ENDIAN or not.
12356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12357/* end confdefs.h. */
12358#include <limits.h>
12359
12360int
Illia Bobyra96d5442023-08-30 16:30:15 +020012361main (void)
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012362{
12363#ifndef _BIG_ENDIAN
12364 not big endian
12365 #endif
12366
12367 ;
12368 return 0;
12369}
12370_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012371if ac_fn_c_try_compile "$LINENO"
12372then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012373 ac_cv_c_bigendian=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020012374else $as_nop
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012375 ac_cv_c_bigendian=no
12376fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012377rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012378fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012379rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012380 fi
12381 if test $ac_cv_c_bigendian = unknown; then
12382 # Compile a test program.
Illia Bobyra96d5442023-08-30 16:30:15 +020012383 if test "$cross_compiling" = yes
12384then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012385 # Try to guess by grepping values from an object file.
12386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12387/* end confdefs.h. */
Illia Bobyra96d5442023-08-30 16:30:15 +020012388unsigned short int ascii_mm[] =
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012389 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
Illia Bobyra96d5442023-08-30 16:30:15 +020012390 unsigned short int ascii_ii[] =
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012391 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12392 int use_ascii (int i) {
12393 return ascii_mm[i] + ascii_ii[i];
12394 }
Illia Bobyra96d5442023-08-30 16:30:15 +020012395 unsigned short int ebcdic_ii[] =
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012396 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
Illia Bobyra96d5442023-08-30 16:30:15 +020012397 unsigned short int ebcdic_mm[] =
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012398 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12399 int use_ebcdic (int i) {
12400 return ebcdic_mm[i] + ebcdic_ii[i];
12401 }
12402 extern int foo;
12403
12404int
Illia Bobyra96d5442023-08-30 16:30:15 +020012405main (void)
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012406{
12407return use_ascii (foo) == use_ebcdic (foo);
12408 ;
12409 return 0;
12410}
12411_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012412if ac_fn_c_try_compile "$LINENO"
12413then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012414 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12415 ac_cv_c_bigendian=yes
12416 fi
12417 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12418 if test "$ac_cv_c_bigendian" = unknown; then
12419 ac_cv_c_bigendian=no
12420 else
12421 # finding both strings is unlikely to happen, but who knows?
12422 ac_cv_c_bigendian=unknown
12423 fi
12424 fi
12425fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012426rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
12427else $as_nop
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12429/* end confdefs.h. */
12430$ac_includes_default
12431int
Illia Bobyra96d5442023-08-30 16:30:15 +020012432main (void)
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012433{
12434
12435 /* Are we little or big endian? From Harbison&Steele. */
12436 union
12437 {
12438 long int l;
12439 char c[sizeof (long int)];
12440 } u;
12441 u.l = 1;
12442 return u.c[sizeof (long int) - 1] == 1;
12443
12444 ;
12445 return 0;
12446}
12447_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012448if ac_fn_c_try_run "$LINENO"
12449then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012450 ac_cv_c_bigendian=no
Illia Bobyra96d5442023-08-30 16:30:15 +020012451else $as_nop
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012452 ac_cv_c_bigendian=yes
12453fi
12454rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12455 conftest.$ac_objext conftest.beam conftest.$ac_ext
12456fi
12457
12458 fi
12459fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012460{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12461printf "%s\n" "$ac_cv_c_bigendian" >&6; }
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012462 case $ac_cv_c_bigendian in #(
12463 yes)
Illia Bobyra96d5442023-08-30 16:30:15 +020012464 printf "%s\n" "#define WORDS_BIGENDIAN 1" >>confdefs.h
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012465;; #(
12466 no)
12467 ;; #(
12468 universal)
12469
Illia Bobyra96d5442023-08-30 16:30:15 +020012470printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012471
12472 ;; #(
12473 *)
Bram Moolenaar7db77842014-03-27 17:40:59 +010012474 as_fn_error $? "unknown endianness
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012475 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12476 esac
12477
Illia Bobyra96d5442023-08-30 16:30:15 +020012478{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
12479printf %s "checking for inline... " >&6; }
12480if test ${ac_cv_c_inline+y}
12481then :
12482 printf %s "(cached) " >&6
12483else $as_nop
Bram Moolenaar136f29a2016-02-27 20:14:15 +010012484 ac_cv_c_inline=no
12485for ac_kw in inline __inline__ __inline; do
12486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12487/* end confdefs.h. */
12488#ifndef __cplusplus
12489typedef int foo_t;
Illia Bobyra96d5442023-08-30 16:30:15 +020012490static $ac_kw foo_t static_foo (void) {return 0; }
12491$ac_kw foo_t foo (void) {return 0; }
Bram Moolenaar136f29a2016-02-27 20:14:15 +010012492#endif
12493
12494_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012495if ac_fn_c_try_compile "$LINENO"
12496then :
Bram Moolenaar136f29a2016-02-27 20:14:15 +010012497 ac_cv_c_inline=$ac_kw
12498fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012499rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar136f29a2016-02-27 20:14:15 +010012500 test "$ac_cv_c_inline" != no && break
12501done
12502
12503fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012504{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
12505printf "%s\n" "$ac_cv_c_inline" >&6; }
Bram Moolenaar136f29a2016-02-27 20:14:15 +010012506
12507case $ac_cv_c_inline in
12508 inline | yes) ;;
12509 *)
12510 case $ac_cv_c_inline in
12511 no) ac_val=;;
12512 *) ac_val=$ac_cv_c_inline;;
12513 esac
12514 cat >>confdefs.h <<_ACEOF
12515#ifndef __cplusplus
12516#define inline $ac_val
12517#endif
12518_ACEOF
12519 ;;
12520esac
12521
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012522
Illia Bobyra96d5442023-08-30 16:30:15 +020012523{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for rlim_t" >&5
12524printf %s "checking for rlim_t... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012525if eval "test \"`echo '$''{'ac_cv_type_rlim_t'+set}'`\" = set"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012526 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: (cached) $ac_cv_type_rlim_t" >&5
12527printf "%s\n" "(cached) $ac_cv_type_rlim_t" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012528else
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012530/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012531
12532#include <sys/types.h>
12533#if STDC_HEADERS
Bram Moolenaar446cb832008-06-24 21:56:24 +000012534# include <stdlib.h>
12535# include <stddef.h>
Bram Moolenaar071d4272004-06-13 20:20:40 +000012536#endif
12537#ifdef HAVE_SYS_RESOURCE_H
Bram Moolenaar446cb832008-06-24 21:56:24 +000012538# include <sys/resource.h>
Bram Moolenaar071d4272004-06-13 20:20:40 +000012539#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012540
12541_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000012542if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Illia Bobyra96d5442023-08-30 16:30:15 +020012543 $EGREP "(^|[^a-zA-Z_0-9])rlim_t[^a-zA-Z_0-9]" >/dev/null 2>&1
12544then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012545 ac_cv_type_rlim_t=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020012546else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000012547 ac_cv_type_rlim_t=no
12548fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012549rm -rf conftest*
Bram Moolenaar071d4272004-06-13 20:20:40 +000012550
Illia Bobyra96d5442023-08-30 16:30:15 +020012551 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_rlim_t" >&5
12552printf "%s\n" "$ac_cv_type_rlim_t" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012553fi
12554if test $ac_cv_type_rlim_t = no; then
12555 cat >> confdefs.h <<\EOF
12556#define rlim_t unsigned long
12557EOF
12558fi
12559
Illia Bobyra96d5442023-08-30 16:30:15 +020012560{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stack_t" >&5
12561printf %s "checking for stack_t... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012562if eval "test \"`echo '$''{'ac_cv_type_stack_t'+set}'`\" = set"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012563 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: (cached) $ac_cv_type_stack_t" >&5
12564printf "%s\n" "(cached) $ac_cv_type_stack_t" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012565else
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012567/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012568
12569#include <sys/types.h>
12570#if STDC_HEADERS
Bram Moolenaar446cb832008-06-24 21:56:24 +000012571# include <stdlib.h>
12572# include <stddef.h>
Bram Moolenaar071d4272004-06-13 20:20:40 +000012573#endif
12574#include <signal.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012575
12576_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000012577if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Illia Bobyra96d5442023-08-30 16:30:15 +020012578 $EGREP "stack_t" >/dev/null 2>&1
12579then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012580 ac_cv_type_stack_t=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020012581else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000012582 ac_cv_type_stack_t=no
12583fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012584rm -rf conftest*
Bram Moolenaar071d4272004-06-13 20:20:40 +000012585
Illia Bobyra96d5442023-08-30 16:30:15 +020012586 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_stack_t" >&5
12587printf "%s\n" "$ac_cv_type_stack_t" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012588fi
12589if test $ac_cv_type_stack_t = no; then
12590 cat >> confdefs.h <<\EOF
12591#define stack_t struct sigaltstack
12592EOF
12593fi
12594
Illia Bobyra96d5442023-08-30 16:30:15 +020012595{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stack_t has an ss_base field" >&5
12596printf %s "checking whether stack_t has an ss_base field... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012597cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012598/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012599
12600#include <sys/types.h>
12601#if STDC_HEADERS
Bram Moolenaar446cb832008-06-24 21:56:24 +000012602# include <stdlib.h>
12603# include <stddef.h>
Bram Moolenaar071d4272004-06-13 20:20:40 +000012604#endif
12605#include <signal.h>
12606#include "confdefs.h"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012607
12608int
Illia Bobyra96d5442023-08-30 16:30:15 +020012609main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012610{
12611stack_t sigstk; sigstk.ss_base = 0;
12612 ;
12613 return 0;
12614}
12615_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012616if ac_fn_c_try_compile "$LINENO"
12617then :
12618 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12619printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SS_BASE 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000012620
Illia Bobyra96d5442023-08-30 16:30:15 +020012621else $as_nop
12622 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12623printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012624fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012625rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000012626
12627olibs="$LIBS"
Illia Bobyra96d5442023-08-30 16:30:15 +020012628{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-tlib argument" >&5
12629printf %s "checking --with-tlib argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012630
Bram Moolenaar446cb832008-06-24 21:56:24 +000012631# Check whether --with-tlib was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020012632if test ${with_tlib+y}
12633then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000012634 withval=$with_tlib;
12635fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000012636
12637if test -n "$with_tlib"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012638 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_tlib" >&5
12639printf "%s\n" "$with_tlib" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012640 LIBS="$LIBS -l$with_tlib"
Illia Bobyra96d5442023-08-30 16:30:15 +020012641 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for linking with $with_tlib library" >&5
12642printf %s "checking for linking with $with_tlib library... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012644/* end confdefs.h. */
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000012645
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012646int
Illia Bobyra96d5442023-08-30 16:30:15 +020012647main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012648{
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000012649
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012650 ;
12651 return 0;
12652}
12653_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012654if ac_fn_c_try_link "$LINENO"
12655then :
12656 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: OK" >&5
12657printf "%s\n" "OK" >&6; }
12658else $as_nop
Bram Moolenaar7db77842014-03-27 17:40:59 +010012659 as_fn_error $? "FAILED" "$LINENO" 5
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000012660fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012661rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012662 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000012663 olibs="$LIBS"
12664else
Illia Bobyra96d5442023-08-30 16:30:15 +020012665 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: empty: automatic terminal library selection" >&5
12666printf "%s\n" "empty: automatic terminal library selection" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +000012667 case "$vim_cv_uname_output" in
Bram Moolenaar4e509b62011-02-09 17:42:57 +010012668 OSF1|SCO_SV) tlibs="tinfo ncurses curses termlib termcap";;
12669 *) tlibs="tinfo ncurses termlib termcap curses";;
Bram Moolenaar071d4272004-06-13 20:20:40 +000012670 esac
12671 for libname in $tlibs; do
Illia Bobyra96d5442023-08-30 16:30:15 +020012672 as_ac_Lib=`printf "%s\n" "ac_cv_lib_${libname}""_tgetent" | $as_tr_sh`
12673{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tgetent in -l${libname}" >&5
12674printf %s "checking for tgetent in -l${libname}... " >&6; }
12675if eval test \${$as_ac_Lib+y}
12676then :
12677 printf %s "(cached) " >&6
12678else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012679 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000012680LIBS="-l${libname} $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012681cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012682/* end confdefs.h. */
12683
Bram Moolenaar446cb832008-06-24 21:56:24 +000012684/* Override any GCC internal prototype to avoid an error.
12685 Use char because int might match the return type of a GCC
12686 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012687char tgetent ();
12688int
Illia Bobyra96d5442023-08-30 16:30:15 +020012689main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012690{
Bram Moolenaar446cb832008-06-24 21:56:24 +000012691return tgetent ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012692 ;
12693 return 0;
12694}
12695_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012696if ac_fn_c_try_link "$LINENO"
12697then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012698 eval "$as_ac_Lib=yes"
Illia Bobyra96d5442023-08-30 16:30:15 +020012699else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012700 eval "$as_ac_Lib=no"
Bram Moolenaar071d4272004-06-13 20:20:40 +000012701fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012702rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012703 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012704LIBS=$ac_check_lib_save_LIBS
12705fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012706eval ac_res=\$$as_ac_Lib
Illia Bobyra96d5442023-08-30 16:30:15 +020012707 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12708printf "%s\n" "$ac_res" >&6; }
12709if eval test \"x\$"$as_ac_Lib"\" = x"yes"
12710then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012711 cat >>confdefs.h <<_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012712#define `printf "%s\n" "HAVE_LIB${libname}" | $as_tr_cpp` 1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012713_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000012714
12715 LIBS="-l${libname} $LIBS"
12716
Bram Moolenaar071d4272004-06-13 20:20:40 +000012717fi
12718
12719 if test "x$olibs" != "x$LIBS"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012720 if test "$cross_compiling" = yes
12721then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012722 res="FAIL"
Illia Bobyra96d5442023-08-30 16:30:15 +020012723else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012725/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012726
12727#ifdef HAVE_TERMCAP_H
12728# include <termcap.h>
12729#endif
Bram Moolenaar446cb832008-06-24 21:56:24 +000012730#if STDC_HEADERS
12731# include <stdlib.h>
12732# include <stddef.h>
12733#endif
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010012734int main() {char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(0); }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012735_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012736if ac_fn_c_try_run "$LINENO"
12737then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012738 res="OK"
Illia Bobyra96d5442023-08-30 16:30:15 +020012739else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012740 res="FAIL"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012741fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012742rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12743 conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012744fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000012745
Bram Moolenaar071d4272004-06-13 20:20:40 +000012746 if test "$res" = "OK"; then
12747 break
12748 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012749 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libname library is not usable" >&5
12750printf "%s\n" "$libname library is not usable" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012751 LIBS="$olibs"
12752 fi
12753 done
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000012754 if test "x$olibs" = "x$LIBS"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012755 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no terminal library found" >&5
12756printf "%s\n" "no terminal library found" >&6; }
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000012757 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000012758fi
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000012759
12760if test "x$olibs" = "x$LIBS"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012761 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tgetent()" >&5
12762printf %s "checking for tgetent()... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012764/* end confdefs.h. */
Bram Moolenaarbd7f7c12020-07-28 21:03:37 +020012765int tgetent(char *, const char *);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012766int
Illia Bobyra96d5442023-08-30 16:30:15 +020012767main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012768{
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000012769char s[10000]; int res = tgetent(s, "thisterminaldoesnotexist");
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012770 ;
12771 return 0;
12772}
12773_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012774if ac_fn_c_try_link "$LINENO"
12775then :
12776 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12777printf "%s\n" "yes" >&6; }
12778else $as_nop
Bram Moolenaar7db77842014-03-27 17:40:59 +010012779 as_fn_error $? "NOT FOUND!
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000012780 You need to install a terminal library; for example ncurses.
Bram Moolenaar16678eb2021-04-21 11:57:59 +020012781 On Linux that would be the libncurses-dev package.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012782 Or specify the name of the library with --with-tlib." "$LINENO" 5
12783fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012784rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012785 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000012786fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000012787
Illia Bobyra96d5442023-08-30 16:30:15 +020012788{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we talk terminfo" >&5
12789printf %s "checking whether we talk terminfo... " >&6; }
12790if test ${vim_cv_terminfo+y}
12791then :
12792 printf %s "(cached) " >&6
12793else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000012794
Illia Bobyra96d5442023-08-30 16:30:15 +020012795 if test "$cross_compiling" = yes
12796then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000012797
Bram Moolenaar7db77842014-03-27 17:40:59 +010012798 as_fn_error $? "cross-compiling: please set 'vim_cv_terminfo'" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000012799
Illia Bobyra96d5442023-08-30 16:30:15 +020012800else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12802/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012803
Bram Moolenaar446cb832008-06-24 21:56:24 +000012804#include "confdefs.h"
Bram Moolenaar071d4272004-06-13 20:20:40 +000012805#ifdef HAVE_TERMCAP_H
12806# include <termcap.h>
12807#endif
Bram Moolenaar446cb832008-06-24 21:56:24 +000012808#ifdef HAVE_STRING_H
12809# include <string.h>
12810#endif
12811#if STDC_HEADERS
12812# include <stdlib.h>
12813# include <stddef.h>
12814#endif
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010012815int main()
Bram Moolenaar071d4272004-06-13 20:20:40 +000012816{char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(!strcmp(s==0 ? "" : s, "1")); }
Bram Moolenaar446cb832008-06-24 21:56:24 +000012817
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012818_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012819if ac_fn_c_try_run "$LINENO"
12820then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000012821
12822 vim_cv_terminfo=no
12823
Illia Bobyra96d5442023-08-30 16:30:15 +020012824else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000012825
12826 vim_cv_terminfo=yes
12827
12828fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012829rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12830 conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000012831fi
12832
12833
Bram Moolenaar446cb832008-06-24 21:56:24 +000012834fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012835{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_terminfo" >&5
12836printf "%s\n" "$vim_cv_terminfo" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000012837
12838if test "x$vim_cv_terminfo" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012839 printf "%s\n" "#define TERMINFO 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000012840
12841fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000012842
Illia Bobyra96d5442023-08-30 16:30:15 +020012843{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking what tgetent() returns for an unknown terminal" >&5
12844printf %s "checking what tgetent() returns for an unknown terminal... " >&6; }
12845if test ${vim_cv_tgetent+y}
12846then :
12847 printf %s "(cached) " >&6
12848else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000012849
Illia Bobyra96d5442023-08-30 16:30:15 +020012850 if test "$cross_compiling" = yes
12851then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000012852
Bram Moolenaar696cbd22017-04-28 15:45:46 +020012853 as_fn_error $? "failed to compile test program." "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000012854
Illia Bobyra96d5442023-08-30 16:30:15 +020012855else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12857/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012858
Bram Moolenaar446cb832008-06-24 21:56:24 +000012859#include "confdefs.h"
Bram Moolenaar071d4272004-06-13 20:20:40 +000012860#ifdef HAVE_TERMCAP_H
12861# include <termcap.h>
12862#endif
Bram Moolenaar446cb832008-06-24 21:56:24 +000012863#if STDC_HEADERS
12864# include <stdlib.h>
12865# include <stddef.h>
12866#endif
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010012867int main()
Bram Moolenaar071d4272004-06-13 20:20:40 +000012868{char s[10000]; int res = tgetent(s, "thisterminaldoesnotexist"); exit(res != 0); }
Bram Moolenaar446cb832008-06-24 21:56:24 +000012869
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012870_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012871if ac_fn_c_try_run "$LINENO"
12872then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000012873
Bram Moolenaara88254f2017-11-02 23:04:14 +010012874 vim_cv_tgetent=zero
Bram Moolenaar071d4272004-06-13 20:20:40 +000012875
Illia Bobyra96d5442023-08-30 16:30:15 +020012876else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000012877
Bram Moolenaara88254f2017-11-02 23:04:14 +010012878 vim_cv_tgetent=non-zero
Bram Moolenaar446cb832008-06-24 21:56:24 +000012879
Bram Moolenaar071d4272004-06-13 20:20:40 +000012880fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012881rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12882 conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000012883fi
12884
Bram Moolenaar446cb832008-06-24 21:56:24 +000012885
Bram Moolenaar446cb832008-06-24 21:56:24 +000012886fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012887{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_tgetent" >&5
12888printf "%s\n" "$vim_cv_tgetent" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000012889
Bram Moolenaara88254f2017-11-02 23:04:14 +010012890if test "x$vim_cv_tgetent" = "xzero" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012891 printf "%s\n" "#define TGETENT_ZERO_ERR 0" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000012892
Bram Moolenaar446cb832008-06-24 21:56:24 +000012893fi
12894
Illia Bobyra96d5442023-08-30 16:30:15 +020012895{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether termcap.h contains ospeed" >&5
12896printf %s "checking whether termcap.h contains ospeed... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012897cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012898/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012899
12900#ifdef HAVE_TERMCAP_H
12901# include <termcap.h>
12902#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012903
12904int
Illia Bobyra96d5442023-08-30 16:30:15 +020012905main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012906{
Bram Moolenaar071d4272004-06-13 20:20:40 +000012907ospeed = 20000
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012908 ;
12909 return 0;
12910}
12911_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012912if ac_fn_c_try_link "$LINENO"
12913then :
12914 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12915printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_OSPEED 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000012916
Illia Bobyra96d5442023-08-30 16:30:15 +020012917else $as_nop
12918 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12919printf "%s\n" "no" >&6; }
12920 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ospeed can be extern" >&5
12921printf %s "checking whether ospeed can be extern... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012923/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012924
12925#ifdef HAVE_TERMCAP_H
12926# include <termcap.h>
12927#endif
12928extern short ospeed;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012929
12930int
Illia Bobyra96d5442023-08-30 16:30:15 +020012931main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012932{
Bram Moolenaar071d4272004-06-13 20:20:40 +000012933ospeed = 20000
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012934 ;
12935 return 0;
12936}
12937_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012938if ac_fn_c_try_link "$LINENO"
12939then :
12940 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12941printf "%s\n" "yes" >&6; }; printf "%s\n" "#define OSPEED_EXTERN 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000012942
Illia Bobyra96d5442023-08-30 16:30:15 +020012943else $as_nop
12944 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12945printf "%s\n" "no" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012946fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012947rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012948 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012949
12950fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012951rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012952 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000012953
Illia Bobyra96d5442023-08-30 16:30:15 +020012954{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether termcap.h contains UP, BC and PC" >&5
12955printf %s "checking whether termcap.h contains UP, BC and PC... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012956cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012957/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012958
12959#ifdef HAVE_TERMCAP_H
12960# include <termcap.h>
12961#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012962
12963int
Illia Bobyra96d5442023-08-30 16:30:15 +020012964main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012965{
Bram Moolenaar071d4272004-06-13 20:20:40 +000012966if (UP == 0 && BC == 0) PC = 1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012967 ;
12968 return 0;
12969}
12970_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012971if ac_fn_c_try_link "$LINENO"
12972then :
12973 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12974printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_UP_BC_PC 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000012975
Illia Bobyra96d5442023-08-30 16:30:15 +020012976else $as_nop
12977 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12978printf "%s\n" "no" >&6; }
12979 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether UP, BC and PC can be extern" >&5
12980printf %s "checking whether UP, BC and PC can be extern... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012982/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012983
12984#ifdef HAVE_TERMCAP_H
12985# include <termcap.h>
12986#endif
12987extern char *UP, *BC, PC;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012988
12989int
Illia Bobyra96d5442023-08-30 16:30:15 +020012990main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012991{
Bram Moolenaar071d4272004-06-13 20:20:40 +000012992if (UP == 0 && BC == 0) PC = 1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012993 ;
12994 return 0;
12995}
12996_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012997if ac_fn_c_try_link "$LINENO"
12998then :
12999 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13000printf "%s\n" "yes" >&6; }; printf "%s\n" "#define UP_BC_PC_EXTERN 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013001
Illia Bobyra96d5442023-08-30 16:30:15 +020013002else $as_nop
13003 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13004printf "%s\n" "no" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013005fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013006rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013007 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013008
13009fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013010rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013011 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000013012
Illia Bobyra96d5442023-08-30 16:30:15 +020013013{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether tputs() uses outfuntype" >&5
13014printf %s "checking whether tputs() uses outfuntype... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013015cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013016/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013017
13018#ifdef HAVE_TERMCAP_H
13019# include <termcap.h>
13020#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013021
13022int
Illia Bobyra96d5442023-08-30 16:30:15 +020013023main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013024{
Bram Moolenaar071d4272004-06-13 20:20:40 +000013025extern int xx(); tputs("test", 1, (outfuntype)xx)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013026 ;
13027 return 0;
13028}
13029_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013030if ac_fn_c_try_compile "$LINENO"
13031then :
13032 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13033printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_OUTFUNTYPE 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013034
Illia Bobyra96d5442023-08-30 16:30:15 +020013035else $as_nop
13036 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13037printf "%s\n" "no" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013038fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013039rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000013040
Illia Bobyra96d5442023-08-30 16:30:15 +020013041{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether del_curterm() can be used" >&5
13042printf %s "checking whether del_curterm() can be used... " >&6; }
Bram Moolenaarb3a29552021-11-19 11:28:04 +000013043cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13044/* end confdefs.h. */
13045
13046#ifdef HAVE_TERMCAP_H
13047# include <termcap.h>
13048#endif
13049#include <term.h>
13050
13051int
Illia Bobyra96d5442023-08-30 16:30:15 +020013052main (void)
Bram Moolenaarb3a29552021-11-19 11:28:04 +000013053{
13054if (cur_term) del_curterm(cur_term);
13055 ;
13056 return 0;
13057}
13058_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013059if ac_fn_c_try_link "$LINENO"
13060then :
13061 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13062printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_DEL_CURTERM 1" >>confdefs.h
Bram Moolenaarb3a29552021-11-19 11:28:04 +000013063
Illia Bobyra96d5442023-08-30 16:30:15 +020013064else $as_nop
13065 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13066printf "%s\n" "no" >&6; }
Bram Moolenaarb3a29552021-11-19 11:28:04 +000013067fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013068rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarb3a29552021-11-19 11:28:04 +000013069 conftest$ac_exeext conftest.$ac_ext
13070
Illia Bobyra96d5442023-08-30 16:30:15 +020013071{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13072printf %s "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013073cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013074/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013075
13076#include <sys/types.h>
13077#include <sys/time.h>
13078#include <sys/select.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013079int
Illia Bobyra96d5442023-08-30 16:30:15 +020013080main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013081{
Bram Moolenaar071d4272004-06-13 20:20:40 +000013082
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013083 ;
13084 return 0;
13085}
13086_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013087if ac_fn_c_try_compile "$LINENO"
13088then :
13089 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13090printf "%s\n" "yes" >&6; }
13091 printf "%s\n" "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013092
Illia Bobyra96d5442023-08-30 16:30:15 +020013093else $as_nop
13094 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13095printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013096fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013097rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000013098
Illia Bobyra96d5442023-08-30 16:30:15 +020013099{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13100printf %s "checking for /dev/ptc... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013101if test -r /dev/ptc; then
Illia Bobyra96d5442023-08-30 16:30:15 +020013102 printf "%s\n" "#define HAVE_DEV_PTC 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013103
Illia Bobyra96d5442023-08-30 16:30:15 +020013104 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13105printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013106else
Illia Bobyra96d5442023-08-30 16:30:15 +020013107 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13108printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013109fi
13110
Illia Bobyra96d5442023-08-30 16:30:15 +020013111{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SVR4 ptys" >&5
13112printf %s "checking for SVR4 ptys... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013113if test -c /dev/ptmx ; then
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013115/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013116
Bram Moolenaarce7be3a2020-11-26 20:11:11 +010013117// These should be in stdlib.h, but it depends on _XOPEN_SOURCE.
13118char *ptsname(int);
13119int unlockpt(int);
13120int grantpt(int);
13121
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013122int
Illia Bobyra96d5442023-08-30 16:30:15 +020013123main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013124{
Bram Moolenaarce7be3a2020-11-26 20:11:11 +010013125
13126 ptsname(0);
13127 grantpt(0);
13128 unlockpt(0);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013129 ;
13130 return 0;
13131}
13132_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013133if ac_fn_c_try_link "$LINENO"
13134then :
13135 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13136printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SVR4_PTYS 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013137
Illia Bobyra96d5442023-08-30 16:30:15 +020013138else $as_nop
13139 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13140printf "%s\n" "no" >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013141fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013142rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013143 conftest$ac_exeext conftest.$ac_ext
13144else
Illia Bobyra96d5442023-08-30 16:30:15 +020013145 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13146printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013147fi
13148
Illia Bobyra96d5442023-08-30 16:30:15 +020013149{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ptyranges" >&5
13150printf %s "checking for ptyranges... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013151if test -d /dev/ptym ; then
13152 pdir='/dev/ptym'
13153else
13154 pdir='/dev'
13155fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013156cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013157/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013158#ifdef M_UNIX
13159 yes;
13160#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013161
13162_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000013163if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Illia Bobyra96d5442023-08-30 16:30:15 +020013164 $EGREP "yes" >/dev/null 2>&1
13165then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000013166 ptys=`echo /dev/ptyp??`
Illia Bobyra96d5442023-08-30 16:30:15 +020013167else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000013168 ptys=`echo $pdir/pty??`
13169fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013170rm -rf conftest*
Bram Moolenaar071d4272004-06-13 20:20:40 +000013171
13172if test "$ptys" != "$pdir/pty??" ; then
13173 p0=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\).$/\1/g' | sort -u | tr -d '\012'`
13174 p1=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\)$/\1/g' | sort -u | tr -d '\012'`
Illia Bobyra96d5442023-08-30 16:30:15 +020013175 printf "%s\n" "#define PTYRANGE0 \"$p0\"" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013176
Illia Bobyra96d5442023-08-30 16:30:15 +020013177 printf "%s\n" "#define PTYRANGE1 \"$p1\"" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013178
Illia Bobyra96d5442023-08-30 16:30:15 +020013179 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $p0 / $p1" >&5
13180printf "%s\n" "$p0 / $p1" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013181else
Illia Bobyra96d5442023-08-30 16:30:15 +020013182 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: don't know" >&5
13183printf "%s\n" "don't know" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013184fi
13185
Bram Moolenaar446cb832008-06-24 21:56:24 +000013186
Illia Bobyra96d5442023-08-30 16:30:15 +020013187{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct sigcontext" >&5
13188printf %s "checking for struct sigcontext... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013189cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013190/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013191
13192#include <signal.h>
Sam Jamesf8ea1062022-11-05 15:13:50 +000013193int test_sig()
Bram Moolenaar071d4272004-06-13 20:20:40 +000013194{
13195 struct sigcontext *scont;
13196 scont = (struct sigcontext *)0;
13197 return 1;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013198}
13199int
Illia Bobyra96d5442023-08-30 16:30:15 +020013200main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013201{
Bram Moolenaar071d4272004-06-13 20:20:40 +000013202
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013203 ;
13204 return 0;
13205}
13206_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013207if ac_fn_c_try_compile "$LINENO"
13208then :
13209 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13210printf "%s\n" "yes" >&6; }
13211 printf "%s\n" "#define HAVE_SIGCONTEXT 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013212
Illia Bobyra96d5442023-08-30 16:30:15 +020013213else $as_nop
13214 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13215printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013216fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013217rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000013218
Illia Bobyra96d5442023-08-30 16:30:15 +020013219{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking getcwd implementation is broken" >&5
13220printf %s "checking getcwd implementation is broken... " >&6; }
13221if test ${vim_cv_getcwd_broken+y}
13222then :
13223 printf %s "(cached) " >&6
13224else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000013225
Illia Bobyra96d5442023-08-30 16:30:15 +020013226 if test "$cross_compiling" = yes
13227then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000013228
Bram Moolenaar7db77842014-03-27 17:40:59 +010013229 as_fn_error $? "cross-compiling: please set 'vim_cv_getcwd_broken'" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000013230
Illia Bobyra96d5442023-08-30 16:30:15 +020013231else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13233/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013234
Bram Moolenaar446cb832008-06-24 21:56:24 +000013235#include "confdefs.h"
13236#ifdef HAVE_UNISTD_H
13237#include <unistd.h>
13238#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000013239char *dagger[] = { "IFS=pwd", 0 };
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010013240int main()
Bram Moolenaar071d4272004-06-13 20:20:40 +000013241{
13242 char buffer[500];
13243 extern char **environ;
13244 environ = dagger;
13245 return getcwd(buffer, 500) ? 0 : 1;
13246}
Bram Moolenaar446cb832008-06-24 21:56:24 +000013247
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013248_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013249if ac_fn_c_try_run "$LINENO"
13250then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000013251
13252 vim_cv_getcwd_broken=no
13253
Illia Bobyra96d5442023-08-30 16:30:15 +020013254else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000013255
13256 vim_cv_getcwd_broken=yes
13257
13258fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013259rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13260 conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000013261fi
13262
13263
Bram Moolenaar446cb832008-06-24 21:56:24 +000013264fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013265{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_getcwd_broken" >&5
13266printf "%s\n" "$vim_cv_getcwd_broken" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000013267
13268if test "x$vim_cv_getcwd_broken" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020013269 printf "%s\n" "#define BAD_GETCWD 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013270
Bram Moolenaar63d25552019-05-10 21:28:38 +020013271 ac_fn_c_check_func "$LINENO" "getwd" "ac_cv_func_getwd"
Illia Bobyra96d5442023-08-30 16:30:15 +020013272if test "x$ac_cv_func_getwd" = xyes
13273then :
13274 printf "%s\n" "#define HAVE_GETWD 1" >>confdefs.h
Bram Moolenaar63d25552019-05-10 21:28:38 +020013275
Bram Moolenaar071d4272004-06-13 20:20:40 +000013276fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000013277
Illia Bobyra96d5442023-08-30 16:30:15 +020013278fi
13279
13280ac_fn_c_check_func "$LINENO" "fchdir" "ac_cv_func_fchdir"
13281if test "x$ac_cv_func_fchdir" = xyes
13282then :
13283 printf "%s\n" "#define HAVE_FCHDIR 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013284
Bram Moolenaar071d4272004-06-13 20:20:40 +000013285fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013286ac_fn_c_check_func "$LINENO" "fchown" "ac_cv_func_fchown"
13287if test "x$ac_cv_func_fchown" = xyes
13288then :
13289 printf "%s\n" "#define HAVE_FCHOWN 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013290
Illia Bobyra96d5442023-08-30 16:30:15 +020013291fi
13292ac_fn_c_check_func "$LINENO" "fchmod" "ac_cv_func_fchmod"
13293if test "x$ac_cv_func_fchmod" = xyes
13294then :
13295 printf "%s\n" "#define HAVE_FCHMOD 1" >>confdefs.h
13296
13297fi
13298ac_fn_c_check_func "$LINENO" "fsync" "ac_cv_func_fsync"
13299if test "x$ac_cv_func_fsync" = xyes
13300then :
13301 printf "%s\n" "#define HAVE_FSYNC 1" >>confdefs.h
13302
13303fi
13304ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
13305if test "x$ac_cv_func_getcwd" = xyes
13306then :
13307 printf "%s\n" "#define HAVE_GETCWD 1" >>confdefs.h
13308
13309fi
13310ac_fn_c_check_func "$LINENO" "getpseudotty" "ac_cv_func_getpseudotty"
13311if test "x$ac_cv_func_getpseudotty" = xyes
13312then :
13313 printf "%s\n" "#define HAVE_GETPSEUDOTTY 1" >>confdefs.h
13314
13315fi
13316ac_fn_c_check_func "$LINENO" "getpwent" "ac_cv_func_getpwent"
13317if test "x$ac_cv_func_getpwent" = xyes
13318then :
13319 printf "%s\n" "#define HAVE_GETPWENT 1" >>confdefs.h
13320
13321fi
13322ac_fn_c_check_func "$LINENO" "getpwnam" "ac_cv_func_getpwnam"
13323if test "x$ac_cv_func_getpwnam" = xyes
13324then :
13325 printf "%s\n" "#define HAVE_GETPWNAM 1" >>confdefs.h
13326
13327fi
13328ac_fn_c_check_func "$LINENO" "getpwuid" "ac_cv_func_getpwuid"
13329if test "x$ac_cv_func_getpwuid" = xyes
13330then :
13331 printf "%s\n" "#define HAVE_GETPWUID 1" >>confdefs.h
13332
13333fi
13334ac_fn_c_check_func "$LINENO" "getrlimit" "ac_cv_func_getrlimit"
13335if test "x$ac_cv_func_getrlimit" = xyes
13336then :
13337 printf "%s\n" "#define HAVE_GETRLIMIT 1" >>confdefs.h
13338
13339fi
13340ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
13341if test "x$ac_cv_func_gettimeofday" = xyes
13342then :
13343 printf "%s\n" "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
13344
13345fi
13346ac_fn_c_check_func "$LINENO" "localtime_r" "ac_cv_func_localtime_r"
13347if test "x$ac_cv_func_localtime_r" = xyes
13348then :
13349 printf "%s\n" "#define HAVE_LOCALTIME_R 1" >>confdefs.h
13350
13351fi
13352ac_fn_c_check_func "$LINENO" "lstat" "ac_cv_func_lstat"
13353if test "x$ac_cv_func_lstat" = xyes
13354then :
13355 printf "%s\n" "#define HAVE_LSTAT 1" >>confdefs.h
13356
13357fi
13358ac_fn_c_check_func "$LINENO" "memset" "ac_cv_func_memset"
13359if test "x$ac_cv_func_memset" = xyes
13360then :
13361 printf "%s\n" "#define HAVE_MEMSET 1" >>confdefs.h
13362
13363fi
13364ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
13365if test "x$ac_cv_func_mkdtemp" = xyes
13366then :
13367 printf "%s\n" "#define HAVE_MKDTEMP 1" >>confdefs.h
13368
13369fi
13370ac_fn_c_check_func "$LINENO" "nanosleep" "ac_cv_func_nanosleep"
13371if test "x$ac_cv_func_nanosleep" = xyes
13372then :
13373 printf "%s\n" "#define HAVE_NANOSLEEP 1" >>confdefs.h
13374
13375fi
13376ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
13377if test "x$ac_cv_func_opendir" = xyes
13378then :
13379 printf "%s\n" "#define HAVE_OPENDIR 1" >>confdefs.h
13380
13381fi
13382ac_fn_c_check_func "$LINENO" "putenv" "ac_cv_func_putenv"
13383if test "x$ac_cv_func_putenv" = xyes
13384then :
13385 printf "%s\n" "#define HAVE_PUTENV 1" >>confdefs.h
13386
13387fi
13388ac_fn_c_check_func "$LINENO" "qsort" "ac_cv_func_qsort"
13389if test "x$ac_cv_func_qsort" = xyes
13390then :
13391 printf "%s\n" "#define HAVE_QSORT 1" >>confdefs.h
13392
13393fi
13394ac_fn_c_check_func "$LINENO" "readlink" "ac_cv_func_readlink"
13395if test "x$ac_cv_func_readlink" = xyes
13396then :
13397 printf "%s\n" "#define HAVE_READLINK 1" >>confdefs.h
13398
13399fi
13400ac_fn_c_check_func "$LINENO" "select" "ac_cv_func_select"
13401if test "x$ac_cv_func_select" = xyes
13402then :
13403 printf "%s\n" "#define HAVE_SELECT 1" >>confdefs.h
13404
13405fi
13406ac_fn_c_check_func "$LINENO" "setenv" "ac_cv_func_setenv"
13407if test "x$ac_cv_func_setenv" = xyes
13408then :
13409 printf "%s\n" "#define HAVE_SETENV 1" >>confdefs.h
13410
13411fi
13412ac_fn_c_check_func "$LINENO" "getpgid" "ac_cv_func_getpgid"
13413if test "x$ac_cv_func_getpgid" = xyes
13414then :
13415 printf "%s\n" "#define HAVE_GETPGID 1" >>confdefs.h
13416
13417fi
13418ac_fn_c_check_func "$LINENO" "setpgid" "ac_cv_func_setpgid"
13419if test "x$ac_cv_func_setpgid" = xyes
13420then :
13421 printf "%s\n" "#define HAVE_SETPGID 1" >>confdefs.h
13422
13423fi
13424ac_fn_c_check_func "$LINENO" "setsid" "ac_cv_func_setsid"
13425if test "x$ac_cv_func_setsid" = xyes
13426then :
13427 printf "%s\n" "#define HAVE_SETSID 1" >>confdefs.h
13428
13429fi
13430ac_fn_c_check_func "$LINENO" "sigaltstack" "ac_cv_func_sigaltstack"
13431if test "x$ac_cv_func_sigaltstack" = xyes
13432then :
13433 printf "%s\n" "#define HAVE_SIGALTSTACK 1" >>confdefs.h
13434
13435fi
13436ac_fn_c_check_func "$LINENO" "sigstack" "ac_cv_func_sigstack"
13437if test "x$ac_cv_func_sigstack" = xyes
13438then :
13439 printf "%s\n" "#define HAVE_SIGSTACK 1" >>confdefs.h
13440
13441fi
13442ac_fn_c_check_func "$LINENO" "sigset" "ac_cv_func_sigset"
13443if test "x$ac_cv_func_sigset" = xyes
13444then :
13445 printf "%s\n" "#define HAVE_SIGSET 1" >>confdefs.h
13446
13447fi
13448ac_fn_c_check_func "$LINENO" "sigsetjmp" "ac_cv_func_sigsetjmp"
13449if test "x$ac_cv_func_sigsetjmp" = xyes
13450then :
13451 printf "%s\n" "#define HAVE_SIGSETJMP 1" >>confdefs.h
13452
13453fi
13454ac_fn_c_check_func "$LINENO" "sigaction" "ac_cv_func_sigaction"
13455if test "x$ac_cv_func_sigaction" = xyes
13456then :
13457 printf "%s\n" "#define HAVE_SIGACTION 1" >>confdefs.h
13458
13459fi
13460ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
13461if test "x$ac_cv_func_sigprocmask" = xyes
13462then :
13463 printf "%s\n" "#define HAVE_SIGPROCMASK 1" >>confdefs.h
13464
13465fi
13466ac_fn_c_check_func "$LINENO" "sigvec" "ac_cv_func_sigvec"
13467if test "x$ac_cv_func_sigvec" = xyes
13468then :
13469 printf "%s\n" "#define HAVE_SIGVEC 1" >>confdefs.h
13470
13471fi
13472ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
13473if test "x$ac_cv_func_strcasecmp" = xyes
13474then :
13475 printf "%s\n" "#define HAVE_STRCASECMP 1" >>confdefs.h
13476
13477fi
13478ac_fn_c_check_func "$LINENO" "strcoll" "ac_cv_func_strcoll"
13479if test "x$ac_cv_func_strcoll" = xyes
13480then :
13481 printf "%s\n" "#define HAVE_STRCOLL 1" >>confdefs.h
13482
13483fi
13484ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror"
13485if test "x$ac_cv_func_strerror" = xyes
13486then :
13487 printf "%s\n" "#define HAVE_STRERROR 1" >>confdefs.h
13488
13489fi
13490ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
13491if test "x$ac_cv_func_strftime" = xyes
13492then :
13493 printf "%s\n" "#define HAVE_STRFTIME 1" >>confdefs.h
13494
13495fi
13496ac_fn_c_check_func "$LINENO" "stricmp" "ac_cv_func_stricmp"
13497if test "x$ac_cv_func_stricmp" = xyes
13498then :
13499 printf "%s\n" "#define HAVE_STRICMP 1" >>confdefs.h
13500
13501fi
13502ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp"
13503if test "x$ac_cv_func_strncasecmp" = xyes
13504then :
13505 printf "%s\n" "#define HAVE_STRNCASECMP 1" >>confdefs.h
13506
13507fi
13508ac_fn_c_check_func "$LINENO" "strnicmp" "ac_cv_func_strnicmp"
13509if test "x$ac_cv_func_strnicmp" = xyes
13510then :
13511 printf "%s\n" "#define HAVE_STRNICMP 1" >>confdefs.h
13512
13513fi
13514ac_fn_c_check_func "$LINENO" "strpbrk" "ac_cv_func_strpbrk"
13515if test "x$ac_cv_func_strpbrk" = xyes
13516then :
13517 printf "%s\n" "#define HAVE_STRPBRK 1" >>confdefs.h
13518
13519fi
13520ac_fn_c_check_func "$LINENO" "strptime" "ac_cv_func_strptime"
13521if test "x$ac_cv_func_strptime" = xyes
13522then :
13523 printf "%s\n" "#define HAVE_STRPTIME 1" >>confdefs.h
13524
13525fi
13526ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol"
13527if test "x$ac_cv_func_strtol" = xyes
13528then :
13529 printf "%s\n" "#define HAVE_STRTOL 1" >>confdefs.h
13530
13531fi
13532ac_fn_c_check_func "$LINENO" "tgetent" "ac_cv_func_tgetent"
13533if test "x$ac_cv_func_tgetent" = xyes
13534then :
13535 printf "%s\n" "#define HAVE_TGETENT 1" >>confdefs.h
13536
13537fi
13538ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
13539if test "x$ac_cv_func_towlower" = xyes
13540then :
13541 printf "%s\n" "#define HAVE_TOWLOWER 1" >>confdefs.h
13542
13543fi
13544ac_fn_c_check_func "$LINENO" "towupper" "ac_cv_func_towupper"
13545if test "x$ac_cv_func_towupper" = xyes
13546then :
13547 printf "%s\n" "#define HAVE_TOWUPPER 1" >>confdefs.h
13548
13549fi
13550ac_fn_c_check_func "$LINENO" "iswupper" "ac_cv_func_iswupper"
13551if test "x$ac_cv_func_iswupper" = xyes
13552then :
13553 printf "%s\n" "#define HAVE_ISWUPPER 1" >>confdefs.h
13554
13555fi
13556ac_fn_c_check_func "$LINENO" "tzset" "ac_cv_func_tzset"
13557if test "x$ac_cv_func_tzset" = xyes
13558then :
13559 printf "%s\n" "#define HAVE_TZSET 1" >>confdefs.h
13560
13561fi
13562ac_fn_c_check_func "$LINENO" "usleep" "ac_cv_func_usleep"
13563if test "x$ac_cv_func_usleep" = xyes
13564then :
13565 printf "%s\n" "#define HAVE_USLEEP 1" >>confdefs.h
13566
13567fi
13568ac_fn_c_check_func "$LINENO" "utime" "ac_cv_func_utime"
13569if test "x$ac_cv_func_utime" = xyes
13570then :
13571 printf "%s\n" "#define HAVE_UTIME 1" >>confdefs.h
13572
13573fi
13574ac_fn_c_check_func "$LINENO" "utimes" "ac_cv_func_utimes"
13575if test "x$ac_cv_func_utimes" = xyes
13576then :
13577 printf "%s\n" "#define HAVE_UTIMES 1" >>confdefs.h
13578
13579fi
13580ac_fn_c_check_func "$LINENO" "mblen" "ac_cv_func_mblen"
13581if test "x$ac_cv_func_mblen" = xyes
13582then :
13583 printf "%s\n" "#define HAVE_MBLEN 1" >>confdefs.h
13584
13585fi
13586ac_fn_c_check_func "$LINENO" "ftruncate" "ac_cv_func_ftruncate"
13587if test "x$ac_cv_func_ftruncate" = xyes
13588then :
13589 printf "%s\n" "#define HAVE_FTRUNCATE 1" >>confdefs.h
13590
13591fi
13592ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
13593if test "x$ac_cv_func_unsetenv" = xyes
13594then :
13595 printf "%s\n" "#define HAVE_UNSETENV 1" >>confdefs.h
13596
13597fi
13598ac_fn_c_check_func "$LINENO" "posix_openpt" "ac_cv_func_posix_openpt"
13599if test "x$ac_cv_func_posix_openpt" = xyes
13600then :
13601 printf "%s\n" "#define HAVE_POSIX_OPENPT 1" >>confdefs.h
13602
13603fi
13604ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
13605if test "x$ac_cv_func_clock_gettime" = xyes
13606then :
13607 printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
Bram Moolenaar643b6142018-09-12 20:29:09 +020013608
13609fi
13610
Bram Moolenaar643b6142018-09-12 20:29:09 +020013611
Illia Bobyra96d5442023-08-30 16:30:15 +020013612
13613
13614{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking types of arguments for select" >&5
13615printf %s "checking types of arguments for select... " >&6; }
13616if test ${ac_cv_func_select_args+y}
13617then :
13618 printf %s "(cached) " >&6
13619else $as_nop
13620 ac_cv_func_select_args='int,int *,struct timeval *'
13621for ac_arg234 in 'fd_set *' 'int *' 'void *'; do
Bram Moolenaar643b6142018-09-12 20:29:09 +020013622 for ac_arg1 in 'int' 'size_t' 'unsigned long int' 'unsigned int'; do
13623 for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do
13624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13625/* end confdefs.h. */
13626$ac_includes_default
13627#ifdef HAVE_SYS_SELECT_H
13628# include <sys/select.h>
13629#endif
13630#ifdef HAVE_SYS_SOCKET_H
13631# include <sys/socket.h>
13632#endif
13633
13634int
Illia Bobyra96d5442023-08-30 16:30:15 +020013635main (void)
Bram Moolenaar643b6142018-09-12 20:29:09 +020013636{
13637extern int select ($ac_arg1,
13638 $ac_arg234, $ac_arg234, $ac_arg234,
13639 $ac_arg5);
13640 ;
13641 return 0;
13642}
13643_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013644if ac_fn_c_try_compile "$LINENO"
13645then :
Bram Moolenaar643b6142018-09-12 20:29:09 +020013646 ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3
13647fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013648rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar643b6142018-09-12 20:29:09 +020013649 done
13650 done
13651done
Bram Moolenaar643b6142018-09-12 20:29:09 +020013652
13653fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013654{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_select_args" >&5
13655printf "%s\n" "$ac_cv_func_select_args" >&6; }
Bram Moolenaar643b6142018-09-12 20:29:09 +020013656ac_save_IFS=$IFS; IFS=','
13657set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'`
13658IFS=$ac_save_IFS
13659shift
13660
Illia Bobyra96d5442023-08-30 16:30:15 +020013661printf "%s\n" "#define SELECT_TYPE_ARG1 $1" >>confdefs.h
Bram Moolenaar643b6142018-09-12 20:29:09 +020013662
13663
Illia Bobyra96d5442023-08-30 16:30:15 +020013664printf "%s\n" "#define SELECT_TYPE_ARG234 ($2)" >>confdefs.h
Bram Moolenaar643b6142018-09-12 20:29:09 +020013665
13666
Illia Bobyra96d5442023-08-30 16:30:15 +020013667printf "%s\n" "#define SELECT_TYPE_ARG5 ($3)" >>confdefs.h
Bram Moolenaar643b6142018-09-12 20:29:09 +020013668
Illia Bobyra96d5442023-08-30 16:30:15 +020013669rm -rf conftest*
Bram Moolenaar643b6142018-09-12 20:29:09 +020013670
Illia Bobyra96d5442023-08-30 16:30:15 +020013671{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
13672printf %s "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
13673if test ${ac_cv_sys_largefile_source+y}
13674then :
13675 printf %s "(cached) " >&6
13676else $as_nop
Bram Moolenaar25153e12010-02-24 14:47:08 +010013677 while :; do
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar25153e12010-02-24 14:47:08 +010013679/* end confdefs.h. */
13680#include <sys/types.h> /* for off_t */
13681 #include <stdio.h>
13682int
Illia Bobyra96d5442023-08-30 16:30:15 +020013683main (void)
Bram Moolenaar25153e12010-02-24 14:47:08 +010013684{
13685int (*fp) (FILE *, off_t, int) = fseeko;
13686 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
13687 ;
13688 return 0;
13689}
13690_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013691if ac_fn_c_try_link "$LINENO"
13692then :
Bram Moolenaar25153e12010-02-24 14:47:08 +010013693 ac_cv_sys_largefile_source=no; break
Bram Moolenaar25153e12010-02-24 14:47:08 +010013694fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013695rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013696 conftest$ac_exeext conftest.$ac_ext
13697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar25153e12010-02-24 14:47:08 +010013698/* end confdefs.h. */
13699#define _LARGEFILE_SOURCE 1
13700#include <sys/types.h> /* for off_t */
13701 #include <stdio.h>
13702int
Illia Bobyra96d5442023-08-30 16:30:15 +020013703main (void)
Bram Moolenaar25153e12010-02-24 14:47:08 +010013704{
13705int (*fp) (FILE *, off_t, int) = fseeko;
13706 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
13707 ;
13708 return 0;
13709}
13710_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013711if ac_fn_c_try_link "$LINENO"
13712then :
Bram Moolenaar25153e12010-02-24 14:47:08 +010013713 ac_cv_sys_largefile_source=1; break
Bram Moolenaar25153e12010-02-24 14:47:08 +010013714fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013715rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013716 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar25153e12010-02-24 14:47:08 +010013717 ac_cv_sys_largefile_source=unknown
13718 break
13719done
13720fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013721{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
13722printf "%s\n" "$ac_cv_sys_largefile_source" >&6; }
Bram Moolenaar25153e12010-02-24 14:47:08 +010013723case $ac_cv_sys_largefile_source in #(
13724 no | unknown) ;;
13725 *)
Illia Bobyra96d5442023-08-30 16:30:15 +020013726printf "%s\n" "#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source" >>confdefs.h
Bram Moolenaar25153e12010-02-24 14:47:08 +010013727;;
13728esac
13729rm -rf conftest*
13730
13731# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
13732# in glibc 2.1.3, but that breaks too many other things.
13733# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
13734if test $ac_cv_sys_largefile_source != unknown; then
13735
Illia Bobyra96d5442023-08-30 16:30:15 +020013736printf "%s\n" "#define HAVE_FSEEKO 1" >>confdefs.h
Bram Moolenaar25153e12010-02-24 14:47:08 +010013737
13738fi
13739
Bram Moolenaar071d4272004-06-13 20:20:40 +000013740
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013741# Check whether --enable-largefile was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020013742if test ${enable_largefile+y}
13743then :
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013744 enableval=$enable_largefile;
13745fi
13746
13747if test "$enable_largefile" != no; then
13748
Illia Bobyra96d5442023-08-30 16:30:15 +020013749 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
13750printf %s "checking for special C compiler options needed for large files... " >&6; }
13751if test ${ac_cv_sys_largefile_CC+y}
13752then :
13753 printf %s "(cached) " >&6
13754else $as_nop
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013755 ac_cv_sys_largefile_CC=no
13756 if test "$GCC" != yes; then
13757 ac_save_CC=$CC
13758 while :; do
13759 # IRIX 6.2 and later do not support large files by default,
13760 # so use the C compiler's -n32 option if that helps.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013762/* end confdefs.h. */
13763#include <sys/types.h>
13764 /* Check that off_t can represent 2**63 - 1 correctly.
13765 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13766 since some C++ compilers masquerading as C compilers
13767 incorrectly reject 9223372036854775807. */
Illia Bobyra96d5442023-08-30 16:30:15 +020013768#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013769 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13770 && LARGE_OFF_T % 2147483647 == 1)
13771 ? 1 : -1];
13772int
Illia Bobyra96d5442023-08-30 16:30:15 +020013773main (void)
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013774{
13775
13776 ;
13777 return 0;
13778}
13779_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013780 if ac_fn_c_try_compile "$LINENO"
13781then :
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013782 break
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013783fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013784rm -f core conftest.err conftest.$ac_objext conftest.beam
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013785 CC="$CC -n32"
Illia Bobyra96d5442023-08-30 16:30:15 +020013786 if ac_fn_c_try_compile "$LINENO"
13787then :
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013788 ac_cv_sys_largefile_CC=' -n32'; break
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013789fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013790rm -f core conftest.err conftest.$ac_objext conftest.beam
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013791 break
13792 done
13793 CC=$ac_save_CC
13794 rm -f conftest.$ac_ext
13795 fi
13796fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013797{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
13798printf "%s\n" "$ac_cv_sys_largefile_CC" >&6; }
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013799 if test "$ac_cv_sys_largefile_CC" != no; then
13800 CC=$CC$ac_cv_sys_largefile_CC
13801 fi
13802
Illia Bobyra96d5442023-08-30 16:30:15 +020013803 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
13804printf %s "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
13805if test ${ac_cv_sys_file_offset_bits+y}
13806then :
13807 printf %s "(cached) " >&6
13808else $as_nop
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013809 while :; do
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013811/* end confdefs.h. */
13812#include <sys/types.h>
13813 /* Check that off_t can represent 2**63 - 1 correctly.
13814 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13815 since some C++ compilers masquerading as C compilers
13816 incorrectly reject 9223372036854775807. */
Illia Bobyra96d5442023-08-30 16:30:15 +020013817#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013818 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13819 && LARGE_OFF_T % 2147483647 == 1)
13820 ? 1 : -1];
13821int
Illia Bobyra96d5442023-08-30 16:30:15 +020013822main (void)
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013823{
13824
13825 ;
13826 return 0;
13827}
13828_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013829if ac_fn_c_try_compile "$LINENO"
13830then :
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013831 ac_cv_sys_file_offset_bits=no; break
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013832fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013833rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013835/* end confdefs.h. */
13836#define _FILE_OFFSET_BITS 64
13837#include <sys/types.h>
13838 /* Check that off_t can represent 2**63 - 1 correctly.
13839 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13840 since some C++ compilers masquerading as C compilers
13841 incorrectly reject 9223372036854775807. */
Illia Bobyra96d5442023-08-30 16:30:15 +020013842#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013843 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13844 && LARGE_OFF_T % 2147483647 == 1)
13845 ? 1 : -1];
13846int
Illia Bobyra96d5442023-08-30 16:30:15 +020013847main (void)
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013848{
13849
13850 ;
13851 return 0;
13852}
13853_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013854if ac_fn_c_try_compile "$LINENO"
13855then :
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013856 ac_cv_sys_file_offset_bits=64; break
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013857fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013858rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013859 ac_cv_sys_file_offset_bits=unknown
13860 break
13861done
13862fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013863{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
13864printf "%s\n" "$ac_cv_sys_file_offset_bits" >&6; }
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013865case $ac_cv_sys_file_offset_bits in #(
13866 no | unknown) ;;
13867 *)
Illia Bobyra96d5442023-08-30 16:30:15 +020013868printf "%s\n" "#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits" >>confdefs.h
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013869;;
13870esac
13871rm -rf conftest*
13872 if test $ac_cv_sys_file_offset_bits = unknown; then
Illia Bobyra96d5442023-08-30 16:30:15 +020013873 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
13874printf %s "checking for _LARGE_FILES value needed for large files... " >&6; }
13875if test ${ac_cv_sys_large_files+y}
13876then :
13877 printf %s "(cached) " >&6
13878else $as_nop
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013879 while :; do
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013881/* end confdefs.h. */
13882#include <sys/types.h>
13883 /* Check that off_t can represent 2**63 - 1 correctly.
13884 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13885 since some C++ compilers masquerading as C compilers
13886 incorrectly reject 9223372036854775807. */
Illia Bobyra96d5442023-08-30 16:30:15 +020013887#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013888 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13889 && LARGE_OFF_T % 2147483647 == 1)
13890 ? 1 : -1];
13891int
Illia Bobyra96d5442023-08-30 16:30:15 +020013892main (void)
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013893{
13894
13895 ;
13896 return 0;
13897}
13898_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013899if ac_fn_c_try_compile "$LINENO"
13900then :
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013901 ac_cv_sys_large_files=no; break
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013902fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013903rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013905/* end confdefs.h. */
13906#define _LARGE_FILES 1
13907#include <sys/types.h>
13908 /* Check that off_t can represent 2**63 - 1 correctly.
13909 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13910 since some C++ compilers masquerading as C compilers
13911 incorrectly reject 9223372036854775807. */
Illia Bobyra96d5442023-08-30 16:30:15 +020013912#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013913 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13914 && LARGE_OFF_T % 2147483647 == 1)
13915 ? 1 : -1];
13916int
Illia Bobyra96d5442023-08-30 16:30:15 +020013917main (void)
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013918{
13919
13920 ;
13921 return 0;
13922}
13923_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013924if ac_fn_c_try_compile "$LINENO"
13925then :
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013926 ac_cv_sys_large_files=1; break
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013927fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013928rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013929 ac_cv_sys_large_files=unknown
13930 break
13931done
13932fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013933{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
13934printf "%s\n" "$ac_cv_sys_large_files" >&6; }
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013935case $ac_cv_sys_large_files in #(
13936 no | unknown) ;;
13937 *)
Illia Bobyra96d5442023-08-30 16:30:15 +020013938printf "%s\n" "#define _LARGE_FILES $ac_cv_sys_large_files" >>confdefs.h
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013939;;
13940esac
13941rm -rf conftest*
13942 fi
13943fi
13944
13945
Illia Bobyra96d5442023-08-30 16:30:15 +020013946{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-canberra argument" >&5
13947printf %s "checking --enable-canberra argument... " >&6; }
Bram Moolenaar21606672019-06-14 20:40:58 +020013948# Check whether --enable-canberra was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020013949if test ${enable_canberra+y}
13950then :
Bram Moolenaar21606672019-06-14 20:40:58 +020013951 enableval=$enable_canberra;
Illia Bobyra96d5442023-08-30 16:30:15 +020013952else $as_nop
Bram Moolenaar21606672019-06-14 20:40:58 +020013953 enable_canberra="maybe"
13954fi
Bram Moolenaar427f5b62019-06-09 13:43:51 +020013955
Bram Moolenaar21606672019-06-14 20:40:58 +020013956
13957if test "$enable_canberra" = "maybe"; then
Martin Tournoij25f3a142022-10-08 19:26:41 +010013958 if test "$features" = "huge"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020013959 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to yes" >&5
13960printf "%s\n" "Defaulting to yes" >&6; }
Bram Moolenaar21606672019-06-14 20:40:58 +020013961 enable_canberra="yes"
13962 else
Illia Bobyra96d5442023-08-30 16:30:15 +020013963 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to no" >&5
13964printf "%s\n" "Defaulting to no" >&6; }
Bram Moolenaar21606672019-06-14 20:40:58 +020013965 enable_canberra="no"
13966 fi
13967else
Bram Moolenaar12471262022-01-18 11:11:25 +000013968 if test "$enable_canberra" = "yes" -a "$has_eval" = "no"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020013969 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot use sound with tiny features" >&5
13970printf "%s\n" "cannot use sound with tiny features" >&6; }
Bram Moolenaar12471262022-01-18 11:11:25 +000013971 enable_canberra="no"
13972 else
Illia Bobyra96d5442023-08-30 16:30:15 +020013973 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_canberra" >&5
13974printf "%s\n" "$enable_canberra" >&6; }
Bram Moolenaar12471262022-01-18 11:11:25 +000013975 fi
Bram Moolenaar427f5b62019-06-09 13:43:51 +020013976fi
Bram Moolenaar21606672019-06-14 20:40:58 +020013977if test "$enable_canberra" = "yes"; then
13978 if test "x$PKG_CONFIG" != "xno"; then
13979 canberra_lib=`$PKG_CONFIG --libs libcanberra 2>/dev/null`
13980 canberra_cflags=`$PKG_CONFIG --cflags libcanberra 2>/dev/null`
13981 fi
13982 if test "x$canberra_lib" = "x"; then
13983 canberra_lib=-lcanberra
13984 canberra_cflags=-D_REENTRANT
13985 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013986 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcanberra" >&5
13987printf %s "checking for libcanberra... " >&6; }
Bram Moolenaar21606672019-06-14 20:40:58 +020013988 ac_save_CFLAGS="$CFLAGS"
13989 ac_save_LIBS="$LIBS"
Bram Moolenaar12471262022-01-18 11:11:25 +000013990 if `echo "$CFLAGS" | grep -v "$canberra_cflags" 2>/dev/null`; then
Christian Brabandt6b9efdd2021-09-09 17:14:50 +020013991 CFLAGS="$CFLAGS $canberra_cflags"
13992 fi
Bram Moolenaar21606672019-06-14 20:40:58 +020013993 LIBS="$LIBS $canberra_lib"
13994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar427f5b62019-06-09 13:43:51 +020013995/* end confdefs.h. */
13996
Bram Moolenaar21606672019-06-14 20:40:58 +020013997 # include <canberra.h>
Bram Moolenaar427f5b62019-06-09 13:43:51 +020013998
13999int
Illia Bobyra96d5442023-08-30 16:30:15 +020014000main (void)
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014001{
14002
Bram Moolenaar21606672019-06-14 20:40:58 +020014003 ca_context *hello;
14004 ca_context_create(&hello);
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014005 ;
14006 return 0;
14007}
14008_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014009if ac_fn_c_try_link "$LINENO"
14010then :
14011 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14012printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_CANBERRA 1" >>confdefs.h
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014013
Illia Bobyra96d5442023-08-30 16:30:15 +020014014else $as_nop
14015 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no; try installing libcanberra-dev" >&5
14016printf "%s\n" "no; try installing libcanberra-dev" >&6; }; CFLAGS="$ac_save_CFLAGS"; LIBS="$ac_save_LIBS"
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014017fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014018rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014019 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar21606672019-06-14 20:40:58 +020014020fi
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014021
Illia Bobyra96d5442023-08-30 16:30:15 +020014022{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-libsodium argument" >&5
14023printf %s "checking --enable-libsodium argument... " >&6; }
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014024# Check whether --enable-libsodium was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020014025if test ${enable_libsodium+y}
14026then :
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014027 enableval=$enable_libsodium;
Illia Bobyra96d5442023-08-30 16:30:15 +020014028else $as_nop
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014029 enable_libsodium="maybe"
14030fi
14031
14032
14033if test "$enable_libsodium" = "maybe"; then
Martin Tournoij25f3a142022-10-08 19:26:41 +010014034 if test "$features" = "huge"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014035 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to yes" >&5
14036printf "%s\n" "Defaulting to yes" >&6; }
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014037 enable_libsodium="yes"
14038 else
Illia Bobyra96d5442023-08-30 16:30:15 +020014039 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to no" >&5
14040printf "%s\n" "Defaulting to no" >&6; }
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014041 enable_libsodium="no"
14042 fi
14043else
Illia Bobyra96d5442023-08-30 16:30:15 +020014044 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_libsodium" >&5
14045printf "%s\n" "$enable_libsodium" >&6; }
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014046fi
14047if test "$enable_libsodium" = "yes"; then
14048 if test "x$PKG_CONFIG" != "xno"; then
14049 libsodium_lib=`$PKG_CONFIG --libs libsodium 2>/dev/null`
14050 libsodium_cflags=`$PKG_CONFIG --cflags libsodium 2>/dev/null`
14051 fi
14052 if test "x$libsodium_lib" = "x"; then
14053 libsodium_lib=-lsodium
14054 libsodium_cflags=
14055 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014056 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libsodium" >&5
14057printf %s "checking for libsodium... " >&6; }
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014058 ac_save_CFLAGS="$CFLAGS"
14059 ac_save_LIBS="$LIBS"
14060 CFLAGS="$CFLAGS $libsodium_cflags"
14061 LIBS="$LIBS $libsodium_lib"
14062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14063/* end confdefs.h. */
14064
14065 # include <sodium.h>
14066
14067int
Illia Bobyra96d5442023-08-30 16:30:15 +020014068main (void)
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014069{
14070
14071 printf("%d", sodium_init());
14072 ;
14073 return 0;
14074}
14075_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014076if ac_fn_c_try_link "$LINENO"
14077then :
14078 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14079printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SODIUM 1" >>confdefs.h
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014080
Illia Bobyra96d5442023-08-30 16:30:15 +020014081else $as_nop
14082 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no; try installing libsodium-dev" >&5
14083printf "%s\n" "no; try installing libsodium-dev" >&6; }; CFLAGS="$ac_save_CFLAGS"; LIBS="$ac_save_LIBS"
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014084fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014085rm -f core conftest.err conftest.$ac_objext conftest.beam \
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014086 conftest$ac_exeext conftest.$ac_ext
14087fi
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014088
Illia Bobyra96d5442023-08-30 16:30:15 +020014089{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for st_blksize" >&5
14090printf %s "checking for st_blksize... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014091cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014092/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000014093#include <sys/types.h>
14094#include <sys/stat.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014095int
Illia Bobyra96d5442023-08-30 16:30:15 +020014096main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014097{
Bram Moolenaar071d4272004-06-13 20:20:40 +000014098 struct stat st;
14099 int n;
14100
14101 stat("/", &st);
14102 n = (int)st.st_blksize;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014103 ;
14104 return 0;
14105}
14106_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014107if ac_fn_c_try_compile "$LINENO"
14108then :
14109 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14110printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_ST_BLKSIZE 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000014111
Illia Bobyra96d5442023-08-30 16:30:15 +020014112else $as_nop
14113 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14114printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000014115fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014116rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000014117
Illia Bobyra96d5442023-08-30 16:30:15 +020014118{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for timer_create without -lrt" >&5
14119printf %s "checking for timer_create without -lrt... " >&6; }
14120if test ${vim_cv_timer_create+y}
14121then :
14122 printf %s "(cached) " >&6
14123else $as_nop
Bram Moolenaar5748b7f2022-07-28 12:09:04 +010014124
Illia Bobyra96d5442023-08-30 16:30:15 +020014125if test "$cross_compiling" = yes
14126then :
14127 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: failed to build test program; if cross-compiling please set 'vim_cv_timer_create'" >&5
14128printf "%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 +010014129
Illia Bobyra96d5442023-08-30 16:30:15 +020014130else $as_nop
Bram Moolenaarf2ce76a2022-07-02 11:40:40 +010014131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Paul Ollis65745772022-06-05 16:55:54 +010014132/* end confdefs.h. */
14133
Bram Moolenaar5748b7f2022-07-28 12:09:04 +010014134#if STDC_HEADERS
14135# include <stdlib.h>
14136# include <stddef.h>
14137#endif
14138#include <signal.h>
14139#include <time.h>
Bram Moolenaare5303952022-06-19 17:05:47 +010014140static void set_flag(union sigval sv) {}
Paul Ollis65745772022-06-05 16:55:54 +010014141
14142int
Illia Bobyra96d5442023-08-30 16:30:15 +020014143main (void)
Paul Ollis65745772022-06-05 16:55:54 +010014144{
14145
14146 struct timespec ts;
14147 struct sigevent action = {0};
14148 timer_t timer_id;
14149
14150 action.sigev_notify = SIGEV_THREAD;
14151 action.sigev_notify_function = set_flag;
Bram Moolenaarf2ce76a2022-07-02 11:40:40 +010014152 if (timer_create(CLOCK_MONOTONIC, &action, &timer_id) < 0)
14153 exit(1); // cannot create a monotonic timer
Paul Ollis65745772022-06-05 16:55:54 +010014154
14155 ;
14156 return 0;
14157}
14158_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014159if ac_fn_c_try_run "$LINENO"
14160then :
Richard Purdie509695c2022-07-24 20:48:00 +010014161 vim_cv_timer_create=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020014162else $as_nop
Richard Purdie509695c2022-07-24 20:48:00 +010014163 vim_cv_timer_create=no
Paul Ollis65745772022-06-05 16:55:54 +010014164fi
Bram Moolenaarf2ce76a2022-07-02 11:40:40 +010014165rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14166 conftest.$ac_objext conftest.beam conftest.$ac_ext
Paul Ollis65745772022-06-05 16:55:54 +010014167fi
Bram Moolenaarf2ce76a2022-07-02 11:40:40 +010014168
14169fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014170{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_timer_create" >&5
14171printf "%s\n" "$vim_cv_timer_create" >&6; }
Bram Moolenaarefffa532022-07-28 22:39:54 +010014172
14173if test "x$vim_cv_timer_create" = "xno" ; then
14174 save_LIBS="$LIBS"
14175 LIBS="$LIBS -lrt"
Illia Bobyra96d5442023-08-30 16:30:15 +020014176 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for timer_create with -lrt" >&5
14177printf %s "checking for timer_create with -lrt... " >&6; }
14178if test ${vim_cv_timer_create_with_lrt+y}
14179then :
14180 printf %s "(cached) " >&6
14181else $as_nop
Bram Moolenaarefffa532022-07-28 22:39:54 +010014182
Illia Bobyra96d5442023-08-30 16:30:15 +020014183 if test "$cross_compiling" = yes
14184then :
14185 { 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
14186printf "%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 +010014187
Illia Bobyra96d5442023-08-30 16:30:15 +020014188else $as_nop
Bram Moolenaarefffa532022-07-28 22:39:54 +010014189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14190/* end confdefs.h. */
14191
14192 #if STDC_HEADERS
14193 # include <stdlib.h>
14194 # include <stddef.h>
14195 #endif
14196 #include <signal.h>
14197 #include <time.h>
14198 static void set_flag(union sigval sv) {}
14199
14200int
Illia Bobyra96d5442023-08-30 16:30:15 +020014201main (void)
Bram Moolenaarefffa532022-07-28 22:39:54 +010014202{
14203
14204 struct timespec ts;
14205 struct sigevent action = {0};
14206 timer_t timer_id;
14207
14208 action.sigev_notify = SIGEV_THREAD;
14209 action.sigev_notify_function = set_flag;
14210 if (timer_create(CLOCK_MONOTONIC, &action, &timer_id) < 0)
14211 exit(1); // cannot create a monotonic timer
14212
14213 ;
14214 return 0;
14215}
14216_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014217if ac_fn_c_try_run "$LINENO"
14218then :
Bram Moolenaarefffa532022-07-28 22:39:54 +010014219 vim_cv_timer_create_with_lrt=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020014220else $as_nop
Bram Moolenaarefffa532022-07-28 22:39:54 +010014221 vim_cv_timer_create_with_lrt=no
14222fi
Bram Moolenaarf2ce76a2022-07-02 11:40:40 +010014223rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14224 conftest.$ac_objext conftest.beam conftest.$ac_ext
14225fi
14226
Richard Purdie509695c2022-07-24 20:48:00 +010014227fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014228{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_timer_create_with_lrt" >&5
14229printf "%s\n" "$vim_cv_timer_create_with_lrt" >&6; }
Bram Moolenaarefffa532022-07-28 22:39:54 +010014230 LIBS="$save_LIBS"
14231else
14232 vim_cv_timer_create_with_lrt=no
14233fi
Richard Purdie509695c2022-07-24 20:48:00 +010014234
14235if test "x$vim_cv_timer_create" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014236 printf "%s\n" "#define HAVE_TIMER_CREATE 1" >>confdefs.h
Richard Purdie509695c2022-07-24 20:48:00 +010014237
14238fi
Bram Moolenaarefffa532022-07-28 22:39:54 +010014239if test "x$vim_cv_timer_create_with_lrt" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014240 printf "%s\n" "#define HAVE_TIMER_CREATE 1" >>confdefs.h
Richard Purdie509695c2022-07-24 20:48:00 +010014241
Bram Moolenaarefffa532022-07-28 22:39:54 +010014242 LIBS="$LIBS -lrt"
14243fi
Richard Purdie509695c2022-07-24 20:48:00 +010014244
Illia Bobyra96d5442023-08-30 16:30:15 +020014245{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat() ignores a trailing slash" >&5
14246printf %s "checking whether stat() ignores a trailing slash... " >&6; }
14247if test ${vim_cv_stat_ignores_slash+y}
14248then :
14249 printf %s "(cached) " >&6
14250else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000014251
Illia Bobyra96d5442023-08-30 16:30:15 +020014252 if test "$cross_compiling" = yes
14253then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000014254
Bram Moolenaar7db77842014-03-27 17:40:59 +010014255 as_fn_error $? "cross-compiling: please set 'vim_cv_stat_ignores_slash'" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000014256
Illia Bobyra96d5442023-08-30 16:30:15 +020014257else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14259/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000014260
14261#include "confdefs.h"
14262#if STDC_HEADERS
14263# include <stdlib.h>
14264# include <stddef.h>
14265#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000014266#include <sys/types.h>
14267#include <sys/stat.h>
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010014268int main() {struct stat st; exit(stat("configure/", &st) != 0); }
Bram Moolenaar446cb832008-06-24 21:56:24 +000014269
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014270_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014271if ac_fn_c_try_run "$LINENO"
14272then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000014273
14274 vim_cv_stat_ignores_slash=yes
Bram Moolenaar071d4272004-06-13 20:20:40 +000014275
Illia Bobyra96d5442023-08-30 16:30:15 +020014276else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000014277
14278 vim_cv_stat_ignores_slash=no
14279
Bram Moolenaar071d4272004-06-13 20:20:40 +000014280fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014281rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14282 conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000014283fi
14284
Bram Moolenaar446cb832008-06-24 21:56:24 +000014285
Bram Moolenaar446cb832008-06-24 21:56:24 +000014286fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014287{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_stat_ignores_slash" >&5
14288printf "%s\n" "$vim_cv_stat_ignores_slash" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000014289
14290if test "x$vim_cv_stat_ignores_slash" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014291 printf "%s\n" "#define STAT_IGNORES_SLASH 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000014292
14293fi
14294
Illia Bobyra96d5442023-08-30 16:30:15 +020014295{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nanoseconds field of struct stat" >&5
14296printf %s "checking for nanoseconds field of struct stat... " >&6; }
14297if test ${ac_cv_struct_st_mtim_nsec+y}
14298then :
14299 printf %s "(cached) " >&6
14300else $as_nop
Leah Neukirchen0a7984a2021-10-14 21:27:55 +010014301 ac_save_CPPFLAGS="$CPPFLAGS"
14302 ac_cv_struct_st_mtim_nsec=no
14303 # st_mtim.tv_nsec -- the usual case
14304 # st_mtim._tv_nsec -- Solaris 2.6, if
14305 # (defined _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED == 1
14306 # && !defined __EXTENSIONS__)
14307 # st_mtim.st__tim.tv_nsec -- UnixWare 2.1.2
14308 # st_mtime_n -- AIX 5.2 and above
14309 # st_mtimespec.tv_nsec -- Darwin (Mac OSX)
14310 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
14311 CPPFLAGS="$ac_save_CPPFLAGS -DST_MTIM_NSEC=$ac_val"
14312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14313/* end confdefs.h. */
14314#include <sys/types.h>
14315#include <sys/stat.h>
14316int
Illia Bobyra96d5442023-08-30 16:30:15 +020014317main (void)
Leah Neukirchen0a7984a2021-10-14 21:27:55 +010014318{
14319struct stat s; s.ST_MTIM_NSEC;
14320 ;
14321 return 0;
14322}
14323_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014324if ac_fn_c_try_compile "$LINENO"
14325then :
Leah Neukirchen0a7984a2021-10-14 21:27:55 +010014326 ac_cv_struct_st_mtim_nsec=$ac_val; break
14327fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014328rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Leah Neukirchen0a7984a2021-10-14 21:27:55 +010014329 done
14330 CPPFLAGS="$ac_save_CPPFLAGS"
14331
14332fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014333{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_st_mtim_nsec" >&5
14334printf "%s\n" "$ac_cv_struct_st_mtim_nsec" >&6; }
Leah Neukirchen0a7984a2021-10-14 21:27:55 +010014335if test $ac_cv_struct_st_mtim_nsec != no; then
14336
Illia Bobyra96d5442023-08-30 16:30:15 +020014337printf "%s\n" "#define ST_MTIM_NSEC $ac_cv_struct_st_mtim_nsec" >>confdefs.h
Leah Neukirchen0a7984a2021-10-14 21:27:55 +010014338
14339fi
14340
Illia Bobyra96d5442023-08-30 16:30:15 +020014341{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv_open()" >&5
14342printf %s "checking for iconv_open()... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000014343save_LIBS="$LIBS"
14344LIBS="$LIBS -liconv"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014345cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014346/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000014347
14348#ifdef HAVE_ICONV_H
14349# include <iconv.h>
14350#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014351
14352int
Illia Bobyra96d5442023-08-30 16:30:15 +020014353main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014354{
Bram Moolenaar071d4272004-06-13 20:20:40 +000014355iconv_open("fr", "to");
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014356 ;
14357 return 0;
14358}
14359_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014360if ac_fn_c_try_link "$LINENO"
14361then :
14362 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes; with -liconv" >&5
14363printf "%s\n" "yes; with -liconv" >&6; }; printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000014364
Illia Bobyra96d5442023-08-30 16:30:15 +020014365else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014366 LIBS="$save_LIBS"
14367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014368/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000014369
14370#ifdef HAVE_ICONV_H
14371# include <iconv.h>
14372#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014373
14374int
Illia Bobyra96d5442023-08-30 16:30:15 +020014375main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014376{
Bram Moolenaar071d4272004-06-13 20:20:40 +000014377iconv_open("fr", "to");
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014378 ;
14379 return 0;
14380}
14381_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014382if ac_fn_c_try_link "$LINENO"
14383then :
14384 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14385printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000014386
Illia Bobyra96d5442023-08-30 16:30:15 +020014387else $as_nop
14388 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14389printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000014390fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014391rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014392 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000014393fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014394rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014395 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000014396
14397
Illia Bobyra96d5442023-08-30 16:30:15 +020014398{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo(CODESET)" >&5
14399printf %s "checking for nl_langinfo(CODESET)... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014400cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014401/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000014402
14403#ifdef HAVE_LANGINFO_H
14404# include <langinfo.h>
14405#endif
14406
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014407int
Illia Bobyra96d5442023-08-30 16:30:15 +020014408main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014409{
Bram Moolenaar071d4272004-06-13 20:20:40 +000014410char *cs = nl_langinfo(CODESET);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014411 ;
14412 return 0;
14413}
14414_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014415if ac_fn_c_try_link "$LINENO"
14416then :
14417 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14418printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_NL_LANGINFO_CODESET 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000014419
Illia Bobyra96d5442023-08-30 16:30:15 +020014420else $as_nop
14421 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14422printf "%s\n" "no" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014423fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014424rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014425 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000014426
Illia Bobyra96d5442023-08-30 16:30:15 +020014427{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for strtod in -lm" >&5
14428printf %s "checking for strtod in -lm... " >&6; }
14429if test ${ac_cv_lib_m_strtod+y}
14430then :
14431 printf %s "(cached) " >&6
14432else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000014433 ac_check_lib_save_LIBS=$LIBS
14434LIBS="-lm $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014435cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000014436/* end confdefs.h. */
14437
14438/* Override any GCC internal prototype to avoid an error.
14439 Use char because int might match the return type of a GCC
14440 builtin and then its argument prototype would still apply. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000014441char strtod ();
14442int
Illia Bobyra96d5442023-08-30 16:30:15 +020014443main (void)
Bram Moolenaar446cb832008-06-24 21:56:24 +000014444{
14445return strtod ();
14446 ;
14447 return 0;
14448}
14449_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014450if ac_fn_c_try_link "$LINENO"
14451then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000014452 ac_cv_lib_m_strtod=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020014453else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014454 ac_cv_lib_m_strtod=no
Bram Moolenaar446cb832008-06-24 21:56:24 +000014455fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014456rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014457 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000014458LIBS=$ac_check_lib_save_LIBS
14459fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014460{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_strtod" >&5
14461printf "%s\n" "$ac_cv_lib_m_strtod" >&6; }
14462if test "x$ac_cv_lib_m_strtod" = xyes
14463then :
14464 printf "%s\n" "#define HAVE_LIBM 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000014465
14466 LIBS="-lm $LIBS"
14467
14468fi
14469
Bram Moolenaar446cb832008-06-24 21:56:24 +000014470
Illia Bobyra96d5442023-08-30 16:30:15 +020014471{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for isinf()" >&5
14472printf %s "checking for isinf()... " >&6; }
Bram Moolenaara6b89762016-02-29 21:38:26 +010014473cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14474/* end confdefs.h. */
14475
14476#ifdef HAVE_MATH_H
14477# include <math.h>
14478#endif
14479#if STDC_HEADERS
14480# include <stdlib.h>
14481# include <stddef.h>
14482#endif
14483
14484int
Illia Bobyra96d5442023-08-30 16:30:15 +020014485main (void)
Bram Moolenaara6b89762016-02-29 21:38:26 +010014486{
14487int r = isinf(1.11);
14488 ;
14489 return 0;
14490}
14491_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014492if ac_fn_c_try_link "$LINENO"
14493then :
14494 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14495printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_ISINF 1" >>confdefs.h
Bram Moolenaara6b89762016-02-29 21:38:26 +010014496
Illia Bobyra96d5442023-08-30 16:30:15 +020014497else $as_nop
14498 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14499printf "%s\n" "no" >&6; }
Bram Moolenaara6b89762016-02-29 21:38:26 +010014500fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014501rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaara6b89762016-02-29 21:38:26 +010014502 conftest$ac_exeext conftest.$ac_ext
14503
Illia Bobyra96d5442023-08-30 16:30:15 +020014504{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for isnan()" >&5
14505printf %s "checking for isnan()... " >&6; }
Bram Moolenaara6b89762016-02-29 21:38:26 +010014506cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14507/* end confdefs.h. */
14508
14509#ifdef HAVE_MATH_H
14510# include <math.h>
14511#endif
14512#if STDC_HEADERS
14513# include <stdlib.h>
14514# include <stddef.h>
14515#endif
14516
14517int
Illia Bobyra96d5442023-08-30 16:30:15 +020014518main (void)
Bram Moolenaara6b89762016-02-29 21:38:26 +010014519{
14520int r = isnan(1.11);
14521 ;
14522 return 0;
14523}
14524_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014525if ac_fn_c_try_link "$LINENO"
14526then :
14527 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14528printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_ISNAN 1" >>confdefs.h
Bram Moolenaara6b89762016-02-29 21:38:26 +010014529
Illia Bobyra96d5442023-08-30 16:30:15 +020014530else $as_nop
14531 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14532printf "%s\n" "no" >&6; }
Bram Moolenaara6b89762016-02-29 21:38:26 +010014533fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014534rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaara6b89762016-02-29 21:38:26 +010014535 conftest$ac_exeext conftest.$ac_ext
14536
Illia Bobyra96d5442023-08-30 16:30:15 +020014537{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-acl argument" >&5
14538printf %s "checking --disable-acl argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000014539# Check whether --enable-acl was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020014540if test ${enable_acl+y}
14541then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000014542 enableval=$enable_acl;
Illia Bobyra96d5442023-08-30 16:30:15 +020014543else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000014544 enable_acl="yes"
Bram Moolenaar446cb832008-06-24 21:56:24 +000014545fi
14546
Bram Moolenaar071d4272004-06-13 20:20:40 +000014547if test "$enable_acl" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014548 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14549printf "%s\n" "no" >&6; }
14550 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for acl_get_file in -lposix1e" >&5
14551printf %s "checking for acl_get_file in -lposix1e... " >&6; }
14552if test ${ac_cv_lib_posix1e_acl_get_file+y}
14553then :
14554 printf %s "(cached) " >&6
14555else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014556 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000014557LIBS="-lposix1e $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014558cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014559/* end confdefs.h. */
14560
Bram Moolenaar446cb832008-06-24 21:56:24 +000014561/* Override any GCC internal prototype to avoid an error.
14562 Use char because int might match the return type of a GCC
14563 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014564char acl_get_file ();
14565int
Illia Bobyra96d5442023-08-30 16:30:15 +020014566main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014567{
Bram Moolenaar446cb832008-06-24 21:56:24 +000014568return acl_get_file ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014569 ;
14570 return 0;
14571}
14572_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014573if ac_fn_c_try_link "$LINENO"
14574then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014575 ac_cv_lib_posix1e_acl_get_file=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020014576else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014577 ac_cv_lib_posix1e_acl_get_file=no
Bram Moolenaar071d4272004-06-13 20:20:40 +000014578fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014579rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014580 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014581LIBS=$ac_check_lib_save_LIBS
14582fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014583{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix1e_acl_get_file" >&5
14584printf "%s\n" "$ac_cv_lib_posix1e_acl_get_file" >&6; }
14585if test "x$ac_cv_lib_posix1e_acl_get_file" = xyes
14586then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000014587 LIBS="$LIBS -lposix1e"
Illia Bobyra96d5442023-08-30 16:30:15 +020014588else $as_nop
14589 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for acl_get_file in -lacl" >&5
14590printf %s "checking for acl_get_file in -lacl... " >&6; }
14591if test ${ac_cv_lib_acl_acl_get_file+y}
14592then :
14593 printf %s "(cached) " >&6
14594else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014595 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000014596LIBS="-lacl $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014597cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014598/* end confdefs.h. */
14599
Bram Moolenaar446cb832008-06-24 21:56:24 +000014600/* Override any GCC internal prototype to avoid an error.
14601 Use char because int might match the return type of a GCC
14602 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014603char acl_get_file ();
14604int
Illia Bobyra96d5442023-08-30 16:30:15 +020014605main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014606{
Bram Moolenaar446cb832008-06-24 21:56:24 +000014607return acl_get_file ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014608 ;
14609 return 0;
14610}
14611_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014612if ac_fn_c_try_link "$LINENO"
14613then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014614 ac_cv_lib_acl_acl_get_file=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020014615else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014616 ac_cv_lib_acl_acl_get_file=no
Bram Moolenaar071d4272004-06-13 20:20:40 +000014617fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014618rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014619 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014620LIBS=$ac_check_lib_save_LIBS
14621fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014622{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_acl_acl_get_file" >&5
14623printf "%s\n" "$ac_cv_lib_acl_acl_get_file" >&6; }
14624if test "x$ac_cv_lib_acl_acl_get_file" = xyes
14625then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000014626 LIBS="$LIBS -lacl"
Illia Bobyra96d5442023-08-30 16:30:15 +020014627 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgetxattr in -lattr" >&5
14628printf %s "checking for fgetxattr in -lattr... " >&6; }
14629if test ${ac_cv_lib_attr_fgetxattr+y}
14630then :
14631 printf %s "(cached) " >&6
14632else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014633 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000014634LIBS="-lattr $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014635cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014636/* end confdefs.h. */
14637
Bram Moolenaar446cb832008-06-24 21:56:24 +000014638/* Override any GCC internal prototype to avoid an error.
14639 Use char because int might match the return type of a GCC
14640 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014641char fgetxattr ();
14642int
Illia Bobyra96d5442023-08-30 16:30:15 +020014643main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014644{
Bram Moolenaar446cb832008-06-24 21:56:24 +000014645return fgetxattr ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014646 ;
14647 return 0;
14648}
14649_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014650if ac_fn_c_try_link "$LINENO"
14651then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014652 ac_cv_lib_attr_fgetxattr=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020014653else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014654 ac_cv_lib_attr_fgetxattr=no
Bram Moolenaar071d4272004-06-13 20:20:40 +000014655fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014656rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014657 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014658LIBS=$ac_check_lib_save_LIBS
14659fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014660{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_attr_fgetxattr" >&5
14661printf "%s\n" "$ac_cv_lib_attr_fgetxattr" >&6; }
14662if test "x$ac_cv_lib_attr_fgetxattr" = xyes
14663then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000014664 LIBS="$LIBS -lattr"
Bram Moolenaar071d4272004-06-13 20:20:40 +000014665fi
14666
Bram Moolenaar071d4272004-06-13 20:20:40 +000014667fi
14668
14669fi
14670
14671
Illia Bobyra96d5442023-08-30 16:30:15 +020014672 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for POSIX ACL support" >&5
14673printf %s "checking for POSIX ACL support... " >&6; }
Bram Moolenaard6d30422018-01-28 22:48:55 +010014674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014675/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000014676
14677#include <sys/types.h>
14678#ifdef HAVE_SYS_ACL_H
14679# include <sys/acl.h>
14680#endif
14681acl_t acl;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014682int
Illia Bobyra96d5442023-08-30 16:30:15 +020014683main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014684{
Bram Moolenaar071d4272004-06-13 20:20:40 +000014685acl = acl_get_file("foo", ACL_TYPE_ACCESS);
14686 acl_set_file("foo", ACL_TYPE_ACCESS, acl);
14687 acl_free(acl);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014688 ;
14689 return 0;
14690}
14691_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014692if ac_fn_c_try_link "$LINENO"
14693then :
14694 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14695printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_POSIX_ACL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000014696
Illia Bobyra96d5442023-08-30 16:30:15 +020014697else $as_nop
14698 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14699printf "%s\n" "no" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014700fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014701rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014702 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000014703
Illia Bobyra96d5442023-08-30 16:30:15 +020014704 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for acl_get in -lsec" >&5
14705printf %s "checking for acl_get in -lsec... " >&6; }
14706if test ${ac_cv_lib_sec_acl_get+y}
14707then :
14708 printf %s "(cached) " >&6
14709else $as_nop
Bram Moolenaar8d462f92012-02-05 22:51:33 +010014710 ac_check_lib_save_LIBS=$LIBS
14711LIBS="-lsec $LIBS"
14712cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14713/* end confdefs.h. */
14714
14715/* Override any GCC internal prototype to avoid an error.
14716 Use char because int might match the return type of a GCC
14717 builtin and then its argument prototype would still apply. */
Bram Moolenaar8d462f92012-02-05 22:51:33 +010014718char acl_get ();
14719int
Illia Bobyra96d5442023-08-30 16:30:15 +020014720main (void)
Bram Moolenaar8d462f92012-02-05 22:51:33 +010014721{
14722return acl_get ();
14723 ;
14724 return 0;
14725}
14726_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014727if ac_fn_c_try_link "$LINENO"
14728then :
Bram Moolenaar8d462f92012-02-05 22:51:33 +010014729 ac_cv_lib_sec_acl_get=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020014730else $as_nop
Bram Moolenaar8d462f92012-02-05 22:51:33 +010014731 ac_cv_lib_sec_acl_get=no
14732fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014733rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar8d462f92012-02-05 22:51:33 +010014734 conftest$ac_exeext conftest.$ac_ext
14735LIBS=$ac_check_lib_save_LIBS
14736fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014737{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sec_acl_get" >&5
14738printf "%s\n" "$ac_cv_lib_sec_acl_get" >&6; }
14739if test "x$ac_cv_lib_sec_acl_get" = xyes
14740then :
14741 LIBS="$LIBS -lsec"; printf "%s\n" "#define HAVE_SOLARIS_ZFS_ACL 1" >>confdefs.h
Bram Moolenaar8d462f92012-02-05 22:51:33 +010014742
Illia Bobyra96d5442023-08-30 16:30:15 +020014743else $as_nop
14744 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Solaris ACL support" >&5
14745printf %s "checking for Solaris ACL support... " >&6; }
Bram Moolenaard6d30422018-01-28 22:48:55 +010014746 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014747/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000014748
14749#ifdef HAVE_SYS_ACL_H
14750# include <sys/acl.h>
14751#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014752int
Illia Bobyra96d5442023-08-30 16:30:15 +020014753main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014754{
Bram Moolenaar071d4272004-06-13 20:20:40 +000014755acl("foo", GETACLCNT, 0, NULL);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014756
14757 ;
14758 return 0;
14759}
14760_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014761if ac_fn_c_try_link "$LINENO"
14762then :
14763 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14764printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SOLARIS_ACL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000014765
Illia Bobyra96d5442023-08-30 16:30:15 +020014766else $as_nop
14767 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14768printf "%s\n" "no" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014769fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014770rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014771 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar8d462f92012-02-05 22:51:33 +010014772fi
14773
Bram Moolenaar446cb832008-06-24 21:56:24 +000014774
Illia Bobyra96d5442023-08-30 16:30:15 +020014775 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for AIX ACL support" >&5
14776printf %s "checking for AIX ACL support... " >&6; }
Bram Moolenaard6d30422018-01-28 22:48:55 +010014777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014778/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000014779
Bram Moolenaar446cb832008-06-24 21:56:24 +000014780#if STDC_HEADERS
14781# include <stdlib.h>
14782# include <stddef.h>
14783#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000014784#ifdef HAVE_SYS_ACL_H
14785# include <sys/acl.h>
14786#endif
14787#ifdef HAVE_SYS_ACCESS_H
14788# include <sys/access.h>
14789#endif
14790#define _ALL_SOURCE
14791
14792#include <sys/stat.h>
14793
14794int aclsize;
14795struct acl *aclent;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014796int
Illia Bobyra96d5442023-08-30 16:30:15 +020014797main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014798{
Bram Moolenaar071d4272004-06-13 20:20:40 +000014799aclsize = sizeof(struct acl);
14800 aclent = (void *)malloc(aclsize);
14801 statacl("foo", STX_NORMAL, aclent, aclsize);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014802
14803 ;
14804 return 0;
14805}
14806_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014807if ac_fn_c_try_link "$LINENO"
14808then :
14809 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14810printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_AIX_ACL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000014811
Illia Bobyra96d5442023-08-30 16:30:15 +020014812else $as_nop
14813 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14814printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000014815fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014816rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014817 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000014818else
Illia Bobyra96d5442023-08-30 16:30:15 +020014819 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14820printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000014821fi
14822
Bram Moolenaar3cbe0c02015-09-08 20:00:22 +020014823if test "x$GTK_CFLAGS" != "x"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014824 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pango_shape_full" >&5
14825printf %s "checking for pango_shape_full... " >&6; }
Bram Moolenaar3cbe0c02015-09-08 20:00:22 +020014826 ac_save_CFLAGS="$CFLAGS"
14827 ac_save_LIBS="$LIBS"
14828 CFLAGS="$CFLAGS $GTK_CFLAGS"
14829 LIBS="$LIBS $GTK_LIBS"
14830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14831/* end confdefs.h. */
14832#include <gtk/gtk.h>
14833int
Illia Bobyra96d5442023-08-30 16:30:15 +020014834main (void)
Bram Moolenaar3cbe0c02015-09-08 20:00:22 +020014835{
14836 pango_shape_full(NULL, 0, NULL, 0, NULL, NULL);
14837 ;
14838 return 0;
14839}
14840_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014841if ac_fn_c_try_link "$LINENO"
14842then :
14843 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14844printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_PANGO_SHAPE_FULL 1" >>confdefs.h
Bram Moolenaar3cbe0c02015-09-08 20:00:22 +020014845
Illia Bobyra96d5442023-08-30 16:30:15 +020014846else $as_nop
14847 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14848printf "%s\n" "no" >&6; }
Bram Moolenaar3cbe0c02015-09-08 20:00:22 +020014849fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014850rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar5325b9b2015-09-09 20:27:02 +020014851 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar3cbe0c02015-09-08 20:00:22 +020014852 CFLAGS="$ac_save_CFLAGS"
14853 LIBS="$ac_save_LIBS"
14854fi
14855
Illia Bobyra96d5442023-08-30 16:30:15 +020014856{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-gpm argument" >&5
14857printf %s "checking --enable-gpm argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000014858# Check whether --enable-gpm was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020014859if test ${enable_gpm+y}
14860then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000014861 enableval=$enable_gpm;
Illia Bobyra96d5442023-08-30 16:30:15 +020014862else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000014863 enable_gpm="yes"
Bram Moolenaar446cb832008-06-24 21:56:24 +000014864fi
14865
Bram Moolenaar071d4272004-06-13 20:20:40 +000014866
Bram Moolenaar0b40d082022-03-08 13:32:37 +000014867if test "$enable_gpm" = "yes" -o "$enable_gpm" = "dynamic"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014868 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_gpm" >&5
14869printf "%s\n" "$enable_gpm" >&6; }
14870 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gpm" >&5
14871printf %s "checking for gpm... " >&6; }
14872if test ${vi_cv_have_gpm+y}
14873then :
14874 printf %s "(cached) " >&6
14875else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000014876 olibs="$LIBS" ; LIBS="-lgpm"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014878/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000014879#include <gpm.h>
14880 #include <linux/keyboard.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014881int
Illia Bobyra96d5442023-08-30 16:30:15 +020014882main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014883{
Bram Moolenaar071d4272004-06-13 20:20:40 +000014884Gpm_GetLibVersion(NULL);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014885 ;
14886 return 0;
14887}
14888_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014889if ac_fn_c_try_link "$LINENO"
14890then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000014891 vi_cv_have_gpm=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020014892else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014893 vi_cv_have_gpm=no
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014894fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014895rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014896 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014897 LIBS="$olibs"
14898
14899fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014900{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_have_gpm" >&5
14901printf "%s\n" "$vi_cv_have_gpm" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000014902 if test $vi_cv_have_gpm = yes; then
Bram Moolenaar0b40d082022-03-08 13:32:37 +000014903 if test "$enable_gpm" = "yes"; then
14904 LIBS="$LIBS -lgpm"
14905 else
Illia Bobyra96d5442023-08-30 16:30:15 +020014906 printf "%s\n" "#define DYNAMIC_GPM 1" >>confdefs.h
Bram Moolenaar0b40d082022-03-08 13:32:37 +000014907
14908 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014909 printf "%s\n" "#define HAVE_GPM 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000014910
14911 fi
14912else
Illia Bobyra96d5442023-08-30 16:30:15 +020014913 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14914printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000014915fi
14916
Illia Bobyra96d5442023-08-30 16:30:15 +020014917{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-sysmouse argument" >&5
14918printf %s "checking --disable-sysmouse argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000014919# Check whether --enable-sysmouse was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020014920if test ${enable_sysmouse+y}
14921then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000014922 enableval=$enable_sysmouse;
Illia Bobyra96d5442023-08-30 16:30:15 +020014923else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000014924 enable_sysmouse="yes"
14925fi
14926
14927
14928if test "$enable_sysmouse" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014929 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14930printf "%s\n" "no" >&6; }
14931 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysmouse" >&5
14932printf %s "checking for sysmouse... " >&6; }
14933if test ${vi_cv_have_sysmouse+y}
14934then :
14935 printf %s "(cached) " >&6
14936else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000014938/* end confdefs.h. */
14939#include <sys/consio.h>
14940 #include <signal.h>
14941 #include <sys/fbio.h>
14942int
Illia Bobyra96d5442023-08-30 16:30:15 +020014943main (void)
Bram Moolenaar446cb832008-06-24 21:56:24 +000014944{
14945struct mouse_info mouse;
14946 mouse.operation = MOUSE_MODE;
14947 mouse.operation = MOUSE_SHOW;
14948 mouse.u.mode.mode = 0;
14949 mouse.u.mode.signal = SIGUSR2;
14950 ;
14951 return 0;
14952}
14953_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014954if ac_fn_c_try_link "$LINENO"
14955then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000014956 vi_cv_have_sysmouse=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020014957else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014958 vi_cv_have_sysmouse=no
Bram Moolenaar446cb832008-06-24 21:56:24 +000014959fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014960rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014961 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000014962
14963fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014964{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_have_sysmouse" >&5
14965printf "%s\n" "$vi_cv_have_sysmouse" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000014966 if test $vi_cv_have_sysmouse = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014967 printf "%s\n" "#define HAVE_SYSMOUSE 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000014968
14969 fi
14970else
Illia Bobyra96d5442023-08-30 16:30:15 +020014971 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14972printf "%s\n" "yes" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000014973fi
14974
Illia Bobyra96d5442023-08-30 16:30:15 +020014975{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FD_CLOEXEC" >&5
14976printf %s "checking for FD_CLOEXEC... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014977cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarf05da212009-11-17 16:13:15 +000014978/* end confdefs.h. */
14979#if HAVE_FCNTL_H
14980# include <fcntl.h>
14981#endif
14982int
Illia Bobyra96d5442023-08-30 16:30:15 +020014983main (void)
Bram Moolenaarf05da212009-11-17 16:13:15 +000014984{
14985 int flag = FD_CLOEXEC;
14986 ;
14987 return 0;
14988}
14989_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014990if ac_fn_c_try_compile "$LINENO"
14991then :
14992 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14993printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_FD_CLOEXEC 1" >>confdefs.h
Bram Moolenaarf05da212009-11-17 16:13:15 +000014994
Illia Bobyra96d5442023-08-30 16:30:15 +020014995else $as_nop
14996 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
14997printf "%s\n" "not usable" >&6; }
Bram Moolenaarf05da212009-11-17 16:13:15 +000014998fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014999rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaarf05da212009-11-17 16:13:15 +000015000
Illia Bobyra96d5442023-08-30 16:30:15 +020015001{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for rename" >&5
15002printf %s "checking for rename... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015003cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015004/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015005#include <stdio.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015006int
Illia Bobyra96d5442023-08-30 16:30:15 +020015007main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015008{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015009rename("this", "that")
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015010 ;
15011 return 0;
15012}
15013_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015014if ac_fn_c_try_link "$LINENO"
15015then :
15016 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15017printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_RENAME 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015018
Illia Bobyra96d5442023-08-30 16:30:15 +020015019else $as_nop
15020 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15021printf "%s\n" "no" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015022fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015023rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015024 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015025
Illia Bobyra96d5442023-08-30 16:30:15 +020015026{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dirfd" >&5
15027printf %s "checking for dirfd... " >&6; }
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015028cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15029/* end confdefs.h. */
15030#include <sys/types.h>
15031#include <dirent.h>
15032int
Illia Bobyra96d5442023-08-30 16:30:15 +020015033main (void)
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015034{
15035DIR * dir=opendir("dirname"); dirfd(dir);
15036 ;
15037 return 0;
15038}
15039_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015040if ac_fn_c_try_link "$LINENO"
15041then :
15042 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15043printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_DIRFD 1" >>confdefs.h
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015044
Illia Bobyra96d5442023-08-30 16:30:15 +020015045else $as_nop
15046 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15047printf "%s\n" "not usable" >&6; }
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015048fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015049rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar9d8bfae2020-09-02 21:21:35 +020015050 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015051
Illia Bobyra96d5442023-08-30 16:30:15 +020015052{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for flock" >&5
15053printf %s "checking for flock... " >&6; }
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015054cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15055/* end confdefs.h. */
15056#include <sys/file.h>
15057int
Illia Bobyra96d5442023-08-30 16:30:15 +020015058main (void)
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015059{
15060flock(10, LOCK_SH);
15061 ;
15062 return 0;
15063}
15064_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015065if ac_fn_c_try_link "$LINENO"
15066then :
15067 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15068printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_FLOCK 1" >>confdefs.h
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015069
Illia Bobyra96d5442023-08-30 16:30:15 +020015070else $as_nop
15071 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15072printf "%s\n" "not usable" >&6; }
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015073fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015074rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar9d8bfae2020-09-02 21:21:35 +020015075 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015076
Illia Bobyra96d5442023-08-30 16:30:15 +020015077{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysctl" >&5
15078printf %s "checking for sysctl... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015079cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015080/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015081#include <sys/types.h>
15082#include <sys/sysctl.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015083int
Illia Bobyra96d5442023-08-30 16:30:15 +020015084main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015085{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015086 int mib[2], r;
15087 size_t len;
15088
15089 mib[0] = CTL_HW;
15090 mib[1] = HW_USERMEM;
15091 len = sizeof(r);
15092 (void)sysctl(mib, 2, &r, &len, (void *)0, (size_t)0);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015093
15094 ;
15095 return 0;
15096}
15097_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015098if ac_fn_c_try_compile "$LINENO"
15099then :
15100 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15101printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SYSCTL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015102
Illia Bobyra96d5442023-08-30 16:30:15 +020015103else $as_nop
15104 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15105printf "%s\n" "not usable" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015106fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015107rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015108
Illia Bobyra96d5442023-08-30 16:30:15 +020015109{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysinfo" >&5
15110printf %s "checking for sysinfo... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015111cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015112/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015113#include <sys/types.h>
15114#include <sys/sysinfo.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015115int
Illia Bobyra96d5442023-08-30 16:30:15 +020015116main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015117{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015118 struct sysinfo sinfo;
15119 int t;
15120
15121 (void)sysinfo(&sinfo);
15122 t = sinfo.totalram;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015123
15124 ;
15125 return 0;
15126}
15127_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015128if ac_fn_c_try_link "$LINENO"
15129then :
15130 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15131printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SYSINFO 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015132
Illia Bobyra96d5442023-08-30 16:30:15 +020015133else $as_nop
15134 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15135printf "%s\n" "not usable" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015136fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015137rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaare2982d62021-10-06 11:27:21 +010015138 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015139
Illia Bobyra96d5442023-08-30 16:30:15 +020015140{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysinfo.mem_unit" >&5
15141printf %s "checking for sysinfo.mem_unit... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015142cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar914572a2007-05-01 11:37:47 +000015143/* end confdefs.h. */
15144#include <sys/types.h>
15145#include <sys/sysinfo.h>
15146int
Illia Bobyra96d5442023-08-30 16:30:15 +020015147main (void)
Bram Moolenaar914572a2007-05-01 11:37:47 +000015148{
15149 struct sysinfo sinfo;
Bram Moolenaar3c7ad012013-06-11 19:53:45 +020015150 sinfo.mem_unit = 1;
Bram Moolenaar914572a2007-05-01 11:37:47 +000015151
15152 ;
15153 return 0;
15154}
15155_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015156if ac_fn_c_try_compile "$LINENO"
15157then :
15158 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15159printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SYSINFO_MEM_UNIT 1" >>confdefs.h
Bram Moolenaar914572a2007-05-01 11:37:47 +000015160
Illia Bobyra96d5442023-08-30 16:30:15 +020015161else $as_nop
15162 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15163printf "%s\n" "no" >&6; }
Bram Moolenaar914572a2007-05-01 11:37:47 +000015164fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015165rm -f core conftest.err conftest.$ac_objext conftest.beam 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.uptime" >&5
15168printf %s "checking for sysinfo.uptime... " >&6; }
Bram Moolenaarf52f0602021-03-10 21:26:37 +010015169cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15170/* end confdefs.h. */
15171#include <sys/types.h>
15172#include <sys/sysinfo.h>
15173int
Illia Bobyra96d5442023-08-30 16:30:15 +020015174main (void)
Bram Moolenaarf52f0602021-03-10 21:26:37 +010015175{
15176 struct sysinfo sinfo;
15177 long ut;
15178
15179 (void)sysinfo(&sinfo);
15180 ut = sinfo.uptime;
15181
15182 ;
15183 return 0;
15184}
15185_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015186if ac_fn_c_try_compile "$LINENO"
15187then :
15188 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15189printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SYSINFO_UPTIME 1" >>confdefs.h
Bram Moolenaarf52f0602021-03-10 21:26:37 +010015190
Illia Bobyra96d5442023-08-30 16:30:15 +020015191else $as_nop
15192 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15193printf "%s\n" "no" >&6; }
Bram Moolenaarf52f0602021-03-10 21:26:37 +010015194fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015195rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaarf52f0602021-03-10 21:26:37 +010015196
Illia Bobyra96d5442023-08-30 16:30:15 +020015197{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysconf" >&5
15198printf %s "checking for sysconf... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015199cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015200/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015201#include <unistd.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015202int
Illia Bobyra96d5442023-08-30 16:30:15 +020015203main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015204{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015205 (void)sysconf(_SC_PAGESIZE);
15206 (void)sysconf(_SC_PHYS_PAGES);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015207
15208 ;
15209 return 0;
15210}
15211_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015212if ac_fn_c_try_compile "$LINENO"
15213then :
15214 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15215printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SYSCONF 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015216
Illia Bobyra96d5442023-08-30 16:30:15 +020015217else $as_nop
15218 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15219printf "%s\n" "not usable" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015220fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015221rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000015222
Illia Bobyra96d5442023-08-30 16:30:15 +020015223{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _SC_SIGSTKSZ via sysconf()" >&5
15224printf %s "checking for _SC_SIGSTKSZ via sysconf()... " >&6; }
Bram Moolenaar0e62a672021-02-25 17:17:56 +010015225cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15226/* end confdefs.h. */
15227#include <unistd.h>
15228int
Illia Bobyra96d5442023-08-30 16:30:15 +020015229main (void)
Bram Moolenaar0e62a672021-02-25 17:17:56 +010015230{
15231 (void)sysconf(_SC_SIGSTKSZ);
15232
15233 ;
15234 return 0;
15235}
15236_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015237if ac_fn_c_try_compile "$LINENO"
15238then :
15239 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15240printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SYSCONF_SIGSTKSZ 1" >>confdefs.h
Bram Moolenaar0e62a672021-02-25 17:17:56 +010015241
Illia Bobyra96d5442023-08-30 16:30:15 +020015242else $as_nop
15243 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15244printf "%s\n" "not usable" >&6; }
Bram Moolenaar0e62a672021-02-25 17:17:56 +010015245fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015246rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0e62a672021-02-25 17:17:56 +010015247
Bram Moolenaar914703b2010-05-31 21:59:46 +020015248# The cast to long int works around a bug in the HP C Compiler
15249# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15250# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15251# This bug is HP SR number 8606223364.
Illia Bobyra96d5442023-08-30 16:30:15 +020015252{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
15253printf %s "checking size of int... " >&6; }
15254if test ${ac_cv_sizeof_int+y}
15255then :
15256 printf %s "(cached) " >&6
15257else $as_nop
15258 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"
15259then :
Bram Moolenaar914703b2010-05-31 21:59:46 +020015260
Illia Bobyra96d5442023-08-30 16:30:15 +020015261else $as_nop
Bram Moolenaar914703b2010-05-31 21:59:46 +020015262 if test "$ac_cv_type_int" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015263 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15264printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +010015265as_fn_error 77 "cannot compute sizeof (int)
15266See \`config.log' for more details" "$LINENO" 5; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020015267 else
15268 ac_cv_sizeof_int=0
15269 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000015270fi
15271
Bram Moolenaar446cb832008-06-24 21:56:24 +000015272fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015273{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
15274printf "%s\n" "$ac_cv_sizeof_int" >&6; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020015275
15276
15277
Illia Bobyra96d5442023-08-30 16:30:15 +020015278printf "%s\n" "#define SIZEOF_INT $ac_cv_sizeof_int" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015279
15280
Bram Moolenaar914703b2010-05-31 21:59:46 +020015281# The cast to long int works around a bug in the HP C Compiler
15282# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15283# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15284# This bug is HP SR number 8606223364.
Illia Bobyra96d5442023-08-30 16:30:15 +020015285{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
15286printf %s "checking size of long... " >&6; }
15287if test ${ac_cv_sizeof_long+y}
15288then :
15289 printf %s "(cached) " >&6
15290else $as_nop
15291 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"
15292then :
Bram Moolenaar914703b2010-05-31 21:59:46 +020015293
Illia Bobyra96d5442023-08-30 16:30:15 +020015294else $as_nop
Bram Moolenaar914703b2010-05-31 21:59:46 +020015295 if test "$ac_cv_type_long" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015296 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15297printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +010015298as_fn_error 77 "cannot compute sizeof (long)
15299See \`config.log' for more details" "$LINENO" 5; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020015300 else
15301 ac_cv_sizeof_long=0
15302 fi
15303fi
15304
15305fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015306{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
15307printf "%s\n" "$ac_cv_sizeof_long" >&6; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020015308
15309
15310
Illia Bobyra96d5442023-08-30 16:30:15 +020015311printf "%s\n" "#define SIZEOF_LONG $ac_cv_sizeof_long" >>confdefs.h
Bram Moolenaar914703b2010-05-31 21:59:46 +020015312
15313
15314# The cast to long int works around a bug in the HP C Compiler
15315# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15316# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15317# This bug is HP SR number 8606223364.
Illia Bobyra96d5442023-08-30 16:30:15 +020015318{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
15319printf %s "checking size of time_t... " >&6; }
15320if test ${ac_cv_sizeof_time_t+y}
15321then :
15322 printf %s "(cached) " >&6
15323else $as_nop
15324 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "$ac_includes_default"
15325then :
Bram Moolenaar914703b2010-05-31 21:59:46 +020015326
Illia Bobyra96d5442023-08-30 16:30:15 +020015327else $as_nop
Bram Moolenaar914703b2010-05-31 21:59:46 +020015328 if test "$ac_cv_type_time_t" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015329 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15330printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +010015331as_fn_error 77 "cannot compute sizeof (time_t)
15332See \`config.log' for more details" "$LINENO" 5; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020015333 else
15334 ac_cv_sizeof_time_t=0
15335 fi
Bram Moolenaar644fdff2010-05-30 13:26:21 +020015336fi
15337
15338fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015339{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
15340printf "%s\n" "$ac_cv_sizeof_time_t" >&6; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020015341
15342
15343
Illia Bobyra96d5442023-08-30 16:30:15 +020015344printf "%s\n" "#define SIZEOF_TIME_T $ac_cv_sizeof_time_t" >>confdefs.h
Bram Moolenaar644fdff2010-05-30 13:26:21 +020015345
15346
Bram Moolenaar914703b2010-05-31 21:59:46 +020015347# The cast to long int works around a bug in the HP C Compiler
15348# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15349# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15350# This bug is HP SR number 8606223364.
Illia Bobyra96d5442023-08-30 16:30:15 +020015351{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
15352printf %s "checking size of off_t... " >&6; }
15353if test ${ac_cv_sizeof_off_t+y}
15354then :
15355 printf %s "(cached) " >&6
15356else $as_nop
15357 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default"
15358then :
Bram Moolenaar914703b2010-05-31 21:59:46 +020015359
Illia Bobyra96d5442023-08-30 16:30:15 +020015360else $as_nop
Bram Moolenaar914703b2010-05-31 21:59:46 +020015361 if test "$ac_cv_type_off_t" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015362 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15363printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +010015364as_fn_error 77 "cannot compute sizeof (off_t)
15365See \`config.log' for more details" "$LINENO" 5; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020015366 else
15367 ac_cv_sizeof_off_t=0
15368 fi
15369fi
15370
15371fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015372{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
15373printf "%s\n" "$ac_cv_sizeof_off_t" >&6; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020015374
15375
15376
Illia Bobyra96d5442023-08-30 16:30:15 +020015377printf "%s\n" "#define SIZEOF_OFF_T $ac_cv_sizeof_off_t" >>confdefs.h
Bram Moolenaar914703b2010-05-31 21:59:46 +020015378
15379
15380
Illia Bobyra96d5442023-08-30 16:30:15 +020015381printf "%s\n" "#define VIM_SIZEOF_INT $ac_cv_sizeof_int" >>confdefs.h
Bram Moolenaara2aa31a2014-02-23 22:52:40 +010015382
Illia Bobyra96d5442023-08-30 16:30:15 +020015383printf "%s\n" "#define VIM_SIZEOF_LONG $ac_cv_sizeof_long" >>confdefs.h
Bram Moolenaara2aa31a2014-02-23 22:52:40 +010015384
15385
Illia Bobyra96d5442023-08-30 16:30:15 +020015386{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking uint32_t is 32 bits" >&5
15387printf %s "checking uint32_t is 32 bits... " >&6; }
15388if test "$cross_compiling" = yes
15389then :
15390 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check uint32_t when cross-compiling." >&5
15391printf "%s\n" "$as_me: WARNING: cannot check uint32_t when cross-compiling." >&2;}
15392else $as_nop
Bram Moolenaarfa7584c2010-05-19 21:57:45 +020015393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15394/* end confdefs.h. */
15395
15396#ifdef HAVE_STDINT_H
15397# include <stdint.h>
15398#endif
15399#ifdef HAVE_INTTYPES_H
15400# include <inttypes.h>
15401#endif
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010015402int main() {
Bram Moolenaarfa7584c2010-05-19 21:57:45 +020015403 uint32_t nr1 = (uint32_t)-1;
15404 uint32_t nr2 = (uint32_t)0xffffffffUL;
Bram Moolenaar52897832020-07-02 22:50:37 +020015405 if (sizeof(uint32_t) != 4 || nr1 != 0xffffffffUL || nr2 + 1 != 0) return 1;
15406 return 0;
Bram Moolenaarfa7584c2010-05-19 21:57:45 +020015407}
15408_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015409if ac_fn_c_try_run "$LINENO"
15410then :
15411 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15412printf "%s\n" "ok" >&6; }
15413else $as_nop
Bram Moolenaar7db77842014-03-27 17:40:59 +010015414 as_fn_error $? "WRONG! uint32_t not defined correctly." "$LINENO" 5
Bram Moolenaarfa7584c2010-05-19 21:57:45 +020015415fi
15416rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15417 conftest.$ac_objext conftest.beam conftest.$ac_ext
15418fi
15419
15420
Bram Moolenaar446cb832008-06-24 21:56:24 +000015421
Bram Moolenaar071d4272004-06-13 20:20:40 +000015422bcopy_test_prog='
Bram Moolenaar446cb832008-06-24 21:56:24 +000015423#include "confdefs.h"
15424#ifdef HAVE_STRING_H
15425# include <string.h>
15426#endif
15427#if STDC_HEADERS
15428# include <stdlib.h>
15429# include <stddef.h>
15430#endif
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010015431int main() {
Bram Moolenaar071d4272004-06-13 20:20:40 +000015432 char buf[10];
15433 strcpy(buf, "abcdefghi");
15434 mch_memmove(buf, buf + 2, 3);
15435 if (strncmp(buf, "ababcf", 6))
15436 exit(1);
15437 strcpy(buf, "abcdefghi");
15438 mch_memmove(buf + 2, buf, 3);
15439 if (strncmp(buf, "cdedef", 6))
15440 exit(1);
15441 exit(0); /* libc version works properly. */
15442}'
15443
Illia Bobyra96d5442023-08-30 16:30:15 +020015444{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether memmove handles overlaps" >&5
15445printf %s "checking whether memmove handles overlaps... " >&6; }
15446if test ${vim_cv_memmove_handles_overlap+y}
15447then :
15448 printf %s "(cached) " >&6
15449else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000015450
Illia Bobyra96d5442023-08-30 16:30:15 +020015451 if test "$cross_compiling" = yes
15452then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015453
Bram Moolenaar7db77842014-03-27 17:40:59 +010015454 as_fn_error $? "cross-compiling: please set 'vim_cv_memmove_handles_overlap'" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000015455
Illia Bobyra96d5442023-08-30 16:30:15 +020015456else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15458/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015459#define mch_memmove(s,d,l) memmove(d,s,l) $bcopy_test_prog
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015460_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015461if ac_fn_c_try_run "$LINENO"
15462then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015463
15464 vim_cv_memmove_handles_overlap=yes
15465
Illia Bobyra96d5442023-08-30 16:30:15 +020015466else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000015467
15468 vim_cv_memmove_handles_overlap=no
15469
15470fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015471rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15472 conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015473fi
15474
15475
Bram Moolenaar446cb832008-06-24 21:56:24 +000015476fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015477{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_memmove_handles_overlap" >&5
15478printf "%s\n" "$vim_cv_memmove_handles_overlap" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000015479
15480if test "x$vim_cv_memmove_handles_overlap" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015481 printf "%s\n" "#define USEMEMMOVE 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000015482
Bram Moolenaar071d4272004-06-13 20:20:40 +000015483else
Illia Bobyra96d5442023-08-30 16:30:15 +020015484 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether bcopy handles overlaps" >&5
15485printf %s "checking whether bcopy handles overlaps... " >&6; }
15486if test ${vim_cv_bcopy_handles_overlap+y}
15487then :
15488 printf %s "(cached) " >&6
15489else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000015490
Illia Bobyra96d5442023-08-30 16:30:15 +020015491 if test "$cross_compiling" = yes
15492then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015493
Bram Moolenaar7db77842014-03-27 17:40:59 +010015494 as_fn_error $? "cross-compiling: please set 'vim_cv_bcopy_handles_overlap'" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000015495
Illia Bobyra96d5442023-08-30 16:30:15 +020015496else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15498/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000015499#define mch_bcopy(s,d,l) bcopy(d,s,l) $bcopy_test_prog
15500_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015501if ac_fn_c_try_run "$LINENO"
15502then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015503
15504 vim_cv_bcopy_handles_overlap=yes
15505
Illia Bobyra96d5442023-08-30 16:30:15 +020015506else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000015507
15508 vim_cv_bcopy_handles_overlap=no
15509
15510fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015511rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15512 conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015513fi
15514
15515
Bram Moolenaar446cb832008-06-24 21:56:24 +000015516fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015517{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_bcopy_handles_overlap" >&5
15518printf "%s\n" "$vim_cv_bcopy_handles_overlap" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000015519
15520 if test "x$vim_cv_bcopy_handles_overlap" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015521 printf "%s\n" "#define USEBCOPY 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015522
Bram Moolenaar446cb832008-06-24 21:56:24 +000015523 else
Illia Bobyra96d5442023-08-30 16:30:15 +020015524 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether memcpy handles overlaps" >&5
15525printf %s "checking whether memcpy handles overlaps... " >&6; }
15526if test ${vim_cv_memcpy_handles_overlap+y}
15527then :
15528 printf %s "(cached) " >&6
15529else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000015530
Illia Bobyra96d5442023-08-30 16:30:15 +020015531 if test "$cross_compiling" = yes
15532then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015533
Bram Moolenaar7db77842014-03-27 17:40:59 +010015534 as_fn_error $? "cross-compiling: please set 'vim_cv_memcpy_handles_overlap'" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000015535
Illia Bobyra96d5442023-08-30 16:30:15 +020015536else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15538/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000015539#define mch_memcpy(s,d,l) memcpy(d,s,l) $bcopy_test_prog
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015540_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015541if ac_fn_c_try_run "$LINENO"
15542then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015543
15544 vim_cv_memcpy_handles_overlap=yes
15545
Illia Bobyra96d5442023-08-30 16:30:15 +020015546else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000015547
15548 vim_cv_memcpy_handles_overlap=no
15549
Bram Moolenaar071d4272004-06-13 20:20:40 +000015550fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015551rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15552 conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000015553fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000015554
15555
Bram Moolenaar071d4272004-06-13 20:20:40 +000015556fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015557{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_memcpy_handles_overlap" >&5
15558printf "%s\n" "$vim_cv_memcpy_handles_overlap" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000015559
15560 if test "x$vim_cv_memcpy_handles_overlap" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015561 printf "%s\n" "#define USEMEMCPY 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000015562
15563 fi
15564 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000015565fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000015566
Bram Moolenaar071d4272004-06-13 20:20:40 +000015567
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015568if test "x$with_x" = "xyes"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000015569 cflags_save=$CFLAGS
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015570 libs_save=$LIBS
15571 LIBS="$LIBS $X_LIBS $GUI_LIB_LOC $GUI_X_LIBS $X_PRE_LIBS $X_LIB $X_EXTRA_LIBS"
15572 CFLAGS="$CFLAGS $X_CFLAGS"
15573
Illia Bobyra96d5442023-08-30 16:30:15 +020015574 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether X_LOCALE needed" >&5
15575printf %s "checking whether X_LOCALE needed... " >&6; }
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015577/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015578#include <X11/Xlocale.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015579int
Illia Bobyra96d5442023-08-30 16:30:15 +020015580main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015581{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015582
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015583 ;
15584 return 0;
15585}
15586_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015587if ac_fn_c_try_compile "$LINENO"
15588then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015590/* end confdefs.h. */
15591
Bram Moolenaar446cb832008-06-24 21:56:24 +000015592/* Override any GCC internal prototype to avoid an error.
15593 Use char because int might match the return type of a GCC
15594 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015595char _Xsetlocale ();
15596int
Illia Bobyra96d5442023-08-30 16:30:15 +020015597main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015598{
Bram Moolenaar446cb832008-06-24 21:56:24 +000015599return _Xsetlocale ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015600 ;
15601 return 0;
15602}
15603_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015604if ac_fn_c_try_link "$LINENO"
15605then :
15606 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15607printf "%s\n" "yes" >&6; }
15608 printf "%s\n" "#define X_LOCALE 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015609
Illia Bobyra96d5442023-08-30 16:30:15 +020015610else $as_nop
15611 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15612printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015613fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015614rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015615 conftest$ac_exeext conftest.$ac_ext
Illia Bobyra96d5442023-08-30 16:30:15 +020015616else $as_nop
15617 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15618printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015619fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015620rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015621
Illia Bobyra96d5442023-08-30 16:30:15 +020015622 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether Xutf8SetWMProperties() can be used" >&5
15623printf %s "checking whether Xutf8SetWMProperties() can be used... " >&6; }
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15625/* end confdefs.h. */
15626
15627/* Override any GCC internal prototype to avoid an error.
15628 Use char because int might match the return type of a GCC
15629 builtin and then its argument prototype would still apply. */
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015630char Xutf8SetWMProperties ();
15631int
Illia Bobyra96d5442023-08-30 16:30:15 +020015632main (void)
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015633{
15634return Xutf8SetWMProperties ();
15635 ;
15636 return 0;
15637}
15638_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015639if ac_fn_c_try_link "$LINENO"
15640then :
15641 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15642printf "%s\n" "yes" >&6; }
15643 printf "%s\n" "#define HAVE_XUTF8SETWMPROPERTIES 1" >>confdefs.h
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015644
Illia Bobyra96d5442023-08-30 16:30:15 +020015645else $as_nop
15646 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15647printf "%s\n" "no" >&6; }
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015648fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015649rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015650 conftest$ac_exeext conftest.$ac_ext
15651
Bram Moolenaar071d4272004-06-13 20:20:40 +000015652 CFLAGS=$cflags_save
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015653 LIBS=$libs_save
Bram Moolenaar071d4272004-06-13 20:20:40 +000015654fi
15655
Illia Bobyra96d5442023-08-30 16:30:15 +020015656{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _xpg4_setrunelocale in -lxpg4" >&5
15657printf %s "checking for _xpg4_setrunelocale in -lxpg4... " >&6; }
15658if test ${ac_cv_lib_xpg4__xpg4_setrunelocale+y}
15659then :
15660 printf %s "(cached) " >&6
15661else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015662 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000015663LIBS="-lxpg4 $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015664cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015665/* end confdefs.h. */
15666
Bram Moolenaar446cb832008-06-24 21:56:24 +000015667/* Override any GCC internal prototype to avoid an error.
15668 Use char because int might match the return type of a GCC
15669 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015670char _xpg4_setrunelocale ();
15671int
Illia Bobyra96d5442023-08-30 16:30:15 +020015672main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015673{
Bram Moolenaar446cb832008-06-24 21:56:24 +000015674return _xpg4_setrunelocale ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015675 ;
15676 return 0;
15677}
15678_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015679if ac_fn_c_try_link "$LINENO"
15680then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015681 ac_cv_lib_xpg4__xpg4_setrunelocale=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020015682else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015683 ac_cv_lib_xpg4__xpg4_setrunelocale=no
Bram Moolenaar071d4272004-06-13 20:20:40 +000015684fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015685rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015686 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015687LIBS=$ac_check_lib_save_LIBS
15688fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015689{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xpg4__xpg4_setrunelocale" >&5
15690printf "%s\n" "$ac_cv_lib_xpg4__xpg4_setrunelocale" >&6; }
15691if test "x$ac_cv_lib_xpg4__xpg4_setrunelocale" = xyes
15692then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000015693 LIBS="$LIBS -lxpg4"
Bram Moolenaar071d4272004-06-13 20:20:40 +000015694fi
15695
15696
Illia Bobyra96d5442023-08-30 16:30:15 +020015697{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to create tags" >&5
15698printf %s "checking how to create tags... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015699test -f tags && mv tags tags.save
Bram Moolenaar5897e0c2011-05-10 15:42:03 +020015700if (eval ctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then
Bram Moolenaar509ff062020-01-02 22:38:49 +010015701 TAGPRG="ctags -I INIT+,INIT2+,INIT3+,INIT4+,INIT5+ --fields=+S"
Bram Moolenaar5897e0c2011-05-10 15:42:03 +020015702elif (eval exctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then
Bram Moolenaar509ff062020-01-02 22:38:49 +010015703 TAGPRG="exctags -I INIT+,INIT2+,INIT3+,INIT4+,INIT5+ --fields=+S"
Bram Moolenaar5897e0c2011-05-10 15:42:03 +020015704elif (eval exuberant-ctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then
Bram Moolenaar509ff062020-01-02 22:38:49 +010015705 TAGPRG="exuberant-ctags -I INIT+,INIT2+,INIT3+,INIT4+,INIT5+ --fields=+S"
Bram Moolenaar071d4272004-06-13 20:20:40 +000015706else
Bram Moolenaar0c7ce772009-05-13 12:49:39 +000015707 TAGPRG="ctags"
Bram Moolenaar071d4272004-06-13 20:20:40 +000015708 (eval etags /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="etags"
15709 (eval etags -c /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="etags -c"
15710 (eval ctags /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags"
15711 (eval ctags -t /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -t"
15712 (eval ctags -ts /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -ts"
15713 (eval ctags -tvs /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -tvs"
15714 (eval ctags -i+m /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -i+m"
15715fi
15716test -f tags.save && mv tags.save tags
Illia Bobyra96d5442023-08-30 16:30:15 +020015717{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $TAGPRG" >&5
15718printf "%s\n" "$TAGPRG" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015719
Illia Bobyra96d5442023-08-30 16:30:15 +020015720{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run man with a section nr" >&5
15721printf %s "checking how to run man with a section nr... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015722MANDEF="man"
Bram Moolenaar8b131502008-02-13 09:28:19 +000015723(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 +020015724{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MANDEF" >&5
15725printf "%s\n" "$MANDEF" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015726if test "$MANDEF" = "man -s"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015727 printf "%s\n" "#define USEMAN_S 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015728
15729fi
15730
Illia Bobyra96d5442023-08-30 16:30:15 +020015731{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-nls argument" >&5
15732printf %s "checking --disable-nls argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000015733# Check whether --enable-nls was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020015734if test ${enable_nls+y}
15735then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015736 enableval=$enable_nls;
Illia Bobyra96d5442023-08-30 16:30:15 +020015737else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000015738 enable_nls="yes"
Bram Moolenaar446cb832008-06-24 21:56:24 +000015739fi
15740
Bram Moolenaar071d4272004-06-13 20:20:40 +000015741
15742if test "$enable_nls" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015743 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15744printf "%s\n" "no" >&6; }
Bram Moolenaar2389c3c2005-05-22 22:07:59 +000015745
15746 INSTALL_LANGS=install-languages
15747
15748 INSTALL_TOOL_LANGS=install-tool-languages
15749
15750
Bram Moolenaar071d4272004-06-13 20:20:40 +000015751 # Extract the first word of "msgfmt", so it can be a program name with args.
15752set dummy msgfmt; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +020015753{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15754printf %s "checking for $ac_word... " >&6; }
15755if test ${ac_cv_prog_MSGFMT+y}
15756then :
15757 printf %s "(cached) " >&6
15758else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000015759 if test -n "$MSGFMT"; then
15760 ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
15761else
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015762as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15763for as_dir in $PATH
15764do
15765 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +020015766 case $as_dir in #(((
15767 '') as_dir=./ ;;
15768 */) ;;
15769 *) as_dir=$as_dir/ ;;
15770 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015771 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +020015772 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015773 ac_cv_prog_MSGFMT="msgfmt"
Illia Bobyra96d5442023-08-30 16:30:15 +020015774 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015775 break 2
15776 fi
15777done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015778 done
Bram Moolenaar446cb832008-06-24 21:56:24 +000015779IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015780
Bram Moolenaar071d4272004-06-13 20:20:40 +000015781fi
15782fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015783MSGFMT=$ac_cv_prog_MSGFMT
Bram Moolenaar071d4272004-06-13 20:20:40 +000015784if test -n "$MSGFMT"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015785 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
15786printf "%s\n" "$MSGFMT" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015787else
Illia Bobyra96d5442023-08-30 16:30:15 +020015788 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15789printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015790fi
15791
Bram Moolenaar446cb832008-06-24 21:56:24 +000015792
Illia Bobyra96d5442023-08-30 16:30:15 +020015793 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for NLS" >&5
15794printf %s "checking for NLS... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015795 if test -f po/Makefile; then
15796 have_gettext="no"
15797 if test -n "$MSGFMT"; then
Bram Moolenaar49b6a572013-11-17 20:32:54 +010015798 olibs=$LIBS
15799 LIBS=""
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015801/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015802#include <libintl.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015803int
Illia Bobyra96d5442023-08-30 16:30:15 +020015804main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015805{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015806gettext("Test");
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015807 ;
15808 return 0;
15809}
15810_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015811if ac_fn_c_try_link "$LINENO"
15812then :
15813 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gettext() works" >&5
15814printf "%s\n" "gettext() works" >&6; }; have_gettext="yes"; LIBS=$olibs
15815else $as_nop
Bram Moolenaar49b6a572013-11-17 20:32:54 +010015816 LIBS="-lintl"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015818/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015819#include <libintl.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015820int
Illia Bobyra96d5442023-08-30 16:30:15 +020015821main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015822{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015823gettext("Test");
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015824 ;
15825 return 0;
15826}
15827_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015828if ac_fn_c_try_link "$LINENO"
15829then :
15830 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gettext() works with -lintl" >&5
15831printf "%s\n" "gettext() works with -lintl" >&6; }; have_gettext="yes";
Bram Moolenaar49b6a572013-11-17 20:32:54 +010015832 LIBS="$olibs -lintl"
Illia Bobyra96d5442023-08-30 16:30:15 +020015833else $as_nop
15834 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gettext() doesn't work" >&5
15835printf "%s\n" "gettext() doesn't work" >&6; };
Bram Moolenaar071d4272004-06-13 20:20:40 +000015836 LIBS=$olibs
15837fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015838rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015839 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000015840fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015841rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015842 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000015843 else
Illia Bobyra96d5442023-08-30 16:30:15 +020015844 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: msgfmt not found - disabled" >&5
15845printf "%s\n" "msgfmt not found - disabled" >&6; };
Bram Moolenaar071d4272004-06-13 20:20:40 +000015846 fi
Martin Tournoij7904fa42022-10-04 16:28:45 +010015847 if test $have_gettext = "yes" -a "x$features" != "xtiny"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015848 printf "%s\n" "#define HAVE_GETTEXT 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015849
15850 MAKEMO=yes
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015851
Illia Bobyra96d5442023-08-30 16:30:15 +020015852 ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset"
15853if test "x$ac_cv_func_bind_textdomain_codeset" = xyes
15854then :
15855 printf "%s\n" "#define HAVE_BIND_TEXTDOMAIN_CODESET 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015856
Bram Moolenaar071d4272004-06-13 20:20:40 +000015857fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000015858
Illia Bobyra96d5442023-08-30 16:30:15 +020015859 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _nl_msg_cat_cntr" >&5
15860printf %s "checking for _nl_msg_cat_cntr... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015862/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015863#include <libintl.h>
15864 extern int _nl_msg_cat_cntr;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015865int
Illia Bobyra96d5442023-08-30 16:30:15 +020015866main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015867{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015868++_nl_msg_cat_cntr;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015869 ;
15870 return 0;
15871}
15872_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015873if ac_fn_c_try_link "$LINENO"
15874then :
15875 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15876printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_NL_MSG_CAT_CNTR 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015877
Illia Bobyra96d5442023-08-30 16:30:15 +020015878else $as_nop
15879 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15880printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015881fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015882rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015883 conftest$ac_exeext conftest.$ac_ext
Illia Bobyra96d5442023-08-30 16:30:15 +020015884 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if msgfmt supports --desktop" >&5
15885printf %s "checking if msgfmt supports --desktop... " >&6; }
Bram Moolenaar26096cc2019-04-11 15:25:40 +020015886 MSGFMT_DESKTOP=
15887 if "$MSGFMT" --help | grep -e '--desktop' >/dev/null; then
Bram Moolenaar62a88f42019-06-07 20:44:40 +020015888 if "$MSGFMT" --version | grep '0.19.[3-7]$' >/dev/null; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015889 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: broken" >&5
15890printf "%s\n" "broken" >&6; }
Bram Moolenaar62a88f42019-06-07 20:44:40 +020015891 else
Illia Bobyra96d5442023-08-30 16:30:15 +020015892 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15893printf "%s\n" "yes" >&6; }
Bram Moolenaar62a88f42019-06-07 20:44:40 +020015894 MSGFMT_DESKTOP="gvim.desktop vim.desktop"
15895 fi
Bram Moolenaar26096cc2019-04-11 15:25:40 +020015896 else
Illia Bobyra96d5442023-08-30 16:30:15 +020015897 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15898printf "%s\n" "no" >&6; }
Bram Moolenaar26096cc2019-04-11 15:25:40 +020015899 fi
15900
Bram Moolenaar071d4272004-06-13 20:20:40 +000015901 fi
15902 else
Illia Bobyra96d5442023-08-30 16:30:15 +020015903 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no \"po/Makefile\" - disabled" >&5
15904printf "%s\n" "no \"po/Makefile\" - disabled" >&6; };
Bram Moolenaar071d4272004-06-13 20:20:40 +000015905 fi
15906else
Illia Bobyra96d5442023-08-30 16:30:15 +020015907 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15908printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015909fi
15910
Illia Bobyra96d5442023-08-30 16:30:15 +020015911ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
15912if test "x$ac_cv_header_dlfcn_h" = xyes
15913then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000015914 DLL=dlfcn.h
Illia Bobyra96d5442023-08-30 16:30:15 +020015915else $as_nop
15916 ac_fn_c_check_header_compile "$LINENO" "dl.h" "ac_cv_header_dl_h" "$ac_includes_default"
15917if test "x$ac_cv_header_dl_h" = xyes
15918then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015919 DLL=dl.h
15920fi
15921
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015922fi
15923
Bram Moolenaar071d4272004-06-13 20:20:40 +000015924if test x${DLL} = xdlfcn.h; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015925
Illia Bobyra96d5442023-08-30 16:30:15 +020015926printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015927
Illia Bobyra96d5442023-08-30 16:30:15 +020015928 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen()" >&5
15929printf %s "checking for dlopen()... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015931/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015932
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015933int
Illia Bobyra96d5442023-08-30 16:30:15 +020015934main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015935{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015936
15937 extern void* dlopen();
15938 dlopen();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015939
15940 ;
15941 return 0;
15942}
15943_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015944if ac_fn_c_try_link "$LINENO"
15945then :
15946 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15947printf "%s\n" "yes" >&6; };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015948
Illia Bobyra96d5442023-08-30 16:30:15 +020015949printf "%s\n" "#define HAVE_DLOPEN 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015950
Illia Bobyra96d5442023-08-30 16:30:15 +020015951else $as_nop
15952 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15953printf "%s\n" "no" >&6; };
15954 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen() in -ldl" >&5
15955printf %s "checking for dlopen() in -ldl... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015956 olibs=$LIBS
15957 LIBS="$LIBS -ldl"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015959/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015960
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015961int
Illia Bobyra96d5442023-08-30 16:30:15 +020015962main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015963{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015964
15965 extern void* dlopen();
15966 dlopen();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015967
15968 ;
15969 return 0;
15970}
15971_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015972if ac_fn_c_try_link "$LINENO"
15973then :
15974 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15975printf "%s\n" "yes" >&6; };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015976
Illia Bobyra96d5442023-08-30 16:30:15 +020015977printf "%s\n" "#define HAVE_DLOPEN 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015978
Illia Bobyra96d5442023-08-30 16:30:15 +020015979else $as_nop
15980 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15981printf "%s\n" "no" >&6; };
Bram Moolenaar071d4272004-06-13 20:20:40 +000015982 LIBS=$olibs
15983fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015984rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015985 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000015986fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015987rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015988 conftest$ac_exeext conftest.$ac_ext
Illia Bobyra96d5442023-08-30 16:30:15 +020015989 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlsym()" >&5
15990printf %s "checking for dlsym()... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015992/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015993
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015994int
Illia Bobyra96d5442023-08-30 16:30:15 +020015995main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015996{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015997
15998 extern void* dlsym();
15999 dlsym();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016000
16001 ;
16002 return 0;
16003}
16004_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016005if ac_fn_c_try_link "$LINENO"
16006then :
16007 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16008printf "%s\n" "yes" >&6; };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016009
Illia Bobyra96d5442023-08-30 16:30:15 +020016010printf "%s\n" "#define HAVE_DLSYM 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016011
Illia Bobyra96d5442023-08-30 16:30:15 +020016012else $as_nop
16013 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16014printf "%s\n" "no" >&6; };
16015 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlsym() in -ldl" >&5
16016printf %s "checking for dlsym() in -ldl... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000016017 olibs=$LIBS
16018 LIBS="$LIBS -ldl"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016020/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016021
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016022int
Illia Bobyra96d5442023-08-30 16:30:15 +020016023main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016024{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016025
16026 extern void* dlsym();
16027 dlsym();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016028
16029 ;
16030 return 0;
16031}
16032_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016033if ac_fn_c_try_link "$LINENO"
16034then :
16035 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16036printf "%s\n" "yes" >&6; };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016037
Illia Bobyra96d5442023-08-30 16:30:15 +020016038printf "%s\n" "#define HAVE_DLSYM 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016039
Illia Bobyra96d5442023-08-30 16:30:15 +020016040else $as_nop
16041 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16042printf "%s\n" "no" >&6; };
Bram Moolenaar071d4272004-06-13 20:20:40 +000016043 LIBS=$olibs
16044fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016045rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016046 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000016047fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016048rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016049 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000016050elif test x${DLL} = xdl.h; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016051
Illia Bobyra96d5442023-08-30 16:30:15 +020016052printf "%s\n" "#define HAVE_DL_H 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016053
Illia Bobyra96d5442023-08-30 16:30:15 +020016054 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load()" >&5
16055printf %s "checking for shl_load()... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016057/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016058
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016059int
Illia Bobyra96d5442023-08-30 16:30:15 +020016060main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016061{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016062
16063 extern void* shl_load();
16064 shl_load();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016065
16066 ;
16067 return 0;
16068}
16069_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016070if ac_fn_c_try_link "$LINENO"
16071then :
16072 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16073printf "%s\n" "yes" >&6; };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016074
Illia Bobyra96d5442023-08-30 16:30:15 +020016075printf "%s\n" "#define HAVE_SHL_LOAD 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016076
Illia Bobyra96d5442023-08-30 16:30:15 +020016077else $as_nop
16078 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16079printf "%s\n" "no" >&6; };
16080 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load() in -ldld" >&5
16081printf %s "checking for shl_load() in -ldld... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000016082 olibs=$LIBS
16083 LIBS="$LIBS -ldld"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016085/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016086
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016087int
Illia Bobyra96d5442023-08-30 16:30:15 +020016088main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016089{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016090
16091 extern void* shl_load();
16092 shl_load();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016093
16094 ;
16095 return 0;
16096}
16097_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016098if ac_fn_c_try_link "$LINENO"
16099then :
16100 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16101printf "%s\n" "yes" >&6; };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016102
Illia Bobyra96d5442023-08-30 16:30:15 +020016103printf "%s\n" "#define HAVE_SHL_LOAD 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016104
Illia Bobyra96d5442023-08-30 16:30:15 +020016105else $as_nop
16106 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16107printf "%s\n" "no" >&6; };
Bram Moolenaar071d4272004-06-13 20:20:40 +000016108 LIBS=$olibs
16109fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016110rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016111 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000016112fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016113rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016114 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000016115fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016116ac_fn_c_check_header_compile "$LINENO" "setjmp.h" "ac_cv_header_setjmp_h" "$ac_includes_default"
16117if test "x$ac_cv_header_setjmp_h" = xyes
16118then :
16119 printf "%s\n" "#define HAVE_SETJMP_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016120
16121fi
16122
Bram Moolenaar071d4272004-06-13 20:20:40 +000016123
Bram Moolenaard0573012017-10-28 21:11:06 +020016124if test "x$MACOS_X" = "xyes" -a -n "$PERL"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000016125 if echo $LIBS | grep -e '-ldl' >/dev/null; then
16126 LIBS=`echo $LIBS | sed s/-ldl//`
16127 PERL_LIBS="$PERL_LIBS -ldl"
16128 fi
16129fi
16130
Bram Moolenaard0573012017-10-28 21:11:06 +020016131if test "$MACOS_X" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016132 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need macOS frameworks" >&5
16133printf %s "checking whether we need macOS frameworks... " >&6; }
Bram Moolenaar097148e2020-08-11 21:58:20 +020016134 if test "$MACOS_X_DARWIN" = "yes"; then
Bram Moolenaard0573012017-10-28 21:11:06 +020016135 if test "$features" = "tiny"; then
16136 OS_EXTRA_SRC=`echo "$OS_EXTRA_SRC" | sed -e 's+os_macosx.m++'`
16137 OS_EXTRA_OBJ=`echo "$OS_EXTRA_OBJ" | sed -e 's+objects/os_macosx.o++'`
Illia Bobyra96d5442023-08-30 16:30:15 +020016138 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, we need CoreServices" >&5
16139printf "%s\n" "yes, we need CoreServices" >&6; }
Bram Moolenaar2be7cb72019-01-12 16:10:51 +010016140 LIBS="$LIBS -framework CoreServices"
Bram Moolenaard0573012017-10-28 21:11:06 +020016141 else
Illia Bobyra96d5442023-08-30 16:30:15 +020016142 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, we need AppKit" >&5
16143printf "%s\n" "yes, we need AppKit" >&6; }
Bram Moolenaard0573012017-10-28 21:11:06 +020016144 LIBS="$LIBS -framework AppKit"
Bram Moolenaard0573012017-10-28 21:11:06 +020016145 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000016146 else
Illia Bobyra96d5442023-08-30 16:30:15 +020016147 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16148printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000016149 fi
16150fi
16151
Christian Brabandt6b9efdd2021-09-09 17:14:50 +020016152if `echo "$CFLAGS" | grep -v D_REENTRANT >/dev/null`; then
Bram Moolenaar3ae5fc92021-09-06 18:57:30 +020016153 CFLAGS="$CFLAGS -D_REENTRANT"
16154fi
16155
Bram Moolenaard5cdbeb2005-10-10 20:59:28 +000016156DEPEND_CFLAGS_FILTER=
16157if test "$GCC" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016158 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GCC 3 or later" >&5
16159printf %s "checking for GCC 3 or later... " >&6; }
Bram Moolenaar348808f2020-02-07 20:50:07 +010016160 gccmajor=`echo "$gccversion" | sed -e 's/^\([1-9][0-9]*\)\..*$/\1/g'`
Bram Moolenaarf740b292006-02-16 22:11:02 +000016161 if test "$gccmajor" -gt "2"; then
Bram Moolenaard5cdbeb2005-10-10 20:59:28 +000016162 DEPEND_CFLAGS_FILTER="| sed 's+-I */+-isystem /+g'"
Illia Bobyra96d5442023-08-30 16:30:15 +020016163 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16164printf "%s\n" "yes" >&6; }
Bram Moolenaar0cd49302008-11-20 09:37:01 +000016165 else
Illia Bobyra96d5442023-08-30 16:30:15 +020016166 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16167printf "%s\n" "no" >&6; }
Bram Moolenaar0cd49302008-11-20 09:37:01 +000016168 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016169 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D_FORTIFY_SOURCE=1" >&5
16170printf %s "checking whether we need -D_FORTIFY_SOURCE=1... " >&6; }
Bram Moolenaar0cd49302008-11-20 09:37:01 +000016171 if test "$gccmajor" -gt "3"; then
Zdenek Dohnal42196982023-01-18 16:09:51 +000016172 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/'`
16173 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 +020016174 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16175printf "%s\n" "yes" >&6; }
Bram Moolenaar0cd49302008-11-20 09:37:01 +000016176 else
Illia Bobyra96d5442023-08-30 16:30:15 +020016177 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16178printf "%s\n" "no" >&6; }
Bram Moolenaar0cd49302008-11-20 09:37:01 +000016179 fi
Bram Moolenaara5792f52005-11-23 21:25:05 +000016180fi
Bram Moolenaard5cdbeb2005-10-10 20:59:28 +000016181
Bram Moolenaar071d4272004-06-13 20:20:40 +000016182
Illia Bobyra96d5442023-08-30 16:30:15 +020016183{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need to force -D_FILE_OFFSET_BITS=64" >&5
16184printf %s "checking whether we need to force -D_FILE_OFFSET_BITS=64... " >&6; }
Bram Moolenaar9ce42132018-04-11 22:19:36 +020016185if 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 +020016186 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16187printf "%s\n" "yes" >&6; }
16188 printf "%s\n" "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Bram Moolenaarec0557f2018-01-31 14:41:37 +010016189
16190else
Illia Bobyra96d5442023-08-30 16:30:15 +020016191 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16192printf "%s\n" "no" >&6; }
Bram Moolenaarec0557f2018-01-31 14:41:37 +010016193fi
16194
Bram Moolenaar6cd42db2020-12-04 18:09:54 +010016195LDFLAGS=`echo "$LDFLAGS" | sed -e 's/-L /-L/g'`
16196
Illia Bobyra96d5442023-08-30 16:30:15 +020016197{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking linker --as-needed support" >&5
16198printf %s "checking linker --as-needed support... " >&6; }
Bram Moolenaar22e193d2010-11-03 22:32:24 +010016199LINK_AS_NEEDED=
16200# Check if linker supports --as-needed and --no-as-needed options
16201if $CC -Wl,--help 2>/dev/null | grep as-needed > /dev/null; then
Natanael Copa761ead42021-05-15 14:25:37 +020016202 if ! echo "$LDFLAGS" | grep -q -- '-Wl,[^[:space:]]*--as-needed'; then
16203 LDFLAGS="$LDFLAGS -Wl,--as-needed"
16204 fi
Bram Moolenaar22e193d2010-11-03 22:32:24 +010016205 LINK_AS_NEEDED=yes
16206fi
16207if test "$LINK_AS_NEEDED" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016208 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16209printf "%s\n" "yes" >&6; }
Bram Moolenaar22e193d2010-11-03 22:32:24 +010016210else
Illia Bobyra96d5442023-08-30 16:30:15 +020016211 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16212printf "%s\n" "no" >&6; }
Bram Moolenaar22e193d2010-11-03 22:32:24 +010016213fi
16214
16215
Bram Moolenaar77c19352012-06-13 19:19:41 +020016216# IBM z/OS reset CFLAGS for config.mk
16217if test "$zOSUnix" = "yes"; then
16218 CFLAGS="-D_ALL_SOURCE -Wc,float\(ieee\),dll"
16219fi
16220
Bram Moolenaar446cb832008-06-24 21:56:24 +000016221ac_config_files="$ac_config_files auto/config.mk:config.mk.in"
16222
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016223cat >confcache <<\_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000016224# This file is a shell script that caches the results of configure
16225# tests run on this system so they can be shared between configure
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016226# scripts and configure runs, see configure's option --config-cache.
16227# It is not useful on other systems. If it contains results you don't
16228# want to keep, you may remove or edit it.
Bram Moolenaar071d4272004-06-13 20:20:40 +000016229#
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016230# config.status only pays attention to the cache file if you give it
16231# the --recheck option to rerun configure.
Bram Moolenaar071d4272004-06-13 20:20:40 +000016232#
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016233# `ac_cv_env_foo' variables (set or unset) will be overridden when
16234# loading this file, other *unset* `ac_cv_foo' will be assigned the
16235# following values.
16236
16237_ACEOF
16238
Bram Moolenaar071d4272004-06-13 20:20:40 +000016239# The following way of writing the cache mishandles newlines in values,
16240# but we know of no workaround that is simple, portable, and efficient.
Bram Moolenaar446cb832008-06-24 21:56:24 +000016241# So, we kill variables containing newlines.
Bram Moolenaar071d4272004-06-13 20:20:40 +000016242# Ultrix sh set writes to stderr and can't be redirected directly,
16243# and sets the high bit in the cache file unless we assign to the vars.
Bram Moolenaar446cb832008-06-24 21:56:24 +000016244(
16245 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16246 eval ac_val=\$$ac_var
16247 case $ac_val in #(
16248 *${as_nl}*)
16249 case $ac_var in #(
Illia Bobyra96d5442023-08-30 16:30:15 +020016250 *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16251printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016252 esac
16253 case $ac_var in #(
16254 _ | IFS | as_nl) ;; #(
16255 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016256 *) { eval $ac_var=; unset $ac_var;} ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016257 esac ;;
16258 esac
16259 done
16260
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016261 (set) 2>&1 |
Bram Moolenaar446cb832008-06-24 21:56:24 +000016262 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16263 *${as_nl}ac_space=\ *)
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016264 # `set' does not quote correctly, so add quotes: double-quote
16265 # substitution turns \\\\ into \\, and sed turns \\ into \.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016266 sed -n \
16267 "s/'/'\\\\''/g;
16268 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Bram Moolenaar446cb832008-06-24 21:56:24 +000016269 ;; #(
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016270 *)
16271 # `set' quotes correctly as required by POSIX, so do not add quotes.
Bram Moolenaar446cb832008-06-24 21:56:24 +000016272 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016273 ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016274 esac |
16275 sort
16276) |
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016277 sed '
Bram Moolenaar446cb832008-06-24 21:56:24 +000016278 /^ac_cv_env_/b end
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016279 t clear
Bram Moolenaar446cb832008-06-24 21:56:24 +000016280 :clear
Illia Bobyra96d5442023-08-30 16:30:15 +020016281 s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016282 t end
Bram Moolenaar446cb832008-06-24 21:56:24 +000016283 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16284 :end' >>confcache
16285if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16286 if test -w "$cache_file"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010016287 if test "x$cache_file" != "x/dev/null"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016288 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16289printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
Bram Moolenaar7db77842014-03-27 17:40:59 +010016290 if test ! -f "$cache_file" || test -h "$cache_file"; then
16291 cat confcache >"$cache_file"
16292 else
16293 case $cache_file in #(
16294 */* | ?:*)
16295 mv -f confcache "$cache_file"$$ &&
16296 mv -f "$cache_file"$$ "$cache_file" ;; #(
16297 *)
16298 mv -f confcache "$cache_file" ;;
16299 esac
16300 fi
16301 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000016302 else
Illia Bobyra96d5442023-08-30 16:30:15 +020016303 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16304printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
Bram Moolenaar071d4272004-06-13 20:20:40 +000016305 fi
16306fi
16307rm -f confcache
16308
Bram Moolenaar071d4272004-06-13 20:20:40 +000016309test "x$prefix" = xNONE && prefix=$ac_default_prefix
16310# Let make expand exec_prefix.
16311test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16312
Bram Moolenaar071d4272004-06-13 20:20:40 +000016313DEFS=-DHAVE_CONFIG_H
16314
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016315ac_libobjs=
16316ac_ltlibobjs=
Bram Moolenaar7db77842014-03-27 17:40:59 +010016317U=
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016318for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16319 # 1. Remove the extension, and $U if already installed.
Bram Moolenaar446cb832008-06-24 21:56:24 +000016320 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Illia Bobyra96d5442023-08-30 16:30:15 +020016321 ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
Bram Moolenaar446cb832008-06-24 21:56:24 +000016322 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16323 # will be set to the directory where LIBOBJS objects are built.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016324 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16325 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016326done
16327LIBOBJS=$ac_libobjs
16328
16329LTLIBOBJS=$ac_ltlibobjs
16330
16331
16332
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020016333
Bram Moolenaar7db77842014-03-27 17:40:59 +010016334: "${CONFIG_STATUS=./config.status}"
Bram Moolenaar446cb832008-06-24 21:56:24 +000016335ac_write_fail=0
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016336ac_clean_files_save=$ac_clean_files
16337ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Illia Bobyra96d5442023-08-30 16:30:15 +020016338{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16339printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016340as_write_fail=0
16341cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016342#! $SHELL
16343# Generated by $as_me.
Bram Moolenaar071d4272004-06-13 20:20:40 +000016344# Run this file to recreate the current configuration.
Bram Moolenaar071d4272004-06-13 20:20:40 +000016345# Compiler output produced by configure, useful for debugging
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016346# configure, is in config.log if it exists.
Bram Moolenaar071d4272004-06-13 20:20:40 +000016347
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016348debug=false
16349ac_cs_recheck=false
16350ac_cs_silent=false
Bram Moolenaar071d4272004-06-13 20:20:40 +000016351
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016352SHELL=\${CONFIG_SHELL-$SHELL}
16353export SHELL
16354_ASEOF
16355cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16356## -------------------- ##
16357## M4sh Initialization. ##
16358## -------------------- ##
Bram Moolenaar071d4272004-06-13 20:20:40 +000016359
Bram Moolenaar446cb832008-06-24 21:56:24 +000016360# Be more Bourne compatible
16361DUALCASE=1; export DUALCASE # for MKS sh
Illia Bobyra96d5442023-08-30 16:30:15 +020016362as_nop=:
16363if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
16364then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016365 emulate sh
16366 NULLCMD=:
Bram Moolenaar446cb832008-06-24 21:56:24 +000016367 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016368 # is contrary to our usage. Disable this feature.
16369 alias -g '${1+"$@"}'='"$@"'
Bram Moolenaar446cb832008-06-24 21:56:24 +000016370 setopt NO_GLOB_SUBST
Illia Bobyra96d5442023-08-30 16:30:15 +020016371else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016372 case `(set -o) 2>/dev/null` in #(
16373 *posix*) :
16374 set -o posix ;; #(
16375 *) :
16376 ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016377esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000016378fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000016379
16380
Illia Bobyra96d5442023-08-30 16:30:15 +020016381
16382# Reset variables that may have inherited troublesome values from
16383# the environment.
16384
16385# IFS needs to be set, to space, tab, and newline, in precisely that order.
16386# (If _AS_PATH_WALK were called with IFS unset, it would have the
16387# side effect of setting IFS to empty, thus disabling word splitting.)
16388# Quoting is to prevent editors from complaining about space-tab.
Bram Moolenaar446cb832008-06-24 21:56:24 +000016389as_nl='
16390'
16391export as_nl
Illia Bobyra96d5442023-08-30 16:30:15 +020016392IFS=" "" $as_nl"
16393
16394PS1='$ '
16395PS2='> '
16396PS4='+ '
16397
16398# Ensure predictable behavior from utilities with locale-dependent output.
16399LC_ALL=C
16400export LC_ALL
16401LANGUAGE=C
16402export LANGUAGE
16403
16404# We cannot yet rely on "unset" to work, but we need these variables
16405# to be unset--not just set to an empty or harmless value--now, to
16406# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
16407# also avoids known problems related to "unset" and subshell syntax
16408# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
16409for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
16410do eval test \${$as_var+y} \
16411 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
16412done
16413
16414# Ensure that fds 0, 1, and 2 are open.
16415if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
16416if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
16417if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000016418
16419# The user is always right.
Illia Bobyra96d5442023-08-30 16:30:15 +020016420if ${PATH_SEPARATOR+false} :; then
Bram Moolenaar446cb832008-06-24 21:56:24 +000016421 PATH_SEPARATOR=:
16422 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16423 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16424 PATH_SEPARATOR=';'
16425 }
16426fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000016427
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016428
Bram Moolenaar446cb832008-06-24 21:56:24 +000016429# Find who we are. Look in the path if we contain no directory separator.
Bram Moolenaar7db77842014-03-27 17:40:59 +010016430as_myself=
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016431case $0 in #((
Bram Moolenaar446cb832008-06-24 21:56:24 +000016432 *[\\/]* ) as_myself=$0 ;;
16433 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16434for as_dir in $PATH
16435do
16436 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +020016437 case $as_dir in #(((
16438 '') as_dir=./ ;;
16439 */) ;;
16440 *) as_dir=$as_dir/ ;;
16441 esac
16442 test -r "$as_dir$0" && as_myself=$as_dir$0 && break
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016443 done
Bram Moolenaar446cb832008-06-24 21:56:24 +000016444IFS=$as_save_IFS
16445
16446 ;;
16447esac
16448# We did not find ourselves, most probably we were run as `sh COMMAND'
16449# in which case we are not to be found in the path.
16450if test "x$as_myself" = x; then
16451 as_myself=$0
16452fi
16453if test ! -f "$as_myself"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016454 printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016455 exit 1
Bram Moolenaar446cb832008-06-24 21:56:24 +000016456fi
16457
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016458
16459
Bram Moolenaar7db77842014-03-27 17:40:59 +010016460# as_fn_error STATUS ERROR [LINENO LOG_FD]
16461# ----------------------------------------
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016462# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16463# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Bram Moolenaar7db77842014-03-27 17:40:59 +010016464# script with STATUS, using 1 if that was 0.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016465as_fn_error ()
16466{
Bram Moolenaar7db77842014-03-27 17:40:59 +010016467 as_status=$1; test $as_status -eq 0 && as_status=1
16468 if test "$4"; then
16469 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +020016470 printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016471 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016472 printf "%s\n" "$as_me: error: $2" >&2
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016473 as_fn_exit $as_status
16474} # as_fn_error
16475
16476
Illia Bobyra96d5442023-08-30 16:30:15 +020016477
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016478# as_fn_set_status STATUS
16479# -----------------------
16480# Set $? to STATUS, without forking.
16481as_fn_set_status ()
16482{
16483 return $1
16484} # as_fn_set_status
16485
16486# as_fn_exit STATUS
16487# -----------------
16488# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16489as_fn_exit ()
16490{
16491 set +e
16492 as_fn_set_status $1
16493 exit $1
16494} # as_fn_exit
16495
16496# as_fn_unset VAR
16497# ---------------
16498# Portably unset VAR.
16499as_fn_unset ()
16500{
16501 { eval $1=; unset $1;}
16502}
16503as_unset=as_fn_unset
Illia Bobyra96d5442023-08-30 16:30:15 +020016504
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016505# as_fn_append VAR VALUE
16506# ----------------------
16507# Append the text in VALUE to the end of the definition contained in VAR. Take
16508# advantage of any shell optimizations that allow amortized linear growth over
16509# repeated appends, instead of the typical quadratic growth present in naive
16510# implementations.
Illia Bobyra96d5442023-08-30 16:30:15 +020016511if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
16512then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016513 eval 'as_fn_append ()
16514 {
16515 eval $1+=\$2
16516 }'
Illia Bobyra96d5442023-08-30 16:30:15 +020016517else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016518 as_fn_append ()
16519 {
16520 eval $1=\$$1\$2
16521 }
16522fi # as_fn_append
16523
16524# as_fn_arith ARG...
16525# ------------------
16526# Perform arithmetic evaluation on the ARGs, and store the result in the
16527# global $as_val. Take advantage of shells that can avoid forks. The arguments
16528# must be portable across $(()) and expr.
Illia Bobyra96d5442023-08-30 16:30:15 +020016529if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
16530then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016531 eval 'as_fn_arith ()
16532 {
16533 as_val=$(( $* ))
16534 }'
Illia Bobyra96d5442023-08-30 16:30:15 +020016535else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016536 as_fn_arith ()
16537 {
16538 as_val=`expr "$@" || test $? -eq 1`
16539 }
16540fi # as_fn_arith
16541
16542
Bram Moolenaar446cb832008-06-24 21:56:24 +000016543if expr a : '\(a\)' >/dev/null 2>&1 &&
16544 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016545 as_expr=expr
16546else
16547 as_expr=false
16548fi
16549
Bram Moolenaar446cb832008-06-24 21:56:24 +000016550if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016551 as_basename=basename
16552else
16553 as_basename=false
16554fi
16555
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016556if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16557 as_dirname=dirname
16558else
16559 as_dirname=false
16560fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016561
Bram Moolenaar446cb832008-06-24 21:56:24 +000016562as_me=`$as_basename -- "$0" ||
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016563$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16564 X"$0" : 'X\(//\)$' \| \
Bram Moolenaar446cb832008-06-24 21:56:24 +000016565 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Illia Bobyra96d5442023-08-30 16:30:15 +020016566printf "%s\n" X/"$0" |
Bram Moolenaar446cb832008-06-24 21:56:24 +000016567 sed '/^.*\/\([^/][^/]*\)\/*$/{
16568 s//\1/
16569 q
16570 }
16571 /^X\/\(\/\/\)$/{
16572 s//\1/
16573 q
16574 }
16575 /^X\/\(\/\).*/{
16576 s//\1/
16577 q
16578 }
16579 s/.*/./; q'`
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016580
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016581# Avoid depending upon Character Ranges.
16582as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16583as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16584as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16585as_cr_digits='0123456789'
16586as_cr_alnum=$as_cr_Letters$as_cr_digits
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016587
Illia Bobyra96d5442023-08-30 16:30:15 +020016588
16589# Determine whether it's possible to make 'echo' print without a newline.
16590# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
16591# for compatibility with existing Makefiles.
Bram Moolenaar446cb832008-06-24 21:56:24 +000016592ECHO_C= ECHO_N= ECHO_T=
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016593case `echo -n x` in #(((((
Bram Moolenaar446cb832008-06-24 21:56:24 +000016594-n*)
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016595 case `echo 'xy\c'` in
Bram Moolenaar446cb832008-06-24 21:56:24 +000016596 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016597 xy) ECHO_C='\c';;
16598 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16599 ECHO_T=' ';;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016600 esac;;
16601*)
16602 ECHO_N='-n';;
16603esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016604
Illia Bobyra96d5442023-08-30 16:30:15 +020016605# For backward compatibility with old third-party macros, we provide
16606# the shell variables $as_echo and $as_echo_n. New code should use
16607# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
16608as_echo='printf %s\n'
16609as_echo_n='printf %s'
16610
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016611rm -f conf$$ conf$$.exe conf$$.file
Bram Moolenaar446cb832008-06-24 21:56:24 +000016612if test -d conf$$.dir; then
16613 rm -f conf$$.dir/conf$$.file
16614else
16615 rm -f conf$$.dir
16616 mkdir conf$$.dir 2>/dev/null
16617fi
16618if (echo >conf$$.file) 2>/dev/null; then
16619 if ln -s conf$$.file conf$$ 2>/dev/null; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016620 as_ln_s='ln -s'
Bram Moolenaar446cb832008-06-24 21:56:24 +000016621 # ... but there are two gotchas:
16622 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16623 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Bram Moolenaar7db77842014-03-27 17:40:59 +010016624 # In both cases, we have to default to `cp -pR'.
Bram Moolenaar446cb832008-06-24 21:56:24 +000016625 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Bram Moolenaar7db77842014-03-27 17:40:59 +010016626 as_ln_s='cp -pR'
Bram Moolenaar446cb832008-06-24 21:56:24 +000016627 elif ln conf$$.file conf$$ 2>/dev/null; then
16628 as_ln_s=ln
16629 else
Bram Moolenaar7db77842014-03-27 17:40:59 +010016630 as_ln_s='cp -pR'
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016631 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016632else
Bram Moolenaar7db77842014-03-27 17:40:59 +010016633 as_ln_s='cp -pR'
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016634fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000016635rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16636rmdir conf$$.dir 2>/dev/null
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016637
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016638
16639# as_fn_mkdir_p
16640# -------------
16641# Create "$as_dir" as a directory, including parents if necessary.
16642as_fn_mkdir_p ()
16643{
16644
16645 case $as_dir in #(
16646 -*) as_dir=./$as_dir;;
16647 esac
16648 test -d "$as_dir" || eval $as_mkdir_p || {
16649 as_dirs=
16650 while :; do
16651 case $as_dir in #(
Illia Bobyra96d5442023-08-30 16:30:15 +020016652 *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016653 *) as_qdir=$as_dir;;
16654 esac
16655 as_dirs="'$as_qdir' $as_dirs"
16656 as_dir=`$as_dirname -- "$as_dir" ||
16657$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16658 X"$as_dir" : 'X\(//\)[^/]' \| \
16659 X"$as_dir" : 'X\(//\)$' \| \
16660 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Illia Bobyra96d5442023-08-30 16:30:15 +020016661printf "%s\n" X"$as_dir" |
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016662 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16663 s//\1/
16664 q
16665 }
16666 /^X\(\/\/\)[^/].*/{
16667 s//\1/
16668 q
16669 }
16670 /^X\(\/\/\)$/{
16671 s//\1/
16672 q
16673 }
16674 /^X\(\/\).*/{
16675 s//\1/
16676 q
16677 }
16678 s/.*/./; q'`
16679 test -d "$as_dir" && break
16680 done
16681 test -z "$as_dirs" || eval "mkdir $as_dirs"
Bram Moolenaar7db77842014-03-27 17:40:59 +010016682 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016683
16684
16685} # as_fn_mkdir_p
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016686if mkdir -p . 2>/dev/null; then
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016687 as_mkdir_p='mkdir -p "$as_dir"'
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016688else
16689 test -d ./-p && rmdir ./-p
16690 as_mkdir_p=false
16691fi
16692
Bram Moolenaar7db77842014-03-27 17:40:59 +010016693
16694# as_fn_executable_p FILE
16695# -----------------------
16696# Test if FILE is an executable regular file.
16697as_fn_executable_p ()
16698{
16699 test -f "$1" && test -x "$1"
16700} # as_fn_executable_p
16701as_test_x='test -x'
16702as_executable_p=as_fn_executable_p
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016703
16704# Sed expression to map a string onto a valid CPP name.
16705as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
16706
16707# Sed expression to map a string onto a valid variable name.
16708as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
16709
16710
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016711exec 6>&1
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016712## ----------------------------------- ##
16713## Main body of $CONFIG_STATUS script. ##
16714## ----------------------------------- ##
16715_ASEOF
16716test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016717
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016718cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16719# Save the log message, to keep $0 and so on meaningful, and to
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016720# report actual input values of CONFIG_FILES etc. instead of their
Bram Moolenaar446cb832008-06-24 21:56:24 +000016721# values after options handling.
16722ac_log="
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016723This file was extended by $as_me, which was
Illia Bobyra96d5442023-08-30 16:30:15 +020016724generated by GNU Autoconf 2.71. Invocation command line was
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016725
16726 CONFIG_FILES = $CONFIG_FILES
16727 CONFIG_HEADERS = $CONFIG_HEADERS
16728 CONFIG_LINKS = $CONFIG_LINKS
16729 CONFIG_COMMANDS = $CONFIG_COMMANDS
16730 $ $0 $@
16731
Bram Moolenaar446cb832008-06-24 21:56:24 +000016732on `(hostname || uname -n) 2>/dev/null | sed 1q`
16733"
16734
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016735_ACEOF
16736
Bram Moolenaar32f31b12009-05-21 13:20:59 +000016737case $ac_config_files in *"
16738"*) set x $ac_config_files; shift; ac_config_files=$*;;
16739esac
16740
16741case $ac_config_headers in *"
16742"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16743esac
16744
16745
Bram Moolenaar446cb832008-06-24 21:56:24 +000016746cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016747# Files that config.status was made for.
Bram Moolenaar446cb832008-06-24 21:56:24 +000016748config_files="$ac_config_files"
16749config_headers="$ac_config_headers"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016750
Bram Moolenaar446cb832008-06-24 21:56:24 +000016751_ACEOF
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016752
Bram Moolenaar446cb832008-06-24 21:56:24 +000016753cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016754ac_cs_usage="\
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016755\`$as_me' instantiates files and other configuration actions
16756from templates according to the current configuration. Unless the files
16757and actions are specified as TAGs, all are instantiated by default.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016758
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016759Usage: $0 [OPTION]... [TAG]...
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016760
16761 -h, --help print this help, then exit
Bram Moolenaar446cb832008-06-24 21:56:24 +000016762 -V, --version print version number and configuration settings, then exit
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016763 --config print configuration, then exit
Bram Moolenaar32f31b12009-05-21 13:20:59 +000016764 -q, --quiet, --silent
16765 do not print progress messages
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016766 -d, --debug don't remove temporary files
16767 --recheck update $as_me by reconfiguring in the same conditions
Bram Moolenaar32f31b12009-05-21 13:20:59 +000016768 --file=FILE[:TEMPLATE]
Bram Moolenaar446cb832008-06-24 21:56:24 +000016769 instantiate the configuration file FILE
Bram Moolenaar32f31b12009-05-21 13:20:59 +000016770 --header=FILE[:TEMPLATE]
Bram Moolenaar446cb832008-06-24 21:56:24 +000016771 instantiate the configuration header FILE
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016772
16773Configuration files:
16774$config_files
16775
16776Configuration headers:
16777$config_headers
16778
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016779Report bugs to the package provider."
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016780
Bram Moolenaar446cb832008-06-24 21:56:24 +000016781_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016782ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
16783ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
Bram Moolenaar446cb832008-06-24 21:56:24 +000016784cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Illia Bobyra96d5442023-08-30 16:30:15 +020016785ac_cs_config='$ac_cs_config_escaped'
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016786ac_cs_version="\\
16787config.status
Illia Bobyra96d5442023-08-30 16:30:15 +020016788configured by $0, generated by GNU Autoconf 2.71,
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016789 with options \\"\$ac_cs_config\\"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016790
Illia Bobyra96d5442023-08-30 16:30:15 +020016791Copyright (C) 2021 Free Software Foundation, Inc.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016792This config.status script is free software; the Free Software Foundation
16793gives unlimited permission to copy, distribute and modify it."
Bram Moolenaar446cb832008-06-24 21:56:24 +000016794
16795ac_pwd='$ac_pwd'
16796srcdir='$srcdir'
16797AWK='$AWK'
16798test -n "\$AWK" || AWK=awk
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016799_ACEOF
16800
Bram Moolenaar446cb832008-06-24 21:56:24 +000016801cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16802# The default lists apply if the user does not specify any file.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016803ac_need_defaults=:
16804while test $# != 0
16805do
16806 case $1 in
Bram Moolenaar7db77842014-03-27 17:40:59 +010016807 --*=?*)
Bram Moolenaar446cb832008-06-24 21:56:24 +000016808 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16809 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016810 ac_shift=:
16811 ;;
Bram Moolenaar7db77842014-03-27 17:40:59 +010016812 --*=)
16813 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16814 ac_optarg=
16815 ac_shift=:
16816 ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016817 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016818 ac_option=$1
16819 ac_optarg=$2
16820 ac_shift=shift
16821 ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016822 esac
16823
16824 case $ac_option in
16825 # Handling of the options.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016826 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16827 ac_cs_recheck=: ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016828 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Illia Bobyra96d5442023-08-30 16:30:15 +020016829 printf "%s\n" "$ac_cs_version"; exit ;;
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016830 --config | --confi | --conf | --con | --co | --c )
Illia Bobyra96d5442023-08-30 16:30:15 +020016831 printf "%s\n" "$ac_cs_config"; exit ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016832 --debug | --debu | --deb | --de | --d | -d )
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016833 debug=: ;;
16834 --file | --fil | --fi | --f )
16835 $ac_shift
Bram Moolenaar446cb832008-06-24 21:56:24 +000016836 case $ac_optarg in
Illia Bobyra96d5442023-08-30 16:30:15 +020016837 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Bram Moolenaar7db77842014-03-27 17:40:59 +010016838 '') as_fn_error $? "missing file argument" ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016839 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016840 as_fn_append CONFIG_FILES " '$ac_optarg'"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016841 ac_need_defaults=false;;
16842 --header | --heade | --head | --hea )
16843 $ac_shift
Bram Moolenaar446cb832008-06-24 21:56:24 +000016844 case $ac_optarg in
Illia Bobyra96d5442023-08-30 16:30:15 +020016845 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016846 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016847 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016848 ac_need_defaults=false;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016849 --he | --h)
16850 # Conflict between --help and --header
Bram Moolenaar7db77842014-03-27 17:40:59 +010016851 as_fn_error $? "ambiguous option: \`$1'
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016852Try \`$0 --help' for more information.";;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016853 --help | --hel | -h )
Illia Bobyra96d5442023-08-30 16:30:15 +020016854 printf "%s\n" "$ac_cs_usage"; exit ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016855 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16856 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16857 ac_cs_silent=: ;;
16858
16859 # This is an error.
Bram Moolenaar7db77842014-03-27 17:40:59 +010016860 -*) as_fn_error $? "unrecognized option: \`$1'
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016861Try \`$0 --help' for more information." ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016862
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016863 *) as_fn_append ac_config_targets " $1"
Bram Moolenaar446cb832008-06-24 21:56:24 +000016864 ac_need_defaults=false ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016865
16866 esac
16867 shift
16868done
16869
16870ac_configure_extra_args=
16871
16872if $ac_cs_silent; then
16873 exec 6>/dev/null
16874 ac_configure_extra_args="$ac_configure_extra_args --silent"
16875fi
16876
16877_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +000016878cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016879if \$ac_cs_recheck; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010016880 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Bram Moolenaar446cb832008-06-24 21:56:24 +000016881 shift
Illia Bobyra96d5442023-08-30 16:30:15 +020016882 \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
Bram Moolenaar446cb832008-06-24 21:56:24 +000016883 CONFIG_SHELL='$SHELL'
16884 export CONFIG_SHELL
16885 exec "\$@"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016886fi
16887
16888_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +000016889cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16890exec 5>>auto/config.log
16891{
16892 echo
16893 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16894## Running $as_me. ##
16895_ASBOX
Illia Bobyra96d5442023-08-30 16:30:15 +020016896 printf "%s\n" "$ac_log"
Bram Moolenaar446cb832008-06-24 21:56:24 +000016897} >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016898
Bram Moolenaar446cb832008-06-24 21:56:24 +000016899_ACEOF
16900cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16901_ACEOF
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016902
Bram Moolenaar446cb832008-06-24 21:56:24 +000016903cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016904
Bram Moolenaar446cb832008-06-24 21:56:24 +000016905# Handling of arguments.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016906for ac_config_target in $ac_config_targets
16907do
Bram Moolenaar446cb832008-06-24 21:56:24 +000016908 case $ac_config_target in
16909 "auto/config.h") CONFIG_HEADERS="$CONFIG_HEADERS auto/config.h:config.h.in" ;;
16910 "auto/config.mk") CONFIG_FILES="$CONFIG_FILES auto/config.mk:config.mk.in" ;;
16911
Bram Moolenaar7db77842014-03-27 17:40:59 +010016912 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016913 esac
16914done
16915
Bram Moolenaar446cb832008-06-24 21:56:24 +000016916
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016917# If the user did not use the arguments to specify the items to instantiate,
16918# then the envvar interface is used. Set only those that are not.
16919# We use the long form for the default assignment because of an extremely
16920# bizarre bug on SunOS 4.1.3.
16921if $ac_need_defaults; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016922 test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
16923 test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016924fi
16925
16926# Have a temporary directory for convenience. Make it in the build tree
Bram Moolenaar446cb832008-06-24 21:56:24 +000016927# simply because there is no reason against having it here, and in addition,
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016928# creating and moving files from /tmp can sometimes cause problems.
Bram Moolenaar446cb832008-06-24 21:56:24 +000016929# Hook for its removal unless debugging.
16930# Note that there is a small window in which the directory will not be cleaned:
16931# after its creation but before its name has been assigned to `$tmp'.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016932$debug ||
16933{
Bram Moolenaar7db77842014-03-27 17:40:59 +010016934 tmp= ac_tmp=
Bram Moolenaar446cb832008-06-24 21:56:24 +000016935 trap 'exit_status=$?
Bram Moolenaar7db77842014-03-27 17:40:59 +010016936 : "${ac_tmp:=$tmp}"
16937 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Bram Moolenaar446cb832008-06-24 21:56:24 +000016938' 0
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016939 trap 'as_fn_exit 1' 1 2 13 15
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016940}
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016941# Create a (secure) tmp directory for tmp files.
16942
16943{
Bram Moolenaar446cb832008-06-24 21:56:24 +000016944 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Bram Moolenaar7db77842014-03-27 17:40:59 +010016945 test -d "$tmp"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016946} ||
16947{
Bram Moolenaar446cb832008-06-24 21:56:24 +000016948 tmp=./conf$$-$RANDOM
16949 (umask 077 && mkdir "$tmp")
Bram Moolenaar7db77842014-03-27 17:40:59 +010016950} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
16951ac_tmp=$tmp
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016952
Bram Moolenaar446cb832008-06-24 21:56:24 +000016953# Set up the scripts for CONFIG_FILES section.
16954# No need to generate them if there are no CONFIG_FILES.
16955# This happens for instance with `./config.status config.h'.
16956if test -n "$CONFIG_FILES"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016957
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016958
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016959ac_cr=`echo X | tr X '\015'`
16960# On cygwin, bash can eat \r inside `` if the user requested igncr.
16961# But we know of no other shell where ac_cr would be empty at this
16962# point, so we can use a bashism as a fallback.
16963if test "x$ac_cr" = x; then
16964 eval ac_cr=\$\'\\r\'
16965fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000016966ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
16967if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010016968 ac_cs_awk_cr='\\r'
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016969else
Bram Moolenaar446cb832008-06-24 21:56:24 +000016970 ac_cs_awk_cr=$ac_cr
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016971fi
16972
Bram Moolenaar7db77842014-03-27 17:40:59 +010016973echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016974_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000016975
Bram Moolenaar446cb832008-06-24 21:56:24 +000016976
16977{
16978 echo "cat >conf$$subs.awk <<_ACEOF" &&
16979 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
16980 echo "_ACEOF"
16981} >conf$$subs.sh ||
Bram Moolenaar7db77842014-03-27 17:40:59 +010016982 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16983ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Bram Moolenaar446cb832008-06-24 21:56:24 +000016984ac_delim='%!_!# '
16985for ac_last_try in false false false false false :; do
16986 . ./conf$$subs.sh ||
Bram Moolenaar7db77842014-03-27 17:40:59 +010016987 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000016988
Bram Moolenaar32f31b12009-05-21 13:20:59 +000016989 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
16990 if test $ac_delim_n = $ac_delim_num; then
Bram Moolenaar446cb832008-06-24 21:56:24 +000016991 break
16992 elif $ac_last_try; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010016993 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000016994 else
16995 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16996 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016997done
Bram Moolenaar446cb832008-06-24 21:56:24 +000016998rm -f conf$$subs.sh
16999
17000cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Bram Moolenaar7db77842014-03-27 17:40:59 +010017001cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017002_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +000017003sed -n '
17004h
17005s/^/S["/; s/!.*/"]=/
17006p
17007g
17008s/^[^!]*!//
17009:repl
17010t repl
17011s/'"$ac_delim"'$//
17012t delim
17013:nl
17014h
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017015s/\(.\{148\}\)..*/\1/
Bram Moolenaar446cb832008-06-24 21:56:24 +000017016t more1
17017s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17018p
17019n
17020b repl
17021:more1
17022s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17023p
17024g
17025s/.\{148\}//
17026t nl
17027:delim
17028h
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017029s/\(.\{148\}\)..*/\1/
Bram Moolenaar446cb832008-06-24 21:56:24 +000017030t more2
17031s/["\\]/\\&/g; s/^/"/; s/$/"/
17032p
17033b
17034:more2
17035s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17036p
17037g
17038s/.\{148\}//
17039t delim
17040' <conf$$subs.awk | sed '
17041/^[^""]/{
17042 N
17043 s/\n//
17044}
17045' >>$CONFIG_STATUS || ac_write_fail=1
17046rm -f conf$$subs.awk
17047cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17048_ACAWK
Bram Moolenaar7db77842014-03-27 17:40:59 +010017049cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Bram Moolenaar446cb832008-06-24 21:56:24 +000017050 for (key in S) S_is_set[key] = 1
17051 FS = ""
Bram Moolenaar071d4272004-06-13 20:20:40 +000017052
Bram Moolenaar446cb832008-06-24 21:56:24 +000017053}
17054{
17055 line = $ 0
17056 nfields = split(line, field, "@")
17057 substed = 0
17058 len = length(field[1])
17059 for (i = 2; i < nfields; i++) {
17060 key = field[i]
17061 keylen = length(key)
17062 if (S_is_set[key]) {
17063 value = S[key]
17064 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17065 len += length(value) + length(field[++i])
17066 substed = 1
17067 } else
17068 len += 1 + keylen
17069 }
Bram Moolenaar071d4272004-06-13 20:20:40 +000017070
Bram Moolenaar446cb832008-06-24 21:56:24 +000017071 print line
17072}
Bram Moolenaar071d4272004-06-13 20:20:40 +000017073
Bram Moolenaar446cb832008-06-24 21:56:24 +000017074_ACAWK
17075_ACEOF
17076cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17077if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17078 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17079else
17080 cat
Bram Moolenaar7db77842014-03-27 17:40:59 +010017081fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
17082 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017083_ACEOF
17084
Bram Moolenaar7db77842014-03-27 17:40:59 +010017085# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17086# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Bram Moolenaar446cb832008-06-24 21:56:24 +000017087# trailing colons and then remove the whole line if VPATH becomes empty
17088# (actually we leave an empty line to preserve line numbers).
17089if test "x$srcdir" = x.; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010017090 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17091h
17092s///
17093s/^/:/
17094s/[ ]*$/:/
17095s/:\$(srcdir):/:/g
17096s/:\${srcdir}:/:/g
17097s/:@srcdir@:/:/g
17098s/^:*//
Bram Moolenaar446cb832008-06-24 21:56:24 +000017099s/:*$//
Bram Moolenaar7db77842014-03-27 17:40:59 +010017100x
17101s/\(=[ ]*\).*/\1/
17102G
17103s/\n//
Bram Moolenaar446cb832008-06-24 21:56:24 +000017104s/^[^=]*=[ ]*$//
17105}'
17106fi
17107
17108cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17109fi # test -n "$CONFIG_FILES"
17110
17111# Set up the scripts for CONFIG_HEADERS section.
17112# No need to generate them if there are no CONFIG_HEADERS.
17113# This happens for instance with `./config.status Makefile'.
17114if test -n "$CONFIG_HEADERS"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010017115cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Bram Moolenaar446cb832008-06-24 21:56:24 +000017116BEGIN {
17117_ACEOF
17118
17119# Transform confdefs.h into an awk script `defines.awk', embedded as
17120# here-document in config.status, that substitutes the proper values into
17121# config.h.in to produce config.h.
17122
17123# Create a delimiter string that does not exist in confdefs.h, to ease
17124# handling of long lines.
17125ac_delim='%!_!# '
17126for ac_last_try in false false :; do
Bram Moolenaar7db77842014-03-27 17:40:59 +010017127 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17128 if test -z "$ac_tt"; then
Bram Moolenaar446cb832008-06-24 21:56:24 +000017129 break
17130 elif $ac_last_try; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010017131 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017132 else
17133 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17134 fi
17135done
17136
17137# For the awk script, D is an array of macro values keyed by name,
17138# likewise P contains macro parameters if any. Preserve backslash
17139# newline sequences.
17140
17141ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17142sed -n '
17143s/.\{148\}/&'"$ac_delim"'/g
17144t rset
17145:rset
17146s/^[ ]*#[ ]*define[ ][ ]*/ /
17147t def
17148d
17149:def
17150s/\\$//
17151t bsnl
17152s/["\\]/\\&/g
17153s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17154D["\1"]=" \3"/p
17155s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17156d
17157:bsnl
17158s/["\\]/\\&/g
17159s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17160D["\1"]=" \3\\\\\\n"\\/p
17161t cont
17162s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17163t cont
17164d
17165:cont
17166n
17167s/.\{148\}/&'"$ac_delim"'/g
17168t clear
17169:clear
17170s/\\$//
17171t bsnlc
17172s/["\\]/\\&/g; s/^/"/; s/$/"/p
17173d
17174:bsnlc
17175s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17176b cont
17177' <confdefs.h | sed '
17178s/'"$ac_delim"'/"\\\
17179"/g' >>$CONFIG_STATUS || ac_write_fail=1
17180
17181cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17182 for (key in D) D_is_set[key] = 1
17183 FS = ""
17184}
17185/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17186 line = \$ 0
17187 split(line, arg, " ")
17188 if (arg[1] == "#") {
17189 defundef = arg[2]
17190 mac1 = arg[3]
17191 } else {
17192 defundef = substr(arg[1], 2)
17193 mac1 = arg[2]
17194 }
17195 split(mac1, mac2, "(") #)
17196 macro = mac2[1]
Bram Moolenaar32f31b12009-05-21 13:20:59 +000017197 prefix = substr(line, 1, index(line, defundef) - 1)
Bram Moolenaar446cb832008-06-24 21:56:24 +000017198 if (D_is_set[macro]) {
17199 # Preserve the white space surrounding the "#".
Bram Moolenaar446cb832008-06-24 21:56:24 +000017200 print prefix "define", macro P[macro] D[macro]
17201 next
17202 } else {
17203 # Replace #undef with comments. This is necessary, for example,
17204 # in the case of _POSIX_SOURCE, which is predefined and required
17205 # on some systems where configure will not decide to define it.
17206 if (defundef == "undef") {
Bram Moolenaar32f31b12009-05-21 13:20:59 +000017207 print "/*", prefix defundef, macro, "*/"
Bram Moolenaar446cb832008-06-24 21:56:24 +000017208 next
17209 }
17210 }
17211}
17212{ print }
17213_ACAWK
17214_ACEOF
17215cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Bram Moolenaar7db77842014-03-27 17:40:59 +010017216 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017217fi # test -n "$CONFIG_HEADERS"
17218
17219
17220eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17221shift
17222for ac_tag
17223do
17224 case $ac_tag in
17225 :[FHLC]) ac_mode=$ac_tag; continue;;
17226 esac
17227 case $ac_mode$ac_tag in
17228 :[FHL]*:*);;
Bram Moolenaar7db77842014-03-27 17:40:59 +010017229 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017230 :[FH]-) ac_tag=-:-;;
17231 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17232 esac
17233 ac_save_IFS=$IFS
17234 IFS=:
17235 set x $ac_tag
17236 IFS=$ac_save_IFS
17237 shift
17238 ac_file=$1
17239 shift
17240
17241 case $ac_mode in
17242 :L) ac_source=$1;;
17243 :[FH])
17244 ac_file_inputs=
17245 for ac_f
17246 do
17247 case $ac_f in
Bram Moolenaar7db77842014-03-27 17:40:59 +010017248 -) ac_f="$ac_tmp/stdin";;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017249 *) # Look for the file first in the build tree, then in the source tree
17250 # (if the path is not absolute). The absolute path cannot be DOS-style,
17251 # because $ac_f cannot contain `:'.
17252 test -f "$ac_f" ||
17253 case $ac_f in
17254 [\\/$]*) false;;
17255 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17256 esac ||
Bram Moolenaar7db77842014-03-27 17:40:59 +010017257 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017258 esac
Illia Bobyra96d5442023-08-30 16:30:15 +020017259 case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017260 as_fn_append ac_file_inputs " '$ac_f'"
Bram Moolenaar446cb832008-06-24 21:56:24 +000017261 done
17262
17263 # Let's still pretend it is `configure' which instantiates (i.e., don't
17264 # use $as_me), people would be surprised to read:
17265 # /* config.h. Generated by config.status. */
17266 configure_input='Generated from '`
Illia Bobyra96d5442023-08-30 16:30:15 +020017267 printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
Bram Moolenaar446cb832008-06-24 21:56:24 +000017268 `' by configure.'
17269 if test x"$ac_file" != x-; then
17270 configure_input="$ac_file. $configure_input"
Illia Bobyra96d5442023-08-30 16:30:15 +020017271 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17272printf "%s\n" "$as_me: creating $ac_file" >&6;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000017273 fi
17274 # Neutralize special characters interpreted by sed in replacement strings.
17275 case $configure_input in #(
17276 *\&* | *\|* | *\\* )
Illia Bobyra96d5442023-08-30 16:30:15 +020017277 ac_sed_conf_input=`printf "%s\n" "$configure_input" |
Bram Moolenaar446cb832008-06-24 21:56:24 +000017278 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17279 *) ac_sed_conf_input=$configure_input;;
17280 esac
17281
17282 case $ac_tag in
Bram Moolenaar7db77842014-03-27 17:40:59 +010017283 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17284 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017285 esac
17286 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +000017287 esac
17288
Bram Moolenaar446cb832008-06-24 21:56:24 +000017289 ac_dir=`$as_dirname -- "$ac_file" ||
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017290$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17291 X"$ac_file" : 'X\(//\)[^/]' \| \
17292 X"$ac_file" : 'X\(//\)$' \| \
Bram Moolenaar446cb832008-06-24 21:56:24 +000017293 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Illia Bobyra96d5442023-08-30 16:30:15 +020017294printf "%s\n" X"$ac_file" |
Bram Moolenaar446cb832008-06-24 21:56:24 +000017295 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17296 s//\1/
17297 q
17298 }
17299 /^X\(\/\/\)[^/].*/{
17300 s//\1/
17301 q
17302 }
17303 /^X\(\/\/\)$/{
17304 s//\1/
17305 q
17306 }
17307 /^X\(\/\).*/{
17308 s//\1/
17309 q
17310 }
17311 s/.*/./; q'`
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017312 as_dir="$ac_dir"; as_fn_mkdir_p
Bram Moolenaar446cb832008-06-24 21:56:24 +000017313 ac_builddir=.
Bram Moolenaar071d4272004-06-13 20:20:40 +000017314
Bram Moolenaar446cb832008-06-24 21:56:24 +000017315case "$ac_dir" in
17316.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17317*)
Illia Bobyra96d5442023-08-30 16:30:15 +020017318 ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
Bram Moolenaar446cb832008-06-24 21:56:24 +000017319 # A ".." for each directory in $ac_dir_suffix.
Illia Bobyra96d5442023-08-30 16:30:15 +020017320 ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Bram Moolenaar446cb832008-06-24 21:56:24 +000017321 case $ac_top_builddir_sub in
17322 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17323 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17324 esac ;;
17325esac
17326ac_abs_top_builddir=$ac_pwd
17327ac_abs_builddir=$ac_pwd$ac_dir_suffix
17328# for backward compatibility:
17329ac_top_builddir=$ac_top_build_prefix
17330
17331case $srcdir in
17332 .) # We are building in place.
17333 ac_srcdir=.
17334 ac_top_srcdir=$ac_top_builddir_sub
17335 ac_abs_top_srcdir=$ac_pwd ;;
17336 [\\/]* | ?:[\\/]* ) # Absolute name.
17337 ac_srcdir=$srcdir$ac_dir_suffix;
17338 ac_top_srcdir=$srcdir
17339 ac_abs_top_srcdir=$srcdir ;;
17340 *) # Relative name.
17341 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17342 ac_top_srcdir=$ac_top_build_prefix$srcdir
17343 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
17344esac
17345ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
17346
17347
17348 case $ac_mode in
17349 :F)
17350 #
17351 # CONFIG_FILE
17352 #
17353
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017354_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000017355
Bram Moolenaar446cb832008-06-24 21:56:24 +000017356cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17357# If the template does not know about datarootdir, expand it.
17358# FIXME: This hack should be removed a few years after 2.60.
17359ac_datarootdir_hack=; ac_datarootdir_seen=
Bram Moolenaar446cb832008-06-24 21:56:24 +000017360ac_sed_dataroot='
17361/datarootdir/ {
17362 p
17363 q
17364}
17365/@datadir@/p
17366/@docdir@/p
17367/@infodir@/p
17368/@localedir@/p
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017369/@mandir@/p'
Bram Moolenaar446cb832008-06-24 21:56:24 +000017370case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
17371*datarootdir*) ac_datarootdir_seen=yes;;
17372*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Illia Bobyra96d5442023-08-30 16:30:15 +020017373 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17374printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000017375_ACEOF
17376cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17377 ac_datarootdir_hack='
17378 s&@datadir@&$datadir&g
17379 s&@docdir@&$docdir&g
17380 s&@infodir@&$infodir&g
17381 s&@localedir@&$localedir&g
17382 s&@mandir@&$mandir&g
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017383 s&\\\${datarootdir}&$datarootdir&g' ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017384esac
17385_ACEOF
17386
17387# Neutralize VPATH when `$srcdir' = `.'.
17388# Shell code in configure.ac might set extrasub.
17389# FIXME: do we really want to maintain this feature?
17390cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17391ac_sed_extra="$ac_vpsub
17392$extrasub
17393_ACEOF
17394cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17395:t
17396/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
17397s|@configure_input@|$ac_sed_conf_input|;t t
17398s&@top_builddir@&$ac_top_builddir_sub&;t t
17399s&@top_build_prefix@&$ac_top_build_prefix&;t t
17400s&@srcdir@&$ac_srcdir&;t t
17401s&@abs_srcdir@&$ac_abs_srcdir&;t t
17402s&@top_srcdir@&$ac_top_srcdir&;t t
17403s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17404s&@builddir@&$ac_builddir&;t t
17405s&@abs_builddir@&$ac_abs_builddir&;t t
17406s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17407$ac_datarootdir_hack
17408"
Bram Moolenaar7db77842014-03-27 17:40:59 +010017409eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17410 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017411
17412test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Bram Moolenaar7db77842014-03-27 17:40:59 +010017413 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17414 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17415 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Illia Bobyra96d5442023-08-30 16:30:15 +020017416 { 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 +010017417which seems to be undefined. Please make sure it is defined" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +020017418printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Bram Moolenaar7db77842014-03-27 17:40:59 +010017419which seems to be undefined. Please make sure it is defined" >&2;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000017420
Bram Moolenaar7db77842014-03-27 17:40:59 +010017421 rm -f "$ac_tmp/stdin"
Bram Moolenaar446cb832008-06-24 21:56:24 +000017422 case $ac_file in
Bram Moolenaar7db77842014-03-27 17:40:59 +010017423 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17424 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017425 esac \
Bram Moolenaar7db77842014-03-27 17:40:59 +010017426 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017427 ;;
17428 :H)
17429 #
17430 # CONFIG_HEADER
17431 #
17432 if test x"$ac_file" != x-; then
17433 {
Illia Bobyra96d5442023-08-30 16:30:15 +020017434 printf "%s\n" "/* $configure_input */" >&1 \
Bram Moolenaar7db77842014-03-27 17:40:59 +010017435 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17436 } >"$ac_tmp/config.h" \
17437 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
17438 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Illia Bobyra96d5442023-08-30 16:30:15 +020017439 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17440printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000017441 else
17442 rm -f "$ac_file"
Bram Moolenaar7db77842014-03-27 17:40:59 +010017443 mv "$ac_tmp/config.h" "$ac_file" \
17444 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017445 fi
17446 else
Illia Bobyra96d5442023-08-30 16:30:15 +020017447 printf "%s\n" "/* $configure_input */" >&1 \
Bram Moolenaar7db77842014-03-27 17:40:59 +010017448 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
17449 || as_fn_error $? "could not create -" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017450 fi
17451 ;;
17452
17453
17454 esac
17455
17456done # for ac_tag
17457
Bram Moolenaar071d4272004-06-13 20:20:40 +000017458
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017459as_fn_exit 0
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017460_ACEOF
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017461ac_clean_files=$ac_clean_files_save
17462
Bram Moolenaar446cb832008-06-24 21:56:24 +000017463test $ac_write_fail = 0 ||
Bram Moolenaar7db77842014-03-27 17:40:59 +010017464 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017465
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017466
17467# configure is writing to config.log, and then calls config.status.
17468# config.status does its own redirection, appending to config.log.
17469# Unfortunately, on DOS this fails, as config.log is still kept open
17470# by configure, so config.status won't be able to write to it; its
17471# output is simply discarded. So we exec the FD to /dev/null,
17472# effectively closing config.log, so it can be properly (re)opened and
17473# appended to by config.status. When coming back to configure, we
17474# need to make the FD available again.
17475if test "$no_create" != yes; then
17476 ac_cs_success=:
17477 ac_config_status_args=
17478 test "$silent" = yes &&
17479 ac_config_status_args="$ac_config_status_args --quiet"
17480 exec 5>/dev/null
17481 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Bram Moolenaarc7453f52006-02-10 23:20:28 +000017482 exec 5>>auto/config.log
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017483 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17484 # would make configure fail if this is the last instruction.
Bram Moolenaar7db77842014-03-27 17:40:59 +010017485 $ac_cs_success || as_fn_exit 1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017486fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000017487if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
Illia Bobyra96d5442023-08-30 16:30:15 +020017488 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17489printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000017490fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000017491
17492
Illia Bobyra96d5442023-08-30 16:30:15 +020017493