summary refs log tree commit diff
path: root/contrib/palaver/configure
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-08-11 14:54:40 -0400
committerJune McEnroe <june@causal.agency>2020-08-11 14:58:57 -0400
commitab9ddde3bf09ab47606cb26060ac124c92ea7515 (patch)
tree0b830029214f5c966a47bdb0bbfa93742492a85a /contrib/palaver/configure
parentImplement stub of palaverapp.com capability (diff)
downloadpounce-ab9ddde3bf09ab47606cb26060ac124c92ea7515.tar.gz
pounce-ab9ddde3bf09ab47606cb26060ac124c92ea7515.zip
contrib/palaver: Add configure script
Diffstat (limited to 'contrib/palaver/configure')
-rwxr-xr-xcontrib/palaver/configure49
1 files changed, 49 insertions, 0 deletions
diff --git a/contrib/palaver/configure b/contrib/palaver/configure
new file mode 100755
index 0000000..9a7e8d8
--- /dev/null
+++ b/contrib/palaver/configure
@@ -0,0 +1,49 @@
+#!/bin/sh
+set -eu
+
+cflags() {
+	echo "CFLAGS += $*"
+}
+ldlibs() {
+	echo "LDLIBS ${o:-}= $*"
+	o=+
+}
+config() {
+	pkg-config --print-errors "$@"
+	cflags $(pkg-config --cflags "$@")
+	ldlibs $(pkg-config --libs "$@")
+}
+defstr() {
+	cflags "-D'$1=\"$2\"'"
+}
+defvar() {
+	defstr "$1" "$(pkg-config --variable=$3 $2)${4:-}"
+}
+
+exec >config.mk
+
+for opt; do
+	case "${opt}" in
+		(--prefix=*) echo "PREFIX = ${opt#*=}" ;;
+		(--mandir=*) echo "MANDIR = ${opt#*=}" ;;
+		(*) echo "warning: unsupported option ${opt}" >&2 ;;
+	esac
+done
+
+case "$(uname)" in
+	(FreeBSD)
+		config libcurl libtls sqlite3
+		echo 'INSTALLS = install-rcs'
+		;;
+	(OpenBSD)
+		ldlibs -ltls
+		config libcurl sqlite3
+		;;
+	(Linux)
+		cflags -D_GNU_SOURCE
+		config libcurl libtls sqlite3
+		;;
+	(*)
+		config libcurl libtls sqlite3
+		;;
+esac
43fccc426bc43caa7e7e51208833b9fce66&follow=1'>Share a cut buffer between all edit buffersJune McEnroe 2022-02-20Assert return values in edit testsJune McEnroe 2022-02-20Move mbs out of struct Edit, use a global bufferJune McEnroe 2022-02-20Clear edit buffer before running commandJune McEnroe 2022-02-20Show indicator in status when window has pending inputJune McEnroe 2022-02-20Use separate edit buffers for each IDJune McEnroe 2022-02-20Make sure new cap is actually larger than new lengthJune McEnroe 2022-02-20Remove unused mbs.len field from struct EditJune McEnroe 2022-02-19Remove unneeded includes in ui.cJune McEnroe 2022-02-19Reimplement tab completeJune McEnroe 2022-02-19Handle errors from editFn, etc.June McEnroe 2022-02-19Reimplement text macrosJune McEnroe 2022-02-19Factor out input handling to input.cJune McEnroe 2022-02-19Factor out window management to window.cJune McEnroe 2022-02-19Enable -Wmissing-prototypesJune McEnroe 2022-02-19Fix edit.[ch] license notice additional permissionsJune McEnroe 2022-02-19Run line editing testsJune McEnroe 2022-02-18Implement new line editing "library"June McEnroe 2022-02-18Simplify cursor positioning in inputJune McEnroe 2022-02-18Fix M-f orderingJune McEnroe 2022-02-12Move sandman build to scripts/MakefileJune McEnroe 2022-02-12Use compat_readpassphrase.c on LinuxJune McEnroe 2022-02-12Copy RPP defines from oconfigureJune McEnroe