Index: ChangeLog
from Akim Demaille <akim(a)epita.fr>
* configure.ac: Copyright notice.
Check the presence of the needed tools.
Index: README
--- README Tue, 30 Sep 2003 17:53:09 +0200 david_v (meta-c++-grammar/g/37_README 1.6 600)
+++ README Tue, 30 Sep 2003 18:27:32 +0200 akim (meta-c++-grammar/g/37_README 1.6 600)
@@ -1,4 +1,4 @@
-cxx-grammar
+cxx-grammar -*- text -*-
-----------
C++ syntax definition with disambiguation tools.
Index: configure.ac
--- configure.ac Tue, 30 Sep 2003 17:53:09 +0200 david_v (meta-c++-grammar/f/44_configure.
1.29 600)
+++ configure.ac Tue, 30 Sep 2003 18:48:36 +0200 akim (meta-c++-grammar/f/44_configure.
1.29 600)
@@ -1,56 +1,80 @@
-# AC_PATH_XPROG(VAR, PROG, PATH_PREFIX)
-# -------------------------------------
-AC_DEFUN([AC_PATH_XPROG],
-[AC_PATH_PROG([$1], [$2], [], [$$3/bin:$PATH])
-if test -z "$$1"; then
- AC_MSG_ERROR([$2 is required])
-fi
-])
+# Configure template for C++ Grammar. -*-Autoconf-*-
+#
+# Copyright (C) 2003 Laboratoire de Recherche et Developpement de l'EPITA.
+#
+# This program 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.
+#
+# This program 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 this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+# 02111-1307 USA
-# Autoconf 2.53 needed so that buggy PATH_SEPARATOR is fixed.
-AC_PREREQ(2.53)
+AC_PREREQ(2.57)
-AC_INIT(cxx-grammar, 0.1)
+AC_INIT([cxx-grammar], 0.1, [transformers(a)lrde.epita.fr])
# Auxiliary files
-AC_CONFIG_AUX_DIR(config)
+AC_CONFIG_AUX_DIR([config])
AC_CONFIG_FILES(config/Makefile)
AC_CONFIG_FILES([config/defs],
[chmod +x config/defs])
-AM_INIT_AUTOMAKE([1.7.3 dist-bzip2])
+AM_INIT_AUTOMAKE([1.7.7 dist-bzip2])
+# Make sure $prefix is defined.
test "x$prefix" = xNONE && prefix=$ac_default_prefix
USE_XT_PACKAGES
+if test "$XT" = NONE; then
+ AC_MSG_ERROR([XT is undefined. Did you specify --with-xt=PATH?])
+fi
-AC_ARG_WITH(lrde-sdftools,
+
+AC_ARG_WITH([lrde-sdftools],
[ --with-lrde-sdftools=DIR Specify location of LRDE_SDF, [PREFIX]],
- LRDE_SDF="$withval",
- LRDE_SDF="$prefix"
+ [LRDE_SDF=$withval],
+ [LRDE_SDF=$prefix]
)
-AC_SUBST(LRDE_SDF)
+AC_SUBST([LRDE_SDF])
-AC_ARG_WITH(sdf-option,
+AC_ARG_WITH([sdf-option],
[ --with-sdf-option=DIR Specify location of SDF_OPTION, [LRDE_SDF]],
- SDF_OPTION="$withval",
- SDF_OPTION="$LRDE_SDF"
+ [SDF_OPTION=$withval],
+ [SDF_OPTION=$LRDE_SDF]
)
-AC_SUBST(SDF_OPTION)
+AC_SUBST([SDF_OPTION])
+test -f $SDF_OPTION/bin/sdf-option ||
+ AC_MSG_ERROR([cannot find sdf-option. Did you use --with-lrde-sdftools?])
+
-AC_ARG_WITH(boxedsdf,
+AC_ARG_WITH([boxedsdf],
[ --with-boxedsdf=DIR Specify location of BOXEDSDF, [LRDE_SDF]],
- BOXEDSDF="$withval",
- BOXEDSDF="$LRDE_SDF"
+ [BOXEDSDF=$withval],
+ [BOXEDSDF=$LRDE_SDF]
)
-AC_SUBST(BOXEDSDF)
+AC_SUBST([BOXEDSDF])
+test -f $BOXEDSDF/bin/boxed2sdf ||
+ AC_MSG_ERROR([cannot find boxed2sdf. Did you use --with-lrde-sdftools?])
-AC_ARG_WITH(detgen,
+
+AC_ARG_WITH([detgen],
[ --with-detgen=DIR Specify location of DETGEN, [LRDE_SDF]],
- DETGEN="$withval",
- DETGEN="$LRDE_SDF"
+ [DETGEN=$withval],
+ [DETGEN=$LRDE_SDF]
)
-AC_SUBST(DETGEN)
+AC_SUBST([DETGEN])
+test -f $DETGEN/bin/detgen ||
+ AC_MSG_ERROR([cannot find detgen. Did you use --with-lrde-sdftools?])
+
+
# Loook for common programs
AC_LANG_C
@@ -61,7 +85,7 @@
# FIXME: check if gcc offers the -fsyntax option
# FIXME: lookup for other (better ?) compilers ?
COMPILER_SYNTAX_CHECK="$CXX -ansi -pedantic -fsyntax-only"
-AC_SUBST(COMPILER_SYNTAX_CHECK)
+AC_SUBST([COMPILER_SYNTAX_CHECK])
# Output Files
AC_CONFIG_FILES([Makefile