diff options
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 131 |
1 files changed, 62 insertions, 69 deletions
diff --git a/configure.in b/configure.in index 40498f2ff9..a149acbb55 100644 --- a/configure.in +++ b/configure.in @@ -2,7 +2,7 @@ dnl Process this file with autoconf to produce a configure script. dnl %CopyrightBegin% dnl -dnl Copyright Ericsson AB 1998-2014. All Rights Reserved. +dnl Copyright Ericsson AB 1998-2016. All Rights Reserved. dnl dnl Licensed under the Apache License, Version 2.0 (the "License"); dnl you may not use this file except in compliance with the License. @@ -105,7 +105,6 @@ else fi AC_SUBST(CROSS_COMPILING) - AC_ARG_ENABLE(bootstrap-only, AS_HELP_STRING([--enable-bootstrap-only], [enable bootstrap only configuration]), @@ -129,6 +128,13 @@ AC_PROG_CC AC_PROG_CXX AC_CHECK_TOOL(LD, [ld]) +_search_path=/bin:/usr/bin:/usr/local/bin:$PATH + +AC_PATH_PROG(ENV, [env], false, $_search_path) +if test "$ac_cv_path_ENV" = false; then + AC_MSG_ERROR([No 'env' command found]) +fi + # # We need GNU make, complain if we can't find it # @@ -208,10 +214,6 @@ AS_HELP_STRING([--disable-threads], [disable async thread support])) AC_ARG_ENABLE(dirty-schedulers, AS_HELP_STRING([--enable-dirty-schedulers], [enable dirty scheduler support])) -AC_ARG_ENABLE(halfword-emulator, -AS_HELP_STRING([--enable-halfword-emulator], - [enable halfword emulator (only for 64bit builds). Note: Halfword emulator is marked as deprecated and scheduled for removal in future major release.])) - AC_ARG_ENABLE(smp-support, AS_HELP_STRING([--enable-smp-support], [enable smp support]) AS_HELP_STRING([--disable-smp-support], [disable smp support])) @@ -226,7 +228,10 @@ AS_HELP_STRING([--enable-kernel-poll], [enable kernel poll support]) AS_HELP_STRING([--disable-kernel-poll], [disable kernel poll support])) AC_ARG_ENABLE(sctp, -AS_HELP_STRING([--enable-sctp], [enable sctp support]) +AS_HELP_STRING([--enable-sctp], [enable sctp support (default) +to on demand load the SCTP library in runtime]) +AS_HELP_STRING([--enable-sctp=lib], [enable sctp support +to link against the SCTP library]) AS_HELP_STRING([--disable-sctp], [disable sctp support])) AC_ARG_ENABLE(hipe, @@ -238,8 +243,8 @@ AS_HELP_STRING([--enable-native-libs], [compile Erlang libraries to native code])) AC_ARG_WITH(dynamic-trace, -AS_HELP_STRING([--with-dynamic-trace={dtrace|systemtap}], - [specify use of dynamic trace framework, dtrace or systemtap]) +AS_HELP_STRING([--with-dynamic-trace={dtrace|lttng|systemtap}], + [specify use of dynamic trace framework, dtrace, lttng or systemtap]) AS_HELP_STRING([--without-dynamic-trace], [don't enable any dynamic tracing (default)])) AC_ARG_ENABLE(vm-probes, @@ -282,6 +287,10 @@ AC_ARG_ENABLE(builtin-zlib, AS_HELP_STRING([--enable-builtin-zlib], [force use of our own built-in zlib])) +AC_ARG_ENABLE(sharing-preserving, +AS_HELP_STRING([--enable-sharing-preserving], + [enable copying of terms without destroying sharing])) + dnl This functionality has been lost along the way... :( dnl It could perhaps be nice to reintroduce some day; therefore, dnl it is not removed just commented out. @@ -297,24 +306,6 @@ dnl *) erl_mandir='$(erlang_libdir)/man' ;; dnl esac ], erl_mandir='$(erlang_libdir)/man') dnl AC_SUBST(erl_mandir) -AC_ARG_ENABLE(darwin-universal, -AS_HELP_STRING([--enable-darwin-universal], - [build universal binaries on darwin i386]), -[ case "$enableval" in - no) enable_darwin_universal=no ;; - *) enable_darwin_univeral=yes ;; - esac -],enable_darwin_universal=no) - - -AC_ARG_ENABLE(darwin-64bit, -AS_HELP_STRING([--enable-darwin-64bit], [build 64bit binaries on darwin]), -[ case "$enableval" in - no) enable_darwin_64bit=no ;; - *) enable_darwin_64bit=yes ;; - esac -],enable_darwin_64bit=no) - AC_ARG_ENABLE(m64-build, AS_HELP_STRING([--enable-m64-build], [build 64bit binaries using the -m64 flag to (g)cc]), @@ -329,12 +320,7 @@ AS_HELP_STRING([--enable-m32-build], [build 32bit binaries using the -m32 flag to (g)cc]), [ case "$enableval" in no) enable_m32_build=no ;; - *) - if test X${enable_darwin_64bit} = Xyes -o X${enable_m64_build} = Xyes; - then - AC_MSG_ERROR([(--enable-darwin-64bit or --enable-m64-build) and --enable-m32-build are mutually exclusive]) ; - fi ; - enable_m32_build=yes ;; + *) enable_m32_build=yes ;; esac ],enable_m32_build=no) @@ -342,42 +328,6 @@ AC_ARG_WITH(libatomic_ops, AS_HELP_STRING([--with-libatomic_ops=PATH], [specify and prefer usage of libatomic_ops in the ethread library])) -dnl OK, we might have darwin switches off different kinds, lets -dnl check it all before continuing. -TMPSYS=`uname -s`-`uname -m` -if test X${enable_darwin_universal} = Xyes; then - if test X${enable_darwin_64bit} = Xyes; then - AC_MSG_ERROR([--enable-darwin-universal and --enable-darwin-64bit mutually exclusive]) - fi - enable_hipe=no - CFLAGS="-arch i386 -arch ppc $CFLAGS" - export CFLAGS - LDFLAGS="-arch i386 -arch ppc $LDFLAGS" - export LDFLAGS -fi -if test X${enable_darwin_64bit} = Xyes; then - case "$TMPSYS" in - Darwin-i386|Darwin-x86_64) - ;; - Darwin*) - AC_MSG_ERROR([--enable-darwin-64bit only supported on x86 hosts]) - ;; - *) - AC_MSG_ERROR([--enable-darwin-64bit only supported on Darwin]) - ;; - esac - enable_hipe=no - CFLAGS="-m64 $CFLAGS" - export CFLAGS - LDFLAGS="-m64 $LDFLAGS" - export LDFLAGS -elif test X"$TMPSYS" '=' X"Darwin-i386"; then - CFLAGS="-m32 $CFLAGS" - export CFLAGS - LDFLAGS="-m32 $LDFLAGS" - export LDFLAGS -fi - m4_define(DEFAULT_SANITIZERS, [address,undefined]) AC_ARG_ENABLE(sanitizers, AS_HELP_STRING( @@ -420,6 +370,49 @@ if test X${enable_native_libs} = Xyes -a X${enable_hipe} != Xno; then fi AC_SUBST(NATIVE_LIBS_ENABLED) +if test $CROSS_COMPILING = no; then + case $host_os in + darwin*) + macosx_version=`sw_vers -productVersion` + test $? -eq 0 || { + AC_MSG_ERROR([Failed to execute 'sw_vers'; please provide it in PATH]) + } + [case "$macosx_version" in + [1-9][0-9].[0-9]) + int_macosx_version=`echo $macosx_version | sed 's|\([^\.]*\)\.\([^\.]*\)|\1\2|'`;; + [1-9][0-9].[0-9].[0-9]) + int_macosx_version=`echo $macosx_version | sed 's|\([^\.]*\)\.\([^\.]*\)\.\([^\.]*\)|\1\2\3|'`;; + [1-9][0-9].[1-9][0-9]) + int_macosx_version=`echo $macosx_version | sed 's|\([^\.]*\)\.\([^\.]*\)|\1\200|'`;; + [1-9][0-9].[1-9][0-9].[0-9]) + int_macosx_version=`echo $macosx_version | sed 's|\([^\.]*\)\.\([^\.]*\)\.\([^\.]*\)|\1\20\3|'`;; + [1-9][0-9].[1-9][0-9].[1-9][0-9]) + int_macosx_version=`echo $macosx_version | sed 's|\([^\.]*\)\.\([^\.]*\)\.\([^\.]*\)|\1\2\3|'`;; + *) + int_macosx_version=unexpected;; + esac] + test $int_macosx_version != unexpected || { + AC_MSG_ERROR([Unexpected MacOSX version ($macosx_version) returned by 'sw_vers -productVersion'; this configure script probably needs to be updated]) + } + AC_TRY_COMPILE([ +#if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ > $int_macosx_version +#error Compiling for a newer MacOSX version... +#endif + ], [;], + [], + [AC_MSG_ERROR([ + + You are natively building Erlang/OTP for a later version of MacOSX + than current version ($macosx_version). You either need to + cross-build Erlang/OTP, or set the environment variable + MACOSX_DEPLOYMENT_TARGET to $macosx_version (or a lower version). + +])]) + ;; + *) + ;; + esac +fi rm -f $ERL_TOP/lib/SKIP-APPLICATIONS for app in `cd lib && ls -d *`; do |