Navigation Menu

Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Fixed bug #828
Browse files Browse the repository at this point in the history
Added support for --disable-dependency-tracking to configure.in
  • Loading branch information
slouken committed Oct 8, 2009
1 parent be0e817 commit d2d1616
Showing 1 changed file with 25 additions and 2 deletions.
27 changes: 25 additions & 2 deletions configure.in
Expand Up @@ -109,6 +109,29 @@ AC_C_CONST
AC_C_INLINE
AC_C_VOLATILE

dnl See whether we can use gcc style dependency tracking
AC_ARG_ENABLE(dependency-tracking,
AC_HELP_STRING([--enable-dependency-tracking],
[Use gcc -MMD -MT dependency tracking [[default=yes]]]),
, enable_dependency_tracking=yes)
if test x$enable_dependency_tracking = xyes; then
have_gcc_mmd_mt=no
AC_MSG_CHECKING(for GCC -MMD -MT option)
AC_TRY_COMPILE([
#if !defined(__GNUC__) || __GNUC__ < 3
#error Dependency tracking requires GCC 3.0 or newer
#endif
],[
],[
have_gcc_mmd_mt=yes
])
AC_MSG_RESULT($have_gcc_mmd_mt)

if test x$have_gcc_mmd_mt = xyes; then
DEPENDENCY_TRACKING_OPTIONS="-MMD -MT \$@"
fi
fi

dnl See whether we are allowed to use the system C library
AC_ARG_ENABLE(libc,
AC_HELP_STRING([--enable-libc], [Use the system C library [[default=yes]]]),
Expand Down Expand Up @@ -2781,7 +2804,7 @@ for EXT in asm cc m c S; do
OBJECTS=`echo "$OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.'$EXT',$(objects)/\1.lo,g'`
DEPENDS=`echo "$DEPENDS" | sed 's,\([[^ ]]*\)/\([[^ ]]*\)\.'$EXT',\\
$(objects)/\2.lo: \1/\2.'$EXT'\\
\$(LIBTOOL) --mode=compile \$(CC) \$(CFLAGS) \$(EXTRA_CFLAGS) -MMD -MT \$@ -c \$< -o \$@,g'`
$(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(EXTRA_CFLAGS) '"$DEPENDENCY_TRACKING_OPTIONS"' -c $< -o $@,g'`
done

VERSION_OBJECTS=`echo $VERSION_SOURCES`
Expand All @@ -2796,7 +2819,7 @@ SDLMAIN_DEPENDS=`echo $SDLMAIN_SOURCES`
SDLMAIN_OBJECTS=`echo "$SDLMAIN_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.o,g'`
SDLMAIN_DEPENDS=`echo "$SDLMAIN_DEPENDS" | sed 's,\([[^ ]]*\)/\([[^ ]]*\)\.c,\\
$(objects)/\2.o: \1/\2.c\\
\$(LIBTOOL) --mode=compile \$(CC) \$(CFLAGS) \$(EXTRA_CFLAGS) -MMD -MT \$@ -c \$< -o \$@,g'`
$(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(EXTRA_CFLAGS) '"$DEPENDENCY_TRACKING_OPTIONS"' -c $< -o $@,g'`

# Set runtime shared library paths as needed

Expand Down

0 comments on commit d2d1616

Please sign in to comment.