OSDN Git Service

Correct a package name typo.
[mingw/mingw-dist.git] / makeopts.m4
1 ## makeopts.m4 -*- autoconf -*- vim: filetype=config
2 ##
3 ## $Id$
4 ##
5 ## Written by Keith Marshall <keithmarshall@users.sourceforge.net>
6 ## Copyright (C) 2013, MinGW.org Project
7 ##
8 ##
9 ## Autoconf macros to check for options supported by 'make'.
10 ##
11 ##
12 ## This is free software.  Permission is hereby granted to copy
13 ## and redistribute this software, either as is or in modified form,
14 ## subject only to the restrictions that the original author's notice
15 ## of copyright and disclaimers of warranty and of liability shall be
16 ## preserved without change in EVERY copy, and that modified copies
17 ## shall be clearly identified as such.
18 ##
19 ## This software is provided "as is", in the hope that it may prove
20 ## useful, but there is NO WARRANTY OF ANY KIND; not even an implied
21 ## WARRANTY OF MERCHANTABILITY, nor of FITNESS FOR A PARTICULAR PURPOSE.
22 ## Under no circumstances will the author, or the MinGW Project, accept
23 ## liability for any damages, however caused, arising from the use of
24 ## this software.
25
26
27 # MINGW_AC_MAKE_OPTION_SUPPORTED( VARNAME, OPTION )
28 # -------------------------------------------------
29 # If OPTION is supported by make, set VARNAME=' OPTION', otherwise
30 # set VARNAME to nothing; in either case, call AC_SUBST for VARNAME.
31 #
32 AC_DEFUN([MINGW_AC_MAKE_OPTION_SUPPORTED],
33 [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
34  AC_MSG_CHECKING([whether make supports the $2 option])
35  TAB='  ' $1=; mkdir conftest.dir
36  cat <<-EOF> conftest.dir/Makefile
37         conftest:
38         ${TAB}@\$(MAKE) $2 conftest-recursive
39
40         conftest-recursive:
41         ${TAB}@true
42         EOF
43  ( cd conftest.dir; make >/dev/null 2>&1 ) && ac_val=yes $1=' $2' || ac_val=no
44  rm -rf conftest.dir
45  AC_MSG_RESULT([$ac_val])dnl
46  AC_SUBST([$1])dnl
47 ])# MINGW_AC_MAKE_OPTION_SUPPORTED
48
49 # MINGW_AC_MAKE_NO_PRINT_DIRECTORY
50 # --------------------------------
51 # Assign NO_PRINT_DIRECTORY=" --no-print-directory", if make supports
52 # the --no-print-directory option, otherwise leave NO_PRINT_DIRECTORY
53 # unassigned; in either case, call AC_SUBST for NO_PRINT_DIRECTORY.
54 #
55 AC_DEFUN([MINGW_AC_MAKE_NO_PRINT_DIRECTORY],
56 [MINGW_AC_MAKE_OPTION_SUPPORTED([NO_PRINT_DIRECTORY],[--no-print-directory])dnl
57 ])# MINGW_AC_MAKE_NO_PRINT_DIRECTORY
58
59 # $RCSfile$: end of file