Makefile.am, configure.ac, progs/Makefile.am: Link math library explicitly.
authorMark Wooding <mdw@distorted.org.uk>
Wed, 16 Jul 2014 09:11:37 +0000 (10:11 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Wed, 16 Jul 2014 09:13:37 +0000 (10:13 +0100)
Rename `CATACOMB_LIBS' to `MATHLIBS' and use it explicitly in some of
the utility builds.

If the main library needs more library dependencies then it'll probably
be best to sort them out in the Makefile.

Makefile.am
configure.ac
progs/Makefile.am

index fb8d644..d18ac3a 100644 (file)
@@ -34,7 +34,7 @@ SUBDIRS                        =
 
 lib_LTLIBRARIES                 = libcatacomb.la
 libcatacomb_la_LDFLAGS  = -version-info $(LIBTOOL_VERSION_INFO)
-libcatacomb_la_LIBADD   = $(CATACOMB_LIBS) $(mLib_LIBS)
+libcatacomb_la_LIBADD   = $(MATHLIBS) $(mLib_LIBS)
 libcatacomb_la_SOURCES  =
 
 ## Basic utilities.
index dc7434a..2b77ab4 100644 (file)
@@ -56,10 +56,10 @@ AC_CHECK_TYPE([ssize_t], [int])
 AC_CHECK_TYPE([socklen_t], [int])
 
 dnl The maths library.
-mdw_ORIG_LIBS=$LIBS
+mdw_ORIG_LIBS=$LIBS LIBS=
 AC_SEARCH_LIBS([log], [m])
 AC_SEARCH_LIBS([sqrt], [m])
-AC_SUBST([CATACOMB_LIBS], [$LIBS])
+AC_SUBST([MATHLIBS], [$LIBS])
 LIBS=$mdw_ORIG_LIBS
 
 dnl Find out whether very long integer types are available.
index 4d1dbd9..883174d 100644 (file)
@@ -92,9 +92,11 @@ dist_man_MANS                += key.1 keyring.5
 ## Generate passphrases with given entropy using wordlists and Markov models.
 bin_PROGRAMS           += mkphrase
 dist_man_MANS          += mkphrase.1
+mkphrase_LDADD          = $(LDADD) $(MATHLIBS)
 
 ## Performance testing.
 bin_PROGRAMS           += perftest
+perftest_LDADD          = $(LDADD) $(MATHLIBS)
 
 ## Remember passphrases for limited periods of time.
 bin_PROGRAMS           += pixie