about summary refs log tree commit diff
path: root/configure
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-05-23 14:12:07 -0400
committerJune McEnroe <june@causal.agency>2020-05-23 19:14:47 -0400
commitfd679bbca8ad24c0ddd69e3d2018fbbe4bb8e54d (patch)
tree1d61e17c85746106154fc37c18e2ab29014d8162 /configure
parentRevert "Send blank line after 10 minutes idle" (diff)
downloadcatgirl-fd679bbca8ad24c0ddd69e3d2018fbbe4bb8e54d.tar.gz
catgirl-fd679bbca8ad24c0ddd69e3d2018fbbe4bb8e54d.zip
Don't compress man page or use configure on FreeBSD
Also use DESTDIR in install.
Diffstat (limited to '')
-rwxr-xr-xconfigure32
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