Move first_prereq test to m4 code.
[ira/wip.git] / source / build / m4 / check_make.m4
index faae1791881b66ec8c0096fcf0e19c5e6585a585..d7799649a7fd0c5e971e83e66831b97b59823ce7 100644 (file)
@@ -41,8 +41,16 @@ automatic_dependencies=no
 AX_CFLAGS_GCC_OPTION([-M -MT conftest.d -MF conftest.o], [], [ automatic_dependencies=$new_make ], [])
 AC_MSG_CHECKING([Whether to use automatic dependencies])
 AC_ARG_ENABLE(automatic-dependencies,
-[ --enable-automatic-dependencies                      Enable automatic dependencies],
+[  --enable-automatic-dependencies Enable automatic dependencies],
 [ automatic_dependencies=$enableval ], 
 [ automatic_dependencies=no ])
 AC_MSG_RESULT($automatic_dependencies)
 AC_SUBST(automatic_dependencies)
+
+FIRST_PREREQ="\$*.c"
+AC_SUBST(FIRST_PREREQ)
+
+if test x$GNU_MAKE = xyes; then
+       FIRST_PREREQ="\$<"
+fi
+