From: Thomas Vander Stichele Date: Sat, 15 Oct 2005 09:28:59 +0000 (+0000) Subject: m4/gst-arch.m4: indent a little add AC_REQUIRE X-Git-Tag: RELEASE-0_9_4~17 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a068fb101fd1fe5bcebc5e84bc12c6a3c58390fd;p=platform%2Fupstream%2Fgst-common.git m4/gst-arch.m4: indent a little add AC_REQUIRE Original commit message from CVS: * m4/gst-arch.m4: indent a little add AC_REQUIRE * m4/gst-error.m4: clean up --- diff --git a/ChangeLog b/ChangeLog index 8fdbff8..49face3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2005-10-15 Thomas Vander Stichele + + * m4/gst-arch.m4: + indent a little + add AC_REQUIRE + * m4/gst-error.m4: + clean up + 2005-10-12 Thomas Vander Stichele * gst-autogen.sh: diff --git a/m4/gst-arch.m4 b/m4/gst-arch.m4 index 360aed3..d446c87 100644 --- a/m4/gst-arch.m4 +++ b/m4/gst-arch.m4 @@ -1,67 +1,74 @@ -AC_DEFUN([GST_ARCH], [ -dnl Set up conditionals for (target) architecture: -dnl ============================================== +dnl GST_ARCH +dnl sets up defines and automake conditionals for host architecture +dnl checks endianness -dnl Determine CPU -case "x${target_cpu}" in - xi?86 | xk? | xi?86_64) HAVE_CPU_I386=yes - AC_DEFINE(HAVE_CPU_I386, 1, [Define if the target CPU is an -x86]) - dnl FIXME could use some better detection - dnl (ie CPUID) - case "x${target_cpu}" in - xi386 | xi486) ;; - *) AC_DEFINE(HAVE_RDTSC, 1, [Define if RDTSC is available]) ;; - esac ;; - xpowerpc*) HAVE_CPU_PPC=yes - AC_DEFINE(HAVE_CPU_PPC, 1, [Define if the target CPU is a -PowerPC]) ;; - xalpha*) HAVE_CPU_ALPHA=yes - AC_DEFINE(HAVE_CPU_ALPHA, 1, [Define if the target CPU is an -Alpha]) ;; - xarm*) HAVE_CPU_ARM=yes - AC_DEFINE(HAVE_CPU_ARM, 1, [Define if the target CPU is an -ARM]) ;; - xsparc*) HAVE_CPU_SPARC=yes - AC_DEFINE(HAVE_CPU_SPARC, 1, [Define if the target CPU is a -SPARC]) ;; - xmips*) HAVE_CPU_MIPS=yes - AC_DEFINE(HAVE_CPU_MIPS, 1, [Define if the target CPU is a -MIPS]) ;; - xhppa*) HAVE_CPU_HPPA=yes - AC_DEFINE(HAVE_CPU_HPPA, 1, [Define if the target CPU is a -HPPA]) ;; - xs390*) HAVE_CPU_S390=yes - AC_DEFINE(HAVE_CPU_S390, 1, [Define if the target CPU is a -S390]) ;; - xia64*) HAVE_CPU_IA64=yes - AC_DEFINE(HAVE_CPU_IA64, 1, [Define if the target CPU is a -IA64]) ;; - xm68k*) HAVE_CPU_M68K=yes - AC_DEFINE(HAVE_CPU_M68K, 1, [Define if the target CPU is a -M68K]) ;; - xx86_64) HAVE_CPU_X86_64=yes - AC_DEFINE(HAVE_CPU_X86_64, 1, [Define if the target CPU is a -x86_64]) ;; -esac +AC_DEFUN([GST_ARCH], +[ + AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use host_ variables -dnl Determine endianness -AC_C_BIGENDIAN - -AM_CONDITIONAL(HAVE_CPU_I386, test "x$HAVE_CPU_I386" = "xyes") -AM_CONDITIONAL(HAVE_CPU_PPC, test "x$HAVE_CPU_PPC" = "xyes") -AM_CONDITIONAL(HAVE_CPU_ALPHA, test "x$HAVE_CPU_ALPHA" = "xyes") -AM_CONDITIONAL(HAVE_CPU_ARM, test "x$HAVE_CPU_ARM" = "xyes") -AM_CONDITIONAL(HAVE_CPU_SPARC, test "x$HAVE_CPU_SPARC" = "xyes") -AM_CONDITIONAL(HAVE_CPU_HPPA, test "x$HAVE_CPU_HPPA" = "xyes") -AM_CONDITIONAL(HAVE_CPU_MIPS, test "x$HAVE_CPU_MIPS" = "xyes") -AM_CONDITIONAL(HAVE_CPU_S390, test "x$HAVE_CPU_S390" = "xyes") -AM_CONDITIONAL(HAVE_CPU_IA64, test "x$HAVE_CPU_IA64" = "xyes") -AM_CONDITIONAL(HAVE_CPU_M68K, test "x$HAVE_CPU_M68K" = "xyes") -AM_CONDITIONAL(HAVE_CPU_X86_64, test "x$HAVE_CPU_X86_64" = "xyes") + dnl Determine CPU + case "x${host_cpu}" in + xi?86 | xk? | xi?86_64) + HAVE_CPU_I386=yes + AC_DEFINE(HAVE_CPU_I386, 1, [Define if the host CPU is an x86]) + + dnl FIXME could use some better detection + dnl (ie CPUID) + case "x${host_cpu}" in + xi386 | xi486) ;; + *) + AC_DEFINE(HAVE_RDTSC, 1, [Define if RDTSC is available]) ;; + esac ;; + xpowerpc*) + HAVE_CPU_PPC=yes + AC_DEFINE(HAVE_CPU_PPC, 1, [Define if the host CPU is a PowerPC]) ;; + xalpha*) + HAVE_CPU_ALPHA=yes + AC_DEFINE(HAVE_CPU_ALPHA, 1, [Define if the host CPU is an Alpha]) ;; + xarm*) + HAVE_CPU_ARM=yes + AC_DEFINE(HAVE_CPU_ARM, 1, [Define if the host CPU is an ARM]) ;; + xsparc*) + HAVE_CPU_SPARC=yes + AC_DEFINE(HAVE_CPU_SPARC, 1, [Define if the host CPU is a SPARC]) ;; + xmips*) + HAVE_CPU_MIPS=yes + AC_DEFINE(HAVE_CPU_MIPS, 1, [Define if the host CPU is a MIPS]) ;; + xhppa*) + HAVE_CPU_HPPA=yes + AC_DEFINE(HAVE_CPU_HPPA, 1, [Define if the host CPU is a HPPA]) ;; + xs390*) + HAVE_CPU_S390=yes + AC_DEFINE(HAVE_CPU_S390, 1, [Define if the host CPU is a S390]) ;; + xia64*) + HAVE_CPU_IA64=yes + AC_DEFINE(HAVE_CPU_IA64, 1, [Define if the host CPU is a IA64]) ;; + xm68k*) + HAVE_CPU_M68K=yes + AC_DEFINE(HAVE_CPU_M68K, 1, [Define if the host CPU is a M68K]) ;; + xx86_64) + HAVE_CPU_X86_64=yes + AC_DEFINE(HAVE_CPU_X86_64, 1, [Define if the host CPU is a x86_64]) ;; + esac + + dnl Determine endianness + AC_C_BIGENDIAN + + AM_CONDITIONAL(HAVE_CPU_I386, test "x$HAVE_CPU_I386" = "xyes") + AM_CONDITIONAL(HAVE_CPU_PPC, test "x$HAVE_CPU_PPC" = "xyes") + AM_CONDITIONAL(HAVE_CPU_ALPHA, test "x$HAVE_CPU_ALPHA" = "xyes") + AM_CONDITIONAL(HAVE_CPU_ARM, test "x$HAVE_CPU_ARM" = "xyes") + AM_CONDITIONAL(HAVE_CPU_SPARC, test "x$HAVE_CPU_SPARC" = "xyes") + AM_CONDITIONAL(HAVE_CPU_HPPA, test "x$HAVE_CPU_HPPA" = "xyes") + AM_CONDITIONAL(HAVE_CPU_MIPS, test "x$HAVE_CPU_MIPS" = "xyes") + AM_CONDITIONAL(HAVE_CPU_S390, test "x$HAVE_CPU_S390" = "xyes") + AM_CONDITIONAL(HAVE_CPU_IA64, test "x$HAVE_CPU_IA64" = "xyes") + AM_CONDITIONAL(HAVE_CPU_M68K, test "x$HAVE_CPU_M68K" = "xyes") + AM_CONDITIONAL(HAVE_CPU_X86_64, test "x$HAVE_CPU_X86_64" = "xyes") ]) +dnl check if unaligned memory access works correctly AC_DEFUN([GST_UNALIGNED_ACCESS], [ AC_MSG_CHECKING([if unaligned memory access works correctly]) if test x"$as_cv_unaligned_access" = x ; then @@ -100,4 +107,3 @@ int main(int argc, char **argv) [defined if unaligned memory access works correctly]) fi ]) - diff --git a/m4/gst-error.m4 b/m4/gst-error.m4 index 509202e..c614921 100644 --- a/m4/gst-error.m4 +++ b/m4/gst-error.m4 @@ -16,19 +16,21 @@ dnl These flags can be overridden at make time: dnl make ERROR_CFLAGS= AC_DEFUN([GST_SET_ERROR_CFLAGS], -[AC_REQUIRE([AS_COMPILER_FLAG])dnl - -dnl if we support -Wall, set it unconditionally -AS_COMPILER_FLAG(-Wall, - ERROR_CFLAGS="-Wall", - ERROR_CFLAGS="") - -dnl if we're in nano >= 1, add -Werror if supported -if test "x$1" != "xno" -then - AS_COMPILER_FLAG(-Werror, ERROR_CFLAGS="$ERROR_CFLAGS -Werror") -fi - -AC_SUBST(ERROR_CFLAGS) -AC_MSG_NOTICE([set ERROR_CFLAGS to $ERROR_CFLAGS]) +[ + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([AS_COMPILER_FLAG]) + + dnl if we support -Wall, set it unconditionally + AS_COMPILER_FLAG(-Wall, + ERROR_CFLAGS="-Wall", + ERROR_CFLAGS="") + + dnl if asked for, add -Werror if supported + if test "x$1" != "xno" + then + AS_COMPILER_FLAG(-Werror, ERROR_CFLAGS="$ERROR_CFLAGS -Werror") + fi + + AC_SUBST(ERROR_CFLAGS) + AC_MSG_NOTICE([set ERROR_CFLAGS to $ERROR_CFLAGS]) ])