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

dnl
dnl Copyright (c) 2004 - 2008 The Xfce development team
dnl
dnl 2005-2007 Jasper Huijsmans <jasper@xfce.org>
dnl 2006-2008 Nick Schermer <nick@xfce.org>
dnl

dnl ***************************
dnl *** Version information ***
dnl ***************************
m4_define([libxfce4panel_verinfo], [3:0:0]) dnl current:revision:age
m4_define([libxfce4panel_version_api], [1.0])
m4_define([xfce4_panel_version_major], [4])
m4_define([xfce4_panel_version_minor], [8])
m4_define([xfce4_panel_version_micro], [6])
m4_define([xfce4_panel_version_nano],  []) dnl leave this empty to have no nano version
m4_define([xfce4_panel_version_build], [fcf9d7a])
m4_define([xfce4_panel_version_tag],   [])
m4_define([xfce4_panel_version], [xfce4_panel_version_major().xfce4_panel_version_minor().xfce4_panel_version_micro()ifelse(xfce4_panel_version_nano(), [], [], [.xfce4_panel_version_nano()])ifelse(xfce4_panel_version_tag(), [git], [xfce4_panel_version_tag()-xfce4_panel_version_build()], [xfce4_panel_version_tag()])])

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

dnl ***************************
dnl *** Initialize autoconf ***
dnl ***************************
AC_COPYRIGHT([Copyright (c) 2002 - 2011
        The Xfce development team. All rights reserved.

Written for Xfce by Jasper Huijsmans <jasper@xfce.org>
and Nick Schermer <nick@xfce.org>.])
AC_INIT([xfce4-panel], [xfce4_panel_version], [http://bugzilla.xfce.org/], [xfce4-panel])
AC_PREREQ([2.50])
AC_REVISION([xfce4_panel_version_build])

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

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

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

dnl ********************************
dnl *** Check for basic programs ***
dnl ********************************
AC_PROG_CC()
AM_PROG_CC_C_O()
AC_PROG_LD()
AC_PROG_INSTALL()
AC_PROG_INTLTOOL()
AC_PROG_LIBTOOL()

dnl **************************
dnl *** Initialize libtool ***
dnl **************************
AC_DISABLE_STATIC()
AC_PROG_LIBTOOL()
AC_CHECK_PROGS([PERL], [perl5 perl])

dnl **************************************
dnl *** Substitute version information ***
dnl **************************************
LIBXFCE4PANEL_VERINFO=libxfce4panel_verinfo()
AC_SUBST([LIBXFCE4PANEL_VERINFO])

dnl **************************
dnl *** Substitute version ***
dnl **************************
LIBXFCE4PANEL_VERSION=xfce4_panel_version()
LIBXFCE4PANEL_VERSION_API=libxfce4panel_version_api()
LIBXFCE4PANEL_VERSION_MAJOR=xfce4_panel_version_major()
LIBXFCE4PANEL_VERSION_MINOR=xfce4_panel_version_minor()
LIBXFCE4PANEL_VERSION_MICRO=xfce4_panel_version_micro()
AC_SUBST([LIBXFCE4PANEL_VERSION])
AC_SUBST([LIBXFCE4PANEL_VERSION_API])
AC_SUBST([LIBXFCE4PANEL_VERSION_MAJOR])
AC_SUBST([LIBXFCE4PANEL_VERSION_MINOR])
AC_SUBST([LIBXFCE4PANEL_VERSION_MICRO])

dnl **********************************
dnl *** Check for standard headers ***
dnl **********************************
AC_HEADER_STDC()
AC_CHECK_HEADERS([stdlib.h unistd.h locale.h stdio.h errno.h time.h string.h \
                  math.h sys/types.h sys/wait.h memory.h signal.h sys/prctl.h \
                  libintl.h])
AC_CHECK_FUNCS([bind_textdomain_codeset])

dnl ******************************
dnl *** Check for i18n support ***
dnl ******************************
XDT_I18N([am ar ast az be bg bn_IN bn ca cs da de dz el en_GB eo es_MX es et eu fa fi fr gl gu he hi hr hu hy id is it ja ka kk ko ku lt lv mk mr ms nb nl pa pl pt_BR pt ro ru si sk sq sv ta te tr ug uk ur_PK ur vi zh_CN zh_TW ])

dnl *******************************
dnl *** Check for X11 installed ***
dnl *******************************
XDT_CHECK_LIBX11_REQUIRE()

dnl ***********************************
dnl *** Check for required packages ***
dnl ***********************************
XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.8.0])
XDT_CHECK_PACKAGE([GARCON], [garcon-1], [0.1.5])
XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1], [4.8.0])
XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [4.8.0])
XDT_CHECK_PACKAGE([EXO], [exo-1], [0.6.0])
XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.14.0])
XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.18.0])
XDT_CHECK_PACKAGE([GIO], [gio-2.0], [2.18.0])
XDT_CHECK_PACKAGE([GMODULE], [gmodule-2.0], [2.18.0])
XDT_CHECK_PACKAGE([DBUS], [dbus-glib-1], [0.73])
XDT_CHECK_PACKAGE([CAIRO], [cairo], [1.0.0])
XDT_CHECK_PACKAGE([LIBWNCK], [libwnck-1.0], [2.22])

