From: Taylor R Campbell Date: Sun, 21 Oct 2018 17:14:34 +0000 (+0000) Subject: Fix automake library goo. X-Git-Tag: mit-scheme-pucked-10.1.2~16^2~174^2~8 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=c0ef3fe6b2a1fc2e1428b614d692b6a77a9100c8;p=mit-scheme.git Fix automake library goo. - Respect LDFLAGS in configure. - Let automake figure out the .lo files. - Specify -lX11 only if no pkg-config. --- diff --git a/src/x11/Makefile.am b/src/x11/Makefile.am index 7b74e2e2c..cff56dd31 100644 --- a/src/x11/Makefile.am +++ b/src/x11/Makefile.am @@ -47,12 +47,9 @@ scmlib_sub_DATA += make.scm @MIT_SCHEME_PKD@ 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 diff --git a/src/x11/configure.ac b/src/x11/configure.ac index 6260f43ef..c53faaef3 100644 --- a/src/x11/configure.ac +++ b/src/x11/configure.ac @@ -91,9 +91,11 @@ if test "${no_x}" != yes; then 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