summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSascha Schumann <sas@php.net>2000-05-02 21:35:08 +0000
committerSascha Schumann <sas@php.net>2000-05-02 21:35:08 +0000
commit79a89ef8fec1e190014b615b6fe282f060500d65 (patch)
tree60110d612f21c07cdd0d6aba41cf82c89d43b2d1
parent281a8aebda328ea5b7f3692a24ff146cdf29e1ce (diff)
downloadphp-git-79a89ef8fec1e190014b615b6fe282f060500d65.tar.gz
Make bcmath buildable as shared module
-rw-r--r--ext/bcmath/Makefile.in1
-rw-r--r--ext/bcmath/config.m431
2 files changed, 10 insertions, 22 deletions
diff --git a/ext/bcmath/Makefile.in b/ext/bcmath/Makefile.in
index 0c5ddf195c..4f0405cf42 100644
--- a/ext/bcmath/Makefile.in
+++ b/ext/bcmath/Makefile.in
@@ -1,5 +1,6 @@
LTLIBRARY_NAME = libbcmath.la
LTLIBRARY_SOURCES = bcmath.c number.c
+LTLIBRARY_SHARED_NAME = bcmath.la
include $(top_srcdir)/build/dynlib.mk
diff --git a/ext/bcmath/config.m4 b/ext/bcmath/config.m4
index 3ef0ba2d5a..e7b5884b02 100644
--- a/ext/bcmath/config.m4
+++ b/ext/bcmath/config.m4
@@ -1,30 +1,17 @@
dnl $Id$
-AC_MSG_CHECKING(whether to enable bc style precision math functions)
-AC_ARG_ENABLE(bcmath,
+PHP_ARG_ENABLE(bcmath,whether to enable bc style precision math functions,
[ --enable-bcmath Compile with bc style precision math functions.
Read README-BCMATH for instructions on how to
- get this module installed. ],
-[
- if test "$enableval" = "yes"; then
- AC_DEFINE(WITH_BCMATH, 1, [Whether you have bcmath])
- AC_MSG_RESULT(yes)
- PHP_EXTENSION(bcmath)
- if test -f $srcdir/ext/bcmath/number.c; then
- if grep "Dummy File" $srcdir/ext/bcmath/number.c >/dev/null; then
- AC_MSG_ERROR(You do not have the bcmath package. Please read the README-BCMATH file.)
- fi
- else
- AC_MSG_ERROR(You do not have the bcmath package. Please read the README-BCMATH file.)
- fi
- else
- AC_DEFINE(WITH_BCMATH, 0,[ ])
- AC_MSG_RESULT(no)
+ get this module installed. ])
+
+if test "$PHP_BCMATH" != "no"; then
+ AC_DEFINE(WITH_BCMATH, 1, [Whether you have bcmath])
+ PHP_EXTENSION(bcmath, $ext_shared)
+ if test ! -f $ext_srcdir/number.c || grep "Dummy File" $ext_srcdir/number.c >/dev/null; then
+ AC_MSG_ERROR(You do not have the bcmath package. Please read the README-BCMATH file.)
fi
-],[
- AC_DEFINE(WITH_BCMATH, 0,[ ])
- AC_MSG_RESULT(no)
-])
+fi
dnl ## Local Variables:
dnl ## tab-width: 4