diff options
author | dos-reis <gdr@axiomatics.org> | 2010-08-16 06:05:07 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2010-08-16 06:05:07 +0000 |
commit | b9a1f605a97c2c50b3d08296409aeca4c74d11bc (patch) | |
tree | 950bb6690374211d5dc0af56408523b8b89e1670 /configure.ac.pamphlet | |
parent | 5689ef935c09edbedb6d8466aaf9742c472a00c9 (diff) | |
download | open-axiom-b9a1f605a97c2c50b3d08296409aeca4c74d11bc.tar.gz |
More configure work
Diffstat (limited to 'configure.ac.pamphlet')
-rw-r--r-- | configure.ac.pamphlet | 302 |
1 files changed, 3 insertions, 299 deletions
diff --git a/configure.ac.pamphlet b/configure.ac.pamphlet index 2f6933d9..6fbbcaf8 100644 --- a/configure.ac.pamphlet +++ b/configure.ac.pamphlet @@ -189,302 +189,10 @@ axiom_build_sharedir=$axiom_builddir/share \section{Host characteristics} -As mentioned in the introduction, a small part of \Tool{OpenAxiom} is -written in the C programming language. That C runtime support -can be decomposed in three components: -\begin{enumerate} -\item core runtime support, -\item graphics (including HyperDoc), and -\item terminal I/O. -\end{enumerate} - -\subsection{Core runtime} - -\subsubsection{Signals} - -The host platform must be able to handle signals. Although, this is -not strictly necessary, that is the way \Tool{OpenAxiom} source code -is currently written. We ask for a POSIX or ISO C semantics, though -we have a strong preference for POSIX-conformant semantics. - -<<C headers and libraries>>= -AC_CHECK_HEADERS([signal.h], - [], - [AC_MSG_ERROR([OpenAxiom needs signal support.])]) -AC_CHECK_DECLS([sigaction], [], [], - [#include <signal.h>]) -@ - - -\subsubsection{Files and directtories} - -Some parts of \Tool{OpenAxiom} manipulate files and directories. They -more or less directly reflect the underlying platform semantics. -For the moment, we require POSIX semantics, though that does not -seem necessary. That restriction should be removed as soon as possible. - -<<C headers and libraries>>= -AC_CHECK_HEADERS([sys/stat.h], - [], - [AC_MSG_ERROR([OpenAxiom needs <sys/stat.h>])]) -case $host in - *mingw*) - ;; - *) - AC_CHECK_HEADERS([dirent.h], - [], - [AC_MSG_ERROR([OpenAxiom needs <dirent.h>])]) - ;; -esac - -AC_CHECK_HEADERS([unistd.h], [], - [AC_MSG_ERROR([OpenAxiom needs <unistd.h>])]) -AC_CHECK_DECLS([getuid, geteuid, getgid, getegid], [], [], - [#include <unistd.h>]) - -AC_CHECK_DECLS([kill], [], [], - [#include <signal.h>]) -@ - -\subsubsection{Sockets} - -The host environment must be capable of handling communication through -sockets. This is required for interfacing \Tool{AXIOMsys} -and \Tool{Superman}. Notice that ideally, we should decouple -that interface in such a way that we can still build \Tool{OpenAxiom} -when \Tool{Superman} is not needed or a socket library is not -available. - -<<C headers and libraries>>= -case $host in - *mingw*) - AC_CHECK_HEADERS([winsock2.h], - [axiom_host_has_socket=yes], - []) - axiom_c_runtime_extra="-lwsock32" - ;; - *) - AC_CHECK_HEADERS([sys/socket.h], - [axiom_host_has_socket=yes], - []) - ;; -esac -if test x$axiom_host_has_socket != xyes; then \ - AC_MSG_ERROR([OpenAxiom needs suport for sockets.]) -fi -## solaris-based systems tend to hide the socket library. -case $host in - *solaris*) - AC_SEARCH_LIBS([accept], [socket], - [], [AC_MSG_ERROR([socket library not found])]) - AC_SEARCH_LIBS([gethostbyname], [nsl]) - ;; - *) ;; -esac - -AC_SUBST(axiom_c_runtime_extra) - -AC_EGREP_CPP([has_af_local], - [#if HAVE_SYS_SOCKET_H -# include <sys/socket.h> -#else -# include <winsock2.h> -#endif -#ifdef AF_LOCAL - has_af_local -#endif - ], - [AC_DEFINE([HAVE_AF_LOCAL], [1], [Host has AF_LOCAL])]) - - -AC_EGREP_CPP([has_af_unix], - [#if HAVE_SYS_SOCKET_H -# include <sys/socket.h> -#else -# include <winsock2.h> -#endif -#ifdef AF_UNIX - has_af_unix -#endif - ], - [AC_DEFINE([HAVE_AF_UNIX], [1], [Host has AF_UNIX])]) - -@ - - -\subsection{Terminal I/O} - -<<C headers and libraries>>= -AC_CHECK_HEADERS([sys/wait.h]) - -if test x"$ac_cv_header_sys_wait_h" = xyes; then \ - AC_CHECK_DECLS([wait], - [], - [], - [#include <sys/wait.h>]) -fi - -AC_CHECK_DECLS([fork], - [], - [], - [#include <unistd.h>]) - -## Does this system have openpty or shall we emulate? -AC_CHECK_HEADERS([sys/ioctl.h pty.h util.h libutil.h termios.h]) -AC_CHECK_DECLS([openpty],[],[], - [#if HAVE_PTY_H -# include <pty.h> -#endif -#if HAVE_UTIL_H -# include <util.h> -#endif -#if HAVE_SYS_IOCTL_H -# include <sys/ioctl.h> -#endif -#if HAVE_TERMIOS_H -# include <termios.h> -#endif -#if HAVE_LIBUTIL_H -# include <sys/types.h> -# include <libutil.h> -#endif - ]) -if test x"$ac_cv_have_decl_openpty" = xyes; then \ - AC_SEARCH_LIBS([openpty],[util]) -fi - -axiom_use_sman=1 -if test x"$ac_cv_have_decl_fork" = xyes \ - -a x"$ac_cv_have_decl_wait" = xyes; then \ - axiom_c_runtime="$axiom_c_runtime terminal_io" - axiom_src_all="$axiom_src_all all-sman all-clef" - axiom_src_subdirs="$axiom_src_subdirs clef sman" - OPENAXIOM_MAKEFILE([src/clef/Makefile]) - OPENAXIOM_MAKEFILE([src/sman/Makefile]) -else - axiom_use_sman=0 - AC_MSG_NOTICE([Superman component is disabled.]) -fi - -AC_DEFINE_UNQUOTED([OPENAXIOM_USE_SMAN], [$axiom_use_sman], - [Whether to use the session manager as driver.]) - -axiom_src_all="all-input $axiom_src_all" - -@ - - -\subsection{Graphics} - -\subsubsection{Where is X11?} - -One of the thorniest issues with programs that use the X Window System -is portability. There exist many implementations of the X11 -specification, each with its own variations, extensions, and what -not. Designing hand-written makefiles for such programs can be a -daunting task, fraut with all kinds of traps. Fortunately, \Tool{Autoconf} -provides us with some help, namely the macro [[AC_PATH_X]] and -[[AC_PATH_XTRA]]. The former searches the directories where the -X11 include files and the library files reside. The latter is an -enhanced version that -\begin{itemize} -\item computes the C compiler flags required by X11; -\item computes the linker flags required by X11; -\item checks for special libraries that some systems need in order to - compile X11 programs; -\item checks for special X11R6 libraries that need to be linked before - the flag [[-lX11]]. -\end{itemize} - -<<C headers and libraries>>= -AC_PATH_XTRA -## Output directives for the C compiler -AC_SUBST(X_CLFAGS) -## Output directives for the linker -AC_SUBST(X_LIBS) -## Output any extra libraries required by X11 -AC_SUBST(X_EXTRA_LIBS) - -## Finally, output the list of libraries that need to appear before -lX11 -## Some part of OpenAxiom depends on Xpm. That library has kind uncertain -## future. At some point in the past, it was deprecated, to be -## replaced by xpm-nox; then came back again. So, its support may -## vary from system to system. For the moment, we assume that if X11 -## is found then, Xpm is already present. Though, clearly that is a -## very optimistic assumption. Long term, OpenAxiom should get rid of -## dependence on Xpm. A nearly fool-proof test would be probably -## inspired by AC_PATH_XTRA. I don't have time to get to that -## complication right now. Will fix later. -X_PRE_LIBS="-lXpm $X_PRE_LIBS" -AC_SUBST(X_PRE_LIBS) - -## If the system supports X11, then build graphics - -# Check for Qt utilities. -AC_CHECK_PROGS([OA_QT_MOC], [moc]) -AC_CHECK_PROGS([OA_QT_QMAKE], [qmake]) -if test -n "$OA_QT_MOC"; then - AC_MSG_CHECKING([Qt version]) - oa_qt_version=`"$OA_QT_MOC" -v 2>&1 | sed -e 's/^.*(\(.*\))$/\1/'` - AC_MSG_RESULT([$oa_qt_version]) - case $oa_qt_version in - *[1-3]\.[0-9]+\.[0-9]+) - AC_MSG_WARN([This version of Qt is too old for OpenAxiom.]) - ;; - esac -fi - -axiom_use_x=no -if test -z $no_x; then - axiom_use_x=yes - axiom_c_runtime="$axiom_c_runtime graphics" - axiom_src_all="$axiom_src_all all-graph" - axiom_src_subdirs="$axiom_src_subdirs graph" - OPENAXIOM_MAKEFILE([src/graph/Makefile]) - OPENAXIOM_MAKEFILE([src/graph/Gdraws/Makefile]) - OPENAXIOM_MAKEFILE([src/graph/view2D/Makefile]) - OPENAXIOM_MAKEFILE([src/graph/view3D/Makefile]) - OPENAXIOM_MAKEFILE([src/graph/viewAlone/Makefile]) - OPENAXIOM_MAKEFILE([src/graph/viewman/Makefile]) -else - AC_MSG_NOTICE([The Garphics component is disabled.]) -fi -AC_SUBST(axiom_src_all) -AC_SUBST(axiom_use_x) -@ - -\subsubsection{HyperDoc} - -The HyperDoc component needs string pattern matching. -We require [[<regex.h>]], with POSIX-conformant definition. We used -to key build of HyperDoc component on the availability of X11 -functionalities. That, however, is a severe restriction. Not all -of the HyperDoc components need X11. Some, such as [[htadd]], don't -need X11 at all. Therefore we have lifted part of the restrictions. -See \File{src/hyper/Makefile} for more details. Note that is we don't -build the HyperDoc component, the compilation of algebra files are -drawn in [[Unexpected HT command]] noise. -<<C headers and libraries>>= -openaxiom_host_has_regex= -AC_CHECK_HEADER([regex.h], - [openaxiom_host_has_regex=yes], - [openaxiom_host_has_regex=no]) -AC_SUBST(openaxiom_host_has_regex) -@ - - \subsection{Lisp runtime} \subsubsection{Runtime checking} -\Tool{OpenAxiom}'s Lisp runtime platform may be instructed to perform -runtime checks. This may be useful when chasing Heinsenbugs. -It probably should be the default mode on development or experimental -branches. -<<runtime checking>>= -@ - - \Tool{GCL} relies on the libirary \Tool{BFD}, the include headers of which may not exist (quite common). In order to avoid \Tool{GCL} build failure, we test for the existence of [[<bfd.h>]] @@ -789,13 +497,9 @@ OPENAXIOM_HOST_PROGS axiom_src_subdirs="lib hyper lisp boot interp share algebra input etc doc" AC_SUBST(axiom_src_subdirs) -<<runtime checking>> - -# FIXME: Move this out of here. -axiom_c_runtime= -AC_SUBST(axiom_c_runtime) - -<<C headers and libraries>> +OPENAXIOM_CHECK_CORE_SUPPORT +OPENAXIOM_CHECK_IO +OPENAXIOM_CHECK_GRAPHICS <<platform specific bits>> OPENAXIOM_FFI_TYPE_TABLE |