[Spice-commits] 2 commits - configure.ac gtk/Makefile.am gtk/spice-glib-sym-file gtk/spice-gtk-sym-file

Christophe Fergau teuf at kemper.freedesktop.org
Wed Aug 8 07:48:49 PDT 2012


 configure.ac            |   22 ++++++++-----
 gtk/Makefile.am         |   16 ++++++---
 gtk/spice-glib-sym-file |   78 ++++++++++++++++++++++++++++++++++++++++++++++++
 gtk/spice-gtk-sym-file  |   23 ++++++++++++++
 4 files changed, 125 insertions(+), 14 deletions(-)

New commits:
commit 5bf72a2e33dc33bc2e2be076dd3732ee6c53c72f
Author: Christophe Fergeau <cfergeau at redhat.com>
Date:   Tue Aug 7 18:05:09 2012 +0200

    build: generate sym-file
    
    When -Wl,--version-script is not available, we fallback to using
    libtool --export-symbols feature, but the needed sym-file is missing
    from git. This commit adds generation of the sym-file to the
    update-map-file Makefile target, and adds a sym-file to git.
    The linker on OSX Lion doesn't like to have non-existing symbols
    specified in the symbol files it's given, so the symbols need to
    be split in glib symbols and gtk symbols.

diff --git a/gtk/Makefile.am b/gtk/Makefile.am
index 785736d..344c028 100644
--- a/gtk/Makefile.am
+++ b/gtk/Makefile.am
@@ -55,9 +55,11 @@ lib_LTLIBRARIES += libspice-client-gtk-3.0.la
 endif
 
 if HAVE_LD_VERSION_SCRIPT
-VERSION_LDFLAGS = -Wl,--version-script=${srcdir}/map-file
+GLIB_VERSION_LDFLAGS = -Wl,--version-script=${srcdir}/map-file
+GTK_VERSION_LD_FLAGS = $(GLIB_VERSION_LDFLAGS)
 else
-VERSION_LDFLAGS = -export-symbols ${srcdir}/sym-file
+GLIB_VERSION_LDFLAGS = -export-symbols ${srcdir}/spice-glib-sym-file
+GTK_VERSION_LDFLAGS = -export-symbols ${srcdir}/spice-gtk-sym-file
 endif
 
 KEYMAP_GEN = $(srcdir)/keymap-gen.pl
@@ -99,7 +101,7 @@ AM_CPPFLAGS =					\
 SPICE_GTK_LDFLAGS_COMMON =		\
 	-version-info 4:0:0		\
 	-no-undefined			\
-	$(VERSION_LDFLAGS)		\
+	$(GTK_VERSION_LDFLAGS)		\
 	$(NULL)
 
 SPICE_GTK_LIBADD_COMMON =		\
@@ -169,7 +171,7 @@ nodist_libspice_client_gtkinclude_HEADERS =	\
 libspice_client_glib_2_0_la_LDFLAGS =	\
 	-version-info 8:0:0		\
 	-no-undefined			\
-	$(VERSION_LDFLAGS)		\
+	$(GLIB_VERSION_LDFLAGS)		\
 	$(NULL)
 
 libspice_client_glib_2_0_la_LIBADD =					\
@@ -637,12 +639,16 @@ typelibs_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
 CLEANFILES += $(gir_DATA) $(typelibs_DATA)
 endif
 
-update-map-file:
+update-symbol-files:
 	( echo "SPICEGTK_1 {" ; \
 	  echo "global:" ; \
 	  ctags -f - --c-kinds=p $(libspice_client_gtkinclude_HEADERS) $(nodist_libspice_client_gtkinclude_HEADERS) $(libspice_client_glibinclude_HEADERS) $(nodist_libspice_client_glibinclude_HEADERS) | awk '/^spice_/ { print $$1 ";" }' | sort ; \
 	  echo "local:" ;  \
 	  echo "*;" ; \
 	  echo "};" ) > $(srcdir)/map-file
+	( ctags -f - --c-kinds=p $(libspice_client_glibinclude_HEADERS) $(nodist_libspice_client_glibinclude_HEADERS) | awk '/^spice_/ { print $$1 }' | sort ; \
+	) > $(srcdir)/spice-glib-sym-file
+	( ctags -f - --c-kinds=p $(libspice_client_gtkinclude_HEADERS) $(nodist_libspice_client_gtkinclude_HEADERS) | awk '/^spice_/ { print $$1 }' | sort ; \
+	) > $(srcdir)/spice-gtk-sym-file
 
 -include $(top_srcdir)/git.mk
