summaryrefslogtreecommitdiffabout
path: root/am/grecs.m4
Side-by-side diff
Diffstat (limited to 'am/grecs.m4') (more/less context) (ignore whitespace changes)
-rw-r--r--am/grecs.m421
1 files changed, 16 insertions, 5 deletions
diff --git a/am/grecs.m4 b/am/grecs.m4
index 47c9867..5fc1819 100644
--- a/am/grecs.m4
+++ b/am/grecs.m4
@@ -49,14 +49,15 @@ AC_DEFUN([_GRECS_OPTION_SWITCH],
AC_DEFUN([_GRECS_SET_OPTIONS],
[m4_foreach_w([_GRECS_Option], [$1], [_GRECS_SET_OPTION(_GRECS_Option)])])
-# GRECS_SETUP([OPTIONS],[pp-setup-file])
-#
-# Options are:
+# GRECS_SETUP([dir],[OPTIONS],[pp-setup-file])
+# dir - Directory in the source tree where grecs has been cloned.
+# OPTIONS are:
# no-preproc Disable the use of preprocessor.
# std-pp-setup Install standard pp-setup file.
# pp-setup-option Add the --with-pp-setup-file option to the
# configuration file. The option allows user to
# control whether the pp-setup file is installed.
+# tests Build tests.
#
# The pp-setup-file argument supplies the pathname of the preprocessor
# setup file in the source tree. It is ignored if std-pp-setup option is
@@ -69,7 +70,8 @@ AC_DEFUN([GRECS_SETUP],[
AC_PROG_YACC
AM_PROG_LEX
- _GRECS_SET_OPTIONS([$1])
+ AC_SUBST([GRECS_SUBDIR],m4_if([$1],,grecs,$1))
+ _GRECS_SET_OPTIONS([$2])
# **********************
# Preprocessor
# **********************
@@ -104,7 +106,7 @@ AC_DEFUN([GRECS_SETUP],[
DEFAULT_PREPROCESSOR="$DEFAULT_PREPROCESSOR $PREPROC_OPTIONS"
_GRECS_IF_OPTION_SET([std-pp-setup],
[PP_SETUP_FILE='pp-setup'],
- [m4_if([$2],,[PP_SETUP_FILE=],[PP_SETUP_FILE='$2'])])
+ [m4_if([$3],,[PP_SETUP_FILE=],[PP_SETUP_FILE='$3'])])
AC_SUBST(PP_SETUP_FILE)
if test -n "$PP_SETUP_FILE"; then
_GRECS_IF_OPTION_SET([pp-setup-option],
@@ -127,5 +129,14 @@ AC_DEFUN([GRECS_SETUP],[
else
DEFAULT_PREPROCESSOR=NULL
fi
+ _GRECS_IF_OPTION_SET([tests],
+ [m4_pushdef([TESTDIR],m4_if([$1],,grecs,$1)/tests)
+ AC_CONFIG_TESTDIR(TESTDIR)
+ AC_CONFIG_FILES(TESTDIR/Makefile TESTDIR/atlocal)
+ m4_popdef([TESTDIR])
+ AM_MISSING_PROG([AUTOM4TE], [autom4te])
+ GRECS_TESTDIR=tests
+ ])
AC_SUBST([GRECS_INCLUDES])
+ AC_SUBST([GRECS_TESTDIR])
])

Return to:

Send suggestions and report system problems to the System administrator.