ncurses-6.0-cppflags-cross.patch 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. https://bugs.gentoo.org/601426
  2. https://lists.gnu.org/archive/html/bug-ncurses/2015-02/msg00012.html
  3. From: John Vogel
  4. Subject: [PATCH] c++ binding missed when cross compiling
  5. Date: Mon, 16 Feb 2015 01:01:48 -0500
  6. The configure script hard codes the include dir to the prefix'ed include dir,
  7. when checking if c++ compiler works. This breaks the compiler's built-in search
  8. path. I've included two patches. The first works on the configure.in file, which
  9. requires your autoconf stuff to test and I'm not ready to meddle with at the
  10. moment. The other works directly on the configure file. I've tested the second
  11. one; it should mirror what the first patch tries to achieve and works for me.
  12. --- a/configure
  13. +++ b/configure
  14. @@ -2938,10 +2938,6 @@
  15. echo "$as_me:2938: checking if $CXX works" >&5
  16. echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
  17. - save_CPPFLAGS="$CPPFLAGS"
  18. - eval cf_includedir=${includedir}
  19. - CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
  20. -
  21. cat >conftest.$ac_ext <<_ACEOF
  22. #line 2946 "configure"
  23. #include "confdefs.h"
  24. @@ -2978,7 +2974,6 @@
  25. cf_cxx_works=no
  26. fi
  27. rm -f conftest.$ac_objext conftest.$ac_ext
  28. - CPPFLAGS="$save_CPPFLAGS"
  29. echo "$as_me:2983: result: $cf_cxx_works" >&5
  30. echo "${ECHO_T}$cf_cxx_works" >&6