[xiph-cvs] cvs commit: vorbis-tools/ogg123 Makefile.am
Stan Seibert
volsung at xiph.org
Tue Jul 2 08:33:25 PDT 2002
volsung 02/07/02 08:33:25
Modified: . configure.in
ogg123 Makefile.am
Log:
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.
Revision Changes Path
1.40 +24 -8 vorbis-tools/configure.in
Index: configure.in
===================================================================
RCS file: /usr/local/cvsroot/vorbis-tools/configure.in,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -r1.39 -r1.40
--- configure.in 2002/07/02 13:38:42 1.39
+++ configure.in 2002/07/02 15:33:24 1.40
@@ -78,26 +78,42 @@
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 --------------------------------------------------
<p><p>1.22 +21 -9 vorbis-tools/ogg123/Makefile.am
Index: Makefile.am
===================================================================
RCS file: /usr/local/cvsroot/vorbis-tools/ogg123/Makefile.am,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- Makefile.am 2002/01/26 11:06:37 1.21
+++ Makefile.am 2002/07/02 15:33:24 1.22
@@ -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 @@
@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
+ 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)
-EXTRA_DIST = $(man_MANS) $(doc_DATA)
debug:
$(MAKE) all CFLAGS="@DEBUG@"
<p><p><p>--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the commits
mailing list