Fix --with-curses configure option.
authorAndre Noll <maan@systemlinux.org>
Sun, 3 Jun 2012 20:42:42 +0000 (22:42 +0200)
committerAndre Noll <maan@systemlinux.org>
Sun, 23 Dec 2012 14:03:09 +0000 (15:03 +0100)
We only honored the provided -L<dir> for the tests in configure but
not when linking para_gui. This patch creates an output variable,
gui_ldflags, which is used in the Makefile for linking para_gui.

Makefile.in
configure.ac

index d577ce295c540ecc91ce8134a33a4d62db070168..173b81a3bc2b5be74a8e53ee48ff62c8fd19eeac 100644 (file)
@@ -256,7 +256,7 @@ para_client: $(client_objs)
 
 para_gui: $(gui_objs)
        @[ -z "$(Q)" ] || echo 'LD $@'
-       $(Q) $(CC) $(LDFLAGS) -o $@ $(gui_objs) -lcurses
+       $(Q) $(CC) $(LDFLAGS) -o $@ $(gui_objs) @gui_ldflags@
 
 para_audiod: $(audiod_objs)
        @[ -z "$(Q)" ] || echo 'LD $@'
index b987574746a0c72d0cd8fb0e215e7b8d13097382..760a52a700040442b8722e9cbc5f82980e8f1507 100644 (file)
@@ -475,6 +475,7 @@ AC_CHECK_LIB([curses], [initscr], [], [
        have_curses="no"
 ])
 if test "$have_curses" = "yes"; then
+       gui_ldflags="$curses_libs -lcurses"
        AC_SUBST(curses_cppflags)
        AC_DEFINE(HAVE_NCURSES, 1, [define to 1 to turn on curses support])
        extras="$extras gui"
@@ -1243,6 +1244,7 @@ AC_DEFINE_UNQUOTED(INIT_AUDIOC_ERRLISTS,
        objlist_to_errlist($audioc_errlist_objs), errors used by para_audioc)
 
 AC_SUBST(gui_objs, add_dot_o($gui_objs))
+AC_SUBST(gui_ldflags, $gui_ldflags)
 AC_DEFINE_UNQUOTED(INIT_GUI_ERRLISTS,
        objlist_to_errlist($gui_errlist_objs), errors used by para_gui)