~ubuntu-branches/ubuntu/oneiric/gnome-menus/oneiric

« back to all changes in this revision

Viewing changes to configure.ac

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2010-09-14 15:13:19 UTC
  • mfrom: (1.1.52 upstream)
  • Revision ID: james.westby@ubuntu.com-20100914151319-q63qfic1ugpw3zxb
Tags: 2.30.3-0ubuntu1
* New upstream release:
 + Menu Editor
  - Respect XDG_MENU_PREFIX when writing user menu file (Vincent)
 + Misc
  - Update information in README and other files (Vincent)
 + Updated translations

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
AC_PREREQ(2.62)
 
2
 
 
3
AC_INIT([gnome-menus], [2.30.3],
 
4
        [http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-menus])
 
5
AC_CONFIG_SRCDIR(libmenu/gmenu-tree.h)
 
6
 
 
7
AM_INIT_AUTOMAKE([1.9 foreign no-dist-gzip dist-bzip2])
 
8
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 
9
AC_CONFIG_MACRO_DIR([m4])
 
10
AM_CONFIG_HEADER(config.h)
 
11
 
 
12
AM_MAINTAINER_MODE
 
13
GNOME_MAINTAINER_MODE_DEFINES
 
14
 
 
15
# Before making a release, the LT_VERSION string should be modified.
 
16
# The string is of the form C:R:A.
 
17
# - If interfaces have been changed or added, but binary compatibility has
 
18
#   been preserved, change to C+1:0:A+1
 
19
# - If binary compatibility has been broken (eg removed or changed interfaces)
 
20
#   change to C+1:0:0
 
21
# - If the interface is the same as the previous version, change to C:R+1:A
 
22
 
 
23
LIB_MENU_LT_VERSION=6:8:4
 
24
AC_SUBST(LIB_MENU_LT_VERSION)
 
25
 
 
26
GETTEXT_PACKAGE=gnome-menus
 
27
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Name of default gettext domain])
 
28
AC_SUBST(GETTEXT_PACKAGE)
 
29
 
 
30
AM_GLIB_GNU_GETTEXT
 
31
 
 
32
IT_PROG_INTLTOOL([0.40.0])
 
33
 
 
34
AC_ISC_POSIX
 
35
AC_PROG_CC
 
36
AC_STDC_HEADERS
 
37
AC_ARG_PROGRAM
 
38
AC_LIBTOOL_WIN32_DLL
 
39
AM_PROG_LIBTOOL
 
40
 
 
41
dnl make sure we keep ACLOCAL_FLAGS around for maintainer builds to work
 
42
AC_SUBST(ACLOCAL_AMFLAGS, "$ACLOCAL_FLAGS")
 
43
 
 
44
PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.6.0 gio-2.0 >= 2.15.2)
 
45
AC_SUBST(GLIB_CFLAGS)
 
46
AC_SUBST(GLIB_LIBS)
 
47
 
 
48
GNOME_COMPILE_WARNINGS(yes)
 
49
 
 
50
AC_ARG_ENABLE(deprecations,
 
51
              [AC_HELP_STRING([--enable-deprecations],
 
52
                              [warn about deprecated usages @<:@default=no@:>@])],,
 
53
              [enable_deprecations=no])
 
54
 
 
55
DISABLE_DEPRECATED_CFLAGS=
 
56
if test "x$enable_deprecations" = "xyes"; then
 
57
   DISABLE_DEPRECATED_CFLAGS=$DISABLE_DEPRECATED
 
58
fi
 
59
AC_SUBST(DISABLE_DEPRECATED_CFLAGS)
 
60
 
 
61
dnl --enable-debug=(yes|minimum|no)
 
62
AC_ARG_ENABLE(debug,
 
63
              [AC_HELP_STRING([--enable-debug],
 
64
                              [turn on debugging @<:@default=minimum@:>@])],,
 
65
              [enable_debug=minimum])
 
66
if test "$enable_debug" = "yes"; then
 
67
  DEBUG_CFLAGS="-DG_ENABLE_DEBUG"
 
68
else
 
69
  if test "x$enable_debug" = "xno"; then
 
70
    DEBUG_CFLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS"
 
71
  else
 
72
    DEBUG_CFLAGS=""
 
73
    # make sure we have the right string for the configure summary
 
74
    enable_debug="minimum"
 
75
  fi
 
76
fi
 
77
AC_SUBST(DEBUG_CFLAGS)
 
