Relevant BUGIDs: #3078936
authorThorsten Kukuk <kukuk@thkukuk.de>
Fri, 1 Oct 2010 11:05:45 +0000 (11:05 +0000)
committerThorsten Kukuk <kukuk@thkukuk.de>
Fri, 1 Oct 2010 11:05:45 +0000 (11:05 +0000)
Purpose of commit: bugfix

Commit summary:
---------------

2010-10-01  Thorsten Kukuk  <kukuk@thkukuk.de>

        * configure.in: Extend cross compiling check.
        * doc/specs/Makefile.am: Set CFLAGS and LDFLAGS to BUILD_CFLAGS
        and BUILD_LDFLAGS.
        Bug #3078936 / gentoo #339174

ChangeLog
configure.in
doc/specs/Makefile.am

index a073b58767bed658e5f521cc5c627122ae5d8e65..7473934bcebefbcce8a79ba425230506f91f3071 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-10-01  Thorsten Kukuk  <kukuk@thkukuk.de>
+
+       * configure.in: Extend cross compiling check.
+       * doc/specs/Makefile.am: Set CFLAGS and LDFLAGS to BUILD_CFLAGS
+       and BUILD_LDFLAGS.
+       Bug #3078936 / gentoo #339174
+
 2010-09-30  Thorsten Kukuk  <kukuk@thkukuk.de>
 
        * modules/pam_xauth/pam_xauth.c (pam_sm_close_session): Warn if
index ce844702d38a0d6b65f47a5051423c9eb67e3642..76fac05f483eba2c693472e5d06152d48df35987 100644 (file)
@@ -86,12 +86,6 @@ AM_PROG_CC_C_O
 PAM_LD_AS_NEEDED
 PAM_LD_O1
 
-if test x"$cross_compiling" = xyes; then
-       AC_CHECK_PROGS(CC_FOR_BUILD, gcc cc)
-else
-       CC_FOR_BUILD="$CC"
-fi
-
 dnl Largefile support
 AC_SYS_LARGEFILE
 
@@ -134,6 +128,35 @@ if eval "test x$CC = xicc"; then
   done
 fi
 
+if test "x${CC_FOR_BUILD+set}" != "xset" ; then
+  if test "x$cross_compiling" = "xyes" ; then
+    AC_CHECK_PROGS(CC_FOR_BUILD, gcc cc)
+  else
+    CC_FOR_BUILD=${CC}
+  fi
+fi
+AC_MSG_CHECKING([for CC_FOR_BUILD])
+AC_MSG_RESULT([$CC_FOR_BUILD])
+AC_SUBST(CC_FOR_BUILD)
+
+if test "x${BUILD_CFLAGS+set}" != "xset" ; then
+  if test "x$cross_compiling" = "xyes" ; then
+    BUILD_CFLAGS=
+  else
+    BUILD_CFLAGS=${CFLAGS}
+  fi
+fi
+AC_SUBST(BUILD_CFLAGS)
+
+if test "x${BUILD_LDFLAGS+set}" != "xset" ; then
+  if test "x$cross_compiling" = "xyes" ; then
+    BUILD_LDFLAGS=
+  else
+    BUILD_LDFLAGS=${LDFLAGS}
+  fi
+fi
+AC_SUBST(BUILD_LDFLAGS)
+
 AC_C___ATTRIBUTE__
 
 dnl
index d92ddd38d138eab0117a0134dd6822ca1d509e96..26882207664a7aee91e9548961ffc79cd55cf17b 100644 (file)
@@ -12,6 +12,8 @@ draft-morgan-pam-current.txt: padout draft-morgan-pam.raw
 AM_YFLAGS = -d
 
 CC = @CC_FOR_BUILD@
+CFLAGS = @BUILD_CFLAGS@
+LDFLAGS = @BUILD_LDFLAGS@
 
 BUILT_SOURCES = parse_y.h