summaryrefslogtreecommitdiff
path: root/modules/libgmp
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2020-07-06 18:54:11 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2020-07-06 19:03:03 -0700
commit3b0ef0b854a43aea12364fafd4bb053d59c116f2 (patch)
treec2d66ee7ed712b946a7db881aa15a8eb1f1eb4db /modules/libgmp
parent4cfff6810c595e60cf4411dc9bac83c0328e8812 (diff)
downloadgnulib-3b0ef0b854a43aea12364fafd4bb053d59c116f2.tar.gz
libgmp: new module
The idea is to let programs simply include <gmp.h>, and so long as they live within the mini-gmp subset they need not worry about whether the GMP libraries are installed. * MODULES.html.sh: Mention it. * config/srclist.txt: Mention files copied from GMP source. * config/srclistvars.sh (GMP): New var. * lib/mini-gmp-gnulib.c, m4/libgmp.m4, modules/libgmp: * modules/libgmp-tests, tests/test-libgmp.c: New files. * lib/mini-gmp.c, lib/mini-gmp.h: New files, copied from GMP.
Diffstat (limited to 'modules/libgmp')
-rw-r--r--modules/libgmp42
1 files changed, 42 insertions, 0 deletions
diff --git a/modules/libgmp b/modules/libgmp
new file mode 100644
index 0000000000..b686717680
--- /dev/null
+++ b/modules/libgmp
@@ -0,0 +1,42 @@
+Description:
+GNU Multiple Precision Arithmetic library, or its mini-gmp substitute
+
+Files:
+lib/mini-gmp-gnulib.c
+lib/mini-gmp.c
+lib/mini-gmp.h
+m4/libgmp.m4
+
+Depends-on:
+
+configure.ac:
+gl_LIBGMP
+if test -n "$GMP_H"; then
+ AC_LIBOBJ([mini-gmp-gnulib])
+fi
+
+Makefile.am:
+BUILT_SOURCES += $(GMP_H)
+
+# Build gmp.h as a wrapper for mini-gmp.h when using mini-gmp.
+if GL_GENERATE_GMP_H
+gmp.h: $(top_builddir)/config.status
+ echo '#include "mini-gmp.h"' >$@-t
+ mv $@-t $@
+else
+gmp.h: $(top_builddir)/config.status
+ rm -f $@
+endif
+MOSTLYCLEANFILES += gmp.h gmp.h-t
+
+Include:
+<gmp.h>
+
+Link:
+$(LIB_GMP)
+
+License:
+LGPLv3+ or GPLv2+
+
+Maintainer:
+all