diff options
author | Palmer Dabbelt <palmer.dabbelt@eecs.berkeley.edu> | 2015-04-08 15:26:06 -0700 |
---|---|---|
committer | Palmer Dabbelt <palmer.dabbelt@eecs.berkeley.edu> | 2015-04-08 16:11:43 -0700 |
commit | 10d12c683d00cd22d22d1e6601b0eae3d0554fb6 (patch) | |
tree | 423c1ce0af61d2c582c2e718d2b88ad8fbab6a47 /configure.ac | |
parent | 80ae465896810809a3ab24e3127f9c832677e31c (diff) | |
download | riscv-gnu-toolchain-10d12c683d00cd22d22d1e6601b0eae3d0554fb6.zip riscv-gnu-toolchain-10d12c683d00cd22d22d1e6601b0eae3d0554fb6.tar.gz riscv-gnu-toolchain-10d12c683d00cd22d22d1e6601b0eae3d0554fb6.tar.bz2 |
Download GCC's library dependencies if they don't exist
Some systems don't have things like GMP, MPFR, and friends installed.
Rather than requiring them to be installed as root, this uses a bit of
GCC's built-in functionality to download these libraries and build
them along with GCC.
This allows the tools to build on Red Hat, but only if you install
newer host tools (I have GCC, make, and texinfo).
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac index 2f2254c..7059fc1 100644 --- a/configure.ac +++ b/configure.ac @@ -18,14 +18,16 @@ AC_PATH_PROGS_FEATURE_CHECK([GSED], [gsed sed], [AC_MSG_ERROR([GNU sed not found])]) AC_SUBST([GSED], [$ac_cv_path_GSED]) -AC_CHECK_LIB(gmp, __gmpz_init, , - [AC_MSG_ERROR([GNU MP not found; see https://gmplib.org/])]) - -AC_CHECK_LIB(mpfr, mpfr_init, , - [AC_MSG_ERROR([MPFR not found; see http://www.mpfr.org/])]) - -AC_CHECK_LIB(mpc, mpc_init2, , - [AC_MSG_ERROR([MPC not found; see http://www.multiprecision.org/])]) +need_gcc_external_libraries="no" +AC_CHECK_LIB(gmp, __gmpz_init, + [need_gcc_external_libraries="yes"]) +AC_CHECK_LIB(mpfr, mpfr_init, + [need_gcc_external_libraries="yes"]) +AC_CHECK_LIB(mpc, mpc_init2, + [need_gcc_external_libraries="yes"]) +AS_IF([test x"$need_gcc_external_libraries" == xno], + [AC_SUBST(NEED_GCC_EXTERNAL_LIBRARIES,true)], + [AC_SUBST(NEED_GCC_EXTERNAL_LIBRARIES,false)]) AC_PATH_PROG([CURL], [curl], [no]) AC_PATH_PROG([WGET], [wget], [no]) |