diff --git a/gtk/spice-glib-sym-file b/gtk/spice-glib-sym-file
new file mode 100644
index 0000000..2c7c33a
--- /dev/null
+++ b/gtk/spice-glib-sym-file
@@ -0,0 +1,78 @@
+spice_audio_get
+spice_audio_get_type
+spice_audio_new
+spice_channel_connect
+spice_channel_destroy
+spice_channel_disconnect
+spice_channel_event_get_type
+spice_channel_get_type
+spice_channel_new
+spice_channel_open_fd
+spice_channel_set_capability
+spice_channel_test_capability
+spice_channel_test_common_capability
+spice_channel_type_to_string
+spice_client_error_quark
+spice_cursor_channel_get_type
+spice_display_channel_get_type
+spice_display_get_primary
+spice_get_option_group
+spice_g_signal_connect_object
+spice_inputs_button_press
+spice_inputs_button_release
+spice_inputs_channel_get_type
+spice_inputs_key_press
+spice_inputs_key_release
+spice_inputs_lock_get_type
+spice_inputs_motion
+spice_inputs_position
+spice_inputs_set_key_locks
+spice_main_agent_test_capability
+spice_main_channel_get_type
+spice_main_clipboard_grab
+spice_main_clipboard_notify
+spice_main_clipboard_release
+spice_main_clipboard_request
+spice_main_clipboard_selection_grab
+spice_main_clipboard_selection_notify
+spice_main_clipboard_selection_release
+spice_main_clipboard_selection_request
+spice_main_send_monitor_config
+spice_main_set_display
+spice_main_set_display_enabled
+spice_playback_channel_get_type
+spice_playback_channel_set_delay
+spice_record_channel_get_type
+spice_record_send_data
+spice_session_connect
+spice_session_disconnect
+spice_session_get_channels
+spice_session_get_read_only
+spice_session_get_type
+spice_session_has_channel_type
+spice_session_migration_get_type
+spice_session_new
+spice_session_open_fd
+spice_session_verify_get_type
+spice_set_session_option
+spice_smartcard_channel_get_type
+spice_smartcard_manager_get
+spice_smartcard_manager_get_type
+spice_smartcard_manager_insert_card
+spice_smartcard_manager_remove_card
+spice_smartcard_reader_get_type
+spice_smartcard_reader_is_software
+spice_usb_device_get_description
+spice_usb_device_get_type
+spice_usb_device_manager_can_redirect_device
+spice_usb_device_manager_connect_device_async
+spice_usb_device_manager_connect_device_finish
+spice_usb_device_manager_disconnect_device
+spice_usb_device_manager_get
+spice_usb_device_manager_get_devices
+spice_usb_device_manager_get_type
+spice_usb_device_manager_is_device_connected
+spice_usbredir_channel_get_type
+spice_util_get_debug
+spice_util_get_version_string
+spice_util_set_debug
diff --git a/gtk/spice-gtk-sym-file b/gtk/spice-gtk-sym-file
new file mode 100644
index 0000000..1574e07
--- /dev/null
+++ b/gtk/spice-gtk-sym-file
@@ -0,0 +1,23 @@
+spice_display_copy_to_guest
+spice_display_get_grab_keys
+spice_display_get_pixbuf
+spice_display_get_type
+spice_display_key_event_get_type
+spice_display_mouse_ungrab
+spice_display_new
+spice_display_new_with_monitor
+spice_display_paste_from_guest
+spice_display_send_keys
+spice_display_set_grab_keys
+spice_grab_sequence_as_string
+spice_grab_sequence_copy
+spice_grab_sequence_free
+spice_grab_sequence_get_type
+spice_grab_sequence_new
+spice_grab_sequence_new_from_string
+spice_gtk_session_copy_to_guest
+spice_gtk_session_get
+spice_gtk_session_get_type
+spice_gtk_session_paste_from_guest
+spice_usb_device_widget_get_type
+spice_usb_device_widget_new
commit 8955614755b4f49974f779a5e9a7cb6a427cd9f2
Author: Christophe Fergeau <cfergeau at redhat.com>
Date:   Tue Aug 7 16:19:14 2012 +0200

    build: add --enable-smartcard=auto support
    
    Currently, when running configure with no arguments, smartcard
    support is enabled by default, and configure will fail if it cannot
    find libcacard. This commit adds a --enable-smartcard=auto mode to
    configure which will use automatically enable smartcard support if
    libcacard is available, but it will be silently disabled if libcacard
    is not available. Passing --enable-smartcard will fail if libcacard
    is not available. Passing --disable-smartcard will always disable
    smartcard support and will not test for libcacard availability.

diff --git a/configure.ac b/configure.ac
index e246f16..38ceeab 100644
--- a/configure.ac
+++ b/configure.ac
@@ -321,17 +321,21 @@ AC_SUBST(Z_LIBS)
 
 AC_ARG_ENABLE([smartcard],
   AS_HELP_STRING([--enable-smartcard=@<:@yes/no@:>@],
-                 [Enable smartcard support @<:@default=yes@:>@]),
+                 [Enable smartcard support @<:@default=auto@:>@]),
   [],
-  [enable_smartcard="yes"])
+  [enable_smartcard="auto"])
 
-if test "x$enable_smartcard" = "xno"; then
-  AM_CONDITIONAL(WITH_SMARTCARD, false)
-else
-  PKG_CHECK_MODULES(SMARTCARD, libcacard >= 0.1.2)
-  AC_DEFINE(USE_SMARTCARD, [1], [Define if supporting smartcard proxying])
-  AM_CONDITIONAL(WITH_SMARTCARD, true)
+have_smartcard=no
+if test "x$enable_smartcard" != "xno"; then
+  PKG_CHECK_MODULES(SMARTCARD, libcacard >= 0.1.2, [have_smartcard=yes], [have_smartcard=no])
+  if test "x$enable_smartcard" != "xauto" && test "x$have_smartcard" = "xno"; then
+    AC_MSG_ERROR("Smartcard support requested but libcacard could not be found")
+  fi
+  if test "x$have_smartcard" = "xyes"; then
+    AC_DEFINE(USE_SMARTCARD, [1], [Define if supporting smartcard proxying])
+  fi
 fi
+AM_CONDITIONAL([WITH_SMARTCARD], [test "x$have_smartcard" = "xyes"])
 
 AC_ARG_ENABLE([usbredir],
   AS_HELP_STRING([--enable-usbredir=@<:@auto/yes/no@:>@],
@@ -656,7 +660,7 @@ AC_MSG_NOTICE([
         Audio:                    ${with_audio}
         Target:                   ${red_target}
         SASL support:             ${enable_sasl}
-        Smartcard support:        ${enable_smartcard}
+        Smartcard support:        ${have_smartcard}
         USB redirection support:  ${have_usbredir}
         Gtk:                      $GTK_API_VERSION
 


More information about the Spice-commits mailing list