Skip to content
Snippets Groups Projects
configure.in 4.91 KiB
Newer Older
Olivier Fourdan's avatar
Olivier Fourdan committed
AC_INIT(src/main.c)
VERSION=`date +%y%m%d`
AM_INIT_AUTOMAKE(xfwm4, $VERSION)
Olivier Fourdan's avatar
Olivier Fourdan committed

AM_CONFIG_HEADER(config.h)
AM_MAINTAINER_MODE
Olivier Fourdan's avatar
Olivier Fourdan committed
AC_DISABLE_STATIC
AC_PROG_LIBTOOL
# Honor aclocal flags
ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"

GETTEXT_PACKAGE=xfwm4
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Name of default gettext domain])

ALL_LINGUAS="ar de es es_MX fi fr nl pl zh_CN"
AM_GLIB_GNU_GETTEXT

Olivier Fourdan's avatar
Olivier Fourdan committed
AC_PROG_CC
AC_PROG_INSTALL

AC_C_INLINE
AC_C_CONST

AC_PATH_XTRA
AC_HEADER_STDC
AC_CHECK_HEADERS(stdlib.h string.h unistd.h)

AC_CHECK_LIB(X11, main,, AC_MSG_ERROR([libX11 is missing from your system: Make sure you have both the  X Window System libraries and development headers correctly installed]), $X_CFLAGS $X_PRE_LIBS $X_EXTRA_LIBS $X_LIBS)
AC_CHECK_LIB(Xext, main,, AC_MSG_ERROR([The X Window System installed on this machine does not support the shape extension]), $X_CFLAGS $X_PRE_LIBS $X_EXTRA_LIBS $X_LIBS)
AC_CHECK_LIB(Xpm, main,, AC_MSG_ERROR([libXpm is missing from your system: Make sure you have both the Xpm libraries and development headers correctly installed]), $X_CFLAGS $X_PRE_LIBS $X_EXTRA_LIBS $X_LIBS)

AC_CHECK_FUNCS(malloc setlocale strchr strdup strrchr strstr)

AC_ARG_ENABLE(debug, [  --enable-debug	use this option if you want to debug xfwm4], [ AC_DEFINE(DEBUG, 1, [Define to 1 for debug.]) ],)

Olivier Fourdan's avatar
Olivier Fourdan committed
## Versions of dependencies
GLIB_REQUIRED_VERSION=2.0.0
GTK_REQUIRED_VERSION=2.0.0
PANGO_REQUIRED_VERSION=1.0.0
LIBXFCEGUI4_REQUIRED_VERSION=0.0.14
LIBXFCE4MCS_REQUIRED_VERSION=0.0.3
STARTUP_NOTIFICATION_VERSION=0.4
Olivier Fourdan's avatar
Olivier Fourdan committed

AC_DEFINE_UNQUOTED(GLIB_REQUIRED_VERSION, $GLIB_REQUIRED_VERSION, [Define glib required version.])
AC_DEFINE_UNQUOTED(GTK_REQUIRED_VERSION, $GTK_REQUIRED_VERSION, [Define gtk required version.])
AC_DEFINE_UNQUOTED(PANGO_REQUIRED_VERSION, $PANGO_REQUIRED_VERSION, [Define pango required version.])
AC_DEFINE_UNQUOTED(LIBXFCEGUI4_REQUIRED_VERSION, $LIBXFCEGUI4_REQUIRED_VERSION, [Define libxfcegui4 required version.])
AC_DEFINE_UNQUOTED(LIBXFCE4MCS_REQUIRED_VERSION, $LIBXFCE4MCS_REQUIRED_VERSION, [Define libxfce4mcs required version.])

AC_SUBST(GLIB_REQUIRED_VERSION)
AC_SUBST(GTK_REQUIRED_VERSION)
AC_SUBST(PANGO_REQUIRED_VERSION)
AC_SUBST(LIBXFCEGUI4_REQUIRED_VERSION)
AC_SUBST(LIBXFCE4MCS_REQUIRED_VERSION)

PKG_CHECK_MODULES(BASE_DEPENDENCIES, glib-2.0 >= $GLIB_REQUIRED_VERSION gtk+-2.0 >= $GTK_REQUIRED_VERSION pango >= $PANGO_REQUIRED_VERSION libxfcegui4-1.0 >= $LIBXFCEGUI4_REQUIRED_VERSION)
PKG_CHECK_MODULES(MCS_CLIENT,  libxfce4mcs-client-1.0 >= $LIBXFCE4MCS_REQUIRED_VERSION)
PKG_CHECK_MODULES(MCS_MANAGER, libxfce4mcs-manager-1.0 >= $LIBXFCE4MCS_REQUIRED_VERSION)
PKG_CHECK_MODULES(XFCE_MCS_MANAGER, xfce-mcs-manager = 1)
AC_MSG_CHECKING([Startup notification library >= $STARTUP_NOTIFICATION_VERSION])

if $PKG_CONFIG --atleast-version $STARTUP_NOTIFICATION_VERSION libstartup-notification-1.0; then
    have_startup_notification=yes
else
    have_startup_notification=no
fi
AC_MSG_RESULT($have_startup_notification)

if test x$have_startup_notification = xyes; then
    AC_DEFINE(HAVE_STARTUP_NOTIFICATION, 1, [Define startup notification support])
    PKG_CHECK_MODULES(STARTUP_NOTIFICATION, libstartup-notification-1.0 >= $STARTUP_NOTIFICATION_VERSION)
fi

AC_PATH_PROG(GDK_PIXBUF_CSOURCE, gdk-pixbuf-csource, no)

if test x"$GDK_PIXBUF_CSOURCE" = xno; then
  AC_MSG_ERROR([gdk-pixbuf-csource executable not found in your path - should be installed with GTK])
fi

AC_SUBST(GDK_PIXBUF_CSOURCE)
Olivier Fourdan's avatar
Olivier Fourdan committed

AC_OUTPUT([ 
Olivier Fourdan's avatar
Olivier Fourdan committed
po/Makefile.in 
common/Makefile
themes/adept/Makefile
themes/atlanta/Makefile
themes/atlanta2/Makefile
Olivier Fourdan's avatar
Olivier Fourdan committed
themes/b5/Makefile
themes/beastie/Makefile
Olivier Fourdan's avatar
Olivier Fourdan committed
themes/biz/Makefile
Olivier Fourdan's avatar
Olivier Fourdan committed
themes/curve/Makefile
themes/default.keys/Makefile
themes/eazel-blue/Makefile
themes/elberg/Makefile
Olivier Fourdan's avatar
Olivier Fourdan committed
themes/fbx/Makefile
Olivier Fourdan's avatar
Olivier Fourdan committed
themes/gaudy/Makefile
themes/gnububble/Makefile
themes/iceg/Makefile
themes/keramik/Makefile
themes/meenee/Makefile
themes/microdeck2/Makefile
themes/microgui/Makefile
Olivier Fourdan's avatar
Olivier Fourdan committed
themes/pills/Makefile
themes/piranha/Makefile
themes/quiet-purple/Makefile
Olivier Fourdan's avatar
Olivier Fourdan committed
themes/quinx/Makefile
themes/redmond/Makefile
themes/redmondxp/Makefile
Olivier Fourdan's avatar
Olivier Fourdan committed
themes/silverado/Makefile
Olivier Fourdan's avatar
Olivier Fourdan committed
themes/slick/Makefile
themes/tabs/Makefile
themes/tux/Makefile