fi
depfile=${depfile-`echo "$object" | sed 's,\([^/]*\)$,.deps/\1,;s/\.\([^.]*\)$/.P\1/'`}
-# depdir=`echo "$depfile" | sed 's,/*[^/]*$,,'`
-# test -d "$depdir" || { echo "mkdir \"$depdir\"" && mkdir "$depdir"; } ||
-# test -d "$depdir" || exit 1
-
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
rm -f "$tmpdepfile"
rm -f "$tmpdepfile"
;;
+#nosideeffect)
+ # This comment above is used by automake to tell side-effect
+ # dependency tracking mechanisms from slower ones.
+
dashmstdout)
# Important note: in order to support this mode, a compiler *must*
# always write the proprocessed file to stdout, regardless of -o,
rm -f "$tmpdepfile"
;;
+dashXmstdout)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the proprocessed file to stdout, regardless of -o,
+ # because we must use -o when running libtool.
+ ( IFS=" "
+ case " $* " in
+ *" --mode=compile "*) # this is libtool, let us make it quiet
+ for arg
+ do # cycle over the arguments
+ case "$arg" in
+ "--mode=compile")
+ # insert --quiet before "--mode=compile"
+ set fnord "$@" --quiet
+ shift # fnord
+ ;;
+ esac
+ set fnord "$@" "$arg"
+ shift # fnord
+ shift # "$arg"
+ done
+ ;;
+ esac
+ "$@" -xM | sed 's:^[^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
+ ) &
+ proc=$!
+ "$@"
+ stat=$?
+ wait "$proc"
+ if test "$stat" != 0; then exit $stat; fi
+ rm -f "$depfile"
+ cat < "$tmpdepfile" > "$depfile"
+ tr ' ' '
+' < "$tmpdepfile" | \
+ sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
makedepend)
# X makedepend
(
AC_REQUIRE([AC_PROG_CC])
AC_REQUIRE([AC_PROG_CPP])
depcc="$CC"
-depcpp="$CPP"
-depgcc="$GCC"],[$1],CXX,[
+depcpp="$CPP"],[$1],CXX,[
AC_REQUIRE([AC_PROG_CXX])
AC_REQUIRE([AC_PROG_CXXCPP])
depcc="$CXX"
-depcpp="$CXXCPP"
-depgcc="$GXX"],[$1],OBJC,[
+depcpp="$CXXCPP"],[$1],OBJC,[
am_cv_OBJC_dependencies_compiler_type=gcc],[
AC_REQUIRE([AC_PROG_][$1])
depcc="$[$1]"
-depcpp=""
-depgcc="no"])
+depcpp=""])
AC_MSG_CHECKING([dependency style of $depcc])
AC_CACHE_VAL(am_cv_[$1]_dependencies_compiler_type,[
-am_cv_[$1]_dependencies_compiler_type=none
-if test "$depgcc" = yes; then
- am_cv_[$1]_dependencies_compiler_type=gcc
-else
- echo '#include "conftest.h"' > conftest.c
- echo 'int i;' > conftest.h
-
- dnl SGI compiler has its own method for side-effect dependency
- dnl tracking.
- if test "$am_cv_[$1]_dependencies_compiler_type" = none; then
- rm -f conftest.P
- if $depcc -c -MDupdate conftest.P conftest.c 2>/dev/null &&
- test -f conftest.P; then
- am_cv_[$1]_dependencies_compiler_type=sgi
- fi
- fi
-
- if test "$am_cv_[$1]_dependencies_compiler_type" = none; then
- # -o /dev/null avoids selecting -M for a compiler that would
- # output dependencies to the object file.
- # The grep tries to ignore compilers that actually output
- # something other than dependency information when given the -M
- # argument (in particular, linker map information).
- rm -f conftest.P
- if $depcc -M conftest.c -o /dev/null >conftest.P 2>/dev/null &&
- grep "conftest.h" conftest.P > /dev/null; then
- am_cv_[$1]_dependencies_compiler_type=dashmstdout
- fi
- fi
+am_depcomp=${am_depcomp-"$ac_aux_dir/depcomp"}
+if test -f "$am_depcomp"; then
+ echo '#include "conftest.h"' > conftest.c
+ echo 'int i;' > conftest.h
- if test "$am_cv_[$1]_dependencies_compiler_type" = none; then
- rm -f conftest.P
- touch conftest.P
- if ${MAKEDEPEND-makedepend} -o.o -fconftest.P conftest.c 2>/dev/null &&
- grep "conftest.h" conftest.P > /dev/null; then
- am_cv_[$1]_dependencies_compiler_type=makedepend
- fi
- fi
+ am_cv_[$1]_dependencies_compiler_type=none
+ for depmode in `sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < "$am_depcomp"`; do
+ case "$depmode" in
+ nosideeffect) continue ;;
+ none) break ;;
+ esac
+ if depmode="$depmode" \
+ source=conftest.c object=conftest.o \
+ depfile=conftest.Po tmpdepfile=conftest.TPo \
+ $SHELL $am_depcomp $depcc -c conftest.c 2>/dev/null &&
+ grep conftest.h conftest.Po > /dev/null 2>&1; then
+ am_cv_[$1]_dependencies_compiler_type="$depmode"
+ break
+ fi
+ done
- if test "$am_cv_[$1]_dependencies_compiler_type" = none; then
- # -o /dev/null avoids selecting -E for a compiler that would
- # output dependencies to the object file
- if test -n "`$depcc -E conftest.c -o /dev/null 2>/dev/null`"; then
- am_cv_[$1]_dependencies_compiler_type=cpp
- fi
- fi
-
- dnl As a last resort, see if we can run CPP and extract line
- dnl information from the output.
- dnl FIXME
-
- rm -f conftest.*
+ rm -f conftest.*
+else
+ am_cv_[$1]_dependencies_compiler_type=none
fi
])
AC_MSG_RESULT($am_cv_[$1]_dependencies_compiler_type)