From e789d6e011c7b5f95f97e897b79af0225676f2b3 Mon Sep 17 00:00:00 2001
From: Rob Browning <rlb@defaultvalue.org>
Date: Mon, 25 Apr 2011 22:11:49 -0500
Subject: Handle DFSG split.

---
 Makefile.am         |   28 +++++++++++++++++++++++
 configure.in        |   62 +++++++++++++++++++++++++++++++++++++++++++++++++++
 doc/Makefile.am     |   12 +---------
 doc/ref/Makefile.am |    7 +-----
 4 files changed, 92 insertions(+), 17 deletions(-)
 create mode 100644 Makefile.am
 create mode 100644 configure.in

diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..be26c80
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,28 @@
+## Process this file with automake to produce Makefile.in.
+##
+##  	Copyright (C) 1998, 1999, 2000, 2001, 2002, 2006 Free Software Foundation, Inc.
+##
+##   This file is part of GUILE.
+##
+##   GUILE 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, or
+##   (at your option) any later version.
+##
+##   GUILE 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 GUILE; see the file COPYING.  If not, write
+##   to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
+##   Floor, Boston, MA 02110-1301 USA
+
+AUTOMAKE_OPTIONS = 1.5
+
+SUBDIRS = doc
+
+EXTRA_DIST = LICENSE
+
+# Makefile.am ends here
diff --git a/configure.in b/configure.in
new file mode 100644
index 0000000..91251a4
--- /dev/null
+++ b/configure.in
@@ -0,0 +1,62 @@
+dnl   configuration script for Guile
+dnl   Process this file with autoconf to produce configure.
+dnl
+
+define(GUILE_CONFIGURE_COPYRIGHT,[[
+
+Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+
+This file is part of GUILE
+
+GUILE 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, or (at your
+option) any later version.
+
+GUILE 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 GUILE; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+Boston, MA 02110-1301, USA.
+
+]])
+
+AC_PREREQ(2.53)
+
+AC_INIT(m4_esyscmd(. ./GUILE-VERSION && echo -n ${PACKAGE}),
+        m4_esyscmd(. ./GUILE-VERSION && echo -n ${GUILE_VERSION}))
+AC_CONFIG_AUX_DIR([.])
+AC_CONFIG_SRCDIR([doc/ref/guile.texi])
+AM_INIT_AUTOMAKE([foreign])
+AC_COPYRIGHT(GUILE_CONFIGURE_COPYRIGHT)
+AM_MAINTAINER_MODE
+AH_TOP(/*GUILE_CONFIGURE_COPYRIGHT*/)
+
+AC_PROG_INSTALL
+AC_PROG_CC
+AC_PROG_CPP
+AC_PROG_AWK
+
+AC_CHECK_PROG(have_makeinfo, makeinfo, yes, no)
+AM_CONDITIONAL(HAVE_MAKEINFO, test "$have_makeinfo" = yes)
+
+AC_SUBST(AWK)
+
+AC_CONFIG_FILES([
+  Makefile
+  doc/Makefile
+  doc/goops/Makefile
+  doc/ref/Makefile
+])
+
+AC_OUTPUT
+
+dnl Local Variables:
+dnl comment-start: "dnl "
+dnl comment-end: ""
+dnl comment-start-skip: "\\bdnl\\b\\s *"
+dnl End:
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 4581a72..f71b2a9 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -21,26 +21,16 @@
 
 AUTOMAKE_OPTIONS = gnu
 
-SUBDIRS = ref tutorial goops r5rs
-
-dist_man1_MANS = guile.1
+SUBDIRS = ref goops
 
 EXAMPLE_SMOB_FILES = \
     ChangeLog-2008 Makefile README image-type.c image-type.h myguile.c
 
-OLDFMT = oldfmt.c
-
 dist-hook:
-	cp $(srcdir)/$(OLDFMT) $(distdir)/
 	mkdir $(distdir)/example-smob
 	for f in $(EXAMPLE_SMOB_FILES); do \
 	  cp $(srcdir)/example-smob/$$f $(distdir)/example-smob/; \
         done
 
-EXTRA_DIST = groupings.alist ChangeLog-2008 # guile-api.alist
-
 include $(top_srcdir)/am/maintainer-dirs
-guile-api.alist: guile-api.alist-FORCE
-	( cd $(top_builddir) ; $(mscripts)/update-guile-api.alist )
-guile-api.alist-FORCE:
 
diff --git a/doc/ref/Makefile.am b/doc/ref/Makefile.am
index abaab51..fe9aff1 100644
--- a/doc/ref/Makefile.am
+++ b/doc/ref/Makefile.am
@@ -80,13 +80,8 @@ ETAGS_ARGS = $(info_TEXINFOS) $(guile_TEXINFOS)
 
 EXTRA_DIST = ChangeLog-2008
 
-include $(top_srcdir)/am/pre-inst-guile
-
-# Automated snarfing
-
 autoconf.texi: autoconf-macros.texi
 autoconf-macros.texi: $(top_srcdir)/guile-config/guile.m4
-	GUILE="$(GUILE_FOR_BUILD)" $(top_srcdir)/scripts/snarf-guile-m4-docs $(top_srcdir)/guile-config/guile.m4 \
-	  > $(srcdir)/$@
+	guile-tools snarf-guile-m4-docs $< > $(srcdir)/$@
 
 MAINTAINERCLEANFILES = autoconf-macros.texi
-- 
1.7.4.1

