3.5.5
[platform/upstream/gnome-common.git] / macros2 / gnome-common.m4
1 # gnome-common.m4
2 #
3 # serial 3
4
5
6 dnl GNOME_COMMON_INIT
7
8 AU_DEFUN([GNOME_COMMON_INIT],
9 [
10   dnl this macro should come after AC_CONFIG_MACRO_DIR
11   AC_BEFORE([AC_CONFIG_MACRO_DIR], [$0])
12
13   dnl ensure that when the Automake generated makefile calls aclocal,
14   dnl it honours the $ACLOCAL_FLAGS environment variable
15   ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}"
16   if test -n "$ac_macro_dir"; then
17     ACLOCAL_AMFLAGS="-I $ac_macro_dir $ACLOCAL_AMFLAGS"
18   fi
19
20   AC_SUBST([ACLOCAL_AMFLAGS])
21 ],
22 [[$0: This macro is deprecated. You should set put "ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}"
23 in your top-level Makefile.am, instead, where "m4" is the macro directory set
24 with AC_CONFIG_MACRO_DIR() in your configure.ac]])
25
26 AC_DEFUN([GNOME_DEBUG_CHECK],
27 [
28         AC_ARG_ENABLE([debug],
29                       AC_HELP_STRING([--enable-debug],
30                                      [turn on debugging]),,
31                       [enable_debug=no])
32
33         if test x$enable_debug = xyes ; then
34             AC_DEFINE(GNOME_ENABLE_DEBUG, 1,
35                 [Enable additional debugging at the expense of performance and size])
36         fi
37 ])
38
39 dnl GNOME_MAINTAINER_MODE_DEFINES ()
40 dnl define DISABLE_DEPRECATED
41 dnl
42 AC_DEFUN([GNOME_MAINTAINER_MODE_DEFINES],
43 [
44         AC_REQUIRE([AM_MAINTAINER_MODE])
45
46         DISABLE_DEPRECATED=""
47         if test $USE_MAINTAINER_MODE = yes; then
48                 DOMAINS="GCONF BONOBO BONOBO_UI GNOME LIBGLADE GNOME_VFS WNCK LIBSOUP"
49                 for DOMAIN in $DOMAINS; do
50                        DISABLE_DEPRECATED="$DISABLE_DEPRECATED -D${DOMAIN}_DISABLE_DEPRECATED -D${DOMAIN}_DISABLE_SINGLE_INCLUDES"
51                 done
52         fi
53
54         AC_SUBST(DISABLE_DEPRECATED)
55 ])