1 # Copyright 2001 Free Software Foundation, Inc. -*- Autoconf -*-
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2, or (at your option)
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
22 # Check to see how make treats includes.
23 AC_DEFUN([AM_MAKE_INCLUDE],
25 cat > confinc << 'END'
29 # If we don't find an include directive, just comment out the code.
30 AC_MSG_CHECKING([for style of include used by $am_make])
34 # First try GNU make style include.
35 echo "include confinc" > confmf
36 # We grep out `Entering directory' and `Leaving directory'
37 # messages which can occur if `w' ends up in MAKEFLAGS.
38 # In particular we don't look at `^make:' because GNU make might
39 # be invoked under some other name (usually "gmake"), in which
40 # case it prints its new name instead of `make'.
41 if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
46 # Now try BSD make style include.
47 if test "$am__include" = "#"; then
48 echo '.include "confinc"' > confmf
49 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
57 AC_MSG_RESULT($_am_result)