# Process this file with autoconf to produce a configure script. AC_PREREQ(2.53) AC_INIT(wininfo, 0.7, http://freedesktop.org/) AC_COPYRIGHT([Copyright 2004 Billy Biggs]) AC_CONFIG_SRCDIR([src/wininfo.c]) AM_INIT_AUTOMAKE() AM_CONFIG_HEADER(config.h) AM_MAINTAINER_MODE AC_CANONICAL_HOST AC_PROG_CC AC_PROG_LIBTOOL AC_HEADER_STDC AC_CHECK_HEADERS([stdlib.h string.h]) AM_GNU_GETTEXT PKG_CHECK_MODULES(GTK, gtk+-2.0) AC_SUBST(GTK_CFLAGS) AC_SUBST(GTK_LIBS) # Check for XRes, from xrestop's configure.ac # =========================================== PKG_CHECK_MODULES(X11, x11, [have_libx11pc="yes"], [have_libx11pc="no"]) if test $have_libx11pc = yes; then PKG_CHECK_MODULES(XLIBS, x11 xres xext) else dnl **** Check for xlibs 'non pc' way **** AC_PATH_XTRA ALL_X_LIBS="$X_LIBS -lX11" found_xres_lib=no AC_CHECK_LIB(XRes, XResQueryClients, XRES_LIBS=-lXRes found_xres_lib=yes,, -lXext $ALL_X_LIBS) if test "x$found_xres_lib" = "xno"; then # Try again, overriding defaults for certain platforms case `uname -sr` in "SunOS 5"*) # Solaris ships libXres in /usr/openwin/sfw/lib save_LDFLAGS=$LDFLAGS SOL_XRES_LDFLAGS="-L/usr/openwin/sfw/lib -R/usr/openwin/sfw/lib" LDFLAGS="$LDFLAGS $SOL_XRES_LDFLAGS" AC_CHECK_LIB(XRes, XResQueryClientResources, found_xres_lib=yes XRES_LIBS="$SOL_XRES_LDFLAGS -lXRes", ,-lXext $ALL_X_LIBS) LDFLAGS="$save_LDFLAGS" ;; esac fi if test "x$found_xres_lib" = "xno"; then AC_MSG_ERROR([Cannot find XRes extension library]) exit 1 fi found_xres=no AC_CHECK_HEADER(X11/extensions/XRes.h,found_xres=yes,,[#include ]) if test "x$found_xres" = "xno"; then AC_MSG_ERROR([Cannot find XRes extension headers]) exit 1 fi XLIBS_LIBS="$XRES_LIBS -lXext $ALL_X_LIBS" fi AC_SUBST(XLIBS_CFLAGS) AC_SUBST(XLIBS_LIBS) AC_CONFIG_FILES([ Makefile docs/Makefile src/Makefile intl/Makefile po/Makefile.in m4/Makefile ]) AC_OUTPUT