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

dnl $Id$
dnl
dnl Copyright (c) 2002-2009
dnl         The Xfce development team. All rights reserved.
dnl

dnl ***************************
dnl *** Version information ***
dnl ***************************
m4_define([libxfcegui4_verinfo], [7:0:3])
m4_define([libxfce4kbd_private_verinfo], [5:0:0])
m4_define([libxfcegui4_version_major], [4])
m4_define([libxfcegui4_version_minor], [6])
m4_define([libxfcegui4_version_micro], [4])
m4_define([libxfcegui4_version_nano], [])   dnl leave this empty to have no nano version
m4_define([libxfcegui4_version_build], [d9429ab])
m4_define([libxfcegui4_version_tag], [])
m4_define([libxfcegui4_version], [libxfcegui4_version_major().libxfcegui4_version_minor().libxfcegui4_version_micro()ifelse(libxfcegui4_version_nano(), [], [], [.libxfcegui4_version_nano()])ifelse(libxfcegui4_version_tag(), [git], [libxfcegui4_version_tag()-libxfcegui4_version_build()], [libxfcegui4_version_tag()])])


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


dnl *******************************************
dnl *** Debugging support for GIT snapshots ***
dnl *******************************************
m4_define([libxfcegui4_debug_default], [ifelse(libxfcegui4_version_tag(), [git], [yes], [minimum])])

dnl ***************************
dnl *** Initialize autoconf ***
dnl ***************************
AC_COPYRIGHT([Copyright (c) 2002-2009
        The Xfce development team. All rights reserved.])
AC_INIT([libxfcegui4], [libxfcegui4_version], [xfce4-dev@xfce.org])
AC_PREREQ([2.50])
AC_REVISION([$Id$])

dnl ***************************
dnl *** Initialize automake ***
dnl ***************************
LIBXFCEGUI4_VERSION=libxfcegui4_version()
AM_INIT_AUTOMAKE([libxfcegui4], [$LIBXFCEGUI4_VERSION])
AM_CONFIG_HEADER([config.h])
AM_MAINTAINER_MODE

dnl *******************************************
dnl *** Libtool versioning from libxfcegui4 ***
dnl *******************************************
LIBXFCEGUI4_VERINFO=libxfcegui4_verinfo()
AC_SUBST([LIBXFCEGUI4_VERINFO])

dnl ***************************************************
dnl *** Libtool versioning from libxfce4kbd-private ***
dnl ***************************************************
LIBXFCE4KBD_PRIVATE_VERINFO=libxfce4kbd_private_verinfo()
AC_SUBST([LIBXFCE4KBD_PRIVATE_VERINFO])

dnl *********************************
dnl *** Subst libxfcegui4 version ***
dnl *********************************
LIBXFCEGUI4_VERSION_MAJOR=libxfcegui4_version_major()
LIBXFCEGUI4_VERSION_MINOR=libxfcegui4_version_minor()
LIBXFCEGUI4_VERSION_MICRO=libxfcegui4_version_micro()
AC_SUBST([LIBXFCEGUI4_VERSION_MAJOR])
AC_SUBST([LIBXFCEGUI4_VERSION_MINOR])
AC_SUBST([LIBXFCEGUI4_VERSION_MICRO])

dnl *******************************
dnl *** Check for UNIX variants ***
dnl *******************************
AC_AIX
AC_ISC_POSIX
AC_MINIX
AM_CONDITIONAL([HAVE_CYGWIN], [test "`uname | grep \"CYGWIN\"`" != ""])

dnl ********************************
dnl *** Check for basic programs ***
dnl ********************************
AC_PROG_CC()
AC_PROG_INSTALL()
AC_PROG_LIBTOOL()
AC_PROG_INTLTOOL([0.31], [no-xml])

dnl ************************************************
dnl *** Check for standard headers and functions ***
dnl ************************************************
AC_STDC_HEADERS()
AC_CHECK_HEADERS([fcntl.h limits.h stdarg.h stddef.h time.h varargs.h])
AC_CHECK_FUNCS([setsid])

