configure.ac.in 11.4 KB
Newer Older
Eric Koegel's avatar
Eric Koegel committed
1
m4_define([intltool_minimum_version], [0.35])
Sean Davis's avatar
Sean Davis committed
2
m4_define([parole_verinfo],           [0:8:1])
3
m4_define([parole_version_api],       [0])
Sean Davis's avatar
Sean Davis committed
4 5 6
m4_define([parole_version_major],     [1])
m4_define([parole_version_minor],     [0])
m4_define([parole_version_micro],     [0])
Sean Davis's avatar
Sean Davis committed
7
m4_define([parole_version_build],     [@REVISION@])
Sean Davis's avatar
Sean Davis committed
8
m4_define([parole_version_tag],       [])
9 10
m4_define([parole_version], [parole_version_major().parole_version_minor().parole_version_micro()ifelse(parole_version_tag(), [git], [parole_version_tag().parole_version_build()], [parole_version_tag()])])

Sean Davis's avatar
Sean Davis committed
11
AC_INIT([parole], [parole_version], [https://docs.xfce.org/apps/parole/bugs])
12 13
AC_PREREQ(2.59c)

14 15
AC_CONFIG_MACRO_DIR([m4])

16
AM_INIT_AUTOMAKE([1.8 dist-bzip2 tar-ustar no-dist-gzip])
17
AM_CONFIG_HEADER([config.h])
18

Sean Davis's avatar
Sean Davis committed
19
if test x${enable_gtk_doc} = x"yes"; then
20
    AM_MAINTAINER_MODE([enable])
21
else
Sean Davis's avatar
Sean Davis committed
22
    if test x${enable_debug} != x"no"; then
23 24 25 26
        AM_MAINTAINER_MODE([enable])
    else
        AM_MAINTAINER_MODE()
    fi
27 28
fi

29 30 31 32 33 34 35 36 37 38 39 40
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])

AC_USE_SYSTEM_EXTENSIONS()

# ===================================================== #
#               Basic compiler settings                 #
# ===================================================== #
AC_PROG_CC()
AC_PROG_CXX()
AM_PROG_CC_C_O()
AC_PROG_LD()
AC_PROG_INSTALL()
Eric Koegel's avatar
Eric Koegel committed
41
IT_PROG_INTLTOOL([intltool_minimum_version], [no-xml])
42 43

# ===================================================== #
44
#                 Initialize libtool                    #
45
# ===================================================== #
46 47
LT_PREREQ([2.2.6])
LT_INIT([disable-static])
48 49 50
m4_ifdef([LT_OUTPUT], [LT_OUTPUT])

# ===================================================== #
51
#                 Version information                   #
52 53 54 55 56 57 58 59 60 61 62 63
# ===================================================== #
PAROLE_VERINFO=parole_verinfo()
PAROLE_VERSION_API=parole_version_api()
PAROLE_VERSION_MAJOR=parole_version_major()
PAROLE_VERSION_MINOR=parole_version_minor()
PAROLE_VERSION_MICRO=parole_version_micro()
AC_SUBST([PAROLE_VERINFO])
AC_SUBST([PAROLE_VERSION_API])
AC_SUBST([PAROLE_VERSION_MAJOR])
AC_SUBST([PAROLE_VERSION_MINOR])
AC_SUBST([PAROLE_VERSION_MICRO])

