From 172cd57099e06c8901770542fa61dd3e13d5c832 Mon Sep 17 00:00:00 2001 From: C. McEnroe Date: Tue, 11 Feb 2020 03:09:51 -0500 Subject: Use pkg(8) to configure on FreeBSD --- configure | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'configure') 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 -- cgit 1.4.1-2-gfad0