From b5459176ca927b5db3972922fce6862255bcd577 Mon Sep 17 00:00:00 2001 From: Bart Hakvoort Date: Thu, 14 Sep 2006 20:34:49 +0000 Subject: [PATCH] changed libpartedcheck a bit. from now on we declare the min. version as * configure.in: changed libpartedcheck a bit. from now on we declare the min. version as variable in one place. This finally closes #330776 --- ChangeLog | 5 +++++ configure.in | 23 ++++++++++++++++++----- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8a75afb7..58105fd9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-09-14 Bart Hakvoort + + * configure.in: changed libpartedcheck a bit. from now on we declare + the min. version as variable in one place. This finally closes #330776 + 2006-09-14 Bart Hakvoort * src/ext2.cc, diff --git a/configure.in b/configure.in index 60bcf92a..6288a172 100644 --- a/configure.in +++ b/configure.in @@ -33,7 +33,8 @@ AC_CHECK_LIB(uuid, uuid_generate, [], AC_MSG_ERROR([*** uuid library (libuuid) n AC_CHECK_LIB(dl, dlopen, [], AC_MSG_ERROR([*** dl library (libdl) not found])) dnl libparted -AC_MSG_CHECKING(for libparted >= 1.7.1) +LIBPARTED_VERSION=1.7.1 +AC_MSG_CHECKING(for libparted >= $LIBPARTED_VERSION) LDFLAGS=-lparted AC_TRY_RUN( #include @@ -41,16 +42,28 @@ AC_TRY_RUN( int main () { + int min_major ; + int min_minor ; + int min_micro ; int major ; int minor ; int micro ; - if ( sscanf( ped_get_version(), "%d.%d.%d", &major, &minor, µ ) == 3 ) - printf( "Found libparted %s\t", ped_get_version() ) ; + if ( sscanf( "$LIBPARTED_VERSION", "%d.%d.%d", &min_major, &min_minor, &min_micro ) == 3 ) + { + if ( sscanf( ped_get_version(), "%d.%d.%d", &major, &minor, µ ) == 3 ) + { + printf( "Found libparted %s\t", ped_get_version() ) ; - return ! ( major == 1 && minor == 7 && micro >= 1 ) ; + return ! ((major > min_major) || + ((major == min_major) && (minor > min_minor)) || + ((major == min_major) && (minor == min_minor) && (micro >= min_micro))) ; + } + } + + return 1 ; } -,AC_MSG_RESULT(OK),AC_MSG_ERROR(*** Requires libparted >= 1.7.1) ) +,AC_MSG_RESULT(OK),AC_MSG_ERROR(*** Requires libparted >= $LIBPARTED_VERSION) ) dnl GTKMM