scripts: Add test for unresolvable hostname to build.
This commit is contained in:
parent
e0e593277f
commit
f3b66982b7
|
@ -26,4 +26,17 @@ suggest_package XPM 2.0.0 xpm
|
||||||
|
|
||||||
test_version `version_of liblo` 0.26 || warn "Version $(version_of liblo) of liblo is slow to create servers. Consider upgrading to 0.26 or later"
|
test_version `version_of liblo` 0.26 || warn "Version $(version_of liblo) of liblo is slow to create servers. Consider upgrading to 0.26 or later"
|
||||||
|
|
||||||
|
if ! hostname_resolvable
|
||||||
|
then
|
||||||
|
echo "Your hostname \"$(hostname)\" does not resolve to a valid address."
|
||||||
|
echo "This is a broken configuration and will cause liblo (the"
|
||||||
|
echo "OSC library) to fail to function. Add the line:"
|
||||||
|
echo
|
||||||
|
echo "127.0.0.1 $(hostname)"
|
||||||
|
echo
|
||||||
|
echo "to your /etc/hosts file to fix. And consider switching to a saner distribution."
|
||||||
|
echo
|
||||||
|
fail "Invalid hostname!"
|
||||||
|
fi
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -344,6 +344,11 @@ version_of ()
|
||||||
echo `pkg-config --modversion $1`
|
echo `pkg-config --modversion $1`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
hostname_resolvable ()
|
||||||
|
{
|
||||||
|
ping -c1 `hostname` >/dev/null 2>/dev/null
|
||||||
|
}
|
||||||
|
|
||||||
require_FLTK ()
|
require_FLTK ()
|
||||||
{
|
{
|
||||||
local use
|
local use
|
||||||
|
|
|
@ -26,3 +26,16 @@ suggest_package XPM 2.0.0 xpm
|
||||||
test_version `version_of liblo` 0.26 || warn "Version $(version_of liblo) of liblo is slow to create servers. Consider upgrading to 0.26 or later"
|
test_version `version_of liblo` 0.26 || warn "Version $(version_of liblo) of liblo is slow to create servers. Consider upgrading to 0.26 or later"
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if ! hostname_resolvable
|
||||||
|
then
|
||||||
|
echo "Your hostname \"$(hostname)\" does not resolve to a valid address."
|
||||||
|
echo "This is a broken configuration and will cause liblo (the"
|
||||||
|
echo "OSC library) to fail to function. Add the line:"
|
||||||
|
echo
|
||||||
|
echo "127.0.0.1 $(hostname)"
|
||||||
|
echo
|
||||||
|
echo "to your /etc/hosts file to fix. And consider switching to a saner distribution."
|
||||||
|
echo
|
||||||
|
fail "Invalid hostname!"
|
||||||
|
fi
|
||||||
|
|
|
@ -31,6 +31,19 @@ require_package liblo 0.23 liblo
|
||||||
require_package sigcpp 2.0.0 sigc++-2.0
|
require_package sigcpp 2.0.0 sigc++-2.0
|
||||||
suggest_package XPM 2.0.0 xpm
|
suggest_package XPM 2.0.0 xpm
|
||||||
|
|
||||||
|
if ! hostname_resolvable
|
||||||
|
then
|
||||||
|
echo "Your hostname \"$(hostname)\" does not resolve to a valid address."
|
||||||
|
echo "This is a broken configuration and will cause liblo (the"
|
||||||
|
echo "OSC library) to fail to function. Add the line:"
|
||||||
|
echo
|
||||||
|
echo "127.0.0.1 $(hostname)"
|
||||||
|
echo
|
||||||
|
echo "to your /etc/hosts file to fix. And consider switching to a saner distribution."
|
||||||
|
echo
|
||||||
|
fail "Invalid hostname!"
|
||||||
|
fi
|
||||||
|
|
||||||
if ! test_version 1.1.10 $FLTK_VERSION
|
if ! test_version 1.1.10 $FLTK_VERSION
|
||||||
then
|
then
|
||||||
warn "*** PERFORMANCE WARNING ***"
|
warn "*** PERFORMANCE WARNING ***"
|
||||||
|
|
Loading…
Reference in New Issue