aboutsummaryrefslogtreecommitdiff
path: root/m4/erlang-extra.m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4/erlang-extra.m4')
-rw-r--r--m4/erlang-extra.m417
1 files changed, 17 insertions, 0 deletions
diff --git a/m4/erlang-extra.m4 b/m4/erlang-extra.m4
index 4a7311bad..f658057b5 100644
--- a/m4/erlang-extra.m4
+++ b/m4/erlang-extra.m4
@@ -84,3 +84,20 @@ EOF
AC_MSG_RESULT([ok])
fi
]) dnl ERLANG_VERSION_CHECK
+
+AC_DEFUN([ERLANG_DEPRECATED_TYPES_CHECK],
+[ AC_MSG_CHECKING([whether Erlang is using deprecated types])
+ cat > conftest.erl <<EOF
+-module(conftest).
+
+-record(state, {host = dict:new() :: dict:dict()}).
+EOF
+
+ if $ERLC conftest.erl > /dev/null 2>&1; then
+ AC_MSG_RESULT([no])
+ AC_SUBST(erlang_deprecated_types, false)
+ else
+ AC_MSG_RESULT([yes])
+ AC_SUBST(erlang_deprecated_types, true)
+ fi
+])