mirror of
https://github.com/jedisct1/libsodium.git
synced 2024-12-19 10:05:05 -07:00
Update autogen.sh
This commit is contained in:
parent
4cc7d9027c
commit
7bbaa6820b
@ -11,7 +11,7 @@ compiler:
|
|||||||
- g++
|
- g++
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- ./autogen.sh
|
- ./autogen.sh -f
|
||||||
- env CC=tcc CFLAGS='-w' CPPFLAGS="-DDEV_MODE=1" ./configure --prefix=/tmp --disable-dependency-tracking --disable-shared || cat config.log
|
- env CC=tcc CFLAGS='-w' CPPFLAGS="-DDEV_MODE=1" ./configure --prefix=/tmp --disable-dependency-tracking --disable-shared || cat config.log
|
||||||
- make -j $(nproc) && make check && make install
|
- make -j $(nproc) && make check && make install
|
||||||
- env CC=tcc CPPFLAGS='-I/tmp/include' LDFLAGS='-L/tmp/lib' LD_LIBRARY_PATH='/tmp/lib' ./test/constcheck.sh
|
- env CC=tcc CPPFLAGS='-I/tmp/include' LDFLAGS='-L/tmp/lib' LD_LIBRARY_PATH='/tmp/lib' ./test/constcheck.sh
|
||||||
|
72
autogen.sh
72
autogen.sh
@ -1,5 +1,55 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
|
|
||||||
|
args=$(getopt bfos "$@")
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "Usage: autogen.sh [-b] [-f] [-o] [-s] [--]"
|
||||||
|
echo
|
||||||
|
echo "> -b: do not update the system detection scripts"
|
||||||
|
echo "> -f: force the recreation of all autoconf scripts"
|
||||||
|
echo "> -o: overwrite/downgrade system detection scripts"
|
||||||
|
echo "> -s: setup an environment for developers"
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
|
||||||
|
force=false
|
||||||
|
update_config=true
|
||||||
|
overwrite_config=false
|
||||||
|
dev_setup=false
|
||||||
|
|
||||||
|
eval set -- "$args"
|
||||||
|
|
||||||
|
while [ $# -ne 0 ]; do
|
||||||
|
case $1 in
|
||||||
|
-b)
|
||||||
|
update_config=false
|
||||||
|
;;
|
||||||
|
-f)
|
||||||
|
force=true
|
||||||
|
;;
|
||||||
|
-o)
|
||||||
|
overwrite_config=true
|
||||||
|
;;
|
||||||
|
-s)
|
||||||
|
dev_setup=true
|
||||||
|
;;
|
||||||
|
--)
|
||||||
|
shift
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ -s configure ]; then
|
||||||
|
if [ "$force" != true ]; then
|
||||||
|
echo "autoconf scripts already exist." >&2
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
elif [ "$dev_setup" != true ]; then
|
||||||
|
echo "A development environment was not created."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
if glibtoolize --version >/dev/null 2>&1; then
|
if glibtoolize --version >/dev/null 2>&1; then
|
||||||
LIBTOOLIZE='glibtoolize'
|
LIBTOOLIZE='glibtoolize'
|
||||||
else
|
else
|
||||||
@ -26,6 +76,14 @@ command -v automake >/dev/null 2>&1 || {
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if [ "$overwrite_config" = false ]; then
|
||||||
|
if [ -f build-aux/config.guess ]; then
|
||||||
|
mv build-aux/config.guess build-aux/config.guess.stable
|
||||||
|
fi
|
||||||
|
if [ -f build-aux/config.sub ]; then
|
||||||
|
mv build-aux/config.sub build-aux/config.sub.stable
|
||||||
|
fi
|
||||||
|
fi
|
||||||
if autoreconf --version >/dev/null 2>&1; then
|
if autoreconf --version >/dev/null 2>&1; then
|
||||||
autoreconf -ivf
|
autoreconf -ivf
|
||||||
else
|
else
|
||||||
@ -34,16 +92,24 @@ else
|
|||||||
automake --add-missing --force-missing --include-deps &&
|
automake --add-missing --force-missing --include-deps &&
|
||||||
autoconf
|
autoconf
|
||||||
fi
|
fi
|
||||||
|
if [ "$overwrite_config" = false ]; then
|
||||||
|
if [ -f build-aux/config.guess.stable ]; then
|
||||||
|
mv build-aux/config.guess.stable build-aux/config.guess
|
||||||
|
fi
|
||||||
|
if [ -f build-aux/config.sub.stable ]; then
|
||||||
|
mv build-aux/config.sub.stable build-aux/config.sub
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
[ -z "$DO_NOT_UPDATE_CONFIG_SCRIPTS" ] &&
|
[ "$update_config" = true ] &&
|
||||||
command -v curl >/dev/null 2>&1 && {
|
command -v curl >/dev/null 2>&1 && {
|
||||||
echo "Downloading config.guess and config.sub..."
|
echo "Downloading config.guess and config.sub..."
|
||||||
|
|
||||||
curl -sSL -o config.guess \
|
curl -sSL --fail -o config.guess \
|
||||||
'https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' &&
|
'https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' &&
|
||||||
mv -f config.guess build-aux/config.guess
|
mv -f config.guess build-aux/config.guess
|
||||||
|
|
||||||
curl -sSL -o config.sub \
|
curl -sSL --fail -o config.sub \
|
||||||
'https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' &&
|
'https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' &&
|
||||||
mv -f config.sub build-aux/config.sub
|
mv -f config.sub build-aux/config.sub
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user