Sun Jun 23 15:24:05 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
authorroland <roland>
Tue, 25 Jun 1996 06:49:39 +0000 (06:49 +0000)
committerroland <roland>
Tue, 25 Jun 1996 06:49:39 +0000 (06:49 +0000)
* configure.in (ld --no-whole-archive check): Use AC_TRY_COMMAND.
Compile dummy file and pass -nostdlib -nostartfiles so as not to
require installed libraries.

configure.in

index 610d5e8..46d7317 100644 (file)
@@ -475,10 +475,11 @@ fi
 
 AC_CACHE_CHECK(for ld --no-whole-archive, libc_cv_ld_no_whole_archive, [dnl
 cat > conftest.c <<\EOF
-main () { exit (0); }
+_start () {}
 EOF
-if ${CC-cc} $CFLAGS -Wl,--no-whole-archive \
-           -o conftest conftest.c 2>/dev/null; then
+if AC_TRY_COMMAND([${CC-cc} $CFLAGS \
+                           -nostdlib -nostartfiles -Wl,--no-whole-archive \
+                           -o conftest conftest.c]); then
   libc_cv_ld_no_whole_archive=yes
 else
   libc_cv_ld_no_whole_archive=no