New function and example program computes Fibonacci numbers fairly fast.
[u/mdw/catacomb] / Makefile.m4
index 1ef5632..d05e6ee 100644 (file)
@@ -26,8 +26,6 @@
 ## Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
 ## MA 02111-1307, USA.
 
-AUTOMAKE_OPTIONS = foreign
-
 SUBDIRS = tests
 
 archincludedir = $(libdir)/catacomb/include
@@ -164,7 +162,7 @@ BUILT_SOURCES = \
 lib_LTLIBRARIES = libcatacomb.la
 
 libcatacomb_la_LIBADD = $(CATACOMB_LIBS)
-libcatacomb_la_LDFLAGS = -version-info 3:1:1
+libcatacomb_la_LDFLAGS = -version-info $(LIBTOOL_VERSION_INFO)
 ## Middle number is the patchlevel.  Final number is the minor version.  The
 ## difference between the first and last numbers is major version.
 
@@ -175,7 +173,7 @@ pkginclude_HEADERS = \
        key.h key-error.h key-data.h passphrase.h pixie.h lmem.h \
        mpx.h bitops.h mpw.h mpscan.h mparena.h mp.h mptext.h mpint.h \
        exp.h mpbarrett.h mpmont.h mpreduce.h mp-exp.h \
-       mpcrt.h mprand.h mpmul.h \
+       mpcrt.h mprand.h mpmul.h mp-fibonacci.h \
        gfx.h gf.h gfreduce.h gfn.h gf-exp.h \
        primetab.h wheel.h pfilt.h rabin.h \
        pgen.h primeiter.h prim.h strongprime.h limlee.h keycheck.h \
@@ -202,7 +200,7 @@ define(`MP_SOURCES',
        mp-sqrt.c mp-gcd.c mp-jacobi.c mp-modsqrt.c mp-exp.c mp-modexp.c \
        mpint.c mptext-file.c mptext-dstr.c \
        mptext-len.c \
-       exp.c mpcrt.c mpmul.c mprand.c \
+       exp.c mpcrt.c mpmul.c mprand.c mp-fibonacci.c \
        mpbarrett.c mpbarrett-exp.c mpbarrett-mexp.c mpbarrett-exp.h \
        mpmont.c mpmont-exp.c mpmont-mexp.c mpmont-exp.h \
        mpreduce.c mpreduce-exp.h \
@@ -275,7 +273,7 @@ gfx-sqr.lo: gfx-sqr-tab.h
 ## --- Utility programs ---
 
 bin_PROGRAMS = \
-       dsig key pixie cookie rspit factorial hashsum mkphrase \
+       dsig key pixie cookie rspit factorial fibonacci hashsum mkphrase \
        catcrypt catsign
 noinst_LIBRARIES = libcatcrypt.a
 pkgconfigdir = $(libdir)/pkgconfig
@@ -287,7 +285,8 @@ noinst_PROGRAMS = \
 LDADD = libcatcrypt.a libcatacomb.la
 
 define(`LIBCAT_SRC', `cc.h getdate.h dnl
-       cc-sig.c cc-subcmd.c cc-enc.c cc-kem.c cc-list.c cc-progress.c')
+       cc-sig.c cc-subcmd.c cc-enc.c cc-kem.c cc-hash.c \
+       cc-list.c cc-progress.c')
 libcatcrypt_a_SOURCES = LIBCAT_SRC getdate.y
 
 patsubst(MP_BASE MP_SOURCES, `\.c\>', `.lo') dsig.o keyutil.o rspit.o \
@@ -303,6 +302,7 @@ key_SOURCES = keyutil.c
 hashsum_SOURCES = hashsum.c
 rspit_SOURCES = rspit.c
 factorial_SOURCES = factorial.c
+fibonacci_SOURCES = fibonacci.c
 perftest_SOURCES = perftest.c
 perftest_LDADD = $(CATACOMB_LIBS) $(LDADD)
 pixie_SOURCES = pixie.c pixie-common.c lmem.c arena.c passphrase.c
@@ -365,7 +365,7 @@ man_MANS = \
 
 ## --- Prime group keyring ---
 
-pkgdata_DATA = pgroups.kr
+#pkgdata_DATA = pgroups.kr
 
 $(srcdir)/pgroups.kr: ptab.in mkpgroups
        cd $(srcdir) && rm -f pgroups.kr && ./mkpgroups <ptab.in
@@ -376,7 +376,7 @@ EXTRA_DIST = \
        Makefile.m4 genmodes gengctab $(man_MANS) xpixie \
        group-test.c rsa-test.c \
        ectab.in ec-gentab.awk \
-       ptab.in p-gentab.awk mkpgroups pgroups.kr \
+       ptab.in p-gentab.awk mkpgroups \
        bintab.in bin-gentab.awk \
        README.cipher README.hash README.random README.mp \
        debian/rules debian/copyright debian/control debian/changelog \
@@ -387,6 +387,7 @@ dist-hook:
        @for i in getdate.c gciphertab.c ghashtab.c gmactab.c; do \
          ln $$i $(distdir) || ln $(srcdir)/$$i $(distdir) || true; \
        done
+       echo $(VERSION) >$(distdir)/RELEASE
        @echo datestamp >$(distdir)/modes-stamp || true
        @for i in calc tests; do \
          mkdir $(distdir)/$$i; \
@@ -440,6 +441,7 @@ CTESTRIG(mpmont-mexp)
 CTESTRIG(mpreduce)
 CTESTRIG(mpcrt)
 CTESTRIG(mpmul)
+CTESTRIG(mp-fibonacci)
 CTESTRIG(rsa-test)
 CTESTRIG(gfx)
 CTESTRIG(gfx-sqr)
@@ -471,7 +473,8 @@ TESTS = serpent-check bittest testprogs
 
 CLEANFILES = \
        *.t$(EXEEXT) *.to *.kr.old \
-       mptypes.h primetab.c primetab.h wheel.c wheel.h \
+       mptypes.h mplimits.c mplimits.h \
+       primetab.c primetab.h wheel.c wheel.h \
        ectab.c ptab.c bintab.c \
        addsuffix(`gen_tables', `-tab.h')