diff options
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 79 |
1 files changed, 73 insertions, 6 deletions
diff --git a/configure.in b/configure.in index 7ddffd85ad..19ef304a1a 100644 --- a/configure.in +++ b/configure.in @@ -1,8 +1,28 @@ dnl Process this file with autoconf to produce a configure script. + +dnl %CopyrightBegin% +dnl +dnl Copyright Ericsson AB 1998-2010. All Rights Reserved. +dnl +dnl The contents of this file are subject to the Erlang Public License, +dnl Version 1.1, (the "License"); you may not use this file except in +dnl compliance with the License. You should have received a copy of the +dnl Erlang Public License along with this software. If not, it can be +dnl retrieved online at http://www.erlang.org/. +dnl +dnl Software distributed under the License is distributed on an "AS IS" +dnl basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See +dnl the License for the specific language governing rights and limitations +dnl under the License. +dnl +dnl %CopyrightEnd% + AC_PREREQ(2.8)dnl AC_INIT() +LM_PRECIOUS_VARS + default_cache_file=./config.cache if test "x$no_recursion" != "xyes" -a "x$OVERRIDE_CONFIG_CACHE" = "x"; then @@ -19,6 +39,18 @@ if test "x$no_recursion" != "xyes" -a "x$OVERRIDE_CONFIG_CACHE" = "x"; then cache_file=/dev/null fi +case "X$ERL_TOP" in + X) + ;; + X/*) + test -f $ERL_TOP/erts/emulator/beam/beam_emu.c || { + AC_MSG_ERROR([Invalid \$ERL_TOP]) + } + srcdir="$ERL_TOP";; + *) + AC_MSG_ERROR([\$ERL_TOP needs to be absolute]);; +esac + dnl How to set srcdir absolute is taken from the GNU Emacs distribution #### Make srcdir absolute, if it isn't already. It's important to #### avoid running the path through pwd unnecessary, since pwd can @@ -43,7 +75,7 @@ esac # # Now srcdir is absolute and also the top of Erlang distribution, ERL_TOP. # -ERL_TOP=${srcdir} +test "X$ERL_TOP" != "X" || ERL_TOP="$srcdir" AC_SUBST(ERL_TOP) dnl @@ -65,11 +97,35 @@ fi TARGET=$host AC_SUBST(TARGET) +if test X$cross_compiling = Xyes; then + CROSS_COMPILING=yes +else + CROSS_COMPILING=no +fi +AC_SUBST(CROSS_COMPILING) + + +AC_ARG_ENABLE(bootstrap-only, +[ --enable-bootstrap-only enable bootstrap only configuration], +[ if test "X$enableval" = "Xyes"; then + BOOTSTRAP_ONLY=yes + else + BOOTSTRAP_ONLY=no + fi +], +BOOTSTRAP_ONLY=no) + +AC_SUBST(BOOTSTRAP_ONLY) + +if test $CROSS_COMPILING = yes -a $BOOTSTRAP_ONLY = yes; then + AC_MSG_ERROR([Cannot both cross compile and build a bootstrap system]) +fi dnl Checks for programs. AC_PROG_CC - +AC_PROG_CXX +AC_CHECK_TOOL(LD, [ld]) # # We need GNU make, complain if we can't find it @@ -123,11 +179,17 @@ AC_PROG_LN_S AC_PROG_RANLIB # -# Get erts version from erts/vsn.mk +# Get erts version and otp release from erts/vsn.mk # -[ERTS=erts-`sed -n 's/^VSN[ ]*=[ ]*\([0-9.]\)/\1/p' < erts/vsn.mk`] +AC_MSG_CHECKING([ERTS version]) +[ERTS=erts-`sed -n "s/^VSN[ ]*=[ ]*\(.*\)/\1/p" < $ERL_TOP/erts/vsn.mk`] +AC_MSG_RESULT([$ERTS]) AC_SUBST(ERTS) +AC_MSG_CHECKING([OTP release]) +[OTP=OTP-`sed -n "s/^SYSTEM_VSN[ ]*=[ ]*\(.*\)/\1/p" < $ERL_TOP/erts/vsn.mk`] +AC_MSG_RESULT([$OTP]) +AC_SUBST(OTP) AC_ARG_ENABLE(threads, [ --enable-threads enable async thread support @@ -147,6 +209,11 @@ AC_ARG_ENABLE(kernel-poll, AC_ARG_ENABLE(hipe, [ --enable-hipe enable hipe support --disable-hipe disable hipe support]) + +AC_ARG_WITH(javac, +[ --with-javac=JAVAC specify Java compiler to use + --with-javac use a Java compiler if found (default) + --without-javac don't use any Java compiler]) AC_ARG_ENABLE(megaco_flex_scanner_lineno, [ --enable-megaco-flex-scanner-lineno enable megaco flex scanner lineno @@ -176,8 +243,8 @@ AC_ARG_ENABLE(erlang-mandir, [ --disable-erlang-mandir do not install Erlang man pages in a private directory], [ case "$enableval" in no) erl_mandir=$mandir ;; - *) erl_mandir='$(ERLANG_ILIBDIR)/man' ;; - esac ], erl_mandir='$(ERLANG_ILIBDIR)/man') + *) erl_mandir='$(erlang_libdir)/man' ;; + esac ], erl_mandir='$(erlang_libdir)/man') AC_SUBST(erl_mandir) AC_ARG_ENABLE(darwin-universal, |