1998-07-24 23:24:09 +04:00
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
1998-12-23 03:37:26 +03:00
THEDIR = ` pwd `
2022-04-21 07:27:33 +03:00
cd ` dirname $0 `
srcdir = ` pwd `
1998-07-24 23:24:09 +04:00
DIE = 0
( autoconf --version) < /dev/null > /dev/null 2>& 1 || {
echo
2000-04-03 23:48:13 +04:00
echo "You must have autoconf installed to compile libxml."
1998-07-24 23:24:09 +04:00
echo "Download the appropriate package for your distribution,"
2003-08-13 15:09:42 +04:00
echo "or see http://www.gnu.org/software/autoconf"
1998-07-24 23:24:09 +04:00
DIE = 1
}
2022-01-16 15:56:17 +03:00
( libtoolize --version) < /dev/null > /dev/null 2>& 1 ||
( glibtoolize --version) < /dev/null > /dev/null 2>& 1 || {
1998-07-24 23:24:09 +04:00
echo
2000-04-03 23:48:13 +04:00
echo "You must have libtool installed to compile libxml."
2003-08-13 15:09:42 +04:00
echo "Download the appropriate package for your distribution,"
echo "or see http://www.gnu.org/software/libtool"
1998-07-24 23:24:09 +04:00
DIE = 1
}
2003-08-13 15:09:42 +04:00
( automake --version) < /dev/null > /dev/null 2>& 1 || {
1998-07-24 23:24:09 +04:00
echo
DIE = 1
2003-08-13 15:09:42 +04: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 23:24:09 +04:00
}
if test " $DIE " -eq 1; then
exit 1
fi
2001-06-23 22:53:44 +04:00
test -f entities.c || {
2000-04-03 23:48:13 +04:00
echo "You must run this script in the top-level libxml directory"
1998-07-24 23:24:09 +04:00
exit 1
}
2012-02-29 05:34:32 +04: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 23:24:09 +04:00
echo " to pass any to it, please specify them on the $0 command line. "
2012-02-29 05:34:32 +04:00
fi
1998-07-24 23:24:09 +04:00
fi
2010-04-27 00:09:34 +04:00
if [ ! -d $srcdir /m4 ] ; then
mkdir $srcdir /m4
fi
2010-03-10 12:35:56 +03:00
# Replaced by autoreconf below
2024-03-22 20:36:49 +03:00
autoreconf -if -Wall || exit 1
1998-12-23 03:37:26 +03:00
2018-08-19 19:59:10 +03: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 23:42:23 +03:00
cd $THEDIR
1998-12-29 02:49:02 +03:00
if test x$OBJ_DIR != x; then
mkdir -p " $OBJ_DIR "
cd " $OBJ_DIR "
fi
2012-01-05 19:08:03 +04:00
if test -z " $NOCONFIGURE " ; then
2012-02-29 05:34:32 +04:00
$srcdir /configure $EXTRA_ARGS " $@ "
2018-08-18 09:22:57 +03:00
if test " $? " -ne 0; then
echo
echo "Configure script failed, check config.log for more info."
2024-03-22 20:36:49 +03:00
exit 1
2018-08-18 09:22:57 +03:00
else
echo
echo "Now type 'make' to compile libxml2."
fi
2012-01-05 19:08:03 +04:00
fi