mirror of
https://github.com/vgmstream/vgmstream.git
synced 2024-11-30 17:24:31 +01:00
Make libvorbis/libmpg123 optional in autotools
This commit is contained in:
parent
1294f515f2
commit
bb07299dae
2
BUILD.md
2
BUILD.md
@ -85,7 +85,7 @@ Requires the dev version of Audacious (and dependencies), automake/autoconf, and
|
||||
|
||||
The plugin needs Audacious 3.5 or higher. New Audacious releases can break plugin compatibility so it may not work with the latest version unless adapted first.
|
||||
|
||||
FFmpeg and other external libraries aren't enabled, thus some formats are not supported. libvorbis and libmpg123 can be disabled with -DVGM_DISABLE_VORBIS and -DVGM_DISABLE_MPEG.
|
||||
libvorbis and libmpg123 will be used if found, while FFmpeg and other external libraries aren't enabled, thus some formats won't work.
|
||||
|
||||
Windows builds aren't supported at the moment (should be possible but there are complex dependency chains).
|
||||
|
||||
|
34
configure.ac
34
configure.ac
@ -1,8 +1,8 @@
|
||||
dnl audacious-vgmstream m4 script
|
||||
dnl automake-vgmstream m4 script
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.53)
|
||||
AC_INIT(audacious-vgmstream,1.3.0)
|
||||
AC_INIT(automake-vgmstream,1.3.0)
|
||||
AM_INIT_AUTOMAKE([subdir-objects])
|
||||
AC_CONFIG_HEADERS(audacious/config.h)
|
||||
AM_DISABLE_STATIC
|
||||
@ -17,22 +17,28 @@ AM_PROG_LIBTOOL
|
||||
AC_PATH_X
|
||||
AC_PATH_XTRA
|
||||
|
||||
have_vorbis=no
|
||||
PKG_CHECK_MODULES(VORBIS, [vorbis], have_vorbis=yes,
|
||||
[AC_MSG_WARN([Cannot find libvorbis - will not enable Vorbis formats])]
|
||||
)
|
||||
AM_CONDITIONAL(HAVE_VORBIS, test "$have_vorbis" = yes)
|
||||
|
||||
have_vorbisfile=no
|
||||
PKG_CHECK_MODULES(VORBISFILE, [vorbisfile], have_vorbisfile=yes,
|
||||
[AC_MSG_WARN([Cannot find libvorbisfile - will not enable Vorbis formats])]
|
||||
)
|
||||
AM_CONDITIONAL(HAVE_VORBISFILE, test "$have_vorbisfile" = yes)
|
||||
|
||||
have_libmpg123=no
|
||||
PKG_CHECK_MODULES(MPG123, [libmpg123], have_libmpg123=yes,
|
||||
[AC_MSG_WARN([Cannot find libmpg123 - will not enable MPEG formats])]
|
||||
)
|
||||
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])]
|
||||
)
|
||||
|
||||
PKG_CHECK_MODULES(VORBIS, [vorbis],,
|
||||
[AC_MSG_ERROR([Cannot find libvorbis])]
|
||||
)
|
||||
|
||||
PKG_CHECK_MODULES(VORBISFILE, [vorbisfile],,
|
||||
[AC_MSG_ERROR([Cannot find libvorbisfile])]
|
||||
)
|
||||
|
||||
PKG_CHECK_MODULES(MPG123, [libmpg123],,
|
||||
[AC_MSG_ERROR([Cannot find libmpg123])]
|
||||
)
|
||||
|
||||
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])]
|
||||
)
|
||||
|
@ -11,6 +11,17 @@ SUBDIRS = coding layout meta
|
||||
libvgmstream_la_LDFLAGS = coding/libcoding.la layout/liblayout.la meta/libmeta.la
|
||||
libvgmstream_la_SOURCES = (auto-updated)
|
||||
libvgmstream_la_SOURCES += ../ext_libs/clHCA.c
|
||||
libvgmstream_la_LIBADD = $(AUDACIOUS_LIBS) $(GTK_LIBS) $(VORBISFILE_LIBS) $(VORBIS_LIBS) $(MPG123_LIBS) -lm
|
||||
libvgmstream_la_LIBADD = $(AUDACIOUS_LIBS) $(GTK_LIBS) -lm
|
||||
EXTRA_DIST = (auto-updated)
|
||||
EXTRA_DIST += ../ext_includes/clHCA.h
|
||||
|
||||
if HAVE_VORBIS
|
||||
if HAVE_VORBISFILE
|
||||
AM_CFLAGS += -DVGM_USE_VORBIS
|
||||
libvgmstream_la_LIBADD += $(VORBISFILE_LIBS) $(VORBIS_LIBS)
|
||||
endif
|
||||
endif
|
||||
if HAVE_LIBMPG123
|
||||
AM_CFLAGS += -DVGM_USE_MPEG
|
||||
libvgmstream_la_LIBADD += $(MPG123_LIBS)
|
||||
endif
|
||||
|
@ -9,3 +9,12 @@ AM_MAKEFLAGS=-f Makefile.autotools
|
||||
liblayout_la_LDFLAGS =
|
||||
liblayout_la_SOURCES = (auto-updated)
|
||||
EXTRA_DIST = (auto-updated)
|
||||
|
||||
if HAVE_VORBIS
|
||||
if HAVE_VORBISFILE
|
||||
AM_CFLAGS += -DVGM_USE_VORBIS
|
||||
endif
|
||||
endif
|
||||
if HAVE_LIBMPG123
|
||||
AM_CFLAGS += -DVGM_USE_MPEG
|
||||
endif
|
||||
|
@ -9,3 +9,12 @@ AM_MAKEFLAGS=-f Makefile.autotools
|
||||
libmeta_la_LDFLAGS =
|
||||
libmeta_la_SOURCES = (auto-updated)
|
||||
EXTRA_DIST = (auto-updated)
|
||||
|
||||
if HAVE_VORBIS
|
||||
if HAVE_VORBISFILE
|
||||
AM_CFLAGS += -DVGM_USE_VORBIS
|
||||
endif
|
||||
endif
|
||||
if HAVE_LIBMPG123
|
||||
AM_CFLAGS += -DVGM_USE_MPEG
|
||||
endif
|
||||
|
Loading…
Reference in New Issue
Block a user