Newer
Older
dnl Copyright (c) 2004-2023 The Xfce development team
dnl
dnl 2005-2007 Jasper Huijsmans <jasper@xfce.org>
dnl 2006-2008 Nick Schermer <nick@xfce.org>
dnl
dnl ***************************
dnl *** Version information ***
dnl ***************************
m4_define([libxfce4panel_verinfo], [4:0:0]) dnl current:revision:age
m4_define([libxfce4panel_version_api], [2.0])
m4_define([xfce4_panel_config_version], [2])
m4_define([xfce4_panel_version_nano], []) dnl leave this empty to have no nano version
m4_define([xfce4_panel_version_build], [@REVISION@])
m4_define([xfce4_panel_version], [xfce4_panel_version_major().xfce4_panel_version_minor().xfce4_panel_version_micro()ifelse(xfce4_panel_version_nano(), [], [], [.xfce4_panel_version_nano()])ifelse(xfce4_panel_version_tag(), [git], [xfce4_panel_version_tag()-xfce4_panel_version_build()], [xfce4_panel_version_tag()])])
dnl *** Debugging support for GIT snapshots ***
m4_define([panel_debug_default], [ifelse(xfce4_panel_version_tag(), [git], [yes], [minimum])])
dnl ***************************
dnl *** Initialize autoconf ***
dnl ***************************
The Xfce development team. All rights reserved.
Written for Xfce by Jasper Huijsmans <jasper@xfce.org>
and Nick Schermer <nick@xfce.org>.])
AC_INIT([xfce4-panel],[xfce4_panel_version],[https://gitlab.xfce.org/xfce/xfce4-panel/-/issues],[xfce4-panel])
AC_PREREQ([2.69])
AC_REVISION([xfce4_panel_version_build])
dnl ***************************
dnl *** Initialize automake ***
dnl ***************************
AM_INIT_AUTOMAKE([1.8 no-dist-gzip dist-bzip2 tar-ustar foreign])
AC_CONFIG_MACRO_DIRS([m4])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
dnl ******************************
dnl *** Set helper path prefix ***
dnl ******************************
AC_ARG_WITH([helper-path-prefix],
[Path prefix under which helper executables will be installed (default: $libdir)])],
[HELPER_PATH_PREFIX="$withval"],
[HELPER_PATH_PREFIX="$libdir"])
AC_SUBST([HELPER_PATH_PREFIX])
dnl *******************************
dnl *** Check for UNIX variants ***
dnl *******************************
AC_USE_SYSTEM_EXTENSIONS
dnl ********************************
dnl *** Check for basic programs ***
dnl ********************************
AC_PROG_CC()
AC_CHECK_PROGS([PERL], [perl5 perl])
m4_ifdef([AC_PROG_SED], [AC_PROG_SED], [AC_CHECK_PROG(SED, sed, sed)])
dnl **************************
dnl *** Initialize libtool ***
dnl **************************
LT_PREREQ([2.2.6])
LT_INIT([disable-static])
dnl **************************************
dnl *** Substitute version information ***
dnl **************************************
LIBXFCE4PANEL_VERINFO=libxfce4panel_verinfo()
AC_SUBST([LIBXFCE4PANEL_VERINFO])
dnl **************************
dnl *** Substitute version ***
dnl **************************
LIBXFCE4PANEL_VERSION_API=libxfce4panel_version_api()
LIBXFCE4PANEL_VERSION_MAJOR=xfce4_panel_version_major()
LIBXFCE4PANEL_VERSION_MINOR=xfce4_panel_version_minor()
LIBXFCE4PANEL_VERSION_MICRO=xfce4_panel_version_micro()
AC_DEFINE([LIBXFCE4PANEL_VERSION_API], ["libxfce4panel_version_api()"], [libxfce4panel api version])
AC_SUBST([LIBXFCE4PANEL_VERSION_API])
AC_SUBST([LIBXFCE4PANEL_VERSION_MAJOR])
AC_SUBST([LIBXFCE4PANEL_VERSION_MINOR])
AC_SUBST([LIBXFCE4PANEL_VERSION_MICRO])
dnl *********************************
dnl *** Substitute config version ***
dnl *********************************
XFCE4_PANEL_CONFIG_VERSION=xfce4_panel_config_version()
AC_DEFINE([XFCE4_PANEL_CONFIG_VERSION], [xfce4_panel_config_version()], [config migration version])
AC_SUBST([XFCE4_PANEL_CONFIG_VERSION])
dnl **********************************
dnl *** Check for standard headers ***
dnl **********************************
AC_CHECK_HEADERS([stdlib.h unistd.h locale.h stdio.h errno.h time.h string.h \
math.h sys/types.h sys/wait.h memory.h signal.h sys/prctl.h \
libintl.h])
AC_CHECK_FUNCS([bind_textdomain_codeset])
dnl ******************************
dnl *** Check for i18n support ***
dnl ******************************
XDT_I18N([@LINGUAS@])
dnl ***********************************
dnl *** Check for gdbus-codegen ***
dnl ***********************************
AC_ARG_VAR([GDBUS_CODEGEN], [D-Bus code and documentation generator from XML D-Bus interface definitions])
AC_PATH_PROG([GDBUS_CODEGEN], [gdbus-codegen], [no])
if test x"$GDBUS_CODEGEN" = x"no"; then
AC_MSG_ERROR([could not find gdbus-codegen in \$PATH. You can run
./configure GDBUS_CODEGEN=/path/to/gdbus-codegen to define
a custom location for it.])
fi
dnl ***********************************
dnl *** Check for required packages ***
dnl ***********************************
XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.17.2])
XDT_CHECK_PACKAGE([GARCON], [garcon-1], [4.17.0])
XDT_CHECK_PACKAGE([GARCON_GTK3], [garcon-gtk3-1], [4.17.0])
XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-2], [4.17.1])
XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [4.13.2])
XDT_CHECK_PACKAGE([GTK], [gtk+-3.0], [3.24.0])
XDT_CHECK_PACKAGE([EXO], [exo-2], [0.11.2])
XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.72.0])
XDT_CHECK_PACKAGE([GIO], [gio-2.0], [2.72.0])
XDT_CHECK_PACKAGE([GIO_UNIX], [gio-unix-2.0], [2.72.0])
XDT_CHECK_PACKAGE([GMODULE], [gmodule-2.0], [2.72.0])
XDT_CHECK_PACKAGE([CAIRO], [cairo], [1.16.0])
XDT_CHECK_PACKAGE([LIBXFCE4WINDOWING], [libxfce4windowing-0], [4.19.1])
XDT_CHECK_PACKAGE([LIBXFCE4WINDOWINGUI], [libxfce4windowingui-0], [4.19.1])
dnl **********************************************
dnl *** Optional X11/Wayland-specific packages ***
dnl **********************************************
XDT_CHECK_LIBX11()
XDT_CHECK_OPTIONAL_PACKAGE([GTK_X11], [gtk+-x11-3.0], [3.22], [gtk-x11], [GTK X11 support])
XDT_CHECK_OPTIONAL_PACKAGE([LIBWNCK], [libwnck-3.0], [3.0], [libwnck], [Libwnck support])
XDT_CHECK_OPTIONAL_PACKAGE([WAYLAND_CLIENT], [wayland-client], [1.15], [wayland-client], [Wayland client support])
XDT_CHECK_OPTIONAL_PACKAGE([GTK_LAYER_SHELL], [gtk-layer-shell-0], [0.7], [gtk-layer-shell], [GTK Layer Shell support])
AM_CONDITIONAL([HAVE_GTK_X11], [test "$GTK_X11_FOUND" = "yes"])
AM_CONDITIONAL([HAVE_GTK_LAYER_SHELL], [test "$GTK_LAYER_SHELL_FOUND" = "yes"])
dnl *********************************************
dnl *** Optional DBUSMENU for StatusNotifiers ***
dnl *********************************************
XDT_CHECK_OPTIONAL_PACKAGE([DBUSMENU], [dbusmenu-gtk3-0.4],
[16.04.0], [dbusmenu-gtk3], [dbusmenu features])
dnl ***************************************
dnl *** Check for gobject-introspection ***
dnl ***************************************
GOBJECT_INTROSPECTION_CHECK([1.66.0])
dnl *************************
dnl *** Check for vapigen ***
dnl *************************
VAPIGEN_CHECK()
dnl *************************
dnl *** Check for gtk-doc ***
dnl *************************
dnl ***********************************
dnl *** Check for debugging support ***
dnl ***********************************
XDT_FEATURE_DEBUG([panel_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=yes])
have_gnuc_visibility=no
if test x"$enable_visibility" != x"no"; then
dnl Check whether the compiler supports the visibility attribute
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Wall -Werror"
AC_MSG_CHECKING([whether $CC supports the GNUC visibility attribute])
[
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="$save_CFLAGS"
fi
if test x"$have_gnuc_visibility" = x"yes"; then
CPPFLAGS="$CPPFLAGS -DHAVE_GNUC_VISIBILITY"
fi
AM_CONDITIONAL([HAVE_GNUC_VISIBILITY], [test x"$have_gnuc_visibility" = x"yes"])
dnl *************************************
dnl *** Compensate for broken gtk-doc ***
dnl *************************************
XDT_SUPPORTED_FLAGS([GTK_DOC_EXTRA_CFLAGS], [-Wno-sign-compare])
AC_SUBST([GTK_DOC_EXTRA_CFLAGS])
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])
AC_CONFIG_FILES([
docs/reference/Makefile
icons/Makefile
icons/16x16/Makefile
icons/24x24/Makefile
icons/32x32/Makefile
icons/48x48/Makefile
libxfce4panel/libxfce4panel-2.0.pc
libxfce4panel/libxfce4panel-config.h
panel/Makefile
wrapper/Makefile
plugins/Makefile
plugins/actions/actions.desktop.in
plugins/applicationsmenu/applicationsmenu.desktop.in
plugins/clock/clock.desktop.in
plugins/directorymenu/directorymenu.desktop.in
plugins/launcher/launcher.desktop.in
plugins/pager/Makefile
plugins/pager/pager.desktop.in
plugins/separator/separator.desktop.in
plugins/showdesktop/showdesktop.desktop.in
plugins/systray/Makefile
plugins/systray/systray.desktop.in
plugins/tasklist/Makefile
plugins/tasklist/tasklist.desktop.in
plugins/windowmenu/Makefile
plugins/windowmenu/windowmenu.desktop.in
dnl ***************************
dnl *** Print configuration ***
dnl ***************************
echo
echo "Build Configuration:"
echo
echo "* Debug support: $enable_debug"
echo "* GNU Visibility support: $have_gnuc_visibility"
echo "* GObject Introspection support: $enable_introspection"
echo "* Documentation support: $enable_gtk_doc"
if test "$DBUSMENU_FOUND" = "yes"; then
echo "* D-Bus menu support: yes"
else
echo "* D-Bus menu support: no"
fi
echo "* Libx11 support: $ac_cv_lib_X11_main"
if test "$GTK_X11_FOUND" = "yes"; then
echo "* GTK X11 support: yes"
else
echo "* GTK X11 support: no"
fi
if test "$LIBWNCK_FOUND" = "yes"; then
echo "* Libwnck support: yes"
else
echo "* Libwnck support: no"
fi
if test "$GTK_LAYER_SHELL_FOUND" = "yes"; then
echo "* GTK Layer Shell support: yes"
else
echo "* GTK Layer Shell support: no"
fi