forked from xfce-mirror/libxfce4ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac.in
437 lines (401 loc) · 15.7 KB
/
configure.ac.in
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
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
dnl
dnl Copyright (c) 2007-2017 The Xfce development team
dnl
dnl ***************************
dnl *** Version information ***
dnl ***************************
m4_define([libxfce4ui_verinfo], [0:0:0])
m4_define([libxfce4ui_version_api], [1])
m4_define([libxfce4ui_version_major], [4])
m4_define([libxfce4ui_version_minor], [13])
m4_define([libxfce4ui_version_micro], [4])
m4_define([libxfce4ui_version_nano], []) dnl leave this empty to have no nano version
m4_define([libxfce4ui_version_build], [@REVISION@])
m4_define([libxfce4ui_version_tag], [git])
m4_define([libxfce4ui_version], [libxfce4ui_version_major().libxfce4ui_version_minor().libxfce4ui_version_micro()ifelse(libxfce4ui_version_nano(), [], [], [.libxfce4ui_version_nano()])ifelse(libxfce4ui_version_tag(), [git], [libxfce4ui_version_tag()-libxfce4ui_version_build()], [libxfce4ui_version_tag()])])
m4_define([libxfce4kbd_private_verinfo], [0:0:0])
m4_define([libxfce4kbd_private_version_api], [2])
dnl # DO NOT MODIFY ANYTHING BELOW THIS LINE, UNLESS YOU KNOW WHAT
dnl # YOU ARE DOING.
dnl ********************************************
dnl *** Full debug support for GIT snapshots ***
dnl ********************************************
m4_define([libxfce4ui_debug_default], [ifelse(libxfce4ui_version_tag(), [git], [yes], [minimum])])
dnl ***************************
dnl *** Initialize autoconf ***
dnl ***************************
AC_COPYRIGHT([Copyright (c) 2007-2017 The Xfce development team])
AC_INIT([libxfce4ui], [libxfce4ui_version], [http://bugzilla.xfce.org/], [libxfce4ui])
AC_PREREQ([2.60])
AC_CONFIG_MACRO_DIR([m4])
AC_REVISION([libxfce4ui_version_build])
AC_CANONICAL_TARGET()
dnl ***************************
dnl *** Initialize automake ***
dnl ***************************
AM_INIT_AUTOMAKE([1.11 dist-bzip2 tar-ustar no-dist-gzip])
AC_CONFIG_HEADERS([config.h])
AM_MAINTAINER_MODE()
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
dnl *******************************
dnl *** Check for UNIX variants ***
dnl *******************************
AC_AIX()
AC_ISC_POSIX()
AC_MSG_CHECKING([platform])
case "$host" in
*-*-mingw*|*-*-cygwin*)
platform="win32"
NO_UNDEFINED=-no-undefined
;;
*-apple-darwin*)
platform="os x"
;;
*)
platform="unix"
;;
esac
AM_CONDITIONAL(PLATFORM_WIN32, test "$platform" = "win32")
AM_CONDITIONAL(PLATFORM_OSX, test "$platform" = "os x")
AC_SUBST(NO_UNDEFINED)
dnl ********************************
dnl *** Check for basic programs ***
dnl ********************************
AC_PROG_CC()
AC_PROG_LD()
AM_PROG_CC_C_O()
AC_PROG_INSTALL()
IT_PROG_INTLTOOL([0.35.0])
AC_CHECK_PROGS([PERL], [perl5 perl])
AC_PATH_PROG([GLIB_COMPILE_RESOURCES],[glib-compile-resources])
dnl **************************
dnl *** Initialize libtool ***
dnl **************************
LT_PREREQ([2.4])
LT_INIT([disable-static])
dnl **************************************
dnl *** Substitute version information ***
dnl **************************************
LIBXFCE4UI_VERINFO=libxfce4ui_verinfo()
LIBXFCE4UI_VERSION_API=libxfce4ui_version_api()
LIBXFCE4UI_VERSION_MAJOR=libxfce4ui_version_major()
LIBXFCE4UI_VERSION_MINOR=libxfce4ui_version_minor()
LIBXFCE4UI_VERSION_MICRO=libxfce4ui_version_micro()
LIBXFCE4KBD_PRIVATE_VERINFO=libxfce4kbd_private_verinfo()
LIBXFCE4KBD_PRIVATE_VERSION_API=libxfce4kbd_private_version_api()
AC_SUBST([LIBXFCE4UI_VERINFO])
AC_SUBST([LIBXFCE4UI_VERSION_API])
AC_SUBST([LIBXFCE4UI_VERSION_MAJOR])
AC_SUBST([LIBXFCE4UI_VERSION_MINOR])
AC_SUBST([LIBXFCE4UI_VERSION_MICRO])
AC_SUBST([LIBXFCE4KBD_PRIVATE_VERINFO])
AC_SUBST([LIBXFCE4KBD_PRIVATE_VERSION_API])
dnl ***************************************
dnl *** Check for standard header files ***
dnl ***************************************
AC_HEADER_STDC()
AC_CHECK_HEADERS([crt_externs.h errno.h fcntl.h limits.h locale.h math.h \
memory.h signal.h stdarg.h stdlib.h string.h unistd.h])
AC_CHECK_DECLS([environ])
AC_CHECK_FUNCS([_NSGetEnviron])
dnl ******************************
dnl *** Check for i18n support ***
dnl ******************************
XDT_I18N([@LINGUAS@])
dnl *******************************************
dnl *** Check for X Window System installed ***
dnl *******************************************
XDT_CHECK_LIBX11_REQUIRE()
XDT_CHECK_LIBSM()
dnl ***********************************
dnl *** Check for required packages ***
dnl ***********************************
XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.42.0])
XDT_CHECK_PACKAGE([GTK3], [gtk+-3.0], [3.18.0])
XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.12.0])
dnl ***********************************************************
dnl *** Optional support for a GTK+2 version of the library ***
dnl ***********************************************************
XDT_CHECK_OPTIONAL_PACKAGE([GTK2],
[gtk+-2.0], [2.24.0], [gtk2],
[GTK+ 2 support])
AM_CONDITIONAL([ENABLE_GTK2_LIBRARY], [test "x$GTK2_FOUND" = "xyes"])
AC_DEFINE(GLIB_VERSION_MIN_REQUIRED, GLIB_VERSION_2_42, [Ignore post 2.42 deprecations])
AC_DEFINE(GLIB_VERSION_MAX_ALLOWED, GLIB_VERSION_2_42, [Prevent post 2.42 APIs])
AC_DEFINE(GDK_VERSION_MIN_REQUIRED, GDK_VERSION_3_18, [Ignore post 3.18 deprecations])
AC_DEFINE(GDK_VERSION_MAX_ALLOWED, GDK_VERSION_3_18, [Prevent post 3.18 APIs])
dnl ***************************************
dnl *** Check for gobject-introspection ***
dnl ***************************************
GOBJECT_INTROSPECTION_CHECK([1.30.0])
dnl *************************
dnl *** Check for vapigen ***
dnl *************************
VAPIGEN_CHECK()
dnl *************************************************
dnl *** Optional support for startup notification ***
dnl *************************************************
XDT_CHECK_OPTIONAL_PACKAGE([LIBSTARTUP_NOTIFICATION],
[libstartup-notification-1.0],
[0.4], [startup-notification],
[startup notification library])
dnl **************************************************
dnl *** Check whether to build the keyboard libary ***
dnl **************************************************
AC_ARG_ENABLE([keyboard-library],
[AC_HELP_STRING([--disable-keyboard-library],
[Do not compile the keyboard library needed by xfwm4 and xfce4-settings (default=enabled)])],
[enable_keyboard_library=$enableval], [enable_keyboard_library=yes])
if test "x$enable_keyboard_library" = "xyes"; then
XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [4.12.0])
fi
AM_CONDITIONAL([ENABLE_KEYBOARD_LIBRARY], [test "x$enable_keyboard_library" = "xyes"])
dnl *********************************************
dnl *** Check for vendor specific information ***
dnl *********************************************
AC_MSG_CHECKING([for additional vendor name and/or info])
AC_ARG_WITH([vendor-info],
AC_HELP_STRING([--with-vendor-info=NAME], [Specify an additional vendor name, optionally with a file in $prefix/share/xfce4/venderinfo]),
[with_vendor_info="$withval"], [with_vendor_info=""])
if test x"$with_vendor_info" != x""; then
AC_DEFINE_UNQUOTED([VENDOR_INFO], ["$with_vendor_info"], [Additional vendor name and/or info])
AC_MSG_RESULT([$vendorinfo])
else
AC_MSG_RESULT([not set])
fi
dnl *********************************************
dnl *** Check for vendor specific information ***
dnl *********************************************
AC_MSG_CHECKING([for a custom manual website location])
AC_ARG_WITH([manual-website],
AC_HELP_STRING([--with-manual-website=URI], [Specify an optional manual website, defaults to http://docs.xfce.org.]),
[with_manual_website="$withval"],
[with_manual_website="http://docs.xfce.org/help.php"])
AC_DEFINE_UNQUOTED([MANUAL_WEBSITE], ["$with_manual_website"], [Documentation website])
AC_MSG_RESULT([$with_manual_website])
dnl *********************************************************
dnl *** Optional support for the Glade Interface Designer ***
dnl *********************************************************
XDT_CHECK_OPTIONAL_PACKAGE([GLADEUI], [gladeui-1.0],
[3.5.0], [gladeui], [glade interface designer])
XDT_CHECK_OPTIONAL_PACKAGE([GLADEUI2], [gladeui-2.0],
[3.5.0], [gladeui2], [glade interface designer])
AC_ARG_WITH([gladeui-catalogdir],
[AC_HELP_STRING([--with-gladeui-catalogdir=PATH],
[Specify where to install glade designer catalog files (default=autodetect)])],
[gladeui_catalogdir="$withval"])
AC_ARG_WITH([gladeui-moduledir],
[AC_HELP_STRING([--with-gladeui-moduledir=PATH],
[Specify where to install glade designer modules (default=autodetect)])],
[gladeui_moduledir="$withval"])
AC_ARG_WITH([gladeui-pixmapdir],
[AC_HELP_STRING([--with-gladeui-pixmapdir=PATH],
[Specify where to install glade designer pixmaps (default=autodetect)])],
[gladeui_pixmapdir="$withval"])
if test x"$GLADEUI_FOUND" = x"yes"; then
if test x"$gladeui_catalogdir" = x""; then
GLADEUI_CATALOGDIR=`$PKG_CONFIG "--variable=catalogdir" "gladeui-1.0"`
else
GLADEUI_CATALOGDIR="$gladeui_catalogdir"
fi
if test x"$gladeui_moduledir" = x""; then
GLADEUI_MODULEDIR=`$PKG_CONFIG "--variable=moduledir" "gladeui-1.0"`
else
GLADEUI_MODULEDIR="$gladeui_moduledir"
fi
if test x"$gladeui_pixmapdir" = x""; then
GLADEUI_PIXMAPDIR=`$PKG_CONFIG "--variable=pixmapdir" "gladeui-1.0"`
else
GLADEUI_PIXMAPDIR="$gladeui_pixmapdir"
fi
fi
AC_SUBST([GLADEUI_CATALOGDIR])
AC_SUBST([GLADEUI_MODULEDIR])
AC_SUBST([GLADEUI_PIXMAPDIR])
AC_ARG_WITH([gladeui2-catalogdir],
[AC_HELP_STRING([--with-gladeui2-catalogdir=PATH],
[Specify where to install glade 3.0 designer catalog files (default=autodetect)])],
[gladeui2_catalogdir="$withval"])
AC_ARG_WITH([gladeui2-moduledir],
[AC_HELP_STRING([--with-gladeui2-moduledir=PATH],
[Specify where to install glade 3.0 designer modules (default=autodetect)])],
[gladeui2_moduledir="$withval"])
AC_ARG_WITH([gladeui2-pixmapdir],
[AC_HELP_STRING([--with-gladeui2-pixmapdir=PATH],
[Specify where to install glade 3.0 designer pixmaps (default=autodetect)])],
[gladeui2_pixmapdir="$withval"])
if test x"$GLADEUI2_FOUND" = x"yes"; then
if test x"$gladeui2_catalogdir" = x""; then
GLADEUI2_CATALOGDIR=`$PKG_CONFIG "--variable=catalogdir" "gladeui-2.0"`
else
GLADEUI2_CATALOGDIR="$gladeui2_catalogdir"
fi
if test x"$gladeui2_moduledir" = x""; then
GLADEUI2_MODULEDIR=`$PKG_CONFIG "--variable=moduledir" "gladeui-2.0"`
else
GLADEUI2_MODULEDIR="$gladeui2_moduledir"
fi
if test x"$gladeui2_pixmapdir" = x""; then
GLADEUI2_PIXMAPDIR=`$PKG_CONFIG "--variable=pixmapdir" "gladeui-2.0"`
else
GLADEUI2_PIXMAPDIR="$gladeui2_pixmapdir"
fi
fi
AC_SUBST([GLADEUI2_CATALOGDIR])
AC_SUBST([GLADEUI2_MODULEDIR])
AC_SUBST([GLADEUI2_PIXMAPDIR])
dnl *************************
dnl *** Check for gtk-doc ***
dnl *************************
GTK_DOC_CHECK([1.0])
dnl ***********************************
dnl *** Check for debugging support ***
dnl ***********************************
XDT_FEATURE_DEBUG([libxfce4ui_debug_default])
dnl **************************************
dnl *** Check for linker optimizations ***
dnl **************************************
XDT_FEATURE_LINKER_OPTS()
dnl ****************************************
dnl *** Check for ELF visibility support ***
dnl ****************************************
AC_ARG_ENABLE([visibility],
AC_HELP_STRING([--disable-visibility],
[Do not use ELF visibility attributes]),
[enable_visibility=$enableval], [enable_visibility=yes])
have_gnuc_visibility=no
if test "x$enable_visibility" != "xno"; then
XDT_SUPPORTED_FLAGS([xdt_vis_test_cflags], [-Wall -Werror -Wno-unused-parameter])
saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $xdt_vis_test_cflags"
AC_MSG_CHECKING([whether $CC supports the GNUC visibility attribute])
AC_COMPILE_IFELSE([AC_LANG_SOURCE(
[
void test_default (void);
void test_hidden (void);
void __attribute__ ((visibility("default"))) test_default (void) {}
void __attribute__ ((visibility("hidden"))) test_hidden (void) {}
int main (int argc, char **argv) {
test_default ();
test_hidden ();
return 0;
}
])],
[
have_gnuc_visibility=yes
AC_MSG_RESULT([yes])
],
[
AC_MSG_RESULT([no])
])
CFLAGS="$saved_CFLAGS"
fi
if test "x$have_gnuc_visibility" = "xyes"; then
CPPFLAGS="$CPPFLAGS -DHAVE_GNUC_VISIBILITY"
fi
AM_CONDITIONAL([HAVE_GNUC_VISIBILITY], [test "x$have_gnuc_visibility" = "xyes"])
dnl *************************************
dnl *** Compensate for broken gtk-doc ***
dnl *************************************
XDT_SUPPORTED_FLAGS([GTK_DOC_EXTRA_CFLAGS], [-Wno-sign-compare])
AC_SUBST([GTK_DOC_EXTRA_CFLAGS])
#
# Enable Tests
#
AC_ARG_ENABLE(tests,
[AS_HELP_STRING([--enable-tests],[enable validation test framework @<:@default=@<:@disabled@:>@@:>@])],
[enable_tests=$enableval], [enable_tests=no])
AC_MSG_CHECKING([whether to build the validation test framework])
AM_CONDITIONAL(BUILD_TESTS, test "x$enable_tests" = "xyes")
AC_MSG_RESULT($enable_tests)
dnl *********************************
dnl *** Substitute platform flags ***
dnl *********************************
AC_MSG_CHECKING([PLATFORM_CPPFLAGS])
AC_MSG_RESULT([$PLATFORM_CPPFLAGS])
AC_SUBST([PLATFORM_CPPFLAGS])
AC_MSG_CHECKING([PLATFORM_CFLAGS])
AC_MSG_RESULT([$PLATFORM_CFLAGS])
AC_SUBST([PLATFORM_CFLAGS])
AC_MSG_CHECKING([PLATFORM_LDFLAGS])
AC_MSG_RESULT([$PLATFORM_LDFLAGS])
AC_SUBST([PLATFORM_LDFLAGS])
dnl *****************************
dnl *** Generate output files ***
dnl *****************************
AC_OUTPUT([
Makefile
docs/Makefile
docs/version.xml
glade/Makefile
glade/icons/Makefile
glade/icons/16x16/Makefile
glade/icons/22x22/Makefile
icons/Makefile
icons/48x48/Makefile
libxfce4kbd-private/libxfce4kbd-private-2.pc
libxfce4kbd-private/libxfce4kbd-private-3.pc
libxfce4kbd-private/Makefile
libxfce4ui/libxfce4ui-1.pc
libxfce4ui/libxfce4ui-2.pc
libxfce4ui/libxfce4ui-config.h
libxfce4ui/Makefile
xfce4-about/Makefile
po/Makefile.in
tests/Makefile
])
dnl ***************************
dnl *** Print configuration ***
dnl ***************************
echo
echo "Build Configuration:"
echo
if test x"$GTK2_FOUND" = x"yes"; then
echo "* GTK2 support: yes"
else
echo "* GTK2 support: no"
fi
if test x"$GLADEUI_FOUND" = x"yes"; then
echo "* Glade Interface Designer: yes"
echo " - Catalog directory: $GLADEUI_CATALOGDIR"
echo " - Module directory: $GLADEUI_MODULEDIR"
echo " - Pixmap directory: $GLADEUI_PIXMAPDIR"
else
echo "* Glade Interface Designer: no"
fi
if test x"$GLADEUI2_FOUND" = x"yes"; then
echo "* Glade 3.0 Interface Designer: yes"
echo " - Catalog directory: $GLADEUI2_CATALOGDIR"
echo " - Module directory: $GLADEUI2_MODULEDIR"
echo " - Pixmap directory: $GLADEUI2_PIXMAPDIR"
else
echo "* Glade 3.0 Interface Designer: no"
fi
if test x"$enable_keyboard_library" = x"yes"; then
echo "* Keyboard library support: yes"
else
echo "* Keyboard library support: no"
fi
if test x"$LIBSTARTUP_NOTIFICATION_FOUND" = x"yes"; then
echo "* Startup notification: yes"
else
echo "* Startup notification: no"
fi
if test x"$LIBSM_LIBS" = x""; then
echo "* X11 session management: no"
else
echo "* X11 session management: yes"
fi
echo "* Debug support: $enable_debug"
echo "* Build tests: $enable_tests"
echo "* GNU Visibility: $have_gnuc_visibility"
if test -n "$with_vendor_info"; then
echo "* Vendor: $with_vendor_info"
echo
echo "Note you can put additional info about the vendor"
echo "in this text file: \"${datarootdir}/xfce4/vendorinfo\""
else
echo "* Vendor: none"
fi
echo "* Manual website: $with_manual_website"
echo