mirror of
git://git.gnupg.org/gnupg.git
synced 2025-04-17 15:44:34 +02:00
build: Add more options to autogen.sh.
* autogen.sh: Add options --print-host and --print-build. -- Being able to know the build system and the host as used by GnuPG is useful to build other packages.
This commit is contained in:
parent
141d69cb2a
commit
0399d87f7a
43
autogen.sh
43
autogen.sh
@ -70,6 +70,8 @@ MSGMERGE=${GETTEXT_PREFIX}${MSGMERGE:-msgmerge}${GETTEXT_SUFFIX}
|
|||||||
DIE=no
|
DIE=no
|
||||||
FORCE=
|
FORCE=
|
||||||
SILENT=
|
SILENT=
|
||||||
|
PRINT_HOST=no
|
||||||
|
PRINT_BUILD=no
|
||||||
tmp=$(dirname "$0")
|
tmp=$(dirname "$0")
|
||||||
tsdir=$(cd "${tmp}"; pwd)
|
tsdir=$(cd "${tmp}"; pwd)
|
||||||
version_parts=3
|
version_parts=3
|
||||||
@ -89,6 +91,14 @@ if test x"$1" = x"--force"; then
|
|||||||
FORCE=" --force"
|
FORCE=" --force"
|
||||||
shift
|
shift
|
||||||
fi
|
fi
|
||||||
|
if test x"$1" = x"--print-host"; then
|
||||||
|
PRINT_HOST=yes
|
||||||
|
shift
|
||||||
|
fi
|
||||||
|
if test x"$1" = x"--print-build"; then
|
||||||
|
PRINT_BUILD=yes
|
||||||
|
shift
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Reject unsafe characters in $HOME, $tsdir and cwd. We consider spaces
|
# Reject unsafe characters in $HOME, $tsdir and cwd. We consider spaces
|
||||||
@ -229,16 +239,22 @@ fi
|
|||||||
# **** end FIND VERSION ****
|
# **** end FIND VERSION ****
|
||||||
|
|
||||||
|
|
||||||
|
if [ ! -f "$tsdir/build-aux/config.guess" ]; then
|
||||||
|
fatal "$tsdir/build-aux/config.guess not found"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
build=`$tsdir/build-aux/config.guess`
|
||||||
|
if [ $PRINT_BUILD = yes ]; then
|
||||||
|
echo "$build"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# ******************
|
# ******************
|
||||||
# W32 build script
|
# W32 build script
|
||||||
# ******************
|
# ******************
|
||||||
if [ "$myhost" = "w32" ]; then
|
if [ "$myhost" = "w32" ]; then
|
||||||
if [ ! -f "$tsdir/build-aux/config.guess" ]; then
|
|
||||||
fatal "$tsdir/build-aux/config.guess not found"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
build=`$tsdir/build-aux/config.guess`
|
|
||||||
|
|
||||||
case $myhostsub in
|
case $myhostsub in
|
||||||
ce)
|
ce)
|
||||||
w32root="$w32ce_root"
|
w32root="$w32ce_root"
|
||||||
@ -279,6 +295,10 @@ if [ "$myhost" = "w32" ]; then
|
|||||||
fi
|
fi
|
||||||
die_p
|
die_p
|
||||||
fi
|
fi
|
||||||
|
if [ $PRINT_HOST = yes ]; then
|
||||||
|
echo "$host"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -f "$tsdir/config.log" ]; then
|
if [ -f "$tsdir/config.log" ]; then
|
||||||
if ! head $tsdir/config.log | grep "$host" >/dev/null; then
|
if ! head $tsdir/config.log | grep "$host" >/dev/null; then
|
||||||
@ -299,13 +319,6 @@ fi
|
|||||||
# ***** AMD64 cross build script *******
|
# ***** AMD64 cross build script *******
|
||||||
# Used to cross-compile for AMD64 (for testing)
|
# Used to cross-compile for AMD64 (for testing)
|
||||||
if [ "$myhost" = "amd64" ]; then
|
if [ "$myhost" = "amd64" ]; then
|
||||||
shift
|
|
||||||
if [ ! -f $tsdir/build-aux/config.guess ]; then
|
|
||||||
echo "$tsdir/build-aux/config.guess not found" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
build=`$tsdir/build-aux/config.guess`
|
|
||||||
|
|
||||||
[ -z "$amd64root" ] && amd64root="$HOME/amd64root"
|
[ -z "$amd64root" ] && amd64root="$HOME/amd64root"
|
||||||
info "Using $amd64root as standard install directory"
|
info "Using $amd64root as standard install directory"
|
||||||
replace_sysroot
|
replace_sysroot
|
||||||
@ -326,6 +339,10 @@ if [ "$myhost" = "amd64" ]; then
|
|||||||
echo "Stop." >&2
|
echo "Stop." >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
if [ $PRINT_HOST = yes ]; then
|
||||||
|
echo "$host"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -f "$tsdir/config.log" ]; then
|
if [ -f "$tsdir/config.log" ]; then
|
||||||
if ! head $tsdir/config.log | grep "$host" >/dev/null; then
|
if ! head $tsdir/config.log | grep "$host" >/dev/null; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user