dnl
dnl This file was autogenerated from "configure.ac.in".
dnl Edit that file instead!
dnl

dnl
dnl Copyright (c) 2007-2015 The Xfce development team
dnl

dnl ***************************
dnl *** Version information ***
dnl ***************************
m4_define([libxfce4ui_verinfo], [0:0:0])
m4_define([libxfce4ui_version_api], [1])
m4_define([libxfce4ui_version_major], [4])
m4_define([libxfce4ui_version_minor], [12])
m4_define([libxfce4ui_version_micro], [1])
m4_define([libxfce4ui_version_nano], []) dnl leave this empty to have no nano version
m4_define([libxfce4ui_version_build], [1964cb1])
m4_define([libxfce4ui_version_tag], [])
m4_define([libxfce4ui_version], [libxfce4ui_version_major().libxfce4ui_version_minor().libxfce4ui_version_micro()ifelse(libxfce4ui_version_nano(), [], [], [.libxfce4ui_version_nano()])ifelse(libxfce4ui_version_tag(), [git], [libxfce4ui_version_tag()-libxfce4ui_version_build()], [libxfce4ui_version_tag()])])

m4_define([libxfce4kbd_private_verinfo], [0:0:0])
m4_define([libxfce4kbd_private_version_api], [2])

dnl # DO NOT MODIFY ANYTHING BELOW THIS LINE, UNLESS YOU KNOW WHAT
dnl # YOU ARE DOING.


dnl ********************************************
dnl *** Full debug support for GIT snapshots ***
dnl ********************************************
m4_define([libxfce4ui_debug_default], [ifelse(libxfce4ui_version_tag(), [git], [full], [minimum])])

dnl ***************************
dnl *** Initialize autoconf ***
dnl ***************************
AC_COPYRIGHT([Copyright (c) 2007-2015 The Xfce development team])
AC_INIT([libxfce4ui], [libxfce4ui_version], [http://bugzilla.xfce.org/], [libxfce4ui])
AC_PREREQ([2.60])
AC_CONFIG_MACRO_DIR([m4])
AC_REVISION([libxfce4ui_version_build])
AC_CANONICAL_TARGET()

dnl ***************************
dnl *** Initialize automake ***
dnl ***************************
AM_INIT_AUTOMAKE([1.11 dist-bzip2 tar-ustar no-dist-gzip])
AC_CONFIG_HEADERS([config.h])
AM_MAINTAINER_MODE()
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])

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

AC_MSG_CHECKING([platform])
case "$host" in
  *-*-mingw*|*-*-cygwin*)
    platform="win32"
    NO_UNDEFINED=-no-undefined
    ;;
  *-apple-darwin*)
    platform="os x"
    ;;
  *)
    platform="unix"
    ;;
esac
AM_CONDITIONAL(PLATFORM_WIN32, test "$platform" = "win32")
AM_CONDITIONAL(PLATFORM_OSX, test "$platform" = "os x")
AC_SUBST(NO_UNDEFINED)

dnl ********************************
dnl *** Check for basic programs ***
dnl ********************************
AC_PROG_CC()
AC_PROG_LD()
AM_PROG_CC_C_O()
AC_PROG_INSTALL()
IT_PROG_INTLTOOL([0.35.0])
AC_CHECK_PROGS([PERL], [perl5 perl])

dnl **************************
dnl *** Initialize libtool ***
dnl **************************
LT_PREREQ([2.4])
LT_INIT([disable-static])

dnl **************************************
dnl *** Substitute version information ***
dnl **************************************
LIBXFCE4UI_VERINFO=libxfce4ui_verinfo()
LIBXFCE4UI_VERSION_API=libxfce4ui_version_api()
LIBXFCE4UI_VERSION_MAJOR=libxfce4ui_version_major()
LIBXFCE4UI_VERSION_MINOR=libxfce4ui_version_minor()
LIBXFCE4UI_VERSION_MICRO=libxfce4ui_version_micro()
LIBXFCE4KBD_PRIVATE_VERINFO=libxfce4kbd_private_verinfo()
LIBXFCE4KBD_PRIVATE_VERSION_API=libxfce4kbd_private_version_api()
AC_SUBST([LIBXFCE4UI_VERINFO])
AC_SUBST([LIBXFCE4UI_VERSION_API])
AC_SUBST([LIBXFCE4UI_VERSION_MAJOR])
AC_SUBST([LIBXFCE4UI_VERSION_MINOR])
AC_SUBST([LIBXFCE4UI_VERSION_MICRO])
AC_SUBST([LIBXFCE4KBD_PRIVATE_VERINFO])
AC_SUBST([LIBXFCE4KBD_PRIVATE_VERSION_API])

dnl ***************************************
dnl *** Check for standard header files ***
dnl ***************************************
AC_HEADER_STDC()
AC_CHECK_HEADERS([crt_externs.h errno.h fcntl.h limits.h locale.h math.h \
                  memory.h signal.h stdarg.h stdlib.h string.h unistd.h])
