summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2004-08-20 06:52:31 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:58:12 -0500
commit5a5f9c8aa792a586350ec8c9f2754679eb857b8a (patch)
tree90322e67620010af6db335c69871822b2b85535b /source4
parent8d6e233f66616c97fcce935253e56cdd6117242e (diff)
downloadsamba-5a5f9c8aa792a586350ec8c9f2754679eb857b8a.tar.gz
samba-5a5f9c8aa792a586350ec8c9f2754679eb857b8a.tar.bz2
samba-5a5f9c8aa792a586350ec8c9f2754679eb857b8a.zip
r1943: 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 (This used to be commit 35624842c7b25c404e6203564005e3098e4249b4)
Diffstat (limited to 'source4')
-rw-r--r--source4/build/m4/rewrite.m45
-rw-r--r--source4/build/smb_build/check_cc.m421
-rw-r--r--source4/build/smb_build/check_path.m46
-rw-r--r--source4/configure.in4
4 files changed, 28 insertions, 8 deletions
diff --git a/source4/build/m4/rewrite.m4 b/source4/build/m4/rewrite.m4
index 05687f78ec..b6ced8db97 100644
--- a/source4/build/m4/rewrite.m4
+++ b/source4/build/m4/rewrite.m4
@@ -999,11 +999,6 @@ if test x"$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" = x"yes"; then
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"],
diff --git a/source4/build/smb_build/check_cc.m4 b/source4/build/smb_build/check_cc.m4
index 91324180f9..af8d465055 100644
--- a/source4/build/smb_build/check_cc.m4
+++ b/source4/build/smb_build/check_cc.m4
@@ -72,3 +72,24 @@ AC_CACHE_CHECK([for immediate structures],samba_cv_immediate_structures, [
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
diff --git a/source4/build/smb_build/check_path.m4 b/source4/build/smb_build/check_path.m4
index f2d06e384a..0e0b481b0b 100644
--- a/source4/build/smb_build/check_path.m4
+++ b/source4/build/smb_build/check_path.m4
@@ -127,19 +127,19 @@ developer=no
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
diff --git a/source4/configure.in b/source4/configure.in
index f6bb836df5..00e7662f03 100644
--- a/source4/configure.in
+++ b/source4/configure.in
@@ -62,6 +62,10 @@ if test "${ac_cv_prog_CC}" = "insure"; then
fi
#################################################
+# add DEVELOPER_CFLAGS only for the real build
+CFLAGS="${CFLAGS} ${DEVELOPER_CFLAGS}"
+
+#################################################
# final configure stuff
AC_MSG_CHECKING([configure summary])