Use BUILD_CPPFLAGS variable to override CPPFLAGS where necessary in case of cross compiling, in addition to CC_FOR_BUILD, BUILD_CFLAGS, and BUILD_LDFLAGS variables introduced earlier to override CC, CFLAGS, and LDFLAGS, respectively.
* configure.in (BUILD_CPPFLAGS): Define. * doc/specs/Makefile.am (CPPFLAGS): Define to @BUILD_CPPFLAGS@. --- configure.in | 9 +++++++++ doc/specs/Makefile.am | 1 + 2 files changed, 10 insertions(+)
diff --git a/configure.in b/configure.in index 2597802..6797e2f 100644 --- a/configure.in +++ b/configure.in @@ -144,6 +144,15 @@ AC_MSG_CHECKING([for CC_FOR_BUILD]) AC_MSG_RESULT([$CC_FOR_BUILD]) AC_SUBST(CC_FOR_BUILD)
+if test "x${BUILD_CPPFLAGS+set}" != "xset" ; then + if test "x$cross_compiling" = "xyes" ; then + BUILD_CPPFLAGS= + else + BUILD_CPPFLAGS=${CPPFLAGS} + fi +fi +AC_SUBST(BUILD_CPPFLAGS) + if test "x${BUILD_CFLAGS+set}" != "xset" ; then if test "x$cross_compiling" = "xyes" ; then BUILD_CFLAGS= diff --git a/doc/specs/Makefile.am b/doc/specs/Makefile.am index 36d53ba..99ecc70 100644 --- a/doc/specs/Makefile.am +++ b/doc/specs/Makefile.am @@ -12,6 +12,7 @@ draft-morgan-pam-current.txt: padout draft-morgan-pam.raw AM_YFLAGS = -d
CC = @CC_FOR_BUILD@ +CPPFLAGS = @BUILD_CPPFLAGS@ CFLAGS = @BUILD_CFLAGS@ LDFLAGS = @BUILD_LDFLAGS@
On St, 2014-12-10 at 04:02 +0300, Dmitry V. Levin wrote:
Use BUILD_CPPFLAGS variable to override CPPFLAGS where necessary in case of cross compiling, in addition to CC_FOR_BUILD, BUILD_CFLAGS, and BUILD_LDFLAGS variables introduced earlier to override CC, CFLAGS, and LDFLAGS, respectively.
OK
pam-developers@lists.fedorahosted.org