1998-07-24 19:24:09 +00:00
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
1998-12-23 00:37:26 +00:00
THEDIR = ` pwd `
2022-04-21 06:27:33 +02:00
cd ` dirname $0 `
srcdir = ` pwd `
1998-07-24 19:24:09 +00:00
DIE = 0
( autoconf --version) < /dev/null > /dev/null 2>& 1 || {
echo
2000-04-03 19:48:13 +00:00
echo "You must have autoconf installed to compile libxml."
1998-07-24 19:24:09 +00:00
echo "Download the appropriate package for your distribution,"
2003-08-13 11:09:42 +00:00
echo "or see http://www.gnu.org/software/autoconf"
1998-07-24 19:24:09 +00:00
DIE = 1
}
2022-01-16 13:56:17 +01:00
( libtoolize --version) < /dev/null > /dev/null 2>& 1 ||
( glibtoolize --version) < /dev/null > /dev/null 2>& 1 || {
1998-07-24 19:24:09 +00:00
echo
2000-04-03 19:48:13 +00:00
echo "You must have libtool installed to compile libxml."
2003-08-13 11:09:42 +00:00
echo "Download the appropriate package for your distribution,"
echo "or see http://www.gnu.org/software/libtool"
1998-07-24 19:24:09 +00:00
DIE = 1
}
2003-08-13 11:09:42 +00:00
( automake --version) < /dev/null > /dev/null 2>& 1 || {
1998-07-24 19:24:09 +00:00
echo
DIE = 1
2003-08-13 11:09:42 +00:00
echo "You must have automake installed to compile libxml."
echo "Download the appropriate package for your distribution,"
echo "or see http://www.gnu.org/software/automake"
1998-07-24 19:24:09 +00:00
}
if test " $DIE " -eq 1; then
exit 1
fi
2001-06-23 18:53:44 +00:00
test -f entities.c || {
2000-04-03 19:48:13 +00:00
echo "You must run this script in the top-level libxml directory"
1998-07-24 19:24:09 +00:00
exit 1
}
2012-02-29 09:34:32 +08:00
EXTRA_ARGS =
if test " x $1 " = "x--system" ; then
shift
prefix = /usr
libdir = $prefix /lib
sysconfdir = /etc
localstatedir = /var
if [ -d /usr/lib64 ] ; then
libdir = $prefix /lib64
fi
EXTRA_ARGS = " --prefix= $prefix --sysconfdir= $sysconfdir --localstatedir= $localstatedir --libdir= $libdir "
echo " Running ./configure with $EXTRA_ARGS $@ "
else
if test -z " $NOCONFIGURE " && test -z " $* " ; then
echo "I am going to run ./configure with no arguments - if you wish "
1998-07-24 19:24:09 +00:00
echo " to pass any to it, please specify them on the $0 command line. "
2012-02-29 09:34:32 +08:00
fi
1998-07-24 19:24:09 +00:00
fi
2010-04-26 16:09:34 -04:00
if [ ! -d $srcdir /m4 ] ; then
mkdir $srcdir /m4
fi
2010-03-10 10:35:56 +01:00
# Replaced by autoreconf below
2012-08-17 10:04:30 +08:00
autoreconf -if -Wall
1998-12-23 00:37:26 +00:00
2018-08-19 18:59:10 +02:00
if ! grep -q pkg.m4 aclocal.m4; then
cat <<EOF
Couldn' t find pkg.m4 from pkg-config. Install the appropriate package for
your distribution or set ACLOCAL_PATH to the directory containing pkg.m4.
EOF
exit 1
fi
2018-08-23 20:42:23 +00:00
cd $THEDIR
1998-12-28 23:49:02 +00:00
if test x$OBJ_DIR != x; then
mkdir -p " $OBJ_DIR "
cd " $OBJ_DIR "
fi
2012-01-05 10:08:03 -05:00
if test -z " $NOCONFIGURE " ; then
2012-02-29 09:34:32 +08:00
$srcdir /configure $EXTRA_ARGS " $@ "
2018-08-18 14:22:57 +08:00
if test " $? " -ne 0; then
echo
echo "Configure script failed, check config.log for more info."
else
echo
echo "Now type 'make' to compile libxml2."
fi
2012-01-05 10:08:03 -05:00
fi