64 65 66 67 68 69 70 71 72 73
dnl define a short version string for parole
m4_append([parole_version_short], ["])
m4_append([parole_version_short], [parole_version_major])
m4_append([parole_version_short], [.])
m4_append([parole_version_short], [parole_version_minor])
m4_append([parole_version_short], ["])

dnl define parole's short version (major.minor)
AC_DEFINE([PAROLE_VERSION_SHORT], [parole_version_short], [Short version string of parole])

74 75 76
# ===================================================== #
#   Check for headers needed for standard interfaces    #
# ===================================================== #
77 78 79 80 81 82
AC_HEADER_STDC
AC_CHECK_HEADERS([errno.h signal.h stddef.h sys/ioctl.h fcntl.h\
                  string.h sys/stat.h sys/types.h sys/wait.h time.h \
                  unistd.h])

# ===================================================== #
83
#               Check for i18n support                  #
84 85 86 87
# ===================================================== #

XDT_I18N([@LINGUAS@])

88 89 90
# ===================================================== #
#             Check for required packages               #
# ===================================================== #
91
m4_define([gtk_minimum_version], [3.20.0])
92
m4_define([glib_minimum_version], [2.32.0])
93 94
m4_define([clutter_minimum_version], [1.16.4])
m4_define([cluttergtk_minimum_version], [1.4.4])
95
m4_define([clutter_gtk_blacklist_version], [3.22.0])
Sean Davis's avatar
Sean Davis committed
96

97 98 99 100
m4_define([dbus_minimum_version], [0.60])
m4_define([dbus_glib_minimum_version], [0.70])

m4_define([libxfce4ui_minimum_version],[4.11.0])
101
m4_define([libxfce4util_minimum_version],[4.10.0])
102 103 104
m4_define([libxfconf_minimum_version], [4.10.0])
m4_define([libnotify_minimum_version], [0.4.1])

105 106 107 108 109 110 111

XDT_CHECK_PACKAGE([GLIB], [glib-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])
XDT_CHECK_PACKAGE([GMODULE], [gmodule-2.0], [glib_minimum_version])
XDT_CHECK_PACKAGE([GIO], [gio-2.0], [glib_minimum_version])

112 113 114 115
XDT_CHECK_PACKAGE([DBUS], [dbus-1], [dbus_minimum_version])
XDT_CHECK_PACKAGE([DBUS_GLIB], [dbus-glib-1], [dbus_glib_minimum_version])

XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0],[libxfce4util_minimum_version])
116
XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [libxfconf_minimum_version])
117 118

dnl ************************************
Sean Davis's avatar
Sean Davis committed
119
dnl *** Compile against GTK3 ***
120
dnl ************************************
121 122
XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-2], [libxfce4ui_minimum_version])
XDT_CHECK_PACKAGE([GTK], [gtk+-3.0], [gtk_minimum_version])
123

Sean Davis's avatar
Sean Davis committed
124 125 126 127 128 129 130 131 132 133 134 135 136
dnl ************************************
dnl *** GStreamer 1.0 ***
dnl ************************************
gstreamer_api_version=1.0
gstreamer_minimum_version=1.0.0
GST_API_VERSION=1.0
GST_REQS=1.0.0
GSTPLUG_REQS=1.0.0
XDT_CHECK_PACKAGE([GST], [gstreamer-${gstreamer_api_version}], [${gstreamer_minimum_version}])
XDT_CHECK_PACKAGE([GST_BASE], [gstreamer-base-${gstreamer_api_version}], [${gstreamer_minimum_version}])
XDT_CHECK_PACKAGE([GST_VIDEO], [gstreamer-video-${gstreamer_api_version}], [${gstreamer_minimum_version}])
XDT_CHECK_PACKAGE([GST_PBUTILS], [gstreamer-pbutils-${gstreamer_api_version}], [${gstreamer_minimum_version}])
GST_LIBS="$GST_LIBS -lgstbase-$GST_API_VERSION -lgstvideo-$GST_API_VERSION -lgstaudio-$GST_API_VERSION -lgstpbutils-$GST_API_VERSION -lgsttag-$GST_API_VERSION"
Sean Davis's avatar
Sean Davis committed
137

Simon Steinbeiß's avatar
Simon Steinbeiß committed
138 139
XDT_CHECK_LIBX11()

140
# Taken from Gnome system tools
141 142 143
# ===================================================== #
#                    Pixmaps files                      #
# ===================================================== #
144 145 146 147 148 149 150 151 152 153
if test "x${prefix}" = "xNONE"; then
  AC_DEFINE_UNQUOTED(PIXMAPS_DIR, "${ac_default_prefix}/${DATADIRNAME}/${PACKAGE}/pixmaps", [pixmaps directory])
  pixmapsdir="${ac_default_prefix}/${DATADIRNAME}/${PACKAGE}/pixmaps"
