diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 2001-01-27 11:24:46 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 2001-01-27 11:24:46 +0000 |
commit | 56d57f2337659de8e0a7b7c22a89120aaacbc1a6 (patch) | |
tree | a69dbb1c3e616d62656c349990da88f270641521 /sbin/isakmpd/apps/certpatch | |
parent | 35d3367f7e29fc08a3756aadfe63ed55eca709a6 (diff) |
Cleanup the MP_FLAVOUR situation. Still needs work.
Diffstat (limited to 'sbin/isakmpd/apps/certpatch')
-rw-r--r-- | sbin/isakmpd/apps/certpatch/Makefile | 11 | ||||
-rw-r--r-- | sbin/isakmpd/apps/certpatch/certpatch.c | 9 |
2 files changed, 13 insertions, 7 deletions
diff --git a/sbin/isakmpd/apps/certpatch/Makefile b/sbin/isakmpd/apps/certpatch/Makefile index 725e982fb73..335fea6485e 100644 --- a/sbin/isakmpd/apps/certpatch/Makefile +++ b/sbin/isakmpd/apps/certpatch/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.3 2000/04/07 22:06:36 niklas Exp $ +# $OpenBSD: Makefile,v 1.4 2001/01/27 11:24:39 niklas Exp $ # $EOM: Makefile,v 1.6 2000/03/28 21:22:06 ho Exp $ # @@ -40,12 +40,21 @@ BINDIR= /usr/sbin TOPSRC= ${.CURDIR}/../.. TOPOBJ!= cd ${TOPSRC}; printf "all:\n\t@pwd\n" |${MAKE} -f- OS!= awk '/^OS=/ { print $$2 }' ${.CURDIR}/../../Makefile +FEATURES!= awk '/^FEATURES=/ { print $$0 }' ${.CURDIR}/../../Makefile | sed 's/FEATURES=.//' .PATH: ${TOPSRC} ${TOPSRC}/sysdep/${OS} ${TOPOBJ} CFLAGS+= -I${TOPSRC} -I${TOPSRC}/sysdep/${OS} -I${TOPOBJ} -Wall LDADD+= -lcrypto DPADD+= ${LIBCRYPTO} MAN= certpatch.8 +.if ${FEATURES:Mgmp} == "gmp" +CFLAGS+= -DMP_FLAVOUR=MP_FLAVOUR_GMP +LDADD+= -lgmp +DPADD+= ${LIBGMP} +.else +CFLAGS+= -DMP_FLAVOUR=MP_FLAVOUR_OPENSSL +.endif + .include "${TOPSRC}/sysdep/${OS}/Makefile.sysdep" # Override LIBSYSDEPDIR definition from Makefile.sysdep LIBSYSDEPDIR= ${TOPSRC}/sysdep/common/libsysdep diff --git a/sbin/isakmpd/apps/certpatch/certpatch.c b/sbin/isakmpd/apps/certpatch/certpatch.c index 92b61efa535..06ad17657bf 100644 --- a/sbin/isakmpd/apps/certpatch/certpatch.c +++ b/sbin/isakmpd/apps/certpatch/certpatch.c @@ -1,4 +1,4 @@ -/* $OpenBSD: certpatch.c,v 1.12 2001/01/26 11:08:22 niklas Exp $ */ +/* $OpenBSD: certpatch.c,v 1.13 2001/01/27 11:24:39 niklas Exp $ */ /* $EOM: certpatch.c,v 1.11 2000/12/21 14:50:09 ho Exp $ */ /* @@ -58,10 +58,6 @@ #include <netinet/in.h> #include <arpa/inet.h> -#if MP_FLAVOUR == MP_FLAVOUR_GMP -# include <gmp.h> -#endif - #include "sysdep.h" #ifdef KAME @@ -76,8 +72,9 @@ #include <openssl/pem.h> #include "conf.h" -#include "log.h" #include "ipsec_num.h" +#include "log.h" +#include "math_mp.h" #include "x509.h" #define IDTYPE_IP "ip" |