AM_GNU_GETTEXT calls AM_ICONV_LINK. AM_ICONV_LINK saves and alters CPPFLAGS, but doesn't restore it when it finds libiconv. This results in /usr/local/include ending up in the gcc command line before the include path for the local include directory. This makes gcc pick a previous installed libvirt.h instead of the correct one from the source tree.
Workaround this problem by saving and restoring CPPFLAGS around the AM_GNU_GETTEXT call. --- configure.ac | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/configure.ac b/configure.ac index b2ba930..8f46dbd 100644 --- a/configure.ac +++ b/configure.ac @@ -2011,8 +2011,16 @@ dnl Enable building libvirtd? AM_CONDITIONAL([WITH_LIBVIRTD],[test "x$with_libvirtd" = "xyes"]) dnl Check for gettext - don't go any newer than what RHEL 5 supports +dnl +dnl save and restore CPPFLAGS around gettext check as the internal iconv +dnl check might leave -I/usr/local/include in CPPFLAGS on FreeBSD resulting +dnl in the build picking up previously installed libvirt/libvirt.h instead +dnl of the correct one from the soucre tree + +save_CPPFLAGS="$CPPFLAGS" AM_GNU_GETTEXT_VERSION([0.17]) AM_GNU_GETTEXT([external]) +CPPFLAGS="$save_CPPFLAGS" ALL_LINGUAS=`cd "$srcdir/po" > /dev/null && ls *.po | sed 's+\.po$++'` -- 1.7.0.4 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list