Skip to content

Commit c230a88

Browse files
committed
Allow cross compilers to set compiler.
Resolves #68. Based on alex-eri @ github patch.
1 parent 5d71c94 commit c230a88

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

configure

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,9 @@ iptables_find_version() {
154154

155155
compiler_presence_test() {
156156
echo -n "Check for working gcc: "
157-
gcc -v >/dev/null 2>&1
157+
$CC -v >/dev/null 2>&1
158158
if [ $? = 0 ]; then
159-
echo Yes
159+
echo Yes "($CC)"
160160
else
161161
echo No
162162

@@ -197,7 +197,7 @@ compile_libitp_test() {
197197
echo "
198198
#define __EXPORTED_HEADERS__
199199
#include <$*>" > test.c
200-
gcc -c test.c $FLAGS >/dev/null 2>&1
200+
$CC -c test.c $FLAGS >/dev/null 2>&1
201201
RET=$?
202202
if [ $RET = 0 ]; then
203203
echo Yes $MSG;
@@ -593,6 +593,7 @@ kernel_check_consistency
593593
kernel_check_config
594594
kernel_check_features
595595

596+
CC=${CC:-gcc}
596597
test "$IPTBIN" || IPTBIN=`which iptables`
597598

598599
iptables_find_version #IPTVER

0 commit comments

Comments
 (0)