This commit is contained in:
Heiko Reese
2021-08-06 23:28:26 +02:00
commit b84ff67420
5 changed files with 41 additions and 0 deletions

2
Makefile.am Normal file
View File

@ -0,0 +1,2 @@
SUBDIRS = src
ACLOCAL_AMFLAGS = -I m4

17
configure.ac Normal file
View File

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

5
src/Makefile.am Normal file
View File

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

8
src/exim4encrypt.c Normal file
View File

@ -0,0 +1,8 @@
#include "exim4encrypt.h"
__attribute__((constructor)) static void init() {
sodium_init();
}
int dlfunction(uschar **yield, int argc, uschar *argv[]) {
}

9
src/exim4encrypt.h Normal file
View File

@ -0,0 +1,9 @@
#include <sodium.h>
#include <local_scan.h>
#ifndef EXIM_ENCRYPT_LIBRARY_H
#define EXIM_ENCRYPT_LIBRARY_H
#endif //EXIM_ENCRYPT_LIBRARY_H