forked from mia/Aegisub
Fix --enable-gcov:
* Rename GCOV_FLAGS -> GCOV_CFLAGS * Add GCOV_LDFLAGS (default is -lgcov) Originally committed to SVN as r3724.
This commit is contained in:
parent
5404b45017
commit
c72ac65d0f
1 changed files with 12 additions and 5 deletions
|
@ -994,18 +994,25 @@ fi
|
||||||
# gcov
|
# gcov
|
||||||
######
|
######
|
||||||
|
|
||||||
AC_ARG_VAR([GCOV_FLAGS], [gcov flag(s) to use with --enable-gcov (default: -ftest-coverage -fprofile-arcs)])
|
AC_ARG_VAR([GCOV_CFLAGS], [gcov cflag(s) to use with --enable-gcov (default: -ftest-coverage -fprofile-arcs)])
|
||||||
|
AC_ARG_VAR([GCOV_LDFLAGS], [gcov ldflag(s) to use with --enable-gcov (default: -lgcov)])
|
||||||
|
|
||||||
AC_MSG_CHECKING([whether to turn on gcov])
|
AC_MSG_CHECKING([whether to turn on gcov])
|
||||||
AC_ARG_ENABLE(gcov, [ --enable-gcov enable gcov (default=no)])
|
AC_ARG_ENABLE(gcov, [ --enable-gcov enable gcov (default=no)])
|
||||||
|
|
||||||
if test "$enable_gcov" = "yes"; then
|
if test "$enable_gcov" = "yes"; then
|
||||||
if test -z "$GCOV_FLAGS"; then
|
if test -z "$GCOV_CFLAGS"; then
|
||||||
GCOV_FLAGS="-fprofile-arcs -ftest-coverage";
|
GCOV_CFLAGS="-fprofile-arcs -ftest-coverage";
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test -z "$GCOV_LDFLAGS"; then
|
||||||
|
GCOV_LDFLAGS="-lgcov";
|
||||||
|
fi
|
||||||
|
|
||||||
AC_MSG_RESULT([yes ($GCOV_FLAGS)])
|
AC_MSG_RESULT([yes ($GCOV_FLAGS)])
|
||||||
CFLAGS="$CFLAGS $GCOV_FLAGS"
|
CFLAGS="$CFLAGS $GCOV_CFLAGS"
|
||||||
CPPFLAGS="$CPPFLAGS $GCOV_FLAGS"
|
LDFLAGS="$LDFLAGS $GCOV_LDFLAGS"
|
||||||
|
CPPFLAGS="$CPPFLAGS $GCOV_CFLAGS"
|
||||||
else
|
else
|
||||||
enable_gcov="no"
|
enable_gcov="no"
|
||||||
AC_MSG_RESULT([no])
|
AC_MSG_RESULT([no])
|
||||||
|
|
Loading…
Reference in a new issue