From 1ef8005d65960190e6ed737c5abbd2a099d07b3c Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 26 Nov 2007 11:45:26 +0000 Subject: [PATCH] Mon Nov 26 11:44:00 UTC 2007 Richard W.M. Jones * configure.in, qemud/Makefile.am: Check for buggy glibc rpcgen and only run Perl fix-up script for that. --- ChangeLog | 5 +++++ configure.in | 9 +++++++++ qemud/Makefile.am | 4 ++++ 3 files changed, 18 insertions(+) diff --git a/ChangeLog b/ChangeLog index 98342aae66..e0a3cae24b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Mon Nov 26 11:44:00 UTC 2007 Richard W.M. Jones + + * configure.in, qemud/Makefile.am: Check for buggy glibc rpcgen + and only run Perl fix-up script for that. + Mon Nov 26 11:42:00 UTC 2007 Richard W.M. Jones * configure.in: Check if -lrpc is needed to get XDR functions. diff --git a/configure.in b/configure.in index 925cf14ad4..61d6779e05 100644 --- a/configure.in +++ b/configure.in @@ -69,6 +69,15 @@ AC_CHECK_HEADERS([paths.h sys/syslimits.h]) dnl Need -lrpc? (Cygwin needs this) AC_SEARCH_LIBS(xdrmem_create,rpc) +dnl Do we have rpcgen? +AC_PATH_PROG(RPCGEN, rpcgen, no) +AM_CONDITIONAL(RPCGEN, [test "x$ac_cv_path_RPCGEN" != "xno"]) +if test "x$ac_cv_path_RPCGEN" != "xno"; then + dnl Is this GLIBC's buggy rpcgen? + AM_CONDITIONAL(GLIBC_RPCGEN, + [$ac_cv_path_RPCGEN -t /dev/null 2>&1]) +fi + dnl Specific dir for HTML output ? AC_ARG_WITH(html-dir, AC_HELP_STRING([--with-html-dir=path], [path to base html directory, default $datadir/doc/html]), diff --git a/qemud/Makefile.am b/qemud/Makefile.am index 7422e44ec2..1737176f4d 100644 --- a/qemud/Makefile.am +++ b/qemud/Makefile.am @@ -68,15 +68,19 @@ uninstall-local: uninstall-init rmdir $(DESTDIR)$(localstatedir)/lib/libvirt || : +if RPCGEN .x.c: rm -f $@ rpcgen -c -o $@ $< +if GLIBC_RPCGEN mv $@ $@.bak perl -w rpcgen_fix.pl < $@.bak > $@ +endif .x.h: rm -f $@ rpcgen -h -o $@ $< +endif remote_protocol.c: remote_protocol.h