summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjörn Jacke <bj@sernet.de>2010-05-24 23:28:44 +0200
committerBjörn Jacke <bj@sernet.de>2010-05-24 23:28:44 +0200
commit24b3725407f1a67e13a7646d2e3f26ed1e4735ff (patch)
tree189d32871b9221aa9e911a778f1fecc06eda8f00
parent189950ce0615806b20a5536e6621d541044be42d (diff)
downloadsamba-24b3725407f1a67e13a7646d2e3f26ed1e4735ff.tar.gz
samba-24b3725407f1a67e13a7646d2e3f26ed1e4735ff.tar.bz2
samba-24b3725407f1a67e13a7646d2e3f26ed1e4735ff.zip
s3:configure: add Werror_FLAGS for IBM's xlc
-rw-r--r--source3/configure.in16
1 files changed, 14 insertions, 2 deletions
diff --git a/source3/configure.in b/source3/configure.in
index 0de524db17..a452486d11 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -264,7 +264,7 @@ else
fi
AC_SUBST(BROKEN_CC)
-dnl Check if the C compiler understands -Werror
+dnl Check if the C compiler understands -Werror (GNU)
AC_CACHE_CHECK([that the C compiler understands -Werror],samba_cv_HAVE_Werror, [
AC_TRY_RUN_STRICT([
int main(void)
@@ -286,7 +286,7 @@ AC_CACHE_CHECK([that the C compiler understands -w2],samba_cv_HAVE_w2, [
if test x"$samba_cv_HAVE_w2" = x"yes"; then
Werror_FLAGS="-w2"
else
-dnl Check if the C compiler understands -errwarn
+dnl Check if the C compiler understands -errwarn (Sun)
AC_CACHE_CHECK([that the C compiler understands -errwarn],samba_cv_HAVE_errwarn, [
AC_TRY_RUN_STRICT([
int main(void)
@@ -297,6 +297,18 @@ AC_CACHE_CHECK([that the C compiler understands -errwarn],samba_cv_HAVE_errwarn,
if test x"$samba_cv_HAVE_errwarn" = x"yes"; then
Werror_FLAGS="-errwarn=%all"
fi
+else
+dnl Check if the C compiler understands -qhalt (IBM)
+AC_CACHE_CHECK([that the C compiler understands -qhalt],samba_cv_HAVE_errwarn, [
+ AC_TRY_RUN_STRICT([
+ int main(void)
+ {
+ return 0;
+ }],[$CFLAGS -qhalt=w],[$CPPFLAGS],[$LDFLAGS],
+ samba_cv_HAVE_qhalt=yes,samba_cv_HAVE_qhalt=no,samba_cv_HAVE_qhalt=cross)])
+if test x"$samba_cv_HAVE_qhalt" = x"yes"; then
+ Werror_FLAGS="-qhalt=w"
+fi
fi
fi