configure.ac.in 8.88 KB
Newer Older
1
dnl
2
dnl Copyright (c) 2006 - 2009
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 13
m4_define([xfce4_settings_version_major], [4])
m4_define([xfce4_settings_version_minor], [5])
Jannis Pohlmann's avatar
Jannis Pohlmann committed
14 15
m4_define([xfce4_settings_version_micro], [99])
m4_define([xfce4_settings_version_nano], [1])
16
m4_define([xfce4_settings_version_build], [r@REVISION@])
Jannis Pohlmann's avatar
Jannis Pohlmann committed
17 18
m4_define([xfce4_settings_version_tag], []) # Leave empty for releases
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(),[],[], [-ifelse(xfce4_settings_version_tag(), [stephan], [xfce4_settings_version_tag()-xfce4_settings_version_build()], [xfce4_settings_version_tag()])])])
19 20 21 22 23 24

dnl *******************************************
dnl *** Debugging support for SVN snapshots ***
dnl *******************************************
m4_define([xfce4_settings_debug_default], [ifelse(xfce4_settings_version_tag(), [svn], [full], [minimum])])

25 26 27
dnl ***************************
dnl *** Initialize autoconf ***
dnl ***************************
28
AC_COPYRIGHT([Copyright (c) 2008-2009
29
        The Xfce development team. All rights reserved.])
30
AC_INIT([xfce4-settings], [xfce4_settings_version], [http://bugzilla.xfce.org/])
31
AC_PREREQ([2.50])
32
AC_REVISION([$Id])
33

34 35 36 37
dnl ***************************
dnl *** Initialize automake ***
dnl ***************************
AM_INIT_AUTOMAKE([1.8 dist-bzip2 tar-ustar])
38
AM_CONFIG_HEADER([config.h])
39 40 41 42 43 44 45 46 47 48 49 50 51
AM_MAINTAINER_MODE()

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

dnl ********************************
dnl *** Check for basic programs ***
dnl ********************************
AC_PROG_CC()
52
AM_PROG_CC_C_O
53 54
AC_PROG_LD()
AC_PROG_INSTALL()
55
AC_PROG_INTLTOOL([0.31], [no-xml])
56

57 58 59 60
dnl **************************
dnl *** Initialize libtool ***
dnl **************************
AC_PROG_LIBTOOL()
61

62 63 64
dnl **********************************
dnl *** Check for standard headers ***
dnl **********************************
65
AC_CHECK_HEADERS([errno.h memory.h math.h stdlib.h string.h unistd.h signal.h])
66

67 68 69 70
dnl ******************************
dnl *** Check for i18n support ***
dnl ******************************
XDT_I18N([@LINGUAS@])
71

72 73 74
dnl ***********************************
dnl *** Check for required packages ***
dnl ***********************************
75
XDT_CHECK_PACKAGE([EXO], [exo-0.3], [0.3.92])
76 77
XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.10.0])
XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.12.0])
78
XDT_CHECK_PACKAGE([GTHREAD], [gthread-2.0], [2.12.0])
Jannis Pohlmann's avatar
Jannis Pohlmann committed
79 80 81
XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.5.99.1])
XDT_CHECK_PACKAGE([LIBXFCEGUI4], [libxfcegui4-1.0], [4.5.99.1])
XDT_CHECK_PACKAGE([LIBXFCE4KBD_PRIVATE], [libxfce4kbd-private-1.0], [4.5.99.1])
82
XDT_CHECK_PACKAGE([GLADE], [libglade-2.0], [2.0.0])
Jannis Pohlmann's avatar
Jannis Pohlmann committed
83
XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [4.5.99.1])
84
XDT_CHECK_PACKAGE([DBUS_GLIB], [dbus-glib-1], [0.34])
85 86
XDT_CHECK_PACKAGE([XI], [xi], [1.0.0])
XDT_CHECK_PACKAGE([LIBX11], [x11], [1.0.0])
87
XDT_CHECK_PACKAGE([XRANDR], [xrandr], [1.1.0])
88
XDT_CHECK_PACKAGE([LIBWNCK], [libwnck-1.0], [2.12.0])
89 90 91 92 93 94 95 96 97 98 99 100 101

dnl **************************************
dnl *** Optional support for Libnotify ***
dnl **************************************
XDT_CHECK_OPTIONAL_PACKAGE([LIBNOTIFY], [libnotify], [0.1.3],
                           [libnotify], [Notification support])

dnl ************************************
dnl *** Optional support for Xcursor ***
dnl ************************************
XDT_CHECK_OPTIONAL_PACKAGE([XCURSOR], [xcursor], [1.1.0],
                           [xcursor], [Cursor themes support])

Olivier Fourdan's avatar
Olivier Fourdan committed
102 103 104 105 106 107 108
dnl ****************************************
dnl *** Optional support for Libxklavier ***
dnl ****************************************

XDT_CHECK_OPTIONAL_PACKAGE([LIBXKLAVIER], [libxklavier], [0.3.0],
                           [libxklavier], [Keyboard layout selection])

