MAJOR=4 MINOR=22 DEVNAME=tty22 "ˆl–ßi~””Ð?J}@9pOÜe¥1hßÄ ƒx!ÁÆ·# Based on: # Configure paths for LIBXML2 # Toshio Kuratomi 2001-04-21 # Adapted from: # Configure paths for GLIB # Owen Taylor 97-11-3 # # Modified to work with libxslt by Thomas Schraitle 2002/10/25 # Fixed by Edward Rudd 2004/05/12 dnl AM_PATH_XSLT([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) dnl Test for XML, and define XML_CFLAGS and XML_LIBS dnl AC_DEFUN([AM_PATH_XSLT],[ AC_ARG_WITH(xslt-prefix, [ --with-xslt-prefix=PFX Prefix where libxslt is installed (optional)], xslt_config_prefix="$withval", xslt_config_prefix="") AC_ARG_WITH(xslt-exec-prefix, [ --with-xslt-exec-prefix=PFX Exec prefix where libxslt is installed (optional)], xslt_config_exec_prefix="$withval", xslt_config_exec_prefix="") AC_ARG_ENABLE(xslttest, [ --disable-xslttest Do not try to compile and run a test LIBXSLT program],, enable_xslttest=yes) if test x$xslt_config_exec_prefix != x ; then xslt_config_args="$xslt_config_args --exec-prefix=$xslt_config_exec_prefix" if test x${XSLT_CONFIG+set} != xset ; then XSLT_CONFIG=$xslt_config_exec_prefix/bin/xslt-config fi fi if test x$xslt_config_prefix != x ; then xslt_config_args="$xslt_config_args --prefix=$xslt_config_prefix" if test x${XSLT_CONFIG+set} != xset ; then XSLT_CONFIG=$xslt_config_prefix/bin/xslt-config fi fi AC_PATH_PROG(XSLT_CONFIG, xslt-config, no) min_xslt_version=ifelse([$1], ,1.0.0,[$1]) AC_MSG_CHECKING(for libxslt - version >= $min_xslt_version) no_xslt="" if test "$XSLT_CONFIG" = "no" ; then no_xslt=yes else XSLT_CFLAGS=`$XSLT_CONFIG $xslt_config_args --cflags` XSLT_LIBS=`$XSLT_CONFIG $xslt_config_args --libs` xslt_config_major_version=`$XSLT_CONFIG $xslt_config_args --version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` xslt_config_minor_version=`$XSLT_CONFIG $xslt_config_args --version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` xslt_config_micro_version=`$XSLT_CONFIG $xslt_config_args --version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` if test "x$enable_xslttest" = "xyes" ; then ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $XSLT_CFLAGS" LIBS="$XSLT_LIBS $LIBS" dnl dnl Now check if the installed libxslt is sufficiently new. dnl (Also sanity checks the results of xslt-config to some extent) dnl rm -f conf.xslttest AC_TRY_RUN([ #include #include #include #include #include int main() { int xslt_major_version, xslt_minor_version, xslt_micro_version; int major, minor, micro; char *tmp_version; system("touch conf.xslttest"); /* Capture xslt-config output via autoconf/configure variables */ /* HP/UX 9 (%@#!) writes to sscanf strings */ tmp_version = (char *)strdup("$min_xslt_version"); if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { printf("%s, bad version string from xslt-config\n", "$min_xslt_version"); exit(1); } free(tmp_version); /* Capture the version information from the header files */ tmp_version = (char *)strdup(LIBXSLT_DOTTED_VERSION); if (sscanf(tmp_version, "%d.%d.%d", &xslt_major_version, &xslt_minor_version, &xslt_micro_version) != 3) { printf("%s, bad version string from libxslt includes\n", "LIBXSLT_DOTTED_VERSION"); exit(1); } free(tmp_version); /* Compare xslt-config output to the libxslt headers */ if ((xslt_major_version != $xslt_config_major_version) || (xslt_minor_version != $xslt_config_minor_version) || (xslt_micro_version != $xslt_config_micro_version)) { printf("*** libxslt header files (version %d.%d.%d) do not match\n", xslt_major_version, xslt_minor_version, xslt_micro_version); printf("*** xslt-config (version %d.%d.%d)\n", $xslt_config_major_version, $xslt_