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.m430
1 files changed, 19 insertions, 11 deletions
diff --git a/am/grecs.m4 b/am/grecs.m4
index e8d6915..81a6ee5 100644
--- a/am/grecs.m4
+++ b/am/grecs.m4
@@ -69,12 +69,13 @@ AC_DEFUN([_GRECS_SET_OPTIONS],
# no preprocessor setup file is installed.
AC_DEFUN([GRECS_SETUP],[
+ m4_pushdef([grecsdir],m4_if($1,[.],,$1,,[grecs/],$1/))
AC_PROG_YACC
AM_PROG_LEX
AC_HEADER_SYS_WAIT
- AC_SUBST([GRECS_SUBDIR],m4_if([$1],,grecs,$1))
+ AC_SUBST([GRECS_SUBDIR],m4_if($1,,grecs,$1))
_GRECS_SET_OPTIONS([$2])
# **********************
# Preprocessor
@@ -134,7 +135,7 @@ AC_DEFUN([GRECS_SETUP],[
DEFAULT_PREPROCESSOR=NULL
fi
_GRECS_IF_OPTION_SET([tests],
- [m4_pushdef([TESTDIR],m4_if([$1],,grecs,$1)/tests)
+ [m4_pushdef([TESTDIR],grecsdir[tests])
AC_CONFIG_TESTDIR(TESTDIR)
AC_CONFIG_FILES(TESTDIR/Makefile TESTDIR/atlocal)
m4_popdef([TESTDIR])
@@ -153,26 +154,33 @@ AC_DEFUN([GRECS_SETUP],[
if test -z "$s"; then
GRECS_VERCMP_AT=vercmp.at
fi
-
+
+ AC_SUBST([GRECS_SRCDIR],$1)
AC_SUBST([GRECS_VERCMP_AT])
AC_SUBST([GRECS_BUILD_AUX])
AC_SUBST([GRECS_INCLUDES])
AC_SUBST([GRECS_TESTDIR])
AC_SUBST([GRECS_LDADD])
AC_SUBST([GRECS_DOCDIR])
+ AC_SUBST([GRECS_CHANGELOG])
+ AC_SUBST([GRECS_INCLUDES],['-I$(top_srcdir)/]grecsdir[src]')
_GRECS_OPTION_SWITCH([install],[
LT_INIT
- GRECS_LDADD='$(top_builddir)/m4_if([$1],,grecs,$1)/src/libgrecs.la'
+ GRECS_LDADD=['$(top_builddir)/]grecsdir[src/libgrecs.la']
GRECS_DOCDIR='doc'
- AC_CONFIG_FILES(m4_if([$1],,grecs,$1)/src/Makefile:m4_if([$1],,grecs,$1)/src/Make-inst.in
- m4_if([$1],,grecs,$1)/doc/Makefile)
+ GRECS_CHANGELOG=
+ AC_CONFIG_FILES(grecsdir[src/Makefile]:grecsdir[src/Make-inst.in]
+ grecsdir[doc/Makefile])
],[shared],[
LT_INIT
- GRECS_LDADD='$(top_builddir)/m4_if([$1],,grecs,$1)/src/libgrecs.la'
- AC_CONFIG_FILES(m4_if([$1],,grecs,$1)/src/Makefile:m4_if([$1],,grecs,$1)/src/Make-shared.in)
+ GRECS_LDADD=['$(top_builddir)/]grecsdir[src/libgrecs.la']
+ GRECS_CHANGELOG='#'
+ AC_CONFIG_FILES(grecsdir[src/Makefile]:grecsdir[src/Make-shared.in])
],[
- GRECS_LDADD='$(top_builddir)/m4_if([$1],,grecs,$1)/src/libgrecs.a'
- AC_CONFIG_FILES(m4_if([$1],,grecs,$1)/src/Makefile:m4_if([$1],,grecs,$1)/src/Make-static.in)
+ GRECS_LDADD=['$(top_builddir)/]grecsdir[src/libgrecs.a']
+ GRECS_CHANGELOG='#'
+ AC_CONFIG_FILES(grecsdir[src/Makefile]:grecsdir[src/Make-static.in])
])
- AC_CONFIG_FILES(m4_if([$1],,grecs,$1)/Makefile)
+ AC_CONFIG_FILES(grecsdir[Makefile])
+ m4_popdef([grecsdir])
])

Return to:

Send suggestions and report system problems to the System administrator.