Skip to content

Commit

Permalink
Fix examples FTBFS for --enable-termcap builds
Browse files Browse the repository at this point in the history
Signed-off-by: Joachim Nilsson <[email protected]>
  • Loading branch information
troglobit committed Oct 27, 2015
1 parent cbb5dd0 commit 8439f42
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ AC_ARG_ENABLE(termcap,
[AS_HELP_STRING([--enable-termcap], [Use termcap library to query terminal size.])],
AC_DEFINE([CONFIG_USE_TERMCAP], 1, [Define to use the termcap library for terminal size.]))

AM_CONDITIONAL([USE_LIBTERMCAP], [test "$enable_termcap" != no])
AM_CFLAGS="-std=gnu99 $inline_cflags -W -Wall -Wundef -Wunused -Wstrict-prototypes -Werror-implicit-function-declaration $nopointersign_cflags -Wshadow -Wcast-qual"
AC_SUBST(AM_CFLAGS)

Expand Down
7 changes: 6 additions & 1 deletion examples/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
AUTOMAKE_OPTIONS = foreign

noinst_PROGRAMS = testit cli
LDADD = $(top_builddir)/src/libeditline.la $(TERMLIBS)
LDADD = $(top_builddir)/src/libeditline.la
AM_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/include
AM_LDFLAGS = -static

if USE_LIBTERMCAP
LDADD += -ltermcap
endif

0 comments on commit 8439f42

Please sign in to comment.