autotools

This commit is contained in:
Alexander Vdolainen 2026-09-29 01:30:12 +03:00
parent 0705f1d266
commit 5d57fbcdfd
3 changed files with 38 additions and 0 deletions

2
Makefile.am Normal file
View File

@ -0,0 +1,2 @@
SUBDIRS = src
EXTRA_DIST = README docs/architecture.txt conf/subrelay.sample.conf templates/subscribe.txt

6
autogen.sh Executable file
View File

@ -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."

30
configure.ac Normal file
View File

@ -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