hal: Branch 'master'
Danny Kukawka
dkukawka at kemper.freedesktop.org
Tue Jan 15 05:52:20 PST 2008
configure.in | 45 +++++++++++++++++++++++----------------------
1 file changed, 23 insertions(+), 22 deletions(-)
New commits:
commit 0596ab9cfa5597c3695e3f6155990917db3c2806
Author: Danny Kukawka <danny.kukawka at web.de>
Date: Tue Jan 15 14:51:43 2008 +0100
fix configure for libparted
Since there is again a new libparted (v1.8.8), changed configure to:
- reduce checks to check for libparted 1.7.1 || >= 1.8.0 (was there any
version since 1.8.0 which didn't work?)
- try first 'pkg-config --atleast-version 1.8.0 libparted' since there is
AFAIK since 1.8.3 a working pc file for the lib
- if pkg-config check fails: try to get the version from the headers
This all should prevent add each new libparted version to configure.
diff --git a/configure.in b/configure.in
index a5ab375..d9efb89 100644
--- a/configure.in
+++ b/configure.in
@@ -240,39 +240,40 @@ AC_ARG_ENABLE([parted],
AS_HELP_STRING([--enable-parted], [Use libparted]),
[use_parted=$enableval], [use_parted=no])
if test "x$use_parted" = "xyes" ; then
- USE_PARTED=yes
- AC_DEFINE(USE_PARTED,1,[Whether libparted is to be used])
- AC_CHECK_LIB(uuid, uuid_generate, [], AC_MSG_ERROR([*** uuid library (libuuid) not found]))
- AC_CHECK_LIB(dl, dlopen, [], AC_MSG_ERROR([*** dl library (libdl) not found]))
- AC_MSG_CHECKING([for libparted == 1.7.1, 1.8.0, 1.8.1, 1.8.2, 1.8.6, 1.8.7])
- LDFLAGS=-lparted
- AC_RUN_IFELSE([AC_LANG_SOURCE([[
- #include <stdio.h>
- #include <parted/parted.h>
- int main ()
- {
+ USE_PARTED=yes
+ AC_DEFINE(USE_PARTED,1,[Whether libparted is to be used])
+ AC_CHECK_LIB(uuid, uuid_generate, [], AC_MSG_ERROR([*** uuid library (libuuid) not found]))
+ AC_CHECK_LIB(dl, dlopen, [], AC_MSG_ERROR([*** dl library (libdl) not found]))
+
+ AC_MSG_CHECKING([for libparted == 1.7.1 or >= 1.8.0])
+ if ! $PKG_CONFIG --atleast-version 1.8.0 libparted; then
+ LDFLAGS=-lparted
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
+ #include <stdio.h>
+ #include <parted/parted.h>
+ int main ()
+ {
int major ;
int minor ;
int micro ;
if ( sscanf( ped_get_version(), "%d.%d.%d", &major, &minor, µ ) == 3 )
- printf( "Found libparted %s", ped_get_version() ) ;
+ printf( "Found libparted %s", ped_get_version() ) ;
if ((major == 1 && minor == 7 && micro == 1) ||
- (major == 1 && minor == 8 && micro == 0) ||
- (major == 1 && minor == 8 && micro == 1) ||
- (major == 1 && minor == 8 && micro == 2) ||
- (major == 1 && minor == 8 && micro == 6) ||
- (major == 1 && minor == 8 && micro == 7))
- return 0;
+ (major == 1 && minor == 8 && micro >= 0))
+ return 0;
return 1;
- }
- ]])], AC_MSG_RESULT([]),
- AC_MSG_ERROR([*** Requires libparted == 1.7.1/1.8.0/1.8.1/1.8.2/1.8.6 or 1.8.7]))
+ }
+ ]])], AC_MSG_RESULT([]), AC_MSG_ERROR([*** Requires libparted == 1.7.1 or >= 1.8.0]))
+
PARTED_LIBS=-lparted
- AC_SUBST(PARTED_LIBS)
LDFLAGS=
+ else
+ PKG_CHECK_MODULES(PARTED, libparted)
+ fi
+ AC_SUBST(PARTED_LIBS)
else
USE_PARTED=no
fi
More information about the hal-commit
mailing list