AC_REVISION($Revision: 1.3 $)dnl dnl dnl dnl Process this file with autoconf to produce a configure script. dnl dnl Copyright (C) 2000 A.J. Rossini dnl Author : A.J. Rossini dnl Maintainer: (same) dnl Revision : $Id: configure.in,v 1.3 2000/09/03 15:27:59 rossini Exp $ ### ### This file is part of ESS. ### ### ESS is free software; you can redistribute it and/or modify it under ### the terms of the GNU General Public License as published by the Free ### Software Foundation; either version 2 of the License, or (at your ### option) any later version. ### ### ESS is distributed in the hope that it will be useful, but WITHOUT ANY ### WARRANTY; without even the implied warranty of MERCHANTABILITY or ### FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public ### License for more details. ### ### You should have received a copy of the GNU General Public License ### along with ESS; if not, you can obtain it via the World Wide Web at ### `http://www.gnu.org/copyleft/gpl.html', or by writing to the Free ### Software Foundation, 59 Temple Place -- Suite 330, Boston, MA ### 02111-3307, USA. AC_INIT(lisp/ess.el) AC_PREREQ(2.4) dnl (following from W3/WMPerry, 4.0pre.46) dnl Disable cache files: dnl This is controversial, but I am convinced this is the right way to go, dnl at least by default. Otherwise there are too many surprises. define([AC_CACHE_LOAD], )dnl define([AC_CACHE_SAVE], )dnl define([AC_CACHE_VAL], [ $2 ])dnl ### Platform & Version AC_CANONICAL_HOST AC_DEFINE_UNQUOTED(ESS_PLATFORM, "${host}") AC_DEFINE_UNQUOTED(ESS_CPU, "${host_cpu}") AC_DEFINE_UNQUOTED(ESS_VENDOR, "${host_vendor}") AC_DEFINE_UNQUOTED(ESS_OS, "${host_os}") ESS_PLATFORM="${host}" AC_SUBST(ESS_PLATFORM) AC_CYGWIN AC_MINGW32 AC_SYS_INTERPRETER AC_SYS_LONG_FILE_NAMES PACKAGE="ESS" VERSION=`cat VERSION` AC_SUBST(PACKAGE) AC_SUBST(VERSION) ### Programs AC_PROG_INSTALL AC_PROG_MAKE_SET AC_PROG_LN_S dnl dnl Apparently, if you run a shell window in Emacs, it sets the EMACS dnl environment variable to 't'. Lets undo the damage. dnl if test "${EMACS}" = "t"; then EMACS="" fi AC_ARG_WITH(xemacs, --with-xemacs Use XEmacs to build, [ if test "${withval}" = "yes"; then EMACS=xemacs; else EMACS=${withval}; fi ]) AC_ARG_WITH(emacs, --with-emacs Use Emacs to build, [ if test "${withval}" = "yes"; then EMACS=emacs; else EMACS=${withval}; fi ]) AC_ARG_WITH(makeinfo, --with-makeinfo Specify how to build info files, [ MAKEINFO="$withval" ]) AC_ARG_ENABLE(site-install, --enable-site-install Perform a sitewide installation, [ DOTEMACS='$(prefix)/share/emacs/site-lisp/default.el' ], [ DOTEMACS=`( cd ; pwd)`/.emacs ]) AC_CHECK_PROG(TEXI2HTML, texi2html, texi2html, echo Cannot create html version of) AC_CHECK_PROG(EMACS, xemacs, xemacs, emacs) AC_CHECK_PROG(MAKEINFO, makeinfo, makeinfo, \$(EMACS) -batch -q -l texinfmt -f batch-texinfo-format) AC_CHECK_PROG(INSTALLINFO, install-info, install-info, true) AC_EMACS_PACKAGES AC_PATH_LISPDIR AC_EMACS_VERSION AC_CHECK_CUSTOM AC_CHECK_GNUS AC_CHECK_CUSTOMLOADS if test "${MAKEINFO}" = "no"; then MAKEINFO='$(EMACS) -batch -q -l texinfmt -f batch-texinfo-format' fi if test "${TEXI2HTML}" = "texi2html"; then TEXI2HTML_FLAGS="-menu -glossary -number -split_node" fi AC_SUBST(EMACS_PACKAGE_DIR) AC_SUBST(MAKEINFO) AC_SUBST(EMACS) AC_SUBST(INSTALL) AC_SUBST(INSTALLINFO) AC_SUBST(DOTEMACS) AC_SUBST(TEXI2HTML) AC_SUBST(TEXI2HTML_FLAGS) if test "${GNUS}" != "no"; then CIDFILE=url-cid.el AC_SUBST(CIDFILE) fi if test "${CUSTOM}" = "no"; then AC_MSG_WARN(" ") AC_MSG_WARN(No usable version of the widget/custom libraries have been) AC_MSG_WARN(detected on your system. This version of ESS can use) AC_MSG_WARN(features present in newer versions of the widget library.) AC_MSG_WARN(" ") AC_MSG_WARN(Please upgrade to the latest version of custom available.) AC_MSG_WARN(This package is included with Emacs 20.1 and XEmacs 20.3) AC_MSG_WARN(or from http://www.dina.kvl.dk/~abraham/custom/) AC_MSG_WARN(or /ftp.dina.kvl.dk:/pub/Staff/Per.Abrahamsen/custom/) AC_MSG_WARN(" ") AC_MSG_WARN(Note that those using Emacs 19.x, where x<=34, may have) AC_MSG_WARN(difficulties with custom. We recommend upgrading XEmacs/Emacs) AC_MSG_WARN(if possible) fi dnl Byte compile emacs-lisp files AC_ARG_ENABLE(bytecompile, [ --bytecompile bytecompile all files by default], bytecompile=${enablevel}, bytecompile=yes) dnl Enable Developer-specific code. AC_ARG_ENABLE(developer-mode, [ --enable-developer-mode This is for running in-place], use_maintainer_mode=${enablevel}, use_maintainer_mode=no) dnl Checks for programs. dnl The logic should be: dnl 1. Is the "stock" version available on the default path? dnl 2. Is there an option specifing path? dnl 3. Is there an option saying not to include it? dnl This needs to be wrapped up into a macro... AC_PATH_PROGS(HAS_SPLUS3, Splus , F) AC_PATH_PROGS(HAS_SPLUS4, Splus4, Splus2k, F) AC_PATH_PROGS(HAS_SPLUS5, Splus5, F) AC_PATH_PROGS(HAS_R, R, F) AC_PATH_PROGS(HAS_XLISPSTAT, xlispstat, F) AC_PATH_PROGS(HAS_VISTA, vista, F) AC_PATH_PROGS(HAS_ARC, arc, F) AC_PATH_PROGS(HAS_SAS, sas, F) AC_PATH_PROGS(HAS_STATA, stata, F) AC_PATH_PROGS(HAS_OMG, omegahat, F) dnl Checks for libraries. ### Output AC_OUTPUT( doc/Makefile lisp/Makefile Makefile ) AC_MSG_RESULT(" ") AC_MSG_RESULT("Sucessfully configured Emacs/W3") if test -n "$EMACS_PACKAGE_DIR"; then AC_MSG_RESULT("Using package root: ${EMACS_PACKAGE_DIR}") fi AC_MSG_RESULT("Using custom package installed in: ${CUSTOM}") AC_MSG_RESULT("Emacs/W3 will be compiled with: ${EMACS}") AC_MSG_RESULT(" ") AC_MSG_RESULT("To finish building Emacs/W3 type \'make\' now.") AC_MSG_RESULT("To install Emacs/W3 type \'make install\'.") AC_MSG_RESULT("To create autoloads in \'${DOTEMACS}\' type \'make dotemacs\'") AC_MSG_RESULT([ ESS is now configured for ${host} Source directory: ${srcdir} Installation directory: ${prefix} Emacs: ${EMACS} Splus3: ${use_SPLUS3} Splus4: ${use_SPLUS4} Splus2k: ${use_SPLUS2K} Splus5: ${use_SPLUS5} Splus6: ${use_SPLUS6} S3 ${use_S3} S4 ${use_S4} R ${use_R} SAS: ${use_SAS} Omegahat ${use_OMG} Stata ${use_STATA} XLispStat ${use_XLS} ViSta ${use_VISTA} ARC ${use_ARC} ]) dnl (aclocal.m4) Local variables: dnl (aclocal.m4) eval: (make-local-hook 'kill-buffer-hook) dnl (aclocal.m4) eval: (defun ess-rebuild-configure-files () (if (file-newer-than-file-p (buffer-file-name) (expand-file-name "configure" (file-name-directory (buffer-file-name)))) (shell-command "autoreconf"))) dnl (aclocal.m4) eval: (add-hook 'kill-buffer-hook 'ess-rebuild-configure-files nil t) dnl (aclocal.m4) End: ***