summaryrefslogtreecommitdiff
path: root/source4/build/m4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2005-06-09 07:51:58 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:17:51 -0500
commit1b3471ed0cf1f1ec2cdc8a116b1da93f783a47c6 (patch)
tree562cbf554bd7946aee0829616e319e568668d9a4 /source4/build/m4
parent0f247a39a65cb435ccb3f44fe446026648e20780 (diff)
downloadsamba-1b3471ed0cf1f1ec2cdc8a116b1da93f783a47c6.tar.gz
samba-1b3471ed0cf1f1ec2cdc8a116b1da93f783a47c6.tar.bz2
samba-1b3471ed0cf1f1ec2cdc8a116b1da93f783a47c6.zip
r7425: configure check to see if a compiler can handle negative enum values
if the compiler doesn't support it we pass --uint-enums to pidl metze (This used to be commit c52703c0a8adb4f64ec52e4bf602e9c17ef2c748)
Diffstat (limited to 'source4/build/m4')
-rw-r--r--source4/build/m4/check_cc.m414
-rw-r--r--source4/build/m4/check_perl.m43
2 files changed, 17 insertions, 0 deletions
diff --git a/source4/build/m4/check_cc.m4 b/source4/build/m4/check_cc.m4
index 68e938b794..947112f4b6 100644
--- a/source4/build/m4/check_cc.m4
+++ b/source4/build/m4/check_cc.m4
@@ -67,6 +67,20 @@ if test x"$samba_cv_immediate_structures" = x"yes"; then
AC_DEFINE(HAVE_IMMEDIATE_STRUCTURES,1,[Whether the compiler supports immediate structures])
fi
+############################################
+# check if the compiler can handle negative enum values
+AC_CACHE_CHECK([that the C compiler understands negative enum values],SMB_BUILD_CC_NEGATIVE_ENUM_VALUES, [
+ AC_TRY_COMPILE([
+#include <stdio.h>],
+[
+ enum negative_values { NEGATIVE_VALUE = 0xFFFFFFFF };
+],
+ SMB_BUILD_CC_NEGATIVE_ENUM_VALUES=yes,SMB_BUILD_CC_NEGATIVE_ENUM_VALUES=no)])
+if test x"$SMB_BUILD_CC_NEGATIVE_ENUM_VALUES" != x"yes"; then
+ AC_MSG_WARN([using --unit-enums for pidl])
+ PIDL_ARGS="$PIDL_ARGS --uint-enums"
+fi
+
AC_MSG_CHECKING([for test routines])
AC_TRY_RUN([#include "${srcdir-.}/build/tests/trivial.c"],
AC_MSG_RESULT(yes),
diff --git a/source4/build/m4/check_perl.m4 b/source4/build/m4/check_perl.m4
index 5f5f614f84..5e493db875 100644
--- a/source4/build/m4/check_perl.m4
+++ b/source4/build/m4/check_perl.m4
@@ -13,3 +13,6 @@ fi
if test x"$debug" = x"yes";then
PERL="$PERL -W"
fi
+
+PIDL_ARGS=""
+AC_SUBST(PIDL_ARGS)