svn commit: samba r22467 - in branches/SAMBA_3_0/source: .

gd at samba.org gd at samba.org
Sun Apr 22 21:17:50 GMT 2007


Author: gd
Date: 2007-04-22 21:17:49 +0000 (Sun, 22 Apr 2007)
New Revision: 22467

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22467

Log:
Adding configure check for -Werror-implicit-function-declaration and use it in
-enable-developer.

Guenther

Modified:
   branches/SAMBA_3_0/source/configure.in


Changeset:
Modified: branches/SAMBA_3_0/source/configure.in
===================================================================
--- branches/SAMBA_3_0/source/configure.in	2007-04-22 20:15:00 UTC (rev 22466)
+++ branches/SAMBA_3_0/source/configure.in	2007-04-22 21:17:49 UTC (rev 22467)
@@ -399,7 +399,7 @@
 AC_ARG_ENABLE(developer, [  --enable-developer      Turn on developer warnings and debugging (default=no)],
     [if eval "test x$enable_developer = xyes"; then
         developer=yes
-    	CFLAGS="${CFLAGS} -gstabs -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-align -Wwrite-strings -DDEBUG_PASSWORD -DDEVELOPER"
+    	DEVELOPER_CFLAGS="-gstabs -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-align -Wwrite-strings -DDEBUG_PASSWORD -DDEVELOPER"
 	# Add -Wdeclaration-after-statement if compiler supports it
 	AC_CACHE_CHECK(
           [that the C compiler understands -Wdeclaration-after-statement],
@@ -414,8 +414,25 @@
 	    samba_cv_HAVE_Wdeclaration_after_statement=cross)
        ])
        if test x"$samba_cv_HAVE_Wdeclaration_after_statement" = x"yes"; then
-	    CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
+	    DEVELOPER_CFLAGS="${DEVELOPER_CFLAGS} -Wdeclaration-after-statement"
        fi
+	# here
+	#-Werror-implicit-function-declaration
+	AC_CACHE_CHECK(
+          [that the C compiler understands -Werror-implicit-function-declaration],
+          samba_cv_HAVE_Werror_implicit_function_declaration, [
+	  AC_TRY_RUN_STRICT([
+	    int main(void)
+	    {
+	    	return 0;
+	    }],[-Werror-implicit-function-declaration],[$CPPFLAGS],[$LDFLAGS],
+	    samba_cv_HAVE_Werror_implicit_function_declaration=yes,
+	    samba_cv_HAVE_Werror_implicit_function_declaration=no,
+	    samba_cv_HAVE_Werror_implicit_function_declaration=cross)
+       ])
+       if test x"$samba_cv_HAVE_Werror_implicit_function_declaration" = x"yes"; then
+	    DEVELOPER_CFLAGS="${DEVELOPER_CFLAGS} -Werror-implicit-function-declaration"
+       fi
     fi])
 
 AC_ARG_ENABLE(krb5developer, [  --enable-krb5developer  Turn on developer warnings and debugging, except -Wstrict-prototypes (default=no)],
@@ -6287,6 +6304,11 @@
 	   AC_MSG_ERROR([summary failure. Aborting config]); exit 1;,
 	   AC_MSG_WARN([cannot run when cross-compiling]))
 
+dnl Merge in developer cflags from now on
+if test x"$developer" = x"yes"; then
+    CFLAGS="${CFLAGS} ${DEVELOPER_CFLAGS}"
+fi
+
 builddir=`pwd`
 AC_SUBST(builddir)
 



More information about the samba-cvs mailing list