From 0883223a5fa1430c8649737e5d1f1c8f5b9c6a1e Mon Sep 17 00:00:00 2001 From: Ollivier Robert Date: Thu, 22 Jul 2004 09:10:52 +0000 Subject: [PATCH] Include support for NOCRYPT & NO_OPENSSL world. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It does survive « make release ». Uses an upcoming patch from the vendor branch (ntp-stable) of ntp-keygen. Submitted by: Marius Strobl --- usr.sbin/ntp/Makefile.inc | 5 +++++ usr.sbin/ntp/config.h | 2 +- usr.sbin/ntp/ntp-keygen/Makefile | 9 +++++++-- usr.sbin/ntp/ntpd/Makefile | 9 +++++++-- 4 files changed, 20 insertions(+), 5 deletions(-) diff --git a/usr.sbin/ntp/Makefile.inc b/usr.sbin/ntp/Makefile.inc index 1f548ee28428..bd9b34ea9ead 100644 --- a/usr.sbin/ntp/Makefile.inc +++ b/usr.sbin/ntp/Makefile.inc @@ -8,6 +8,11 @@ NTPDEFS= -DSYS_FREEBSD # -DMX4200 -DNMEA -DBOEDER CFLAGS+= ${NTPDEFS} ${DEFS_LOCAL} ${CLOCKDEFS} +.if !defined(NOCRYPT) && !defined(NO_OPENSSL) && !defined(RELEASE_CRUNCH) +CFLAGS+= -DOPENSSL +DISTRIBUTION= crypto +.endif + .if exists(${.OBJDIR}/../libparse) LIBPARSE= ${.OBJDIR}/../libparse/libparse.a .else diff --git a/usr.sbin/ntp/config.h b/usr.sbin/ntp/config.h index e58cad5b3604..51d0929fa6cd 100644 --- a/usr.sbin/ntp/config.h +++ b/usr.sbin/ntp/config.h @@ -933,7 +933,7 @@ #define ONCORE_SHMEM_STATUS 1 /* Use OpenSSL? */ -#define OPENSSL +/* #undef OPENSSL */ /* Should we open the broadcast socket? */ #define OPEN_BCAST_SOCKET 1 diff --git a/usr.sbin/ntp/ntp-keygen/Makefile b/usr.sbin/ntp/ntp-keygen/Makefile index 891d6be75f85..ebb39339e365 100644 --- a/usr.sbin/ntp/ntp-keygen/Makefile +++ b/usr.sbin/ntp/ntp-keygen/Makefile @@ -9,7 +9,12 @@ SRCS= ntp-keygen.c CFLAGS+= -I${.CURDIR}/../../../contrib/ntp/include -I${.CURDIR}/../ -DPADD= ${LIBNTP} ${LIBMD} ${LIBCRYPTO} -LDADD= ${LIBNTP} -lmd -lcrypto +DPADD= ${LIBNTP} +LDADD= ${LIBNTP} + +.if !defined(NOCRYPT) && !defined(NO_OPENSSL) && !defined(RELEASE_CRUNCH) +DPADD+= ${LIBMD} ${LIBCRYPTO} +LDADD+= -lmd -lcrypto +.endif .include diff --git a/usr.sbin/ntp/ntpd/Makefile b/usr.sbin/ntp/ntpd/Makefile index 027b9b96dacf..d16dcc1cb061 100644 --- a/usr.sbin/ntp/ntpd/Makefile +++ b/usr.sbin/ntp/ntpd/Makefile @@ -28,8 +28,13 @@ SRCS= cmd_args.c map_vme.c ntp_config.c \ CFLAGS+= -I${.CURDIR}/../../../contrib/ntp/include -I${.CURDIR}/../ -DPADD= ${LIBPARSE} ${LIBNTP} ${LIBM} ${LIBCRYPTO} ${LIBMD} -LDADD= ${LIBPARSE} ${LIBNTP} -lm -lcrypto -lmd +DPADD= ${LIBPARSE} ${LIBNTP} ${LIBM} ${LIBMD} +LDADD= ${LIBPARSE} ${LIBNTP} -lm -lmd + +.if !defined(NOCRYPT) && !defined(NO_OPENSSL) && !defined(RELEASE_CRUNCH) +DPADD+= ${LIBCRYPTO} +LDADD+= -lcrypto +.endif CLEANFILES+= .version version.c