On systems like Solaris where the ncurses include directory is in an alternate
location, the LIBNCURSES_CFLAGS mechanism fails to substitute the modified
CPPFLAGS in the generated Makefile.

This used to work on tmux 2.2:

  % LIBNCURSES_CFLAGS=-I/usr/include/ncurses \
    LIBNCURSES_LIBS="-L/usr/lib/64 -lncurses" \
    ./configure

You can see in configure.ac where $CPPFLAGS is modified when LIBNCURSES_CFLAGS
is present:

   if test "x$found_ncurses" = xyes; then
        CPPFLAGS="$LIBNCURSES_CFLAGS $LIBTINFO_CFLAGS $CPPFLAGS"

but it is subsequently clobbered without being used:

   # Save our CFLAGS/CPPFLAGS/LDFLAGS for the Makefile and restore the old user
   # variables.
   AC_SUBST(AM_CPPFLAGS)
   CPPFLAGS="$SAVED_CPPFLAGS"


diff --git a/configure.ac b/configure.ac
index dcf62ab..2bc61ce 100644
--- a/configure.ac
+++ b/configure.ac
@@ -628,7 +628,7 @@ AM_CONDITIONAL(IS_UNKNOWN, test "x$PLATFORM" = xunknown)
 
 # Save our CFLAGS/CPPFLAGS/LDFLAGS for the Makefile and restore the old user
 # variables.
-AC_SUBST(AM_CPPFLAGS)
+AC_SUBST(AM_CPPFLAGS, [$CPPFLAGS])
 CPPFLAGS="$SAVED_CPPFLAGS"
 AC_SUBST(AM_CFLAGS)
 CFLAGS="$SAVED_CFLAGS"


    


-- 
You received this message because you are subscribed to the Google Groups 
"tmux-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to