[config] Modernize autotools
Updated AC_OUTPUT to use AC_CONFIG_FILES Use PACKAGE in install path Remove automake -Wno-portability, not needed with foreign option Fixed typo in evrtsp.h path Autotools commands moved to build-aux directory Allow CFLAGS and package CFLAGS/LIBS to be updated at build time
This commit is contained in:
parent
1748430c48
commit
d7f8dea0ec
|
@ -8,5 +8,5 @@ SUBDIRS = sqlext src
|
|||
man_MANS = forked-daapd.8
|
||||
|
||||
install-data-hook:
|
||||
$(MKDIR_P) $(DESTDIR)$(localstatedir)/cache/forked-daapd/libspotify
|
||||
$(MKDIR_P) "$(DESTDIR)$(localstatedir)/cache/$(PACKAGE)/libspotify"
|
||||
|
||||
|
|
13
configure.ac
13
configure.ac
|
@ -3,9 +3,10 @@ dnl Process this file with autoconf to produce a configure script.
|
|||
AC_INIT([forked-daapd], [24.2])
|
||||
AC_CONFIG_SRCDIR([config.h.in])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
AC_CONFIG_AUX_DIR([build-aux])
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
AC_DEFINE_UNQUOTED([BUILDDATE], ["`date -Idate`"], [Build date])
|
||||
AM_INIT_AUTOMAKE([foreign -Wno-portability subdir-objects])
|
||||
AM_INIT_AUTOMAKE([foreign subdir-objects])
|
||||
|
||||
AC_USE_SYSTEM_EXTENSIONS
|
||||
|
||||
|
@ -35,7 +36,8 @@ fi
|
|||
AC_SUBST(ANTLR)
|
||||
AM_CONDITIONAL(COND_ANTLR, test "x$ANTLR" != x)
|
||||
|
||||
CFLAGS="$CFLAGS -Wall -D_LARGEFILE_SOURCE"
|
||||
AM_CPPFLAGS="-D_LARGEFILE_SOURCE -Wall"
|
||||
AC_SUBST([AM_CPPFLAGS])
|
||||
|
||||
AC_CHECK_HEADERS([sys/wait.h])
|
||||
AC_CHECK_HEADERS([sys/param.h])
|
||||
|
@ -255,4 +257,9 @@ dnl Checks for header files.
|
|||
AC_HEADER_STDC
|
||||
AC_HEADER_SYS_WAIT
|
||||
|
||||
AC_OUTPUT(src/Makefile sqlext/Makefile Makefile)
|
||||
AC_CONFIG_FILES([
|
||||
src/Makefile
|
||||
sqlext/Makefile
|
||||
Makefile
|
||||
])
|
||||
AC_OUTPUT
|
||||
|
|
|
@ -2,4 +2,4 @@ pkglib_LTLIBRARIES = forked-daapd-sqlext.la
|
|||
|
||||
forked_daapd_sqlext_la_SOURCES = sqlext.c
|
||||
forked_daapd_sqlext_la_LDFLAGS = -avoid-version -module -shared
|
||||
forked_daapd_sqlext_la_LIBADD = @LIBUNISTRING@
|
||||
forked_daapd_sqlext_la_LIBADD = $(LIBUNISTRING)
|
||||
|
|
|
@ -60,22 +60,50 @@ ANTLR_SOURCES = \
|
|||
|
||||
ANTLR_PRODUCTS =
|
||||
|
||||
forked_daapd_CPPFLAGS = -D_GNU_SOURCE \
|
||||
-DDATADIR="\"$(pkgdatadir)\"" -DCONFDIR="\"$(sysconfdir)\"" \
|
||||
-DSTATEDIR="\"$(localstatedir)\"" -DPKGLIBDIR="\"$(pkglibdir)\""
|
||||
|
||||
forked_daapd_CFLAGS = \
|
||||
@ZLIB_CFLAGS@ @AVAHI_CFLAGS@ @SQLITE3_CFLAGS@ @LIBAV_CFLAGS@ \
|
||||
@CONFUSE_CFLAGS@ @MINIXML_CFLAGS@ @LIBPLIST_CFLAGS@ @SPOTIFY_CFLAGS@ \
|
||||
@LIBGCRYPT_CFLAGS@ @GPG_ERROR_CFLAGS@ @ALSA_CFLAGS@ @LIBPULSE_CFLAGS@ \
|
||||
@LIBCURL_CFLAGS@ @LIBPROTOBUF_C_CFLAGS@ @GNUTLS_CFLAGS@ @JSON_C_CFLAGS@
|
||||
AM_CPPFLAGS += \
|
||||
$(ZLIB_CFLAGS) \
|
||||
$(AVAHI_CFLAGS) \
|
||||
$(SQLITE3_CFLAGS) \
|
||||
$(LIBAV_CFLAGS) \
|
||||
$(CONFUSE_CFLAGS) \
|
||||
$(MINIXML_CFLAGS) \
|
||||
$(LIBPLIST_CFLAGS) \
|
||||
$(SPOTIFY_CFLAGS) \
|
||||
$(LIBGCRYPT_CFLAGS) \
|
||||
$(GPG_ERROR_CFLAGS) \
|
||||
$(ALSA_CFLAGS) \
|
||||
$(LIBPULSE_CFLAGS) \
|
||||
$(LIBCURL_CFLAGS) \
|
||||
$(LIBPROTOBUF_C_CFLAGS) \
|
||||
$(GNUTLS_CFLAGS) \
|
||||
$(JSON_C_CFLAGS) \
|
||||
\
|
||||
-D_GNU_SOURCE \
|
||||
-DDATADIR=\"$(pkgdatadir)\" \
|
||||
-DCONFDIR=\"$(sysconfdir)\" \
|
||||
-DSTATEDIR=\"$(localstatedir)\" \
|
||||
-DPKGLIBDIR=\"$(pkglibdir)\"
|
||||
|
||||
forked_daapd_LDADD = -lrt \
|
||||
@ZLIB_LIBS@ @AVAHI_LIBS@ @SQLITE3_LIBS@ @LIBAV_LIBS@ \
|
||||
@CONFUSE_LIBS@ @LIBEVENT_LIBS@ @LIBUNISTRING@ \
|
||||
@MINIXML_LIBS@ @ANTLR3C_LIBS@ @LIBPLIST_LIBS@ @SPOTIFY_LIBS@ \
|
||||
@LIBGCRYPT_LIBS@ @GPG_ERROR_LIBS@ @ALSA_LIBS@ @LIBPULSE_LIBS@ \
|
||||
@LIBCURL_LIBS@ @LIBPROTOBUF_C_LIBS@ @GNUTLS_LIBS@ @JSON_C_LIBS@
|
||||
$(ZLIB_LIBS) \
|
||||
$(AVAHI_LIBS) \
|
||||
$(SQLITE3_LIBS) \
|
||||
$(LIBAV_LIBS) \
|
||||
$(CONFUSE_LIBS) \
|
||||
$(LIBEVENT_LIBS) \
|
||||
$(LIBUNISTRING) \
|
||||
$(MINIXML_LIBS) \
|
||||
$(ANTLR3C_LIBS) \
|
||||
$(LIBPLIST_LIBS) \
|
||||
$(SPOTIFY_LIBS) \
|
||||
$(LIBGCRYPT_LIBS) \
|
||||
$(GPG_ERROR_LIBS) \
|
||||
$(ALSA_LIBS) \
|
||||
$(LIBPULSE_LIBS) \
|
||||
$(LIBCURL_LIBS) \
|
||||
$(LIBPROTOBUF_C_LIBS) \
|
||||
$(GNUTLS_LIBS) \
|
||||
$(JSON_C_LIBS)
|
||||
|
||||
forked_daapd_SOURCES = main.c \
|
||||
db.c db.h \
|
||||
|
@ -109,7 +137,7 @@ forked_daapd_SOURCES = main.c \
|
|||
outputs.h outputs.c \
|
||||
outputs/raop.c outputs/streaming.c outputs/dummy.c outputs/fifo.c \
|
||||
$(ALSA_SRC) $(PULSEAUDIO_SRC) $(CHROMECAST_SRC) \
|
||||
evrtsp/rtsp.c evrtp/evrtsp.h evrtsp/rtsp-internal.h evrtsp/log.h \
|
||||
evrtsp/rtsp.c evrtsp/evrtsp.h evrtsp/rtsp-internal.h evrtsp/log.h \
|
||||
$(SPOTIFY_SRC) \
|
||||
$(LASTFM_SRC) \
|
||||
$(MPD_SRC) \
|
||||
|
|
Loading…
Reference in New Issue