$NetBSD: patch-ac,v 1.1 2000/09/25 04:00:15 fredb Exp $ --- sysdep/netbsd/Makefile.sysdep.orig Mon Jun 19 22:27:43 2000 +++ sysdep/netbsd/Makefile.sysdep Sun Sep 24 22:28:35 2000 @@ -32,20 +32,28 @@ # Not yet #FEATURES+= policy x509 -LIBGMP= /usr/pkg/lib/libgmp.a +# The following defaults are the NetBSD package system defaults +LOCALBASE?= /usr/pkg +.if exists(/usr/include/openssl/ssl.h) +SSLBASE?= /usr +.else +SSLBASE?= ${LOCALBASE} +.endif + +LIBGMP= ${LOCALBASE}/lib/libgmp.a LIBCRYPTO= /usr/lib/libcrypto.a LIBSYSDEPDIR= ${.CURDIR}/sysdep/common/libsysdep LDADD+= ${LIBGMP} ${LIBSYSDEPDIR}/libsysdep.a -lipsec DPADD+= ${LIBGMP} ${LIBSYSDEPDIR}/libsysdep.a ${LIBIPSEC} -CFLAGS+= -DNO_RSA -DNO_IDEA -DNO_RC5 \ - -I${.CURDIR}/sysdep/common -.if !defined(PATENTEDOPENSSLSRC) -CFLAGS+= -I/usr/pkg/include -I/usr/pkg/include/openssl -LDADD+= -L/usr/pkg/lib +CFLAGS+= -DNO_IDEA -DNO_RC5 \ + -I${.CURDIR}/sysdep/common -I${LOCALBASE}/include +.if ${SSLBASE} == "/usr" +CFLAGS+= -I${SSLBASE}/include/openssl .else -CFLAGS+= -I/usr/include -I/usr/include/openssl +CFLAGS+= -I${SSLBASE}/include -I${SSLBASE}/include/openssl +LDFLAGS+= -L${SSLBASE}/lib -Wl,-R${SSLBASE}/lib .endif IPSEC_SRCS= pf_key_v2.c @@ -73,8 +81,3 @@ beforedepend: rm -f ssl -.if !defined(PATENTEDOPENSSLSRC) - ln -sf /usr/pkg/include/openssl ssl -.else - ln -sf /usr/include/openssl ssl -.endif