Skip to content

Commit

Permalink
Add a check for yelp-tools to autogen.sh.
Browse files Browse the repository at this point in the history
Also mention this in the README.md.

Fixes #143
  • Loading branch information
Stefan Sauer committed Feb 5, 2024
1 parent 644b481 commit fb1f70e
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ modelled after the windows only, closed source application called Buzz.
## building from git
To build use autogen.sh instead of configure. This accept the same options like
configure. Later one can use autoregen.sh to rerun the bootstrapping.
To build from git one needs to have gtk-doc and cvs (for autopoint from gettext)
installed.
To build from git one needs to have gtk-doc, yelp-tools and cvs (for autopoint
from gettext) installed.

## directories
* docs : design ideas and API reference
Expand Down
42 changes: 42 additions & 0 deletions autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,45 @@ version_check ()
return 1;
}

path_check ()
{
PACKAGE=$1
COMMAND=$2
URL=$3

test -z "$NOCHECK" && {
echo -n " checking for $PACKAGE ... "
} || {
# we set a var with the same name as the package, but stripped of
# unwanted chars
VAR=`echo $PACKAGE | sed 's/-//g'`
debug "setting $VAR"
eval $VAR="$COMMAND"
return 0
}

LOC=$(which 2>/dev/null $COMMAND)
if test ! -z "$LOC"; then
echo "ok."
# we set a var with the same name as the package, but stripped of
# unwanted chars
VAR=`echo $PACKAGE | sed 's/-//g'`
debug "setting $VAR"
eval $VAR="$COMMAND"
return 0
else
echo "not ok !"
fi

if test ! -z "$URL"; then
echo "not found !"
echo "You must have $PACKAGE installed to compile $package."
echo "Download the appropriate package for your distribution,"
echo "or get the source tarball at $URL"
fi
return 1;
}

aclocal_check ()
{
# normally aclocal is part of automake
Expand Down Expand Up @@ -321,6 +360,9 @@ version_check "libtoolize" "libtoolize glibtoolize" \
version_check "pkg-config" "" \
"ftp://ftp.gnome.org/pub/gnome/sources/pkgconfig/" 0 8 0 || DIE=1

path_check "yelp-tools" "yelp-check" \
"ftp://ftp.gnome.org/pub/gnome/sources/yelp-tools" || DIE=1

die_check $DIE

aclocal_check || DIE=1
Expand Down

0 comments on commit fb1f70e

Please sign in to comment.