Skip to content

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 1df1f07 commit b6372ef
Showing 1 changed file with 26 additions and 3 deletions.
29 changes: 26 additions & 3 deletions configure.in
Expand Up @@ -87,6 +87,29 @@ LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS"
dnl Check for compiler characteristics
AC_C_CONST

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

case "$host" in
*-*-cygwin* | *-*-mingw32*)
VERSION_SOURCES="$srcdir/version.rc"
Expand Down Expand Up @@ -493,7 +516,7 @@ DEPENDS=`echo $SOURCES`
OBJECTS=`echo "$OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.lo,g'`
DEPENDS=`echo "$DEPENDS" | sed 's,\([[^ ]]*\)/\([[^ ]]*\)\.c,\\
$(objects)/\2.lo: \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'`

VERSION_OBJECTS=`echo $VERSION_SOURCES`
VERSION_DEPENDS=`echo $VERSION_SOURCES`
Expand All @@ -508,15 +531,15 @@ PLAYWAVE_DEPENDS=`echo $PLAYWAVE_SOURCES`
PLAYWAVE_OBJECTS=`echo "$PLAYWAVE_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.lo,g'`
PLAYWAVE_DEPENDS=`echo "$PLAYWAVE_DEPENDS" | sed 's,\([[^ ]]*\)/\([[^ ]]*\)\.c,\\
$(objects)/\2.lo: \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'`

PLAYMUS_SOURCES="$srcdir/playmus.c"
PLAYMUS_OBJECTS=`echo $PLAYMUS_SOURCES`
PLAYMUS_DEPENDS=`echo $PLAYMUS_SOURCES`
PLAYMUS_OBJECTS=`echo "$PLAYMUS_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.lo,g'`
PLAYMUS_DEPENDS=`echo "$PLAYMUS_DEPENDS" | sed 's,\([[^ ]]*\)/\([[^ ]]*\)\.c,\\
$(objects)/\2.lo: \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'`

dnl Expand the sources and objects needed to build the library
AC_SUBST(ac_aux_dir)
Expand Down

0 comments on commit b6372ef

Please sign in to comment.