From 020599462bdfc89f84cdd0fcbaf640008ab9b4fe Mon Sep 17 00:00:00 2001 From: Sanel Zukan Date: Mon, 13 Apr 2009 17:06:53 +0000 Subject: [PATCH] Update jam checks here too --- m4/jam.m4 | 47 +++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 39 insertions(+), 8 deletions(-) diff --git a/m4/jam.m4 b/m4/jam.m4 index ad917f4..3c6ce35 100644 --- a/m4/jam.m4 +++ b/m4/jam.m4 @@ -1,15 +1,22 @@ dnl dnl $Id$ dnl -dnl Part of Equinox Desktop Environment (EDE). -dnl Copyright (c) 2000-2007 EDE Authors. -dnl -dnl This program is licenced under terms of the -dnl GNU General Public Licence version 2 or newer. -dnl See COPYING for details. +dnl Copyright (c) 2005-2007 edelib authors +dnl +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2 of the License, or (at your option) any later version. +dnl +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. +dnl +dnl You should have received a copy of the GNU Lesser General Public License +dnl along with this library. If not, see . -dnl Check do we have jam installed and try to determine version -dnl where is minimal supported 2.3 +dnl Check do we have jam installed and try to determine version where is minimal supported 2.3 AC_DEFUN([EDE_PROG_JAM], [ AC_PATH_PROG(JAM, jam) @@ -30,4 +37,28 @@ AC_DEFUN([EDE_PROG_JAM], [ else AC_MSG_ERROR(Jam is missing! You can download it from our repository) fi + + dnl older jam's does not handle 'return' statement + AC_MSG_CHECKING([if your jam is broken]) + + cat >conftest.jam <<_ACEOF +rule TestRule { + if \$(<) = 1 { + return 2 ; + } + + return 3 ; +} + +Echo [[ TestRule 1 ]] ; +_ACEOF + + ret=`$JAM -f conftest.jam | head -1` + rm -f conftest.jam + + if test "$ret" -eq 2; then + AC_MSG_RESULT(it is fine) + else + AC_MSG_ERROR(You have old and broken jam version. Please download newer version from our repository") + fi ])