summaryrefslogtreecommitdiff
path: root/configure.ac
blob: 20dc6a6e0781ffbe958b32598dd7b2cc03a514cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
AC_PREREQ(2.62)

AC_INIT([mate-menus], [1.10.1], [http://www.mate-desktop.org])
AC_CONFIG_SRCDIR(libmenu/matemenu-tree.h)

AM_INIT_AUTOMAKE([1.9 foreign no-dist-gzip dist-xz check-news])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS(config.h)

AM_MAINTAINER_MODE
MATE_MAINTAINER_MODE_DEFINES

# Before making a release, the LT_VERSION string should be modified.
# The string is of the form C:R:A.
# - If interfaces have been changed or added, but binary compatibility has
#   been preserved, change to C+1:0:A+1
# - If binary compatibility has been broken (eg removed or changed interfaces)
#   change to C+1:0:0
# - If the interface is the same as the previous version, change to C:R+1:A

LIB_MENU_LT_VERSION=6:9:4
AC_SUBST(LIB_MENU_LT_VERSION)

GETTEXT_PACKAGE=mate-menus
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Name of default gettext domain])
AC_SUBST(GETTEXT_PACKAGE)

AM_GLIB_GNU_GETTEXT

IT_PROG_INTLTOOL([0.40.0])

AC_PROG_CC
AC_STDC_HEADERS
AC_ARG_PROGRAM
AM_PROG_LIBTOOL

PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.36.0 gio-2.0 >= 2.15.2)
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)

MATE_COMPILE_WARNINGS(yes)

AC_ARG_ENABLE(deprecation_flags,
              [AC_HELP_STRING([--enable-deprecation-flags],
                              [use *_DISABLE_DEPRECATED flags @<:@default=no@:>@])],,
              [enable_deprecation_flags=no])

if test "x$enable_deprecation_flags" = "xyes"; then
   DISABLE_DEPRECATED_CFLAGS=$DISABLE_DEPRECATED
   AC_SUBST(DISABLE_DEPRECATED_CFLAGS)
fi

dnl --enable-debug=(yes|minimum|no)
AC_ARG_ENABLE(debug,
              [AC_HELP_STRING([--enable-debug],
                              [turn on debugging @<:@default=minimum@:>@])],,
              [enable_debug=minimum])
if test "$enable_debug" = "yes"; then
  DEBUG_CFLAGS="-DG_ENABLE_DEBUG"
else
  if test "x$enable_debug" = "xno"; then
    DEBUG_CFLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS"
  else
    DEBUG_CFLAGS=""
    # make sure we have the right string for the configure summary
    enable_debug="minimum"
  fi
fi
AC_SUBST(DEBUG_CFLAGS)

AC_ARG_ENABLE(python,
              [AC_HELP_STRING([--enable-python],
                              [build python bindings])],
              [enable_python=$enableval],
              [enable_python=yes])

# Detect if we can build Python bindings (need python and python headers)
if test "x$enable_python" = "xyes" ; then
	AM_PATH_PYTHON(2.7)
	PKG_CHECK_MODULES([PYTHON], [python-${PYTHON_VERSION}], [have_python=yes], [have_python=no])
else
	have_python=no
fi
AC_SUBST(PYTHON_LIBS)
AC_SUBST(PYTHON_CFLAGS)

AM_CONDITIONAL(HAVE_PYTHON, test x$have_python = xyes)


GOBJECT_INTROSPECTION_CHECK([0.6.7])

AC_OUTPUT([
Makefile
libmenu/Makefile
libmenu/libmate-menu.pc
libmenu/libmate-menu-uninstalled.pc
layout/Makefile
desktop-directories/Makefile
util/Makefile
python/Makefile
po/Makefile.in
])

dnl ---------------------------------------------------------------------------
dnl - Show summary
dnl ---------------------------------------------------------------------------

echo "
              mate-menus $VERSION
              `echo mate-menus $VERSION | sed "s/./=/g"`

        prefix:                       ${prefix}
        exec_prefix:                  ${exec_prefix}
        libdir:                       ${libdir}
        bindir:                       ${bindir}
        sbindir:                      ${sbindir}
        sysconfdir:                   ${sysconfdir}
        localstatedir:                ${localstatedir}
        datadir:                      ${datadir}
        source code location:         ${srcdir}
        compiler:                     ${CC}
        cflags:                       ${CFLAGS}
        Maintainer mode:              ${USE_MAINTAINER_MODE}
        Use *_DISABLE_DEPRECATED:     ${enable_deprecation_flags}

        Turn on debugging:            ${enable_debug}
        Build python bindings:        ${have_python}
        Build introspection support:  ${found_introspection}

"