build: move automake and aclocal in 'bin' subdir
[platform/upstream/automake.git] / t / ccnoco.sh
index 1df950d..be9be37 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # Test to make sure we can compile when the compiler doesn't
 # understand '-c -o'.
 
-required=gcc
-. ./defs || Exit 1
+required=gcc # For cc-no-c-o.
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
-AM_PROG_CC_C_O
-# Make sure that $CC can be used after AM_PROG_CC_C_O.
-$CC -v || exit 1
+$CC --version; $CC -v; # For debugging.
 AC_OUTPUT
 END
 
@@ -44,24 +42,8 @@ int main ()
 }
 END
 
-cat > Mycomp << END
-#!/bin/sh
-
-case " \$* " in
- *\ -c*\ -o* | *\ -o*\ -c*)
-    exit 1
-    ;;
-esac
-
-# Use '$CC', not 'gcc', to honour the compiler chosen by 't/defs'.
-exec $CC "\$@"
-END
-
-chmod +x Mycomp
-
 # Make sure the compiler doesn't understand '-c -o'
-CC=`pwd`/Mycomp
-export CC
+CC=$am_testaux_builddir/cc-no-c-o; export CC
 
 $ACLOCAL
 $AUTOCONF