From 3bcccbf82e61b0beba3e15ea9e728c2c3b494437 Mon Sep 17 00:00:00 2001 From: Richard Boulton Date: Thu, 21 Sep 2000 01:34:34 +0000 Subject: [PATCH] Make libs/idct only build mmx support if available - hopefully makes it compile on PPC. Original commit message from CVS: Make libs/idct only build mmx support if available - hopefully makes it compile on PPC. --- gst/Makefile.am | 7 +++---- libs/Makefile.am | 4 ++-- libs/idct/Makefile.am | 14 +++++++++++++- libs/idct/dct.h | 4 ++++ libs/idct/gstidct.c | 4 +++- 5 files changed, 25 insertions(+), 8 deletions(-) diff --git a/gst/Makefile.am b/gst/Makefile.am index f0ab1228a1..e21c0404ed 100644 --- a/gst/Makefile.am +++ b/gst/Makefile.am @@ -11,12 +11,11 @@ GSTOBJECT_INCLUDES = \ if HAVE_CPU_I386 GSTARCH_SRCS = gstcpuid_i386.s else -if HAVE_CPU_PPC -GSTARCH_SRCS = -else GSTARCH_SRCS = endif -endif + +EXTRA_libgst_la_SOURCES = \ + gstcpuid_i386.s libgst_la_SOURCES = \ gst.c \ diff --git a/libs/Makefile.am b/libs/Makefile.am index 77fae5f1b8..b77eea6fc8 100644 --- a/libs/Makefile.am +++ b/libs/Makefile.am @@ -1,9 +1,9 @@ if HAVE_CPU_I386 -GSTARCH_SUBDS = videoscale winloader idct +GSTARCH_SUBDS = videoscale winloader else GSTARCH_SUBDS = endif -SUBDIRS = riff colorspace getbits putbits $(GSTARCH_SUBDS) +SUBDIRS = riff colorspace getbits putbits idct $(GSTARCH_SUBDS) DIST_SUBDIRS = riff colorspace getbits putbits videoscale winloader idct diff --git a/libs/idct/Makefile.am b/libs/idct/Makefile.am index 9a97325f6a..7f45549eb5 100644 --- a/libs/idct/Makefile.am +++ b/libs/idct/Makefile.am @@ -1,8 +1,20 @@ + +if HAVE_LIBMMX +GSTIDCTARCH_SRCS = mmxidct.S mmx32idct.c +else +GSTIDCTARCH_SRCS = +endif + filterdir = $(libdir)/gst filter_LTLIBRARIES = libgstidct.la -libgstidct_la_SOURCES = fastintidct.c floatidct.c gstidct.c intidct.c mmxidct.S mmx32idct.c +libgstidct_la_SOURCES = \ + fastintidct.c \ + floatidct.c \ + gstidct.c \ + intidct.c \ + $(GSTIDCTARCH_SRCS) libgstidctincludedir = $(includedir)/gst/libs/gstidct libgstidctinclude_HEADERS = gstidct.h diff --git a/libs/idct/dct.h b/libs/idct/dct.h index dddad743a9..71811a11e0 100644 --- a/libs/idct/dct.h +++ b/libs/idct/dct.h @@ -1,5 +1,7 @@ /* define DCT types */ +#include "config.h" + /* * DCTSIZE underlying (1d) transform size * DCTSIZE2 DCTSIZE squared @@ -21,8 +23,10 @@ extern void gst_idct_int_idct(); extern void gst_idct_init_fast_int_idct (void); extern void gst_idct_fast_int_idct (short *block); +#ifdef HAVE_LIBMMX extern void gst_idct_mmx_idct (short *block); extern void gst_idct_mmx32_idct (short *block); +#endif /* HAVE_LIBMMX */ extern void gst_idct_init_float_idct(void); extern void gst_idct_float_idct (short *block); diff --git a/libs/idct/gstidct.c b/libs/idct/gstidct.c index 4b1807993a..701df771e8 100644 --- a/libs/idct/gstidct.c +++ b/libs/idct/gstidct.c @@ -38,7 +38,7 @@ GstIDCT *gst_idct_new(GstIDCTMethod method) method = GST_IDCT_MMX; } else -#endif +#endif /* HAVE_LIBMMX */ { method = GST_IDCT_FAST_INT; } @@ -61,6 +61,7 @@ GstIDCT *gst_idct_new(GstIDCTMethod method) gst_idct_init_float_idct(); new->convert = gst_idct_float_idct; break; +#ifdef HAVE_LIBMMX case GST_IDCT_MMX: g_print("GstIDCT: using MMX_idct\n"); new->convert = gst_idct_mmx_idct; @@ -71,6 +72,7 @@ GstIDCT *gst_idct_new(GstIDCTMethod method) new->convert = gst_idct_mmx32_idct; new->need_transpose = TRUE; break; +#endif /* HAVE_LIBMMX */ default: g_print("GstIDCT: method not supported\n"); g_free(new);