r18366: check if we can link using the selected flags
authorStefan Metzmacher <metze@samba.org>
Mon, 11 Sep 2006 07:15:49 +0000 (07:15 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:18:19 +0000 (14:18 -0500)
metze
(This used to be commit d905bb499d81ac4e2f00277ae77ce0a51bdc7474)

source4/build/m4/check_ld.m4

index 53e7d9001977ac166b5fe2d7114b29be9f52d6c4..af096243edd35fe7d5316a7630fcb9f1fc343f4d 100644 (file)
@@ -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