[gentoo-commits] proj/sandbox:master commit in: m4/

2022-12-30 Thread Mike Gilbert
commit: 8d999c4fd1c4f05af56e0f11cd5d9082a013ad74
Author: Mike Gilbert  gentoo  org>
AuthorDate: Fri Dec 30 21:27:35 2022 +
Commit: Mike Gilbert  gentoo  org>
CommitDate: Fri Dec 30 21:27:35 2022 +
URL:https://gitweb.gentoo.org/proj/sandbox.git/commit/?id=8d999c4f

Update ax_compiler_vendor.m4

Signed-off-by: Mike Gilbert  gentoo.org>

 m4/ax_compiler_vendor.m4 | 12 +++-
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/m4/ax_compiler_vendor.m4 b/m4/ax_compiler_vendor.m4
index f06e865..039f99d 100644
--- a/m4/ax_compiler_vendor.m4
+++ b/m4/ax_compiler_vendor.m4
@@ -12,10 +12,11 @@
 #   returned in the cache variable $ax_cv_c_compiler_vendor for C,
 #   $ax_cv_cxx_compiler_vendor for C++ or $ax_cv_fc_compiler_vendor for
 #   (modern) Fortran.  The value is one of "intel", "ibm", "pathscale",
-#   "clang" (LLVM), "cray", "fujitsu", "sdcc", "sx", "portland" (PGI), "gnu"
-#   (GCC), "sun" (Oracle Developer Studio), "hp", "dec", "borland",
-#   "comeau", "kai", "lcc", "sgi", "microsoft", "metrowerks", "watcom",
-#   "tcc" (Tiny CC) or "unknown" (if the compiler cannot be determined).
+#   "clang" (LLVM), "cray", "fujitsu", "sdcc", "sx", "nvhpc" (NVIDIA HPC
+#   Compiler), "portland" (PGI), "gnu" (GCC), "sun" (Oracle Developer
+#   Studio), "hp", "dec", "borland", "comeau", "kai", "lcc", "sgi",
+#   "microsoft", "metrowerks", "watcom", "tcc" (Tiny CC) or "unknown" (if
+#   the compiler cannot be determined).
 #
 #   To check for a Fortran compiler, you must first call AC_FC_PP_SRCEXT
 #   with an appropriate preprocessor-enabled extension.  For example:
@@ -58,7 +59,7 @@
 #   modified version of the Autoconf Macro, you may extend this special
 #   exception to the GPL to apply to your modified version as well.
 
