1dnl aclocal.m4 generated automatically by aclocal 1.4-p6 2 3dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. 4dnl This file is free software; the Free Software Foundation 5dnl gives unlimited permission to copy and/or distribute it, 6dnl with or without modifications, as long as this notice is preserved. 7 8dnl This program is distributed in the hope that it will be useful, 9dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without 10dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A 11dnl PARTICULAR PURPOSE. 12 13# =========================================================================== 14# http://www.gnu.org/software/autoconf-archive/ax_check_gnu_make.html 15# =========================================================================== 16# 17# SYNOPSIS 18# 19# AX_CHECK_GNU_MAKE() 20# 21# DESCRIPTION 22# 23# This macro searches for a GNU version of make. If a match is found, the 24# makefile variable `ifGNUmake' is set to the empty string, otherwise it 25# is set to "#". This is useful for including a special features in a 26# Makefile, which cannot be handled by other versions of make. The 27# variable _cv_gnu_make_command is set to the command to invoke GNU make 28# if it exists, the empty string otherwise. 29# 30# Here is an example of its use: 31# 32# Makefile.in might contain: 33# 34# # A failsafe way of putting a dependency rule into a makefile 35# $(DEPEND): 36# $(CC) -MM $(srcdir)/*.c > $(DEPEND) 37# 38# @ifGNUmake@ ifeq ($(DEPEND),$(wildcard $(DEPEND))) 39# @ifGNUmake@ include $(DEPEND) 40# @ifGNUmake@ endif 41# 42# Then configure.in would normally contain: 43# 44# AX_CHECK_GNU_MAKE() 45# AC_OUTPUT(Makefile) 46# 47# Then perhaps to cause gnu make to override any other make, we could do 48# something like this (note that GNU make always looks for GNUmakefile 49# first): 50# 51# if ! test x$_cv_gnu_make_command = x ; then 52# mv Makefile GNUmakefile 53# echo .DEFAULT: > Makefile ; 54# echo \ $_cv_gnu_make_command \$@ >> Makefile; 55# fi 56# 57# Then, if any (well almost any) other make is called, and GNU make also 58# exists, then the other make wraps the GNU make. 59# 60# LICENSE 61# 62# Copyright (c) 2008 John Darrington <j.darrington@elvis.murdoch.edu.au> 63# 64# Copying and distribution of this file, with or without modification, are 65# permitted in any medium without royalty provided the copyright notice 66# and this notice are preserved. This file is offered as-is, without any 67# warranty. 68 69#serial 7 70 71AC_DEFUN([AX_CHECK_GNU_MAKE], [ AC_CACHE_CHECK( for GNU make,_cv_gnu_make_command, 72 _cv_gnu_make_command='' ; 73dnl Search all the common names for GNU make 74 for a in "$MAKE" make gmake gnumake ; do 75 if test -z "$a" ; then continue ; fi ; 76 if ( sh -c "$a --version" 2> /dev/null | grep GNU 2>&1 > /dev/null ) ; then 77 _cv_gnu_make_command=$a ; 78 break; 79 fi 80 done ; 81 ) ; 82dnl If there was a GNU version, then set @ifGNUmake@ to the empty string, '#' otherwise 83 if test "x$_cv_gnu_make_command" != "x" ; then 84 ifGNUmake='' ; 85 else 86 ifGNUmake='#' ; 87 AC_MSG_RESULT("Not found"); 88 fi 89 AC_SUBST(ifGNUmake) 90] ) 91 92