2003-10-24 11:56:09 -04:00
|
|
|
define([SCX_PREPEND], [[$2]="$[$2] [$1]"])
|
|
|
|
|
2003-12-01 11:09:09 -05:00
|
|
|
AC_INIT(scx, 0.2)
|
2003-11-17 03:56:57 -05:00
|
|
|
AC_CONFIG_SRCDIR(configure.in)
|
|
|
|
AM_INIT_AUTOMAKE
|
|
|
|
|
|
|
|
AC_CONFIG_HEADERS(c/config.h)
|
|
|
|
|
2003-12-01 11:09:09 -05:00
|
|
|
AC_PROG_LIBTOOL
|
2003-11-17 03:56:57 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
2003-12-01 11:09:09 -05:00
|
|
|
AC_PROG_CC
|
2003-10-24 11:56:09 -04:00
|
|
|
|
2003-12-01 11:09:09 -05:00
|
|
|
AC_PATH_XTRA
|
2003-11-18 10:14:56 -05:00
|
|
|
|
2003-12-01 11:09:09 -05:00
|
|
|
AC_ARG_WITH(scsh-includes,
|
|
|
|
AC_HELP_STRING([--with-scsh-includes=DIR],
|
|
|
|
[scsh include files are in DIR @<:@/usr/local/include@:>@]),
|
2003-10-24 11:56:09 -04:00
|
|
|
scsh_includes=$withval,
|
|
|
|
scsh_includes=/usr/local/include)
|
|
|
|
AC_SUBST(scsh_includes)
|
|
|
|
|
|
|
|
AC_ARG_WITH(xft,
|
|
|
|
AC_HELP_STRING([--with-xft],
|
2004-02-11 17:03:12 -05:00
|
|
|
[Compile with Xft support]))
|
2003-10-24 11:56:09 -04:00
|
|
|
|
|
|
|
dnl Compile with Xft support?
|
2004-02-11 17:03:12 -05:00
|
|
|
if test "x$with_xft" = "xyes"; then
|
2003-11-24 02:08:53 -05:00
|
|
|
AC_CHECKING([xft-config program])
|
|
|
|
AC_CHECK_PROG([XFT_CONFIG], [xft-config], "yes", "no", $PATH, [])
|
|
|
|
|
|
|
|
if test "$XFT_CONFIG" = "yes"; then
|
|
|
|
SCX_PREPEND(`xft-config --libs`, x_libraries)
|
|
|
|
SCX_PREPEND(`xft-config --cflags`, x_includes)
|
|
|
|
else
|
|
|
|
LIBS="$LIBS -L${x_libraries}"
|
|
|
|
AC_CHECK_LIB(Xrender, XRenderQueryExtension, SCX_PREPEND(-lXrender, x_libraries))
|
|
|
|
AC_CHECK_LIB(Xft, XftFontOpen, SCX_PREPEND(-lXft, x_libraries))
|
|
|
|
fi
|
|
|
|
|
2003-10-24 11:56:09 -04:00
|
|
|
AC_DEFINE([WITH_XFT], 1, [Define 1 if compiling with Xft support])
|
|
|
|
SCX_PREPEND(\$(XFT_OBJECTS), extra_objects)
|
2003-10-28 05:29:21 -05:00
|
|
|
AC_SUBST(load_xft_packages, yes)
|
2003-10-24 11:56:09 -04:00
|
|
|
fi
|
2004-02-11 17:03:12 -05:00
|
|
|
AM_CONDITIONAL(WITH_XFT, test "x$with_xft" = "xyes")
|
2003-11-28 10:41:39 -05:00
|
|
|
schemedir='${prefix}'"/scheme"
|
|
|
|
libdir='${prefix}'"/lib"
|
2003-12-16 11:43:35 -05:00
|
|
|
libsysdir='${prefix}'
|
|
|
|
#${libdir}"/`scsh -lm ${srcdir}/scheme/configure.scm -o configure -c '(display (host))'`"
|
2003-11-28 10:41:39 -05:00
|
|
|
AC_SUBST(libdir)
|
2003-11-22 14:38:14 -05:00
|
|
|
AC_SUBST(libsysdir)
|
2003-11-22 15:05:09 -05:00
|
|
|
AC_SUBST(schemedir)
|
2003-03-10 21:49:51 -05:00
|
|
|
AC_SUBST(LIBS)
|
2003-10-30 03:08:15 -05:00
|
|
|
AC_SUBST(CC)
|
2003-10-24 11:56:09 -04:00
|
|
|
AC_SUBST(x_includes)
|
|
|
|
AC_SUBST(x_libraries)
|
|
|
|
AC_SUBST(extra_objects)
|
2003-03-10 21:49:51 -05:00
|
|
|
|
2003-12-16 11:43:35 -05:00
|
|
|
AC_OUTPUT([Makefile c/Makefile c/xlib/Makefile c/libs/Makefile])
|