1 dnl as-gcc-inline-assembly.m4 0.1.0
3 dnl autostars m4 macro for detection of gcc inline assembly
5 dnl David Schleef <ds@schleef.org>
9 dnl AS_COMPILER_FLAG(ACTION-IF-ACCEPTED, [ACTION-IF-NOT-ACCEPTED])
10 dnl Tries to compile with the given CFLAGS.
11 dnl Runs ACTION-IF-ACCEPTED if the compiler can compile with the flags,
12 dnl and ACTION-IF-NOT-ACCEPTED otherwise.
14 AC_DEFUN([AS_GCC_INLINE_ASSEMBLY],
16 AC_MSG_CHECKING([if compiler supports gcc-style inline assembly])
20 #if (__GNUC__ * 1000 + __GNUC_MINOR__) < 3004
21 #error GCC before 3.4 has critical bugs compiling inline assembly
24 __asm__ (""::) ], [flag_ok=yes], [flag_ok=no])
26 if test "X$flag_ok" = Xyes ; then
33 AC_MSG_RESULT([$flag_ok])
37 AC_DEFUN([AS_GCC_ASM_POWERPC_FPU],
39 AC_MSG_CHECKING([if compiler supports FPU instructions on PowerPC])
41 AC_TRY_COMPILE([], [__asm__ ("fadd 0,0,0"::) ], [flag_ok=yes], [flag_ok=no])
43 if test "X$flag_ok" = Xyes ; then
50 AC_MSG_RESULT([$flag_ok])