Skip to content

Commit

Permalink
Add mpc to the build system and basic documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
andrioni committed May 3, 2013
1 parent 9853f7f commit 6762def
Show file tree
Hide file tree
Showing 8 changed files with 60 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ compiler:
notifications:
email: false
before_install:
- BUILDOPTS="LLVM_CONFIG=llvm-config-3.2 USE_QUIET=0 USE_LIB64=0"; for lib in LLVM ZLIB SUITESPARSE ARPACK BLAS FFTW LAPACK GMP MPFR PCRE LIBUNWIND READLINE GRISU OPENLIBM RMATH LIBUV; do export BUILDOPTS="$BUILDOPTS USE_SYSTEM_$lib=1"; done
- BUILDOPTS="LLVM_CONFIG=llvm-config-3.2 USE_QUIET=0 USE_LIB64=0"; for lib in LLVM ZLIB SUITESPARSE ARPACK BLAS FFTW LAPACK GMP MPFR MPC PCRE LIBUNWIND READLINE GRISU OPENLIBM RMATH LIBUV; do export BUILDOPTS="$BUILDOPTS USE_SYSTEM_$lib=1"; done
- sudo apt-get update -qq -y
- sudo apt-get install zlib1g-dev
- sudo add-apt-repository ppa:staticfloat/julia-deps -y
Expand Down
1 change: 1 addition & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ External libraries, if used, include their own licenses:
- [LAPACK](http:https://netlib.org/lapack/LICENSE.txt)
- [LIBUNWIND](http:https://git.savannah.gnu.org/gitweb/?p=libunwind.git;a=blob_plain;f=LICENSE;hb=master)
- [LLVM](http:https://llvm.org/releases/3.0/LICENSE.TXT)
- [MPC](http:https://www.multiprecision.org/index.php?prog=mpc&page=html#Copying)
- [MPFR](http:https://www.mpfr.org/mpfr-current/mpfr.html#Copying)
- [OPENBLAS](https://raw.github.com/xianyi/OpenBLAS/master/LICENSE)
- [PCRE](http:https://www.pcre.org/licence.txt)
Expand Down
1 change: 1 addition & 0 deletions Make.inc
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ USE_SYSTEM_LAPACK=0
USE_SYSTEM_FFTW=0
USE_SYSTEM_GMP=0
USE_SYSTEM_MPFR=0
USE_SYSTEM_MPC=0
USE_SYSTEM_ARPACK=0
USE_SYSTEM_SUITESPARSE=0
USE_SYSTEM_ZLIB=0
Expand Down
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,19 @@ run-julia:
JL_LIBS = julia-release julia-debug

# private libraries, that are installed in $(PREFIX)/lib/julia
<<<<<<< HEAD
JL_PRIVATE_LIBS = amd arpack camd ccolamd cholmod colamd \
fftw3 fftw3f fftw3_threads fftw3f_threads \
gmp grisu openlibm openlibm-extras pcre \
random Rmath spqr suitesparse_wrapper \
umfpack z openblas mpfr
=======
JL_PRIVATE_LIBS = amd arpack cholmod colamd fftw3 fftw3f fftw3_threads \
fftw3f_threads gmp grisu mpfr mpc \
openlibm openlibm-extras pcre \
random Rmath spqr suitesparse_wrapper \
umfpack z openblas
>>>>>>> Add mpc to the build system and basic documentation

PREFIX ?= julia-$(JULIA_COMMIT)
install:
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@ Julia uses the following external libraries, which are automatically downloaded
- **[FFTW]** — library for computing fast Fourier transforms very quickly and efficiently.
- **[PCRE]** — Perl-compatible regular expressions library.
- **[GMP]** — the GNU multiple precision arithmetic library, needed for bigint support.
- **[MPFR]** — the GNU multiple precision floating point library, needed for bigfloat support.
- **[MPFR]** — the GNU multiple precision floating point library, needed for arbitrary precision floating point support.
- **[MPC]** — the GNU multiple precision complex arithmetic library, needed for arbitrary precision complex number support.
- **[double-conversion]** — efficient number-to-text conversion.
- **[Rmath]** — basic RNGs and distributions.

Expand Down Expand Up @@ -181,6 +182,7 @@ Julia uses the following external libraries, which are automatically downloaded
[readline]: http:https://cnswww.cns.cwru.edu/php/chet/readline/rltop.html
[GMP]: http:https://gmplib.org/
[MPFR]: http:https://www.mpfr.org/
[MPC]: http:https://www.multiprecision.org/
[double-conversion]: http:https://double-conversion.googlecode.com/
[Rmath]: http:https://cran.r-project.org/doc/manuals/R-admin.html#The-standalone-Rmath-library
[libuv]: https://github.com/JuliaLang/libuv
Expand Down
1 change: 1 addition & 0 deletions deps/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
/libunwind-*
/lighttpd-*
/llvm-*
/mpc-*
/mpfr-*
/openblas-*
/patchelf-*
Expand Down
46 changes: 44 additions & 2 deletions deps/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ ifeq ($(OS),WINNT)
CONFIGURE_COMMON += LDFLAGS=-Wl,--stack,8388608
endif

#autoconf configure-driven scripts: llvm readline pcre arpack fftw unwind gmp mpfr patchelf
#autoconf configure-driven scripts: llvm readline pcre arpack fftw unwind gmp mpfr mpc patchelf
#custom configure-driven script: zlib
#custom Makefile rules: openlibm Rmath double-conversion random suitesparse-wrapper suitesparse lapack openblas uv

Expand Down Expand Up @@ -106,6 +106,10 @@ ifeq ($(USE_SYSTEM_MPFR), 0)
STAGE1_DEPS += mpfr
endif

ifeq ($(USE_SYSTEM_MPC), 0)
STAGE1_DEPS += mpc
endif

ifeq ($(USE_SYSTEM_ARPACK), 0)
STAGE2_DEPS += arpack
endif
Expand Down Expand Up @@ -138,7 +142,7 @@ install: $(addprefix install-, $(LIBS))
cleanall: $(addprefix clean-, $(LIBS))
distclean: $(addprefix distclean-, $(LIBS))
rm -rf $(BUILD)
getall: get-llvm get-readline get-uv get-pcre get-double-conversion get-openlibm get-random get-openblas get-fftw get-suitesparse get-unwind get-gmp get-mpfr get-zlib get-patchelf
getall: get-llvm get-readline get-uv get-pcre get-double-conversion get-openlibm get-random get-openblas get-fftw get-suitesparse get-unwind get-gmp get-mpfr get-mpc get-zlib get-patchelf

## PATHS ##
DIRS = $(addprefix $(BUILD)/,lib include bin share etc)
Expand Down Expand Up @@ -1224,6 +1228,44 @@ compile-mpfr: $(MPFR_SRC_TARGET)
check-mpfr: mpfr-$(MPFR_VER)/checked
install-mpfr: $(MPFR_OBJ_TARGET)

## MPC ##

MPC_SRC_TARGET = mpc-$(MPC_VER)/.libs/libmpc.$(SHLIB_EXT)
MPC_OBJ_TARGET = $(BUILD)/lib/libmpc.$(SHLIB_EXT)

mpc-$(MPC_VER).tar.gz:
$(WGET_DASH_O) $@ http:https://www.multiprecision.org/mpc/download/$@
mpc-$(MPC_VER)/configure: mpc-$(MPC_VER).tar.gz
tar zxf $<
touch -c $@
mpc-$(MPC_VER)/config.status: mpc-$(MPC_VER)/configure
cd mpc-$(MPC_VER) && \
./configure $(CONFIGURE_COMMON) F77= --enable-shared --disable-static
touch -c $@
$(MPC_SRC_TARGET): mpc-$(MPC_VER)/config.status
$(MAKE) -C mpc-$(MPC_VER) $(LIBTOOL_CCLD)
mpc-$(MPC_VER)/checked: $(MPC_SRC_TARGET)
ifeq ($(OS),$(BUILD_OS))
$(MAKE) -C mpc-$(MPC_VER) $(LIBTOOL_CCLD) check
endif
echo 1 > $@
$(MPC_OBJ_TARGET): $(MPC_SRC_TARGET) mpc-$(MPC_VER)/checked
$(MAKE) -C mpc-$(MPC_VER) $(LIBTOOL_CCLD) install
$(INSTALL_NAME_CMD)libmpc.dylib $@
touch -c $@

clean-mpc:
-$(MAKE) -C mpc-$(MPC_VER) clean
-rm -f $(MPC_OBJ_TARGET)
distclean-mpc:
-rm -rf mpc-$(MPC_VER).tar.gz mpc-$(MPC_VER)

get-mpc: mpc-$(MPC_VER).tar.gz
configure-mpc: mpc-$(MPC_VER)/config.status
compile-mpc: $(MPC_SRC_TARGET)
check-mpc: mpc-$(MPC_VER)/checked
install-mpc: $(MPC_OBJ_TARGET)

## ZLIB ##

ifeq ($(OS),WINNT)
Expand Down
1 change: 1 addition & 0 deletions deps/Versions.make
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ SUITESPARSE_VER = 4.2.0
UNWIND_VER = 1.1
GMP_VER=5.1.1
MPFR_VER=3.1.2
MPC_VER = 1.0.1
ZLIB_VER = 1.2.7
PATCHELF_VER = 0.6
GIT_VER = 1.8.2.1

0 comments on commit 6762def

Please sign in to comment.