]> Dogcows Code - chaz/openbox/blob - m4/openbox.m4
kill all enter events on a desktop switch
[chaz/openbox] / m4 / openbox.m4
1 # OB_DEBUG()
2 #
3 # Check if the user has requested a debug build.
4 # Sets the DEBUG or NDEBUG variables as appropriate
5 # Sets the CVS environment variable when building CVS sources.
6 AC_DEFUN([OB_DEBUG],
7 [
8 DEBUG="no"
9 AC_MSG_CHECKING([build target type])
10
11 AC_ARG_ENABLE([debug],
12 [ --enable-debug build a debug version default=no],
13 [DEBUG=$enableval],[])
14
15 # cvs builds are always debug
16 CVS=""
17 test "${VERSION%*cvs}" != "$VERSION" && CVS="yes"
18 test "$CVS" = "yes" && DEBUG="yes"
19
20 if test "$DEBUG" = "yes"; then
21 if test "$CVS" = "yes"; then
22 AC_MSG_RESULT([DEBUG (CVS build)])
23 else
24 AC_MSG_RESULT([DEBUG])
25 fi
26 AC_DEFINE([DEBUG], [1], [Creating a debug build])
27 else
28 AC_MSG_RESULT([RELEASE])
29 # keep the asserts in
30 # AC_DEFINE([NDEBUG], [1], [Creating a release build])
31 fi
32
33 AM_CONDITIONAL(CVS, test "$CVS" = "yes")
34 ])
35
36
37 # OB_COMPILER_FLAGS()
38 #
39 # Check what compiler is being used for compilation.
40 # It sets the CFLAGS variable appropriately for the compiler, including flags
41 # for debug builds.
42 AC_DEFUN([OB_COMPILER_FLAGS],
43 [
44 AC_REQUIRE([AC_PROG_CPP])
45 AC_REQUIRE([AC_PROG_CC])
46
47 FLAGS=""
48
49 # Check what compiler we are using
50 AC_MSG_CHECKING([for GNU CC])
51 if test "$GCC" = "yes"; then
52 AC_MSG_RESULT([yes])
53 if test "$DEBUG" = "yes"; then
54 FLAGS="-g -fno-inline"
55 FLAGS="$FLAGS -Wall -Wsign-compare -Waggregate-return"
56 FLAGS="$FLAGS -Wcast-qual -Wbad-function-cast -Wpointer-arith"
57 # for Python.h
58 FLAGS="$FLAGS -Wno-long-long"
59 else
60 FLAGS=""
61 fi
62 # else
63 # AC_MSG_RESULT([no, trying other compilers])
64 # AC_MSG_CHECKING(for MIPSpro)
65 # mips_pro_ver=`$CC -version 2>&1 | grep -i mipspro | cut -f4 -d ' '`
66 # if test -z "$mips_pro_ver"; then
67 # AC_MSG_RESULT([no])
68 # else
69 # AC_MSG_RESULT([yes, version $mips_pro_ver.])
70 # AC_MSG_CHECKING(for -LANG:std in CFLAGS)
71 # lang_std_not_set=`echo $CFLAGS | grep "\-LANG:std"`
72 # if test "x$lang_std_not_set" = "x"; then
73 # AC_MSG_RESULT([not set, setting.])
74 # FLAGS="-LANG:std"
75 # else
76 # AC_MSG_RESULT([already set.])
77 # fi
78 # fi
79 fi
80 AC_MSG_CHECKING([for compiler specific flags])
81 AC_MSG_RESULT([$FLAGS])
82 CFLAGS="$CFLAGS $FLAGS"
83 ])
This page took 0.036956 seconds and 4 git commands to generate.