Add simple configure script

Mostly motivated by wanting to build with the ncurses in pkgsrc because
it supports italics.
master
C. McEnroe 2020-02-06 23:49:27 -05:00
parent 273207b19f
commit 5470254fa5
3 changed files with 15 additions and 5 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
*.o
catgirl
config.mk
tags

View File

@ -1,9 +1,7 @@
LIBRESSL_PREFIX = /usr/local
CFLAGS += -I${LIBRESSL_PREFIX}/include
LDFLAGS += -L${LIBRESSL_PREFIX}/lib
CFLAGS += -std=c11 -Wall -Wextra -Wpedantic
LDLIBS = -lcurses -lcrypto -ltls
LDLIBS = -lcrypto -ltls -lncursesw
-include config.mk
OBJS += chat.o
OBJS += command.o

11
configure vendored 100755
View File

@ -0,0 +1,11 @@
#!/bin/sh
set -eu
libs='libcrypto libtls ncursesw'
pkg-config --print-errors $libs
cat >config.mk <<EOF
CFLAGS += $(pkg-config --cflags $libs)
LDFLAGS += $(pkg-config --libs-only-L $libs)
LDLIBS = $(pkg-config --libs-only-l $libs)
EOF