# Configure template for SPECS Grammar. -*-Autoconf-*- # # Copyright (C) 2003, 2004 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 AC_PREREQ(2.57) AC_INIT([specs-grammar], 0.2a, [transformers@lrde.epita.fr]) # Auxiliary files AC_CONFIG_AUX_DIR([config]) AC_CONFIG_FILES(config/Makefile) AM_INIT_AUTOMAKE([1.8.3 dist-bzip2]) # Make sure $prefix is defined. test "x$prefix" = xNONE && prefix=$ac_default_prefix USE_XT_PACKAGES test -f $STRC/bin/strc || AC_MSG_ERROR([cannot find strc. Use --with-strategoxt.]) test -f $SDF_TOOLS/bin/sdf-cons || AC_MSG_ERROR([cannot find sdf-cons. Use --with-strategoxt.]) test -f $PGEN/bin/sdf2table || AC_MSG_ERROR([cannot find sdf2table. Use --with-sdf.]) BUNDLE_INIT AC_ARG_WITH([lrde-sdftools], [ --with-lrde-sdftools=DIR Specify location of LRDE_SDF, [PREFIX]], [LRDE_SDF=$withval], [LRDE_SDF=$prefix] ) AC_SUBST([LRDE_SDF]) DEF_BUNDLED_PKG([LRDE_SDF]) AC_ARG_WITH([sdf-option], [ --with-sdf-option=DIR Specify location of SDF_OPTION, [LRDE_SDF]], [SDF_OPTION=$withval], [SDF_OPTION=$LRDE_SDF] ) AC_SUBST([SDF_OPTION]) DEF_BUNDLED_PKG([SDF_OPTION]) IF_IN_BUNDLE([sdf-option]) || test -f $SDF_OPTION/bin/sdf-option || AC_MSG_ERROR([cannot find sdf-option. Use --with-sdf-option.]) AC_ARG_WITH([boxedsdf], [ --with-boxedsdf=DIR Specify location of BOXEDSDF, [LRDE_SDF]], [BOXEDSDF=$withval], [BOXEDSDF=$LRDE_SDF] ) AC_SUBST([BOXEDSDF]) DEF_BUNDLED_PKG([BOXEDSDF]) IF_IN_BUNDLE([boxedsdf]) || test -f $BOXEDSDF/bin/boxed2pp-table || AC_MSG_ERROR([cannot find boxed2sdf. Use --with-boxedsdf.]) AC_ARG_WITH([esdf], [ --with-esdf=DIR Specify location of ESDF, [LRDE_SDF]], [ESDF=$withval], [ESDF=$LRDE_SDF] ) AC_SUBST([ESDF]) DEF_BUNDLED_PKG([ESDF]) IF_IN_BUNDLE([esdf]) || test -f $ESDF/bin/pack-esdf || AC_MSG_ERROR([cannot find esdf. Use --with-esdf.]) AC_ARG_WITH([sdf-astgen], [ --with-sdf-astgen=DIR Specify location of ASTGEN, [LRDE_SDF]], [ASTGEN=$withval], [ASTGEN=$LRDE_SDF] ) AC_SUBST([ASTGEN]) DEF_BUNDLED_PKG([ASTGEN]) IF_IN_BUNDLE([sdf-astgen]) || test -f $ASTGEN/bin/sdf-astgen || AC_MSG_ERROR([cannot find sdf-astgen. Use --with-sdf-astgen.]) AC_ARG_WITH(cxx-grammar, [ --with-cxx-grammar=DIR Specify location of the cxx-grammar, [XT_PATH]], CXX_GRAMMAR="$withval", CXX_GRAMMAR="/usr/local" ) AC_SUBST(CXX_GRAMMAR) test -f $CXX_GRAMMAR/share/cxx-grammar/StrategoCxx.def || AC_MSG_ERROR([cannot find StrategoCxx grammar. Use --with-cxx-grammar.]) # Loook for common programs AC_LANG_C AC_PROG_CC AC_PROG_INSTALL # Output Files AC_CONFIG_FILES([Makefile lib/Makefile src/Makefile src/syn/Makefile src/sig/Makefile src/parser/Makefile src/pp/Makefile src/sdf/Makefile src/specs-renamed/Makefile src/strategospecs/Makefile src/specs-to-cxx/Makefile]) AC_OUTPUT