diff options
author | C. McEnroe | 2020-02-11 03:09:51 -0500 |
---|---|---|
committer | C. McEnroe | 2020-02-11 03:09:51 -0500 |
commit | 172cd57099e06c8901770542fa61dd3e13d5c832 (patch) | |
tree | eef0ec83fb9dcd26e6f999ffdc383d20017696d6 | |
parent | d1913a4c63ae1d44b13d530b522eec0e7ebfbfd1 (diff) |
Use pkg(8) to configure on FreeBSD
-rwxr-xr-x | configure | 15 |
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 |