AC_INIT([Open Axiom], [1.5.1~dev], [pashev.igor@gmail.com]) AC_CANONICAL_TARGET dnl clisp 2.49.92 dnl sbcl 2.1.1 dnl gcl 2.6.12 dnl ecl 20.4.24 AC_CONFIG_SRCDIR([src/algebra/boolean.spad.pamphlet]) AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_HEADERS([config.h]) AM_INIT_AUTOMAKE([-Wall dist-xz foreign subdir-objects]) dnl **** C++ and libraries **** AC_PROG_CC AX_CXX_COMPILE_STDCXX([20], [noext], [mandatory]) AC_CHECK_SIZEOF([void *]) AC_CHECK_HEADERS_ONCE([fcntl.h unistd.h]) AC_CHECK_HEADERS_ONCE([sys/ioctl.h sys/types.h sys/stat.h]) AC_CHECK_DECLS([fork, geteuid, getgid, getuid, mktemp, tempnam]) AC_CHECK_HEADERS_ONCE([sys/wait.h]) AC_CHECK_DECLS([wait], [], [], [[ #ifdef HAVE_SYS_WAIT_H #include #endif ]]) AC_CHECK_HEADERS_ONCE([sys/mman.h]) AC_CHECK_DECLS([MAP_ANONYMOUS, MAP_ANON], [], [], [[ #ifdef HAVE_SYS_MMAN_H #include #endif ]]) AC_CHECK_HEADERS_ONCE([sys/socket.h sys/un.h]) AC_CHECK_DECLS([AF_LOCAL, AF_UNIX], [], [], [[ #ifdef HAVE_SYS_SOCKET_H #include #endif #ifdef HAVE_SYS_UN_H #include #endif ]]) AC_CHECK_HEADERS_ONCE([libutil.h pty.h termios.h util.h]) AC_CHECK_DECLS([openpty], [], [], [[ #if HAVE_SYS_IOCTL_H # include #endif #if HAVE_SYS_TYPESL_H # include #endif #if HAVE_LIBUTIL_H # include #endif #if HAVE_PTY_H # include #endif #if HAVE_TERMIOS_H # include #endif #if HAVE_UTIL_H # include #endif ]]) AC_SEARCH_LIBS([openpty], [util]) dnl **** LISP **** AC_ARG_WITH([lisp], [AS_HELP_STRING([--with-lisp=LISP], [use LISP to build Open Axiom])], [OA_LISP="$withval"], [AC_PATH_PROGS([OA_LISP], [sbcl gcl ecl clisp clozure], [none])]) AS_IF([test "x$OA_LISP" = xnone], [AC_MSG_ERROR([could not find suitable Lisp])]) AC_MSG_CHECKING([Lisp]) AC_MSG_RESULT([$OA_LISP]) AC_MSG_CHECKING([for Lisp flavor]) oa_lisp_impl_type=`echo '(lisp-implementation-type)' | $OA_LISP 2>&AS_MESSAGE_LOG_FD` AS_CASE([$oa_lisp_impl_type], [*"SBCL"*], [oa_lisp_flavor="sbcl"], [*"GNU Common Lisp"*], [oa_lisp_flavor="gcl"], [*"Embeddable Common-Lisp"*], [oa_lisp_flavor="ecl"], [*"CLISP"*], [oa_lisp_flavor="clisp"], [*"Clozure Common Lisp"*], [oa_lisp_flavor="clozure"], [AC_MSG_RESULT([unknown]) AC_MSG_ERROR([unsupported Lisp])]) AC_MSG_RESULT([$oa_lisp_flavor]) AS_CASE([$oa_lisp_flavor], [sbcl], [OA_LISP_BATCH_FLAGS='--noinform --noprint --no-sysinit --no-userinit --disable-debugger' OA_LISP_EVAL_FLAGS='--eval' oa_delay_ffi=yes char_type='char' double_type='double' float_type='float' int_type='int' pointer_type='(* t)' string_type='c-string' void_type='void'], [gcl], [OA_LISP_BATCH_FLAGS='-batch' OA_LISP_EVAL_FLAGS='-eval' oa_delay_ffi=no void_type='void' char_type='char' int_type='int' float_type='float' double_type='double' string_type='string' AS_IF([test "x$SIZEOF_VOID_P" = x4], [pointer_type='fixnum'], [pointer_type='(signed-integer 64)'])], [ecl], [OA_LISP_BATCH_FLAGS='--nodebug --norc' OA_LISP_EVAL_FLAGS='--eval' oa_delay_ffi=no void_type=':void' char_type=':char' int_type=':int' float_type=':float' double_type=':double' string_type=':cstring' pointer_type=':pointer-void'], [clisp], [OA_LISP_BATCH_FLAGS='-q -q -norc' OA_LISP_EVAL_FLAGS='-x' oa_delay_ffi=yes void_type='nil' char_type='character' int_type='int' float_type='single-float' double_type='double-float' string_type='c-string' pointer_type='c-pointer'], [clozure], [OA_LISP_BATCH_FLAGS='--quiet --no-init' OA_LISP_EVAL_FLAGS='--eval' oa_delay_ffi=yes void_type=':void' char_type=':unsigned-byte' int_type=':signed-fullword' float_type=':single-float' double_type=':double-float' string_type=':address' pointer_type=':address'], [AC_MSG_ERROR([unsupported Lisp flavor $oa_lisp_flavor])]) AC_MSG_CHECKING([how to invoke Lisp]) AC_MSG_RESULT([$OA_LISP $OA_LISP_BATCH_FLAGS $OA_LISP_EVAL_FLAGS]) AC_MSG_CHECKING([for compiled Lisp file extension]) oa_fasl_type=`$OA_LISP $OA_LISP_BATCH_FLAGS $OA_LISP_EVAL_FLAGS '(progn (format t "oa_fasl_type:~a" (pathname-type (compile-file-pathname "non-existing.lisp"))) (quit))' 2>&AS_MESSAGE_LOG_FD` AS_IF([test "x$oa_fasl_type" = x], [AC_MSG_RESULT([failed]) AC_MSG_ERROR([Lisp compiler does not work, see config.log for details])]) oa_fasl_type=`echo "$oa_fasl_type" | $AWK -F : '/oa_fasl_type:/{print $2}'` AC_MSG_RESULT([$oa_fasl_type]) AC_SUBST([OA_LISP]) AC_SUBST([OA_LISP_BATCH_FLAGS]) AC_SUBST([OA_LISP_EVAL_FLAGS]) AC_SUBST([FASLEXT], [$oa_fasl_type]) AC_DEFINE_UNQUOTED([FASLEXT], ["$oa_fasl_type"], [Compiled Lisp file extension (usually "fasl").]) AC_DEFINE_UNQUOTED([OPENAXIOM_BASE_RTS], [Runtime::$oa_lisp_flavor], [The kind of base runtime system for this build.]) AC_MSG_CHECKING([Lisp char type]) AC_MSG_RESULT([$char_type]) AC_SUBST([char_type]) AC_MSG_CHECKING([Lisp double type]) AC_MSG_RESULT([$double_type]) AC_SUBST([double_type]) AC_SUBST([float_type]) AC_MSG_CHECKING([Lisp float type]) AC_MSG_RESULT([$float_type]) AC_MSG_CHECKING([Lisp int type]) AC_MSG_RESULT([$int_type]) AC_SUBST([int_type]) AC_MSG_CHECKING([Lisp pointer type]) AC_MSG_RESULT([$pointer_type]) AC_SUBST([pointer_type]) AC_MSG_CHECKING([Lisp string type]) AC_MSG_RESULT([$string_type]) AC_SUBST([string_type]) AC_MSG_CHECKING([Lisp void type]) AC_MSG_RESULT([$void_type]) AC_SUBST([void_type]) AC_SUBST([oa_delay_ffi]) AC_SUBST([oa_editor], [/usr/bin/editor]) AC_SUBST([oa_enable_profiling], [nil]) AC_SUBST([oa_keep_files], []) AC_SUBST([oa_optimize_options], [speed]) AC_SUBST([oa_standard_linking], [no]) AC_SUBST([oa_use_llvm], [no]) AC_SUBST([oa_c_runtime_extra], []) AC_DEFINE_UNQUOTED([OPENAXIOM_EXEEXT], ["$ac_cv_exeext"], [File extensions of the executables (e. g. ".exe").]) AC_DEFINE_UNQUOTED([OPENAXIOM_USE_GUI], [0], [Whether to use the Qt-base GUI as driver.]) AC_DEFINE_UNQUOTED([OPENAXIOM_USE_SMAN], [1], [Whether to use the session manager as driver.]) OA_DEPS=dependencies.mk rm -f "$OA_DEPS" OA_RESOLVE_DEPENDENCIES([src/boot], ["$OA_DEPS"]) OA_RESOLVE_DEPENDENCIES([src/boot/strap], ["$OA_DEPS"]) OA_RESOLVE_DEPENDENCIES([src/interp], ["$OA_DEPS"]) AC_SUBST_FILE([OA_DEPS]) AC_SUBST([OA_DEPS_FILE], [$OA_DEPS]) AC_CONFIG_LINKS([src/boot/stage1/ast.boot:src/boot/ast.boot src/boot/stage1/includer.boot:src/boot/includer.boot src/boot/stage1/parser.boot:src/boot/parser.boot src/boot/stage1/pile.boot:src/boot/pile.boot src/boot/stage1/scanner.boot:src/boot/scanner.boot src/boot/stage1/tokens.boot:src/boot/tokens.boot src/boot/stage1/translator.boot:src/boot/translator.boot src/boot/stage1/utility.boot:src/boot/utility.boot]) AC_CONFIG_FILES([Makefile src/lisp/core.lisp]) AC_OUTPUT