Commit c37b2f1f c37b2f1f3e51dc5489b349cba20771cd762db148 by Sergey Poznyakoff

Improve autoconf machinery, drop support for Guile < 1.8

* scripts/guile-1.4: Removed.
* scripts/guile-1.6/guile-doc-snarf: Move to the parent dir.
* scripts/guile-1.6/guile-doc-snarf.awk: Move to the parent dir.
* scripts: Rename to mu-aux. All references updated.
* am/enable.m4 (MU_ENABLE_SUPPORT): add fourth argument, action-default
Translate + to x.
* am/guile.m4 (MU_RESULT_ACTIONS): Remove.
(MU_CHECK_GUILE): Rewrite. Drop support for versions < 1.8
* am/lib.m4 (MU_CHECK_LIB): Rewrite using a cleaner approach.
* bootstrap.conf: Remove build_aux assignement.
* configure.ac: Assume a new naming scheme for optional builds: for
each subst variable named MU_whatever_BUILD there is a corresponing
Makefile.am variable named MU_whatever_LIST, if `whatever' is to be
built MU_whatever_BUILD is set to '$(MU_whatever_LIST)'
New option --disable-c++.
Improve status output.
* examples/Makefile.am, examples/cpp/Makefile.am,
include/mailutils/Makefile.am, libmu_cpp/Makefile.am, libmu_scm/Makefile.am,
libmu_sieve/Makefile.am, libmu_sieve/extensions/Makefile.am,
libmu_sieve/load.c, mail.remote/Makefile.am,
mail.remote/testsuite/Makefile.am, mailbox/Makefile.am,
mh/Makefile.am, mimeview/Makefile.am, mu-aux/Makefile.am,
python/mailutils/Makefile.am: Reflect changes to autoconf machinery.

* /include/mailutils/guile.h: Drop support for versions < 1.8
* libmu_scm/mu_util.c: Likewise.
1 parent c09870d8
......@@ -15,6 +15,7 @@ Makefile
Makefile.in
aclocal.m4
autom4te.cache
build-aux
config.h
config.h.in
config.log
......
......@@ -22,6 +22,7 @@ AUTOMAKE_OPTIONS = gnits 1.8.5 dist-bzip2 std-options
ACLOCAL_AMFLAGS = -I m4 -I am
SUBDIRS = \
mu-aux\
include\
po\
testsuite\
......@@ -44,7 +45,6 @@ SUBDIRS = \
maidag\
mail\
sieve\
scripts\
guimb\
messages\
comsat\
......
......@@ -16,11 +16,12 @@ dnl along with this program; if not, write to the Free Software Foundation,
dnl Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
dnl
dnl MU_ENABLE_SUPPORT(feature, [action-if-true], [action-if-false])
dnl MU_ENABLE_SUPPORT(feature, [action-if-true], [action-if-false],
dnl [action-default])
AC_DEFUN([MU_ENABLE_SUPPORT], [
pushdef([mu_upcase],translit($1,[a-z-],[A-Z_]))
pushdef([mu_cache_var],[mu_cv_enable_]translit($1,[-],[_]))
pushdef([mu_upcase],translit($1,[a-z+-],[A-ZX_]))
pushdef([mu_cache_var],[mu_cv_enable_]translit($1,[+-],[x_]))
AC_ARG_ENABLE($1,
AC_HELP_STRING([--disable-]$1,
......@@ -31,7 +32,7 @@ AC_DEFUN([MU_ENABLE_SUPPORT], [
no) mu_cache_var=no;;
*) AC_MSG_ERROR([bad value ${enableval} for --disable-$1]) ;;
esac],
[mu_cache_var=yes])
[ifelse([$4],,mu_cache_var=yes,[$4])])
if test x"[$]mu_cache_var" = x"yes"; then
ifelse([$2],,:,[$2])
......
......@@ -16,110 +16,58 @@ dnl along with this program; if not, write to the Free Software Foundation,
dnl Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
dnl
dnl MU_RESULT_ACTIONS -- generate shell code for the result of a test
dnl $1 -- CVAR -- cache variable to check
dnl $2 -- NAME -- if not empty, used to generate a default value TRUE:
dnl `AC_DEFINE(HAVE_NAME)'
dnl $2 -- TRUE -- what to do if the CVAR is not `no'
dnl $3 -- FALSE -- what to do otherwise; defaults to `:'
dnl
AC_DEFUN([MU_RESULT_ACTIONS], [
[if test "$$1" != "" -a "$$1" != no; then
]ifelse([$3], ,
[AC_DEFINE(HAVE_]translit($2, [a-z ./<>], [A-Z___])[,1,[FIXME])],
[$3])[
else
]ifelse([$4], , [:], [$4])[
fi]])dnl
dnl MU_CHECK_GUILE(minversion, [act-if-found], [ac-if-not-found])
dnl $1 $2 $3
AC_DEFUN([MU_CHECK_GUILE],
[
if test "x$mu_cv_lib_guile" = x; then
cached=""
AS_VAR_SET([mu_cv_guile], [no])
AC_PATH_PROG(GUILE_CONFIG, guile-config, no, $PATH)
if test $GUILE_CONFIG = no; then
mu_cv_lib_guile=no
if test "$GUILE_CONFIG" = no; then
m4_if($3,,[AC_MSG_ERROR(cannot find Guile)], [$3])
else
AC_SUBST(GUILE_INCLUDES)
AC_SUBST(GUILE_LIBS)
AC_SUBST(GUILE_VERSION)
AC_SUBST(GUILE_VERSION_NUMBER)
GUILE_INCLUDES=`$GUILE_CONFIG compile`
GUILE_LIBS=`$GUILE_CONFIG link`
fi
GUILE_VERSION=`($GUILE_CONFIG --version 2>&1; echo '')|sed 's/guile-config [[^0-9]]* \([[0-9]][[0-9.]]*\)$/\1/'`
VEX=`echo $GUILE_VERSION | sed 's/\./ \\\\* 1000 + /;s/\./ \\\\* 100 + /'`
GUILE_VERSION_NUMBER=`eval expr "$VEX"`
ifelse($1,,,[
VEX=`echo $1 | sed 's/\./ \\\\* 1000 + /;s/\./ \\\\* 100 + /'`
min=`eval expr "$VEX"`
if test $GUILE_VERSION_NUMBER -lt $min; then
m4_if($3,,
[AC_MSG_ERROR([Guile version too old; required is at least ]$1)],
[$3])
fi])
if test $GUILE_CONFIG != no; then
AC_MSG_CHECKING(for guile version 1.4 or higher)
GUILE_VERSION=`($GUILE_CONFIG --version 2>&1; echo '')|sed -n 's/guile-config [[^0-9]]* \([[0-9]][[0-9]]*\)\.\([[0-9]][[0-9]]*\).*/\1\2/p'`
case "x$GUILE_VERSION" in
x[[0-9]]*)
if test $GUILE_VERSION -lt 14; then
AC_MSG_RESULT([Nope. Version number too low.])
mu_cv_lib_guile=no
else
AC_DEFINE_UNQUOTED(GUILE_VERSION, $GUILE_VERSION,
[Guile version number: MAX*10 + MIN])
AC_MSG_RESULT(OK)
save_LIBS=$LIBS
save_CFLAGS=$CFLAGS
LIBS="$LIBS $GUILE_LIBS"
CFLAGS="$CFLAGS $GUILE_INCLUDES"
AC_TRY_LINK([#include <libguile.h>],
ifelse([$1], , scm_shell(0, NULL);, [$1]),
[mu_cv_lib_guile=yes],
[mu_cv_lib_guile=no])
m4_if([$1], , scm_shell(0, NULL);, [$1]),
[AS_VAR_SET([mu_cv_guile], $GUILE_VERSION)])
LIBS=$save_LIBS
CFLAGS=$save_CFLAGS
fi ;;
*) AC_MSG_RESULT(Nope. Unknown version number)
mu_cv_lib_guile=no;;
esac
fi
if test $mu_cv_guile = no; then
GUILE_INCLUDES=
GUILE_LIBS=
GUILE_VERSION=
GUILE_VERSION_NUMBER=
m4_if($3,,[AC_MSG_ERROR(required library libguile not found)], [$3])
else
cached=" (cached) "
GUILE_INCLUDES=`$GUILE_CONFIG compile`
GUILE_LIBS=`$GUILE_CONFIG link`
fi
AC_MSG_CHECKING(whether to build guile support)
MU_RESULT_ACTIONS([mu_cv_lib_guile],[LIBGUILE],[$2],[$3])
AC_MSG_RESULT(${cached}$mu_cv_lib_guile)
if test $mu_cv_lib_guile = yes; then
if test $GUILE_VERSION -gt 14; then
LIBS="$LIBS $GUILE_LIBS"
CFLAGS="$CFLAGS $GUILE_INCLUDES"
AC_CHECK_FUNCS(scm_long2num scm_cell scm_list_1 scm_list_n scm_c_define\
scm_c_lookup)
if test $ac_cv_func_scm_cell = no; then
AC_MSG_CHECKING(for inline scm_cell)
AC_TRY_LINK([#include <libguile.h>],
[scm_cell(SCM_EOL, SCM_EOL)],
[ac_cv_func_scm_cell=yes
AC_DEFINE(HAVE_SCM_CELL,1,
Define if you have scm_cell function)])
AC_MSG_RESULT($ac_cv_func_scm_cell)
fi
CFLAGS=$save_CFLAGS
LIBS=$save_LIBS
fi
AC_ARG_WITH([guiledir],
AC_HELP_STRING([--with-guiledir=DIR],
[Specify the directory to install guile modules to]),
[case $withval in
/*) GUILE_SITE=$withval;;
yes) GUILE_SITE=`$GUILE_CONFIG info pkgdatadir`/site;;
*) AC_MSG_ERROR([Argument to --with-guiledir must be an absolute directory name]);;
esac],
[GUILE_SITE=`$GUILE_CONFIG info pkgdatadir`/site
pfx=$prefix
test "x$pfx" = xNONE && pfx=$ac_default_prefix
case $GUILE_SITE in
$pfx/*) ;; # OK
*) AC_MSG_WARN([guile site directory "$GUILE_SITE" lies outside your current prefix ($pfx).])
GUILE_SITE='$(pkgdatadir)/$(VERSION)/guile'
AC_MSG_WARN([Falling back to ${GUILE_SITE} instead. Use --with-guiledir to force using site directory.])
;;
esac])
AC_DEFINE_UNQUOTED(GUILE_VERSION, "$GUILE_VERSION",
[Guile version number])
AC_DEFINE_UNQUOTED(GUILE_VERSION_NUMBER, $GUILE_VERSION_NUMBER,
[Guile version number: MAX*10 + MIN])
m4_if($2,,,[$2])
fi
AC_SUBST(GUILE_SITE)
AC_SUBST(GUILE_INCLUDES)
AC_SUBST(GUILE_LIBS)
])
......
......@@ -6,21 +6,30 @@ dnl $4 -- Action to be taken when test succeeds
dnl $5 -- Action to be taken when test fails
dnl $6 -- Directories where the library may reside
AC_DEFUN([MU_CHECK_LIB],
[
save_LIBS=$LIBS
AC_CACHE_CHECK([for -l$1], mu_cv_lib_$1,
[
for path in $6
[m4_ifval([$4], , [AH_CHECK_LIB([$1])])dnl
AS_VAR_PUSHDEF([mu_Lib], [mu_cv_lib_$1])dnl
AC_CACHE_CHECK([for $2 in -l$1], [mu_Lib],
[AS_VAR_SET([mu_Lib], [no])
mu_check_lib_save_LIBS=$LIBS
for path in "" $6
do
LIBS="$save_LIBS $3 -L$path -l$1"
AC_TRY_LINK_FUNC($2,
[mu_cv_lib_$1="$3 -L$path -l$1"
break],
[mu_cv_lib_$1=no],$3)
if test -n "$path"; then
mu_ldflags="-L$path -l$1 $3"
else
mu_ldflags="-l$1 $3"
fi
LIBS="$mu_ldflags $mu_check_lib_save_LIBS"
AC_LINK_IFELSE([AC_LANG_CALL([], [$2])],
[AS_VAR_SET([mu_Lib], ["$mu_ldflags"])
break])
done
])
MU_RESULT_ACTIONS([mu_cv_lib_$1],[LIB$1],[$4],[$5])
LIBS=$save_LIBS
])
LIBS=$mu_check_lib_save_LIBS])
AS_IF([test "AS_VAR_GET([mu_Lib])" != no],
[m4_default([$4], [AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_LIB$1))
LIBS="-l$1 $LIBS"
])],
[$5])dnl
AS_VAR_POPDEF([mu_Lib])dnl
])# MU_CHECK_LIB
......
......@@ -18,7 +18,6 @@
# 02110-1301, USA.
gnulib_name=libmuaux
build_aux=scripts
# We don't need these modules, even though gnulib-tool mistakenly
# includes them because of gettext dependencies.
......
......@@ -19,7 +19,7 @@ dnl Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
AC_INIT([GNU Mailutils], [2.0.90], [bug-mailutils@gnu.org], [mailutils])
AC_CONFIG_SRCDIR([mailbox/mailbox.c])
AC_CONFIG_AUX_DIR([scripts])
AC_CONFIG_AUX_DIR([build-aux])
AM_INIT_AUTOMAKE
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
......@@ -53,7 +53,8 @@ AC_SUBST(MU_LIB_ARGP,'${top_builddir}/libmu_argp/libmu_argp.la')
AC_SUBST(MU_LIB_PY, '${top_builddir}/python/libmu_py/libmu_py.la')
dnl Other variables
AC_SUBST(SIEVE_MODDIR,'$(libdir)/$(PACKAGE)')
AC_SUBST(mu_aux_dir,'$(top_srcdir)/mu-aux')
AC_SUBST(MU_SIEVE_MODDIR,'$(libdir)/$(PACKAGE)')
AC_SUBST(MU_COMMON_LIBRARIES,'$(LTLIBINTL) $(LTLIBICONV)')
AC_SUBST(MU_APP_LIBRARIES,'../libmu_argp/libmu_argp.a ../libmu_cfg/libmu_cfg.la ../lib/libmuaux.la')
......@@ -722,7 +723,7 @@ if test -n "$SQL_MODULES"; then
sed 's,\.[[^.]]* ,.lo ,g;s,\.[[^.]]*$,.lo,'`
AC_CONFIG_COMMANDS([sql/modlist.h],
[$srcdir/scripts/sqlmod.sh $SQL_MODULES > sql/modlist.h],
[$srcdir/mu-aux/sqlmod.sh $SQL_MODULES > sql/modlist.h],
[if test $USE_LOADABLE_MODULES = yes; then
SQL_MODULES=
else
......@@ -767,23 +768,24 @@ MU_ENABLE_SUPPORT(imap)
MU_ENABLE_SUPPORT(pop)
MU_ENABLE_SUPPORT(nntp)
AC_SUBST(BUILD_SMTP_PROGRAMS)
AC_SUBST(RUN_SMTP_DEJATOOL)
AC_SUBST(MU_SMTP_PROGRAMS_BUILD)
AC_SUBST(MU_SMTP_DEJATOOL)
MU_ENABLE_SUPPORT(smtp, [BUILD_SMTP_PROGRAMS='$(PROGRAMS_SMTP)'
RUN_SMTP_DEJATOOL='$(SMTP_DEJATOOL)'])
MU_ENABLE_SUPPORT(smtp,
[MU_SMTP_PROGRAMS_BUILD='$(MU_SMTP_PROGRAMS_LIST)'
MU_SMTP_DEJATOOL='$(SMTP_DEJATOOL)'])
MU_ENABLE_SUPPORT(sendmail)
MU_ENABLE_SUPPORT(prog)
AC_SUBST(BUILD_MH_PROGRAMS)
AC_SUBST(BUILD_MH_LIBRARIES)
AC_SUBST(BUILD_MH_EXEC_HOOK)
AC_SUBST(MU_MH_PROGRAMS_BUILD)
AC_SUBST(MU_MH_LIBRARIES_BUILD)
AC_SUBST(MU_MH_EXEC_HOOK)
MU_ENABLE_SUPPORT(mh,
[BUILD_MH_PROGRAMS='$(PROGRAMS_MH)';
BUILD_MH_LIBRARIES='$(LIBRARIES_MH)';
BUILD_MH_EXEC_HOOK=mh_finish_install])
[MU_MH_PROGRAMS_BUILD='$(MU_MH_PROGRAMS_LIST)';
MU_MH_LIBRARIES_BUILD='$(MU_MH_LIBRARIES_LIST)';
MU_MH_EXEC_HOOK=mh_finish_install])
MU_ENABLE_SUPPORT(maildir)
# FIXME: Should be --with-radius
......@@ -793,18 +795,7 @@ MU_ENABLE_SUPPORT(radius,
mu_cv_enable_radius=yes],
[mu_cv_enable_radius=no])])
AC_ARG_ENABLE([mh-utils],
AC_HELP_STRING([--enable-mh-utils],
[Build MH utilities]),
[MU_BUILD_MH="${enableval}"],
[MU_BUILD_MH=no])
AC_SUBST(MH_BIN_DIR)
if test ".$MU_BUILD_MH" = ".no"; then
BUILD_MH_PROGRAMS=
BUILD_MH_LIBRARIES=
BUILD_MH_EXEC_HOOK=
fi
AC_ARG_WITH([mh-bindir],
AC_HELP_STRING([--with-mh-bindir],
......@@ -818,15 +809,8 @@ AC_ARG_WITH([mh-bindir],
AC_ARG_ENABLE([experimental],
AC_HELP_STRING([--enable-experimental],
[build experimental and/or unfinished utilities]),
[MU_BUILD_EXPERIMENTAL="${enableval}"],
[MU_BUILD_EXPERIMENTAL=no])
AC_SUBST(MU_CXX_LIBS)
AC_SUBST(MU_BUILT_CXX_EXAMPLES)
if test "$MU_BUILD_EXPERIMENTAL" = yes; then
MU_CXX_LIBS='$(MU_CXX_LIBS)'
MU_BUILT_CXX_EXAMPLES='$(CXX_EXAMPLES)'
fi
[mu_build_experimental="${enableval}"],
[mu_build_experimental=no])
if test x"$testpam" = x"yes"; then
AC_CHECK_HEADERS(security/pam_appl.h)
......@@ -1047,12 +1031,9 @@ if test "$status_dbm" != no; then
fi
dnl Check for Guile
AC_SUBST(GUILE_INCLUDES)
AC_SUBST(GUILE_LIBS)
AC_SUBST(GUILE_BINDIR)
AC_SUBST(GUILE_SNARF_VERSION)
AC_SUBST(GUIMB)
AC_SUBST(MU_SCM)
AC_SUBST(MU_SCM_LTLIBRARIES_BUILD)
AC_SUBST(LIBMU_SCM)
AC_SUBST(LIBMU_SCM_DEPS)
AC_SUBST(GUILE_SITE_DATA)
......@@ -1062,14 +1043,13 @@ AC_SUBST(MU_GUILE_SIEVE_MOD_DIR)
AC_SUBST(MU_GUILE_SIEVE_SCRIPTS)
AC_SUBST(MU_GUILE_SIEVE_MOD_DATA)
if test x"$useguile" = x"yes"; then
MU_CHECK_GUILE(,[
if test "$useguile" != "no"; then
MU_CHECK_GUILE(1.8,
[useguile=yes
AC_DEFINE(WITH_GUILE,1,[Enable Guile support])
GUILE_INCLUDES=`guile-config compile`
GUILE_LIBS=`guile-config link`
GUILE_BINDIR=`guile-config info bindir`
GUIMB='guimb$(EXEEXT)'
MU_SCM=libmu_scm.la
GUIMB='guimb$(EXEEXT)' # FIXME
MU_SCM_LTLIBRARIES_BUILD='$(MU_SCM_LTLIBRARIES_LIST)'
LIBMU_SCM=../libmu_scm/libmu_scm.la
LIBMU_SCM_DEPS='${MU_LIB_MBOX} ${MU_LIB_IMAP} ${MU_LIB_POP} ${MU_LIB_MH} ${MU_LIB_MAILDIR} ${MU_LIB_MAILER}'
GUILE_SITE_DATA='$(GUILE_SITE_DATA_X)'
......@@ -1078,14 +1058,32 @@ if test x"$useguile" = x"yes"; then
MU_GUILE_SIEVE_SCRIPTS='$(MU_GUILE_SIEVE_SCRIPTS_X)'
MU_GUILE_SIEVE_MOD_DATA='$(MU_GUILE_SIEVE_MOD_DATA_X)'
GUILE_BUILT_SOURCES='$(GUILE_BUILT_SOURCES_X)'
case "$GUILE_VERSION" in
14) GUILE_SNARF_VERSION="1.4";;
16|17) GUILE_SNARF_VERSION="1.6";;
*) GUILE_SNARF_VERSION="1.6";;
esac
],[useguile=no])
if test "$useguile" = "yes"; then
AC_ARG_WITH([guiledir],
AC_HELP_STRING([--with-guiledir=DIR],
[Specify the directory to install guile modules to]),
[case $withval in
/*) GUILE_SITE=$withval;;
yes) GUILE_SITE=`$GUILE_CONFIG info pkgdatadir`/site;;
*) AC_MSG_ERROR([Argument to --with-guiledir must be an absolute directory name]);;
esac],
[GUILE_SITE=`$GUILE_CONFIG info pkgdatadir`/site
pfx=$prefix
test "$pfx" = NONE && pfx=$ac_default_prefix
case $GUILE_SITE in
$pfx/*) ;; # OK
*) AC_MSG_WARN([guile site directory "$GUILE_SITE" lies outside your current prefix ($pfx).])
GUILE_SITE='$(pkgdatadir)/$(VERSION)/guile'
AC_MSG_WARN([Falling back to ${GUILE_SITE} instead. Use --with-guiledir to force using site directory.])
;;
esac])
fi
fi
AC_SUBST(GUILE_SITE)
dnl Check for Emacs site-lisp directory
AM_PATH_LISPDIR
......@@ -1105,11 +1103,9 @@ case "${withval}" in
*) AC_MSG_ERROR(bad value ${withval} for --without-python) ;;
esac],[status_python=yes])
AC_SUBST(MU_PY)
if test "$status_python" = yes; then
AM_PATH_PYTHON(2.5.0,, [status_python=no])
if test "$status_python" = yes; then
MU_PY=libmu_py.la
AC_ARG_VAR([PYTHON_CONFIG], [The name of python-config binary])
AC_PATH_PROG([PYTHON_CONFIG], python-config)
if test -n "$PYTHON_CONFIG"; then
......@@ -1121,11 +1117,21 @@ if test "$status_python" = yes; then
if test "$status_python" = yes; then
AC_DEFINE(WITH_PYTHON,1,[Enable Python support])
AC_SUBST(MU_PYTHON_LTLIBS,'$(MU_PYTHON_LTLIBS)')
AC_SUBST(MU_PY_LIB_LTLIBRARIES_BUILD, '$(MU_PY_LIB_LTLIBRARIES_LIST)')
AC_SUBST(MU_PY_PKGPYEXEC_LTLIBRARIES_BUILD,'$(MU_PY_PKGPYEXEC_LTLIBRARIES_LIST)')
AC_SUBST(MU_PY_PKGPYTHON_BUILD,'$(MU_PY_PKGPYTHON_LIST)')
fi
fi
fi
AC_SUBST(MU_CXX_LTLIBRARIES_BUILD)
AC_SUBST(MU_CXX_EXAMPLES_BUILD)
MU_ENABLE_SUPPORT(c++,
[MU_CXX_LTLIBRARIES_BUILD='$(MU_CXX_LTLIBRARIES_LIST)'
MU_CXX_EXAMPLES_BUILD='$(MU_CXX_EXAMPLES_LIST)'],
:,
[mu_cv_enable_cxx=$mu_build_experimental])
# Default mailbox record
# Note: 1. Support for mbox type is always enabled.
# 2. Only local mailbox types are allowed for MU_DEFAULT_SCHEME
......@@ -1188,35 +1194,39 @@ cat <<EOF
*******************************************************************
GNU Mailutils configured with the following settings:
Default mailbox scheme......... $status_scheme
Use PAM........................ $status_pam
Use -ltdl...................... $status_ltdl
Use DBM........................ $status_dbm
Use GNU TLS.................... $status_gnutls
Use GSASL...................... $status_gsasl
Use GSSAPI..................... $status_gssapi
Use Guile...................... $status_guile
Use Python..................... $status_python
Use TCP wrappers............... $status_tcpwrap
Pthread support................ $status_pthread
Readline support............... $status_readline
MySQL support.................. $status_mysql
PostgreSQL support............. $status_pgsql
LDAP support................... $status_ldap
Radius support................. $status_radius
Support for virtual domains.... $status_virtual_domains
Protocols:
IMAP........................... $status_imap
POP............................ $status_pop
MH............................. $status_mh
maildir........................ $status_maildir
Default mailbox scheme ........ $status_scheme
Use PAM ....................... $status_pam
Use -ltdl ..................... $status_ltdl
Use DBM ....................... $status_dbm
Use GNU TLS ................... $status_gnutls
Use GSASL ..................... $status_gsasl
Use GSSAPI .................... $status_gssapi
Use TCP wrappers .............. $status_tcpwrap
Pthread support ............... $status_pthread
Readline support .............. $status_readline
MySQL support ................. $status_mysql
PostgreSQL suppor ............. $status_pgsql
LDAP support .................. $status_ldap
Radius support ................ $status_radius
Support for virtual domains ... $status_virtual_domains
Interfaces:
Guile ......................... $status_guile
C++ ........................... $status_cxx
Python ........................ $status_python
Mailbox formats:
IMAP .......................... $status_imap
POP ........................... $status_pop
MH ............................ $status_mh
maildir ....................... $status_maildir
Mailers:
SMTP........................... $status_smtp
Sendmail....................... $status_sendmail
SMTP .......................... $status_smtp
Sendmail ...................... $status_sendmail
*******************************************************************
......@@ -1234,6 +1244,7 @@ status_gsasl=$status_gsasl
status_gssapi=$WITH_GSSAPI
status_guile=$useguile
status_python=$status_python
status_cxx=$mu_cv_enable_cxx
status_tcpwrap=$status_tcpwrap
status_pthread=$usepthread
status_readline=$usereadline
......@@ -1313,10 +1324,8 @@ AC_CONFIG_FILES([Makefile
python/mailutils/Makefile
readmsg/Makefile
readmsg/testsuite/Makefile
scripts/Makefile
scripts/guile-1.4/Makefile
scripts/guile-1.6/Makefile
scripts/mailutils.spec
mu-aux/Makefile
mu-aux/mailutils.spec
sieve/Makefile
sieve/testsuite/Makefile
testsuite/Makefile
......
......@@ -83,7 +83,7 @@ VPATH = $(s)
SUFFIXES=.c .inc
.c.inc:
sed -f $(top_srcdir)/scripts/texify.sed $< > $@
sed -f $(mu_aux_dir)/texify.sed $< > $@
DISTCLEANFILES=*.pgs *.kys *.vrs
MAINTAINERCLEANFILES=$(INCFILES)
......
## Process this file with GNU Automake to create Makefile.in
## Copyright (C) 2002, 2003, 2004, 2007, 2008 Free Software Foundation, Inc.
## Copyright (C) 2002, 2003, 2004, 2007, 2008,
## 2009 Free Software Foundation, Inc.
##
## GNU Mailutils is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
......@@ -48,7 +49,7 @@ noinst_PROGRAMS = \
## will not create a shared library and `make check' will fail in
## sieve. Pity.
## -Sergey
moddir=@SIEVE_MODDIR@
moddir=@MU_SIEVE_MODDIR@
mod_LTLIBRARIES = numaddr.la
INCLUDES = @MU_COMMON_INCLUDES@
......@@ -60,7 +61,7 @@ LDADD = \
numaddr_la_SOURCES = numaddr.c
numaddr_la_LIBADD = ${MU_LIB_SIEVE}
numaddr_la_LDFLAGS = -module -avoid-version -no-undefined
numaddr_la_LDFLAGS = -module -avoid-version -no-undefined -rpath '$(moddir)'
mimetest_LDADD =\
../lib/libmuaux.la\
......
......@@ -17,7 +17,7 @@
## Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA
## 02110-1301 USA
CXX_EXAMPLES = \
MU_CXX_EXAMPLES_LIST = \
addr\
http\
iconv\
......@@ -30,8 +30,8 @@ CXX_EXAMPLES = \
sfrom\
url-parse
EXTRA_PROGRAMS=$(CXX_EXAMPLES)
noinst_PROGRAMS = @MU_BUILT_CXX_EXAMPLES@
EXTRA_PROGRAMS=$(MU_CXX_EXAMPLES_LIST)
noinst_PROGRAMS = @MU_CXX_EXAMPLES_BUILD@
INCLUDES = @MU_COMMON_INCLUDES@
......
......@@ -21,10 +21,10 @@
BUILT_SOURCES=errno.h debug.h
EXTRA_DIST=errno.hin debug.hm4 types.hin
errno.h: $(top_srcdir)/mailbox/errors errno.hin
$(AWK) -f $(top_srcdir)/scripts/generr.awk $^ > $@
$(AWK) -f $(mu_aux_dir)/generr.awk $^ > $@
debug.h: $(top_srcdir)/scripts/debugdef.m4 debug.hm4
m4 $(top_srcdir)/scripts/debugdef.m4 debug.hm4 > debug.h
debug.h: $(mu_aux_dir)/debugdef.m4 debug.hm4
m4 $(mu_aux_dir)/debugdef.m4 debug.hm4 > debug.h
types.h: $(top_srcdir)/include/mailutils/types.hin Makefile
sed 's/_MU_OFF_TYPE_/$(MU_OFF_TYPE)/;s/_MU_DEFAULT_RECORD_/$(MU_DEFAULT_RECORD)/' $(top_srcdir)/include/mailutils/types.hin > $@
......
/* GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 1999, 2000, 2001, 2002, 2005, 2006, 2007
Free Software Foundation, Inc.
Copyright (C) 1999, 2000, 2001, 2002, 2005, 2006, 2007,
2009 Free Software Foundation, Inc.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
......@@ -22,58 +22,7 @@
#include <libguile.h>
#if GUILE_VERSION == 14
# define SCM_STRING_CHARS SCM_CHARS
# define scm_list_1 SCM_LIST1
# define scm_list_2 SCM_LIST2
# define scm_list_3 SCM_LIST3
# define scm_list_4 SCM_LIST4
# define scm_list_5 SCM_LIST5
# define scm_list_n SCM_LISTN
# define scm_c_define scm_sysintern
# define scm_primitive_eval_x scm_eval_x
# define scm_i_big2dbl scm_big2dbl
# define scm_c_eval_string scm_eval_0str
# define MU_SCM_SYMBOL_VALUE(p) scm_symbol_value0(p)
extern SCM scm_long2num (long val);
#else
# define MU_SCM_SYMBOL_VALUE(p) SCM_VARIABLE_REF(scm_c_lookup(p))
#endif
#if GUILE_VERSION < 18
# define scm_i_string_chars SCM_ROCHARS
# define scm_i_string_length SCM_ROLENGTH
# define scm_is_string(s) (SCM_NIMP(s) && SCM_STRINGP(s))
# define scm_from_locale_stringn(s,l) scm_makfromstr(s,l,0)
# define scm_from_locale_string(s) scm_makfrom0str(s)
# define scm_from_locale_symbol(s) scm_str2symbol(s)
# define scm_from_int SCM_MAKINUM
# define scm_from_size_t mu_scm_makenum
# define scm_gc_malloc scm_must_malloc
/* FIXME */
# define scm_is_integer SCM_INUMP
# define scm_to_int32 SCM_INUM
# define scm_to_int SCM_INUM
# define DECL_SCM_T_ARRAY_HANDLE(name)
# define SCM_T_ARRAY_HANDLE_PTR(name) 0
# define scm_vector_writable_elements(res,handle,a,b) SCM_VELTS(res)
# define scm_array_handle_release(h)
#else
# define DECL_SCM_T_ARRAY_HANDLE(name) scm_t_array_handle name
# define SCM_T_ARRAY_HANDLE_PTR(name) &(name)
#endif
#define MU_SCM_SYMBOL_VALUE(p) SCM_VARIABLE_REF(scm_c_lookup(p))
typedef struct
{
......
......@@ -19,9 +19,9 @@
INCLUDES = @MU_COMMON_INCLUDES@
MU_CXX_LIBS = libmu_cpp.la
lib_LTLIBRARIES = @MU_CXX_LIBS@
EXTRA_LTLIBRARIES = $(MU_CXX_LIBS)
MU_CXX_LTLIBRARIES_LIST = libmu_cpp.la
lib_LTLIBRARIES = @MU_CXX_LTLIBRARIES_BUILD@
EXTRA_LTLIBRARIES = $(MU_CXX_LTLIBRARIES_LIST)
libmu_cpp_la_SOURCES = \
address.cc\
......
## Process this file with GNU Automake to create Makefile.in
## Copyright (C) 2001, 2002, 2006, 2007 Free Software Foundation, Inc.
## Copyright (C) 2001, 2002, 2006, 2007,
## 2009 Free Software Foundation, Inc.
##
## GNU Mailutils is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
......@@ -19,7 +20,8 @@
INCLUDES = -I. @MU_COMMON_INCLUDES@ @GUILE_INCLUDES@
lib_LTLIBRARIES=@MU_SCM@
MU_SCM_LTLIBRARIES_LIST = libmu_scm.la
lib_LTLIBRARIES=@MU_SCM_LTLIBRARIES_BUILD@
EXTRA_LTLIBRARIES=libmu_scm.la
C_SRCS=\
mu_address.c\
......@@ -90,7 +92,7 @@ AM_CPPFLAGS=-DDATADIR=\"$(pkgdatadir)\"
ETAGS_ARGS = --regex='/SCM_\(GLOBAL_\)?\(G?PROC\|G?PROC1\|SYMBOL\|VCELL\|CONST_LONG\).*\"\([^\"]\)*\"/\3/' \
--regex='/[ \t]*SCM_[G]?DEFINE1?[ \t]*(\([^,]*\),[^,]*/\1/'
GUILE_DOC_SNARF=$(top_srcdir)/scripts/guile-$(GUILE_SNARF_VERSION)/guile-doc-snarf
GUILE_DOC_SNARF=$(mu_aux_dir)/guile-doc-snarf
SUFFIXES=.x .doc .inc .in
......
......@@ -31,11 +31,11 @@ SCM_DEFINE (scm_mu_getpwuid, "mu-getpwuid", 1, 0, 0,
SCM result;
struct mu_auth_data *entry;
SCM *ve;
DECL_SCM_T_ARRAY_HANDLE(handle);
scm_t_array_handle handle;
result = scm_c_make_vector (8, SCM_UNSPECIFIED);
ve = scm_vector_writable_elements (result,
SCM_T_ARRAY_HANDLE_PTR(handle),
&handle,
NULL, NULL);
if (scm_is_integer (USER))
......@@ -69,7 +69,7 @@ SCM_DEFINE (scm_mu_getpwuid, "mu-getpwuid", 1, 0, 0,
ve[6] = scm_makfrom0str (entry->shell);
ve[7] = scm_makfrom0str (entry->mailbox);
scm_array_handle_release (SCM_T_ARRAY_HANDLE_PTR (handle));
scm_array_handle_release (&handle);
mu_auth_data_free (entry);
return result;
......
......@@ -20,9 +20,9 @@
INCLUDES = @MU_COMMON_INCLUDES@
YLWRAP = $(SHELL) $(top_srcdir)/scripts/gylwrap
YLWRAP = $(SHELL) $(mu_aux_dir)/gylwrap
AM_YFLAGS = -dtv
AM_CPPFLAGS = -DSIEVE_MODDIR=\"@SIEVE_MODDIR@\"
AM_CPPFLAGS = -DMU_SIEVE_MODDIR=\"@MU_SIEVE_MODDIR@\"
SUBDIRS = . extensions
......
......@@ -18,7 +18,7 @@
## Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA
## 02110-1301 USA
moddir=@SIEVE_MODDIR@
moddir=@MU_SIEVE_MODDIR@
mod_LTLIBRARIES = \
list.la\
moderator.la\
......@@ -29,28 +29,17 @@ mod_LTLIBRARIES = \
INCLUDES = @MU_COMMON_INCLUDES@
AM_LDFLAGS = ../../lib/libmuaux.la ${MU_LIB_MAILUTILS}
AM_LDFLAGS = -module -avoid-version -no-undefined -rpath '$(moddir)'
list_la_SOURCES = list.c
list_la_LIBADD = ../libmu_sieve.la
list_la_LDFLAGS = -module -avoid-version -no-undefined
LIBS = ../libmu_sieve.la
moderator_la_SOURCES = moderator.c
moderator_la_LIBADD = ../libmu_sieve.la
moderator_la_LDFLAGS = -module -avoid-version -no-undefined
spamd_la_SOURCES = spamd.c
spamd_la_LIBADD = ../libmu_sieve.la
spamd_la_LDFLAGS = -module -avoid-version -no-undefined
timestamp_la_SOURCES = timestamp.c
timestamp_la_LIBADD = ../libmu_sieve.la
timestamp_la_LDFLAGS = -module -avoid-version -no-undefined
vacation_la_SOURCES = vacation.c
vacation_la_LIBADD = ../libmu_sieve.la
vacation_la_LDFLAGS = -module -avoid-version -no-undefined
pipe_la_SOURCES = pipe.c
pipe_la_LIBADD = ../libmu_sieve.la
pipe_la_LDFLAGS = -module -avoid-version -no-undefined
......
......@@ -53,8 +53,8 @@ sieve_init_load_path ()
{
if (lt_dlinit ())
return 1;
#ifdef SIEVE_MODDIR
_add_load_dir (SIEVE_MODDIR, NULL);
#ifdef MU_SIEVE_MODDIR
_add_load_dir (MU_SIEVE_MODDIR, NULL);
inited = 1;
#endif
}
......
......@@ -20,9 +20,9 @@
INCLUDES = @MU_COMMON_INCLUDES@
SUBDIRS = testsuite
PROGRAMS_SMTP = mail.remote$(EXEEXT)
MU_SMTP_PROGRAMS_LIST = mail.remote$(EXEEXT)
EXTRA_PROGRAMS = mail.remote
libexec_PROGRAMS = @BUILD_SMTP_PROGRAMS@
libexec_PROGRAMS = @MU_SMTP_PROGRAMS_BUILD@
mail_remote_SOURCES = mail.remote.c
......
......@@ -19,7 +19,7 @@
AUTOMAKE_OPTIONS = dejagnu
SMTP_DEJATOOL = mail.remote
DEJATOOL = @RUN_SMTP_DEJATOOL@
DEJATOOL = @MU_SMTP_DEJATOOL@
RUNTESTFLAGS =
CLEANFILES = *.log
test_dirs = lib mail.remote
......
......@@ -20,7 +20,7 @@
INCLUDES = @MU_COMMON_INCLUDES@ -I${top_srcdir}/libproto/include
YLWRAP = $(SHELL) $(top_srcdir)/scripts/gylwrap
YLWRAP = $(SHELL) $(mu_aux_dir)/gylwrap
AM_YFLAGS=-vt
AM_LFLAGS=-dvp
......@@ -146,7 +146,7 @@ cfg_lexer.c: $(srcdir)/cfg_lexer.l cfg_parser.h
-- -yy mu_cfg_yy
muerrno.c: errors muerrno.cin
$(AWK) -f $(top_srcdir)/scripts/generr.awk $^ > $@
$(AWK) -f $(mu_aux_dir)/generr.awk $^ > $@
libmailutils_la_LIBADD = @MU_COMMON_LIBRARIES@
libmailutils_la_LDFLAGS = -version-info @VI_CURRENT@:@VI_REVISION@:@VI_AGE@
......
## Process this file with GNU Automake to create Makefile.in
## Copyright (C) 2001, 2002, 2003, 2007 Free Software Foundation, Inc.
## Copyright (C) 2001, 2002, 2003, 2007, 2009 Free Software Foundation, Inc.
##
## GNU Mailutils is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
......@@ -19,7 +19,7 @@
# All MH programs. Note that we have to explicitely append EXEEXT, Makefile
# won't do that.
PROGRAMS_MH = \
MU_MH_PROGRAMS_LIST = \
ali$(EXEEXT)\
anno$(EXEEXT)\
burst$(EXEEXT)\
......@@ -71,13 +71,13 @@ EXTRA_PROGRAMS = \
whatnow\
whom
LIBRARIES_MH = libmh.a
MU_MH_LIBRARIES_LIST = libmh.a
EXTRA_LIBRARIES = libmh.a
bindir = @MH_BIN_DIR@
mhlibdir = $(pkgdatadir)/mh
bin_PROGRAMS = @BUILD_MH_PROGRAMS@
noinst_LIBRARIES = @BUILD_MH_LIBRARIES@
bin_PROGRAMS = @MU_MH_PROGRAMS_BUILD@
noinst_LIBRARIES = @MU_MH_LIBRARIES_BUILD@
libmh_a_SOURCES= \
compcommon.c\
......@@ -143,7 +143,7 @@ LDADD = $(mh_LIBS)
scan_LDADD = $(mh_LIBS) @CURSES_LIBS@
pick_SOURCES = pick.c pick.h pick-gram.c pick-gram.h
YLWRAP = $(SHELL) $(top_srcdir)/scripts/gylwrap
YLWRAP = $(SHELL) $(mu_aux_dir)/gylwrap
AM_YFLAGS=-vt
pick-gram.c pick-gram.h: $(srcdir)/pick.y
......@@ -168,7 +168,7 @@ mh_alias_lex.c: $(srcdir)/mh_alias.l mh_alias.h
$(srcdir)/mh_alias.l lex.yy.c mh_alias_lex.c \
-- -yy ali_yy
install-exec-hook: @BUILD_MH_EXEC_HOOK@
install-exec-hook: @MU_MH_EXEC_HOOK@
mh_finish_install:
@here=`pwd`; \
......
......@@ -29,7 +29,7 @@ mimeview_SOURCES = \
mimetypes-decl.h \
mimeview.h
YLWRAP = $(SHELL) $(top_srcdir)/scripts/gylwrap
YLWRAP = $(SHELL) $(mu_aux_dir)/gylwrap
AM_YFLAGS=-vt
AM_LEXFLAGS=-d
AM_CPPFLAGS=-D_GNU_SOURCE=1
......
......@@ -17,9 +17,10 @@
## Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA
## 02110-1301 USA
SUBDIRS = guile-1.4 guile-1.6
EXTRA_DIST = \
debugdef.m4\
guile-doc-snarf\
guile-doc-snarf.awk\
gylwrap\
mailutils.spec\
mailutils.spec.in\
......
......@@ -21,7 +21,8 @@ INCLUDES = @MU_COMMON_INCLUDES@ $(PYTHON_INCLUDES)
EXTRA_LTLIBRARIES = libmu_py.la c_api.la
lib_LTLIBRARIES=@MU_PY@
MU_PY_LIB_LTLIBRARIES_LIST=libmu_py.la
lib_LTLIBRARIES=@MU_PY_LIB_LTLIBRARIES_BUILD@
libmu_py_la_SOURCES = \
error.c \
address.c \
......@@ -61,8 +62,8 @@ libmu_py_la_LIBADD = $(PYTHON_LIBS) @MU_COMMON_LIBRARIES@ \
@MU_AUTHLIBS@\
${MU_LIB_MAILUTILS}
MU_PYTHON_LTLIBS = c_api.la
pkgpyexec_LTLIBRARIES = @MU_PYTHON_LTLIBS@
MU_PY_PKGPYEXEC_LTLIBRARIES_LIST = c_api.la
pkgpyexec_LTLIBRARIES = @MU_PY_PKGPYEXEC_LTLIBRARIES_BUILD@
c_api_la_LDFLAGS = -avoid-version -module -rpath $(pkgpyexecdir)
c_api_la_LIBADD = $(PYTHON_LIBS) ${MU_LIB_PY}
c_api_la_SOURCES = c_api.c
......
......@@ -17,7 +17,7 @@
## Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA
## 02110-1301 USA
pkgpython_PYTHON = \
MU_PY_PKGPYTHON_LIST=\
__init__.py \
error.py \
address.py \
......@@ -39,3 +39,5 @@ pkgpython_PYTHON = \
url.py \
util.py
pkgpython_PYTHON=@MU_PY_PKGPYTHON_BUILD@
EXTRA_PYTHON=$(MU_PY_PKGPYTHON_LIST)
......
.gdbinit
Makefile
Makefile.in
compile
config.guess
config.rpath
config.sub
depcomp
elisp-comp
install-sh
link-warning.h
ltmain.sh
mailutils.spec
mdate-sh
missing
mkinstalldirs
texinfo.tex
compile
config.guess
config.rpath
config.sub
depcomp
elisp-comp
gitlog-to-changelog
install-sh
link-warning.h
ltmain.sh
mailutils.spec
mdate-sh
missing
py-compile
texinfo.tex
ylwrap
## Process this file with GNU Automake to create Makefile.in
## Copyright (C) 2002, 2007 Free Software Foundation, Inc.
##
## GNU Mailutils 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 3, 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. 51 Franklin Street, Fifth Floor, Boston, MA
## 02110-1301 USA
EXTRA_DIST = \
guile-doc-snarf\
guile-func-name-check\
guile-snarf.awk
#! /bin/sh
# Extract the initialization actions for builtin things.
#
# Copyright (C) 1999, 2000, 2007 Free Software Foundation, Inc.
#
# 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 3, 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 software; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301 USA
#
## For some obscure reason, the original guile-doc-snarf distributed
## with guile up to version 1.4, passes guile-func-name-check
## to awk without absolute path spec. Consequently the script bails
## out unless guile-func-name-check is in the current directory.
## This version assumes that both scripts live in the same directory
## and deduces the path to guile-func-name-check from the own pathname.
## --gray
OUTFILE=/dev/tty
DOCFILE=0
# process aruments
while [ $# -gt 0 ];
do
case $1 in
-o) OUTFILE=$2; shift 2;;
-d) DOCFILE=1; shift;;
*) break;;
esac
done
fullfilename=$1; shift
# strip path to source directory
filename=`basename $fullfilename`
if [ $DOCFILE -ne 0 ]; then
dot_doc=$OUTFILE
OUTFILE=/dev/null
else
# we need to be sure that the .x file exists
# since the .c/.cc file may include it
# (the old guile-snarf did not have this problem
# because the makefile redirects output to the .x file
# which creates the file before the inclusion occurs)
# --12/12/99 gjb
no_ext=`echo $filename | sed 's/\.[^.]*$//g'`
dot_doc=${no_ext}.doc
fi
temp="/tmp/snarf.$$"
trap "rm -f $temp" 0 1 2 15
## Let the user override the preprocessor & awk autoconf found.
test -n "${CPP+set}" || CPP="gcc -E"
test -n "${AWK+set}" || AWK="gawk"
## Must run guile-func-name-check on the unpreprocessed source
${AWK} -f `dirname $0`/guile-func-name-check "$fullfilename"
## We must use a temporary file here, instead of a pipe, because we
## need to know if CPP exits with a non-zero status.
echo "/* empty */" > $OUTFILE
${CPP} -DSCM_MAGIC_SNARFER $fullfilename "$@" > ${temp}
if [ $? -ne 0 ]; then
rm -f $OUTFILE
exit 1
fi
cat ${temp} | \
sed 's/^\(.\{128\}.\{128\}.\{128\}.\{128\}.\{128\}.\{128\}.\{128\}.\{128\}\).*/\1/g' | \
${AWK} -f `dirname $0`/guile-snarf.awk `basename ${dot_doc}` > $OUTFILE
#! /usr/bin/awk -f
#
# Copyright (C) 2000, 2007 Free Software Foundation, Inc.
#
# 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 3, 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 software; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301 USA
#
# Written by Greg J. Badros, <gjb@cs.washington.edu>
# 11-Jan-2000
BEGIN {
filename = ARGV[1];
}
/^SCM_DEFINE/ {
func_name = $0;
sub(/^[^\(\n]*\([ \t]*/,"", func_name);
sub(/[ \t]*,.*/,"", func_name);
# print func_name; # GJB:FIXME:: flag to do this to list primitives?
in_a_func = 1;
}
in_a_func && /^\{/ {
if (!match(last_line,/^#define[ \t]+FUNC_NAME[ \t]+/)) {
printf filename ":" NR ":***" > "/dev/stderr";
print "Missing or erroneous `#define FUNC_NAME s_" func_name "'" > "/dev/stderr";
} else {
sub(/^#define[ \t]+FUNC_NAME[ \t]+s_/, "", last_line);
sub(/[ \t]*$/,"",last_line);
if (last_line != func_name) {
printf filename ":" NR ":***" > "/dev/stderr";
print "Mismatching FUNC_NAME. Should be: `#define FUNC_NAME s_" func_name "'" > "/dev/stderr";
}
}
}
1 == next_line_better_be_undef {
if (!match($0,/^#undef FUNC_NAME[ \t]*$/)) {
printf filename ":" NR ":***" > "/dev/stderr";
print "Missing or erroneous #undef for " func_name ": "
"Got `" $0 "' instead." > "/dev/stderr";
}
in_a_func = "";
func_name = "";
next_line_better_be_undef = 0;
}
in_a_func && /^\}/ {
next_line_better_be_undef = 1;
}
{ last_line = $0; }
# Copyright (C) 1999, 2000, 2007 Free Software Foundation, Inc.
#
# 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 3, 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 software; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301 USA
#
# Written by Greg J. Badros, <gjb@cs.washington.edu>
# 12-Dec-1999
BEGIN { FS="|";
dot_doc_file = ARGV[1]; ARGV[1] = "-";
std_err = "/dev/stderr";
# be sure to put something in the files to help make out
print "";
printf "" > dot_doc_file;
}
/^[ \t]*SCM__I/ { copy = $0;
gsub(/[ \t]*SCM__I/, "", copy);
gsub(/SCM__D.*$/, "", copy);
print copy; }
/SCM__D/,/SCM__S/ { copy = $0;
if (match(copy,/SCM__DR/)) { registering = 1; }
else {registering = 0; }
gsub(/.*SCM__D./,"", copy);
gsub(/SCM__S.*/,"",copy);
gsub(/[ \t]+/," ", copy);
sub(/^[ \t]*/,"(", copy);
gsub(/\"/,"",copy);
sub(/\([ \t]*void[ \t]*\)/,"()", copy);
sub(/ \(/," ",copy);
numargs = gsub(/SCM /,"", copy);
numcommas = gsub(/,/,"", copy);
numactuals = $2 + $3 + $4;
location = $5;
gsub(/\"/,"",location);
sub(/^[ \t]*/,"",location);
sub(/[ \t]*$/,"",location);
sub(/: /,":",location);
# Now whittle copy down to just the $1 field
# (but do not use $1, since it hasn't been
# altered by the above regexps)
gsub(/[ \t]*\|.*$/,"",copy);
sub(/ \)/,")",copy);
# Now `copy' contains the nice scheme proc "prototype", e.g.
# (set-car! pair value)
# print copy > "/dev/stderr"; # for debugging
proc_and_args = copy;
curr_function_proto = copy;
sub(/[^ \n]* /,"",proc_and_args);
sub(/\)[ \t]*/,"",proc_and_args);
split(proc_and_args,args," ");
# now args is an array of the arguments
# args[1] is the formal name of the first argument, etc.
if (numargs != numactuals && !registering)
{ print location ":*** `" copy "' is improperly registered as having " numactuals " arguments" > std_err; }
print " \n" copy (registering?")":"") > dot_doc_file ; }
/SCM__S/,/SCM__E.*$/ { copy = $0;
gsub(/.*SCM__S/,"",copy);
sub(/^[ \t]*"?/,"", copy);
sub(/\"?[ \t]*SCM__E.*$/,"", copy);
gsub(/\\n\\n"?/,"\n",copy);
gsub(/\\n"?[ \t]*$/,"",copy);
gsub(/\\\"[ \t]*$/,"\"",copy);
gsub(/[ \t]*$/,"", copy);
if (copy != "") { print copy > dot_doc_file }
}
/SCM__E[ \t]/ { print "[" location "]" >> dot_doc_file; }
/\*&\*&\*&\*SCM_ARG_BETTER_BE_IN_POSITION/ { copy = $0;
sub(/.*\*&\*&\*&\*SCM_ARG_BETTER_BE_IN_POSITION\([ \t]*/,"",copy);
if (copy ~ /\"/) { next }
gsub(/[ \t]*,[ \t]*/,":",copy);
sub(/[ \t]*\).*/,"",copy);
split(copy,argpos,":");
argname = argpos[1];
pos = argpos[2];
if (pos ~ /[A-Za-z]/) { next }
if (pos ~ /^[ \t]*$/) { next }
if (argname ~ / /) { next }
line = argpos[3];
# print pos " " args[pos] " vs. " argname > "/dev/stderr";
if (args[pos] != argname) { print filename ":" line ":*** Argument name/number mismatch in `" curr_function_proto "' -- " argname " is not formal #" pos > "/dev/stderr"; }
}
## Process this file with GNU Automake to create Makefile.in
## Copyright (C) 2002, 2007 Free Software Foundation, Inc.
##
## GNU Mailutils 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 3, 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. 51 Franklin Street, Fifth Floor, Boston, MA
## 02110-1301 USA
EXTRA_DIST = \
guile-doc-snarf\
guile-doc-snarf.awk