summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2019-04-08 12:44:17 -0700
committerDylan Baker <dylan@pnwbakers.com>2019-04-15 13:44:29 -0700
commit95aefc94a941701616fda0776a3bd15710c8c151 (patch)
treebced9cf424ee7eb0cf753503eaace7cec4f62b50 /m4
parentde0c97c8171f8a8183b94d8ac6997117c4671da8 (diff)
Delete autotools
Acked-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Eric Engestrom <eric.engestrom@intel.com> Acked-by: Marek Olšák <marek.olsak@amd.com> Acked-by: Jason Ekstrand <jason@jlekstrand.net> Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Acked-by: Matt Turner <mattst88@gmail.com>
Diffstat (limited to 'm4')
-rw-r--r--m4/.gitignore5
-rw-r--r--m4/ax_check_compile_flag.m479
-rw-r--r--m4/ax_check_gnu_make.m478
-rw-r--r--m4/ax_check_python_mako_module.m464
-rw-r--r--m4/ax_gcc_builtin.m4168
-rw-r--r--m4/ax_gcc_func_attribute.m4230
-rw-r--r--m4/ax_prog_bison.m471
-rw-r--r--m4/ax_prog_flex.m463
-rw-r--r--m4/ax_pthread.m4309
9 files changed, 0 insertions, 1067 deletions
diff --git a/m4/.gitignore b/m4/.gitignore
deleted file mode 100644
index 38066ddf7ca..00000000000
--- a/m4/.gitignore
+++ /dev/null
@@ -1,5 +0,0 @@
-libtool.m4
-ltoptions.m4
-ltsugar.m4
-ltversion.m4
-lt~obsolete.m4
diff --git a/m4/ax_check_compile_flag.m4 b/m4/ax_check_compile_flag.m4
deleted file mode 100644
index 0fdca907e8b..00000000000
--- a/m4/ax_check_compile_flag.m4
+++ /dev/null
@@ -1,79 +0,0 @@
-# ===========================================================================
-# http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
-#
-# DESCRIPTION
-#
-# Check whether the given FLAG works with the current language's compiler
-# or gives an error. (Warnings, however, are ignored)
-#
-# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
-# success/failure.
-#
-# 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: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
-# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG.
-#
-# LICENSE
-#
-# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
-# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
-#
-# 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 <http://www.gnu.org/licenses/>.
-#
-# 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.
-
-# Emil:
-# Toggle Werror since at some point clang started treating unknown -W
-# flags as warnings, succeeding with the build, yet issuing an annoying
-# warning.
-
-#serial 3
-
-AC_DEFUN([AX_CHECK_COMPILE_FLAG],
-[AC_PREREQ(2.59)dnl for _AC_LANG_PREFIX
-AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
-AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [
- ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
- _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1 -Werror"
- AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
- [AS_VAR_SET(CACHEVAR,[yes])],
- [AS_VAR_SET(CACHEVAR,[no])])
- _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags])
-AS_IF([test x"AS_VAR_GET(CACHEVAR)" = xyes],
- [m4_default([$2], :)],
- [m4_default([$3], :)])
-AS_VAR_POPDEF([CACHEVAR])dnl
-])dnl AX_CHECK_COMPILE_FLAGS
diff --git a/m4/ax_check_gnu_make.m4 b/m4/ax_check_gnu_make.m4
deleted file mode 100644
index 938aad71f58..00000000000
--- a/m4/ax_check_gnu_make.m4
+++ /dev/null
@@ -1,78 +0,0 @@
-# ===========================================================================
-# http://www.gnu.org/software/autoconf-archive/ax_check_gnu_make.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# AX_CHECK_GNU_MAKE()
-#
-# DESCRIPTION
-#
-# This macro searches for a GNU version of make. If a match is found, the
-# makefile variable `ifGNUmake' is set to the empty string, otherwise it
-# is set to "#". This is useful for including a special features in a
-# Makefile, which cannot be handled by other versions of make. The
-# variable _cv_gnu_make_command is set to the command to invoke GNU make
-# if it exists, the empty string otherwise.
-#
-# Here is an example of its use:
-#
-# Makefile.in might contain:
-#
-# # A failsafe way of putting a dependency rule into a makefile
-# $(DEPEND):
-# $(CC) -MM $(srcdir)/*.c > $(DEPEND)
-#
-# @ifGNUmake@ ifeq ($(DEPEND),$(wildcard $(DEPEND)))
-# @ifGNUmake@ include $(DEPEND)
-# @ifGNUmake@ endif
-#
-# Then configure.in would normally contain:
-#
-# AX_CHECK_GNU_MAKE()
-# AC_OUTPUT(Makefile)
-#
-# Then perhaps to cause gnu make to override any other make, we could do
-# something like this (note that GNU make always looks for GNUmakefile
-# first):
-#
-# if ! test x$_cv_gnu_make_command = x ; then
-# mv Makefile GNUmakefile
-# echo .DEFAULT: > Makefile ;
-# echo \ $_cv_gnu_make_command \$@ >> Makefile;
-# fi
-#
-# Then, if any (well almost any) other make is called, and GNU make also
-# exists, then the other make wraps the GNU make.
-#
-# LICENSE
-#
-# Copyright (c) 2008 John Darrington <j.darrington@elvis.murdoch.edu.au>
-#
-# 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_CHECK_GNU_MAKE], [ AC_CACHE_CHECK( for GNU make,_cv_gnu_make_command,
- _cv_gnu_make_command='' ;
-dnl Search all the common names for GNU make
- for a in "$MAKE" make gmake gnumake ; do
- if test -z "$a" ; then continue ; fi ;
- if ( sh -c "$a --version" 2> /dev/null | grep GNU 2>&1 > /dev/null ) ; then
- _cv_gnu_make_command=$a ;
- break;
- fi
- done ;
- ) ;
-dnl If there was a GNU version, then set @ifGNUmake@ to the empty string, '#' otherwise
- if test "x$_cv_gnu_make_command" != "x" ; then
- ifGNUmake='' ;
- else
- ifGNUmake='#' ;
- AC_MSG_RESULT("Not found");
- fi
- AC_SUBST(ifGNUmake)
-] )
diff --git a/m4/ax_check_python_mako_module.m4 b/m4/ax_check_python_mako_module.m4
deleted file mode 100644
index d6484e722fd..00000000000
--- a/m4/ax_check_python_mako_module.m4
+++ /dev/null
@@ -1,64 +0,0 @@
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# AX_CHECK_PYTHON_MAKO_MODULE(MIN_VERSION_NUMBER)
-#
-# DESCRIPTION
-#
-# Check whether Python mako module is installed and its version higher than
-# minimum requested.
-#
-# Example of its use:
-#
-# For example, the minimum mako version would be 0.7.3. Then configure.ac
-# would contain:
-#
-# AX_CHECK_PYTHON_MAKO_MODULE(0.7.3)
-#
-# LICENSE
-#
-# Copyright (c) 2014 Intel Corporation.
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to
-# deal in the Software without restriction, including without limitation the
-# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-# sell copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-# IN THE SOFTWARE.
-
-dnl macro that checks for mako module in python
-AC_DEFUN([AX_CHECK_PYTHON_MAKO_MODULE],
-[AC_MSG_CHECKING(if module mako in python is installed)
- echo "
-try:
- import sys
- import mako
- import distutils.version
-except ImportError as err:
- sys.exit(err)
-else:
- ver_req = distutils.version.LooseVersion('$1')
- ver_act = distutils.version.LooseVersion(mako.__version__)
- sys.exit(int(ver_req > ver_act))
- " | $PYTHON -
-
- if test $? -ne 0 ; then
- AC_MSG_RESULT(no)
- AC_SUBST(acv_mako_found, 'no')
- else
- AC_MSG_RESULT(yes)
- AC_SUBST(acv_mako_found, 'yes')
- fi
-])
diff --git a/m4/ax_gcc_builtin.m4 b/m4/ax_gcc_builtin.m4
deleted file mode 100644
index b28a91b14a5..00000000000
--- a/m4/ax_gcc_builtin.m4
+++ /dev/null
@@ -1,168 +0,0 @@
-# ===========================================================================
-# http://www.gnu.org/software/autoconf-archive/ax_gcc_builtin.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# AX_GCC_BUILTIN(BUILTIN)
-#
-# DESCRIPTION
-#
-# This macro checks if the compiler supports one of GCC's built-in
-# functions; many other compilers also provide those same built-ins.
-#
-# The BUILTIN parameter is the name of the built-in function.
-#
-# If BUILTIN is supported define HAVE_<BUILTIN>. Keep in mind that since
-# builtins usually start with two underscores they will be copied over
-# into the HAVE_<BUILTIN> definition (e.g. HAVE___BUILTIN_EXPECT for
-# __builtin_expect()).
-#
-# The macro caches its result in the ax_cv_have_<BUILTIN> variable (e.g.
-# ax_cv_have___builtin_expect).
-#
-# The macro currently supports the following built-in functions:
-#
-# __builtin_assume_aligned
-# __builtin_bswap32
-# __builtin_bswap64
-# __builtin_choose_expr
-# __builtin___clear_cache
-# __builtin_clrsb
-# __builtin_clrsbl
-# __builtin_clrsbll
-# __builtin_clz
-# __builtin_clzl
-# __builtin_clzll
-# __builtin_complex
-# __builtin_constant_p
-# __builtin_ctz
-# __builtin_ctzl
-# __builtin_ctzll
-# __builtin_expect
-# __builtin_ffs
-# __builtin_ffsl
-# __builtin_ffsll
-# __builtin_fpclassify
-# __builtin_huge_val
-# __builtin_huge_valf
-# __builtin_huge_vall
-# __builtin_inf
-# __builtin_infd128
-# __builtin_infd32
-# __builtin_infd64
-# __builtin_inff
-# __builtin_infl
-# __builtin_isinf_sign
-# __builtin_nan
-# __builtin_nand128
-# __builtin_nand32
-# __builtin_nand64
-# __builtin_nanf
-# __builtin_nanl
-# __builtin_nans
-# __builtin_nansf
-# __builtin_nansl
-# __builtin_object_size
-# __builtin_parity
-# __builtin_parityl
-# __builtin_parityll
-# __builtin_popcount
-# __builtin_popcountl
-# __builtin_popcountll
-# __builtin_powi
-# __builtin_powif
-# __builtin_powil
-# __builtin_prefetch
-# __builtin_trap
-# __builtin_types_compatible_p
-# __builtin_unreachable
-#
-# Unsuppored built-ins will be tested with an empty parameter set and the
-# result of the check might be wrong or meaningless so use with care.
-#
-# LICENSE
-#
-# Copyright (c) 2013 Gabriele Svelto <gabriele.svelto@gmail.com>
-#
-# 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 2
-
-AC_DEFUN([AX_GCC_BUILTIN], [
- AS_VAR_PUSHDEF([ac_var], [ax_cv_have_$1])
-
- AC_CACHE_CHECK([for $1], [ac_var], [
- AC_LINK_IFELSE([AC_LANG_PROGRAM([], [
- m4_case([$1],
- [__builtin_assume_aligned], [$1("", 0)],
- [__builtin_bswap32], [$1(0)],
- [__builtin_bswap64], [$1(0)],
- [__builtin_choose_expr], [$1(0, 0, 0)],
- [__builtin___clear_cache], [$1("", "")],
- [__builtin_clrsb], [$1(0)],
- [__builtin_clrsbl], [$1(0)],
- [__builtin_clrsbll], [$1(0)],
- [__builtin_clz], [$1(0)],
- [__builtin_clzl], [$1(0)],
- [__builtin_clzll], [$1(0)],
- [__builtin_complex], [$1(0.0, 0.0)],
- [__builtin_constant_p], [$1(0)],
- [__builtin_ctz], [$1(0)],
- [__builtin_ctzl], [$1(0)],
- [__builtin_ctzll], [$1(0)],
- [__builtin_expect], [$1(0, 0)],
- [__builtin_ffs], [$1(0)],
- [__builtin_ffsl], [$1(0)],
- [__builtin_ffsll], [$1(0)],
- [__builtin_fpclassify], [$1(0, 1, 2, 3, 4, 0.0)],
- [__builtin_huge_val], [$1()],
- [__builtin_huge_valf], [$1()],
- [__builtin_huge_vall], [$1()],
- [__builtin_inf], [$1()],
- [__builtin_infd128], [$1()],
- [__builtin_infd32], [$1()],
- [__builtin_infd64], [$1()],
- [__builtin_inff], [$1()],
- [__builtin_infl], [$1()],
- [__builtin_isinf_sign], [$1(0.0)],
- [__builtin_nan], [$1("")],
- [__builtin_nand128], [$1("")],
- [__builtin_nand32], [$1("")],
- [__builtin_nand64], [$1("")],
- [__builtin_nanf], [$1("")],
- [__builtin_nanl], [$1("")],
- [__builtin_nans], [$1("")],
- [__builtin_nansf], [$1("")],
- [__builtin_nansl], [$1("")],
- [__builtin_object_size], [$1("", 0)],
- [__builtin_parity], [$1(0)],
- [__builtin_parityl], [$1(0)],
- [__builtin_parityll], [$1(0)],
- [__builtin_popcount], [$1(0)],
- [__builtin_popcountl], [$1(0)],
- [__builtin_popcountll], [$1(0)],
- [__builtin_powi], [$1(0, 0)],
- [__builtin_powif], [$1(0, 0)],
- [__builtin_powil], [$1(0, 0)],
- [__builtin_prefetch], [$1("")],
- [__builtin_trap], [$1()],
- [__builtin_types_compatible_p], [$1(int, int)],
- [__builtin_unreachable], [$1()],
- [m4_warn([syntax], [Unsupported built-in $1, the test may fail])
- $1()]
- )
- ])],
- [AS_VAR_SET([ac_var], [yes])],
- [AS_VAR_SET([ac_var], [no])])
- ])
-
- AS_IF([test yes = AS_VAR_GET([ac_var])],
- [AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_$1), 1,
- [Define to 1 if the system has the `$1' built-in function])], [])
-
- AS_VAR_POPDEF([ac_var])
-])
diff --git a/m4/ax_gcc_func_attribute.m4 b/m4/ax_gcc_func_attribute.m4
deleted file mode 100644
index 2e67ea2926d..00000000000
--- a/m4/ax_gcc_func_attribute.m4
+++ /dev/null
@@ -1,230 +0,0 @@
-# ===========================================================================
-# http://www.gnu.org/software/autoconf-archive/ax_gcc_func_attribute.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# AX_GCC_FUNC_ATTRIBUTE(ATTRIBUTE)
-#
-# DESCRIPTION
-#
-# This macro checks if the compiler supports one of GCC's function
-# attributes; many other compilers also provide function attributes with
-# the same syntax. Compiler warnings are used to detect supported
-# attributes as unsupported ones are ignored by default so quieting
-# warnings when using this macro will yield false positives.
-#
-# The ATTRIBUTE parameter holds the name of the attribute to be checked.
-#
-# If ATTRIBUTE is supported define HAVE_FUNC_ATTRIBUTE_<ATTRIBUTE>.
-#
-# The macro caches its result in the ax_cv_have_func_attribute_<attribute>
-# variable.
-#
-# The macro currently supports the following function attributes:
-#
-# alias
-# aligned
-# alloc_size
-# always_inline
-# artificial
-# cold
-# const
-# constructor
-# deprecated
-# destructor
-# dllexport
-# dllimport
-# error
-# externally_visible
-# flatten
-# format
-# format_arg
-# gnu_inline
-# hot
-# ifunc
-# leaf
-# malloc
-# noclone
-# noinline
-# nonnull
-# noreturn
-# nothrow
-# optimize
-# packed
-# pure
-# returns_nonnull
-# unused
-# used
-# visibility
-# warning
-# warn_unused_result
-# weak
-# weakref
-#
-# Unsuppored function attributes will be tested with a prototype returning
-# an int and not accepting any arguments and the result of the check might
-# be wrong or meaningless so use with care.
-#
-# LICENSE
-#
-# Copyright (c) 2013 Gabriele Svelto <gabriele.svelto@gmail.com>
-#
-# 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 2
-
-# mattst88:
-# Added support for returns_nonnull attribute
-
-AC_DEFUN([AX_GCC_FUNC_ATTRIBUTE], [
- AS_VAR_PUSHDEF([ac_var], [ax_cv_have_func_attribute_$1])
-
- AC_CACHE_CHECK([for __attribute__(($1))], [ac_var], [
- AC_LINK_IFELSE([AC_LANG_PROGRAM([
- m4_case([$1],
- [alias], [
- int foo( void ) { return 0; }
- int bar( void ) __attribute__(($1("foo")));
- ],
- [aligned], [
- int foo( void ) __attribute__(($1(32)));
- ],
- [alloc_size], [
- void *foo(int a) __attribute__(($1(1)));
- ],
- [always_inline], [
- inline __attribute__(($1)) int foo( void ) { return 0; }
- ],
- [artificial], [
- inline __attribute__(($1)) int foo( void ) { return 0; }
- ],
- [cold], [
- int foo( void ) __attribute__(($1));
- ],
- [const], [
- int foo( void ) __attribute__(($1));
- ],
- [constructor], [
- int foo( void ) __attribute__(($1));
- ],
- [deprecated], [
- int foo( void ) __attribute__(($1("")));
- ],
- [destructor], [
- int foo( void ) __attribute__(($1));
- ],
- [dllexport], [
- __attribute__(($1)) int foo( void ) { return 0; }
- ],
- [dllimport], [
- int foo( void ) __attribute__(($1));
- ],
- [error], [
- int foo( void ) __attribute__(($1("")));
- ],
- [externally_visible], [
- int foo( void ) __attribute__(($1));
- ],
- [flatten], [
- int foo( void ) __attribute__(($1));
- ],
- [format], [
- int foo(const char *p, ...) __attribute__(($1(printf, 1, 2)));
- ],
- [format_arg], [
- char *foo(const char *p) __attribute__(($1(1)));
- ],
- [gnu_inline], [
- inline __attribute__(($1)) int foo( void ) { return 0; }
- ],
- [hot], [
- int foo( void ) __attribute__(($1));
- ],
- [ifunc], [
- int my_foo( void ) { return 0; }
- static int (*resolve_foo(void))(void) { return my_foo; }
- int foo( void ) __attribute__(($1("resolve_foo")));
- ],
- [leaf], [
- __attribute__(($1)) int foo( void ) { return 0; }
- ],
- [malloc], [
- void *foo( void ) __attribute__(($1));
- ],
- [noclone], [
- int foo( void ) __attribute__(($1));
- ],
- [noinline], [
- __attribute__(($1)) int foo( void ) { return 0; }
- ],
- [nonnull], [
- int foo(char *p) __attribute__(($1(1)));
- ],
- [noreturn], [
- void foo( void ) __attribute__(($1));
- ],
- [nothrow], [
- int foo( void ) __attribute__(($1));
- ],
- [optimize], [
- __attribute__(($1(3))) int foo( void ) { return 0; }
- ],
- [packed], [
- struct __attribute__(($1)) foo { int bar; };
- ],
- [pure], [
- int foo( void ) __attribute__(($1));
- ],
- [returns_nonnull], [
- int *foo( void ) __attribute__(($1));
- ],
- [unused], [
- int foo( void ) __attribute__(($1));
- ],
- [used], [
- int foo( void ) __attribute__(($1));
- ],
- [visibility], [
- int foo_def( void ) __attribute__(($1("default")));
- int foo_hid( void ) __attribute__(($1("hidden")));
- int foo_int( void ) __attribute__(($1("internal")));
- int foo_pro( void ) __attribute__(($1("protected")));
- ],
- [warning], [
- int foo( void ) __attribute__(($1("")));
- ],
- [warn_unused_result], [
- int foo( void ) __attribute__(($1));
- ],
- [weak], [
- int foo( void ) __attribute__(($1));
- ],
- [weakref], [
- static int foo( void ) { return 0; }
- static int bar( void ) __attribute__(($1("foo")));
- ],
- [
- m4_warn([syntax], [Unsupported attribute $1, the test may fail])
- int foo( void ) __attribute__(($1));
- ]
- )], [])
- ],
- dnl GCC doesn't exit with an error if an unknown attribute is
- dnl provided but only outputs a warning, so accept the attribute
- dnl only if no warning were issued.
- [AS_IF([test -s conftest.err],
- [AS_VAR_SET([ac_var], [no])],
- [AS_VAR_SET([ac_var], [yes])])],
- [AS_VAR_SET([ac_var], [no])])
- ])
-
- AS_IF([test yes = AS_VAR_GET([ac_var])],
- [AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_FUNC_ATTRIBUTE_$1), 1,
- [Define to 1 if the system has the `$1' function attribute])], [])
-
- AS_VAR_POPDEF([ac_var])
-])
diff --git a/m4/ax_prog_bison.m4 b/m4/ax_prog_bison.m4
deleted file mode 100644
index dae4470ea45..00000000000
--- a/m4/ax_prog_bison.m4
+++ /dev/null
@@ -1,71 +0,0 @@
-# ===========================================================================
-# http://www.gnu.org/software/autoconf-archive/ax_prog_bison.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# AX_PROG_BISON(ACTION-IF-TRUE,ACTION-IF-FALSE)
-#
-# DESCRIPTION
-#
-# Check whether bison is the parser generator. Run ACTION-IF-TRUE if
-# successful, ACTION-IF-FALSE otherwise
-#
-# LICENSE
-#
-# Copyright (c) 2009 Francesco Salvestrini <salvestrini@users.sourceforge.net>
-# Copyright (c) 2010 Diego Elio Petteno` <flameeyes@gmail.com>
-#
-# 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 2 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 <http://www.gnu.org/licenses/>.
-#
-# 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 9
-
-# mattst88:
-# Modified YACC assignment to remove -o y.tab.c since we're writing
-# our own .y/.yy rules.
-#
-# Replaced m4_ifnblank(...) with m4_ifval(m4_normalize(...), ...)
-# since m4_ifnblank requires autoconf-2.64.
-
-AC_DEFUN([AX_PROG_BISON], [
- AC_REQUIRE([AC_PROG_YACC])
- AC_REQUIRE([AC_PROG_EGREP])
-
- AC_CACHE_CHECK([if bison is the parser generator],[ax_cv_prog_bison],[
- AS_IF([$YACC --version 2>/dev/null | $EGREP -q '^bison '],
- [ax_cv_prog_bison=yes], [ax_cv_prog_bison=no])
- ])
- AS_IF([test "$ax_cv_prog_bison" = "yes"], [
- dnl replace the yacc-compatible compiler with the real bison, as
- dnl otherwise autoconf limits us to the POSIX yacc.
- dnl We also change the generated filename to the old one, so that
- dnl automake's ylwrap can deal with it.
- YACC="${YACC% -y}"
- ] m4_ifval(m4_normalize([$1]), [[$1]]),
- m4_ifval(m4_normalize([$2]), [[$2]])
- )
-])
diff --git a/m4/ax_prog_flex.m4 b/m4/ax_prog_flex.m4
deleted file mode 100644
index 1f1f5977613..00000000000
--- a/m4/ax_prog_flex.m4
+++ /dev/null
@@ -1,63 +0,0 @@
-# ===========================================================================
-# http://www.gnu.org/software/autoconf-archive/ax_prog_flex.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# AX_PROG_FLEX(ACTION-IF-TRUE,ACTION-IF-FALSE)
-#
-# DESCRIPTION
-#
-# Check whether flex is the scanner generator. Run ACTION-IF-TRUE if
-# successful, ACTION-IF-FALSE otherwise
-#
-# LICENSE
-#
-# Copyright (c) 2009 Francesco Salvestrini <salvestrini@users.sourceforge.net>
-# Copyright (c) 2010 Diego Elio Petteno` <flameeyes@gmail.com>
-#
-# 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 2 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 <http://www.gnu.org/licenses/>.
-#
-# 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 12
-
-# mattst88:
-# Replaced m4_ifnblank(...) with m4_ifval(m4_normalize(...), ...)
-# since m4_ifnblank requires autoconf-2.64.
-
-AC_DEFUN([AX_PROG_FLEX], [
- AC_REQUIRE([AM_PROG_LEX])
- AC_REQUIRE([AC_PROG_EGREP])
-
- AC_CACHE_CHECK([if flex is the lexer generator],[ax_cv_prog_flex],[
- AS_IF([$LEX --version 2>/dev/null | $EGREP -qw '^g?flex'],
- [ax_cv_prog_flex=yes], [ax_cv_prog_flex=no])
- ])
- AS_IF([test "$ax_cv_prog_flex" = "yes"],
- m4_ifval(m4_normalize([$1]), [[$1]]),
- m4_ifval(m4_normalize([$2]), [[$2]])
- )
-])
diff --git a/m4/ax_pthread.m4 b/m4/ax_pthread.m4
deleted file mode 100644
index d90de34d14b..00000000000
--- a/m4/ax_pthread.m4
+++ /dev/null
@@ -1,309 +0,0 @@
-# ===========================================================================
-# http://www.gnu.org/software/autoconf-archive/ax_pthread.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# AX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
-#
-# DESCRIPTION
-#
-# This macro figures out how to build C programs using POSIX threads. It
-# sets the PTHREAD_LIBS output variable to the threads library and linker
-# flags, and the PTHREAD_CFLAGS output variable to any special C compiler
-# flags that are needed. (The user can also force certain compiler
-# flags/libs to be tested by setting these environment variables.)
-#
-# Also sets PTHREAD_CC to any special C compiler that is needed for
-# multi-threaded programs (defaults to the value of CC otherwise). (This
-# is necessary on AIX to use the special cc_r compiler alias.)
-#
-# NOTE: You are assumed to not only compile your program with these flags,
-# but also link it with them as well. e.g. you should link with
-# $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS
-#
-# If you are only building threads programs, you may wish to use these
-# variables in your default LIBS, CFLAGS, and CC:
-#
-# LIBS="$PTHREAD_LIBS $LIBS"
-# CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-# CC="$PTHREAD_CC"
-#
-# In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant
-# has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to that name
-# (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
-#
-# Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the
-# PTHREAD_PRIO_INHERIT symbol is defined when compiling with
-# PTHREAD_CFLAGS.
-#
-# ACTION-IF-FOUND is a list of shell commands to run if a threads library
-# is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it
-# is not found. If ACTION-IF-FOUND is not specified, the default action
-# will define HAVE_PTHREAD.
-#
-# Please let the authors know if this macro fails on any platform, or if
-# you have any other suggestions or comments. This macro was based on work
-# by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help
-# from M. Frigo), as well as ac_pthread and hb_pthread macros posted by
-# Alejandro Forero Cuervo to the autoconf macro repository. We are also
-# grateful for the helpful feedback of numerous users.
-#
-# Updated for Autoconf 2.68 by Daniel Richard G.
-#
-# LICENSE
-#
-# Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
-# Copyright (c) 2011 Daniel Richard G. <skunk@iSKUNK.ORG>
-#
-# 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 <http://www.gnu.org/licenses/>.
-#
-# 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
-
-AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD])
-AC_DEFUN([AX_PTHREAD], [
-AC_REQUIRE([AC_CANONICAL_HOST])
-AC_LANG_PUSH([C])
-ax_pthread_ok=no
-
-# We used to check for pthread.h first, but this fails if pthread.h
-# requires special compiler flags (e.g. on True64 or Sequent).
-# It gets checked for in the link test anyway.
-
-# First of all, check if the user has set any of the PTHREAD_LIBS,
-# etcetera environment variables, and if threads linking works using
-# them:
-if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
- save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
- save_LIBS="$LIBS"
- LIBS="$PTHREAD_LIBS $LIBS"
- AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS])
- AC_TRY_LINK_FUNC(pthread_join, ax_pthread_ok=yes)
- AC_MSG_RESULT($ax_pthread_ok)
- if test x"$ax_pthread_ok" = xno; then
- PTHREAD_LIBS=""
- PTHREAD_CFLAGS=""
- fi
- LIBS="$save_LIBS"
- CFLAGS="$save_CFLAGS"
-fi
-
-# We must check for the threads library under a number of different
-# names; the ordering is very important because some systems
-# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
-# libraries is broken (non-POSIX).
-
-# Create a list of thread flags to try. Items starting with a "-" are
-# C compiler flags, and other items are library names, except for "none"
-# which indicates that we try without any flags at all, and "pthread-config"
-# which is a program returning the flags for the Pth emulation library.
-
-ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
-
-# The ordering *is* (sometimes) important. Some notes on the
-# individual items follow:
-
-# pthreads: AIX (must check this before -lpthread)
-# none: in case threads are in libc; should be tried before -Kthread and
-# other compiler flags to prevent continual compiler warnings
-# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
-# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
-# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
-# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
-# -pthreads: Solaris/gcc
-# -mthreads: Mingw32/gcc, Lynx/gcc
-# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
-# doesn't hurt to check since this sometimes defines pthreads too;
-# also defines -D_REENTRANT)
-# ... -mt is also the pthreads flag for HP/aCC
-# pthread: Linux, etcetera
-# --thread-safe: KAI C++
-# pthread-config: use pthread-config program (for GNU Pth library)
-
-case ${host_os} in
- solaris*)
-
- # On Solaris (at least, for some versions), libc contains stubbed
- # (non-functional) versions of the pthreads routines, so link-based
- # tests will erroneously succeed. (We need to link with -pthreads/-mt/
- # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather
- # a function called by this macro, so we could check for that, but
- # who knows whether they'll stub that too in a future libc.) So,
- # we'll just look for -pthreads and -lpthread first:
-
- ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags"
- ;;
-
- darwin*)
- ax_pthread_flags="-pthread $ax_pthread_flags"
- ;;
-esac
-
-if test x"$ax_pthread_ok" = xno; then
-for flag in $ax_pthread_flags; do
-
- case $flag in
- none)
- AC_MSG_CHECKING([whether pthreads work without any flags])
- ;;
-
- -*)
- AC_MSG_CHECKING([whether pthreads work with $flag])
- PTHREAD_CFLAGS="$flag"
- ;;
-
- pthread-config)
- AC_CHECK_PROG(ax_pthread_config, pthread-config, yes, no)
- if test x"$ax_pthread_config" = xno; then continue; fi
- PTHREAD_CFLAGS="`pthread-config --cflags`"
- PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
- ;;
-
- *)
- AC_MSG_CHECKING([for the pthreads library -l$flag])
- PTHREAD_LIBS="-l$flag"
- ;;
- esac
-
- save_LIBS="$LIBS"
- save_CFLAGS="$CFLAGS"
- LIBS="$PTHREAD_LIBS $LIBS"
- CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-
- # Check for various functions. We must include pthread.h,
- # since some functions may be macros. (On the Sequent, we
- # need a special flag -Kthread to make this header compile.)
- # We check for pthread_join because it is in -lpthread on IRIX
- # while pthread_create is in libc. We check for pthread_attr_init
- # due to DEC craziness with -lpthreads. We check for
- # pthread_cleanup_push because it is one of the few pthread
- # functions on Solaris that doesn't have a non-functional libc stub.
- # We try pthread_create on general principles.
- AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>
- static void routine(void *a) { a = 0; }
- static void *start_routine(void *a) { return a; }],
- [pthread_t th; pthread_attr_t attr;
- pthread_create(&th, 0, start_routine, 0);
- pthread_join(th, 0);
- pthread_attr_init(&attr);
- pthread_cleanup_push(routine, 0);
- pthread_cleanup_pop(0) /* ; */])],
- [ax_pthread_ok=yes],
- [])
-
- LIBS="$save_LIBS"
- CFLAGS="$save_CFLAGS"
-
- AC_MSG_RESULT($ax_pthread_ok)
- if test "x$ax_pthread_ok" = xyes; then
- break;
- fi
-
- PTHREAD_LIBS=""
- PTHREAD_CFLAGS=""
-done
-fi
-
-# Various other checks:
-if test "x$ax_pthread_ok" = xyes; then
- save_LIBS="$LIBS"
- LIBS="$PTHREAD_LIBS $LIBS"
- save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-
- # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
- AC_MSG_CHECKING([for joinable pthread attribute])
- attr_name=unknown
- for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
- AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>],
- [int attr = $attr; return attr /* ; */])],
- [attr_name=$attr; break],
- [])
- done
- AC_MSG_RESULT($attr_name)
- if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
- AC_DEFINE_UNQUOTED(PTHREAD_CREATE_JOINABLE, $attr_name,
- [Define to necessary symbol if this constant
- uses a non-standard name on your system.])
- fi
-
- AC_MSG_CHECKING([if more special flags are required for pthreads])
- flag=no
- case ${host_os} in
- aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";;
- osf* | hpux*) flag="-D_REENTRANT";;
- solaris*)
- if test "$GCC" = "yes"; then
- flag="-D_REENTRANT"
- else
- flag="-mt -D_REENTRANT"
- fi
- ;;
- esac
- AC_MSG_RESULT(${flag})
- if test "x$flag" != xno; then
- PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
- fi
-
- AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT],
- ax_cv_PTHREAD_PRIO_INHERIT, [
- AC_LINK_IFELSE([
- AC_LANG_PROGRAM([[#include <pthread.h>]], [[int i = PTHREAD_PRIO_INHERIT;]])],
- [ax_cv_PTHREAD_PRIO_INHERIT=yes],
- [ax_cv_PTHREAD_PRIO_INHERIT=no])
- ])
- AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"],
- AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], 1, [Have PTHREAD_PRIO_INHERIT.]))
-
- LIBS="$save_LIBS"
- CFLAGS="$save_CFLAGS"
-
- # More AIX lossage: must compile with xlc_r or cc_r
- if test x"$GCC" != xyes; then
- AC_CHECK_PROGS(PTHREAD_CC, xlc_r cc_r, ${CC})
- else
- PTHREAD_CC=$CC
- fi
-else
- PTHREAD_CC="$CC"
-fi
-
-AC_SUBST(PTHREAD_LIBS)
-AC_SUBST(PTHREAD_CFLAGS)
-AC_SUBST(PTHREAD_CC)
-
-# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
-if test x"$ax_pthread_ok" = xyes; then
- ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1])
- :
-else
- ax_pthread_ok=no
- $2
-fi
-AC_LANG_POP
-])dnl AX_PTHREAD