configure.ac.in 11.3 KB
Newer Older
1
dnl
Harald Judt's avatar
Harald Judt committed
2
dnl Copyright (c) 2006 - 2015
3 4 5 6 7 8 9 10 11
dnl         The Xfce development team. All rights reserved.
dnl
dnl Originally written for Xfce by Benedikt Meurer <benny@xfce.org>
dnl Modified by Stephan Arts <stephan@xfce.org>
dnl

dnl ***************************
dnl *** Version information ***
dnl ***************************
Stephan Arts's avatar
Stephan Arts committed
12
m4_define([xfce4_settings_version_major], [4])
Nick Schermer's avatar
Nick Schermer committed
13
m4_define([xfce4_settings_version_minor], [11])
Sean Davis's avatar
Sean Davis committed
14
m4_define([xfce4_settings_version_micro], [4])
15
m4_define([xfce4_settings_version_nano], [])
16
m4_define([xfce4_settings_version_build], [@REVISION@])
Sean Davis's avatar
Sean Davis committed
17
m4_define([xfce4_settings_version_tag], [git]) # Leave empty for releases
18
m4_define([xfce4_settings_version], [xfce4_settings_version_major().xfce4_settings_version_minor().xfce4_settings_version_micro()ifelse(xfce4_settings_version_nano(), [], [], [.xfce4_settings_version_nano()])ifelse(xfce4_settings_version_tag(), [git], [xfce4_settings_version_tag()-xfce4_settings_version_build()], [xfce4_settings_version_tag()])])
19

20 21 22 23 24 25 26
dnl define a short version string for xfce4-settings
m4_append([xfce4_settings_version_short], ["])
m4_append([xfce4_settings_version_short], [xfce4_settings_version_major])
m4_append([xfce4_settings_version_short], [.])
m4_append([xfce4_settings_version_short], [xfce4_settings_version_minor])
m4_append([xfce4_settings_version_short], ["])

27
dnl *******************************************
Nick Schermer's avatar
Nick Schermer committed
28
dnl *** Debugging support for GIT snapshots ***
29
dnl *******************************************
30
m4_define([xfce4_settings_debug_default], [ifelse(xfce4_settings_version_tag(), [git], [full], [minimum])])
31

32 33 34
dnl ***************************
dnl *** Initialize autoconf ***
dnl ***************************
Harald Judt's avatar
Harald Judt committed
35
AC_COPYRIGHT([Copyright (c) 2008-2015
36
        The Xfce development team. All rights reserved.])
37
AC_INIT([xfce4-settings], [xfce4_settings_version], [http://bugzilla.xfce.org/])
Harald Judt's avatar
Harald Judt committed
38 39
AC_PREREQ([2.60])
AC_CONFIG_MACRO_DIR([m4])
40
AC_REVISION([@REVISION@])
41

42 43 44
dnl ***************************
dnl *** Initialize automake ***
dnl ***************************
Nick Schermer's avatar
Nick Schermer committed
45 46
AM_INIT_AUTOMAKE([1.8 dist-bzip2 tar-ustar no-dist-gzip])
AC_CONFIG_HEADERS([config.h])
47
AM_MAINTAINER_MODE()
48
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
49 50 51 52 53 54 55 56 57 58 59 60

dnl *******************************
dnl *** Check for UNIX variants ***
dnl *******************************
AC_AIX()
AC_ISC_POSIX()
AC_MINIX()

dnl ********************************
dnl *** Check for basic programs ***
dnl ********************************
AC_PROG_CC()
61
AM_PROG_CC_C_O
62 63
AC_PROG_LD()
AC_PROG_INSTALL()
64
AC_PROG_INTLTOOL([0.31], [no-xml])
65

66 67 68
dnl **************************
dnl *** Initialize libtool ***
dnl **************************
69 70
LT_PREREQ([2.2.6])
LT_INIT([disable-static])
71

72 73 74
dnl **********************************
dnl *** Check for standard headers ***
dnl **********************************
75
AC_CHECK_HEADERS([errno.h memory.h math.h stdlib.h string.h unistd.h signal.h time.h sys/types.h sys/wait.h])
76
AC_CHECK_FUNCS([daemon setsid])
77

78 79 80 81
dnl ******************************
dnl *** Check for i18n support ***
dnl ******************************
XDT_I18N([@LINGUAS@])
82

83 84 85 86 87
dnl ***********************************
dnl *** Version string for the docs ***
dnl ***********************************
AC_DEFINE([XFCE4_SETTINGS_VERSION_SHORT], [xfce4_settings_version_short], [Short version string of xfce4-settings])

88 89 90
dnl ***********************************
dnl *** Check for required packages ***
dnl ***********************************
Nick Schermer's avatar
Nick Schermer committed
91
XDT_CHECK_PACKAGE([EXO], [exo-1], [0.7.1])
92 93 94
XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.20.0])
XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.24.0])
XDT_CHECK_PACKAGE([GIO], [gio-2.0], [2.24.0])
Nick Schermer's avatar
Nick Schermer committed
95
XDT_CHECK_PACKAGE([GARCON], [garcon-1], [0.1.10])
96
XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.9.0])
Nick Schermer's avatar
Nick Schermer committed
97
XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1], [4.11.0])
98
XDT_CHECK_PACKAGE([LIBXFCE4KBD_PRIVATE], [libxfce4kbd-private-2], [4.9.0])
99 100
XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [4.9.0])
XDT_CHECK_PACKAGE([DBUS_GLIB], [dbus-glib-1], [0.84])
101
XDT_CHECK_PACKAGE([FONTCONFIG], [fontconfig], [2.6.0])
102

