Support conditional build of edbus 21/167921/2
authorJihoon Kim <jihoon48.kim@samsung.com>
Tue, 23 Jan 2018 04:45:22 +0000 (13:45 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Tue, 23 Jan 2018 05:14:52 +0000 (05:14 +0000)
Change-Id: I74f06fe811e303008977b0a8f0256a79e9e18337
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
configure.ac
ism/extras/efl_panel/isf_panel_efl.cpp

index c35cb20..aa70ca0 100644 (file)
@@ -320,7 +320,9 @@ PKG_CHECK_MODULES(VCONF, [vconf],
                   [ISF_HAS_VCONF=no])
 
 # Check edbus library
-PKG_CHECK_MODULES(EDBUS, [edbus])
+PKG_CHECK_MODULES(EDBUS, [edbus],
+                  [ISF_HAS_EDBUS=yes],
+                  [ISF_HAS_EDBUS=no])
 
 # Check bluetooth library
 PKG_CHECK_MODULES(BLUETOOTH, [capi-network-bluetooth],
@@ -387,6 +389,10 @@ if test "$ISF_HAS_FEEDBACK" = "yes"; then
   AC_DEFINE(HAVE_FEEDBACK,1,[Have Feedback functions.])
 fi
 
+if test "$ISF_HAS_EDBUS" = "yes"; then
+  AC_DEFINE(HAVE_EDBUS,1,[Have edbus functions.])
+fi
+
 if test "$ISF_HAS_NOTIFICATION" = "yes" && test "$enable_notification" = "yes"; then
   AC_DEFINE(HAVE_NOTIFICATION,1,[Have Notification functions.])
 fi
index 8ec6b1c..184f9b1 100644 (file)
@@ -73,7 +73,9 @@
 #include <notification.h>
 #include <notification_internal.h>
 #endif
+#ifdef HAVE_EDBUS
 #include <E_DBus.h>
+#endif
 #ifdef HAVE_BLUETOOTH
 #include <bluetooth.h>
 #endif
@@ -496,8 +498,10 @@ static bool               feedback_initialized              = false;
 #endif
 #endif /* CANDIDATE */
 
+#ifdef HAVE_EDBUS
 static E_DBus_Connection     *edbus_conn;
 static E_DBus_Signal_Handler *edbus_handler;
+#endif
 
 #if ENABLE_REMOTE_INPUT
 static Remote_Input*      remote_input_impl                 = NULL;
@@ -578,6 +582,7 @@ static int pkgmgr_get_appinfo (const char *appid, pkgmgrinfo_appinfo_h *handle)
     return ret;
 }
 
+#ifdef HAVE_EDBUS
 static void usb_keyboard_signal_cb (void *data, DBusMessage *msg)
 {
     DBusError err;
@@ -660,6 +665,7 @@ static int register_edbus_signal_handler (void)
 
     return 0;
 }
+#endif
 
 #ifdef HAVE_NOTIFICATION
 static void delete_notification (NotificationData *noti_data)
@@ -7726,8 +7732,10 @@ int main (int argc, char *argv [])
     vconf_notify_key_changed (VCONFKEY_ISF_HW_KEYBOARD_INPUT_DETECTED, keyboard_mode_changed_cb, NULL);
 #endif
 
+#ifdef HAVE_EDBUS
     if (0 != register_edbus_signal_handler ())
         LOGW ("register edbus signal fail");
+#endif
 
     try {
         /* Update ISE list */
@@ -7884,7 +7892,9 @@ cleanup:
 #endif
 #endif
 
+#ifdef HAVE_EDBUS
     unregister_edbus_signal_handler ();
+#endif
 
     if (_info_manager) {
         try {