configure.ac.in 8.19 KB
Newer Older
1
dnl
2
dnl Copyright (c) 2003-2020
3
dnl         The Xfce development team. All rights reserved.
4
dnl
5
dnl xfdesktop - xfce4's desktop manager
6
dnl
Jasper Huijsmans's avatar
Jasper Huijsmans committed
7

Jasper Huijsmans's avatar
Jasper Huijsmans committed
8
dnl version info
9
m4_define([xfdesktop_version_major], [4])
Andre Miranda's avatar
Andre Miranda committed
10 11
m4_define([xfdesktop_version_minor], [15])
m4_define([xfdesktop_version_micro], [0])
12
m4_define([xfdesktop_version_nano], [])
13
m4_define([xfdesktop_version_build], [@REVISION@])
Andre Miranda's avatar
Andre Miranda committed
14
m4_define([xfdesktop_version_tag], [git])
15
m4_define([xfdesktop_version], [xfdesktop_version_major().xfdesktop_version_minor().xfdesktop_version_micro()ifelse(xfdesktop_version_nano(), [], [], [.xfdesktop_version_nano()])ifelse(xfdesktop_version_tag(), [git], [xfdesktop_version_tag()-xfdesktop_version_build()], [xfdesktop_version_tag()])])
16

17
dnl minimum required versions
florian.weigelt's avatar
florian.weigelt committed
18
m4_define([glib_minimum_version], [2.42.0])
19
m4_define([gtk_minimum_version], [3.22.0])
20
m4_define([libxfce4util_minimum_version], [4.13.0])
Eric Koegel's avatar
Eric Koegel committed
21 22 23
m4_define([libxfce4ui_minimum_version], [4.13.0])
m4_define([garcon_minimum_version], [0.6.0])
m4_define([exo_minimum_version], [0.11.0])
24
m4_define([thunar_minimum_version], [1.7.0])
Eric Koegel's avatar
Eric Koegel committed
25
m4_define([wnck_minimum_version], [3.14])
26
m4_define([intltool_minimum_version], [0.31])
Romain Bouvier's avatar
Romain Bouvier committed
27
m4_define([xfconf_minimum_version], [4.12.1])
Eric Koegel's avatar
Eric Koegel committed
28
m4_define([cairo_minimum_version], [1.12])
29

