]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
Add support for portable-rpcgen from portablexdr library
authorPavel Fedin <p.fedin@samsung.com>
Wed, 8 Jul 2015 11:29:23 +0000 (14:29 +0300)
committerMartin Kletzander <mkletzan@redhat.com>
Wed, 8 Jul 2015 12:34:38 +0000 (14:34 +0200)
This allows to build libvirt under MinGW

Signed-off-by: Pavel Fedin <p.fedin@samsung.com>
configure.ac
src/rpc/genprotocol.pl

index cd6c972ac7d3dd14b0c3a62748b9d51d9c64a087..6533b88851efd5b1842d2beaaefcc254e6fce33d 100644 (file)
@@ -401,7 +401,7 @@ AM_CONDITIONAL([HAVE_LIBTASN1], [test "x$ac_cv_header_libtasn1_h" = "xyes"])
 AC_CHECK_LIB([intl],[gettext],[])
 
 dnl Do we have rpcgen?
-AC_PATH_PROG([RPCGEN], [rpcgen], [no])
+AC_PATH_PROGS([RPCGEN], [rpcgen portable-rpcgen], [no])
 AM_CONDITIONAL([HAVE_RPCGEN], [test "x$ac_cv_path_RPCGEN" != "xno"])
 dnl Is this GLIBC's buggy rpcgen?
 AM_CONDITIONAL([HAVE_GLIBC_RPCGEN],
index 6e6d6d4a93fc74aef956ca2a1ca4fc1dedb90d9e..1ac2507c44c45fa600ced69ca07bd97ecb270af2 100755 (executable)
@@ -38,7 +38,10 @@ my $target = shift;
 
 unlink $target;
 
-open RPCGEN, "-|", $rpcgen, $mode, $xdrdef
+if ($rpcgen =~ /portable-rpcgen/) {
+    $rpcgen = "$rpcgen -o -";
+}
+open RPCGEN, "-|", "$rpcgen $mode $xdrdef"
     or die "cannot run $rpcgen $mode $xdrdef: $!";
 open TARGET, ">$target"
     or die "cannot create $target: $!";