Skip to content

Commit

Permalink
Add additional check for pkg-config capstone
Browse files Browse the repository at this point in the history
  • Loading branch information
radare committed Feb 20, 2015
1 parent 5c8b417 commit 6ee05a9
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion sys/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,17 @@ fi

pkg-config --atleast-version=3.0 capstone 2>/dev/null
if [ $? = 0 ]; then
CFGARG="${CFGARG} --with-syscapstone"
echo '#include <capstone.h>' > .a.c
echo 'int main() {return 0;}' >> .a.c
gcc `pkg-config --cflags --libs capstone` -o .a.out .a.c
if [ $? = 0 ]; then
CFGARG="${CFGARG} --with-syscapstone"
else
echo
echo "** WARNING ** capstone pkg-config is wrongly installed."
echo
fi
rm -f .a.c .a.out
fi

# build
Expand Down

0 comments on commit 6ee05a9

Please sign in to comment.