Hash :
a8c59dd2
Author :
Thomas de Grivel
Date :
2021-02-21T07:46:32
wip remove autotools
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
#!/bin/sh
VER=0.4
o_rule() {
$CC $CPPFLAGS -M "$1"
}
lo_rule() {
o_rule "$1" | sed -e 's/[.]o:/.lo:/'
}
prog_rule() {
o_rule "$1" | sed -e 's/[.]o:/:/'
}
c2prog() {
echo "$@" | sed -e 's/[.]c$//' -e 's/[.]c / /g'
}
c2o() {
echo "$@" | sed -e 's/[.]c$/.o/' -e 's/[.]c /.o /g'
}
c2lo() {
echo "$@" | sed -e 's/[.]c$/.lo/' -e 's/[.]c /.lo /g'
}
c2la() {
echo "$@" | sed -e 's/[.]c$/.la/' -e 's/[.]c /.la /g'
}
require_pkg_config() {
if ! which pkg-config >/dev/null; then
echo "please install pkg-config" >&2
exit 1
fi
}
CONFIG_MK=config.mk
echo "# config.mk generated by configure" > ${CONFIG_MK}
if test -z "$CC"; then
if test -n $(which cc); then
CC=cc
elif test -n $(which gcc); then
CC=gcc
fi
fi
echo "CC = $CC" >> ${CONFIG_MK}
if test -x /usr/local/bin/libtool; then
LIBTOOL=/usr/local/bin/libtool
else
LIBTOOL=libtool
fi
echo "LIBTOOL = $LIBTOOL" >> ${CONFIG_MK}
if test -z "$INSTALL"; then
if test -x "$(which install)"; then
INSTALL=install
fi
fi
echo "INSTALL = $INSTALL" >> ${CONFIG_MK}