Skip to content

Commit

Permalink
Drop visibility code and use new xdt functions.
Browse files Browse the repository at this point in the history
  • Loading branch information
nschermer committed Oct 18, 2009
1 parent 34a5e7d commit f0bf11f
Show file tree
Hide file tree
Showing 13 changed files with 110 additions and 469 deletions.
2 changes: 1 addition & 1 deletion autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ EOF
exit 1
}

XDT_AUTOGEN_REQUIRED_VERSION="4.7.0" exec xdt-autogen $@
XDT_AUTOGEN_REQUIRED_VERSION="4.7.2" exec xdt-autogen $@

# vi:set ts=2 sw=2 et ai:
105 changes: 2 additions & 103 deletions configure.in.in
Original file line number Diff line number Diff line change
Expand Up @@ -192,112 +192,12 @@ GTK_DOC_CHECK([1.0])
dnl ***********************************
dnl *** Check for debugging support ***
dnl ***********************************
AC_ARG_ENABLE([debug],
AC_HELP_STRING([--enable-debug=@<:@no/minimum/yes/full@:>@], [Turn on debugging @<:@default=libxfce4ui_debug_default@:>@]),
[], [enable_debug=libxfce4ui_debug_default])
AC_MSG_CHECKING([whether to enable debugging support])
if test x"$enable_debug" = x"full" -o x"$enable_debug" = x"yes"; then
dnl Print the result
AC_MSG_RESULT([$enable_debug])

dnl Make sure we detect possible errors (if supported)
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Wall -Werror"
AC_MSG_CHECKING([whether $CC accepts -Wall -Werror])
AC_COMPILE_IFELSE(AC_LANG_SOURCE([int x;]), [
AC_MSG_RESULT([yes])
PLATFORM_CFLAGS="$PLATFORM_CFLAGS -Wall -Werror"
], [
AC_MSG_RESULT([no])
])
CFLAGS="$save_CFLAGS"

dnl Paranoia for --enable-debug=full
if test x"$enable_debug" = x"full"; then
dnl Enable extensive debugging
PLATFORM_CPPFLAGS="$PLATFORM_CPPFLAGS -DG_ENABLE_DEBUG"

dnl Use -O0 -g3 if the compiler supports it
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -O0 -g3"
AC_MSG_CHECKING([whether $CC accepts -O0 -g3])
AC_COMPILE_IFELSE(AC_LANG_SOURCE([int x;]), [
AC_MSG_RESULT([yes])
PLATFORM_CFLAGS="$PLATFORM_CFLAGS -O0 -g3"
], [
AC_MSG_RESULT([no])
])
CFLAGS="$save_CFLAGS"
fi
else
dnl Print the result
AC_MSG_RESULT([$enable_debug])

dnl Disable debugging (release build)
PLATFORM_CPPFLAGS="$PLATFORM_CPPFLAGS -DNDEBUG"

dnl Disable object cast checks
PLATFORM_CPPFLAGS="$PLATFORM_CPPFLAGS -DG_DISABLE_CAST_CHECKS"

dnl Disable all checks for --enable-debug=no
if test x"$enable_debug" = x"no"; then
PLATFORM_CPPFLAGS="$PLATFORM_CPPFLAGS -DG_DISABLE_ASSERT -DG_DISABLE_CHECKS"
fi
fi
XDT_FEATURE_DEBUG([libxfce4ui_debug_default])

dnl **************************************
dnl *** Check for linker optimizations ***
dnl **************************************
AC_MSG_CHECKING([whether $LD accepts --as-needed])
case `$LD --as-needed -v 2>&1 </dev/null` in
*GNU* | *'with BFD'*)
LDFLAGS="$LDFLAGS -Wl,--as-needed"
AC_MSG_RESULT([yes])
;;
*)
AC_MSG_RESULT([no])
;;
esac
AC_MSG_CHECKING([whether $LD accepts -O1])
case `$LD -O1 -v 2>&1 </dev/null` in
*GNU* | *'with BFD'*)
PLATFORM_LDFLAGS="$PLATFORM_LDFLAGS -Wl,-O1"
AC_MSG_RESULT([yes])
;;
*)
AC_MSG_RESULT([no])
;;
esac

