diff options
author | Christophe Romain <christophe.romain@process-one.net> | 2015-02-11 14:08:16 +0300 |
---|---|---|
committer | Christophe Romain <christophe.romain@process-one.net> | 2015-02-23 11:58:00 +0300 |
commit | 0c0947a24166bc2660fcc6dbc8d5a49d9a3a99a5 (patch) | |
tree | 1cfcc291ff1e30e0e3c1a359b0d994728f536f55 /m4 | |
parent | d8b048663d7bd7f9549129a751d382073a9f7af0 (diff) |
Add compatibility macros for deprecated types (thanks to Alexey)
Diffstat (limited to 'm4')
-rw-r--r-- | m4/erlang-extra.m4 | 17 |
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 +]) |