Eschew non-portable constructs in configure.ac

* configure.ac (gl_gcc_warnings): Delete `test -o' and simplify
long test condition correspondingly.
This commit is contained in:
Po Lu 2023-09-30 19:39:54 +08:00
parent ec6e7f7c01
commit 8db48d247b

View file

@ -1664,13 +1664,13 @@ AC_ARG_ENABLE([gcc-warnings],
# however, if there is also a .tarball-version file it is probably
# just a release imported into Git for patch management.
gl_gcc_warnings=no
if test -d "$srcdir"/.git -o -f "$srcdir"/.git && test ! -f "$srcdir"/.tarball-version; then
# Clang typically identifies itself as GCC 4.2 or something similar
# even if it is recent enough to accept the warnings we enable.
AS_IF([test "$emacs_cv_clang" = yes],
[gl_gcc_warnings=warn-only],
[gl_GCC_VERSION_IFELSE([5], [3], [gl_gcc_warnings=warn-only])])
fi])
AS_IF([test -d "$srcdir"/.git || test -f "$srcdir"/.git],
[AS_IF([test -f "$srcdir"/.tarball-version], [],
# Clang typically identifies itself as GCC 4.2 or something similar
# even if it is recent enough to accept the warnings we enable.
[AS_IF([test "$emacs_cv_clang" = yes],
[gl_gcc_warnings=warn-only],
[gl_GCC_VERSION_IFELSE([5], [3], [gl_gcc_warnings=warn-only])])])])])
NATIVE_COMPILATION_AOT=no
AC_ARG_WITH([native-compilation],