From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50523) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YuFhz-0000mq-F5 for qemu-devel@nongnu.org; Mon, 18 May 2015 03:43:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YuFhv-0005xE-QG for qemu-devel@nongnu.org; Mon, 18 May 2015 03:43:31 -0400 From: Thomas Huth Date: Mon, 18 May 2015 09:43:21 +0200 Message-Id: <1431935001-15678-1-git-send-email-thuth@redhat.com> Subject: [Qemu-devel] [PATCH] configure: Check for libfdt version 1.4.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-ppc@nongnu.org, Alexander Graf Cc: mdroth@linux.vnet.ibm.com, aik@ozlabs.ru, qemu-devel@nongnu.org, afaerber@suse.de, David Gibson Some recent patches require functions from libfdt version 1.4.0, so we should check for this version during the configure step already. Unfortunately, there does not seem to be a proper #define for the version number in the libfdt headers. So alternatively, we check for the availability of the fdtXX_t types instead which have just been introduced with version 1.4.0. Signed-off-by: Thomas Huth --- configure | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/configure b/configure index b18aa9e..87a5bbc 100755 --- a/configure +++ b/configure @@ -3091,9 +3091,10 @@ fi if test "$fdt" != "no" ; then fdt_libs="-lfdt" # explicitly check for libfdt_env.h as it is missing in some stable installs + # and also test for fdtXX_t to make sure we are on a version >= 1.4.0 cat > $TMPC << EOF #include -int main(void) { return 0; } +int main(void) { fdt32_t x = 0; return x; } EOF if compile_prog "" "$fdt_libs" ; then # system DTC is good - use it @@ -3111,7 +3112,7 @@ EOF fdt_libs="-L\$(BUILD_DIR)/dtc/libfdt $fdt_libs" elif test "$fdt" = "yes" ; then # have neither and want - prompt for system/submodule install - error_exit "DTC (libfdt) not present. Your options:" \ + error_exit "DTC (libfdt) version >= 1.4.0 not present. Your options:" \ " (1) Preferred: Install the DTC (libfdt) devel package" \ " (2) Fetch the DTC submodule, using:" \ " git submodule update --init dtc" -- 1.8.3.1