@@ -24,14 +24,14 @@ if test "$PHP_MONGODB" != "no"; then
24
24
AC_MSG_ERROR ( [ not supported. Need a PHP version >= 5.5.0 (found $PHP_MONGODB_PHP_VERSION)] )
25
25
fi
26
26
27
- PHP_ARG_ENABLE([ developer-flags] ,
27
+ PHP_ARG_ENABLE([ mongodb- developer-flags] ,
28
28
[ whether to enable developer build flags] ,
29
- [ AC_HELP_STRING ([ --enable-developer-flags] ,
29
+ [ AC_HELP_STRING ([ --enable-mongodb- developer-flags] ,
30
30
[ MongoDB: Enable developer flags [ default=no] ] )] ,
31
31
[ no] ,
32
32
[ no] )
33
33
34
- if test "$PHP_DEVELOPER_FLAGS " = "yes"; then
34
+ if test "$PHP_MONGODB_DEVELOPER_FLAGS " = "yes"; then
35
35
dnl Warn about functions which might be candidates for format attributes
36
36
PHP_CHECK_GCC_ARG(-Wmissing-format-attribute, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wmissing-format-attribute")
37
37
dnl Avoid duplicating values for an enum
@@ -80,17 +80,22 @@ if test "$PHP_MONGODB" != "no"; then
80
80
fi
81
81
82
82
83
- PHP_ARG_ENABLE([ coverage] ,
83
+ PHP_ARG_ENABLE([ mongodb- coverage] ,
84
84
[ whether to enable code coverage] ,
85
- [ AC_HELP_STRING ([ --enable-coverage] ,
85
+ [ AC_HELP_STRING ([ --enable-mongodb- coverage] ,
86
86
[ MongoDB: Enable developer code coverage information [ default=no] ] )] ,
87
87
[ no] ,
88
88
[ no] )
89
89
90
- if test "$PHP_COVERAGE" = "yes"; then
91
- PHP_CHECK_GCC_ARG(-fprofile-arcs, COVERAGE_CFLAGS="$COVERAGE_CFLAGS -fprofile-arcs")
92
- PHP_CHECK_GCC_ARG(-ftest-coverage, COVERAGE_CFLAGS="$COVERAGE_CFLAGS -ftest-coverage")
93
- EXTRA_LDFLAGS="$COVERAGE_CFLAGS"
90
+ if test "$PHP_MONGODB_COVERAGE" = "yes"; then
91
+ if test "$ext_shared" != "yes"; then
92
+ AC_MSG_ERROR ( code coverage is not supported for static builds )
93
+ fi
94
+
95
+ COVERAGE_CFLAGS="--coverage -g"
96
+ COVERAGE_LDFLAGS="--coverage"
97
+
98
+ MONGODB_SHARED_LIBADD="$MONGODB_SHARED_LIBADD $COVERAGE_LDFLAGS"
94
99
fi
95
100
96
101
PHP_MONGODB_CFLAGS="$STD_CFLAGS $MAINTAINER_CFLAGS $COVERAGE_CFLAGS"
0 commit comments