summaryrefslogtreecommitdiff
path: root/source4/build/m4
diff options
context:
space:
mode:
authorJames Peach <jpeach@samba.org>2007-04-02 17:23:23 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:49:43 -0500
commit2e588454fe160b39bd8134a2fb9cbac4fba39e2a (patch)
treefc300e089a498bb16fc8d3d28e9554c4ff7c23dd /source4/build/m4
parent051e4b25cf2bfedfca9355e43eacede966dbf257 (diff)
downloadsamba-2e588454fe160b39bd8134a2fb9cbac4fba39e2a.tar.gz
samba-2e588454fe160b39bd8134a2fb9cbac4fba39e2a.tar.bz2
samba-2e588454fe160b39bd8134a2fb9cbac4fba39e2a.zip
r22035: Introduce HOSTLD which is needed to link the asn1 compiler when cross
compiling. (This used to be commit 976343821b99b04725c9fddee42dbcd0261c2d51)
Diffstat (limited to 'source4/build/m4')
-rw-r--r--source4/build/m4/check_ld.m413
1 files changed, 13 insertions, 0 deletions
diff --git a/source4/build/m4/check_ld.m4 b/source4/build/m4/check_ld.m4
index f7202b63eb..60b59bd653 100644
--- a/source4/build/m4/check_ld.m4
+++ b/source4/build/m4/check_ld.m4
@@ -36,6 +36,17 @@ SHLIBEXT="so"
SONAMEFLAG=""
PICFLAG=""
+# allow for --with-hostld=gcc
+AC_ARG_WITH(hostld,[ --with-hostld=linker choose host linker],
+[HOSTLD=$withval],
+[
+if test z"$cross_compiling" = "yes"; then
+ HOSTLD='$(HOSTCC)'
+else
+ HOSTLD='$(LD)'
+fi
+])
+
AC_MSG_CHECKING([ability to build shared libraries])
# and these are for particular systems
@@ -144,6 +155,8 @@ AC_MSG_RESULT([$LD])
AC_MSG_CHECKING([LDFLAGS])
AC_MSG_RESULT([$LDFLAGS])
+AC_SUBST(HOSTLD)
+
AC_MSG_CHECKING([STLD])
AC_MSG_RESULT([$STLD])
AC_MSG_CHECKING([STLD_FLAGS])