~vcs-imports/libgnome/master

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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
AC_PREREQ(2.54)

# Making releases:
#   libgnome_micro_version += 1;
#   libgnome_interface_age += 1;
# if any functions have been added, set libgnome_interface_age to 0.
# if backwards compatibility has been broken,
# set LIBGNOME_BINARY_AGE and LIBGNOME_INTERFACE_AGE to 0.
#
m4_define([libgnome_major_version], [2])
m4_define([libgnome_minor_version], [32])
m4_define([libgnome_micro_version], [2])
m4_define([libgnome_interface_age], [2])
# If you need a modifier for the version number. 
# Normally empty, but can be used to make "fixup" releases.
m4_define([libgnome_extraversion], [])

dnl required versions of other tools.
m4_define([audiofile_required_version], [0.2.3])
m4_define([esound_required_version],    [0.2.26])
m4_define([gconf_required_version],     [1.1.11])
m4_define([glib_required_version],      [2.8.0])
m4_define([gnome_vfs_required_version], [2.5.3])
m4_define([libbonobo_required_version], [2.13.0])
m4_define([gobject_required_version], [2.0.0])
m4_define([gio_required_version],       [2.16.0])
m4_define([canberra_required_version], [0])

dnl libtool versioning from libgnome
m4_define([libgnome_current], [m4_eval(100 * libgnome_minor_version + libgnome_micro_version - libgnome_interface_age)])
m4_define([libgnome_binary_age], [m4_eval(100 * libgnome_minor_version + libgnome_micro_version)])
m4_define([libgnome_revision], [libgnome_interface_age])
m4_define([libgnome_age], [m4_eval(libgnome_binary_age - libgnome_interface_age)])
m4_define([libgnome_version], [libgnome_major_version().libgnome_minor_version().libgnome_micro_version()libgnome_extraversion()])

AC_INIT([libgnome], [libgnome_version],
        [http://bugzilla.gnome.org/enter_bug.cgi?product=libgnome])
AC_CONFIG_SRCDIR([libgnome/libgnome.h])

LIBGNOME_MAJOR_VERSION=libgnome_major_version
LIBGNOME_MINOR_VERSION=libgnome_minor_version
LIBGNOME_MICRO_VERSION=libgnome_micro_version
LIBGNOME_INTERFACE_AGE=libgnome_interface_age

LIBGNOME_CURRENT=libgnome_current
LIBGNOME_REVISION=libgnome_revision
LIBGNOME_AGE=libgnome_age

AC_SUBST(LIBGNOME_CURRENT)
AC_SUBST(LIBGNOME_REVISION)
AC_SUBST(LIBGNOME_AGE)

AM_INIT_AUTOMAKE([1.9 foreign no-dist-gzip dist-bzip2])

m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])

AC_CONFIG_HEADERS([config.h])

AM_MAINTAINER_MODE

dnl make aclocal calls respect $ACLOCAL_FLAGS
ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}"
AC_SUBST(ACLOCAL_AMFLAGS)

IT_PROG_INTLTOOL([0.40.0])

AC_PROG_SED
AC_ISC_POSIX
AC_PROG_CC
AC_STDC_HEADERS
AC_LIBTOOL_WIN32_DLL
AM_PROG_LIBTOOL

AC_MSG_CHECKING([for Win32])
case "$host" in
  *-*-cygwin*)
    os_win32=no
    SOPREFIX=cyg
    ;;
  *-*-mingw*)
    os_win32=yes
    SOPREFIX=lib
    ;;
  *)
    os_win32=no
    SOPREFIX=lib
    ;;
esac
AC_MSG_RESULT([$os_win32])

AM_CONDITIONAL(OS_WIN32, [test $os_win32 = yes])
AC_SUBST(SOPREFIX)

AC_CHECK_FUNCS([setenv unsetenv clearenv setfsgid])
AC_CHECK_HEADERS(sys/fsuid.h)
AC_CHECK_FUNCS(bind_textdomain_codeset)

dnl Checks for Apple Darwin

AC_CHECK_FUNC(_NSGetEnviron, have_ns_getenviron=yes)
if test x$have_ns_getenviron = xyes; then
  AC_DEFINE(HAVE_NSGETENVIRON, 1, [whether we have _NSGetEnviron])
fi
AC_CHECK_HEADER(crt_externs.h, have_crt_externs=yes)
if test x$have_crt_externs = xyes; then
  AC_DEFINE(HAVE_CRT_EXTERNS_H, 1, [whether we have crt_externs.h])
fi

GETTEXT_PACKAGE=libgnome-2.0
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [The gettext package])

AM_GLIB_GNU_GETTEXT

