aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitmodules3
-rw-r--r--Makefile.am4
-rw-r--r--am/guile.m485
-rw-r--r--bootstrap.conf3
-rw-r--r--configure.ac33
m---------gint0
-rw-r--r--src/Makefile.am2
-rw-r--r--src/guile.c16
8 files changed, 28 insertions, 118 deletions
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..7c369d4
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "gint"]
+ path = gint
+ url = git://git.gnu.org.ua/gint.git
diff --git a/Makefile.am b/Makefile.am
index 95190d6..d11a38d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -20,4 +20,4 @@
-ACLOCAL_AMFLAGS = -I m4 -I am
-SUBDIRS = build lib src po doc scripts examples guile contrib \
+ACLOCAL_AMFLAGS = -I m4 -I am -I gint
+SUBDIRS = build lib gint src po doc scripts examples guile contrib \
elisp testsuite
diff --git a/am/guile.m4 b/am/guile.m4
deleted file mode 100644
index 8841a6a..0000000
--- a/am/guile.m4
+++ /dev/null
@@ -1,85 +0,0 @@
-dnl This file is part of GNU mailutils.
-dnl Copyright (C) 2001, 2006, 2007, 2010 Free Software Foundation, Inc.
-dnl
-dnl This program is free software; you can redistribute it and/or modify
-dnl it under the terms of the GNU General Public License as published by
-dnl the Free Software Foundation; either version 3 of the License, or
-dnl (at your option) any later version.
-dnl
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-dnl GNU General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU General Public License
-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_CHECK_GUILE(minversion, [act-if-found], [ac-if-not-found])
-dnl $1 $2 $3
-AC_DEFUN([MU_CHECK_GUILE],
-[
- AS_VAR_SET([mu_cv_guile], [no])
- AC_PATH_PROG(GUILE_CONFIG, guile-config, no, $PATH)
- 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`
- 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"`
-
- m4_if([$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])
-
- save_LIBS=$LIBS
- save_CFLAGS=$CFLAGS
- LIBS="$LIBS $GUILE_LIBS"
- CFLAGS="$CFLAGS $GUILE_INCLUDES"
- AC_TRY_LINK([#include <libguile.h>],
- m4_if([$1], , scm_shell(0, NULL);, [$1]),
- [AS_VAR_SET([mu_cv_guile], $GUILE_VERSION)])
- LIBS=$save_LIBS
- CFLAGS=$save_CFLAGS
- 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
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <libguile.h>]],
- [SCM_DEVAL_P = 1;
- SCM_BACKTRACE_P = 1;
- SCM_RECORD_POSITIONS_P = 1;
- SCM_RESET_DEBUG_MODE;])],
- [mu_cv_guile_debug=yes],
- [mu_cv_guile_debug=no])
- if test $mu_cv_guile_debug = yes; then
- AC_DEFINE_UNQUOTED([GUILE_DEBUG_MACROS], 1,
- [Define to 1 if SCM_DEVAL_P, SCM_BACKTRACE_P, SCM_RECORD_POSITIONS_P and SCM_RESET_DEBUG_MODE are defined])
- fi
- AC_CHECK_TYPES([scm_t_off],[],[],[#include <libguile.h>])
- 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
-])
-
diff --git a/bootstrap.conf b/bootstrap.conf
index f6e5dac..9589b64 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -5,2 +5,5 @@ fi
+git submodule init
+git submodule update
+
gnulib_name=libanubis
diff --git a/configure.ac b/configure.ac
index 9947012..cf6c2fd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -84,6 +84,6 @@ AC_CHECK_LIB(nsl, gethostbyaddr)
-AC_SUBST(INCLUDES)
+AC_SUBST(ADD_INCLUDES)
case $build in
*-apple-darwin*)
- INCLUDES="$INCLUDES -I/usr/include" ;;
+ ADD_INCLUDES="$ADD_INCLUDES -I/usr/include" ;;
esac
@@ -105,22 +105,10 @@ esac],[useguile=yes])
-AC_SUBST(M4_DEFS)
-
-AC_SUBST(GUILE_INCLUDES)
-AC_SUBST(GUILE_LIBS)
-AC_SUBST(GUILE_BINDIR)
-AC_SUBST(GUILE_SNARF_VERSION)
-AC_SUBST(GUILE_SCRIPTS)
+AC_SUBST([M4_DEFS])
+AC_SUBST([GUILE_SCRIPTS])
if test x"$useguile" = x"yes"; then
- MU_CHECK_GUILE(,[
- AC_DEFINE(WITH_GUILE,1,[Enable Guile support])
- GUILE_INCLUDES=`guile-config compile`
- GUILE_LIBS=`guile-config link`
- GUILE_BINDIR=`guile-config info bindir`
- GUILE_SCRIPTS='$(GUILE_SCM)'
- M4_DEFS="$M4_DEFS -DWITH_GUILE"
- case "$GUILE_VERSION" in
- 16|17) GUILE_SNARF_VERSION="1.6";;
- *) GUILE_SNARF_VERSION="1.6";;
- esac
- ],[useguile=no])
+ GINT_INIT([gint],[1.8 nodoc std-site-dir],
+ [AC_DEFINE(WITH_GUILE,1,[Enable Guile support])
+ GUILE_SCRIPTS='$(GUILE_SCM)'
+ M4_DEFS="$M4_DEFS -DWITH_GUILE"],
+ [useguile=no])
fi
@@ -150,3 +138,3 @@ else
gpgmedir=1
- INCLUDES="$INCLUDES -I$1/include"
+ ADD_INCLUDES="$ADD_INCLUDES -I$1/include"
AC_MSG_CHECKING(for $1/include/gpgme.h)
@@ -416,2 +404,3 @@ AC_CONFIG_FILES([Makefile
contrib/Makefile
+ gint/Makefile
doc/Makefile
diff --git a/gint b/gint
new file mode 160000
+Subproject 4254b0590e609b82dac3d688ecb401c9eefb7e2
diff --git a/src/Makefile.am b/src/Makefile.am
index 3c04b95..3ac2331 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -98,3 +98,3 @@ localedir = $(datadir)/locale
DEFS = @DEFS@ -DLOCALEDIR=\"$(localedir)\"
-INCLUDES = @INCLUDES@ @LIBGNUTLS_CFLAGS@ -I$(top_srcdir)/lib
+INCLUDES = @ADD_INCLUDES@ @LIBGNUTLS_CFLAGS@ -I$(top_srcdir)/lib
SUFFIXES=.opt .c
diff --git a/src/guile.c b/src/guile.c
index 6af115e..dbba3a9 100644
--- a/src/guile.c
+++ b/src/guile.c
@@ -40,3 +40,2 @@ struct scheme_exec_data
void *data;
- SCM result;
};
@@ -47,4 +46,3 @@ scheme_safe_exec_body (void *data)
struct scheme_exec_data *ed = data;
- ed->result = ed->handler (ed->data);
- return SCM_BOOL_F;
+ return ed->handler (ed->data);
}
@@ -56,3 +54,4 @@ guile_safe_exec (SCM (*handler) (void *data), void *data, SCM *result)
struct scheme_exec_data ed;
-
+ SCM res;
+
if (setjmp(jmp_env))
@@ -61,7 +60,8 @@ guile_safe_exec (SCM (*handler) (void *data), void *data, SCM *result)
ed.data = data;
- scm_internal_lazy_catch (SCM_BOOL_T,
- scheme_safe_exec_body, (void*)&ed,
- eval_catch_handler, &jmp_env);
+ res= scm_c_catch (SCM_BOOL_T,
+ scheme_safe_exec_body, (void*)&ed,
+ eval_catch_handler, &jmp_env,
+ NULL, NULL);
if (result)
- *result = ed.result;
+ *result = res;
return 0;

Return to:

Send suggestions and report system problems to the System administrator.