From 73f0fa926d84f08a478fcae060f6173b43640e70 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Mon, 14 Oct 2019 00:51:22 -0400 Subject: build: Fix library linking --- 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]) -- cgit v0.9.1