File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -152,6 +152,34 @@ iptables_find_version() {
152152 fi
153153}
154154
155+ compiler_presence_test () {
156+ echo -n " Check for working gcc: "
157+ gcc -v > /dev/null 2>&1
158+ if [ $? = 0 ]; then
159+ echo Yes
160+ else
161+ echo No
162+
163+ echo " ! You need gcc to install module from source"
164+ if [ -s /etc/debian_version ]; then
165+ NAME=Debian
166+ if [ -e /etc/os-release ]; then
167+ . /etc/os-release > /dev/null 2>&1
168+ fi
169+ echo " ! "
170+ echo " ! Under $NAME try to run this:"
171+ echo " ! root# apt-get install gcc"
172+ echo " ! "
173+ elif [ -s /etc/redhat-release ]; then
174+ echo " ! "
175+ echo " ! Under Centos try to run this:"
176+ echo " ! root# yum install gcc"
177+ echo " ! "
178+ fi
179+ exit 1
180+ fi
181+ }
182+
155183compile_libitp_test () {
156184 local FLAGS
157185 local MSG
@@ -211,6 +239,7 @@ iptables_try_pkgconfig() {
211239 # and if not, then it's older who need it.
212240 IPTCFLAGS=" -I$KDIR /include -DIPTABLES_VERSION=\\\\\" $IPTVER \\\\\" "
213241 fi
242+ compiler_presence_test
214243 if compile_libitp_test xtables.h; then
215244 IPTCFLAGS=" -DXTABLES $IPTCFLAGS "
216245 elif ! compile_libitp_test iptables.h; then
You can’t perform that action at this time.
0 commit comments