mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 22:38:05 +02:00
autoconf: Optional debug build with --enable-debug
Allow the user to set the compiler debug flags and macros through the option --enable-debug. This addes -DDEBUG to the macros and -g to the CFLAGS and CXXFLAGS if gcc and g++ are in use.
This commit is contained in:
parent
41b00707e2
commit
23656c47c9
1 changed files with 18 additions and 0 deletions
18
configure.ac
18
configure.ac
|
|
@ -131,6 +131,24 @@ if test "$enable_static" = yes; then
|
|||
fi
|
||||
AC_SUBST(MKLIB_OPTIONS)
|
||||
|
||||
dnl
|
||||
dnl other compiler options
|
||||
dnl
|
||||
AC_ARG_ENABLE(debug,
|
||||
[AS_HELP_STRING([--enable-debug],
|
||||
[use debug compiler flags and macros @<:@default=disabled@:>@])],
|
||||
enable_debug="$enableval",
|
||||
enable_debug=no
|
||||
)
|
||||
if test "x$enable_debug" = xyes; then
|
||||
DEFINES="$DEFINES -DDEBUG"
|
||||
if test "x$GCC" = xyes; then
|
||||
CFLAGS="$CFLAGS -g"
|
||||
fi
|
||||
if test "x$GXX" = xyes; then
|
||||
CXXFLAGS="$CXXFLAGS -g"
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl
|
||||
dnl library names
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue