svn commit: samba r1943 - in branches/SAMBA_4_0/source: . build/m4 build/smb_build

metze at samba.org metze at samba.org
Fri Aug 20 06:52:32 GMT 2004


Author: metze
Date: 2004-08-20 06:52:31 +0000 (Fri, 20 Aug 2004)
New Revision: 1943

WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/branches/SAMBA_4_0/source&rev=1943&nolog=1

Log:
don't use the with --enable-*developer selected flags for
the configure tests.

and test if the compiler really understand the options,
and clear them when not

this means we can maybe use --enable-developer on the build farm now

metze

Modified:
   branches/SAMBA_4_0/source/build/m4/rewrite.m4
   branches/SAMBA_4_0/source/build/smb_build/check_cc.m4
   branches/SAMBA_4_0/source/build/smb_build/check_path.m4
   branches/SAMBA_4_0/source/configure.in


Changeset:
Modified: branches/SAMBA_4_0/source/build/m4/rewrite.m4
===================================================================
--- branches/SAMBA_4_0/source/build/m4/rewrite.m4	2004-08-20 04:21:49 UTC (rev 1942)
+++ branches/SAMBA_4_0/source/build/m4/rewrite.m4	2004-08-20 06:52:31 UTC (rev 1943)
@@ -999,11 +999,6 @@
     AC_DEFINE(HAVE_IRIX_SPECIFIC_CAPABILITIES,1,[Whether IRIX specific capabilities are available])
 fi
 
-AC_MSG_CHECKING([for test routines])
-AC_TRY_RUN([#include "${srcdir-.}/build/tests/trivial.c"],
-           AC_MSG_RESULT(yes),
-	   AC_MSG_ERROR([cant find test code. Aborting config]),
-	   AC_MSG_WARN([cannot run when cross-compiling]))
 
 AC_CACHE_CHECK([for ftruncate extend],samba_cv_HAVE_FTRUNCATE_EXTEND,[
 AC_TRY_RUN([#include "${srcdir-.}/build/tests/ftruncate.c"],

Modified: branches/SAMBA_4_0/source/build/smb_build/check_cc.m4
===================================================================
--- branches/SAMBA_4_0/source/build/smb_build/check_cc.m4	2004-08-20 04:21:49 UTC (rev 1942)
+++ branches/SAMBA_4_0/source/build/smb_build/check_cc.m4	2004-08-20 06:52:31 UTC (rev 1943)
@@ -72,3 +72,24 @@
 if test x"$samba_cv_immediate_structures" = x"yes"; then
    AC_DEFINE(HAVE_IMMEDIATE_STRUCTURES,1,[Whether the compiler supports immediate structures])
 fi
+
+AC_MSG_CHECKING([for test routines])
+AC_TRY_RUN([#include "${srcdir-.}/build/tests/trivial.c"],
+	    AC_MSG_RESULT(yes),
+	    AC_MSG_ERROR([cant find test code. Aborting config]),
+	    AC_MSG_WARN([cannot run when cross-compiling]))
+
+#
+# Check if the compiler can handle the options we selected by
+# --enable-*developer and --enable-debug
+#
+if test -n "$DEVELOPER_CFLAGS"; then
+	OLD_CFLAGS="${CFLAGS}"
+	CFLAGS="${CFLAGS} ${DEVELOPER_CFLAGS}"
+	AC_MSG_CHECKING([that the C compiler can use the DEVELOPER_CFALGS])
+	AC_TRY_RUN([#include "${srcdir-.}/build/tests/trivial.c"],
+		AC_MSG_RESULT(yes),
+		DEVELOPER_CFLAGS=""; AC_MSG_RESULT(no),
+		AC_MSG_WARN([cannot run when cross-compiling]))
+	CFLAGS="${OLD_CFLAGS}"
+fi

Modified: branches/SAMBA_4_0/source/build/smb_build/check_path.m4
===================================================================
--- branches/SAMBA_4_0/source/build/smb_build/check_path.m4	2004-08-20 04:21:49 UTC (rev 1942)
+++ branches/SAMBA_4_0/source/build/smb_build/check_path.m4	2004-08-20 06:52:31 UTC (rev 1943)
@@ -127,19 +127,19 @@
 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} -g -Wall -Wshadow -Werror-implicit-function-declaration -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -DDEBUG_PASSWORD -DDEVELOPER"
+    	DEVELOPER_CFLAGS="-g -Wall -Wshadow -Werror-implicit-function-declaration -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -DDEBUG_PASSWORD -DDEVELOPER"
     fi])
 
 AC_ARG_ENABLE(krb5developer, [  --enable-krb5developer  Turn on developer warnings and debugging, except -Wstrict-prototypes (default=no)],
     [if eval "test x$enable_krb5developer = xyes"; then
         developer=yes
-	CFLAGS="${CFLAGS} -g -Wall -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -DDEBUG_PASSWORD -DDEVELOPER"
+	DEVELOPER_CFLAGS="-g -Wall -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -DDEBUG_PASSWORD -DDEVELOPER"
     fi])
 
 AC_ARG_ENABLE(gtkdeveloper, [  --enable-gtkdeveloper  Turn on developer warnings and debugging, except -Wstrict-prototypes and -Wshadow (default=no)],
     [if eval "test x$enable_gtkdeveloper = xyes"; then
         developer=yes
-	CFLAGS="${CFLAGS} -g -Wall -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -DDEBUG_PASSWORD -DDEVELOPER"
+	DEVELOPER_CFLAGS="-g -Wall -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -DDEBUG_PASSWORD -DDEVELOPER"
     fi])
 
 experimental=no

Modified: branches/SAMBA_4_0/source/configure.in
===================================================================
--- branches/SAMBA_4_0/source/configure.in	2004-08-20 04:21:49 UTC (rev 1942)
+++ branches/SAMBA_4_0/source/configure.in	2004-08-20 06:52:31 UTC (rev 1943)
@@ -62,6 +62,10 @@
 fi
 
 #################################################
+# add DEVELOPER_CFLAGS only for the real build
+CFLAGS="${CFLAGS} ${DEVELOPER_CFLAGS}"
+
+#################################################
 # final configure stuff
 
 AC_MSG_CHECKING([configure summary])



More information about the samba-cvs mailing list