aboutsummaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorThorsten Kukuk <kukuk@thkukuk.de>2010-10-01 11:05:45 +0000
committerThorsten Kukuk <kukuk@thkukuk.de>2010-10-01 11:05:45 +0000
commitc388a2730d012b5101d264c83f8db586acd3a70c (patch)
tree5fa237781f017661d53554814a50627ab450eb87 /configure.in
parente39126075bf9c8434a9ad4197a4869444afa23cb (diff)
downloadpam-c388a2730d012b5101d264c83f8db586acd3a70c.tar.gz
pam-c388a2730d012b5101d264c83f8db586acd3a70c.tar.bz2
pam-c388a2730d012b5101d264c83f8db586acd3a70c.zip
Relevant BUGIDs: #3078936
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
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in35
1 files changed, 29 insertions, 6 deletions
diff --git a/configure.in b/configure.in
index ce844702..76fac05f 100644
--- a/configure.in
+++ b/configure.in
@@ -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