You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
3.2 KiB
51 lines
3.2 KiB
4 years ago
|
diff -up sendmail-8.14.3/devtools/M4/UNIX/sharedlibrary.m4.sharedmilter sendmail-8.14.3/devtools/M4/UNIX/sharedlibrary.m4
|
||
|
--- sendmail-8.14.3/devtools/M4/UNIX/sharedlibrary.m4.sharedmilter 2009-01-20 15:19:34.000000000 +0100
|
||
|
+++ sendmail-8.14.3/devtools/M4/UNIX/sharedlibrary.m4 2009-01-20 15:19:34.000000000 +0100
|
||
|
@@ -15,22 +15,23 @@ divert(-1)
|
||
|
divert(0)dnl
|
||
|
include(confBUILDTOOLSDIR`/M4/'bldM4_TYPE_DIR`/links.m4')dnl
|
||
|
bldLIST_PUSH_ITEM(`bldC_PRODUCTS', bldCURRENT_PRODUCT)dnl
|
||
|
-bldPUSH_TARGET(bldCURRENT_PRODUCT`.a')dnl
|
||
|
+bldPUSH_TARGET(bldCURRENT_PRODUCT.so.confSOVER.confSOPLVL)dnl
|
||
|
bldPUSH_INSTALL_TARGET(`install-'bldCURRENT_PRODUCT)dnl
|
||
|
bldPUSH_CLEAN_TARGET(bldCURRENT_PRODUCT`-clean')dnl
|
||
|
|
||
|
include(confBUILDTOOLSDIR`/M4/'bldM4_TYPE_DIR`/defines.m4')
|
||
|
divert(bldTARGETS_SECTION)
|
||
|
-bldCURRENT_PRODUCT.a: ${BEFORE} ${bldCURRENT_PRODUCT`OBJS'}
|
||
|
- ${AR} ${AROPTS} bldCURRENT_PRODUCT.a ${bldCURRENT_PRODUCT`OBJS'}
|
||
|
- ${RANLIB} ${RANLIBOPTS} bldCURRENT_PRODUCT.a
|
||
|
+bldCURRENT_PRODUCT.so.confSOVER.confSOPLVL: ${BEFORE} ${bldCURRENT_PRODUCT`OBJS'}
|
||
|
+ ${CC} ${CFLAGS} ${LDOPTS_SO} -o bldCURRENT_PRODUCT.so.confSOVER.confSOPLVL `-Wl,'confSONAME`,'bldCURRENT_PRODUCT`.so.'confSOVER ${bldCURRENT_PRODUCT`OBJS'}
|
||
|
ifdef(`bldLINK_SOURCES', `bldMAKE_SOURCE_LINKS(bldLINK_SOURCES)')
|
||
|
|
||
|
-install-`'bldCURRENT_PRODUCT: bldCURRENT_PRODUCT.a
|
||
|
+install-`'bldCURRENT_PRODUCT: bldCURRENT_PRODUCT.so.confSOVER.confSOPLVL
|
||
|
ifdef(`bldINSTALLABLE', ` ifdef(`confMKDIR', `if [ ! -d ${DESTDIR}${bldINSTALL_DIR`'LIBDIR} ]; then confMKDIR -p ${DESTDIR}${bldINSTALL_DIR`'LIBDIR}; else :; fi ')
|
||
|
- ${INSTALL} -c -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} bldCURRENT_PRODUCT.a ${DESTDIR}${LIBDIR}')
|
||
|
+ ${LN} ${LNOPTS} bldCURRENT_PRODUCT.so.confSOVER.confSOPLVL ${DESTDIR}${LIBDIR}/bldCURRENT_PRODUCT.so.confSOVER
|
||
|
+ ${LN} ${LNOPTS} bldCURRENT_PRODUCT.so.confSOVER ${DESTDIR}${LIBDIR}/bldCURRENT_PRODUCT.so
|
||
|
+ ${INSTALL} -c -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} bldCURRENT_PRODUCT.so.confSOVER`.'confSOPLVL ${DESTDIR}${LIBDIR}')
|
||
|
|
||
|
bldCURRENT_PRODUCT-clean:
|
||
|
- rm -f ${OBJS} bldCURRENT_PRODUCT.a ${MANPAGES}
|
||
|
+ rm -f ${OBJS} bldCURRENT_PRODUCT.so* ${MANPAGES}
|
||
|
|
||
|
divert(0)
|
||
|
diff -up sendmail-8.14.3/libmilter/Makefile.m4.sharedmilter sendmail-8.14.3/libmilter/Makefile.m4
|
||
|
--- sendmail-8.14.3/libmilter/Makefile.m4.sharedmilter 2008-04-08 07:23:44.000000000 +0200
|
||
|
+++ sendmail-8.14.3/libmilter/Makefile.m4 2009-01-20 15:26:05.000000000 +0100
|
||
|
@@ -9,7 +9,11 @@ define(`confMT', `true')
|
||
|
SMSRCDIR=ifdef(`confSMSRCDIR', `confSMSRCDIR', `${SRCDIR}/sendmail')
|
||
|
PREPENDDEF(`confINCDIRS', `-I${SMSRCDIR} ')
|
||
|
|
||
|
-bldPRODUCT_START(`library', `libmilter')
|
||
|
+APPENDDEF(`confOPTIMIZE', `-fno-pie -fPIC')
|
||
|
+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')
|
||
|
APPENDDEF(`confENVDEF', `-DNOT_SENDMAIL -Dsm_snprintf=snprintf')
|