summary refs log tree commit diff
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xconfigure15
1 files changed, 15 insertions, 0 deletions
diff --git a/configure b/configure
index 90e1173..d230f4c 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,21 @@
 #!/bin/sh
 set -eu
 
+case "$(uname)" in
+	(FreeBSD)
+		if ! pkg info -e libressl; then
+			echo 'LibreSSL required'
+			exit 1
+		fi
+		prefix=$(pkg query '%p' libressl)
+		cat >config.mk <<-EOF
+		CFLAGS += -I${prefix}/include
+		LDFLAGS += -L${prefix}/lib
+		EOF
+		exit
+		;;
+esac
+
 libs='libcrypto libtls ncursesw'
 pkg-config --print-errors $libs