mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 12:32:40 +03:00
Merge branch '4604_c99_automake_114'
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
This commit is contained in:
commit
ea8e239f00
6
.github/workflows/ci.yml
vendored
6
.github/workflows/ci.yml
vendored
@ -17,9 +17,6 @@ jobs:
|
||||
call-build-macos:
|
||||
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
|
||||
uses: ./.github/workflows/ci-macos.yml
|
||||
with:
|
||||
# https://github.com/llvm/llvm-project/issues/20574
|
||||
CFLAGS: -Wno-assign-enum
|
||||
|
||||
call-build-solaris:
|
||||
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
|
||||
@ -29,6 +26,5 @@ jobs:
|
||||
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
|
||||
uses: ./.github/workflows/ci-freebsd.yml
|
||||
with:
|
||||
# https://github.com/llvm/llvm-project/issues/20574
|
||||
# https://github.com/GNUAspell/aspell/pull/651
|
||||
CFLAGS: -Wno-assign-enum -Wno-strict-prototypes
|
||||
CFLAGS: -Wno-strict-prototypes
|
||||
|
@ -1,5 +1,5 @@
|
||||
## Process this file with automake to create Makefile.in.
|
||||
AUTOMAKE_OPTIONS = 1.12
|
||||
AUTOMAKE_OPTIONS = 1.14
|
||||
|
||||
SUBDIRS = po lib src doc contrib misc
|
||||
|
||||
|
12
configure.ac
12
configure.ac
@ -3,7 +3,7 @@ dnl Configure.in file for the Midnight Commander
|
||||
dnl
|
||||
|
||||
dnl 2.64 is required at least for m4_esyscmd_s()
|
||||
AC_PREREQ(2.64)
|
||||
AC_PREREQ([2.64])
|
||||
|
||||
AC_INIT([GNU Midnight Commander], m4_esyscmd_s([./version.sh .]),
|
||||
[https://www.midnight-commander.org/wiki/NewTicket], [mc],
|
||||
@ -41,7 +41,11 @@ dnl that ar cannot be found and linking via libtool will fail at a later stage
|
||||
AC_CHECK_TOOLS([AR], [ar gar])
|
||||
|
||||
AC_PROG_CC
|
||||
AM_PROG_CC_C_O
|
||||
|
||||
# AC_PROG_CC doesn't try enabling C99 in autoconf 2.69 and below, but
|
||||
# AC_PROG_CC_C99 is deprecated in newer ones. In autoconf 2.70+ both
|
||||
# will try enabling features up to C11.
|
||||
m4_version_prereq([2.70], [AC_PROG_CC], [AC_PROG_CC_C99])
|
||||
|
||||
mc_CHECK_CFLAGS
|
||||
|
||||
@ -50,7 +54,7 @@ if test "x$CFLAGS" = "x"; then
|
||||
CFLAGS_OPTS=" -O2 "
|
||||
fi
|
||||
if test x$USE_MAINTAINER_MODE = xyes; then
|
||||
CFLAGS_OPTS="-g3 -O -ggdb"
|
||||
CFLAGS_OPTS="-g3 -Og -ggdb"
|
||||
AC_DEFINE(USE_MAINTAINER_MODE, 1, [Use maintainer mode])
|
||||
fi
|
||||
|
||||
@ -374,7 +378,7 @@ aux*)
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl If running under AIX, AC_AIX does not tell us that
|
||||
dnl If running under AIX, AC_USE_SYSTEM_EXTENSIONS does not tell us that
|
||||
AC_MSG_CHECKING([for AIX defines])
|
||||
AC_EGREP_CPP([yes],
|
||||
[
|
||||
|
@ -17,7 +17,7 @@ To compile GNU Midnight commander from GIT, the following software is
|
||||
required:
|
||||
|
||||
Autoconf 2.64 and above (latest is recommended)
|
||||
Automake 1.12 and above (latest is recommended)
|
||||
Automake 1.14 and above (latest is recommended)
|
||||
Gettext 0.18.2 and above
|
||||
Glib 2.32 and above
|
||||
|
||||
|
@ -5,7 +5,7 @@ Build requirements for GNU Midnight Commander
|
||||
- gcc
|
||||
- make
|
||||
- autoconf >= 2.64
|
||||
- automake >= 1.12
|
||||
- automake >= 1.14
|
||||
- libtool
|
||||
- glib2 >= 2.32
|
||||
- slang2 or ncurses
|
||||
|
@ -4,7 +4,8 @@ dnl Check flags supported by C compiler
|
||||
dnl
|
||||
dnl @author Slava Zanko <slavazanko@gmail.com>
|
||||
dnl @modified by Andrew Borodin <aborodin@vmail.ru>
|
||||
dnl @version 2021-09-19
|
||||
dnl @modified by Yury V. Zaytsev <yury@shurup.com>
|
||||
dnl @version 2024-11-03
|
||||
dnl @license GPL
|
||||
dnl @copyright Free Software Foundation, Inc.
|
||||
|
||||
@ -17,62 +18,54 @@ AC_DEFUN([mc_CHECK_CFLAGS],[
|
||||
case "$CC" in
|
||||
gcc*)
|
||||
AX_APPEND_COMPILE_FLAGS([-fdiagnostics-show-option], [mc_configured_cflags])
|
||||
dnl AX_APPEND_COMPILE_FLAGS([-fno-stack-protector], [mc_configured_cflags])
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl Sorted -W options:
|
||||
AX_APPEND_COMPILE_FLAGS([-Wassign-enum], [mc_configured_cflags], [$EXTRA_OPTION])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wall], [mc_configured_cflags], [$EXTRA_OPTION])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wextra], [mc_configured_cflags], [$EXTRA_OPTION])
|
||||
|
||||
dnl Enable support for C standard features up to (and including) C99 and pedantic warnings
|
||||
AX_APPEND_COMPILE_FLAGS([-Wattributes], [mc_configured_cflags], [$EXTRA_OPTION])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wimplicit-function-declaration], [mc_configured_cflags], [$EXTRA_OPTION])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wimplicit-int], [mc_configured_cflags], [$EXTRA_OPTION])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wno-declaration-after-statement], [mc_configured_cflags], [$EXTRA_OPTION])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wno-long-long], [mc_configured_cflags], [$EXTRA_OPTION])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wno-vla], [mc_configured_cflags], [$EXTRA_OPTION])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wincompatible-pointer-types], [mc_configured_cflags], [$EXTRA_OPTION])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wint-conversion], [mc_configured_cflags], [$EXTRA_OPTION])
|
||||
|
||||
dnl Sorted -W options not included in -Wall and -Wextra
|
||||
AX_APPEND_COMPILE_FLAGS([-Wbad-function-cast], [mc_configured_cflags], [$EXTRA_OPTION])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wcomment], [mc_configured_cflags], [$EXTRA_OPTION])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wconditional-uninitialized], [mc_configured_cflags], [$EXTRA_OPTION])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wdeclaration-after-statement], [mc_configured_cflags], [$EXTRA_OPTION])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wfloat-conversion], [mc_configured_cflags], [$EXTRA_OPTION])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wfloat-equal], [mc_configured_cflags], [$EXTRA_OPTION])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wformat], [mc_configured_cflags], [$EXTRA_OPTION])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wformat-security], [mc_configured_cflags], [$EXTRA_OPTION])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wformat-signedness], [mc_configured_cflags], [$EXTRA_OPTION])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wimplicit], [mc_configured_cflags], [$EXTRA_OPTION])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wimplicit-fallthrough], [mc_configured_cflags], [$EXTRA_OPTION])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wignored-qualifiers], [mc_configured_cflags], [$EXTRA_OPTION])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wlogical-not-parentheses], [mc_configured_cflags], [$EXTRA_OPTION])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wmaybe-uninitialized], [mc_configured_cflags], [$EXTRA_OPTION])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wmissing-braces], [mc_configured_cflags], [$EXTRA_OPTION])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wmissing-declarations], [mc_configured_cflags], [$EXTRA_OPTION])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wmissing-field-initializers], [mc_configured_cflags], [$EXTRA_OPTION])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wmissing-format-attribute], [mc_configured_cflags], [$EXTRA_OPTION])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wmissing-parameter-type], [mc_configured_cflags], [$EXTRA_OPTION])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wmissing-prototypes], [mc_configured_cflags], [$EXTRA_OPTION])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wmissing-variable-declarations], [mc_configured_cflags], [$EXTRA_OPTION])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wnested-externs], [mc_configured_cflags], [$EXTRA_OPTION])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wno-long-long], [mc_configured_cflags], [$EXTRA_OPTION])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wno-unreachable-code], [mc_configured_cflags], [$EXTRA_OPTION])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wparentheses], [mc_configured_cflags], [$EXTRA_OPTION])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wpointer-arith], [mc_configured_cflags], [$EXTRA_OPTION])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wpointer-sign], [mc_configured_cflags], [$EXTRA_OPTION])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wredundant-decls], [mc_configured_cflags], [$EXTRA_OPTION])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wreturn-type], [mc_configured_cflags], [$EXTRA_OPTION])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wsequence-point], [mc_configured_cflags], [$EXTRA_OPTION])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wshadow], [mc_configured_cflags], [$EXTRA_OPTION])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wsign-compare], [mc_configured_cflags], [$EXTRA_OPTION])
|
||||
dnl AX_APPEND_COMPILE_FLAGS([-Wstrict-aliasing], [mc_configured_cflags], [$EXTRA_OPTION])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wstrict-prototypes], [mc_configured_cflags], [$EXTRA_OPTION])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wswitch], [mc_configured_cflags], [$EXTRA_OPTION])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wswitch-default], [mc_configured_cflags], [$EXTRA_OPTION])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wtype-limits], [mc_configured_cflags], [$EXTRA_OPTION])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wundef], [mc_configured_cflags], [$EXTRA_OPTION])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wuninitialized], [mc_configured_cflags], [$EXTRA_OPTION])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wunreachable-code], [mc_configured_cflags], [$EXTRA_OPTION])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wunused-but-set-variable], [mc_configured_cflags], [$EXTRA_OPTION])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wunused-function], [mc_configured_cflags], [$EXTRA_OPTION])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wunused-label], [mc_configured_cflags], [$EXTRA_OPTION])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wunused-parameter], [mc_configured_cflags], [$EXTRA_OPTION])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wunused-result], [mc_configured_cflags], [$EXTRA_OPTION])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wunused-value], [mc_configured_cflags], [$EXTRA_OPTION])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wunused-variable], [mc_configured_cflags], [$EXTRA_OPTION])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wwrite-strings], [mc_configured_cflags], [$EXTRA_OPTION])
|
||||
|
||||
dnl Explicitly disabled warnings
|
||||
|
||||
dnl This flags casts like (GCompareDataFunc) with missing parameter
|
||||
AX_APPEND_COMPILE_FLAGS([-Wno-cast-function-type], [mc_configured_cflags], [$EXTRA_OPTION])
|
||||
|
||||
dnl https://github.com/llvm/llvm-project/issues/20574
|
||||
AX_APPEND_COMPILE_FLAGS([-Wno-assign-enum], [mc_configured_cflags], [$EXTRA_OPTION])
|
||||
|
||||
AC_LANG_POP()
|
||||
])
|
||||
|
Loading…
Reference in New Issue
Block a user