blob: 278bc648fa5327813ecf783b8663a68a5d9e27de [file] [log] [blame]
Daniel Veillard01791d51998-07-24 19:24:09 +00001#!/bin/sh
2# Run this to generate all the initial makefiles, etc.
3
Elliot Lee8f8b4c81998-12-23 00:37:26 +00004srcdir=`dirname $0`
5test -z "$srcdir" && srcdir=.
6
7THEDIR=`pwd`
8cd $srcdir
Daniel Veillard01791d51998-07-24 19:24:09 +00009DIE=0
10
11(autoconf --version) < /dev/null > /dev/null 2>&1 || {
12 echo
Daniel Veillard361d8452000-04-03 19:48:13 +000013 echo "You must have autoconf installed to compile libxml."
Daniel Veillard01791d51998-07-24 19:24:09 +000014 echo "Download the appropriate package for your distribution,"
15 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
16 DIE=1
17}
18
19(libtool --version) < /dev/null > /dev/null 2>&1 || {
20 echo
Daniel Veillard361d8452000-04-03 19:48:13 +000021 echo "You must have libtool installed to compile libxml."
Daniel Veillard01791d51998-07-24 19:24:09 +000022 echo "Get ftp://alpha.gnu.org/gnu/libtool-1.0h.tar.gz"
23 echo "(or a newer version if it is available)"
24 DIE=1
25}
26
Havoc Pennington830e8972002-08-18 22:22:13 +000027(automake-1.4 --version) < /dev/null > /dev/null 2>&1 || {
Daniel Veillard01791d51998-07-24 19:24:09 +000028 echo
Havoc Pennington84ec40a2002-08-22 13:59:35 +000029 echo "You must have latest automake 1.4 installed to compile libxml,"
30 echo "or alternatively create a symlink from automake-1.4 to "
31 echo "plain automake."
32 echo "Newer versions of automake 1.4 come with the symlink "
33 echo "pregenerated. This will allow you to compile libxml "
34 echo "while also installing newer automakes such as 1.6."
35 echo "Get ftp://sources.redhat.com/pub/automake/automake-1.4l.tar.gz"
36 echo "(or a newer version in the 1.4 series if it is available)."
Daniel Veillard01791d51998-07-24 19:24:09 +000037 DIE=1
38}
39
40if test "$DIE" -eq 1; then
41 exit 1
42fi
43
Daniel Veillardcd1d9442001-06-23 18:53:44 +000044test -f entities.c || {
Daniel Veillard361d8452000-04-03 19:48:13 +000045 echo "You must run this script in the top-level libxml directory"
Daniel Veillard01791d51998-07-24 19:24:09 +000046 exit 1
47}
48
49if test -z "$*"; then
50 echo "I am going to run ./configure with no arguments - if you wish "
51 echo "to pass any to it, please specify them on the $0 command line."
52fi
53
Daniel Veillard19b858c1999-02-06 18:12:01 +000054libtoolize --copy --force
Havoc Pennington830e8972002-08-18 22:22:13 +000055aclocal-1.4 $ACLOCAL_FLAGS
56automake-1.4 --add-missing
Daniel Veillard01791d51998-07-24 19:24:09 +000057autoconf
Elliot Lee8f8b4c81998-12-23 00:37:26 +000058
59cd $THEDIR
Arturo Espinosacd69df91998-12-28 23:49:02 +000060
61if test x$OBJ_DIR != x; then
62 mkdir -p "$OBJ_DIR"
63 cd "$OBJ_DIR"
64fi
65
Elliot Lee8f8b4c81998-12-23 00:37:26 +000066$srcdir/configure "$@"
Daniel Veillard01791d51998-07-24 19:24:09 +000067
68echo
Daniel Veillard361d8452000-04-03 19:48:13 +000069echo "Now type 'make' to compile libxml."