[xiph-cvs] cvs commit: theora/examples Makefile.am
Ralph Giles
giles at xiph.org
Thu Jun 12 04:06:16 PDT 2003
giles 03/06/12 07:06:16
Modified: . configure.in
examples Makefile.am
Log:
Detect support for OSS in the configure script by looking for
soundcard.h, and disable building player_example if it isn't found.
Also switch to configure substition in _PROGRAMS for enabling optional
targets. Given the limitations of automake conditionals, it's
better to do the logic in configure now that our players have
multiple dependencies to check.
Revision Changes Path
1.8 +14 -4 theora/configure.in
Index: configure.in
===================================================================
RCS file: /usr/local/cvsroot/theora/configure.in,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- configure.in 10 Jun 2003 11:11:09 -0000 1.7
+++ configure.in 12 Jun 2003 11:06:16 -0000 1.8
@@ -90,10 +90,13 @@
AM_PATH_SDL(,[
HAVE_SDL=yes
SDL_LIBS=`$SDL_CONFIG --static-libs`
-],AC_MSG_WARN([*** Unable to find SDL -- Not compiling player_example ***]))
-AM_CONDITIONAL(HAVE_SDL, test "$HAVE_SDL" = "yes")
+],AC_MSG_WARN([*** Unable to find SDL -- Not compiling example players ***]))
+
+AC_CHECK_HEADERS([sys/soundcard.h soundcard.h machine/soundcard.h],[
+ HAVE_OSS=yes
+ break
+])
-HAVE_PORTAUDIO=no
AC_CHECK_LIB(portaudio, Pa_OpenStream, [
AC_CHECK_HEADER(portaudio.h, [HAVE_PORTAUDIO=yes])
],,[-lpthread]
@@ -101,7 +104,14 @@
if test "$HAVE_PORTAUDIO" = "no"; then
AC_MSG_WARN([portaudio not found -- not compiling splayer example])
fi
-AM_CONDITIONAL(HAVE_PORTAUDIO, test "$HAVE_PORTAUDIO" = "yes")
+
+if test x$HAVE_SDL = xyes -a x$HAVE_OSS = xyes; then
+ BUILDABLE_EXAMPLES="$BUILDABLE_EXAMPLES player_example"
+fi
+if test x$HAVE_SDL = xyes -a x$HAVE_PORTAUDIO = xyes; then
+ BUILDABLE_EXAMPLES="$BUILDABLE_EXAMPLES splayer"
+fi
+AC_SUBST(BUILDABLE_EXAMPLES)
dnl --------------------------------------------------
dnl Do substitutions
<p><p>1.12 +3 -12 theora/examples/Makefile.am
Index: Makefile.am
===================================================================
RCS file: /usr/local/cvsroot/theora/examples/Makefile.am,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- Makefile.am 12 Jun 2003 10:39:38 -0000 1.11
+++ Makefile.am 12 Jun 2003 11:06:16 -0000 1.12
@@ -4,19 +4,10 @@
INCLUDES = -I$(top_srcdir)/include
-if HAVE_SDL
-player_example = player_example
-else
-player_example =
-endif
+noinst_PROGRAMS = encoder_example dump_video $(BUILDABLE_EXAMPLES)
-if HAVE_PORTAUDIO
-splayer = splayer
-else
-splayer =
-endif
-
-noinst_PROGRAMS = encoder_example dump_video $(player_example) $(splayer)
+# possible contents of BUILDABLE_EXAMPLES:
+EXTRA_PROGRAMS = player_example splayer
CFLAGS = $(SDL_CFLAGS)
LDFLAGS = -all-static
<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