Skip to content

Commit

Permalink
Fix configure script
Browse files Browse the repository at this point in the history
  • Loading branch information
Moe-hacker committed Jun 25, 2024
1 parent cbfa9fd commit 354fbba
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ init() {
error "not found"
fi
printf "checking for compiler... "
if [ !$CC ]; then
if [ ! $CC ]; then
if [ ! $(command -v cc) ]; then
error "not found"
fi
Expand Down Expand Up @@ -83,13 +83,6 @@ check_header() {
printf "checking for header $i... "
printf "#include <$1>\nint main(){}" | $CC -x c -o /dev/null - >/dev/null 2>&1 && printf "ok\n" || error "not found"
}
check_lib() {
printf "checking for lib $1... "
if [ ! -e $($CC -print-file-name=$1) ]; then
error "not found!\033[0m"
fi
printf "found\n"
}
default_cflag() {
test_and_add_cflag "-ftrivial-auto-var-init=pattern"
test_and_add_cflag "-fcf-protection=full"
Expand Down Expand Up @@ -148,16 +141,6 @@ check_headers_and_libs() {
for i in sys/capability.h seccomp.h; do
check_header $i
done
# Check library.
if [ $STATIC_COMPILE ]; then
for i in libc.a libcap.a libseccomp.a; do
check_lib $i
done
else
for i in libcap.so libseccomp.so; do
check_lib $i
done
fi
}
show_help() {
echo "Usage: ./configure [OPTION]..."
Expand Down

0 comments on commit 354fbba

Please sign in to comment.