[xiph-commits] r16455 - in trunk/theora: . examples

giles at svn.xiph.org giles at svn.xiph.org
Fri Aug 7 15:33:53 PDT 2009


Author: giles
Date: 2009-08-07 15:33:53 -0700 (Fri, 07 Aug 2009)
New Revision: 16455

Modified:
   trunk/theora/configure.ac
   trunk/theora/examples/Makefile.am
Log:
Generalize the structure of the OpenBSD checks a bit.

We add -lcompat to everything, but only if it's needed for ftime(). This 
moves clutter from Makefile.am to the already messy build lines.

We still add -lossaudio iff the target is OpenBSD, but we call it 
OSS_LIBS instead of OBSD_OSSAUDIO which is both shorter and more
generic should other systems need something in the future.


Modified: trunk/theora/configure.ac
===================================================================
--- trunk/theora/configure.ac	2009-08-07 22:23:28 UTC (rev 16454)
+++ trunk/theora/configure.ac	2009-08-07 22:33:53 UTC (rev 16455)
@@ -320,7 +320,6 @@
 
 dnl check for OSS
 HAVE_OSS=no
-
 AC_CHECK_HEADERS([sys/soundcard.h soundcard.h machine/soundcard.h],[
   HAVE_OSS=yes
   break
@@ -329,6 +328,15 @@
   AC_MSG_WARN([OSS audio support not found -- not compiling player_example])
 fi
 
+dnl OpenBSD needs -lossaudio to use the oss interface
+OSS_LIBS=
+case "$target_os" in
+  openbsd*)
+    OSS_LIBS='-lossaudio'
+    ;;
+esac
+AC_SUBST(OSS_LIBS)
+
 dnl check for libpng
 HAVE_PNG=no
 if test "x$HAVE_PKG_CONFIG" = "xyes"
@@ -344,16 +352,6 @@
     [  --enable-telemetry      enable debugging output controls ],
     [ ac_enable_telemetry=$enableval ], [ ac_enable_telemetry=no] )
 
-dnl OpenBSD needs some extra flags for examples to build
-case "$target_os" in
-  openbsd*)
-    OBSD_COMPAT='-lcompat'
-    OBSD_OSSAUDIO='-lossaudio'
-    ;;
-esac
-AC_SUBST(OBSD_COMPAT)
-AC_SUBST(OBSD_OSSAUDIO)
-
 if test "x${ac_enable_telemetry}" = xyes; then
    if test "x$HAVE_PKG_CONFIG" = "xyes"
    then
@@ -427,6 +425,9 @@
 dnl Check for library functions
 dnl --------------------------------------------------
 
+dnl OpenBSD needs -lcompat for ftime() used by dump_video.c
+AC_SEARCH_LIBS([ftime], [compat])
+
 dnl substitute the included getopt if the system doesn't support long options
 AC_CHECK_FUNC(getopt_long,
               [GETOPT_OBJS=''],

Modified: trunk/theora/examples/Makefile.am
===================================================================
--- trunk/theora/examples/Makefile.am	2009-08-07 22:23:28 UTC (rev 16454)
+++ trunk/theora/examples/Makefile.am	2009-08-07 22:33:53 UTC (rev 16455)
@@ -14,7 +14,7 @@
 
 dump_video_SOURCES = dump_video.c
 EXTRA_dump_video_SOURCES = getopt.c getopt1.c getopt.h
-dump_video_LDADD = $(GETOPT_OBJS) $(LDADDDEC) $(OBSD_COMPAT)
+dump_video_LDADD = $(GETOPT_OBJS) $(LDADDDEC)
 
 dump_psnr_SOURCES = dump_psnr.c
 EXTRA_dump_psnr_SOURCES = getopt.c getopt1.c getopt.h
@@ -22,7 +22,7 @@
 
 player_example_SOURCES = player_example.c
 player_example_CFLAGS = $(SDL_CFLAGS) $(OGG_CFLAGS) $(VORBIS_CFLAGS)
-player_example_LDADD = $(LDADDDEC) $(SDL_LIBS) $(VORBIS_LIBS) $(OBSD_OSSAUDIO)
+player_example_LDADD = $(LDADDDEC) $(SDL_LIBS) $(VORBIS_LIBS) $(OSS_LIBS)
 
 encoder_example_SOURCES = encoder_example.c
 EXTRA_encoder_example_SOURCES = getopt.c getopt1.c getopt.h



More information about the commits mailing list