Skip to content

Commit

Permalink
use CC when available when looking for libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
btovar committed Oct 17, 2019
1 parent 02edabb commit 5f46bc1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions configure.tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -333,14 +333,14 @@ optional_include()
{
header="$1"
shift

echon "checking for header ${header}..."

cat > .configure.tmp.c << EOF
#include <stdlib.h>
#include <${header}>
EOF
if gcc .configure.tmp.c -c -o .configure.tmp.o > .configure.tmp.out 2>&1; then
if ${CC:-gcc} .configure.tmp.c -c -o .configure.tmp.o > .configure.tmp.out 2>&1; then
echo yes
rm -f .configure.tmp.c .configure.tmp.out
ccflags_append_define "$@"
Expand All @@ -359,7 +359,7 @@ optional_library()

echon "checking for library ${library}..."

if echo 'int main;' | gcc -o /dev/null -x c - "-l${library}" >/dev/null 2>/dev/null; then
if echo 'int main;' | ${CC:-gcc} -o /dev/null -x c - "-l${library}" >/dev/null 2>/dev/null; then
echo yes
ccflags_append_define "$@"
return 0
Expand All @@ -380,7 +380,7 @@ optional_library_function()

echon "checking for library function ${f}..."

gcc -o /dev/null -x c - "-l${l}" >/dev/null 2>/dev/null <<EOF
${CC:-gcc} -o /dev/null -x c - "-l${l}" >/dev/null 2>/dev/null <<EOF
#include <stdlib.h>
#include <${h}>
Expand Down

0 comments on commit 5f46bc1

Please sign in to comment.