Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6869b4f

Browse files
committed
Add C++ support to configure.
This is an optional dependency. It'll be used for the upcoming LLVMbased just in time compilation support, which needs to wrap a few LLVMC++ APIs so they're accessible from C..For now test for C++ compilers unconditionally, without failing if notpresent, to ensure wide buildfarm coverage. If we're bothered by theadditional test times (which are quite short) or verbosity, we canlater make the tests conditional on --with-llvm.Author: Andres FreundDiscussion:https://postgr.es/m/20170901064131.tazjxwus3k2w3ybh@alap3.anarazel.de
1 parenta364dfa commit6869b4f

File tree

6 files changed

+1013
-11
lines changed

6 files changed

+1013
-11
lines changed

‎config/c-compiler.m4

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,46 @@ AC_DEFUN([PGAC_PROG_CC_VAR_OPT],
477477

478478

479479

480+
# PGAC_PROG_VARCXX_VARFLAGS_OPT
481+
# -----------------------
482+
# Given a compiler, variable name and a string, check if the compiler
483+
# supports the string as a command-line option. If it does, add the
484+
# string to the given variable.
485+
AC_DEFUN([PGAC_PROG_VARCXX_VARFLAGS_OPT],
486+
[define([Ac_cachevar],[AS_TR_SH([pgac_cv_prog_$1_cxxflags_$3])])dnl
487+
AC_CACHE_CHECK([whether ${$1} supports$3, for$2],[Ac_cachevar],
488+
[pgac_save_CXXFLAGS=$CXXFLAGS
489+
pgac_save_CXX=$CXX
490+
CXX=${$1}
491+
CXXFLAGS="${$2}$3"
492+
ac_save_cxx_werror_flag=$ac_cxx_werror_flag
493+
ac_cxx_werror_flag=yes
494+
AC_LANG_PUSH(C++)
495+
_AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
496+
[Ac_cachevar=yes],
497+
[Ac_cachevar=no])
498+
AC_LANG_POP([])
499+
ac_cxx_werror_flag=$ac_save_cxx_werror_flag
500+
CXXFLAGS="$pgac_save_CXXFLAGS"
501+
CXX="$pgac_save_CXX"])
502+
if test x"$Ac_cachevar" = x"yes"; then
503+
$2="${$2}$3"
504+
fi
505+
undefine([Ac_cachevar])dnl
506+
])# PGAC_PROG_VARCXX_VARFLAGS_OPT
507+
508+
509+
510+
# PGAC_PROG_CXX_CFLAGS_OPT
511+
# -----------------------
512+
# Given a string, check if the compiler supports the string as a
513+
# command-line option. If it does, add the string to CXXFLAGS.
514+
AC_DEFUN([PGAC_PROG_CXX_CFLAGS_OPT],
515+
[PGAC_PROG_VARCXX_VARFLAGS_OPT(CXX, CXXFLAGS,$1)
516+
])# PGAC_PROG_CXX_VAR_OPT
517+
518+
519+
480520
# PGAC_PROG_CC_LDFLAGS_OPT
481521
# ------------------------
482522
# Given a string, check if the compiler supports the string as a

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp