mirror of
https://github.com/owntone/owntone-server.git
synced 2025-07-17 12:42:46 -04:00
Check for gperf, add support to the build system
This commit is contained in:
parent
ac73ee0ce5
commit
ac95530585
@ -12,6 +12,12 @@ AC_PROG_CC
|
|||||||
AM_PROG_CC_C_O
|
AM_PROG_CC_C_O
|
||||||
LT_INIT([disable-static])
|
LT_INIT([disable-static])
|
||||||
|
|
||||||
|
AC_CHECK_PROG(GPERF, [gperf], [gperf])
|
||||||
|
if test "x$GPERF" = x; then
|
||||||
|
AC_MSG_ERROR([GNU gperf not found, please install it])
|
||||||
|
fi
|
||||||
|
AC_SUBST(GPERF)
|
||||||
|
|
||||||
AC_CHECK_PROG(ANTLR, [antlr3], [antlr3])
|
AC_CHECK_PROG(ANTLR, [antlr3], [antlr3])
|
||||||
if test "x$ANTLR" = x; then
|
if test "x$ANTLR" = x; then
|
||||||
if test -d $srcdir/src/pregen; then
|
if test -d $srcdir/src/pregen; then
|
||||||
|
@ -21,6 +21,10 @@ if COND_OSS4
|
|||||||
OSS4SRC=laudio_oss4.c
|
OSS4SRC=laudio_oss4.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
GPERF_FILES =
|
||||||
|
|
||||||
|
GPERF_PRODUCTS =
|
||||||
|
|
||||||
ANTLR_GRAMMARS = \
|
ANTLR_GRAMMARS = \
|
||||||
RSP.g RSP2SQL.g \
|
RSP.g RSP2SQL.g \
|
||||||
DAAP.g DAAP2SQL.g
|
DAAP.g DAAP2SQL.g
|
||||||
@ -82,15 +86,33 @@ forked_daapd_SOURCES = main.c \
|
|||||||
nodist_forked_daapd_SOURCES = \
|
nodist_forked_daapd_SOURCES = \
|
||||||
$(ANTLR_SOURCES)
|
$(ANTLR_SOURCES)
|
||||||
|
|
||||||
|
BUILT_SOURCES = \
|
||||||
|
$(GPERF_PRODUCTS)
|
||||||
|
|
||||||
EXTRA_DIST = \
|
EXTRA_DIST = \
|
||||||
$(ANTLR_GRAMMARS) \
|
$(ANTLR_GRAMMARS) \
|
||||||
scan-mpc.c \
|
scan-mpc.c \
|
||||||
scan-flac.c
|
scan-flac.c
|
||||||
|
|
||||||
|
CLEANFILES = \
|
||||||
|
$(GPERF_PRODUCTS)
|
||||||
|
|
||||||
# Let's help the dependencies a little.
|
# Let's help the dependencies a little.
|
||||||
rsp_query.c: RSPLexer.h RSPParser.h RSP2SQL.h
|
rsp_query.c: RSPLexer.h RSPParser.h RSP2SQL.h
|
||||||
daap_query.c: DAAPLexer.h DAAPParser.h DAAP2SQL.h
|
daap_query.c: DAAPLexer.h DAAPParser.h DAAP2SQL.h
|
||||||
|
|
||||||
|
# gperf construction rules
|
||||||
|
%_hash.c: %.gperf
|
||||||
|
if $(GPERF) $< > $@.tmp; then \
|
||||||
|
mv $@.tmp $@; \
|
||||||
|
elif $(GPERF) --version >/dev/null 2>&1; then \
|
||||||
|
rm $@.tmp; \
|
||||||
|
exit 1; \
|
||||||
|
else \
|
||||||
|
rm $@.tmp; \
|
||||||
|
touch $@; \
|
||||||
|
fi
|
||||||
|
|
||||||
# Support for building the parsers when ANTLR3 is available
|
# Support for building the parsers when ANTLR3 is available
|
||||||
if COND_ANTLR
|
if COND_ANTLR
|
||||||
SUFFIXES = .g .u
|
SUFFIXES = .g .u
|
||||||
|
Loading…
x
Reference in New Issue
Block a user