AS_IF(
[test "$need_curses" = "yes" -o "$need_curses" = "auto"],
[AC_SUBST([CURSES_LOC])
+ AC_SUBST([ncurses_LIBS])
+ LIBS_old="$LIBS"
AC_CHECK_HEADERS(
[ncurses/ncurses.h ncurses/curses.h ncursesw/curses.h ncurses.h curses.h],
[CURSES_LOC=$ac_header; break])
[AS_IF(
[test "$need_curses" = "yes"],
[AC_MSG_ERROR([could not find curses library (frontends: mconf/nconf)])],
- [has_curses=no])])])
+ [has_curses=no])])
+ ncurses_LIBS="$LIBS"
+ LIBS=$LIBS_old])
AS_IF(
[test "$has_curses" = "no" ],
AS_IF(
[test "$need_panel_menu" = "yes" -o "$need_panel_menu" = "auto"],
- [AC_SEARCH_LIBS(
+ [AC_SUBST([ncurses_extra_LIBS])
+ LIBS_old="$LIBS"
+ AC_SEARCH_LIBS(
[new_panel],
[panel],
[ac_ct_panel_lib_found=yes; break])
[AS_IF(
[test "$need_panel_menu" = "yes"],
[AC_MSG_ERROR([could not find libmenu library (frontend: nconf)])],
- [has_panel_menu=no])])])
+ [has_panel_menu=no])])
+ ncurses_extra_LIBS="$LIBS"
+ LIBS=$LIBS_old])
AS_IF(
[test "$has_panel_menu" = "no" ],
$(GETTEXT) \
-I../../libs \
-I../../libs/parser
-mconf_LDADD = ../../libs/parser/libkconfigparser.la \
+mconf_LDADD = ${ncurses_LIBS} \
+ ../../libs/parser/libkconfigparser.la \
../../libs/lxdialog/liblxdialog.a
nconf_CPPFLAGS = $(AM_CPPFLAGS) \
$(GETTEXT) \
-I../../libs/parser
-nconf_LDADD = ../../libs/parser/libkconfigparser.la
+nconf_LDADD = ${ncurses_LIBS} ${ncurses_extra_LIBS} \
+ ../../libs/parser/libkconfigparser.la