545 |
# using a relative directory. |
# using a relative directory. |
546 |
cp "$am_depcomp" conftest.dir |
cp "$am_depcomp" conftest.dir |
547 |
cd conftest.dir |
cd conftest.dir |
548 |
|
# We will build objects and dependencies in a subdirectory because |
549 |
|
# it helps to detect inapplicable dependency modes. For instance |
550 |
|
# both Tru64's cc and ICC support -MD to output dependencies as a |
551 |
|
# side effect of compilation, but ICC will put the dependencies in |
552 |
|
# the current directory while Tru64 will put them in the object |
553 |
|
# directory. |
554 |
|
mkdir sub |
555 |
|
|
556 |
am_cv_$1_dependencies_compiler_type=none |
am_cv_$1_dependencies_compiler_type=none |
557 |
if test "$am_compiler_list" = ""; then |
if test "$am_compiler_list" = ""; then |
558 |
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` |
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` |
559 |
fi |
fi |
560 |
for depmode in $am_compiler_list; do |
for depmode in $am_compiler_list; do |
561 |
|
# Setup a source with many dependencies, because some compilers |
562 |
|
# like to wrap large dependency lists on column 80 (with \), and |
563 |
|
# we should not choose a depcomp mode which is confused by this. |
564 |
|
# |
565 |
# We need to recreate these files for each test, as the compiler may |
# We need to recreate these files for each test, as the compiler may |
566 |
# overwrite some of them when testing with obscure command lines. |
# overwrite some of them when testing with obscure command lines. |
567 |
# This happens at least with the AIX C compiler. |
# This happens at least with the AIX C compiler. |
568 |
echo '#include "conftest.h"' > conftest.c |
: > sub/conftest.c |
569 |
echo 'int i;' > conftest.h |
for i in 1 2 3 4 5 6; do |
570 |
echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf |
echo '#include "conftst'$i'.h"' >> sub/conftest.c |
571 |
|
: > sub/conftst$i.h |
572 |
|
done |
573 |
|
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf |
574 |
|
|
575 |
case $depmode in |
case $depmode in |
576 |
nosideeffect) |
nosideeffect) |
588 |
# mode. It turns out that the SunPro C++ compiler does not properly |
# mode. It turns out that the SunPro C++ compiler does not properly |
589 |
# handle `-M -o', and we need to detect this. |
# handle `-M -o', and we need to detect this. |
590 |
if depmode=$depmode \ |
if depmode=$depmode \ |
591 |
source=conftest.c object=conftest.o \ |
source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ |
592 |
depfile=conftest.Po tmpdepfile=conftest.TPo \ |
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ |
593 |
$SHELL ./depcomp $depcc -c -o conftest.o conftest.c \ |
$SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ |
594 |
>/dev/null 2>conftest.err && |
>/dev/null 2>conftest.err && |
595 |
grep conftest.h conftest.Po > /dev/null 2>&1 && |
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && |
596 |
|
grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && |
597 |
${MAKE-make} -s -f confmf > /dev/null 2>&1; then |
${MAKE-make} -s -f confmf > /dev/null 2>&1; then |
598 |
# icc doesn't choke on unknown options, it will just issue warnings |
# icc doesn't choke on unknown options, it will just issue warnings |
599 |
# (even with -Werror). So we grep stderr for any message |
# (even with -Werror). So we grep stderr for any message |