* raw-ltdl.h: add SCM_INSERTED_DLSYMLIST_STRUCT_DECL so we can
[bpt/guile.git] / autogen.sh
CommitLineData
5d94b2fe 1#!/bin/sh
3be5cdf2 2# Usage: sh -x ./autogen.sh [WORKBOOK]
5d94b2fe 3
fc4fc6f6
RB
4set -e
5
0b49b6ae 6[ -f GUILE-VERSION ] || {
3be5cdf2 7 echo "autogen.sh: run this command only at the top of guile-core."
0b49b6ae
JB
8 exit 1
9}
10
3be5cdf2
TTN
11######################################################################
12### Find workbook and make symlinks.
13
14workbook=../workbook # assume "cvs co hack"
15test x$1 = x || workbook=$1
16if [ ! -d $workbook ] ; then
17 echo "ERROR: could not find workbook dir"
18 echo " re-run like so: $0 WORKBOOK"
19 exit 1
20fi
21: found workbook at $workbook
22workbook=`(cd $workbook ; pwd)`
23
2e562f3a 24workbookdistfiles="ANON-CVS HACKING SNAPSHOTS"
3be5cdf2
TTN
25for f in $workbookdistfiles ; do
26 rm -f $f
27 ln -s $workbook/build/dist-files/$f $f
28done
29rm -f examples/example.gdbinit
30ln -s $workbook/build/dist-files/.gdbinit examples/example.gdbinit
0859b96a
TTN
31
32# TODO: This should be moved to dist-guile
feec7802 33mscripts=../guile-scripts
0859b96a
TTN
34rm -f BUGS
35$mscripts/render-bugs > BUGS
36
3be5cdf2
TTN
37######################################################################
38
af304e84
MV
39# Make sure this matches the ACLOCAL invokation in Makefile.am
40
65545721
ML
41./guile-aclocal.sh
42
fc4fc6f6
RB
43######################################################################
44### Libtool setup.
45
46# Get a clean version.
99fd355a 47libtoolize --force --copy --automake
0f59dd5f 48
fc4fc6f6
RB
49######################################################################
50
39eef509
RB
51ac_version=`autoconf --version | head -1`
52ac_version=`echo ${ac_version} | sed -e 's/autoconf.* \([0-9].[0-9]\+\)$/\1/'`
53case "${ac_version}" in
47f2f625 54 (2.5?) autoconf=autoconf; autoheader=autoheader ;;
39eef509 55esac
34d19ef6
HWN
56
57# configure.in reqs autoconf-2.53; try to find it
39eef509
RB
58if test -z "$autoconf"; then
59 for suf in "-2.53" "2.53" "" false; do
60 version=`autoconf$suf --version 2>/dev/null | head -1 | awk '{print $NF}' | awk -F. '{print $1 * 100 + $2}'`
61 if test "0$version" -eq 253; then
62 autoconf=autoconf$suf
63 autoheader=autoheader$suf
64 break
65 fi
66 done
67fi
34d19ef6
HWN
68
69if test -z "$autoconf"; then
70 echo "ERROR: Please install autoconf 2.53"
71 exit 1
72fi
afc8e572
HWN
73################################################################
74
75#detect automake version
76
77
47f2f625 78# configure.in reqs automake-1.6; try to find it
afc8e572
HWN
79for suf in "-1.6" "1.6" "" false; do
80 version=`automake$suf --version 2>/dev/null | head -1 | awk '{print $NF}' | awk -F. '{print $1 * 10 + $2}'`
81 if test "0$version" -eq 16; then
82 automake=automake$suf
83 break
84 fi
85done
86
87if test -z "$automake"; then
88 echo "ERROR: Please install automake 1.6.x"
89 exit 1
90fi
34d19ef6
HWN
91
92
93################################################################
94$autoheader
95$autoconf
1901873f
MV
96
97# Automake has a bug that will let it only add one copy of a missing
98# file. We need two mdate-sh, tho, one in doc/ref/ and one in
99# doc/tutorial/. We run automake twice as a workaround.
100
afc8e572
HWN
101$automake --add-missing
102$automake --add-missing
0b49b6ae 103
fc4fc6f6
RB
104echo "guile-readline..."
105(cd guile-readline && ./autogen.sh)
9e74987f
MV
106
107echo "Now run configure and make."
f2ae4555 108echo "You must pass the \`--enable-maintainer-mode' option to configure."
3be5cdf2
TTN
109
110# autogen.sh ends here