summaryrefslogtreecommitdiff
path: root/m4/erlang-extra.m4
diff options
context:
space:
mode:
authorChristophe Romain <christophe.romain@process-one.net>2015-02-11 12:08:16 +0100
committerChristophe Romain <christophe.romain@process-one.net>2015-02-23 09:58:00 +0100
commit0c0947a24166bc2660fcc6dbc8d5a49d9a3a99a5 (patch)
tree1cfcc291ff1e30e0e3c1a359b0d994728f536f55 /m4/erlang-extra.m4
parentUpdate links (diff)
Add compatibility macros for deprecated types (thanks to Alexey)
Diffstat (limited to '')
-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 4a7311ba..f658057b 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
+])