configure.ac.in 10.3 KB
Newer Older
Nick Schermer's avatar
Nick Schermer committed
1
dnl
2
dnl Copyright (c) 2004 - 2021 The Xfce development team
Nick Schermer's avatar
Nick Schermer committed
3 4 5 6 7 8 9 10
dnl
dnl 2005-2007 Jasper Huijsmans <jasper@xfce.org>
dnl 2006-2008 Nick Schermer <nick@xfce.org>
dnl

dnl ***************************
dnl *** Version information ***
dnl ***************************
11
m4_define([libxfce4panel_verinfo], [4:0:0]) dnl current:revision:age
12
m4_define([libxfce4panel_version_api], [2.0])
13
m4_define([xfce4_panel_config_version], [2])
Nick Schermer's avatar
Nick Schermer committed
14
m4_define([xfce4_panel_version_major], [4])
15
m4_define([xfce4_panel_version_minor], [17])
Simon Steinbeiss's avatar
Simon Steinbeiss committed
16
m4_define([xfce4_panel_version_micro], [0])
17
m4_define([xfce4_panel_version_nano],  []) dnl leave this empty to have no nano version
Nick Schermer's avatar
Nick Schermer committed
18
m4_define([xfce4_panel_version_build], [@REVISION@])
Simon Steinbeiss's avatar
Simon Steinbeiss committed
19
m4_define([xfce4_panel_version_tag], [git])
Nick Schermer's avatar
Nick Schermer committed
20
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()])])
Nick Schermer's avatar
Nick Schermer committed
21 22

dnl *******************************************
23
dnl *** Debugging support for GIT snapshots ***
Nick Schermer's avatar
Nick Schermer committed
24
dnl *******************************************
25
m4_define([panel_debug_default], [ifelse(xfce4_panel_version_tag(), [git], [yes], [minimum])])
Nick Schermer's avatar
Nick Schermer committed
26 27 28 29

dnl ***************************
dnl *** Initialize autoconf ***
dnl ***************************
30
AC_COPYRIGHT([Copyright (c) 2002 - 2021
Nick Schermer's avatar
Nick Schermer committed
31 32 33 34
        The Xfce development team. All rights reserved.

Written for Xfce by Jasper Huijsmans <jasper@xfce.org>
and Nick Schermer <nick@xfce.org>.])
35
AC_INIT([xfce4-panel],[xfce4_panel_version],[https://gitlab.xfce.org/xfce/xfce4-panel/-/issues],[xfce4-panel])
36
AC_PREREQ([2.69])
37
AC_REVISION([xfce4_panel_version_build])
Nick Schermer's avatar
Nick Schermer committed
38 39 40 41

dnl ***************************
dnl *** Initialize automake ***
dnl ***************************
Nick Schermer's avatar
Nick Schermer committed
42
AC_CONFIG_HEADERS([config.h])
Kevin Bowen's avatar
Kevin Bowen committed
43
AM_INIT_AUTOMAKE([1.8 no-dist-gzip dist-bzip2 tar-ustar foreign])
Nick Schermer's avatar
Nick Schermer committed
44
AM_MAINTAINER_MODE()
45
AC_CONFIG_MACRO_DIRS([m4])
Nick Schermer's avatar
Nick Schermer committed
46
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
Nick Schermer's avatar
Nick Schermer committed
47

48 49 50 51 52 53 54 55 56 57
dnl ******************************
dnl *** Set helper path prefix ***
dnl ******************************
AC_ARG_WITH([helper-path-prefix],
            [AC_HELP_STRING([--with-helper-path-prefix=PATH],
                            [Path prefix under which helper executables will be installed (default: $libdir)])],
            [HELPER_PATH_PREFIX="$withval"],
            [HELPER_PATH_PREFIX="$libdir"])
AC_SUBST([HELPER_PATH_PREFIX])

Nick Schermer's avatar
Nick Schermer committed
58 59 60
dnl *******************************
dnl *** Check for UNIX variants ***
dnl *******************************
61
AC_USE_SYSTEM_EXTENSIONS
Nick Schermer's avatar
Nick Schermer committed
62 63 64 65 66

dnl ********************************
dnl *** Check for basic programs ***
dnl ********************************
AC_PROG_CC()
67
AM_PROG_CC_C_O()
68
LT_PATH_LD([])
Nick Schermer's avatar
Nick Schermer committed
69
AC_PROG_INSTALL()
70
IT_PROG_INTLTOOL([0.35.0])
71
AC_CHECK_PROGS([PERL], [perl5 perl])
Nick Schermer's avatar
Nick Schermer committed
72
m4_ifdef([AC_PROG_SED], [AC_PROG_SED], [AC_CHECK_PROG(SED, sed, sed)])
Nick Schermer's avatar
Nick Schermer committed
73 74 75 76

dnl **************************
dnl *** Initialize libtool ***
dnl **************************
77 78
LT_PREREQ([2.2.6])
LT_INIT([disable-static])
Nick Schermer's avatar
Nick Schermer committed
79 80 81 82 83 84 85

dnl **************************************
dnl *** Substitute version information ***
dnl **************************************
LIBXFCE4PANEL_VERINFO=libxfce4panel_verinfo()
AC_SUBST([LIBXFCE4PANEL_VERINFO])

86 87 88
dnl **************************
dnl *** Substitute version ***
dnl **************************
Nick Schermer's avatar
Nick Schermer committed
89
LIBXFCE4PANEL_VERSION=xfce4_panel_version()
90 91 92 93
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()
94
AC_DEFINE([LIBXFCE4PANEL_VERSION_API], "libxfce4panel_version_api()", [libxfce4panel api version])
Nick Schermer's avatar
Nick Schermer committed
95
AC_SUBST([LIBXFCE4PANEL_VERSION])
96 97 98 99 100
AC_SUBST([LIBXFCE4PANEL_VERSION_API])
AC_SUBST([LIBXFCE4PANEL_VERSION_MAJOR])
AC_SUBST([LIBXFCE4PANEL_VERSION_MINOR])
AC_SUBST([LIBXFCE4PANEL_VERSION_MICRO])

101 102 103 104 105 106 107
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])

