From 968b5acaa15eb27875413e37a65fac2173562d9a Mon Sep 17 00:00:00 2001 From: Richard Boulton Date: Fri, 15 Sep 2000 23:04:31 +0000 Subject: [PATCH] Fix on x86 architectures - was just checking for 386, D'oh. Original commit message from CVS: Fix on x86 architectures - was just checking for 386, D'oh. Fix autogen to run autoheader _before_ autoconf, since it generates a required file (config.h.in, which I just removed from CVS since its an autogenerated one). Also fix messed up variables in gst/Makefile.am --- .gitignore | 1 + autogen.sh | 2 +- configure.in | 2 +- gst/Makefile.am | 3 +-- gst/gstarch.h | 12 ++++++++---- gst/gsti386.h | 3 --- 6 files changed, 12 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index 52b9d01eb9..320b264a34 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ aclocal.m4 config.cache config.guess config.h +config.h.in config.log config.status config.sub diff --git a/autogen.sh b/autogen.sh index 1e0e7be7f7..6898683488 100755 --- a/autogen.sh +++ b/autogen.sh @@ -46,8 +46,8 @@ fi libtoolize --copy --force aclocal $ACLOCAL_FLAGS automake --add-missing -autoconf autoheader +autoconf if [ "x$1" = "x--autogen-recurse" ];then exit # the rest will happen later diff --git a/configure.in b/configure.in index 40d4ec3a43..feaf904007 100644 --- a/configure.in +++ b/configure.in @@ -48,7 +48,7 @@ dnl Set up conditionals for (target) host type: dnl =========================================== case "x${target_cpu}" in - xi386) HAVE_CPU_I386=yes ; + xi?86) HAVE_CPU_I386=yes ; AC_DEFINE(HAVE_CPU_I386) ;; xpowerpc) HAVE_CPU_PPC=yes ; AC_DEFINE(HAVE_CPU_PPC) ;; diff --git a/gst/Makefile.am b/gst/Makefile.am index 454324844c..f10fbe85f4 100644 --- a/gst/Makefile.am +++ b/gst/Makefile.am @@ -26,8 +26,7 @@ libgst_la_SOURCES = \ gstbufferpool.c \ gstclock.c \ gstcpu.c \ - $(GSTI386_SRCS) \ - $(GSTPPC_SRCS) \ + $(GSTARCH_SRCS) \ gstelement.c \ gstelementfactory.c \ gstbin.c \ diff --git a/gst/gstarch.h b/gst/gstarch.h index 0e1ae82e03..14dc1b542b 100644 --- a/gst/gstarch.h +++ b/gst/gstarch.h @@ -1,12 +1,16 @@ #ifndef GST_HGUARD_GSTARCH_H #define GST_HGUARD_GSTARCH_H -#ifdef __I386__ -#include "gsti386.h" -#endif +#include "config.h" -#ifdef __PPC__ +#ifdef HAVE_CPU_I386 +#include "gsti386.h" +#else +#ifdef HAVE_CPU_PPC #include "gstppc.h" +#else +#warn Need to know about this architecture, or have a generic implementation +#endif #endif #endif /* GST_HGUARD_GSTARCH_H */ diff --git a/gst/gsti386.h b/gst/gsti386.h index 485ff58ba9..beab1aeaf7 100644 --- a/gst/gsti386.h +++ b/gst/gsti386.h @@ -1,9 +1,6 @@ #ifndef GST_HGUARD_GSTI386_H #define GST_HGUARD_GSTI386_H -/* Hmm - does this work, or do the braces cause other stack manipulation? - * XXX - */ #define GET_SP(target) \ __asm__("movl %%esp, %0" : "=m"(target) : : "esp", "ebp");