Bump the version number in configure.ac to 1.0.5
[moonshot-ui.git] / m4 / msrpc-mingw-1.0.m4
1 dnl AC_PATH_MSRPC_MINGW([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
2 dnl Test for msrpc-mingw. Define MSRPC_CFLAGS and MSRPC_LIBS and MIDL_WRAPPER.
3 dnl
4 AC_DEFUN([AC_PATH_MSRPC_MINGW],
5 [dnl 
6 dnl Get the cflags and libraries from pkg-config
7 dnl
8
9   pkg_config_args="msrpc-mingw-1.0"
10
11   PKG_PROG_PKG_CONFIG([0.16])
12
13   no_msrpc=""
14
15   if test "x$PKG_CONFIG" = x ; then
16     no_msrpc=yes
17     PKG_CONFIG=no
18   fi
19
20   min_msrpc_mingw_version=ifelse([$1], ,0.1.0,$1)
21   AC_MSG_CHECKING(for msrpc-mingw - version >= $min_msrpc_version)
22
23   if test x$PKG_CONFIG != xno ; then
24     if $PKG_CONFIG --uninstalled $pkg_config_args; then
25       echo "Will use uninstalled version of msrpc-mingw found in PKG_CONFIG_PATH"
26     fi
27
28     if $PKG_CONFIG --atleast-version $min_msrpc_mingw_version $pkg_config_args; then
29       :
30     else
31       no_msrpc=yes
32     fi
33   fi
34
35   if test x"$no_msrpc" = x ; then
36     MIDL_WRAPPER=`$PKG_CONFIG --variable=midl_wrapper msrpc-mingw-1.0`
37     MSRPC_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args`
38     MSRPC_LIBS=`$PKG_CONFIG --libs $pkg_config_args`
39   fi
40
41   if test "x$no_msrpc" = x ; then
42      AC_MSG_RESULT(yes)
43      ifelse([$2], , :, [$2])     
44   else
45      AC_MSG_RESULT(no)
46      if test "$PKG_CONFIG" = "no" ; then
47        echo "*** A new enough version of pkg-config was not found."
48        echo "*** See http://www.freedesktop.org/software/pkgconfig/"
49      else
50        echo "not found"
51      fi
52      MSRPC_CFLAGS=""
53      MSRPC_LIBS=""
54      MIDL_WRAPPER=""
55      ifelse([$3], , :, [$3])
56   fi
57   AC_SUBST(MSRPC_CFLAGS)
58   AC_SUBST(MSRPC_LIBS)
59   AC_SUBST(MIDL_WRAPPER)
60 ])