mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2025-12-25 16:20:08 +01:00
Add configure option '--enable-debug' to control debugging and profiling
The command-line option '--enable-debug' controls the debugging and profiling flags of the build. Debugging is disabled by default and only enabled on developer builds. Profiling is always disabled. Both options can be overridden from the command line (e.g., for profiling of release builds). Signed-off-by: Thomas Zimmermann <tdz@users.sourceforge.net> [smcv: remove trailing whitespace from new lines] Reviewed-by: Simon McVittie <smcv@debian.org> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=97357
This commit is contained in:
parent
866ff0e926
commit
85b520ab8f
1 changed files with 30 additions and 7 deletions
37
configure.ac
37
configure.ac
|
|
@ -7,6 +7,7 @@ m4_define([dbus_micro_version], [7])
|
|||
m4_define([dbus_version],
|
||||
[dbus_major_version.dbus_minor_version.dbus_micro_version])
|
||||
AC_INIT([dbus],[dbus_version],[https://bugs.freedesktop.org/enter_bug.cgi?product=dbus],[dbus])
|
||||
|
||||
AC_CONFIG_AUX_DIR([build-aux])
|
||||
|
||||
m4_pattern_forbid([^AX_],
|
||||
|
|
@ -64,6 +65,35 @@ AC_SUBST(DBUS_MINOR_VERSION)
|
|||
AC_SUBST(DBUS_MICRO_VERSION)
|
||||
AC_SUBST(DBUS_VERSION)
|
||||
|
||||
dnl
|
||||
dnl Build configuration
|
||||
dnl
|
||||
|
||||
dnl This must come first: other options use this to set their defaults. Don't
|
||||
dnl enable developer mode on production builds.
|
||||
AC_ARG_ENABLE([developer],
|
||||
[AS_HELP_STRING([--enable-developer],
|
||||
[set defaults to be appropriate for a D-Bus developer instead of a distribution/end-user])],
|
||||
[enable_developer=$enableval],
|
||||
[enable_developer=no])
|
||||
|
||||
dnl 'disable_developer' is the negation of 'enable_developer'. If
|
||||
dnl 'enable-developer' is set to 'no' (the default), the value of
|
||||
dnl 'disable_developer' is set to 'yes', and vice versa. It's used
|
||||
dnl for macros that require the opposite of 'enable_developer', such
|
||||
dnl as several AX_ macros.
|
||||
dnl See https://bugs.freedesktop.org/show_bug.cgi?id=97357
|
||||
AS_IF([test "x$enable_developer" = "xyes"],[
|
||||
disable_developer=no
|
||||
],[
|
||||
disable_developer=yes
|
||||
])
|
||||
|
||||
# The debugging check must run before the compiler tests. Other command-line
|
||||
# options also use it to set their defaults. We disable debugging by default,
|
||||
# except for developer builds.
|
||||
AX_CHECK_ENABLE_DEBUG([$enable_developer])
|
||||
|
||||
AC_PROG_CC
|
||||
AM_PROG_CC_C_O
|
||||
AC_PROG_CXX
|
||||
|
|
@ -149,13 +179,6 @@ AM_CONDITIONAL(DBUS_WINCE, test "$dbus_wince" = yes)
|
|||
AM_CONDITIONAL(DBUS_UNIX, test "$dbus_unix" = yes)
|
||||
AM_CONDITIONAL(DBUS_CYGWIN, test "$dbus_cygwin" = yes)
|
||||
|
||||
# this must come first: other options use this to set their defaults
|
||||
AC_ARG_ENABLE([developer],
|
||||
[AS_HELP_STRING([--enable-developer],
|
||||
[set defaults to be appropriate for a D-Bus developer instead of a distribution/end-user])],
|
||||
[],
|
||||
[enable_developer=no])
|
||||
|
||||
DBUS_STATIC_BUILD_CPPFLAGS=
|
||||
if test "x$enable_shared" = xno; then
|
||||
# On Windows, linking against the static library requires special effort
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue