]> www.ginac.de Git - cln.git/blobdiff - m4/cc.m4
build: switch to ordinary auto* tools system.
[cln.git] / m4 / cc.m4
index b1c001fa389756df58e6855be0d623027f125050..425e799172f336566467b0a3f05e739a9ced06bf 100644 (file)
--- a/m4/cc.m4
+++ b/m4/cc.m4
@@ -3,14 +3,15 @@ dnl to the C-compiler when acting on .s files. Appends that option to ASFLAGS.
 dnl This macro is adapted from one found in GLIBC-2.3.5.
 AC_DEFUN([CL_AS_NOEXECSTACK],[
 AC_REQUIRE([AC_PROG_CC])
+AC_REQUIRE([AM_PROG_AS])
 AC_CACHE_CHECK([whether --noexecstack is desirable for .s files], cl_cv_as_noexecstack, [dnl
   cat > conftest.c <<EOF
 void foo() {}
 EOF
-  if AC_TRY_COMMAND([${CC} $CFLAGS $CPPFLAGS
+  if AC_TRY_COMMAND([${CCAS} $CFLAGS $CPPFLAGS
                      -S -o conftest.s conftest.c >/dev/null]) \
      && grep -q .note.GNU-stack conftest.s \
-     && AC_TRY_COMMAND([${CC} $CFLAGS $CPPFLAGS -Wa,--noexecstack
+     && AC_TRY_COMMAND([${CCAS} $CFLAGS $CPPFLAGS -Wa,--noexecstack
                        -c -o conftest.o conftest.s >/dev/null])
   then
     cl_cv_as_noexecstack=yes
@@ -19,9 +20,8 @@ EOF
   fi
   rm -f conftest*])
   if test "$cl_cv_as_noexecstack" = yes; then
-    ASMFLAGS="$ASMFLAGS -Wa,--noexecstack"
+    CCASFLAGS="$CCASFLAGS -Wa,--noexecstack"
   fi
-  AC_SUBST(ASMFLAGS)
 ])
 
 
@@ -45,6 +45,6 @@ fi
 rm -f conftest*
 ])
 if test $cl_cv_have_attr_flatten = yes; then
-  AC_DEFINE(CL_HAVE_ATTRIBUTE_FLATTEN)
+  AC_DEFINE(CL_HAVE_ATTRIBUTE_FLATTEN, ,[Define if compiler supports __attribute__((flatten))])
 fi
 ])