summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorParthasarathy Bhuvaragan <parthasarathy.xx.bhuvaragan@ericsson.com>2015-02-16 14:57:36 +0100
committerZdenek Styblik <stybla@turnovfree.net>2015-02-17 15:42:58 +0100
commit925a2fe55cbe25fc700972b51e7aa84a5fd18f65 (patch)
treeb2a9b1be6bc85785f8922404920f33acd2fe24c8 /configure.ac
parent531569ec62e70007faa0f472720965807a532557 (diff)
downloadipmitool-925a2fe55cbe25fc700972b51e7aa84a5fd18f65.tar.gz
ID:370 - add anonymous union support in CFLAGS for older gcc
In older GCC versions when an element in an anonymous unions/structures are addressed by name, gcc must use -fms-extensions. Change-Id: Id80617ad9336c7a02fbe613b58e3f337fa4baeee Signed-off-by: Parthasarathy Bhuvaragan <parthasarathy.xx.bhuvaragan@ericsson.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac18
1 files changed, 18 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index d7c5620..a425bf5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -130,6 +130,24 @@ if test "x$xenable_all_options" = "xyes" || test "x$xenable_solaris_opt" = "xyes
AC_DEFINE(ENABLE_ALL_OPTIONS, [1], [Define to 1 to enable all command line options.])
fi
+dnl Determine anonymous union/structure support in GCC
+AC_TRY_COMPILE([
+#include <stdio.h>
+ ], [
+ struct test {
+ union {
+ int a;
+ unsigned int b;
+ };
+ } test;
+
+ printf("a is %d", test.a);
+ ], ac_need_fms_extension=no, ac_need_fms_extension=yes)
+if test "x$ac_need_fms_extension" = "xyes"; then
+ CFLAGS="$CFLAGS -fms-extensions"
+ AC_SUBST(CFLAGS)
+fi
+
dnl check for OpenSSL functionality
AC_ARG_ENABLE([internal-md5],
[AC_HELP_STRING([--enable-internal-md5],