Merge branch '4495_alpine_support'

Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
This commit is contained in:
Yury V. Zaytsev 2024-10-19 08:45:14 +02:00
commit 6fb0bb589f
3 changed files with 18 additions and 10 deletions

View File

@ -346,6 +346,10 @@ dnl ############################################################################
dnl OS specific stuff dnl OS specific stuff
dnl ############################################################################ dnl ############################################################################
AC_CHECK_DECLS([environ], , ,
[ #include <unistd.h>
#include <stdlib.h> ])
case $host_os in case $host_os in
*os400) *os400)
AC_PATH_PROG([PERL], [perl], [/QOpenSys/pkgs/bin/perl]) AC_PATH_PROG([PERL], [perl], [/QOpenSys/pkgs/bin/perl])

View File

@ -54,8 +54,7 @@
/*** global variables ****************************************************************************/ /*** global variables ****************************************************************************/
/* Linux declares environ in <unistd.h>, so don't repeat it here. */ #if !HAVE_DECL_ENVIRON
#if (!(defined(__linux__) && defined (__USE_GNU)) && !defined(__CYGWIN__))
extern char **environ; extern char **environ;
#endif #endif

View File

@ -34,19 +34,24 @@
# and this notice are preserved. This file is offered as-is, without any # and this notice are preserved. This file is offered as-is, without any
# warranty. # warranty.
# Yury Zaytsev: #serial 11
# Toggle Werror since at some point clang started treating unknown -W
# flags as warnings, succeeding with the build, yet issuing an annoying
# warning.
#serial 6
AC_DEFUN([AX_CHECK_COMPILE_FLAG], AC_DEFUN([AX_CHECK_COMPILE_FLAG],
[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF [AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [ AC_CACHE_CHECK([whether the _AC_LANG compiler accepts $1], CACHEVAR, [
ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
_AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1 -Werror" if test x"m4_case(_AC_LANG,
[C], [$GCC],
[C++], [$GXX],
[Fortran], [$GFC],
[Fortran 77], [$G77],
[Objective C], [$GOBJC],
[Objective C++], [$GOBJCXX],
[no])" = xyes ; then
add_gnu_werror="-Werror"
fi
_AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1 $add_gnu_werror"
AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])], AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
[AS_VAR_SET(CACHEVAR,[yes])], [AS_VAR_SET(CACHEVAR,[yes])],
[AS_VAR_SET(CACHEVAR,[no])]) [AS_VAR_SET(CACHEVAR,[no])])