summaryrefslogtreecommitdiff
path: root/src/Makefile.am
diff options
context:
space:
mode:
authorJames Youngman <jay@gnu.org>2008-07-31 09:58:10 +0200
committerJim Meyering <meyering@redhat.com>2008-08-01 11:15:05 +0200
commit00c6aacf318a6ef0db4895b08d572d924eab90d0 (patch)
treee53d30cb5bd35e02b7d26401da670e75b691f070 /src/Makefile.am
parent8d974b00fbbc2025de63e1e6d54827648fefa1c4 (diff)
downloadcoreutils-00c6aacf318a6ef0db4895b08d572d924eab90d0.tar.xz
factor arbitrarily large numbers
* m4/gmp.m4: New file; adds cu_GMP, which detects GNU MP. * configure.ac: Use cu_GMP. * src/Makefile.am: Link factor against libgmp if available. * src/factor.c: Use GNU MP if it is available. (emit_factor, emit_ul_factor, factor_using_division, factor_using_pollard_rho, extract_factors_multi, sort_and_print_factors, free_factors): new functions for the arbitrary-precision implementation, taken from an example in GNU MP. (factor_wheel): Renamed; was called factor. (print_factors_single): Renamed; was called print_factors. (print_factors): New function, chooses between the single- and arbitrary-precision algorithms according to availability of GNU MP and the length of the number to be factored. (usage, main): New options --bignum and --no-bignum. * coreutils.texi (factor invocation): Document new command-line options for the MP implementation and update the performance numbers to take into account the asymptotically faster algorithm. * TODO: Remove item about factoring large primes (it's done). * m4/gmp.m4: Add support for --without-gmp. * NEWS: Mention the new feature.
Diffstat (limited to 'src/Makefile.am')
-rw-r--r--src/Makefile.am3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 65b20a2a3..f464a70a7 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -129,6 +129,9 @@ seq_LDADD = $(LDADD) $(POW_LIB)
# and the `nanosleep' reference in lib/xnanosleep.c.
nanosec_libs = $(LDADD) $(POW_LIB) $(LIB_NANOSLEEP)
+# for various GMP functions
+factor_LDADD = $(LDADD) $(LIB_GMP)
+
sleep_LDADD = $(nanosec_libs)
tail_LDADD = $(nanosec_libs)