build: Configure `pkg-config' correctly for static linking.
authorMark Wooding <mdw@distorted.org.uk>
Thu, 14 Jun 2018 10:02:09 +0000 (11:02 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Thu, 14 Jun 2018 10:15:18 +0000 (11:15 +0100)
configure.ac
progs/Makefile.am

index 142b854..af08371 100644 (file)
@@ -240,11 +240,10 @@ AC_CHECK_TYPE([socklen_t], [],
 ])
 
 dnl The maths library.
-mdw_ORIG_LIBS=$LIBS LIBS=
+mdw_ORIG_LIBS=$LIBS LIBS=$CATACOMB_LIBS
 AC_SEARCH_LIBS([log], [m])
 AC_SEARCH_LIBS([sqrt], [m])
-AC_SUBST([MATHLIBS], [$LIBS])
-LIBS=$mdw_ORIG_LIBS
+CATACOMB_LIBS=$LIBS LIBS=$mdw_ORIG_LIBS
 
 dnl Logging is weird under Termux.  Unfortunately, it involves macros, so we
 dnl have to do this the hard way.
index ff7f5f7..5f4e570 100644 (file)
@@ -33,7 +33,7 @@ UTILS_LIBS             = \
        libcatcrypt.la $(top_builddir)/libcatacomb.la \
        $(mLib_LIBS) $(LIBS)
 
-LDADD                   = $(UTILS_LIBS)
+LDADD                   = $(UTILS_LIBS) $(CATACOMB_LIBS)
 
 ###--------------------------------------------------------------------------
 ### The `catcrypt' library.
@@ -92,11 +92,9 @@ 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