Support the conditional build related to package manager 13/31613/1
authorJihoon Kim <jihoon48.kim@samsung.com>
Tue, 20 May 2014 08:01:17 +0000 (17:01 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Mon, 8 Dec 2014 01:39:11 +0000 (10:39 +0900)
Change-Id: I5febea77fd06e7886a59503544e48d1a50b0dbb3

configure.ac
ism/extras/efl_panel/isf_panel_efl.cpp

index acf6f4f..072cadb 100755 (executable)
@@ -317,7 +317,9 @@ PKG_CHECK_MODULES(FEEDBACK, [feedback],
 PKG_CHECK_MODULES(PACKAGE_MANAGER, [capi-appfw-package-manager])
 
 # Check core package manager
-PKG_CHECK_MODULES(PKGMGR_INFO, [pkgmgr-info])
+PKG_CHECK_MODULES(PKGMGR_INFO, [pkgmgr-info],
+                  [ISF_HAS_PKGMGR_INFO=yes],
+                  [ISF_HAS_PKGMGR_INFO=no])
 
 if test "$ISF_HAS_VCONF" = "yes"; then
   AC_DEFINE(HAVE_VCONF,1,[Have VConf functions.])
@@ -345,6 +347,10 @@ if test "$ISF_HAS_NOTIFICATION" = "yes"; then
   AC_DEFINE(HAVE_NOTIFICATION,1,[Have Notification functions.])
 fi
 
+if test "$ISF_HAS_PKGMGR_INFO" = "yes"; then
+  AC_DEFINE(HAVE_PKGMGR_INFO,1,[Have Package manager functions.])
+fi
+
 # Check GTK2 library
 PKG_CHECK_MODULES(GTK2, [gtk+-2.0 >= 2.4.0 pango >= 1.1.0 gdk-pixbuf-2.0 >= 2.4.0],
                   [SCIM_HAS_GTK2=yes],
index c0dfb2d..1ab325f 100644 (file)
 #if HAVE_BLUETOOTH
 #include <bluetooth.h>
 #endif
+#if HAVE_PKGMGR_INFO
 #include <package_manager.h>
 #include <pkgmgr-info.h>
+#endif
 
 using namespace scim;
 
@@ -392,7 +394,9 @@ static Ecore_File_Monitor *_osp_helper_ise_em               = NULL;
 static Ecore_File_Monitor *_osp_keyboard_ise_em             = NULL;
 static OSPEmRepository     _osp_bin_em;
 static OSPEmRepository     _osp_info_em;
+#if HAVE_PKGMGR_INFO
 static package_manager_h   pkgmgr                           = NULL;
+#endif
 
 static bool               _launch_ise_on_request            = false;
 static bool               _soft_keyboard_launched           = false;
@@ -1018,6 +1022,7 @@ static unsigned int get_ise_index (const String uuid)
     return index;
 }
 
+#if HAVE_PKGMGR_INFO
 static bool
 app_info_cb (package_info_app_component_type_e comp_type, const char *app_id, void *user_data)
 {
@@ -1143,6 +1148,7 @@ static void _package_manager_event_cb (const char *type, const char *package, pa
         }
     }
 }
+#endif
 
 /**
  * @brief Get ISE module file path.
@@ -1446,10 +1452,12 @@ static void delete_ise_directory_em (void) {
     _osp_bin_em.clear ();
     _osp_info_em.clear ();
 
+#if HAVE_PKGMGR_INFO
     if (pkgmgr) {
         package_manager_destroy (pkgmgr);
         pkgmgr = NULL;
     }
+#endif
 }
 
 /**
@@ -1505,10 +1513,12 @@ static void add_ise_directory_em (void) {
 
     add_monitor_for_all_osp_modules ();
 
+#if HAVE_PKGMGR_INFO
     if (!pkgmgr) {
         package_manager_create (&pkgmgr);
         package_manager_set_event_cb (pkgmgr, _package_manager_event_cb, NULL);
     }
+#endif
 }
 
 /**