summarylogtreecommitdiffstats
path: root/Patch003-libsharedmilter-Makefile-m4.patch
blob: df3f35b43d244f9ea8697bf4cb992560ff8bf0dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
--- sendmail-8.18.1/libsharedmilter/Makefile.m4	2024-11-23 21:29:02.138194739 +0200
+++ sendmail-8.18.1/libsharedmilter/Makefile.m4.new	2024-11-23 21:31:43.259543378 +0200
@@ -9,6 +9,9 @@
 SMSRCDIR=ifdef(`confSMSRCDIR', `confSMSRCDIR', `${SRCDIR}/sendmail')
 PREPENDDEF(`confINCDIRS', `-I${SMSRCDIR} ')
 
+define(`runCtest', `esyscmd(`echo -e "#include <stdio.h>\n#include \"../include/libmilter/mfapi.h\"\nint main(){'$1`;return 0;}" | gcc -x c -I../include -o ctest - && ./ctest && rm -f ctest')')dnl
+define(`confSOVER', runCtest(`printf(\"%d.%d\", SM_LM_VRS_MAJOR(SMFI_VERSION), SM_LM_VRS_MINOR(SMFI_VERSION))'))dnl
+define(`confSOPLVL', runCtest(`printf(\"%d\", SM_LM_VRS_PLVL(SMFI_VERSION))'))dnl
 bldPRODUCT_START(`sharedlibrary', `libmilter')
 define(`bldINSTALLABLE', `true')
 define(`LIBMILTER_EXTRAS', `errstring.c strl.c')