diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 202 |
1 files changed, 3 insertions, 199 deletions
diff --git a/configure.ac b/configure.ac index 08d53b64..aeab63d1 100644 --- a/configure.ac +++ b/configure.ac @@ -42,205 +42,9 @@ OPENAXIOM_HOST_PROGS axiom_src_subdirs="lib hyper lisp boot interp share algebra input etc doc" AC_SUBST(axiom_src_subdirs) - - -# FIXME: Move this out of here. -axiom_c_runtime= -AC_SUBST(axiom_c_runtime) - -AC_CHECK_HEADERS([signal.h], - [], - [AC_MSG_ERROR([OpenAxiom needs signal support.])]) -AC_CHECK_DECLS([sigaction], [], [], - [#include <signal.h>]) -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>]) -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])]) - -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" - -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) -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) +OPENAXIOM_CHECK_CORE_SUPPORT +OPENAXIOM_CHECK_IO +OPENAXIOM_CHECK_GRAPHICS axiom_host_has_libbfd= ## Check for these only if we are going to build GCL from source. |