2011-10-10 01:03:08 +04:00
#!/bin/sh
2011-10-18 20:27:37 +04:00
2011-10-18 20:35:19 +04:00
test -n " $srcdir " || srcdir = ` dirname " $0 " `
test -n " $srcdir " || srcdir = .
olddir = ` pwd `
cd $srcdir
AUTORECONF = ` which autoreconf`
if test -z $AUTORECONF ; then
2015-06-12 10:43:34 +03:00
echo "*** No autoreconf found, please install it ***"
2011-10-18 20:35:19 +04:00
exit 1
fi
2012-09-24 16:30:07 +04:00
set -e
2011-10-18 20:27:37 +04:00
mkdir -p m4
2015-06-29 20:20:57 +03:00
GTKDOCIZE = $( which gtkdocize 2>/dev/null || true )
if test -z " $GTKDOCIZE " ; then
2013-08-17 06:54:35 +04:00
echo "You don't have gtk-doc installed, and thus won't be able to generate the documentation."
rm -f gtk-doc.make
cat > gtk-doc.make <<EOF
EXTRA_DIST =
CLEANFILES =
EOF
else
2015-06-29 20:20:57 +03:00
gtkdocize
2013-08-17 06:54:35 +04:00
fi
2015-02-23 14:06:09 +03:00
if ! test -f libglnx/README.md || ! test -f bsdiff/README.md; then
2015-02-18 01:38:36 +03:00
git submodule update --init
fi
2017-10-03 23:26:50 +03:00
# Workaround automake bug with subdir-objects and computed paths; if
# changing this, please also change Makefile.am.
2016-06-12 12:31:29 +03:00
sed -e 's,$(libglnx_srcpath),libglnx,g' < libglnx/Makefile-libglnx.am >libglnx/Makefile-libglnx.am.inc
sed -e 's,$(libbsdiff_srcpath),bsdiff,g' < bsdiff/Makefile-bsdiff.am >bsdiff/Makefile-bsdiff.am.inc
2015-02-18 01:38:36 +03:00
2016-06-27 04:59:12 +03:00
# FIXME - figure out how to get aclocal to find this by default
ln -sf ../libglnx/libglnx.m4 buildutil/libglnx.m4
2012-08-14 20:52:46 +04:00
autoreconf --force --install --verbose
2012-07-30 15:04:00 +04:00
2017-08-08 09:14:13 +03:00
cd $olddir
2011-10-18 20:35:19 +04:00
test -n " $NOCONFIGURE " || " $srcdir /configure " " $@ "