Skip to content

Commit

Permalink
Run AC_PROG_CXX in the right place.
Browse files Browse the repository at this point in the history
  • Loading branch information
wbhart committed Mar 29, 2014
1 parent 61d45c2 commit 053476c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
14 changes: 6 additions & 8 deletions configure
Expand Up @@ -10068,9 +10068,12 @@ fi

# The C++ compiler, if desired.

# The following test is quick and harmless.
# It defaults to 'g++' if no compiler is found.
ac_ext=cpp
# Now actually check that the C++ compiler works if it is needed.
want_cxx=no
if test $enable_cxx != no; then
test_CXXFLAGS=${CXXFLAGS+set}

ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
Expand Down Expand Up @@ -10328,11 +10331,6 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu


# Now actually check that the C++ compiler works if it is needed.
want_cxx=no
if test $enable_cxx != no; then
test_CXXFLAGS=${CXXFLAGS+set}

echo "CXXFLAGS chosen by autoconf: $CXXFLAGS" >&5
cxxflags_ac_prog_cxx=$CXXFLAGS
cxxflags_list=ac_prog_cxx
Expand Down
6 changes: 2 additions & 4 deletions configure.ac
Expand Up @@ -1753,15 +1753,13 @@ AC_SUBST(MPIR_AS)

# The C++ compiler, if desired.

# The following test is quick and harmless.
# It defaults to 'g++' if no compiler is found.
AC_PROG_CXX

# Now actually check that the C++ compiler works if it is needed.
want_cxx=no
if test $enable_cxx != no; then
test_CXXFLAGS=${CXXFLAGS+set}

AC_PROG_CXX

echo "CXXFLAGS chosen by autoconf: $CXXFLAGS" >&AC_FD_CC
cxxflags_ac_prog_cxx=$CXXFLAGS
cxxflags_list=ac_prog_cxx
Expand Down

0 comments on commit 053476c

Please sign in to comment.