Eric Koegel's avatar
Eric Koegel committed
30 31 32 33 34 35 36
dnl define a short version string for xfdesktop
m4_append([xfdesktop_version_short], ["])
m4_append([xfdesktop_version_short], [xfdesktop_version_major])
m4_append([xfdesktop_version_short], [.])
m4_append([xfdesktop_version_short], [xfdesktop_version_minor])
m4_append([xfdesktop_version_short], ["])

37
dnl init autoconf
38
AC_INIT([xfdesktop], [xfdesktop_version], [https://gitlab.xfce.org/xfce/xfdesktop])
Eric Koegel's avatar
Eric Koegel committed
39
AC_PREREQ([2.60])
40 41

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

48
dnl check for UNIX variants
Eric Koegel's avatar
Eric Koegel committed
49 50
AC_USE_SYSTEM_EXTENSIONS
AC_SEARCH_LIBS([strerror],[cposix])
51 52

dnl check for basic programs
Jasper Huijsmans's avatar
Jasper Huijsmans committed
53
AC_PROG_CC
54
AM_PROG_CC_C_O
Jasper Huijsmans's avatar
Jasper Huijsmans committed
55
AC_PROG_INSTALL
Eric Koegel's avatar
Eric Koegel committed
56
IT_PROG_INTLTOOL([intltool_minimum_version], [no-xml])
57
m4_ifdef([AC_PROG_SED], [AC_PROG_SED], [AC_CHECK_PROG(SED, sed, sed)])
Jasper Huijsmans's avatar
Jasper Huijsmans committed
58

59 60 61 62
dnl prepare libtool
LT_PREREQ([2.2.6])
LT_INIT([disable-static])

63
dnl check for standard header files
Jasper Huijsmans's avatar
Jasper Huijsmans committed
64
AC_HEADER_STDC
65 66 67
AC_CHECK_HEADERS([ctype.h errno.h fcntl.h math.h pwd.h signal.h \
                  string.h sys/param.h sys/stat.h  \
                  sys/types.h time.h \
68
                  unistd.h])
69
dnl Check for i18n support
Jean-François Wauthy's avatar
Jean-François Wauthy committed
70
XDT_I18N([@LINGUAS@])
71

72
dnl Check for X11 installed
Brian Tarricone's avatar
Brian Tarricone committed
73
XDT_CHECK_LIBX11_REQUIRE
74

Eric Koegel's avatar
Eric Koegel committed
75 76
dnl define xfdesktop's short version (major.minor)
AC_DEFINE([XFDESKTOP_VERSION_SHORT], [xfdesktop_version_short], [Short version string of xfdesktop])
77 78
dnl replace the version in settings/xfce-backdrop-settings.desktop.in.in
AC_SUBST([XFDESKTOP_VERSION_SHORT], [xfdesktop_version_short])
Eric Koegel's avatar
Eric Koegel committed
79

80
dnl required
81
XDT_CHECK_PACKAGE([GIO], [gio-2.0], [glib_minimum_version])
82
XDT_CHECK_PACKAGE([GIO_UNIX], [gio-unix-2.0], [glib_minimum_version])
83 84 85
XDT_CHECK_PACKAGE([GMODULE], [gmodule-2.0], [glib_minimum_version])
XDT_CHECK_PACKAGE([GOBJECT], [gobject-2.0], [glib_minimum_version])
XDT_CHECK_PACKAGE([GTHREAD], [gthread-2.0], [glib_minimum_version])
florian.weigelt's avatar
florian.weigelt committed
86
XDT_CHECK_PACKAGE([GTK], [gtk+-3.0], [gtk_minimum_version])
87 88
XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0],
                  [libxfce4util_minimum_version])
florian.weigelt's avatar
florian.weigelt committed
89
XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-2],
90
                  [libxfce4ui_minimum_version])
florian.weigelt's avatar
florian.weigelt committed
91
XDT_CHECK_PACKAGE([LIBWNCK], [libwnck-3.0], [wnck_minimum_version])
Stephan Arts's avatar
Stephan Arts committed
92
XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [xfconf_minimum_version])
florian.weigelt's avatar
florian.weigelt committed
93
XDT_CHECK_PACKAGE([LIBEXO], [exo-2], [exo_minimum_version])
94
XDT_CHECK_PACKAGE([CAIRO], [cairo], [cairo_minimum_version])
Benedikt Meurer's avatar
Benedikt Meurer committed
95

96 97
dnl do we want desktop icons at all?
AC_ARG_ENABLE([desktop-icons],
Eric Koegel's avatar
Eric Koegel committed
98
    [AS_HELP_STRING([--disable-desktop-icons],
99 100 101 102 103 104 105 106
            [Do not compile in support for desktop icons (default=enabled)])],
        [ac_cv_enable_desktop_icons=$enableval],
        [ac_cv_enable_desktop_icons=yes])
if test "x$ac_cv_enable_desktop_icons" = "xno"; then
    enable_desktop_icons="no"
else
    enable_desktop_icons="yes"
    AC_DEFINE([ENABLE_DESKTOP_ICONS], [1], [Set if desktop icon support is enabled])
107
fi
108
AM_CONDITIONAL([ENABLE_DESKTOP_ICONS], [test "x$enable_desktop_icons" = "xyes"])
109

110 111
dnl if we want desktop icons, do we also want file icons?
AC_ARG_ENABLE([file-icons],
Eric Koegel's avatar
Eric Koegel committed
112
    [AS_HELP_STRING([--disable-file-icons],
113 114 115 116 117 118 119 120 121
            [Do not compile in support for desktop file icons (default=enabled)])],
        [ac_cv_enable_file_icons=$enableval],
        [ac_cv_enable_file_icons=yes])
if test "x$ac_cv_enable_file_icons" = "xno" -o "x$enable_desktop_icons" != "xyes"; then
    enable_file_icons="no"
else
    enable_file_icons="yes"
fi

122 123 124 125 126
if test "x$enable_desktop_icons" = "xyes" -a "x$enable_file_icons" = "xyes"; then
        AC_DEFINE([ENABLE_FILE_ICONS], [1],
                  [Define if file icons should be enabled])
fi

127
AM_CONDITIONAL([ENABLE_FILE_ICONS], [test "x$enable_file_icons" = "xyes"])
128

129 130 131 132

dnl i'd rather have these two only checked conditionally, but this macro also
dnl calls AM_CONDITIONAL(), which cannot be in an 'if' block

Eric Koegel's avatar
Eric Koegel committed
133
XDT_CHECK_OPTIONAL_PACKAGE([THUNARX], [thunarx-3], [thunar_minimum_version],
134
    [thunarx],
135
    [Thunar's extension mechanism, to add external features to the desktop icon implementation])
136

137

Brian Tarricone's avatar
Brian Tarricone committed
138
AC_ARG_ENABLE([desktop-menu],
Eric Koegel's avatar
Eric Koegel committed
139
        AS_HELP_STRING([--disable-desktop-menu],
140 141 142
                [Do not build the desktop menu module (default=enabled)]),
        [ac_cv_enable_desktop_menu=$enableval],
        [ac_cv_enable_desktop_menu=yes])
Brian Tarricone's avatar
Brian Tarricone committed
143
if test "x$ac_cv_enable_desktop_menu" = "xno"; then
144
    build_desktop_menu="no"
Brian Tarricone's avatar
Brian Tarricone committed
145
else
146
    dnl time for more abuse!
Eric Koegel's avatar
Eric Koegel committed
147
    XDT_CHECK_PACKAGE([GARCON], [garcon-1],
148
                      [garcon_minimum_version], [build_desktop_menu="yes"],
149
                      [
Eric Koegel's avatar
Eric Koegel committed
150
echo "*** Optional package garcon-1 was either not found on your system"
151
echo "*** or is too old.  Please install or upgrade to at least version"
152 153 154 155 156 157 158 159 160 161
echo "*** garcon_minimum_version, or adjust the PKG_CONFIG_PATH environment variable"
echo "*** if you installed the new version of the package in a nonstandard"
echo "*** prefix.  Desktop menu will be disabled."
build_desktop_menu="no"
])
    XDT_CHECK_PACKAGE([GARCON_GTK3], [garcon-gtk3-1],
                      [garcon_minimum_version], [build_desktop_menu="yes"],
                      [
echo "*** Optional package garcon-gtk3-1 was either not found on your system"
echo "*** or is too old.  Please install or upgrade to at least version"
162
echo "*** garcon_minimum_version, or adjust the PKG_CONFIG_PATH environment variable"
163 164 165 166 167
echo "*** if you installed the new version of the package in a nonstandard"
echo "*** prefix.  Desktop menu will be disabled."
build_desktop_menu="no"
])
    if test "x$build_desktop_menu" = "xyes"; then
168
        AC_DEFINE([USE_DESKTOP_MENU], [1],
169 170
                  [Define if we should build the desktop menu module])
    fi
Brian Tarricone's avatar
Brian Tarricone committed
171
fi
172
AM_CONDITIONAL([BUILD_DESKTOP_MENU], [test "x$build_desktop_menu" = "xyes"])
Brian Tarricone's avatar
Brian Tarricone committed
173

174
AC_ARG_WITH([file-manager-fallback],
Eric Koegel's avatar
Eric Koegel committed
175
    [AS_HELP_STRING([--with-file-manager-fallback=PATH],
176 177 178 179 180 181
            [Default file manager fallback to handle external folders and applications (default=Thunar)])],
    [ac_cv_file_manager_fallback="$withval"],
    [ac_cv_file_manager_fallback=Thunar])
AC_DEFINE_UNQUOTED([FILE_MANAGER_FALLBACK], ["$ac_cv_file_manager_fallback"],
    [Set to the file manager to use as a fallback])

182 183 184 185 186 187
dnl **************************************
dnl *** Optional support for libnotify ***
dnl **************************************
XDT_CHECK_OPTIONAL_PACKAGE([LIBNOTIFY], [libnotify], [0.4.0], [notifications],
                           [Mount notification support], [yes])

188
dnl check for debugging support
189
XDT_FEATURE_DEBUG
190

Eric Koegel's avatar
Eric Koegel committed
191
AC_CONFIG_FILES([
192
Makefile
193
backgrounds/Makefile
194
common/Makefile
195
doc/Makefile
196
pixmaps/Makefile
197
po/Makefile.in
198
settings/xfce-backdrop-settings.desktop.in
Jasper Huijsmans's avatar
Jasper Huijsmans committed
199
settings/Makefile
200
src/Makefile
Jasper Huijsmans's avatar
Jasper Huijsmans committed
201
])
Eric Koegel's avatar
Eric Koegel committed
202
AC_OUTPUT
Brian Tarricone's avatar
Brian Tarricone committed
203 204 205

echo
echo "Build Configuration:"
206 207
echo "* Build desktop menu module:                    $build_desktop_menu"
echo "* Build support for desktop icons:              $enable_desktop_icons"
208
echo "      Include support for file/launcher icons:  $enable_file_icons"
209 210 211 212 213
if test x"$LIBNOTIFY_FOUND" = x"yes"; then
echo "* Mount notification support:                   yes"
else
echo "* Mount notification support:                   no"
fi
Brian Tarricone's avatar
Brian Tarricone committed
214
echo