78
 
 
79
AC_ARG_ENABLE(python,
 
80
              [AC_HELP_STRING([--enable-python],
 
81
                              [build python bindings @<:@default=auto@:>@])],
 
82
              [enable_deprecations=$enableval],
 
83
              [enable_deprecations=auto])
 
84
 
 
85
# Detect if we can build Python bindings (need python and python headers)
 
86
if test "x$enable_python" = "xno" ; then
 
87
  have_python=no
 
88
else
 
89
  AC_MSG_NOTICE([Checking to see if we can build Python bindings])
 
90
  have_python=no
 
91
  AM_PATH_PYTHON(2.3)
 
92
 
 
93
  if test "x$PYTHON" = "x" ; then
 
94
    AC_MSG_WARN([Python not found])
 
95
  else
 
96
    AM_CHECK_PYTHON_HEADERS(have_python_headers=yes, have_python_headers=no)
 
97
    if test "x$have_python_headers" = "xyes" ; then
 
98
      have_python=yes
 
99
    fi
 
100
  fi
 
101
 
 
102
  if test "x$have_python" = "xno" ; then
 
103
    if test "x$enable_python" = "xyes" ; then
 
104
      AC_MSG_ERROR([Building python explicitly requested, but can't build python bindings])
 
105
    else
 
106
      AC_MSG_WARN([Couldn't find the Python headers, not building Python bindings])
 
107
    fi
 
108
  fi
 
109
fi
 
110
 
 
111
AM_CONDITIONAL(HAVE_PYTHON, test x$have_python = xyes)
 
112
 
 
113
# Because of the way Python implements polymorphism, we get the following warning:
 
114
# "warning: dereferencing type-punned pointer will break strict-aliasing rules"
 
115
# -fno-strict-aliasing (as used in Python build) switches warnings off
 
116
NO_STRICT_ALIASING_CFLAGS=""
 
117
if test "x$GCC" = "xyes" ; then
 
118
  AC_MSG_CHECKING(whether $CC accepts -fno-strict-aliasing)
 
119
  ac_save_cc="$CC"
 
120
  CC="$CC -fno-strict-aliasing"
 
121
  AC_TRY_RUN([int main() { return 0; }],
 
122
             ac_cv_no_strict_aliasing_ok=yes,
 
123
             ac_cv_no_strict_aliasing_ok=no,
 
124
             ac_cv_no_strict_aliasing_ok=no)
 
125
  CC="$ac_save_cc"
 
126
  AC_MSG_RESULT($ac_cv_no_strict_aliasing_ok)
 
127
  if test "x$ac_cv_no_strict_aliasing_ok" = "xyes" ; then
 
128
    NO_STRICT_ALIASING_CFLAGS="-fno-strict-aliasing"
 
129
  fi
 
130
fi
 
131
AC_SUBST(NO_STRICT_ALIASING_CFLAGS)
 
132
 
 
133
GOBJECT_INTROSPECTION_CHECK([0.6.7])
 
134
 
 
135
AC_OUTPUT([
 
136
Makefile
 
137
libmenu/Makefile
 
138
libmenu/libgnome-menu.pc
 
139
libmenu/libgnome-menu-uninstalled.pc
 
140
layout/Makefile
 
141
desktop-directories/Makefile
 
142
util/Makefile
 
143
python/Makefile
 
144
simple-editor/Makefile
 
145
simple-editor/GMenuSimpleEditor/Makefile
 
146
po/Makefile.in
 
147
])
 
148
 
 
149
dnl ---------------------------------------------------------------------------
 
150
dnl - Show summary
 
151
dnl ---------------------------------------------------------------------------
 
152
 
 
153
echo "
 
154
              gnome-menus $VERSION
 
155
              `echo gnome-menus $VERSION | sed "s/./=/g"`
 
156
 
 
157
        prefix:                       ${prefix}
 
158
        exec_prefix:                  ${exec_prefix}
 
159
        libdir:                       ${libdir}
 
160
        bindir:                       ${bindir}
 
161
        sbindir:                      ${sbindir}
 
162
        sysconfdir:                   ${sysconfdir}
 
163
        localstatedir:                ${localstatedir}
 
164
        datadir:                      ${datadir}
 
165
        source code location:         ${srcdir}
 
166
        compiler:                     ${CC}
 
167
        cflags:                       ${CFLAGS}
 
168
        Maintainer mode:              ${USE_MAINTAINER_MODE}
 
169
        Warn about deprecations:      ${enable_deprecations}
 
170
 
 
171
        Turn on debugging:            ${enable_debug}
 
172
        Build python bindings:        ${have_python}
 
173
        Build introspection support:  ${found_introspection}
 
174
 
 
175
"