#AM_MAKEINFOHTMLFLAGS = --no-split
AM_CPPFLAGS = -I@MIT_SCHEME_INCLUDEDIR@
-AM_CFLAGS = `pkg-config --cflags x11`
-AM_CFLAGS += @MIT_CFLAGS@
+AM_CFLAGS = @MIT_CFLAGS@
-LIBS = `pkg-config --libs x11`
+LIBS = @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
AC_PROG_CPP
AC_PROG_INSTALL
+MIT_CFLAGS=
+MIT_LIBS=
+
if test ${GCC} = yes; then
- MIT_CFLAGS="-Wall -Wundef -Wpointer-arith -Winline"
+ MIT_CFLAGS="${MIT_CFLAGS} -Wall -Wundef -Wpointer-arith -Winline"
MIT_CFLAGS="${MIT_CFLAGS} -Wstrict-prototypes -Wnested-externs"
MIT_CFLAGS="${MIT_CFLAGS} -Wredundant-decls"
[AC_MSG_RESULT([no])])
fi
+AC_PATH_X
AC_CHECK_PROG([PKG_CONFIG], [pkg-config], [yes])
-if ! pkg-config --exists x11 2>/dev/null; then
- AC_MSG_ERROR([X11 not found.])
+AC_CHECK_HEADERS([malloc.h])
+
+
+dnl Add support for X if present.
+if test "${no_x}" != yes; then
+ if test "x${x_includes}" != x; then
+ FOO=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
+ MIT_CFLAGS="${MIT_CFLAGS} ${FOO}"
+ elif pkg-config --exists x11 2>/dev/null; then
+ MIT_CFLAGS="${MIT_CFLAGS} `pkg-config --cflags x11`"
+ fi
+ if test "x${x_libraries}" != x; then
+ FOO=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
+ MIT_LIBS="${MIT_LIBS} ${FOO}"
+ elif pkg-config --exists x11 2>/dev/null; then
+ MIT_LIBS="${MIT_LIBS} `pkg-config --libs x11`"
+ fi
fi
MIT_SCHEME_PROJECT=mit-scheme
${MIT_SCHEME_PKD}: stamp-scheme"
AC_SUBST([MIT_CFLAGS])
+AC_SUBST([MIT_LIBS])
AC_SUBST([MIT_SCHEME_PROJECT])
AC_SUBST([MIT_SCHEME_EXE])
AC_SUBST([MIT_SCHEME_LIBDIR])