mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-28 13:46:32 +00:00
netkittelnet: fix build on toolchains without C++ support
The configure script checks for C++ support as telnet (but not telnetd) contains C++ code. This used to work by accident if the host had g++, as we didn't pass TARGET_CONFIGURE_OPTS to configure (which sets CXX to /bin/false). Fix it by removing the g++ check and rewriting the configure checks to use the C compiler instead. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
This commit is contained in:
parent
d3501735f6
commit
eaef48367e
@ -14,6 +14,8 @@ define NETKITTELNET_CONFIGURE_CMDS
|
|||||||
$(SED) "s/main()/main(void)/;" $(@D)/configure
|
$(SED) "s/main()/main(void)/;" $(@D)/configure
|
||||||
# Disable termcap support
|
# Disable termcap support
|
||||||
$(SED) "s~\(.*termcap\.h.*\)~/* \1 */~;" $(@D)/telnetd/telnetd.c
|
$(SED) "s~\(.*termcap\.h.*\)~/* \1 */~;" $(@D)/telnetd/telnetd.c
|
||||||
|
# C++ support not needed for telnetd
|
||||||
|
$(SED) 's/CXX/CC/g' -e 's/conftest.cc/conftest.c/g' $(@D)/configure
|
||||||
(cd $(@D); \
|
(cd $(@D); \
|
||||||
$(TARGET_CONFIGURE_OPTS) \
|
$(TARGET_CONFIGURE_OPTS) \
|
||||||
./configure \
|
./configure \
|
||||||
|
@ -24,14 +24,25 @@
|
|||||||
) >/dev/null 2>&1 || continue;
|
) >/dev/null 2>&1 || continue;
|
||||||
CXX=$TRY
|
CXX=$TRY
|
||||||
break;
|
break;
|
||||||
@@ -141,7 +138,6 @@
|
@@ -138,18 +135,5 @@
|
||||||
echo -n 'Checking if C++ compiler works... '
|
fi
|
||||||
if (
|
echo "$CXX"
|
||||||
$CXX __conftest.cc -o __conftest || exit 1
|
-else
|
||||||
|
- echo -n 'Checking if C++ compiler works... '
|
||||||
|
- if (
|
||||||
|
- $CXX __conftest.cc -o __conftest || exit 1
|
||||||
- ./__conftest || exit 1
|
- ./__conftest || exit 1
|
||||||
) >/dev/null 2>&1; then
|
- ) >/dev/null 2>&1; then
|
||||||
echo 'yes'
|
- echo 'yes'
|
||||||
else
|
- else
|
||||||
|
- echo 'no'
|
||||||
|
- echo 'Compiler '"$CXX"' does not exist or cannot compile C++; try another.'
|
||||||
|
- rm -f __conftest*
|
||||||
|
- exit
|
||||||
|
- fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo -n "Checking if $CXX accepts gcc warnings... "
|
||||||
@@ -278,13 +274,11 @@
|
@@ -278,13 +274,11 @@
|
||||||
EOF
|
EOF
|
||||||
if (
|
if (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user