mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 12:41:49 +01:00
Add some fixes to the configure script for isInf and add
--enable-libcpp to projects/sample. Patch by Dmitri Shubin with additional fixes by me. llvm-svn: 153425
This commit is contained in:
parent
c3ea38275b
commit
1f469112aa
@ -19,7 +19,7 @@ fi
|
|||||||
|
|
||||||
AC_SINGLE_CXX_CHECK([ac_cv_func_std_isinf_in_cmath],
|
AC_SINGLE_CXX_CHECK([ac_cv_func_std_isinf_in_cmath],
|
||||||
[std::isinf], [<cmath>],
|
[std::isinf], [<cmath>],
|
||||||
[float f; std::isinf(f)}])
|
[float f; std::isinf(f);])
|
||||||
if test "$ac_cv_func_std_isinf_in_cmath" = "yes" ; then
|
if test "$ac_cv_func_std_isinf_in_cmath" = "yes" ; then
|
||||||
AC_DEFINE([HAVE_STD_ISINF_IN_CMATH],1,[Set to 1 if the std::isinf function is found in <cmath>])
|
AC_DEFINE([HAVE_STD_ISINF_IN_CMATH],1,[Set to 1 if the std::isinf function is found in <cmath>])
|
||||||
fi
|
fi
|
||||||
|
@ -6,7 +6,7 @@ AC_DEFUN([AC_HUGE_VAL_CHECK],[
|
|||||||
AC_CACHE_CHECK([for HUGE_VAL sanity], [ac_cv_huge_val_sanity],[
|
AC_CACHE_CHECK([for HUGE_VAL sanity], [ac_cv_huge_val_sanity],[
|
||||||
AC_LANG_PUSH([C++])
|
AC_LANG_PUSH([C++])
|
||||||
ac_save_CXXFLAGS=$CXXFLAGS
|
ac_save_CXXFLAGS=$CXXFLAGS
|
||||||
CXXFLAGS=-pedantic
|
CXXFLAGS+=" -pedantic"
|
||||||
AC_RUN_IFELSE(
|
AC_RUN_IFELSE(
|
||||||
AC_LANG_PROGRAM(
|
AC_LANG_PROGRAM(
|
||||||
[#include <math.h>],
|
[#include <math.h>],
|
||||||
|
4
configure
vendored
4
configure
vendored
@ -16361,7 +16361,7 @@ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ex
|
|||||||
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
|
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
|
||||||
|
|
||||||
ac_save_CXXFLAGS=$CXXFLAGS
|
ac_save_CXXFLAGS=$CXXFLAGS
|
||||||
CXXFLAGS=-pedantic
|
CXXFLAGS+=" -pedantic"
|
||||||
if test "$cross_compiling" = yes; then
|
if test "$cross_compiling" = yes; then
|
||||||
ac_cv_huge_val_sanity=yes
|
ac_cv_huge_val_sanity=yes
|
||||||
else
|
else
|
||||||
@ -19987,7 +19987,7 @@ cat >>conftest.$ac_ext <<_ACEOF
|
|||||||
int
|
int
|
||||||
main ()
|
main ()
|
||||||
{
|
{
|
||||||
float f; std::isinf(f)}
|
float f; std::isinf(f);
|
||||||
;
|
;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -182,6 +182,10 @@ RDYNAMIC := @RDYNAMIC@
|
|||||||
# These are options that can either be enabled here, or can be enabled on the
|
# These are options that can either be enabled here, or can be enabled on the
|
||||||
# make command line (ie, make ENABLE_PROFILING=1):
|
# make command line (ie, make ENABLE_PROFILING=1):
|
||||||
|
|
||||||
|
# When ENABLE_LIBCPP is enabled, LLVM uses libc++ by default to build.
|
||||||
|
#ENABLE_LIBCPP = 0
|
||||||
|
ENABLE_LIBCPP = @ENABLE_LIBCPP@
|
||||||
|
|
||||||
# When ENABLE_OPTIMIZED is enabled, LLVM code is optimized and output is put
|
# When ENABLE_OPTIMIZED is enabled, LLVM code is optimized and output is put
|
||||||
# into the "Release" directories. Otherwise, LLVM code is not optimized and
|
# into the "Release" directories. Otherwise, LLVM code is not optimized and
|
||||||
# output is put in the "Debug" directories.
|
# output is put in the "Debug" directories.
|
||||||
|
@ -245,6 +245,11 @@ else
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(ENABLE_LIBCPP),1)
|
||||||
|
CXX.Flags += -stdlib=libc++
|
||||||
|
LD.Flags += -stdlib=libc++
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(ENABLE_PROFILING),1)
|
ifeq ($(ENABLE_PROFILING),1)
|
||||||
BuildMode := $(BuildMode)+Profile
|
BuildMode := $(BuildMode)+Profile
|
||||||
CXX.Flags := $(filter-out -fomit-frame-pointer,$(CXX.Flags)) -pg -g
|
CXX.Flags := $(filter-out -fomit-frame-pointer,$(CXX.Flags)) -pg -g
|
||||||
|
@ -360,6 +360,18 @@ dnl=== SECTION 3: Command line arguments for the configure script.
|
|||||||
dnl===
|
dnl===
|
||||||
dnl===-----------------------------------------------------------------------===
|
dnl===-----------------------------------------------------------------------===
|
||||||
|
|
||||||
|
dnl --enable-libcpp : check whether or not to use libc++ on the command line
|
||||||
|
AC_ARG_ENABLE(libcpp,
|
||||||
|
AS_HELP_STRING([--enable-libcpp],
|
||||||
|
[Use libc++ if available (default is NO)]),,
|
||||||
|
enableval=default)
|
||||||
|
case "$enableval" in
|
||||||
|
yes) AC_SUBST(ENABLE_LIBCPP,[1]) ;;
|
||||||
|
no) AC_SUBST(ENABLE_LIBCPP,[0]) ;;
|
||||||
|
default) AC_SUBST(ENABLE_LIBCPP,[0]);;
|
||||||
|
*) AC_MSG_ERROR([Invalid setting for --enable-libcpp. Use "yes" or "no"]) ;;
|
||||||
|
esac
|
||||||
|
|
||||||
dnl --enable-optimized : check whether they want to do an optimized build:
|
dnl --enable-optimized : check whether they want to do an optimized build:
|
||||||
AC_ARG_ENABLE(optimized, AS_HELP_STRING(
|
AC_ARG_ENABLE(optimized, AS_HELP_STRING(
|
||||||
--enable-optimized,[Compile with optimizations enabled (default is NO)]),,enableval=$optimize)
|
--enable-optimized,[Compile with optimizations enabled (default is NO)]),,enableval=$optimize)
|
||||||
|
@ -19,7 +19,7 @@ fi
|
|||||||
|
|
||||||
AC_SINGLE_CXX_CHECK([ac_cv_func_std_isinf_in_cmath],
|
AC_SINGLE_CXX_CHECK([ac_cv_func_std_isinf_in_cmath],
|
||||||
[std::isinf], [<cmath>],
|
[std::isinf], [<cmath>],
|
||||||
[float f; std::isinf(f)}])
|
[float f; std::isinf(f);])
|
||||||
if test "$ac_cv_func_std_isinf_in_cmath" = "yes" ; then
|
if test "$ac_cv_func_std_isinf_in_cmath" = "yes" ; then
|
||||||
AC_DEFINE([HAVE_STD_ISINF_IN_CMATH],1,[Set to 1 if the std::isinf function is found in <cmath>])
|
AC_DEFINE([HAVE_STD_ISINF_IN_CMATH],1,[Set to 1 if the std::isinf function is found in <cmath>])
|
||||||
fi
|
fi
|
||||||
|
@ -6,7 +6,7 @@ AC_DEFUN([AC_HUGE_VAL_CHECK],[
|
|||||||
AC_CACHE_CHECK([for HUGE_VAL sanity], [ac_cv_huge_val_sanity],[
|
AC_CACHE_CHECK([for HUGE_VAL sanity], [ac_cv_huge_val_sanity],[
|
||||||
AC_LANG_PUSH([C++])
|
AC_LANG_PUSH([C++])
|
||||||
ac_save_CXXFLAGS=$CXXFLAGS
|
ac_save_CXXFLAGS=$CXXFLAGS
|
||||||
CXXFLAGS=-pedantic
|
CXXFLAGS+=" -pedantic"
|
||||||
AC_RUN_IFELSE(
|
AC_RUN_IFELSE(
|
||||||
AC_LANG_PROGRAM(
|
AC_LANG_PROGRAM(
|
||||||
[#include <math.h>],
|
[#include <math.h>],
|
||||||
|
32
projects/sample/configure
vendored
32
projects/sample/configure
vendored
@ -682,6 +682,7 @@ BUILD_CC
|
|||||||
BUILD_EXEEXT
|
BUILD_EXEEXT
|
||||||
BUILD_CXX
|
BUILD_CXX
|
||||||
CVSBUILD
|
CVSBUILD
|
||||||
|
ENABLE_LIBCPP
|
||||||
ENABLE_OPTIMIZED
|
ENABLE_OPTIMIZED
|
||||||
ENABLE_PROFILING
|
ENABLE_PROFILING
|
||||||
DISABLE_ASSERTIONS
|
DISABLE_ASSERTIONS
|
||||||
@ -1373,6 +1374,7 @@ Optional Features:
|
|||||||
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
|
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
|
||||||
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
|
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
|
||||||
--enable-polly Use polly if available (default is YES)
|
--enable-polly Use polly if available (default is YES)
|
||||||
|
--enable-libcpp Use libc++ if available (default is NO)
|
||||||
--enable-optimized Compile with optimizations enabled (default is NO)
|
--enable-optimized Compile with optimizations enabled (default is NO)
|
||||||
--enable-profiling Compile with profiling enabled (default is NO)
|
--enable-profiling Compile with profiling enabled (default is NO)
|
||||||
--enable-assertions Compile with assertion checks enabled (default is
|
--enable-assertions Compile with assertion checks enabled (default is
|
||||||
@ -4913,6 +4915,25 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# Check whether --enable-libcpp was given.
|
||||||
|
if test "${enable_libcpp+set}" = set; then
|
||||||
|
enableval=$enable_libcpp;
|
||||||
|
else
|
||||||
|
enableval=default
|
||||||
|
fi
|
||||||
|
|
||||||
|
case "$enableval" in
|
||||||
|
yes) ENABLE_LIBCPP=1
|
||||||
|
;;
|
||||||
|
no) ENABLE_LIBCPP=0
|
||||||
|
;;
|
||||||
|
default) ENABLE_LIBCPP=0
|
||||||
|
;;
|
||||||
|
*) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-libcpp. Use \"yes\" or \"no\"" >&5
|
||||||
|
echo "$as_me: error: Invalid setting for --enable-libcpp. Use \"yes\" or \"no\"" >&2;}
|
||||||
|
{ (exit 1); exit 1; }; } ;;
|
||||||
|
esac
|
||||||
|
|
||||||
# Check whether --enable-optimized was given.
|
# Check whether --enable-optimized was given.
|
||||||
if test "${enable_optimized+set}" = set; then
|
if test "${enable_optimized+set}" = set; then
|
||||||
enableval=$enable_optimized;
|
enableval=$enable_optimized;
|
||||||
@ -10269,7 +10290,7 @@ else
|
|||||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||||
lt_status=$lt_dlunknown
|
lt_status=$lt_dlunknown
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 10272 "configure"
|
#line 10293 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
#if HAVE_DLFCN_H
|
#if HAVE_DLFCN_H
|
||||||
@ -15930,7 +15951,7 @@ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ex
|
|||||||
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
|
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
|
||||||
|
|
||||||
ac_save_CXXFLAGS=$CXXFLAGS
|
ac_save_CXXFLAGS=$CXXFLAGS
|
||||||
CXXFLAGS=-pedantic
|
CXXFLAGS+=" -pedantic"
|
||||||
if test "$cross_compiling" = yes; then
|
if test "$cross_compiling" = yes; then
|
||||||
ac_cv_huge_val_sanity=yes
|
ac_cv_huge_val_sanity=yes
|
||||||
else
|
else
|
||||||
@ -19555,7 +19576,7 @@ cat >>conftest.$ac_ext <<_ACEOF
|
|||||||
int
|
int
|
||||||
main ()
|
main ()
|
||||||
{
|
{
|
||||||
float f; std::isinf(f)}
|
float f; std::isinf(f);
|
||||||
;
|
;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -21601,6 +21622,7 @@ BUILD_CC!$BUILD_CC$ac_delim
|
|||||||
BUILD_EXEEXT!$BUILD_EXEEXT$ac_delim
|
BUILD_EXEEXT!$BUILD_EXEEXT$ac_delim
|
||||||
BUILD_CXX!$BUILD_CXX$ac_delim
|
BUILD_CXX!$BUILD_CXX$ac_delim
|
||||||
CVSBUILD!$CVSBUILD$ac_delim
|
CVSBUILD!$CVSBUILD$ac_delim
|
||||||
|
ENABLE_LIBCPP!$ENABLE_LIBCPP$ac_delim
|
||||||
ENABLE_OPTIMIZED!$ENABLE_OPTIMIZED$ac_delim
|
ENABLE_OPTIMIZED!$ENABLE_OPTIMIZED$ac_delim
|
||||||
ENABLE_PROFILING!$ENABLE_PROFILING$ac_delim
|
ENABLE_PROFILING!$ENABLE_PROFILING$ac_delim
|
||||||
DISABLE_ASSERTIONS!$DISABLE_ASSERTIONS$ac_delim
|
DISABLE_ASSERTIONS!$DISABLE_ASSERTIONS$ac_delim
|
||||||
@ -21615,7 +21637,6 @@ ENABLE_DOXYGEN!$ENABLE_DOXYGEN$ac_delim
|
|||||||
ENABLE_THREADS!$ENABLE_THREADS$ac_delim
|
ENABLE_THREADS!$ENABLE_THREADS$ac_delim
|
||||||
ENABLE_PTHREADS!$ENABLE_PTHREADS$ac_delim
|
ENABLE_PTHREADS!$ENABLE_PTHREADS$ac_delim
|
||||||
ENABLE_PIC!$ENABLE_PIC$ac_delim
|
ENABLE_PIC!$ENABLE_PIC$ac_delim
|
||||||
ENABLE_SHARED!$ENABLE_SHARED$ac_delim
|
|
||||||
_ACEOF
|
_ACEOF
|
||||||
|
|
||||||
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
|
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
|
||||||
@ -21657,6 +21678,7 @@ _ACEOF
|
|||||||
ac_delim='%!_!# '
|
ac_delim='%!_!# '
|
||||||
for ac_last_try in false false false false false :; do
|
for ac_last_try in false false false false false :; do
|
||||||
cat >conf$$subs.sed <<_ACEOF
|
cat >conf$$subs.sed <<_ACEOF
|
||||||
|
ENABLE_SHARED!$ENABLE_SHARED$ac_delim
|
||||||
ENABLE_EMBED_STDCXX!$ENABLE_EMBED_STDCXX$ac_delim
|
ENABLE_EMBED_STDCXX!$ENABLE_EMBED_STDCXX$ac_delim
|
||||||
ENABLE_TIMESTAMPS!$ENABLE_TIMESTAMPS$ac_delim
|
ENABLE_TIMESTAMPS!$ENABLE_TIMESTAMPS$ac_delim
|
||||||
TARGETS_TO_BUILD!$TARGETS_TO_BUILD$ac_delim
|
TARGETS_TO_BUILD!$TARGETS_TO_BUILD$ac_delim
|
||||||
@ -21747,7 +21769,7 @@ LIBOBJS!$LIBOBJS$ac_delim
|
|||||||
LTLIBOBJS!$LTLIBOBJS$ac_delim
|
LTLIBOBJS!$LTLIBOBJS$ac_delim
|
||||||
_ACEOF
|
_ACEOF
|
||||||
|
|
||||||
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 88; then
|
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 89; then
|
||||||
break
|
break
|
||||||
elif $ac_last_try; then
|
elif $ac_last_try; then
|
||||||
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
|
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
|
||||||
|
Loading…
x
Reference in New Issue
Block a user