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
This commit is contained in:
Mike Fleetwood 2014-08-06 23:17:00 +01:00 committed by Curtis Gedak
parent ed4ea6cf03
commit 080b3b080d

View file

@ -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]
)]
)