From 5d57fbcdfd8a2a339fd0842c97a2767cf4321f07 Mon Sep 17 00:00:00 2001 From: Alexander Vdolainen Date: Tue, 29 Sep 2026 01:30:12 +0300 Subject: [PATCH] autotools --- Makefile.am | 2 ++ autogen.sh | 6 ++++++ configure.ac | 30 ++++++++++++++++++++++++++++++ 3 files changed, 38 insertions(+) create mode 100644 Makefile.am create mode 100755 autogen.sh create mode 100644 configure.ac diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..1e35ac0 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,2 @@ +SUBDIRS = src +EXTRA_DIST = README docs/architecture.txt conf/subrelay.sample.conf templates/subscribe.txt diff --git a/autogen.sh b/autogen.sh new file mode 100755 index 0000000..67bfe48 --- /dev/null +++ b/autogen.sh @@ -0,0 +1,6 @@ +#!/bin/sh +set -e + +echo "Generating Autotools build system..." +autoreconf --install --force --verbose +echo "Done! You can now run ./configure and make." diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..1cc3b02 --- /dev/null +++ b/configure.ac @@ -0,0 +1,30 @@ +AC_PREREQ([2.69]) +AC_INIT([subrelay], [0.0.1], [alex@vapaa.xyz]) +AC_CONFIG_SRCDIR([src/subrelayd.c]) +AC_CONFIG_HEADERS([config.h]) +AM_INIT_AUTOMAKE([foreign -Wall -Werror subdir-objects]) + +# Checks for programs. +AC_PROG_CC +AC_PROG_INSTALL + +# Checks for libraries. +# Require libcurl for IMAP/SMTP mail engines +PKG_CHECK_MODULES([CURL], [libcurl >= 7.20.0]) + +# Checks for header files. +AC_CHECK_HEADERS([fcntl.h stdlib.h string.h strings.h unistd.h sys/socket.h sys/un.h pwd.h grp.h]) + +# Checks for typedefs, structures, and compiler characteristics. +AC_TYPE_SIZE_T +AC_TYPE_SSIZE_T +AC_TYPE_UINT64_T + +# Checks for library functions (bracketed for m4 parser safety) +AC_CHECK_FUNCS([memset socket strchr strdup strcasecmp strncasecmp strtol strtoul fcntl setuid setgid]) + +AC_CONFIG_FILES([ + Makefile + src/Makefile +]) +AC_OUTPUT