shithub: libsamplerate

Download patch

ref: ca40d099f899e92080d0dda639eb59e27b08d625
parent: e93f061363cde02030d20e6cb9555c587161d2ed
author: David Seifert <soap@gentoo.org>
date: Tue Jun 13 05:24:06 EDT 2017

Modernise to Automake 1.14

diff: cannot open a/M4//null: file does not exist: 'a/M4//null' diff: cannot open b/m4//null: file does not exist: 'b/m4//null'
--- a/.gitignore
+++ b/.gitignore
@@ -10,14 +10,14 @@
 .depend
 .deps
 .libs
-Cfg
+build-aux/
 Hack
 Images
-M4/libtool.m4
-M4/ltoptions.m4
-M4/ltsugar.m4
-M4/ltversion.m4
-M4/lt~obsolete.m4
+m4/libtool.m4
+m4/ltoptions.m4
+m4/ltsugar.m4
+m4/ltversion.m4
+m4/lt~obsolete.m4
 Makefile
 Makefile.in
 Octave/*.h
--- a/M4/ax_append_compile_flags.m4
+++ /dev/null
@@ -1,67 +1,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 <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 <https://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 6
-
-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
--- a/M4/ax_append_flag.m4
+++ /dev/null
@@ -1,71 +1,0 @@
-# ===========================================================================
-#      https://www.gnu.org/software/autoconf-archive/ax_append_flag.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-#   AX_APPEND_FLAG(FLAG, [FLAGS-VARIABLE])
-#
-# DESCRIPTION
-#
-#   FLAG is appended to the FLAGS-VARIABLE shell variable, with a space
-#   added in between.
-#
-#   If FLAGS-VARIABLE is not specified, the current language's flags (e.g.
-#   CFLAGS) is used.  FLAGS-VARIABLE is not changed if it already contains
-#   FLAG.  If FLAGS-VARIABLE is unset in the shell, it is set to exactly
-#   FLAG.
-#
-#   NOTE: Implementation based on AX_CFLAGS_GCC_OPTION.
-#
-# 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 <https://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 7
-
-AC_DEFUN([AX_APPEND_FLAG],
-[dnl
-AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_SET_IF
-AS_VAR_PUSHDEF([FLAGS], [m4_default($2,_AC_LANG_PREFIX[FLAGS])])
-AS_VAR_SET_IF(FLAGS,[
-  AS_CASE([" AS_VAR_GET(FLAGS) "],
-    [*" $1 "*], [AC_RUN_LOG([: FLAGS already contains $1])],
-    [
-     AS_VAR_APPEND(FLAGS,[" $1"])
-     AC_RUN_LOG([: FLAGS="$FLAGS"])
-    ])
-  ],
-  [
-  AS_VAR_SET(FLAGS,[$1])
-  AC_RUN_LOG([: FLAGS="$FLAGS"])
-  ])
-AS_VAR_POPDEF([FLAGS])dnl
-])dnl AX_APPEND_FLAG
--- a/M4/ax_check_compile_flag.m4
+++ /dev/null
@@ -1,74 +1,0 @@
-# ===========================================================================
-#  https://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 <https://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 5
-
-AC_DEFUN([AX_CHECK_COMPILE_FLAG],
-[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
-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"
-  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_VAR_IF(CACHEVAR,yes,
-  [m4_default([$2], :)],
-  [m4_default([$3], :)])
-AS_VAR_POPDEF([CACHEVAR])dnl
-])dnl AX_CHECK_COMPILE_FLAGS
--- a/M4/ax_compiler_vendor.m4
+++ /dev/null
@@ -1,87 +1,0 @@
-# ===========================================================================
-#    https://www.gnu.org/software/autoconf-archive/ax_compiler_vendor.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-#   AX_COMPILER_VENDOR
-#
-# DESCRIPTION
-#
-#   Determine the vendor of the C/C++ compiler, e.g., gnu, intel, ibm, sun,
-#   hp, borland, comeau, dec, cray, kai, lcc, metrowerks, sgi, microsoft,
-#   watcom, etc. The vendor is returned in the cache variable
-#   $ax_cv_c_compiler_vendor for C and $ax_cv_cxx_compiler_vendor for C++.
-#
-# LICENSE
-#
-#   Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
-#   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 <https://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 16
-
-AC_DEFUN([AX_COMPILER_VENDOR],
-[AC_CACHE_CHECK([for _AC_LANG compiler vendor], ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor,
-  dnl Please add if possible support to ax_compiler_version.m4
-  [# note: don't check for gcc first since some other compilers define __GNUC__
-  vendors="intel:     __ICC,__ECC,__INTEL_COMPILER
-           ibm:       __xlc__,__xlC__,__IBMC__,__IBMCPP__
-           pathscale: __PATHCC__,__PATHSCALE__
-           clang:     __clang__
-           cray:      _CRAYC
-           fujitsu:   __FUJITSU
-           gnu:       __GNUC__
-           sun:       __SUNPRO_C,__SUNPRO_CC
-           hp:        __HP_cc,__HP_aCC
-           dec:       __DECC,__DECCXX,__DECC_VER,__DECCXX_VER
-           borland:   __BORLANDC__,__CODEGEARC__,__TURBOC__
-           comeau:    __COMO__
-           kai:       __KCC
-           lcc:       __LCC__
-           sgi:       __sgi,sgi
-           microsoft: _MSC_VER
-           metrowerks: __MWERKS__
-           watcom:    __WATCOMC__
-           portland:  __PGI
-	   tcc:       __TINYC__
-           unknown:   UNKNOWN"
-  for ventest in $vendors; do
-    case $ventest in
-      *:) vendor=$ventest; continue ;;
-      *)  vencpp="defined("`echo $ventest | sed 's/,/) || defined(/g'`")" ;;
-    esac
-    AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[
-      #if !($vencpp)
-        thisisanerror;
-      #endif
-    ])], [break])
-  done
-  ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor=`echo $vendor | cut -d: -f1`
- ])
-])
--- a/M4/ax_compiler_version.m4
+++ /dev/null
@@ -1,492 +1,0 @@
-# ===========================================================================
-#   https://www.gnu.org/software/autoconf-archive/ax_compiler_version.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-#   AX_COMPILER_VERSION
-#
-# DESCRIPTION
-#
-#   This macro retrieves the compiler version and returns it in the cache
-#   variable $ax_cv_c_compiler_version for C and $ax_cv_cxx_compiler_version
-#   for C++.
-#
-#   Version is returned as epoch:major.minor.patchversion
-#
-#   Epoch is used in order to have an increasing version number in case of
-#   marketing change.
-#
-#   Epoch use: * borland compiler use chronologically 0turboc for turboc
-#   era,
-#
-#     1borlanc BORLANDC++ before 5, 2cppbuilder for cppbuilder era,
-#     3borlancpp for return of BORLANDC++ (after version 5.5),
-#     4cppbuilder for cppbuilder with year version,
-#     and 5xe for XE era.
-#
-#   An empty string is returned otherwise.
-#
-# LICENSE
-#
-#   Copyright (c) 2014 Bastien ROUCARIES <roucaries.bastien+autoconf@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 9
-
-# for intel
-AC_DEFUN([_AX_COMPILER_VERSION_INTEL],
-  [ dnl
-  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_major,
-    [__INTEL_COMPILER/100],,
-    AC_MSG_FAILURE([[[$0]] unknown intel compiler version]))
-  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor,
-    [(__INTEL_COMPILER%100)/10],,
-    AC_MSG_FAILURE([[[$0]] unknown intel compiler version]))
-  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch,
-    [(__INTEL_COMPILER%10)],,
-    AC_MSG_FAILURE([[[$0]] unknown intel compiler version]))
-  ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="$_ax_[]_AC_LANG_ABBREV[]_compiler_version_major.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch"
-  ])
-
-# for IBM
-AC_DEFUN([_AX_COMPILER_VERSION_IBM],
-  [ dnl
-  dnl check between z/OS C/C++  and XL C/C++
-  AC_COMPILE_IFELSE([
-    AC_LANG_PROGRAM([],
-      [
-        #if defined(__COMPILER_VER__)
-        choke me;
-        #endif
-      ])],
-    [
-      AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_major,
-        [__xlC__/100],,
-      	AC_MSG_FAILURE([[[$0]] unknown IBM compiler major version]))
-      AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor,
-        [__xlC__%100],,
-      	AC_MSG_FAILURE([[[$0]] unknown IBM compiler minor version]))
-      AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch,
-        [__xlC_ver__/0x100],,
-      	AC_MSG_FAILURE([[[$0]] unknown IBM compiler patch version]))
-      AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_build,
-        [__xlC_ver__%0x100],,
-      	AC_MSG_FAILURE([[[$0]] unknown IBM compiler build version]))
-      ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="$_ax_[]_AC_LANG_ABBREV[]_compiler_version_major.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_build"
-    ],
-    [
-      AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch,
-        [__xlC__%1000],,
-      	AC_MSG_FAILURE([[[$0]] unknown IBM compiler patch version]))
-      AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor,
-        [(__xlC__/10000)%10],,
-      	AC_MSG_FAILURE([[[$0]] unknown IBM compiler minor version]))
-      AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_major,
-        [(__xlC__/100000)%10],,
-      	AC_MSG_FAILURE([[[$0]] unknown IBM compiler major version]))
-      ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="$_ax_[]_AC_LANG_ABBREV[]_compiler_version_major.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch"
-    ])
-])
-
-# for pathscale
-AC_DEFUN([_AX_COMPILER_VERSION_PATHSCALE],[
-  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_major,
-    __PATHCC__,,
-    AC_MSG_FAILURE([[[$0]] unknown pathscale major]))
-  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor,
-    __PATHCC_MINOR__,,
-    AC_MSG_FAILURE([[[$0]] unknown pathscale minor]))
-  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch,
-    [__PATHCC_PATCHLEVEL__],,
-    AC_MSG_FAILURE([[[$0]] unknown pathscale patch level]))
-  ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="$_ax_[]_AC_LANG_ABBREV[]_compiler_version_major.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch"
-  ])
-
-# for clang
-AC_DEFUN([_AX_COMPILER_VERSION_CLANG],[
-  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_major,
-    __clang_major__,,
-    AC_MSG_FAILURE([[[$0]] unknown clang major]))
-  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor,
-    __clang_minor__,,
-    AC_MSG_FAILURE([[[$0]] unknown clang minor]))
-  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch,
-    [__clang_patchlevel__],,0)
-  ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="$_ax_[]_AC_LANG_ABBREV[]_compiler_version_major.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch"
-  ])
-
-# for crayc
-AC_DEFUN([_AX_COMPILER_VERSION_CRAY],[
-  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_major,
-    _RELEASE,,
-    AC_MSG_FAILURE([[[$0]] unknown crayc release]))
-  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor,
-    _RELEASE_MINOR,,
-    AC_MSG_FAILURE([[[$0]] unknown crayc minor]))
-  ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="$_ax_[]_AC_LANG_ABBREV[]_compiler_version_major.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor"
-  ])
-
-# for fujitsu
-AC_DEFUN([_AX_COMPILER_VERSION_FUJITSU],[
-  AC_COMPUTE_INT(ax_cv_[]_AC_LANG_ABBREV[]_compiler_version,
-                 __FCC_VERSION,,
-		 AC_MSG_FAILURE([[[$0]]unknown fujitsu release]))
-  ])
-
-# for GNU
-AC_DEFUN([_AX_COMPILER_VERSION_GNU],[
-  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_major,
-    __GNUC__,,
-    AC_MSG_FAILURE([[[$0]] unknown gcc major]))
-  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor,
-    __GNUC_MINOR__,,
-    AC_MSG_FAILURE([[[$0]] unknown gcc minor]))
-  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch,
-    [__GNUC_PATCHLEVEL__],,
-    AC_MSG_FAILURE([[[$0]] unknown gcc patch level]))
-  ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="$_ax_[]_AC_LANG_ABBREV[]_compiler_version_major.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch"
-  ])
-
-# For sun
-AC_DEFUN([_AX_COMPILER_VERSION_SUN],[
-  m4_define([_AX_COMPILER_VERSION_SUN_NUMBER],
-            [
-	     #if defined(__SUNPRO_CC)
-	     __SUNPRO_CC
-	     #else
-	     __SUNPRO_C
-	     #endif
-	    ])
-  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_until59,
-    !!(_AX_COMPILER_VERSION_SUN_NUMBER < 0x1000),,
-    AC_MSG_FAILURE([[[$0]] unknown sun release version]))
-  AS_IF([test "X$_ax_[]_AC_LANG_ABBREV[]_compiler_version_until59" = X1],
-    [dnl
-      AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch,
-        _AX_COMPILER_VERSION_SUN_NUMBER % 0x10,,
-	AC_MSG_FAILURE([[[$0]] unknown sun patch version]))
-      AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor,
-        (_AX_COMPILER_VERSION_SUN_NUMBER / 0x10) % 0x10,,
-        AC_MSG_FAILURE([[[$0]] unknown sun minor version]))
-      AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_major,
-        (_AX_COMPILER_VERSION_SUN_NUMBER / 0x100),,
-        AC_MSG_FAILURE([[[$0]] unknown sun major version]))
-    ],
-    [dnl
-      AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch,
-        _AX_COMPILER_VERSION_SUN_NUMBER % 0x10,,
-        AC_MSG_FAILURE([[[$0]] unknown sun patch version]))
-      AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor,
-        (_AX_COMPILER_VERSION_SUN_NUMBER / 0x100) % 0x100,,
-        AC_MSG_FAILURE([[[$0]] unknown sun minor version]))
-      AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_major,
-        (_AX_COMPILER_VERSION_SUN_NUMBER / 0x1000),,
-        AC_MSG_FAILURE([[[$0]] unknown sun major version]))
-    ])
-  ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="$_ax_[]_AC_LANG_ABBREV[]_compiler_version_major.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch"
-])
-
-AC_DEFUN([_AX_COMPILER_VERSION_HP],[
-  m4_define([_AX_COMPILER_VERSION_HP_NUMBER],
-            [
-	     #if defined(__HP_cc)
-	     __HP_cc
-	     #else
-	     __HP_aCC
-	     #endif
-	    ])
-  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_untilA0121,
-    !!(_AX_COMPILER_VERSION_HP_NUMBER <= 1),,
-    AC_MSG_FAILURE([[[$0]] unknown hp release version]))
-  AS_IF([test "X$_ax_[]_AC_LANG_ABBREV[]_compiler_version_untilA0121" = X1],
-    [dnl By default output last version with this behavior.
-     dnl it is so old
-      ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="01.21.00"
-    ],
-    [dnl
-      AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch,
-        (_AX_COMPILER_VERSION_HP_NUMBER % 100),,
-        AC_MSG_FAILURE([[[$0]] unknown hp release version]))
-      AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor,
-        ((_AX_COMPILER_VERSION_HP_NUMBER / 100)%100),,
-        AC_MSG_FAILURE([[[$0]] unknown hp minor version]))
-      AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_major,
-        ((_AX_COMPILER_VERSION_HP_NUMBER / 10000)%100),,
-        AC_MSG_FAILURE([[[$0]] unknown hp major version]))
-      ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="$_ax_[]_AC_LANG_ABBREV[]_compiler_version_major.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch"
-    ])
-])
-
-AC_DEFUN([_AX_COMPILER_VERSION_DEC],[dnl
-  m4_define([_AX_COMPILER_VERSION_DEC_NUMBER],
-            [
-	     #if defined(__DECC_VER)
-	     __DECC_VER
-	     #else
-	     __DECCXX_VER
-	     #endif
-	    ])
-  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch,
-    (_AX_COMPILER_VERSION_DEC_NUMBER % 10000),,
-    AC_MSG_FAILURE([[[$0]] unknown dec release version]))
-  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor,
-    ((_AX_COMPILER_VERSION_DEC_NUMBER / 100000UL)%100),,
-    AC_MSG_FAILURE([[[$0]] unknown dec minor version]))
-  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_major,
-    ((_AX_COMPILER_VERSION_DEC_NUMBER / 10000000UL)%100),,
-    AC_MSG_FAILURE([[[$0]] unknown dec major version]))
-  ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="$_ax_[]_AC_LANG_ABBREV[]_compiler_version_major.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch"
-  ])
-
-# borland
-AC_DEFUN([_AX_COMPILER_VERSION_BORLAND],[dnl
-  m4_define([_AX_COMPILER_VERSION_TURBOC_NUMBER],
-            [
-	     #if defined(__TURBOC__)
-	     __TURBOC__
-	     #else
-	     choke me
-	     #endif
-	    ])
-  m4_define([_AX_COMPILER_VERSION_BORLANDC_NUMBER],
-            [
-	     #if defined(__BORLANDC__)
-	     __BORLANDC__
-	     #else
-	     __CODEGEARC__
-	     #endif
-	    ])
- AC_COMPILE_IFELSE(
-   [AC_LANG_PROGRAM(,
-     _AX_COMPILER_VERSION_TURBOC_NUMBER)],
-   [dnl TURBOC
-     AC_COMPUTE_INT(
-       _ax_[]_AC_LANG_ABBREV[]_compiler_version_turboc_raw,
-       _AX_COMPILER_VERSION_TURBOC_NUMBER,,
-       AC_MSG_FAILURE([[[$0]] unknown turboc version]))
-     AS_IF(
-       [test $_ax_[]_AC_LANG_ABBREV[]_compiler_version_turboc_raw -lt 661 || test $_ax_[]_AC_LANG_ABBREV[]_compiler_version_turboc_raw -gt 1023],
-       [dnl compute normal version
-        AC_COMPUTE_INT(
-	  _ax_[]_AC_LANG_ABBREV[]_compiler_version_minor,
-	  _AX_COMPILER_VERSION_TURBOC_NUMBER % 0x100,,
-	  AC_MSG_FAILURE([[[$0]] unknown turboc minor version]))
-	AC_COMPUTE_INT(
-	  _ax_[]_AC_LANG_ABBREV[]_compiler_version_major,
-	  (_AX_COMPILER_VERSION_TURBOC_NUMBER/0x100)%0x100,,
-	  AC_MSG_FAILURE([[[$0]] unknown turboc major version]))
-	ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="0turboc:$_ax_[]_AC_LANG_ABBREV[]_compiler_version_major.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor"],
-      [dnl special version
-       AS_CASE([$_ax_[]_AC_LANG_ABBREV[]_compiler_version_turboc_raw],
-         [661],[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="0turboc:1.00"],
-	 [662],[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="0turboc:1.01"],
-         [663],[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="0turboc:2.00"],
-	 [
-	 AC_MSG_WARN([[[$0]] unknown turboc version between 0x295 and 0x400 please report bug])
-	 ax_cv_[]_AC_LANG_ABBREV[]_compiler_version=""
-	 ])
-      ])
-    ],
-    # borlandc
-    [
-    AC_COMPUTE_INT(
-      _ax_[]_AC_LANG_ABBREV[]_compiler_version_borlandc_raw,
-      _AX_COMPILER_VERSION_BORLANDC_NUMBER,,
-      AC_MSG_FAILURE([[[$0]] unknown borlandc version]))
-    AS_CASE([$_ax_[]_AC_LANG_ABBREV[]_compiler_version_borlandc_raw],
-      dnl BORLANDC++ before 5.5
-      [512] ,[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="1borlanc:2.00"],
-      [1024],[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="1borlanc:3.00"],
-      [1024],[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="1borlanc:3.00"],
-      [1040],[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="1borlanc:3.1"],
-      [1106],[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="1borlanc:4.0"],
-      [1280],[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="1borlanc:5.0"],
-      [1312],[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="1borlanc:5.02"],
-      dnl C++ Builder era
-      [1328],[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="2cppbuilder:3.0"],
-      [1344],[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="2cppbuilder:4.0"],
-      dnl BORLANDC++ after 5.5
-      [1360],[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="3borlancpp:5.5"],
-      [1361],[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="3borlancpp:5.51"],
-      [1378],[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="3borlancpp:5.6.4"],
-      dnl C++ Builder with year number
-      [1392],[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="4cppbuilder:2006"],
-      [1424],[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="4cppbuilder:2007"],
-      [1555],[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="4cppbuilder:2009"],
-      [1569],[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="4cppbuilder:2010"],
-      dnl XE version
-      [1584],[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="5xe"],
-      [1600],[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="5xe:2"],
-      [1616],[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="5xe:3"],
-      [1632],[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="5xe:4"],
-      [
-      AC_MSG_WARN([[[$0]] Unknown borlandc compiler version $_ax_[]_AC_LANG_ABBREV[]_compiler_version_borlandc_raw please report bug])
-      ])
-    ])
-  ])
-
-# COMO
-AC_DEFUN([_AX_COMPILER_VERSION_COMEAU],
-  [ dnl
-  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor,
-    [__COMO_VERSION__%100],,
-    AC_MSG_FAILURE([[[$0]] unknown comeau compiler minor version]))
-  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_major,
-    [(__COMO_VERSION__/100)%10],,
-    AC_MSG_FAILURE([[[$0]] unknown comeau compiler major version]))
-  ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="$_ax_[]_AC_LANG_ABBREV[]_compiler_version_major.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor"
-  ])
-
-# KAI
-AC_DEFUN([_AX_COMPILER_VERSION_KAI],[
-  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch,
-    [__KCC_VERSION%100],,
-    AC_MSG_FAILURE([[[$0]] unknown kay compiler patch version]))
-  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor,
-    [(__KCC_VERSION/100)%10],,
-    AC_MSG_FAILURE([[[$0]] unknown kay compiler minor version]))
-  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_major,
-    [(__KCC_VERSION/1000)%10],,
-    AC_MSG_FAILURE([[[$0]] unknown kay compiler major version]))
-  ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="$_ax_[]_AC_LANG_ABBREV[]_compiler_version_major.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch"
-  ])
-
-dnl LCC
-dnl LCC does not output version...
-
-# SGI
-AC_DEFUN([_AX_COMPILER_VERSION_SGI],[
-   m4_define([_AX_COMPILER_VERSION_SGI_NUMBER],
-            [
-	     #if defined(_COMPILER_VERSION)
-	     _COMPILER_VERSION
-	     #else
-	     _SGI_COMPILER_VERSION
-	     #endif
-	    ])
-  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch,
-    [_AX_COMPILER_VERSION_SGI_NUMBER%10],,
-    AC_MSG_FAILURE([[[$0]] unknown SGI compiler patch version]))
-  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor,
-    [(_AX_COMPILER_VERSION_SGI_NUMBER/10)%10],,
-    AC_MSG_FAILURE([[[$0]] unknown SGI compiler minor version]))
-  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_major,
-    [(_AX_COMPILER_VERSION_SGI_NUMBER/100)%10],,
-    AC_MSG_FAILURE([[[$0]] unknown SGI compiler major version]))
-  ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="$_ax_[]_AC_LANG_ABBREV[]_compiler_version_major.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch"
-  ])
-
-# microsoft
-AC_DEFUN([_AX_COMPILER_VERSION_MICROSOFT],[
-  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor,
-    _MSC_VER%100,,
-    AC_MSG_FAILURE([[[$0]] unknown microsoft compiler minor version]))
-  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_major,
-    (_MSC_VER/100)%100,,
-    AC_MSG_FAILURE([[[$0]] unknown microsoft compiler major version]))
-  dnl could be overridden
-  _ax_[]_AC_LANG_ABBREV[]_compiler_version_patch=0
-  _ax_[]_AC_LANG_ABBREV[]_compiler_version_build=0
-  # special case for version 6
-  AS_IF([test "X$_ax_[]_AC_LANG_ABBREV[]_compiler_version_major" = "X12"],
-    [AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch,
-       _MSC_FULL_VER%1000,,
-       _ax_[]_AC_LANG_ABBREV[]_compiler_version_patch=0)])
-  # for version 7
-  AS_IF([test "X$_ax_[]_AC_LANG_ABBREV[]_compiler_version_major" = "X13"],
-    [AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch,
-       _MSC_FULL_VER%1000,,
-       AC_MSG_FAILURE([[[$0]] unknown microsoft compiler patch version]))
-    ])
-  # for version > 8
- AS_IF([test $_ax_[]_AC_LANG_ABBREV[]_compiler_version_major -ge 14],
-    [AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch,
-       _MSC_FULL_VER%10000,,
-       AC_MSG_FAILURE([[[$0]] unknown microsoft compiler patch version]))
-    ])
- AS_IF([test $_ax_[]_AC_LANG_ABBREV[]_compiler_version_major -ge 15],
-    [AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_build,
-       _MSC_BUILD,,
-       AC_MSG_FAILURE([[[$0]] unknown microsoft compiler build version]))
-    ])
- ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="$_ax_[]_AC_LANG_ABBREV[]_compiler_version_major.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_build"
- ])
-
-# for metrowerks
-AC_DEFUN([_AX_COMPILER_VERSION_METROWERKS],[dnl
-  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch,
-    __MWERKS__%0x100,,
-    AC_MSG_FAILURE([[[$0]] unknown metrowerks compiler patch version]))
-  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor,
-    (__MWERKS__/0x100)%0x10,,
-    AC_MSG_FAILURE([[[$0]] unknown metrowerks compiler minor version]))
-  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_major,
-    (__MWERKS__/0x1000)%0x10,,
-    AC_MSG_FAILURE([[[$0]] unknown metrowerks compiler major version]))
-  ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="$_ax_[]_AC_LANG_ABBREV[]_compiler_version_major.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch"
-  ])
-
-# for watcom
-AC_DEFUN([_AX_COMPILER_VERSION_WATCOM],[dnl
-  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor,
-    __WATCOMC__%100,,
-    AC_MSG_FAILURE([[[$0]] unknown watcom compiler minor version]))
-  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_major,
-    (__WATCOMC__/100)%100,,
-    AC_MSG_FAILURE([[[$0]] unknown watcom compiler major version]))
-  ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="$_ax_[]_AC_LANG_ABBREV[]_compiler_version_major.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor"
-  ])
-
-# for PGI
-AC_DEFUN([_AX_COMPILER_VERSION_PORTLAND],[
-  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_major,
-    __PGIC__,,
-    AC_MSG_FAILURE([[[$0]] unknown pgi major]))
-  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor,
-    __PGIC_MINOR__,,
-    AC_MSG_FAILURE([[[$0]] unknown pgi minor]))
-  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch,
-    [__PGIC_PATCHLEVEL__],,
-    AC_MSG_FAILURE([[[$0]] unknown pgi patch level]))
-  ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="$_ax_[]_AC_LANG_ABBREV[]_compiler_version_major.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch"
-  ])
-
-# tcc
-AC_DEFUN([_AX_COMPILER_VERSION_TCC],[
-  ax_cv_[]_AC_LANG_ABBREV[]_compiler_version=[`tcc -v | $SED 's/^[ ]*tcc[ ]\+version[ ]\+\([0-9.]\+\).*/\1/g'`]
-  ])
-# main entry point
-AC_DEFUN([AX_COMPILER_VERSION],[dnl
-  AC_REQUIRE([AX_COMPILER_VENDOR])
-  AC_REQUIRE([AC_PROG_SED])
-  AC_CACHE_CHECK([for _AC_LANG compiler version],
-    ax_cv_[]_AC_LANG_ABBREV[]_compiler_version,
-    [ dnl
-      AS_CASE([$ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor],
-        [intel],[_AX_COMPILER_VERSION_INTEL],
-	[ibm],[_AX_COMPILER_VERSION_IBM],
-	[pathscale],[_AX_COMPILER_VERSION_PATHSCALE],
-	[clang],[_AX_COMPILER_VERSION_CLANG],
-	[cray],[_AX_COMPILER_VERSION_CRAY],
-	[fujitsu],[_AX_COMPILER_VERSION_FUJITSU],
-        [gnu],[_AX_COMPILER_VERSION_GNU],
-	[sun],[_AX_COMPILER_VERSION_SUN],
-	[hp],[_AX_COMPILER_VERSION_HP],
-	[dec],[_AX_COMPILER_VERSION_DEC],
-	[borland],[_AX_COMPILER_VERSION_BORLAND],
-	[comeau],[_AX_COMPILER_VERSION_COMEAU],
-	[kai],[_AX_COMPILER_VERSION_KAI],
-	[sgi],[_AX_COMPILER_VERSION_SGI],
-	[microsoft],[_AX_COMPILER_VERSION_MICROSOFT],
-	[metrowerks],[_AX_COMPILER_VERSION_METROWERKS],
-	[watcom],[_AX_COMPILER_VERSION_WATCOM],
-	[portland],[_AX_COMPILER_VERSION_PORTLAND],
-	[tcc],[_AX_COMPILER_VERSION_TCC],
-  	[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version=""])
-    ])
-])
--- a/M4/ax_recursive_eval.m4
+++ /dev/null
@@ -1,56 +1,0 @@
-# ===========================================================================
-#    https://www.gnu.org/software/autoconf-archive/ax_recursive_eval.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-#   AX_RECURSIVE_EVAL(VALUE, RESULT)
-#
-# DESCRIPTION
-#
-#   Interpolate the VALUE in loop until it doesn't change, and set the
-#   result to $RESULT. WARNING: It's easy to get an infinite loop with some
-#   unsane input.
-#
-# LICENSE
-#
-#   Copyright (c) 2008 Alexandre Duret-Lutz <adl@gnu.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 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 <https://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 1
-
-AC_DEFUN([AX_RECURSIVE_EVAL],
-[_lcl_receval="$1"
-$2=`(test "x$prefix" = xNONE && prefix="$ac_default_prefix"
-     test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
-     _lcl_receval_old=''
-     while test "[$]_lcl_receval_old" != "[$]_lcl_receval"; do
-       _lcl_receval_old="[$]_lcl_receval"
-       eval _lcl_receval="\"[$]_lcl_receval\""
-     done
-     echo "[$]_lcl_receval")`])
--- a/M4/ax_require_defined.m4
+++ /dev/null
@@ -1,37 +1,0 @@
-# ===========================================================================
-#    https://www.gnu.org/software/autoconf-archive/ax_require_defined.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-#   AX_REQUIRE_DEFINED(MACRO)
-#
-# DESCRIPTION
-#
-#   AX_REQUIRE_DEFINED is a simple helper for making sure other macros have
-#   been defined and thus are available for use.  This avoids random issues
-#   where a macro isn't expanded.  Instead the configure script emits a
-#   non-fatal:
-#
-#     ./configure: line 1673: AX_CFLAGS_WARN_ALL: command not found
-#
-#   It's like AC_REQUIRE except it doesn't expand the required macro.
-#
-#   Here's an example:
-#
-#     AX_REQUIRE_DEFINED([AX_CHECK_LINK_FLAG])
-#
-# LICENSE
-#
-#   Copyright (c) 2014 Mike Frysinger <vapier@gentoo.org>
-#
-#   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_REQUIRE_DEFINED], [dnl
-  m4_ifndef([$1], [m4_fatal([macro ]$1[ is not defined; is a m4 file missing?])])
-])dnl AX_REQUIRE_DEFINED
--- a/M4/check_signal.m4
+++ /dev/null
@@ -1,26 +1,0 @@
-dnl @synopsis AC_CHECK_SIGNAL(SIGNAME)
-dnl
-dnl
-dnl @category C
-dnl @author Erik de Castro Lopo <erikd AT mega-nerd DOT com>
-dnl @version 1.0	Jul 07 2007
-
-AC_DEFUN([AC_CHECK_SIGNAL],
-[AC_CACHE_CHECK(for $1,
-  ac_cv_signal_$1,
-[
-AC_TRY_LINK([
-#include <signal.h>
-
-], signal($1, SIG_DFL) ;, ac_cv_signal_$1=yes, ac_cv_signal_$1=no)
-
-])
-
-if test "$ac_cv_signal_$1" = yes; then
-  AC_DEFINE(HAVE_$1, 1,
-            [Define if you have signal $1.])
-fi
-])# AC_CHECK_SIGNAL
-
-
-## AC_CHECK_SIGNALS
--- a/M4/clip_mode.m4
+++ /dev/null
@@ -1,124 +1,0 @@
-dnl @synopsis AC_C_CLIP_MODE
-dnl
-dnl Determine the clipping mode when converting float to int.
-dnl @version 1.0	May 17 2003
-dnl @author Erik de Castro Lopo <erikd AT mega-nerd DOT com>
-dnl
-dnl Permission to use, copy, modify, distribute, and sell this file for any 
-dnl purpose is hereby granted without fee, provided that the above copyright 
-dnl and this permission notice appear in all copies.  No representations are
-dnl made about the suitability of this software for any purpose.  It is 
-dnl provided "as is" without express or implied warranty.
-
-
-
-
-
-
-
-dnl Find the clipping mode in the following way:
-dnl    1) If we are not cross compiling test it.
-dnl    2) IF we are cross compiling, assume that clipping isn't done correctly.
-
-AC_DEFUN([AC_C_CLIP_MODE],
-[AC_CACHE_CHECK(processor clipping capabilities, 
-	ac_cv_c_clip_type,
-
-# Initialize to unknown
-ac_cv_c_clip_positive=unknown
-ac_cv_c_clip_negative=unknown
-
-
-if test $ac_cv_c_clip_positive = unknown ; then
-	AC_TRY_RUN(
-	[[
-	#define	_ISOC9X_SOURCE	1
-	#define _ISOC99_SOURCE	1
-	#define	__USE_ISOC99	1
-	#define __USE_ISOC9X	1
-	#include <math.h>
-	int main (void)
-	{	double	fval ;
-		int k, ival ;
-
-		fval = 1.0 * 0x7FFFFFFF ;
-		for (k = 0 ; k < 100 ; k++)
-		{	ival = (lrint (fval)) >> 24 ;
-			if (ival != 127)
-				return 1 ;
-		
-			fval *= 1.2499999 ;
-			} ;
-		
-			return 0 ;
-		}
-		]],
-		ac_cv_c_clip_positive=yes,
-		ac_cv_c_clip_positive=no,
-		ac_cv_c_clip_positive=unknown
-		)
-
-	AC_TRY_RUN(
-	[[
-	#define	_ISOC9X_SOURCE	1
-	#define _ISOC99_SOURCE	1
-	#define	__USE_ISOC99	1
-	#define __USE_ISOC9X	1
-	#include <math.h>
-	int main (void)
-	{	double	fval ;
-		int k, ival ;
-
-		fval = -8.0 * 0x10000000 ;
-		for (k = 0 ; k < 100 ; k++)
-		{	ival = (lrint (fval)) >> 24 ;
-			if (ival != -128)
-				return 1 ;
-		
-			fval *= 1.2499999 ;
-			} ;
-		
-			return 0 ;
-		}
-		]],
-		ac_cv_c_clip_negative=yes,
-		ac_cv_c_clip_negative=no,
-		ac_cv_c_clip_negative=unknown
-		)
-	fi
-
-if test $ac_cv_c_clip_positive = yes ; then
-	ac_cv_c_clip_positive=1
-else
-	ac_cv_c_clip_positive=0
-	fi
-
-if test $ac_cv_c_clip_negative = yes ; then
-	ac_cv_c_clip_negative=1
-else
-	ac_cv_c_clip_negative=0
-	fi
-
-[[
-case "$ac_cv_c_clip_positive$ac_cv_c_clip_negative" in
-	"00")
-		ac_cv_c_clip_type="none"
-		;;
-	"10")
-		ac_cv_c_clip_type="positive"
-		;;
-	"01")
-		ac_cv_c_clip_type="negative"
-		;;
-	"11")
-		ac_cv_c_clip_type="both"
-		;;
-	esac
-	]]
-
-)
-]
-
-)# AC_C_CLIP_MODE
-
-
--- a/M4/endian.m4
+++ /dev/null
@@ -1,155 +1,0 @@
-dnl @synopsis AC_C_FIND_ENDIAN
-dnl
-dnl Determine endian-ness of target processor.
-dnl @version 1.1	Mar 03 2002
-dnl @author Erik de Castro Lopo <erikd AT mega-nerd DOT com>
-dnl
-dnl Majority written from scratch to replace the standard autoconf macro 
-dnl AC_C_BIGENDIAN. Only part remaining from the original it the invocation
-dnl of the AC_TRY_RUN macro.
-dnl
-dnl Permission to use, copy, modify, distribute, and sell this file for any 
-dnl purpose is hereby granted without fee, provided that the above copyright 
-dnl and this permission notice appear in all copies.  No representations are
-dnl made about the suitability of this software for any purpose.  It is 
-dnl provided "as is" without express or implied warranty.
-
-dnl Find endian-ness in the following way:
-dnl    1) Look in <endian.h>.
-dnl    2) If 1) fails, look in <sys/types.h> and <sys/param.h>.
-dnl    3) If 1) and 2) fails and not cross compiling run a test program.
-dnl    4) If 1) and 2) fails and cross compiling then guess based on target.
-
-AC_DEFUN([AC_C_FIND_ENDIAN],
-[AC_CACHE_CHECK(processor byte ordering, 
-	ac_cv_c_byte_order,
-
-# Initialize to unknown
-ac_cv_c_byte_order=unknown
-
-if test x$ac_cv_header_endian_h = xyes ; then
-
-	# First try <endian.h> which should set BYTE_ORDER.
-
-	[AC_TRY_LINK([
-		#include <endian.h>
-		#if BYTE_ORDER != LITTLE_ENDIAN
-			not big endian
-		#endif
-		], return 0 ;, 
-			ac_cv_c_byte_order=little
-		)]
-				
-	[AC_TRY_LINK([
-		#include <endian.h>
-		#if BYTE_ORDER != BIG_ENDIAN
-			not big endian
-		#endif
-		], return 0 ;, 
-			ac_cv_c_byte_order=big
-		)]
-
-	fi
-
-if test $ac_cv_c_byte_order = unknown ; then
-
-	[AC_TRY_LINK([
-		#include <sys/types.h>
-		#include <sys/param.h>
-		#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
-			bogus endian macros
-		#endif
-		], return 0 ;, 
-
-		[AC_TRY_LINK([
-			#include <sys/types.h>
-			#include <sys/param.h>
-			#if BYTE_ORDER != LITTLE_ENDIAN
-				not big endian
-			#endif
-			], return 0 ;, 
-				ac_cv_c_byte_order=little
-			)]
-				
-		[AC_TRY_LINK([
-			#include <sys/types.h>
-			#include <sys/param.h>
-			#if BYTE_ORDER != LITTLE_ENDIAN
-				not big endian
-			#endif
-			], return 0 ;, 
-				ac_cv_c_byte_order=little
-			)]
-
-		)]
-
- 	fi
-
-if test $ac_cv_c_byte_order = unknown ; then
-	if test $cross_compiling = yes ; then
-		# This is the last resort. Try to guess the target processor endian-ness
-		# by looking at the target CPU type.	
-		[
-		case "$target_cpu" in
-			alpha* | i?86* | mipsel* | ia64*)
-				ac_cv_c_byte_order=little
-				;;
-			
-			m68* | mips* | powerpc* | hppa* | sparc*)
-				ac_cv_c_byte_order=big
-				;;
-	
-			esac
-		]
-	else
-		AC_TRY_RUN(
-		[[
-		int main (void) 
-		{	/* Are we little or big endian?  From Harbison&Steele.  */
-			union
-			{	long l ;
-				char c [sizeof (long)] ;
-			} u ;
-			u.l = 1 ;
-			return (u.c [sizeof (long) - 1] == 1);
-			}
-			]], , ac_cv_c_byte_order=big, 
-			)
-
-		AC_TRY_RUN(
-		[[int main (void) 
-		{	/* Are we little or big endian?  From Harbison&Steele.  */
-			union
-			{	long l ;
-				char c [sizeof (long)] ;
-			} u ;
-			u.l = 1 ;
-			return (u.c [0] == 1);
-			}]], , ac_cv_c_byte_order=little, 
-			)
-		fi	
-	fi
-
-)
-
-if test $ac_cv_c_byte_order = big ; then
-	ac_cv_c_big_endian=1
-	ac_cv_c_little_endian=0
-elif test $ac_cv_c_byte_order = little ; then
-	ac_cv_c_big_endian=0
-	ac_cv_c_little_endian=1
-else
-	ac_cv_c_big_endian=0
-	ac_cv_c_little_endian=0
-
-	AC_MSG_WARN([[*****************************************************************]])
-	AC_MSG_WARN([[*** Not able to determine endian-ness of target processor.       ]])
-	AC_MSG_WARN([[*** The constants CPU_IS_BIG_ENDIAN and CPU_IS_LITTLE_ENDIAN in  ]])
-	AC_MSG_WARN([[*** src/config.h may need to be hand editied.                    ]])
-	AC_MSG_WARN([[*****************************************************************]])
-	fi
-
-]
-)# AC_C_FIND_ENDIAN
-
-
--- a/M4/lrint.m4
+++ /dev/null
@@ -1,37 +1,0 @@
-dnl @synopsis AC_C99_FUNC_LRINT
-dnl
-dnl Check whether C99's lrint function is available.
-dnl @version 1.3	Feb 12 2002
-dnl @author Erik de Castro Lopo <erikd AT mega-nerd DOT com>
-dnl
-dnl Permission to use, copy, modify, distribute, and sell this file for any 
-dnl purpose is hereby granted without fee, provided that the above copyright 
-dnl and this permission notice appear in all copies.  No representations are
-dnl made about the suitability of this software for any purpose.  It is 
-dnl provided "as is" without express or implied warranty.
-dnl
-AC_DEFUN([AC_C99_FUNC_LRINT],
-[AC_CACHE_CHECK(for lrint,
-  ac_cv_c99_lrint,
-[
-lrint_save_CFLAGS=$CFLAGS
-CFLAGS="-lm"
-AC_TRY_LINK([
-#define		_ISOC9X_SOURCE	1
-#define 	_ISOC99_SOURCE	1
-#define		__USE_ISOC99	1
-#define 	__USE_ISOC9X	1
-
-#include <math.h>
-], if (!lrint(3.14159)) lrint(2.7183);, ac_cv_c99_lrint=yes, ac_cv_c99_lrint=no)
-
-CFLAGS=$lrint_save_CFLAGS
-
-])
-
-if test "$ac_cv_c99_lrint" = yes; then
-  AC_DEFINE(HAVE_LRINT, 1,
-            [Define if you have C99's lrint function.])
-fi
-])# AC_C99_FUNC_LRINT
-
--- a/M4/lrintf.m4
+++ /dev/null
@@ -1,37 +1,0 @@
-dnl @synopsis AC_C99_FUNC_LRINTF
-dnl
-dnl Check whether C99's lrintf function is available.
-dnl @version 1.3	Feb 12 2002
-dnl @author Erik de Castro Lopo <erikd AT mega-nerd DOT com>
-dnl
-dnl Permission to use, copy, modify, distribute, and sell this file for any 
-dnl purpose is hereby granted without fee, provided that the above copyright 
-dnl and this permission notice appear in all copies.  No representations are
-dnl made about the suitability of this software for any purpose.  It is 
-dnl provided "as is" without express or implied warranty.
-dnl
-AC_DEFUN([AC_C99_FUNC_LRINTF],
-[AC_CACHE_CHECK(for lrintf,
-  ac_cv_c99_lrintf,
-[
-lrintf_save_CFLAGS=$CFLAGS
-CFLAGS="-lm"
-AC_TRY_LINK([
-#define		_ISOC9X_SOURCE	1
-#define 	_ISOC99_SOURCE	1
-#define		__USE_ISOC99	1
-#define 	__USE_ISOC9X	1
-
-#include <math.h>
-], if (!lrintf(3.14159)) lrintf(2.7183);, ac_cv_c99_lrintf=yes, ac_cv_c99_lrintf=no)
-
-CFLAGS=$lrintf_save_CFLAGS
-
-])
-
-if test "$ac_cv_c99_lrintf" = yes; then
-  AC_DEFINE(HAVE_LRINTF, 1,
-            [Define if you have C99's lrintf function.])
-fi
-])# AC_C99_FUNC_LRINTF
-
--- a/autogen.sh
+++ b/autogen.sh
@@ -4,8 +4,6 @@
 
 package="libsamplerate"
 
-ACLOCAL_FLAGS="-I M4"
-
 olddir=`pwd`
 srcdir=`dirname $0`
 test -z "$srcdir" && srcdir=.
--- a/configure.ac
+++ b/configure.ac
@@ -18,17 +18,17 @@
 	])
 AC_MSG_RESULT([${enable_flags_setting}])
 
-# Put config stuff in Cfg.
-AC_CONFIG_AUX_DIR(Cfg)
+dnl Put config stuff in 'build-aux'.
+AC_CONFIG_AUX_DIR([build-aux])
 
 AC_CONFIG_SRCDIR([src/samplerate.c])
 AC_CANONICAL_TARGET([])
 
-AC_CONFIG_MACRO_DIR([M4])
+AC_CONFIG_MACRO_DIR([m4])
 AC_CONFIG_HEADERS([src/config.h])
 
-AM_INIT_AUTOMAKE([foreign dist-bzip2 no-dist-gzip subdir-objects])
-m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+AM_INIT_AUTOMAKE([1.14 foreign dist-bzip2 no-dist-gzip subdir-objects])
+AM_SILENT_RULES([yes])
 
 AC_LANG([C])
 AC_PROG_CC
--- /dev/null
+++ b/m4/ax_append_compile_flags.m4
@@ -1,0 +1,67 @@
+# ============================================================================
+#  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 <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 <https://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 6
+
+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
--- /dev/null
+++ b/m4/ax_append_flag.m4
@@ -1,0 +1,71 @@
+# ===========================================================================
+#      https://www.gnu.org/software/autoconf-archive/ax_append_flag.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_APPEND_FLAG(FLAG, [FLAGS-VARIABLE])
+#
+# DESCRIPTION
+#
+#   FLAG is appended to the FLAGS-VARIABLE shell variable, with a space
+#   added in between.
+#
+#   If FLAGS-VARIABLE is not specified, the current language's flags (e.g.
+#   CFLAGS) is used.  FLAGS-VARIABLE is not changed if it already contains
+#   FLAG.  If FLAGS-VARIABLE is unset in the shell, it is set to exactly
+#   FLAG.
+#
+#   NOTE: Implementation based on AX_CFLAGS_GCC_OPTION.
+#
+# 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 <https://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 7
+
+AC_DEFUN([AX_APPEND_FLAG],
+[dnl
+AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_SET_IF
+AS_VAR_PUSHDEF([FLAGS], [m4_default($2,_AC_LANG_PREFIX[FLAGS])])
+AS_VAR_SET_IF(FLAGS,[
+  AS_CASE([" AS_VAR_GET(FLAGS) "],
+    [*" $1 "*], [AC_RUN_LOG([: FLAGS already contains $1])],
+    [
+     AS_VAR_APPEND(FLAGS,[" $1"])
+     AC_RUN_LOG([: FLAGS="$FLAGS"])
+    ])
+  ],
+  [
+  AS_VAR_SET(FLAGS,[$1])
+  AC_RUN_LOG([: FLAGS="$FLAGS"])
+  ])
+AS_VAR_POPDEF([FLAGS])dnl
+])dnl AX_APPEND_FLAG
--- /dev/null
+++ b/m4/ax_check_compile_flag.m4
@@ -1,0 +1,74 @@
+# ===========================================================================
+#  https://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 <https://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 5
+
+AC_DEFUN([AX_CHECK_COMPILE_FLAG],
+[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
+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"
+  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_VAR_IF(CACHEVAR,yes,
+  [m4_default([$2], :)],
+  [m4_default([$3], :)])
+AS_VAR_POPDEF([CACHEVAR])dnl
+])dnl AX_CHECK_COMPILE_FLAGS
--- /dev/null
+++ b/m4/ax_compiler_vendor.m4
@@ -1,0 +1,87 @@
+# ===========================================================================
+#    https://www.gnu.org/software/autoconf-archive/ax_compiler_vendor.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_COMPILER_VENDOR
+#
+# DESCRIPTION
+#
+#   Determine the vendor of the C/C++ compiler, e.g., gnu, intel, ibm, sun,
+#   hp, borland, comeau, dec, cray, kai, lcc, metrowerks, sgi, microsoft,
+#   watcom, etc. The vendor is returned in the cache variable
+#   $ax_cv_c_compiler_vendor for C and $ax_cv_cxx_compiler_vendor for C++.
+#
+# LICENSE
+#
+#   Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
+#   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 <https://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 16
+
+AC_DEFUN([AX_COMPILER_VENDOR],
+[AC_CACHE_CHECK([for _AC_LANG compiler vendor], ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor,
+  dnl Please add if possible support to ax_compiler_version.m4
+  [# note: don't check for gcc first since some other compilers define __GNUC__
+  vendors="intel:     __ICC,__ECC,__INTEL_COMPILER
+           ibm:       __xlc__,__xlC__,__IBMC__,__IBMCPP__
+           pathscale: __PATHCC__,__PATHSCALE__
+           clang:     __clang__
+           cray:      _CRAYC
+           fujitsu:   __FUJITSU
+           gnu:       __GNUC__
+           sun:       __SUNPRO_C,__SUNPRO_CC
+           hp:        __HP_cc,__HP_aCC
+           dec:       __DECC,__DECCXX,__DECC_VER,__DECCXX_VER
+           borland:   __BORLANDC__,__CODEGEARC__,__TURBOC__
+           comeau:    __COMO__
+           kai:       __KCC
+           lcc:       __LCC__
+           sgi:       __sgi,sgi
+           microsoft: _MSC_VER
+           metrowerks: __MWERKS__
+           watcom:    __WATCOMC__
+           portland:  __PGI
+	   tcc:       __TINYC__
+           unknown:   UNKNOWN"
+  for ventest in $vendors; do
+    case $ventest in
+      *:) vendor=$ventest; continue ;;
+      *)  vencpp="defined("`echo $ventest | sed 's/,/) || defined(/g'`")" ;;
+    esac
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[
+      #if !($vencpp)
+        thisisanerror;
+      #endif
+    ])], [break])
+  done
+  ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor=`echo $vendor | cut -d: -f1`
+ ])
+])
--- /dev/null
+++ b/m4/ax_compiler_version.m4
@@ -1,0 +1,492 @@
+# ===========================================================================
+#   https://www.gnu.org/software/autoconf-archive/ax_compiler_version.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_COMPILER_VERSION
+#
+# DESCRIPTION
+#
+#   This macro retrieves the compiler version and returns it in the cache
+#   variable $ax_cv_c_compiler_version for C and $ax_cv_cxx_compiler_version
+#   for C++.
+#
+#   Version is returned as epoch:major.minor.patchversion
+#
+#   Epoch is used in order to have an increasing version number in case of
+#   marketing change.
+#
+#   Epoch use: * borland compiler use chronologically 0turboc for turboc
+#   era,
+#
+#     1borlanc BORLANDC++ before 5, 2cppbuilder for cppbuilder era,
+#     3borlancpp for return of BORLANDC++ (after version 5.5),
+#     4cppbuilder for cppbuilder with year version,
+#     and 5xe for XE era.
+#
+#   An empty string is returned otherwise.
+#
+# LICENSE
+#
+#   Copyright (c) 2014 Bastien ROUCARIES <roucaries.bastien+autoconf@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 9
+
+# for intel
+AC_DEFUN([_AX_COMPILER_VERSION_INTEL],
+  [ dnl
+  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_major,
+    [__INTEL_COMPILER/100],,
+    AC_MSG_FAILURE([[[$0]] unknown intel compiler version]))
+  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor,
+    [(__INTEL_COMPILER%100)/10],,
+    AC_MSG_FAILURE([[[$0]] unknown intel compiler version]))
+  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch,
+    [(__INTEL_COMPILER%10)],,
+    AC_MSG_FAILURE([[[$0]] unknown intel compiler version]))
+  ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="$_ax_[]_AC_LANG_ABBREV[]_compiler_version_major.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch"
+  ])
+
+# for IBM
+AC_DEFUN([_AX_COMPILER_VERSION_IBM],
+  [ dnl
+  dnl check between z/OS C/C++  and XL C/C++
+  AC_COMPILE_IFELSE([
+    AC_LANG_PROGRAM([],
+      [
+        #if defined(__COMPILER_VER__)
+        choke me;
+        #endif
+      ])],
+    [
+      AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_major,
+        [__xlC__/100],,
+      	AC_MSG_FAILURE([[[$0]] unknown IBM compiler major version]))
+      AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor,
+        [__xlC__%100],,
+      	AC_MSG_FAILURE([[[$0]] unknown IBM compiler minor version]))
+      AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch,
+        [__xlC_ver__/0x100],,
+      	AC_MSG_FAILURE([[[$0]] unknown IBM compiler patch version]))
+      AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_build,
+        [__xlC_ver__%0x100],,
+      	AC_MSG_FAILURE([[[$0]] unknown IBM compiler build version]))
+      ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="$_ax_[]_AC_LANG_ABBREV[]_compiler_version_major.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_build"
+    ],
+    [
+      AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch,
+        [__xlC__%1000],,
+      	AC_MSG_FAILURE([[[$0]] unknown IBM compiler patch version]))
+      AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor,
+        [(__xlC__/10000)%10],,
+      	AC_MSG_FAILURE([[[$0]] unknown IBM compiler minor version]))
+      AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_major,
+        [(__xlC__/100000)%10],,
+      	AC_MSG_FAILURE([[[$0]] unknown IBM compiler major version]))
+      ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="$_ax_[]_AC_LANG_ABBREV[]_compiler_version_major.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch"
+    ])
+])
+
+# for pathscale
+AC_DEFUN([_AX_COMPILER_VERSION_PATHSCALE],[
+  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_major,
+    __PATHCC__,,
+    AC_MSG_FAILURE([[[$0]] unknown pathscale major]))
+  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor,
+    __PATHCC_MINOR__,,
+    AC_MSG_FAILURE([[[$0]] unknown pathscale minor]))
+  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch,
+    [__PATHCC_PATCHLEVEL__],,
+    AC_MSG_FAILURE([[[$0]] unknown pathscale patch level]))
+  ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="$_ax_[]_AC_LANG_ABBREV[]_compiler_version_major.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch"
+  ])
+
+# for clang
+AC_DEFUN([_AX_COMPILER_VERSION_CLANG],[
+  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_major,
+    __clang_major__,,
+    AC_MSG_FAILURE([[[$0]] unknown clang major]))
+  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor,
+    __clang_minor__,,
+    AC_MSG_FAILURE([[[$0]] unknown clang minor]))
+  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch,
+    [__clang_patchlevel__],,0)
+  ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="$_ax_[]_AC_LANG_ABBREV[]_compiler_version_major.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch"
+  ])
+
+# for crayc
+AC_DEFUN([_AX_COMPILER_VERSION_CRAY],[
+  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_major,
+    _RELEASE,,
+    AC_MSG_FAILURE([[[$0]] unknown crayc release]))
+  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor,
+    _RELEASE_MINOR,,
+    AC_MSG_FAILURE([[[$0]] unknown crayc minor]))
+  ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="$_ax_[]_AC_LANG_ABBREV[]_compiler_version_major.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor"
+  ])
+
+# for fujitsu
+AC_DEFUN([_AX_COMPILER_VERSION_FUJITSU],[
+  AC_COMPUTE_INT(ax_cv_[]_AC_LANG_ABBREV[]_compiler_version,
+                 __FCC_VERSION,,
+		 AC_MSG_FAILURE([[[$0]]unknown fujitsu release]))
+  ])
+
+# for GNU
+AC_DEFUN([_AX_COMPILER_VERSION_GNU],[
+  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_major,
+    __GNUC__,,
+    AC_MSG_FAILURE([[[$0]] unknown gcc major]))
+  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor,
+    __GNUC_MINOR__,,
+    AC_MSG_FAILURE([[[$0]] unknown gcc minor]))
+  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch,
+    [__GNUC_PATCHLEVEL__],,
+    AC_MSG_FAILURE([[[$0]] unknown gcc patch level]))
+  ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="$_ax_[]_AC_LANG_ABBREV[]_compiler_version_major.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch"
+  ])
+
+# For sun
+AC_DEFUN([_AX_COMPILER_VERSION_SUN],[
+  m4_define([_AX_COMPILER_VERSION_SUN_NUMBER],
+            [
+	     #if defined(__SUNPRO_CC)
+	     __SUNPRO_CC
+	     #else
+	     __SUNPRO_C
+	     #endif
+	    ])
+  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_until59,
+    !!(_AX_COMPILER_VERSION_SUN_NUMBER < 0x1000),,
+    AC_MSG_FAILURE([[[$0]] unknown sun release version]))
+  AS_IF([test "X$_ax_[]_AC_LANG_ABBREV[]_compiler_version_until59" = X1],
+    [dnl
+      AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch,
+        _AX_COMPILER_VERSION_SUN_NUMBER % 0x10,,
+	AC_MSG_FAILURE([[[$0]] unknown sun patch version]))
+      AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor,
+        (_AX_COMPILER_VERSION_SUN_NUMBER / 0x10) % 0x10,,
+        AC_MSG_FAILURE([[[$0]] unknown sun minor version]))
+      AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_major,
+        (_AX_COMPILER_VERSION_SUN_NUMBER / 0x100),,
+        AC_MSG_FAILURE([[[$0]] unknown sun major version]))
+    ],
+    [dnl
+      AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch,
+        _AX_COMPILER_VERSION_SUN_NUMBER % 0x10,,
+        AC_MSG_FAILURE([[[$0]] unknown sun patch version]))
+      AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor,
+        (_AX_COMPILER_VERSION_SUN_NUMBER / 0x100) % 0x100,,
+        AC_MSG_FAILURE([[[$0]] unknown sun minor version]))
+      AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_major,
+        (_AX_COMPILER_VERSION_SUN_NUMBER / 0x1000),,
+        AC_MSG_FAILURE([[[$0]] unknown sun major version]))
+    ])
+  ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="$_ax_[]_AC_LANG_ABBREV[]_compiler_version_major.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch"
+])
+
+AC_DEFUN([_AX_COMPILER_VERSION_HP],[
+  m4_define([_AX_COMPILER_VERSION_HP_NUMBER],
+            [
+	     #if defined(__HP_cc)
+	     __HP_cc
+	     #else
+	     __HP_aCC
+	     #endif
+	    ])
+  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_untilA0121,
+    !!(_AX_COMPILER_VERSION_HP_NUMBER <= 1),,
+    AC_MSG_FAILURE([[[$0]] unknown hp release version]))
+  AS_IF([test "X$_ax_[]_AC_LANG_ABBREV[]_compiler_version_untilA0121" = X1],
+    [dnl By default output last version with this behavior.
+     dnl it is so old
+      ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="01.21.00"
+    ],
+    [dnl
+      AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch,
+        (_AX_COMPILER_VERSION_HP_NUMBER % 100),,
+        AC_MSG_FAILURE([[[$0]] unknown hp release version]))
+      AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor,
+        ((_AX_COMPILER_VERSION_HP_NUMBER / 100)%100),,
+        AC_MSG_FAILURE([[[$0]] unknown hp minor version]))
+      AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_major,
+        ((_AX_COMPILER_VERSION_HP_NUMBER / 10000)%100),,
+        AC_MSG_FAILURE([[[$0]] unknown hp major version]))
+      ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="$_ax_[]_AC_LANG_ABBREV[]_compiler_version_major.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch"
+    ])
+])
+
+AC_DEFUN([_AX_COMPILER_VERSION_DEC],[dnl
+  m4_define([_AX_COMPILER_VERSION_DEC_NUMBER],
+            [
+	     #if defined(__DECC_VER)
+	     __DECC_VER
+	     #else
+	     __DECCXX_VER
+	     #endif
+	    ])
+  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch,
+    (_AX_COMPILER_VERSION_DEC_NUMBER % 10000),,
+    AC_MSG_FAILURE([[[$0]] unknown dec release version]))
+  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor,
+    ((_AX_COMPILER_VERSION_DEC_NUMBER / 100000UL)%100),,
+    AC_MSG_FAILURE([[[$0]] unknown dec minor version]))
+  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_major,
+    ((_AX_COMPILER_VERSION_DEC_NUMBER / 10000000UL)%100),,
+    AC_MSG_FAILURE([[[$0]] unknown dec major version]))
+  ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="$_ax_[]_AC_LANG_ABBREV[]_compiler_version_major.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch"
+  ])
+
+# borland
+AC_DEFUN([_AX_COMPILER_VERSION_BORLAND],[dnl
+  m4_define([_AX_COMPILER_VERSION_TURBOC_NUMBER],
+            [
+	     #if defined(__TURBOC__)
+	     __TURBOC__
+	     #else
+	     choke me
+	     #endif
+	    ])
+  m4_define([_AX_COMPILER_VERSION_BORLANDC_NUMBER],
+            [
+	     #if defined(__BORLANDC__)
+	     __BORLANDC__
+	     #else
+	     __CODEGEARC__
+	     #endif
+	    ])
+ AC_COMPILE_IFELSE(
+   [AC_LANG_PROGRAM(,
+     _AX_COMPILER_VERSION_TURBOC_NUMBER)],
+   [dnl TURBOC
+     AC_COMPUTE_INT(
+       _ax_[]_AC_LANG_ABBREV[]_compiler_version_turboc_raw,
+       _AX_COMPILER_VERSION_TURBOC_NUMBER,,
+       AC_MSG_FAILURE([[[$0]] unknown turboc version]))
+     AS_IF(
+       [test $_ax_[]_AC_LANG_ABBREV[]_compiler_version_turboc_raw -lt 661 || test $_ax_[]_AC_LANG_ABBREV[]_compiler_version_turboc_raw -gt 1023],
+       [dnl compute normal version
+        AC_COMPUTE_INT(
+	  _ax_[]_AC_LANG_ABBREV[]_compiler_version_minor,
+	  _AX_COMPILER_VERSION_TURBOC_NUMBER % 0x100,,
+	  AC_MSG_FAILURE([[[$0]] unknown turboc minor version]))
+	AC_COMPUTE_INT(
+	  _ax_[]_AC_LANG_ABBREV[]_compiler_version_major,
+	  (_AX_COMPILER_VERSION_TURBOC_NUMBER/0x100)%0x100,,
+	  AC_MSG_FAILURE([[[$0]] unknown turboc major version]))
+	ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="0turboc:$_ax_[]_AC_LANG_ABBREV[]_compiler_version_major.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor"],
+      [dnl special version
+       AS_CASE([$_ax_[]_AC_LANG_ABBREV[]_compiler_version_turboc_raw],
+         [661],[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="0turboc:1.00"],
+	 [662],[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="0turboc:1.01"],
+         [663],[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="0turboc:2.00"],
+	 [
+	 AC_MSG_WARN([[[$0]] unknown turboc version between 0x295 and 0x400 please report bug])
+	 ax_cv_[]_AC_LANG_ABBREV[]_compiler_version=""
+	 ])
+      ])
+    ],
+    # borlandc
+    [
+    AC_COMPUTE_INT(
+      _ax_[]_AC_LANG_ABBREV[]_compiler_version_borlandc_raw,
+      _AX_COMPILER_VERSION_BORLANDC_NUMBER,,
+      AC_MSG_FAILURE([[[$0]] unknown borlandc version]))
+    AS_CASE([$_ax_[]_AC_LANG_ABBREV[]_compiler_version_borlandc_raw],
+      dnl BORLANDC++ before 5.5
+      [512] ,[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="1borlanc:2.00"],
+      [1024],[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="1borlanc:3.00"],
+      [1024],[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="1borlanc:3.00"],
+      [1040],[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="1borlanc:3.1"],
+      [1106],[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="1borlanc:4.0"],
+      [1280],[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="1borlanc:5.0"],
+      [1312],[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="1borlanc:5.02"],
+      dnl C++ Builder era
+      [1328],[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="2cppbuilder:3.0"],
+      [1344],[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="2cppbuilder:4.0"],
+      dnl BORLANDC++ after 5.5
+      [1360],[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="3borlancpp:5.5"],
+      [1361],[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="3borlancpp:5.51"],
+      [1378],[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="3borlancpp:5.6.4"],
+      dnl C++ Builder with year number
+      [1392],[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="4cppbuilder:2006"],
+      [1424],[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="4cppbuilder:2007"],
+      [1555],[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="4cppbuilder:2009"],
+      [1569],[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="4cppbuilder:2010"],
+      dnl XE version
+      [1584],[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="5xe"],
+      [1600],[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="5xe:2"],
+      [1616],[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="5xe:3"],
+      [1632],[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="5xe:4"],
+      [
+      AC_MSG_WARN([[[$0]] Unknown borlandc compiler version $_ax_[]_AC_LANG_ABBREV[]_compiler_version_borlandc_raw please report bug])
+      ])
+    ])
+  ])
+
+# COMO
+AC_DEFUN([_AX_COMPILER_VERSION_COMEAU],
+  [ dnl
+  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor,
+    [__COMO_VERSION__%100],,
+    AC_MSG_FAILURE([[[$0]] unknown comeau compiler minor version]))
+  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_major,
+    [(__COMO_VERSION__/100)%10],,
+    AC_MSG_FAILURE([[[$0]] unknown comeau compiler major version]))
+  ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="$_ax_[]_AC_LANG_ABBREV[]_compiler_version_major.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor"
+  ])
+
+# KAI
+AC_DEFUN([_AX_COMPILER_VERSION_KAI],[
+  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch,
+    [__KCC_VERSION%100],,
+    AC_MSG_FAILURE([[[$0]] unknown kay compiler patch version]))
+  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor,
+    [(__KCC_VERSION/100)%10],,
+    AC_MSG_FAILURE([[[$0]] unknown kay compiler minor version]))
+  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_major,
+    [(__KCC_VERSION/1000)%10],,
+    AC_MSG_FAILURE([[[$0]] unknown kay compiler major version]))
+  ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="$_ax_[]_AC_LANG_ABBREV[]_compiler_version_major.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch"
+  ])
+
+dnl LCC
+dnl LCC does not output version...
+
+# SGI
+AC_DEFUN([_AX_COMPILER_VERSION_SGI],[
+   m4_define([_AX_COMPILER_VERSION_SGI_NUMBER],
+            [
+	     #if defined(_COMPILER_VERSION)
+	     _COMPILER_VERSION
+	     #else
+	     _SGI_COMPILER_VERSION
+	     #endif
+	    ])
+  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch,
+    [_AX_COMPILER_VERSION_SGI_NUMBER%10],,
+    AC_MSG_FAILURE([[[$0]] unknown SGI compiler patch version]))
+  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor,
+    [(_AX_COMPILER_VERSION_SGI_NUMBER/10)%10],,
+    AC_MSG_FAILURE([[[$0]] unknown SGI compiler minor version]))
+  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_major,
+    [(_AX_COMPILER_VERSION_SGI_NUMBER/100)%10],,
+    AC_MSG_FAILURE([[[$0]] unknown SGI compiler major version]))
+  ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="$_ax_[]_AC_LANG_ABBREV[]_compiler_version_major.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch"
+  ])
+
+# microsoft
+AC_DEFUN([_AX_COMPILER_VERSION_MICROSOFT],[
+  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor,
+    _MSC_VER%100,,
+    AC_MSG_FAILURE([[[$0]] unknown microsoft compiler minor version]))
+  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_major,
+    (_MSC_VER/100)%100,,
+    AC_MSG_FAILURE([[[$0]] unknown microsoft compiler major version]))
+  dnl could be overridden
+  _ax_[]_AC_LANG_ABBREV[]_compiler_version_patch=0
+  _ax_[]_AC_LANG_ABBREV[]_compiler_version_build=0
+  # special case for version 6
+  AS_IF([test "X$_ax_[]_AC_LANG_ABBREV[]_compiler_version_major" = "X12"],
+    [AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch,
+       _MSC_FULL_VER%1000,,
+       _ax_[]_AC_LANG_ABBREV[]_compiler_version_patch=0)])
+  # for version 7
+  AS_IF([test "X$_ax_[]_AC_LANG_ABBREV[]_compiler_version_major" = "X13"],
+    [AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch,
+       _MSC_FULL_VER%1000,,
+       AC_MSG_FAILURE([[[$0]] unknown microsoft compiler patch version]))
+    ])
+  # for version > 8
+ AS_IF([test $_ax_[]_AC_LANG_ABBREV[]_compiler_version_major -ge 14],
+    [AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch,
+       _MSC_FULL_VER%10000,,
+       AC_MSG_FAILURE([[[$0]] unknown microsoft compiler patch version]))
+    ])
+ AS_IF([test $_ax_[]_AC_LANG_ABBREV[]_compiler_version_major -ge 15],
+    [AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_build,
+       _MSC_BUILD,,
+       AC_MSG_FAILURE([[[$0]] unknown microsoft compiler build version]))
+    ])
+ ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="$_ax_[]_AC_LANG_ABBREV[]_compiler_version_major.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_build"
+ ])
+
+# for metrowerks
+AC_DEFUN([_AX_COMPILER_VERSION_METROWERKS],[dnl
+  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch,
+    __MWERKS__%0x100,,
+    AC_MSG_FAILURE([[[$0]] unknown metrowerks compiler patch version]))
+  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor,
+    (__MWERKS__/0x100)%0x10,,
+    AC_MSG_FAILURE([[[$0]] unknown metrowerks compiler minor version]))
+  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_major,
+    (__MWERKS__/0x1000)%0x10,,
+    AC_MSG_FAILURE([[[$0]] unknown metrowerks compiler major version]))
+  ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="$_ax_[]_AC_LANG_ABBREV[]_compiler_version_major.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch"
+  ])
+
+# for watcom
+AC_DEFUN([_AX_COMPILER_VERSION_WATCOM],[dnl
+  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor,
+    __WATCOMC__%100,,
+    AC_MSG_FAILURE([[[$0]] unknown watcom compiler minor version]))
+  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_major,
+    (__WATCOMC__/100)%100,,
+    AC_MSG_FAILURE([[[$0]] unknown watcom compiler major version]))
+  ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="$_ax_[]_AC_LANG_ABBREV[]_compiler_version_major.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor"
+  ])
+
+# for PGI
+AC_DEFUN([_AX_COMPILER_VERSION_PORTLAND],[
+  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_major,
+    __PGIC__,,
+    AC_MSG_FAILURE([[[$0]] unknown pgi major]))
+  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor,
+    __PGIC_MINOR__,,
+    AC_MSG_FAILURE([[[$0]] unknown pgi minor]))
+  AC_COMPUTE_INT(_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch,
+    [__PGIC_PATCHLEVEL__],,
+    AC_MSG_FAILURE([[[$0]] unknown pgi patch level]))
+  ax_cv_[]_AC_LANG_ABBREV[]_compiler_version="$_ax_[]_AC_LANG_ABBREV[]_compiler_version_major.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_minor.$_ax_[]_AC_LANG_ABBREV[]_compiler_version_patch"
+  ])
+
+# tcc
+AC_DEFUN([_AX_COMPILER_VERSION_TCC],[
+  ax_cv_[]_AC_LANG_ABBREV[]_compiler_version=[`tcc -v | $SED 's/^[ ]*tcc[ ]\+version[ ]\+\([0-9.]\+\).*/\1/g'`]
+  ])
+# main entry point
+AC_DEFUN([AX_COMPILER_VERSION],[dnl
+  AC_REQUIRE([AX_COMPILER_VENDOR])
+  AC_REQUIRE([AC_PROG_SED])
+  AC_CACHE_CHECK([for _AC_LANG compiler version],
+    ax_cv_[]_AC_LANG_ABBREV[]_compiler_version,
+    [ dnl
+      AS_CASE([$ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor],
+        [intel],[_AX_COMPILER_VERSION_INTEL],
+	[ibm],[_AX_COMPILER_VERSION_IBM],
+	[pathscale],[_AX_COMPILER_VERSION_PATHSCALE],
+	[clang],[_AX_COMPILER_VERSION_CLANG],
+	[cray],[_AX_COMPILER_VERSION_CRAY],
+	[fujitsu],[_AX_COMPILER_VERSION_FUJITSU],
+        [gnu],[_AX_COMPILER_VERSION_GNU],
+	[sun],[_AX_COMPILER_VERSION_SUN],
+	[hp],[_AX_COMPILER_VERSION_HP],
+	[dec],[_AX_COMPILER_VERSION_DEC],
+	[borland],[_AX_COMPILER_VERSION_BORLAND],
+	[comeau],[_AX_COMPILER_VERSION_COMEAU],
+	[kai],[_AX_COMPILER_VERSION_KAI],
+	[sgi],[_AX_COMPILER_VERSION_SGI],
+	[microsoft],[_AX_COMPILER_VERSION_MICROSOFT],
+	[metrowerks],[_AX_COMPILER_VERSION_METROWERKS],
+	[watcom],[_AX_COMPILER_VERSION_WATCOM],
+	[portland],[_AX_COMPILER_VERSION_PORTLAND],
+	[tcc],[_AX_COMPILER_VERSION_TCC],
+  	[ax_cv_[]_AC_LANG_ABBREV[]_compiler_version=""])
+    ])
+])
--- /dev/null
+++ b/m4/ax_recursive_eval.m4
@@ -1,0 +1,56 @@
+# ===========================================================================
+#    https://www.gnu.org/software/autoconf-archive/ax_recursive_eval.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_RECURSIVE_EVAL(VALUE, RESULT)
+#
+# DESCRIPTION
+#
+#   Interpolate the VALUE in loop until it doesn't change, and set the
+#   result to $RESULT. WARNING: It's easy to get an infinite loop with some
+#   unsane input.
+#
+# LICENSE
+#
+#   Copyright (c) 2008 Alexandre Duret-Lutz <adl@gnu.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 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 <https://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 1
+
+AC_DEFUN([AX_RECURSIVE_EVAL],
+[_lcl_receval="$1"
+$2=`(test "x$prefix" = xNONE && prefix="$ac_default_prefix"
+     test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
+     _lcl_receval_old=''
+     while test "[$]_lcl_receval_old" != "[$]_lcl_receval"; do
+       _lcl_receval_old="[$]_lcl_receval"
+       eval _lcl_receval="\"[$]_lcl_receval\""
+     done
+     echo "[$]_lcl_receval")`])
--- /dev/null
+++ b/m4/ax_require_defined.m4
@@ -1,0 +1,37 @@
+# ===========================================================================
+#    https://www.gnu.org/software/autoconf-archive/ax_require_defined.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_REQUIRE_DEFINED(MACRO)
+#
+# DESCRIPTION
+#
+#   AX_REQUIRE_DEFINED is a simple helper for making sure other macros have
+#   been defined and thus are available for use.  This avoids random issues
+#   where a macro isn't expanded.  Instead the configure script emits a
+#   non-fatal:
+#
+#     ./configure: line 1673: AX_CFLAGS_WARN_ALL: command not found
+#
+#   It's like AC_REQUIRE except it doesn't expand the required macro.
+#
+#   Here's an example:
+#
+#     AX_REQUIRE_DEFINED([AX_CHECK_LINK_FLAG])
+#
+# LICENSE
+#
+#   Copyright (c) 2014 Mike Frysinger <vapier@gentoo.org>
+#
+#   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_REQUIRE_DEFINED], [dnl
+  m4_ifndef([$1], [m4_fatal([macro ]$1[ is not defined; is a m4 file missing?])])
+])dnl AX_REQUIRE_DEFINED
--- /dev/null
+++ b/m4/check_signal.m4
@@ -1,0 +1,26 @@
+dnl @synopsis AC_CHECK_SIGNAL(SIGNAME)
+dnl
+dnl
+dnl @category C
+dnl @author Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+dnl @version 1.0	Jul 07 2007
+
+AC_DEFUN([AC_CHECK_SIGNAL],
+[AC_CACHE_CHECK(for $1,
+  ac_cv_signal_$1,
+[
+AC_TRY_LINK([
+#include <signal.h>
+
+], signal($1, SIG_DFL) ;, ac_cv_signal_$1=yes, ac_cv_signal_$1=no)
+
+])
+
+if test "$ac_cv_signal_$1" = yes; then
+  AC_DEFINE(HAVE_$1, 1,
+            [Define if you have signal $1.])
+fi
+])# AC_CHECK_SIGNAL
+
+
+## AC_CHECK_SIGNALS
--- /dev/null
+++ b/m4/clip_mode.m4
@@ -1,0 +1,124 @@
+dnl @synopsis AC_C_CLIP_MODE
+dnl
+dnl Determine the clipping mode when converting float to int.
+dnl @version 1.0	May 17 2003
+dnl @author Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+dnl
+dnl Permission to use, copy, modify, distribute, and sell this file for any 
+dnl purpose is hereby granted without fee, provided that the above copyright 
+dnl and this permission notice appear in all copies.  No representations are
+dnl made about the suitability of this software for any purpose.  It is 
+dnl provided "as is" without express or implied warranty.
+
+
+
+
+
+
+
+dnl Find the clipping mode in the following way:
+dnl    1) If we are not cross compiling test it.
+dnl    2) IF we are cross compiling, assume that clipping isn't done correctly.
+
+AC_DEFUN([AC_C_CLIP_MODE],
+[AC_CACHE_CHECK(processor clipping capabilities, 
+	ac_cv_c_clip_type,
+
+# Initialize to unknown
+ac_cv_c_clip_positive=unknown
+ac_cv_c_clip_negative=unknown
+
+
+if test $ac_cv_c_clip_positive = unknown ; then
+	AC_TRY_RUN(
+	[[
+	#define	_ISOC9X_SOURCE	1
+	#define _ISOC99_SOURCE	1
+	#define	__USE_ISOC99	1
+	#define __USE_ISOC9X	1
+	#include <math.h>
+	int main (void)
+	{	double	fval ;
+		int k, ival ;
+
+		fval = 1.0 * 0x7FFFFFFF ;
+		for (k = 0 ; k < 100 ; k++)
+		{	ival = (lrint (fval)) >> 24 ;
+			if (ival != 127)
+				return 1 ;
+		
+			fval *= 1.2499999 ;
+			} ;
+		
+			return 0 ;
+		}
+		]],
+		ac_cv_c_clip_positive=yes,
+		ac_cv_c_clip_positive=no,
+		ac_cv_c_clip_positive=unknown
+		)
+
+	AC_TRY_RUN(
+	[[
+	#define	_ISOC9X_SOURCE	1
+	#define _ISOC99_SOURCE	1
+	#define	__USE_ISOC99	1
+	#define __USE_ISOC9X	1
+	#include <math.h>
+	int main (void)
+	{	double	fval ;
+		int k, ival ;
+
+		fval = -8.0 * 0x10000000 ;
+		for (k = 0 ; k < 100 ; k++)
+		{	ival = (lrint (fval)) >> 24 ;
+			if (ival != -128)
+				return 1 ;
+		
+			fval *= 1.2499999 ;
+			} ;
+		
+			return 0 ;
+		}
+		]],
+		ac_cv_c_clip_negative=yes,
+		ac_cv_c_clip_negative=no,
+		ac_cv_c_clip_negative=unknown
+		)
+	fi
+
+if test $ac_cv_c_clip_positive = yes ; then
+	ac_cv_c_clip_positive=1
+else
+	ac_cv_c_clip_positive=0
+	fi
+
+if test $ac_cv_c_clip_negative = yes ; then
+	ac_cv_c_clip_negative=1
+else
+	ac_cv_c_clip_negative=0
+	fi
+
+[[
+case "$ac_cv_c_clip_positive$ac_cv_c_clip_negative" in
+	"00")
+		ac_cv_c_clip_type="none"
+		;;
+	"10")
+		ac_cv_c_clip_type="positive"
+		;;
+	"01")
+		ac_cv_c_clip_type="negative"
+		;;
+	"11")
+		ac_cv_c_clip_type="both"
+		;;
+	esac
+	]]
+
+)
+]
+
+)# AC_C_CLIP_MODE
+
+
--- /dev/null
+++ b/m4/endian.m4
@@ -1,0 +1,155 @@
+dnl @synopsis AC_C_FIND_ENDIAN
+dnl
+dnl Determine endian-ness of target processor.
+dnl @version 1.1	Mar 03 2002
+dnl @author Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+dnl
+dnl Majority written from scratch to replace the standard autoconf macro 
+dnl AC_C_BIGENDIAN. Only part remaining from the original it the invocation
+dnl of the AC_TRY_RUN macro.
+dnl
+dnl Permission to use, copy, modify, distribute, and sell this file for any 
+dnl purpose is hereby granted without fee, provided that the above copyright 
+dnl and this permission notice appear in all copies.  No representations are
+dnl made about the suitability of this software for any purpose.  It is 
+dnl provided "as is" without express or implied warranty.
+
+dnl Find endian-ness in the following way:
+dnl    1) Look in <endian.h>.
+dnl    2) If 1) fails, look in <sys/types.h> and <sys/param.h>.
+dnl    3) If 1) and 2) fails and not cross compiling run a test program.
+dnl    4) If 1) and 2) fails and cross compiling then guess based on target.
+
+AC_DEFUN([AC_C_FIND_ENDIAN],
+[AC_CACHE_CHECK(processor byte ordering, 
+	ac_cv_c_byte_order,
+
+# Initialize to unknown
+ac_cv_c_byte_order=unknown
+
+if test x$ac_cv_header_endian_h = xyes ; then
+
+	# First try <endian.h> which should set BYTE_ORDER.
+
+	[AC_TRY_LINK([
+		#include <endian.h>
+		#if BYTE_ORDER != LITTLE_ENDIAN
+			not big endian
+		#endif
+		], return 0 ;, 
+			ac_cv_c_byte_order=little
+		)]
+				
+	[AC_TRY_LINK([
+		#include <endian.h>
+		#if BYTE_ORDER != BIG_ENDIAN
+			not big endian
+		#endif
+		], return 0 ;, 
+			ac_cv_c_byte_order=big
+		)]
+
+	fi
+
+if test $ac_cv_c_byte_order = unknown ; then
+
+	[AC_TRY_LINK([
+		#include <sys/types.h>
+		#include <sys/param.h>
+		#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
+			bogus endian macros
+		#endif
+		], return 0 ;, 
+
+		[AC_TRY_LINK([
+			#include <sys/types.h>
+			#include <sys/param.h>
+			#if BYTE_ORDER != LITTLE_ENDIAN
+				not big endian
+			#endif
+			], return 0 ;, 
+				ac_cv_c_byte_order=little
+			)]
+				
+		[AC_TRY_LINK([
+			#include <sys/types.h>
+			#include <sys/param.h>
+			#if BYTE_ORDER != LITTLE_ENDIAN
+				not big endian
+			#endif
+			], return 0 ;, 
+				ac_cv_c_byte_order=little
+			)]
+
+		)]
+
+ 	fi
+
+if test $ac_cv_c_byte_order = unknown ; then
+	if test $cross_compiling = yes ; then
+		# This is the last resort. Try to guess the target processor endian-ness
+		# by looking at the target CPU type.	
+		[
+		case "$target_cpu" in
+			alpha* | i?86* | mipsel* | ia64*)
+				ac_cv_c_byte_order=little
+				;;
+			
+			m68* | mips* | powerpc* | hppa* | sparc*)
+				ac_cv_c_byte_order=big
+				;;
+	
+			esac
+		]
+	else
+		AC_TRY_RUN(
+		[[
+		int main (void) 
+		{	/* Are we little or big endian?  From Harbison&Steele.  */
+			union
+			{	long l ;
+				char c [sizeof (long)] ;
+			} u ;
+			u.l = 1 ;
+			return (u.c [sizeof (long) - 1] == 1);
+			}
+			]], , ac_cv_c_byte_order=big, 
+			)
+
+		AC_TRY_RUN(
+		[[int main (void) 
+		{	/* Are we little or big endian?  From Harbison&Steele.  */
+			union
+			{	long l ;
+				char c [sizeof (long)] ;
+			} u ;
+			u.l = 1 ;
+			return (u.c [0] == 1);
+			}]], , ac_cv_c_byte_order=little, 
+			)
+		fi	
+	fi
+
+)
+
+if test $ac_cv_c_byte_order = big ; then
+	ac_cv_c_big_endian=1
+	ac_cv_c_little_endian=0
+elif test $ac_cv_c_byte_order = little ; then
+	ac_cv_c_big_endian=0
+	ac_cv_c_little_endian=1
+else
+	ac_cv_c_big_endian=0
+	ac_cv_c_little_endian=0
+
+	AC_MSG_WARN([[*****************************************************************]])
+	AC_MSG_WARN([[*** Not able to determine endian-ness of target processor.       ]])
+	AC_MSG_WARN([[*** The constants CPU_IS_BIG_ENDIAN and CPU_IS_LITTLE_ENDIAN in  ]])
+	AC_MSG_WARN([[*** src/config.h may need to be hand editied.                    ]])
+	AC_MSG_WARN([[*****************************************************************]])
+	fi
+
+]
+)# AC_C_FIND_ENDIAN
+
+
--- /dev/null
+++ b/m4/lrint.m4
@@ -1,0 +1,37 @@
+dnl @synopsis AC_C99_FUNC_LRINT
+dnl
+dnl Check whether C99's lrint function is available.
+dnl @version 1.3	Feb 12 2002
+dnl @author Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+dnl
+dnl Permission to use, copy, modify, distribute, and sell this file for any 
+dnl purpose is hereby granted without fee, provided that the above copyright 
+dnl and this permission notice appear in all copies.  No representations are
+dnl made about the suitability of this software for any purpose.  It is 
+dnl provided "as is" without express or implied warranty.
+dnl
+AC_DEFUN([AC_C99_FUNC_LRINT],
+[AC_CACHE_CHECK(for lrint,
+  ac_cv_c99_lrint,
+[
+lrint_save_CFLAGS=$CFLAGS
+CFLAGS="-lm"
+AC_TRY_LINK([
+#define		_ISOC9X_SOURCE	1
+#define 	_ISOC99_SOURCE	1
+#define		__USE_ISOC99	1
+#define 	__USE_ISOC9X	1
+
+#include <math.h>
+], if (!lrint(3.14159)) lrint(2.7183);, ac_cv_c99_lrint=yes, ac_cv_c99_lrint=no)
+
+CFLAGS=$lrint_save_CFLAGS
+
+])
+
+if test "$ac_cv_c99_lrint" = yes; then
+  AC_DEFINE(HAVE_LRINT, 1,
+            [Define if you have C99's lrint function.])
+fi
+])# AC_C99_FUNC_LRINT
+
--- /dev/null
+++ b/m4/lrintf.m4
@@ -1,0 +1,37 @@
+dnl @synopsis AC_C99_FUNC_LRINTF
+dnl
+dnl Check whether C99's lrintf function is available.
+dnl @version 1.3	Feb 12 2002
+dnl @author Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+dnl
+dnl Permission to use, copy, modify, distribute, and sell this file for any 
+dnl purpose is hereby granted without fee, provided that the above copyright 
+dnl and this permission notice appear in all copies.  No representations are
+dnl made about the suitability of this software for any purpose.  It is 
+dnl provided "as is" without express or implied warranty.
+dnl
+AC_DEFUN([AC_C99_FUNC_LRINTF],
+[AC_CACHE_CHECK(for lrintf,
+  ac_cv_c99_lrintf,
+[
+lrintf_save_CFLAGS=$CFLAGS
+CFLAGS="-lm"
+AC_TRY_LINK([
+#define		_ISOC9X_SOURCE	1
+#define 	_ISOC99_SOURCE	1
+#define		__USE_ISOC99	1
+#define 	__USE_ISOC9X	1
+
+#include <math.h>
+], if (!lrintf(3.14159)) lrintf(2.7183);, ac_cv_c99_lrintf=yes, ac_cv_c99_lrintf=no)
+
+CFLAGS=$lrintf_save_CFLAGS
+
+])
+
+if test "$ac_cv_c99_lrintf" = yes; then
+  AC_DEFINE(HAVE_LRINTF, 1,
+            [Define if you have C99's lrintf function.])
+fi
+])# AC_C99_FUNC_LRINTF
+