r15224: Check whether -MT is actually supported by the compiler before using
authorJelmer Vernooij <jelmer@samba.org>
Mon, 24 Apr 2006 22:50:19 +0000 (22:50 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:04:20 +0000 (14:04 -0500)
automatic dependencies
(This used to be commit 6598efc6b302984d0b26b0c76a4b7107f5feba21)

source4/build/m4/check_cc.m4
source4/include/includes.h
source4/lib/replace/replace.h

index 99e6bd5d23701754394be9822e8017a06d35db89..6823237805aa99d2f6bee64a4702d880c22c7064 100644 (file)
@@ -216,11 +216,12 @@ if test "x$GNU_MAKE" = x"yes"; then
        AC_SUBST(GNU_MAKE_VERSION)
 fi
 
+
 automatic_dependencies=no
 AC_MSG_CHECKING([for GNU make >= 3.81])
 if test x$GNU_MAKE = x"yes"; then
        if $PERL -e " \$_ = '$GNU_MAKE_VERSION'; s/@<:@^\d\.@:>@.*//g; exit (\$_ < 3.81);"; then
-               automatic_dependencies=yes
+               AX_CXXFLAGS_GCC_OPTION(-MT, [], [automatic_dependencies=yes], [])
        fi
 fi
 AC_MSG_RESULT($automatic_dependencies)
index 77f0b02010240f4f34c01c09e0246285b3b2811a..6252a59c2f6ababad54f01dba539617f04eb8b10 100644 (file)
@@ -45,7 +45,7 @@
 #endif
 
 #ifndef PRINTF_ATTRIBUTE
-#if !defined(NO_PRINTF_ATTRIBUTE) && (__GNUC__ >= 3)
+#if __GNUC__ >= 3
 /** Use gcc attribute to check printf fns.  a1 is the 1-based index of
  * the parameter containing the format, and a2 the index of the first
  * argument. Note that some gcc 2.x versions don't handle this
index bc1be38de0580ae80eac5f0441f8d8f03b3cbf1c..9be365d4da19b7950f4d8bab5bbd17308588f4af 100644 (file)
@@ -109,7 +109,7 @@ int vasprintf(char **ptr, const char *format, va_list ap);
 #endif
 
 #ifndef PRINTF_ATTRIBUTE
-#if !defined(NO_PRINTF_ATTRIBUTE) && (__GNUC__ >= 3)
+#if __GNUC__ >= 3
 /** Use gcc attribute to check printf fns.  a1 is the 1-based index of
  * the parameter containing the format, and a2 the index of the first
  * argument. Note that some gcc 2.x versions don't handle this