2012-05-23 21:26:15 +02:00
|
|
|
dnl ---- configure.ac for gb.jit
|
|
|
|
|
|
|
|
AC_INIT(configure.ac)
|
|
|
|
AC_CONFIG_MACRO_DIR([m4])
|
|
|
|
GB_INIT(gb.jit)
|
|
|
|
AC_PROG_LIBTOOL
|
|
|
|
|
2012-05-30 16:11:38 +02:00
|
|
|
min_llvm_version=3.1
|
|
|
|
|
2012-05-25 17:54:00 +02:00
|
|
|
dnl llvm-config file can be forced with LLVM_CONFIG env var
|
|
|
|
AC_PATH_PROG([LLVM_CONFIG], [llvm-config], [no])
|
|
|
|
|
|
|
|
if test "x$LLVM_CONFIG" = xno; then
|
2012-05-25 02:50:33 +02:00
|
|
|
touch DISABLED DISABLED.gb.jit
|
|
|
|
else
|
2012-05-30 16:11:38 +02:00
|
|
|
AC_MSG_CHECKING(for LLVM - version >= $min_llvm_version)
|
|
|
|
|
2012-05-25 17:54:00 +02:00
|
|
|
LLVM_VERSION=`$LLVM_CONFIG --version`
|
2012-05-30 16:11:38 +02:00
|
|
|
llvm_major_version=`echo $LLVM_VERSION | sed 's/svn.*//g' | sed 's/\([[0-9]]*\).\([[0-9]]*\)/\1/'`
|
|
|
|
llvm_minor_version=`echo $LLVM_VERSION | sed 's/svn.*//g' | sed 's/\([[0-9]]*\).\([[0-9]]*\)/\2/'`
|
|
|
|
min_llvm_major_version=`echo $min_llvm_version | sed 's/\([[0-9]]*\).\([[0-9]]*\)/\1/'`
|
|
|
|
min_llvm_minor_version=`echo $min_llvm_version | sed 's/\([[0-9]]*\).\([[0-9]]*\)/\2/'`
|
|
|
|
|
|
|
|
if test $llvm_major_version -ge $min_llvm_major_version &&
|
|
|
|
test $llvm_minor_version -ge $min_llvm_minor_version; then
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
touch DISABLED DISABLED.gb.jit
|
|
|
|
fi
|
2012-05-23 21:26:15 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
GB_COMPONENT(
|
2012-05-23 21:56:48 +02:00
|
|
|
jit, JIT, gb.jit, [src],
|
2013-06-13 13:35:45 +02:00
|
|
|
[GB_FIND(llvm/AutoUpgrade.h, /usr/lib/llvm* /usr/local/lib /usr/local /usr/lib /usr `$LLVM_CONFIG --prefix`, include)],
|
2012-11-21 00:57:38 +01:00
|
|
|
[GB_FIND(libLLVM-$LLVM_VERSION.$SHLIBEXT, /usr/lib/llvm* /usr/local /usr `$LLVM_CONFIG --prefix`, lib)],
|
2012-05-25 02:50:33 +02:00
|
|
|
[$C_LIB `$LLVM_CONFIG --ldflags` -lLLVM-$LLVM_VERSION],
|
|
|
|
[-I../../main/gbx -I../../main/share -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS])
|
|
|
|
|
|
|
|
AC_OUTPUT(Makefile src/Makefile)
|
|
|
|
|
2012-05-23 21:26:15 +02:00
|
|
|
GB_PRINT_MESSAGES
|