])
fi
- dnl Decide whether we're using static or dynamic libraries.
- if test "${enable_static_libs}" = no; then
- AC_CHECK_FUNC([dlopen],
+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"`
+ CPPFLAGS="${CPPFLAGS} ${FOO}"
+ fi
+ if test "x${x_libraries}" != x; then
+ FOO=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
+ LDFLAGS="${LDFLAGS} ${FOO}"
+ fi
+ MODULE_LIBS="-lX11 ${MODULE_LIBS}"
+ MODULE_BASES="${MODULE_BASES} prx11"
+ MODULE_AUX_BASES="${MODULE_AUX_BASES} x11base x11color x11graph x11term"
+fi
+
+ dnl Check for dynamic loader support.
+ AC_CHECK_FUNC([dlopen],
+ [],
+ [
+ AC_CHECK_LIB([dl], [dlopen],
[
- LIBS="${STATIC_LIBS} ${LIBS}"
+ AC_DEFINE([HAVE_LIBDL], [1],
+ [Define to 1 if you have the `dl' library (-ldl).])
+ LIBS="-ldl ${LIBS}"
],
[
- AC_CHECK_LIB([dl], [dlopen],
- [
- AC_DEFINE([HAVE_LIBDL], [1],
- [Define to 1 if you have the `dl' library (-ldl).])
- LIBS="${STATIC_LIBS} -ldl ${LIBS}"
- ],
- [
- if test ${mit_scheme_native_code} = c; then
- AC_MSG_ERROR(
- [--enable-native-code=c requires dynamic loader support])
- fi
- enable_static_libs=yes
- ])
+ if test ${mit_scheme_native_code} = c; then
+ AC_MSG_ERROR(
+ [--enable-native-code=c requires dynamic loader support])
+ fi
])
- fi
- if test ${enable_static_libs} != no; then
- STATIC_LIBS=${MODULE_LIBS}${STATIC_LIBS}
- else
- STATIC_LIBS=
- OPTIONAL_BASES="${OPTIONAL_BASES} pruxdld"
- AC_DEFINE([UX_DLD_ENABLED], [1],
- [Define to 1 if unix dynamic loading support is enabled.])
- fi
+ ])
+ OPTIONAL_BASES="${OPTIONAL_BASES} pruxdld"
+ AC_DEFINE([UX_DLD_ENABLED], [1],
+ [Define to 1 if unix dynamic loading support is enabled.])
if test ${enable_valgrind_mode} != no; then
SCHEME_DEFS="${SCHEME_DEFS} -DVALGRIND_MODE"