dnl ******************************
dnl *** Check for i18n support ***
dnl ******************************
XDT_I18N([am ar ast be bn_IN ca cs cy da de dz el en_GB eo es et eu fa fi fr gl gu he hu hy id it ja ka ko ku lt lv mk mr nb nl pa pl pt_BR pt ro ru si sk sq sv ta tr ug uk ur_PK ur zh_CN 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([GTK], [gtk+-2.0], [2.10.0])
XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.6.0])

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.6.0])
fi
AM_CONDITIONAL([ENABLE_KEYBOARD_LIBRARY], [test "x$enable_keyboard_library" = "xyes"])

dnl ***********************************
dnl *** Check for optional packages ***
dnl ***********************************
XDT_CHECK_OPTIONAL_PACKAGE([LIBSTARTUP_NOTIFICATION],
                           [libstartup-notification-1.0],
                           [0.5], [startup-notification],
                           [startup notification library])


dnl glade/libglade integration -- libglade is required, as the xfce
dnl settings dialogs use glade to create XfceTitledDialogs.  libgladeui
dnl is for developers, and adds the widgets to the glade editor, and
dnl so is optional

XDT_CHECK_PACKAGE([LIBGLADE], [libglade-2.0], [2.0.0])
AC_ARG_WITH([libglade-module-path],
            [AC_HELP_STRING([--with-libglade-module-path=PATH],
                            [Specify where to install the libglade module (default=autodetect)])],
            [LIBGLADE_MODULE_DIR="$withval"],
            [LIBGLADE_MODULE_DIR="`$PKG_CONFIG libglade-2.0 --variable=moduledir`"])
AC_SUBST([LIBGLADE_MODULE_DIR])

XDT_CHECK_OPTIONAL_PACKAGE([GLADEUI], [gladeui-1.0], [3.0.0], [gladeui],
                           [glade interface designer integration])
AC_ARG_WITH([gladeui-data-root],
            [AC_HELP_STRING([--with-gladeui-data-root=PATH],
                            [Specify where to install glade designer data files (default=autodetect)])],
            [gladeui_data_root="$withval"])
AC_ARG_WITH([gladeui-module-path],
            [AC_HELP_STRING([--with-gladeui-module-path=PATH],
                            [Specify where to install glade designer modules (default=autodetect)])],
            [gladeui_module_path="$withval"])
if test "x$GLADEUI_FOUND" = "xyes"; then
    if test "x$gladeui_data_root" = "x"; then
        GLADEUI_CATALOG_DIR="`$PKG_CONFIG gladeui-1.0 --variable=catalogdir`"
        GLADEUI_PIXMAP_DIR="`$PKG_CONFIG gladeui-1.0 --variable=pixmapdir`"
    else
        GLADEUI_CATALOG_DIR="$gladeui_data_root/catalogs"
        GLADEUI_PIXMAP_DIR="$gladeui_data_root/pixmaps"
    fi

    if test "x$gladeui_module_path" = "x"; then
        GLADEUI_MODULE_DIR="`$PKG_CONFIG gladeui-1.0 --variable=moduledir`"
    else
        GLADEUI_MODULE_DIR="$gladeui_module_path"
    fi
    
    dnl this is retarded.  glade 3.4.0 changed the pixmap dir layout
    GLADEUI_MAJOR="`echo $GLADEUI_VERSION | cut -d. -f1`"
    GLADEUI_MINOR="`echo $GLADEUI_VERSION | cut -d. -f2`"
    if test $GLADEUI_MAJOR -gt 3 || test $GLADEUI_MAJOR -eq 3 -a $GLADEUI_MINOR -ge 4; then
        have_gladeui_pixmap_themes=yes
    fi
else
    GLADEUI_CATALOG_DIR=
    GLADEUI_PIXMAP_DIR=
    GLADEUI_MODULE_DIR=
fi
AC_SUBST(GLADEUI_CATALOG_DIR)
AC_SUBST(GLADEUI_PIXMAP_DIR)
AC_SUBST(GLADEUI_MODULE_DIR)
AM_CONDITIONAL([HAVE_GLADEUI], [test "x$GLADEUI_FOUND" = "xyes"])
AM_CONDITIONAL([HAVE_GLADEUI_PIXMAP_THEMES], [test "x$have_gladeui_pixmap_themes" = "xyes"])

dnl *************************
dnl *** Check for gtk-doc ***
dnl *************************
GTK_DOC_CHECK([1.0])
                                                                                
