From: mdw Date: Fri, 26 Nov 1999 01:23:17 +0000 (+0000) Subject: And support for MXD (not yet released). X-Git-Tag: 1.2.8~13 X-Git-Url: https://git.distorted.org.uk/~mdw/cfd/commitdiff_plain/5ba1b8b81ee920a88ade14fafec75810a31739ff And support for MXD (not yet released). --- diff --git a/aclocal.glob b/aclocal.glob index 0f4b4d8..ba2a1ad 100644 --- a/aclocal.glob +++ b/aclocal.glob @@ -1,6 +1,6 @@ dnl -*-fundamental-*- *@--GLOB-HEADER--@* dnl -dnl $Id: aclocal.glob,v 1.7 1999/11/11 20:03:58 mdw Exp $ +dnl $Id: aclocal.glob,v 1.8 1999/11/26 01:23:17 mdw Exp $ dnl dnl Common library of autoconf macros dnl @@ -28,6 +28,9 @@ dnl Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. dnl----- Revision history --------------------------------------------------- dnl dnl $Log: aclocal.glob,v $ +dnl Revision 1.8 1999/11/26 01:23:17 mdw +dnl And support for MXD (not yet released). +dnl dnl Revision 1.7 1999/11/11 20:03:58 mdw dnl Add support for mgLib too. dnl @@ -52,7 +55,7 @@ dnl dnl----- Common files distribution --------------------------- *@--NOTICE--@* dnl -dnl $Id: aclocal.glob,v 1.7 1999/11/11 20:03:58 mdw Exp $ +dnl $Id: aclocal.glob,v 1.8 1999/11/26 01:23:17 mdw Exp $ dnl --- *@-AC_PROG_CC_STDC-@* --- dnl @@ -1434,6 +1437,44 @@ else AC_MSG_RESULT([not found]) fi]) +dnl *@-mdw_MXD-@* +dnl +dnl Author: Mark Wooding +dnl +dnl Synopsis: mdw_MXD(VERSION, IF-FOUND, IF-NOT-FOUND +dnl +dnl Arguments: VERSION = version of library required +dnl IF-FOUND = what to do if found +dnl IF-NOT-FOUND = what to do if not found +dnl +dnl Use: Configures an MXD client program. The default +dnl version is 1.0.0pre0; the default action is to add +dnl everything to the CFLAGS and LIBS variables, and complain +dnl if the library couldn't be found. +dnl +dnl The variable MXD_VERSION contains the version number of +dnl the library; MXD_CFLAGS is the C compiler flags required +dnl and MXD_LIBS is the linker flags. + +AC_DEFUN([mdw_MXD], +[AC_MSG_CHECKING([for MXD library]) +if mxd-config --check $1 >/dev/null 2>&1; then + MXD_VERSION=`mxd-config --version` + MXD_CFLAGS=`mxd-config --cflags` + MXD_LIBS=`mxd-config --libs` + AC_SUBST(MXD_VERSION) AC_SUBST(MXD_CFLAGS) AC_SUBST(MXD_LIBS) + ifelse([$2], [], + [CFLAGS="$CFLAGS $MXD_CFLAGS" + LIBS="$MXD_LIBS $LIBS"], + $2) + AC_MSG_RESULT([$MXD_VERSION]) +else + ifelse([$3], [], + AC_MSG_ERROR([MXD library not found or too old.]), + $3) + AC_MSG_RESULT([not found]) +fi]) + dnl *@-mdw_CATACOMB-@* dnl dnl Author: Mark Wooding