Nick Schermer's avatar
Nick Schermer committed
108 109 110 111 112
dnl **********************************
dnl *** Check for standard headers ***
dnl **********************************
AC_HEADER_STDC()
AC_CHECK_HEADERS([stdlib.h unistd.h locale.h stdio.h errno.h time.h string.h \
113 114 115
                  math.h sys/types.h sys/wait.h memory.h signal.h sys/prctl.h \
                  libintl.h])
AC_CHECK_FUNCS([bind_textdomain_codeset])
Nick Schermer's avatar
Nick Schermer committed
116 117 118 119 120 121 122 123 124 125 126

dnl ******************************
dnl *** Check for i18n support ***
dnl ******************************
XDT_I18N([@LINGUAS@])

dnl *******************************
dnl *** Check for X11 installed ***
dnl *******************************
XDT_CHECK_LIBX11_REQUIRE()

127 128 129 130 131 132 133 134 135 136 137 138
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


Nick Schermer's avatar
Nick Schermer committed
139 140 141
dnl ***********************************
dnl *** Check for required packages ***
dnl ***********************************
142
XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.15.6])
Nick Schermer's avatar
Nick Schermer committed
143 144
XDT_CHECK_PACKAGE([GARCON], [garcon-1], [0.5.0])
XDT_CHECK_PACKAGE([GARCON_GTK3], [garcon-gtk3-1], [0.5.0])
145
XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-2], [4.15.8])
146
XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [4.13.2])
147
XDT_CHECK_PACKAGE([GTK], [gtk+-3.0], [3.22.0])
148
XDT_CHECK_PACKAGE([EXO], [exo-2], [0.11.2])
149 150 151 152
XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.50.0])
XDT_CHECK_PACKAGE([GIO], [gio-2.0], [2.50.0])
PKG_CHECK_MODULES([GIO_UNIX], [gio-unix-2.0 >= 2.50.0])
XDT_CHECK_PACKAGE([GMODULE], [gmodule-2.0], [2.50.0])
Nick Schermer's avatar
Nick Schermer committed
153
XDT_CHECK_PACKAGE([CAIRO], [cairo], [1.0.0])
154
XDT_CHECK_PACKAGE([LIBWNCK], [libwnck-3.0], [3.0])
155 156 157 158

dnl *********************************************
dnl *** Optional DBUSMENU for StatusNotifiers ***
dnl *********************************************
159 160
XDT_CHECK_OPTIONAL_PACKAGE([DBUSMENU], [dbusmenu-gtk3-0.4],
                           [16.04.0], [dbusmenu-gtk3], [dbusmenu features])
Nick Schermer's avatar
Nick Schermer committed
161

Nick Schermer's avatar
Nick Schermer committed
162 163 164 165
dnl **********************************
dnl *** Optional GIO UNIX features ***
dnl **********************************
XDT_CHECK_OPTIONAL_PACKAGE([GIO_UNIX], [gio-unix-2.0],
166
                           [2.50.0], [gio-unix], [GIO UNIX features])
