revert jeff's last commit since it breaks the build
[moon.git] / m4 / build-configuration.m4
blob7d660142f72f0f767e7b10f9887f5984df720331
1 AC_DEFUN([MOONLIGHT_CHECK_BUILD_CONFIGURATION],
3         dnl
4         dnl debug checks
5         dnl
6         
7         AC_ARG_WITH(debug, AC_HELP_STRING([--with-debug=yes|no],
8                 [If you want to enable debug support (default=yes)]),
9                 [], [with_debug=yes])
11         if test x$with_debug = xyes; then
12                 DEBUG_OPTIONS="-fno-inline -g -fno-inline-functions"
13                 CFLAGS=`echo $CFLAGS | sed 's/-O2//'`
14                 CFLAGS="$DEBUG_OPTIONS $CFLAGS"
15                 CXXFLAGS=`echo $CXXFLAGS | sed 's/-O2//'`
16                 CXXFLAGS="$DEBUG_OPTIONS $CXXFLAGS"
17                 
18                 if test x$managed_code = xyes; then
19                         MOON_LIBS="$MOON_LIBS $MONO_LIBS"
20                 fi
21                 
22                 AC_DEFINE([DEBUG],[1],[Include debugging support])
23         fi
25         dnl
26         dnl sanity checks
27         dnl
29         AC_ARG_WITH(sanity-checks, AC_HELP_STRING([--with-sanity-checks=yes|no],
30                 [If you want to enable sanity checks (default=no)]),
31                 [], [with_sanity_checks=no])
32         if test x$with_sanity_checks = xyes; then
33                 AC_DEFINE([SANITY], [1], [Include sanity checks])
34         fi
36         dnl 
37         dnl object tracking
38         dnl
40         AC_ARG_WITH(object-tracking, AC_HELP_STRING([--with-object-tracking=yes|no],
41                 [If you want to enable object tracking (default=no)]),
42                 [], [with_object_tracking=no])
44         if test x$with_object_tracking = xyes; then
45                 AC_DEFINE([OBJECT_TRACKING], [1], [Include object tracking])
46         fi
48         dnl
49         dnl logging
50         dnl
52         AC_ARG_WITH(logging, AC_HELP_STRING([--with-logging=yes|no],
53                 [If you want to enable support for logging with MOONLIGHT_DEBUG (default=yes)]),
54                 [], [with_logging=yes])
56         if test x$with_logging = xyes; then
57                 AC_DEFINE([LOGGING], [1], [Include support for logging with MOONLIGHT_DEBUG])
58         fi