From 514430c6143239b1c1a2ed4d263b4cc518206a46 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Thu, 23 Mar 2017 15:01:09 +1100 Subject: [PATCH] build: remove autotools support --- .gitmodules | 3 - Makefile.am | 490 ---------------------------------------- configure.ac | 137 ----------- m4/.gitignore | 2 - m4/ax_append_flag.m4 | 71 ------ m4/ax_check_gnu_make.m4 | 84 ------- m4/nc | 1 - m4/ragel.m4 | 53 ----- 8 files changed, 841 deletions(-) delete mode 100644 Makefile.am delete mode 100644 configure.ac delete mode 100644 m4/.gitignore delete mode 100644 m4/ax_append_flag.m4 delete mode 100644 m4/ax_check_gnu_make.m4 delete mode 160000 m4/nc delete mode 100644 m4/ragel.m4 diff --git a/.gitmodules b/.gitmodules index 4c20f4a0..2c9dc6b2 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,3 @@ -[submodule "m4/nc"] - path = m4/nc - url = git://git.nerdcruft.net/autocruft [submodule "cmake"] path = cmake url = git://git.nerdcruft.net/cmake diff --git a/Makefile.am b/Makefile.am deleted file mode 100644 index b182b40b..00000000 --- a/Makefile.am +++ /dev/null @@ -1,490 +0,0 @@ -############################################################################### -## Global build rules - -ACLOCAL_AMFLAGS = -I m4 - -AM_CXXFLAGS = -AM_DEFAULT_SOURCE_EXT = .cpp - -############################################################################### -## Source definitions - -UTIL_FILES = \ - adapter.hpp \ - adapter.cpp \ - alloc/fwd.hpp \ - alloc/affix.cpp \ - alloc/affix.hpp \ - alloc/aligned.hpp \ - alloc/allocator.cpp \ - alloc/allocator.hpp \ - alloc/allocator.ipp \ - alloc/arena.cpp \ - alloc/arena.hpp \ - alloc/arena.ipp \ - alloc/dynamic.hpp \ - alloc/fallback.cpp \ - alloc/fallback.hpp \ - alloc/linear.cpp \ - alloc/linear.hpp \ - alloc/malloc.cpp \ - alloc/malloc.hpp \ - alloc/null.cpp \ - alloc/null.hpp \ - alloc/stack.cpp \ - alloc/stack.hpp \ - annotation.hpp \ - ascii.hpp \ - backtrace.hpp \ - bezier.cpp \ - bezier1.cpp \ - bezier2.cpp \ - bezier3.cpp \ - bezier.hpp \ - bitwise.cpp \ - bitwise.hpp \ - cast.hpp \ - cmdopt.cpp \ - cmdopt.hpp \ - cmdopt.ipp \ - colour.cpp \ - colour.hpp \ - colour.ipp \ - coord/fwd.hpp \ - coord/base.hpp \ - coord.hpp \ - coord/init.hpp \ - coord/iostream.hpp \ - coord/names.hpp \ - coord/ops.hpp \ - coord/store.hpp \ - crypto/arc4.cpp \ - crypto/arc4.hpp \ - crypto/ice.cpp \ - crypto/ice.hpp \ - crypto/tea.cpp \ - crypto/tea.hpp \ - crypto/xtea.cpp \ - crypto/xtea.hpp \ - crypto/xxtea.cpp \ - crypto/xxtea.hpp \ - debug.cpp \ - debug.hpp \ - debug.ipp \ - endian.cpp \ - endian.hpp \ - except.cpp \ - except.hpp \ - exe.hpp \ - extent.cpp \ - extent.hpp \ - extent.ipp \ - fixed.cpp \ - fixed.hpp \ - float.cpp \ - float.hpp \ - format.cpp \ - format.hpp \ - format.ipp \ - fourcc.cpp \ - fourcc.hpp \ - geom/fwd.hpp \ - geom/aabb.cpp \ - geom/aabb.hpp \ - geom/aabb.ipp \ - geom/cylinder.cpp \ - geom/cylinder.hpp \ - geom/ellipse.cpp \ - geom/ellipse.hpp \ - geom/ellipse.ipp \ - geom/iostream.cpp \ - geom/iostream.hpp \ - geom/ops.hpp \ - geom/plane.cpp \ - geom/plane.hpp \ - geom/ray.cpp \ - geom/ray.hpp \ - geom/rect.cpp \ - geom/rect.hpp \ - geom/sample.hpp \ - geom/sample.ipp \ - geom/sphere.cpp \ - geom/sphere.hpp \ - geom/tri.cpp \ - geom/tri.hpp \ - hash.hpp \ - hash/fwd.hpp \ - hash/simple.hpp \ - hash/simple.cpp \ - hash/adler.cpp \ - hash/adler.hpp \ - hash/bsdsum.cpp \ - hash/bsdsum.hpp \ - hash/crc.cpp \ - hash/crc.hpp \ - hash/fasthash.cpp \ - hash/fasthash.hpp \ - hash/fletcher.cpp \ - hash/fletcher.hpp \ - hash/fnv1a.cpp \ - hash/fnv1a.hpp \ - hash/hmac.cpp \ - hash/hmac.hpp \ - hash/hotp.cpp \ - hash/hotp.hpp \ - hash/keccak.cpp \ - hash/keccak.hpp \ - hash/md2.cpp \ - hash/md2.hpp \ - hash/md4.cpp \ - hash/md4.hpp \ - hash/md5.cpp \ - hash/md5.hpp \ - hash/murmur/common.cpp \ - hash/murmur/common.hpp \ - hash/murmur.hpp \ - hash/murmur/murmur1.cpp \ - hash/murmur/murmur1.hpp \ - hash/murmur/murmur2.cpp \ - hash/murmur/murmur2.hpp \ - hash/murmur/murmur3.cpp \ - hash/murmur/murmur3.hpp \ - hash/pbkdf1.cpp \ - hash/pbkdf1.hpp \ - hash/pbkdf2.cpp \ - hash/pbkdf2.hpp \ - hash/ripemd.cpp \ - hash/ripemd.hpp \ - hash/sha1.cpp \ - hash/sha1.hpp \ - hash/sha2.cpp \ - hash/sha2.hpp \ - hash/wang.hpp \ - hash/wang.ipp \ - hash/xxhash.cpp \ - hash/xxhash.hpp \ - introspection.cpp \ - introspection.hpp \ - io.cpp \ - io.hpp \ - io.ipp \ - iterator.hpp \ - json/fwd.hpp \ - json/except.cpp \ - json/except.hpp \ - json/flat.cpp \ - json/flat.hpp \ - json/schema.cpp \ - json/schema.hpp \ - json/tree.cpp \ - json/tree.hpp \ - library.hpp \ - log.cpp \ - log.hpp \ - log.ipp \ - maths.cpp \ - maths.hpp \ - matrix.cpp \ - matrix2.cpp \ - matrix3.cpp \ - matrix4.cpp \ - matrix.hpp \ - matrix.ipp \ - memory/deleter.cpp \ - memory/deleter.hpp \ - nocopy.hpp \ - pascal.cpp \ - pascal.hpp \ - platform.hpp \ - point.cpp \ - point.hpp \ - point.ipp \ - pointer.hpp \ - polynomial.cpp \ - polynomial.hpp \ - polynomial.ipp \ - pool.cpp \ - pool.hpp \ - pool.ipp \ - preprocessor.hpp \ - quaternion.cpp \ - quaternion.hpp \ - quaternion.ipp \ - raii.hpp \ - rand/lcg.cpp \ - rand/lcg.hpp \ - rand/xorshift.cpp \ - rand/xorshift.hpp \ - rand/mwc64x.cpp \ - rand/mwc64x.hpp \ - random.cpp \ - random.hpp \ - range.cpp \ - range.hpp \ - range.ipp \ - rational.cpp \ - rational.hpp \ - rational.ipp \ - region.cpp \ - region.hpp \ - region.ipp \ - roots/bisection.hpp \ - si.cpp \ - signal.cpp \ - signal.hpp \ - signal.ipp \ - si.hpp \ - stats.cpp \ - stats.hpp \ - stream.cpp \ - stream.hpp \ - string.cpp \ - string.hpp \ - stringid.cpp \ - stringid.hpp \ - strongdef.cpp \ - strongdef.hpp \ - tap.cpp \ - tap.hpp \ - tap.ipp \ - term.cpp \ - term.hpp \ - time.cpp \ - time.hpp \ - time.ipp \ - tuple.cpp \ - tuple.hpp \ - types/bits.hpp \ - types/comparator.hpp \ - types/comparator.ipp \ - types.hpp \ - types/string.cpp \ - types/string.hpp \ - types/traits.hpp \ - uri.cpp \ - uri.hpp \ - variadic.cpp \ - variadic.hpp \ - variadic.ipp \ - vector.cpp \ - vector.hpp \ - vector.ipp \ - version.cpp \ - version.hpp \ - view.cpp \ - view.ipp \ - view.hpp \ - $(BACKTRACE_FILES) - - -POSIX_FILES = \ - memory/buffer/circular.cpp \ - memory/buffer/circular.hpp \ - memory/buffer/paged.cpp \ - memory/buffer/paged.hpp \ - memory/system.cpp \ - memory/system.hpp \ - debug_posix.cpp \ - io_posix.cpp \ - io_posix.hpp \ - io_posix.ipp \ - library_posix.hpp \ - library_posix.cpp \ - posix/fwd.hpp \ - posix/map.cpp \ - posix/map.hpp \ - time_posix.cpp - - -if PLATFORM_LINUX -UTIL_FILES += $(POSIX_FILES) exe_linux.cpp -endif - -if PLATFORM_FREEBSD -UTIL_FILES += $(POSIX_FILES) exe_freebsd.cpp -endif - -UTIL_FILES += \ - posix/dir.cpp \ - posix/dir.hpp \ - posix/dir.ipp \ - posix/fd.cpp \ - posix/fd.hpp - -if PLATFORM_WIN32 -UTIL_FILES += \ - debug_win32.cpp \ - exe_win32.cpp \ - io_win32.cpp \ - io_win32.hpp \ - io_win32.ipp \ - library_win32.hpp \ - library_win32.cpp \ - time_win32.cpp \ - win32/handle.cpp \ - win32/handle.hpp \ - win32/registry.hpp \ - win32/registry.cpp -endif - - -# Select one of the available backtrace codepaths. We construct a list of -# candidates in their preferred order then used firstword to choose the best -# one. -# -# We need to use this two variable approach otherwise the final variable -# doesn't seem to be expanded at the appropriate time. Using ?= apparently -# suffers a similar problem. - -__BACKTRACE_FILES= -if HAVE_EXECINFO -__BACKTRACE_FILES += backtrace_execinfo.cpp -endif - -if HAVE_CAPTURESTACKBACKTRACE -__BACKTRACE_FILES += backtrace_stackwalk.cpp backtrace_win32.cpp -endif - -if !HAVE_STD_EXPERIMENTAL_FILESYSTEM -AM_CXXFLAGS += -isystem ${top_srcdir}/fixup -UTIL_FILES += \ - fixup/experimental/filesystem.hpp \ - fixup/experimental/filesystem.cpp -endif - -BACKTRACE_FILES=$(firstword $(__BACKTRACE_FILES) backtrace_null.cpp) - - -############################################################################### -## Local build rules -CLEANFILES = json.cpp version.cpp uri.cpp -EXTRA_DIST = json/flat.cpp.rl version.cpp.rl uri.cpp.rl - -RAGELFLAGS = -F1 -SUFFIXES = .cpp .cpp.rl -.cpp.rl.cpp: - $(RAGEL) $(RAGELFLAGS) -C $< -o $(builddir)/$@ - -############################################################################### -## Library definition -lib_LIBRARIES = libcruft-util.a -libcruft_util_a_SOURCES = $(UTIL_FILES) -libcruft_util_a_CXXFLAGS = $(AM_CXXFLAGS) - -nobase_pkginclude_HEADERS = $(filter %.hpp %.ipp, $(UTIL_FILES)) -pkgincludedir = $(includedir)/cruft/util -pkglibdir = $(libdir)/ -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = libcruft-util.pc - -EXTRA_DIST += ${top_srcdir}/build-aux/wine-crlf.sh - -############################################################################### -## Utility programs - -LDADD = $(top_builddir)/libcruft-util.a $(LIBS) - -bin_PROGRAMS = \ - tools/json-clean \ - tools/json-validate \ - tools/json-schema \ - tools/hash - -noinst_PROGRAMS = tools/scratch - - -##----------------------------------------------------------------------------- -## Tests - -AM_CXXFLAGS += -I$(top_srcdir) - -TEST_BIN = \ - test/alloc/aligned \ - test/alloc/arena \ - test/alloc/dynamic \ - test/alloc/linear \ - test/alloc/stack \ - test/affine \ - test/backtrace \ - test/bezier \ - test/bitwise \ - test/cmdopt \ - test/colour \ - test/coord \ - test/crypto/arc4 \ - test/crypto/ice \ - test/crypto/tea \ - test/crypto/xtea \ - test/crypto/xxtea \ - test/exe \ - test/extent \ - test/fixed \ - test/float \ - test/format \ - test/geom/aabb \ - test/geom/ray \ - test/hash/checksum \ - test/hash/fasthash \ - test/hash/hmac \ - test/hash/hotp \ - test/hash/keccak \ - test/hash/md2 \ - test/hash/md4 \ - test/hash/md5 \ - test/hash/murmur \ - test/hash/ripemd \ - test/hash/sha1 \ - test/hash/sha2 \ - test/hash/xxhash \ - test/hton \ - test/introspection \ - test/json_types \ - test/maths \ - test/matrix \ - test/memory/deleter \ - test/point \ - test/polynomial \ - test/pool \ - test/quaternion \ - test/rand/buckets \ - test/range \ - test/rational \ - test/region \ - test/roots/bisection \ - test/signal \ - test/stream \ - test/string \ - test/stringid \ - test/strongdef \ - test/tuple \ - test/uri \ - test/vector \ - test/version \ - test/view - -if !PLATFORM_WIN32 -TEST_BIN += test/memory/buffer/paged test/memory/buffer/circular -endif - - -TEST_EXTENSIONS = .exe #.py .sh .exe - -if PLATFORM_WIN32 -test_hton_LDFLAGS = -lws2_32 -endif - -# ideally we'd use EXE_LOG_COMPILER, but automake doesn't easily use EXEEXT as -# part of the log targets so it's just easier to run everything through the -# wine filter. -LOG_COMPILER = ${top_srcdir}/build-aux/wine-crlf.sh - -LOG_DRIVER = env ASAN_OPTIONS=$(ASAN_OPTIONS):allow_user_segv_handler=true AM_TAP_AWK='$(AWK)' $(SHELL) $(top_srcdir)/build-aux/tap-driver.sh - -TESTS = $(TEST_BIN) test/json-parse.sh test/json-schema.py -check_PROGRAMS = $(TEST_BIN) -EXTRA_DIST += test/json test/json-parse.sh test/json-schema.py - -.PHONY: doc - -doc: $(top_builddir)/Doxyfile - doxygen $< diff --git a/configure.ac b/configure.ac deleted file mode 100644 index 96d9abce..00000000 --- a/configure.ac +++ /dev/null @@ -1,137 +0,0 @@ -AC_INIT([util-cruft], [0.1.0], [danny@nerdcruft.net]) -## Explicitly set an empty CXXFLAGS if not present to prevent AC_PROG_CXX from -## generating a default -O2. This allows us to manually select -O0 when -## debugging is enabled. -: ${CXXFLAGS=""} - -############################################################################### -## Build environment discovery - -AC_CONFIG_AUX_DIR([build-aux]) -AC_REQUIRE_AUX_FILE([tap-driver.sh]) -AC_CONFIG_MACRO_DIR([m4]) -AC_CONFIG_MACRO_DIR([m4/nc]) - -AC_USE_SYSTEM_EXTENSIONS -AC_CANONICAL_HOST - -AC_LANG([C++]) - -NC_CXX -NC_PLATFORM -NC_OPTIMISATION -NC_WARNINGS -# NC_DEBUGGING is called further down, see notes at the call site. - -LT_INIT - -AM_INIT_AUTOMAKE([1.15 foreign dist-xz subdir-objects]) -AM_SILENT_RULES([yes]) -AM_MAINTAINER_MODE([enable]) - -AC_CONFIG_HEADERS([config.h]) - -AX_CHECK_GNU_MAKE - -############################################################################### -## Architecture features - -AC_C_BIGENDIAN - -############################################################################### -## Useful headers or platform features - -############################################################################### -## Platform features - -## Find some POSIX functions that windows doesn't support -AS_IF([test "x${host_os}" != "xmingw32"],[ - AC_SEARCH_LIBS([dlopen], [dl], [], [AC_MSG_ERROR([unable to find dl library])]) - AC_SEARCH_LIBS([shm_open], [rt], [], [AC_MSG_ERROR([unable to find shm library])]) -]) - -AC_FUNC_MMAP - -AC_CHECK_HEADERS([experimental/filesystem]) -AM_CONDITIONAL([HAVE_STD_EXPERIMENTAL_FILESYSTEM], [test "x$ac_cv_header_experimental_filesystem" == "xyes"]) - -AC_SEARCH_LIBS([backtrace], [execinfo]) -AC_CHECK_FUNC([backtrace]) -AM_CONDITIONAL([HAVE_EXECINFO], [test "x$ac_cv_func_backtrace" == "xyes"]) - -AC_CHECK_FUNC([RtlCaptureStackBackTrace]) -AM_CONDITIONAL([HAVE_CAPTURESTACKBACKTRACE], [test "x$ac_cv_func_RtlCaptureStackBackTrace" == "xyes"]) - -AC_MSG_CHECKING([for SymFromAddr]) -save_LIBS="$LIBS" -LIBS="${LIBS} -ldbghelp" -AC_LINK_IFELSE([AC_LANG_PROGRAM( -[ -#include -#include -], -[SymFromAddr(nullptr,0,nullptr,nullptr); return 0;])],[ - AC_MSG_RESULT([yes]) -], [ - AC_MSG_RESULT([no]) - LIBS="$save_LIBS" -]) - - -AC_SEARCH_LIBS([clock_gettime], [rt c], [], [ - # windows doesn't have clock_gettime - AS_IF([test "x${host_os}" != "xmingw32"], [ - AC_MSG_ERROR([unable to find the clock library]) - ]) -]) - -AC_SEARCH_LIBS([cos], [m], [], [AC_MSG_ERROR([unable to find the maths library])]) - - -############################################################################### -## Debug features - -dnl debugging might enable sanitizers, which might alter the available -dnl libraries, so this needs to be called after we've completed our tests. -dnl specifically: -ldl is implied by some of the sanitizers. -NC_DEBUGGING - -############################################################################### -## Documentation - -############################################################################### -## Required packages - -CHECK_RAGEL([ip.cpp]) - -############################################################################### -## Optional packages - -AC_CHECK_TOOL([ADDR2LINE], [addr2line], [:]) -AS_IF([test "x$ADDR2LINE" != "x:"], [ - AC_DEFINE_UNQUOTED([ADDR2LINE], ["$ADDR2LINE"], [addr2line tool name]) -]) - -############################################################################### -## Performance and build optimisations - -############################################################################### -## Output - -AC_SUBST(LIBS) - -# inclusion of config.h has to go after compilation tests otherwise we risk -# failure on a clean build -AX_APPEND_FLAG([-include config.h]) - -NC_SUBPACKAGE([cruft-util]) - -AC_CONFIG_FILES([ - Doxyfile - Makefile -]) - -AC_CONFIG_FILES([test/json-parse.sh], [chmod a+x test/json-parse.sh]) -AC_CONFIG_FILES([test/json-schema.py], [chmod a+x test/json-schema.py]) - -AC_OUTPUT diff --git a/m4/.gitignore b/m4/.gitignore deleted file mode 100644 index 8d0c7563..00000000 --- a/m4/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/lt*.m4 -/libtool.m4 diff --git a/m4/ax_append_flag.m4 b/m4/ax_append_flag.m4 deleted file mode 100644 index 08f2e07e..00000000 --- a/m4/ax_append_flag.m4 +++ /dev/null @@ -1,71 +0,0 @@ -# =========================================================================== -# http://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 -# Copyright (c) 2011 Maarten Bosmans -# -# This program is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation, either version 3 of the License, or (at your -# option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -# Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see . -# -# As a special exception, the respective Autoconf Macro's copyright owner -# gives unlimited permission to copy, distribute and modify the configure -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. -# -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Archive. When you make and distribute a -# modified version of the Autoconf Macro, you may extend this special -# exception to the GPL to apply to your modified version as well. - -#serial 6 - -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 diff --git a/m4/ax_check_gnu_make.m4 b/m4/ax_check_gnu_make.m4 deleted file mode 100644 index 6762e9ed..00000000 --- a/m4/ax_check_gnu_make.m4 +++ /dev/null @@ -1,84 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_check_gnu_make.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_CHECK_GNU_MAKE() -# -# DESCRIPTION -# -# This macro searches for a GNU version of make. If a match is found: -# -# * The makefile variable `ifGNUmake' is set to the empty string, otherwise -# it is set to "#". This is useful for including a special features in a -# Makefile, which cannot be handled by other versions of make. -# * The variable `_cv_gnu_make_command` is set to the command to invoke -# GNU make if it exists, the empty string otherwise. -# * The variable `ax_cv_gnu_make_command` is set to the command to invoke -# GNU make by copying `_cv_gnu_make_command`, otherwise it is unset. -# * If GNU Make is found, its version is extracted from the output of -# `make --version` as the last field of a record of space-separated -# columns and saved into the variable `ax_check_gnu_make_version`. -# -# Here is an example of its use: -# -# Makefile.in might contain: -# -# # A failsafe way of putting a dependency rule into a makefile -# $(DEPEND): -# $(CC) -MM $(srcdir)/*.c > $(DEPEND) -# -# @ifGNUmake@ ifeq ($(DEPEND),$(wildcard $(DEPEND))) -# @ifGNUmake@ include $(DEPEND) -# @ifGNUmake@ endif -# -# Then configure.in would normally contain: -# -# AX_CHECK_GNU_MAKE() -# AC_OUTPUT(Makefile) -# -# Then perhaps to cause gnu make to override any other make, we could do -# something like this (note that GNU make always looks for GNUmakefile -# first): -# -# if ! test x$_cv_gnu_make_command = x ; then -# mv Makefile GNUmakefile -# echo .DEFAULT: > Makefile ; -# echo \ $_cv_gnu_make_command \$@ >> Makefile; -# fi -# -# Then, if any (well almost any) other make is called, and GNU make also -# exists, then the other make wraps the GNU make. -# -# LICENSE -# -# Copyright (c) 2008 John Darrington -# Copyright (c) 2015 Enrico M. Crisostomo -# -# 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 8 - -AC_DEFUN([AX_CHECK_GNU_MAKE],dnl - [AC_PROG_AWK - AC_CACHE_CHECK([for GNU make],[_cv_gnu_make_command],[dnl - _cv_gnu_make_command="" ; -dnl Search all the common names for GNU make - for a in "$MAKE" make gmake gnumake ; do - if test -z "$a" ; then continue ; fi ; - if "$a" --version 2> /dev/null | grep GNU 2>&1 > /dev/null ; then - _cv_gnu_make_command=$a ; - AX_CHECK_GNU_MAKE_HEADLINE=$("$a" --version 2> /dev/null | grep "GNU Make") - ax_check_gnu_make_version=$(echo ${AX_CHECK_GNU_MAKE_HEADLINE} | ${AWK} -F " " '{ print $(NF); }') - break ; - fi - done ;]) -dnl If there was a GNU version, then set @ifGNUmake@ to the empty string, '#' otherwise - AS_VAR_IF([_cv_gnu_make_command], [""], [AS_VAR_SET([ifGNUmake], ["#"])], [AS_VAR_SET([ifGNUmake], [""])]) - AS_VAR_IF([_cv_gnu_make_command], [""], [AS_UNSET(ax_cv_gnu_make_command)], [AS_VAR_SET([ax_cv_gnu_make_command], [${_cv_gnu_make_command}])]) - AC_SUBST([ifGNUmake]) -]) diff --git a/m4/nc b/m4/nc deleted file mode 160000 index be2fda87..00000000 --- a/m4/nc +++ /dev/null @@ -1 +0,0 @@ -Subproject commit be2fda8717ba0c1b983aa84581387457a2f903b7 diff --git a/m4/ragel.m4 b/m4/ragel.m4 deleted file mode 100644 index 72ce4b94..00000000 --- a/m4/ragel.m4 +++ /dev/null @@ -1,53 +0,0 @@ -dnl Check for presence of the Ragel State Machine generator. -dnl -dnl This macro checks for the presence of the ragel tool in the system, -dnl and whether the ragel tool is absolutely needed for a complete -dnl build. -dnl -dnl To check for the need for Ragel, you have to provide the relative -dnl path of a source file generated through Ragel: if the file is -dnl present in the source tree, a missing ragel command will not cause -dnl the configure to abort. - -AC_DEFUN([_RAGEL_VARS], [ - AC_ARG_VAR([RAGEL], [Ragel generator command]) - AC_ARG_VAR([RAGELFLAGS], [Ragel generator flags]) -]) - -AC_DEFUN([CHECK_RAGEL], [ - AC_REQUIRE([_RAGEL_VARS]) - AC_CHECK_PROG([RAGEL], [ragel], [ragel], [no]) - - dnl We set RAGEL to false so that it would execute the "false" - dnl command if needed. - AS_IF([test x"$RAGEL" = x"no"], - [RAGEL=false], - AS_IF([test x"$2" != "x"], - [ragel_version=`$RAGEL --version | sed -n -e '1s:.*version \(@<:@0-9@:>@\.@<:@0-9@:>@\) .*:\1:p'` - ragel_version_compare=`echo $ragel_version | tr -d .` - ragel_wanted_version=`echo $2 | tr -d .` - AS_IF([test $ragel_version_compare -lt $ragel_wanted_version], - [AC_MSG_WARN([Found Ragel $ragel_version but Ragel $2 requested]) - RAGEL=false - ]) - ])) - - dnl Only test the need if not found - AS_IF([test x"$RAGEL" = x"false"], [ - AC_MSG_CHECKING([whether we need ragel to regenerate sources]) - AS_IF([test -a "${srcdir}/$1"], [ragel_needed=no], [ragel_needed=yes]) - AC_MSG_RESULT([$ragel_needed]) - - AS_IF([test x"$ragel_needed" = x"yes"], - [AC_MSG_ERROR([dnl -You need Ragel to build from development sources. -You can find Ragel at http://www.complang.org/ragel/dnl - ])]) - ]) -]) - -AC_DEFUN([CHECK_RAGEL_AM], [ - CHECK_RAGEL([$1], [$2]) - - AM_CONDITIONAL([HAVE_RAGEL], [test x"$RAGEL" != x"false"]) -])