From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41531) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0GTt-0006bP-63 for qemu-devel@nongnu.org; Wed, 03 Jun 2015 17:45:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z0GTn-0003J6-3R for qemu-devel@nongnu.org; Wed, 03 Jun 2015 17:45:49 -0400 From: Alexander Graf Date: Wed, 3 Jun 2015 23:45:04 +0200 Message-Id: <1433367941-119488-4-git-send-email-agraf@suse.de> In-Reply-To: <1433367941-119488-1-git-send-email-agraf@suse.de> References: <1433367941-119488-1-git-send-email-agraf@suse.de> Subject: [Qemu-devel] [PULL 03/40] 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 Cc: peter.maydell@linaro.org, Thomas Huth , qemu-devel@nongnu.org From: Thomas Huth Some recent patches require a function 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 required function fdt_get_property_by_offset() instead instead. Signed-off-by: Thomas Huth Signed-off-by: Alexander Graf --- configure | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 4e2f78a..35111b2 100755 --- a/configure +++ b/configure @@ -3115,9 +3115,11 @@ fi if test "$fdt" != "no" ; then fdt_libs="-lfdt" # explicitly check for libfdt_env.h as it is missing in some stable installs + # and test for required functions to make sure we are on a version >= 1.4.0 cat > $TMPC << EOF +#include #include -int main(void) { return 0; } +int main(void) { fdt_get_property_by_offset(0, 0, 0); return 0; } EOF if compile_prog "" "$fdt_libs" ; then # system DTC is good - use it @@ -3135,7 +3137,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.1.4