109 110 111 112 113 114 115 116
dnl make xsettings daemon optional
AC_ARG_ENABLE([xsettings-daemon],
              [AC_HELP_STRING([--disable-xsettings-daemon],
                              [Don't build the XSETTINGS daemon (default=yes)])],
              [build_xfsettingsd=$enableval],
              [build_xfsettingsd=yes])
AM_CONDITIONAL([BUILD_XFSETTINGSD], [test "x$build_xfsettingsd" = "xyes"])

117 118 119 120 121 122 123 124 125 126 127 128
dnl Camberra XSettings
AC_ARG_ENABLE([sound-settings],
              [AC_HELP_STRING([--enable-sound-settings],
                              [Enable sound XSETTINGS in GUI (from libcamberra) (default=no)])],
              [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)

129 130 131 132 133 134 135 136 137 138
dnl ***********************************
dnl *** Check for debugging support ***
dnl ***********************************
AC_ARG_ENABLE([debug],
AC_HELP_STRING([--enable-debug=@<:@no/minimum/yes/full@:>@], [Turn on debugging @<:@default=xfce4_settings_debug_default@:>@]),
  [], [enable_debug=xfce4_settings_debug_default])
AC_MSG_CHECKING([whether to enable debugging support])
if test x"$enable_debug" = x"full" -o x"$enable_debug" = x"yes"; then
  dnl Print the result
  AC_MSG_RESULT([$enable_debug])
139

Nick Schermer's avatar
Nick Schermer committed
140 141
  dnl Define debug for libxfce4util DBG macro
  AC_DEFINE([DEBUG], [1], [Define for debugging support])
142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223

  dnl Make sure we detect possible errors (if supported)
  save_CFLAGS="$CFLAGS"
  CFLAGS="$CFLAGS -Wall -Werror"
  AC_MSG_CHECKING([whether $CC accepts -Wall -Werror])
  AC_COMPILE_IFELSE(AC_LANG_SOURCE([int x;]), [
    AC_MSG_RESULT([yes])
    PLATFORM_CFLAGS="$PLATFORM_CFLAGS -Wall -Werror"
  ], [
    AC_MSG_RESULT([no])
  ])
  CFLAGS="$save_CFLAGS"

  dnl Paranoia for --enable-debug=full
  if test x"$enable_debug" = x"full"; then
    dnl Enable extensive debugging
    PLATFORM_CPPFLAGS="$PLATFORM_CPPFLAGS -DG_ENABLE_DEBUG"

    dnl Use -O0 -g3 if the compiler supports it
    save_CFLAGS="$CFLAGS"
    CFLAGS="$CFLAGS -O0 -g3"
    AC_MSG_CHECKING([whether $CC accepts -O0 -g3])
    AC_COMPILE_IFELSE(AC_LANG_SOURCE([int x;]), [
      AC_MSG_RESULT([yes])
      PLATFORM_CFLAGS="$PLATFORM_CFLAGS -O0 -g3"
    ], [
      AC_MSG_RESULT([no])
    ])
    CFLAGS="$save_CFLAGS"
  fi
else
  dnl Print the result
  AC_MSG_RESULT([$enable_debug])

  dnl Disable debugging (release build)
  PLATFORM_CPPFLAGS="$PLATFORM_CPPFLAGS -DNDEBUG"

  dnl Disable object cast checks
  PLATFORM_CPPFLAGS="$PLATFORM_CPPFLAGS -DG_DISABLE_CAST_CHECKS"

  dnl Disable all checks for --enable-debug=no
  if test x"$enable_debug" = x"no"; then
    PLATFORM_CPPFLAGS="$PLATFORM_CPPFLAGS -DG_DISABLE_ASSERT -DG_DISABLE_CHECKS"
  fi
fi

dnl **************************************
dnl *** Check for linker optimizations ***
dnl **************************************
AC_MSG_CHECKING([whether $LD accepts --as-needed])
case `$LD --as-needed -v 2>&1 </dev/null` in
*GNU* | *'with BFD'*)
  LDFLAGS="$LDFLAGS -Wl,--as-needed"
  AC_MSG_RESULT([yes])
  ;;
*)
  AC_MSG_RESULT([no])
  ;;
esac
AC_MSG_CHECKING([whether $LD accepts -O1])
case `$LD -O1 -v 2>&1 </dev/null` in
*GNU* | *'with BFD'*)
  PLATFORM_LDFLAGS="$PLATFORM_LDFLAGS -Wl,-O1"
  AC_MSG_RESULT([yes])
  ;;
*)
  AC_MSG_RESULT([no])
  ;;
esac

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])
224 225 226 227 228 229 230

AC_OUTPUT([
Makefile
po/Makefile.in
dialogs/Makefile
dialogs/appearance-settings/Makefile
dialogs/accessibility-settings/Makefile
231
dialogs/display-settings/Makefile
232 233 234
dialogs/keyboard-settings/Makefile
dialogs/mouse-settings/Makefile
xfce4-settings-helper/Makefile
235
xfce4-settings-manager/Makefile
236
xfce4-settings-editor/Makefile
237
xfsettingsd/Makefile
238 239
])

240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257
dnl ***************************
dnl *** Print configuration ***
dnl ***************************
echo
echo "Build Configuration:"
echo
echo "* Installation prefix:       $prefix"
echo "* Debug Support:             $enable_debug"
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
258 259 260 261 262
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
263 264 265 266 267
if test x"$LIBXKLAVIER_FOUND" = x"yes"; then
echo "* Libxklavier support:       yes"
else
echo "* Libxklavier support:       no"
fi
268
echo
269 270