AC_DEFINE_UNQUOTED([ROUTE_PATH], ["$ROUTE"], [Path to route tool])
AC_DEFINE_UNQUOTED([SYSTEMD_ASK_PASSWORD_PATH], ["$SYSTEMD_ASK_PASSWORD"], [Path to systemd-ask-password tool])
+# Set -std=c99 unless user already specified a -std=
+case "${CFLAGS}" in
+ *-std=*) ;;
+ *) CFLAGS="${CFLAGS} -std=c99" ;;
+esac
+
#
# Libtool
#
,
[[${SOCKET_INCLUDES}]]
)
+AC_CHECKING([anonymous union support])
+AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+ struct mystruct {
+ union {
+ int m1;
+ char m2;
+ };
+ };
+ ]],
+ [[
+ struct mystruct s;
+ s.m1 = 1; s.m2 = 2;
+ ]]
+ )],
+ [
+ AC_MSG_RESULT([yes])
+ AC_DEFINE([HAVE_ANONYMOUS_UNION_SUPPORT], [], [Compiler supports anonymous unions])
+ ],
+ [AC_MSG_RESULT([no])]
+)
dnl We emulate signals in Windows
AC_CHECK_DECLS(
)
fi
-# Set -std=c99 unless user already specified a -std=
-case "${CFLAGS}" in
- *-std=*) ;;
- *) CFLAGS="${CFLAGS} -std=c99" ;;
-esac
-
if test "${enable_pedantic}" = "yes"; then
enable_strict="yes"
CFLAGS="${CFLAGS} -pedantic"
uint8_t prefix[12];
in_addr_t addr; /* _network order_ IPv4 address */
} v4mappedv6;
- };
+ }
+#ifndef HAVE_ANONYMOUS_UNION_SUPPORT
+/* Wrappers to support compilers that do not grok anonymous unions */
+ mroute_union
+#define raw_addr mroute_union.raw_addr
+#define eth_addr mroute_union.eth_addr
+#define v4 mroute_union.v4
+#define v6 mroute_union.v6
+#define v4mappedv6 mroute_union.v4mappedv6
+#endif
+ ;
};
/* Double-check that struct packing works as expected */