#!/bin/sh set -eu exec >config.mk libs='libtls sqlite3' pkg-config --print-errors $libs cat <<EOF CFLAGS += $(pkg-config --cflags $libs) CFLAGS += -D'SQLITE3_BIN="$(pkg-config --variable=exec_prefix sqlite3)/bin/sqlite3"' LDFLAGS += $(pkg-config --libs-only-L $libs) LDLIBS = $(pkg-config --libs-only-l sqlite3) LDLIBS.litterbox = $(pkg-config --libs-only-l $libs) INSTALLS = EOF if [ "$(uname)" = 'Linux' ]; then cat <<-EOF CFLAGS += -D_GNU_SOURCE EOF fi