dnl SXEmacs config script for autoconf >=2.60 dnl ------------------------------------------------------------------------- dnl Overrides of standard autoconf macros. m4_include([sxemacs_version.m4]) dnl ------------------------------------------------------------------------- dnl Autoconf startup. dnl ------------------------------------------------------------------------- AC_PREREQ([2.62]) AC_INIT([SXEmacs], [SXEM4CS_VERSION], [http://issues.sxemacs.org/]) AC_CONFIG_HEADER([src/config.h]) AC_CONFIG_SRCDIR([src/lisp.h]) AC_CONFIG_AUX_DIR([.]) AC_CONFIG_MACRO_DIR([m4]) dnl ------------------------------------------------------------------------- dnl Local copyright notices. dnl ------------------------------------------------------------------------- AC_COPYRIGHT( [#### Configuration script for SXEmacs. Largely divergent from FSF. #### Guess values for system-dependent variables and create Makefiles. #### Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. #### Copyright (C) 1993-1995 Board of Trustees, University of Illinois. #### Copyright (C) 1996, 1997 Sun Microsystems, Inc. #### Copyright (C) 1995, 1996, 2002, 2003, 2004 Ben Wing. #### Copyright (C) 2000, 2001 Martin Buchholz. #### Copyright (C) 1998, 1999 J. Kean Johnston. #### Copyright (C) 2005 Malcolm Purvis. #### Copyright (C) 2005, 2006, 2007 Steve Youngs. #### Copyright (C) 2006, 2007, 2008 Sebastian Freundt. #### Copyright (C) 2007, 2010, 2011, 2012 Nelson Ferreira ### Don't edit this script! ### This script was automatically generated by the `autoconf' program ### from the file `./configure.ac'. ### To rebuild it, execute the command ### autoconf ### in the this directory. ### This file is part of SXEmacs. ### SXEmacs is free software: you can redistribute it and/or modify ### it under the terms of the GNU General Public License as published by ### the Free Software Foundation, either version 3 of the License, or ### (at your option) any later version. ### SXEmacs is distributed in the hope that it will be useful, ### but WITHOUT ANY WARRANTY; without even the implied warranty of ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ### GNU General Public License for more details. ### You should have received a copy of the GNU General Public License ### along with this program. If not, see . ### Parts of SXEmacs are also distributed under a BSD-like licence. ### Check file headers for more information. ### For usage, run `./configure --help' ### For more detailed information on building and installing SXEmacs, ### read the file `INSTALL'. ### ### If configure succeeds, it leaves its status in config.status. ### A log of configuration tests can be found in config.log. ### If configure fails after disturbing the status quo, ### config.status is removed. ]) AC_REVISION([SXEM4CS_GIT_VERSION]) dnl Build Options dnl ============= OG_OPTION_GROUP(Build Options) OG_ARG_WITH([prefix], AS_HELP_STRING([--with-prefix@<:@=ARG@:>@], [Whether to compile the value of --prefix into the executable.]), [yes], [YES (DO compile prefix into the executable)]) OG_ARG_WITH([sitemoduledir], AS_HELP_STRING([--with-sitemoduledir=DIR], [Directory for loadable modules that are not part of the SXEmacs core distribution (3rd party emodules).]), [none], [$prefix/lib/sxemacs/$build/site-modules], [og_any], [AC_DEFINE([SITEMODULEDIR_USER_DEFINED], [1], [sitemoduledir has been specified on the configure line.])], [with_sitemoduledir='${libdir}/${PROGNAME}/${configuration}/site-modules']) OG_ARG_WITH([site-includes], AS_HELP_STRING([--with-site-includes=PATH], [Colon separated list of _extra_ include directories to search for headers.]), [none], [None], [og_any]) OG_ARG_WITH([site-libraries], AS_HELP_STRING([--with-site-libraries=PATH], [Colon separated list of extra lib directories to search for libraries. (Default: None)]), [none], [None], [og_any]) OG_ARG_WITH([site-prefixes], AS_HELP_STRING([--with-site-prefixes=PATH], [Colon separated list of extra prefix directories to search for headers and libraries. Sometimes this can be used instead of specifying both --with-site-includes and --with-site-libraries.]), [none], [None], [og_any]) OG_ARG_WITH([lispdir], AS_HELP_STRING([--with-lispdir=DIR], [Where to install core lisp files.]), [none], [$prefix/lib/sxemacs-$version/lisp], [og_any], [AC_DEFINE([LISPDIR_USER_DEFINED], [1], [lispdir has been specified on the configure line.])], [with_lispdir='${datadir}/${instvardir}/lisp']) OG_ARG_WITH([archlibdir], AS_HELP_STRING([--with-archlibdir=DIR], [Directory for arch-dependent files.]), [none], [$prefix/lib/sxemacs-$version/$build], [og_any], [AC_DEFINE([ARCHLIBDIR_USER_DEFINED], [1], [archlibdir has been specified on the configure line.])], [with_archlibdir='${libdir}/${instvardir}/${configuration}']) OG_ARG_WITH([moduledir], AS_HELP_STRING([--with-moduledir=DIR], [Directory for loadable modules.]), [none], [$prefix/lib/sxemacs-$version/$build/modules], [og_any], [AC_DEFINE([MODULEDIR_USER_DEFINED], [1], [moduledir has been specified on the configure line.])], [with_moduledir='${libdir}/${instvardir}/${configuration}/modules']) OG_ARG_WITH([etcdir], AS_HELP_STRING([--with-etcdir=DIR], []), [none], [$prefix/lib/sxemacs-$version/etc], [og_any], [AC_DEFINE([ETCDIR_USER_DEFINED], [1], [etcdir has been specified on the configure line.])], [with_etcdir='${datadir}/${instvardir}/etc']) OG_ARG_WITH([infopath], AS_HELP_STRING([--with-infopath=PATH], [Colon separated list of directories to use as the info search path. This is not normally needed.]), [none], [None], [og_any], [AC_DEFINE([INFOPATH_USER_DEFINED], [1], [inforpath has been specified on the configure line.])], []) OG_ARG_WITH([docdir], AS_HELP_STRING([--with-docdir=DIR], [Where it store certain doc files (not info or man).]), [none], [$prefix/lib/sxemacs-$version/$build], [og_any], [AC_DEFINE([DOCDIR_USER_DEFINED], [1], [docdir has been specified on the configure line.])], [with_docdir='${archlibdir}']) OG_ARG_WITH([site-runtime-libraries], AS_HELP_STRING([--with-site-runtime-libraries=PATH], [Colon separated list of directories to search for libraries at run time. This isn't normally needed.]), [none], [None], [og_any]) OG_ARG_WITH([module-path], AS_HELP_STRING([--with-module-path=PATH], [Search path to the emodules directories. A colon separated list of directories. Normally, there is no need to set this.]), [none], [None], [og_any], [AC_DEFINE([MODULE_PATH_USER_DEFINED], [1], [module-path has been specified on the configure line.])], []) OG_ARG_WITH([package-prefix], AS_HELP_STRING([--with-package-prefix=PATH], [What to use as a prefix to the system-wide package directories. It doesn't affect the package directories under the user's home directory, and is totally ignored if --with-package-path is set. Normally, you would not need to set this.]), [none], [None], [og_any], [AC_DEFINE([PACKAGE_PREFIX_USER_DEFINED], [1], [package-prefix has been specified on the configure line.])], []) OG_ARG_WITH([package-path], AS_HELP_STRING([--with-package-path=PATH], [Search path to the package directories. This path is made up of 3 separate "path elements", each element is a colon separated list of directories, with the boundary between elements being a double colon. The 3 path elements are for "early", "late", and "last" package directories. If only a single element is specified it is "late". Example: early1:early2::late1:late2::last1:last2. Setting this overrides --with-package-prefix. Normally, there is no need to set this.]), [none], [None], [og_any], [AC_DEFINE([PACKAGE_PATH_USER_DEFINED], [1], [package-path has been specified on the configure line.])], []) dnl stupid option, innit? OG_ARG_WITH([quick-build], AS_HELP_STRING([--with-quick-build], [Speed up the build cycle by leaving out steps where SXEmacs will still work (more or less) without them. Potentially dangerous if you don't know what you're doing. This (1) doesn't garbage-collect after loading each file during dumping, (2) doesn't automatically rebuild the DOC file (remove it by hand to get it rebuilt), (3) Removes config.h lisp.h and associated files from the dependency lists so changes to these files don't automatically cause all .c files to be rebuilt.]), [no], [No], []) OG_ARG_WITH([compiler], AS_HELP_STRING([--with-compiler=COMPILER], [Do not use me! Use CC= instead! C compiler to use. Note: SXEmacs _CANNOT_ be built with a C++ compiler.]), [none], [None], [og_any], [ OG_WARN_OBSOLETE_OPTION([--with-compiler], [CC=])]) OG_ARG_WITH([cflags], AS_HELP_STRING([--with-cflags], [Do not use me! Use CFLAGS= instead! Compiler flags (such as -O); setting this overrides all default compiler flags except those that control warnings. Most people wouldn't need to set this.]), [none], [None], [og_any], [ OG_WARN_OBSOLETE_OPTION([--with-cflags], [CFLAGS=])]) OG_ARG_WITH([cflags-warning], AS_HELP_STRING([--with-cflags-warning], [Do not use me! I will disappear soon!]), [none], [None], [og_any]) OG_ARG_WITH([cpp], AS_HELP_STRING([--with-cpp], [Do not use me! Use CPP= instead!]), [none], [None], [og_any], [ OG_WARN_OBSOLETE_OPTION([--with-cpp], [CPP=]) CPP="$with_cpp"]) OG_ARG_WITH([cppflags], AS_HELP_STRING([--with-cppflags], [Do not use me! Use CPPFLAGS= instead!]), [none], [None], [og_any], [ OG_WARN_OBSOLETE_OPTION([--with-cppflags], [CPPFLAGS=]) CPPFLAGS="$with_cppflags"]) OG_ARG_WITH([libs], AS_HELP_STRING([--with-libs], [Do not use me! Use LIBS= instead!]), [none], [None], [og_any], [ OG_WARN_OBSOLETE_OPTION([--with-libs], [LIBS=]) LIBS="$with_libs"]) OG_ARG_WITH([ldflags], AS_HELP_STRING([--with-ldflags], [Do not use me! Use LDFLAGS= instead!]), [none], [None], [og_any], [ OG_WARN_OBSOLETE_OPTION([--with-ldflags], [LDFLAGS=]) LDFLAGS="$with_ldflags"]) OG_ARG_WITH([ridiculously-aggressive-optimisations], AS_HELP_STRING([--with-ridiculously-aggressive-optimisations], [Whether to try all possible optimisations]), [no], [No]) OG_ARG_WITH([maximum-warning-output], AS_HELP_STRING([--with-maximum-warning-output], [Whether to output as many warnings as possible]), [no], [No]) dnl Internal Options dnl ================ OG_OPTION_GROUP(Internal Options) OG_ARG_WITH([dynamic], AS_HELP_STRING([--with-dynamic], [Link dynamically if supported by system. 'NO' forces static linking.]), [auto], [Autodetect]) OG_ARG_WITH([rel-alloc], AS_HELP_STRING([--with-rel-alloc], [Relocating allocator for buffers.]), [default], [Autodetect]) OG_ARG_WITH([dlmalloc], AS_HELP_STRING([--with-dlmalloc], [Use Doug Lea's malloc.]), [default], [Autodetect]) OG_ARG_WITH([debug-malloc], AS_HELP_STRING([--with-debug-malloc], [Use a debugging malloc.]), [no], [NO]) OG_ARG_WITH([system-malloc], AS_HELP_STRING([--with-system-malloc], [Use a system malloc instead of GNU.]), [default], [YES if using quantify or purify; NO otherwise]) OG_ARG_WITH([regex-malloc], AS_HELP_STRING([--with-regex-malloc], [Use malloc for regex failure stack.]), [yes], [YES]) OG_ARG_WITH([ffi], AS_HELP_STRING([--with-ffi], [Compile in experimental support for Foreign Function Interface.]), [yes], [YES]) OG_ARG_WITH([module-support], AS_HELP_STRING([--with-module-support], [Compile in experimental support for dynamically loaded libraries (Dynamic Shared Objects).]), [yes], [YES if shared libraries are supported]) OG_MULTIARG_WITH([modules], [dnl AS_HELP_STRING([--with-modules], [ Which modules to compile and install.])], [all], [all], [dnl OG_MULTIARG_ITEM([ase], [ase], [algebraic structures]) OG_MULTIARG_ITEM([cl], [cl], [fast Common Lisp implementation]) ]) dnl OG_MULTIARG_ITEM([dbus], [dbus], [D-BUS bindings]) OG_MULTIARG_WITH([static-modules], [dnl AS_HELP_STRING([--with-static-modules], [ Which modules to compile as archives to link their functionality statically into the SXEmacs binary.]) AS_HELP_STRING([], [ You should regard this as a proof of concept.])], [none], [NONE], [dnl OG_MULTIARG_ITEM([ase], [ase], [algebraic structures]) OG_MULTIARG_ITEM([cl], [cl], [fast Common Lisp implementation]) ]) dnl OG_MULTIARG_ITEM([dbus], [dbus], [D-BUS bindings]) OG_MULTIARG_WITH([ent], [dnl AS_HELP_STRING([--with-ent], [ Compile in support for enhanced number types, using internal and external libraries.])], [none int fpfloat indef gmp], [int fpfloat indef gmp], [dnl OG_MULTIARG_ITEM([int], [int], [native integer arithmetics]) OG_MULTIARG_ITEM([fpfloat], [fpfloat], [native fixed precision floats]) OG_MULTIARG_ITEM([indef], [indef], [native abstract indefinites]) OG_MULTIARG_ITEM([gmp], [GMP], [GNU multiprecision library]) OG_MULTIARG_ITEM([mpfr], [MPFR], [Multiprecision Floats with correct Rounding]) OG_MULTIARG_ITEM([mpc], [MPC], [Multiprecision Complex numbers (C/R)]) OG_MULTIARG_ITEM([pseug], [pseudoG], [native Gaussian Numbers (Z+Z)]) OG_MULTIARG_ITEM([pseuc], [pseudoC], [native Complex Numbers (C/R)]) OG_MULTIARG_ITEM([quatern], [Quaternions], [native Quaternions (Z+Z+Z+Z)]) OG_MULTIARG_ITEM([ecm], [ECM], [factorisations per Elliptic Curve Method]) OG_MULTIARG_MUTEX([mpz], [Arbitrary precision integers], [gmp mp]) OG_MULTIARG_MUTEX([complex], [Complex numbers as in C/R], [mpc pseuc]) ]) OG_MULTIARG_WITH([ase], [dnl AS_HELP_STRING([--with-ase], [ Compile in support for algebraic structures based on ENT, using internal and external libraries.])], [none], [none], [dnl OG_MULTIARG_ITEM([cart], [cartesian], [Cartesian Products of ENT and ASE objects]) OG_MULTIARG_ITEM([dig], [digraph], [Directed 2-ary Graphs with Colours]) OG_MULTIARG_ITEM([intv], [interval], [Intervals of comparable or normed ENT and ASE objects]) OG_MULTIARG_ITEM([metric], [metric], [Metric Spaces]) OG_MULTIARG_ITEM([nbhood], [neighbourhood], [Neighbourhoods of comparable or normed ENT and ASE objects]) OG_MULTIARG_ITEM([perm], [permutation], [Permutations]) OG_MULTIARG_ITEM([resclass], [resclass], [Residue Class Rings and Classes]) ]) OG_ARG_WITH([compre], AS_HELP_STRING([--with-compre],[ Provide exhaustive caching of compiled regexps. This will mean that frequently used regexps will be faster to use since the compile step will not be needed after first use.]), [yes], [By default do cache compiled regexps.]) OG_MULTIARG_WITH([experimental-features], [dnl AS_HELP_STRING([--with-experimental-features], [ Activate experimental code, that is code which is considered useful but whose effects in conjunction with the variety of elisp projects cannot be foreseen.]) AS_HELP_STRING([], [ During the beta phase of SXEmacs all experimental code will be unconditionally enabled. However, if you plan to use this SXEmacs in a production environment you can switch off some portions.])], [all nobdwgc], [ALL but bdwgc], [dnl OG_MULTIARG_ITEM([bdwgc], [bdwgc], [the Boehm-Demers-Weiser collector]) OG_MULTIARG_ITEM([asyneq], [asyneq], [asynchronous event queues]) ]) dnl stop that pom stuff dnl OG_MULTIARG_ITEM([pom], [pom], [thread-safe objects]) OG_ARG_WITH([event-driver], AS_HELP_STRING([--with-event-driver], [ Which event routines to use. Events control the way how external `sources' are incorporated into SXEmacs. Sources hereby are user inputs, such as key strokes, mouse moves, pedalling, slapping the monitor, etc.; but there are manifold further sources, such as process signals, data on a socket, focussing an X window, lapsing a timeout, and so forth.]) AS_HELP_STRING([], [ An event driver can cope with all (or most) of these in a uniform and abstract way. SXEmacs can either be driven using its built-in event handlers, or using one of the external systems.]), [auto], [Autodetect], [auto built-in libevent liboop glib]) dnl Debugging Options dnl ================ OG_OPTION_GROUP(Debugging Options) OG_ARG_WITH([debug], AS_HELP_STRING([--with-debug], [Compile with extra debugging code. This will turn on: --with-assertions and --with-memory-usage-stats.]), [yes], [YES for beta; NO for release]) OG_ARG_WITH([memory-usage-stats], AS_HELP_STRING([--with-memory-usage-stats], [Compile with support for statistics about memory usage at runtime.]), [yes], [YES for beta]) OG_MULTIARG_WITH([error-checking], [dnl AS_HELP_STRING([--with-error-checking=TYPE], [ Compile with internal error-checking added.]) AS_HELP_STRING([], [ WARNING: Causes noticeable loss of speed!])], [all], [ALL for beta; NONE otherwise], [dnl OG_MULTIARG_ITEM([extents], [extents], [checks on extents]) OG_MULTIARG_ITEM([types], [types], [checks on types]) OG_MULTIARG_ITEM([gc], [gc], [checks on garbage collection]) OG_MULTIARG_ITEM([malloc], [malloc], [checks on memory allocation]) OG_MULTIARG_ITEM([byte_code], [byte_code], [checks on byte compiled code]) OG_MULTIARG_ITEM([bufpos], [bufpos], [checks on buffer position]) OG_MULTIARG_ITEM([glyphs], [glyphs], [checks on glyph data]) OG_MULTIARG_ITEM([stack], [stack], [checks on stack barriers]) OG_MULTIARG_ITEM([malldbg], [malldbg], [malloc debugging code]) ]) OG_ARG_WITH([purify], AS_HELP_STRING([--with-purify], [Add support for memory debugging using Purify.]), [no], [NO]) OG_ARG_WITH([quantify], AS_HELP_STRING([--with-quantify], [Add support for performance debugging using Quantify.]), [no], [NO]) dnl Window System Features dnl ====================== OG_OPTION_GROUP(Window System Features) OG_ARG_WITH([toolbars], AS_HELP_STRING([--with-toolbars], [Compile in toolbar support.]), [yes], [YES]) OG_ARG_WITH([external-widget], AS_HELP_STRING([--with-external-widget], [Enable the "external widget" interface, which allows a SXEmacs frame to appear as a widget in another application. To date, we haven't heard of anyone who has actually done this. Consider this EXPERIMENTAL.]), [no], [NO]) OG_ARG_WITH([menubars], AS_HELP_STRING([--with-menubars=TYPE], [Type of menubars to use. The Lucid menubars emulate Motif (mostly) but are faster.]), [lucid], [Lucid], [lucid no]) OG_ARG_WITH([scrollbars], AS_HELP_STRING([--with-scrollbars=TYPE], [Type of scrollbars to use. *WARNING* The Motif scrollbars are currently broken.]), [lucid], [Lucid], [lucid motif athena no]) OG_ARG_WITH([dialogs], AS_HELP_STRING([--with-dialogs=TYPE], [Type of dialog boxes to use. Athena dialogs will be used if Athena can be found.]), [athena], [], [athena motif no]) OG_ARG_WITH([widgets], AS_HELP_STRING([--with-widgets=TYPE], [Type of native widgets to use. Athena widgets will be used if Athena can be found.]), [athena], [], [athena motif no]) OG_ARG_WITH([athena], AS_HELP_STRING([--with-athena=TYPE], [Type of Athena widgets to use.]), [auto], [Autodetect], [auto xaw 3d next 95 xpm no]) OG_ARG_WITH([xim], AS_HELP_STRING([--with-xim], [Type of Mule input method to use.]), [auto], [Autodetect], [yes no xlib motif]) OG_ARG_WITH([wmcommand], AS_HELP_STRING([--with-wmcommand], [Compile with realized leader window which will keep the WM_COMMAND property.]), [yes], [YES]) OG_ARG_WITH([xmu], AS_HELP_STRING([--with-xmu], [For those unfortunates whose vendors don't ship Xmu.]), [auto], [Autodetect]) OG_ARG_WITH([xfs], AS_HELP_STRING([--with-xfs], [Compile with XFontSet support for internationalized menubar. Incompatible with `--with-xim=motif'. `--with-menubars=lucid' (the default) is desirable.]), [no], [NO]) dnl TTY Options dnl ================ OG_OPTION_GROUP(TTY options) OG_ARG_WITH([tty], AS_HELP_STRING([--with-tty], [Add support for ttys.]), [auto], [Autodetect]) OG_ARG_WITH([ncurses], AS_HELP_STRING([--with-ncurses], [Use the ncurses library for tty support.]), [auto], [Autodetect]) OG_ARG_WITH([curses], AS_HELP_STRING([--with-curses], [Use the curses library for tty support.]), [auto], [Autodetect]) OG_ARG_WITH([terminfo], AS_HELP_STRING([--with-terminfo], [Use the terminfo library for tty support.]), [auto], [Autodetect]) OG_ARG_WITH([tinfo], AS_HELP_STRING([--with-tinfo], [Use the ncurses tinfo library for tty support.]), [auto], [Autodetect]) OG_ARG_WITH([termlib], AS_HELP_STRING([--with-termlib], [Use the termlib library for tty support.]), [auto], [Autodetect]) OG_ARG_WITH([termcap], AS_HELP_STRING([--with-termcap], [Use the termcap library for tty support.]), [auto], [Autodetect]) OG_ARG_WITH([builtin-tty], AS_HELP_STRING([--with-builtin-tty], [Use builtin termcap like code. LEGACY CODE. Please consider installing ncurses. Requires /etc/termcap or TERMCAP environment variable to work.]), [no], [No]) OG_ARG_WITH([gpm], AS_HELP_STRING([--with-gpm], [Compile in GPM mouse support for ttys.]), [auto], [Autodetect]) dnl Database Options dnl ================ OG_OPTION_GROUP(Database options) OG_MULTIARG_WITH([database], [dnl AS_HELP_STRING([--with-database=TYPE], [Compile with database support.])], [auto], [Autodetect], [dnl OG_MULTIARG_ITEM([berkdb], [berkdb], [Berkeley DB support]) OG_MULTIARG_ITEM([dbm], [dbm], [DBM database support]) OG_MULTIARG_ITEM([gdbm], [gdbm], [GNU DBM support]) ]) OG_ARG_WITH([ldap], AS_HELP_STRING([--with-ldap], [Compile with support for the LDAP protocol.]), [no], [NO]) OG_ARG_WITH([postgresql], AS_HELP_STRING([--with-postgresql], [Compile with support for the PostgreSQL RDBMS.]), [yes], [Autodetect]) dnl Multimedia Options dnl ================== OG_OPTION_GROUP(Multimedia options) OG_MULTIARG_WITH([image], [dnl AS_HELP_STRING([--with-image=TYPE], [Compile with image support.])], [auto], [Autodetect all image support], [dnl OG_MULTIARG_ITEM([gif], [GIF], [GIF image format]) OG_MULTIARG_ITEM([xpm], [XPM], [X PixMap image format]) OG_MULTIARG_ITEM([png], [PNG], [Portable Network Graphic format]) OG_MULTIARG_ITEM([jpeg], [JPEG], [jpeg image format]) OG_MULTIARG_ITEM([tiff], [TIFF], [TIFF image format]) OG_MULTIARG_ITEM([xface], [xface], [base64 encoded xbm]) ]) OG_MULTIARG_WITH([sound], [dnl AS_HELP_STRING([--with-sound=TYPE], [Compile with sound support.])], [auto], [Autodetect all sound support], [dnl OG_MULTIARG_ITEM([alsa], [ALSA], [kernel-based linux sound standard]) OG_MULTIARG_ITEM([ao], [ao], [generic audio output layer]) OG_MULTIARG_ITEM([esd], [ESD], [Enlightenment Sound Daemon]) OG_MULTIARG_ITEM([jack], [Jack], [a low-latency audio server]) OG_MULTIARG_ITEM([nas], [NAS], [Network Audio System]) OG_MULTIARG_ITEM([oss], [OSS], [Open Sound System]) OG_MULTIARG_ITEM([pulse], [PulseAudio], [PulseAudio Sound Server]) ]) OG_MULTIARG_WITH([media], [dnl AS_HELP_STRING([--with-media=TYPE], [Compile with media stream support.])], [auto], [Autodetect all media stream support libraries], [dnl OG_MULTIARG_ITEM([ffmpeg], [FFmpeg], [media streams handled by ffmpeg]) OG_MULTIARG_ITEM([internal], [internal], [media streams handled internally]) OG_MULTIARG_ITEM([mad], [Mad], [media streams handled by mad]) OG_MULTIARG_ITEM([sndfile], [sndfile], [media streams handled by sndfile]) OG_MULTIARG_ITEM([sox], [SoX], [media streams handled by sox]) OG_MULTIARG_ITEM([magic], [magic], [file/libmagic support]) ]) dnl Cryptography Options dnl ==================== OG_OPTION_GROUP(Cryptography options) OG_ARG_WITH([openssl], AS_HELP_STRING([--with-openssl], [Compile in experimental support for OpenSSL libcrypto and libssl.]), [yes], [YES]) OG_ARG_WITH([gnutls], AS_HELP_STRING([--with-gnutls], [Compile in experimental support for GnuTLS transport security.]), [no], [NO]) dnl Networking Options dnl ================== OG_OPTION_GROUP(Networking options) OG_ARG_WITH([dnet], AS_HELP_STRING([--with-dnet], [Compile with support for DECnet.]), [no], [NO]) OG_ARG_WITH([socks], AS_HELP_STRING([--with-socks], [Compile with support for SOCKS (an Internet proxy).]), [auto], [Autodetect]) OG_ARG_WITH([ipv6-cname], AS_HELP_STRING([--with-ipv6-cname], [Try IPv6 information first when canonicalizing host names. This option has no effect unless system supports getaddrinfo(3) and getnameinfo(3).]), [no], [NO]) OG_ARG_WITH([pop], AS_HELP_STRING([--with-pop], [Support POP for mail retrieval.]), [no], [NO]) OG_ARG_WITH([kerberos], AS_HELP_STRING([--with-kerberos], [Support Kerberos-authenticated POP.]), [no], [NO]) OG_ARG_WITH([hesiod], AS_HELP_STRING([--with-hesiod], [Support Hesiod to get the POP server host.]), [no], [NO]) dnl File-related Options dnl ==================== OG_OPTION_GROUP(File-related options) OG_ARG_WITH([clash-detection], AS_HELP_STRING([--with-clash-detection], [Use lock files to detect multiple edits of the same file.]), [no], [NO]) OG_ARG_WITH([mail-locking], AS_HELP_STRING([--with-mail-locking=TYPE], [Specify the locking to be used by movemail to prevent concurrent updates of mail spool files. Valid types are `lockf' `flock' `file' `locking' `pop' or `mmdf'.]), [auto], [Autodetect], [lockf flock file locking mmdf pop no]) dnl Internationalisation Options dnl ============================ OG_OPTION_GROUP(Internationalisation options) OG_ARG_WITH([mule], AS_HELP_STRING([--with-mule], [Compile with Mule (MUlti-Lingual Emacs) support needed to support non-Latin-1 (including Asian) languages.]), [yes], [YES]) OG_ARG_WITH([canna], AS_HELP_STRING([--with-canna], [Compile with support for Canna (a Japanese input method used in conjunction with Mule support).]), [auto], [Autodetect when Mule is enabled]) OG_ARG_WITH([wnn], AS_HELP_STRING([--with-wnn], [Compile with support for Wnn (a multi-language input method used in conjunction with Mule support).]), [auto], [Autodetect when Mule is enabled]) OG_ARG_WITH([wnn6], AS_HELP_STRING([--with-wnn6], [Compile with support for the commercial package Wnn6.]), [auto], [Autodetect when Mule is enabled]) dnl dnl Other Options dnl dnl ============= dnl OG_OPTION_GROUP(Other options) dnl ## ------------------------------------------------------------------------- ## Check for users who regularly forget about running autoconf ## ------------------------------------------------------------------------- AS_IF([test -f "$0.ac" -a "$0.ac" -nt "$0"], AC_MSG_ERROR([What are you doing? RUN autoreconf NOW!!!])) # # Turn off core generation. We are already verifying the program fails, no need # poluting the workspace. Of course if you are a SXEmacs developer you may want # to comment this on occasion :-) ulimit -c 0 ## initialise our nestable msg funs SXE_INIT_MSG_LEVEL AC_PROG_SED AC_PROG_AWK ECHO=echo dnl Small snippet to make echo -n work on solaris ECHO_N= ECHO_C= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ;; *) ECHO_C='\c' ;; esac ;; *) ECHO_N='-n' ;; esac echo echo "Preparing the build chain" echo "=========================" ## We should brag about ourselves, no? AC_DEFINE([XEMACS], [1], [Pretend to be an XEmacs]) AC_DEFINE([SXEMACS], [1], [Why not? It's the truth!]) dnl ------------------------------------------------------------------------- dnl Command line argument processing. dnl ------------------------------------------------------------------------- dnl Check for bogus options dnl ------------------------------------------------------------------------- SXE_CHECK_COMMAND_LINE test -z "$AUTOMAKE" || AUTOMAKE=automake AM_INIT_AUTOMAKE(m4_esyscmd([ automake_ver=`$AUTOMAKE --version 2>/dev/null | head -n1` automake_major=`echo "$automake_ver" | sed -e 's/^.* \([0-9]*\).*/\1/'` automake_minor=`echo "$automake_ver" | sed -e 's/^.* [0-9]*\.\([0-9]*\).*/\1/'` if test "$automake_major" = "1" -a "$automake_minor" -lt "14" then echo "foreign -Wall" else echo "info-in-builddir foreign -Wall" fi])) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES]) SXE_CHECK_BUILDCHAIN AC_SUBST(EGREP) progname=$0 progbasename=$(basename $progname) progdirname=$(dirname $progname) ## Build Options ## ============= echo echo "Build and System Specific Options" echo "=================================" SXE_EXPLORE_BUILD_ENVIRONMENT dnl ---------------------------------------- dnl Find out which version of SXEmacs this is dnl ---------------------------------------- AC_CHECK_PROG([have_git], [git], [yes], [no]) AC_MSG_CHECKING([for SXEmacs version]) AC_MSG_RESULT([SXEmacs SXEM4CS_VERSION]) dnl Must do the following first to determine verbosity for AC_DEFINE AS_IF([test -n "[]SXEM4CS_BETA_P[]"],beta=yes,beta=no) : "${extra_verbose=$beta}" AC_MSG_CHECKING([for SXEmacs patchlevel]) CURDIR=$(pwd) cd "$sxe_srcdir" AS_IF([test "$have_git" = "yes"], [sxemacs_git_version=`git describe 2> /dev/null | head -1`]) AS_IF([test -z "$sxemacs_git_version"], sxemacs_git_version="[]SXEM4CS_GIT_VERSION[]") AC_MSG_RESULT([$sxemacs_git_version]) version="$sxemacs_git_version" cd "$CURDIR" main_version="$sxemacs_git_version" AC_DEFINE_UNQUOTED([EMACS_MAJOR_VERSION], [SXEM4CS_MAJOR_VERSION], [Description here!]) AC_DEFINE_UNQUOTED([EMACS_MINOR_VERSION], [SXEM4CS_MINOR_VERSION], [Description here!]) old_version=[]SXEM4CS_VERSION[] if test -n "[]SXEM4CS_BETA_VERSION[]"; then AC_MSG_CHECKING([if we are a beta version]) if test "$beta" = "yes"; then AC_MSG_RESULT([yes]) AC_DEFINE_UNQUOTED([EMACS_BETA_VERSION], [SXEM4CS_BETA_VERSION], [Description here!]) else AC_MSG_RESULT([no]) AC_DEFINE_UNQUOTED([EMACS_PATCH_LEVEL], [SXEM4CS_BETA_VERSION], [Description here!]) fi fi AC_DEFINE_UNQUOTED([SXEMACS_CODENAME], ["[]SXEM4CS_CODENAME[]"], [Description here!]) AC_DEFINE_UNQUOTED([EMACS_VERSION], ["$version"], [Description here!]) AC_DEFINE_UNQUOTED([SXEMACS_GIT_VERSION], ["$sxemacs_git_version"], [Description here!]) PROGNAME=sxemacs AC_DEFINE_UNQUOTED([EMACS_PROGNAME], ["$PROGNAME"], [Description here!]) ## build stuff in lib-src unconditionally SXE_APPEND([lib-src], [MAKE_SUBDIR]) SXE_APPEND([lib-src], [INSTALL_ARCH_DEP_SUBDIR]) ## C compiler build chain AC_USE_SYSTEM_EXTENSIONS AC_LANG([C]) AS_MESSAGE([Let's look for the entire C build chain]) SXE_CHECK_CC SXE_CHECK_CFLAGS m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) ## check machine chars AS_MESSAGE([Let's have a detailed glance at your machine]) SXE_PROC_CPUID SXE_PROC_VENDORID SXE_NPROCESSORS SXE_CHECK_PROC_GOODNESS ## Debugging Options ## ================= ## echo ## echo "Debugging Options" ## echo "=================" dnl ---------------------------------- dnl Error checking and debugging flags dnl ---------------------------------- dnl Error checking default to "yes" in beta versions, to "no" in releases. dnl Same goes for --enable-debug and --extra-verbosity. if test "$with_error_checking_extents" = yes; then have_error_checking_extents="yes" AC_DEFINE([ERROR_CHECK_EXTENTS], [1], [Description here!]) AC_DEFINE([USE_ASSERTIONS], [1], [Description here!]) fi if test "$with_error_checking_types" = yes; then have_error_checking_types="yes" AC_DEFINE([ERROR_CHECK_TYPECHECK], [1], [Description here!]) AC_DEFINE_UNQUOTED([type_checking_assert(assertion)], [assert (assertion)], [ Make sure that all X... macros are dereferencing the correct type, and that all XSET... macros (as much as possible) are setting the correct type of structure. Highly recommended for all development work.]) AC_DEFINE([USE_ASSERTIONS], [1], [Description here!]) else AC_DEFINE_UNQUOTED([type_checking_assert(assertion)], [], []) fi if test "$with_error_checking_bufpos" = yes; then have_error_checking_bufpos="yes" AC_DEFINE([ERROR_CHECK_BUFPOS], [1], [Description here!]) AC_DEFINE_UNQUOTED([bufpos_checking_assert(assertion)], [assert (assertion)], [dnl Make sure valid buffer positions are passed to BUF_* macros]) AC_DEFINE([USE_ASSERTIONS], [1], [Description here!]) else AC_DEFINE_UNQUOTED([bufpos_checking_assert(assertion)], [], []) fi if test "$with_error_checking_gc" = yes; then have_error_checking_gc="yes" AC_DEFINE([ERROR_CHECK_GC], [1], [Description here!]) AC_DEFINE_UNQUOTED([gc_checking_assert(assertion)], [assert (assertion)], [dnl Attempt to catch bugs related to garbage collection (e.g. not GCPRO'ing)]) AC_DEFINE([USE_ASSERTIONS], [1], [Description here!]) else AC_DEFINE_UNQUOTED([gc_checking_assert(assertion)], [], []) fi if test "$with_error_checking_malloc" = yes; then have_error_checking_malloc="yes" AC_DEFINE([ERROR_CHECK_MALLOC], [1], [Description here!]) AC_DEFINE([USE_ASSERTIONS], [1], [Description here!]) fi if test "$with_error_checking_byte_code" = yes; then have_error_checking_byte_code="yes" AC_DEFINE([ERROR_CHECK_BYTE_CODE], [1], [Description here!]) AC_DEFINE([USE_ASSERTIONS], [1], [Description here!]) fi if test "$with_error_checking_glyphs" = yes; then have_error_checking_glyphs="yes" AC_DEFINE([ERROR_CHECK_GLYPHS], [1], [Description here!]) AC_DEFINE([USE_ASSERTIONS], [1], [Description here!]) fi dnl enable_debug=yes must be set when error checking is present. This should be dnl fixed up. dnl with_debug implies other options if test "${with_debug:=$beta}" = "yes"; then with_memory_usage_stats=yes SXE_ADD_CRUFT_OBJS([debug.o]) SXE_ADD_CRUFT_OBJS([tests.o]) AC_DEFINE([DEBUG_SXEMACS], [1], [Description here!]) fi if test "$with_memory_usage_stats" = "yes"; then AC_DEFINE([MEMORY_USAGE_STATS], [1], [Description here!]) fi dnl -------------------------------------------------------------- dnl $opsys detection complete; defaults depending on $opsys follow dnl -------------------------------------------------------------- dnl -------------------------------------------------------------- dnl WooHoo! pdump is ON always and everywhere! --SY. dnl -------------------------------------------------------------- with_pdump=yes if test "$with_dynamic" != "no"; then case "$opsys" in hpux* | sunos4* ) with_dynamic=no ;; *) with_dynamic=yes ;; esac fi if test "$with_dynamic" = "yes"; then case "$opsys" in hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;; decosf* ) ld_call_shared="-call_shared" ;; darwin* ) AC_DEFINE([DLSYM_NEEDS_UNDERSCORE], [1], [Description here!]) if test "x$have_ld_no_pie" != "x"; then SXE_PREPEND_LINKER_FLAG([-no_pie], [ld_switch_site]) fi ;; esac else dnl "$with_dynamic" = "no" case "$opsys" in sol2 ) echo "Static linking is not supported on Solaris 2." echo "Rerun configure without specifying --without-dynamic." exit 1 ;; linux ) ld_call_shared="-Bstatic" ;; decosf* ) ld_call_shared="-non_shared" ;; darwin* ) AC_DEFINE([DLSYM_NEEDS_UNDERSCORE], [1], [Description here!]) if test "x$have_ld_no_pie" != "x"; then SXE_PREPEND_LINKER_FLAG([-no_pie], [ld_switch_site]) fi ;; esac fi dnl Tools configuration case "$opsys" in aix* ) NON_GNU_CC=xlc ;; dnl Use xlc by default on AIX darwin ) RANLIB="ranlib -c" ;; dnl Avoid link error in lwlib-config.c ## this needs rework I think because RANLIB is provided by LT_INIT anyway esac stack_trace_eye_catcher=\ `echo ${PROGNAME}_${version}_${ac_cv_build} | sed 'y!@/.-!____!'` AC_DEFINE_UNQUOTED([STACK_TRACE_EYE_CATCHER], [$stack_trace_eye_catcher], [Just a very looong string to make traces more readable.]) dnl -------------------------------------------------- dnl Determine the compiler, set up for feature testing dnl -------------------------------------------------- if test "$with_clash_detection" != "no"; then AC_DEFINE([CLASH_DETECTION], [1], [Description here!]) SXE_ADD_CRUFT_OBJS([filelock.o]) fi dnl what exactly do we determine here? and where is it used? dnl dnl Determine GCC version. dnl if test "$GCC" = "yes"; then dnl AC_RUN_IFELSE([AC_LANG_SOURCE([[ dnl int main () dnl { dnl #if __GNUC__ >= 3 dnl return 11; dnl #else dnl return 0; dnl #endif dnl }]])], [:], [dnl dnl case "$?" in dnl 11) dnl echo "You appear to be using GCC version 3 or above." dnl __GCC3=yes dnl ;; dnl esac], [__GCC3=no]) dnl fi dnl We don't do AC_PROG_CC for SXEMACS_CC; if we can't trust these people.... : ${SXEMACS_CC:="$CC"} dnl Figure out what C preprocessor to use. dnl On Sun systems, people sometimes set up the variable CPP dnl with a value that is a directory, not an executable at all. dnl Detect that case, and ignore that value. test -n "$CPP" -a -d "$CPP" && CPP= test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP" dnl -------------------------------------------------------------------- dnl Compiler feature macros dnl -------------------------------------------------------------------- dnl -------------------------------------------------------------------- dnl Extract some information from the operating system and machine files dnl -------------------------------------------------------------------- echo "Extracting information from the machine- and system-dependent headers..." SXE_CHECK_MACHARCH SXE_EXTRACT_MACHARCH_INFO dnl s&m files shouldn't be required to define anything, or even to exist. dnl So we default SYSTEM_TYPE to the obvious documented standard, `uname -s`, dnl appropriately emacsulated. if test -z "$system_type"; then AC_DEFINE_UNQUOTED([SYSTEM_TYPE], ["`uname -s | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`"], [Description here!]) fi dnl If the s&m files don't define a system-specific dumper, simply use pdump. dnl Sometime in the future, we'll remove all definitions of UNEXEC dnl from all the s&m files. test -z "$unexec" && with_pdump=yes if test "$with_pdump" = "yes"; then ordinary_link="yes" ld="${ordinary_ld}" start_files= libs_standard= unexec= lib_gcc= fi dnl dnl For debugging... dnl SXE_PRINT_VAR([libs_machine libs_system libs_termcap libs_standard dnl objects_machine objects_system c_switch_machine c_switch_system dnl ld_switch_machine ld_switch_system unexec ld_switch_shared dnl ld lib_gcc ld_text_start_addr start_files ordinary_link dnl have_terminfo mail_use_flock mail_use_lockf]) && echo "" dnl bitch at build attempt on win32 machines case "$opsys" in mingw* | cygwin*) SXE_DIE("Invalid operation system. Cannot build on win32 machines.") esac dnl Non-ordinary link usually requires -lc test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc" ## perform compiler specific things SXE_DO_CC_HACKS ## machine specific extensions SXE_CHECK_SIMD_EXTENSIONS ## some linker flags that might come in handy SXE_CHECK_LDFLAGS ## suffices to be defined late, for instance here SXE_CHECK_PARSER_LEXER if test "$with_pdump" != "yes"; then ## GNU ld now defaults to combreloc, which screws up unexec, ## but not pdump. ## Note that it's OK if the GNU style long option causes ## non-GNU ld to barf a usage message, that's often good ## enough. Please report it, though. ## #### Should make this Solaris-friendly. ## Link with -z nocombreloc for now. SXE_CHECK_LD_ZFLAG([nocombreloc]) if test "$sxe_cv_ld__z_nocombreloc" = "yes"; then SXE_PREPEND_LINKER_FLAG([-z nocombreloc], [ld_switch_site]) fi fi dnl Inform compiler that certain flags are meant for the linker SXE_PROTECT_LINKER_FLAGS(ld_switch_system) SXE_PROTECT_LINKER_FLAGS(ld_switch_machine) SXE_PROTECT_LINKER_FLAGS(ld_switch_site) SXE_PROTECT_LINKER_FLAGS(LDFLAGS) SXE_PROTECT_LINKER_FLAGS(ld_call_shared) dnl Add s&m-determined objects to link line test -n "$objects_machine" && SXE_ADD_CORE_OBJS($objects_machine) test -n "$objects_system" && SXE_ADD_CORE_OBJS($objects_system) test "$with_pdump" = "yes" && SXE_ADD_CORE_OBJS(dumper.o) dnl Feed s&m crud to src/Makefile dnl Linux/powerpc needs the following magic for some reason dnl [Not needed with YellowDog 2.3 and causes link problems with YellowDog 3.0, dnl the two most popular PowerPC distributions.] dnl test "$machine$opsys" = "powerpclinux" && start_flags="-T $sxe_srcdir/src/ppc.ldscript" AC_LANG(C) if test "$unexec" = "unexaix.o"; then dnl AIX needs various hacks to make static linking work. if test "$with_dynamic" = "no"; then start_flags="-Wl,-bnso,-bnodelcsect" test "$GCC" = "yes" && start_flags="-B/bin/ ${start_flags}" for f in "/lib/syscalls.exp" "/lib/threads.exp"; do if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; fi done for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp"; do if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; break; fi done AC_CHECK_LIB([c], [terminateAndUnload], [SXE_APPEND(-lC, libs_system)]) fi elif test -n "$ld_text_start_addr"; then start_flags="-T $ld_text_start_addr -e __start" fi AC_SUBST(start_flags) AC_SUBST(ld_switch_shared) AC_SUBST(start_files) if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then if test -z "$linker"; then linker='$(CC) -nostdlib' SXE_APPEND([-nostdlib], [start_flags]) fi test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`' fi test "$GCC" != "yes" && lib_gcc= AC_SUBST(ld) AC_SUBST(lib_gcc) ## --------------------------------------------------------------- ## Add site and system specific flags to compile and link commands ## --------------------------------------------------------------- ## compute those site prefixes SXE_COMPUTE_SITE_PREFIXES ## compute a LD_RUN_PATH SXE_COMPUTE_LD_RUN_PATH ## some header checks SXE_CHECK_BASIC_HEADERS ## the very basic c types SXE_CHECK_BASIC_TYPES ## for signalling SXE_CHECK_SIGNALS AC_CHECK_MEMBERS([struct stat.st_rdev]) AC_CHECK_TYPES([ptrdiff_t]) ## check whether intptr_t is definied in sys/types.h SXE_CHECK_INTPTR_T dnl -lm is required for floating point support, among other things AC_CHECK_FUNC([sin], [], [AC_CHECK_LIB([m], [sin])]) dnl check for Make feature AC_PROG_MAKE_SET dnl check for long file names AC_SYS_LONG_FILE_NAMES AC_SYS_LARGEFILE AC_SYS_INTERPRETER AC_SYS_POSIX_TERMIOS AC_FUNC_MALLOC AC_FUNC_MKTIME dnl See if mkstemp is available AC_CHECK_FUNCS([mkstemp]) SXE_CHECK_FILE_LOCK case "$opsys" in decosf*) AC_CHECK_LIB([pthreads], [cma_open]) AS_IF([test "$ac_cv_lib_pthreads_cma_open" = "yes"], c_switch_site="$c_switch_site -threads") ;; esac dnl ---------------------------------------------------------------- dnl Miscellaneous flags dnl ---------------------------------------------------------------- AC_MSG_CHECKING(whether the -xildoff compiler flag is required) if ${CC-cc} '-###' -xildon no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then AC_MSG_RESULT(no); else AC_MSG_RESULT(yes); SXE_APPEND_UNDUP(-xildoff, ld_switch_site) fi else AC_MSG_RESULT(no) fi dnl Link with "-z ignore" on Solaris if supported if test "$opsys" = "sol2"; then if test "$os_release" -ge 506; then AC_MSG_CHECKING(for "-z ignore" linker flag) case "`ld -h 2>&1`" in *-z\ ignore\|record* ) AC_MSG_RESULT(yes) SXE_PREPEND_UNDUP(-z ignore, ld_switch_site) ;; *) AC_MSG_RESULT(no) ;; esac fi fi dnl ---------------------------------------------------------------- dnl Check for Unixoid pty/process support. dnl ---------------------------------------------------------------- dnl There is no "standard" pty allocation method. Every system is different. dnl getpt() is the preferred pty allocation method on glibc systems. dnl _getpty() is the preferred pty allocation method on SGI systems. dnl grantpt(), unlockpt(), ptsname() are defined by Unix98. AC_CHECK_FUNCS([getpt _getpty grantpt unlockpt ptsname killpg tcgetpgrp]) dnl openpty() is the preferred pty allocation method on BSD and Tru64 systems. dnl openpty() might be declared in: dnl - pty.h (Tru64 or Linux) dnl - libutil.h (FreeBSD) dnl - util.h (NetBSD) AC_CHECK_FUNC(openpty, have_openpty=yes, [ AC_CHECK_LIB(util, openpty, have_openpty=yes need_libutil=yes)]) if test "$have_openpty" = "yes"; then AC_DEFINE([HAVE_OPENPTY], [1], [Description here!]) AC_CHECK_HEADERS(libutil.h util.h, break) test "$need_libutil" = "yes" && SXE_APPEND(-lutil, libs_system) fi dnl Check for system-specific pty header files dnl Often the TIOCSIG* symbols are hiding there. case "$opsys" in dnl HPUX pty.h #defines TRUE and FALSE, so just use ptyio.h there. hpux*) AC_CHECK_HEADERS(sys/ptyio.h) ;; *) AC_CHECK_HEADERS(pty.h) test "$ac_cv_header_pty_h" = "no" && AC_CHECK_HEADERS(sys/pty.h) ;; esac dnl Check for STREAM support functions. dnl Confusingly, "str" means both "string" and "SysV Streams". AC_CHECK_HEADERS(stropts.h) if test "$ac_cv_header_stropts_h" = "yes"; then AC_CHECK_FUNCS(isastream) AC_CHECK_HEADERS(strtio.h) dnl TIOCSIGNAL fi dnl Check whether the system provides getloadavg(). AC_CHECK_FUNCS(getloadavg) if test "$ac_cv_func_getloadavg" = "yes"; then dnl Solaris 8 declares getloadavg() in . dnl glibc 2.2 declares getloadavg() in ... dnl ...if we #define _GNU_SOURCE, which we do. AC_CHECK_HEADERS(sys/loadavg.h) else dnl We define our own getloadavg() using lower level functions. SXE_ADD_CRUFT_OBJS([getloadavg.o]) dnl Used by getloadavg() - does not require root priveleges AC_CHECK_LIB(kstat, kstat_open) AC_CHECK_HEADERS(kstat.h) dnl Another way to get the load average AC_CHECK_LIB(kvm, kvm_read) fi dnl If netdb.h does not declare h_errno, we must declare it by hand. AC_MSG_CHECKING(whether netdb declares h_errno) AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[return h_errno;]])], [AC_MSG_RESULT(yes) AC_DEFINE([HAVE_H_ERRNO], [1], [Description here!])], [AC_MSG_RESULT(no)]) AC_MSG_CHECKING([for sigsetjmp]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include ]], [[ sigjmp_buf bar; sigsetjmp (bar, 0); ]])], [sxe_cv_c_func_sigsetjmp="yes"], [sxe_cv_c_func_sigsetjmp="no"]) AC_MSG_RESULT([$sxe_cv_c_func_sigsetjmp]) if test "$sxe_cv_c_func_sigsetjmp" = "yes"; then AC_DEFINE([HAVE_SIGSETJMP], [1], [Description here!]) AC_DEFINE_UNQUOTED([SETJMP(x)], [sigsetjmp (x, 0)], [dnl We want to avoid saving the signal mask if possible, because that necessitates a system call.]) AC_DEFINE_UNQUOTED([LONGJMP(x, y)], [siglongjmp(x, y)], [dnl Description here!]) AC_DEFINE_UNQUOTED([JMP_BUF], [sigjmp_buf], [dnl Description here!]) else AC_DEFINE_UNQUOTED([SETJMP(x)], [setjmp(x)], [dnl We want to avoid saving the signal mask if possible, because that necessitates a system call.]) AC_DEFINE_UNQUOTED([LONGJMP(x, y)], [longjmp(x, y)], [Description here!]) AC_DEFINE_UNQUOTED([JMP_BUF], [jmp_buf], [Description here!]) fi AC_MSG_CHECKING(whether localtime caches TZ) AC_CACHE_VAL(emacs_cv_localtime_cache, [if test "$ac_cv_func_tzset" = "yes"; then AC_RUN_IFELSE([AC_LANG_SOURCE([[#include #if STDC_HEADERS # include #endif extern char **environ; unset_TZ () { char **from, **to; for (to = from = environ; (*to = *from); from++) if (! (to[[0]][[0]] == 'T' && to[[0]][[1]] == 'Z' && to[[0]][[2]] == '=')) to++; } char TZ_GMT0[[]] = "TZ=GMT0"; char TZ_PST8[[]] = "TZ=PST8"; main() { time_t now = time ((time_t *) 0); int hour_GMT0, hour_unset; if (putenv (TZ_GMT0) != 0) exit (1); hour_GMT0 = localtime (&now)->tm_hour; unset_TZ (); hour_unset = localtime (&now)->tm_hour; if (putenv (TZ_PST8) != 0) exit (1); if (localtime (&now)->tm_hour == hour_GMT0) exit (1); unset_TZ (); if (localtime (&now)->tm_hour != hour_unset) exit (1); exit (0); }]])], emacs_cv_localtime_cache=no, emacs_cv_localtime_cache=yes, [# If we have tzset, assume the worst when cross-compiling. emacs_cv_localtime_cache=yes]) else # If we lack tzset, report that localtime does not cache TZ, # since we can't invalidate the cache if we don't have tzset. emacs_cv_localtime_cache=no fi],[:])dnl AC_MSG_RESULT($emacs_cv_localtime_cache) if test $emacs_cv_localtime_cache = yes; then AC_DEFINE([LOCALTIME_CACHE], [1], [Description here!]) fi need_alloca_c=no dnl HP-UX has a working alloca in libPW. dnl case "${GCC}${opsys}" in hpux* ) dnl AC_CHECK_FUNC(alloca, [:], [AC_CHECK_LIB(PW, alloca)]) dnl esac dnl AC_FUNC_ALLOCA doesn't know about DEC C's #pragma intrinsic(alloca) if test "$__DECC" != "yes"; then AC_FUNC_ALLOCA if test -n "$ALLOCA"; then SXE_ADD_CRUFT_OBJS([$ALLOCA]) need_alloca_c=yes fi fi AC_MSG_CHECKING(for working alloca in function calls) AC_RUN_IFELSE([AC_LANG_SOURCE([[ #if defined (__GNUC__) #define alloca __builtin_alloca #elif defined (__DECC) #include #pragma intrinsic(alloca) #elif defined (HAVE_ALLOCA_H) #include #elif defined (_AIX) #pragma alloca #elif ! defined (alloca) #ifdef C_ALLOCA #define alloca xemacs_c_alloca #else void *alloca (); #endif /* C_ALLOCA */ #endif /* !defined (alloca) */ void f1 (double a, void *ptr, int b) { unsigned char *ptr2 = (unsigned char *) ptr; if (ptr2[[0]] != 0xBF || ptr2[[1]] != 0xBF || ptr2[[3000]] != 0xBF) exit (1); if (a != 3.1415 || b != -5490) exit (1); } int f2 (short c, void *ptr, long e) { unsigned char *ptr2 = (unsigned char *) ptr; if (ptr2[[0]] != 0xFB || ptr2[[1]] != 0xFB || ptr2[[1000]] != 0xFB) exit (1); if (c != 665 || e != 776776776) exit (1); f1 (3.1415, memset (alloca (3001), 0xBF, 3001), -5490); return 42; } int main (int argc, char *argv[]) { if (f2 (665, memset (alloca (1001), 0xFB, 1001), 776776776) != 42) return 1; return 0; } ]])], working_alloca_in_function_calls=yes, working_alloca_in_function_calls=no, working_alloca_in_function_calls=no) AC_MSG_RESULT($working_alloca_in_function_calls) test "$working_alloca_in_function_calls" != "yes" && \ AC_DEFINE([BROKEN_ALLOCA_IN_FUNCTION_CALLS], [1], [Description here!]) AM_CONDITIONAL([NEED_ALLOCA_C], [ test "$working_alloca_in_function_calls" = "yes" && \ test "$need_alloca_c" = "yes"]) dnl Check whether strcoll exists and works correctly. (This does more dnl than just check for its existence.) If so, it defines HAVE_STRCOLL. AC_FUNC_STRCOLL dnl If `getpgrp' takes no argument (the POSIX.1 version), define dnl `GETPGRP_VOID'. Otherwise, it is the BSD version, which takes a dnl process ID as an argument. AC_CHECK_FUNCS(getpgrp) AC_FUNC_GETPGRP dnl We used to call AC_FUNC_MMAP here dnl Instead we now use following, suggested by Neal Becker AC_MSG_CHECKING(for working mmap) case "$opsys" in ultrix* ) have_mmap=no ;; *) AC_RUN_IFELSE([AC_LANG_SOURCE([[#include #include #include #include #ifndef MAP_VARIABLE #define MAP_VARIABLE 0 #endif #ifndef MAP_FAILED #define MAP_FAILED -1 #endif int main (int argc, char *argv[]) { int fd = -1; caddr_t p; #ifndef MAP_ANONYMOUS fd = open ("/dev/zero", O_RDWR); if (fd < 0) return 1; #define MAP_ANONYMOUS 0 #endif if (mmap(0, 1024, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS, fd, 0) != (void *) MAP_FAILED) return 0; perror ("conftest: mmap failed"); return 1; }]])], have_mmap=yes, have_mmap=no, have_mmap=no) ;; esac AC_MSG_RESULT($have_mmap) test "$have_mmap" = "yes" && AC_DEFINE([HAVE_MMAP], [1], [Description here!]) dnl rel_alloc requires either GNU malloc or system malloc with mmap dnl We only turn rel_alloc on by default if mmap is available. test "$GNU_MALLOC" != "yes" -a "$have_mmap" != "yes" && with_rel_alloc=no if test "$with_rel_alloc $have_mmap" = "default yes"; then if test "$doug_lea_malloc" = "yes"; then dnl Check if malloc() calls mmap(), making rel_alloc pointless. AC_MSG_CHECKING(for M_MMAP_THRESHOLD) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]],[[ #ifndef M_MMAP_THRESHOLD #error No M_MMAP_THRESHOLD :-( !@+$%^&*_)(_ - unlikely to compile... #endif ]])], [ with_rel_alloc=no AC_MSG_RESULT(yes)], [ with_rel_alloc=yes AC_MSG_RESULT(no)]) else with_rel_alloc=yes fi fi if test "$with_rel_alloc" = "yes"; then AC_DEFINE([REL_ALLOC], [1], [Description here!]) SXE_ADD_MEMALLOC_OBJS(ralloc.o) fi dnl Check for tests/rminal I/O variants dnl TERMIOS systems may have termio.h, but not vice-versa, I think. AC_CHECK_HEADER(termios.h, AC_DEFINE([HAVE_TERMIOS], [1], [Description here!]) AC_DEFINE([SIGNALS_VIA_CHARACTERS], [1], [Description here!]) AC_DEFINE([NO_TERMIO], [1], [Description here!]), [AC_CHECK_HEADER(termio.h, [AC_DEFINE([HAVE_TERMIO], [1], [Description here!])])]) dnl Check for directory variants AC_CHECK_HEADER(dirent.h, [AC_DEFINE([SYSV_SYSTEM_DIR], [1], [Description here!])], [AC_CHECK_HEADER(sys/dir.h, , [AC_DEFINE([NONSYSTEM_DIR_LIBRARY], [1], [Description here!])])]) dnl check for readdir64_r (the reentrant version of readdir64) AC_CHECK_FUNC(readdir64_r, [AC_DEFINE([HAVE_LARGEFILE], [1], [Description here!])]) dnl Check for nlist.h AC_CHECK_HEADER([nlist.h], [AC_DEFINE([NLIST_STRUCT], [1], [Description here!])], []) dnl firstly check for pthread support so that we can use the dnl asynchronous playing routines dnl special pthread handling dnl AIX uses pthreads instead of pthread, and HP/UX uses cma dnl FreeBSD uses -pthread AC_CHECK_LIB(pthread, pthread_create) if test "${ac_cv_lib_pthread_pthread_create}" = "yes"; then have_threads=yes SXE_CHECK_COMPILER_FLAGS([-pthreads]) SXE_CHECK_COMPILER_FLAGS([-pthread]) if test "${sxe_cv_c_flags__pthreads}" = "yes"; then SXE_PREPEND_UNDUP([-pthreads], [c_switch_site]) fi if test "${sxe_cv_c_flags__pthread}" = "yes"; then SXE_PREPEND_UNDUP([-pthread], [c_switch_site]) fi SXE_PREPEND([-lpthread], [MM_LIBS]) fi dnl test for AIX pthreads AC_CHECK_LIB(pthreads, pthread_create) if test $ac_cv_lib_pthreads_pthread_create = yes; then have_threads=yes SXE_PREPEND(-lpthreads, MM_LIBS) fi dnl test for HPUX cma threads. AC_CHECK_LIB(cma, pthread_create) if test $ac_cv_lib_cma_pthread_create = yes; then have_threads=yes SXE_PREPEND(-lcma, MM_LIBS) fi dnl FreeBSD -pthread check AC_DEFUN([AC_PTHREAD_FREEBSD], [AC_MSG_CHECKING([if we need -pthread for threads]) AC_CACHE_VAL(ac_cv_ldflag_pthread, [ac_save_ld_switch_site="$ld_switch_site" ld_switch_site="-pthread $ld_switch_site" AC_LINK_IFELSE([AC_LANG_PROGRAM([[char pthread_create();]], [[char pthread_create();]])], eval "ac_cv_ldflag_pthread=yes", eval "ac_cv_ldflag_pthread=no"), ld_switch_site="$ac_save_ld_switch_site" ]) if eval "test \"`echo $ac_cv_ldflag_pthread`\" = yes"; then AC_MSG_RESULT(yes) have_threads=yes SXE_PREPEND_UNDUP("-pthread", ld_switch_site) SXE_PREPEND_UNDUP("-D_THREAD_SAFE", c_switch_site) else AC_MSG_RESULT(no) fi]) dnl If all other thread tests fail, try BSD's -pthread if test "$have_threads" != yes; then AC_PTHREAD_FREEBSD fi if test "$have_threads" = yes; then AC_DEFINE([HAVE_THREADS], [1], [Description here!]) fi ## Internal Options ## ================ echo echo "Internal Options" echo "================" SXE_CHECK_LIBTOOL SXE_CHECK_LIBLTDL dnl ---------------------------------------------------------------- dnl Check for POSIX functions. dnl ---------------------------------------------------------------- SXE_CHECK_BASIC_FUNS AC_CHECK_FUNCS([alarm cbrt closedir dup2 eaccess endpwent floor fmod fpathconf frexp fsync ftime ftruncate getaddrinfo getcwd gethostbyname gethostname getnameinfo getpagesize getrlimit gettimeofday getwd isascii isatty link logb lrand48 matherr memchr memmove memset mkdir mktime munmap perror poll pow putenv random re_comp readlink regcomp rename res_init rint rmdir select setitimer setlocale setpgid setsid sigblock sighold sigprocmask snprintf socket sqrt stpcpy strncpy strncat strcasecmp strchr strdup strerror strlwr strrchr strspn strtol strupr symlink ttyname tzset ulimit umask uname usleep utime vlimit vsnprintf waitpid wcscmp wcslen]) AS_IF([test "$have_isatty" = "yes"], AC_DEFINE([HAVE_ISATTY], [1], [isatty is available])) AS_IF([test "$have_ttyname" = "yes"], AC_DEFINE([HAVE_TTYNAME], [1], [ttyname is available])) ## combines all these time structures and funs SXE_CHECK_METRONOME SXE_CHECK_SUFFICIENCY([metronome], [metronome]) ## check for a sane dirname/realpath SXE_CHECK_DIRNAME SXE_CHECK_REALPATH dnl ----------------------------------- dnl Do some misc autoconf-special tests dnl ----------------------------------- dnl Do the opsystem or machine files prohibit the use of the GNU malloc? dnl Assume not, until told otherwise. GNU_MALLOC=yes if test "$with_dlmalloc" != "no"; then doug_lea_malloc=yes else doug_lea_malloc=no fi after_morecore_hook_exists=yes AC_CHECK_FUNC(malloc_set_state, ,doug_lea_malloc=no) AC_MSG_CHECKING(whether __after_morecore_hook exists) AC_LINK_IFELSE([AC_LANG_SOURCE([[extern void (* __after_morecore_hook)();],[__after_morecore_hook = 0]])], [AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no) after_morecore_hook_exists=no]) if test "$system_malloc" = "yes" ; then GNU_MALLOC=no GNU_MALLOC_reason=" - The GNU allocators don't work with this system configuration." elif test "$with_system_malloc" = "yes" ; then GNU_MALLOC=no GNU_MALLOC_reason=" - User chose not to use GNU allocators." elif test "$with_debug_malloc" = "yes" ; then GNU_MALLOC=no GNU_MALLOC_reason=" - User chose to use Debugging Malloc." fi if test "$doug_lea_malloc" = "yes" -a "$GNU_MALLOC" = "yes" ; then GNU_MALLOC_reason=" - Using Doug Lea's new malloc from the GNU C Library." AC_DEFINE([DOUG_LEA_MALLOC], [1], [Description here!]) if test "$after_morecore_hook_exists" = "no" ; then GNU_MALLOC_reason=" - Using Doug Lea's new malloc from the Linux C Library." AC_DEFINE([_NO_MALLOC_WARNING_], [1], [Description here!]) fi fi AM_CONDITIONAL([USE_MEMALLOC], [test -n "${libmemalloc_objs}"]) dnl #### mcheck is broken in all versions of Linux libc and glibc. dnl Try this again when 2.1 hits the streets. dnl Avoid using free-hook.c if support exists for malloc debugging in libc have_libmcheck=no if test "$with_error_checking_malloc" = "yes" -a \ "$have_glibc" = "yes" -a \ "$doug_lea_malloc" = "yes"; then AC_CHECK_HEADERS(mcheck.h) AC_CHECK_LIB(mcheck, mcheck, [have_libmcheck=yes], [have_libmcheck=no]) fi if test "$with_module_support" != "no"; then AS_MESSAGE([checking for module support]) if test "$sxe_cv_feat_libltdl" = "yes"; then have_module_support="yes" with_module_support="yes" SXE_ADD_CRUFT_OBJS([emodules-ng.o]) AC_DEFINE([HAVE_EMODULES], [1], [Whether emods would be available]) AC_DEFINE([WITH_EMODULES], [1], [Whether emods shall be available]) else have_module_support="no" AC_DEFINE([WITH_EMODULES], [1], [Whether emods shall be available]) fi fi AM_CONDITIONAL([DESCEND_MODULES], [test "$with_module_support $have_module_support" = "yes yes"]) if test "$with_module_support $have_module_support" = "yes"; then SXE_APPEND([src], [MAKE_SUBDIR]) SXE_APPEND([src], [INSTALL_ARCH_DEP_SUBDIR]) SXE_APPEND([modules], [MAKE_AM_SUBDIR]) SXE_APPEND([modules], [SRC_SUBDIR_DEPS]) dnl else dnl MOD_CC="$SXEMACS_CC" dnl MODCFLAGS="\$(SXE_CFLAGS) -I../../src -I\$(sxe_srcdir)/../../src" dnl INSTALLPATH="" dnl MOD_INSTALL_PROGRAM="true" dnl OBJECT_TO_BUILD="\$(MODNAME).o" fi if test "$with_modules_ase" = "yes"; then have_modules_ase=yes fi if test "$with_static_modules_ase" = "yes"; then have_static_modules_ase=yes fi SXE_EMOD_STATMOD([ase]) if test "$have_modules_ase $have_static_modules_ase" != " "; then have_ase_cart="yes" have_ase_dig="yes" have_ase_intv="yes" have_ase_metric="yes" have_ase_nbhood="yes" have_ase_perm="yes" have_ase_resclass="yes" fi if test "$have_bison" = "yes"; then if test "$with_modules_cl" = "yes" ; then have_modules_cl="yes" fi if test "$with_static_modules_cl" = "yes"; then have_static_modules_cl="yes" fi else if test "$with_modules_cl" = "yes" -o "$with_static_modules_cl" = "yes"; then AC_MSG_WARN([Sorry no bison means no cl module for you.]) fi fi SXE_EMOD_STATMOD([cl]) dnl D-Bus dnl SXE_CHECK_DBUS dnl if test "$have_dbus" = "yes"; then dnl if test "$with_modules_dbus" = "yes"; then dnl have_modules_dbus=yes dnl fi dnl if test "$with_static_modules_dbus" = "yes"; then dnl have_static_modules_dbus=yes dnl fi dnl else dnl AC_MSG_WARN([I cannot believe you do not have d-bus.]) dnl fi dnl SXE_EMOD_STATMOD([dbus]) AM_CONDITIONAL([AUTARKIC], [test "0" = "1"]) MODARCHDIR= MAKE_DOCFILE="$sxe_blddir/lib-src/make-docfile" ELLMAKEDOC=$MAKE_DOCFILE ELLCC=$MOD_CC AC_SUBST(ELLCC) AC_SUBST(ELLMAKEDOC) AC_SUBST(with_modules, $with_modules) AC_SUBST(MOD_CC) AC_SUBST(MODARCHDIR) AC_SUBST(MAKE_DOCFILE) AC_SUBST(MODCFLAGS) AC_SUBST(INSTALLPATH) AC_SUBST(MOD_INSTALL_PROGRAM) AC_SUBST(OBJECT_TO_BUILD) SXE_SUBST_STATMOD_A ## FFI support SXE_CHECK_FFI SXE_CHECK_SUFFICIENCY([ffi], [FFI support], [ ## additional actions AC_DEFINE([HAVE_LIBFFI], [1], [Description here!]) HAVE_LIBFFI=yes FFI_LIBS="-lffi" SXE_ADD_CRUFT_OBJS([effi.o]) ]) ## ENT support SXE_CHECK_ENT ## check for pseudo gaussian numbers AC_MSG_CHECKING([for pseug (gaussian numbers)]) if test "$sxe_cv_feat_gmp" = "yes"; then ## the good case AC_DEFINE([HAVE_PSEUG], [1], [Whether we COULD do gaussian numbers!]) sxe_cv_feat_pseug="yes" else sxe_cv_feat_pseug="no" fi AC_MSG_RESULT([$sxe_cv_feat_pseug]) ## check for pseudo complex numbers AC_MSG_CHECKING([for pseuc (pseudo complex numbers)]) if test "$sxe_cv_feat_mpfr" = "yes"; then ## the good case AC_DEFINE([HAVE_PSEUC], [1], [Whether we COULD do complex numbers!]) sxe_cv_feat_pseuc="yes" else sxe_cv_feat_pseuc="no" fi AC_MSG_RESULT([$sxe_cv_feat_pseuc]) ## check for pseudo quaternions AC_MSG_CHECKING([for quatern (quaternion numbers)]) if test "$sxe_cv_feat_gmp" = "yes"; then ## the good case AC_DEFINE([HAVE_QUATERN], [1], [Whether we COULD do quaternions!]) sxe_cv_feat_quatern="yes" else sxe_cv_feat_quatern="no" fi AC_MSG_RESULT([$sxe_cv_feat_quatern]) ## go through what the PH^Wuser has specified ## it's a wee bit more complex, so let's go for it ## we use a dijkstra-if ent_dijkstra="$with_ent_gmp $sxe_cv_feat_gmp" if test "$ent_dijkstra" = "yes yes"; then AC_DEFINE([WITH_GMP], [1], [Whether GMP support was desired!]) SXE_PREPEND([$GMP_LIBS], [ENT_LIBS]) SXE_ADD_ENT_OBJS([ent-gmp.o]) have_ent_gmp="yes" elif test "$ent_dijkstra" = "yes no"; then ## pity, we wanted GMP but we dont have it AC_DEFINE([WITH_GMP], [1], [Whether GMP support was desired!]) have_ent_gmp="no" elif test "$ent_dijkstra" = "no yes"; then ## we didn't want GMP but we have it ## do nothing in that case have_ent_gmp="no" elif test "$ent_dijkstra" = "no no"; then ## great, we didnt opt for GMP and we're lucky, it's not there either have_ent_gmp="no" fi ## evaluate mpfr results ent_dijkstra="$with_ent_mpfr $sxe_cv_feat_mpfr" if test "$ent_dijkstra" = "yes yes"; then ## the good case AC_DEFINE([WITH_MPFR], [1], [Description here!]) SXE_PREPEND([$MPFR_LIBS], [ENT_LIBS]) SXE_ADD_ENT_OBJS([ent-mpfr.o]) have_ent_mpfr="yes" elif test "$ent_dijkstra" = "yes no"; then ## we want but can't have AC_DEFINE([WITH_MPFR], [1], [Description here!]) have_ent_mpfr="no" elif test "$ent_dijkstra" = "no yes"; then have_ent_mpfr="no" elif test "$ent_dijkstra" = "no no"; then have_ent_mpfr="no" fi ## whether to enable gaussian numbers ent_dijkstra="$with_ent_pseug $sxe_cv_feat_pseug" if test "$ent_dijkstra" = "yes yes"; then ## perfick AC_DEFINE([WITH_PSEUG], [1], [Description here!]) SXE_PREPEND([$GMP_LIBS], [ENT_LIBS]) SXE_ADD_ENT_OBJS([ent-gaussian.o]) have_ent_pseug="yes" elif test "$ent_dijkstra" = "yes no"; then ## grrrr AC_DEFINE([WITH_PSEUG], [1], [Description here!]) have_ent_pseug="no" elif test "$ent_dijkstra" = "no yes"; then have_ent_pseug="no" elif test "$ent_dijkstra" = "no no"; then have_ent_pseug="no" fi ## whether to enable emulated complex numbers ent_dijkstra="$with_ent_pseuc $sxe_cv_feat_pseuc $with_ent_mpc $sxe_cv_feat_mpc" if test "$ent_dijkstra" = "yes yes yes yes"; then ## skip pseuc usage have_ent_pseuc="veto" AC_DEFINE([WITH_PSEUC], [1], [Description here!]) AS_MESSAGE([ENT: Built-in support for complex numbers available, dnl but omitted in favour of MPC.]) omit_ent_pseuc_in_favour_of="mpc" ## set up to use plain mpc AC_DEFINE([WITH_MPC], [1], [Description here!]) SXE_PREPEND([$MPC_LIBS], [ENT_LIBS]) SXE_ADD_ENT_OBJS([ent-mpc.o]) have_ent_mpc="yes" elif test "$ent_dijkstra" = "yes yes yes no"; then ## user planned to use mpc, hasnt got it though ## now he's cursed with pseudo complex numbers :) AC_DEFINE([WITH_PSEUC], [1], [Description here!]) have_ent_pseuc="yes" SXE_PREPEND([$MPFR_LIBS], [ENT_LIBS]) SXE_ADD_ENT_OBJS([ent-pseumpc.o]) ## we want mpc but can't have, set up that AC_DEFINE([WITH_MPC], [1], [Description here!]) have_ent_mpc="no" elif test "$ent_dijkstra" = "yes yes no yes"; then ## user coulda used mpc but disabled it for whatever reasons ... Wait! ## Horst, is that you?! AC_DEFINE([WITH_PSEUC], [1], [Description here!]) AS_MESSAGE([ENT: dnl MPC support for complex numbers IS possible, however YOU think you want dnl the built-in emulated stuff? Seriously? Good, so be it!]) SXE_PREPEND([$MPFR_LIBS], [ENT_LIBS]) SXE_ADD_ENT_OBJS([ent-pseumpc.o]) have_ent_pseuc="yes" omit_ent_mpc_in_favour_of="pseuc" ## however brag that we have mpc have_ent_mpc="yes" elif test "$ent_dijkstra" = "yes yes no no"; then AC_DEFINE([WITH_PSEUC], [1], [Description here!]) have_ent_pseuc="yes" SXE_PREPEND([$MPFR_LIBS], [ENT_LIBS]) SXE_ADD_ENT_OBJS([ent-pseumpc.o]) have_ent_mpc="no" elif test "$with_ent_pseuc $sxe_cv_feat_pseuc" = "yes no"; then AC_DEFINE([WITH_PSEUC], [1], [Description here!]) have_ent_pseuc="no" elif test "$with_ent_pseuc $sxe_cv_feat_pseuc" = "no yes"; then have_ent_pseuc="no" elif test "$with_ent_pseuc $sxe_cv_feat_pseuc" = "no no"; then have_ent_pseuc="no" fi ## whether to enable gaussian numbers ent_dijkstra="$with_ent_quatern $sxe_cv_feat_quatern" if test "$ent_dijkstra" = "yes yes"; then ## perfick AC_DEFINE([WITH_QUATERN], [1], [Description here!]) SXE_PREPEND([$GMP_LIBS], [ENT_LIBS]) SXE_ADD_ENT_OBJS([ent-quatern.o]) have_ent_quatern="yes" elif test "$ent_dijkstra" = "yes no"; then ## grrrr AC_DEFINE([WITH_QUATERN], [1], [Description here!]) have_ent_quatern="no" elif test "$ent_dijkstra" = "no yes"; then have_ent_quatern="no" elif test "$ent_dijkstra" = "no no"; then have_ent_quatern="no" fi ## elliptic curve support ent_dijkstra="$with_ent_ecm $sxe_cv_feat_ecm" if test "$ent_dijkstra" = "yes yes"; then ## perfick case AC_DEFINE([WITH_ECM], [1], [Description here!]) SXE_PREPEND([$ECM_LIBS], [ENT_LIBS]) SXE_ADD_ENT_OBJS([ent-ecm.o]) have_ent_ecm="yes" elif test "$ent_dijkstra" = "no yes"; then have_ent_ecm="no" elif test "$ent_dijkstra" = "yes no"; then AC_DEFINE([WITH_ECM], [1], [Description here!]) have_ent_ecm="no" elif test "$ent_dijkstra" = "no no"; then have_ent_ecm="no" fi ## Floating operation support is now unconditional SXE_CHECK_MATHS_VALUES if test "$ac_cv_sizeof_long_double" != 0; then ##AC_DEFINE_UNQUOTED([fpfloat], [long double], [Description here!]) ##AC_DEFINE([fpfloat_long_double_p], [1], [Description here!]) fpfloat="long double" fpfloat_long_double_p=1 have_fpfloat=yes elif test "$ac_cv_sizeof_double" != 0; then ##AC_DEFINE_UNQUOTED([fpfloat], [double], [Description here!]) ##AC_DEFINE([fpfloat_double_p], [1], [Description here!]) fpfloat="double" fpfloat_double_p=1 have_fpfloat=yes else AS_MESSAGE([Uh oh, no float type is bad news.]) have_fpfloat=no fi AC_MSG_CHECKING([if need to add -lm]) AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include ]],[[ return sin(0.0); ]])], [AC_MSG_RESULT([no])], [ AC_MSG_RESULT([maybe]) save_LIBS=$LIBS SXE_APPEND([-lm], [LIBS]) AC_MSG_CHECKING([if can add -lm]) AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include ]],[[ return sin(0.0); ]])], [AC_MSG_RESULT([yes])], [ AC_MSG_RESULT([no]) AC_MSG_WARN([No way to use math functions found. Reverting option append.]) LIBS=$save_LIBS])]) AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include ]],[[ return atanh(1.0) + asinh(1.0) + acosh(1.0); ]])], [AC_DEFINE([HAVE_INVERSE_HYPERBOLIC], [1], [Description here!])]) if test "$have_fpfloat" = "yes"; then AC_DEFINE([HAVE_FPFLOAT], [1], [Description here!]) SXE_CHECK_CLEAN_FLOATOPS( [have_clean_floatops="yes"], [have_clean_floatops="no"]) ## it would seem odd to define the destiny of our float arithmetic here if test "$have_clean_floatops" = "yes"; then AC_DEFINE_UNQUOTED([fpfloat], [$fpfloat], [Description here!]) AC_DEFINE_UNQUOTED([fpfloat_long_double_p], [${fpfloat_long_double_p:-0}], [Description here!]) AC_DEFINE_UNQUOTED([fpfloat_double_p], [${fpfloat_double_p:-0}], [Description here!]) else AS_MESSAGE([downgrading to `double' floats]) AC_DEFINE_UNQUOTED([fpfloat], [double], [Description here!]) AC_DEFINE_UNQUOTED([fpfloat_long_double_p], [0], [Description here!]) AC_DEFINE([fpfloat_double_p], [1], [Description here!]) fi fi ## trivial checks, you cannot (yet) turn off internal arithmetic entirely ## so we always `have' it dnl with_ent_int=yes have_ent_int=yes dnl with_ent_indef=yes have_ent_indef=yes dnl with_ent_fpfloat=yes have_ent_fpfloat=yes dnl we attempt to always use ent.o AC_DEFINE([WITH_NUMBER_TYPES], [1], [Description here!]) SXE_SUBST_ENT_OBJS dnl experimental code support if test "$with_compre" != "no"; then AC_MSG_CHECKING([if compre prerequisites are met]) AC_MSG_RESULT([yes]) AC_DEFINE([EF_USE_COMPRE], [1], [Whether to provide compiled regular expression!]) have_compre=yes fi if test "$with_experimental_features_pom" = "yes"; then AC_MSG_CHECKING([if pom prerequisites are met]) if test "$have_threads" = "yes"; then AC_MSG_RESULT([yes]) AC_DEFINE([EF_USE_POM], [1], [Whether to protect all lisp objects with mutexes!]) have_experimental_features_pom=yes else AC_MSG_RESULT([no]) fi fi if test "$with_experimental_features_asyneq" = "yes"; then AC_MSG_CHECKING([if asyneq prerequisites are met]) if test "$have_threads" = "yes"; then AC_MSG_RESULT([yes]) AC_DEFINE([EF_USE_ASYNEQ], [1], [Whether to setup asynchronous event queues!]) have_experimental_features_asyneq=yes SXE_ADD_EVENTS_OBJS([event-queue.o workers.o worker-asyneq.o]) else AC_MSG_RESULT([no]) fi fi SXE_SUBST_EVENTS_OBJS SXE_CHECK_EVENTS SXE_CHECK_SUFFICIENCY([events], [event system]) ## check asm helpers SXE_CHECK_ASM_HELPERS ## compression titbits SXE_CHECK_ZLIB SXE_CHECK_BZLIB SXE_CHECK_LZMA ## Cryptography Options ## ==================== echo echo "Cryptography Options" echo "====================" ## in case someone else (ldap, pgsql, etc.) needs it SXE_CHECK_OPENSSL SXE_CHECK_SUFFICIENCY([openssl], [OpenSSL support]) dnl OpenSSL if test "$with_openssl" != "no" -a "$have_openssl" = "yes"; then SXE_ADD_CRUFT_OBJS([openssl.o]) elif test "$with_openssl" != "no"; then AC_MSG_WARN([Required OpenSSL support cannot be provided.]) AC_MSG_WARN([Check --with-site-prefixes.]) fi if test "$have_openssl" = "no" -o "$with_openssl" = "no"; then OPENSSL_CPPFLAGS="" OPENSSL_LDFLAGS="" OPENSSL_LIBS="" fi AC_SUBST([OPENSSL_CPPFLAGS]) AC_SUBST([OPENSSL_LDFLAGS]) AC_SUBST([OPENSSL_LIBS]) SXE_CHECK_KERBEROS SXE_CHECK_KERBEROS5 if test "$with_kerberos" = "yes"; then AC_DEFINE([WITH_KERBEROS], [1], [Whether kerberos support was requested]) if test "$sxe_cv_feat_kerberos" = "yes"; then SXE_PREPEND([$KERBEROS_LIBS], [ld_libs_general]) fi fi ## Networking Options ## ================== echo echo "Networking Options" echo "==================" SXE_CHECK_SOCKETS SXE_CHECK_SUFFICIENCY([unix], [unix domain sockets]) SXE_CHECK_SUFFICIENCY([sysvipc], [SysV IPC message]) SXE_CHECK_SUFFICIENCY([sockets], [tcp/udp sockets]) SXE_CHECK_SUFFICIENCY([tcpudp], [tcp/udp sockets]) SXE_CHECK_SUFFICIENCY([multicast], [multicast]) dnl Decnet if test "$with_dnet" = "yes"; then AC_CHECK_LIB(dnet, main, [AC_DEFINE([HAVE_LIBDNET], [1], [Description here!])], [SXE_DIE("DECnet requested but can't find libdnet")]) fi dnl Socks support if test "$with_socks" = "yes"; then AC_CHECK_LIB(socks, SOCKSinit) test -n "$ac_cv_lib_socks_SOCKSinit" && AC_DEFINE([HAVE_SOCKS], [1], [Description here!]) fi ## Window System Features ## ====================== echo echo "Window System Features" echo "======================" dnl ---------------------- dnl Choose a window system dnl ---------------------- AS_MESSAGE([checking for specified window system]) if test "$with_x" != "no"; then if test "$with_x11" != "no"; then dnl User-specified --x-includes or --x-libraries implies --with-x11. test "$x_includes $x_libraries" != "NONE NONE" && \ window_system=x11 with_x11=yes fi dnl Autodetection of X11 libraries and includes dnl ------------------------------------------- dnl AC_PATH_XTRA thinks it can find our X headers and includes, but dnl it often gets it wrong, so we only use it as a last resort. dnl $OPENWINHOME implies --x-includes and --x-libraries dnl Not (yet) handled by autoconf2 if test "$x_includes $x_libraries" = "NONE NONE" \ -a -n "$OPENWINHOME" \ -a "$OPENWINHOME" != "/usr/openwin" \ -a -d "$OPENWINHOME"; then test -d "$OPENWINHOME/lib" && \ x_libraries="$OPENWINHOME/lib" test -d "$OPENWINHOME/include" && \ x_includes="$OPENWINHOME/include" test -d "$OPENWINHOME/share/include" && \ x_includes="$OPENWINHOME/share/include" fi if test -z "$x_includes" -o \ "$x_includes" = "NONE" -o \ ! -d "$x_includes"; then dnl AC_PATH_XTRA often guesses /usr/include, when some other dnl include directory is a MUCH better guess (Linux, HP-UX 10.20). dnl This is a workaround for idiot (esp. HP) system vendors, who dnl provide a /usr/include/X11, but DON'T FULLY POPULATE IT. for dir in "/usr/X11" "/usr/X11R7" "/usr/X11R6" \ "/usr/local" "/usr"; do if test -d "$dir/include/X11"; then x_includes="$dir/include" break fi done fi if test -z "$x_libraries" -o \ "$x_libraries" = "NONE" -o \ ! -d "$x_libraries"; then for dir in \ "/usr/X11/lib" \ "/usr/X11R7/lib" "/usr/lib/X11R7" \ "/usr/X11R6/lib" "/usr/lib/X11R6" \ "/usr/local/lib" "/usr/local/lib/X11" \ "/usr/lib" "/usr/lib/X11"; do if test -r "$dir/libX11.a"; then x_libraries="$dir" break fi done fi AC_PATH_XTRA if test "$with_x11" != "no"; then if test "$no_x" = "yes"; then with_x11=no window_system=none HAVE_X_WINDOWS=no else with_x11=yes window_system=x11 HAVE_X_WINDOWS=yes fi fi fi dnl #### wmperry:: !x11 != NONE dnl case "$with_x11" in dnl yes ) window_system=x11 HAVE_X_WINDOWS=yes ;; dnl no ) window_system=none HAVE_X_WINDOWS=no ;; dnl esac AM_CONDITIONAL([DESCEND_LWLIB], [test "$with_x11" = "yes"]) if test "$with_x11" = "yes"; then AC_DEFINE([HAVE_X_WINDOWS], [1], [Description here!]) AC_DEFINE([NeedFunctionPrototypes], [1], [Description here!]) AC_DEFINE([FUNCPROTO], [15], [Whatever this is.]) AC_DEFINE([HAVE_UNIXOID_EVENT_LOOP], [1], [Description here!]) SXE_APPEND([lwlib], [MAKE_SUBDIR]) SXE_APPEND([lwlib], [SRC_SUBDIR_DEPS]) SXE_ADD_SXEUIX11_OBJS([console-x.o device-x.o event-Xt.o frame-x.o]) SXE_ADD_SXEUIX11_OBJS([glyphs-x.o objects-x.o redisplay-x.o select-x.o]) SXE_ADD_SXEUIX11_OBJS([xgccache.o]) SXE_DUMP_LIBS ## some debian systems are trying to fool us ... now fool them back! if test -d "$x_includes"; then CPPFLAGS="$CPPFLAGS -I$x_includes" fi if test -d "$x_libraries"; then LDFLAGS="$LDFLAGS -L$x_libraries" fi dnl Look for Motif, but only if not found in $x_includes and $x_libraries AC_CHECK_HEADERS([Xm/Xm.h]) if test "$ac_cv_header_Xm_Xm_h" = "yes"; then AC_CHECK_LIB([Xm], [XmStringFree], [got_motif=yes]) fi if test "$got_motif" != "yes"; then dnl Try to find Motif dirs dnl These take precedence over other X libs/includes, so PRE-pend for lib_dir in \ "/usr/dt/lib" "/usr/lib/Motif2.1" \ "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do inc_dir=`echo $lib_dir | sed -e 's/lib/include/'` if test -d "$lib_dir" -a -d "$inc_dir"; then case "$x_libraries" in *"$lib_dir"* ) ;; *) x_libraries="$lib_dir $x_libraries" SXE_PREPEND(["-L${lib_dir}"], [X_LIBS]) ;; esac case "$x_includes" in "$inc_dir"* ) ;; *) x_includes="$inc_dir $x_includes" SXE_PREPEND_UNDUP(["-I${inc_dir}"], [X_CFLAGS]) ;; esac break; dnl only need ONE Motif implementation! fi done fi dnl Contrib X libs/includes do NOT take precedence, so AP-pend for rel in "X11R7" "X11R6" "X11R5" "X11R4"; do lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include" if test -d "$lib_dir" -a -d "$inc_dir"; then case "$x_libraries" in *"$lib_dir"* ) ;; *) x_libraries="$x_libraries $lib_dir" SXE_APPEND(["-L${lib_dir}"], [X_LIBS]) ;; esac case "$x_includes" in "$inc_dir"* ) ;; *) x_includes="$x_includes $inc_dir" SXE_APPEND_UNDUP(["-I${inc_dir}"], [X_CFLAGS]) ;; esac break; dnl Only need ONE X11 implementation ! fi done dnl Avoid version mismatch for shared library libXm.so on osf4 case "$opsys" in decosf*) AS_IF([test "$GCC" = yes -a -d "/usr/shlib"], SXE_APPEND([-L/usr/shlib], [X_LIBS])) ;; esac LDFLAGS="$LDFLAGS $X_LIBS" if test "$extra_verbose" = "yes"; then echo echo "X11 compilation variables:" SXE_PRINT_VAR(x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS) echo fi dnl Set up bitmaps search path. dnl The original suggestion was to unconditionally to append X11/bitmaps dnl to each element of $x_includes, I'm pretty sure this is the wrong dnl thing to do. We test for bitmaps and X11/bitmaps directories on each dnl element and add them to BITMAPDIR if they exist. bitmapdirs= if test "$x_includes" != NONE; then for i in $x_includes; do if test -d "$i/bitmaps"; then bitmapdirs="$i/bitmaps:$bitmapdirs" fi if test -d "$i/X11/bitmaps"; then bitmapdirs="$i/X11/bitmaps:$bitmapdirs" fi done bitmapdirs=`echo "$bitmapdirs" | sed s/.$//` fi if test ! -z "$bitmapdirs"; then AC_DEFINE_UNQUOTED([BITMAPDIR], ["$bitmapdirs"], [Description here!]) fi dnl dnl Autodetect defines extracted from X config by xmkmf, e.g. NARROWPROTO dnl AS_MESSAGE(checking for X defines extracted by xmkmf) dnl rm -fr conftestdir dnl if mkdir conftestdir; then dnl cd conftestdir dnl cat > Imakefile <<'EOF' dnl xetest: dnl @echo ${PROTO_DEFINES} ${STD_DEFINES} dnl EOF dnl if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then dnl # GNU make sometimes prints "make[1]: Entering...", which would confuse us. dnl xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make` dnl fi dnl cd .. dnl rm -fr conftestdir dnl for word in $xmkmf_defines; do dnl case "$word" in dnl -D__STDC__*) ;; dnl -D* ) dnl sym=`echo '' $word | sed -e 's:^ *-D::' -e 's:=.*::'` dnl case "$word" in dnl -D*=* ) val=`echo '' $word | sed -e 's:^.*=::'` ;; dnl * ) val=1 ;; dnl esac dnl dnl Avoid re-AC_DEFINE-ing xmkmf symbols we've already defined above. dnl if grep "^#define $sym " confdefs.h >/dev/null; then :; else dnl if test "$val" = "1" dnl then AC_DEFINE_UNQUOTED([$sym], [], [Description here!]) dnl else AC_DEFINE_UNQUOTED([$sym], [$val], [Description here!]) dnl fi dnl fi ;; dnl esac dnl done dnl fi dnl make sure we can find Intrinsic.h AC_CHECK_HEADER([X11/Intrinsic.h], [], [AC_MSG_ERROR([Unable to find X11 and/or Xt header files. Try using --x-includes= if you know the path, or --with-x=no to disable X11 support.])]) dnl Check some more headers AC_CHECK_HEADERS([X11/Intrinsic.h X11/StringDefs.h X11/Shell.h X11/ShellP.h], [],[], [[#if HAVE_X11_INTRINSIC_H # include # include # include #endif]]) dnl -lXt and -lX11 are required dnl Some broken systems require the magic "-b i486-linuxaout" flag dnl Other broken systems will not pass these tests unless the pre and dnl extra libs are passed on... LIBS="$LIBS $X_PRE_LIBS $X_EXTRA_LIBS" AC_CHECK_LIB(X11, XOpenDisplay, have_lib_x11=yes) if test "$have_lib_x11" != "yes"; then AC_CHECK_LIB([X11], [XGetFontProperty], [], [AC_MSG_ERROR([Unable to find X11 libraries. Try using --x-libraries= if you know the path, or --with-x=no to disable X11 support.])]) fi SXE_PREPEND([-lX11], [libs_x]) LIBS="$LIBS -lX11" if test "$extra_verbose" = "yes"; then echo " Setting libs_x to \"-lX11\"" fi dnl Autodetect -lXext AC_CHECK_LIB([Xext], [XShapeSelectInput], [SXE_PREPEND([-lXext], [libs_x])]) dnl Require -lXt AC_CHECK_LIB([Xt], [XtOpenDisplay], [SXE_PREPEND([-lXt], [libs_x])], [ AC_MSG_ERROR([Unable to find X11 libraries. Try using --x-libraries= if you know the path, or --with-x=no to disable X11 support.])]) AC_MSG_CHECKING([the version of X11 being used]) AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }]])], [./conftest foobar; x11_release=$?],[x11_release=4],[x11_release=4]) AC_MSG_RESULT(R${x11_release}) AC_DEFINE_UNQUOTED([X11_RELEASE], [${x11_release}], [Description here!]) AC_CHECK_FUNCS([XConvertCase]) AC_CHECK_LIB([Xt], [XtRegisterDrawable]) if test "$ac_cv_lib_Xt_XtRegisterDrawable" = "yes"; then AC_DEFINE([HAVE_XTREGISTERDRAWABLE], [1], [Description]) fi AC_CHECK_HEADERS(X11/Xlocale.h) dnl XFree86 has a non-standard prototype for this X11R6 function AC_CHECK_FUNCS(XRegisterIMInstantiateCallback) AC_MSG_CHECKING(for standard XRegisterIMInstantiateCallback prototype) AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ #ifndef NeedFunctionPrototypes #define NeedFunctionPrototypes 1 #endif #include extern Bool XRegisterIMInstantiateCallback( Display*, struct _XrmHashBucketRec*, char*, char*, XIMProc, XPointer*); ]])], [AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no) AC_DEFINE([XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE], [], [Description here!])]) dnl autodetect -lXmu AC_CHECK_LIB([Xmu], [XmuReadBitmapDataFromFile], [with_xmu=yes], [with_xmu=no]) if test "$with_xmu" = "no"; then SXE_ADD_SXEUIX11_OBJS([xmu.o]) else SXE_PREPEND([-lXmu], [libs_x]) AC_DEFINE([HAVE_XMU], [1], [Description here!]) fi dnl Autodetect -lXbsd dnl #### Someone, please add a better function than main AC_CHECK_LIB([Xbsd], [main], SXE_PREPEND([-lXbsd], [libs_x])) dnl restore old values SXE_RESTORE_LIBS fi dnl $with_x11 = yes AC_SUBST([install_pp]) dnl test "$with_dragndrop" != "no" && with_dragndrop="$with_dragndrop_default" dnl test -z "$window_system" && window_system="none" with_dragndrop="no" dnl Test for features that require a window system - ANY window system if test "$window_system" = "none"; then for feature in menubars scrollbars toolbars dialogs dragndrop xface do if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then AC_MSG_WARN([--with-$feature ignored: Not valid without window system support]) fi eval "with_${feature}=no" done else test -z "with_toolbars" && with_toolbars=yes fi dnl Test for features that require X11 support if test "$with_x11" != "yes"; then for feature in offix wmcommand xim xmu nas_sound do if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then AC_MSG_WARN([--with-$feature ignored: Not valid without X support]) fi eval "with_${feature}=no" done fi dnl Balloon Help requires the Shape extension, not available everywhere, dnl for example not on AIX 4.3. if test "$with_x11" = "yes"; then AC_CHECK_HEADER(X11/extensions/shape.h, [ AC_DEFINE([HAVE_BALLOON_HELP], [1], [Description here!]) SXE_ADD_SXEUIX11_OBJS(balloon_help.o balloon-x.o) ]) fi dnl FSF 19.29 has some bitmapdir stuff here. bitmapdir= case "$window_system" in x11 ) HAVE_X_WINDOWS=yes; echo " Using X11." ;; none ) HAVE_X_WINDOWS=no ; echo " Using no window system." ;; esac if test -n "$window_system" -a "$window_system" != "none"; then AC_DEFINE_UNQUOTED([HAVE_WINDOW_SYSTEM], [1], [Description here!]) fi case "$x_libraries" in *X11R4* ) test "$opsys" = "hpux9" && opsysfile="s/hpux9-x11r4.h" test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h" esac dnl Enable or disable proper handling of WM_COMMAND AS_MESSAGE(checking for WM_COMMAND option); dnl if test "$with_wmcommand" = "yes"; then if test "$with_wmcommand" != "no"; then AC_DEFINE([HAVE_WMCOMMAND], [1], [Description here!]) fi dnl Autodetect Xauth dnl -lXau is only used by gnuclient, so use a special variable for Xauth X libs test "$with_xauth" != "no" && test "$window_system" = "none" && with_xauth=no SXE_DUMP_LIBS CPPFLAGS="$CPPFLAGS $X_CFLAGS" LDFLAGS="$LDFLAGS $X_LIBS" AC_CHECK_HEADER([X11/Xauth.h], [:], [with_xauth=no]) AC_CHECK_LIB([Xau], [XauGetAuthByAddr], [:], [with_xauth=no]) if test "$with_xauth" = "yes"; then AC_DEFINE([HAVE_XAUTH], [1], [Description here!]) SXE_CONSECUTIVE_UNDUP([libs_xauth], [$X_EXTRA_LIBS -lXau $libs_x $X_PRE_LIBS]) fi SXE_RESTORE_LIBS AC_SUBST(libs_xauth) dnl ---------------------- dnl X-Specific Graphics libraries dnl ---------------------- ## Oki, now that we really need a more exhaustive way to autodetect ## athena and other widgets we construct a chain. The elements of ## that chain are simple atomic tests (provided by AC_DEFUNs). ## The chain is defined to be: ## ## neXtaw -> Xaw3d -> XawXpm -> Xaw95 -> Xaw -> Motif -> Nirvana ## ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^ ## 3d sets non-3d non-athena ## ## Now if the user passes a --with-athena=foo option, we jump ## directly to the according test-suite and in case this fails we jump ## off the cliff. ## ## Attention: ## We shall perform every test-suite twice, once the correct way, and ## once with #include'ing the Xfuncproto header. ## Thanks to the many, many distributions which treat their users ## like braindead zombies! ## Especially, I would like to thank Fedora/RedHat for bringing ## this up. Go on guys, you rock! ## and now the test chain if test "$with_x11" = "yes" -a "$with_x" != "no"; then SXE_CHECK_XTOOLKITS SXE_CHECK_XT_DEPENDENCIES else with_menubars=no with_scrollbars=no with_dialogs=no with_toolbars=no with_widgets=no fi dnl Always compile OffiX unless --without-offix is given, no dnl X11 support is compiled in, no standard Xmu is available, dnl or dragndrop support is disabled dnl Because OffiX support currently loses when more than one display dnl is in use, we now disable it by default -slb 07/10/1998. test "$window_system" != "x11" && with_offix=no if test "$with_xmu" != yes -a "$with_x11" = yes; then if test "$with_offix" = "yes" ; then AC_MSG_WARN([--with-offix forced to `no'; no real Xmu support]) fi with_offix=no fi if test "$with_dragndrop" = "no" ; then if test "$with_offix" = "yes" ; then AC_MSG_WARN([--with-offix forced to `no'; no generic Drag'n'Drop support]) fi with_offix=no fi if test "$with_offix" = "yes"; then AC_DEFINE([HAVE_OFFIX_DND], [1], [Description here!]) SXE_APPEND(offix.o, dnd_objs) SXE_APPEND(OffiX, dragndrop_proto) fi ## TTY Options ## =========== echo echo "TTY Options" echo "===========" dnl --------------------- dnl TTY-dependent options dnl --------------------- dnl checks for header files AC_CHECK_HEADERS([libintl.h nlist.h sgtty.h termio.h termios.h]) AS_IF([test "$with_tty" != "no"],[ AS_MESSAGE(checking for TTY-related features) dnl Check if needed calls are available at all... with_tty_libs="" detect_tty_libs="" for lib in ncurses curses tinfo terminfo termlib termcap do eval "with=\$with_${lib}" if test "$with" = no then AC_MSG_WARN(["Ignoring available ${lib} due to --with-${lib}=no"]) elif test "$with" = "yes" then with_tty_libs="$with_tty_libs $lib" else detect_tty_libs="$detect_tty_libs $lib" fi done # All terminal info functions needed tty_funcs="tgetent tgetstr tgetflag tgetnum tparm tgoto tputs" tty_libs="" # Filter by existing libs, printf is sure to be available with libc, so failure # would come from lib not find for lib in $with_tty_libs $detect_tty_libs do SXE_CHECK_LINK_LIB($lib) if eval "test \"\$sxe_cv_c_lib_${lib}\" != yes" then if eval "test \"\$with_${lib}\" = yes" then AC_MSG_WARN(["Ignoring --with-${lib}=yes due to library not linkable"]) eval "with_${lib}=no" fi continue fi AC_CHECK_LIB([$lib], [$tty_funcs]) # Lets verify we have all functions for func in $tty_func do if eval "test \"\$ac_cv_lib_${lib}_${func}\" = no" then AS_MESSAGE(["Skipping ${lib}, does not support to all TTY functions"]) lib="" break fi done tty_libs="$tty_libs $lib" done if test -n "$tty_libs" then AS_MESSAGE(["Considering libraries: $tty_libs"]) # Check which preferred lib can be used for func in $tty_funcs do # Make sure no flags are harmed during the search sxe_save_LIBS=$LIBS AC_SEARCH_LIBS($func, $tty_libs) LIBS=$sxe_save_LIBS done # Minimize the set of libraries tty_feature="" tty_fun="" for func in $tty_funcs do eval lib=\$ac_cv_search_${func} if test "$lib" != no -a "$lib" != "none required" then for feature in $tty_feature do if test "$feature" = "$lib" then lib="" func="" break; fi done tty_feature="$tty_feature $lib" tty_fun="$tty_fun $func" fi done fi if test -n "$tty_feature" then # Check all the expected functions still compile with all the added # libraries sxe_save_LIBS=$LIBS LIBS="$LIBS $tty_feature" AC_CHECK_FUNCS($tty_funcs) for func in $tty_fun do if eval "test \"\$ac_cv_func_${func}\" = no" then tty_feature="" break fi done LIBS=$sxe_save_LIBS fi if test -n "$tty_feature" then SXE_PREPEND($tty_feature, LIBS) for lib in $tty_feature do l=`echo $lib | sed -e 's/^-l//g'` eval "with_${l}=yes" done with_builtin_tty=no have_tty=yes else AC_MSG_WARN([Could not link all needed tty functions.] [Please consider installing ncurses.]) if test "$with_builtin_tty" = yes then AC_MSG_WARN([Using builtin tty support.]) have_tty=yes else AC_MSG_WARN([Use --with-builtin-tty=yes if you cannot use ncurses.]) have_tty=no fi fi if test "$with_builtin_tty" = yes then # Add our own wrappers using termcap SXE_ADD_SXEUITTY_OBJS(termcap.o) SXE_ADD_SXEUITTY_OBJS(tparam.o) have_tty=yes elif test "$have_tty" = yes then # Terminfo interface, since tgetent etc are available SXE_ADD_SXEUITTY_OBJS(terminfo.o) fi # Check headers, first generally AC_CHECK_HEADER(termcap.h, termcap_h_file=termcap.h) AC_CHECK_HEADER(term.h, term_h_file=term.h) if test "$have_ncurses" = yes; then # Verify how ncurses overrides them AC_CHECK_HEADER(ncurses/ncurses.h, curses_h_file=ncurses/ncurses.h) if test -z "$curses_h_file"; then AC_CHECK_HEADER(ncurses/curses.h, curses_h_file=ncurses/curses.h) fi if test -n "$curses_h_file"; then AC_CHECK_HEADER(ncurses/termcap.h, termcap_h_file=ncurses/termcap.h) AC_CHECK_HEADER(ncurses/term.h, term_h_file=ncurses/term.h) else AC_CHECK_HEADER(ncurses.h, curses_h_file=ncurses.h) fi if test -z "$curses_h_file" ; then dnl Try again, and check for the bogus ncurses/ include bug. dnl (i.e. ncurses/curses.h bogusly includes instead of dnl ) save_c_switch_site="$c_switch_site" c_switch_site="$c_switch_site -I/usr/include/ncurses" AC_CHECK_HEADER(ncurses/ncurses.h, curses_h_file=ncurses/ncurses.h) if test -z "$curses_h_file"; then AC_CHECK_HEADER(ncurses/curses.h, curses_h_file=ncurses/curses.h) fi if test -n "$curses_h_file"; then AC_CHECK_HEADER(ncurses/termcap.h, termcap_h_file=ncurses/termcap.h) AC_CHECK_HEADER(ncurses/term.h, term_h_file=ncurses/term.h) else AC_CHECK_HEADER(ncurses.h, curses_h_file=ncurses.h) fi if test -n "$curses_h_file" then AC_MSG_WARN([Your system has the bogus ncurses include bug.]) AC_CHECK_HEADER(termcap.h, curses_h_file=termcap.h) AC_CHECK_HEADER(term.h, curses_h_file=term.h) else c_switch_site="$save_c_switch_site" fi fi fi if test -n "$curses_h_file"; then AC_DEFINE_UNQUOTED([HAVE_CURSES_H], [1], [There is a curses.h header file available]) fi if test -n "$termcap_h_file"; then AC_DEFINE_UNQUOTED([HAVE_TERMCAP_H], [1], [There is a termcap.h header available]) fi if test -n "$term_h_file"; then AC_DEFINE_UNQUOTED([HAVE_TERM_H], [1], [There is a term.h header available]) fi AC_DEFINE_UNQUOTED([CURSES_H_FILE], ["${curses_h_file-curses.h}"], [The curses.h header file]) AC_DEFINE_UNQUOTED([TERMCAP_H_FILE], ["${termcap_h_file-termcap.h}"], [The termcap.h header file]) AC_DEFINE_UNQUOTED([TERM_H_FILE], ["${term_h_file-term.h}"], [The term.h header file]) ],[ for feature in ncurses curses termcap terminfo termlib gpm; do if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then AC_MSG_WARN([--with-${feature} ignored: Not valid without TTY support]) fi eval "with_${feature}=\"\"" done ]) AS_IF([test "$with_tty" != "no" -a "$have_tty" != no], [ AC_DEFINE([HAVE_TTY], [1], [Include TTY support for SXEmacs]) AC_DEFINE([HAVE_UNIXOID_EVENT_LOOP], [1], [Include Unixoid event loop - TTY provided]) SXE_ADD_SXEUITTY_OBJS([console-tty.o device-tty.o event-tty.o frame-tty.o objects-tty.o redisplay-tty.o cm.o]) ]) AS_IF([test "$with_tty" != "no" -a "$have_tty" != no], [ dnl General Purpose Mouse (libgpm) support AS_IF([test "$with_gpm" != "no"], [ AC_CHECK_HEADER(gpm.h, [ AC_CHECK_LIB(gpm, Gpm_Open, have_gpm=yes)]) AS_IF([test "$have_gpm" = "yes"], [ with_gpm=yes AC_DEFINE([HAVE_GPM], [1], [General Purpose Mouse (libgpm) is available]) SXE_ADD_SXEUITTY_OBJS(gpmevent.o) SXE_PREPEND(-lgpm, LIBS) ],[ with_gpm=no ]) ]) ]) SXE_CHECK_UI_SUFFICIENCY AS_IF([test -z "$window_system" -o "$window_system" = "none" ], [ dnl It ought to be reasonable to have no output device at all, and only use dnl SXEmacs in --batch mode. AS_IF([test "$have_tty" = "no"], AC_MSG_ERROR([No window system nor TTY support. SXEmacs cannot be compiled. Check INSTALL and PROBLEMS files for hints on how to solve.])) ]) ## Uncertain options ## ================= echo echo "Uncertain options" echo "=================" ## for native xml support one day SXE_LANG_CHECK_XML SXE_CHECK_SUFFICIENCY([libxml2], [xml language]) ## for BoehmGC support one day SXE_CHECK_BDWGC SXE_CHECK_SUFFICIENCY([bdwgc], [Boehm-Demers-Weiser GC]) if test "$with_experimental_features_bdwgc" = "yes"; then AC_MSG_CHECKING([if bdwgc prerequisites are met]) AC_MSG_RESULT([${have_bdwgc}]) have_experimental_features_bdwgc=${have_bdwgc} if test "${have_bdwgc}" = "yes"; then AC_DEFINE([EF_USE_BDWGC], [1], [Whether to actually use the BDWGC!]) fi fi dnl This one is for the static initializeds variables in dnl offix.c, so that the thing is dumped after lastfile.o AC_SUBST(dnd_objs) dnl Autodetect dll support LIBSTDCPP= AC_SUBST(LIBSTDCPP) ## Multimedia Options ## ================== echo echo "Multimedia Options" echo "==================" dnl ---------------------- dnl Graphics libraries dnl ---------------------- if test "$with_image_xpm" = "yes"; then SXE_MM_CHECK_XPM([have_image_xpm=yes], [have_image_xpm=no]) AC_MSG_CHECKING([for sufficient xpm support]) if test "$have_image_xpm" = "yes"; then AC_MSG_RESULT([yes]) AC_DEFINE([HAVE_XPM], [1], [Description here!]) SXE_PREPEND([-lXpm], [MM_LIBS]) else AC_MSG_RESULT([no]) have_image_xpm=no fi fi AM_CONDITIONAL([WITH_BDWGC], [test "$with_experimental_features_bdwgc" = "yes" -a \ "$have_bdwgc" = "yes"]) if test "$with_image_xface" = "yes"; then SXE_MM_CHECK_XFACE([have_image_xface=yes], [have_image_xface=no]) AC_MSG_CHECKING([for sufficient xface support]) if test "$have_image_xface" = "yes"; then AC_MSG_RESULT([yes]) AC_DEFINE([HAVE_XFACE], [1], [dnl Both compface.h and libcompface have been found.]) SXE_PREPEND([-lcompface], [MM_LIBS]) else AC_MSG_RESULT([no]) have_image_xface=no fi fi if test "$with_image_gif" = "yes"; then SXE_MM_CHECK_GIF([have_image_gif=yes], [have_image_gif=no]) AC_MSG_CHECKING([for sufficient gif support]) if test "$have_image_gif" = "yes"; then AC_MSG_RESULT([yes]) AC_DEFINE([HAVE_GIF], [1], [Enable internal GIF decoding]) SXE_ADD_MM_OBJS(dgif_lib.o gif_io.o) else AC_MSG_RESULT([no]) fi fi SXE_MM_SEARCH_INFLATE if test "$with_image_jpeg" = "yes"; then SXE_MM_CHECK_JPEG([have_image_jpeg=yes], [have_image_jpeg=no]) AC_MSG_CHECKING([for sufficient jpeg support]) if test "$have_image_jpeg" = "yes"; then AC_MSG_RESULT([yes]) AC_DEFINE([HAVE_JPEG], [1], [ Both jpeglib.h and libjpeg have been found.]) SXE_PREPEND([-ljpeg], [MM_LIBS]) else AC_MSG_RESULT([no]) fi fi if test "$with_image_png" = "yes"; then AC_DEFINE([WITH_PNG], [1], [Define to 1 if png support is desired.]) SXE_MM_CHECK_PNG([have_image_png="yes"], [have_image_png="no"]) SXE_MSG_CHECKING([for sufficient PNG support]) SXE_MSG_RESULT([${sxe_cv_feat_png}]) if test "$sxe_cv_feat_png" = "yes"; then SXE_PREPEND_UNDUP([$PNG_CPPFLAGS], [MM_CPPFLAGS]) SXE_PREPEND_UNDUP([$PNG_LDFLAGS], [MM_LDFLAGS]) SXE_PREPEND([$PNG_LIBS], [MM_LIBS]) fi fi if test "$with_image_tiff" = "yes"; then SXE_MM_CHECK_TIFF([have_image_tiff=yes], [have_image_tiff=no]) AC_MSG_CHECKING([for sufficient TIFF support]) if test "$have_image_tiff" = "yes"; then AC_MSG_RESULT([yes]) AC_DEFINE([HAVE_TIFF], [1], [ Both tiffio.h and libtiff have been found.]) SXE_PREPEND([-ltiff], [MM_LIBS]) else AC_MSG_RESULT([no]) fi fi dnl Check for audio output and media stream libraries. dnl internal media stream analysis support if test "$with_media_internal" != "no"; then need_media_internal=yes have_media_internal=yes fi ## Since almost any of the below tests uses pkgconfig we make a ## once-for-all-times check now SXE_SEARCH_CONFIG_PROG([pkg-config]) if test "$have_pkg_config" = "yes" -a -n "$with_site_prefixes"; then for dir in $with_site_prefixes; do pkgcfg_dir="${dir}/lib/pkgconfig" if test -n "$PKG_CONFIG_PATH"; then PKG_CONFIG_PATH="$PKG_CONFIG_PATH":"$pkgcfg_dir" else PKG_CONFIG_PATH="$pkgcfg_dir" fi done export PKG_CONFIG_PATH fi dnl libsndfile support if test "$with_media_sndfile" != "no"; then SXE_MM_CHECK_SNDFILE([have_media_sndfile=yes], [have_media_sndfile=no]) AC_MSG_CHECKING([for sufficient sndfile support]) if test "$have_media_sndfile" = "yes"; then AC_MSG_RESULT([yes]) SNDFILE_LIBS=`$PKG_CONFIG --libs sndfile` SNDFILE_CPPFLAGS=`$PKG_CONFIG --cflags sndfile` SNDFILE_VERSION=`$PKG_CONFIG --modversion sndfile` SXE_PREPEND([$SNDFILE_LIBS], [MM_LIBS]) SXE_PREPEND_UNDUP([$SNDFILE_CPPFLAGS], [MM_CPPFLAGS]) SXE_ADD_MM_OBJS([media-sndfile.o]) AC_DEFINE([HAVE_SNDFILE], [1], [Whether we appear to have support for the sndfile library!]) AC_DEFINE_UNQUOTED([SNDFILE_VERSION], [$SNDFILE_VERSION], [Version of the sndfile library!]) else AC_MSG_RESULT([no]) have_media_sndfile=no fi fi dnl libavcodec/libavformat/ffmpeg support if test "$with_media_ffmpeg" != "no"; then SXE_MM_CHECK_FFMPEG([have_media_ffmpeg=yes], [have_media_ffmpeg=no]) AC_MSG_CHECKING([for sufficient FFmpeg support]) if test "$have_media_ffmpeg" = "yes"; then AC_MSG_RESULT([yes]) FFMPEG_LIBS=`$PKG_CONFIG --libs libavformat` FFMPEG_CPPFLAGS=`$PKG_CONFIG --cflags libavformat` SXE_PREPEND($FFMPEG_LIBS, MM_LIBS) SXE_PREPEND_UNDUP($FFMPEG_CPPFLAGS, MM_CPPFLAGS) SXE_ADD_MM_OBJS([media-ffmpeg.o]) AC_DEFINE([HAVE_FFMPEG], [1], [Description here!]) else AC_MSG_RESULT([no]) have_media_ffmpeg=no fi fi dnl sox support if test "$with_media_sox" != "no"; then SXE_MM_CHECK_SOX([have_media_sox=yes], [have_media_sox=no]) AC_MSG_CHECKING([for sufficient SoX support]) if test "$sxe_cv_feat_sox" = "yes"; then AC_MSG_RESULT([yes]) SXE_ADD_MM_OBJS([media-sox.o]) SXE_PREPEND_UNDUP([$sox_cppflags], [MM_CPPFLAGS]) SXE_PREPEND_UNDUP([$sox_ldflags], [MM_LDFLAGS]) SXE_PREPEND([$sox_libs], [MM_LIBS]) AC_DEFINE([HAVE_SOX], [1], [Description here!]) else AC_MSG_RESULT(no) have_media_sox=no fi fi dnl mad support if test "$with_media_mad" != "no"; then SXE_MM_CHECK_MAD([have_media_mad=yes], [have_media_mad=no]) AC_MSG_CHECKING([for sufficient mad support]) if test "$have_media_mad" = "yes"; then AC_MSG_RESULT([yes]) SXE_ADD_MM_OBJS([media-mad.o]) SXE_PREPEND([-lmad], [MM_LIBS]) AC_DEFINE([HAVE_MAD], [1], [Description here!]) else AC_MSG_RESULT(no) have_media_mad=no fi fi ## file/libmagic support if test "$with_media_magic" != "no"; then SXE_MM_CHECK_MAGIC([have_media_magic=yes], [have_media_magic=no]) AC_MSG_CHECKING([for sufficient magic support]) if test "$have_media_magic" = "yes"; then AC_MSG_RESULT([yes]) SXE_ADD_MM_OBJS([media-magic.o]) SXE_PREPEND([-lmagic], [MM_LIBS]) AC_DEFINE([HAVE_MAGIC], [1], [Whether libmagic is available]) else AC_MSG_RESULT([no]) have_media_magic=no fi fi dnl Autodetect OSS sound AS_MESSAGE([checking for OSS sound support]) dnl test -z "$with_sound_oss" -a -n "$with_oss_sound_lib" && with_sound_oss=yes dnl Check for Linux/BSD sound (called OSS) if test "$with_sound_oss" != "no"; then SXE_MM_CHECK_OSS([have_sound_oss=yes], [have_sound_oss=no]) AC_MSG_CHECKING([for sufficient OSS support]) if test "$have_sound_oss" = "yes"; then AC_MSG_RESULT([yes]) SXE_ADD_MM_OBJS([sound-oss.o]) AC_DEFINE([HAVE_INTERNAL_SOUND], [1], [Description here!]) AC_DEFINE([HAVE_OSS_SOUND], [1], [Description here!]) else AC_MSG_RESULT([no]) have_sound_oss=yes fi fi dnl NAS Sound support if test "$with_sound_nas" != "no"; then SXE_MM_CHECK_NAS([have_sound_nas=yes], [have_sound_nas=no]) AC_MSG_CHECKING([for sufficient NAS support]) if test "$have_sound_nas" = "yes"; then AC_MSG_RESULT([yes]) AC_DEFINE([HAVE_NAS_SOUND], [1], [Description here!]) SXE_ADD_MM_OBJS([sound-nas.o]) SXE_PREPEND([-laudio], [MM_LIBS]) else AC_MSG_RESULT([no]) have_nas_sound=no fi fi dnl ESD Sound support if test "$with_sound_esd" != "no"; then SXE_MM_CHECK_ESD([have_sound_esd=yes], [have_sound_esd=no]) AC_MSG_CHECKING([for sufficient ESD support]) if test "$have_sound_esd" = "yes"; then AC_MSG_RESULT([yes]) need_internal_media=yes SXE_ADD_MM_OBJS([sound-esd.o]) ESD_LIBS=$("${ESD_CONFIG}" --libs) SXE_PREPEND(["${ESD_LIBS}"], [MM_LIBS]) AC_DEFINE([HAVE_ESD_SOUND], [1], [Description here!]) else AC_MSG_RESULT([no]) have_esd_sound=no fi fi dnl PulseAudio Sound support if test "$with_sound_pulse" != "no"; then SXE_MM_CHECK_PULSE([have_sound_pulse=yes], [have_sound_pulse=no]) AC_MSG_CHECKING([for sufficient PulseAudio support]) if test "$have_sound_pulse" = "yes"; then AC_MSG_RESULT([yes]) need_internal_media=yes SXE_ADD_MM_OBJS([sound-pulse.o]) SXE_PREPEND($PULSE_LIBS, MM_LIBS) SXE_PREPEND_UNDUP($PULSE_CFLAGS, MM_CPPFLAGS) AC_DEFINE([HAVE_PULSE_SOUND], [1], [Whether to put in support for PulseAudio.]) else AC_MSG_RESULT(no) have_sound_pulse=no fi fi dnl Jack Sound support if test "$with_sound_jack" != "no"; then SXE_MM_CHECK_JACK([have_sound_jack=yes], [have_sound_jack=no]) AC_MSG_CHECKING([for sufficient Jack support]) if test "$have_sound_jack" = "yes"; then AC_MSG_RESULT([yes]) dnl okay, we have Jack on the system, but we have no working dnl interface to it :( JACK_LIBS=`$PKG_CONFIG --libs jack` JACK_VERSION=`$PKG_CONFIG --modversion jack` need_internal_media=yes SXE_ADD_MM_OBJS([sound-jack.o]) SXE_PREPEND([$JACK_LIBS], [MM_LIBS]) AC_DEFINE([HAVE_JACK_SOUND], [1], [Description here!]) AC_DEFINE_UNQUOTED([JACK_VERSION], [$JACK_VERSION], [Description here!]) else AC_MSG_RESULT(no) fi fi dnl alsa sound support if test "$with_sound_alsa" != "no"; then SXE_MM_CHECK_ALSA([have_sound_alsa=yes], [have_sound_alsa=no]) AC_MSG_CHECKING([for sufficient ALSA support]) if test "$have_sound_alsa" = "yes"; then AC_MSG_RESULT([yes]) SXE_ADD_MM_OBJS([sound-alsa.o]) SXE_PREPEND([-lasound], [MM_LIBS]) else AC_MSG_RESULT(no) have_sound_alsa=no fi fi dnl libao sound support if test "$with_sound_ao" != "no"; then SXE_MM_CHECK_AO([have_sound_ao=yes], [have_sound_ao=no]) AC_MSG_CHECKING([for sufficient AO support]) if test "$have_sound_ao" = "yes"; then AC_MSG_RESULT([yes]) AO_LIBS=`$PKG_CONFIG --libs ao` ao_version=`$PKG_CONFIG --modversion ao` SXE_ADD_MM_OBJS([sound-ao.o]) SXE_PREPEND($AO_LIBS, MM_LIBS) AC_DEFINE([HAVE_AO_SOUND], [1], [Description here!]) AC_DEFINE_UNQUOTED([AO_VERSION], [$ao_version], [Description here!]) else AC_MSG_RESULT(no) have_sound_ao=no fi fi if test \ "$have_sound_alsa \ $have_sound_ao \ $have_sound_esd \ $have_sound_jack \ $have_sound_nas \ $have_sound_pulse" != "no no no no no no"; then AC_DEFINE([HAVE_AUDIO], [1], [Description here!]) fi if test "$need_internal_media" = "yes"; then with_internal_media=yes AC_DEFINE([HAVE_INTERNAL_MEDIA], [1], [Description here!]) SXE_ADD_MM_OBJS([media-internal.o]) fi AC_SUBST([MM_LIBS]) AC_SUBST([MM_CPPFLAGS]) AC_SUBST([MM_LDFLAGS]) SXE_SUBST_MM_OBJS ## Internationalisation Options ## ============================ echo echo "Internationalisation Options" echo "============================" dnl ---------------------- dnl Mule-dependent options dnl ---------------------- dnl if test "$with_mule" = "yes" && test ! -d "$sxe_srcdir/lisp/mule"; then dnl echo "Attempt to Build with Mule without Mule/Lisp" dnl echo "Please install the SXEmacs/Mule tarball or" dnl echo "rerun configure with --with-mule=no" dnl exit 1 dnl fi if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then AC_DEFINE([FILE_CODING], [1], [Description here!]) SXE_ADD_MULE_OBJS(file-coding.o) fi if test "$with_mule" = "yes" ; then SXE_CHECK_MULE else dnl "$with_mule" = "no" for feature in xim canna wnn; do if eval "test -n \"\$with_${feature}\" -a \ \"\$with_${feature}\" != no" ; then AC_MSG_WARN([--with-${feature} ignored: Not valid without Mule support]) fi eval "with_${feature}=no" done fi dnl with_mule SXE_SUBST_MULE_OBJS AM_CONDITIONAL([WITH_MULE], [test "$with_mule" = "yes"]) dnl At this point, we know whether we need the motif lib or not. if test "$need_motif" = "yes" ; then SXE_PREPEND([-lXm], [libs_x]) dnl AIX needs the following library for use with Motif AC_CHECK_LIB([i18n], [layout_object_getvalue]) if test "$ac_cv_lib_i18n_layout_object_getvalue" = "yes"; then SXE_PREPEND([-li18n], [libs_x]) fi fi dnl getaddrinfo() is borked under hpux11 if test "$ac_cv_func_getaddrinfo" != "no" ; then case "$opsys" in hpux11 ) AC_MSG_WARN([Use of getaddrinfo is disabled for HP-UX 11.XX.]) ac_cv_func_getaddrinfo=no ;; esac fi ## Database Options ## ================ echo echo "Database Options" echo "================" dnl Database support dnl We do not necessarily have to have libdb/lib(g)dbm for DB/(G)DBM support. dnl On FreeBSD, both DB and DBM are part of libc. dnl By default, we check for DBM support in libgdbm, then libc, then libdbm. ## initialise values have_database_berkdb=no have_database_gdbm=no have_database_dbm=no if test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \ != "no no no"; then AS_MESSAGE(checking for database support) fi dnl Check for ndbm.h, required for either kind of DBM support. if test "$with_database_gdbm $with_database_dbm" != "no no"; then SXE_CHECK_NDBM if test "$sxe_cv_feat_ndbm" = "no"; then have_database_gdbm="no" have_database_dbm="no" fi fi dnl Check for DBM support in libgdbm or libgdbm_compat. if test "$with_database_gdbm" != "no"; then SXE_CHECK_GDBM if test "$sxe_cv_feat_gdbm" = "yes"; then have_database_gdbm="yes" else have_database_gdbm="no" fi fi dnl Check for DBM support in libc and libdbm. if test "$with_database_dbm" != "no"; then SXE_CHECK_DBM if test "$sxe_cv_feat_gdbm" != "yes" -a \ "$sxe_cv_feat_dbm" = "yes"; then have_database_dbm="yes" else have_database_dbm="no" fi fi dnl Check for Berkeley DB. if test "$with_database_berkdb" != "no"; then SXE_CHECK_BERKDB if test "$sxe_cv_feat_berkdb" = "yes"; then have_database_berkdb="yes" else have_database_berkdb="no" fi fi if test "$have_database_gdbm $have_database_dbm $have_database_berkdb" \ != "no no no"; then AC_DEFINE([HAVE_DATABASE], [1], [Description here!]) SXE_ADD_DB_OBJS([database.o]) SXE_CHECK_NDBM_BERKDB_CONFLICT if test "$sxe_cv_db_ndbm_berkdb_conflict" = "yes"; then ## can't do nothing because the way we designed it ## is going to conflict at compile time have_database_gdbm="no" have_database_dbm="no" elif test "$have_database_gdbm $have_database_dbm" != "no no"; then AC_DEFINE([HAVE_DBM], [1], [Description here!]) ## Also, tell make about the DBM support we detected. if test -n "$libdbm"; then SXE_PREPEND([$libdbm], [DB_LIBS]) fi fi fi dnl Autodetect LDAP if test "$with_ldap" != "no"; then SXE_CHECK_LDAP fi if test "$have_ldap" = "yes"; then AC_DEFINE([HAVE_LDAP], [1], [Description here!]) SXE_ADD_DB_OBJS(eldap.o) if test "$have_ldap_des" = "yes" ; then SXE_PREPEND(-ldes, DB_LIBS) fi if test "$have_ldap_krb" = "yes" ; then SXE_PREPEND(-lkrb, DB_LIBS) fi if test "$have_ldap_lber" = "yes" ; then SXE_PREPEND(-llber, DB_LIBS) fi SXE_PREPEND(-lldap, DB_LIBS) dnl save our values until here save_LIBS="$LIBS" LIBS="$DB_LIBS $LIBS" AC_CHECK_FUNCS( [ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result]) dnl and restore LIBS="$save_LIBS" fi dnl Autodetect PostgreSQL if test "x$with_postgresql" != "xno"; then SXE_CHECK_POSTGRESQL fi SXE_SUBST_DB_OBJS dnl Usage tracking (undocumented and likely unused option) if test "$usage_tracking" = "yes"; then AC_DEFINE([USAGE_TRACKING], [1], [Description here!]) SXE_PREPEND(-Bstatic -lut -Bdynamic, LIBS) fi dnl Unfortunately, just because we can link doesn't mean we can run. dnl One of the above link tests may have succeeded but caused resulting dnl executables to fail to run. Also any tests using AC_RUN_IFELSE will dnl have reported incorrect results. AC_RUN_IFELSE([AC_LANG_SOURCE([[int main(int c,char *v[]){return 0;}]])],[:],[ echo "" echo "*** PANIC *** The C compiler can no longer build working executables." echo "*** PANIC *** Please examine the tail of config.log for runtime errors." echo "*** PANIC *** The most likely reason for this problem is that configure" echo "*** PANIC *** links with shared libraries, but those libraries cannot be" echo "*** PANIC *** found at run time." echo "*** PANIC ***" echo "*** PANIC *** On a Linux system, edit /etc/ld.so.conf and re-run ldconfig." echo "*** PANIC *** On other systems, try telling configure where to find the" echo "*** PANIC *** shared libraries using the --with-site-runtime-libraries option" echo "*** PANIC ***" echo "*** PANIC *** Another way to shoot yourself in the foot is to specify" echo "*** PANIC *** --with-FEATURE when FEATURE is not actually installed" echo "*** PANIC *** on your system. Don't do that." exit 1], [AS_MESSAGE(cannot cross-compile)]) dnl Process support AC_DEFINE([HAVE_UNIX_PROCESSES], [1], [Description here!]) dnl -------------------------------- dnl Compute SUBST-itutable variables dnl -------------------------------- dnl We ignore (C|LD)_SWITCH_X_(MACHINE|SYSTEM) dnl Use SXE_CONSECUTIVE_UNDUP instead of plain assignment statements to remove extraneous blanks if test "$with_module_support" = "yes"; then ld_libs_module= else SXE_CONSECUTIVE_UNDUP(ld_libs_module, $ldap_libs $postgresql_libs) fi SXE_UNDUP(CFLAGS, $CFLAGS) SXE_UNDUP(c_switch_general, -DHAVE_CONFIG_H $c_switch_site $c_switch_machine $c_switch_system $CFLAGS $CPPFLAGS) SXE_UNDUP(c_switch_window_system, $c_switch_x_site $X_CFLAGS) SXE_UNDUP(c_switch_all, $c_switch_general $c_switch_window_system) SXE_UNDUP(ld_switch_general, $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_run) SXE_UNDUP(ld_switch_window_system, $ld_switch_x_site) SXE_UNDUP(ld_switch_all, $ld_switch_general $ld_switch_window_system) dnl Since some systems need libs to be restated later, we can't just dedup, we can only safely dedup dnl consecutive occurrences SXE_CONSECUTIVE_UNDUP(ld_libs_general, $LIBS $libs_machine $libs_system $libs_standard) SXE_CONSECUTIVE_UNDUP(ld_libs_window_system, $X_EXTRA_LIBS $libs_x $X_PRE_LIBS) SXE_CONSECUTIVE_UNDUP(ld_libs_all, $OPENSSL_LIBS $DB_LIBS $ENT_LIBS $MM_LIBS $ld_libs_window_system $ld_libs_general $ld_libs_module) dnl For no-module builds, make the src dir last if test "$with_module_support" = "no"; then SXE_APPEND(src, MAKE_SUBDIR) dnl is that still important? fi EMACS=$sxe_blddir/src/$PROGNAME AC_SUBST(EMACS) dnl Compute lists of Makefiles and subdirs AC_SUBST(SRC_SUBDIR_DEPS) internal_makefile_list="Makefile.in" SUBDIR_MAKEFILES='' test -d lock || mkdir lock for dir in $MAKE_SUBDIR; do case "$dir" in */* ) dnl Implement mkdir -p ( for d in `echo $dir | sed 's:/: :g'` ; do test -d "$d" || mkdir "$d"; cd "$d" done ) ;; * ) test -d "$dir" || mkdir "$dir" ;; esac SXE_SPACE(SUBDIR_MAKEFILES, $SUBDIR_MAKEFILES $dir/Makefile $dir/Makefile) SXE_SPACE(internal_makefile_list, $internal_makefile_list $dir/Makefile.in) done AC_SUBST(INSTALL_ARCH_DEP_SUBDIR) AC_SUBST(MAKE_SUBDIR) AC_SUBST(MAKE_AM_SUBDIR) AC_SUBST(SUBDIR_MAKEFILES) dnl ---------------------------------------------- dnl Create some auxiliary files for developers. dnl ---------------------------------------------- dnl Create a useful TAGS file if test -f "$sxe_srcdir/TAGS" -a ! -f "TAGS"; then test "$extra_verbose" = "yes" && echo "creating TAGS" echo " $sxe_srcdir/TAGS,include" > "TAGS" fi dnl Create top level .sbinit for Sun compilers if test "$__SUNPRO_C" = "yes"; then test "$extra_verbose" = "yes" && echo "creating .sbinit" ( echo "# For use with Sun WorkShop's Source browser." echo "# See sbquery(1) and sbinit(4) for more information" for dir in $MAKE_SUBDIR; do echo "import $dir"; done ) > .sbinit fi ### whether to build with profile.o AC_RUN_IFELSE([AC_LANG_SOURCE([[ int main(int c, char *v[]) { #ifdef HAVE_SETITIMER return 1; #else return 0; #endif }]])], [./conftest; have_setitimer=$?], [have_setitimer=$?],[have_setitimer=0]) AM_CONDITIONAL([HAVE_SETITIMER], [test "$have_setitimer" = "1"]) dnl There are no more compile tests; remove the core they created. rm -f core dnl -------------------------------------------------- dnl Substitute into Makefile, config.h and sxe-paths.h dnl -------------------------------------------------- dnl what sort of things to edit into Makefile, config.h and sxe-paths.h dnl configuration here uncanonicalized to avoid exceeding size limits. AC_SUBST(PROGNAME) AC_SUBST(MULE) AC_SUBST(HAVE_LIBFFI) AC_SUBST(version) AC_SUBST(VERSION) AC_SUBST(old_version) AC_SUBST(inststaticdir) AC_SUBST(instvardir) AC_SUBST(instvarsepdir) AC_SUBST(sxe_srcdir) AC_SUBST(emodsrcdir) AC_SUBST(sxe_blddir) AC_SUBST(emodblddir) AC_SUBST(bindir) AC_SUBST(datarootdir) AC_SUBST(datadir) AC_SUBST(statedir) AC_SUBST(libdir) AC_SUBST(mandir) AC_SUBST(extra_includes) AC_SUBST(prefix) AC_SUBST(PREFIX_USER_DEFINED) dnl Yo, Stephen Bourne! I want to marry you! PREFIX=$prefix while true; do case "$PREFIX" in *\$* ) eval "PREFIX=\"${PREFIX}\"" ;; *) break ;; esac done AC_SUBST(PREFIX) AC_SUBST(exec_prefix) AC_SUBST(EXEC_PREFIX_USER_DEFINED) EXEC_PREFIX=$exec_prefix while true; do case "$EXEC_PREFIX" in *\$* ) eval "EXEC_PREFIX=\"${EXEC_PREFIX}\"" ;; *) break ;; esac done AC_SUBST(EXEC_PREFIX) AC_SUBST(infodir) AC_SUBST(INFODIR_USER_DEFINED) INFODIR=$infodir while true; do case "$INFODIR" in *\$* ) eval "INFODIR=\"${INFODIR}\"" ;; *) break ;; esac done AC_SUBST(INFODIR) AC_SUBST(infopath,$with_infopath) AC_SUBST(INFOPATH_USER_DEFINED) INFOPATH=$with_infopath while true; do case "$INFOPATH" in *\$* ) eval "INFOPATH=\"${INFOPATH}\"" ;; *) break ;; esac done AC_SUBST(INFOPATH) if test -z "$with_module_path"; then with_module_path="~/.sxemacs/${configuration}/modules:${libdir}/${PROGNAME}/${configuration}/site-modules:${libdir}/${instvardir}/${configuration}/modules" fi AC_SUBST(module_path,$with_module_path) AC_SUBST(MODULE_PATH_USER_DEFINED) MODULE_PATH=$with_module_path while true; do case "$MODULE_PATH" in *\$* ) eval "MODULE_PATH=\"${MODULE_PATH}\"" ;; *) break ;; esac done AC_SUBST(MODULE_PATH) if test -z "$with_package_prefix" ; then with_package_prefix=${prefix}/share/sxemacs fi if test -z "$with_package_path" && test -n "$with_package_prefix" ; then if test "$with_mule" = "yes" ; then with_package_path="~/.sxemacs/site-packages:~/.sxemacs/sxemacs-packages:~/.sxemacs/xemacs-packages:~/.sxemacs/mule-packages" with_package_path="${with_package_path}:${with_package_prefix}/site-packages:${with_package_prefix}/sxemacs-packages:${with_package_prefix}/xemacs-packages:${with_package_prefix}/mule-packages" else with_package_path="~/.sxemacs/site-packages:~/.sxemacs/sxemacs-packages:~/.sxemacs/xemacs-packages" with_package_path="${with_package_path}:${with_package_prefix}/site-packages:${with_package_prefix}/sxemacs-packages:${with_package_prefix}/xemacs-packages" fi fi AC_SUBST(package_path,$with_package_path) AC_SUBST(PACKAGE_PATH_USER_DEFINED) PACKAGE_PATH=$with_package_path while true; do case "$PACKAGE_PATH" in *\$* ) eval "PACKAGE_PATH=\"${PACKAGE_PATH}\"" ;; *) break ;; esac done AC_SUBST(PACKAGE_PATH) AC_SUBST(lispdir, $with_lispdir) AC_SUBST(LISPDIR_USER_DEFINED) LISPDIR=$with_lispdir while true; do case "$LISPDIR" in *\$* ) eval "LISPDIR=\"${LISPDIR}\"" ;; *) break ;; esac done AC_SUBST(LISPDIR) AC_SUBST(moduledir,$with_moduledir) AC_SUBST(MODULEDIR_USER_DEFINED) MODULEDIR=$with_moduledir while true; do case "$MODULEDIR" in *\$* ) eval "MODULEDIR=\"${MODULEDIR}\"" ;; *) break ;; esac done AC_SUBST(MODULEDIR) AC_SUBST([sitelispdir], [$with_sitelispdir]) AC_SUBST([SITELISPDIR_USER_DEFINED]) SITELISPDIR=$sitelispdir while true; do case "$SITELISPDIR" in *\$* ) eval "SITELISPDIR=\"${SITELISPDIR}\"" ;; *) break ;; esac done AC_SUBST(SITELISPDIR) AC_SUBST(sitemoduledir,$with_sitemoduledir) AC_SUBST(SITEMODULEDIR_USER_DEFINED) SITEMODULEDIR=$with_sitemoduledir while true; do case "$SITEMODULEDIR" in *\$* ) eval "SITEMODULEDIR=\"${SITEMODULEDIR}\"" ;; *) break ;; esac done AC_SUBST(SITEMODULEDIR) AC_SUBST(etcdir,$with_etcdir) AC_SUBST(ETCDIR_USER_DEFINED) ETCDIR=$with_etcdir while true; do case "$ETCDIR" in *\$* ) eval "ETCDIR=\"${ETCDIR}\"" ;; *) break ;; esac done AC_SUBST(ETCDIR) AC_SUBST(archlibdir,$with_archlibdir) AC_SUBST(ARCHLIBDIR_USER_DEFINED) ARCHLIBDIR=$with_archlibdir while true; do case "$ARCHLIBDIR" in *\$* ) eval "ARCHLIBDIR=\"${ARCHLIBDIR}\"" ;; *) break ;; esac done AC_SUBST(ARCHLIBDIR) AC_SUBST(docdir,$with_docdir) AC_SUBST(DOCDIR_USER_DEFINED) DOCDIR=$with_docdir while true; do case "$DOCDIR" in *\$* ) eval "DOCDIR=\"${DOCDIR}\"" ;; *) break ;; esac done AC_SUBST(DOCDIR) AC_SUBST(docdir) AC_SUBST(bitmapdir) dnl The following flags combine all the information from: dnl - command line options (user always gets priority) dnl - user environment variables dnl - determined by configure dnl - the s&m header files (required for ellcc) AC_SUBST(machfile) AC_SUBST(opsysfile) AC_SUBST(c_switch_general) AC_SUBST(c_switch_window_system) AC_SUBST(c_switch_all) AC_SUBST(ld_switch_general) AC_SUBST(ld_switch_window_system) AC_SUBST(ld_switch_all) AC_SUBST(ld_libs_general) AC_SUBST(ld_libs_window_system) AC_SUBST(ld_libs_all) AC_SUBST(CFLAGS) AC_SUBST(CPPFLAGS) AC_SUBST(LDFLAGS) RECURSIVE_MAKE_ARGS="\$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'" if test -z "$MAKE"; then MAKE=make fi case `$MAKE --version 2>/dev/null` in GNU\ Make*) AM_MAKEFLAGS="-w $AM_MAKEFLAGS" RECURSIVE_MAKE_ARGS="-w $RECURSIVE_MAKE_ARGS" ;; *) echo =================================== echo $MAKE does not seem to be GNU Make echo If you find makefile errors please try using GNU Make as some echo autoconf constructs may not be proper for your make variant echo =================================== ;; esac AC_SUBST(RECURSIVE_MAKE_ARGS) AC_SUBST(AM_MAKEFLAGS) AC_SUBST(sound_cflags) AC_SUBST(AR) AC_SUBST(RANLIB) AC_SUBST(SXEMACS_CC) AC_SUBST(SXE_CFLAGS) SXE_SUBST_CORE_OBJS() SXE_SUBST_CRUFT_OBJS dnl The default is yes if test "$with_prefix" = "yes"; then AC_DEFINE([PREFIX_USER_DEFINED], [1], [Description here!]) fi dnl Should this stay even though --with-site-modules is no longer an dnl option? It is used in emacs.c for when the -no-site-modules cmd line dnl opt is used. That cmd line opt definitely has usefullness. Sebastian? dnl --SY. dnl The default is yes if test "$with_site_modules" = "no"; then AC_DEFINE([INHIBIT_SITE_MODULES], [1], [Description here!]) fi dnl SXE_SPACE(ac_configure_args, $ac_configure_args) AC_DEFINE_UNQUOTED([EMACS_CONFIGURATION], ["$ac_cv_build"], [Description here!]) AC_DEFINE_UNQUOTED([EMACS_CONFIG_OPTIONS], ["$ac_configure_args"], [Description here!]) AC_SUBST([srcdir_equals_blddir_p]) dnl Following are deprecated null_string="" AC_DEFINE_UNQUOTED([LD_SWITCH_X_SITE], [$null_string], [Description here!]) AC_DEFINE_UNQUOTED([LD_SWITCH_X_SITE_AUX], [$null_string], [Description here!]) AC_DEFINE_UNQUOTED([C_SWITCH_X_SITE], [$null_string], [Description here!]) AC_DEFINE_UNQUOTED([LD_SWITCH_SITE], [$null_string], [Description here!]) AC_DEFINE_UNQUOTED([C_SWITCH_SITE], [$null_string], [Description here!]) dnl Note: as a general rule, *only* define things here that are not dnl autodetected. For things that are autodetected, define them dnl at the point where the autodetection occurs or would occur, dnl so that the user gets immediate feedback on the results of the dnl autodetection. if test "$GNU_MALLOC" = "yes"; then AC_DEFINE([GNU_MALLOC], [1], [Description here!]) SXE_ADD_MEMALLOC_OBJS(vm-limit.o) if test "$doug_lea_malloc" != "yes"; then SXE_ADD_MEMALLOC_OBJS(gmalloc.o) fi if test "$with_error_checking_malloc" = "yes"; then dnl SXE_ADD_MEMALLOC_OBJS(free-hook.o) : fi elif test "$with_system_malloc" = "yes" -o "$system_malloc" = "yes"; then AC_DEFINE([USE_SYSTEM_MALLOC], [1], [Description here!]) AC_DEFINE([SYSTEM_MALLOC], [1], [Description here!]) elif test "$with_debug_malloc" = "yes"; then AC_DEFINE([USE_DEBUG_MALLOC], [1], [Description here!]) AC_DEFINE([USE_SYSTEM_MALLOC], [1], [Description here!]) AC_DEFINE([SYSTEM_MALLOC], [1], [Description here!]) SXE_APPEND(-ldmalloc, MEMALLOC_LIBS) else SXE_ADD_MEMALLOC_OBJS([malloc.o]) fi test "$GCC" = "yes" && \ AC_DEFINE([USE_GCC], [1], [Description here!]) test "$with_external_widget" = "yes" && \ AC_DEFINE([EXTERNAL_WIDGET], [1], [Description here!]) test "$with_quick_build" = "yes" && \ AC_DEFINE([QUICK_BUILD], [1], [Description here!]) if test "$with_purify" = "yes"; then AC_DEFINE([PURIFY], [1], [Description here!]) AC_DEFINE([XLIB_ILLEGAL_ACCESS], [1], [Description here!]) fi if test "$with_quantify" = "yes"; then AC_DEFINE([QUANTIFY], [1], [Description here!]) AC_DEFINE([XLIB_ILLEGAL_ACCESS], [1], [Description here!]) fi test "$with_pop" = "yes" && \ AC_DEFINE([MAIL_USE_POP], [1], [Description here!]) test "$with_hesiod" = "yes" && \ AC_DEFINE([HESIOD], [1], [Description here!]) test "$with_regex_malloc" = "yes" && \ AC_DEFINE([REGEX_MALLOC], [1], [Description here!]) test "$with_ipv6_cname" = "yes" && \ AC_DEFINE([IPV6_CANONICALIZE], [1], [Description here!]) if test "$with_pdump" = "yes"; then AC_DEFINE([PDUMP], [1], [Description here!]) dnl deprecated! AC_DEFINE([WITH_PDUMP], [1], [Description here!]) fi AM_CONDITIONAL([WITH_EXTW], [test "$with_external_widget" = "yes"]) AM_CONDITIONAL([WITH_PDUMP], [test "$with_pdump" = "yes"]) AC_SUBST([MEMALLOC_LIBS]) SXE_SUBST_MEMALLOC_OBJS AC_DEFINE_UNQUOTED([USER_FULL_NAME], [pw->pw_gecos], [dnl USER_FULL_NAME returns a string that is the user's full name. It can assume that the variable `pw' points to the password file entry for this user. At some sites, the pw_gecos field contains the user's full name. If neither this nor any other field contains the right thing, use pw_name, giving the user's login name, since that is better than nothing.]) AC_DEFINE([SIGTYPE], [RETSIGTYPE], [SIGTYPE is the macro we actually use]) AC_DEFINE([SIGRETURN], [return], [SIGTYPE is the macro we actually use]) ## finally, redefine VERSION; this has to be done after all tests on C sources ## were run because otherwise the symbol VERSION would be defined twice and ## the C compiler would warn, sigh, and due to this stupid -Werror flag we ... ## tadadada ... will fail to run _any_ C test successfully AC_DEFINE_UNQUOTED([VERSION], ["$version"], [Version of SXEmacs.]) AH_TOP([ #ifndef INCLUDED_sxe_config_h_ #define INCLUDED_sxe_config_h_ #ifndef NOT_C_CODE #if defined (__GNUC__) #define alloca __builtin_alloca #elif defined __DECC #include #pragma intrinsic(alloca) #elif defined __INTEL_COMPILER && defined HAVE_ALLOCA_H /* defer #include to end of file */ #elif defined HAVE_ALLOCA_H #include #elif defined(_AIX) #pragma alloca #elif ! defined (alloca) void *alloca(); #endif #endif /* C code */ ]) AH_BOTTOM([ /* The configuration script may define `opsysfile' to be the name of the s/...h file that describes your operating system. The file name is chosen based on the configuration name. */ #ifdef config_opsysfile #include config_opsysfile #endif /* The configuration script may define `machfile' to be the name of the m/...h file that describes the machine you are using. The file name is chosen based on the configuration name. */ #ifdef config_machfile #include config_machfile #endif /* basic system calls */ #if defined (INTERRUPTIBLE_IO) || defined (DEBUG_ENCAPSULATION) # define ENCAPSULATE_READ # define ENCAPSULATE_WRITE #endif #if defined (INTERRUPTIBLE_OPEN) || defined (MULE) || defined (DEBUG_ENCAPSULATION) # define ENCAPSULATE_OPEN #endif #if defined (INTERRUPTIBLE_CLOSE) || defined (DEBUG_ENCAPSULATION) # define ENCAPSULATE_CLOSE #endif /* stdio calls */ #if defined (INTERRUPTIBLE_IO) || defined (DEBUG_ENCAPSULATION) # define ENCAPSULATE_FREAD # define ENCAPSULATE_FWRITE #endif #if defined (INTERRUPTIBLE_OPEN) || defined (MULE) || defined (DEBUG_ENCAPSULATION) # define ENCAPSULATE_FOPEN #endif #if defined (INTERRUPTIBLE_CLOSE) || defined (DEBUG_ENCAPSULATION) # define ENCAPSULATE_FCLOSE #endif #if defined (HAVE_SOCKS) && !defined (DO_NOT_SOCKSIFY) #define accept Raccept #define bind Rbind #define connect Rconnect #define getsockname Rgetsockname #define listen Rlisten #endif /* HAVE_SOCKS && !DO_NOT_SOCKSIFY */ #ifndef NOT_C_CODE /* Actually means C or C++ */ # if defined (__cplusplus) /* Avoid C++ keywords used as ordinary C identifiers */ # define class c_class # define new c_new # define this c_this # define catch c_catch # define EXTERN_C extern "C" # else /* C code */ # define EXTERN_C extern # endif #endif /* C or C++ */ /* Strictly speaking, only int or unsigned int are valid types in a bitfield. In practice, we would like to use enums as bitfields. The following should just result in warning avoidance: warning: nonportable bit-field type */ #ifdef __GNUC__ #define enum_field(enumeration_type) enum enumeration_type #else #define enum_field(enumeration_type) unsigned int #endif #ifndef NOT_C_CODE #if defined __INTEL_COMPILER && defined HAVE_ALLOCA_H /* icc's alloca.h pulls in , but that must be done after _GNU_SOURCE and friends are defined */ #include #endif #endif /* C code */ #endif /* INCLUDED_sxe_config_h_ */ ]) dnl ------------------------------------------------------------------------- dnl ------------------------------- dnl Report on what we decided to do dnl ------------------------------- dnl #### We should tag this as the _build_ environment. dnl Before doing that, though, must check if tools care about line 1. ( dnl /etc/osversion is on SONY NEWS-OS if test -f /etc/osversion; then dnl SONY NEWS-OS echo "osversion: `cat /etc/osversion`" else echo "uname -a: `uname -a`" fi echo "" echo "$0 $ac_configure_args" ) > Installation if test ! -z ${emacs_beta_version} ; then if test -z "${emacs_is_beta}" ; then sxemacs_betaname=".${emacs_beta_version}" else sxemacs_betaname="-b${emacs_beta_version}" fi else sxemacs_betaname="" fi dnl ----------------- dnl Talking LFSL now! dnl ----------------- dnl ----------------------------------- dnl Now generate config.h and Makefiles dnl ----------------------------------- dnl This has to be called in order for this variable to get into config.status AC_SUBST([internal_makefile_list]) # Remove any trailing slashes in these variables. if test -n "$prefix"; then prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([[^/]]\)/*$,\1,'` fi if test -n "$exec_prefix"; then exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([[^/]]\)/*$,\1,'` fi make_ifeq="ifeq" make_endif="endif" make_else="else" AC_SUBST([make_ifeq]) AC_SUBST([make_endif]) AC_SUBST([make_else]) dnl Coupla things needed for subst'ing into the sxemacs.desktop file ABS_PROGNAME=${prefix}/bin/${PROGNAME} ABS_ETCDIR=${ETCDIR} SXE_CANONICALISE_PATH([ABS_PROGNAME]) SXE_CANONICALISE_PATH([ABS_ETCDIR]) AC_SUBST([ABS_PROGNAME]) AC_SUBST([ABS_ETCDIR]) AC_CONFIG_FILES([src/sxe-paths.h]) AC_CONFIG_FILES([Makefile]) AC_CONFIG_FILES([lib-src/Makefile]) AC_CONFIG_FILES([src/Makefile]) AC_CONFIG_FILES([src/ui/Makefile]) AC_CONFIG_FILES([src/ui/TTY/Makefile]) AC_CONFIG_FILES([src/ui/lwlib/Makefile]) AC_CONFIG_FILES([src/ui/X11/Makefile]) AC_CONFIG_FILES([src/events/Makefile]) AC_CONFIG_FILES([src/ent/Makefile]) AC_CONFIG_FILES([src/media/Makefile]) AC_CONFIG_FILES([src/mem/Makefile]) AC_CONFIG_FILES([src/database/Makefile]) AC_CONFIG_FILES([src/mule/Makefile]) AC_CONFIG_FILES([src/.gdbinit:src/gdbinit]) AC_CONFIG_FILES([src/.dbxrc:src/dbxrc]) AC_CONFIG_FILES([lisp/Makefile]) AC_CONFIG_FILES([info/Makefile]) AC_CONFIG_FILES([tests/Makefile]) AC_CONFIG_FILES([modules/Makefile]) AC_CONFIG_FILES([etc/Makefile]) AC_CONFIG_FILES([etc/sxemacs.desktop]) AC_CONFIG_FILES([sxemacs.pc]) AC_CONFIG_LINKS([.sxemacs.source.tree:]) AC_OUTPUT SXE_SUMMARY