From 369fa2d4120b1dc1a63d0a743203695b0325b888 Mon Sep 17 00:00:00 2001 From: William Ahern Date: Sat, 20 Jul 2013 00:29:03 -0700 Subject: don't use -ldl on BSDs --- src/GNUmakefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/GNUmakefile b/src/GNUmakefile index 76f045b..99b2336 100644 --- a/src/GNUmakefile +++ b/src/GNUmakefile @@ -29,7 +29,14 @@ ifeq ($(CC_$(d)), sunpro) CPPFLAGS_$(d) += -DOPENSSL_NO_EC endif -LDFLAGS_$(d) += -lssl -lcrypto -lpthread -ldl +LDFLAGS_$(d) += -lssl -lcrypto -lpthread + +# NetBSD, FreeBSD, OpenBSD (and presumably descendants) lack any libdl; +# dlopen, et al are part of libc. +ifneq ($(patsubst %BSD,BSD,$(OS_$(d))), BSD) +LDFLAGS_$(d) += -ldl +endif + # # C O M P I L A T I O N R U L E S -- cgit v1.2.3-59-g8ed1b