-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathconfigure.ac
454 lines (413 loc) · 16.3 KB
/
configure.ac
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
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
dnl
dnl Copyright (c) 2007-2024 The Xfce development team
dnl
dnl ***************************
dnl *** Version information ***
dnl ***************************
XDT_VERSION_INIT([4.20.0], [git])
m4_define([libxfce4ui_verinfo], [0:0:0])
m4_define([libxfce4ui_version_api], [2])
m4_define([libxfce4kbd_private_verinfo], [0:0:0])
m4_define([libxfce4kbd_private_version_api], [3])
m4_define([glib_min_version], [2.72.0])
m4_define([gtk_min_version], [3.24.0])
m4_define([libxfce4util_min_version], [4.17.2])
m4_define([xfconf_min_version], [4.12.0])
m4_define([libx11_min_version], [1.6.7])
m4_define([libice_min_version], [1.0.10])
m4_define([libsm_min_version], [1.2.3])
m4_define([libstartup_notif_min_version], [0.4])
m4_define([libgtop_min_version], [2.24.0])
m4_define([epoxy_min_version], [1.2])
m4_define([gudev_min_version], [232])
m4_define([gladeui2_min_version], [3.5.0])
dnl # DO NOT MODIFY ANYTHING BELOW THIS LINE, UNLESS YOU KNOW WHAT
dnl # YOU ARE DOING.
dnl ***************************
dnl *** Initialize autoconf ***
dnl ***************************
AC_COPYRIGHT([Copyright (c) 2007-2024 The Xfce development team])
AC_INIT([libxfce4ui], [xdt_version], [https://gitlab.xfce.org/xfce/libxfce4ui/-/issues], [libxfce4ui])
AC_PREREQ([2.69])
AC_CONFIG_MACRO_DIRS([m4])
AC_REVISION([xdt_version_build])
AC_CANONICAL_TARGET()
AC_DEFINE([VERSION_FULL], [PACKAGE_VERSION], [Alias for VERSION and PACKAGE_VERSION for meson compatibility])
dnl ***************************
dnl *** Initialize automake ***
dnl ***************************
AM_INIT_AUTOMAKE([1.11 dist-bzip2 tar-ustar no-dist-gzip foreign])
AC_CONFIG_HEADERS([config.h])
AM_MAINTAINER_MODE()
AM_SILENT_RULES([yes])
dnl *******************************
dnl *** Check for UNIX variants ***
dnl *******************************
AC_USE_SYSTEM_EXTENSIONS
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()
LT_PATH_LD([])
AM_PROG_CC_C_O()
AC_PROG_INSTALL()
AC_PATH_PROG([XDT_GEN_VISIBILITY], [xdt-gen-visibility])
AC_PATH_PROG([GLIB_COMPILE_RESOURCES],[glib-compile-resources])
AC_PROG_SED
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=xdt_version_major()
LIBXFCE4UI_VERSION_MINOR=xdt_version_minor()
LIBXFCE4UI_VERSION_MICRO=xdt_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_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 ******************************
GETTEXT_PACKAGE="$PACKAGE"
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["$GETTEXT_PACKAGE"], [Name of default gettext domain])
AC_SUBST([GETTEXT_PACKAGE])
AM_GNU_GETTEXT([external])
AM_GNU_GETTEXT_VERSION([0.19.8])
AC_SEARCH_LIBS([bind_textdomain_codeset], [intl],
[AC_DEFINE([HAVE_BIND_TEXTDOMAIN_CODESET], [1], [Define to 1 if you have the 'bind_textdomain_codeset' function.])],
[])
dnl ***********************************
dnl *** Check for required packages ***
dnl ***********************************
XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [glib_min_version])
XDT_CHECK_PACKAGE([GTK3], [gtk+-3.0], [gtk_min_version])
XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [libxfce4util_min_version])
XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [xfconf_min_version])
dnl ***********************************
dnl *** Check for optional packages ***
dnl ***********************************
XDT_CHECK_OPTIONAL_FEATURE([X11],
[x11],
[
XDT_FEATURE_DEPENDENCY([GDK_X11], [gdk-x11-3.0], [gtk_min_version])
XDT_FEATURE_DEPENDENCY([LIBX11], [x11], [libx11_min_version])
],
[the X11 windowing system])
XDT_CHECK_OPTIONAL_FEATURE([WAYLAND],
[wayland],
[
XDT_FEATURE_DEPENDENCY([GDK_WAYLAND], [gdk-wayland-3.0], [gtk_min_version])
],
[the Wayland windowing system])
if test x"$ENABLE_X11" != x"yes" -a x"$ENABLE_WAYLAND" != x"yes"; then
AC_MSG_ERROR([Either both X11 and Wayland support was disabled, or required dependencies are missing. One of the two must be enabled.])
fi
if test x"$ENABLE_X11" != x"yes"; then
dnl Do not check for optional X11 packages if X11 is disabled
enable_libsm=no
enable_startup_notification=no
fi
XDT_CHECK_OPTIONAL_FEATURE([LIBSM],
[libsm],
[
XDT_FEATURE_DEPENDENCY([LIBICE], [ice], [libice_min_version])
XDT_FEATURE_DEPENDENCY([LIBSM], [sm], [libsm_min_version])
],
[session management library])
XDT_CHECK_OPTIONAL_PACKAGE([LIBSTARTUP_NOTIFICATION],
[libstartup-notification-1.0],
[libstartup_notif_min_version], [startup-notification],
[startup notification library])
dnl ****************************************************************
dnl *** Optional support for system information based on glibtop ***
dnl ****************************************************************
XDT_CHECK_OPTIONAL_PACKAGE([GLIBTOP],
[libgtop-2.0], [libgtop_min_version], [glibtop],
[GLIBTOP support])
dnl **************************************************************
dnl *** Check time.h and sys/time.h for libgtop ***
dnl **************************************************************
if test x"$GLIBTOP_FOUND" = x"yes"; then
AC_CHECK_HEADERS([time.h sys/time.h])
fi
dnl **************************************************************
dnl *** Optional support for system information based on epoxy ***
dnl **************************************************************
EPOXY_FOUND="no"
if test x"$GLIBTOP_FOUND" = x"yes"; then
XDT_CHECK_OPTIONAL_PACKAGE([EPOXY],
[epoxy],
[epoxy_min_version], [epoxy],
[library for handling OpenGL function pointer management], [yes])
else
AM_CONDITIONAL([HAVE_EPOXY], [false])
fi
dnl **********************************
dnl *** Optional support for GUdev ***
dnl **********************************
GUDEV_FOUND="no"
if test x"$GLIBTOP_FOUND" = x"yes"; then
XDT_CHECK_OPTIONAL_PACKAGE([GUDEV], [gudev-1.0], [gudev_min_version], [gudev],
[GObject bindings for libudev], [yes])
else
AM_CONDITIONAL([HAVE_GUDEV], [false])
fi
dnl ***************************************
dnl *** Check for gobject-introspection ***
dnl ***************************************
GOBJECT_INTROSPECTION_CHECK([1.72.0])
dnl *************************
dnl *** Check for vapigen ***
dnl *************************
VAPIGEN_CHECK()
dnl **************************************************
dnl *** Check whether to build the keyboard libary ***
dnl **************************************************
AC_ARG_ENABLE([keyboard-library],
[AS_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])
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],
AS_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],
AS_HELP_STRING([--with-manual-website=URI], [Specify an optional manual website, defaults to https://docs.xfce.org.]),
[with_manual_website="$withval"],
[with_manual_website="https://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([GLADEUI2], [gladeui-2.0],
[gladeui2_min_version], [gladeui2], [glade interface designer])
AC_ARG_WITH([gladeui2-catalogdir],
[AS_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],
[AS_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],
[AS_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([xdt_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],
AS_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 -fvisibility=hidden])
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 -DENABLE_SYMBOL_VISIBILITY=1"
CFLAGS="$CFLAGS -fvisibility=hidden"
fi
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_CONFIG_FILES([
Makefile
docs/Makefile
docs/reference/Makefile
glade/Makefile
glade/icons/Makefile
glade/icons/16x16/Makefile
glade/icons/22x22/Makefile
icons/Makefile
icons/16x16/Makefile
icons/48x48/Makefile
icons/128x128/Makefile
icons/scalable/Makefile
libxfce4kbd-private/libxfce4kbd-private-3.pc
libxfce4kbd-private/Makefile
libxfce4ui/libxfce4ui-2.pc
libxfce4ui/libxfce4ui-config.h
libxfce4ui/Makefile
xfce4-about/Makefile
po/Makefile.in
tests/Makefile
])
AC_OUTPUT
dnl ***************************
dnl *** Print configuration ***
dnl ***************************
echo
echo "Build Configuration:"
echo
if test x"$GLADEUI2_FOUND" = x"yes"; then
echo "* Glade 3.0 UI Designer: yes"
echo " - Catalog directory: $GLADEUI2_CATALOGDIR"
echo " - Module directory: $GLADEUI2_MODULEDIR"
echo " - Pixmap directory: $GLADEUI2_PIXMAPDIR"
else
echo "* Glade 3.0 UI Designer: no"
fi
if test x"$enable_keyboard_library" = x"yes"; then
echo "* Keyboard library support: yes"
else
echo "* Keyboard library support: no"
fi
echo "* X11 Support: ${ENABLE_X11:-no}"
if test x"$ENABLE_X11" = x"yes"; then
echo " * Libsm support: ${ENABLE_LIBSM:-no}"
echo " * Startup notif support: ${LIBSTARTUP_NOTIFICATION_FOUND:-no}"
fi
echo "* Wayland Support: ${ENABLE_WAYLAND:-no}"
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
if test x"$GLIBTOP_FOUND" = x"yes"; then
echo "* System Info (libgtop): yes"
echo "* System Info (epoxy): $EPOXY_FOUND"
echo "* System Info (gudev): $GUDEV_FOUND"
else
echo "* System Info (libgtop): no"
echo "* System Info (epoxy): no (assumes libgtop)"
echo "* System Info (gudev): no (assumes libgtop)"
fi
echo "* Manual website: $with_manual_website"
echo