Files
xfce4-taskmanager/configure.ac.in
2017-01-26 22:55:30 +01:00

171 lines
5.7 KiB
Plaintext

dnl
dnl xfce4-taskmanager - A small taskmanager based on the Xfce 4 libraries.
dnl
dnl 2010 Mike Massonnet <mmassonnet@xfce.org>
dnl 2005-2007 Johannes Zellner <webmaster@nebulon.de>
dnl ***************************
dnl *** Version information ***
dnl ***************************
m4_define([taskmanager_version_major], [1])
m4_define([taskmanager_version_minor], [1])
m4_define([taskmanager_version_micro], [1])
m4_define([taskmanager_version_build], [@REVISION@])
m4_define([taskmanager_version_tag], [git])
m4_define([taskmanager_version], [taskmanager_version_major().taskmanager_version_minor().taskmanager_version_micro()ifelse(taskmanager_version_tag(), [git], [taskmanager_version_tag()-taskmanager_version_build()], [taskmanager_version_tag()])])
dnl ***************************
dnl *** Initialize autoconf ***
dnl ***************************
AC_COPYRIGHT([Copyright (c) 2006-2008
The Xfce development team. All rights reserved.])
AC_INIT([Xfce4 Taskmanager], [taskmanager_version], [http://bugzilla.xfce.org/], [xfce4-taskmanager],
[http://goodies.xfce.org/projects/applications/xfce4-taskmanager])
AC_PREREQ([2.60])
AC_CONFIG_MACRO_DIR([m4])
AC_CANONICAL_TARGET()
AC_REVISION([taskmanager_version_build])
dnl ***************************
dnl *** Initialize automake ***
dnl ***************************
AM_INIT_AUTOMAKE([1.8 no-dist-gzip dist-bzip2])
AM_CONFIG_HEADER([config.h])
AM_MAINTAINER_MODE()
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
LT_PREREQ([2.2.6])
LT_INIT([disable-static])
dnl ********************************
dnl *** Check for basic programs ***
dnl ********************************
AC_PROG_CC()
AM_PROG_CC_C_O()
AC_PROG_LD()
AC_PROG_INSTALL()
AC_PROG_INTLTOOL()
dnl ************************************
dnl *** Checks for library functions ***
dnl ************************************
AC_C_CONST()
dnl **********************************
dnl *** Check for standard headers ***
dnl **********************************
AC_HEADER_STDC()
AC_CHECK_HEADERS([stdlib.h string.h])
dnl ******************************
dnl *** Check for i18n support ***
dnl ******************************
XDT_I18N([@LINGUAS@])
dnl ***********************************
dnl *** Check for required packages ***
dnl ***********************************
XDT_CHECK_LIBX11_REQUIRE()
XDT_CHECK_PACKAGE([LIBXMU], [xmu], [1.1.2])
XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.14.0])
XDT_CHECK_PACKAGE([CAIRO], [cairo], [1.5.0])
dnl ***********************************
dnl *** Check for optional packages ***
dnl ***********************************
XDT_CHECK_OPTIONAL_PACKAGE([GTK3],
[gtk+-3.0], [3.2.0], [gtk3],
[GTK+ 3 support], [no])
AM_CONDITIONAL([USE_GTK3], [test "x$GTK3_FOUND" = "xyes"])
if test "x$GTK3_FOUND" = "xyes"; then
XDT_CHECK_OPTIONAL_PACKAGE([WNCK], [libwnck-3.0], [3.2], [wnck3], [building with libwnck3 for window icons/names], [yes])
else
XDT_CHECK_OPTIONAL_PACKAGE([WNCK], [libwnck-1.0], [2.0], [wnck], [building with libwnck for window icons/names], [yes])
XDT_CHECK_OPTIONAL_PACKAGE([GKSU], [libgksu2], [2.0], [gksu], [building with libgksu to run as root], [yes])
fi
AM_CONDITIONAL([HAVE_WNCK], [test x"$WNCK_FOUND" = x"yes"])
AM_CONDITIONAL([HAVE_GKSU], [test x"$GKSU_FOUND" = x"yes"])
dnl ***********************************
dnl ********** Check for skel *********
dnl ***********************************
AC_ARG_WITH([skel],
AC_HELP_STRING([--with-skel], [build with task-manager-skel.c]),
[ac_skel="$withval"],
[ac_skel=no])
dnl ***********************************
dnl ******* Check for OS family *******
dnl ***********************************
if test x"$ac_skel" = x"yes"; then
ac_os_implementation="skel"
else
case "$target_os" in
freebsd*)
ac_os_implementation="freebsd"
AC_CHECK_LIB([kvm], [kvm_openfiles])
AC_CHECK_HEADERS([fcntl.h kvm.h paths.h pwd.h sys/param.h sys/proc.h \
sys/sysctl.h sys/types.h sys/user.h unistd.h])
;;
dragonfly*|netbsd*|openbsd*|darwin*)
ac_os_implementation="bsd"
AC_CHECK_HEADERS([err.h pwd.h stdlib.h string.h sys/param.h sys/sched.h \
sys/swap.h sys/sysctl.h sys/types.h unistd.h])
;;
solaris*)
ac_os_implementation="solaris"
AC_CHECK_LIB([kstat], [kstat_open])
AC_CHECK_HEADERS([fcntl.h kstat.h procfs.h pwd.h stdlib.h string.h \
sys/procfs.h sys/stat.h sys/swap.h sys/types.h])
;;
linux*)
ac_os_implementation="linux"
AC_CHECK_HEADERS([pwd.h signal.h stdio.h string.h sys/resource.h \
sys/stat.h sys/types.h unistd.h])
;;
*)
AC_MSG_CHECKING([for OS implementation])
AC_MSG_ERROR([no OS implementation for $target_os is available])
;;
esac
fi
AC_MSG_CHECKING([for OS implementation])
AC_MSG_RESULT([$ac_os_implementation])
AM_CONDITIONAL([OS_FREEBSD], [test x"$ac_os_implementation" = x"freebsd"])
AM_CONDITIONAL([OS_BSD], [test x"$ac_os_implementation" = x"bsd"])
AM_CONDITIONAL([OS_SOLARIS], [test x"$ac_os_implementation" = x"solaris"])
AM_CONDITIONAL([OS_LINUX], [test x"$ac_os_implementation" = x"linux"])
AM_CONDITIONAL([OS_SKEL], [test x"$ac_os_implementation" = x"skel"])
dnl ***********************************
dnl *** Check for debugging support ***
dnl ***********************************
XDT_FEATURE_DEBUG()
dnl ***************
dnl *** Outputs ***
dnl ***************
AC_OUTPUT([
Makefile
src/Makefile
po/Makefile.in
])
dnl ***************************
dnl *** Print configuration ***
dnl ***************************
echo
echo "Build Configuration:"
echo
echo "* Gksu: ${GKSU_VERSION:-no}"
echo "* Wnck: ${WNCK_VERSION:-no}"
echo "* Cairo: ${CAIRO_VERSION}"
if test "x$GTK3_FOUND" = "xyes" ; then
echo "* GTK+: ${GTK3_VERSION}"
else
echo "* GTK+: ${GTK_VERSION}"
fi
echo "* Target OS: $target_os ($ac_os_implementation)"
echo "* Debug: $enable_debug"
echo