From afe8282e07b8884206fa8f40e5b711692ab0fa32 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Thu, 30 Mar 2006 17:31:25 +0000 Subject: [PATCH] usemarcon macros added --- usemarcon.m4 | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 usemarcon.m4 diff --git a/usemarcon.m4 b/usemarcon.m4 new file mode 100644 index 0000000..03fb152 --- /dev/null +++ b/usemarcon.m4 @@ -0,0 +1,42 @@ +## $Id: usemarcon.m4,v 1.1 2006-03-30 17:31:25 adam Exp $ +AC_DEFUN([USEMARCON_INIT], +[ + AC_SUBST(USEMARCONLALIB) + AC_SUBST(USEMARCONINC) + usemarconconfig=NONE + usemarconpath=NONE + AC_ARG_WITH(usemarcon, [ --with-usemarcon=DIR usemarcon-config in DIR (example /home/usemarcon145)], [usemarconpath=$withval]) + + if test "x$usemarconpath" != "xNONE"; then + usemarconconfig=$usemarconpath/usemarcon-config + else + if test "x$srcdir" = "x"; then + usemarconsrcdir=. + else + usemarconsrcdir=$srcdir + fi + for i in ${usemarconsrcdir}/../usemarcon*; do + if test -d $i; then + if test -r $i/usemarcon-config; then + usemarconconfig=$i/usemarcon-config + fi + fi + done + if test "x$usemarconconfig" = "xNONE"; then + AC_PATH_PROG(usemarconconfig, usemarcon-config, NONE) + fi + fi + + AC_MSG_CHECKING(for USEMARCON) + if $usemarconconfig --version >/dev/null 2>&1; then + USEMARCONLALIB=`$usemarconconfig --lalibs $1` + USEMARCONINC=`$usemarconconfig --cflags $1` + USEMARCONVERSION=`$usemarconconfig --version` + AC_MSG_RESULT($usemarconconfig) + AC_DEFINE(HAVE_USEMARCON) + else + AC_MSG_RESULT(Not found) + USEMARCONVERSION=NONE + fi +]) + -- 1.7.10.4