diff options
author | C. McEnroe | 2020-05-23 14:12:07 -0400 |
---|---|---|
committer | C. McEnroe | 2020-05-23 19:14:47 -0400 |
commit | fd679bbca8ad24c0ddd69e3d2018fbbe4bb8e54d (patch) | |
tree | 1d61e17c85746106154fc37c18e2ab29014d8162 /configure | |
parent | 4282574c187e8ee7b0da98061a355b7c0c71b50d (diff) |
Don't compress man page or use configure on FreeBSD
Also use DESTDIR in install.
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 32 |
1 files changed, 8 insertions, 24 deletions
diff --git a/configure b/configure index b0f818f..88bfb1a 100755 --- a/configure +++ b/configure @@ -1,36 +1,20 @@ #!/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 - CFLAGS += -D'OPENSSL_BIN="${prefix}/bin/openssl"' - LDFLAGS += -L${prefix}/lib - EOF - exit - ;; -esac +exec >config.mk libs='libcrypto libtls ncursesw' pkg-config --print-errors $libs -cat >config.mk <<EOF +cat <<EOF CFLAGS += $(pkg-config --cflags $libs) -CFLAGS += -D'OPENSSL_BIN="$(pkg-config --variable=prefix openssl)/bin/openssl"' +CFLAGS += -D'OPENSSL_BIN="$(pkg-config --variable=exec_prefix openssl)/bin/openssl"' LDFLAGS += $(pkg-config --libs-only-L $libs) LDLIBS = $(pkg-config --libs-only-l $libs) EOF -case "$(uname)" in - (Linux) - if ! grep -q -e '-D_GNU_SOURCE' config.mk; then - echo 'CFLAGS += -D_GNU_SOURCE' >> config.mk - fi - ;; -esac +if [ "$(uname)" = 'Linux' ]; then + cat <<-EOF + CFLAGS += -D_GNU_SOURCE + EOF +fi |