eeze: handle all version back as we did in 1.7. hopefuly.
authorCedric BAIL <cedric.bail@samsung.com>
Wed, 6 Mar 2013 14:07:39 +0000 (23:07 +0900)
committerCedric BAIL <cedric.bail@samsung.com>
Wed, 6 Mar 2013 14:07:39 +0000 (23:07 +0900)
configure.ac
src/Makefile_Eeze.am

index e1c90cda9e9463959e05c201ab0539bcb34d86d0..c1776a85cc79b699feec94c7fab6f0fb351312ec 100644 (file)
@@ -3134,18 +3134,33 @@ EFL_OPTIONAL_DEPEND_PKG([EEZE], [${want_libmount}],
    [EEZE_MOUNT], [mount >= 2.18.0])
 EFL_ADD_FEATURE([EEZE], [libmount], [${have_eeze_mount}])
 
+PKG_CHECK_EXISTS([mount < 2.19.0],
+                [have_libmount_old="yes"],
+                [have_libmount_old="no"])
+AC_MSG_CHECKING([Use old libmount API (before 2.19.0)])
+AC_MSG_RESULT([${have_libmount_old}])
+
+PKG_CHECK_EXISTS([mount == 2.19.0],
+                [have_libmount_219="yes"],
+                [have_libmount_219="no"])
+AC_MSG_CHECKING([Use libmount 2.19.0 API])
+AC_MSG_RESULT([${have_libmount_219}])
+
 PKG_CHECK_EXISTS([mount > 2.19.0],
                 [have_libmount_new="yes"],
                 [have_libmount_new="no"])
-AC_MSG_CHECKING([Use new libmount API (older that 2.19.0)])
+AC_MSG_CHECKING([Use new libmount API (older than 2.19.0)])
 AC_MSG_RESULT([${have_libmount_new}])
 
-AM_CONDITIONAL([EEZE_LIBMOUNT_NEW], [test "x${have_libmount_new}" = "xyes"])
-if test "x${have_libmount_new}" = "xno"; then
+AM_CONDITIONAL([EEZE_LIBMOUNT_AFTER_219],
+              [test "x${have_libmount_new}" = "xyes"])
+if test "x${have_libmount_old}" = "xyes"; then
   AC_DEFINE_UNQUOTED([OLD_LIBMOUNT], [1], [using first version of libmount])
 fi
 
-AM_CONDITIONAL([EEZE_NOLIBMOUNT], [test "x${have_eeze_mount}" = "xno"])
+AM_CONDITIONAL([EEZE_LIBMOUNT_BEFORE_219],
+               [test "x${have_libmount_old}" = "xyes"])
+AM_CONDITIONAL([HAVE_EEZE_MOUNT], [test "x${have_eeze_mount}" = "xno"])
 
 ## modules
 if test "${want_tizen}"  = "yes"; then
index 48080877f2d941ea0acdb2c6c015fe57defeb568..5601a3377ac50139fdb88478c2c6b6399a9497f1 100644 (file)
@@ -30,13 +30,15 @@ lib/eeze/eeze_udev_syspath.c \
 lib/eeze/eeze_udev_walk.c \
 lib/eeze/eeze_udev_watch.c
 
-if EEZE_NOLIBMOUNT
-lib_eeze_libeeze_la_SOURCES += lib/eeze/eeze_disk_libmount.c
+if HAVE_EEZE_MOUNT
+if EEZE_LIBMOUNT_BEFORE_219
+lib_eeze_libeeze_la_SOURCES += lib/eeze/eeze_disk_libmount_old.c
 else
-if EEZE_LIBMOUNT_NEW
+if EEZE_LIBMOUNT_AFTER_219
 lib_eeze_libeeze_la_SOURCES += lib/eeze/eeze_disk_libmount_new.c
 else
-lib_eeze_libeeze_la_SOURCES += lib/eeze/eeze_disk_libmount_old.c
+lib_eeze_libeeze_la_SOURCES += lib/eeze/eeze_disk_libmount.c
+endif
 endif
 endif