2012-05-23 21:26:15 +02:00
|
|
|
dnl ---- configure.ac for gb.jit
|
|
|
|
|
2014-04-05 23:22:43 +02:00
|
|
|
m4_include([../version.m4])
|
|
|
|
AC_INIT(gambas3-gb-jit, GB_VERSION, GB_MAIL, [], GB_URL)
|
2012-05-23 21:26:15 +02:00
|
|
|
AC_CONFIG_MACRO_DIR([m4])
|
2014-04-05 23:22:43 +02:00
|
|
|
|
2012-05-23 21:26:15 +02:00
|
|
|
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
|
2014-06-23 02:15:12 +02:00
|
|
|
AC_MSG_CHECKING([for LLVM, version >= $min_llvm_version])
|
2012-05-30 16:11:38 +02:00
|
|
|
|
2012-05-25 17:54:00 +02:00
|
|
|
LLVM_VERSION=`$LLVM_CONFIG --version`
|
2014-06-22 18:58:59 +02:00
|
|
|
|
|
|
|
AX_COMPARE_VERSION($LLVM_VERSION, [ge], $min_llvm_version,
|
|
|
|
[AC_MSG_RESULT(yes)],
|
|
|
|
[AC_MSG_RESULT(no)
|
|
|
|
touch DISABLED DISABLED.gb.jit])
|
2012-05-23 21:26:15 +02:00
|
|
|
fi
|
|
|
|
|
2014-09-29 14:18:32 +02:00
|
|
|
|
2012-05-23 21:26:15 +02:00
|
|
|
GB_COMPONENT(
|
2012-05-23 21:56:48 +02:00
|
|
|
jit, JIT, gb.jit, [src],
|
2014-10-13 17:03:06 +02:00
|
|
|
[GB_FIND(llvm/Config/llvm-config.h llvm-c/Core.h, `$LLVM_CONFIG --prefix` /usr/lib/llvm* /usr/local /usr, include)],
|
|
|
|
[GB_FIND(libLLVM-$LLVM_VERSION.$SHLIBEXT, `$LLVM_CONFIG --prefix` /usr/lib/llvm* /usr/local /usr, 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
|