2011-06-01 13:59:52 -05:00
|
|
|
#!/bin/sh
|
2009-05-28 18:47:37 -05:00
|
|
|
# Run the autotools bootstrap sequence to create the configure script
|
2009-05-13 16:55:16 -05:00
|
|
|
|
2011-06-01 13:59:52 -05:00
|
|
|
# Abort execution on error
|
2009-12-04 02:50:55 -06:00
|
|
|
set -e
|
|
|
|
|
2011-06-01 13:59:52 -05:00
|
|
|
if which libtoolize > /dev/null; then
|
|
|
|
libtoolize="libtoolize"
|
|
|
|
elif which glibtoolize >/dev/null; then
|
|
|
|
libtoolize="glibtoolize"
|
2009-05-13 16:55:16 -05:00
|
|
|
else
|
2011-06-01 13:59:52 -05:00
|
|
|
echo "$0: Error: libtool is required" >&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$1" = "nosubmodule" ]; then
|
|
|
|
SKIP_SUBMODULE=1
|
|
|
|
elif [ -n "$1" ]; then
|
|
|
|
echo "$0: Illegal argument $1"
|
|
|
|
echo "USAGE: $0 [nosubmodule]"
|
|
|
|
exit 1
|
2009-05-13 16:55:16 -05:00
|
|
|
fi
|
|
|
|
|
|
|
|
# bootstrap the autotools
|
|
|
|
(
|
|
|
|
set -x
|
2021-03-05 17:52:33 -06:00
|
|
|
aclocal --warnings=all -I src/m4
|
2020-04-30 09:31:26 -05:00
|
|
|
# Apparently, not all versions of libtoolize support option --warnings=all .
|
2009-05-13 16:55:16 -05:00
|
|
|
${libtoolize} --automake --copy
|
2020-04-30 09:31:26 -05:00
|
|
|
autoconf --warnings=all
|
|
|
|
autoheader --warnings=all
|
|
|
|
automake --warnings=all --gnu --add-missing --copy
|
2009-05-13 16:55:16 -05:00
|
|
|
)
|
2009-04-24 11:14:21 -05:00
|
|
|
|
2011-06-01 13:59:52 -05:00
|
|
|
if [ -n "$SKIP_SUBMODULE" ]; then
|
2011-05-31 03:52:50 -05:00
|
|
|
echo "Skipping submodule setup"
|
2011-06-01 13:59:52 -05:00
|
|
|
else
|
2010-12-22 07:29:34 -06:00
|
|
|
echo "Setting up submodules"
|
|
|
|
git submodule init
|
|
|
|
git submodule update
|
|
|
|
fi
|
|
|
|
|
2016-07-24 06:06:33 -05:00
|
|
|
if [ -x src/jtag/drivers/libjaylink/autogen.sh ]; then
|
|
|
|
(
|
|
|
|
cd src/jtag/drivers/libjaylink
|
|
|
|
./autogen.sh
|
|
|
|
)
|
|
|
|
fi
|
|
|
|
|
2011-06-01 13:59:52 -05:00
|
|
|
echo "Bootstrap complete. Quick build instructions:"
|
2013-07-06 00:12:45 -05:00
|
|
|
echo "./configure ...."
|