dnl **********************************
dnl *** Optional GIO UNIX features ***
dnl **********************************
XDT_CHECK_OPTIONAL_PACKAGE([GIO_UNIX], [gio-unix-2.0],
                           [2.18.0], [gio-unix], [GIO UNIX features])

dnl ***************************************************
dnl *** Check if we need to build the documentation ***
dnl ***************************************************
AC_ARG_ENABLE([gen-doc], [AC_HELP_STRING([--enable-gen-doc], 
              [Generate HTML documentation (requires gnome-doc-utils) [default=no]])],,
              [enable_gen_doc=no])
if test x"$enable_gen_doc" = x"yes"; then
  XDT_CHECK_PACKAGE([GNOME_DOC_UTILS], [gnome-doc-utils], [0.19.2],
  [
    AC_PATH_PROG([XML2PO], [xml2po], [no])
    if test x"$XML2PO" = x"no"; then
        enable_gen_doc=no
    fi

    AC_PATH_PROG([GNOME_DOC_TOOL], [gnome-doc-tool], [no])
    if test x"$GNOME_DOC_TOOL" = x"no"; then
        enable_gen_doc=no
    fi
  ],
  [
    enable_gen_doc=no
  ])

  if test x"$enable_gen_doc" = x"no"; then
    AC_MSG_ERROR([Compiling with --enable-gen-doc but no suitable gnome-doc-utils found.])
  fi
fi
AM_CONDITIONAL([GENERATE_DOCUMENTATION], [test x"$enable_gen_doc" = x"yes"])

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

dnl ***********************************
dnl *** Check for debugging support ***
dnl ***********************************
XDT_FEATURE_DEBUG([panel_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=yes])
have_gnuc_visibility=no
if test x"$enable_visibility" != x"no"; then
  dnl Check whether the compiler supports the visibility attribute
  save_CFLAGS="$CFLAGS"
  CFLAGS="$CFLAGS -Wall -Werror"
  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="$save_CFLAGS"
fi
if test x"$have_gnuc_visibility" = x"yes"; then
  CPPFLAGS="$CPPFLAGS -DHAVE_GNUC_VISIBILITY"
fi
AM_CONDITIONAL([HAVE_GNUC_VISIBILITY], [test x"$have_gnuc_visibility" = x"yes"])

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

AC_OUTPUT([
Makefile
common/Makefile
docs/Makefile
docs/manual/Makefile
docs/manual/figures/Makefile
docs/manual/po/Makefile
docs/references/Makefile
docs/references/version.xml
icons/Makefile
icons/16x16/Makefile
icons/22x22/Makefile
icons/24x24/Makefile
icons/32x32/Makefile
icons/48x48/Makefile
icons/scalable/Makefile
libxfce4panel/Makefile
libxfce4panel/libxfce4panel-1.0.pc
libxfce4panel/libxfce4panel-config.h
migrate/Makefile
panel/Makefile
wrapper/Makefile
plugins/Makefile
plugins/actions/Makefile
plugins/applicationsmenu/Makefile
plugins/clock/Makefile
plugins/directorymenu/Makefile
plugins/launcher/Makefile
plugins/pager/Makefile
plugins/separator/Makefile
plugins/showdesktop/Makefile
plugins/systray/Makefile
plugins/tasklist/Makefile
plugins/windowmenu/Makefile
po/Makefile.in
])

dnl ***************************
dnl *** Print configuration ***
dnl ***************************
echo
echo "Build Configuration:"
echo
echo "* Debug Support:          $enable_debug"
echo "* GNU Visibility:         $have_gnuc_visibility"
if test x"$enable_gen_doc" = x"yes"; then
echo "* Documentation:          yes (generate)"
elif test -d "${srcdir}/docs/manual/html"; then
echo "* Documentation:          yes (in tarball)"
else
echo "* Documentation:          no"
fi
echo
