AM_MAINTAINER_MODE
-AC_PROG_CC
-AM_PROG_CC_STDC
dnl you need automake 1.5 for AM_PROG_AS to work !
+dnl we moved AM_PROG_AS up before CC, maybe that helps the substition ?
AM_PROG_AS
-dnl there's something wrong with AS being set to CC, so we set it explicitly
-AS=gcc
-AC_SUBST(AS)
-
+AC_PROG_CC
+AM_PROG_CC_STDC
AC_PROG_CXX
AC_PROG_CXXCPP
AC_ISC_POSIX