Alien-LibJIT
view release on metacpan or search on metacpan
libjit/configure.ac view on Meta::CPAN
*-*-mingw*)
platform_win32=yes
if test "x$CC" = "xcl" ; then
if test "x$CXX" = "x" ; then
CXX="cl"
fi
fi
suppress_libm=yes
JIT_INT64_INCLUDE='#include <stdlib.h>'
;;
*)
platform_win32=no
suppress_libm=no
JIT_INT64_INCLUDE=
;;
esac
AC_MSG_RESULT($platform_win32)
dnl The "--enable-interpreter" option forces the use of the interpreter.
AC_ARG_ENABLE(interpreter,
AS_HELP_STRING([--enable-interpreter], [Enable the libjit interpreter]),
[case "${enableval}" in
yes) interp=true ;;
no) interp=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-interpreter) ;;
esac], [interp=false])
if test x$interp = xtrue; then
AC_DEFINE(USE_LIBJIT_INTERPRETER, 1, [Define if you want to use the libjit interpreter])
fi
dnl The "--enable-signals" option forces the use of the OS signals for exception handling.
AC_ARG_ENABLE(signals,
AS_HELP_STRING([--enable-signals], [Enable OS signal handling]),
[case "${enableval}" in
yes) use_signals=true ;;
no) use_signals=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-signals) ;;
esac], [use_signals=false])
if test x$use_signals = xtrue; then
AC_DEFINE(JIT_USE_SIGNALS, 1, [Define if you want to use the OS signals for exception handling])
fi
dnl The "--enable-long-double" option forces the use of long double for
dnl jit_nfloat.
AC_ARG_ENABLE(long-double,
AS_HELP_STRING([--enable-long-double], [Enable the use of long double for jit_nfloat]))
dnl Checks for programs.
AC_PROG_AWK
AC_PROG_CC
AC_PROG_CXX
AM_PROG_AR
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_YACC
AM_PROG_LEX
AC_LIBTOOL_WIN32_DLL
AC_PROG_LIBTOOL
dnl Set the correct flags for compiling with MSVC. "/QIfist" is needed
dnl on systems with both VC 6.0 and VC 7.0 installed: sometimes VC 7.0
dnl picks up the wrong intrinsic libraries (particularly for __ftol2).
dnl The "/EHs" option is required to enable exception handling in C++.
if test "x$CC" = "xcl" ; then
CFLAGS="/nologo /QIfist"
CXXFLAGS="/nologo /QIfist /EHs"
fi
dnl Check for file extensions.
AC_EXEEXT
AC_OBJEXT
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(string.h strings.h memory.h stdlib.h stdarg.h varargs.h)
AC_CHECK_HEADERS(tgmath.h math.h ieeefp.h pthread.h unistd.h sys/types.h)
AC_CHECK_HEADERS(sys/mman.h fcntl.h dlfcn.h sys/cygwin.h sys/stat.h)
AC_CHECK_HEADERS(time.h sys/time.h)
dnl A macro that helps detect the size of types in a cross-compile environment.
AC_DEFUN([AC_COMPILE_CHECK_SIZEOF],
[changequote(<<, >>)dnl
dnl The name to #define.
define(<<AC_TYPE_NAME>>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl
dnl The cache variable name.
define(<<AC_CV_NAME>>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl
changequote([, ])dnl
AC_MSG_CHECKING(size of $1)
AC_CACHE_VAL(AC_CV_NAME,
[for ac_size in 4 8 1 2 12 16 $2 ; do # List sizes in rough order of prevalence.
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include "confdefs.h"
#include <sys/types.h>
]], [[switch (0) case 0: case (sizeof ($1) == $ac_size):;]])], [AC_CV_NAME=$ac_size], [])
if test x$AC_CV_NAME != x ; then break; fi
done
])
if test x$AC_CV_NAME = x ; then
AC_CV_NAME=0
fi
AC_MSG_RESULT($AC_CV_NAME)
AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME, [The number of bytes in type $1])
undefine([AC_TYPE_NAME])dnl
undefine([AC_CV_NAME])dnl
])
dnl A macro that detects if "char" is unsigned in a cross-compile environment.
AC_DEFUN([AC_COMPILE_CHAR_UNSIGNED],
[AC_MSG_CHECKING(if char is unsigned)
AC_CACHE_VAL(ac_cv_c_char_unsigned,
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include "confdefs.h"
]], [[switch (-1) case -1: case (char)255:;]])], [ac_cv_c_char_unsigned=yes], []))
if test x$ac_cv_c_char_unsigned = x ; then
ac_cv_c_char_unsigned=no
fi
AC_MSG_RESULT($ac_cv_c_char_unsigned)
if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
AC_DEFINE(__CHAR_UNSIGNED__, 1, [Define to 1 if "char" is unsigned])
fi
])
( run in 2.048 seconds using v1.01-cache-2.11-cpan-796a6f069b2 )