Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1931ca7

Browse files
committed
Use somewhat longer C++ program to detect whether linking requires the C++
compiler. Fixes #559429. 2.2 bugfix candidate.
1 parent 32200ae commit 1931ca7

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

configure

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#! /bin/sh
2-
# From configure.in Revision: 1.317 .
2+
# From configure.in Revision: 1.318 .
33
# Guess values for system-dependent variables and create Makefiles.
44
# Generated by GNU Autoconf 2.53.
55
#
@@ -3037,7 +3037,7 @@ then
30373037
if test -z "$CXX"; then
30383038
LINKCC="\$(PURIFY) \$(CC)"
30393039
else
3040-
echo 'int main(){return 0;}' > conftest.$ac_ext
3040+
echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
30413041
$CXX -c conftest.$ac_ext 2>&5
30423042
if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
30433043
&& test -s conftest$ac_exeext && ./conftest$ac_exeext

configure.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ then
309309
if test -z "$CXX"; then
310310
LINKCC="\$(PURIFY) \$(CC)"
311311
else
312-
echo 'int main(){return 0;}' > conftest.$ac_ext
312+
echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
313313
$CXX -c conftest.$ac_ext 2>&5
314314
if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
315315
&& test -s conftest$ac_exeext && ./conftest$ac_exeext

0 commit comments

Comments
 (0)