- Respect LDFLAGS in configure.
- Let automake figure out the .lo files.
- Specify -lX11 only if no pkg-config.
AM_CPPFLAGS = -I@MIT_SCHEME_INCLUDEDIR@
AM_CFLAGS = @MIT_CFLAGS@
-LIBS = @MIT_LIBS@
-LDFLAGS = @MIT_LIBS@
-
-x11_shim_la_LIBADD = x11base.lo x11color.lo x11graph.lo x11term.lo
-c_sources = x11-shim.h x11.h x11base.c x11color.c x11graph.c x11term.c
-x11_shim_la_LDFLAGS = -module -avoid-version -shared -lX11
+x11_shim_la_LIBADD = @MIT_LIBS@
+x11_shim_la_SOURCES = x11base.c x11color.c x11graph.c x11term.c x11-shim.c
+x11_shim_la_LDFLAGS = -module -avoid-version -shared
noinst_PROGRAMS = x11-const
x11_const_SOURCES = x11-const.c x11-shim.h
fi
if test "x${x_libraries}" != x; then
FOO=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
- MIT_LIBS="${MIT_LIBS} ${FOO}"
+ MIT_LIBS="${MIT_LIBS} ${FOO} -lX11"
elif pkg-config --exists x11 2>/dev/null; then
MIT_LIBS="${MIT_LIBS} `pkg-config --libs x11`"
+ else
+ MIT_LIBS="${MIT_LIBS} -lX11"
fi
fi