Changeset aa560b5 in git


Ignore:
Timestamp:
Jun 17, 2020, 10:50:10 AM (4 years ago)
Author:
Max Horn <max@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'fc741b6502fd8a97288eaa3eba6e5220f3c3df87')
Children:
02eb92fd41522fc551742fd1c1a368263c5401e9
Parents:
89fd206d2c694d9425c5138b97769b3a8fe76cec
git-author:
Max Horn <max@quendi.de>2020-06-17 10:50:10+02:00
git-committer:
Max Horn <max@quendi.de>2020-06-17 15:12:47+02:00
Message:
Update ax_prog_cxx_for_build.m4

... to match changes made to ax_prog_cc_for_build.m4 recently.

- save/restore GXX
- honor `./configure --build=BUILD`
- use AC_LANG_PUSH and AC_LANG_POP to save and restore global variables
  used for running tests like ac_compile and ac_link
- use pushdef/popdef to save and restore ac_tool_prefix, cross_compiling
  and am_cv_CXX_dependencies_compiler_type (not sure if we need the latter
  but this mimicks what AX_PROG_CC_FOR_BUILD does)

Submitted to upstream, see <https://savannah.gnu.org/patch/?9943>
File:
1 edited

Legend:

Unmodified
Added
Removed
  • m4/ax_prog_cxx_for_build.m4

    r89fd20 raa560b5  
    3232#   warranty.
    3333
    34 #serial 3
     34#serial 4
    3535
    3636AU_ALIAS([AC_PROG_CXX_FOR_BUILD], [AX_PROG_CXX_FOR_BUILD])
     
    5050pushdef([CXX], CXX_FOR_BUILD)dnl
    5151pushdef([CXXCPP], CXXCPP_FOR_BUILD)dnl
     52pushdef([GXX], GXX_FOR_BUILD)dnl
    5253pushdef([CXXFLAGS], CXXFLAGS_FOR_BUILD)dnl
    5354pushdef([CPPFLAGS], CPPFLAGS_FOR_BUILD)dnl
     
    6364pushdef([ac_cv_host_vendor], ac_cv_build_vendor)dnl
    6465pushdef([ac_cv_host_os], ac_cv_build_os)dnl
    65 pushdef([ac_cxxcpp], ac_build_cxxcpp)dnl
    66 pushdef([ac_compile], ac_build_compile)dnl
    67 pushdef([ac_link], ac_build_link)dnl
     66pushdef([ac_tool_prefix], ac_build_tool_prefix)dnl
     67pushdef([am_cv_CXX_dependencies_compiler_type], am_cv_build_CXX_dependencies_compiler_type)dnl
     68pushdef([cross_compiling], cross_compiling_build)dnl
    6869
    69 save_cross_compiling=$cross_compiling
    70 save_ac_tool_prefix=$ac_tool_prefix
    71 cross_compiling=no
    72 ac_tool_prefix=
     70cross_compiling_build=no
    7371
     72ac_build_tool_prefix=
     73AS_IF([test -n "$build"],      [ac_build_tool_prefix="$build-"],
     74      [test -n "$build_alias"],[ac_build_tool_prefix="$build_alias-"])
     75
     76AC_LANG_PUSH([C++])
    7477AC_PROG_CXX
    7578AC_PROG_CXXCPP
    7679
    77 ac_tool_prefix=$save_ac_tool_prefix
    78 cross_compiling=$save_cross_compiling
    79 
    8080dnl Restore the old definitions
    8181dnl
    82 popdef([ac_link])dnl
    83 popdef([ac_compile])dnl
    84 popdef([ac_cxxcpp])dnl
     82popdef([cross_compiling])dnl
     83popdef([am_cv_CXX_dependencies_compiler_type])dnl
     84popdef([ac_tool_prefix])dnl
    8585popdef([ac_cv_host_os])dnl
    8686popdef([ac_cv_host_vendor])dnl
     
    104104popdef([ac_cv_prog_CXXCPP])dnl
    105105
     106dnl restore global variables (dependant on the current
     107dnl language after popping):
     108AC_LANG_POP([C++])
     109
    106110dnl Finally, set Makefile variables
    107111dnl
Note: See TracChangeset for help on using the changeset viewer.