File: configure.ac

package info (click to toggle)
screem 0.16.1-4.2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 17,132 kB
  • ctags: 5,870
  • sloc: ansic: 76,256; sh: 8,628; xml: 2,900; makefile: 907
file content (321 lines) | stat: -rw-r--r-- 8,998 bytes parent folder | download | duplicates (2)
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
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
AC_PREREQ(2.52)

dnl Process this file with autoconf to produce a configure script.
AC_INIT( screem, 0.16.1, http://www.screem.org/ )

AC_CONFIG_SRCDIR(src/screem-application.c)

AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE( AC_PACKAGE_NAME, AC_PACKAGE_VERSION )

ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}"
AC_SUBST([ACLOCAL_AMFLAGS])

dnl get rid of those horrible static library things
AC_ENABLE_STATIC(no)

AC_PROG_LIBTOOL

AC_ISC_POSIX
AC_PROG_CC
AC_HEADER_STDC

AC_PATH_PROG(GCONFTOOL, gconftool-2)
AC_PROG_INTLTOOL([0.29])

dnl taken from atk configure.in
dnl This PATH_GLIB is somewhat redundant, but does a sanity compile and
dnl importantly defines the GLIB_GENMARSHAL variable for subst into the
dnl Makefile
AM_PATH_GLIB_2_0(2.5.6, :,
  AC_MSG_ERROR([
*** GLIB 2.5.6 or better is required. The latest version of
*** GLIB is always available from ftp://ftp.gtk.org/.]),
  gobject gmodule)


dnl ******************************
dnl Check for required libs
dnl ******************************

AC_PATH_PROG([PKG_CONFIG], [pkg-config], [no])

dnl *************************
dnl startup notification
dnl *************************
if $PKG_CONFIG --atleast-version 0.5 libstartup-notification-1.0; then
	STARTUP_NOTIFICATION_PACKAGE=libstartup-notification-1.0
 	AC_DEFINE( [HAVE_STARTUP_NOTIFICATION], [1], [if startup notification is enabled or not] )
else
	STARTUP_NOTIFICATION_PACKAGE=
fi

dnl *************************
dnl launchpad
dnl *************************
if $PKG_CONFIG --atleast-version 0.0 launchpad-integration; then
	LAUNCHPAD_PACKAGE=launchpad-integration
 	AC_DEFINE( [HAVE_LAUNCHPAD], [1], [if launchpad integration is enabled or not] )
else
	LAUNCHPAD_PACKAGE=
fi

PKG_CHECK_MODULES(SCREEM, \
			gtk+-2.0 >= 2.6.0			\
			glib-2.0 >= 2.6.0			\
			libgnome-2.0 >= 2.2.0			\
			libgnomeui-2.0 >= 2.6.0 		\
			libxml-2.0 >= 2.4.3			\
			libglade-2.0 >= 2.3.0			\
			gconf-2.0 >= 2.2.0			\
			gnome-vfs-2.0 >= 2.8.3			\	
			gdk-pixbuf-2.0 >= 2.2.0			\
			gthread-2.0 >= 2.2.0			\
			libgtkhtml-2.0 >= 2.2.0			\
			gmodule-2.0 >= 2.2.0			\
			libgnomeprint-2.2 >= 2.2.0		\
			libgnomeprintui-2.2 >= 2.2.0 		\
			gtksourceview-1.0 >= 1.1.90 		\
			$STARTUP_NOTIFICATION_PACKAGE		\
			$LAUNCHPAD_PACKAGE			\
			libgnome-menu >= 2.9.2		)

AC_SUBST(SCREEM_LIBS)

dnl **********************
dnl gnome-menus
dnl **********************
PKG_CHECK_MODULES( GNOMEMENU, libgnome-menu >= 2.9.2 )
GNOMEMENU_VERSION=`pkg-config --modversion libgnome-menu | $AWK 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
	AC_DEFINE_UNQUOTED(GNOMEMENU_VERSION,$GNOMEMENU_VERSION, [libgnome-menu version])


dnl **********************
dnl dbus
dnl **********************
DBUS_LIBS=
DBUS_CFLAGS=
AC_ARG_ENABLE(dbus,
		AC_HELP_STRING([--enable-dbus Build with dbus support]), HAVE_DBUS=$enableval, HAVE_DBUS=yes)
if test "$HAVE_DBUS" = "yes"; then
 	AC_DEFINE( [HAVE_DBUS], [1], [if dbus support is enabled or not] )
	PKG_CHECK_MODULES(DBUS, dbus-1 >= 0.22 dbus-glib-1 >= 0.22  )

	DBUS_VERSION=`pkg-config --modversion dbus-1 | $AWK 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
	AC_DEFINE_UNQUOTED(DBUS_VERSION,$DBUS_VERSION, [dbus version])
fi
AC_SUBST(DBUS_LIBS)
AC_SUBST(DBUS_CFLAGS)

dnl ****************************
dnl libegg stuff
dnl ****************************
PKG_CHECK_MODULES(EGG, gtk+-2.0 >= 2.0.0)
AC_SUBST(EGG_CFLAGS)
AC_SUBST(EGG_LIBS)

dnl
dnl libcroco stuff
dnl

PKG_CHECK_MODULES(CROCO, libcroco-0.6 >= 0.6.0)
AC_SUBST(CROCO_CFLAGS)
AC_SUBST(CROCO_LIBS)

dnl end of libcroco stuff


dnl ***************************
dnl enchant
dnl ***************************
ENCHANT_LIBS=
ENCHANT_CFLAGS=
AC_ARG_ENABLE(enchant,
		AC_HELP_STRING([--enable-enchant Use enchant for spell checking]), HAVE_ENCHANT=$enableval, HAVE_ENCHANT=no)
if test "$HAVE_ENCHANT" = "yes"; then
 	AC_DEFINE( [HAVE_ENCHANT], [1], [Use enchant for spell checking] )
	PKG_CHECK_MODULES(ENCHANT, enchant >= 1.1.6)
fi
AC_SUBST(ENCHANT_CFLAGS)
AC_SUBST(ENCHANT_LIBS)



AC_ARG_ENABLE(update_mime,
		AC_HELP_STRING([--disable-update-mime Do not run update-mime-database when installing]), UPDATE_MIME=$enableval,UPDATE_MIME=yes)
AM_CONDITIONAL(UPDATE_MIME, test x"$UPDATE_MIME" = x"yes")

AC_ARG_ENABLE(update_desktop,
		AC_HELP_STRING([--disable-update-desktop Do not run update-desktop-database when installing]), UPDATE_DESKTOP=$enableval,UPDATE_DESKTOP=yes)
update_desktop_database=`which update-desktop-database`
if test -z "$update_desktop_database" ; then
	UPDATE_DESKTOP=no
fi
AM_CONDITIONAL(UPDATE_DESKTOP, test x"$UPDATE_DESKTOP" = x"yes")

dnl **************************************
dnl Mozilla stuff for when / if we use it
dnl **************************************
MOZ_CFLAGS=""
MOZ_LIBS=""
dnl AC_ARG_ENABLE( mozilla,
dnl 		[ --enable-mozilla  Build with Mozilla support ],, )
dnl if test x"$enable_mozilla" = xyes; then
dnl  	AC_PATH_PROG(MOZILLA_CONFIG, mozilla-config,no)
dnl  	if test "$MOZILLA_CONFIG" = "no"; then
dnl  		AC_MSG_ERROR(Couldn't find mozilla-config, please install the mozilla development package)
dnl 	fi

dnl 	AC_DEFINE( [SCREEM_MOZ], [1], [if mozilla support is enabled or not] )
dnl	PKG_CHECK_MODULES(MOZ, mozilla-gtkmozembed >= 1.7)
dnl fi
AC_SUBST(MOZ_CFLAGS)
AC_SUBST(MOZ_LIBS)


dnl
dnl Gconf stuff
dnl
AM_GCONF_SOURCE_2

dnl Checks for library functions.
AC_CHECK_FUNCS(mkdir strsignal strerror memcpy strstr)

dnl fnmatch
AC_CHECK_FUNCS( fnmatch,
	[
	have_fnmatch=true],
	[
	have_fnmatch=false
	])
AM_CONDITIONAL(HAVE_FNMATCH, $have_fnmatch)

dnl Checks for header files.
AC_HEADER_DIRENT
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS(fcntl.h unistd.h \
stdarg.h strings.h sys/time.h \
stdlib.h termios.h)


dnl
dnl Perform checks that are required for Sitecopy
dnl

AC_TYPE_OFF_T
AC_CHECK_SIZEOF(long)
AC_CHECK_SIZEOF(off_t)
if test $ac_cv_sizeof_off_t -le $ac_cv_sizeof_long; then
	fmt="ld"
else
	fmt="lld"
fi
AC_DEFINE_UNQUOTED(NE_FMT_OFF_T,"$fmt", [off_t printf format])


dnl internationalisation support
GETTEXT_PACKAGE=screem
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [gettext package])

ALL_LINGUAS="az cs da de el es fr it ja ko nb no pl pt_BR ru rw sk sv tr uk vi zh_CN"
AM_GLIB_GNU_GETTEXT
AM_GLIB_DEFINE_LOCALEDIR(GNOMELOCALEDIR)

dnl scrollkeeper
AC_PATH_PROG(SCROLLKEEPER_CONFIG, scrollkeeper-config,no)
if test "$SCROLLKEEPER_CONFIG" = "no"; then
	AC_MSG_ERROR(Couldn't find scrollkeeper-config, please install the scrollkeeper package)
fi
SCROLLKEEPER_BUILD_REQUIRED=0.1.1
AC_SUBST(SCROLLKEEPER_BUILD_REQUIRED)

dnl Set PACKAGE_LOCALE_DIR in config.h.
if test "x${prefix}" = "xNONE"; then
  AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${ac_default_prefix}/${DATADIRNAME}/locale", [locale directory])
else
  AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${prefix}/${DATADIRNAME}/locale", [locale directory])
fi

dnl Subst PACKAGE_PIXMAPS_DIR.
if test "x${prefix}" = "xNONE"; then
  AC_DEFINE_UNQUOTED(PACKAGE_PIXMAPS_DIR, "${ac_default_prefix}/${DATADIRNAME}/${PACKAGE}/pixmaps", [pixmap directory])
  pixmapsdir=${ac_default_prefix}/${DATADIRNAME}/${PACKAGE}/pixmaps
else
  AC_DEFINE_UNQUOTED(PACKAGE_PIXMAPS_DIR, "${prefix}/${DATADIRNAME}/${PACKAGE}/pixmaps", [pixmap directory])  
  pixmapsdir=${prefix}/${DATADIRNAME}/${PACKAGE}/pixmaps
fi

AC_SUBST(pixmapsdir)

dnl we can't disable gtk deprecated widgets as libgnomeui uses them
dnl can't disable libgnomeui as glade doesn't support gtk+2.5 which
dnl replaces some of them, or others haven't got a replacement
dnl can't disable glib deprecated functions yet either, g_strcasecmp
dnl being the blocker here, need a util function which does the
dnl same for utf-8

DEPRECATION_FLAGS="-DGTK_DISABLE_DEPRECATED -DGNOME_DISABLE_DEPRECATED -DGNOMEUI_DISABLE_DEPRECATED"

CFLAGS="$SCREEM_CFLAGS -Wall $DEPRECATION_FLAGS $CFLAGS"
AC_SUBST(CFLAGS)

AC_SUBST(CPPFLAGS)
AC_SUBST(LDFLAGS)

AC_OUTPUT([
Makefile
libegg/Makefile
libegg/recent-files/Makefile
libegg/util/Makefile
libegg/toolbar-editor/Makefile
gdl/Makefile
include/Makefile
src/Makefile
glade/Makefile
ui/Makefile
po/Makefile.in
plugins/Makefile
plugins/screem-plugin.pc
plugins/colourWizard/Makefile
plugins/entityWizard/Makefile
plugins/linkWizard/Makefile
plugins/tableWizard/Makefile
plugins/ssiWizard/Makefile
plugins/formWizard/Makefile
plugins/uploadWizard/Makefile
plugins/css-wizard/Makefile
plugins/object-wizard/Makefile
resources/Makefile
resources/Applets/Makefile
resources/Images/Makefile
resources/Javascript/Makefile
resources/PHP3/Makefile
resources/HTML/Makefile
resources/Templates/Makefile
splash/Makefile
docs/Makefile
docs/C/Makefile
docs/C/figures/Makefile
pixmaps/Makefile
hints/Makefile
dtd/Makefile
data/Makefile
data/mime/Makefile
data/tagtrees/Makefile
helpers/Makefile
helpers/Tidy/Makefile
helpers/browsers/Makefile
helpers/browsers-remote/Makefile
tests/Makefile
],[sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile])

echo "

Configuration:
	Source code location:			 ${srcdir}
	Compiler:				 ${CC}

	Install location:			 ${prefix}

Type make to build Screem."