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

thomasvs at motherfish-iii.xiph.org thomasvs at motherfish-iii.xiph.org
Fri Sep 24 10:18:53 PDT 2004


Author: thomasvs
Date: 2004-09-24 10:18:53 -0700 (Fri, 24 Sep 2004)
New Revision: 7846

Modified:
   trunk/theora/configure.ac
   trunk/theora/examples/Makefile.am
   trunk/theora/lib/Makefile.am
Log:
* don't clobber CFLAGS and LIBS
* add check for VORBIS
* use correct _CFLAGS and _LIBS vars



Modified: trunk/theora/configure.ac
===================================================================
--- trunk/theora/configure.ac	2004-09-24 16:56:30 UTC (rev 7845)
+++ trunk/theora/configure.ac	2004-09-24 17:18:53 UTC (rev 7846)
@@ -123,17 +123,25 @@
 AC_CHECK_FUNC(getopt_long, [GETOPT_OBJS=''], [GETOPT_OBJS='getopt.$(OBJEXT) getopt1.$(OBJEXT)'])
 AC_SUBST(GETOPT_OBJS)
 
+
 XIPH_PATH_OGG(, AC_MSG_ERROR([
     libogg is required to build this package!
     please see http://www.xiph.org/ for how to
     obtain a copy.
 ]))
+cflags_save=$CFLAGS
+libs_save=$LIBS
 CFLAGS="$CFLAGS $OGG_CFLAGS"
 LIBS="$LIBS $OGG_LIBS"
 AC_CHECK_FUNC(oggpackB_read, , [
   AC_MSG_ERROR([newer libogg version (>1.0) required])
 ])
+CFLAGS=$cflags_save
+LIBS=$libs_save
 
+dnl the examples use Vorbis and SDL
+XIPH_PATH_VORBIS(HAVE_VORBIS=yes, HAVE_VORBIS=no)
+
 AM_PATH_SDL(,[
 	HAVE_SDL=yes
 	SDL_LIBS=`$SDL_CONFIG --libs`
@@ -153,9 +161,6 @@
 dnl Do substitutions
 dnl --------------------------------------------------
 
-LIBS="$LIBS"
-
-AC_SUBST(LIBS)
 AC_SUBST(DEBUG)
 AC_SUBST(PROFILE)
 

Modified: trunk/theora/examples/Makefile.am
===================================================================
--- trunk/theora/examples/Makefile.am	2004-09-24 16:56:30 UTC (rev 7845)
+++ trunk/theora/examples/Makefile.am	2004-09-24 17:18:53 UTC (rev 7846)
@@ -7,18 +7,18 @@
 # possible contents of BUILDABLE_EXAMPLES:
 EXTRA_PROGRAMS = player_example encoder_example
 
-AM_CFLAGS = $(SDL_CFLAGS)
-LDADD = ../lib/libtheora.la -logg 
+AM_CFLAGS = $(SDL_CFLAGS) $(OGG_CFLAGS)
+LDADD = ../lib/libtheora.la $(OGG_LIBS)
 
 dump_video_SOURCES = dump_video.c
 dump_video_LDADD = $(LDADD)
 
 player_example_SOURCES = player_example.c
-player_example_LDADD = $(LDADD) $(SDL_LIBS) -lvorbis -lm
+player_example_LDADD = $(LDADD) $(SDL_LIBS) $(VORBIS_LIBS)
 
 encoder_example_SOURCES = encoder_example.c
 EXTRA_encoder_example_SOURCES = getopt.c getopt1.c getopt.h
-encoder_example_LDADD = $(GETOPT_OBJS) $(LDADD) -lvorbisenc -lvorbis -lm
+encoder_example_LDADD = $(GETOPT_OBJS) $(LDADD) $(VORBIS_LIBS) $(VORBISENC_LIBS)
 encoder_example_DEPENDENCIES = $(GETOPT_OBJS)
 
 debug:

Modified: trunk/theora/lib/Makefile.am
===================================================================
--- trunk/theora/lib/Makefile.am	2004-09-24 16:56:30 UTC (rev 7845)
+++ trunk/theora/lib/Makefile.am	2004-09-24 17:18:53 UTC (rev 7846)
@@ -39,7 +39,9 @@
 	toplevel.h \
 	toplevel_lookup.h
 
+libtheora_la_CFLAGS = $(OGG_CFLAGS)
 libtheora_la_LDFLAGS = -version-info @V_LIB_CURRENT@:@V_LIB_REVISION@:@V_LIB_AGE@
+libtheora_la_LIBS = $(OGG_LIBS)
 
 debug:
 	$(MAKE) all CFLAGS="@DEBUG@" LDFLAGS="-lefence"	



More information about the commits mailing list