Fix -Ttext-segment configure check.

Explicitly test together with -static -nodefaultlibs -nostartfiles to mimic
what the tools linking script does. At least on s390 the test might fail for
a non-static AC_LINK, while it does work when using those other flags too.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13371 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/configure.in b/configure.in
index 424f8e6..9a1db0c 100644
--- a/configure.in
+++ b/configure.in
@@ -1718,10 +1718,10 @@
 AC_MSG_CHECKING([if the linker accepts -Wl,-Ttext-segment])
 
 safe_CFLAGS=$CFLAGS
-CFLAGS="-Wl,-Ttext-segment=$valt_load_address_pri_norml"
+CFLAGS="-static -nodefaultlibs -nostartfiles -Wl,-Ttext-segment=$valt_load_address_pri_norml"
 
 AC_LINK_IFELSE(
-[AC_LANG_PROGRAM([ ], [return 0;])],
+[AC_LANG_SOURCE([int _start () { return 0; }])],
 [
   linker_using_t_text="no"
   AC_SUBST([FLAG_T_TEXT], ["-Ttext-segment"])