dnl ***********************************
dnl *** Check for debugging support ***
dnl ***********************************
AC_ARG_ENABLE([debug],
AC_HELP_STRING([--enable-debug=@<:@no/minimum/yes/full@:>@], [Turn on debugging @<:@default=libxfcegui4_debug_default@:>@]),
  [], [enable_debug=libxfcegui4_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 Check whether the compiler accepts the -errwarn=%all
  save_CFLAGS="$CFLAGS"
  CFLAGS="$CFLAGS -errwarn=%all"
  AC_MSG_CHECKING([whether $CC accepts -errwarn=%all])
  AC_COMPILE_IFELSE(AC_LANG_SOURCE([int x;]), [
    AC_MSG_RESULT([yes])
    PLATFORM_CFLAGS="$PLATFORM_CFLAGS -errwarn=%all"
  ], [
    AC_MSG_RESULT([no])
  ])
  CFLAGS="$save_CFLAGS"

  dnl Check whether the compiler accepts the -Werror
  save_CFLAGS="$CFLAGS"
  CFLAGS="$CFLAGS -Werror"
  AC_MSG_CHECKING([whether $CC accepts -Werror])
  AC_COMPILE_IFELSE(AC_LANG_SOURCE([int x;]), [
    AC_MSG_RESULT([yes])
    PLATFORM_CFLAGS="$PLATFORM_CFLAGS -Werror"
  ], [
    AC_MSG_RESULT([no])
  ])
  CFLAGS="$save_CFLAGS"

  dnl Check whether the compiler accepts the -Wall
  save_CFLAGS="$CFLAGS"
  CFLAGS="$CFLAGS -Wall"
  AC_MSG_CHECKING([whether $CC accepts -Wall])
  AC_COMPILE_IFELSE(AC_LANG_SOURCE([int x;]), [
    AC_MSG_RESULT([yes])
    PLATFORM_CFLAGS="$PLATFORM_CFLAGS -Wall"
  ], [
    AC_MSG_RESULT([no])
  ])
  CFLAGS="$save_CFLAGS"

  dnl Check whether the compiler accepts the -fno-strict-aliasing
  dnl switch, as certain packages - like Glib - still don't work
  dnl properly with newer compilers.
  save_CFLAGS="$CFLAGS"
  CFLAGS="$CFLAGS -fno-strict-aliasing"
  AC_MSG_CHECKING([whether $CC accepts -fno-strict-aliasing])
  AC_COMPILE_IFELSE(AC_LANG_SOURCE([int x;]), [
    AC_MSG_RESULT([yes])
    PLATFORM_CFLAGS="$PLATFORM_CFLAGS -fno-strict-aliasing"
  ], [
    AC_MSG_RESULT([no])
  ])
  CFLAGS="$save_CFLAGS"

  dnl Make sure we detect possible errors
  PLATFORM_CFLAGS="$PLATFORM_CFLAGS -Werror -Wall"

  dnl Paranoia for --enable-debug=full
  if test x"$enable_debug" = x"full"; then
    PLATFORM_CFLAGS="$PLATFORM_CFLAGS -O0 -g3"
    PLATFORM_CPPFLAGS="$PLATFORM_CPPFLAGS -DG_ENABLE_DEBUG"
  fi
else
  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
AC_MSG_RESULT([$enable_debug])

dnl **************************************
dnl *** Check for linker optimizations ***
dnl **************************************
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])

AC_OUTPUT([
Makefile
docs/version.xml
docs/Makefile
glade/Makefile
glade/16x16/Makefile
glade/22x22/Makefile
icons/Makefile
icons/48x48/Makefile
icons/scalable/Makefile
libxfce4kbd-private/libxfce4kbd-private-1.0.pc
libxfce4kbd-private/Makefile
libxfcegui4.spec
libxfcegui4/libxfcegui4-1.0.pc
libxfcegui4/libxfcegui4-config.h
libxfcegui4/Makefile
po/Makefile.in
])

dnl ***************************
dnl *** Print configuration ***
dnl ***************************
echo
echo "Build Configuration:"
echo
echo "* Installation prefix:       $prefix"
echo "* Debug Support:             $enable_debug"
echo "* Libglade module directory: $LIBGLADE_MODULE_DIR"
if test x"$GLADEUI_FOUND" = x"yes"; then
echo "* GladeUI support:           yes"
echo "* GladeUI module directory:  $GLADEUI_MODULE_DIR"
else
echo "* GladeUI support:           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
