summaryrefslogtreecommitdiff
path: root/source4/build/m4/check_ld.m4
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2008-02-20 19:20:13 +1100
committerAndrew Bartlett <abartlet@samba.org>2008-02-20 19:20:13 +1100
commit1c1781b2c4a09080a19f834ba947d0410b2141f7 (patch)
tree05101a73b97f40d3019066206c4ec2146b09248d /source4/build/m4/check_ld.m4
parentab915504aaa40cebe5fa09a47b2ae46f7f9f334a (diff)
downloadsamba-1c1781b2c4a09080a19f834ba947d0410b2141f7.tar.gz
samba-1c1781b2c4a09080a19f834ba947d0410b2141f7.tar.bz2
samba-1c1781b2c4a09080a19f834ba947d0410b2141f7.zip
Simpler specification of CFLAGS and LDFLAGS
By being more consistant in applying CFLAGS and LDFLAGS (in particular) to every invocation, we make it simpler to enable gcov code coverage, both in the build system and on the build farm. Andrew Bartlett (This used to be commit 8c2f658a9688f0c51d2f3b948dc3213b65c7b77f)
Diffstat (limited to 'source4/build/m4/check_ld.m4')
-rw-r--r--source4/build/m4/check_ld.m417
1 files changed, 10 insertions, 7 deletions
diff --git a/source4/build/m4/check_ld.m4 b/source4/build/m4/check_ld.m4
index 3b69057a69..0d0742e5d2 100644
--- a/source4/build/m4/check_ld.m4
+++ b/source4/build/m4/check_ld.m4
@@ -13,6 +13,7 @@ LD=""
AC_SUBST(BLDSHARED)
AC_SUBST(LD)
+AC_SUBST(SYS_LDFLAGS)
AC_SUBST(LDFLAGS)
# Assume non-shared by default and override below
@@ -32,13 +33,13 @@ AC_MSG_CHECKING([whether to try to build shared libraries on $host_os])
case "$host_os" in
*linux*)
BLDSHARED="true"
- LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
+ SYS_LDFLAGS="-Wl,--export-dynamic"
;;
*solaris*)
BLDSHARED="true"
if test "${GCC}" = "yes"; then
if test "${ac_cv_prog_gnu_ld}" = "yes"; then
- LDFLAGS="$LDFLAGS -Wl,-E"
+ SYS_LDFLAGS="-Wl,-E"
fi
fi
;;
@@ -47,26 +48,26 @@ case "$host_os" in
;;
*netbsd* | *freebsd* | *dragonfly* )
BLDSHARED="true"
- LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
+ SYS_LDFLAGS="-Wl,--export-dynamic"
;;
*openbsd*)
BLDSHARED="true"
- LDFLAGS="$LDFLAGS -Wl,-Bdynamic"
+ SYS_LDFLAGS="-Wl,-Bdynamic"
;;
*irix*)
BLDSHARED="true"
;;
*aix*)
BLDSHARED="true"
- LDFLAGS="$LDFLAGS -Wl,-brtl,-bexpall,-bbigtoc"
+ SYS_LDFLAGS="-Wl,-brtl,-bexpall,-bbigtoc"
;;
*hpux*)
# Use special PIC flags for the native HP-UX compiler.
BLDSHARED="true" # I hope this is correct
if test "$host_cpu" = "ia64"; then
- LDFLAGS="$LDFLAGS -Wl,-E,+b/usr/local/lib/hpux32:/usr/lib/hpux32"
+ SYS_LDFLAGS="-Wl,-E,+b/usr/local/lib/hpux32:/usr/lib/hpux32"
else
- LDFLAGS="$LDFLAGS -Wl,-E,+b/usr/local/lib:/usr/lib"
+ SYS_LDFLAGS="-Wl,-E,+b/usr/local/lib:/usr/lib"
fi
;;
*osf*)
@@ -86,6 +87,8 @@ AC_MSG_CHECKING([LD])
AC_MSG_RESULT([$LD])
AC_MSG_CHECKING([LDFLAGS])
AC_MSG_RESULT([$LDFLAGS])
+AC_MSG_CHECKING([SYS_LDFLAGS])
+AC_MSG_RESULT([$SYS_LDFLAGS])
AC_SUBST(HOSTLD)