dnl ****************************************
dnl *** Check for ELF visibility support ***
dnl ****************************************
AC_ARG_ENABLE([visibility], AC_HELP_STRING([--disable-visibility], [Do not use ELF visibility attributes]), [], [enable_visibility=yes])
have_gnuc_visibility=no
if test x"$enable_visibility" != x"no"; then
dnl Check whether the compiler supports the visibility attribute
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Wall -Werror"
AC_MSG_CHECKING([whether $CC supports the GNUC visibility attribute])
AC_COMPILE_IFELSE(AC_LANG_SOURCE(
[
void __attribute__ ((visibility("default"))) test_default (void) {}
void __attribute__ ((visibility("hidden"))) test_hidden (void) {}
int main (int argc, char **argv) { test_default (); test_hidden (); return 0; }
]),
[
have_gnuc_visibility=yes
AC_MSG_RESULT([yes])
],
[
AC_MSG_RESULT([no])
])
CFLAGS="$save_CFLAGS"
fi
if test x"$have_gnuc_visibility" = x"yes"; then
PLATFORM_CPPFLAGS="$PLATFORM_CPPFLAGS -DHAVE_GNUC_VISIBILITY"
fi
AM_CONDITIONAL([HAVE_GNUC_VISIBILITY], [test x"$have_gnuc_visibility" = x"yes"])
XDT_FEATURE_LINKER_OPTS()

dnl *********************************
dnl *** Substitute platform flags ***
Expand Down Expand Up @@ -360,5 +260,4 @@ echo "* Startup Notification: no"
fi
echo
echo "* Debug Support: $enable_debug"
echo "* GNU Visibility: $have_gnuc_visibility"
echo
18 changes: 2 additions & 16 deletions libxfce4ui/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ libxfce4ui_headers = \
$(libxfce4ui_enum_headers)

libxfce4ui_built_sources = \
libxfce4ui-alias.h \
libxfce4ui-aliasdef.c \
libxfce4ui-enum-types.c \
libxfce4ui-enum-types.h \
libxfce4ui-marshal.c \
Expand Down Expand Up @@ -97,16 +95,8 @@ DISTCLEANFILES = \
BUILT_SOURCES = \
$(libxfce4ui_built_sources)

if HAVE_GNUC_VISIBILITY
TESTS = \
abicheck.sh
endif

libxfce4ui-alias.h: make-libxfce4ui-alias.pl libxfce4ui.symbols
$(PERL) $(srcdir)/make-libxfce4ui-alias.pl < $(srcdir)/libxfce4ui.symbols > libxfce4ui-alias.h

libxfce4ui-aliasdef.c: make-libxfce4ui-alias.pl libxfce4ui.symbols
$(PERL) $(srcdir)/make-libxfce4ui-alias.pl -def < $(srcdir)/libxfce4ui.symbols > libxfce4ui-aliasdef.c

libxfce4ui-marshal.h: stamp-libxfce4ui-marshal.h
@true
Expand Down Expand Up @@ -136,12 +126,11 @@ stamp-libxfce4ui-enum-types.h: $(libxfce4ui_enum_headers) Makefile
echo timestamp > $(@F)
libxfce4ui-enum-types.c: $(libxfce4ui_enum_headers) Makefile
( cd $(srcdir) && glib-mkenums \
--fhead "#include <libxfce4ui/libxfce4ui.h>\n#include <libxfce4ui/libxfce4ui-alias.h>\n\n" \
--fhead "#include <libxfce4ui/libxfce4ui.h>\n\n" \
--fprod "/* enumerations from \"@filename@\" */\n\n" \
--vhead "GType\n@enum_name@_get_type(void)\n{\n static GType type = 0;\n\n if(!type) {\n static const G@Type@Value values[] = {"\
--vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
--vtail " { 0, NULL, NULL }\n\t};\n\ttype = g_@type@_register_static(\"@EnumName@\", values);\n }\n\n return type;\n}\n\n" \
--ftail "\n#define __LIBXFCE4UI_ENUM_TYPES_C__\n#include \"libxfce4ui-aliasdef.c\"\n" \
$(libxfce4ui_enum_headers) ) > xgen-letc
cp xgen-letc libxfce4ui-enum-types.c
rm -f xgen-letc
Expand All @@ -152,9 +141,6 @@ dist-hook: all

EXTRA_DIST = \
abicheck.sh \
libxfce4ui.symbols \
libxfce4ui-alias.h \
libxfce4ui-aliasdef.c \
make-libxfce4ui-alias.pl
libxfce4ui.symbols

# vi:set ts=8 sw=8 noet ai nocindent syntax=automake:
6 changes: 0 additions & 6 deletions libxfce4ui/libxfce4ui-config.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#endif

#include <libxfce4ui/libxfce4ui-config.h>
#include <libxfce4ui/libxfce4ui-alias.h>



Expand Down Expand Up @@ -79,8 +78,3 @@ libxfce4ui_check_version (guint required_major,
return "Libxfce4ui version too old (micro mismatch)";
return NULL;
}



#define __LIBXFCE4UI_CONFIG_C__
#include <libxfce4ui/libxfce4ui-aliasdef.c>
77 changes: 15 additions & 62 deletions libxfce4ui/libxfce4ui.symbols
Original file line number Diff line number Diff line change
Expand Up @@ -18,83 +18,40 @@
* Boston, MA 02111-1307, USA.
*/