103
XDT_CHECK_PACKAGE([XI], [xi], [1.2.0], [],
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130
[
  for dir in /usr/X11R6 /usr/X11 /opt/X11R6 /opt/X11; do
    test -z "$XI_CFLAGS" || break
    saved_CFLAGS="$CFLAGS"
    saved_LIBS="$LIBS"
    CFLAGS="$CFLAGS -I$dir/include"
    LIBS="$LIBS -L$dir/lib"
    AC_CHECK_LIB([Xi], [XListInputDevices],
    [
      XI_CFLAGS="-I$dir/include"
      XI_LIBS="-L$dir/lib -lXi"
      AC_SUBST(XI_CFLAGS)
      AC_SUBST(XI_LIBS)
    ])
    CFLAGS="$saved_CFLAGS"
    LIBS="$saved_LIBS"
  done
  if test -z "$XI_CFLAGS"; then
    echo "*** The required package Xi was not found on your system."
    echo "*** Please install Xi or adjust the PKG_CONFIG_PATH environment"
    echo "*** variable if you installed the package in a nonstandard"
    echo "*** prefix so that pkg-config is able to find it."
    exit 1
  fi
])

XDT_CHECK_PACKAGE([LIBX11], [x11], [1.0.0], [], [XDT_CHECK_LIBX11_REQUIRE])
131
XDT_CHECK_PACKAGE([INPUTPROTO], [inputproto], [1.4.0])
132

133 134 135
dnl ***********************************
dnl *** Optional support for Xrandr ***
dnl ***********************************
136
XDT_CHECK_OPTIONAL_PACKAGE([XRANDR], [xrandr], [1.2.0],
137 138
                           [xrandr], [Xrandr support])

139 140 141 142 143 144 145 146 147 148 149
dnl ***********************************
dnl *** Optional support for hwdata ***
dnl ***********************************
AC_ARG_WITH([pnp-ids-path],
            [AC_HELP_STRING([--with-pnp-ids-path],
                            [Specify the path to pnp.ids (default=\${datadir}/hwdata/pnp.ids)])],
            [with_pnp_ids_path=$withval],
            [with_pnp_ids_path="\${datadir}/hwdata/pnp.ids"])
PNP_IDS=$with_pnp_ids_path
AC_SUBST(PNP_IDS)

150 151 152 153 154 155
dnl ***********************************
dnl *** Optional support for UPower ***
dnl ***********************************
XDT_CHECK_OPTIONAL_PACKAGE([UPOWERGLIB], [upower-glib], [0.9.8],
                           [upower-glib], [UPower support])

156 157 158 159 160 161
dnl **************************************
dnl *** Optional support for Libnotify ***
dnl **************************************
XDT_CHECK_OPTIONAL_PACKAGE([LIBNOTIFY], [libnotify], [0.1.3],
                           [libnotify], [Notification support])

Nick Schermer's avatar
Nick Schermer committed
162 163 164 165 166 167
dnl *********************
dnl *** Mime settings ***
dnl *********************
XDT_CHECK_OPTIONAL_PACKAGE([GIO_UNIX], [gio-unix-2.0], [2.24],
                           [gio-unix], [Mime settings])

168 169 170 171 172 173
dnl ************************************
dnl *** Optional support for Xcursor ***
dnl ************************************
XDT_CHECK_OPTIONAL_PACKAGE([XCURSOR], [xcursor], [1.1.0],
                           [xcursor], [Cursor themes support])

174 175 176 177 178 179
dnl *************************************************
dnl *** Optional support for libinput Xorg driver ***
dnl *************************************************
XDT_CHECK_OPTIONAL_PACKAGE([LIBINPUT], [xorg-libinput], [0.6.0],
                           [xorg-libinput], [libinput Xorg driver support])

Olivier Fourdan's avatar
Olivier Fourdan committed
180 181 182 183 184
dnl ****************************************
dnl *** Optional support for Libxklavier ***
dnl ****************************************
XDT_CHECK_OPTIONAL_PACKAGE([LIBXKLAVIER], [libxklavier], [0.3.0],
                           [libxklavier], [Keyboard layout selection])
Stephan Arts's avatar
Stephan Arts committed
185 186
XDT_CHECK_OPTIONAL_PACKAGE([LIBXKLAVIER4], [libxklavier], [4.0],
                           [libxklavier], [Keyboard layout selection])
