automake: Skip building audacious plugin if audacious is not found

This commit is contained in:
ToppleKek 2020-04-29 12:13:05 -04:00
parent 7562b00b60
commit 86fdd8ca36
2 changed files with 9 additions and 3 deletions

View File

@ -3,6 +3,10 @@
AM_MAKEFLAGS=-f Makefile.autotools
SUBDIRS = src audacious cli
SUBDIRS = src cli
if HAVE_AUDACIOUS
SUBDIRS += audacious
endif
EXTRA_DIST = version.h

View File

@ -35,9 +35,11 @@ PKG_CHECK_MODULES(MPG123, [libmpg123], have_libmpg123=yes,
)
AM_CONDITIONAL(HAVE_LIBMPG123, test "$have_libmpg123" = yes)
PKG_CHECK_MODULES(AUDACIOUS, [audacious >= 3.5.0],,
[AC_MSG_ERROR([Cannot find audacious >= 3.5.0 correctly installed])]
have_audacious=no
PKG_CHECK_MODULES(AUDACIOUS, [audacious >= 3.5.0], have_audacious=yes,
[AC_MSG_WARN([Cannot find audacious >= 3.5.0 correctly installed - will not build Audacious plugin])]
)
AM_CONDITIONAL(HAVE_AUDACIOUS, test "$have_audacious" = yes)
PKG_CHECK_MODULES(GTK, [glib-2.0 >= 2.6.0 gtk+-2.0 >= 2.6.0 gthread-2.0 pango],
, [AC_MSG_ERROR([Cannot find glib2/gtk2/pango])]