Skip to content

Commit 072246a

Browse files
[3.15] gh-148294: Make configure find g++ correctly (GH-150212)
The `AC_PATH_TOOL` calls had included a duplicated argument, causing a "`PATH`" consisting of `notfound` to be searched instead of `$PATH`. (cherry picked from commit c613f72) Co-authored-by: sendaoYan <yansendao@126.com>
1 parent 233cf75 commit 072246a

3 files changed

Lines changed: 18 additions & 16 deletions

File tree

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Corrected the use of ``AC_PATH_TOOL`` in ``configure.ac`` to allow a C++
2+
compiler to be found on :envvar:`!PATH`.

configure

Lines changed: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

configure.ac

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1137,10 +1137,10 @@ preset_cxx="$CXX"
11371137
if test -z "$CXX"
11381138
then
11391139
case "$ac_cv_cc_name" in
1140-
gcc) AC_PATH_TOOL([CXX], [g++], [g++], [notfound]) ;;
1141-
cc) AC_PATH_TOOL([CXX], [c++], [c++], [notfound]) ;;
1142-
clang) AC_PATH_TOOL([CXX], [clang++], [clang++], [notfound]) ;;
1143-
icc) AC_PATH_TOOL([CXX], [icpc], [icpc], [notfound]) ;;
1140+
gcc) AC_PATH_TOOL([CXX], [g++], [notfound]) ;;
1141+
cc) AC_PATH_TOOL([CXX], [c++], [notfound]) ;;
1142+
clang) AC_PATH_TOOL([CXX], [clang++], [notfound]) ;;
1143+
icc) AC_PATH_TOOL([CXX], [icpc], [notfound]) ;;
11441144
esac
11451145
if test "$CXX" = "notfound"
11461146
then

0 commit comments

Comments
 (0)