Add shared pkg.m4 file with convenience macros for using pkg-config.
[jra/samba/.git] / m4 / check_make.m4
1 dnl SMB Build Environment make Checks
2 dnl -------------------------------------------------------
3 dnl  Copyright (C) Stefan (metze) Metzmacher 2004
4 dnl  Copyright (C) Jelmer Vernooij 2005
5 dnl  Released under the GNU GPL
6 dnl -------------------------------------------------------
7 dnl
8
9 AC_DEFUN([AC_SAMBA_GNU_MAKE],
10 [
11 AC_PATH_PROGS(MAKE,gmake make)
12
13 AC_CACHE_CHECK([whether we have GNU make], samba_cv_gnu_make, [
14 if ! $ac_cv_path_MAKE --version | head -1 | grep GNU 2>/dev/null >/dev/null
15 then
16         samba_cv_gnu_make=no
17 else
18         samba_cv_gnu_make=yes
19 fi
20 ])
21 if test x$samba_cv_gnu_make = xyes; then
22         $1
23 else
24         $2
25 fi
26 ])
27
28 AC_DEFUN([AC_SAMBA_GNU_MAKE_VERSION], 
29 [
30 AC_CACHE_CHECK([GNU make version], samba_cv_gnu_make_version,[
31                 samba_cv_gnu_make_version=`$ac_cv_path_MAKE --version | head -1 | cut -d " " -f 3 2>/dev/null`
32         ])
33 ])