summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2011-08-07 17:39:06 +0200
committerGuido Günther <agx@sigxcpu.org>2011-08-07 17:39:06 +0200
commita92d03eeea8bea2c7943db9bff822168e65d5472 (patch)
tree4cf855df595b720ddd6594ad2356a88c0bd3ec9d /configure.ac
parent0e60a818b56bed47d872dced5d123363a5168fd1 (diff)
New upstream version 0.9.4
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac36
1 files changed, 34 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 045ae577a..c8d291b03 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,8 @@
dnl Process this file with autoconf to produce a configure script.
+dnl Copyright (C) 2005-2011 Red Hat, Inc.
+dnl See COPYING.LIB for the License of this software
+
AC_INIT([libvirt], [0.9.4], [libvir-list@redhat.com], [], [http://libvirt.org])
AC_CONFIG_SRCDIR([src/libvirt.c])
AC_CONFIG_AUX_DIR([build-aux])
@@ -2055,8 +2058,30 @@ 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 source tree.
+dnl compute the difference between save_CPPFLAGS and CPPFLAGS and append it
+dnl to INCLUDES in order to preserve changes made by gettext but in a place
+dnl that does not break the build
+save_CPPFLAGS="$CPPFLAGS"
AM_GNU_GETTEXT_VERSION([0.17])
AM_GNU_GETTEXT([external])
+GETTEXT_CPPFLAGS=
+if test "x$save_CPPFLAGS" != "x$CPPFLAGS"; then
+ set dummy $CPPFLAGS; shift
+ for var
+ do
+ case " $var " in
+ " $save_CPPFLAGS ") ;;
+ *) GETTEXT_CPPFLAGS="$GETTEXT_CPPFLAGS $var" ;;
+ esac
+ done
+fi
+CPPFLAGS="$save_CPPFLAGS"
+AC_SUBST([GETTEXT_CPPFLAGS])
ALL_LINGUAS=`cd "$srcdir/po" > /dev/null && ls *.po | sed 's+\.po$++'`
@@ -2379,9 +2404,16 @@ cp -f COPYING.LIB COPYING
# Detect when running under the clang static analyzer's scan-build driver
# or Coverity-prevent's cov-build. Define STATIC_ANALYSIS accordingly.
+AC_CACHE_CHECK([whether this build is done by a static analysis tool],
+ [lv_cv_static_analysis], [
+ lv_cv_static_analysis=no
+ if test -n "${CCC_ANALYZER_ANALYSIS+set}" || \
+ test -n "$COVERITY_BUILD_COMMAND$COVERITY_LD_PRELOAD"; then
+ lv_cv_static_analysis=yes
+ fi
+ ])
t=0
-test -n "${CCC_ANALYZER_ANALYSIS+set}" && t=1
-test -n "$COVERITY_BUILD_COMMAND$COVERITY_LD_PRELOAD" && t=1
+test "x$lv_cv_static_analysis" = xyes && t=1
AC_DEFINE_UNQUOTED([STATIC_ANALYSIS], [$t],
[Define to 1 when performing static analysis.])