Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] View of /doc/trunk/configure.ac
ViewVC logotype

View of /doc/trunk/configure.ac

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4066 - (download) (annotate)
Fri Jun 5 16:09:48 2015 UTC (4 years, 2 months ago) by jhr
File size: 3368 byte(s)
  adding documentation for SML/NJ language extensions
dnl Process this file with autoconf to produce a configure script.
dnl
dnl COPYRIGHT (c) 2014 The Fellowship of SML/NJ (http://www.smlnj.org)
dnl All rights reserved.
dnl
dnl This the configuration script for autoconf version 2.60+.

AC_INIT([smlnj-doc],[1.0],[],[],[http://smlnj.org])

AC_PREREQ(2.60)
AC_COPYRIGHT([[COPYRIGHT (c) 2014 The Fellowship of SML/NJ (http://www.smlnj.org)]])
AC_CONFIG_SRCDIR(src/man/smlnj.7.txt)
AC_CONFIG_AUX_DIR(config)
AC_CONFIG_MACRO_DIR(config)
 
dnl
dnl get host information
dnl
AC_CANONICAL_HOST

dnl check for standard programs
dnl
AC_PROG_INSTALL
AC_PROG_MAKE_SET

dnl
dnl directory paths
dnl
case "$host_os" in
  mingw32)
    ROOT_DIR=`pwd -W`
  ;;
  *)
    ROOT_DIR=`pwd`
  ;;
esac
SRC_DIR=$ROOT_DIR/src
OUT_DIR=$ROOT_DIR/doc
WEB_OUT_DIR=$ROOT_DIR/htdocs
MK_DIR=$ROOT_DIR/mk
SRC_CONFIG_DIR=$SRC_DIR/config
SRC_STYLES_DIR=$SRC_DIR/styles

AC_SUBST(ROOT_DIR)
AC_SUBST(OUT_DIR)
AC_SUBST(WEB_OUT_DIR)
AC_SUBST(SRC_DIR)
AC_SUBST(MK_DIR)
AC_SUBST(SRC_CONFIG_DIR)
AC_SUBST(SRC_STYLES_DIR)

dnl
dnl ******************** get SML/NJ release number and date ********************
dnl
SMLNJ_DATE=`date "+%B %d, %Y"`

AC_ARG_WITH([version],
  AC_HELP_STRING([--with-version], ["specify the SML/NJ release version"]),
  [SMLNJ_VERSION=$withval],
  [SMLNJ_VERSION=none])
if test x"$SMLNJ_VERSION" = xnone ; then
  if test -r ../config/version ; then
    SMLNJ_VERSION=`cat ../config/version`
    AC_MSG_NOTICE(["SML/NJ release version: $SMLNJ_VERSION"])
  else
    SMLNJ_VERSION="working"
    AC_MSG_NOTICE(["SML/NJ working version"])
  fi
fi
AC_SUBST(SMLNJ_VERSION)

AC_ARG_WITH([date],
  AC_HELP_STRING([--with-date], ["specify the SML/NJ release date"]),
  [SMLNJ_DATE=$withval],
  [SMLNJ_DATE=none])
if test x"$SMLNJ_DATE" = xnone ; then
  if test x"$SMLNJ_VERSION" = xworking ; then
    #
    # for working versions, we just use the current date
    #
    SMLNJ_DATE=`date "+%B %d, %Y"`
  else
    if test -r ../config/releasedate ; then
      SMLNJ_DATE=`cat ../config/releasedate`
    else
      SMLNJ_DATE=`date "+%B %d, %Y"`
    fi
  fi
fi
AC_MSG_NOTICE(["SML/NJ release date: $SMLNJ_DATE"])
AC_SUBST(SMLNJ_DATE)

dnl
dnl ******************** check for documentation tools ********************
dnl
AC_PATH_PROGS([ASCIIDOC], [asciidoc], [none])
AC_PATH_PROGS([A2X], [a2x], [none])
AC_PATH_PROGS([HIGHLIGHTER], [pygmentize], [none])
AC_PATH_PROGS([DBLATEX], [dblatex], [none])

dnl
dnl error check for availability of tools
dnl
if test x"$ASCIIDOC" = xnone -o x"$A2X" = xnone ; then
  AC_MSG_ERROR([documentation generation requires asciidoc])
fi
if test x"$HIGHLIGHTER" = xnone ; then
  AC_MSG_ERROR([documentation generation requires a source highlighter tool])
fi

dnl
dnl get the path to the asciidoc cofiguration files
dnl
if test x"$ASCIIDOC" != xnone ; then
  AC_MSG_CHECKING([path to asciidoc configuration files])
  ASCIIDOC_CONF_DIR=`$ASCIIDOC -v /dev/null 2>&1 | head -n 1 | sed 's|.*reading: \(.*\)/asciidoc.conf|\1|'`
  AC_MSG_RESULT([$ASCIIDOC_CONF_DIR])
fi
AC_SUBST(ASCIIDOC)
AC_SUBST(A2X)
AC_SUBST(ASCIIDOC_CONF_DIR)
AC_SUBST(HIGHLIGHTER)
AC_SUBST(DBLATEX)

dnl
dnl ******************** write output ********************
dnl
AC_CONFIG_FILES(
dnl ***** Makefiles *****
  mk/doc-rules.gmk:config/doc-rules_gmk.in
  Makefile
  src/Makefile
  src/changelog/Makefile
  src/extensions/Makefile
  src/man/Makefile
)

AC_OUTPUT

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0