commit b84ff67420c4c7afa2936733cd0c19de0dbeef0b Author: Heiko Reese Date: Fri Aug 6 23:28:26 2021 +0200 … diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..0182df2 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,2 @@ +SUBDIRS = src +ACLOCAL_AMFLAGS = -I m4 diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..5356dd4 --- /dev/null +++ b/configure.ac @@ -0,0 +1,17 @@ +AC_INIT([exim4_encrypt], [0.1]) +AM_INIT_AUTOMAKE([-Wall -Werror foreign]) +AC_PROG_CC +AM_PROG_AR +AC_CONFIG_HEADERS([config.h]) +AC_CONFIG_MACRO_DIRS([m4]) +LT_INIT([shared]) + +AC_CONFIG_FILES([Makefile + src/Makefile +]) + +AC_SEARCH_LIBS([sodium_init], [sodium], [], [ + AC_MSG_ERROR([unable to find the libsodium library]) +]) + +AC_OUTPUT diff --git a/src/Makefile.am b/src/Makefile.am new file mode 100644 index 0000000..fc4385e --- /dev/null +++ b/src/Makefile.am @@ -0,0 +1,5 @@ +lib_LTLIBRARIES = libexim4encrypt.la +libexim4encrypt_la_SOURCES = exim4encrypt.c exim4encrypt.h +libexim4encrypt_la_CPPFLAGS = -I/usr/include/exim4 +libexim4encrypt_la_LDFLAGS = -shared +include_HEADERS = sodium.h local_scan.h diff --git a/src/exim4encrypt.c b/src/exim4encrypt.c new file mode 100644 index 0000000..26e0769 --- /dev/null +++ b/src/exim4encrypt.c @@ -0,0 +1,8 @@ +#include "exim4encrypt.h" + +__attribute__((constructor)) static void init() { + sodium_init(); +} + +int dlfunction(uschar **yield, int argc, uschar *argv[]) { +} diff --git a/src/exim4encrypt.h b/src/exim4encrypt.h new file mode 100644 index 0000000..94b2c1a --- /dev/null +++ b/src/exim4encrypt.h @@ -0,0 +1,9 @@ +#include +#include + +#ifndef EXIM_ENCRYPT_LIBRARY_H +#define EXIM_ENCRYPT_LIBRARY_H + + +#endif //EXIM_ENCRYPT_LIBRARY_H +