kmx.io/kmxgit/configure

Branch

tokyovania 1e30f33a2 2022-07-05T15:23:26
Fixed many libgit2 free function calls. Added configure for supporting Linux. Tested on PopOS 22.04 and Fedora 32. Instrumented erl_nif.h . Debugged using valgrind and ASan. @author Jean-Cyprien Roux @author Baptiste Le Glaunec ok thodg@kmx.io
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh

LIBBSD_CFLAGS="$(pkg-config libbsd-overlay --cflags)"
LIBBSD_LIBS="$(pkg-config libbsd-overlay --libs)"
LIBGIT2_CFLAGS="$(pkg-config libgit2 --cflags)"
LIBGIT2_LIBS="$(pkg-config libgit2 --libs)"

CFLAGS="$CFLAGS $LIBBSD_CFLAGS $LIBGIT2_CFLAGS"
LIBS="$LIBBSD_LIBS $LIBGIT2_LIBS"

if [ -f /usr/include/alloca.h ]; then
    CFLAGS="$CFLAGS -DHAVE_ALLOCA_H"
fi

echo "# This file was generate by configure." > config.mk
echo "CFLAGS += $CFLAGS" >> config.mk
echo "LIBS += $LIBS" >> config.mk
Download