From 080b3b080d48456180d84c04cdbc1766ccf9c96d Mon Sep 17 00:00:00 2001 From: Mike Fleetwood Date: Wed, 6 Aug 2014 23:17:00 +0100 Subject: [PATCH] Only check for ped_file_system_resize() once if possible (#734718) If ped_file_system_resize() function is found in the parted library don't bother to go on to check for it in the parted-fs-resize library. Bug #734718 - Update Autoconf version specific libparted checks and defines to feature specific ones --- configure.ac | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/configure.ac b/configure.ac index 9be02922..c500defc 100644 --- a/configure.ac +++ b/configure.ac @@ -158,20 +158,23 @@ dnl the library is found. dnl dnl As the default action-if-found is overridden, LIBS isn't extended so dnl saving and restoring LIBS isn't required. +have_old_lp_fs_resize_api=no AC_CHECK_LIB( [parted], [ped_file_system_resize], - [have_old_lp_fs_resize_api=yes], - [have_old_lp_fs_resize_api=no] + [have_old_lp_fs_resize_api=yes] ) -dnl Check for ped_file_system_resize() function in the parted-fs-resize -dnl library to determine the need to use the new library. Available in -dnl parted >= 3.1. -AC_CHECK_LIB( - [parted-fs-resize], [ped_file_system_resize], - [have_new_lp_fs_resize_lib=yes], - [have_new_lp_fs_resize_lib=no] +dnl If not already found, check for ped_file_system_resize() function in +dnl the parted-fs-resize library to determine the need to use the new +dnl library. Available in parted >= 3.1. +have_new_lp_fs_resize_lib=no +AS_IF( + [test "x$have_old_lp_fs_resize_api" != xyes], + [AC_CHECK_LIB( + [parted-fs-resize], [ped_file_system_resize], + [have_new_lp_fs_resize_lib=yes] + )] )