Use automake and build a shared object
This commit is contained in:
parent
eaf3c362ba
commit
425060a1b2
|
@ -0,0 +1,16 @@
|
|||
SUBDIRS = c
|
||||
|
||||
scheme/load-scx.scm:
|
||||
(echo '(user)'; \
|
||||
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 "xlib/xlib-interfaces.scm")'; \
|
||||
echo '(load "xlib/xlib-packages.scm")'; \
|
||||
) > $@
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
SUBDIRS = xlib
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
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
|
||||
|
||||
libscx_la_SOURCES = \
|
||||
client.c colormap.c cursor.c display.c error.c event-types.c \
|
||||
event.c extension.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_a_LDFLAGS = -export-dynamic
|
|
@ -45,6 +45,11 @@ extern void scx_init_visual();
|
|||
extern void scx_init_region();
|
||||
extern void scx_init_event_types();
|
||||
|
||||
#ifdef WITH_XFT
|
||||
extern void scx_xft_init();
|
||||
extern void scx_xrender_init();
|
||||
#endif
|
||||
|
||||
void scx_init_xlib(void) {
|
||||
S48_EXPORT_FUNCTION(scx_Xlib_Release_4_Or_Later);
|
||||
S48_EXPORT_FUNCTION(scx_Xlib_Release_5_Or_Later);
|
||||
|
@ -71,6 +76,14 @@ void scx_init_xlib(void) {
|
|||
scx_init_util();
|
||||
scx_init_event_types();
|
||||
scx_init_region();
|
||||
|
||||
/*extern void scx_init_xpm();*/
|
||||
|
||||
#ifdef WITH_XFT
|
||||
s48_add_external_init(scx_xft_init);
|
||||
s48_add_external_init(scx_xrender_init);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -3,7 +3,9 @@
|
|||
#ifndef _SCX_XLIB_H
|
||||
#define _SCX_XLIB_H
|
||||
|
||||
#include "c/config.h"
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <X11/X.h>
|
||||
#include <X11/Xlib.h>
|
||||
|
|
17
configure.in
17
configure.in
|
@ -2,8 +2,16 @@
|
|||
|
||||
define([SCX_PREPEND], [[$2]="$[$2] [$1]"])
|
||||
|
||||
AC_INIT
|
||||
AC_CONFIG_HEADER(c/config.h)
|
||||
AC_INIT(scx, 0.1)
|
||||
AC_CONFIG_SRCDIR(configure.in)
|
||||
AM_INIT_AUTOMAKE
|
||||
|
||||
AC_CONFIG_HEADERS(c/config.h)
|
||||
|
||||
AC_PROG_LIBTOOL
|
||||
|
||||
|
||||
|
||||
AC_PROG_CC
|
||||
|
||||
AC_PATH_X
|
||||
|
@ -49,9 +57,6 @@
|
|||
#AC_CHECK_HEADER(scheme48.h)
|
||||
#AC_CHECK_LIB(scsh/libscsh.a, scsh_access)
|
||||
|
||||
AC_CHECK_LIB(crypt, crypt)
|
||||
AC_CHECK_LIB(dl, dlopen)
|
||||
AC_CHECK_LIB(m, exp)
|
||||
|
||||
#if no_x == 'yes' fail ...
|
||||
|
||||
|
@ -61,4 +66,4 @@
|
|||
AC_SUBST(x_libraries)
|
||||
AC_SUBST(extra_objects)
|
||||
|
||||
AC_OUTPUT(Makefile)
|
||||
AC_OUTPUT([Makefile c/Makefile c/xlib/Makefile])
|
||||
|
|
Loading…
Reference in New Issue