1dnl
2dnl This file was autogenerated from "configure.ac.in".
3dnl Edit that file instead!
4dnl
5
6dnl
7dnl Copyright (c) 2007-2020 The Xfce development team
8dnl
9
10dnl ***************************
11dnl *** Version information ***
12dnl ***************************
13m4_define([libxfce4ui_verinfo], [0:0:0])
14m4_define([libxfce4ui_version_api], [2])
15m4_define([libxfce4ui_version_major], [4])
16m4_define([libxfce4ui_version_minor], [16])
17m4_define([libxfce4ui_version_micro], [1])
18m4_define([libxfce4ui_version_nano], []) dnl leave this empty to have no nano version
19m4_define([libxfce4ui_version_build], [a987b4a])
20m4_define([libxfce4ui_version_tag], [])
21m4_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()])])
22
23m4_define([libxfce4kbd_private_verinfo], [0:0:0])
24m4_define([libxfce4kbd_private_version_api], [3])
25
26dnl # DO NOT MODIFY ANYTHING BELOW THIS LINE, UNLESS YOU KNOW WHAT
27dnl # YOU ARE DOING.
28
29
30dnl ********************************************
31dnl *** Full debug support for GIT snapshots ***
32dnl ********************************************
33m4_define([libxfce4ui_debug_default], [ifelse(libxfce4ui_version_tag(), [git], [yes], [minimum])])
34
35dnl ***************************
36dnl *** Initialize autoconf ***
37dnl ***************************
38AC_COPYRIGHT([Copyright (c) 2007-2019 The Xfce development team])
39AC_INIT([libxfce4ui], [libxfce4ui_version], [https://gitlab.xfce.org/xfce/libxfce4ui/-/issues], [libxfce4ui])
40AC_PREREQ([2.69])
41AC_CONFIG_MACRO_DIRS([m4])
42AC_REVISION([libxfce4ui_version_build])
43AC_CANONICAL_TARGET()
44
45dnl ***************************
46dnl *** Initialize automake ***
47dnl ***************************
48AM_INIT_AUTOMAKE([1.11 dist-bzip2 tar-ustar no-dist-gzip foreign])
49AC_CONFIG_HEADERS([config.h])
50AM_MAINTAINER_MODE()
51AM_SILENT_RULES([yes])
52
53dnl *******************************
54dnl *** Check for UNIX variants ***
55dnl *******************************
56AC_USE_SYSTEM_EXTENSIONS
57
58AC_MSG_CHECKING([platform])
59case "$host" in
60  *-*-mingw*|*-*-cygwin*)
61    platform="win32"
62    NO_UNDEFINED=-no-undefined
63    ;;
64  *-apple-darwin*)
65    platform="os x"
66    ;;
67  *)
68    platform="unix"
69    ;;
70esac
71AM_CONDITIONAL(PLATFORM_WIN32, test "$platform" = "win32")
72AM_CONDITIONAL(PLATFORM_OSX, test "$platform" = "os x")
73AC_SUBST(NO_UNDEFINED)
74
75dnl ********************************
76dnl *** Check for basic programs ***
77dnl ********************************
78AC_PROG_CC()
79LT_PATH_LD([])
80AM_PROG_CC_C_O()
81AC_PROG_INSTALL()
82IT_PROG_INTLTOOL([0.35.0])
83AC_CHECK_PROGS([PERL], [perl5 perl])
84AC_PATH_PROG([GLIB_COMPILE_RESOURCES],[glib-compile-resources])
85
86dnl **************************
87dnl *** Initialize libtool ***
88dnl **************************
89LT_PREREQ([2.4])
90LT_INIT([disable-static])
91
92dnl **************************************
93dnl *** Substitute version information ***
94dnl **************************************
95LIBXFCE4UI_VERINFO=libxfce4ui_verinfo()
96LIBXFCE4UI_VERSION_API=libxfce4ui_version_api()
97LIBXFCE4UI_VERSION_MAJOR=libxfce4ui_version_major()
98LIBXFCE4UI_VERSION_MINOR=libxfce4ui_version_minor()
99LIBXFCE4UI_VERSION_MICRO=libxfce4ui_version_micro()
100LIBXFCE4KBD_PRIVATE_VERINFO=libxfce4kbd_private_verinfo()
101LIBXFCE4KBD_PRIVATE_VERSION_API=libxfce4kbd_private_version_api()
102AC_SUBST([LIBXFCE4UI_VERINFO])
103AC_SUBST([LIBXFCE4UI_VERSION_API])
104AC_SUBST([LIBXFCE4UI_VERSION_MAJOR])
105AC_SUBST([LIBXFCE4UI_VERSION_MINOR])
106AC_SUBST([LIBXFCE4UI_VERSION_MICRO])
107AC_SUBST([LIBXFCE4KBD_PRIVATE_VERINFO])
108AC_SUBST([LIBXFCE4KBD_PRIVATE_VERSION_API])
109
110dnl ***************************************
111dnl *** Check for standard header files ***
112dnl ***************************************
113AC_HEADER_STDC()
114AC_CHECK_HEADERS([crt_externs.h errno.h fcntl.h limits.h locale.h math.h \
115                  memory.h signal.h stdarg.h stdlib.h string.h unistd.h])
116AC_CHECK_DECLS([environ])
117AC_CHECK_FUNCS([_NSGetEnviron])
118
119dnl ******************************
120dnl *** Check for i18n support ***
121dnl ******************************
122XDT_I18N([])
123
124dnl *******************************************
125dnl *** Check for X Window System installed ***
126dnl *******************************************
127XDT_CHECK_LIBX11_REQUIRE()
128XDT_CHECK_LIBSM()
129
130dnl ***********************************
131dnl *** Check for required packages ***
132dnl ***********************************
133XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.50.0])
134XDT_CHECK_PACKAGE([GTK3], [gtk+-3.0], [3.22.0])
135XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.15.6])
136
137dnl ****************************************************************
138dnl *** Optional support for system information based on glibtop ***
139dnl ****************************************************************
140XDT_CHECK_OPTIONAL_PACKAGE([GLIBTOP],
141                           [libgtop-2.0], [2.24.0], [glibtop],
142                           [GLIBTOP support])
143AM_CONDITIONAL([ENABLE_GLIBTOP], [test "x$GLIBTOP_FOUND" = "xyes"])
144
145AC_DEFINE(GLIB_VERSION_MIN_REQUIRED, GLIB_VERSION_2_50, [Ignore post 2.50 deprecations])
146AC_DEFINE(GLIB_VERSION_MAX_ALLOWED, GLIB_VERSION_2_50, [Prevent post 2.50 APIs])
147
148AC_DEFINE(GDK_VERSION_MIN_REQUIRED, GDK_VERSION_3_22, [Ignore post 3.22 deprecations])
149AC_DEFINE(GDK_VERSION_MAX_ALLOWED, GDK_VERSION_3_22, [Prevent post 3.22 APIs])
150
151dnl **************************************************************
152dnl *** Optional support for system information based on epoxy ***
153dnl **************************************************************
154EPOXY_FOUND="no"
155if test x"$GLIBTOP_FOUND" = x"yes"; then
156  XDT_CHECK_OPTIONAL_PACKAGE([EPOXY],
157                             [epoxy],
158                             [1.2], [epoxy],
159                             [library for handling OpenGL function pointer management], [yes])
160else
161  AM_CONDITIONAL([HAVE_EPOXY], [false])
162fi
163
164dnl **********************************
165dnl *** Optional support for GUdev ***
166dnl **********************************
167GUDEV_FOUND="no"
168if test x"$GLIBTOP_FOUND" = x"yes"; then
169  XDT_CHECK_OPTIONAL_PACKAGE([GUDEV], [gudev-1.0], [232], [gudev],
170                             [GObject bindings for libudev], [yes])
171else
172  AM_CONDITIONAL([HAVE_GUDEV], [false])
173fi
174
175dnl ***************************************
176dnl *** Check for gobject-introspection ***
177dnl ***************************************
178GOBJECT_INTROSPECTION_CHECK([1.30.0])
179
180dnl *************************
181dnl *** Check for vapigen ***
182dnl *************************
183VAPIGEN_CHECK()
184
185dnl *************************************************
186dnl *** Optional support for startup notification ***
187dnl *************************************************
188XDT_CHECK_OPTIONAL_PACKAGE([LIBSTARTUP_NOTIFICATION],
189                           [libstartup-notification-1.0],
190                           [0.4], [startup-notification],
191                           [startup notification library])
192
193dnl **************************************************
194dnl *** Check whether to build the keyboard libary ***
195dnl **************************************************
196AC_ARG_ENABLE([keyboard-library],
197              [AC_HELP_STRING([--disable-keyboard-library],
198                              [Do not compile the keyboard library needed by xfwm4 and xfce4-settings (default=enabled)])],
199              [enable_keyboard_library=$enableval], [enable_keyboard_library=yes])
200if test "x$enable_keyboard_library" = "xyes"; then
201  XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [4.12.0])
202fi
203AM_CONDITIONAL([ENABLE_KEYBOARD_LIBRARY], [test "x$enable_keyboard_library" = "xyes"])
204
205dnl *********************************************
206dnl *** Check for vendor specific information ***
207dnl *********************************************
208AC_MSG_CHECKING([for additional vendor name and/or info])
209AC_ARG_WITH([vendor-info],
210AC_HELP_STRING([--with-vendor-info=NAME], [Specify an additional vendor name, optionally with a file in $prefix/share/xfce4/venderinfo]),
211    [with_vendor_info="$withval"], [with_vendor_info=""])
212if test x"$with_vendor_info" != x""; then
213    AC_DEFINE_UNQUOTED([VENDOR_INFO], ["$with_vendor_info"], [Additional vendor name and/or info])
214    AC_MSG_RESULT([$vendorinfo])
215else
216    AC_MSG_RESULT([not set])
217fi
218
219dnl *********************************************
220dnl *** Check for vendor specific information ***
221dnl *********************************************
222AC_MSG_CHECKING([for a custom manual website location])
223AC_ARG_WITH([manual-website],
224AC_HELP_STRING([--with-manual-website=URI], [Specify an optional manual website, defaults to https://docs.xfce.org.]),
225    [with_manual_website="$withval"],
226    [with_manual_website="https://docs.xfce.org/help.php"])
227AC_DEFINE_UNQUOTED([MANUAL_WEBSITE], ["$with_manual_website"], [Documentation website])
228AC_MSG_RESULT([$with_manual_website])
229
230dnl *********************************************************
231dnl *** Optional support for the Glade Interface Designer ***
232dnl *********************************************************
233
234XDT_CHECK_OPTIONAL_PACKAGE([GLADEUI2], [gladeui-2.0],
235                           [3.5.0], [gladeui2], [glade interface designer])
236
237AC_ARG_WITH([gladeui2-catalogdir],
238            [AC_HELP_STRING([--with-gladeui2-catalogdir=PATH],
239                            [Specify where to install glade 3.0 designer catalog files (default=autodetect)])],
240            [gladeui2_catalogdir="$withval"])
241AC_ARG_WITH([gladeui2-moduledir],
242            [AC_HELP_STRING([--with-gladeui2-moduledir=PATH],
243                            [Specify where to install glade 3.0 designer modules (default=autodetect)])],
244            [gladeui2_moduledir="$withval"])
245AC_ARG_WITH([gladeui2-pixmapdir],
246            [AC_HELP_STRING([--with-gladeui2-pixmapdir=PATH],
247                            [Specify where to install glade 3.0 designer pixmaps (default=autodetect)])],
248            [gladeui2_pixmapdir="$withval"])
249if test x"$GLADEUI2_FOUND" = x"yes"; then
250  if test x"$gladeui2_catalogdir" = x""; then
251    GLADEUI2_CATALOGDIR=`$PKG_CONFIG "--variable=catalogdir" "gladeui-2.0"`
252  else
253    GLADEUI2_CATALOGDIR="$gladeui2_catalogdir"
254  fi
255  if test x"$gladeui2_moduledir" = x""; then
256    GLADEUI2_MODULEDIR=`$PKG_CONFIG "--variable=moduledir" "gladeui-2.0"`
257  else
258    GLADEUI2_MODULEDIR="$gladeui2_moduledir"
259  fi
260  if test x"$gladeui2_pixmapdir" = x""; then
261    GLADEUI2_PIXMAPDIR=`$PKG_CONFIG "--variable=pixmapdir" "gladeui-2.0"`
262  else
263    GLADEUI2_PIXMAPDIR="$gladeui2_pixmapdir"
264  fi
265fi
266AC_SUBST([GLADEUI2_CATALOGDIR])
267AC_SUBST([GLADEUI2_MODULEDIR])
268AC_SUBST([GLADEUI2_PIXMAPDIR])
269
270dnl *************************
271dnl *** Check for gtk-doc ***
272dnl *************************
273GTK_DOC_CHECK([1.0])
274
275dnl ***********************************
276dnl *** Check for debugging support ***
277dnl ***********************************
278XDT_FEATURE_DEBUG([libxfce4ui_debug_default])
279
280dnl **************************************
281dnl *** Check for linker optimizations ***
282dnl **************************************
283XDT_FEATURE_LINKER_OPTS()
284
285dnl ****************************************
286dnl *** Check for ELF visibility support ***
287dnl ****************************************
288AC_ARG_ENABLE([visibility],
289              AC_HELP_STRING([--disable-visibility],
290                             [Do not use ELF visibility attributes]),
291              [enable_visibility=$enableval], [enable_visibility=yes])
292have_gnuc_visibility=no
293if test "x$enable_visibility" != "xno"; then
294  XDT_SUPPORTED_FLAGS([xdt_vis_test_cflags], [-Wall -Werror -Wno-unused-parameter])
295  saved_CFLAGS="$CFLAGS"
296  CFLAGS="$CFLAGS $xdt_vis_test_cflags"
297  AC_MSG_CHECKING([whether $CC supports the GNUC visibility attribute])
298  AC_COMPILE_IFELSE([AC_LANG_SOURCE(
299  [
300    void test_default (void);
301    void test_hidden (void);
302    void __attribute__ ((visibility("default"))) test_default (void) {}
303    void __attribute__ ((visibility("hidden"))) test_hidden (void) {}
304    int main (int argc, char **argv) {
305      test_default ();
306      test_hidden ();
307      return 0;
308    }
309  ])],
310  [
311    have_gnuc_visibility=yes
312    AC_MSG_RESULT([yes])
313  ],
314  [
315    AC_MSG_RESULT([no])
316  ])
317  CFLAGS="$saved_CFLAGS"
318fi
319if test "x$have_gnuc_visibility" = "xyes"; then
320  CPPFLAGS="$CPPFLAGS -DHAVE_GNUC_VISIBILITY"
321fi
322AM_CONDITIONAL([HAVE_GNUC_VISIBILITY], [test "x$have_gnuc_visibility" = "xyes"])
323
324dnl *************************************
325dnl *** Compensate for broken gtk-doc ***
326dnl *************************************
327XDT_SUPPORTED_FLAGS([GTK_DOC_EXTRA_CFLAGS], [-Wno-sign-compare])
328AC_SUBST([GTK_DOC_EXTRA_CFLAGS])
329
330#
331# Enable Tests
332#
333AC_ARG_ENABLE(tests,
334	[AS_HELP_STRING([--enable-tests],[enable validation test framework @<:@default=@<:@disabled@:>@@:>@])],
335	[enable_tests=$enableval], [enable_tests=no])
336AC_MSG_CHECKING([whether to build the validation test framework])
337AM_CONDITIONAL(BUILD_TESTS, test "x$enable_tests" = "xyes")
338AC_MSG_RESULT($enable_tests)
339
340dnl *********************************
341dnl *** Substitute platform flags ***
342dnl *********************************
343AC_MSG_CHECKING([PLATFORM_CPPFLAGS])
344AC_MSG_RESULT([$PLATFORM_CPPFLAGS])
345AC_SUBST([PLATFORM_CPPFLAGS])
346AC_MSG_CHECKING([PLATFORM_CFLAGS])
347AC_MSG_RESULT([$PLATFORM_CFLAGS])
348AC_SUBST([PLATFORM_CFLAGS])
349AC_MSG_CHECKING([PLATFORM_LDFLAGS])
350AC_MSG_RESULT([$PLATFORM_LDFLAGS])
351AC_SUBST([PLATFORM_LDFLAGS])
352
353dnl *****************************
354dnl *** Generate output files ***
355dnl *****************************
356AC_CONFIG_FILES([
357Makefile
358docs/Makefile
359docs/version.xml
360glade/Makefile
361glade/icons/Makefile
362glade/icons/16x16/Makefile
363glade/icons/22x22/Makefile
364icons/Makefile
365icons/16x16/Makefile
366icons/48x48/Makefile
367icons/128x128/Makefile
368icons/scalable/Makefile
369libxfce4kbd-private/libxfce4kbd-private-3.pc
370libxfce4kbd-private/Makefile
371libxfce4ui/libxfce4ui-2.pc
372libxfce4ui/libxfce4ui-config.h
373libxfce4ui/Makefile
374xfce4-about/Makefile
375po/Makefile.in
376tests/Makefile
377])
378AC_OUTPUT
379
380dnl ***************************
381dnl *** Print configuration ***
382dnl ***************************
383echo
384echo "Build Configuration:"
385echo
386if test x"$GLADEUI2_FOUND" = x"yes"; then
387echo "* Glade 3.0 UI Designer:     yes"
388echo "  - Catalog directory:       $GLADEUI2_CATALOGDIR"
389echo "  - Module directory:        $GLADEUI2_MODULEDIR"
390echo "  - Pixmap directory:        $GLADEUI2_PIXMAPDIR"
391else
392echo "* Glade 3.0 UI Designer:     no"
393fi
394if test x"$enable_keyboard_library" = x"yes"; then
395echo "* Keyboard library support:  yes"
396else
397echo "* Keyboard library support:  no"
398fi
399if test x"$LIBSTARTUP_NOTIFICATION_FOUND" = x"yes"; then
400echo "* Startup notification:      yes"
401else
402echo "* Startup notification:      no"
403fi
404if test x"$LIBSM_LIBS" = x""; then
405echo "* X11 session management:    no"
406else
407echo "* X11 session management:    yes"
408fi
409echo "* Debug support:             $enable_debug"
410echo "* Build tests:               $enable_tests"
411echo "* GNU Visibility:            $have_gnuc_visibility"
412if test -n "$with_vendor_info"; then
413echo "* Vendor:                    $with_vendor_info"
414echo
415echo "Note you can put additional info about the vendor"
416echo "in this text file: \"${datarootdir}/xfce4/vendorinfo\""
417else
418echo "* Vendor:                    none"
419fi
420if test x"$GLIBTOP_FOUND" = x"yes"; then
421echo "* System Info (libgtop):     yes"
422echo "* System Info (epoxy):       $EPOXY_FOUND"
423echo "* System Info (gudev):       $GUDEV_FOUND"
424else
425echo "* System Info (libgtop):     no"
426echo "* System Info (epoxy):       no (assumes libgtop)"
427echo "* System Info (gudev):       no (assumes libgtop)"
428fi
429echo "* Manual website:            $with_manual_website"
430echo
431