Use pkg(8) to configure on FreeBSD

master
C. McEnroe 2020-02-11 03:09:51 -05:00
parent d1913a4c63
commit 172cd57099
1 changed files with 15 additions and 0 deletions

15
configure vendored
View File

@ -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