AC_CHECK_DECLS([environ])
AC_CHECK_FUNCS([_NSGetEnviron])

dnl ******************************
dnl *** Check for i18n support ***
dnl ******************************
XDT_I18N([am ar ast bg bn ca cs da de el en_AU en_GB es eu fi fr gl he hr hu id is it ja kk ko lt lv ms nb nl nn oc pa pl pt_BR pt ro ru si sk sl sr sv te th tr ug uk ur_PK ur vi zh_CN zh_HK zh_TW ])

dnl *******************************************
dnl *** Check for X Window System installed ***
dnl *******************************************
XDT_CHECK_LIBX11_REQUIRE()
XDT_CHECK_LIBSM()

dnl ***********************************
dnl *** Check for required packages ***
dnl ***********************************
XDT_CHECK_PACKAGE([GOBJECT], [gobject-2.0], [2.30.0])
XDT_CHECK_PACKAGE([GTK2], [gtk+-2.0], [2.24.0])
XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.12.0])

dnl ***********************************************************
dnl *** Optional support for a GTK+3 version of the library ***
dnl ***********************************************************
XDT_CHECK_OPTIONAL_PACKAGE([GTK3],
                           [gtk+-3.0], [3.2.0], [gtk3],
                           [GTK+ 3 support])
AM_CONDITIONAL([ENABLE_GTK3_LIBRARY], [test "x$GTK3_FOUND" = "xyes"])

dnl *************************************************
dnl *** Optional support for startup notification ***
dnl *************************************************
XDT_CHECK_OPTIONAL_PACKAGE([LIBSTARTUP_NOTIFICATION],
                           [libstartup-notification-1.0],
                           [0.4], [startup-notification],
                           [startup notification library])

dnl **************************************************
dnl *** Check whether to build the keyboard libary ***
dnl **************************************************
AC_ARG_ENABLE([keyboard-library],
              [AC_HELP_STRING([--disable-keyboard-library],
                              [Do not compile the keyboard library needed by xfwm4 and xfce4-settings (default=enabled)])],
              [enable_keyboard_library=$enableval], [enable_keyboard_library=yes])
if test "x$enable_keyboard_library" = "xyes"; then
  XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [4.12.0])
fi
AM_CONDITIONAL([ENABLE_KEYBOARD_LIBRARY], [test "x$enable_keyboard_library" = "xyes"])

dnl *********************************************
dnl *** Check for vendor specific information ***
dnl *********************************************
AC_MSG_CHECKING([for additional vendor name and/or info])
AC_ARG_WITH([vendor-info],
AC_HELP_STRING([--with-vendor-info=NAME], [Specify an additional vendor name, optionally with a file in $prefix/share/xfce4/venderinfo]),
    [with_vendor_info="$withval"], [with_vendor_info=""])
if test x"$with_vendor_info" != x""; then
    AC_DEFINE_UNQUOTED([VENDOR_INFO], ["$with_vendor_info"], [Additional vendor name and/or info])
    AC_MSG_RESULT([$vendorinfo])
else
    AC_MSG_RESULT([not set])
fi