-#serial 30
+#serial 32
 
 AC_DEFUN([AX_COMPILER_VENDOR], [dnl
 AC_CACHE_CHECK([for _AC_LANG compiler vendor], 
ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor, [dnl
@@ -78,6 +79,7 @@ AC_DEFUN([AX_COMPILER_VENDOR], [dnl
fujitsu:__FUJITSU
sdcc:   SDCC,__SDCC
sx: _SX
+   nvhpc:  __NVCOMPILER
portland:   __PGI
gnu:__GNUC__
sun:__SUNPRO_C,__SUNPRO_CC,__SUNPRO_F90,__SUNPRO_F95



[gentoo-commits] proj/sandbox:master commit in: m4/, /

2021-11-05 Thread Mike Frysinger
commit: 34bd750be930dee47ba6114f211aa97935939ecc
Author: Mike Frysinger  gentoo  org>
AuthorDate: Sat Nov  6 00:49:22 2021 +
Commit: Mike Frysinger  gentoo  org>
CommitDate: Sat Nov  6 00:49:22 2021 +
URL:https://gitweb.gentoo.org/proj/sandbox.git/commit/?id=34bd750b

build: slim down autoconf-archive macro search

Only copy in files that define the macros we need and not ones that
reference the macros.  This avoids copying a lot unused files in.

Signed-off-by: Mike Frysinger  gentoo.org>

 autogen.sh  |  13 +-
 m4/ax_append_compile_flags.m4   |  46 
 m4/ax_append_flag.m4|  50 
 m4/ax_append_link_flags.m4  |  44 ---
 m4/ax_cc_maxopt.m4  | 191 -
 m4/ax_cflags_force_c89.m4   |  72 -
 m4/ax_cflags_no_writable_strings.m4 |  99 ---
 m4/ax_cflags_strict_prototypes.m4   |  97 ---
 m4/ax_compiler_flags.m4 | 158 ---
 m4/ax_compiler_flags_cflags.m4  | 161 ---
 m4/ax_compiler_flags_cxxflags.m4| 136 -
 m4/ax_compiler_flags_gir.m4 |  60 
 m4/ax_compiler_flags_ldflags.m4 | 111 
 m4/ax_compiler_version.m4   | 529 
 m4/ax_cxx_cppflags_std_lang.m4  |  41 ---
 m4/ax_cxx_cxxflags_std_lang.m4  |  36 ---
 m4/ax_cxx_ldflags_std_lang.m4   |  36 ---
 m4/ax_gcc_archflag.m4   | 267 --
 18 files changed, 10 insertions(+), 2137 deletions(-)

diff --git a/autogen.sh b/autogen.sh
index e583300..432152b 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -10,11 +10,18 @@ rm -f m4/*.m4
 # not everyone has sys-devel/autoconf-archive installed
 has() { [[ " ${*:2} " == *" $1 "* ]] ; }
 import_ax() {
-   local macro content m4 lm4s=()
+   local macro content m4 found lm4s=()
content=$(sed -e '/^[[:space:]]*#/d' -e 's:\.*::' "$@")
for macro in $(echo "${content}" | grep -o '\' | sort -u) ; 
do
-   for m4 in $(grep -rl "\[${macro}\]" /usr/share/aclocal/) ; do
-   has ${m4} "${m4s[@]}" || lm4s+=( ${m4} )
+   if ! found=$(grep -rl "AC_DEFUN(\[${macro}\]" 
/usr/share/aclocal/) ; then
+   echo "error: ${macro}: unable to locate m4 definition"
+   exit 1
+   fi
+   for m4 in ${found} ; do
+   if ! has ${m4} "${m4s[@]}" "${lm4s[@]}" ; then
+   echo "$*: ${macro}: ${m4}"
+   lm4s+=( ${m4} )
+   fi
done
done
if [[ ${#lm4s[@]} -gt 0 ]] ; then

diff --git a/m4/ax_append_compile_flags.m4 b/m4/ax_append_compile_flags.m4
deleted file mode 100644
index 9c85635..000
--- a/m4/ax_append_compile_flags.m4
+++ /dev/null
@@ -1,46 +0,0 @@
-# 
-#  https://www.gnu.org/software/autoconf-archive/ax_append_compile_flags.html
-# 
-#
-# SYNOPSIS
-#
-#   AX_APPEND_COMPILE_FLAGS([FLAG1 FLAG2 ...], [FLAGS-VARIABLE], 
[EXTRA-FLAGS], [INPUT])
-#
-# DESCRIPTION
-#
-#   For every FLAG1, FLAG2 it is checked whether the compiler works with the
-#   flag.  If it does, the flag is added FLAGS-VARIABLE
-#
-#   If FLAGS-VARIABLE is not specified, the current language's flags (e.g.
-#   CFLAGS) is used.  During the check the flag is always added to the
-#   current language's flags.
-#
-#   If EXTRA-FLAGS is defined, it is added to the current language's default
-#   flags (e.g. CFLAGS) when the check is done.  The check is thus made with
-#   the flags: "CFLAGS EXTRA-FLAGS FLAG".  This can for example be used to
-#   force the compiler to issue an error when a bad flag is given.
-#
-#   INPUT gives an alternative input source to AC_COMPILE_IFELSE.
-#
-#   NOTE: This macro depends on the AX_APPEND_FLAG and
-#   AX_CHECK_COMPILE_FLAG. Please keep this macro in sync with
-#   AX_APPEND_LINK_FLAGS.
-#
-# LICENSE
-#
-#   Copyright (c) 2011 Maarten Bosmans 
-#
-#   Copying and distribution of this file, with or without modification, are
-#   permitted in any medium without royalty provided the copyright notice
-#   and this notice are preserved.  This file is offered as-is, without any
-#   warranty.
-
-#serial 7
-
-AC_DEFUN([AX_APPEND_COMPILE_FLAGS],
-[AX_REQUIRE_DEFINED([AX_CHECK_COMPILE_FLAG])
-AX_REQUIRE_DEFINED([AX_APPEND_FLAG])
-for flag in $1; do
-  AX_CHECK_COMPILE_FLAG([$flag], [AX_APPEND_FLAG([$flag], [$2])], [], [$3], 
[$4])
-done
-])dnl AX_APPEND_COMPILE_FLAGS

diff --git a/m4/ax_append_flag.m4 b/m4/ax_append_flag.m4
deleted file mode 100644
index dd6d8b6..000
--- a/m4/ax_append_flag.m4
+++ /dev/null
@@ -1,50 +0,0 @@
-# ===
-#  https://www.gnu.org/software/autoconf-archive/ax_append_flag.html
-# 

[gentoo-commits] proj/sandbox:master commit in: m4/

2021-03-27 Thread Sergei Trofimovich
commit: 6b8c47361d729c942fcf9fadb69075491b7c1f83
Author: Sergei Trofimovich  gentoo  org>
AuthorDate: Sat Mar 27 10:48:41 2021 +
Commit: Sergei Trofimovich  gentoo  org>
CommitDate: Sat Mar 27 10:48:41 2021 +
URL:https://gitweb.gentoo.org/proj/sandbox.git/commit/?id=6b8c4736

m4: pull missing ax_*.m4 files

Signed-off-by: Sergei Trofimovich  gentoo.org>

 m4/ax_cc_maxopt.m4 | 191 +++
 m4/ax_compiler_vendor.m4   | 117 +
 m4/ax_compiler_version.m4  | 529 +
 m4/ax_cxx_cppflags_std_lang.m4 |  41 
 m4/ax_cxx_cxxflags_std_lang.m4 |  36 +++
 m4/ax_cxx_ldflags_std_lang.m4  |  36 +++
 m4/ax_gcc_archflag.m4  | 267 +
 m4/ax_prepend_flag.m4  |  51 
 8 files changed, 1268 insertions(+)

diff --git a/m4/ax_cc_maxopt.m4 b/m4/ax_cc_maxopt.m4
new file mode 100644
index 000..c463264
--- /dev/null
+++ b/m4/ax_cc_maxopt.m4
@@ -0,0 +1,191 @@
+# ===
+#   https://www.gnu.org/software/autoconf-archive/ax_cc_maxopt.html
+# ===
+#
+# SYNOPSIS
+#
+#   AX_CC_MAXOPT
+#
+# DESCRIPTION
+#
+#   Try to turn on "good" C optimization flags for various compilers and
+#   architectures, for some definition of "good". (In our case, good for
+#   FFTW and hopefully for other scientific codes. Modify as needed.)
+#
+#   The user can override the flags by setting the CFLAGS environment
+#   variable. The user can also specify --enable-portable-binary in order to
+#   disable any optimization flags that might result in a binary that only
+#   runs on the host architecture.
+#
+#   Note also that the flags assume that ANSI C aliasing rules are followed
+#   by the code (e.g. for gcc's -fstrict-aliasing), and that floating-point
+#   computations can be re-ordered as needed.
+#
+#   Requires macros: AX_CHECK_COMPILE_FLAG, AX_COMPILER_VENDOR,
+#   AX_GCC_ARCHFLAG, AX_GCC_X86_CPUID.
+#
+# LICENSE
+#
+#   Copyright (c) 2008 Steven G. Johnson 
+#   Copyright (c) 2008 Matteo Frigo
+#
+#   This program is free software: you can redistribute it and/or modify it
+#   under the terms of the GNU General Public License as published by the
+#   Free Software Foundation, either version 3 of the License, or (at your
+#   option) any later version.
+#
+#   This program is distributed in the hope that it will be useful, but
+#   WITHOUT ANY WARRANTY; without even the implied warranty of
+#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+#   Public License for more details.
+#
+#   You should have received a copy of the GNU General Public License along
+#   with this program. If not, see .
+#
+#   As a special exception, the respective Autoconf Macro's copyright owner
+#   gives unlimited permission to copy, distribute and modify the configure
+#   scripts that are the output of Autoconf when processing the Macro. You
+#   need not follow the terms of the GNU General Public License when using
+#   or distributing such scripts, even though portions of the text of the
+#   Macro appear in them. The GNU General Public License (GPL) does govern
+#   all other use of the material that constitutes the Autoconf Macro.
+#
+#   This special exception to the GPL applies to versions of the Autoconf
+#   Macro released by the Autoconf Archive. When you make and distribute a
+#   modified version of the Autoconf Macro, you may extend this special
+#   exception to the GPL to apply to your modified version as well.
+
+#serial 18
+
+AC_DEFUN([AX_CC_MAXOPT],
+[
+AC_REQUIRE([AC_PROG_CC])
+AC_REQUIRE([AX_COMPILER_VENDOR])
+AC_REQUIRE([AC_CANONICAL_HOST])
+
+AC_ARG_ENABLE(portable-binary, [AS_HELP_STRING([--enable-portable-binary], 
[disable compiler optimizations that would produce unportable binaries])],
+   acx_maxopt_portable=$enableval, acx_maxopt_portable=no)
+
+# Try to determine "good" native compiler flags if none specified via CFLAGS
+if test "$ac_test_CFLAGS" != "set"; then
+  case $ax_cv_c_compiler_vendor in
+dec) CFLAGS="$CFLAGS -newc -w0 -O5 -ansi_alias -ansi_args -fp_reorder 
-tune host"
+if test "x$acx_maxopt_portable" = xno; then
+   CFLAGS="$CFLAGS -arch host"
+ fi;;
+
+sun) CFLAGS="$CFLAGS -native -fast -xO5 -dalign"
+if test "x$acx_maxopt_portable" = xyes; then
+  CFLAGS="$CFLAGS -xarch=generic"
+ fi;;
+
+hp)  CFLAGS="$CFLAGS +Oall +Optrs_ansi +DSnative"
+if test "x$acx_maxopt_portable" = xyes; then
+  CFLAGS="$CFLAGS +DAportable"
+fi;;
+
+ibm) if test "x$acx_maxopt_portable" = xno; then
+   xlc_opt="-qarch=auto -qtune=auto"
+else
+   xlc_opt="-qtune=auto"
+fi
+ AX_CHECK_COMPILE_FLAG($xlc_opt,
+   CFLAGS="$CFLAGS -O3 -qansialias -w $xlc_opt",
+   

[gentoo-commits] proj/sandbox:master commit in: m4/

2021-03-11 Thread Michał Górny
commit: 7635970133adc0135e88ebcdf2ab127bf65cf6c6
Author: Michał Górny  gentoo  org>
AuthorDate: Thu Mar 11 08:45:32 2021 +
Commit: Michał Górny  gentoo  org>
CommitDate: Thu Mar 11 08:47:02 2021 +
URL:https://gitweb.gentoo.org/proj/sandbox.git/commit/?id=76359701

Update m4 macros

Signed-off-by: Michał Górny  gentoo.org>

 m4/ax_cflags_warn_all.m4 | 180 ---
 1 file changed, 108 insertions(+), 72 deletions(-)

diff --git a/m4/ax_cflags_warn_all.m4 b/m4/ax_cflags_warn_all.m4
index 094577e..9235a18 100644
--- a/m4/ax_cflags_warn_all.m4
+++ b/m4/ax_cflags_warn_all.m4
@@ -4,33 +4,54 @@
 #
 # SYNOPSIS
 #
-#   AX_CFLAGS_WARN_ALL   [(shellvar [,default, [A/NA]])]
-#   AX_CXXFLAGS_WARN_ALL [(shellvar [,default, [A/NA]])]
-#   AX_FCFLAGS_WARN_ALL  [(shellvar [,default, [A/NA]])]
+#   AX_CFLAGS_WARN_ALL   [(shellvar[, default[, action-if-found[, 
action-if-not-found]]])]
+#   AX_CXXFLAGS_WARN_ALL [(shellvar[, default[, action-if-found[, 
action-if-not-found]]])]
+#   AX_FCFLAGS_WARN_ALL  [(shellvar[, default[, action-if-found[, 
action-if-not-found]]])]
 #
 # DESCRIPTION
 #
-#   Try to find a compiler option that enables most reasonable warnings.
+#   Specify compiler options that enable most reasonable warnings.  For the
+#   GNU Compiler Collection (GCC), for example, it will be "-Wall".  The
+#   result is added to shellvar, one of CFLAGS, CXXFLAGS or FCFLAGS if the
+#   first parameter is not specified.
 #
-#   For the GNU compiler it will be -Wall (and -ansi -pedantic) The result
-#   is added to the shellvar being CFLAGS, CXXFLAGS, or FCFLAGS by default.
+#   Each of these macros accepts the following optional arguments:
 #
-#   Currently this macro knows about the GCC, Solaris, Digital Unix, AIX,
-#   HP-UX, IRIX, NEC SX-5 (Super-UX 10), Cray J90 (Unicos 10.0.0.8), and
-#   Intel compilers.  For a given compiler, the Fortran flags are much more
-#   experimental than their C equivalents.
+# - $1 - shellvar
+# shell variable to use (CFLAGS, CXXFLAGS or FCFLAGS if not
+# specified, depending on macro)
 #
-#- $1 shell-variable-to-add-to : CFLAGS, CXXFLAGS, or FCFLAGS
-#- $2 add-value-if-not-found : nothing
-#- $3 action-if-found : add value to shellvariable
-#- $4 action-if-not-found : nothing
+# - $2 - default
+# value to use for flags if compiler vendor cannot be determined (by
+# default, "")
 #
-#   NOTE: These macros depend on AX_APPEND_FLAG.
+# - $3 - action-if-found
+# action to take if the compiler vendor has been successfully
+# determined (by default, add the appropriate compiler flags to
+# shellvar)
+#
+# - $4 - action-if-not-found
+# action to take if the compiler vendor has not been determined or
+# is unknown (by default, add the default flags, or "" if not
+# specified, to shellvar)
+#
+#   These macros use AX_COMPILER_VENDOR to determine which flags should be
+#   returned for a given compiler.  Not all compilers currently have flags
+#   defined for them; patches are welcome.  If need be, compiler flags may
+#   be made language-dependent: use a construct like the following:
+#
+# [vendor_name], [m4_if(_AC_LANG_PREFIX,[C],   VAR="--relevant-c-flags",dnl
+# m4_if(_AC_LANG_PREFIX,[CXX], 
VAR="--relevant-c++-flags",dnl
+# m4_if(_AC_LANG_PREFIX,[FC],  
VAR="--relevant-fortran-flags",dnl
+# VAR="$2"; FOUND="no")))],
+#
+#   Note: These macros also depend on AX_PREPEND_FLAG.
 #
 # LICENSE
 #
 #   Copyright (c) 2008 Guido U. Draheim 
 #   Copyright (c) 2010 Rhys Ulerich 
+#   Copyright (c) 2018 John Zaitseff 
 #
 #   This program is free software; you can redistribute it and/or modify it
 #   under the terms of the GNU General Public License as published by the
@@ -58,65 +79,80 @@
 #   modified version of the Autoconf Macro, you may extend this special
 #   exception to the GPL to apply to your modified version as well.
 
-#serial 16
+#serial 25
+
+AC_DEFUN([AX_FLAGS_WARN_ALL], [
+AX_REQUIRE_DEFINED([AX_PREPEND_FLAG])dnl
+AC_REQUIRE([AX_COMPILER_VENDOR])dnl
+
+AS_VAR_PUSHDEF([FLAGS], [m4_default($1,_AC_LANG_PREFIX[]FLAGS)])dnl
+AS_VAR_PUSHDEF([VAR],   [ac_cv_[]_AC_LANG_ABBREV[]flags_warn_all])dnl
+AS_VAR_PUSHDEF([FOUND], 
[ac_save_[]_AC_LANG_ABBREV[]flags_warn_all_found])dnl
+
+AC_CACHE_CHECK([FLAGS for most reasonable warnings], VAR, [
+   VAR=""
+   FOUND="yes"
+   dnl  Cases are listed in the order found in ax_compiler_vendor.m4
+   AS_CASE("$ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor",
+   [intel],[VAR="-w2"],
+   [ibm],  [VAR="-qsrcmsg 
-qinfo=all:noppt:noppc:noobs:nocnd"],
+   [pathscale],[],
+   [clang],[VAR="-Wall"],
+   [cray], [VAR="-h msglevel 2"],
+   [fujitsu],  [],
+   [sdcc],

[gentoo-commits] proj/sandbox:master commit in: m4/

2019-01-13 Thread Michał Górny
commit: ab30b4c73772c4b98a0d36e0f290f60bc8f16907
Author: Michał Górny  gentoo  org>
AuthorDate: Sun Jan 13 11:33:24 2019 +
Commit: Michał Górny  gentoo  org>
CommitDate: Sun Jan 13 11:38:51 2019 +
URL:https://gitweb.gentoo.org/proj/sandbox.git/commit/?id=ab30b4c7

m4: ax_* update via autogen.sh

Signed-off-by: Michał Górny  gentoo.org>

 m4/ax_append_compile_flags.m4   | 31 +-
 m4/ax_append_flag.m4| 31 +-
 m4/ax_append_link_flags.m4  | 31 +-
 m4/ax_cflags_force_c89.m4   | 41 +--
 m4/ax_cflags_no_writable_strings.m4 | 42 +---
 m4/ax_cflags_strict_prototypes.m4   | 43 ++---
 m4/ax_check_compile_flag.m4 | 31 +-
 m4/ax_check_link_flag.m4| 31 +-
 m4/ax_compiler_flags_cflags.m4  | 35 --
 m4/ax_compiler_flags_ldflags.m4 | 23 ++--
 10 files changed, 105 insertions(+), 234 deletions(-)

diff --git a/m4/ax_append_compile_flags.m4 b/m4/ax_append_compile_flags.m4
index 5b6f1af..9c85635 100644
--- a/m4/ax_append_compile_flags.m4
+++ b/m4/ax_append_compile_flags.m4
@@ -30,33 +30,12 @@
 #
 #   Copyright (c) 2011 Maarten Bosmans 
 #
-#   This program is free software: you can redistribute it and/or modify it
-#   under the terms of the GNU General Public License as published by the
-#   Free Software Foundation, either version 3 of the License, or (at your
-#   option) any later version.
-#
-#   This program is distributed in the hope that it will be useful, but
-#   WITHOUT ANY WARRANTY; without even the implied warranty of
-#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
-#   Public License for more details.
-#
-#   You should have received a copy of the GNU General Public License along
-#   with this program. If not, see .
-#
-#   As a special exception, the respective Autoconf Macro's copyright owner
-#   gives unlimited permission to copy, distribute and modify the configure
-#   scripts that are the output of Autoconf when processing the Macro. You
-#   need not follow the terms of the GNU General Public License when using
-#   or distributing such scripts, even though portions of the text of the
-#   Macro appear in them. The GNU General Public License (GPL) does govern
-#   all other use of the material that constitutes the Autoconf Macro.
-#
-#   This special exception to the GPL applies to versions of the Autoconf
-#   Macro released by the Autoconf Archive. When you make and distribute a
-#   modified version of the Autoconf Macro, you may extend this special
-#   exception to the GPL to apply to your modified version as well.
+#   Copying and distribution of this file, with or without modification, are
+#   permitted in any medium without royalty provided the copyright notice
+#   and this notice are preserved.  This file is offered as-is, without any
+#   warranty.
 
-#serial 6
+#serial 7
 
 AC_DEFUN([AX_APPEND_COMPILE_FLAGS],
 [AX_REQUIRE_DEFINED([AX_CHECK_COMPILE_FLAG])

diff --git a/m4/ax_append_flag.m4 b/m4/ax_append_flag.m4
index e8c5312..dd6d8b6 100644
--- a/m4/ax_append_flag.m4
+++ b/m4/ax_append_flag.m4
@@ -23,33 +23,12 @@
 #   Copyright (c) 2008 Guido U. Draheim 
 #   Copyright (c) 2011 Maarten Bosmans 
 #
-#   This program is free software: you can redistribute it and/or modify it
-#   under the terms of the GNU General Public License as published by the
-#   Free Software Foundation, either version 3 of the License, or (at your
-#   option) any later version.
-#
-#   This program is distributed in the hope that it will be useful, but
-#   WITHOUT ANY WARRANTY; without even the implied warranty of
-#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
-#   Public License for more details.
-#
-#   You should have received a copy of the GNU General Public License along
-#   with this program. If not, see .
-#
-#   As a special exception, the respective Autoconf Macro's copyright owner
-#   gives unlimited permission to copy, distribute and modify the configure
-#   scripts that are the output of Autoconf when processing the Macro. You
-#   need not follow the terms of the GNU General Public License when using
-#   or distributing such scripts, even though portions of the text of the
-#   Macro appear in them. The GNU General Public License (GPL) does govern
-#   all other use of the material that constitutes the Autoconf Macro.
-#
-#   This special exception to the GPL applies to versions of the Autoconf
-#   Macro released by the Autoconf Archive. When you make and distribute a
-#   modified version of the Autoconf Macro, you may extend this special
-#   exception to the GPL to apply to your modified version as well.
+#   Copying and 

[gentoo-commits] proj/sandbox:master commit in: /, m4/

2018-02-18 Thread Michał Górny
commit: 24c0098b3bd3b118774b6915c4eb217063dc4376
Author: Michał Górny  gentoo  org>
AuthorDate: Mon Feb 19 05:50:18 2018 +
Commit: Michał Górny  gentoo  org>
CommitDate: Mon Feb 19 05:50:18 2018 +
URL:https://gitweb.gentoo.org/proj/sandbox.git/commit/?id=24c0098b

Update autotools files

 INSTALL | 320 ++--
 m4/ax_append_compile_flags.m4   |  16 +-
 m4/ax_append_flag.m4|   8 +-
 m4/ax_append_link_flags.m4  |  12 +-
 m4/ax_cflags_force_c89.m4   |   6 +-
 m4/ax_cflags_no_writable_strings.m4 |  10 +-
 m4/ax_cflags_strict_prototypes.m4   |  14 +-
 m4/ax_cflags_warn_all.m4|   6 +-
 m4/ax_check_compile_flag.m4 |   6 +-
 m4/ax_check_link_flag.m4|   6 +-
 m4/ax_compiler_flags.m4 |   6 +-
 m4/ax_compiler_flags_cflags.m4  |  24 ++-
 m4/ax_compiler_flags_cxxflags.m4|  24 ++-
 m4/ax_compiler_flags_gir.m4 |   6 +-
 m4/ax_compiler_flags_ldflags.m4 |  41 +++--
 m4/ax_require_defined.m4|   4 +-
 16 files changed, 272 insertions(+), 237 deletions(-)

diff --git a/INSTALL b/INSTALL
index 2099840..8865734 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,8 +1,8 @@
 Installation Instructions
 *
 
-Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation,
-Inc.
+   Copyright (C) 1994-1996, 1999-2002, 2004-2016 Free Software
+Foundation, Inc.
 
Copying and distribution of this file, with or without modification,
 are permitted in any medium without royalty provided the copyright
@@ -12,97 +12,96 @@ without warranty of any kind.
 Basic Installation
 ==
 
-   Briefly, the shell command `./configure && make && make install'
+   Briefly, the shell command './configure && make && make install'
 should configure, build, and install this package.  The following
-more-detailed instructions are generic; see the `README' file for
+more-detailed instructions are generic; see the 'README' file for
 instructions specific to this package.  Some packages provide this
-`INSTALL' file but do not implement all of the features documented
+'INSTALL' file but do not implement all of the features documented
 below.  The lack of an optional feature in a given package is not
 necessarily a bug.  More recommendations for GNU packages can be found
 in *note Makefile Conventions: (standards)Makefile Conventions.
 
-   The `configure' shell script attempts to guess correct values for
+   The 'configure' shell script attempts to guess correct values for
 various system-dependent variables used during compilation.  It uses
-those values to create a `Makefile' in each directory of the package.
-It may also create one or more `.h' files containing system-dependent
-definitions.  Finally, it creates a shell script `config.status' that
+those values to create a 'Makefile' in each directory of the package.
+It may also create one or more '.h' files containing system-dependent
+definitions.  Finally, it creates a shell script 'config.status' that
 you can run in the future to recreate the current configuration, and a
-file `config.log' containing compiler output (useful mainly for
-debugging `configure').
+file 'config.log' containing compiler output (useful mainly for
+debugging 'configure').
 
-   It can also use an optional file (typically called `config.cache'
-and enabled with `--cache-file=config.cache' or simply `-C') that saves
-the results of its tests to speed up reconfiguring.  Caching is
-disabled by default to prevent problems with accidental use of stale
-cache files.
+   It can also use an optional file (typically called 'config.cache' and
+enabled with '--cache-file=config.cache' or simply '-C') that saves the
+results of its tests to speed up reconfiguring.  Caching is disabled by
+default to prevent problems with accidental use of stale cache files.
 
If you need to do unusual things to compile the package, please try
-to figure out how `configure' could check whether to do them, and mail
-diffs or instructions to the address given in the `README' so they can
+to figure out how 'configure' could check whether to do them, and mail
+diffs or instructions to the address given in the 'README' so they can
 be considered for the next release.  If you are using the cache, and at
-some point `config.cache' contains results you don't want to keep, you
+some point 'config.cache' contains results you don't want to keep, you
 may remove or edit it.
 
-   The file `configure.ac' (or `configure.in') is used to create
-`configure' by a program called `autoconf'.  You need `configure.ac' if
-you want to change it or regenerate `configure' using a newer version
-of `autoconf'.
+   The file 'configure.ac' (or 'configure.in') is used to create
+'configure' by a program called 'autoconf'.  You need 'configure.ac' if
+you want to change it or regenerate 'configure' using a newer version of
+'autoconf'.
 
The 

[gentoo-commits] proj/sandbox:master commit in: /, m4/

2015-09-20 Thread Mike Frysinger
commit: 182cde0e780e2b3b0bc7de51f4712c54f47c89ad
Author: Mike Frysinger  gentoo  org>
AuthorDate: Sun Sep 13 05:30:02 2015 +
Commit: Mike Frysinger  gentoo  org>
CommitDate: Sun Sep 13 05:30:02 2015 +
URL:https://gitweb.gentoo.org/proj/sandbox.git/commit/?id=182cde0e

update autotool files

Fix up the recursive logic with the ax processing so we actually grab all
the ones we need.  We probably grab too many, but meh.

Signed-off-by: Mike Frysinger  gentoo.org>

 INSTALL   |   6 +-
 autogen.sh|  15 ++--
 m4/ax_append_compile_flags.m4 |   6 +-
 m4/ax_append_flag.m4  |  30 
 m4/ax_append_link_flags.m4|   6 +-
 m4/ax_cflags_force_c89.m4 |   4 +-
 m4/ax_cflags_strict_prototypes.m4 |   4 +-
 m4/ax_cflags_warn_all.m4  |   4 +-
 m4/ax_check_compile_flag.m4   |  12 +--
 m4/ax_check_link_flag.m4  |  13 ++--
 m4/ax_compiler_flags.m4   | 158 ++
 m4/ax_compiler_flags_cflags.m4| 132 +++
 m4/ax_compiler_flags_cxxflags.m4  | 128 ++
 m4/ax_compiler_flags_gir.m4   |  60 +++
 m4/ax_compiler_flags_ldflags.m4   |  75 ++
 m4/ax_require_defined.m4  |  37 +
 16 files changed, 646 insertions(+), 44 deletions(-)

diff --git a/INSTALL b/INSTALL
index 6e90e07..2099840 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,7 +1,7 @@
 Installation Instructions
 *
 
-Copyright (C) 1994-1996, 1999-2002, 2004-2012 Free Software Foundation,
+Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation,
 Inc.
 
Copying and distribution of this file, with or without modification,
@@ -12,8 +12,8 @@ without warranty of any kind.
 Basic Installation
 ==
 
-   Briefly, the shell commands `./configure; make; make install' should
-configure, build, and install this package.  The following
+   Briefly, the shell command `./configure && make && make install'
+should configure, build, and install this package.  The following
 more-detailed instructions are generic; see the `README' file for
 instructions specific to this package.  Some packages provide this
 `INSTALL' file but do not implement all of the features documented

diff --git a/autogen.sh b/autogen.sh
index 8a53fc8..e583300 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -5,7 +5,7 @@ touch ChangeLog
 
 # avoid ugly warnings due to mismatch between local libtool and
 # whatever updated version is on the host
-find m4/*.m4 '!' -name 'ax_*.m4' -delete 2>/dev/null || :
+rm -f m4/*.m4
 
 # not everyone has sys-devel/autoconf-archive installed
 has() { [[ " ${*:2} " == *" $1 "* ]] ; }
@@ -13,9 +13,9 @@ import_ax() {
local macro content m4 lm4s=()
content=$(sed -e '/^[[:space:]]*#/d' -e 's:\.*::' "$@")
for macro in $(echo "${content}" | grep -o '\' | sort -u) ; 
do
-   if m4=$(grep -rl "\[${macro}\]" /usr/share/aclocal/) ; then
+   for m4 in $(grep -rl "\[${macro}\]" /usr/share/aclocal/) ; do
has ${m4} "${m4s[@]}" || lm4s+=( ${m4} )
-   fi
+   done
done
if [[ ${#lm4s[@]} -gt 0 ]] ; then
cp -v `printf '%s\n' ${lm4s[@]} | sort -u` m4/
@@ -24,8 +24,13 @@ import_ax() {
 }
 m4s=()
 import_ax configure.ac
-import_ax m4/ax_*.m4
-import_ax m4/ax_*.m4
+curr=1
+new=0
+while [[ ${curr} -ne ${new} ]] ; do
+   curr=${#m4s[@]}
+   import_ax m4/ax_*.m4
+   new=${#m4s[@]}
+done
 
 autoreconf -i -f
 

diff --git a/m4/ax_append_compile_flags.m4 b/m4/ax_append_compile_flags.m4
index 1f8e708..dc7b866 100644
--- a/m4/ax_append_compile_flags.m4
+++ b/m4/ax_append_compile_flags.m4
@@ -54,11 +54,11 @@
 #   modified version of the Autoconf Macro, you may extend this special
 #   exception to the GPL to apply to your modified version as well.
 
-#serial 3
+#serial 4
 
 AC_DEFUN([AX_APPEND_COMPILE_FLAGS],
-[AC_REQUIRE([AX_CHECK_COMPILE_FLAG])
-AC_REQUIRE([AX_APPEND_FLAG])
+[AX_REQUIRE_DEFINED([AX_CHECK_COMPILE_FLAG])
+AX_REQUIRE_DEFINED([AX_APPEND_FLAG])
 for flag in $1; do
   AX_CHECK_COMPILE_FLAG([$flag], [AX_APPEND_FLAG([$flag], [$2])], [], [$3])
 done

diff --git a/m4/ax_append_flag.m4 b/m4/ax_append_flag.m4
index 1d38b76..aeab899 100644
--- a/m4/ax_append_flag.m4
+++ b/m4/ax_append_flag.m4
@@ -49,21 +49,23 @@
 #   modified version of the Autoconf Macro, you may extend this special
 #   exception to the GPL to apply to your modified version as well.
 
-#serial 2
+#serial 5
 
 AC_DEFUN([AX_APPEND_FLAG],
-[AC_PREREQ(2.59)dnl for _AC_LANG_PREFIX
-AS_VAR_PUSHDEF([FLAGS], [m4_default($2,_AC_LANG_PREFIX[FLAGS])])dnl
-AS_VAR_SET_IF(FLAGS,
-  [case " AS_VAR_GET(FLAGS) " in
-*" $1 "*)
-  AC_RUN_LOG([: FLAGS already contains $1])
-  ;;
-*)
-  AC_RUN_LOG([: FLAGS="$FLAGS $1"])
-  AS_VAR_SET(FLAGS, ["AS_VAR_GET(FLAGS) $1"])
-  ;;