else
  AC_DEFINE_UNQUOTED(PIXMAPS_DIR, "${prefix}/${DATADIRNAME}/${PACKAGE}/pixmaps", [pixmaps directory])
  pixmapsdir="${prefix}/${DATADIRNAME}/${PACKAGE}/pixmaps"
fi

AC_SUBST(pixmapsdir)

154 155 156
# ===================================================== #
#                  Check XF86keysysm                    #
# ===================================================== #
157 158 159 160 161 162 163
# Check for the AudioPlay sym other should exist
# if this one exists.
AC_CHECK_DECL(XF86XK_AudioPlay,have_XF86XK_AudioPlay=1,have_XF86XK_AudioPlay=0,[#include <X11/XF86keysym.h>])
if test "x${ac_cv_have_decl_XF86XK_AudioPlay}" != "xno"; then
  AC_DEFINE(HAVE_XF86_KEYSYM, 1, [Define if XF86keysysm.h is available])
fi

164 165 166
# ===================================================== #
#                   Clutter support                     #
# ===================================================== #
167 168 169 170
XDT_CHECK_PACKAGE([GTK], [gtk+-3.0], [clutter_gtk_blacklist_version], [ac_clutter=blacklisted], [
    AC_ARG_ENABLE([clutter], AC_HELP_STRING([--enable-clutter], [Include clutter backend]),
      [ac_clutter=$enableval], [ac_clutter=no])
])
171 172 173
AC_MSG_CHECKING([whether to build the clutter backend])
AM_CONDITIONAL([PAROLE_CLUTTER_BACKEND], [test x"$ac_clutter" = x"yes"])
AC_MSG_RESULT([$ac_clutter])
Sean Davis's avatar
Sean Davis committed
174
if test "x$ac_clutter" = "xyes"; then
175 176
    XDT_CHECK_PACKAGE([CLUTTER], [clutter-1.0], [clutter_minimum_version])
    XDT_CHECK_PACKAGE([CLUTTERGTK], [clutter-gtk-1.0], [cluttergtk_minimum_version])
Sean Davis's avatar
Sean Davis committed
177
    AC_DEFINE(HAVE_CLUTTER, 1, [Define to 1 if clutter is found])
178 179
fi

180 181 182
# ===================================================== #
#                   TagLib support                      #
# ===================================================== #
183
TAGLIB_FOUND="no"
Sean Davis's avatar
Sean Davis committed
184
XDT_CHECK_OPTIONAL_PACKAGE([TAGLIB],
185
    [taglib], [1.4],
Sean Davis's avatar
Sean Davis committed
186
    [taglib],
187 188 189 190 191 192 193 194 195
    [tag lib], [yes])

if test x"$TAGLIB_FOUND" = x"yes"; then
TAGLIBC_LIBS=""
TAGLIBC_CFLAGS=""
AC_CHECK_LIB([tag_c], [taglib_file_new],
[
    AC_CHECK_HEADER([taglib/tag_c.h],
    [
196 197
    TAGLIBC_LIBS="-ltag_c"
    AC_DEFINE([HAVE_TAGLIBC], [1], [Define to 1 if tag_c is found])
198 199 200 201 202 203
    ])
], [-lm])
AC_SUBST([TAGLIBC_CFLAGS])
AC_SUBST([TAGLIBC_LIBS])
fi

204 205 206
# ===================================================== #
#               Check plugins to build                  #
# ===================================================== #
207

208 209 210 211 212 213 214 215 216 217
# Notify plugin.
#--------------------------
AC_ARG_ENABLE([notify-plugin], AC_HELP_STRING([--disable-notify-plugin], [Don't build parole notification plugin]),
  [ac_notify_plugin=$enableval], [ac_notify_plugin=yes])
AC_MSG_CHECKING([whether to build the notification plugin])
AM_CONDITIONAL([PAROLE_NOTIFY_PLUGIN], [test x"$ac_notify_plugin" = x"yes"])
AC_MSG_RESULT([$ac_notify_plugin])
# Depends on Libnotify - if not found cannot build
LIBNOTIFY_FOUND="no"
if test x"$ac_notify_plugin" = x"yes"; then
218
    XDT_CHECK_PACKAGE([LIBNOTIFY],
Sean Davis's avatar
Sean Davis committed
219
    [libnotify], [libnotify_minimum_version])
220 221
fi

222 223 224 225 226 227 228 229
# Tray plugin.
#--------------------------
AC_ARG_ENABLE([tray-plugin], AC_HELP_STRING([--disable-tray-plugin], [Don't build parole tray icon plugin]),
  [ac_tray_plugin=$enableval], [ac_tray_plugin=yes])
AC_MSG_CHECKING([whether to build the system tray plugin])
AM_CONDITIONAL([PAROLE_TRAY_PLUGIN], [test x"$ac_tray_plugin" = x"yes"])
AC_MSG_RESULT([$ac_tray_plugin])

Hakan Erduman's avatar
Hakan Erduman committed
230 231 232 233 234 235 236 237
# MPRIS2 plugin.
#--------------------------
AC_ARG_ENABLE([mpris2-plugin], AC_HELP_STRING([--disable-mpris2-plugin], [Don't build parole mpris2 plugin]),
  [ac_mpris2_plugin=$enableval], [ac_mpris2_plugin=yes])
AC_MSG_CHECKING([whether to build the mpris2 plugin])
AM_CONDITIONAL([PAROLE_MPRIS2_PLUGIN], [test x"$ac_mpris2_plugin" = x"yes"])
AC_MSG_RESULT([$ac_mpris2_plugin])

238 239 240
# ===================================================== #
#             Check for debugging support               #
# ===================================================== #
241 242
XDT_FEATURE_DEBUG()

243 244 245
# ===================================================== #
#                  Check for Gtk doc                    #
# ===================================================== #
246 247 248 249 250 251 252 253 254
GTK_DOC_CHECK(1.9)

AC_OUTPUT([
Makefile
data/Makefile
data/pixmaps/Makefile
data/interfaces/Makefile
data/icons/Makefile
data/icons/16x16/Makefile
255
data/icons/24x24/Makefile
256 257
data/icons/32x32/Makefile
data/icons/48x48/Makefile
258 259
data/icons/64x64/Makefile
data/icons/128x128/Makefile
260 261 262
data/icons/scalable/Makefile
data/mime/Makefile
data/desktop/Makefile
263
data/appdata/Makefile
264
src/Makefile
Tekk's avatar
Tekk committed
265 266 267 268 269 270 271
src/misc/Makefile
src/misc/parole.h
src/common/Makefile
src/gst/Makefile
src/dbus/Makefile
src/plugins/Makefile
src/plugins/sample/Makefile
272
src/plugins/notify/Makefile
Tekk's avatar
Tekk committed
273
src/plugins/tray/Makefile
Hakan Erduman's avatar
Hakan Erduman committed
274
src/plugins/mpris2/Makefile
275 276 277 278 279 280 281 282 283 284
docs/Makefile
docs/plugin-api/version.xml
docs/plugin-api/Makefile
po/Makefile.in
])

echo "
------------------------------------------------------
            Parole Media Player $VERSION
        ====================================
285 286 287 288 289 290 291

        Installation:
        =============
        prefix:                         $prefix
        pixmapsdir:                     $pixmapsdir
        Debug:                          $enable_debug
        Building plugin api docs:       ${enable_gtk_doc}
Sean Davis's avatar
Sean Davis committed
292
        GStreamer API version:          ${gstreamer_api_version}
Sean Davis's avatar
Sean Davis committed
293
        GTK+ version:                   GTK+-3
294 295 296

        Optional dependencies:
        ======================
297
        Clutter Backend:                ${ac_clutter}
298 299 300 301
        Taglib:                         $TAGLIB_FOUND

        Plugins to build:
        =================
Sean Davis's avatar
Sean Davis committed
302 303
        Notify:                         ${ac_notify_plugin}
        System Tray icon:               ${ac_tray_plugin}
Hakan Erduman's avatar
Hakan Erduman committed
304
        MPRIS2:                         ${ac_mpris2_plugin}
305

306 307 308
------------------------------------------------------

Configuration finished, type make to compile"