1
# gnome-common.m4
2
# 
3
4
dnl GNOME_COMMON_INIT
5
6
AC_DEFUN([GNOME_COMMON_INIT],
7
[
8
  dnl this macro should come after AC_CONFIG_MACRO_DIR
9
  AC_BEFORE([AC_CONFIG_MACRO_DIR], [$0])
10
11
  dnl ensure that when the Automake generated makefile calls aclocal,
12
  dnl it honours the $ACLOCAL_FLAGS environment variable
13
  ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}"
14
  if test -n "$ac_macro_dir"; then
15
    ACLOCAL_AMFLAGS="-I $ac_macro_dir $ACLOCAL_AMFLAGS"
16
  fi
17
18
  AC_SUBST([ACLOCAL_AMFLAGS])
19
])
20
21
AC_DEFUN([GNOME_DEBUG_CHECK],
22
[
23
	AC_ARG_ENABLE([debug],
24
                      AC_HELP_STRING([--enable-debug],
25
                                     [turn on debugging]),,
26
                      [enable_debug=no])
27
28
	if test x$enable_debug = xyes ; then
29
	    AC_DEFINE(GNOME_ENABLE_DEBUG, 1,
30
		[Enable additional debugging at the expense of performance and size])
31
	fi
32
])
33
34
dnl GNOME_MAINTAINER_MODE_DEFINES ()
35
dnl define DISABLE_DEPRECATED
36
dnl
37
AC_DEFUN([GNOME_MAINTAINER_MODE_DEFINES],
38
[
39
	AC_REQUIRE([AM_MAINTAINER_MODE])
40
41
	DISABLE_DEPRECATED=""
42
	if test $USE_MAINTAINER_MODE = yes; then
43
	        DOMAINS="G ATK PANGO GDK GDK_PIXBUF GTK GCONF BONOBO BONOBO_UI GNOME LIBGLADE VTE GNOME_VFS WNCK LIBSOUP"
44
	        for DOMAIN in $DOMAINS; do
45
	               DISABLE_DEPRECATED="$DISABLE_DEPRECATED -D${DOMAIN}_DISABLE_DEPRECATED -D${DOMAIN}_DISABLE_SINGLE_INCLUDES"
46
	        done
47
	fi
48
49
	AC_SUBST(DISABLE_DEPRECATED)
50
])