dnl *********************************************
dnl *** Check for vendor specific information ***
dnl *********************************************
AC_MSG_CHECKING([for a custom manual website location])
AC_ARG_WITH([manual-website],
AC_HELP_STRING([--with-manual-website=URI], [Specify an optional manual website, defaults to http://docs.xfce.org.]),
    [with_manual_website="$withval"],
    [with_manual_website="http://docs.xfce.org/help.php"])
AC_DEFINE_UNQUOTED([MANUAL_WEBSITE], ["$with_manual_website"], [Documentation website])
AC_MSG_RESULT([$with_manual_website])

dnl *********************************************************
dnl *** Optional support for the Glade Interface Designer ***
dnl *********************************************************
XDT_CHECK_OPTIONAL_PACKAGE([GLADEUI], [gladeui-1.0],
                           [3.5.0], [gladeui], [glade interface designer])
AC_ARG_WITH([gladeui-catalogdir],
            [AC_HELP_STRING([--with-gladeui-catalogdir=PATH],
                            [Specify where to install glade designer catalog files (default=autodetect)])],
            [gladeui_catalogdir="$withval"])
AC_ARG_WITH([gladeui-moduledir],
            [AC_HELP_STRING([--with-gladeui-moduledir=PATH],
                            [Specify where to install glade designer modules (default=autodetect)])],
            [gladeui_moduledir="$withval"])
AC_ARG_WITH([gladeui-pixmapdir],
            [AC_HELP_STRING([--with-gladeui-pixmapdir=PATH],
                            [Specify where to install glade designer pixmaps (default=autodetect)])],
            [gladeui_pixmapdir="$withval"])
if test x"$GLADEUI_FOUND" = x"yes"; then
  if test x"$gladeui_catalogdir" = x""; then
    GLADEUI_CATALOGDIR=`$PKG_CONFIG "--variable=catalogdir" "gladeui-1.0"`
  else
    GLADEUI_CATALOGDIR="$gladeui_catalogdir"
  fi
  if test x"$gladeui_moduledir" = x""; then
    GLADEUI_MODULEDIR=`$PKG_CONFIG "--variable=moduledir" "gladeui-1.0"`
  else
    GLADEUI_MODULEDIR="$gladeui_moduledir"
  fi
  if test x"$gladeui_pixmapdir" = x""; then
    GLADEUI_PIXMAPDIR=`$PKG_CONFIG "--variable=pixmapdir" "gladeui-1.0"`
  else
    GLADEUI_PIXMAPDIR="$gladeui_pixmapdir"
  fi
fi
AC_SUBST([GLADEUI_CATALOGDIR])
AC_SUBST([GLADEUI_MODULEDIR])
AC_SUBST([GLADEUI_PIXMAPDIR])

dnl *************************
dnl *** Check for gtk-doc ***
dnl *************************
GTK_DOC_CHECK([1.0])

dnl ***********************************
dnl *** Check for debugging support ***
dnl ***********************************
XDT_FEATURE_DEBUG([libxfce4ui_debug_default])

dnl **************************************
dnl *** Check for linker optimizations ***
dnl **************************************
XDT_FEATURE_LINKER_OPTS()

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=$enableval], [enable_visibility=yes])
have_gnuc_visibility=no
if test "x$enable_visibility" != "xno"; then
  XDT_SUPPORTED_FLAGS([xdt_vis_test_cflags], [-Wall -Werror -Wno-unused-parameter])
  saved_CFLAGS="$CFLAGS"
  CFLAGS="$CFLAGS $xdt_vis_test_cflags"
  AC_MSG_CHECKING([whether $CC supports the GNUC visibility attribute])
  AC_COMPILE_IFELSE([AC_LANG_SOURCE(
  [
    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;
    }
  ])],
  [
    have_gnuc_visibility=yes
    AC_MSG_RESULT([yes])
  ],
  [
    AC_MSG_RESULT([no])
  ])
  CFLAGS="$saved_CFLAGS"
fi
if test "x$have_gnuc_visibility" = "xyes"; then
  CPPFLAGS="$CPPFLAGS -DHAVE_GNUC_VISIBILITY"
fi
AM_CONDITIONAL([HAVE_GNUC_VISIBILITY], [test "x$have_gnuc_visibility" = "xyes"])

dnl *************************************
dnl *** Compensate for broken gtk-doc ***
dnl *************************************
XDT_SUPPORTED_FLAGS([GTK_DOC_EXTRA_CFLAGS], [-Wno-sign-compare])
AC_SUBST([GTK_DOC_EXTRA_CFLAGS])

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])

dnl *****************************
dnl *** Generate output files ***
dnl *****************************
AC_OUTPUT([
Makefile
docs/Makefile
docs/version.xml
glade/Makefile
glade/icons/Makefile
glade/icons/16x16/Makefile
glade/icons/22x22/Makefile
icons/Makefile
icons/48x48/Makefile
libxfce4kbd-private/libxfce4kbd-private-2.pc
libxfce4kbd-private/libxfce4kbd-private-3.pc
libxfce4kbd-private/Makefile
libxfce4ui/libxfce4ui-1.pc
libxfce4ui/libxfce4ui-2.pc
libxfce4ui/libxfce4ui-config.h
libxfce4ui/Makefile
xfce4-about/Makefile
po/Makefile.in
])

dnl ***************************
dnl *** Print configuration ***
dnl ***************************
echo
echo "Build Configuration:"
echo
if test x"$GLADEUI_FOUND" = x"yes"; then
echo "* Glade Interface Designer:  yes"
echo "  - Catalog directory:       $GLADEUI_CATALOGDIR"
echo "  - Module directory:        $GLADEUI_MODULEDIR"
echo "  - Pixmap directory:        $GLADEUI_PIXMAPDIR"
else
echo "* Glade Interface Designer:  no"
fi
if test x"$enable_keyboard_library" = x"yes"; then
echo "* Keyboard library support:  yes"
else
echo "* Keyboard library support:  no"
fi
if test x"$LIBSTARTUP_NOTIFICATION_FOUND" = x"yes"; then
echo "* Startup notification:      yes"
else
echo "* Startup notification:      no"
fi
if test x"$LIBSM_LIBS" = x""; then
echo "* X11 session management:    no"
else
echo "* X11 session management:    yes"
fi
echo "* Debug support:             $enable_debug"
echo "* GNU Visibility:            $have_gnuc_visibility"
if test -n "$with_vendor_info"; then
echo "* Vendor:                    $with_vendor_info"
echo
echo "Note you can put additional info about the vendor"
echo "in this text file: \"${datarootdir}/xfce4/vendorinfo\""
else
echo "* Vendor:                    none"
fi
echo "* Manual website:            $with_manual_website"
echo
