diff options
author | Daniel Dunbar <daniel@zuster.org> | 2011-10-18 23:10:47 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2011-10-18 23:10:47 +0000 |
commit | 2532fa21a963edf53183357edfc79a9361b44435 (patch) | |
tree | 437546067c905d1d6cd931a47b663c548c290607 /projects/sample/autoconf/m4/huge_val.m4 | |
parent | 857bf8341498448851fd7205e48307138823698b (diff) | |
download | external_llvm-2532fa21a963edf53183357edfc79a9361b44435.zip external_llvm-2532fa21a963edf53183357edfc79a9361b44435.tar.gz external_llvm-2532fa21a963edf53183357edfc79a9361b44435.tar.bz2 |
projects/sample: Import adapted form of current LLVM autoconf/Makefile setup so that projects/sample is standalone and not tied to the LLVM build setup.
- This currently just moves over all of the behavior from LLVM. Eventually all of the configure checks that are directly needed by the LLVM build setup should probably go away, and the project should manage their own configuration checks if necessary.
- This is the 1st half of this work, the actual Makefile.common hasn't moved over yet. I've tried to stage this in such a way that incremental builds will properly reconfigure for most active developers (the Makefiles don't handle reconfiguring in a perfectly reliable way, and I haven't found an easy way to make them do so).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142456 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'projects/sample/autoconf/m4/huge_val.m4')
-rw-r--r-- | projects/sample/autoconf/m4/huge_val.m4 | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/projects/sample/autoconf/m4/huge_val.m4 b/projects/sample/autoconf/m4/huge_val.m4 new file mode 100644 index 0000000..5fffbfc --- /dev/null +++ b/projects/sample/autoconf/m4/huge_val.m4 @@ -0,0 +1,20 @@ +# +# This function determins if the the HUGE_VAL macro is compilable with the +# -pedantic switch or not. XCode < 2.4.1 doesn't get it right. +# +AC_DEFUN([AC_HUGE_VAL_CHECK],[ + AC_CACHE_CHECK([for HUGE_VAL sanity], [ac_cv_huge_val_sanity],[ + AC_LANG_PUSH([C++]) + ac_save_CXXFLAGS=$CXXFLAGS + CXXFLAGS=-pedantic + AC_RUN_IFELSE( + AC_LANG_PROGRAM( + [#include <math.h>], + [double x = HUGE_VAL; return x != x; ]), + [ac_cv_huge_val_sanity=yes],[ac_cv_huge_val_sanity=no], + [ac_cv_huge_val_sanity=yes]) + CXXFLAGS=$ac_save_CXXFLAGS + AC_LANG_POP([C++]) + ]) + AC_SUBST(HUGE_VAL_SANITY,$ac_cv_huge_val_sanity) +]) |