diff options
author | dos-reis <gdr@axiomatics.org> | 2013-04-03 00:41:02 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2013-04-03 00:41:02 +0000 |
commit | 1e979a3c60f7e79ee8aa3aef8f9d4bb354b17bc1 (patch) | |
tree | 0b98d1fee5b751b5ac4d7efd1be0cda12b898049 | |
parent | 090f72206483b1a918705c079384e9cd2a190671 (diff) | |
download | open-axiom-1e979a3c60f7e79ee8aa3aef8f9d4bb354b17bc1.tar.gz |
* config/open-axiom.m4 (OPENAXIOM_REQUIRE_CXX11): New.
* configure.ac: Use it.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | INSTALL | 12 | ||||
-rw-r--r-- | config/open-axiom.m4 | 15 | ||||
-rwxr-xr-x | configure | 31 | ||||
-rw-r--r-- | configure.ac | 1 |
5 files changed, 54 insertions, 10 deletions
@@ -0,0 +1,5 @@ +2013-04-02 Gabriel Dos Reis <gdr@cs.tamu.edu> + + * config/open-axiom.m4 (OPENAXIOM_REQUIRE_CXX11): New. + * configure.ac: Use it. + @@ -4,7 +4,7 @@ Requirements OpenAxiom currenly requires a Lisp system for its runtime support. OpenAxiom is known to build with the GNU Common Lisp (GCL versions 2.6.7 or 2.6.8), Steel Bank Common Lisp (SBCL version 1.0.22 or higher, -except 1.0.29), CLisp (version 2.44.x or higher), and ECL (version +except 1.0.29, 1.1.6), CLisp (version 2.44.x or higher), and ECL (version higher than 11.1.1), Clozure CL (version 1.3 or higher). So, if you already have any of the above mentioned Lisp systems, your are good to go. Otherwise, you would need to install any of the Lisp environment @@ -15,11 +15,11 @@ Note that a functional Lisp system (e.g. SBCL, GCL, CLisp, ECL, or Clozure CL) is needed only to build OpenAxiom. They are not needed once the system is installed. -Finally, you would need a C++ compiler. It is also recommended -that you install X11 development headers and libraries, especially -Xpm, and QT development headers and libraries. Windows (MingW/MSYS) -users do not need X11 components, but they would need a functional -QT SDK (version 4.6 or higher.) +Finally, you would need a C++ compiler that supports the 2011 edition +of the language. It is also recommended that you install X11 +development headers and libraries, especially Xpm, and QT development +headers and libraries. Windows (MingW/MSYS) users do not need X11 +components, but they would need a functional QT SDK (version 4.6 or higher.) Ah, one more note: OpenAxiom requires GNU Make. diff --git a/config/open-axiom.m4 b/config/open-axiom.m4 index 90f3e8cd..842e3682 100644 --- a/config/open-axiom.m4 +++ b/config/open-axiom.m4 @@ -216,6 +216,19 @@ case $host in esac ]) +dnl ----------------------------- +dnl -- OPENAXIOM_REQUIRE_CXX11 -- +dnl ----------------------------- +AC_DEFUN([OPENAXIOM_REQUIRE_CXX11],[ +oa_saved_cxxflags=$CXXFLAGS +CXXFLAGS="-std=c++11" +AC_MSG_CHECKING([whether $CXX supports $CXXFLAGS]) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])], + [AC_MSG_RESULT([yes])] + [CXXFLAGS="$CXXFLAGS $oa_saved_cxxflags"], + [AC_MSG_ERROR([OpenAxiom requires a C++11 compiler])]) +]) + dnl ------------------------------ dnl -- OPENAXIOM_HOST_COMPILERS -- dnl ------------------------------ @@ -229,7 +242,7 @@ OPENAXIOM_CHECK_DELAYED_FFI ## Are we using compilers from GNU? oa_gnu_compiler=no AC_PROG_CC -AC_PROG_CXX +AC_PROG_CXX([g++ clang++ icpc icc CC xlC c++]) if test x$GCC = xyes || test x$GXX = xyes; then oa_gnu_compiler=yes fi @@ -4816,7 +4816,7 @@ if test -z "$CXX"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC + for ac_prog in g++ clang++ icpc icc CC xlC c++ do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 @@ -4860,7 +4860,7 @@ fi fi if test -z "$CXX"; then ac_ct_CXX=$CXX - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC + for ac_prog in g++ clang++ icpc icc CC xlC c++ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 @@ -5505,6 +5505,32 @@ case $host in esac + + +oa_saved_cxxflags=$CXXFLAGS +CXXFLAGS="-std=c++11" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports $CXXFLAGS" >&5 +$as_echo_n "checking whether $CXX supports $CXXFLAGS... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + CXXFLAGS="$CXXFLAGS $oa_saved_cxxflags" +else + as_fn_error $? "OpenAxiom requires a C++11 compiler" "$LINENO" 5 +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test x$oa_include_gcl = xyes; then OA_BUILD_GCL_TRUE= OA_BUILD_GCL_FALSE='#' @@ -5523,7 +5549,6 @@ fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : diff --git a/configure.ac b/configure.ac index 963a4f81..70c6f468 100644 --- a/configure.ac +++ b/configure.ac @@ -80,6 +80,7 @@ axiom_build_sharedir=$axiom_builddir/share AC_LANG([C++]) OPENAXIOM_HOST_COMPILERS +OPENAXIOM_REQUIRE_CXX11 AM_CONDITIONAL([OA_BUILD_GCL], [test x$oa_include_gcl = xyes]) AM_CONDITIONAL([OA_DELAYED_FFI], [test x$oa_delay_ffi = xyes]) |