187 188
XDT_CHECK_OPTIONAL_PACKAGE([LIBXKLAVIER5], [libxklavier], [5.0],
                           [libxklavier], [Keyboard layout selection])
Olivier Fourdan's avatar
Olivier Fourdan committed
189

190 191 192
dnl make pluggable settings dialogs optional
AC_ARG_ENABLE([pluggable-dialogs],
              [AC_HELP_STRING([--enable-pluggable-dialogs],
193
                              [Enable support for embedded settings dialogs (default=disabled)])],
194 195 196 197 198 199 200 201
              [enable_pluggable_dialogs=$enableval],
              [enable_pluggable_dialogs=no])
if test x"$enable_pluggable_dialogs" = x"yes"; then
  AC_DEFINE([ENABLE_PLUGGABLE_DIALOGS], [1], [Define to enable embedded settings dialogs])
  ENABLE_PLUGGABLE_DIALOGS=1
fi
AC_SUBST(ENABLE_PLUGGABLE_DIALOGS)

202
dnl ****************************************
203
dnl *** Optional support for Libcanberra ***
204
dnl ****************************************
205 206

dnl Camberra XSettings
207 208
AC_ARG_ENABLE([sound-settings],
              [AC_HELP_STRING([--enable-sound-settings],
209
                              [Enable sound XSETTINGS in GUI (from libcanberra) (default=no)])],
210 211 212 213 214 215 216 217
              [enable_sound_settings=$enableval],
              [enable_sound_settings=no])
if test x"$enable_sound_settings" = x"yes"; then
  AC_DEFINE([ENABLE_SOUND_SETTINGS], [1], [Define to enable sound control in UI])
  ENABLE_SOUND_SETTINGS=1
fi
AC_SUBST(ENABLE_SOUND_SETTINGS)

218 219 220 221 222 223 224 225 226 227
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])

228 229 230
dnl ***********************************
dnl *** Check for debugging support ***
dnl ***********************************
231
XDT_FEATURE_DEBUG([xfce4_settings_debug_default])
232 233 234 235

dnl **************************************
dnl *** Check for linker optimizations ***
dnl **************************************
236
XDT_FEATURE_LINKER_OPTS()
237 238 239 240 241 242 243 244 245 246 247 248 249

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])
250 251 252 253 254 255 256

AC_OUTPUT([
Makefile
po/Makefile.in
dialogs/Makefile
dialogs/appearance-settings/Makefile
dialogs/accessibility-settings/Makefile
257
dialogs/display-settings/Makefile
258
dialogs/keyboard-settings/Makefile
Nick Schermer's avatar
Nick Schermer committed
259
dialogs/mime-settings/Makefile
260
dialogs/mouse-settings/Makefile
261
xfsettingsd/Makefile
262
xfce4-settings-manager/Makefile
263
xfce4-settings-editor/Makefile
264 265
])

266 267 268 269 270 271 272 273
dnl ***************************
dnl *** Print configuration ***
dnl ***************************
echo
echo "Build Configuration:"
echo
echo "* Installation prefix:       $prefix"
echo "* Debug Support:             $enable_debug"
274 275 276 277 278
if test x"$XRANDR_FOUND" = x"yes"; then
echo "* Xrandr support:            yes"
else
echo "* Xrandr support:            no"
fi
279 280 281 282 283
if test x"$UPOWERGLIB_FOUND" = x"yes"; then
echo "* UPower support:            yes"
else
echo "* UPower support:            no"
fi
284 285 286 287 288 289 290 291 292 293
if test x"$LIBNOTIFY_FOUND" = x"yes"; then
echo "* Libnotify support:         yes"
else
echo "* Libnotify support:         no"
fi
if test x"$XCURSOR_FOUND" = x"yes"; then
echo "* Xcursor support:           yes"
else
echo "* Xcursor support:           no"
fi
294 295 296 297 298
if test x"$LIBINPUT_FOUND" = x"yes"; then
echo "* Xorg libinput support:     yes"
else
echo "* Xorg libinput support:     no"
fi
299 300 301 302 303
if test x"$ENABLE_PLUGGABLE_DIALOGS" = x"1"; then
echo "* Embedded settings dialogs  yes"
else
echo "* Embedded settings dialogs  no"
fi
304 305 306 307 308
if test x"$ENABLE_SOUND_SETTINGS" = x"1"; then
echo "* Sounds settings support    yes"
else
echo "* Sounds settings support    no"
fi
Olivier Fourdan's avatar
Olivier Fourdan committed
309 310 311 312 313
if test x"$LIBXKLAVIER_FOUND" = x"yes"; then
echo "* Libxklavier support:       yes"
else
echo "* Libxklavier support:       no"
fi
Nick Schermer's avatar
Nick Schermer committed
314 315 316 317 318
if test x"$GIO_UNIX_FOUND" = x"yes"; then
echo "* Mime settings (gio-unix):  yes"
else
echo "* Mime settings (gio-unix):  no"
fi
319
echo
320 321