Skip to content

Commit

Permalink
autogen.sh: add check for pkg-config being present
Browse files Browse the repository at this point in the history
Since a ./configure switch was added to enable bash-completion
installation support, pkg-config is now required during the build.

This adds a check in autogen.sh to ensure pkg-config is installed.

Closes: resurrecting-open-source-projects#19
  • Loading branch information
davidpolverari committed Sep 14, 2023
1 parent 055d425 commit 8f57602
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

# autogen.sh with clean option
# Copyright 2016 Joao Eriberto Mota Filho <eriberto@eriberto.pro.br>
# Copyright 2023 David da Silva Polverari <david.polverari@gmail.com>
#
# This file is under BSD-3-Clause license.
#
Expand Down Expand Up @@ -47,6 +48,13 @@ then
exit 0
fi

env pkg-config --version > /dev/null 2>&1
if [ $? -ne 0 ]
then
echo "pkg-config is missing. Please install it and run $0 again."
exit 1
fi

# Do autoreconf
autoreconf -i \
&& { echo " "; \
Expand Down

0 comments on commit 8f57602

Please sign in to comment.