Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/processone/ejabberd.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorChristophe Romain <christophe.romain@process-one.net>2015-02-11 14:08:16 +0300
committerChristophe Romain <christophe.romain@process-one.net>2015-02-23 11:58:00 +0300
commit0c0947a24166bc2660fcc6dbc8d5a49d9a3a99a5 (patch)
tree1cfcc291ff1e30e0e3c1a359b0d994728f536f55 /m4
parentd8b048663d7bd7f9549129a751d382073a9f7af0 (diff)
Add compatibility macros for deprecated types (thanks to Alexey)
Diffstat (limited to '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
+])