From ef5993babaa0fff2a33030bc01374a5ba2ee066e Mon Sep 17 00:00:00 2001 From: Eric Berquist Date: Wed, 6 Mar 2024 13:53:00 -0700 Subject: [PATCH] update autotools usage of older ncurses --- config/sst_check_curses.m4 | 9 ++++++--- src/sst/core/Makefile.am | 1 - 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/config/sst_check_curses.m4 b/config/sst_check_curses.m4 index 7d18a3b5c..8f398ac90 100644 --- a/config/sst_check_curses.m4 +++ b/config/sst_check_curses.m4 @@ -28,9 +28,13 @@ AC_DEFUN([SST_CHECK_CURSES], AS_IF([test $NCURSES_CONFIG_EXE = "no"], [AC_MSG_ERROR([Unable to locate ncurses6-config utility])]) + dnl Older versions only have --libs, not --libs-only-l and --libs-only-L, + dnl which combines the two. Ideally, CURSES_LDFLAGS (sstinfo_x_LDFLAGS) + dnl contains --libs-only-L and CURSES_LIBS (sstinfo_x_LDADD) contains + dnl --libs-only-l, but rather than complicated logic testing the above, + dnl combining everything into LDADD seems acceptable.. CURSES_CPPFLAGS=`$NCURSES_CONFIG_EXE --cflags` - CURSES_LDFLAGS=`$NCURSES_CONFIG_EXE --libs-only-L` - CURSES_LIBS=`$NCURSES_CONFIG_EXE --libs-only-l` + CURSES_LIBS=`$NCURSES_CONFIG_EXE --libs` CPPFLAGS_saved="$CPPFLAGS" LDFLAGS_saved="$LDFLAGS" @@ -44,7 +48,6 @@ dnl Check for header LDFLAGS="$LDFLAGS_saved" AC_SUBST([CURSES_CPPFLAGS]) - AC_SUBST([CURSES_LDFLAGS]) AC_SUBST([CURSES_LIBS]) AS_IF([test "x$sst_check_curses_happy" = "xyes"], [AC_DEFINE([HAVE_CURSES], [1], [Defines whether we have the curses library])]) AM_CONDITIONAL([USE_CURSES], [test "x$sst_check_curses_happy" = "xyes"]) diff --git a/src/sst/core/Makefile.am b/src/sst/core/Makefile.am index 6fab1b58b..e914b2130 100644 --- a/src/sst/core/Makefile.am +++ b/src/sst/core/Makefile.am @@ -344,7 +344,6 @@ endif if USE_CURSES AM_CPPFLAGS += $(CURSES_CPPFLAGS) sstinfo_x_LDADD += $(CURSES_LIBS) -sstinfo_x_LDFLAGS += $(CURSES_LDFLAGS) endif if USE_HDF5