aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac93
1 files changed, 67 insertions, 26 deletions
diff --git a/configure.ac b/configure.ac
index f3ff9ae54..2d98f62f1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,8 +3,8 @@
AC_PREREQ(2.53)
AC_INIT(ejabberd, m4_esyscmd([echo `git describe --tags 2>/dev/null || echo 0.0` | sed 's/-g.*//;s/-/./' | tr -d '\012']), [ejabberd@process-one.net], [ejabberd])
-REQUIRE_ERLANG_MIN="6.1 (Erlang/OTP 17.1)"
-REQUIRE_ERLANG_MAX="9.0.0 (No Max)"
+REQUIRE_ERLANG_MIN="8.3 (Erlang/OTP 19.3)"
+REQUIRE_ERLANG_MAX="100.0.0 (No Max)"
AC_CONFIG_MACRO_DIR([m4])
@@ -66,7 +66,7 @@ if test "x$MAKE" = "x"; then
fi
# Change default prefix
-AC_PREFIX_DEFAULT(/)
+AC_PREFIX_DEFAULT(/usr/local)
AC_ARG_ENABLE(hipe,
[AC_HELP_STRING([--enable-hipe], [compile natively with HiPE, not recommended (default: no)])],
@@ -84,6 +84,14 @@ AC_ARG_ENABLE(roster_gateway_workaround,
*) AC_MSG_ERROR(bad value ${enableval} for --enable-roster-gateway-workaround) ;;
esac],[roster_gateway_workaround=false])
+AC_ARG_ENABLE(new_sql_schema,
+[AC_HELP_STRING([--enable-new-sql-schema], [use new SQL schema (default: no)])],
+[case "${enableval}" in
+ yes) new_sql_schema=true ;;
+ no) new_sql_schema=false ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-new-sql-schema) ;;
+esac],[new_sql_schema=false])
+
AC_ARG_ENABLE(full_xml,
[AC_HELP_STRING([--enable-full-xml], [use XML features in XMPP stream (ex: CDATA) (default: no, requires XML compliant clients)])],
[case "${enableval}" in
@@ -101,10 +109,10 @@ AC_ARG_ENABLE(mssql,
esac],[db_type=generic])
AC_ARG_ENABLE(all,
-[AC_HELP_STRING([--enable-all], [same as --enable-odbc --enable-mysql --enable-pgsql --enable-sqlite --enable-pam --enable-zlib --enable-riak --enable-redis --enable-elixir --enable-iconv --enable-debug --enable-tools (useful for Dialyzer checks, default: no)])],
+[AC_HELP_STRING([--enable-all], [same as --enable-odbc --enable-mysql --enable-pgsql --enable-sqlite --enable-pam --enable-zlib --enable-redis --enable-elixir --enable-stun --enable-sip --enable-debug --enable-tools (useful for Dialyzer checks, default: no)])],
[case "${enableval}" in
- yes) odbc=true mysql=true pgsql=true sqlite=true pam=true zlib=true riak=true redis=true elixir=true iconv=true debug=true tools=true ;;
- no) odbc=false mysql=false pgsql=false sqlite=false pam=false zlib=false riak=false redis=false elixir=false iconv=false debug=false tools=false ;;
+ yes) odbc=true mysql=true pgsql=true sqlite=true pam=true zlib=true redis=true elixir=true stun=true sip=true debug=true tools=true ;;
+ no) odbc=false mysql=false pgsql=false sqlite=false pam=false zlib=false redis=false elixir=false stun=false sip=false debug=false tools=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-all) ;;
esac],[])
@@ -164,14 +172,6 @@ AC_ARG_ENABLE(zlib,
*) AC_MSG_ERROR(bad value ${enableval} for --enable-zlib) ;;
esac],[if test "x$zlib" = "x"; then zlib=true; fi])
-AC_ARG_ENABLE(riak,
-[AC_HELP_STRING([--enable-riak], [enable Riak support (default: no)])],
-[case "${enableval}" in
- yes) riak=true ;;
- no) riak=false ;;
- *) AC_MSG_ERROR(bad value ${enableval} for --enable-riak) ;;
-esac],[if test "x$riak" = "x"; then riak=false; fi])
-
AC_ARG_ENABLE(redis,
[AC_HELP_STRING([--enable-redis], [enable Redis support (default: no)])],
[case "${enableval}" in
@@ -188,14 +188,6 @@ AC_ARG_ENABLE(elixir,
*) AC_MSG_ERROR(bad value ${enableval} for --enable-elixir) ;;
esac],[if test "x$elixir" = "x"; then elixir=false; fi])
-AC_ARG_ENABLE(iconv,
-[AC_HELP_STRING([--enable-iconv], [enable iconv support (default: yes)])],
-[case "${enableval}" in
- yes) iconv=true ;;
- no) iconv=false ;;
- *) AC_MSG_ERROR(bad value ${enableval} for --enable-iconv) ;;
-esac],[if test "x$iconv" = "x"; then iconv=true; fi])
-
AC_ARG_ENABLE(debug,
[AC_HELP_STRING([--enable-debug], [enable debug information (default: yes)])],
[case "${enableval}" in
@@ -212,6 +204,30 @@ AC_ARG_ENABLE(latest_deps,
*) AC_MSG_ERROR(bad value ${enableval} for --enable-latest-deps) ;;
esac],[if test "x$latest_deps" = "x"; then latest_deps=false; fi])
+AC_ARG_ENABLE(system_deps,
+[AC_HELP_STRING([--enable-system-deps], [makes rebar use localy installed dependences instead of downloading them (default: no)])],
+[case "${enableval}" in
+ yes) system_deps=true ;;
+ no) system_deps=false ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-system-deps) ;;
+esac],[if test "x$system_deps" = "x"; then system_deps=false; fi])
+
+AC_ARG_ENABLE(stun,
+[AC_HELP_STRING([--enable-stun], [enable STUN/TURN support (default: no)])],
+[case "${enableval}" in
+ yes) stun=true ;;
+ no) stun=false ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-stun) ;;
+esac],[if test "x$stun" = "x"; then stun=false; fi])
+
+AC_ARG_ENABLE(sip,
+[AC_HELP_STRING([--enable-sip], [enable SIP support (default: no)])],
+[case "${enableval}" in
+ yes) sip=true ;;
+ no) sip=false ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-sip) ;;
+esac],[if test "x$sip" = "x"; then sip=false; fi])
+
AC_CONFIG_FILES([Makefile
vars.config
src/ejabberd.app.src])
@@ -229,8 +245,19 @@ if test "$ENABLEUSER" != ""; then
echo "allow this system user to start ejabberd: $ENABLEUSER"
AC_SUBST([INSTALLUSER], [$ENABLEUSER])
fi
-
-ERLANG_DEPRECATED_TYPES_CHECK
+ENABLEGROUP=""
+AC_ARG_ENABLE(group,
+ [AS_HELP_STRING([--enable-group[[[[=GROUP]]]]], [allow this system group to start ejabberd (default: no)])],
+ [case "${enableval}" in
+ yes) ENABLEGROUP=`groups |head -n 1` ;;
+ no) ENABLEGROUP="" ;;
+ *) ENABLEGROUP=$enableval
+ esac],
+ [])
+if test "$ENABLEGROUP" != ""; then
+ echo "allow this system group to start ejabberd: $ENABLEGROUP"
+ AC_SUBST([INSTALLGROUP], [$ENABLEGROUP])
+fi
if test "$sqlite" = "true"; then
AX_LIB_SQLITE3([3.6.19])
@@ -239,8 +266,20 @@ if test "$sqlite" = "true"; then
fi
fi
+enabled_backends=""
+for backend in odbc mysql pgsql sqlite redis; do
+ if eval test x\${$backend} = xtrue; then
+ if test "x$enabled_backends" = "x"; then
+ enabled_backends=$backend
+ else
+ enabled_backends="$enabled_backends, $backend"
+ fi
+ fi
+done
+
AC_SUBST(hipe)
AC_SUBST(roster_gateway_workaround)
+AC_SUBST(new_sql_schema)
AC_SUBST(full_xml)
AC_SUBST(db_type)
AC_SUBST(odbc)
@@ -249,15 +288,17 @@ AC_SUBST(pgsql)
AC_SUBST(sqlite)
AC_SUBST(pam)
AC_SUBST(zlib)
-AC_SUBST(riak)
AC_SUBST(redis)
AC_SUBST(elixir)
-AC_SUBST(iconv)
+AC_SUBST(stun)
+AC_SUBST(sip)
AC_SUBST(debug)
AC_SUBST(tools)
AC_SUBST(latest_deps)
+AC_SUBST(system_deps)
AC_SUBST(CFLAGS)
AC_SUBST(CPPFLAGS)
AC_SUBST(LDFLAGS)
+AC_SUBST(enabled_backends)
AC_OUTPUT