Only link libcompat with dump_video.
authorTim Terriberry <tterribe@xiph.org>
Fri, 20 May 2011 21:04:42 +0000 (21:04 +0000)
committerTim Terriberry <tterribe@xiph.org>
Fri, 20 May 2011 21:04:42 +0000 (21:04 +0000)
It's the only example that needs it.
Patch by 0brad0.
Fixes #1587.

svn path=/trunk/theora/; revision=17993

configure.ac
examples/Makefile.am

index 8b043d5..180b0f1 100644 (file)
@@ -549,7 +549,8 @@ dnl Check for library functions
 dnl --------------------------------------------------
 
 dnl OpenBSD needs -lcompat for ftime() used by dump_video.c
-AC_SEARCH_LIBS([ftime], [compat])
+AC_CHECK_LIB([compat], [ftime], [COMPAT_LIBS='-lcompat'])
+AC_SUBST(COMPAT_LIBS)
 
 dnl substitute the included getopt if the system doesn't support long options
 AC_CHECK_FUNC(getopt_long,
index c0f99c8..b9e598e 100644 (file)
@@ -15,7 +15,7 @@ LDADDENC = ../lib/libtheoraenc.la ../lib/libtheoradec.la $(OGG_LIBS)
 
 dump_video_SOURCES = dump_video.c
 EXTRA_dump_video_SOURCES = getopt.c getopt1.c getopt.h
-dump_video_LDADD = $(GETOPT_OBJS) $(LDADDDEC)
+dump_video_LDADD = $(GETOPT_OBJS) $(LDADDDEC) $(COMPAT_LIBS)
 
 dump_psnr_SOURCES = dump_psnr.c
 EXTRA_dump_psnr_SOURCES = getopt.c getopt1.c getopt.h