2010/12/18 Eric Blake <eblake@xxxxxxxxxx>: > * configure.ac (dlopen): Cygwin dlopen is in libc; avoid spurious > failure. > (XDR_CFLAGS): Define when needed. > * src/Makefile.am (libvirt_driver_remote_la_CFLAGS): Use it. > --- > > This fixed things so I could again compile on cygwin. > > Âconfigure.ac  Â|  33 +++++++++++++++++++++++++++------ > Âsrc/Makefile.am |  Â2 +- > Â2 files changed, 28 insertions(+), 7 deletions(-) > > diff --git a/configure.ac b/configure.ac > index 4df915a..50ee862 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -339,6 +339,25 @@ if test x"$with_remote" = x"yes" || test x"$with_libvirtd" = x"yes"; then > >   dnl check for cygwin's variation in xdr function names >   AC_CHECK_FUNCS([xdr_u_int64_t],[],[],[#include <rpc/xdr.h>]) > + > +  Âdnl Cygwin requires -I/usr/include/tirpc for <rpc/rpc.h> > +  Âold_CFLAGS=$CFLAGS > +  ÂAC_CACHE_CHECK([where to find <rpc/rpc.h>], [lv_cv_xdr_cflags], [ > +   Âfor CFLAGS in '' '-I/usr/include/tirpc' 'missing'; do > +    Âif test x"$CFLAGS" = xmissing; then > +     Âlv_cv_xdr_cflags=missing; break > +    Âfi > +    ÂAC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <rpc/rpc.h> > +    Â]])], [lv_cv_xdr_cflags=${CFLAGS:-none}; break]) > +   Âdone > +  Â]) > +  ÂCFLAGS=$old_CFLAGS > +  Âcase $lv_cv_xdr_cflags in > +   Ânone) XDR_CFLAGS= ;; > +   Âmissing) AC_MSG_ERROR([Unable to find <rpc/rpc.h>]) ;; > +   Â*) XDR_CFLAGS=$lv_cv_xdr_cflags ;; > +  Âesac > +  ÂAC_SUBST([XDR_CFLAGS]) > Âfi Due to the specific directory layout I use in my msys_setup this breaks my MinGW build. The problem is that I have MSYS and MinGW in different base directories and "mount" the MinGW directory into the MSYS environment. I have rpc/rpc.h in MSYS in /include (MSYS internally "symlinks" /usr/include to /include), due to the directory layout this is not in the default GCC include path. I use "CFLAGS=-I/include ./configure" to fix this. Now the new check ignores CFLAGS making my build fail. This incremental patch fixes it, by including the current CFLAGS instead of overriding them. diff --git a/configure.ac b/configure.ac index 27239f6..93532a6 100644 --- a/configure.ac +++ b/configure.ac @@ -343,12 +343,13 @@ if test x"$with_remote" = x"yes" || test x"$with_libvirtd" = x"yes"; then dnl Cygwin requires -I/usr/include/tirpc for <rpc/rpc.h> old_CFLAGS=$CFLAGS AC_CACHE_CHECK([where to find <rpc/rpc.h>], [lv_cv_xdr_cflags], [ - for CFLAGS in '' '-I/usr/include/tirpc' 'missing'; do - if test x"$CFLAGS" = xmissing; then + for add_CFLAGS in '' '-I/usr/include/tirpc' 'missing'; do + if test x"$add_CFLAGS" = xmissing; then lv_cv_xdr_cflags=missing; break fi + CFLAGS="$old_CFLAGS $add_CFLAGS" AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <rpc/rpc.h> - ]])], [lv_cv_xdr_cflags=${CFLAGS:-none}; break]) + ]])], [lv_cv_xdr_cflags=${add_CFLAGS:-none}; break]) done ]) CFLAGS=$old_CFLAGS Matthias -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list