Multiple Precision Integers and Rationals
C Assembly Makefile Python ActionScript C++ Other
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
build.vc10
build.vc11
build.vc12
build.vc14
cxx
doc
fft
mpf
mpn
mpq
mpz
printf
scanf
tests
tune
yasm
.gdbinit
AUTHORS
COPYING
COPYING.LIB
ChangeLog
INSTALL
INSTALL.autoconf
Makefile.am
Makefile.in
NEWS
README
README.md
acinclude.m4
aclocal.m4
assert.c
compat.c
compile
config.guess
config.in
config.sub
configfsf.guess
configfsf.sub
configure
configure.ac
configure.yasm
cpuid.c
errno.c
extract-dbl.c
gmp-h.in
gmp-impl.h
gpl-2.0.txt
install-sh
invalid.c
lgpl-2.1.txt
longlong_post.h
longlong_pre.h
ltmain.sh
memory.c
missing
mp_bpl.c
mp_clz_tab.c
mp_dv_tab.c
mp_get_fns.c
mp_minv_tab.c
mp_set_fns.c
mpirxx.h
nextprime.c
primesieve.c
randbui.c
randclr.c
randdef.c
randiset.c
randlc2s.c
randlc2x.c
randmt.c
randmt.h
randmts.c
randmui.c
rands.c
randsd.c
randsdui.c
strip_fPIC.sh
tal-debug.c
tal-notreent.c
tal-reent.c
test-driver
version.c
yasm_mac.inc.fat
yasm_mac.inc.nofat
yasm_macwin.inc.fat
yasm_macwin.inc.nofat
ylwrap

README.md

MPIR

MPIR is built using VC9/VC11 projects files. No patch are necessary but to rename the library to mpir__a.lib. Follow the instructions in the readme.txt in the MPIR sources and build “lib_mpir_p4” to get the static library we use for PHP.

To build an ASM optimized version, you will have to install Yasm assembler. Complete instructions are available here.

Building for PHP

PHP 5.4 and below requires the VC9 build of the MPIR library.
PHP 5.5 and above requires the VC11 build of the MPIR library.

  • cd win/
  • 32 bit
    • configure --cpu=x86
  • 64 bit
    • configure --cpu=x86_64
  • building
    • make
    • OR
    • make.vc11

NOTE

If you plan to run PHP on a specific platform, the MPIR library can use the optimized assembler files. For more information on supported platforms see mpn\README.