Nick Schermer's avatar
Nick Schermer committed
167

168 169 170 171 172
dnl ***************************************
dnl *** Check for gobject-introspection ***
dnl ***************************************
GOBJECT_INTROSPECTION_CHECK([1.30.0])

173 174 175 176 177
dnl *************************
dnl *** Check for vapigen ***
dnl *************************
VAPIGEN_CHECK()

Nick Schermer's avatar
Nick Schermer committed
178 179 180
dnl *************************
dnl *** Check for gtk-doc ***
dnl *************************
181
GTK_DOC_CHECK([1.9])
Nick Schermer's avatar
Nick Schermer committed
182 183 184 185

dnl ***********************************
dnl *** Check for debugging support ***
dnl ***********************************
186 187 188 189 190 191
XDT_FEATURE_DEBUG([panel_debug_default])

dnl **************************************
dnl *** Check for linker optimizations ***
dnl **************************************
XDT_FEATURE_LINKER_OPTS()
Nick Schermer's avatar
Nick Schermer committed
192

193 194 195 196 197 198 199 200 201 202
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=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])
Romain Bouvier's avatar
Romain Bouvier committed
203
  AC_COMPILE_IFELSE([AC_LANG_SOURCE(
204 205 206 207 208 209 210 211
  [
    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; }
Romain Bouvier's avatar
Romain Bouvier committed
212
  ])],
213 214 215 216 217 218 219 220 221 222 223 224 225 226
  [
    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"])

227 228 229 230 231 232
dnl *************************************
dnl *** Compensate for broken gtk-doc ***
dnl *************************************
XDT_SUPPORTED_FLAGS([GTK_DOC_EXTRA_CFLAGS], [-Wno-sign-compare])
AC_SUBST([GTK_DOC_EXTRA_CFLAGS])

Nick Schermer's avatar
Nick Schermer committed
233 234 235 236 237 238 239 240 241 242 243 244 245
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])

246
AC_CONFIG_FILES([
Nick Schermer's avatar
Nick Schermer committed
247
Makefile
248
common/Makefile
249
docs/Makefile
250
docs/reference/Makefile
Nick Schermer's avatar
Nick Schermer committed
251 252 253 254 255
icons/Makefile
icons/16x16/Makefile
icons/24x24/Makefile
icons/32x32/Makefile
icons/48x48/Makefile
256
icons/128x128/Makefile
Nick Schermer's avatar
Nick Schermer committed
257
icons/scalable/Makefile
Nick Schermer's avatar
Nick Schermer committed
258
libxfce4panel/Makefile
259
libxfce4panel/libxfce4panel-2.0.pc
260
libxfce4panel/libxfce4panel-config.h
261
migrate/Makefile
262
migrate/default.xml
Nick Schermer's avatar
Nick Schermer committed
263 264 265
panel/Makefile
wrapper/Makefile
plugins/Makefile
266
plugins/actions/Makefile
267
plugins/actions/actions.desktop.in
268
plugins/applicationsmenu/Makefile
269
plugins/applicationsmenu/applicationsmenu.desktop.in
Nick Schermer's avatar
Nick Schermer committed
270
plugins/clock/Makefile
271
plugins/clock/clock.desktop.in
Nick Schermer's avatar
Nick Schermer committed
272
plugins/directorymenu/Makefile
273
plugins/directorymenu/directorymenu.desktop.in
Nick Schermer's avatar
Nick Schermer committed
274
plugins/launcher/Makefile
275
plugins/launcher/launcher.desktop.in
276
plugins/pager/Makefile
277
plugins/pager/pager.desktop.in
278
plugins/separator/Makefile
279
plugins/separator/separator.desktop.in
Nick Schermer's avatar
Nick Schermer committed
280
plugins/showdesktop/Makefile
281
plugins/showdesktop/showdesktop.desktop.in
282 283
plugins/systray/Makefile
plugins/systray/systray.desktop.in
284
plugins/tasklist/Makefile
285
plugins/tasklist/tasklist.desktop.in
286
plugins/windowmenu/Makefile
287
plugins/windowmenu/windowmenu.desktop.in
Nick Schermer's avatar
Nick Schermer committed
288 289
po/Makefile.in
])
290
AC_OUTPUT
291 292 293 294 295 296 297

dnl ***************************
dnl *** Print configuration ***
dnl ***************************
echo
echo "Build Configuration:"
echo
298 299
echo "* Debug Support:          $enable_debug"
echo "* GNU Visibility:         $have_gnuc_visibility"
300
echo