summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjörn Jacke <bj@sernet.de>2008-04-09 16:27:20 +0200
committerKarolin Seeger <kseeger@samba.org>2008-04-16 16:40:44 +0200
commit25f9ca7b05881a4269d546929105f7f924f0c1ec (patch)
tree6c1f2c4180145d9236d9434c99bd85ec0465b4a1
parent72556d4c8ca2bf9bc0d342b81621d4626aa96fcb (diff)
downloadsamba-25f9ca7b05881a4269d546929105f7f924f0c1ec.tar.gz
samba-25f9ca7b05881a4269d546929105f7f924f0c1ec.tar.bz2
samba-25f9ca7b05881a4269d546929105f7f924f0c1ec.zip
add AC_TRY_RUN_STRICT support for Sun Studio compiler
(This used to be commit ce7025df2958dac284ec9e5ce47ab172c3aa2567)
-rw-r--r--source3/configure.in12
1 files changed, 12 insertions, 0 deletions
diff --git a/source3/configure.in b/source3/configure.in
index 98ce92c56e..07e5bbe1d8 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -307,6 +307,18 @@ AC_CACHE_CHECK([that the C compiler understands -w2],samba_cv_HAVE_w2, [
samba_cv_HAVE_w2=yes,samba_cv_HAVE_w2=no,samba_cv_HAVE_w2=cross)])
if test x"$samba_cv_HAVE_w2" = x"yes"; then
Werror_FLAGS="-w2"
+else
+dnl Check if the C compiler understands -errwarn
+AC_CACHE_CHECK([that the C compiler understands -errwarn],samba_cv_HAVE_errwarn, [
+ AC_TRY_RUN_STRICT([
+ int main(void)
+ {
+ return 0;
+ }],[-errwarn=%all],[$CPPFLAGS],[$LDFLAGS],
+ samba_cv_HAVE_errwarn=yes,samba_cv_HAVE_errwarn=no,samba_cv_HAVE_errwarn=cross)])
+if test x"$samba_cv_HAVE_errwarn" = x"yes"; then
+ Werror_FLAGS="-errwarn=%all"
+fi
fi
fi