Use libc++ when it's available
This commit is contained in:
parent
b077c0991b
commit
13b83b0996
2 changed files with 17 additions and 0 deletions
|
@ -167,6 +167,8 @@ AS_IF([test x$enable_compiler_flags != xno], [
|
|||
AC_CXX_FLAG([-fno-strict-aliasing])
|
||||
AC_CXX_FLAG([-pipe])
|
||||
AC_CXX_FLAG([-g])
|
||||
AC_CXX_FLAG([-stdlib=libc++])
|
||||
AC_LD_FLAG([-stdlib=libc++])
|
||||
|
||||
# -O* messes with debugging.
|
||||
AS_IF([test x$enable_debug = xyes], [
|
||||
|
|
|
@ -28,6 +28,21 @@ AC_DEFUN([AC_CXX_FLAG], [{
|
|||
])
|
||||
AC_LANG_POP(C++)
|
||||
}])
|
||||
AC_DEFUN([AC_LD_FLAG], [{
|
||||
AC_LANG_PUSH(C++)
|
||||
ac_ld_flag_save="$LDFLAGS"
|
||||
LDFLAGS="$LDFLAGS $1"
|
||||
AC_MSG_CHECKING([[whether $CXX supports $1]])
|
||||
AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM([[]])],
|
||||
[AC_MSG_RESULT([yes])],
|
||||
[
|
||||
LDFLAGS="$ac_ld_flag_save"
|
||||
AC_MSG_RESULT([no])
|
||||
$2
|
||||
])
|
||||
AC_LANG_POP(C++)
|
||||
}])
|
||||
AC_DEFUN([AC_PCH_FLAG], [{
|
||||
AC_LANG_PUSH(C++)
|
||||
ac_cxx_flag_save="$CXXFLAGS"
|
||||
|
|
Loading…
Reference in a new issue