mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-10 18:47:22 +00:00
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>
This commit is contained in:
parent
531569ec62
commit
925a2fe55c
18
configure.ac
18
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.])
|
AC_DEFINE(ENABLE_ALL_OPTIONS, [1], [Define to 1 to enable all command line options.])
|
||||||
fi
|
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
|
dnl check for OpenSSL functionality
|
||||||
AC_ARG_ENABLE([internal-md5],
|
AC_ARG_ENABLE([internal-md5],
|
||||||
[AC_HELP_STRING([--enable-internal-md5],
|
[AC_HELP_STRING([--enable-internal-md5],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user