diff --git a/Makefile.am b/Makefile.am index 375f916..cf84c45 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,17 +1 @@ -SUBDIRS = c - -scheme/load-scx.scm: - (echo '(user)'; \ - echo "(load-package 'dynamic-externals)"; \ - echo "(open 'dynamic-externals)"; \ - echo "(open 'external-calls)"; \ - echo '(run '; \ - echo " '(let ((initializer-name \"scx_init_xlib\")"; \ - echo ' (module-file "$(prefix)/lib/libscx.so"))'; \ - echo ' (dynamic-load module-file)'; \ - echo ' (call-external (get-external initializer-name))))'; \ - echo '(config)'; \ - echo '(load "$(prefix)/scheme/xlib/xlib-interfaces.scm")'; \ - echo '(load "$(prefix)/scheme/xlib/xlib-packages.scm")'; \ - ) > $@ - +SUBDIRS = c scheme diff --git a/c/xlib/Makefile.am b/c/xlib/Makefile.am index e486146..855e41e 100644 --- a/c/xlib/Makefile.am +++ b/c/xlib/Makefile.am @@ -1,7 +1,7 @@ INCLUDES = -I@top_srcdir@/c/xlib -I@top_srcdir@/c/libs -I@x_includes@ \ -I@top_srcdir@/c -I@scsh_includes@ -lib_LTLIBRARIES = libscx.la +pkglib_LTLIBRARIES = libscx.la libscx_la_SOURCES = \ client.c colormap.c cursor.c display.c error.c event-types.c \ @@ -10,4 +10,4 @@ libscx_la_SOURCES = \ wm.c xlib.h libscx_la_LIBADD = $(X_PRE_LIBS) $(X_LIBS) $(X_EXTRA_LIBS) -lX11 - +libscx_la_LDFLAGS= -avoid-version -module diff --git a/configure.in b/configure.in index 02820b7..91f6374 100644 --- a/configure.in +++ b/configure.in @@ -66,4 +66,4 @@ AC_SUBST(x_libraries) AC_SUBST(extra_objects) -AC_OUTPUT([Makefile c/Makefile c/xlib/Makefile]) +AC_OUTPUT([Makefile c/Makefile c/xlib/Makefile scheme/Makefile]) diff --git a/scheme/Makefile.am b/scheme/Makefile.am new file mode 100644 index 0000000..18418ea --- /dev/null +++ b/scheme/Makefile.am @@ -0,0 +1,53 @@ +pkgdata_SCRIPTS=load-scx.scm +nobase_pkgdata_SCRIPTS= \ + examples/hello-xft.scm \ + examples/hello.scm \ + examples/picture.scm \ + examples/regions.scm \ + examples/scxev.scm \ + libs/libs-interfaces.scm \ + libs/libs-packages.scm \ + libs/xft.scm \ + libs/xpm.scm \ + libs/xrender.scm \ + xlib/atom.scm \ + xlib/client.scm \ + xlib/colormap.scm \ + xlib/cursor.scm \ + xlib/display.scm \ + xlib/error.scm \ + xlib/event-types.scm \ + xlib/event.scm \ + xlib/extension.scm \ + xlib/font.scm \ + xlib/gcontext.scm \ + xlib/grab.scm \ + xlib/graphics.scm \ + xlib/key.scm \ + xlib/pixmap.scm \ + xlib/property.scm \ + xlib/region.scm \ + xlib/sync-event.scm \ + xlib/text.scm \ + xlib/utility.scm \ + xlib/visual.scm \ + xlib/window.scm \ + xlib/wm.scm \ + xlib/xlib-interfaces.scm \ + xlib/xlib-packages.scm \ + xt/resource-types.scm \ + xt/widget-type.scm \ + xt/widget.scm + +EXTRA_DIST= $(pkgdata_SCRIPTS) $(nobase_pkgdata_SCRIPTS) +CLEANFILES= load-scx.scm + +load-scx.scm: $(srcdir)/load-scx.scm.in + sed -e "s|@scxdatadir@|`pwd`/$(srcdir)|g" \ + -e "s|@scxlibdir@|`pwd`/../c/xlib/.libs|g" $< > $@ + +install-data-hook: + sed -e "s|@scxdatadir@|$(pkgdatadir)|g" \ + -e "s|@scxlibdir@|$(pkglibdir)|g" \ + $(srcdir)/load-scx.scm.in \ + > $(DESTDIR)/$(pkgdatadir)/load-scx.scm diff --git a/scheme/load-scx.scm.in b/scheme/load-scx.scm.in new file mode 100644 index 0000000..b6995d4 --- /dev/null +++ b/scheme/load-scx.scm.in @@ -0,0 +1,13 @@ +(user) +(load-package 'dynamic-externals) +(open 'dynamic-externals) +(open 'external-calls) +(run '(let ((initializer-name "scx_init_xlib") + (module-file "@scxlibdir@/libscx.so")) + (dynamic-load module-file) + (call-external (get-external initializer-name)))) +(config) +(load "@scxdatadir@/xlib/xlib-interfaces.scm") +(load "@scxdatadir@/xlib/xlib-packages.scm") + +