From 697b8289d143c420394d7746d375f6668c10f5b9 Mon Sep 17 00:00:00 2001 From: sam Date: Sat, 27 Sep 2003 15:20:14 +0000 Subject: [PATCH] * Split the xlib.la module into a shared library and a module, so that the shared library can be used by the xaw and motif modules (which I am going to split as well). git-svn-id: svn://svn.zoy.org/elk/trunk@212 55e467fa-43c5-0310-a8a2-de718669efc6 --- lib/xlib/Makefile.am | 18 ++++++++---- lib/xlib/{xerror.c => error.c} | 2 +- lib/xlib/{xobjects.c => objects.c} | 2 +- lib/xlib/{xinit.c => plugin.c} | 44 +++++++++++++++++------------- lib/xlib/xlib.h | 23 ++++++++++++++++ 5 files changed, 63 insertions(+), 26 deletions(-) rename lib/xlib/{xerror.c => error.c} (99%) rename lib/xlib/{xobjects.c => objects.c} (99%) rename lib/xlib/{xinit.c => plugin.c} (74%) diff --git a/lib/xlib/Makefile.am b/lib/xlib/Makefile.am index 1973c40..221e07e 100644 --- a/lib/xlib/Makefile.am +++ b/lib/xlib/Makefile.am @@ -2,18 +2,21 @@ NULL = EXTRA_DIST = MISSING +lib_LTLIBRARIES = $(libelk_xlib_la) pkglib_LTLIBRARIES = $(xlib_la) if HAVE_X11 +libelk_xlib_la = libelk-xlib.la xlib_la = xlib.la endif -xlib_la_SOURCES = \ +libelk_xlib_la_SOURCES = \ client.c \ color.c \ colormap.c \ cursor.c \ display.c \ + error.c \ event.c \ extension.c \ font.c \ @@ -21,6 +24,7 @@ xlib_la_SOURCES = \ grab.c \ graphics.c \ key.c \ + objects.c \ pixel.c \ pixmap.c \ property.c \ @@ -29,13 +33,17 @@ xlib_la_SOURCES = \ util.c \ window.c \ wm.c \ - xerror.c \ - xinit.c \ - xobjects.c \ + $(NULL) +libelk_xlib_la_CFLAGS = @X_CFLAGS@ +libelk_xlib_la_LDFLAGS = -no-undefined +libelk_xlib_la_LIBADD = $(top_builddir)/src/libelk.la @X_LIBS@ + +xlib_la_SOURCES = \ + plugin.c \ $(NULL) xlib_la_CFLAGS = @X_CFLAGS@ xlib_la_LDFLAGS = -module -avoid-version -no-undefined -xlib_la_LIBADD = $(top_builddir)/src/libelk.la @X_LIBS@ +xlib_la_LIBADD = $(top_builddir)/src/libelk.la libelk-xlib.la @X_LIBS@ extensions_HEADERS = xlib.h extensionsdir = $(pkgincludedir)/extensions diff --git a/lib/xlib/xerror.c b/lib/xlib/error.c similarity index 99% rename from lib/xlib/xerror.c rename to lib/xlib/error.c index 269a4d1..3334179 100644 --- a/lib/xlib/xerror.c +++ b/lib/xlib/error.c @@ -1,4 +1,4 @@ -/* xerror.c +/* error.c * * $Id$ * diff --git a/lib/xlib/xobjects.c b/lib/xlib/objects.c similarity index 99% rename from lib/xlib/xobjects.c rename to lib/xlib/objects.c index d2b9aa2..f22246c 100644 --- a/lib/xlib/xobjects.c +++ b/lib/xlib/objects.c @@ -1,4 +1,4 @@ -/* xobjects.c +/* objects.c * * $Id$ * diff --git a/lib/xlib/xinit.c b/lib/xlib/plugin.c similarity index 74% rename from lib/xlib/xinit.c rename to lib/xlib/plugin.c index 1a1bd53..f9dc1e6 100644 --- a/lib/xlib/xinit.c +++ b/lib/xlib/plugin.c @@ -1,4 +1,4 @@ -/* xinit.c +/* plugin.c * * $Id$ * @@ -51,6 +51,30 @@ static Object P_Xlib_Release_6_Or_Laterp () { } void elk_init_xlib_init () { + /* From libelk-xlib.so */ + elk_init_xlib_client (); + elk_init_xlib_color (); + elk_init_xlib_colormap (); + elk_init_xlib_cursor (); + elk_init_xlib_display (); + elk_init_xlib_error (); + elk_init_xlib_event (); + elk_init_xlib_extension (); + elk_init_xlib_font (); + elk_init_xlib_gcontext (); + elk_init_xlib_grab (); + elk_init_xlib_graphics (); + elk_init_xlib_key (); + elk_init_xlib_objects (); + elk_init_xlib_pixel (); + elk_init_xlib_pixmap (); + elk_init_xlib_property (); + elk_init_xlib_text (); + elk_init_xlib_type (); + elk_init_xlib_util (); + elk_init_xlib_window (); + elk_init_xlib_wm (); + /* From this plugin */ Define_Primitive (P_Xlib_Release_4_Or_Laterp, "xlib-release-4-or-later?", 0, 0, EVAL); Define_Primitive (P_Xlib_Release_5_Or_Laterp, @@ -60,21 +84,3 @@ void elk_init_xlib_init () { P_Provide (Intern ("xlib.la")); } -#if defined(XLIB_RELEASE_5_OR_LATER) && (defined(sun) || defined(__sun__)) &&\ - defined(__svr4__) -/* - * Stub interface to dynamic linker routines - * that SunOS uses but didn't ship with 4.1. - * - * The C library routine wcstombs in SunOS 4.1 tries to dynamically - * load some routines using the dlsym interface, described in dlsym(3x). - * Unfortunately SunOS 4.1 does not include the necessary library, libdl. - */ - -void *dlopen() { return 0; } - -void *dlsym() { return 0; } - -int dlclose() { return -1; } - -#endif diff --git a/lib/xlib/xlib.h b/lib/xlib/xlib.h index ee8f6aa..837b735 100644 --- a/lib/xlib/xlib.h +++ b/lib/xlib/xlib.h @@ -199,6 +199,29 @@ extern Object Record_To_Vector extern unsigned long int Vector_To_Record P_((Object, unsigned int, Object, RECORD*)); +extern void elk_init_xlib_client P_(()); +extern void elk_init_xlib_color P_(()); +extern void elk_init_xlib_colormap P_(()); +extern void elk_init_xlib_cursor P_(()); +extern void elk_init_xlib_display P_(()); +extern void elk_init_xlib_error P_(()); +extern void elk_init_xlib_event P_(()); +extern void elk_init_xlib_extension P_(()); +extern void elk_init_xlib_font P_(()); +extern void elk_init_xlib_gcontext P_(()); +extern void elk_init_xlib_grab P_(()); +extern void elk_init_xlib_graphics P_(()); +extern void elk_init_xlib_key P_(()); +extern void elk_init_xlib_objects P_(()); +extern void elk_init_xlib_pixel P_(()); +extern void elk_init_xlib_pixmap P_(()); +extern void elk_init_xlib_property P_(()); +extern void elk_init_xlib_text P_(()); +extern void elk_init_xlib_type P_(()); +extern void elk_init_xlib_util P_(()); +extern void elk_init_xlib_window P_(()); +extern void elk_init_xlib_wm P_(()); + C_LINKAGE_END extern XSetWindowAttributes SWA;