X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=configure.ac;h=bb19ddecad3a15f21aede3695dcf45b95c4aa5b9;hb=ed593595d0a9923d7299f7a79ac50331861a8090;hp=f8683dd221bf3e52a877b487c843c96b81558e34;hpb=c05680c5589a203ea2ec22a88026a8d2f2315623;p=platform%2Fupstream%2Fisl.git diff --git a/configure.ac b/configure.ac index f8683dd..bb19dde 100644 --- a/configure.ac +++ b/configure.ac @@ -1,10 +1,22 @@ -AC_INIT([isl], [0.08], [isl-development@googlegroups.com]) +AC_INIT([isl], [0.11.2], [isl-development@googlegroups.com]) AC_CONFIG_AUX_DIR([.]) AC_CONFIG_MACRO_DIR([m4]) AM_INIT_AUTOMAKE([foreign]) m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) AC_SUBST(versioninfo) -versioninfo=8:0:0 +versioninfo=11:2:1 + +if test "x$prefix" != "xNONE"; then + prefix_wd=`cd $prefix && pwd` + srcdir_wd=`cd $srcdir && pwd` + wd=`pwd` + if test "x$prefix_wd" = "x$srcdir_wd"; then + AC_MSG_ERROR(Installation in source directory not supported) + fi + if test "x$prefix_wd" = "x$wd"; then + AC_MSG_ERROR(Installation in build directory not supported) + fi +fi AC_PROG_CC AC_PROG_CXX @@ -36,6 +48,22 @@ system) GMP_LDFLAGS="-L$with_gmp_prefix/lib" fi GMP_LIBS=-lgmp + SAVE_CPPFLAGS="$CPPFLAGS" + SAVE_LDFLAGS="$LDFLAGS" + SAVE_LIBS="$LIBS" + CPPFLAGS="$GMP_CPPFLAGS $CPPFLAGS" + LDFLAGS="$GMP_LDFLAGS $LDFLAGS" + LIBS="$GMP_LIBS $LIBS" + AC_CHECK_HEADER([gmp.h], [], [AC_ERROR([gmp.h header not found])]) + AC_CHECK_LIB([gmp], [main], [], [AC_ERROR([gmp library not found])]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[ + mpz_t n, d; + if (mpz_divisible_p(n, d)) + mpz_divexact_ui(n, n, 4); + ]])], [], [AC_ERROR([gmp library too old])]) + CPPFLAGS="$SAVE_CPPFLAGS" + LDFLAGS="$SAVE_LDFLAGS" + LIBS="$SAVE_LIBS" ;; build) GMP_CPPFLAGS="-I$gmp_srcdir -I$with_gmp_builddir" @@ -113,7 +141,8 @@ system) fi CLANG_CXXFLAGS=`$llvm_config --cxxflags` CLANG_LDFLAGS=`$llvm_config --ldflags` - CLANG_LIBS=`$llvm_config --libs` + targets=`$llvm_config --targets-built` + CLANG_LIBS=`$llvm_config --libs $targets asmparser bitreader support mc` CLANG_PREFIX=`$llvm_config --prefix` AC_DEFINE_UNQUOTED(CLANG_PREFIX, ["$CLANG_PREFIX"], [Clang installation prefix]) @@ -142,8 +171,49 @@ system) AC_EGREP_HEADER([CXXIsProduction], [clang/Driver/Driver.h], [AC_DEFINE([HAVE_CXXISPRODUCTION], [], [Define if Driver constructor takes CXXIsProduction argument])]) + AC_EGREP_HEADER([ IsProduction], [clang/Driver/Driver.h], + [AC_DEFINE([HAVE_ISPRODUCTION], [], + [Define if Driver constructor takes IsProduction argument])]) + AC_EGREP_HEADER([void HandleTopLevelDecl\(], [clang/AST/ASTConsumer.h], + [AC_DEFINE([HandleTopLevelDeclReturn], [void], + [Return type of HandleTopLevelDeclReturn]) + AC_DEFINE([HandleTopLevelDeclContinue], [], + [Return type of HandleTopLevelDeclReturn])], + [AC_DEFINE([HandleTopLevelDeclReturn], [bool], + [Return type of HandleTopLevelDeclReturn]) + AC_DEFINE([HandleTopLevelDeclContinue], [true], + [Return type of HandleTopLevelDeclReturn])]) + AC_CHECK_HEADER([clang/Basic/DiagnosticOptions.h], + [AC_DEFINE([HAVE_BASIC_DIAGNOSTICOPTIONS_H], [], + [Define if clang/Basic/DiagnosticOptions.h exists])]) + AC_TRY_COMPILE([#include ], [ + using namespace clang; + TargetOptions *TO; + DiagnosticsEngine *Diags; + TargetInfo::CreateTargetInfo(*Diags, TO); + ], [AC_DEFINE([CREATETARGETINFO_TAKES_POINTER], [], + [Define if TargetInfo::CreateTargetInfo takes pointer])]) + AC_TRY_COMPILE([#include ], [ + using namespace clang; + DiagnosticConsumer *client; + CompilerInstance *Clang; + Clang->createDiagnostics(client); + ], [], [AC_DEFINE([CREATEDIAGNOSTICS_TAKES_ARG], [], + [Define if CompilerInstance::createDiagnostics takes argc and argv])]) + AC_TRY_COMPILE([#include ], [ + using namespace clang; + HeaderSearchOptions HSO; + HSO.AddPath("", frontend::Angled, false, false); + ], [AC_DEFINE([ADDPATH_TAKES_4_ARGUMENTS], [], + [Define if HeaderSearchOptions::AddPath takes 4 arguments])]) AC_LANG_POP CPPFLAGS="$SAVE_CPPFLAGS" + + SAVE_LDFLAGS="$LDFLAGS" + LDFLAGS="$CLANG_LDFLAGS $LDFLAGS" + AC_SUBST(LIB_CLANG_EDIT) + AC_CHECK_LIB([clangEdit], [main], [LIB_CLANG_EDIT=-lclangEdit], []) + LDFLAGS="$SAVE_LDFLAGS" ;; esac AM_CONDITIONAL(HAVE_CLANG, test $with_clang = system) @@ -169,6 +239,7 @@ if test $with_clang = system; then AC_CONFIG_FILES(interface/Makefile) fi AC_CONFIG_FILES([bound_test.sh], [chmod +x bound_test.sh]) +AC_CONFIG_FILES([codegen_test.sh], [chmod +x codegen_test.sh]) AC_CONFIG_FILES([pip_test.sh], [chmod +x pip_test.sh]) AC_CONFIG_COMMANDS_POST([ dnl pass on arguments to subdir configures, but don't