summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-10-14 00:51:22 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-10-14 00:51:22 (EDT)
commit73f0fa926d84f08a478fcae060f6173b43640e70 (patch)
treedc70d3f83f0942e3a5d273ba35c55d1a3fb9678d
parent745e4e978d0bfd001d406ab3cbbdb77cf49fc24e (diff)
downloadtimeteller-73f0fa926d84f08a478fcae060f6173b43640e70.zip
timeteller-73f0fa926d84f08a478fcae060f6173b43640e70.tar.gz
timeteller-73f0fa926d84f08a478fcae060f6173b43640e70.tar.bz2
build: Fix library linking
-rw-r--r--Makefile.am3
-rw-r--r--configure.ac9
2 files changed, 9 insertions, 3 deletions
diff --git a/Makefile.am b/Makefile.am
index e2ed1b2..8bbc207 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -52,6 +52,9 @@ timeteller_CPPFLAGS = \
-DPROGRAM_NAME=\"timeteller\" \
$(LIBPNG_CFLAGS)
timeteller_LDADD = \
+ $(CURSES_LIBS) \
+ $(FLITE_LIBS) \
+ $(FLITE_CMU_US_SLT_LIBS) \
$(ASAN_CFLAGS)
timeteller_LINK = $(LINK) version.c
EXTRA_timeteller_DEPENDENCIES = version.c
diff --git a/configure.ac b/configure.ac
index 3c6af94..b221f7e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -84,14 +84,17 @@ if test "x${address_sanitization}" = 'xyes'; then
fi
AC_CHECK_LIB([curses], [initscr],
- [timeteller_LDADD="-lcurses ${timeteller_LDADD}"],
+ [CURSES_LIBS=-lcurses],
[AC_MSG_ERROR([No library -lcurses found])])
+AC_SUBST([CURSES_LIBS])
AC_CHECK_LIB([flite], [flite_init],
- [timeteller_LDADD="-lflite ${timeteller_LDADD}"],
+ [FLITE_LIBS=-lflite],
[AC_MSG_ERROR([No library -lflite found])])
+AC_SUBST([FLITE_LIBS])
AC_CHECK_LIB([flite_cmu_us_slt], [register_cmu_us_slt],
- [timeteller_LDADD="-lflite_cmu_us_slt ${timeteller_LDADD}"],
+ [FLITE_CMU_US_SLT_LIBS=-lflite_cmu_us_slt],
[AC_MSG_ERROR([No library -lflite_cmu_us_slt found])])
+AC_SUBST([FLITE_CMU_US_SLT_LIBS])
AC_CONFIG_FILES([Makefile])
AC_CONFIG_HEADERS([config.h])