summaryrefslogtreecommitdiff
path: root/source4/build/m4/check_ld.m4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-09-11 07:15:49 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:18:19 -0500
commitdd4fac5a557a768fd8027e01c7dbdc2ebd80c055 (patch)
tree7f4b733973834c9c5cf04b741b1cb59d48b69be7 /source4/build/m4/check_ld.m4
parent87c998b1e7c37748d6af6074e2c8ec605403e3a0 (diff)
downloadsamba-dd4fac5a557a768fd8027e01c7dbdc2ebd80c055.tar.gz
samba-dd4fac5a557a768fd8027e01c7dbdc2ebd80c055.tar.bz2
samba-dd4fac5a557a768fd8027e01c7dbdc2ebd80c055.zip
r18366: check if we can link using the selected flags
metze (This used to be commit d905bb499d81ac4e2f00277ae77ce0a51bdc7474)
Diffstat (limited to 'source4/build/m4/check_ld.m4')
-rw-r--r--source4/build/m4/check_ld.m46
1 files changed, 6 insertions, 0 deletions
diff --git a/source4/build/m4/check_ld.m4 b/source4/build/m4/check_ld.m4
index 53e7d90019..af096243ed 100644
--- a/source4/build/m4/check_ld.m4
+++ b/source4/build/m4/check_ld.m4
@@ -183,6 +183,12 @@ if test $ac_cv_shlib_works = no; then
fi
fi
+AC_MSG_CHECKING([if we can link using the selected flags])
+AC_TRY_RUN([#include "${srcdir-.}/build/tests/trivial.c"],
+ AC_MSG_RESULT(yes),
+ AC_MSG_ERROR([we cannot link with the selected cc and ld flags. Aborting configure]),
+ AC_MSG_WARN([cannot run when cross-compiling]))
+
AC_ARG_ENABLE(dso,
[ --enable-dso Enable building internal libraries as DSO's (experimental)],
[ if test x$enable_dso != xyes; then