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
This commit is contained in:
Bart Hakvoort 2006-09-14 20:34:49 +00:00
parent 8963a49c42
commit b5459176ca
2 changed files with 23 additions and 5 deletions

View file

@ -1,3 +1,8 @@
2006-09-14 Bart Hakvoort <hakvoort@cvs.gnome.org>
* 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 <hakvoort@cvs.gnome.org> 2006-09-14 Bart Hakvoort <hakvoort@cvs.gnome.org>
* src/ext2.cc, * src/ext2.cc,

View file

@ -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])) AC_CHECK_LIB(dl, dlopen, [], AC_MSG_ERROR([*** dl library (libdl) not found]))
dnl libparted dnl libparted
AC_MSG_CHECKING(for libparted >= 1.7.1) LIBPARTED_VERSION=1.7.1
AC_MSG_CHECKING(for libparted >= $LIBPARTED_VERSION)
LDFLAGS=-lparted LDFLAGS=-lparted
AC_TRY_RUN( AC_TRY_RUN(
#include <stdio.h> #include <stdio.h>
@ -41,16 +42,28 @@ AC_TRY_RUN(
int main () int main ()
{ {
int min_major ;
int min_minor ;
int min_micro ;
int major ; int major ;
int minor ; int minor ;
int micro ; int micro ;
if ( sscanf( ped_get_version(), "%d.%d.%d", &major, &minor, &micro ) == 3 ) if ( sscanf( "$LIBPARTED_VERSION", "%d.%d.%d", &min_major, &min_minor, &min_micro ) == 3 )
printf( "Found libparted %s\t", ped_get_version() ) ; {
if ( sscanf( ped_get_version(), "%d.%d.%d", &major, &minor, &micro ) == 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 dnl GTKMM