/* This file lists all exported symbols. It is used to generate
* the gobject.def file used to control exports on Windows and the
* libxfce4ui-alias.h/libxfce4ui-aliasdef.c files used to avoid
* PLT entries for internal uses of exported functions (see
* make-libxfce4ui-alias.pl).
*
* Every symbol must be included in the right
* #ifdef IN_HEADER(sym) #endif and
* #ifdef IN_SOURCE(sym) #endif sections.
*/

#ifdef ALL_FILES
#define IN_HEADER(x) 1
#define IN_SOURCE(x) 1
#endif

/* libxfce4ui-config variables */
#if IN_HEADER(__LIBXFCE4UI_CONFIG_H__)
#if IN_SOURCE(__LIBXFCE4UI_CONFIG_C__)
#ifdef INCLUDE_VARIABLES
libxfce4ui_major_version
libxfce4ui_minor_version
libxfce4ui_micro_version
#endif
libxfce4ui_check_version
#endif
#endif

/* libxfce4ui-enum-types functions */
#if IN_HEADER(__LIBXFCE4UI_ENUM_TYPES_H__)
#if IN_SOURCE(__LIBXFCE4UI_ENUM_TYPES_C__)
xfce_sm_client_restart_style_get_type
xfce_sm_client_priority_get_type
xfce_sm_client_shutdown_hint_get_type
#endif
#endif

/* xfce-dialogs functions */
#if IN_HEADER(__XFCE_DIALOGS_H__)
#if IN_SOURCE(__XFCE_DIALOGS_C__)
xfce_dialog_show_info G_GNUC_PRINTF (3, 4)
xfce_dialog_show_warning G_GNUC_PRINTF (3, 4)
xfce_dialog_show_error G_GNUC_PRINTF (3, 4)
xfce_dialog_confirm G_GNUC_PRINTF (5, 6)
xfce_message_dialog_new G_GNUC_NULL_TERMINATED G_GNUC_MALLOC
xfce_message_dialog G_GNUC_NULL_TERMINATED
#endif
#endif
xfce_dialog_show_info
xfce_dialog_show_warning
xfce_dialog_show_error
xfce_dialog_confirm
xfce_message_dialog_new
xfce_message_dialog_new_valist
xfce_message_dialog

/* xfce-gdk-extensions functions */
#if IN_HEADER(__XFCE_GDK_EXTENSIONS_H__)
#if IN_SOURCE(__XFCE_GDK_EXTENSIONS_C__)
xfce_gdk_screen_get_active
#endif
#endif

/* xfce-gtk-extensions functions */
#if IN_HEADER(__XFCE_GTK_EXTENSIONS_H__)
#if IN_SOURCE(__XFCE_GTK_EXTENSIONS_C__)
xfce_gtk_button_new_mixed G_GNUC_MALLOC
xfce_gtk_frame_box_new G_GNUC_MALLOC
xfce_gtk_frame_box_new_with_content G_GNUC_MALLOC
xfce_gtk_button_new_mixed
xfce_gtk_frame_box_new
xfce_gtk_frame_box_new_with_content
xfce_gtk_window_center_on_active_screen
#endif
#endif

/* xfce-spawn functions */
#if IN_HEADER(__XFCE_SPAWN_H__)
#if IN_SOURCE(__XFCE_SPAWN_C__)
xfce_spawn_on_screen
xfce_spawn_command_line_on_screen
#endif
#endif

/* xfce-sm-client functions */
#if IN_HEADER(__XFCE_SM_CLIENT_H__)
#if IN_SOURCE(__XFCE_SM_CLIENT_C__)
xfce_sm_client_get_type
xfce_sm_client_get_option_group
xfce_sm_client_get
Expand All @@ -106,6 +63,8 @@ xfce_sm_client_is_connected
xfce_sm_client_is_resumed
xfce_sm_client_set_desktop_file
xfce_sm_client_request_shutdown
xfce_sm_client_get_current_directory
xfce_sm_client_set_current_directory
xfce_sm_client_get_client_id
xfce_sm_client_get_state_file
xfce_sm_client_set_restart_style
Expand All @@ -114,16 +73,10 @@ xfce_sm_client_set_priority
xfce_sm_client_get_priority
xfce_sm_client_set_restart_command
xfce_sm_client_get_restart_command
#endif
#endif

/* xfce-titled-dialog functions */
#if IN_HEADER(__XFCE_TITLED_DIALOG_H__)
#if IN_SOURCE(__XFCE_TITLED_DIALOG_C__)
xfce_titled_dialog_get_type G_GNUC_CONST
xfce_titled_dialog_new G_GNUC_MALLOC
xfce_titled_dialog_new_with_buttons G_GNUC_MALLOC
xfce_titled_dialog_get_type
xfce_titled_dialog_new
xfce_titled_dialog_new_with_buttons
xfce_titled_dialog_get_subtitle
xfce_titled_dialog_set_subtitle
#endif
#endif
Loading

0 comments on commit f0bf11f

Please sign in to comment.