summary refs log tree commit diff
path: root/configure
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-02-11 03:09:51 -0500
committerJune McEnroe <june@causal.agency>2020-02-11 03:09:51 -0500
commit172cd57099e06c8901770542fa61dd3e13d5c832 (patch)
treeeef0ec83fb9dcd26e6f999ffdc383d20017696d6 /configure
parentMerge branch 'rewrite' (diff)
downloadcatgirl-172cd57099e06c8901770542fa61dd3e13d5c832.tar.gz
catgirl-172cd57099e06c8901770542fa61dd3e13d5c832.zip
Use pkg(8) to configure on FreeBSD
Diffstat (limited to 'configure')
-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