GNOME_COMPILE_WARNINGS

dnl Define GNOME_ENABLE_DEBUG if the --enable-debug switch was given.
GNOME_DEBUG_CHECK

dnl Don't use AC_PROG_AWK since we need the full pathname.
AC_PATH_PROGS(AWK, mawk gawk nawk awk, )
AC_PATH_PROGS(PERL, perl5 perl)

# define a MAINT-like variable REBUILD which is set if Perl
# and awk are found, so autogenerated sources can be rebuilt
AC_ARG_ENABLE(rebuilds,
              AC_HELP_STRING([--disable-rebuilds],
                             [disable all source autogeneration rules]),,
              [enable_rebuilds=yes])
REBUILD=\#
if test "x$enable_rebuilds" = "xyes" && \
     test -n "$PERL" && \
     $PERL -e 'exit !($] >= 5.002)' > /dev/null 2>&1 && \
     test -n "$AWK" ; then
  REBUILD=
fi
AC_SUBST(REBUILD)

dnl
dnl Start of pkg-config checks
dnl

PKG_PROG_PKG_CONFIG()

dnl We first check for esound and audiofile (which has conditional
dnl support built in)
dnl

AC_MSG_CHECKING([whether ESounD support is requested])
AC_ARG_ENABLE([esd],
    AS_HELP_STRING([--enable-esd],[Enable ESounD (default=no)]),
    [enable_esd=$enableval],
    [enable_esd=no])
AC_MSG_RESULT([$enable_esd])

ESD_DEPS=""
SOUND_MODULES=""
if test x$enable_esd = xyes; then
	SOUND_MODULES="esound >= esound_required_version dnl
		audiofile >= audiofile_required_version"
	ESD_DEPS="esound"
fi

AC_MSG_CHECKING([whether to use libcanberra])
AC_ARG_ENABLE([canberra],
    AS_HELP_STRING([--enable-canberra],[Enable canberra (default=yes)]),
    [],[enable_canberra=yes])
AC_MSG_RESULT([$enable_canberra])

if test "$enable_canberra" = "yes"; then
  SOUND_MODULES="$SOUND_MODULES libcanberra >= canberra_required_version"
  ESD_DEPS="$ESD_DEPS libcanberra >= canberra_required_version"

  AC_DEFINE([HAVE_CANBERRA],[1],[Define if canberra is enabled])
fi

AC_SUBST(ESD_DEPS)

PKG_CHECK_MODULES(LIBGNOME, dnl
 [glib-2.0 >= glib_required_version dnl
  gobject-2.0 >= gobject_required_version dnl
  gmodule-2.0 >= glib_required_version dnl
  gobject-2.0 >= glib_required_version dnl
  gnome-vfs-2.0 >= gnome_vfs_required_version dnl
  libbonobo-2.0 >= libbonobo_required_version dnl
  gconf-2.0 >= gconf_required_version dnl
  $SOUND_MODULES])

# for gnome-open
PKG_CHECK_MODULES([GIO],[gio-2.0 >= gio_required_version])

dnl
dnl Check for gtk-doc
dnl
GTK_DOC_CHECK([1.0],[--flavour no-tmpl])

AC_CONFIG_MACRO_DIR(m4)

dnl ==============================================
dnl Special GConf section 
dnl ==============================================

AC_PATH_PROG(GCONFTOOL, gconftool-2, no)

if test x"$GCONFTOOL" = xno; then
  AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf])
fi

AM_GCONF_SOURCE_2

dnl
dnl Substitute these
dnl
GNOME_VFS_VERSION=`$PKG_CONFIG --modversion gnome-vfs-2.0`
AC_SUBST(GNOME_VFS_VERSION)

AC_CHECK_LIB(popt, poptStrippedArgv,, AC_MSG_ERROR([popt 1.5 or newer is required to build
libgnome. You can download the latest version from ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.0.x/]))

LIBGNOME_MINOR_VERSION=libgnome_minor_version
if test $(( $(echo $LIBGNOME_MINOR_VERSION) %2)) = "1"; then
	A11Y_ENABLED=true
else
	A11Y_ENABLED=false
fi

AC_SUBST(A11Y_ENABLED)

AC_CONFIG_FILES([
Makefile
libgnome-zip
po/Makefile.in
libgnome/Makefile
monikers/Makefile
schemas/Makefile
schemas/desktop_gnome_interface.schemas.in
gnome-data/Makefile
libgnome/libgnome-2.0.pc
libgnome/libgnome-2.0-uninstalled.pc
doc/Makefile
doc/reference/Makefile
doc/reference/version.xml
])

AC_OUTPUT