Skip to contentSkip to conversation

Fix inconsistencies in the build system

PATCH New Tiziano Müller 1 participant 1 message Apr 7, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix inconsistencies in the build system

Hi

There are some minor inconsistencies in the build system:
a) If --disable-{alsa,gstreamer} are given on configure LIBSBC doesn't get built. Even though SBC_CFLAGS and SBC_LIBS get substituted in the Makefile and therefore libsbc.la ends up in the link-list for libipc which then fails.
b) ipctest needs libipc and libsbc but gets built unconditionally in audio/Makefile.am.

The attached patch fixes that.

Cheers,
Tiziano

The configure stuff is a inconsequent:
- even if neither alsa nor gstreamer support is enabled, SBC_LIBS gets substituted by libsbc.la which doesn't get build without alsa or gstreamer. Making this conditional helps.
- ipctest needs both libipc.la and libsbc.la and fails if SBC_LIBS/SBC_CFLAGS are empty, making the build conditional helps again.

acinclude.m4 renamed from acinclude.m4.orig +4 -2
@@ -330,8 +330,10 @@
 	AC_SUBST([GDBUS_CFLAGS], ['-I$(top_srcdir)/gdbus'])
 	AC_SUBST([GDBUS_LIBS], ['$(top_builddir)/gdbus/libgdbus.la'])
 
-	AC_SUBST([SBC_CFLAGS], ['-I$(top_srcdir)/sbc'])
-	AC_SUBST([SBC_LIBS], ['$(top_builddir)/sbc/libsbc.la'])
+	if (test "${alsa_enable}" = "yes" || test "${gstreamer_enable}" = "yes"); then
+		AC_SUBST([SBC_CFLAGS], ['-I$(top_srcdir)/sbc'])
+		AC_SUBST([SBC_LIBS], ['$(top_builddir)/sbc/libsbc.la'])
+	fi
 
 	AM_CONDITIONAL(SNDFILE, test "${sndfile_enable}" = "yes" && test "${sndfile_found}" = "yes")
 	AM_CONDITIONAL(NETLINK, test "${netlink_enable}" = "yes" && test "${netlink_found}" = "yes")
Makefile.am renamed from Makefile.am.orig +6 -0
@@ -60,10 +60,16 @@
 
 libipc_la_SOURCES = ipc.h ipc.c
 
+if AUDIOPLUGIN
+if SBC
+
 noinst_PROGRAMS = ipctest
 
 ipctest_LDADD= libipc.la @SBC_LIBS@ @GLIB_LIBS@
 
+endif
+endif
+
 AM_CFLAGS = -fvisibility=hidden @SBC_CFLAGS@ \
 		@BLUEZ_CFLAGS@ @DBUS_CFLAGS@ @GLIB_CFLAGS@ @GDBUS_CFLAGS@