From: Kirill Isakov Date: Sun, 20 Mar 2022 19:13:41 +0000 (+0600) Subject: Remove autotools configs X-Git-Url: https://tinc-vpn.org/git/browse?a=commitdiff_plain;h=7be02138580c6821145405fd55def976dfde4998;p=tinc Remove autotools configs --- diff --git a/Makefile.am b/Makefile.am deleted file mode 100644 index 0956cbed..00000000 --- a/Makefile.am +++ /dev/null @@ -1,54 +0,0 @@ -## Process this file with automake to get Makefile.in - -AUTOMAKE_OPTIONS = gnu - -SUBDIRS = src doc test systemd bash_completion.d - -ACLOCAL_AMFLAGS = -I m4 - -EXTRA_DIST = COPYING.README README.md README.android SECURITY.md - -@CODE_COVERAGE_RULES@ - -.PHONY: extra -extra: - $(MAKE) -C $(srcdir)/src extra - $(MAKE) -C $(srcdir)/test extra - -# If git describe works, force autoconf to run in order to make sure we have the -# current version number from git in the resulting configure script. -configure-version: - -cd $(srcdir) && git describe && autoconf --force - -# Triggering the README target means we are building a distribution (make dist). -README: configure-version README.md - ln -sf README.md README - -CLEANFILES = README - -# If we're running on a CI server, we may not be able to remove some test -# artifacts without using sudo because they are created by tincd running -# with root privileges. -clean-local: - if test -n "${CI}"; then sudo rm -rf test/*.test.*/; fi - -ChangeLog: - (cd $(srcdir) && git log) > ChangeLog - -deb: - dpkg-buildpackage -rfakeroot - -rpm: dist - cp $(distdir).tar.gz /usr/src/redhat/SOURCES/ - cp redhat/tinc.spec /usr/src/redhat/SOURCES/ - cd /usr/src/redhat/SOURCES/ && rpm -bb tinc.spec - -release: - rm -f ChangeLog - $(MAKE) ChangeLog - echo "Please edit the NEWS file now..." - /usr/bin/editor $(srcdir)/NEWS - $(MAKE) dist - -astyle: - astyle --options=.astylerc -nQ src/*.[ch] src/*/*.[ch] diff --git a/bash_completion.d/Makefile.am b/bash_completion.d/Makefile.am deleted file mode 100644 index 9665dfe8..00000000 --- a/bash_completion.d/Makefile.am +++ /dev/null @@ -1,2 +0,0 @@ -bash_completiondir = @datarootdir@/bash-completion/completions/ -dist_bash_completion_DATA = tinc diff --git a/configure.ac b/configure.ac deleted file mode 100644 index ddfa0a39..00000000 --- a/configure.ac +++ /dev/null @@ -1,277 +0,0 @@ -dnl Process this file with autoconf to produce a configure script. - -origcflags="$CFLAGS" - -AC_PREREQ([2.69]) -AC_INIT([tinc], m4_esyscmd_s((git describe || echo UNKNOWN) | sed 's/release-//')) -AC_CONFIG_SRCDIR([src/tincd.c]) -AM_INIT_AUTOMAKE([std-options subdir-objects nostdinc silent-rules -Wall]) -AC_CONFIG_HEADERS([config.h]) -AC_CONFIG_MACRO_DIR([m4]) -AM_SILENT_RULES([yes]) - -AC_USE_SYSTEM_EXTENSIONS - -dnl Checks for programs. -AC_PROG_CC -AC_PROG_CC_C99 -AC_PROG_CPP -AC_PROG_INSTALL -AC_PROG_LN_S -AM_PROG_CC_C_O - -dnl Check whether to enable code coverage testing, and if so, clear the default CFLAGS. -AX_CODE_COVERAGE -AS_IF([test "x$enable_code_coverage" = "xyes" -a "x$origcflags" = "x"], [CFLAGS=""]) - -dnl Check and set OS - -AC_CANONICAL_HOST - -case $host_os in - *linux*) - linux=true - AC_DEFINE(HAVE_LINUX, 1, [Linux]) - ;; - *freebsd*) - bsd=true - AC_DEFINE(HAVE_FREEBSD, 1, [FreeBSD]) - ;; - *darwin*) - bsd=true - AC_DEFINE(HAVE_DARWIN, 1, [Darwin (MacOS/X)]) - ;; - *solaris*) - solaris=true - AC_DEFINE(HAVE_SOLARIS, 1, [Solaris/SunOS]) - ;; - *openbsd*) - bsd=true - AC_DEFINE(HAVE_OPENBSD, 1, [OpenBSD]) - ;; - *netbsd*) - bsd=true - AC_DEFINE(HAVE_NETBSD, 1, [NetBSD]) - ;; - *dragonfly*) - bsd=true - AC_DEFINE(HAVE_DRAGONFLY, 1, [DragonFly]) - ;; - *bsd*) - bsd=true - AC_MSG_WARN("Unknown BSD variant, tinc might not compile or work!") - AC_DEFINE(HAVE_BSD, 1, [Unknown BSD variant]) - ;; - *cygwin*) - AC_MSG_ERROR("Cygwin is no longer supported. Use MinGW to build native Windows binaries.") - ;; - *mingw*) - mingw=true - AC_DEFINE(HAVE_MINGW, 1, [MinGW]) - LIBS="$LIBS -lws2_32 -lgdi32 -lcrypt32 -liphlpapi -lwinpthread" - LDFLAGS="$LDFLAGS -static" - CPPFLAGS="$CPPFLAGS -DMINIUPNP_STATICLIB" - ;; - *) - AC_MSG_ERROR("Unknown operating system.") - ;; -esac - -AC_ARG_ENABLE(uml, - AS_HELP_STRING([--enable-uml], [enable support for User Mode Linux]), - [ AS_IF([test "x$enable_uml" = "xyes"], - [ AC_DEFINE(ENABLE_UML, 1, [Support for UML]) - uml=true - ], - [uml=false]) - ], - [uml=false] -) - -AC_ARG_ENABLE(vde, - AS_HELP_STRING([--enable-vde], [enable support for Virtual Distributed Ethernet]), - [ AS_IF([test "x$enable_vde" = "xyes"], - [ AC_CHECK_HEADERS(libvdeplug.h, - [AC_CHECK_LIB(vdeplug, vde_close, - [LIBS="$LIBS -lvdeplug"], - [AC_MSG_ERROR("VDE plug library files not found.")] - )], - [AC_MSG_ERROR([VDE plug header files not found.]); break]) - AC_DEFINE(ENABLE_VDE, 1, [Support for VDE]) - vde=true - ], - [vde=false]) - ], - [vde=false] -) - -AC_ARG_ENABLE(tunemu, - AS_HELP_STRING([--enable-tunemu], [enable support for the tunemu driver]), - [ AS_IF([test "x$enable_tunemu" = "xyes"], - [ AC_DEFINE(ENABLE_TUNEMU, 1, [Support for tunemu]) - tunemu=true - ], - [tunemu=false]) - ], - [tunemu=false] -) - -AC_ARG_WITH(systemd, - AS_HELP_STRING([--with-systemd@<:@=DIR@:>@], [install systemd service files @<:@to DIR if specified@:>@]), - [ systemd=true; systemd_path="$with_systemd" ], - [ systemd=false ] -) - -AS_IF([test "x$with_systemd" = "xyes"], [systemd_path="\${libdir}/systemd/system"], - [AS_IF([test "x$with_systemd" = "xno"], [systemd=false])]) - -AC_SUBST(systemd_path, $systemd_path) - -AM_CONDITIONAL(LINUX, test "$linux" = true) -AM_CONDITIONAL(BSD, test "$bsd" = true) -AM_CONDITIONAL(SOLARIS, test "$solaris" = true) -AM_CONDITIONAL(MINGW, test "$mingw" = true) -AM_CONDITIONAL(CYGWIN, test "$cygwin" = true) -AM_CONDITIONAL(UML, test "$uml" = true) -AM_CONDITIONAL(VDE, test "$vde" = true) -AM_CONDITIONAL(TUNEMU, test "$tunemu" = true) -AM_CONDITIONAL(WITH_SYSTEMD, test "$systemd" = true) -AM_CONDITIONAL(WITH_LEGACY_PROTOCOL, test "x$enable_legacy_protocol" != "xno") - -AC_CACHE_SAVE - -AS_IF([test -d /sw/include], [CPPFLAGS="$CPPFLAGS -I/sw/include"]) -AS_IF([test -d /sw/lib], [LIBS="$LIBS -L/sw/lib"]) - -dnl Checks for header files. -dnl We do this in multiple stages, because unlike Linux all the other operating systems really suck and don't include their own dependencies. - -AC_CHECK_HEADERS([syslog.h sys/file.h sys/ioctl.h sys/mman.h sys/param.h sys/resource.h sys/socket.h sys/time.h sys/un.h sys/wait.h netdb.h arpa/inet.h dirent.h getopt.h stddef.h sys/epoll.h]) -AC_CHECK_HEADERS([net/if.h net/if_types.h net/ethernet.h net/if_arp.h netinet/in_systm.h netinet/in.h netinet/in6.h netpacket/packet.h], - [], [], [#include "$srcdir/src/have.h"] -) -AC_CHECK_HEADERS([netinet/if_ether.h netinet/ip.h netinet/ip6.h resolv.h], - [], [], [#include "$srcdir/src/have.h"] -) -AC_CHECK_HEADERS([netinet/tcp.h netinet/ip_icmp.h netinet/icmp6.h], - [], [], [#include "$srcdir/src/have.h"] -) - -dnl Checks for typedefs, structures, and compiler characteristics. -tinc_ATTRIBUTE(__malloc__) -tinc_ATTRIBUTE(__nonnull__) -tinc_ATTRIBUTE(__warn_unused_result__) - -AC_CHECK_TYPES([struct ether_header, struct arphdr, struct ether_arp, struct ip, struct icmp, struct ip6_hdr, struct icmp6_hdr, struct nd_neighbor_solicit, struct nd_opt_hdr], , , - [#include "$srcdir/src/have.h"] -) - -dnl Checks for library functions. -AC_CHECK_FUNCS([asprintf daemon fchmod flock fork gettimeofday mlockall putenv recvmmsg strsignal nanosleep unsetenv vsyslog devname fdevname], - [], [], [#include "$srcdir/src/have.h"] -) - -AC_CHECK_FUNC(getopt_long, [getopt=true; AC_DEFINE(HAVE_GETOPT_LONG, 1, [getopt_long()])], [getopt=false]) -AM_CONDITIONAL(GETOPT, test "$getopt" = true) - -AC_CHECK_DECLS([res_init], [AC_CHECK_LIB(resolv, res_init)], [], [ - #include - #include -]) - -dnl Operating system specific checks -case $host_os in - *linux*) - AC_CHECK_HEADERS([linux/if_tun.h], - [], [AC_MSG_ERROR([Required header file missng])], [#include "$srcdir/src/have.h"] - ) - ;; - *bsd*|*dragonfly*|*darwin*) - AC_CHECK_HEADERS([net/if_tun.h net/if_utun.h net/tun/if_tun.h net/if_tap.h net/tap/if_tap.h], - [], [], [#include "$srcdir/src/have.h"] - ) - ;; - *solaris*) - AC_CHECK_FUNC(socket, [], [AC_CHECK_LIB(socket, connect)]) - ;; - *) - ;; -esac - -AC_CACHE_SAVE - -AC_ARG_ENABLE(legacy-protocol, - AS_HELP_STRING([--disable-legacy-protocol], [disable support for the legacy (tinc 1.0) protocol]), - [ AS_IF([test "x$enable_legacy_protocol" = "xno"], - [ AC_DEFINE(DISABLE_LEGACY, 1, [Disable support for the legacy (tinc 1.0) protocol]) ]) - ] -) - -dnl These are defined in files in m4/ - -dnl AC_ARG_WITH(libgcrypt, AS_HELP_STRING([--with-libgcrypt], [enable use of libgcrypt instead of OpenSSL])], []) -dnl AC_ARG_WITH(openssl, AS_HELP_STRING([--without-openssl], [disable support for OpenSSL])], []) - -tinc_CURSES -tinc_READLINE -tinc_ZLIB -tinc_LZO -tinc_LZ4 - -AS_IF([test "x$enable_legacy_protocol" != "xno"], - [AS_IF([test -n "$with_libgcrypt"], - [gcrypt=true; tinc_LIBGCRYPT], - [openssl=true; tinc_OPENSSL]) - ] -) - -AM_CONDITIONAL(OPENSSL, test -n "$openssl") -AM_CONDITIONAL(GCRYPT, test -n "$gcrypt") - -tinc_MINIUPNPC -AM_CONDITIONAL(MINIUPNPC, test "x$enable_miniupnpc" = "xyes") - -dnl Check if support for jumbograms is requested -AC_ARG_ENABLE(jumbograms, - AS_HELP_STRING([--enable-jumbograms], [enable support for jumbograms (packets up to 9000 bytes)]), - [ AS_IF([test "x$enable_jumbograms" = "xyes"], - [ AC_DEFINE(ENABLE_JUMBOGRAMS, 1, [Support for jumbograms (packets up to 9000 bytes)]) ]) - ] -) - -dnl Compiler hardening flags -dnl No -fstack-protector-all because it doesn't work on all platforms or architectures. - -AX_CFLAGS_WARN_ALL(CFLAGS) - -AC_ARG_ENABLE([hardening], AS_HELP_STRING([--disable-hardening], [disable compiler and linker hardening flags])) -AS_IF([test "x$enable_hardening" != "xno"], - [AX_CHECK_COMPILE_FLAG([-D_FORTIFY_SOURCE=2], [CPPFLAGS="$CPPFLAGS -D_FORTIFY_SOURCE=2"]) - AX_CHECK_COMPILE_FLAG([-fwrapv], [CPPFLAGS="$CPPFLAGS -fwrapv"], - AX_CHECK_COMPILE_FLAG([-fno-strict-overflow], [CPPFLAGS="$CPPFLAGS -fno-strict-overflow"])) - case $host_os in - *mingw*) - AX_CHECK_LINK_FLAG([-Wl,--dynamicbase], [LDFLAGS="$LDFLAGS -Wl,--dynamicbase"]) - AX_CHECK_LINK_FLAG([-Wl,--nxcompat], [LDFLAGS="$LDFLAGS -Wl,--nxcompat"]) - AX_CHECK_LINK_FLAG([-lssp], [LIBS="$LIBS -lssp"]) - ;; - *) - AX_CHECK_COMPILE_FLAG([-fPIE], [CPPFLAGS="$CPPFLAGS -fPIE"]) - AX_CHECK_LINK_FLAG([-pie], [LDFLAGS="$LDFLAGS -pie"]) - ;; - esac - AX_CHECK_LINK_FLAG([-Wl,-z,relro], [LDFLAGS="$LDFLAGS -Wl,-z,relro"]) - AX_CHECK_LINK_FLAG([-Wl,-z,now], [LDFLAGS="$LDFLAGS -Wl,-z,now"]) - AX_CHECK_COMPILE_FLAG([-W -Wextra -pedantic -Wreturn-type -Wold-style-definition -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wbad-function-cast -Wwrite-strings -fdiagnostics-show-option -fstrict-aliasing -Wmissing-noreturn], - [CPPFLAGS="$CPPFLAGS -W -Wextra -pedantic -Wreturn-type -Wold-style-definition -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wbad-function-cast -Wwrite-strings -fdiagnostics-show-option -fstrict-aliasing -Wmissing-noreturn"]) - ] -); - -dnl Ensure runstatedir is set if we are using a version of autoconf that does not support it -if test "x$runstatedir" = "x"; then - AC_SUBST([runstatedir], ['${localstatedir}/run']) -fi - -AC_CONFIG_FILES([Makefile src/Makefile doc/Makefile test/Makefile test/testlib.sh systemd/Makefile bash_completion.d/Makefile]) - -AC_OUTPUT diff --git a/doc/Makefile.am b/doc/Makefile.am deleted file mode 100644 index e5f3a041..00000000 --- a/doc/Makefile.am +++ /dev/null @@ -1,44 +0,0 @@ -## Process this file with automake to get Makefile.in - -info_TEXINFOS = tinc.texi -tinc_TEXINFOS = tincinclude.texi - -man_MANS = tincd.8 tinc.8 tinc.conf.5 tinc-gui.8 - -EXTRA_DIST = tincinclude.texi.in tincd.8.in tinc.8.in tinc.conf.5.in tinc-gui.8.in sample-config - -CLEANFILES = *.html tincd.8 tinc.8 tinc.conf.5 tinc-gui.8 tincinclude.texi - -tincd.8.html: tincd.8 - $(AM_V_GEN)w3mman2html $? > $@ - -tinc.8.html: tinc.8 - $(AM_V_GEN)w3mman2html $? > $@ - -tinc-gui.8.html: tinc-gui.8 - $(AM_V_GEN)w3mman2html $? > $@ - -tinc.conf.5.html: tinc.conf.5 - $(AM_V_GEN)w3mman2html $? > $@ - -substitute = sed \ - -e s,'@PACKAGE\@',"$(PACKAGE)",g \ - -e s,'@VERSION\@',"$(VERSION)",g \ - -e s,'@sysconfdir\@',"$(sysconfdir)",g \ - -e s,'@runstatedir\@',"$(runstatedir)",g \ - -e s,'@localstatedir\@',"$(localstatedir)",g - -tincd.8: $(srcdir)/tincd.8.in - $(AM_V_GEN)$(substitute) $(srcdir)/tincd.8.in > $@ - -tinc.8: $(srcdir)/tinc.8.in - $(AM_V_GEN)$(substitute) $(srcdir)/tinc.8.in > $@ - -tinc-gui.8: $(srcdir)/tinc-gui.8.in - $(AM_V_GEN)$(substitute) $(srcdir)/tinc-gui.8.in > $@ - -tinc.conf.5: $(srcdir)/tinc.conf.5.in - $(AM_V_GEN)$(substitute) $(srcdir)/tinc.conf.5.in > $@ - -tincinclude.texi: $(srcdir)/tincinclude.texi.in - $(AM_V_GEN)$(substitute) $(srcdir)/tincinclude.texi.in > $@ diff --git a/m4/attribute.m4 b/m4/attribute.m4 deleted file mode 100644 index 3228deb3..00000000 --- a/m4/attribute.m4 +++ /dev/null @@ -1,25 +0,0 @@ -dnl Check to find out whether function attributes are supported. -dnl If they are not, #define them to be nothing. - -AC_DEFUN([tinc_ATTRIBUTE], -[ - AC_CACHE_CHECK([for working $1 attribute], tinc_cv_attribute_$1, - [ - tempcflags="$CFLAGS" - CFLAGS="$CFLAGS -Wall -Werror" - AC_COMPILE_IFELSE( - [AC_LANG_SOURCE( - [void *test(void *x) __attribute__ (($1)); - void *test(void *x) { return (void *)x; } - ], - )], - [tinc_cv_attribute_$1=yes], - [tinc_cv_attribute_$1=no] - ) - CFLAGS="$tempcflags" - ]) - - if test ${tinc_cv_attribute_$1} = no; then - AC_DEFINE([$1], [], [Defined if the $1 attribute is not supported.]) - fi -]) 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_cflags_warn_all.m4 b/m4/ax_cflags_warn_all.m4 deleted file mode 100644 index 1f077992..00000000 --- a/m4/ax_cflags_warn_all.m4 +++ /dev/null @@ -1,122 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_cflags_warn_all.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_CFLAGS_WARN_ALL [(shellvar [,default, [A/NA]])] -# AX_CXXFLAGS_WARN_ALL [(shellvar [,default, [A/NA]])] -# AX_FCFLAGS_WARN_ALL [(shellvar [,default, [A/NA]])] -# -# DESCRIPTION -# -# Try to find a compiler option that enables most reasonable warnings. -# -# For the GNU compiler it will be -Wall (and -ansi -pedantic) The result -# is added to the shellvar being CFLAGS, CXXFLAGS, or FCFLAGS by default. -# -# Currently this macro knows about the GCC, Solaris, Digital Unix, AIX, -# HP-UX, IRIX, NEC SX-5 (Super-UX 10), Cray J90 (Unicos 10.0.0.8), and -# Intel compilers. For a given compiler, the Fortran flags are much more -# experimental than their C equivalents. -# -# - $1 shell-variable-to-add-to : CFLAGS, CXXFLAGS, or FCFLAGS -# - $2 add-value-if-not-found : nothing -# - $3 action-if-found : add value to shellvariable -# - $4 action-if-not-found : nothing -# -# NOTE: These macros depend on AX_APPEND_FLAG. -# -# LICENSE -# -# Copyright (c) 2008 Guido U. Draheim -# Copyright (c) 2010 Rhys Ulerich -# -# 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 15 - -AC_DEFUN([AX_FLAGS_WARN_ALL],[dnl -AS_VAR_PUSHDEF([FLAGS],[_AC_LANG_PREFIX[]FLAGS])dnl -AS_VAR_PUSHDEF([VAR],[ac_cv_[]_AC_LANG_ABBREV[]flags_warn_all])dnl -AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for maximum warnings], -VAR,[VAR="no, unknown" -ac_save_[]FLAGS="$[]FLAGS" -for ac_arg dnl -in "-warn all % -warn all" dnl Intel - "-pedantic % -Wall" dnl GCC - "-xstrconst % -v" dnl Solaris C - "-std1 % -verbose -w0 -warnprotos" dnl Digital Unix - "-qlanglvl=ansi % -qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd" dnl AIX - "-ansi -ansiE % -fullwarn" dnl IRIX - "+ESlit % +w1" dnl HP-UX C - "-Xc % -pvctl[,]fullmsg" dnl NEC SX-5 (Super-UX 10) - "-h conform % -h msglevel 2" dnl Cray C (Unicos) - # -do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'` - AC_COMPILE_IFELSE([AC_LANG_PROGRAM], - [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break]) -done -FLAGS="$ac_save_[]FLAGS" -]) -AS_VAR_POPDEF([FLAGS])dnl -AX_REQUIRE_DEFINED([AX_APPEND_FLAG]) -case ".$VAR" in - .ok|.ok,*) m4_ifvaln($3,$3) ;; - .|.no|.no,*) m4_default($4,[m4_ifval($2,[AX_APPEND_FLAG([$2], [$1])])]) ;; - *) m4_default($3,[AX_APPEND_FLAG([$VAR], [$1])]) ;; -esac -AS_VAR_POPDEF([VAR])dnl -])dnl AX_FLAGS_WARN_ALL -dnl implementation tactics: -dnl the for-argument contains a list of options. The first part of -dnl these does only exist to detect the compiler - usually it is -dnl a global option to enable -ansi or -extrawarnings. All other -dnl compilers will fail about it. That was needed since a lot of -dnl compilers will give false positives for some option-syntax -dnl like -Woption or -Xoption as they think of it is a pass-through -dnl to later compile stages or something. The "%" is used as a -dnl delimiter. A non-option comment can be given after "%%" marks -dnl which will be shown but not added to the respective C/CXXFLAGS. - -AC_DEFUN([AX_CFLAGS_WARN_ALL],[dnl -AC_LANG_PUSH([C]) -AX_FLAGS_WARN_ALL([$1], [$2], [$3], [$4]) -AC_LANG_POP([C]) -]) - -AC_DEFUN([AX_CXXFLAGS_WARN_ALL],[dnl -AC_LANG_PUSH([C++]) -AX_FLAGS_WARN_ALL([$1], [$2], [$3], [$4]) -AC_LANG_POP([C++]) -]) - -AC_DEFUN([AX_FCFLAGS_WARN_ALL],[dnl -AC_LANG_PUSH([Fortran]) -AX_FLAGS_WARN_ALL([$1], [$2], [$3], [$4]) -AC_LANG_POP([Fortran]) -]) diff --git a/m4/ax_check_compile_flag.m4 b/m4/ax_check_compile_flag.m4 deleted file mode 100644 index c3a8d695..00000000 --- a/m4/ax_check_compile_flag.m4 +++ /dev/null @@ -1,72 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS]) -# -# 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. -# -# 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 -# 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 2 - -AC_DEFUN([AX_CHECK_COMPILE_FLAG], -[AC_PREREQ(2.59)dnl for _AC_LANG_PREFIX -AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl -AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [ - ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS - _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1" - AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], - [AS_VAR_SET(CACHEVAR,[yes])], - [AS_VAR_SET(CACHEVAR,[no])]) - _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags]) -AS_IF([test x"AS_VAR_GET(CACHEVAR)" = xyes], - [m4_default([$2], :)], - [m4_default([$3], :)]) -AS_VAR_POPDEF([CACHEVAR])dnl -])dnl AX_CHECK_COMPILE_FLAGS diff --git a/m4/ax_check_link_flag.m4 b/m4/ax_check_link_flag.m4 deleted file mode 100644 index e2d0d363..00000000 --- a/m4/ax_check_link_flag.m4 +++ /dev/null @@ -1,71 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_check_link_flag.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_CHECK_LINK_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS]) -# -# DESCRIPTION -# -# Check whether the given FLAG works with the linker 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 linker's default flags -# when the check is done. The check is thus made with the flags: "LDFLAGS -# EXTRA-FLAGS FLAG". This can for example be used to force the linker to -# issue an error when a bad flag is given. -# -# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this -# macro in sync with AX_CHECK_{PREPROC,COMPILE}_FLAG. -# -# 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 2 - -AC_DEFUN([AX_CHECK_LINK_FLAG], -[AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_ldflags_$4_$1])dnl -AC_CACHE_CHECK([whether the linker accepts $1], CACHEVAR, [ - ax_check_save_flags=$LDFLAGS - LDFLAGS="$LDFLAGS $4 $1" - AC_LINK_IFELSE([AC_LANG_PROGRAM()], - [AS_VAR_SET(CACHEVAR,[yes])], - [AS_VAR_SET(CACHEVAR,[no])]) - LDFLAGS=$ax_check_save_flags]) -AS_IF([test x"AS_VAR_GET(CACHEVAR)" = xyes], - [m4_default([$2], :)], - [m4_default([$3], :)]) -AS_VAR_POPDEF([CACHEVAR])dnl -])dnl AX_CHECK_LINK_FLAGS diff --git a/m4/ax_code_coverage.m4 b/m4/ax_code_coverage.m4 deleted file mode 100644 index 0934a44c..00000000 --- a/m4/ax_code_coverage.m4 +++ /dev/null @@ -1,264 +0,0 @@ -# =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_code_coverage.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_CODE_COVERAGE() -# -# DESCRIPTION -# -# Defines CODE_COVERAGE_CPPFLAGS, CODE_COVERAGE_CFLAGS, -# CODE_COVERAGE_CXXFLAGS and CODE_COVERAGE_LIBS which should be included -# in the CPPFLAGS, CFLAGS CXXFLAGS and LIBS/LIBADD variables of every -# build target (program or library) which should be built with code -# coverage support. Also defines CODE_COVERAGE_RULES which should be -# substituted in your Makefile; and $enable_code_coverage which can be -# used in subsequent configure output. CODE_COVERAGE_ENABLED is defined -# and substituted, and corresponds to the value of the -# --enable-code-coverage option, which defaults to being disabled. -# -# Test also for gcov program and create GCOV variable that could be -# substituted. -# -# Note that all optimisation flags in CFLAGS must be disabled when code -# coverage is enabled. -# -# Usage example: -# -# configure.ac: -# -# AX_CODE_COVERAGE -# -# Makefile.am: -# -# @CODE_COVERAGE_RULES@ -# my_program_LIBS = ... $(CODE_COVERAGE_LIBS) ... -# my_program_CPPFLAGS = ... $(CODE_COVERAGE_CPPFLAGS) ... -# my_program_CFLAGS = ... $(CODE_COVERAGE_CFLAGS) ... -# my_program_CXXFLAGS = ... $(CODE_COVERAGE_CXXFLAGS) ... -# -# This results in a "check-code-coverage" rule being added to any -# Makefile.am which includes "@CODE_COVERAGE_RULES@" (assuming the module -# has been configured with --enable-code-coverage). Running `make -# check-code-coverage` in that directory will run the module's test suite -# (`make check`) and build a code coverage report detailing the code which -# was touched, then print the URI for the report. -# -# In earlier versions of this macro, CODE_COVERAGE_LDFLAGS was defined -# instead of CODE_COVERAGE_LIBS. They are both still defined, but use of -# CODE_COVERAGE_LIBS is preferred for clarity; CODE_COVERAGE_LDFLAGS is -# deprecated. They have the same value. -# -# This code was derived from Makefile.decl in GLib, originally licenced -# under LGPLv2.1+. -# -# LICENSE -# -# Copyright (c) 2012, 2016 Philip Withnall -# Copyright (c) 2012 Xan Lopez -# Copyright (c) 2012 Christian Persch -# Copyright (c) 2012 Paolo Borelli -# Copyright (c) 2012 Dan Winship -# Copyright (c) 2015 Bastien ROUCARIES -# -# This library is free software; you can redistribute it and/or modify it -# under the terms of the GNU Lesser General Public License as published by -# the Free Software Foundation; either version 2.1 of the License, or (at -# your option) any later version. -# -# This library 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 Lesser -# General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program. If not, see . - -#serial 21 - -AC_DEFUN([AX_CODE_COVERAGE],[ - dnl Check for --enable-code-coverage - AC_REQUIRE([AC_PROG_SED]) - - # allow to override gcov location - AC_ARG_WITH([gcov], - [AS_HELP_STRING([--with-gcov[=GCOV]], [use given GCOV for coverage (GCOV=gcov).])], - [_AX_CODE_COVERAGE_GCOV_PROG_WITH=$with_gcov], - [_AX_CODE_COVERAGE_GCOV_PROG_WITH=gcov]) - - AC_MSG_CHECKING([whether to build with code coverage support]) - AC_ARG_ENABLE([code-coverage], - AS_HELP_STRING([--enable-code-coverage], - [Whether to enable code coverage support]),, - enable_code_coverage=no) - - AM_CONDITIONAL([CODE_COVERAGE_ENABLED], [test x$enable_code_coverage = xyes]) - AC_SUBST([CODE_COVERAGE_ENABLED], [$enable_code_coverage]) - AC_MSG_RESULT($enable_code_coverage) - - AS_IF([ test "$enable_code_coverage" = "yes" ], [ - # check for gcov - AC_CHECK_TOOL([GCOV], - [$_AX_CODE_COVERAGE_GCOV_PROG_WITH], - [:]) - AS_IF([test "X$GCOV" = "X:"], - [AC_MSG_ERROR([gcov is needed to do coverage])]) - AC_SUBST([GCOV]) - - dnl Check if gcc is being used - AS_IF([ test "$GCC" = "no" ], [ - AC_MSG_ERROR([not compiling with gcc, which is required for gcov code coverage]) - ]) - - AC_CHECK_PROG([LCOV], [lcov], [lcov]) - AC_CHECK_PROG([GENHTML], [genhtml], [genhtml]) - - AS_IF([ test -z "$LCOV" ], [ - AC_MSG_ERROR([To enable code coverage reporting you must have lcov installed]) - ]) - - AS_IF([ test -z "$GENHTML" ], [ - AC_MSG_ERROR([Could not find genhtml from the lcov package]) - ]) - - dnl Build the code coverage flags - dnl Define CODE_COVERAGE_LDFLAGS for backwards compatibility - CODE_COVERAGE_CPPFLAGS="-DNDEBUG" - CODE_COVERAGE_CFLAGS="-O0 -g -fprofile-arcs -ftest-coverage" - CODE_COVERAGE_CXXFLAGS="-O0 -g -fprofile-arcs -ftest-coverage" - CODE_COVERAGE_LIBS="-lgcov" - CODE_COVERAGE_LDFLAGS="$CODE_COVERAGE_LIBS" - - AC_SUBST([CODE_COVERAGE_CPPFLAGS]) - AC_SUBST([CODE_COVERAGE_CFLAGS]) - AC_SUBST([CODE_COVERAGE_CXXFLAGS]) - AC_SUBST([CODE_COVERAGE_LIBS]) - AC_SUBST([CODE_COVERAGE_LDFLAGS]) - - [CODE_COVERAGE_RULES_CHECK=' - -$(A''M_V_at)$(MAKE) $(AM_MAKEFLAGS) -k check - $(A''M_V_at)$(MAKE) $(AM_MAKEFLAGS) code-coverage-capture -'] - [CODE_COVERAGE_RULES_CAPTURE=' - $(code_coverage_v_lcov_cap)$(LCOV) $(code_coverage_quiet) $(addprefix --directory ,$(CODE_COVERAGE_DIRECTORY)) --capture --output-file "$(CODE_COVERAGE_OUTPUT_FILE).tmp" --test-name "$(call code_coverage_sanitize,$(PACKAGE_NAME)-$(PACKAGE_VERSION))" --no-checksum --compat-libtool $(CODE_COVERAGE_LCOV_SHOPTS) $(CODE_COVERAGE_LCOV_OPTIONS) - $(code_coverage_v_lcov_ign)$(LCOV) $(code_coverage_quiet) $(addprefix --directory ,$(CODE_COVERAGE_DIRECTORY)) --remove "$(CODE_COVERAGE_OUTPUT_FILE).tmp" "/tmp/*" $(CODE_COVERAGE_IGNORE_PATTERN) --output-file "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_LCOV_SHOPTS) $(CODE_COVERAGE_LCOV_RMOPTS) - -@rm -f $(CODE_COVERAGE_OUTPUT_FILE).tmp - $(code_coverage_v_genhtml)LANG=C $(GENHTML) $(code_coverage_quiet) $(addprefix --prefix ,$(CODE_COVERAGE_DIRECTORY)) --output-directory "$(CODE_COVERAGE_OUTPUT_DIRECTORY)" --title "$(PACKAGE_NAME)-$(PACKAGE_VERSION) Code Coverage" --legend --show-details "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_GENHTML_OPTIONS) - @echo "file://$(abs_builddir)/$(CODE_COVERAGE_OUTPUT_DIRECTORY)/index.html" -'] - [CODE_COVERAGE_RULES_CLEAN=' -clean: code-coverage-clean -distclean: code-coverage-clean -code-coverage-clean: - -$(LCOV) --directory $(top_builddir) -z - -rm -rf $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_FILE).tmp $(CODE_COVERAGE_OUTPUT_DIRECTORY) - -find . \( -name "*.gcda" -o -name "*.gcno" -o -name "*.gcov" \) -delete -'] - ], [ - [CODE_COVERAGE_RULES_CHECK=' - @echo "Need to reconfigure with --enable-code-coverage" -'] - CODE_COVERAGE_RULES_CAPTURE="$CODE_COVERAGE_RULES_CHECK" - CODE_COVERAGE_RULES_CLEAN='' - ]) - -[CODE_COVERAGE_RULES=' -# Code coverage -# -# Optional: -# - CODE_COVERAGE_DIRECTORY: Top-level directory for code coverage reporting. -# Multiple directories may be specified, separated by whitespace. -# (Default: $(top_builddir)) -# - CODE_COVERAGE_OUTPUT_FILE: Filename and path for the .info file generated -# by lcov for code coverage. (Default: -# $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage.info) -# - CODE_COVERAGE_OUTPUT_DIRECTORY: Directory for generated code coverage -# reports to be created. (Default: -# $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage) -# - CODE_COVERAGE_BRANCH_COVERAGE: Set to 1 to enforce branch coverage, -# set to 0 to disable it and leave empty to stay with the default. -# (Default: empty) -# - CODE_COVERAGE_LCOV_SHOPTS_DEFAULT: Extra options shared between both lcov -# instances. (Default: based on $CODE_COVERAGE_BRANCH_COVERAGE) -# - CODE_COVERAGE_LCOV_SHOPTS: Extra options to shared between both lcov -# instances. (Default: $CODE_COVERAGE_LCOV_SHOPTS_DEFAULT) -# - CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH: --gcov-tool pathtogcov -# - CODE_COVERAGE_LCOV_OPTIONS_DEFAULT: Extra options to pass to the -# collecting lcov instance. (Default: $CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH) -# - CODE_COVERAGE_LCOV_OPTIONS: Extra options to pass to the collecting lcov -# instance. (Default: $CODE_COVERAGE_LCOV_OPTIONS_DEFAULT) -# - CODE_COVERAGE_LCOV_RMOPTS_DEFAULT: Extra options to pass to the filtering -# lcov instance. (Default: empty) -# - CODE_COVERAGE_LCOV_RMOPTS: Extra options to pass to the filtering lcov -# instance. (Default: $CODE_COVERAGE_LCOV_RMOPTS_DEFAULT) -# - CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT: Extra options to pass to the -# genhtml instance. (Default: based on $CODE_COVERAGE_BRANCH_COVERAGE) -# - CODE_COVERAGE_GENHTML_OPTIONS: Extra options to pass to the genhtml -# instance. (Default: $CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT) -# - CODE_COVERAGE_IGNORE_PATTERN: Extra glob pattern of files to ignore -# -# The generated report will be titled using the $(PACKAGE_NAME) and -# $(PACKAGE_VERSION). In order to add the current git hash to the title, -# use the git-version-gen script, available online. - -# Optional variables -CODE_COVERAGE_DIRECTORY ?= $(top_builddir) -CODE_COVERAGE_OUTPUT_FILE ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage.info -CODE_COVERAGE_OUTPUT_DIRECTORY ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage -CODE_COVERAGE_BRANCH_COVERAGE ?= -CODE_COVERAGE_LCOV_SHOPTS_DEFAULT ?= $(if $(CODE_COVERAGE_BRANCH_COVERAGE),\ ---rc lcov_branch_coverage=$(CODE_COVERAGE_BRANCH_COVERAGE)) -CODE_COVERAGE_LCOV_SHOPTS ?= $(CODE_COVERAGE_LCOV_SHOPTS_DEFAULT) -CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH ?= --gcov-tool "$(GCOV)" -CODE_COVERAGE_LCOV_OPTIONS_DEFAULT ?= $(CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH) -CODE_COVERAGE_LCOV_OPTIONS ?= $(CODE_COVERAGE_LCOV_OPTIONS_DEFAULT) -CODE_COVERAGE_LCOV_RMOPTS_DEFAULT ?= -CODE_COVERAGE_LCOV_RMOPTS ?= $(CODE_COVERAGE_LCOV_RMOPTS_DEFAULT) -CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT ?=\ -$(if $(CODE_COVERAGE_BRANCH_COVERAGE),\ ---rc genhtml_branch_coverage=$(CODE_COVERAGE_BRANCH_COVERAGE)) -CODE_COVERAGE_GENHTML_OPTIONS ?= $(CODE_COVERAGE_GENHTML_OPTIONS_DEFAULTS) -CODE_COVERAGE_IGNORE_PATTERN ?= - -code_coverage_v_lcov_cap = $(code_coverage_v_lcov_cap_$(V)) -code_coverage_v_lcov_cap_ = $(code_coverage_v_lcov_cap_$(AM_DEFAULT_VERBOSITY)) -code_coverage_v_lcov_cap_0 = @echo " LCOV --capture"\ - $(CODE_COVERAGE_OUTPUT_FILE); -code_coverage_v_lcov_ign = $(code_coverage_v_lcov_ign_$(V)) -code_coverage_v_lcov_ign_ = $(code_coverage_v_lcov_ign_$(AM_DEFAULT_VERBOSITY)) -code_coverage_v_lcov_ign_0 = @echo " LCOV --remove /tmp/*"\ - $(CODE_COVERAGE_IGNORE_PATTERN); -code_coverage_v_genhtml = $(code_coverage_v_genhtml_$(V)) -code_coverage_v_genhtml_ = $(code_coverage_v_genhtml_$(AM_DEFAULT_VERBOSITY)) -code_coverage_v_genhtml_0 = @echo " GEN " $(CODE_COVERAGE_OUTPUT_DIRECTORY); -code_coverage_quiet = $(code_coverage_quiet_$(V)) -code_coverage_quiet_ = $(code_coverage_quiet_$(AM_DEFAULT_VERBOSITY)) -code_coverage_quiet_0 = --quiet - -# sanitizes the test-name: replaces with underscores: dashes and dots -code_coverage_sanitize = $(subst -,_,$(subst .,_,$(1))) - -# Use recursive makes in order to ignore errors during check -check-code-coverage:'"$CODE_COVERAGE_RULES_CHECK"' - -# Capture code coverage data -code-coverage-capture: code-coverage-capture-hook'"$CODE_COVERAGE_RULES_CAPTURE"' - -# Hook rule executed before code-coverage-capture, overridable by the user -code-coverage-capture-hook: - -'"$CODE_COVERAGE_RULES_CLEAN"' - -GITIGNOREFILES ?= -GITIGNOREFILES += $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_DIRECTORY) - -A''M_DISTCHECK_CONFIGURE_FLAGS ?= -A''M_DISTCHECK_CONFIGURE_FLAGS += --disable-code-coverage - -.PHONY: check-code-coverage code-coverage-capture code-coverage-capture-hook code-coverage-clean -'] - - AC_SUBST([CODE_COVERAGE_RULES]) - m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([CODE_COVERAGE_RULES])]) -]) diff --git a/m4/ax_require_defined.m4 b/m4/ax_require_defined.m4 deleted file mode 100644 index cae11112..00000000 --- a/m4/ax_require_defined.m4 +++ /dev/null @@ -1,37 +0,0 @@ -# =========================================================================== -# http://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 -# -# 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 1 - -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 diff --git a/m4/curses.m4 b/m4/curses.m4 deleted file mode 100644 index 031e1eea..00000000 --- a/m4/curses.m4 +++ /dev/null @@ -1,44 +0,0 @@ -dnl Check to find the curses headers/libraries - -AC_DEFUN([tinc_CURSES], -[ - AC_ARG_ENABLE([curses], - AS_HELP_STRING([--disable-curses], [disable curses support])) - AS_IF([test "x$enable_curses" != "xno"], [ - AC_DEFINE(HAVE_CURSES, 1, [have curses support]) - curses=true - AC_ARG_WITH(curses, - AS_HELP_STRING([--with-curses=DIR], [curses base directory, or:]), - [curses="$withval" - CPPFLAGS="$CPPFLAGS -I$withval/include" - LDFLAGS="$LDFLAGS -L$withval/lib"] - ) - - AC_ARG_WITH(curses-include, - AS_HELP_STRING([--with-curses-include=DIR], [curses headers directory]), - [curses_include="$withval" - CPPFLAGS="$CPPFLAGS -I$withval"] - ) - - AC_ARG_WITH(curses-lib, - AS_HELP_STRING([--with-curses-lib=DIR], [curses library directory]), - [curses_lib="$withval" - LDFLAGS="$LDFLAGS -L$withval"] - ) - - AC_CHECK_HEADERS(curses.h, - [], - [AC_MSG_ERROR("curses header files not found."); break] - ) - - AC_CHECK_LIB(ncurses, initscr, - [CURSES_LIBS="-lncurses"; AC_CHECK_LIB(tinfo, wtimeout, [CURSES_LIBS+=" -ltinfo"], [])], - [AC_CHECK_LIB(curses, initscr, - [CURSES_LIBS="-lcurses"], - [AC_MSG_ERROR("curses libraries not found.")] - )] - ) - ]) - - AC_SUBST(CURSES_LIBS) -]) diff --git a/m4/libgcrypt.m4 b/m4/libgcrypt.m4 deleted file mode 100644 index c38752aa..00000000 --- a/m4/libgcrypt.m4 +++ /dev/null @@ -1,36 +0,0 @@ -dnl Check to find the libgcrypt headers/libraries - -AC_DEFUN([tinc_LIBGCRYPT], -[ - AC_ARG_WITH(libgcrypt, - AS_HELP_STRING([--with-libgcrypt=DIR], [libgcrypt base directory, or:]), - [libgcrypt="$withval" - CPPFLAGS="$CPPFLAGS -I$withval/include" - LDFLAGS="$LDFLAGS -L$withval/lib"] - ) - - AC_ARG_WITH(libgcrypt-include, - AS_HELP_STRING([--with-libgcrypt-include=DIR], [libgcrypt headers directory (without trailing /libgcrypt)]), - [libgcrypt_include="$withval" - CPPFLAGS="$CPPFLAGS -I$withval"] - ) - - AC_ARG_WITH(libgcrypt-lib, - AS_HELP_STRING([--with-libgcrypt-lib=DIR], [libgcrypt library directory]), - [libgcrypt_lib="$withval" - LDFLAGS="$LDFLAGS -L$withval"] - ) - - AC_CHECK_HEADERS([gcrypt.h], - [], - [AC_MSG_ERROR([libgcrypt header files not found.]); break] - ) - - AC_CHECK_LIB(gcrypt, gcry_cipher_encrypt, - [LIBS="-lgcrypt -lgpg-error $LIBS"], - [AC_MSG_ERROR([libgcrypt libraries not found.])], - [-lgpg-error] - ) - - AC_DEFINE(HAVE_LIBGCRYPT, 1, [enable libgcrypt support]) -]) diff --git a/m4/lz4.m4 b/m4/lz4.m4 deleted file mode 100644 index 9d79d2ec..00000000 --- a/m4/lz4.m4 +++ /dev/null @@ -1,76 +0,0 @@ -dnl lz4.m4: Tinc autoconf integration for the LZ4 codec. -dnl Copyright 2015 Darik Horn . -dnl -dnl This program is free software; you can redistribute it and/or modify -dnl it under the terms of the GNU General Public License as published by -dnl the Free Software Foundation; either version 2 of the License, or -dnl (at your option) any later version. -dnl -dnl This program is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -dnl GNU General Public License for more details. -dnl -dnl You should have received a copy of the GNU General Public License along -dnl with this program; if not, write to the Free Software Foundation, Inc., -dnl 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - - -AC_DEFUN([tinc_LZ4], [ - - AC_ARG_ENABLE([lz4], - AS_HELP_STRING([--disable-lz4], [disable lz4 compression support])) - - AC_ARG_ENABLE([lz4-builtin], - AS_HELP_STRING([--disable-lz4-builtin], [do not use lz4 builtin])) - - AS_IF([test "x$enable_lz4" != "xno"], [ - AC_DEFINE(HAVE_LZ4, 1, [enable lz4 compression support]) - - AC_ARG_WITH(lz4, - AS_HELP_STRING([--with-lz4=DIR], [lz4 shared library prefix (eg: /usr/local)]), - [lz4="$withval" - CPPFLAGS="$CPPFLAGS-I$withval/include" - LDFLAGS="$LDFLAGS -L$withval/lib"] - ) - - AC_ARG_WITH(lz4-include, - AS_HELP_STRING([--with-lz4-include=DIR], [lz4 shared header directory]), - [lz4_include="$withval" - CPPFLAGS="$CPPFLAGS -I$withval"] - ) - - AC_ARG_WITH(lz4-lib, - AS_HELP_STRING([--with-lz4-lib=DIR], [lz4 shared object directory]), - [lz4_lib="$withval" - LDFLAGS="$LDFLAGS -L$withval"] - ) - - dnl First we check the system copy of the library - AS_IF([test "x$enable_lz4_builtin" != 'xyes'], [ - AC_CHECK_HEADERS(lz4.h, [ - AC_CHECK_LIB(lz4, LZ4_compress_fast_extState, - [lz4_header='' - LIBS="$LIBS -llz4"]) - ]) - ]) - - dnl If it was not found or is too old, fallback to the built-in copy - AS_IF([test "x$enable_lz4_builtin" != 'xno' -a "x$lz4_header" = 'x'], [ - lz4_header='"lib/lz4/lz4.h"' - lz4_builtin=1 - AC_DEFINE(HAVE_LZ4_BUILTIN, 1, [Enable lz4 builtin.]) - ]) - - dnl If the first one failed and the second one is disabled, there's nothing more we can do - AS_IF([test "x$lz4_header" = 'x'], [ - AC_MSG_ERROR("lz4 library was not found and fallback to builtin is disabled."); - ]) - - ]) - - AC_DEFINE_UNQUOTED(LZ4_H, [$lz4_header], [Location of lz4.h]) - - AM_CONDITIONAL([CONFIGURE_LZ4_BUILTIN], [test "x$lz4_builtin" = 'x1']) - -]) diff --git a/m4/lzo.m4 b/m4/lzo.m4 deleted file mode 100644 index 36aa9b7f..00000000 --- a/m4/lzo.m4 +++ /dev/null @@ -1,47 +0,0 @@ -dnl Check to find the lzo headers/libraries - -AC_DEFUN([tinc_LZO], -[ - AC_ARG_ENABLE([lzo], - AS_HELP_STRING([--disable-lzo], [disable lzo compression support])) - AS_IF([test "x$enable_lzo" != "xno"], [ - AC_DEFINE(HAVE_LZO, 1, [enable lzo compression support]) - AC_ARG_WITH(lzo, - AS_HELP_STRING([--with-lzo=DIR], [lzo base directory, or:]), - [lzo="$withval" - CPPFLAGS="$CPPFLAGS -I$withval/include" - LDFLAGS="$LDFLAGS -L$withval/lib"] - ) - - AC_ARG_WITH(lzo-include, - AS_HELP_STRING([--with-lzo-include=DIR], [lzo headers directory]), - [lzo_include="$withval" - CPPFLAGS="$CPPFLAGS -I$withval"] - ) - - AC_ARG_WITH(lzo-lib, - AS_HELP_STRING([--with-lzo-lib=DIR], [lzo library directory]), - [lzo_lib="$withval" - LDFLAGS="$LDFLAGS -L$withval"] - ) - - AC_CHECK_LIB(lzo2, lzo1x_1_compress, - [LIBS="$LIBS -llzo2"], - [AC_CHECK_LIB(lzo, lzo1x_1_compress, - [LIBS="$LIBS -llzo"], - [AC_MSG_ERROR("lzo libraries not found."); break] - )] - ) - - AC_CHECK_HEADERS(lzo/lzo1x.h, - [AC_DEFINE(LZO1X_H, [], [Location of lzo1x.h])], - [AC_CHECK_HEADERS(lzo2/lzo1x.h, - [AC_DEFINE(LZO1X_H, [], [Location of lzo1x.h])], - [AC_CHECK_HEADERS(lzo1x.h, - [AC_DEFINE(LZO1X_H, [], [Location of lzo1x.h])], - [AC_MSG_ERROR("lzo header files not found."); break] - )] - )] - ) - ]) -]) diff --git a/m4/miniupnpc.m4 b/m4/miniupnpc.m4 deleted file mode 100644 index c2aca29b..00000000 --- a/m4/miniupnpc.m4 +++ /dev/null @@ -1,40 +0,0 @@ -dnl Check to find the miniupnpc headers/libraries - -AC_DEFUN([tinc_MINIUPNPC], -[ - AC_ARG_ENABLE([miniupnpc], - AS_HELP_STRING([--enable-miniupnpc], [enable miniupnpc support])) - AS_IF([test "x$enable_miniupnpc" = "xyes"], [ - AC_DEFINE(HAVE_MINIUPNPC, 1, [have miniupnpc support]) - AC_ARG_WITH(miniupnpc, - AS_HELP_STRING([--with-miniupnpc=DIR], [miniupnpc base directory, or:]), - [miniupnpc="$withval" - CPPFLAGS="$CPPFLAGS -I$withval/include" - LDFLAGS="$LDFLAGS -L$withval/lib"] - ) - - AC_ARG_WITH(miniupnpc-include, - AS_HELP_STRING([--with-miniupnpc-include=DIR], [miniupnpc headers directory]), - [miniupnpc_include="$withval" - CPPFLAGS="$CPPFLAGS -I$withval"] - ) - - AC_ARG_WITH(miniupnpc-lib, - AS_HELP_STRING([--with-miniupnpc-lib=DIR], [miniupnpc library directory]), - [miniupnpc_lib="$withval" - LDFLAGS="$LDFLAGS -L$withval"] - ) - - AC_CHECK_HEADERS(miniupnpc/miniupnpc.h, - [], - [AC_MSG_ERROR("miniupnpc header files not found."); break] - ) - - AC_CHECK_LIB(miniupnpc, upnpDiscover, - [MINIUPNPC_LIBS="$LIBS -lminiupnpc"], - [AC_MSG_ERROR("miniupnpc libraries not found.")] - ) - ]) - - AC_SUBST(MINIUPNPC_LIBS) -]) diff --git a/m4/openssl.m4 b/m4/openssl.m4 deleted file mode 100644 index 99023c24..00000000 --- a/m4/openssl.m4 +++ /dev/null @@ -1,49 +0,0 @@ -dnl Check to find the LibreSSL/OpenSSL headers/libraries - -AC_DEFUN([tinc_OPENSSL], -[ - case $host_os in - *mingw*) - ;; - *) - AC_CHECK_FUNC(dlopen, - [], - [AC_CHECK_LIB(dl, dlopen, - [LIBS="$LIBS -ldl"], - [AC_MSG_ERROR([LibreSSL/OpenSSL depends on libdl.]); break] - )] - ) - ;; - esac - - AC_ARG_WITH(openssl, - AS_HELP_STRING([--with-openssl=DIR], [LibreSSL/OpenSSL base directory, or:]), - [openssl="$withval" - CPPFLAGS="$CPPFLAGS -I$withval/include" - LDFLAGS="$LDFLAGS -L$withval/lib"] - ) - - AC_ARG_WITH(openssl-include, - AS_HELP_STRING([--with-openssl-include=DIR], [LibreSSL/OpenSSL headers directory (without trailing /openssl)]), - [openssl_include="$withval" - CPPFLAGS="$CPPFLAGS -I$withval"] - ) - - AC_ARG_WITH(openssl-lib, - AS_HELP_STRING([--with-openssl-lib=DIR], [LibreSSL/OpenSSL library directory]), - [openssl_lib="$withval" - LDFLAGS="$LDFLAGS -L$withval"] - ) - - AC_CHECK_HEADERS([openssl/evp.h openssl/rsa.h openssl/rand.h openssl/err.h openssl/sha.h openssl/pem.h openssl/engine.h], - [], - [AC_MSG_ERROR([LibreSSL/OpenSSL header files not found.]); break] - ) - - AC_CHECK_LIB(crypto, OPENSSL_init_crypto, - [LIBS="-lcrypto $LIBS"], - [AC_MSG_ERROR([LibreSSL/OpenSSL libraries not found.])] - ) - - AC_DEFINE(HAVE_OPENSSL, 1, [enable OpenSSL support]) -]) diff --git a/m4/readline.m4 b/m4/readline.m4 deleted file mode 100644 index f29e6924..00000000 --- a/m4/readline.m4 +++ /dev/null @@ -1,42 +0,0 @@ -dnl Check to find the readline headers/libraries - -AC_DEFUN([tinc_READLINE], -[ - AC_ARG_ENABLE([readline], - AS_HELP_STRING([--disable-readline], [disable readline support])) - AS_IF([test "x$enable_readline" != "xno"], [ - AC_DEFINE(HAVE_READLINE, 1, [have readline support]) - readline=true - AC_ARG_WITH(readline, - AS_HELP_STRING([--with-readline=DIR], [readline base directory, or:]), - [readline="$withval" - CPPFLAGS="$CPPFLAGS -I$withval/include" - LDFLAGS="$LDFLAGS -L$withval/lib"] - ) - - AC_ARG_WITH(readline-include, - AS_HELP_STRING([--with-readline-include=DIR], [readline headers directory]), - [readline_include="$withval" - CPPFLAGS="$CPPFLAGS -I$withval"] - ) - - AC_ARG_WITH(readline-lib, - AS_HELP_STRING([--with-readline-lib=DIR], [readline library directory]), - [readline_lib="$withval" - LDFLAGS="$LDFLAGS -L$withval"] - ) - - AC_CHECK_HEADERS([readline/readline.h readline/history.h], - [], - [AC_MSG_ERROR("readline header files not found."); break] - ) - - AC_CHECK_LIB(readline, readline, - [READLINE_LIBS="-lreadline"], - [AC_MSG_ERROR("readline library not found.")], - [$CURSES_LIBS] - ) - ]) - - AC_SUBST(READLINE_LIBS) -]) diff --git a/m4/zlib.m4 b/m4/zlib.m4 deleted file mode 100644 index 64245a50..00000000 --- a/m4/zlib.m4 +++ /dev/null @@ -1,38 +0,0 @@ -dnl Check to find the zlib headers/libraries - -AC_DEFUN([tinc_ZLIB], -[ - AC_ARG_ENABLE([zlib], - AS_HELP_STRING([--disable-zlib], [disable zlib compression support])) - AS_IF([test "x$enable_zlib" != "xno"], [ - AC_DEFINE(HAVE_ZLIB, 1, [have zlib compression support]) - AC_ARG_WITH(zlib, - AS_HELP_STRING([--with-zlib=DIR], [zlib base directory, or:]), - [zlib="$withval" - CPPFLAGS="$CPPFLAGS -I$withval/include" - LDFLAGS="$LDFLAGS -L$withval/lib"] - ) - - AC_ARG_WITH(zlib-include, - AS_HELP_STRING([--with-zlib-include=DIR], [zlib headers directory]), - [zlib_include="$withval" - CPPFLAGS="$CPPFLAGS -I$withval"] - ) - - AC_ARG_WITH(zlib-lib, - AS_HELP_STRING([--with-zlib-lib=DIR], [zlib library directory]), - [zlib_lib="$withval" - LDFLAGS="$LDFLAGS -L$withval"] - ) - - AC_CHECK_HEADERS(zlib.h, - [], - [AC_MSG_ERROR("zlib header files not found."); break] - ) - - AC_CHECK_LIB(z, compress2, - [LIBS="$LIBS -lz"], - [AC_MSG_ERROR("zlib libraries not found.")] - ) - ]) -]) diff --git a/src/Makefile.am b/src/Makefile.am deleted file mode 100644 index dc124b14..00000000 --- a/src/Makefile.am +++ /dev/null @@ -1,321 +0,0 @@ -## Produce this file with automake to get Makefile.in - -sbin_PROGRAMS = tincd tinc -check_PROGRAMS = sptps_test sptps_keypair -EXTRA_PROGRAMS = $(check_PROGRAMS) - -CLEANFILES = version_git.h - -.PHONY: extra -extra: $(EXTRA_PROGRAMS) - -.PHONY: version-stamp -version-stamp: - -version_git.h: version-stamp - $(AM_V_GEN)echo >$@ - @-(cd $(srcdir) && git describe 2>/dev/null >/dev/null) && echo '#define GIT_DESCRIPTION "'`(cd $(srcdir) && git describe) | sed 's/release-//'`'"' >$@ ||: -${srcdir}/version.c: version_git.h - -## Now a hack to appease some versions of BSD make that don't understand that "./foo" is the same as "foo". -if BSD -version.c: ${srcdir}/version.c -endif - -if LINUX -EXTRA_PROGRAMS += sptps_speed -endif - -ed25519_SOURCES = \ - ed25519/ed25519.h \ - ed25519/fe.c ed25519/fe.h \ - ed25519/fixedint.h \ - ed25519/ge.c ed25519/ge.h \ - ed25519/key_exchange.c \ - ed25519/keypair.c \ - ed25519/precomp_data.h \ - ed25519/sc.c ed25519/sc.h \ - ed25519/sha512.c ed25519/sha512.h \ - ed25519/sign.c \ - ed25519/verify.c - -chacha_poly1305_SOURCES = \ - chacha-poly1305/chacha.c chacha-poly1305/chacha.h \ - chacha-poly1305/chacha-poly1305.c chacha-poly1305/chacha-poly1305.h \ - chacha-poly1305/poly1305.c chacha-poly1305/poly1305.h - -if CONFIGURE_LZ4_BUILTIN -lz4_SOURCES = lib/lz4/lz4.c lib/lz4/lz4.h -else -lz4_SOURCES = -endif - -tincd_SOURCES = \ - address_cache.c address_cache.h \ - autoconnect.c autoconnect.h \ - buffer.c buffer.h \ - cipher.h \ - compression.h \ - conf.c conf.h \ - conf_net.c conf_net.h \ - connection.c connection.h \ - control.c control.h \ - control_common.h \ - crypto.h \ - device.h \ - digest.h \ - dropin.c dropin.h \ - dummy_device.c \ - ecdh.h \ - ecdsa.h \ - ecdsagen.h \ - edge.c edge.h \ - ethernet.h \ - event.c event.h \ - fd_device.c \ - graph.c graph.h \ - hash.h \ - keys.c keys.h \ - have.h \ - ipv4.h \ - ipv6.h \ - list.c list.h \ - logger.c logger.h \ - meta.c meta.h \ - multicast_device.c \ - names.c names.h \ - net.c net.h \ - net_packet.c \ - net_setup.c \ - net_socket.c \ - netutl.c netutl.h \ - node.c node.h \ - prf.h \ - process.c process.h \ - protocol.c protocol.h \ - protocol_auth.c \ - protocol_edge.c \ - protocol_key.c \ - protocol_misc.c \ - protocol_subnet.c \ - raw_socket_device.c \ - route.c route.h \ - rsa.h \ - rsagen.h \ - script.c script.h \ - splay_tree.c splay_tree.h \ - sptps.c sptps.h \ - subnet.c subnet.h \ - subnet_parse.c \ - system.h \ - tincd.c \ - utils.c utils.h \ - xalloc.h \ - xoshiro.c \ - version.c version.h \ - ed25519/ecdh.c \ - ed25519/ecdsa.c \ - $(ed25519_SOURCES) \ - $(chacha_poly1305_SOURCES) \ - $(lz4_SOURCES) - -tinc_SOURCES = \ - dropin.c dropin.h \ - fsck.c fsck.h \ - ifconfig.c ifconfig.h \ - info.c info.h \ - invitation.c invitation.h \ - conf.c conf.h \ - keys.c keys.h \ - splay_tree.c splay_tree.h \ - list.c list.h \ - names.c names.h \ - netutl.c netutl.h \ - script.c script.h \ - sptps.c sptps.h \ - subnet_parse.c subnet.h \ - tincctl.c tincctl.h \ - top.c top.h \ - utils.c utils.h \ - version.c version.h \ - ed25519/ecdh.c \ - ed25519/ecdsa.c \ - ed25519/ecdsagen.c \ - xoshiro.c \ - $(ed25519_SOURCES) \ - $(chacha_poly1305_SOURCES) - -sptps_test_SOURCES = \ - logger.c logger.h \ - sptps.c sptps.h \ - sptps_test.c \ - utils.c utils.h \ - xoshiro.c \ - ed25519/ecdh.c \ - ed25519/ecdsa.c \ - $(ed25519_SOURCES) \ - $(chacha_poly1305_SOURCES) - -sptps_keypair_SOURCES = \ - sptps_keypair.c \ - utils.c utils.h \ - ed25519/ecdsagen.c \ - $(ed25519_SOURCES) - -sptps_speed_SOURCES = \ - logger.c logger.h \ - sptps.c sptps.h \ - sptps_speed.c \ - utils.c utils.h \ - ed25519/ecdh.c \ - ed25519/ecdsa.c \ - ed25519/ecdsagen.c \ - $(ed25519_SOURCES) \ - $(chacha_poly1305_SOURCES) - -## Conditionally compile device drivers - -if !GETOPT -tincd_SOURCES += \ - getopt.c getopt.h \ - getopt1.c -tinc_SOURCES += \ - getopt.c getopt.h \ - getopt1.c -sptps_test_SOURCES += \ - getopt.c getopt.h \ - getopt1.c -sptps_keypair_SOURCES += \ - getopt.c getopt.h \ - getopt1.c -endif - -if LINUX -tincd_SOURCES += linux/device.c -endif - -if BSD -tincd_SOURCES += bsd/device.c -if TUNEMU -tincd_SOURCES += bsd/tunemu.c bsd/tunemu.h -endif -endif - -if SOLARIS -tincd_SOURCES += solaris/device.c -endif - -if MINGW -tincd_SOURCES += mingw/device.c mingw/common.h -endif - -if UML -tincd_SOURCES += uml_device.c -endif - -if VDE -tincd_SOURCES += vde_device.c -endif - -if OPENSSL -tincd_SOURCES += \ - openssl/cipher.c openssl/cipher.h \ - openssl/crypto.c \ - openssl/digest.c openssl/digest.h \ - openssl/prf.c \ - openssl/rsa.c \ - openssl/log.c openssl/log.h -tinc_SOURCES += \ - openssl/cipher.c openssl/cipher.h \ - openssl/crypto.c \ - openssl/digest.c openssl/digest.h \ - openssl/prf.c \ - openssl/rsa.c \ - openssl/rsagen.c \ - openssl/log.c openssl/log.h -sptps_test_SOURCES += \ - openssl/crypto.c \ - openssl/digest.c openssl/digest.h \ - openssl/prf.c \ - openssl/log.c openssl/log.h -sptps_keypair_SOURCES += \ - openssl/crypto.c -sptps_speed_SOURCES += \ - openssl/crypto.c \ - openssl/digest.c openssl/digest.h \ - openssl/prf.c \ - openssl/log.c openssl/log.h -else -if GCRYPT -tincd_SOURCES += \ - gcrypt/cipher.c gcrypt/cipher.h \ - gcrypt/crypto.c \ - gcrypt/digest.c gcrypt/digest.h \ - gcrypt/pem.c gcrypt/pem.h \ - gcrypt/prf.c \ - gcrypt/rsa.c gcrypt/rsa.h -tinc_SOURCES += \ - gcrypt/cipher.c gcrypt/cipher.h \ - gcrypt/crypto.c \ - gcrypt/digest.c gcrypt/digest.h \ - gcrypt/pem.c gcrypt/pem.h \ - gcrypt/prf.c \ - gcrypt/rsa.c gcrypt/rsa.h \ - gcrypt/rsagen.c -sptps_test_SOURCES += \ - gcrypt/cipher.c gcrypt/cipher.h \ - gcrypt/crypto.c \ - gcrypt/digest.c gcrypt/digest.h \ - gcrypt/prf.c -sptps_keypair_SOURCES += \ - gcrypt/crypto.c -sptps_speed_SOURCES += \ - gcrypt/crypto.c \ - gcrypt/digest.c gcrypt/digest.h \ - gcrypt/prf.c -else -tincd_SOURCES += \ - nolegacy/crypto.c \ - nolegacy/prf.c -tinc_SOURCES += \ - nolegacy/crypto.c \ - nolegacy/prf.c -sptps_test_SOURCES += \ - nolegacy/crypto.c \ - nolegacy/prf.c -sptps_keypair_SOURCES += \ - nolegacy/crypto.c -sptps_speed_SOURCES += \ - nolegacy/crypto.c \ - nolegacy/prf.c -endif -endif - -if WITH_LEGACY_PROTOCOL -tinc_SOURCES += digest.c -tincd_SOURCES += digest.c cipher.c -sptps_test_SOURCES += digest.c -sptps_speed_SOURCES += digest.c -endif - -if MINIUPNPC -tincd_SOURCES += upnp.h upnp.c -tincd_LDADD = $(MINIUPNPC_LIBS) -tincd_LDFLAGS = -pthread -endif - -if MINGW -sptps_test_LDFLAGS = -pthread -endif - -tinc_LDADD = $(READLINE_LIBS) $(CURSES_LIBS) -sptps_speed_LDADD = -lrt - -LIBS = @LIBS@ -lm $(CODE_COVERAGE_LIBS) - -if TUNEMU -LIBS += -lpcap -endif - -AM_CFLAGS = -DCONFDIR=\"$(sysconfdir)\" -DRUNSTATEDIR=\"$(runstatedir)\" -DLOCALSTATEDIR=\"$(localstatedir)\" -DSBINDIR=\"$(sbindir)\" -iquote. $(CODE_COVERAGE_CFLAGS) -AM_CPPFLAGS = $(CODE_COVERAGE_CPPFLAGS) diff --git a/systemd/Makefile.am b/systemd/Makefile.am deleted file mode 100644 index dac2b73d..00000000 --- a/systemd/Makefile.am +++ /dev/null @@ -1,18 +0,0 @@ -EXTRA_DIST = tinc.service.in tinc@.service.in - -CLEANFILES = tinc.service tinc@.service - -if WITH_SYSTEMD -systemddir = @systemd_path@ -nodist_systemd_DATA = tinc.service tinc@.service -endif - -substitute = sed \ - -e s,'@sbindir\@',"$(sbindir)",g \ - -e s,'@sysconfdir\@',"$(sysconfdir)",g - -tinc.service: $(srcdir)/tinc.service.in - $(AM_V_GEN)$(substitute) $(srcdir)/tinc.service.in > $@ - -tinc@.service: $(srcdir)/tinc@.service.in - $(AM_V_GEN)$(substitute) $(srcdir)/tinc@.service.in > $@ diff --git a/test/Makefile.am b/test/Makefile.am deleted file mode 100644 index 0ba4da94..00000000 --- a/test/Makefile.am +++ /dev/null @@ -1,42 +0,0 @@ -TESTS = \ - basic.test \ - executables.test \ - commandline.test \ - command-fsck.test \ - import-export.test \ - invite-join.test \ - invite-offline.test \ - invite-tinc-up.test \ - variables.test \ - scripts.test \ - security.test \ - sptps-basic.test - -if WITH_LEGACY_PROTOCOL -TESTS += \ - legacy-protocol.test \ - algorithms.test -endif - -if LINUX -TESTS += \ - ns-ping.test \ - compression.test -endif - -dist_check_SCRIPTS = $(TESTS) - -AM_CFLAGS = -iquote. - -check_PROGRAMS = \ - splice - -splice_SOURCES = splice.c - -.PHONY: extra -extra: $(check_PROGRAMS) - -clean-local: - -for pid in *.test.?/pid; do ../src/tinc --pidfile="$$pid" stop; done - -killall ../src/sptps_test - -rm -rf *.test.?