Commit 26a1613b authored by Stan Seibert's avatar Stan Seibert

ogg123 build is now optional. If the ogg123-specific requirements are not

met (libcurl, libao, and POSIX threads), then ogg123 is automatically not
built.  --disable-ogg123 will also force this behavior.

svn path=/trunk/vorbis-tools/; revision=3486
parent 1a1ad5df
......@@ -78,26 +78,42 @@ PROFILE="$PROFILE $cflags_save"
LDFLAGS="$LDFLAGS $ldflags_save"
dnl --------------------------------------------------
dnl Check for libraries
dnl Check for generally needed libraries
dnl --------------------------------------------------
AM_PATH_OGG(,AC_MSG_ERROR(Ogg needed!))
AM_PATH_VORBIS(,AC_MSG_ERROR(Vorbis needed!))
AM_PATH_AO(,AC_MSG_ERROR(libao needed!))
AM_PATH_CURL(,AC_MSG_ERROR(libcurl needed!))
ACX_PTHREAD(,AC_MSG_ERROR(POSIX threads required!))
SHARE_LIBS='$(top_builddir)/share/libutf8.a $(top_builddir)/share/libgetopt.a'
SHARE_CFLAGS='-I$(top_srcdir)/include'
I18N_CFLAGS='-I$(top_srcdir)/intl'
I18N_LIBS=$INTLLIBS
SOCKET_LIBS=
AC_CHECK_LIB(socket, socket, SOCKET_LIBS="-lsocket")
AC_CHECK_LIB(nsl, gethostbyname, SOCKET_LIBS="-lnsl $SOCKET_LIBS")
SHARE_LIBS='$(top_builddir)/share/libutf8.a $(top_builddir)/share/libgetopt.a'
SHARE_CFLAGS='-I$(top_srcdir)/include'
dnl --------------------------------------------------
dnl Check for ogg123 critical libraries
dnl --------------------------------------------------
I18N_CFLAGS='-I$(top_srcdir)/intl'
I18N_LIBS=$INTLLIBS
AC_ARG_ENABLE(ogg123,[ --disable-ogg123 Skip building ogg123 (a playback utility)], build_ogg123="$enableval", build_ogg123="yes")
if test "x$build_ogg123" = xyes; then
AC_MSG_RESULT([checking for ogg123 requirements])
AM_PATH_AO(,build_ogg123=no; AC_MSG_WARN(libao missing))
AM_PATH_CURL(,build_ogg123=no; AC_MSG_WARN(libcurl missing))
ACX_PTHREAD(,build_ogg123=no; AC_MSG_WARN(POSIX threads missing))
if test "x$build_ogg123" != xyes; then
AC_MSG_WARN([Prerequisites for ogg123 not met, ogg123 will not be built])
fi
fi
AM_CONDITIONAL(BUILD_OGG123, test "x$build_ogg123" = xyes)
dnl --------------------------------------------------
dnl Check for library functions
dnl --------------------------------------------------
......
......@@ -2,15 +2,19 @@
AUTOMAKE_OPTIONS = foreign
mans = ogg123.1
docs = ogg123rc-example
if BUILD_OGG123
datadir = @datadir@
localedir = $(datadir)/locale
DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
bin_PROGRAMS = ogg123
docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION)
doc_DATA = ogg123rc-example
mandir = @MANDIR@
man_MANS = ogg123.1
INCLUDES = @OGG_CFLAGS@ @VORBIS_CFLAGS@ @AO_CFLAGS@ @CURL_CFLAGS@ \
@PTHREAD_CFLAGS@ @SHARE_CFLAGS@ @I18N_CFLAGS@
......@@ -20,14 +24,22 @@ ogg123_LDADD = @VORBISFILE_LIBS@ @VORBIS_LIBS@ @OGG_LIBS@ @AO_LIBS@ \
@PTHREAD_LIBS@ @I18N_LIBS@
ogg123_DEPENDENCIES = @SHARE_LIBS@
ogg123_SOURCES = audio.c buffer.c callbacks.c \
cfgfile_options.c cmdline_options.c \
file_transport.c format.c http_transport.c \
ogg123.c oggvorbis_format.c status.c transport.c \
audio.h buffer.h callbacks.h compat.h \
cfgfile_options.h cmdline_options.h \
format.h ogg123.h status.h transport.h
EXTRA_DIST = $(man_MANS) $(doc_DATA)
cfgfile_options.c cmdline_options.c \
file_transport.c format.c http_transport.c \
ogg123.c oggvorbis_format.c status.c transport.c \
audio.h buffer.h callbacks.h compat.h \
cfgfile_options.h cmdline_options.h \
format.h ogg123.h status.h transport.h
man_MANS = $(mans)
doc_DATA = $(docs)
else
endif
EXTRA_DIST = $(mans) $(docs)
debug:
$(MAKE) all CFLAGS="@DEBUG@"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment