From 8c463b59fdd3696e7d27c187eb59b49d84ba4967 Mon Sep 17 00:00:00 2001 From: mainzelm Date: Tue, 2 Dec 2003 12:10:28 +0000 Subject: [PATCH] Build with xft support. --- c/Makefile.am | 23 ++++++++++++++--------- c/libs/Makefile.am | 10 ++++++++++ c/xlib/Makefile.am | 8 ++++---- configure.in | 2 +- scheme/Makefile.am | 4 +++- scheme/load-scx.scm.in | 8 +++++++- 6 files changed, 39 insertions(+), 16 deletions(-) create mode 100644 c/libs/Makefile.am diff --git a/c/Makefile.am b/c/Makefile.am index 3f77957..658c680 100644 --- a/c/Makefile.am +++ b/c/Makefile.am @@ -1,10 +1,15 @@ -SUBDIRS = xlib +SUBDIRS = xlib libs -EXTRA_DIST= \ - xt/resource.c \ - xt/widget.c \ - libs/xrender.c \ - libs/xft.c \ - libs/xft.h \ - libs/xpm.c \ - libs/xrender.h +libsys_LTLIBRARIES = libscx.la + +libscx_la_SOURCES = + +libscx_la_LIBADD = xlib/libscxx11.la libs/libscxxft.la +# EXTRA_DIST= \ +# xt/resource.c \ +# xt/widget.c \ +# libs/xrender.c \ +# libs/xft.c \ +# libs/xft.h \ +# libs/xpm.c \ +# libs/xrender.h diff --git a/c/libs/Makefile.am b/c/libs/Makefile.am new file mode 100644 index 0000000..6e6377e --- /dev/null +++ b/c/libs/Makefile.am @@ -0,0 +1,10 @@ +INCLUDES = -I@top_srcdir@/c/xlib -I@top_srcdir@/c/libs -I@x_includes@ \ + -I@top_srcdir@/c -I@scsh_includes@ + +noinst_LTLIBRARIES = libscxxft.la + +libscxxft_la_SOURCES = \ + xft.c xrender.c + +libscxxft_la_LIBADD = $(X_LIBS) -lXft +libscxxft_la_LDFLAGS= -avoid-version -module diff --git a/c/xlib/Makefile.am b/c/xlib/Makefile.am index bab05ec..f85ec68 100644 --- a/c/xlib/Makefile.am +++ b/c/xlib/Makefile.am @@ -1,13 +1,13 @@ INCLUDES = -I@top_srcdir@/c/xlib -I@top_srcdir@/c/libs -I@x_includes@ \ -I@top_srcdir@/c -I@scsh_includes@ -libsys_LTLIBRARIES = libscx.la +noinst_LTLIBRARIES = libscxx11.la -libscx_la_SOURCES = \ +libscxx11_la_SOURCES = \ client.c colormap.c cursor.c display.c error.c event-types.c \ event.c font.c gcontext.c grab.c graphics.c init.c key.c \ pixmap.c property.c region.c text.c types.c util.c visual.c window.c \ wm.c xlib.h -libscx_la_LIBADD = $(X_PRE_LIBS) $(X_LIBS) $(X_EXTRA_LIBS) -lX11 -libscx_la_LDFLAGS= -avoid-version -module +libscxx11_la_LIBADD = $(X_PRE_LIBS) $(X_LIBS) $(X_EXTRA_LIBS) -lX11 +libscxx11_la_LDFLAGS= -avoid-version -module diff --git a/configure.in b/configure.in index d0bd923..503218d 100644 --- a/configure.in +++ b/configure.in @@ -58,4 +58,4 @@ AC_SUBST(x_libraries) AC_SUBST(extra_objects) -AC_OUTPUT([Makefile c/Makefile c/xlib/Makefile scheme/Makefile]) +AC_OUTPUT([Makefile c/Makefile c/xlib/Makefile c/libs/Makefile scheme/Makefile]) diff --git a/scheme/Makefile.am b/scheme/Makefile.am index 5c07e08..262e14b 100644 --- a/scheme/Makefile.am +++ b/scheme/Makefile.am @@ -46,11 +46,13 @@ CLEANFILES= load-scx.scm load-scx.scm: $(srcdir)/load-scx.scm.in sed -e "s|@scxschemedir@|`pwd`/$(srcdir)|g" \ -e "s|@scxhost@||g" \ - -e "s|@scxlibdir@|`pwd`/../c/xlib/.libs|g" $< > $@ + -e "s|@scxlibdir@|`pwd`/../c/xlib/.libs|g" \ + -e "s|@scxload_xft_packages@|$(load_xft_packages)|g" $< > $@ install-data-hook: sed -e "s|@scxschemedir@|$(schemedir)|g" \ -e "s|@scxhost@|(host)|g" \ -e "s|@scxlibdir@|$(libdir)|g" \ + -e "s|@scxload_xft_packages@|$(load_xft_packages)|g" \ $(srcdir)/load-scx.scm.in \ > $(DESTDIR)/$(schemedir)/load-scx.scm diff --git a/scheme/load-scx.scm.in b/scheme/load-scx.scm.in index 8f38a4c..8cf4aba 100644 --- a/scheme/load-scx.scm.in +++ b/scheme/load-scx.scm.in @@ -9,9 +9,15 @@ (run '(let ((initializer-name "scx_init_xlib") (module-file (string-append "@scxlibdir@/" @scxhost@ "/libscx.so"))) (dynamic-load module-file) - (call-external (get-external initializer-name)))) + (call-external (get-external initializer-name)) + (if (string=? "@scxload_xft_packages@" "yes") + (begin + (call-external (get-external "scx_xft_init")) + (call-external (get-external "scx_xrender_init")))))) (config) (load "@scxschemedir@/xlib/xlib-interfaces.scm") (load "@scxschemedir@/xlib/xlib-packages.scm") +(load "@scxschemedir@/libs/libs-interfaces.scm") +(load "@scxschemedir@/libs/libs-packages.scm")