From: tomo Date: Mon, 17 May 1999 09:41:57 +0000 (+0000) Subject: This commit was manufactured by cvs2svn to create branch 'XEmacs_21_2'. X-Git-Tag: r21-2b1^3~1 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0f8d20847ea0f48290d0c55185966f04a09deded;p=chise%2Fxemacs-chise.git This commit was manufactured by cvs2svn to create branch 'XEmacs_21_2'. --- 0f8d20847ea0f48290d0c55185966f04a09deded diff --cc CHANGES-beta index 48c24ee,530bc55..0000000 deleted file mode 100644,100644 --- a/CHANGES-beta +++ /dev/null @@@ -1,137 -1,7 +1,0 @@@ -- -*- indented-text -*- - to 21.2.14 "" - -- mingw32 port from Andy Piper - - to 21.2.13 "Demeter" - -- Build fixes from Martin Buchholz - -- experimental splash screen rewrite from Didier Verna - -- Various patches from Jan Vroonhof and Andy Piper - -- alist.el synched up with APEL 9.13 from MORIOKA Tomohiko - -- MS Window build fixes from Jonathan Harris - -- UCS-4/UTF-8 support from MORIOKA Tomohiko - - to 21.2.12 "Clio" - -- event-stream unification for MS Windows from Andy Piper - -- Determine best visual to use to avoid flashing from IENAGA Kazuyuki - -- Fix for new Berkeley DB library from Paul Keusemann/Gregory Neil Shapiro - -- Various package-ui fixes from Jan Vroonhof - -- Fix for doubled font-locking during buffer reversion - -- KFM browsing support from Neal Becker - -- info fix from Didier Verna - -- Build bug fixes from Martin Buchholz - -- Various Documentation updates - -- X-Face support for MS Windows native build from Gleb Arshinov - - to 21.2 beta11 "Calliope" - -- Dialog box fix from Jan Vroonhof - -- unified mswindows and tty event loops from Andy Piper - -- miscellaneous patches from Gleb Arshinov - -- miscellaneous patches from Charles Waldman and Adrian Aichner - -- Mule dump time files remerged from mule-base package - -- Documentation fixes from Jan Vroonhof - -- 24bit color image fix from Kazuo OISHI - -- various build fixes from Martin Buchholz - - to 21.2 beta10 "Boreas" - -- package UI fix from Jan Vroonhof - -- MS Windows NT process fix from Gleb Arshinov - - to 21.2 beta9 "Athena" - -- parameterize replace-match function from Didier Verna - -- X-Face support under mswindows from Andy Piper - -- doc fixes from Adrian Aichner - -- about patchlet from Marcus Thiessel - -- isearch doc fixes from Didier Verna - -- interlaced gif fix from Gunnar Evermann - -- isearch improvements from Didier Verna - -- eldap connection fix from William Perry - -- package-get site fix from Robert Pluim - -- loadable modules fix from Damon Lipparelli - -- ldap fixes from Oscar Figueiredo - -- loadable modules from J. Kean Johnston - -- runwhatever from Charles Wilson - -- redisplay fixes for glyphs from Andy Piper - -- progress gauge widgets implentation from Andy Piper - -- W3 works again due to font.el being fixed - -- Another mule xemacs crash fixed - -- Images in widgets, warning fixes and gui_item cleanup from Andy Piper - -- package admin fixes under mswindows from Charles Waldman - -- miscellaneous mswindows build fixes from Jonathan Harris - -- help-echo fix from Hrvoje Niksic - -- x font path support from Jim Radford - -- MSVC compile fixes from Damon Lipparelli - - to 21.2 beta8 "Artemis" - -- A bunch of Mule fixes from Martin Buchholz - - to 21.2 beta7 "Ares" - -- mswindows modeline crash fix from Jonathan Harris - -- picon glyph fix from Gunnar Evermann - -- widgets-in-buffers and subwindow support from Andy Piper - -- movemail pop support under mswindows from Fabrice Popineau - -- ldap fixes from Oscar Figueiredo - -- fns cleanup from Hrvoje Niksic - -- menubar fixes from Didier Verna - -- mswindows accelerator fix from Jonathan Harris - -- dired mule fix from Didier Verna - -- sound doc cleanup from Charles Waldman - -- new display table functionality from Hrvoje Niksic - -- minor cleanups - -- package fixes from Jan Vroonhof - -- subwindow support fixes from Martin Buchholz - - to 21.2 beta6 "Apollo" - -- mswindows compile fixes from Martin Buchholz, Andy Piper, Greg - Klanderman and Adrian Aichner - -- Synch with XEmacs 21.0.60 - -- mega-patch fixes from Martin Buchholz - -- md5 fixes and testsuite from Hrvoje Niksic - -- database fix from Hrvoje Niksic - - to 21.2 beta5 "Aphrodite" - -- synch with XEmacs 21.0.58 - -- bytecode interpreter rewritten - -- byte compiler fixes - -- hash table implementation rewritten - -- basic lisp functions rewritten - -- spelling fixes - -- garbage collector tuned a little - -- various global code changes for consistency - -- automated test suite - -- major internals manual updates - -- lisp reference updates - - to 21.2 beta4 "Aglaophonos" - -- isearch keymap fix from Katsumi Yamaoka - -- directory_files cleanup from Hrvoje Niksic - -- C implementation of base64 from Hrvoje Niksic - -- C implementation of `buffer-substring-no-properties' from Hrvoje Niksic - -- Experimental fix for spurious `file has changed on disk' message from - Charles Waldman - -- Fix for etags.el hook calling from Malcolm Box - -- User-name-completion fix for MS Windows NT from Greg Klanderman - - to 21.2 beta3 "Aglaia" - -- case sensitiveness improvements from Didier Verna - -- Bug fixes from 21.0 - -- Word selection on mouse click on quotes from Hrvoje Niksic - -- WAVE support for NAS from Raymond Toy - - to 21.2 beta2 "Aether" - -- Synched with 21.0-pre14 "Poitou" - -- isearch improvements from Hrvoje Niksic - -- bytecompiler fix from Martin Buccholz - -- shadow.el speedup from Martin Buchholz - -- clash detection update from Jan Vroonhof - -- Indirect buffers from Hrvoje Niksic - -- ~user completion cleanup from Greg Klanderman - -- New face property from Didier Verna - -- ~user completion and fixes from Greg Klanderman - -- casefiddle.c speedup from Martin Buchholz - --to 21.2 beta1 "Aeolus" ---- Synch with 21.0-pre6 ---- Removal of ancient obsolete symbols courtesy of Altrasoft ---- Fix version numbers -- --Fork at 21.0 pre5 "Zhong Wei" diff --cc ChangeLog index bb8025d,2671250..0000000 deleted file mode 100644,100644 --- a/ChangeLog +++ /dev/null @@@ -1,3460 -1,3098 +1,0 @@@ - 1999-05-14 XEmacs Build Bot - - * XEmacs 21.2.14 is released - - 1999-05-11 SL Baur - - * version.sh (infodock_build_version): Synch InfoDock version. - - 1999-05-06 Hrvoje Niksic - - * aclocal.m4 (ld_dynamic_link_flags): Change -Bexport to -Bdynamic - for Solaris. - - 1999-05-03 Hrvoje Niksic - - * configure.in (xemacs_betaname): Don't generate Installation.el. - - * Makefile.in.in (top_distclean): Don't remove Installation.el. - - 1999-04-29 Andy Piper - - * configure.in: add mingw32 as a target platform. add nt process - support options. - - 1999-03-30 MORIOKA Tomohiko - - * etc/HELLO (Amharic): New language. - (Slovak): Likewise. - (Thai): Likewise (by Virach Sornlertlamvanich). - (Greek): Fixed (by Yannis Haralambous). - - 1998-09-04 MORIOKA Tomohiko - - * configure.in: Delete mule-coding.o. - - 1999-04-22 Gunnar Evermann - - * lwlib/xlwmenu.c (string_width_u): Initialise chars before - calling XmStringGetLtoR - (string_draw_u): ditto and check return value of XmStringGetLtoR() - - 1999-04-05 Olivier Galibert - - * Makefile.in.in (GENERATED_HEADERS): Don't generate - puresize-adjust.h anymore - - * configure.usage: Remove everything gung-ho or purespace related - - * configure.in: Ditto - - 1999-04-17 Hrvoje Niksic - - * configure.in: Check for getloadavg(). - - 1999-03-12 XEmacs Build Bot - - * XEmacs 21.2.13 is released - - 1999-03-09 SL Baur - - * Makefile.in.in (LC_ALL): Try very, very hard to build in C locale. - - 1999-03-05 XEmacs Build Bot - - * XEmacs 21.2.12 is released - - 1999-03-04 Martin Buchholz - - * Makefile.in.in (top_distclean): Remove confdefs.h as well. - - 1999-03-03 Martin Buchholz - - * configure.in: - `uname -v` -> "`uname -v`": - backquoted expressions need additional double - quotes to be a single token. - Use separate if's to avoid extra process invocations. - - 1999-01-05 Gunnar Evermann - - * PROBLEMS: Document crashes on SPARC with gcc 2.8.1. - - 1999-03-01 XEmacs Build Bot - - * XEmacs 21.2.11 is released - - 1999-02-16 Andy Piper - - * PROBLEMS: add entries for building under Cygwin. - - 1999-02-14 Jan Vroonhof - - * README.packages: Clear up that mule-sumo packages is used _in - addition_ to the normal sumo. - - 1999-02-16 Martin Buchholz - - * configure.usage: Move quantify/purify into debug flags section - - 1999-02-10 Martin Buchholz - - * configure.in: - - Fixup xfs comments and redundant option checking - - * configure.in: - * INSTALL: - * lisp/paths.el: - - improved automounter tmp directory support. - - support 4 (!) empirically discovered automounter conventions - - 1999-02-10 Martin Buchholz - - * lwlib/lwlib.h: - - redo CONST hacking to deal with X11 R4, which was - broken in a previous patch. - - 1999-02-10 Martin Buchholz - - * configure.in: - - irix uses -rpath - - 1999-02-10 Martin Buchholz - - * configure.in: - - Check for XOpenIM before using xim=xlib - - only use XmIm if $have_motif = yes - - 1999-02-10 Martin Buchholz - - * configure.in. Port to BSDI BSD/OS 4.0. - - 1999-01-07 Michael Sperber [Mr. Preprocessor] - - * configure.in: Warn if using Motif dialog boxes on AIX 4.3. - - 1999-02-05 XEmacs Build Bot - - * XEmacs 21.2.10 is released - - 1999-02-02 XEmacs Build Bot - - * XEmacs 21.2.9 is released - - 1999-02-01 Glynn Clements - - * etc/recycle.xpm: Fix colours so that they work on TrueColor - and DirectColor displays - - 1999-01-21 Andy Piper - - * configure.in: make xface detection specifc to a window system in - general rather than just X. - - 1999-18-10 Andy Piper - - * configure.in: remove -O3 prevention on cygwin - current versions - cope ok now. remove dll prevention on cygwin - the new module - code checks correctly. - - 1999-01-10 J. Kean Johnston - - * configure.in: Added moduledir as the path where loadable modules - are stored. Added --with-site-modules and --moduledir options. - - Ensure the SCO OpenServer compiles with --dynamic by default - - Check for dlfcn.h for dynamic loader - - Renamed dll.o to emodules.o and changed dynamic loader tests - - Renabled code that deals with site-lisp so that it is handled - correctly when a user specifies --with-site-lisp. - - * aclocal.m4: Replaced entire file with more complete DLL tests - by way of libtool. - - * config.usage: Removed TAB characters which caused it to be - displayed incorrectly on terminals where TAB != 8. - - Added help text to describe --with-site-modules and --moduledir. - - * INSTALL: Updated documentation to describe module directories - - * Makefile.in.in: Added moduledir, sitemoduledir macros. - - Make those directories at install time. - - 1998-12-28 Martin Buchholz - - * XEmacs 21.2.8 is released. - - 1998-12-28 Martin Buchholz - - * PROBLEMS: Document Linux GNU Libc 2.0 I18N crashes. - - 1998-12-24 Martin Buchholz - - * XEmacs 21.2.7 is released. - - 1998-12-20 Martin Buchholz - - * configure.in: Redo DBM support - - die if dbm support requested, but not provided. - - properly check for libgdbm, then libc, then libdbm - - properly check for ndbm.h - - comments improved - - XE_DIE should always prefix messages with Error: for clarity - - 1998-12-07 Martin Buchholz - - * xemacs.mak (TEMACS_OBJS): - (DOC_SRC4): - - Remove pure.c, pure.obj - - 1998-12-06 Martin Buchholz - - * Makefile.in.in (distclean): - * dynodump/Makefile.in.in (distclean): - * src/Makefile.in.in (distclean): - * lib-src/Makefile.in.in (distclean): - * lwlib/Makefile.in.in (distclean): - - Make sure GNUmakefile is deleted. - - 1998-12-17 Andy Piper - - * configure.in (all_widgets): remove gui.o addition - its always - in the makefile now. - - * configure.in: add gui-msw.o to msw objects. - - 1998-12-16 Andy Piper - - * XEmacs 21.2.6 is released - - 1998-12-05 XEmacs Build Bot - - * XEmacs 21.2.5 is released - - 1998-11-28 SL Baur - - * XEmacs 21.2-beta4 is released. - - 1998-11-27 SL Baur - - * configure.in: Linux/Arm Support. - From James LewisMoss - - 1998-11-27 Takeshi Hagiwara - - * configure.in: - Fix the realpath() problem of UnixWare2.1.3. - Patches for NEC's sysv4.2 machine. - - 1998-11-09 Kazuyuki IENAGA - - * configure.in: Check if there's wnn4.2 or wnn6 specific library - installed. The Wnn library will be checked if the --with-wnn - and/or --with-wnn6 was specified compulsory. - - 1998-07-28 Jan Vroonhof - - * configure.in (CPP): Too many spaces im run-patch flag detection. - - 1998-10-15 SL Baur - - * XEmacs 21.2-beta3 is released. - - 1998-10-13 Andy Piper - - * configure.in: enable drag and drop support by default if mswindows is - detected. - - 1998-10-09 Kevin Oberman - - * config.sub: Fix for Alpha architecture - - 1998-10-05 Andy Piper - - * configure.in: don't enable shared lib support for cygwin unless - explititly told to. - - 1998-10-02 Andreas Jaeger - - * etc/xemacs.1: Remove misplace "\". - - 1998-09-29 SL Baur - - * XEmacs 21.2-beta2 is released. - - 1998-09-09 Gunnar Evermann - - * lwlib/xlwmenu.c: - * lwlib/xlwscrollbar: fix for Motif >=2.0 - Patch provided by Glenn Barry - - * PROBLEMS: XEmacs 21.0 now works on HP-UX 11.0 - - 1998-09-02 Andy Piper - - * configure.in: check for cygwin32/version.h. - - 1998-08-31 Michael Sperber [Mr. Preprocessor] - - * PROBLEMS: Added AIX 4.3 note. - - * configure.in: Better detection of AIX 4.3. - AIX xlc can do -g and -Ox at the same time. - - 1998-09-05 SL Baur - - * etc/check_cygwin_setup.sh: grammar fix. - - 1998-09-02 Andy Piper - - * etc/check_cygwin_setup.sh: fix a couple of buglets. - - 1998-08-23 Adrian Aichner - - * etc/sample.emacs: Enable sound support on mswindows devices. - - 1998-08-17 P. E. Jareth Hein - - * configure.in: Alter configure so that it checks for mismatched PNG - header/libs, screams a little louder on old/mismatched library - conditions for both PNG and XPM, stop screaming if png is not found and - no window-system is selected, and fixed a bug in the XPM checking. - - 1998-08-06 Adrian Aichner - - * etc/TUTORIAL.de: Fixing typos and grammatical errors. Fixing - inconsistent usage of RET, , and (only using - now). Changing TUTORIAL to TUTORIAL.de throughout - itself. Adding english equivalent to german translation of all - concepts used in TUTORIAL.de. - - 1998-08-07 P. E. Jareth Hein - - * configure.usage (--without-gif): Modify text to reflect status - of GIF support - - 1998-08-04 P. E. Jareth Hein - - * configure.in: add back in the support for the in-core GIF - code, change the required PNG library version to 1.0.2, and add - a warning if PNG not found, since PNG images are now distributed - as part of the core. Also minor wording changes in things reported - to the user. - - 1998-07-28 Kai Haberzettl - - * BETA: Update mailing-list address for build-reports - - 1998-08-01 SL Baur - - * Makefile.in (TAGS tags): Add variable `tagslisp' so a TAGS file - can built that includes package lisp. - - 1998-07-23 Martin Buchholz - - * configure.in: - - support multiple flavors of alpha, (XEmacs treats them identically) - - Fix AC_TRY_RUN so that actions have access to $? - - Identify DEC C compilers. Add default optimization CFLAGS and - always use -std. - - Use an extensible method for adding support for future compilers. - - Have SunPro C use that same extensible method. - - Make sol2 always use `-R', Linux and DEC OSF always use `-rpath' - --1998-07-19 SL Baur -- -- * XEmacs 21.2-beta1 is released. -- --1998-07-18 SL Baur -- -- * config.guess: Synched with latest FSF version. -- - 1998-07-12 Bjrn Torkelsson - - * Makefile.in: added LDFLAGS. - - 1998-07-12 SL Baur - - * etc/GOATS: Removed. - - * README: Bump version numbers. - * info/dir: Ditto. - * etc/README: Ditto. - * etc/NEWS: Ditto and purge pre-21.0 stuff. - * version.sh: Ditto. - - * XEmacs 21.0-pre5 is released. - - 1998-07-10 SL Baur - - * configure.in (with_offix): Default --with-offix to off. - - 1998-07-09 SL Baur - - * configure.in: Handle multiple database libraries. - From Gregory Neil Shapiro - - * XEmacs 21.0-pre4 is released. - - * configure.in: Fix test for InfoDock sources. - - * etc/BETA (writing): Update patch creation instructions. - - * etc/FTP: Update FTP mirror list. - - * etc/DISTRIB: Remove duplicated FTP mirror list. - * etc/xemacs.1 (ftp): Ditto. - - 1998-07-09 Oliver Graf - - * configure.usage: added warning to --with-offix - - 1998-06-29 SL Baur - - * etc/gnuserv.1 (this): Email address for Ben Wing is ben@xemacs.org. - * etc/gnuserv.README (README): Ditto. - * etc/xemacs-ja.1: Ditto. - - 1998-06-28 SL Baur - - * configure.in: Berkeley DB autodetection fixes - From Martin Buchholz - - * etc/BABYL: Moved to rmail package - - * etc/enriched.doc: Moved to xemacs-base package - - * etc/MSDOS: - * etc/GNUS-NEWS: deleted - - 1998-06-21 Michael Sperber [Mr. Preprocessor] - - * etc/NEWS: Added references to documentation about packages and - path setup. - - * etc/README: Synched. - - 1998-06-19 SL Baur - - * XEmacs 21.0-pre3 is released. - - 1998-06-20 Michael Sperber [Mr. Preprocessor] - - * etc/PACKAGES: - * etc/BETA: Moved some package stuff into Texinfo docs. Other nitpicks - - 1998-06-20 Kazuyuki IENAGA - - * configure.in: Added check if the berkdb has db_open or not. - (With fixes from Martin Buchholz) - - 1998-06-19 SL Baur - - * XEmacs 21.0-pre2 is released. - - 1998-06-18 Michael Sperber [Mr. Preprocessor] - - * configure.in: Added -lC for static linking under AIX 4.2. - - 1998-06-14 SL Baur - - * XEmacs 21.0-pre1 is released. - - 1998-06-14 Oscar Figueiredo - - * etc/NEWS: Updated information about customization of the - automatic info dir file generation using - `Info-auto-generate-directory' and `Info-save-auto-generated-dir' - - 1998-06-11 SL Baur - - * XEmacs 21.0-beta43 is released. - - 1998-06-04 Oliver Graf - - * tests/Dnd/README: a step-by-step test run - * tests/Dnd/droptest.el: some clarifications - * tests/Dnd/droptest.sh: created, creates test files - - 1998-06-01 Oliver Graf - - * configure.in (summary): added experimental to dragndrop option - * configure.usage: added experimental note to --with-dragndrop - * tests/Dnd/droptest.el: extra start-drag-region function - changed the experimental- stuff - - 1998-06-02 Andy Piper - - * etc/check_cygwin_setup.sh: set more intelligent defaults for - windows 95. - - 1998-06-07 SL Baur - - * lwlib/xlwmenu.c: Add room for the 0 byte sentinel. - - 1998-06-05 Colin Rafferty - - * lwlib/xlwmenu.c: Made newchars be as large as it needs to be. - - 1998-06-01 SL Baur - - * XEmacs 21.0-beta42 is released. - - * etc/sounds: Removed, now in the sounds-au package. - - 1998-05-29 Andy Piper - - * configure.in: don't use -O3 for cygwin. - - * etc/check_cygwin_setup.sh: new file to check that cygwin is setup - correctly for XEmacs operation. - - 1998-05-28 P. E. Jareth Hein - - * configure.in: Switch from giflib to gifreader for - our GIF image support (no other mods needed) - - 1998-05-28 Oliver Graf - - * configure.in: only one DnD protocol, CDE has priority over OffiX - - * tests/Dnd/README: some changes reflecting recent modifications - * tests/Dnd/dragtest.el: removed - * tests/Dnd/droptest.el: cosmetics and comments - - 1998-05-26 Oliver Graf - - * tests/Dnd/droptest.el: adapted to CDE extensions - - 1998-05-25 Hans Guenter Weigand - - * configure.in: - * config.sub: add initial OpenBSD support - - 1998-05-21 Andy Piper - - * configure.in: check for msw dialogs. - - 1998-05-23 SL Baur - - * XEmacs 21.0-beta41 is released. - - 1998-05-17 SL Baur - - * configure.in (CPP): Change -O2 to -O3. - Suggested by Martin Buchholz - - 1998-05-15 SL Baur - - * XEmacs 21.0-beta40 is released. - - 1998-05-13 SL Baur - - * configure.in (ZSH_VERSION): zsh-3.1.2 (and zsh-3.0.4) drops core - on the `unset CDPATH' if running as sh. - - 1998-05-12 Oliver Graf - - * tests/Dnd/droptest.el: some CDE adaptions (untested) - - 1998-05-11 Martin Buchholz - - * configure.in: - Add some more comments. - If using bash, use Posix mode and unset CDPATH. - Be more careful checking feature dependencies. - Introduce XE_CHECK_FEATURE_DEPENDENCY. - Undo the gross hack of multiple `echo >> $tempcname' - by using here documents instead. (Might break mswindows, tho...) - Be more careful autodetecting tooltalk. - - * PROBLEMS: - Document problems with Solaris 2.6 + XSUNTRANSPORT - - * Makefile.in: - * lwlib/Makefile.in.in: - * modules/Makefile.in: - - Adjust for luser's CDPATH being set to something weird. - - Take into account bash 2.02's tendency to print the cwd when - using CDPATH. Always use `cd ./foo' instead of `cd foo'. - - fix the run-temacs target to use $(DUMPENV) - - fix the run-puremacs target to use $(DUMPENV) - - fix the `depend' target to properly $(RM) the right files - - Generate a better TAGS file for XEmacs' lisp code using - hand-crafted regexps. - - Use standard coding conventions for modules/Makefile.in - - 1998-05-12 Kazuyuki IENAGA - - * configure.in: some people claimed that they can't stop - linking wnn6 library if they set --with-wnn6=no. - - 1998-05-11 Oliver Graf - - * tests/Dnd/droptest.el: adapted to new calling conventions - also showing the new possibilities - * tests/Dnd/README: changed to new protocol - - 1998-05-11 SAKIYAMA Nobuo - - * Fix for HAVE_MULTICAST check. - - 1998-05-09 SL Baur - - * XEmacs 21.0-beta39 is released. - - 1998-05-06 Oliver Graf - - * configure.in: added autodetection for the Drag'n'Drop API - if some DnD protocol is found, HAVE_DRAGNDROP will be defined - and dragdrop.o is added to extra_objs - * configure.usage: added with-dragndrop, added (*) to with-offix - * tests/Dnd/droptest.el: complete overhaul, no it's a real test - - 1998-05-04 Oliver Graf - - * tests/Dnd/droptest.el: changed to test new protocol - * tests/Dnd/README.OffiX: removed - * tests/Dnd/README: created, info about new protocol - * tests/Dnd/dragtest.el: comment change - - 1998-05-07 SL Baur - - * etc/altrasoft-logo.xpm: Removed. - - 1998-05-02 SL Baur - - * XEmacs 21.0-beta38 is released. - - 1998-04-29 SL Baur - - * configure.in: Use `PROGNAME' for all generated paths. - - * Makefile.in: Change `progname' to `PROGNAME' for consistency. - - 1998-04-27 SL Baur - - * configure.in (progname): Parameterize program name on `progname' - and add --with-infodock. - - 1998-04-26 SL Baur - - * Makefile.in: Religiously use ${progname} instead of hardcoded - `xemacs'. - CPPFLAGS was being set correctly in ${subdir}/Makefiles and - overridden by the empty one set in the toplevel Makefile. - - 1998-04-26 Jason R Mastaler - - * etc/BETA: Replaced SmartList references in favor of - Majordomo. - - 1998-04-25 SL Baur - - * XEmacs-21.0-beta37 is released. - - 1998-04-25 Michael Sperber [Mr. Preprocessor] - - * configure.in: Sychronized ..._USER_DEFINED variables with - datadir setting. - - * Makefile.in (mkdir): No longer create sitelispdir. - - Sat Apr 24 1998 Andy Piper - - * configure.in: make graphic libraries tests be dependant on a - window system not X11 only. - - Fri Apr 24 19:38:19 1998 Andy Piper - - * configure.in: check for our special select in msw. - - 1998-04-22 Marcus Thiessel - - * PROBLEMS: add answers to some FAQ concerning hpux. - - Wed Apr 22 12:59:35 1998 Andy Piper - - * configure.in: enable checking for special mswindows select() - - 1998-04-21 Martin Buchholz - - * configure.in: Isolate incomprehensible cma_open/pthreads checking - to decosf* - - 1998-04-21 Marcus Thiessel - - * configure.in: /usr/{include,lib}/Motif2.1 added to search path for X11 - libs and includes. - - 1998-04-22 Itay Ben-Yaacov - - * configure.in: check for xpm does not depend anymore on having X. - if libXpm exists, and is of the FOR_MSW flavor, define FOR_MSW. - - 1998-04-19 Oscar Figueiredo - - * etc/NEWS: Documented info dir rebuilding and LDAP support. - - * info/dir: Fixed the explanatory notes for - `Info-default-directory-list' removal and the new automatic dir - rebuilding facility. Reindented the menu. Added an entry for - term.info - - 1998-04-20 SL Baur - - * configure.in (LISPDIR): Removed configuration option for - site-lisp. - - 1998-04-19 SL Baur - - * configure.in (version): snarf InfoDock version number. - - 1998-04-18 SL Baur - - * XEmacs-21.0-beta36 is released. - - Fri Apr 17 12:59:35 1998 Andy Piper - - * configure.in: enable install pre-processing for mswindows - - Fri Apr 17 12:59:35 1998 Andy Piper - - * Makefile.in.in: add install_pp to install incantation. - - * installexe.sh: new file. Add .exe to install targets if the - result is executable. - - Fri Apr 17 12:59:35 1998 Andy Piper - - * Makefile.in: add install_pp to install incantation. - - 1998-04-14 Itay Ben-Yaacov - - * configure.in: Large echo split into a few smaller ones, - so the cygnus sh.exe does not crash. - - Thu Apr 16 12:59:35 1998 Andy Piper - - * configure.in: enable toolbar checking for mswindows build - - 1998-04-06 Martin Buchholz - - * config.h.in: Add _SVID_SOURCE to list of xmkmf #defines. - Used (at least) by RedHat 4.2. - - 1998-04-11 Michael Sperber [Mr. Preprocessor] - - * etc/xemacs.1: -no-packages -> -no-early-packages. - - * etc/NEWS: Clarified site-lisp status. - - * configure.in: Re-instated src/paths.h generation from - src/paths.h.in. - - * Makefile.in (top_distclean): Remove site-lisp on `make - distclean'. - - 1998-04-10 SL Baur - - * XEmacs 21.0-beta35 is released. - - 1998-04-10 Michael Sperber [Mr. Preprocessor] - - * etc/NEWS: Documented that Info-default-directory-list and - site-directory are gone. - - * configure.usage: Clarified --package-path documentation. - - 1998-04-07 Michael Sperber [Mr. Preprocessor] - - * configure.in: Now generates src/paths.h from src/paths.h.in.in. - Removed defaults for infopath and package-path. - - * Makefile.in (src/paths.h): ... is now generated from - src/paths.h.in.in. Moved generation of paths.h to configure. - - * paths.h.in: Removed. - - * paths.h.in.in: Created. - - 1998-04-06 Martin Buchholz - - * configure.in: png was still being used if png_version < 0.96 - - * configure.in: Fixed magic to handle AIX, X11R6, and gcc. - - 1998-04-05 Amir J. Katz - - * INSTALL (Rationale): Offix support comment is wrong. To disable, - one must use --with-offix=no and not --without-offix - - 1998-04-05 SL Baur - - * configure.in (CPP): ppc.ldscript sits in $srcdir/src not $srcdir. - - 1998-04-04 SL Baur - - * XEmacs 21.0-beta34 is released. - - 1998-04-03 Martin Buchholz - - * configure.in: - checking whether gettimeofday accepts one or two arguments... two - - 1998-04-03 Michael Sperber [Mr. Preprocessor] - - * configure.in: Fixed magic to handle AIX and MIT X11R6. - - 1998-04-02 Martin Buchholz - - * configure.in: Add magic -T $srcdir/ppc.ldscript on Linux powerpc - - 1998-04-01 Martin Buchholz - - * tests/database.el (test-database): Temporary files (the databases - that were created) should be deleted. - - * Makefile.in (testdir): Remove gnumake-specific syntax. - (src/Makefile): src/Makefile depends on src/depend. - - 1998-03-29 Martin Buchholz - - * configure.in: Check for -lz, -lgz unconditionally. Too many - system linkers don't properly die when there are cascaded link - dependencies, so we can't rely on the linker for that. The only - downside is that we might link with an extra unneeded library. If - you really really care about this, you can go fix it. - - * configure.in: Enhance PANIC msg to make it clear that - --with-FEATURE is going to die if FEATURE is not installed. - - 1998-03-27 Martin Buchholz - - * configure.in: $debug was not properly dependent on $beta - - * configure.in: Move offix configuration out of src/Makefile.in.in - into configure.in. - - * configure.in: Reorganize xpm detection code. - - * configure.in: XIM default to ON if Motif which is not Lesstif is - found. - - * configure.in: Keep auto-generated makefile dependencies out of - src/Makefile.in.in by using AC_OUTPUT file concatenation support. - - 1998-03-26 Martin Buchholz - - * configure.in: Fix up cflags handling. Specifically, configure - --cflags='' would fail to be recognized. - - * configure.in: Fix up png detection. Link with png_read_image to - make sure -lz is required. Test for png >- 0.96 via header file. - - 1998-03-21 Martin Buchholz - - * configure.in (XE_GCC_WRAP_LDFLAGS) - Rename to XE_PROTECT_LINKER_FLAGS. Rewrite. - - * configure.in: Make sure BSD always links in libz.a - BSD's stupid linker can't detect cascaded lib dependencies - - * configure.in: Autodetect lesstif. define have_lesstif. - Don't use motif-xim with lesstif, at least by default. - - 1998-03-30 SL Baur - - * version.sh: Add InfoDock version number variables. - - 1998-03-30 Amir J. Katz - - * info/dir: Replaced string '20.5' with '21.0' - - 1998-03-24 SL Baur - - * XEmacs 21.0-beta33 is released. - - 1998-03-26 Didier Verna - - * configure.in, Makefile.in: Removed infopath_user_defined---we - always want to propagate it. - - * configure.usage: Synched with configure.in. - - 1998-03-25 Michael Sperber [Mr. Preprocessor] - - * configure.usage, INSTALL: Synched with the new path layout. - - * Makefile.in (src/paths.h): Replaced packagepath with - package_path to make configure happy. - - * configure.in: Made default setting for packagepath conform to - what packages.el builds at run-time: XEmacs-version-specific paths - before site-specific ones. - Added default setting for pkgdir. - Changed --packagepath back to --package-path. - - 1998-03-24 SL Baur - - * XEmacs 21.0-beta32 is released. - - 1998-03-23 Michael Sperber [Mr. Preprocessor] - - * configure.in: Extended package path by version-specific - hierarchies. Changed allow-site-lisp to inhibit-site-lisp. - - 1998-03-22 SL Baur - - * Makefile.in (distclean): Remove packages and mule-packages if they - have been linked into place. - - 1998-03-22 Michael Sperber [Mr. Preprocessor] - - * : The Big Path Searching Overhaul. - - * Makefile.in, configure.in: Now pass all configure-specified paths - into the binary in a uniform way. - - 1998-03-20 SL Baur - - * configure.in (have_libmcheck): Add test for glibc's malloc - checker. - - Fix HP/UX dynamic linking flag. - - 1998-03-19 SL Baur - - * configure.in (quoted_arguments): Fix unquoted variable in - error-checking test. - - fix bogus substitution. - - 1998-03-17 SL Baur - - * configure.in: In -lpng test, look for png_set_strip_alpha. - Suggested by William M. Perry - - 1998-03-16 SL Baur - - * XEmacs 21.0 beta31 is released. - - 1998-03-16 P. E. Jareth Hein - - * configure.usage (Usage): Correct information about gif, tiff - and WNN entries - - 1998-03-13 SL Baur - - * configure.in: typo fix in sed command. - From P. E. Jareth Hein - - * configure.in (all_widgets): Check for snprintf(). - - 1998-03-11 P. E. Jareth Hein - - * configure.in: New gif support - - 1998-03-10 SL Baur - - * configure.in (have_glibc): Don't define _GNU_SOURCE for glibc. - - Mon Mar 09 13:00:55 1998 Andy Piper - - * configure.in: don't add libc to link list for dlopen ordinary - link takes care of this. check for dlfcn.h - - 1998-03-10 SL Baur - - * configure.in: Examine each directory of X11 include path for - inclusion into BITMAPDIR. - - 1998-03-09 SL Baur - - * aclocal.m4: Add legalese. - - Mon Mar 09 13:00:55 1998 Andy Piper - - * configure.in: make sure we have ndbm.h as well as libgdbm.a for - database support. - - * configure.in: move msw checking after x checking so that - auto-detection works. - - 1998-03-09 SL Baur - - * configure.in: New DLL support. - * aclocal.m4: New file. - From William M. Perry - - 1998-03-08 SL Baur - - * configure.in (xemacs_betaname): Align messages for minimal - tagbits and indexed lrecords. - Suggested by Andreas Jaeger - - 1998-03-09 Kyle Jones - - * etc/Emacs.ad: Example using leading dot resources to - initalize faces changes to use Emacs.foo since the - leading dot syntax doesn't work. Initialization of - text-cursor face moved to faces.el. - - 1998-03-07 SL Baur - - * XEmacs 20.5-beta30 is released. - - 1998-03-05 SL Baur - - * PROBLEMS: Update wording of x86 GCC 2.7 problems. - - Wed Mar 04 08:55:12 1998 Andy Piper - - * configure.in: add a --with-msw option. Make X and msw work - together if the user asks. - - 1998-03-02 SL Baur - - * PROBLEMS: Update documentation of gcc bugs that impact XEmacs. - - 1998-03-01 SL Baur - - * configure.in: Add substitutable variable ld_dynamic_link_flags - for special required linker flags for building DLL capable - binaries. - - * etc/Emacs.ad: Remove explicit `Emacs' application resource - name. - - 1998-02-28 SL Baur - - * Makefile.in (top_distclean): Remove Installation.el. - (xemacs): New target. Formerly it was `all:'. - (all): New default, dist: is now superfluous. - - 1998-02-27 SL Baur - - * configure.in (GNU_MALLOC): add --with-dlmalloc to allow - selective use of Doug Lea malloc in Linux C Library and GNU C Library. - (Installation): Add XEmacs version and generate `Installation.el'. - - 1998-02-26 SL Baur - - * configure.in (with_ldap: Fix -lldap autodection. - Suggested by Oscar Figueiredo - (Installation): Only keep the last configuration. - - 1998-02-25 SL Baur - - * XEmacs 20.5-beta28 is released. - - * configure.in (with_session): Fix reporting of the setting. - (with_database_gnudbm): Correctly report setting. - - 1998-02-24 SL Baur - - * configure.usage: Restore documentation of graphics library - flags. - From Karl M. Hegbloom - - 1998-02-19 Karl M. Hegbloom - - * PROBLEMS: Tell of the `gpm' SIGTSTP bug and `C-z' on the Linux - console. - - 1998-02-23 SL Baur - - * XEmacs 20.4 is released to the beta testers. - - 1998-02-21 SL Baur - - * configure.in (after_morecore_hook_exists): Modify dlmalloc tests - to also test for Linux libc5. - - 1998-02-19 SL Baur - - * XEmacs 20.5-beta27 is released. - * XEmacs-20.4-pre4 is released. - - * configure.in (doug_lea_malloc): Requires USE_MINIMAL_TAGBITS. - (--with-gung): Implement it. - - * configure.usage (--with-gung): Document. Turns on - USE_MINIMAL_TAGBITS and USE_INDEXED_LRECORD_IMPLEMENTATION. - (--with-term): Remove. - - * XEmacs-20.5-beta26 is released. - - 1998-02-18 SL Baur - - * XEmacs-20.4-pre3 is released. - - * Makefile.in: use better feedback while rebuilding finder database. - Suggested by Stephen J. Turnbull - - 1998-02-15 SL Baur - - * configure.in (doug_lea_malloc): Add checking for Doug Lea - Malloc. - - 1998-02-14 SL Baur - - * configure.in (OFFIX_O): Don't use OffiX if no real Xmu support. - Suggested by Pekka Marjola - - * XEmacs-20.4-pre2 is released. - * XEmacs-20.5-beta25 is released. - - 1998-02-13 SL Baur - - * INSTALL: Update for Cygwin and Microsoft Windows. - - * README: Update for Microsoft Windows. - - 1998-02-09 SL Baur - - * XEmacs 20.4-pre1 is released. - * XEmacs 20.5-beta24 is released. - - Wed Jan 28 13:41:22 1998 Andy Piper - - * configure.in: add mule-coding target which defines MULE_CODING, - nothing uses it as yet. add gif objects to msw support. define - const_is_losing=no for msw. make msw not selected if tty selected. - add -lshell32 for dnd support. check for a.out.h rather than - coff.h - - * lib-src/make-docfile.c: add cygwin support and generalise the - remaining open calls. IMHO this should really include sysfile.h. - - 1998-02-03 SL Baur - - * XEmacs 20.5-beta23 is released. - - 1998-02-01 SL Baur - - * etc/aliases.ksh: igrep from the shell command line. - From Karl M. Hegbloom - - 1998-01-31 SL Baur - - * etc/aliases.ksh: Add `mak' function to create beta.err for - build-report. - From Adrian Aichner - Suggested by Karl M. Hegbloom - - 1998-01-27 SL Baur - - * XEmacs 20.5-beta22 is released. - - 1998-01-26 SL Baur - - * etc/aliases.ksh: New file. Start tracking useful Maintainer - XEmacs commands. - - 1998-01-25 SL Baur - - * XEmacs 20.5-beta21 is released. - - Wed Jan 21 10:49:47 1998 Andy Piper - - * configure.in: check for coff.h - - 1998-01-21 Hrvoje Niksic - - * configure.in: Added support for `--with-shlib'. - - 1998-01-18 SL Baur - - * XEmacs 20.5-beta20 is released. - - 1998-01-13 Martin Buchholz - - * configure.usage: - * etc/NEWS: - Remove doc for configure-time INFOPATH, no longer used. - - * etc/BETA: Update ftp addresses. - * etc/INSTALL: Update ftp addresses. - * etc/MAILINGLISTS: Sync with Emacs 20.2. Update ftp addresses. - - * configure.in: - * src/config.h.in: - Define HAVE_INVERSE_HYPERBOLIC using 1 configure test, not 3. - - * lwlib/lwlib.h: - * lwlib/lwlib.c: - * lwlib/lwlib-config.c: - * lwlib/lwlib-Xm.c: - * lwlib/lwlib-Xaw.c: - * lwlib/lwlib-Xlw.c: - * lwlib/config.h.in: - * src/menubar-x.c: - Prepend LWLIB_ to (SCROLLBARS|MENUBARS|DIALOGS)_(MOTIF|LUCID|ATHENA). - Maintain only one set of variables. - - * etc/xemacs.1: Update author list. - - * Makefile.in (install-arch-dep): Simplify. - Replace construct `test -d $dir && foo' with - `if test -d $dir; then foo; fi' - - * lwlib/xlwmenu.c: - * lwlib/xlwscrollbar.c: - * lwlib/lwlib-Xlw.c: - * lwlib/lwlib-Xm.c: - Always assume presence of limits.h (ANSI). - - 1998-01-12 SL Baur - - * INSTALL: Updated for recent Mule/package changes. - - * XEmacs 20.5-beta19 is released. - - 1998-01-12 Damon Lipparelli - - * Makefile.in: Yow! Fixed paths to install dirs when --prefix != - --exec-prefix. - - 1998-01-10 SL Baur - - * XEmacs 20.5-beta18 is released. - - * etc/FTP: Update address of what was formerly ftp.ibp.fr. - - 1998-01-08 Didier Verna - - * configure.in: Get rid of INFOPATH for configure time. - * configure.usage (Usage): Ditto. - - 1998-01-09 SL Baur - - * Makefine.in: Correct reported amount of disk savings from - compression. - From Markus Linnala - - Thu Jan 08 09:42:36 1998 - - * configure.in: detect and set scrollbars and menubars with - MS-Windows more appropriately. Check for sys/un.h to use in - gnuserv. - - 1998-01-07 SL Baur - - * Makefile.in (progname): Cleanly parameterize XEmacs-specific - naming. - - 1998-01-05 Glynn Clements - - * lwlib/xlwmenu.c (push_button_draw): use inactive_gc instead of - inactive_button_gc for menu entries. - (remap_menubar): ignore the enabled status - - 1998-01-04 SL Baur - - * XEmacs 20.5-beta17 is released. - - * Makefile.in (finder): Use -vanilla. - (lisp/finder-inf.el): Ditto. - (check-features): New target. Do a sanity check prior to - installation. - - 1997-01-03 SL Baur - - * XEmacs 20.5-beta16 is released. - - 1997-12-30 SL Baur - - * XEmacs 20.5-beta15 is released. - - 1997-12-29 SL Baur - - * Makefile.in (${SUBDIR}): Remove bogus .RECURSIVE dependency. - - 1997-12-27 SL Baur - - * XEmacs 20.5-beta14 is released. - - 1997-12-23 Andy Piper - - * configure.in: support for *-pc-cygwin32 config - - 1997-12-25 SL Baur - - * XEmacs 20.5-beta13 is released. - - 1997-12-21 SL Baur - - * etc/BETA (Prerequisite): Add cookbook procedures for maintaining - package lisp directories. - - 1997-12-20 SL Baur - - * XEmacs 20.5-beta 12 is released. - - 1997-12-19 SL Baur - - * configure.in (bitmapdir): Reenable --with-session by default for - testing. - - 1997-12-18 Kyle Jones - - * etc/Emacs.ad: Don't specify a default toolbar specific - background color. - - 1997-12-18 Kyle Jones - - * etc/toolbar: Added support for foregroundToolBarColor - symbol to most icons. - - 1997-12-17 SL Baur - - * info/dir (File): Skk and Gnats are packaged. - - * PROBLEMS (Note): Update version numbers. - - * etc/BETA: Update version numbers. - - * etc/NEWS: Update version number. - - * info/dir (File): Update version number. - - 1997-12-16 SL Baur - - * XEmacs 20.5-beta11 is released. - - 1997-12-14 SL Baur - - * configure.in: Don't bypass graphics library detection - if the `--with-imagick' option is given to configure. - : Print autodetected graphics libraries to be linked with Imagick. - - * Makefile.in (lisp/finder-inf.el): Reverse previous change. - - 1997-12-14 Olivier Galibert - - * Makefile.in (install-arch-indep): Build info files if needed. - - 1997-12-13 SL Baur - - * Makefile.in (lisp/finder-inf.el): Add dependency on src/. - - * XEmacs 20.5-beta10 is released. - - 1997-12-12 SL Baur - - * configure.in (CPP): Don't add special CFLAGS for ix86/Linux. - - 1997-12-10 Karl M. Hegbloom - - * configure.in (autodetect ImageMagick): also look for - "X11/magick/magick.h", and if present, define - MAGICK_HEADERS_ARE_UNDER_X11 - - 1997-12-11 SL Baur - - * configure.in (imagick_libs): Add autodetection for freetype - -lttf library. - - 1997-12-09 SL Baur - - * XEmacs 20.5-beta9 is released. - - 1997-12-06 SL Baur - - * XEmacs 20.5-beta8 is released. - - * info/dir: update for further packaging. - * configure.in: remove `tree-x' from XEmacs build. - - 1997-11-29 Jeff Miller - - * configure.in: motif menubars need xlwmenu.o - - * updated files in src/ to allow an XEmacs configured for - motif menubars to at least compile. Motif menubars are still - very broken. - - 1997-12-05 Aki Vehtari - - * etc/refcard.tex: Updated for 20.3 - - 1997-12-02 P E Jareth Hein - - * lwlib/xlwscrollbar.c: fixed colormap/visual handling to work - properly with the information in the core. - - * lwlib/xlwmenu.c: fixed colormap/visual handling to work properly with - the information in the core, and fixed a potental problem with - parentage. - - 1997-12-02 SL Baur - - * etc/skk/SKK.tut.E (Hint): Fix typos. - - 1997-12-01 SL Baur - - * configure.in (with_session): Properly display flag in configure - status report. - - 1997-11-29 SL Baur - - * configure.usage: Remove documentation of obsolete option - --with-gif. - - 1997-11-27 SL Baur - - * XEmacs 20.5-beta7 is released. - - * configure.in: When testing for -ltiff, fall back on the extra - libraries -ljpeg, and -lz since some -ltiff's need them. - - 1997-11-26 SL Baur - - * lwlib/xlwmenu.c (display_menu): Defer incremental menus properly. - From Glynn Clements - - 1997-11-25 Kazuyuki IENAGA - - * configure.in: Improve auto detect of libraries ImageMagick rely - on. - - 1997-11-23 Jeff Miller - - * Energize is dead. Removed ENERGIZE ifdef's from code in lwlib - and src. Configure.in modified. --with-energize is no longer a - valid configure option. - - * lwlib/Makefile.in.in removed energize support - * lwlib/lwlib-Xm.c removed energize support - * lwlib/lwlib-config.c removed energize support - - * lwlib/energize/* removed - - 1997-11-23 SL Baur - - * Makefile.in: Change references of lisp/utils/finder-inf.el to - lisp/finder-inf.el. - - 1997-11-20 SL Baur - - * XEmacs 20.5-beta6 is released. - - 1997-11-21 Stephen Turnbull - - * configure.usage: Use `--' convention in "usage:" line. - - 1997-11-20 Stephen Turnbull - - * configure.in: added `with_xfs' to list of boolean features. - - 1997-11-20 SL Baur - - * XEmacs 20.3 is released for binary kit building. - - 1997-11-19 Tor Arntsen - - * PROBLEMS: Removed IRIX entry about xemacs core dumps when using - xemacs dumped on one machine on another. Problem was fixed by 20.3. - - 1997-11-19 SL Baur - - * etc/xemacs.1: Document -no-packages, -vanilla. - Document -h. - - 1997-11-18 SL Baur - - * configure.usage: New file. - - * configure.in: Use it instead of monster 10k shell variable. - - 1997-11-17 SL Baur - - * XEmacs 20.3-pre4 is released. - - 1997-11-17 Jens-Ulrik Holger Petersen - - * configure.in (infopath): List "/usr/local/" dirs before "/usr/" - dirs. - - 1997-11-17 SL Baur - - * configure.in: Initialize infodir off of datadir. - - * Makefile.in: Force LANG = C for building. - - 1997-11-15 SL Baur - - * XEmacs 20.3-pre3 is released. - * XEmacs 20.5-beta5 is released. - - 1997-11-13 Marc Paquette - - * nt/Todo: added a task for support of lisp packages through - the registry. - - 1997-11-13 Jonathan Harris - - * Renamed files *w32* to *msw* - - * Changed 'w32' and 'win32' to 'mswindows', and HAVE_W32GUI to - HAVE_MS_WINDOWS. Changed files: - cus-edit.el, device.el, faces.el, frame.el, msw-faces.el, - msw.init.el, igrep.el, dumped-lisp.el, font.el, hippie-exp.el, - sysdep.el, console-msw.c, console-msw.h, console.c, - device-msw.c, emacs.c, event-msw.c, event-msw.h, event-stream.c, - events.c, events.h, faces.c, frame-msw.c, frame.c, general.c, - msw-proc.c, objects-msw.c, objects-msw.h, redisplay-msw.c, - redisplay.c, symsinit.h, - - * Didn't change 'win32' in nt.c, nt.h, ntproc.c - - * Deleted w32 build directory since nt build directory now handles - X and native mswindows builds. - - 1997-11-11 SL Baur - - * XEmacs 20.5-beta4 is released. - - 1997-11-10 SL Baur - - * info/dir: remove packaged entries. - From Glynn Clements - - * configure.in: Puke and die if NAS sound is selected without X. - - 1997-11-08 SL Baur - - * XEmacs 20.5-beta3 is released. - * XEmacs 20.3-pre2 is released. - - Wed November 05 23:40:00 1997 - - * w32/xemacs.mak: moved building the DOC file to after the .elcs. - - Sun November 01 12:00:00 1997 - - * Files split from nt to new w32 directory: - ChangeLog, README, Todo, paths.h, config.h, inc/*, runemacs.c, - xemacs.mak. - - 1997-11-05 Didier Verna - - * configure.in: Added the --site-prefixes options for the configure - script. You give a colon or space separated list of prefixes, and - subdirectories include/ and lib/ will be added with -I and -L. - - 1997-11-05 Martin Buchholz > - - * configure.in: AIX + gcc fixes. - - Don't wrap -B. aixflags changed to start_flags. - - 1997-11-04 SL Baur - - * lwlib/lwlib-Xm.c(update_one_menu_entry): Add missing variable. - From Skip Montanaro - - 1997-11-04 Adrian Aichner - - * etc/TUTORIAL.de: - Updated copyright information. Translated most of the COPYING - section. Translated the <<.*>> didactic line. - - 1997-10-22 Adrian Aichner - - * etc/TUTORIAL.de: Fixed two issues reported by - Achim Oppelt - - * etc/TUTORIAL.de: - Manually applied rejected patch hunks from Marc Aurel's patch. - Some more fixes. - - * etc/TUTORIAL.de: - Applied patches supplied by Marc Aurel <4-tea-2@bong.saar.de>. - They fix yet more typos and quite a few awkward sentences. - - 1997-10-21 Adrian Aichner - - * etc/TUTORIAL.de: Manually merged a few more corrections by - Carsten Leonhardt - - 1997-10-20 Adrian Aichner - - * etc/TUTORIAL.de: - Applied patches from Andreas Jaeger to 1.2, - then merged them with 1.3 via ediff-buffers. - Andreas found some quite nasty typos still and added many missing commas. - - * etc/TUTORIAL.de: Re-fill-ed paragraphs after patching. - - * etc/TUTORIAL.de: Applied the excellent patches courtesy of - Carsten Leonhardt . - - 1997-11-03 MORIOKA Tomohiko - - * Delete etc/TUTORIAL.th because Thai is not supported yet. - - 1997-11-02 MORIOKA Tomohiko - - * etc/TUTORIAL.ko: Renamed from etc/TUTORIAL.kr to fit with ISO - 639 (two letter language code). - - * etc/TUTORIAL.ja: Renamed from etc/TUTORIAL.jp to fit with ISO - 639 (two letter language code). - - 1997-11-02 SL Baur - - * etc/CHARSETS: New file imported from Emacs 20.1. - - 1997-11-02 Kyle Jones - - * lwlib/lwlib-Xaw.c (xaw_pop_instance): Don't use parent - window's coordinates and dimensions to center the - dialog box unless its mapped_when_managed property is - true. This should avoid the top level widget that the - HAVE_SESSION code creates, which is unmapped and - useless for this purpose. - - 1997-11-01 SL Baur - - * XEmacs 20.3-pre1 is released. - - 1997-10-31 SL Baur - - * XEmacs 19.16 is released. - - 1997-10-31 SL Baur - - * XEmacs 20.5-beta2 is released. - - 1997-10-30 SL Baur - - * configure.in (xetest): Eliminate tests for PNG, JPEG, - TIFF(broken) and replace with test for ImageMagick. - - 1997-10-30 Kyle Jones - - * etc/Emacs.ad: Added *XlwMenu*highlightForeground entry. - Added *XlwMenu*titleForeground entry. - - * lwlib/xlwmenu.h: Added string macro declarations for - titleForeground and highlightForeground properties. - - * lwlib/xlwmenuP.h: Added struct fields for title and - highlight colors. - - * lwlib/xlwmenu.c: Added initialization and usage code - for the new titleForeground and highlightForeground - properties. - - 1997-10-29 MORIOKA Tomohiko - - * etc/HELLO: Add Czech. - - * etc/HELLO: Delete Amharic, Thai and Tigrigna. - - 1997-10-28 SL Baur - - * XEmacs 20.3-beta94 is released. - - 1997-10-28 Andreas Jaeger - - * configure.in: Correct last patch for berkdb. - - 1997-10-28 SL Baur - - * XEmacs 20.3-beta93 is released. - - 1997-10-27 Martin Buchholz - - * lib-src/make-path.c: - * lib-src/digest-doc.c: - * lib-src/gnuslib.c: Always include config.h before system headers - * configure.in: Improve AIX configure support - - NON_GNU_CC defaults to `xlc' - - CFLAGS defaults to "-O3 -qstrict -qlibansi -qinfo -qro - -qmaxmem=20000" - - check for sin instead of sqrt in -lm to avoid xlc internal error - - Detect -li18n for use with Motif - - Move weird AIX static linking flags from s&m files to configure.in - - use #pragma instead of -ma flag to avoid compiler warnings - - 1997-10-25 Kyle Jones - - * lwlib/xlwmenu.c: Use XtRDimension in place of - XmRHorizontalDimension in shadowThickness resource - declaration. - - * lwlib/xlwmenu.c (label_button_draw): Use the button_gc - color as the foreground for selected entries. - - * lwlib/xlwmenu.c (push_button_draw): Use the button_gc - color as the foreground for selected entries. - - * lwlib/xlwmenu.c (toggle_decoration_height): Force - height to be minimum of 2x the shadow thickness. - - 1997-10-24 Andreas Jaeger - - * configure.in: Don't choke on Berkeley DB 2.x. - - 1997-10-24 SL Baur - - * XEmacs 20.3-beta92 is released. - - 1997-10-21 SL Baur - - * Makefile.in (lisp/utils/finder-inf.el): Don't force rebuild if - it already exists (use `make finder' to force rebuild). - - 1997-10-18 SL Baur - - * XEmacs 20.3-beta91 is released. - - 1997-10-16 Hrvoje Niksic - - * etc/NEWS: document changed package load semantics. - - 1997-10-15 Olivier Galibert - - * configure.in: Removed -Olimit=2000 from cc for IRIX. - - 1997-10-12 Karl M. Hegbloom - - * configure.in (null_string): Added AC_SUBST(infodir_user_defined) - and removed backquoted echo statement from the infopath report line. - - 1997-10-15 Olivier Galibert - - * configure.in: Added detection of the declaration of the timezone - variable in system files. Defines HAVE_TIMEZONE_DECL if yes. - - - 1997-10-15 Olivier Galibert - - * config.h.in: Add HAVE_TIMEZONE_DECL for detection of declaration - of the timezone variable in system headers. - - * systime.h: Use HAVE_TIMEZONE_DECL. - - 1997-10-14 SL Baur - - * configure.in (all_widgets): Don't allow configuration of - --with-mule if Mule lisp hasn't been installed. - - 1997-10-13 SL Baur - - * configure.in: Remove `site-lisp' from list of directories to - make symbolic links for. - - * XEmacs 20.3-beta90 is released. - - 1997-10-12 Glynn Clements - - * info/dir: Cosmetic changes to info/dir - - 1997-10-13 Hrvoje Niksic - - * etc/NEWS: Updates - - 1997-10-12 SL Baur - - * XEmacs 20.5-beta1 is released. - - * XEmacs 19.16-pre9 is released. - - * XEmacs 19.16-pre8 is released. - - 1997-10-11 SL Baur - - * XEmacs 20.3-beta28 is released. - - * Makefile.in (src/paths.h): Update PATH_INFOPATH - (infopath): New shell variable. - (infopath_user_defined): Ditto. - - * configure.in (infodir_user_defined): Spelling fixes. - - 1997-10-10 Karl M. Hegbloom - - * configure.in: added options and option help docs for infopath - and lockdir - * '' added a line to the report for infopath and lockdir - - * etc/NEWS: Draft entry for the info changes. - - 1997-10-10 Karl M. Hegbloom - - * Makefile.in.in (INFOPATH): Added variable and put it into - DUMPENV. - - 1997-10-11 SL Baur - - * packages/info/localdir: New directory and file. - - * packages/README: New directory & file. - - 1997-10-10 Martin Buchholz - - * Makefile.in: Add `make configure' target - - * etc/BETA: - - remove Chuck as contact name - - random small improvements - - remove I/me references - the message should be that XEmacs - maintenance is an inclusive community effort. - - 1997-10-10 SL Baur - - * etc/BETA (Prerequisite): Add further documentation for - package installation. - - 1997-10-07 SL Baur - - * XEmacs 19.16-pre7 is released. - - 1997-10-05 Damon Lipparelli - - * Makefile.in (install-arch-dep, install-arch-indep): Move the - commands for symlink'ing the system-independent bits into the - system-dependent directory structure from "install-arch-indep" to - "install-arch-dep". - - 1997-10-06 Jens-Ulrik Holger Petersen - - * Makefile.in (blddir): variable from "configure". - (finder): use it. - - 1997-10-05 SL Baur - - * Makefile.in (GENERATED_LISP): New variable. - (all): Force dependency on finder-inf.el. - (lisp/utils/finder-inf.el): new rule. - - 1997-10-04 SL Baur - - * XEmacs 19.16-pre6 is released. - - 1997-10-04 SL Baur - - * XEmacs 20.3-beta27 is released. - - 1997-10-03 Damon Lipparelli - - * Makefile.in (install-arch-indep): When --prefix != - --exec-prefix, symlink the system-independent bits into the - system-dependent directory structure (rather than the other way - around). - - 1997-10-03 Martin Buchholz - - * lib-src/etags.c: etags 12.28 + prototypization - * INSTALL: Better document --site-runtime-libraries - * src/scrollbar-x.c (x_update_scrollbar_instance_status): - FIX: M-x scroll-left; horizontal scrollbar appears; drag it - left; scrollbar disappears; keyboard inoperative. - * configure.in: Remove left-over references to *_switch_x_* - - NAS libaudio is part of $libs_x, not $LIBS - - 1997-10-02 SL Baur - - * XEmacs 20.3-beta26 is released. - - 1997-09-30 SL Baur - - * XEmacs 20.3-beta25 is released. - - * Makefile.in (install-arch-dep): Install the `Installation' for - future reference. - - * etc/BETA: Document existence of `Installation' file. - - Document requirement of rebuilding finder-inf.el when building - from the full tarball. - - * Makefile.in (top_distclean): Remove finder-inf.el*. - - * configure.in (use_union_type): Default to "yes". - - 1997-09-29 Martin Buchholz - - * configure.in: Add tiff autodetection - - 1997-09-29 SL Baur - - * lwlib/xlwmenu.c: Add bounds checking. - Check error return on XmStringGetLtoR. - - 1997-09-27 SL Baur - - * XEmacs 20.3-beta24 is released. - - 1997-09-27 Hrvoje Niksic - - * Makefile.in (custom-loads): New target. - - 1997-09-24 SL Baur - - * etc/BETA (XEmacs 20.3 packages): Added explanation of package - hierarchy. - - 1997-09-23 SL Baur - - * lwlib/xlwmenu.c: Fix compilation problem with USE_XFONTSET. - From Kazuyuki IENAGA - - 1997-09-22 SL Baur - - * XEmacs 19.16-pre4 is released. - - 1997-09-20 SL Baur - - * XEmacs 20.3-beta23 is released. - - 1997-09-19 SL Baur - - * XEmacs 19.16-pre3 is released. - - 1997-09-18 Colin Rafferty - - * etc/NEWS: Various spelling corrections and some grammar - corrections (which/that). - - 1997-09-19 Martin Buchholz - - * src/redisplay-tty.c: Fix crashes with non-7bit tty escape - sequences (needs more testing). - * */Makefile*: - - Cleanup man/*/Makefile for consistency. - - use $(MAKEFINFO), $(TEXI2DVI), etc... - - Make combination --with-srcdir + Sun make work properly. - - Change construct: test -d $${dir} || mkdir $${dir} - --> if test ! -d $${dir}; then mkdir $${dir}; fi - * lisp/x11/x-win-sun.el: Fix remaining glitches with - re-mappings of Sun function keys. - * configure.in: Detect libXaw AFTER libXpm to support libXawXpm. - * man/internals/internals.texi: Fix makeinfo compilation error. - - 1997-09-17 SL Baur - - * XEmacs 20.3-beta22 is released. - - 1997-09-16 SL Baur - - * XEmacs 20.3-beta21 is released. - - * XEmacs 19.16-pre2 is released. - - 1997-09-13 SL Baur - - * XEmacs 20.3-beta20 is released. - - 1997-09-11 Martin Buchholz - - * configure.in: Use `PATH' for options that take multiple dirs. - - Fix test for $PWD == `pwd` - - Prefer autodetected X11R6 to X11 so that broken HP and Linux - systems can work. (untested) - - * lisp/cl/cl.el: Fix `loop' indentation to be same as `defun'. - * lisp/prim/dumped-lisp.el: cl-extra and cl-seq always end up - being autoloaded - let's make them part of the core. - - * lisp/x11/x-compose.el: - * lisp/x11/x-init.el: - * lisp/x11/x-win-sun.el: - * lisp/x11/x-winxfree86.el: - * src/device-x.c: - * src/event-Xt.c: - - Yet another rewrite of key handling (not the last, though) - - x-keysym-on-keyboard-p is much faster. - - x-keysym-on-keyboard-sans-modifiers-p introduced. - - x-keysym-hashtable introduced. - - allow X11R4 libs to guess keysyms on X11R5 servers. - - A better workaround for the bug that some Xlibs generate - Multi_key a adiaeresis when pressing Multi_key a " - - * src/dgif_lib.c: Make sure size_t is defined before using it. - - 1997-09-12 SL Baur - - XEmacs 19.16-pre1 "Queens" is released. - - 1997-09-08 SL Baur - - * configure.in: Reverse package-path. - From Colin Rafferty - - 1997-09-02 SL Baur - - * XEmacs 20.3-beta19 is released. - - * Makefile.in (finder): New target. - - 1997-08-29 SL Baur - - * XEmacs 19.16-beta91 is released. - - 1997-08-25 MORIOKA Tomohiko - - * lisp/apel/emu-x20.el (mime-charset-coding-system-alist): - iso-2022-jp-2 is defined as coding-system. - - * lisp/mule/mule-coding.el: Rename `iso-2022-ss2-{7|8}' -> - `iso-2022-{7|8}bit-ss2' to sync with Emacs 20.0.96. - - (iso-2022-jp-2): New coding system. - - 1997-08-23 MORIOKA Tomohiko - - * lisp/prim/about.el (about-maintainer-glyph): Fix problem with - jka-compr.el. - - 1997-08-20 SL Baur - - * XEmacs 19.16-beta90 is released. - - 1997-08-16 SL Baur - - * XEmacs 20.3-beta18 is released. - - 1997-08-11 Karl M. Hegbloom - - * etc/NEWS: add a section telling about the Info changes. - - 1997-08-09 SL Baur - - * XEmacs 20.3-beta17 is released. - - 1997-08-07 Jan Vroonhof - - * etc/gnuserv.1: Described Hrvoje's mods in manpage - - 1997-08-09 Martin Buchholz - - * configure.in: - - use-system-malloc renamed to with-system-malloc. - - config.el reimplemented for improved accuracy. - - new variable `blddir' introduced for informational purposes. - * lib-src/config.values.in: new config.el implementation - * lib-src/config.values.sh: new config.el implementation - * lisp/modes/pascal.el: Sync with GNU Emacs, fix infloop problem - (thanks to Espen Skoglund, pascal.el maintainer) - * src/chartab.c: maintainability improvements. - * src/mule-coding.c: FIX for: editing DOS files with ISO2022* - coding systems results in extra CR's inserted into file on saving. - - 1997-08-06 SL Baur - - * configure.in: Crash & burn if db-2 is detected. - From Soren Dayton - - 1997-07-31 SL Baur - - * XEmacs 20.3-beta16 is released. - - 1997-07-31 Martin Buchholz - - * configure.in: --with-x11=no --> --with-xface=no - * lisp/efs/dired-xemacs.el: Rationalize mouse file functions - * src/input-method-xlib.c: Allow xemacs to connect to kinput2 - * event-Xt.c: Fix crashes when no input context available. - * src/mule-coding.c: Use enum eol_type instead of int consistently - * regex.c: Use (void *) 0 instead of NULL in varargs function calls - * src/s/freebsd.h: Wrap #include X11/Xlocale.h inside #ifndef - NOT_C_CODE - - 1997-07-27 SL Baur - - * etc/BETA: Update patching instructions. - - 1997-07-26 SL Baur - - * XEmacs 20.3-beta15 is released. - - 1997-07-25 SL Baur - - * lwlib/xlwscrollbar.c: Add debug malloc support. - * lwlib/xlwmenu.c: Ditto. - * lwlib/lwlib-utils.h: Ditto. - - * configure.in (null_string): Add --use-debug-malloc option. - - 1997-07-21 SL Baur - - * info/dir (Packages): Remove AUCTeX, Gnus and Message manuals. - - 1997-07-20 SL Baur - - * Makefile.in (install-arch-indep): Create required links when - prefixdir != execdir. - - 1997-07-19 SL Baur - - * XEmacs 20.3-beta14 is released. - - 1997-07-19 Martin Buchholz - - * src/fns.c (require): Print messages when loading a file as a - result of require. - - * configure.in: - * lisp/utils/config.el: - * lib-src/config.values: - - new file created and installed by building. - - Allow configuration time values to be queried by the lisp code. - - * configure.in: - - check for alloca in libPW on hpux. - - Redo --with-clash-detection - - need to check for termios and friends even if with-tty=no. - - Always define SIGNALS_VIA_CHARACTERS if HAVE_TERMIOS - - better quoting for AIX_SMT_EXP (untested) - - gcc flags now default to "-g -O2 -Wall -Wno-switch" - - * *.[ch]: more warning elimination - - * src/input-method*.c: - * src/s/freebsd.h: - - remove freebsd ifdefs from C code. - - * src/specifier.c: - - fix Fdisplay-table-specifier-p - - 1997-07-13 Steven L Baur - - * XEmacs 20.3-beta13 is released. - - * info/dir (Packages): Integrate texinfo manual for PH. - - 1997-07-10 Hrvoje Niksic - - * extents.c (print_extent): Print correctly. - - 1997-07-13 Steven L Baur - - * configure.in (CPP): Add -Wall to default gcc CFLAGS. - - 1997-07-11 Martin Buchholz - - * *Makefile*: More cleanup. - - MAKE CFLAGS=-foo now works with recursive invocations on old makes - - Nuke ld_call_shared from s&m files - - Nuke src/s/*-static.h - - Nuke Solaris and DEC OSF static build support. - - Nuke SHORTNAMES - - Nuke libmld - - CLASH_DETECTION configurable, off by default. - - * *.[ch]: Warning elimination, code cleanup, some 64-bit - safeguarding. - - * sol2.h: More bullet-proofing for Sun bugs in header files. - - * lib-src/etags.c: etags version 12.19. - - * lisp/x11/x-select.el: - * src/xselect.c: Try STRING if selection owner couldn't convert - COMPOUND_TEXT. - - * src/*.c: Change defalt to default_, and in general allow - doc-snarfing functions to recognize and ignore trailing `_' - - * src/*.[ch]: Introduce XVECTOR_DATA and XVECTOR_LENGTH macros and - convert source code to use them consistently. - - 1997-07-08 Steven L Baur - - * XEmacs 20.3-beta12 is released. - - 1997-07-08 Martin Buchholz - - * configure.in: Set options differently, depending on beta-ness of - build tree. - * *Makefile*: Clean up *clean: targets, esp. Steven's beloved - distclean. - - 1997-07-08 Steven L Baur - - * pkg-src/tree-x/Makefile.in.in (xoobr): Pass CFLAGS to the - linker. - From Olivier Galibert - - 1997-07-07 Steven L Baur - - * pkg-src/tree-x/Makefile.in.in (distclean): Add target. - - 1997-07-06 Steven L Baur - - * lwlib/lwlib-Xm.c (xm_update_one_value): Hand application of mrb - fix. Restoration of lossage from beta10->beta11 upgrade. - - * XEmacs 20.3-beta11 is released. - - 1997-07-08 MORIOKA Tomohiko - - * lisp/language/english.el: Add quail-british for British. - - * lisp/language/european.el: Register input-method for various non - quail-latin-1 methods. - - 1997-07-05 Martin Buchholz - - * lib-src/getopt*.c: Don't redefine const - let configure do that. - - * configure.in: Better behavior for `configure --with-gcc=no' - - Autodetect ulimit.h - - Remove broken SunOS4 kludge for libXmu - - Autodetect usleep - - * src/s/sol2.h: Support gcc on various Solaris releases. - - * lib-src/*.c: Ansify prototypes. - - * lisp/prim/files.el: Optimize auto-mode-alist. - - * pkg-src/tree-x/Makefile.in.in: `make distclean' now works - - `make install' now works. - - dependencies updated. - - * pkg-src/tree-x/*.[ch]: Fix compile warnings. - - Replace uses of XtVa* with non-varargs variants. - - 1997-07-01 MORIOKA Tomohiko - - * lisp/modes/image-mode.el: Add `image-maybe-restore' to - `change-major-mode-hook'. - - * lisp/modes/image-mode.el (image-maybe-restore): New function. - - * src/glyphs.c (make_string_from_file): must protect from - `format-alist'. - - 1997-06-30 Steven L Baur - - * pkg-src/tree-x/Makefile.in.in (INSTALL): Add configure written - variable. - - 1997-06-29 Steven L Baur - - * configure.in (CPP): Correct typo `print-lib-gcc-file-name' - should be `print-libgcc-file-name' - From Katsumi Yamaoka - - * XEmacs 20.3-beta10 is released. - - 1997-06-29 MORIOKA Tomohiko - - * lisp/language/chinese.el: Add chinese-isoir165 (CCITT Extended - GB). - - * lisp/language/chinese.el: Modify charset DOC-strings for CNS - 11643 to be more detailed. - - * lisp/language/arabic.el: Rename `arabic-0', `arabic-1' and - `arabic-2' to `arabic-digit', `arabic-1-column' and - `arabic-2-column' to sync with Emacs/mule-19.34.94-zeta. - - * src/mule-charset.c: Modify charset DOC-strings to be more - detailed. - - Use BOX DRAWINGS characters of JIS X0208. - - 1997-06-28 MORIOKA Tomohiko - - * lisp/apel/richtext.el: Add autoload comments for - `richtext-encode' and `richtext-decode'. - - * lisp/prim/format.el (format-alist): Add `text/richtext'. - - * lisp/tl/chartblxmas.el: New file. - - * lisp/x11/x-menubar.el (default-menubar): Add "Show character - table" for MULE menu. - - * lisp/apel/emu.el: Check richtext.el is bundled. - - * lisp/tl/char-table.el (view-charset): New command. - - * lisp/tl/char-table.el: Rename some functions. - - * lisp/packages/hexl.el (hexl-mode-exit): Run - `hexl-mode-exit-hook'. - - * lisp/x11/x-menubar.el (default-menubar): Fix "Describe language - support" and "Set language environment" of mule menu. - - * lisp/apel/file-detect.el: Add autoload comments for function - `add-path', `add-latest-path', `get-latest-path', - `file-installed-p', `exec-installed-p', `module-installed-p' and - variable `exec-suffix-list'. - - * lisp/prim/format.el (format-alist): Add image/jpeg, image/gif, - image/png and image/x-xpm. - - * lisp/modes/image-mode.el: New file. - - 1997-06-27 MORIOKA Tomohiko - - * lisp/tm/tm-ew-e.el (tm-eword::encode-string-1): avoid infinite - loop caused by long non-encoded-word element. (cf. [tm-en:1356]) - - (mime/field-encoding-method-alist): Add "Message-ID" as ignored. - - 1997-06-25 Steven L Baur - - * XEmacs 20.3-beta9 is released. - - * Makefile.in (dist): Make `make dist' work for me. - - 1997-06-25 Martin Buchholz - - * configure.in: - - Change "t" to tabs in sed commands - - Add /g to sed substitition commands when appropriate - - Change XtVa[SG]etValue to Xt[SG]etValue - - Make version variables into Lisp_Objects. - - 1997-06-19 Martin Buchholz - - * src/config.h.in: - * configure.in: - - Autodetect X defines using xmkmf. - - Compute rpath on *bsd* systems as well. - - rewrite PRINT_VAR m4 macro. - - detect sizes of void* and long long for future use by unex*.c - * regex.c: _GNU_SOURCE may be defined by config.h; don't redefine. - - 1997-06-24 MORIOKA Tomohiko - - * lisp/language/arabic.el: moved from lisp/mule/arabic-hooks.el. - - * lisp/mh-e/mh-e.el (mh-get-new-mail): Decode output as - `mh-folder-coding-system'. - - 1997-06-24 MORIOKA Tomohiko - - * lisp/language/ethio-util.el: imported from - Emacs/mule-19.34.94-zeta. - - * lisp/language/arabic-util.el: moved from lisp/mule/arabic.el; - repair Arabic characters. - - 1997-06-24 MORIOKA Tomohiko - - * lib-src/update-autoloads.sh: Search lisp/mule/. - - * etc/HELLO: final byte for ethiopic was changed to sync with - Emacs/mule-19.34.94-zeta. - - * lisp/x11/x-menubar.el: Fix "Describe language support" and "Set - language environment" of Mule menu. - - * lisp/language/visual-mode.el: moved from mule/. - - * lisp/language/ethiopic.el: Modify for XEmacs. - - * lisp/language/cyrillic.el: Modify DOC-string of koi8-r; Fixed - problem of setting for `language-info-alist' about koi8-r. - - * lisp/mule/auto-autoloads.el: Enable auto-autoloads.el for mule/. - - * lisp/mule/mule-util.el: New file (imported from - Emacs/mule-19.34.94-zeta). - - * lisp/mule/mule-misc.el: Function `truncate-string-to-width' was - moved to mule-util.el. - - * lisp/prim/dumped-lisp.el, lisp/mule/mule-load.el: - lisp/mule/arabic-hooks.el was moved to lisp/language/arabic.el; - lisp/mule/arabic.el was moved to lisp/language/arabic-util.el; Use - lisp/language/ethiopic.el instead of lisp/mule/ethiopic-hooks.el; - Use lisp/language/ethio-util.el instead of lisp/mule/ethiopic.el. - - * lisp/mule/mule-coding.el (coding-system-docstring): New alias to - emulate Emacs/mule-19.34.94-zeta function. - - * lisp/mule/mule-cmds.el: modified to sync with - Emacs/mule-19.34.94-zeta (mule-prefix was changed to "C-x C-m") - - (set-language-info): Add to "Describe Language Support" and "Set - Language Environment" menu. - - * lisp/mule/mule-charset.el: Function `compose-region' and - `decompose-region' were moved to mule-util.el. - - * lisp/leim/quail.el: modify to sync with latest quail.el of - Emacs/mule in ETL. - - (quail-toggle-mode-temporarily): check `quail-conv-overlay'. - - (quail-map-p): Use `characterp' instead of `integerp'. - - 1997-06-23 Steven L Baur - - * etc/NEWS (Commands): Various updates by Hrvoje Niksic. - - 1997-06-21 Steven L Baur - - * Makefile.in: Missing FRC.info. - (install-arch-dep): Add missing backslash. - From Glynn Clements - - * XEmacs 20.3-beta8 is released. - - 1997-06-20 Olivier Galibert - - * lwlib/lwlib-Xaw.c, lwlib/lwlib-Xlw.c, lwlib/lwlib-Xm.c, - lwlib/lwlib.c: Make 64 bit clean. - - 1997-06-20 Steven L Baur - - * etc/gnuserv.1: Updates and cleanup. - From Hrvoje Niksic - - 1997-06-19 Martin Buchholz - - * configure.in: - - Autodetect X defines using xmkmf. - - Compute rpath on *bsd* systems as well. - - rewrite PRINT_VAR m4 macro. - - detect sizes of void* and long long for future use by unex*.c - - 1997-06-18 Martin Buchholz - - * */Makefile.in.in: Another rewrite - Make makefiles immune from being mangled by various cpp - implementations by quoting non-preprocessor directive lines. - - random cleanup - - Use $(RM) and $(pwd) macros consistently - - Add dependencies for balloon-help source files - - Use getcwd by default instead of getwd. - * lwlib/config.h: Now includes src/config.h - * lwlib/*.c: Use config.h, but DON'T use Xos.h - * lib-src/*.c: Fix compiler warnings - * lisp/version.el: - - Put version information in version.sh instead of version.el - - Wed Jun 18 16:41:43 1997 Steven L Baur - - * configure.in (CPP): Remove hardcoding of -L/usr/local/lib - -I/usr/local/include. - - 1997-06-14 Steven L Baur - - * XEmacs 20.3-beta7 is released. - - 1997-06-12 Steven L Baur - - * etc/TUTORIAL (things): Synched by Hrvoje Niksic with previous - XEmacs version. - - 1997-06-13 MORIOKA Tomohiko - - * lisp/gnus/smiley.el (smiley-deformed-regexp-alist): Modify - regexp for horizontal smiley faces. - (smiley-nosey-regexp-alist): Add horizontal smiley faces. - - * lisp/leim/quail.el (quail-get-translation): Don't use - `string-to-vector' for XEmacs. - - 1997-06-13 Gary D. Foster - - * lisp/modes/*.el: Removed all "\177" bindings that were - previously commented out and normalized everything vis a vis - 'backspace and 'delete keysyms. - * lisp/packages/*.el: Normalized all the "\177" bindings - * lisp/modes/cperl-mode.el: Created cperl-electric-delete function - which is a "smart" version of the cperl-electric-backspace - function (it honors the desired delete direction). Bound it to - 'delete and the electric-backspace to 'backspace. - * lisp/packages/pending-del.el: Added cperl-electric-backspace and - cperl-electric-delete to the 'supersede list. - - 1997-06-11 Steven L Baur - - * XEmacs 20.3-b6 is released. - - * configure.in (GNU_MALLOC): Check for (-l)PW instead of (-l)-lPW. - Suggested by Martin Buchholz - - 1997-06-11 Martin Buchholz - - * src/Makefile.in: - * lwlib/Makefile.in: - * lib-src/Makefile.in: - * Makefile.in: More Makefile cleanup - - add .PHONY targets where necessary - - remove most builtin rules using .SUFFIXES - - -lXau only gets used for linking gnuserv binaries - - No VPATH for root Makefile - - remove gcc v1 support - * configure.in: - - A new test to autodetect need to define NARROWPROTO, - needed by XFree86 - - Consistently use idiom foo=`echo '' $foo | sed -s 's:^ ::' -e ...` - - Immediately exit if SIZEOF_* tests fail. - - Check for libPW - - Use more sophisticated Xpm test that confirms xpm.h and libXpm - are in sync. - * src/s/linux.h: - * src/m/intel386.h: Yet another attempt to clean up linux defines. - - 1997-06-10 Steven L Baur - - * lib-src/pop.c: Correct incantation for pop.h. - From Martin Buchholz - - Tue Jun 10 15:11:16 1997 Steven L Baur - - * configure.in (beta): Correct test looking for Beta number. - - 1997-06-11 MORIOKA Tomohiko - - * src/Makefile.in.in, mule/language/misc-lang.el, - mule/mule-load.el, mule/ipa-hooks.el: Use - lisp/mule/language/misc-lang.el instead of lisp/mule/ipa-hooks.el; - mule/ipa-hooks.el was deleted. - - 1997-06-10 MORIOKA Tomohiko - - * Use lisp/mule/language/thai-util.el instead of - lisp/mule/thai.el. - - * lisp/custom/wid-edit.el: Add widget `coding-system' for mule. - - * lisp/mule/thai-hooks.el, lisp/mule/mule-load.el: Use - lisp/mule/language/thai.el instead of lisp/mule/thai-hooks.el. - - * lisp/mule/language/thai.el: modified for XEmacs. - - 1997-06-09 MORIOKA Tomohiko - - * lisp/mule/mule-load.el, src/Makefile.in.in: Use - lisp/mule/language/chinese.el, lisp/mule/language/cyrillic.el, - lisp/mule/language/european.el, lisp/mule/language/greek.el, - lisp/mule/language/japanese.el and lisp/mule/language/korean.el - instead of lisp/mule/chinese-hooks.el, - lisp/mule/cyrillic-hooks.el, lisp/mule/european-hooks.el, - lisp/mule/greek-hooks.el, lisp/mule/japanese-hooks.el and - lisp/mule/korean-hooks.el. - - * lisp/mule/language/*.el was imported from - Emacs/mule-19.34.94-zeta. - - * Use lisp/mule/language/china-util.el instead of - lisp/mule/chinese.el. - - 1997-06-08 MORIOKA Tomohiko - - * lisp/apel/emu-x20.el (mime-charset-coding-system-alist): - iso-8859-1, hz-gb-2312, cn-gb-2312, gb2312, cn-big5 and koi8-r - were defined as coding-system. - - 1997-06-08 MORIOKA Tomohiko - - * etc/smilies/Face_smile.xbm, etc/smilies/Face_weep.xbm, - etc/smilies/Face_ase2.xbm, etc/smilies/Face_ase3.xbm, - etc/smilies/Face_ase.xbm: Add Japanese smiley faces. - - 1997-06-07 MORIOKA Tomohiko - - * lisp/gnus/smiley.el (smiley-deformed-regexp-alist): Add Japanese - smiley faces. - - 1997-06-10 Gary D. Foster - - * lisp/modes/view-less.el: Changed \177 bindings to 'delete - * lisp/modes/help.el: Changed \177 bindings to 'delete - - 1997-06-10 Gary D. Foster - - * lisp/prim/keydefs.el: Changed all 'delete key bindings to point to - the `backward-or-forward-foo' functions. - * lisp/prim/simple.el: - - Renamed `delete-erases-forward' to `delete-key-deletes-forward'. - - Removed `backspace-or-delete-hook' - - Renamed `backspace-or-delete' to `backward-or-forward-delete-char' - - Added functions: `backward-or-forward-kill-word' - `backward-or-forward-kill-sentence' - `backward-or-forward-kill-sexp' - - Removed the zmacs hacks from all the `b-or-f-foo' functions and - began playing nicely with pending-del. - * lisp/modes/cc-mode.el: - * lisp/modes/cperl-mode.el: Fixed references to delete functions - to use the new names. - - 1997-06-09 Steven L Baur - - * XEmacs 20.3-b5 is released. - - 1997-06-08 Steven L Baur - - * etc/NEWS: Updates for early beta20.3 stuffs. - From Hrvoje Niksic - - 1997-06-05 Steven L Baur - - * XEmacs 20.3-b4 is released. - - 1997-06-04 Martin Buchholz - - * src/*/*.h: Remove definitions of HAVE_UNION_WAIT, in accordance - with new Autoconf 2 mechanisms. - * src/syswait.h: - * src/sysdep.c: - * src/process.c: Use only Posix.1 sys/wait.h-defined symbols - - * src/s/netbsd.h: complete rewrite, use ORDINARY_LINK, #ifdef out - old cruft that can be obtained from system header files. - * lib-src/getopt*: Synch with FSF, remove compiler warnings. - - * lib-src/b2m.c: - * src/gifalloc.c: - * lib-src/gnuslib.c: - * lib-src/profile.c: - * lib-src/movemail.c: Fix compiler warnings - - * lib-src/Makefile.in.in: Remove unused -DCONFIG_BROKETS flag - - Fix up compile flags for new etags version - - * etc/NEWS: - * etc/etags.1: - * man/xemacs/programs.texi: - * lib-src/etags.c: Upgraded to etags 12.11 - - * src/config.h.in: Fix inline keyword support - - * configure.in: Use a different mechanism for removing extra white - space. Avoid using foo=`echo $bar`, which loses with various echos. - - new M4 macro XE_SPACE(var, words...) - - Use autoconf 2's AC_HEADER_SYS_WAIT - - Check for Xpm-XpmFree instead of Xpm-XpmReadFileToData to avoid - linking with losing Xpm implementations - - Check for correct wnn4 lib symbols - - Only link with inline.o when using gcc - - Support inline keywords inline, __inline, __inline__ - - Ultrix now implies have_mmap=no - - Sun sound in non-standard dirs now works - - --native-sound-lib no longer ignored on HP & SGI - - gpm configure tests moved after curses configure tests - - 1997-06-04 Gary D. Foster - - * lisp/modes/cc-mode.el: Modified `c-electric-delete' to honor the - desired delete direction in both normal and "hungry" modes. - * lisp/modes/cperl-mode.el: Modified `cperl-electric-backspace' to - honor the desired delete direction. - - 1997-05-30 Martin Buchholz - - * configure.in: Automagically compute -R path for gcc - - 1997-05-30 Gary D. Foster - - * lisp/vm/vm-vars.el: Fixed delete key binding to call - `vm-scroll-down' - - Thu May 29 15:35:07 1997 Martin Buchholz - - * configure.in: Add support for Solaris2.6 -z ignore linker flags - - 1997-05-29 Martin Buchholz - - * configure.in: Replace standard Autoconf MMAP test with Neal - Becker's replacement, hacked somewhat. - - 1997-05-16 Gary D. Foster - - * lisp/prim/simple.el: Created `backspace-or-delete' function and - `backspace-or-delete-hook' - * lisp/prim/keydefs.el: Changed \177 bindings to point to new - delete function. - * lisp/modes/*.el: Removed conflicting \177 bindings. - * lisp/modes/cc-mode.el: Modified `c-electric-delete' to use new - delete bindings. - * lisp/modes/cperl-mode.el: Modified `cperl-electric-backspace' to - use new delete bindings. - - 1997-06-03 MORIOKA Tomohiko - - * lisp/x11/x-menubar.el (default-menubar): Add menu for Mule. - - * lisp/mule/mule-cmds.el: Menu for XEmacs were moved to - x11/x-menubar.el. - - 1997-06-03 MORIOKA Tomohiko - - * lisp/leim/quail.el: to avoid compiling warnings about - overlay.el. - - 1997-06-03 MORIOKA Tomohiko - - * lisp/leim/quail.el: to sync with quail.el of - Emacs-19.34.94-zeta. - - * lisp/leim/quail/ziranma.el, lisp/leim/quail/tonepy.el, - lisp/leim/quail/py.el, lisp/leim/quail/qj.el, - lisp/leim/quail/sw.el, lisp/leim/quail/ccdospy.el, - lisp/leim/quail/punct.el, lisp/leim/quail/4corner.el, - lisp/leim/quail/symbol-ksc.el, lisp/leim/quail/ethiopic.el, - lisp/leim/quail/hanja.el, lisp/leim/quail/quick-cns.el, - lisp/leim/quail/tsangchi-cns.el, lisp/leim/quail/lrt.el, - lisp/leim/quail/tsangchi-b5.el, lisp/leim/quail/devanagari.el, - lisp/leim/quail/japanese.el, lisp/leim/quail/quick-b5.el, - lisp/leim/quail/punct-b5.el, lisp/leim/quail/qj-b5.el, - lisp/leim/quail/py-b5.el, lisp/leim/quail/ctlau.el, - lisp/leim/quail/ctlaub.el, lisp/leim/quail/ecdict.el, - lisp/leim/quail/array30.el, lisp/leim/quail/hangul3.el, - lisp/leim/quail/hanja-jis.el, lisp/leim/quail/cyrillic.el, - lisp/leim/quail/etzy.el, lisp/leim/quail/greek.el, - lisp/leim/quail/ipa.el, lisp/leim/quail/lao.el, - lisp/leim/quail/zozy.el, lisp/leim/quail/viqr.el, - lisp/leim/quail/latin.el, lisp/leim/quail/thai.el, - lisp/leim/quail/hangul.el: quail of LEIM for Emacs-19.34.94-zeta. - - 1997-06-02 MORIOKA Tomohiko - - * mule/korean.el was abolished because it seems not to be used. - - * mule/japanese.el was abolished because it seems not to be used. - - 1997-06-01 MORIOKA Tomohiko - - * lisp/tm/gnus-mime-old.el was abolished because XEmacs 20.3 has - Gnus 5.4. - - * lisp/tm/tm-edit.el: updated to 7.108. - - * lisp/tm/tm-view.el: updated to 7.83. - - * lisp/leim/quail.el: modified for XEmacs. - - * lisp/mule/mule-load.el, lisp/mule/mule-process.el: delete - mule-process.el because it is not used. - - * lisp/mule/european.el was abolished because it seems not to be - used. - - * lisp/mule/mule-load.el: must load mule-cmds before setting for - language-environment. - - * lisp/mule/european-hooks.el: Modified for LEIM. - - * lisp/mule/mule-cmds.el: Uncomment key definition for - `toggle-input-method'. - - * lisp/mule/mule-init.el: Comment out about `mule-keymap' (moved - to mule-cmds.el). - - * lisp/mule/mule-cmds.el: Uncomment about `mule-keymap' (moved - from mule-init.el). - - * lisp/tl/tl-atype.el: Don't require tl-str. - - * lisp/tl/tl-atype.el: Use atype.el of APEL. - - * lisp/tl/tl-list.el: Use alist.el of APEL. - - 1997-05-31 MORIOKA Tomohiko - - * lisp/tl/richtext.el, lisp/tl/emu-x20.el, lisp/tl/emu-xemacs.el, - lisp/tl/emu.el, lisp/tl/emu-e19.el: moved to apel/. - - * lisp/tl/file-detect.el, lisp/tl/filename.el: replaced by APEL's. - - * lisp/mu/std11-parse.el, lisp/mu/std11.el: moved to apel/. - - * lisp/leim/quail.el: Add new quail.el (imported from Emacs - 19.34.94-epsilon). - - * lisp/leim/skk/skkdic.el: delete skkdic.el temporary because - XEmacs can not compile it. - - * lisp/leim/skk/skkdic.el, lisp/leim/quail/zozy.el, - lisp/leim/quail/ziranma.el, lisp/leim/quail/viqr.el, - lisp/leim/quail/tsangchi-cns.el, lisp/leim/quail/tsangchi-b5.el, - lisp/leim/quail/symbol-ksc.el, lisp/leim/quail/thai.el, - lisp/leim/quail/tonepy.el, lisp/leim/quail/quick-cns.el, - lisp/leim/quail/sw.el, lisp/leim/quail/qj-b5.el, - lisp/leim/quail/qj.el, lisp/leim/quail/quick-b5.el, - lisp/leim/quail/py-b5.el, lisp/leim/quail/py.el, - lisp/leim/quail/lao.el, lisp/leim/quail/latin.el, - lisp/leim/quail/lrt.el, lisp/leim/quail/punct-b5.el, - lisp/leim/quail/punct.el, lisp/leim/quail/hanja-jis.el, - lisp/leim/quail/hanja.el, lisp/leim/quail/ipa.el, - lisp/leim/quail/japanese.el, lisp/leim/quail/hangul3.el, - lisp/leim/quail/etzy.el, lisp/leim/quail/greek.el, - lisp/leim/quail/hangul.el, lisp/leim/quail/ethiopic.el, - lisp/leim/quail/devanagari.el, lisp/leim/quail/ecdict.el, - lisp/leim/quail/ctlau.el, lisp/leim/quail/ctlaub.el, - lisp/leim/quail/cyrillic.el, lisp/leim/quail/array30.el, - lisp/leim/quail/ccdospy.el, lisp/leim/quail/4corner.el: Add LEIM - elisp files; old lisp/quail was abolished. - - * src/Makefile.in.in: Add mule-cmds.elc. - - * lisp/mule/mule-load.el, lisp/mule/mule-cmds.el: Add mule-cmds.el - (imported from Emacs-19.34.94-epsilon and comment out a lot to - avoid conflict with mule-init.el or other XEmacs/mule files). - - * lisp/prim/simple.el (assoc-ignore-case): New function; imported - from Emacs-19.34.94-epsilon. - - 1997-05-29 Steven L Baur - - * XEmacs 20.3-beta3 is released. - - * INSTALL: Delete documentation of mocklisp support. - - * configure.in: Delete mocklisp support. - - * etc/FTP: Update mirror info. - - * etc/DISTRIB: Update mirror info. - - 1997-05-29 Martin Buchholz - - * configure.in: Replace standard Autoconf MMAP test with Neal - Becker's replacement, hacked somewhat. - - 1997-05-28 Martin Buchholz - - * lisp/prim/files.el (auto-mode-alist): Reorg auto-mode-alist again. - - * lib-src/etags.c: Version 12.7 from Francesco. - - * configure.in: Juggle link order of X libraries. - Add support for using zsh to run configure. - Document --with-tty=no. - Fix -no-recursion option. - Recognize and ignore --cache-file option. - Recognize null values for preprocessor symbols converted to shell - variables. This maybe fixes the "-ltermcap" problem. - Remove spurious blanks from various SUBST-ituted variables. - Fix conditional creation of gdbinit. - Conditionally create .sbinit for Sunpro C. - - 1997-05-26 Steven L Baur - - * etc/FTP: Correct typo in ftp.cenatls.cena.dgac.fr. - - * etc/DISTRIB: Ditto. - - 1997-05-22 Steven L Baur - - * XEmacs 20.3-beta2 is released. - - Thu May 22 04:19:09 1997 Martin Buchholz - - * configure.in: Try to fix all reported bugs with 20.3-b1. - Change HAVE_WNN6 to WNN6. WNN6 correctly autodetected. - extra-verbose now default on beta builds. - extra-verbose now much more verbose. - Don't set libs_termcap to " ". - Detect -lXm AFTER detecting -lXpm. - Use runtime paths before running tests, since AC_TRY_RUN may - depend on it. - with-xim=motif only default on Solaris. - realpath moved from s&m to configure.in. - xemacs-version.h removed. main_1 now contains $canonical as well, - for even more useful backtraces. - termcap handling rewritten. - Create .sbinit for Sun's source browser. - Warn user if no XPM support present. - Warn user if compiling in error checking. - - * Makefile.in: use MAKE_SUBDIR consistently. Remove references to - dynodump. Remove core when cleaning. Remove config.log. - make distclean now functional. - - Tue Jun 4 10:15:54 1996 Per Bothner - - * etc/e/eterm.ti: Add kcub1, kcuf1, kcuu1, kcud1 capabilities. - - Sun May 18 13:03:20 1997 Steven L Baur - - * lwlib/Makefile.in.in (distclean): Clean up config.h. - - * Makefile.in (distclean): Remve config.log. - remove broken dynodump stuffs. - - Sat May 17 20:30:54 1997 Steven L Baur - - * XEmacs 20.3-b1 is released. - - Fri May 16 20:38:19 1997 Steven L Baur - - * info/dir (Packages): Update minor version number. - - * etc/README: Update minor version number. - - * README: Update minor version number. - - Tue May 13 20:35:52 1997 Steven L Baur - - * XEmacs-20.2 is released. - - Sat May 10 16:14:30 1997 Steven L Baur - - * XEmacs 20.2-b6 is released. - - Thu May 8 20:22:34 1997 Steven L Baur - - * XEmacs 20.2-b5 is released. - - Fri May 2 16:50:02 1997 Steven L Baur - - * XEmacs 20.2-b4 is released. - - Thu May 1 18:13:38 1997 Steven L Baur - - * configure.in (--with-xim): Don't default it to Motif since it - causes crashes at startup on some systems. - - Sun Apr 27 12:25:55 1997 Steven L Baur - - * XEmacs 20.2-b3 is released. - - Wed Apr 23 10:33:58 1997 Steven L Baur - - * XEmacs 20.2-b2 is released. - - * configure.in (beta): OPENWINHOME misspelled. - - Mon Apr 21 14:48:29 1997 Steven L Baur - - * etc/BETA (writing): Update with information about how to create - patches. - - Sat Apr 19 16:13:16 1997 Steven L Baur - - * XEmacs 20.2-b1 is released. - - Thu Apr 17 21:33:59 1997 Steven L Baur - - * configure.in (beta): SONY NEWS-OS has /etc/osversion and not - uname. - - Wed Apr 16 17:44:05 1997 Steven L Baur - - * XEmacs 20.1 is re-released. - - Tue Apr 15 21:03:22 1997 Steven L Baur - - * XEmacs 20.1 is released. - - Sat Apr 12 20:11:08 1997 Steven L Baur - - * XEmacs 20.1-b15 is released. - - Sat Apr 12 09:01:32 1997 Hrvoje Niksic - * PROBLEMS: I have cleaned up a bit the PROBLEMS file, by: - 1) changing it into sections -- there is now a section for building, - running and compatibility problems - - 2) removing some obviously obsolete entries -- e.g. those pertaining - to Emacs 18, etc. --> size is off by 20K - - 3) Rearranging the entries by relevance. I have tried to put the most - relevant entries in front. - - Thu Apr 10 19:07:26 1997 Steven L Baur - - * XEmacs 20.1-b14 is released. (Beta 13 was skipped). - - Wed Apr 9 22:52:06 1997 Steven L Baur - - * XEmacs 20.1-b12 is released. - - Sun Apr 6 22:31:00 1997 Tatsuya Ichikawa - - * configure.in: Cosmetic change to summary print of POP/Kerberos/ - Hesiod options. - - Sat Apr 5 09:11:36 1997 Steven L Baur - - * XEmacs 20.1-b11 is released. - - Wed Apr 2 15:27:35 1997 Steven L Baur - - * Makefile.in (install-only): New target. Functionality suggested - by Larry Schwimmer, correct way of doing it suggested by Chuck - Thompson. - - * configure.in: Default to "-Olimit 2000" as suggested by Jamie - Zawinski for SGI cc and Irix 6. - - Tue Apr 1 12:23:13 1997 Steven L Baur - - * configure.in: Add configuration parameters for Emacs 19.34 - movemail.c (--with-pop, --with-kerberos, --with-hesiod). - - Fri Mar 28 19:58:41 1997 Steven L Baur - - * configure.in: Remove garbage if [ ... ] constructs and a - mispatch. - - Thu Mar 27 18:24:19 1997 Steven L Baur - - * XEmacs 20.1-b10 is released. - - Wed Mar 26 22:31:10 1997 Steven L Baur - - * Remove vms top-level directory. - - * XEmacs 19.15 final released to beta testers. - - Tue Mar 25 19:13:27 1997 Steven L Baur - - * XEmacs 19.15 prefinal released to beta testers. - - Mon Mar 24 12:28:17 1997 Steven L Baur - - * configure.in (--debug): Correct documentation. - - Sun Mar 23 17:24:38 1997 Steven L Baur - - * XEmacs 19.15-b104 is released. - - Sat Mar 22 19:56:36 1997 Steven L Baur - - * etc/sgml/CATALOG: Default to html-3.2final. - - Sat Mar 22 17:55:15 1997 Darrell Kindred - - * configure.in (beta): Add configure support for the -rpath flag - for IRIX analogous to the Solaris "-R". - - Sat Mar 22 16:47:08 1997 Steven L Baur - - * info/dir (Packages): Add HM-HTML-Mode to menu. - - Sat Mar 22 21:27:41 1997 Tomasz J. Cholewo - - * configure.in: Echo only current configuration using 'tee -a'. - - Fri Mar 21 21:26:01 1997 Steven L Baur - - * XEmacs-19.15-b103 is released. - * XEmacs-20.0-b9 is released. - - * Makefile.in (top_distclean): Add `Installation' to distclean - rule. - - Fri Mar 21 20:05:29 1997 Darrell Kindred - - * Makefile.in (autoloads): Pass $(MAKE) to update-elc.sh and - update-autoloads.sh. - - Thu Mar 20 20:14:16 1997 Steven L Baur - - * XEmacs-19.15-b102 is released. - - Tue Mar 18 21:52:36 1997 Steven L Baur - - * XEmacs-19.15-b101 is released. - - Mon Mar 17 19:09:29 1997 Steven L Baur - - * XEmacs-20.1-b8 is released. - * XEmacs-19.15-b100 is released. - - Sat Mar 15 17:15:18 1997 Steven L Baur - - * XEmacs-20.1-b7 is released. - * XEmacs-19.15-b99 is released. - - * etc/sgml/CATALOG: Added IE3 DTDs and htmlpro DTD. - - Thu Mar 13 10:40:11 1997 Steven L Baur - - * configure.in: Add sunos4-1-4 header files. - - Wed Mar 12 18:53:08 1997 Steven L Baur - - * configure.in: Use new file bsdos3.h with BSDI 3.0. - - Sat Mar 8 15:19:33 1997 Steven L Baur - - * XEmacs-20.1-b6 is released. - * XEmacs-19.15-b98 is released. - - Wed Mar 5 18:55:36 1997 Steven L Baur - - * Makefile.in (install-arch-indep): Offer to compress lisp sources. - (gzip-el): New targe for compressed installed lisp sources. - - Tue Mar 4 23:28:37 1997 Martin Buchholz - - * lib-src/update-elc.sh: VM is compiled after the byte-compiler, - but before anything else. More flexible about finding an xemacs - to use for byte-compilation (default src/xemacs). Other minor fixes. - - Mon Mar 3 23:57:56 1997 Steven L Baur - - * XEmacs 20.1-b5 is released. - - Mon Mar 3 18:09:17 1997 Steven L Baur - - * XEmacs 20.1-b4 is released. - - Sat Mar 1 15:38:30 1997 Steven L Baur - - * Makefile.in (distclean): Correct typos. - - * XEmacs 19.15-b96 is released. - - * configure.in: Symlink site-lisp when using --srcdir. - Add special handling of lisp directory to allow for multiple - site-packages files. - - Fri Feb 28 20:38:46 1997 Steven L Baur - - * Makefile.in (distclean): Create lock and site-lisp directories - when they don't exist (after being pruned by CVS). - - Tue Mar 4 00:41:38 1997 Hrvoje Niksic - - * etc/sample.Xdefaults: Added customization of foreground and - background colors for the `default' face. - - Wed Feb 26 22:12:12 1997 Steven L Baur - - * Makefile.in (top_distclean): Reset src/PURESIZE.h for - distribution. - - * XEmacs 20.1-b3 is released. - - Sun Feb 23 17:10:09 1997 Steven L Baur - - * XEmacs 20.1-b2 is released. - - Sat Feb 22 14:29:44 1997 Steven L Baur - - * XEmacs 19-15-b'95 is released. - - Fri Feb 21 22:29:51 1997 Martin Buchholz - - * etc/toolbar/workshop-cap-up.xpm: Moved caption up one pixel. - - * lwlib/xlwscrollbar.c : Fix many scrollbar bugs: - - "knob" renamed to "slider" - - leftmost pixel wasn't sensitive to button clicks, while righmost - pixel was. - - many glitches fixed if Emacs*XlwScrollBar.ArrowPosition:same: - - goobers on top of up-arrow removed. - - up-arrow would not always be redrawn when necessary - - slider drag would be `off' by size of up-arrow - - horizontal and vertical scrollbars didn't use exactly the same - dimensions. - - slider was never drawn if XlwScrollBar.shadowThickness was 0. - - Now up- and down-arrows actually work near beginning/end of buffer! - - Thu Feb 20 12:40:57 1997 Jan Vroonhof - - * configure.in (with_xauth): Attempted correction of test for - libXmu on SunOS. - - Sat Feb 15 14:11:03 1997 Steven L Baur - - * XEmacs 20.1-b1 is released. - * XEmacs 19.15-b94 is released. - - Fri Feb 14 23:23:03 1997 Steven L Baur - - * README: ``This directory tree holds version 19.13 ...'' ??? - - Sun Feb 9 16:15:55 1997 Steven L Baur - - * XEmacs 19.15-b93 is released. - XEmacs 20.0 is released to the 'net. - - Fri Feb 7 19:21:34 1997 Steven L Baur - - * XEmacs 20.0try3 is released. - - Wed Feb 5 18:03:06 1997 Steven L Baur - - * XEmacs 20.0try2 is released. - - Mon Feb 3 19:39:08 1997 Steven L Baur - - * XEmacs 19.15-b92 is released. - - Sat Feb 1 18:17:38 1997 Steven L Baur - - * XEmacs 20.0try1 is released. - * XEmacs 19.15-b91 AKA XEmacs '97 NOT! is released. - - Sat Feb 1 00:00:48 1997 Steven L Baur - - * PROBLEMS: Updated from beta test bug reports. - Put in outline-mode/outl-mouse-minor-mode by default. - - Wed Jan 29 19:59:41 1997 Steven L Baur - - * CHANGES-beta: XEmacs 20.0-b93 is released. - - Sat Jan 25 15:43:59 1997 Steven L Baur - - * CHANGES-beta: XEmacs 20.0-b92 is released. - - Fri Jan 24 09:54:01 1997 Steven L Baur - - * lwlib/xlwmenu.c (massage_resource_name): Changed comparison of - char and pointer. - - Thu Jan 23 10:39:34 1997 Martin Buchholz - - * lib-src/update-elc.sh (ignore_dirs): Quoting portability. - - Wed Jan 22 21:07:17 1997 Steven L Baur - * XEmacs 20.0-b91 (prerelease 2) is released. - - * configure.in (--with-scrollbars): Add Athena3d as a toolkit - type. - - * lwlib/lwlib-Xaw.c (xaw_update_one_widget): Let Athena 3d have 0 - borderwidth. - (xaw_scrollbar_scroll): Use SCROLLBAR_LINE_UP and - SCROLLBAR_LINE_DOWN since that's current the only to get to the - bottom of the buffer. :-( - - Tue Jan 21 20:01:19 1997 Steven L. Baur - - * configure.in (beta): Add LWLIB_USES_ATHENA for odd - configurations that use both Motif and Athena. - - * etc/sgml/HTML32.dtd: html-3.2 final dtd added. - - Wed Jan 15 12:55:19 1997 Steven L Baur - - * info/dir (Gnus): Updated spelling and info. - - Mon Jan 13 13:37:27 1997 Steven L Baur - - * configure.in: Remove assignment of NON_GNU_CPP for irix-6.0. - - Mon Jan 13 00:36:01 1997 Martin Buchholz - - * lib-src/make-docfile.c (scan_lisp_file): eliminate doc-string - warnings for ccl-read-* - - Sat Jan 11 12:05:31 1997 Steven L Baur - - * etc/sample.emacs: Remove code snippet that wipes out the cycle - buffer modeline feature. - - * XEmacs 20.0 beta90 (prerelease 1) is released. - * XEmacs 19.15 beta90 (prerelease 1) is released. - - Tue Jan 7 08:45:16 1997 Steven L Baur - - * configure.in (LIBS): Revise test for XFree86 (look for XF86Config). - - Sat Jan 4 14:52:57 1997 Steven L Baur - * XEmacs 20.0 beta 34 is released. - * XEmacs 19.15 beta 7 is released. - - Fri Jan 3 15:18:59 1997 Jeff Miller - - * lwlib/Makefile.in.in: lwlib is required if X11 is used. - - Wed Jan 1 08:30:48 1997 Martin Buchholz - - * src/emacs.c: Make sure - `./temacs -batch -l loadup.el run-temacs ' - works properly - - * src/Makefile.in.in (rtcmacs): Add support for RTC, Sun's - competitor to Purify. - - * man/lispref/symbols.texi: Fix up bit vector documentation - * man/lispref/sequences.texi: Fix up bit vector documentation - - * lisp/sunpro/sunpro-load.el: Only preload mime-setup for Sun. - - * lisp/prim/update-elc.el: Don't rely on autoloads. - - Tue Dec 31 09:46:13 1996 Martin Buchholz - - * lisp/prim/auto-autoloads.el: New, completely program-generated, file - * lib-src/update-autoloads.sh: Rewritten to use auto-autoloads.el. - * lisp/utils/autoload.el: Reorganization of autoload mechanism: - Errors during autoload generation are just that - errors. - - Generated autoloads are now in a separate file of their own. - - Reliability of autoload generation greatly increased. - - Distribution smaller by about 100k. - - `make autoloads' is still the preferred mechanism for update. - - Autoloads are always regenerated completely from scratch. This - avoids errors with obsolete or corrupted autoload entries. - - Caching of autoload entries using timestamps has been eliminated. - - Files that have no autoloads no longer have a comment placed into - the generated autoloads file. - - There was a bug where autoload entries would sometimes end up - being inserted into the *middle* of other autoload entries, - thereby corrupting them. - - * src/event-Xt.c: Remove SUNOS_GCC_L0_BUG kludge. - - Sun Dec 29 05:37:43 1996 Martin Buchholz - - * lib-src/update-autoloads.sh: Make sure that `make autoloads' - doesn't use the autoload facility to load `autoload'; - load it explicity instead. - - * lib-src/update-elc.sh (ignore_dirs): ignore SCCS, CVS, RCS dirs - - * man/Makefile: Reinstate hyperbole & oo-browser manuals - - * lisp/modes/mail-abbrevs.el: Apply patch originated from Noah Friedman - - * src/mule-charset.c: Use lower case for charset registry, to - match XLFD. - - * Makefile.in: replace list of info files with *.info* - one less - maintenance headache - - * etc/sample.emacs: Add sample code to highlight continuation glyph - - * man/oo-browser.texi: Fix TeXability - - * man/hyperbole.texi: Fix TeXability - - * man/vhdl-mode.texi: Fix TeXability - - * lisp/prim/loaddefs.el: Wholesale housecleaning - `make autoloads' should finally work. - - * lib-src/emacsclient.c (main): ANSIfication, compiler warning removal - - * lisp/mule/mule-files.el: Add support for multi-lingual info files. - - * lib-src/update-elc.sh: `make all-elc' was updating files in - `special' directories without using the Makefiles - designed for that purpose. - - make sure ilisp isn't remade every time through `make all-elc'. - - * info/dir (Packages): Add Japanese TM info files - - * src/inline.c: Allow compilation with `gcc -g' - - * src/syntax.c (word_constituent_p): Allow compilation with `gcc -g' - - * src/lread.c: Don't put `...' immediately after a filename, so - that various tools can recognize the filename as such. - - * src/event-Xt.c (x_to_emacs_keysym): Fix crash when - --with-xim=xlib and key event on window frame. - Change return foo to return (foo) when return is a macro. - - * src/editfns.c (Ffollowing_char): docstring fixes. - - * man/tm/Makefile: Add support for Japanese TM info (but not dvi) files. - This Makefile is no longer officially broken. - - * info/dir: Add Japanese tm documents. - - * man/tm/tm-vm-en.texi: Make document TeX-friendly. - - * lib-src/update-autoloads.sh (EMACS): Don't rely on non-portable - xargs -i flag. - - * lisp/mule/mule-files.el (file-coding-system-alist): Make sure - the `binary' coding system is used for .gz and .Z extensions. - - * man/viper.texi: Viper version 2.90 - - * man/ediff.texi: Ediff Version 2.62 - - * lisp/packages/ispell.el (ispell-word): Avoid using strings with - define-key, for compatibility with loaddefs.el - - * lisp/modes/eiffel3.el: Make compatible with update-autoloads. - - * lisp/ilisp/Makefile (elc): Add target to avoid re-compilation. - - * lib-src/update-elc.sh: XEmacs sometimes re-byte-compiled elisp - files in dirs that have their own Makefiles. - - - - Sun Dec 29 17:02:49 1996 Steven L Baur - - * Makefile.in (install-arch-indep): Force compression with `gzip -f'. - - * lib-src/update-elc.sh (NUMTOCOMPILE): Ignore CVS directories. - - * Makefile.in (install-arch-indep): Catch .info-[0-9]* files for - installation. - - Sat Dec 28 15:33:27 1996 Steven L Baur - - * XEmacs 20.0 beta 33 is released. - * XEmacs 19.15 beta 6 is released. - - Fri Dec 27 20:34:58 1996 Richard Mlynarik - - * etc/yow.lines: 20k of new zippy quotes. - - Fri Dec 27 01:02:41 1996 Martin Buchholz - - * Makefile.in (install-arch-indep): Simplify installation of info - pages. - - Sat Dec 21 15:20:20 1996 Steven L Baur - * XEmacs 20.0-b32 released. - - * XEmacs 19.15-b5 released. - - Wed Dec 18 20:22:08 1996 Martin Buchholz - - * configure.in: Reformat. Fix shared include file rename - problem. - - * configure: Reformat. Fix shared include file rename problem. - - * dynodump/dynodump.c (__EXTENSIONS__): Define it. - - Thu Dec 12 13:19:00 1996 Joseph J Nuspl - - * Makefile.in (install-arch-indep): Install infofiles gzipped by - default. - - Tue Dec 10 19:25:25 1996 Steven L Baur - - * CHANGES-beta: XEmacs 20.0-b31 is released. - - Tue Dec 10 18:33:19 1996 Rod Whitby - - * info/vhdl-mode.info: New file. - - * info/dir (Packages): Add vhdl-mode documentation. - - Tue Dec 10 18:27:02 1996 Martin Buchholz - - * configure: Make shared/dynamic flags work much more logically. - - Tue Dec 10 09:17:22 1996 David Worenklein - - * configure.in (machine): Patch to make newly renamed shared - link include files work. - - Sat Dec 7 16:28:10 1996 Martin Buchholz - - * configure.in: Configure for POSIX getcwd if available. - - Thu Dec 5 20:42:35 1996 Steven L Baur - - * etc/edt-user.doc (File): New file from Emacs 19.34. - - Thu Dec 5 11:56:05 1996 Joseph J Nuspl - - * configure.in (LIBS): Fix typo in dialog box test. - - -1998-07-12 Björn Torkelsson - - * Makefile.in: added LDFLAGS. - -1998-07-12 SL Baur - - * etc/GOATS: Removed. - - * README: Bump version numbers. - * info/dir: Ditto. - * etc/README: Ditto. - * etc/NEWS: Ditto and purge pre-21.0 stuff. - * version.sh: Ditto. - - * XEmacs 21.0-pre5 is released. - -1998-07-10 SL Baur - - * configure.in (with_offix): Default --with-offix to off. - -1998-07-09 SL Baur - - * configure.in: Handle multiple database libraries. - From Gregory Neil Shapiro - - * XEmacs 21.0-pre4 is released. - - * configure.in: Fix test for InfoDock sources. - - * etc/BETA (writing): Update patch creation instructions. - - * etc/FTP: Update FTP mirror list. - - * etc/DISTRIB: Remove duplicated FTP mirror list. - * etc/xemacs.1 (ftp): Ditto. - -1998-07-09 Oliver Graf - - * configure.usage: added warning to --with-offix - -1998-06-29 SL Baur - - * etc/gnuserv.1 (this): Email address for Ben Wing is ben@xemacs.org. - * etc/gnuserv.README (README): Ditto. - * etc/xemacs-ja.1: Ditto. - -1998-06-28 SL Baur - - * configure.in: Berkeley DB autodetection fixes - From Martin Buchholz - - * etc/BABYL: Moved to rmail package - - * etc/enriched.doc: Moved to xemacs-base package - - * etc/MSDOS: - * etc/GNUS-NEWS: deleted - -1998-06-21 Michael Sperber [Mr. Preprocessor] - - * etc/NEWS: Added references to documentation about packages and - path setup. - - * etc/README: Synched. - -1998-06-19 SL Baur - - * XEmacs 21.0-pre3 is released. - -1998-06-20 Michael Sperber [Mr. Preprocessor] - - * etc/PACKAGES: - * etc/BETA: Moved some package stuff into Texinfo docs. Other nitpicks - -1998-06-20 Kazuyuki IENAGA - - * configure.in: Added check if the berkdb has db_open or not. - (With fixes from Martin Buchholz) - -1998-06-19 SL Baur - - * XEmacs 21.0-pre2 is released. - -1998-06-18 Michael Sperber [Mr. Preprocessor] - - * configure.in: Added -lC for static linking under AIX 4.2. - -1998-06-14 SL Baur - - * XEmacs 21.0-pre1 is released. - -1998-06-14 Oscar Figueiredo - - * etc/NEWS: Updated information about customization of the - automatic info dir file generation using - `Info-auto-generate-directory' and `Info-save-auto-generated-dir' - -1998-06-11 SL Baur - - * XEmacs 21.0-beta43 is released. - -1998-06-04 Oliver Graf - - * tests/Dnd/README: a step-by-step test run - * tests/Dnd/droptest.el: some clarifications - * tests/Dnd/droptest.sh: created, creates test files - -1998-06-01 Oliver Graf - - * configure.in (summary): added experimental to dragndrop option - * configure.usage: added experimental note to --with-dragndrop - * tests/Dnd/droptest.el: extra start-drag-region function - changed the experimental- stuff - -1998-06-02 Andy Piper - - * etc/check_cygwin_setup.sh: set more intelligent defaults for - windows 95. - -1998-06-07 SL Baur - - * lwlib/xlwmenu.c: Add room for the 0 byte sentinel. - -1998-06-05 Colin Rafferty - - * lwlib/xlwmenu.c: Made newchars be as large as it needs to be. - -1998-06-01 SL Baur - - * XEmacs 21.0-beta42 is released. - - * etc/sounds: Removed, now in the sounds-au package. - -1998-05-29 Andy Piper - - * configure.in: don't use -O3 for cygwin. - - * etc/check_cygwin_setup.sh: new file to check that cygwin is setup - correctly for XEmacs operation. - -1998-05-28 P. E. Jareth Hein - - * configure.in: Switch from giflib to gifreader for - our GIF image support (no other mods needed) - -1998-05-28 Oliver Graf - - * configure.in: only one DnD protocol, CDE has priority over OffiX - - * tests/Dnd/README: some changes reflecting recent modifications - * tests/Dnd/dragtest.el: removed - * tests/Dnd/droptest.el: cosmetics and comments - -1998-05-26 Oliver Graf - - * tests/Dnd/droptest.el: adapted to CDE extensions - -1998-05-25 Hans Guenter Weigand - - * configure.in: - * config.sub: add initial OpenBSD support - -1998-05-21 Andy Piper - - * configure.in: check for msw dialogs. - -1998-05-23 SL Baur - - * XEmacs 21.0-beta41 is released. - -1998-05-17 SL Baur - - * configure.in (CPP): Change -O2 to -O3. - Suggested by Martin Buchholz - -1998-05-15 SL Baur - - * XEmacs 21.0-beta40 is released. - -1998-05-13 SL Baur - - * configure.in (ZSH_VERSION): zsh-3.1.2 (and zsh-3.0.4) drops core - on the `unset CDPATH' if running as sh. - -1998-05-12 Oliver Graf - - * tests/Dnd/droptest.el: some CDE adaptions (untested) - -1998-05-11 Martin Buchholz - - * configure.in: - Add some more comments. - If using bash, use Posix mode and unset CDPATH. - Be more careful checking feature dependencies. - Introduce XE_CHECK_FEATURE_DEPENDENCY. - Undo the gross hack of multiple `echo >> $tempcname' - by using here documents instead. (Might break mswindows, tho...) - Be more careful autodetecting tooltalk. - - * PROBLEMS: - Document problems with Solaris 2.6 + XSUNTRANSPORT - - * Makefile.in: - * lwlib/Makefile.in.in: - * modules/Makefile.in: - - Adjust for luser's CDPATH being set to something weird. - - Take into account bash 2.02's tendency to print the cwd when - using CDPATH. Always use `cd ./foo' instead of `cd foo'. - - fix the run-temacs target to use $(DUMPENV) - - fix the run-puremacs target to use $(DUMPENV) - - fix the `depend' target to properly $(RM) the right files - - Generate a better TAGS file for XEmacs' lisp code using - hand-crafted regexps. - - Use standard coding conventions for modules/Makefile.in - -1998-05-12 Kazuyuki IENAGA - - * configure.in: some people claimed that they can't stop - linking wnn6 library if they set --with-wnn6=no. - -1998-05-11 Oliver Graf - - * tests/Dnd/droptest.el: adapted to new calling conventions - also showing the new possibilities - * tests/Dnd/README: changed to new protocol - -1998-05-11 SAKIYAMA Nobuo - - * Fix for HAVE_MULTICAST check. - -1998-05-09 SL Baur - - * XEmacs 21.0-beta39 is released. - -1998-05-06 Oliver Graf - - * configure.in: added autodetection for the Drag'n'Drop API - if some DnD protocol is found, HAVE_DRAGNDROP will be defined - and dragdrop.o is added to extra_objs - * configure.usage: added with-dragndrop, added (*) to with-offix - * tests/Dnd/droptest.el: complete overhaul, no it's a real test - -1998-05-04 Oliver Graf - - * tests/Dnd/droptest.el: changed to test new protocol - * tests/Dnd/README.OffiX: removed - * tests/Dnd/README: created, info about new protocol - * tests/Dnd/dragtest.el: comment change - -1998-05-07 SL Baur - - * etc/altrasoft-logo.xpm: Removed. - -1998-05-02 SL Baur - - * XEmacs 21.0-beta38 is released. - -1998-04-29 SL Baur - - * configure.in: Use `PROGNAME' for all generated paths. - - * Makefile.in: Change `progname' to `PROGNAME' for consistency. - -1998-04-27 SL Baur - - * configure.in (progname): Parameterize program name on `progname' - and add --with-infodock. - -1998-04-26 SL Baur - - * Makefile.in: Religiously use ${progname} instead of hardcoded - `xemacs'. - CPPFLAGS was being set correctly in ${subdir}/Makefiles and - overridden by the empty one set in the toplevel Makefile. - -1998-04-26 Jason R Mastaler - - * etc/BETA: Replaced SmartList references in favor of - Majordomo. - -1998-04-25 SL Baur - - * XEmacs-21.0-beta37 is released. - -1998-04-25 Michael Sperber [Mr. Preprocessor] - - * configure.in: Sychronized ..._USER_DEFINED variables with - datadir setting. - - * Makefile.in (mkdir): No longer create sitelispdir. - -Sat Apr 24 1998 Andy Piper - - * configure.in: make graphic libraries tests be dependant on a - window system not X11 only. - -Fri Apr 24 19:38:19 1998 Andy Piper - - * configure.in: check for our special select in msw. - -1998-04-22 Marcus Thiessel - - * PROBLEMS: add answers to some FAQ concerning hpux. - -Wed Apr 22 12:59:35 1998 Andy Piper - - * configure.in: enable checking for special mswindows select() - -1998-04-21 Martin Buchholz - - * configure.in: Isolate incomprehensible cma_open/pthreads checking - to decosf* - -1998-04-21 Marcus Thiessel - - * configure.in: /usr/{include,lib}/Motif2.1 added to search path for X11 - libs and includes. - -1998-04-22 Itay Ben-Yaacov - - * configure.in: check for xpm does not depend anymore on having X. - if libXpm exists, and is of the FOR_MSW flavor, define FOR_MSW. - -1998-04-19 Oscar Figueiredo - - * etc/NEWS: Documented info dir rebuilding and LDAP support. - - * info/dir: Fixed the explanatory notes for - `Info-default-directory-list' removal and the new automatic dir - rebuilding facility. Reindented the menu. Added an entry for - term.info - -1998-04-20 SL Baur - - * configure.in (LISPDIR): Removed configuration option for - site-lisp. - -1998-04-19 SL Baur - - * configure.in (version): snarf InfoDock version number. - -1998-04-18 SL Baur - - * XEmacs-21.0-beta36 is released. - -Fri Apr 17 12:59:35 1998 Andy Piper - - * configure.in: enable install pre-processing for mswindows - -Fri Apr 17 12:59:35 1998 Andy Piper - - * Makefile.in.in: add install_pp to install incantation. - - * installexe.sh: new file. Add .exe to install targets if the - result is executable. - -Fri Apr 17 12:59:35 1998 Andy Piper - - * Makefile.in: add install_pp to install incantation. - -1998-04-14 Itay Ben-Yaacov - - * configure.in: Large echo split into a few smaller ones, - so the cygnus sh.exe does not crash. - -Thu Apr 16 12:59:35 1998 Andy Piper - - * configure.in: enable toolbar checking for mswindows build - -1998-04-06 Martin Buchholz - - * config.h.in: Add _SVID_SOURCE to list of xmkmf #defines. - Used (at least) by RedHat 4.2. - -1998-04-11 Michael Sperber [Mr. Preprocessor] - - * etc/xemacs.1: -no-packages -> -no-early-packages. - - * etc/NEWS: Clarified site-lisp status. - - * configure.in: Re-instated src/paths.h generation from - src/paths.h.in. - - * Makefile.in (top_distclean): Remove site-lisp on `make - distclean'. - -1998-04-10 SL Baur - - * XEmacs 21.0-beta35 is released. - -1998-04-10 Michael Sperber [Mr. Preprocessor] - - * etc/NEWS: Documented that Info-default-directory-list and - site-directory are gone. - - * configure.usage: Clarified --package-path documentation. - -1998-04-07 Michael Sperber [Mr. Preprocessor] - - * configure.in: Now generates src/paths.h from src/paths.h.in.in. - Removed defaults for infopath and package-path. - - * Makefile.in (src/paths.h): ... is now generated from - src/paths.h.in.in. Moved generation of paths.h to configure. - - * paths.h.in: Removed. - - * paths.h.in.in: Created. - -1998-04-06 Martin Buchholz - - * configure.in: png was still being used if png_version < 0.96 - - * configure.in: Fixed magic to handle AIX, X11R6, and gcc. - -1998-04-05 Amir J. Katz - - * INSTALL (Rationale): Offix support comment is wrong. To disable, - one must use --with-offix=no and not --without-offix - -1998-04-05 SL Baur - - * configure.in (CPP): ppc.ldscript sits in $srcdir/src not $srcdir. - -1998-04-04 SL Baur - - * XEmacs 21.0-beta34 is released. - -1998-04-03 Martin Buchholz - - * configure.in: - checking whether gettimeofday accepts one or two arguments... two - -1998-04-03 Michael Sperber [Mr. Preprocessor] - - * configure.in: Fixed magic to handle AIX and MIT X11R6. - -1998-04-02 Martin Buchholz - - * configure.in: Add magic -T $srcdir/ppc.ldscript on Linux powerpc - -1998-04-01 Martin Buchholz - - * tests/database.el (test-database): Temporary files (the databases - that were created) should be deleted. - - * Makefile.in (testdir): Remove gnumake-specific syntax. - (src/Makefile): src/Makefile depends on src/depend. - -1998-03-29 Martin Buchholz - - * configure.in: Check for -lz, -lgz unconditionally. Too many - system linkers don't properly die when there are cascaded link - dependencies, so we can't rely on the linker for that. The only - downside is that we might link with an extra unneeded library. If - you really really care about this, you can go fix it. - - * configure.in: Enhance PANIC msg to make it clear that - --with-FEATURE is going to die if FEATURE is not installed. - -1998-03-27 Martin Buchholz - - * configure.in: $debug was not properly dependent on $beta - - * configure.in: Move offix configuration out of src/Makefile.in.in - into configure.in. - - * configure.in: Reorganize xpm detection code. - - * configure.in: XIM default to ON if Motif which is not Lesstif is - found. - - * configure.in: Keep auto-generated makefile dependencies out of - src/Makefile.in.in by using AC_OUTPUT file concatenation support. - -1998-03-26 Martin Buchholz - - * configure.in: Fix up cflags handling. Specifically, configure - --cflags='' would fail to be recognized. - - * configure.in: Fix up png detection. Link with png_read_image to - make sure -lz is required. Test for png >- 0.96 via header file. - -1998-03-21 Martin Buchholz - - * configure.in (XE_GCC_WRAP_LDFLAGS) - Rename to XE_PROTECT_LINKER_FLAGS. Rewrite. - - * configure.in: Make sure BSD always links in libz.a - BSD's stupid linker can't detect cascaded lib dependencies - - * configure.in: Autodetect lesstif. define have_lesstif. - Don't use motif-xim with lesstif, at least by default. - -1998-03-30 SL Baur - - * version.sh: Add InfoDock version number variables. - -1998-03-30 Amir J. Katz - - * info/dir: Replaced string '20.5' with '21.0' - -1998-03-24 SL Baur - - * XEmacs 21.0-beta33 is released. - -1998-03-26 Didier Verna - - * configure.in, Makefile.in: Removed infopath_user_defined---we - always want to propagate it. - - * configure.usage: Synched with configure.in. - -1998-03-25 Michael Sperber [Mr. Preprocessor] - - * configure.usage, INSTALL: Synched with the new path layout. - - * Makefile.in (src/paths.h): Replaced packagepath with - package_path to make configure happy. - - * configure.in: Made default setting for packagepath conform to - what packages.el builds at run-time: XEmacs-version-specific paths - before site-specific ones. - Added default setting for pkgdir. - Changed --packagepath back to --package-path. - -1998-03-24 SL Baur - - * XEmacs 21.0-beta32 is released. - -1998-03-23 Michael Sperber [Mr. Preprocessor] - - * configure.in: Extended package path by version-specific - hierarchies. Changed allow-site-lisp to inhibit-site-lisp. - -1998-03-22 SL Baur - - * Makefile.in (distclean): Remove packages and mule-packages if they - have been linked into place. - -1998-03-22 Michael Sperber [Mr. Preprocessor] - - * : The Big Path Searching Overhaul. - - * Makefile.in, configure.in: Now pass all configure-specified paths - into the binary in a uniform way. - -1998-03-20 SL Baur - - * configure.in (have_libmcheck): Add test for glibc's malloc - checker. - - Fix HP/UX dynamic linking flag. - -1998-03-19 SL Baur - - * configure.in (quoted_arguments): Fix unquoted variable in - error-checking test. - - fix bogus substitution. - -1998-03-17 SL Baur - - * configure.in: In -lpng test, look for png_set_strip_alpha. - Suggested by William M. Perry - -1998-03-16 SL Baur - - * XEmacs 21.0 beta31 is released. - -1998-03-16 P. E. Jareth Hein - - * configure.usage (Usage): Correct information about gif, tiff - and WNN entries - -1998-03-13 SL Baur - - * configure.in: typo fix in sed command. - From P. E. Jareth Hein - - * configure.in (all_widgets): Check for snprintf(). - -1998-03-11 P. E. Jareth Hein - - * configure.in: New gif support - -1998-03-10 SL Baur - - * configure.in (have_glibc): Don't define _GNU_SOURCE for glibc. - -Mon Mar 09 13:00:55 1998 Andy Piper - - * configure.in: don't add libc to link list for dlopen ordinary - link takes care of this. check for dlfcn.h - -1998-03-10 SL Baur - - * configure.in: Examine each directory of X11 include path for - inclusion into BITMAPDIR. - -1998-03-09 SL Baur - - * aclocal.m4: Add legalese. - -Mon Mar 09 13:00:55 1998 Andy Piper - - * configure.in: make sure we have ndbm.h as well as libgdbm.a for - database support. - - * configure.in: move msw checking after x checking so that - auto-detection works. - -1998-03-09 SL Baur - - * configure.in: New DLL support. - * aclocal.m4: New file. - From William M. Perry - -1998-03-08 SL Baur - - * configure.in (xemacs_betaname): Align messages for minimal - tagbits and indexed lrecords. - Suggested by Andreas Jaeger - -1998-03-09 Kyle Jones - - * etc/Emacs.ad: Example using leading dot resources to - initalize faces changes to use Emacs.foo since the - leading dot syntax doesn't work. Initialization of - text-cursor face moved to faces.el. - -1998-03-07 SL Baur - - * XEmacs 20.5-beta30 is released. - -1998-03-05 SL Baur - - * PROBLEMS: Update wording of x86 GCC 2.7 problems. - -Wed Mar 04 08:55:12 1998 Andy Piper - - * configure.in: add a --with-msw option. Make X and msw work - together if the user asks. - -1998-03-02 SL Baur - - * PROBLEMS: Update documentation of gcc bugs that impact XEmacs. - -1998-03-01 SL Baur - - * configure.in: Add substitutable variable ld_dynamic_link_flags - for special required linker flags for building DLL capable - binaries. - - * etc/Emacs.ad: Remove explicit `Emacs' application resource - name. - -1998-02-28 SL Baur - - * Makefile.in (top_distclean): Remove Installation.el. - (xemacs): New target. Formerly it was `all:'. - (all): New default, dist: is now superfluous. - -1998-02-27 SL Baur - - * configure.in (GNU_MALLOC): add --with-dlmalloc to allow - selective use of Doug Lea malloc in Linux C Library and GNU C Library. - (Installation): Add XEmacs version and generate `Installation.el'. - -1998-02-26 SL Baur - - * configure.in (with_ldap: Fix -lldap autodection. - Suggested by Oscar Figueiredo - (Installation): Only keep the last configuration. - -1998-02-25 SL Baur - - * XEmacs 20.5-beta28 is released. - - * configure.in (with_session): Fix reporting of the setting. - (with_database_gnudbm): Correctly report setting. - -1998-02-24 SL Baur - - * configure.usage: Restore documentation of graphics library - flags. - From Karl M. Hegbloom - -1998-02-19 Karl M. Hegbloom - - * PROBLEMS: Tell of the `gpm' SIGTSTP bug and `C-z' on the Linux - console. - -1998-02-23 SL Baur - - * XEmacs 20.4 is released to the beta testers. - -1998-02-21 SL Baur - - * configure.in (after_morecore_hook_exists): Modify dlmalloc tests - to also test for Linux libc5. - -1998-02-19 SL Baur - - * XEmacs 20.5-beta27 is released. - * XEmacs-20.4-pre4 is released. - - * configure.in (doug_lea_malloc): Requires USE_MINIMAL_TAGBITS. - (--with-gung): Implement it. - - * configure.usage (--with-gung): Document. Turns on - USE_MINIMAL_TAGBITS and USE_INDEXED_LRECORD_IMPLEMENTATION. - (--with-term): Remove. - - * XEmacs-20.5-beta26 is released. - -1998-02-18 SL Baur - - * XEmacs-20.4-pre3 is released. - - * Makefile.in: use better feedback while rebuilding finder database. - Suggested by Stephen J. Turnbull - -1998-02-15 SL Baur - - * configure.in (doug_lea_malloc): Add checking for Doug Lea - Malloc. - -1998-02-14 SL Baur - - * configure.in (OFFIX_O): Don't use OffiX if no real Xmu support. - Suggested by Pekka Marjola - - * XEmacs-20.4-pre2 is released. - * XEmacs-20.5-beta25 is released. - -1998-02-13 SL Baur - - * INSTALL: Update for Cygwin and Microsoft Windows. - - * README: Update for Microsoft Windows. - -1998-02-09 SL Baur - - * XEmacs 20.4-pre1 is released. - * XEmacs 20.5-beta24 is released. - -Wed Jan 28 13:41:22 1998 Andy Piper - - * configure.in: add mule-coding target which defines MULE_CODING, - nothing uses it as yet. add gif objects to msw support. define - const_is_losing=no for msw. make msw not selected if tty selected. - add -lshell32 for dnd support. check for a.out.h rather than - coff.h - - * lib-src/make-docfile.c: add cygwin support and generalise the - remaining open calls. IMHO this should really include sysfile.h. - -1998-02-03 SL Baur - - * XEmacs 20.5-beta23 is released. - -1998-02-01 SL Baur - - * etc/aliases.ksh: igrep from the shell command line. - From Karl M. Hegbloom - -1998-01-31 SL Baur - - * etc/aliases.ksh: Add `mak' function to create beta.err for - build-report. - From Adrian Aichner - Suggested by Karl M. Hegbloom - -1998-01-27 SL Baur - - * XEmacs 20.5-beta22 is released. - -1998-01-26 SL Baur - - * etc/aliases.ksh: New file. Start tracking useful Maintainer - XEmacs commands. - -1998-01-25 SL Baur - - * XEmacs 20.5-beta21 is released. - -Wed Jan 21 10:49:47 1998 Andy Piper - - * configure.in: check for coff.h - -1998-01-21 Hrvoje Niksic - - * configure.in: Added support for `--with-shlib'. - -1998-01-18 SL Baur - - * XEmacs 20.5-beta20 is released. - -1998-01-13 Martin Buchholz - - * configure.usage: - * etc/NEWS: - Remove doc for configure-time INFOPATH, no longer used. - - * etc/BETA: Update ftp addresses. - * etc/INSTALL: Update ftp addresses. - * etc/MAILINGLISTS: Sync with Emacs 20.2. Update ftp addresses. - - * configure.in: - * src/config.h.in: - Define HAVE_INVERSE_HYPERBOLIC using 1 configure test, not 3. - - * lwlib/lwlib.h: - * lwlib/lwlib.c: - * lwlib/lwlib-config.c: - * lwlib/lwlib-Xm.c: - * lwlib/lwlib-Xaw.c: - * lwlib/lwlib-Xlw.c: - * lwlib/config.h.in: - * src/menubar-x.c: - Prepend LWLIB_ to (SCROLLBARS|MENUBARS|DIALOGS)_(MOTIF|LUCID|ATHENA). - Maintain only one set of variables. - - * etc/xemacs.1: Update author list. - - * Makefile.in (install-arch-dep): Simplify. - Replace construct `test -d $dir && foo' with - `if test -d $dir; then foo; fi' - - * lwlib/xlwmenu.c: - * lwlib/xlwscrollbar.c: - * lwlib/lwlib-Xlw.c: - * lwlib/lwlib-Xm.c: - Always assume presence of limits.h (ANSI). - -1998-01-12 SL Baur - - * INSTALL: Updated for recent Mule/package changes. - - * XEmacs 20.5-beta19 is released. - -1998-01-12 Damon Lipparelli - - * Makefile.in: Yow! Fixed paths to install dirs when --prefix != - --exec-prefix. - -1998-01-10 SL Baur - - * XEmacs 20.5-beta18 is released. - - * etc/FTP: Update address of what was formerly ftp.ibp.fr. - -1998-01-08 Didier Verna - - * configure.in: Get rid of INFOPATH for configure time. - * configure.usage (Usage): Ditto. - -1998-01-09 SL Baur - - * Makefine.in: Correct reported amount of disk savings from - compression. - From Markus Linnala - -Thu Jan 08 09:42:36 1998 - - * configure.in: detect and set scrollbars and menubars with - MS-Windows more appropriately. Check for sys/un.h to use in - gnuserv. - -1998-01-07 SL Baur - - * Makefile.in (progname): Cleanly parameterize XEmacs-specific - naming. - -1998-01-05 Glynn Clements - - * lwlib/xlwmenu.c (push_button_draw): use inactive_gc instead of - inactive_button_gc for menu entries. - (remap_menubar): ignore the enabled status - -1998-01-04 SL Baur - - * XEmacs 20.5-beta17 is released. - - * Makefile.in (finder): Use -vanilla. - (lisp/finder-inf.el): Ditto. - (check-features): New target. Do a sanity check prior to - installation. - -1997-01-03 SL Baur - - * XEmacs 20.5-beta16 is released. - -1997-12-30 SL Baur - - * XEmacs 20.5-beta15 is released. - -1997-12-29 SL Baur - - * Makefile.in (${SUBDIR}): Remove bogus .RECURSIVE dependency. - -1997-12-27 SL Baur - - * XEmacs 20.5-beta14 is released. - -1997-12-23 Andy Piper - - * configure.in: support for *-pc-cygwin32 config - -1997-12-25 SL Baur - - * XEmacs 20.5-beta13 is released. - -1997-12-21 SL Baur - - * etc/BETA (Prerequisite): Add cookbook procedures for maintaining - package lisp directories. - -1997-12-20 SL Baur - - * XEmacs 20.5-beta 12 is released. - -1997-12-19 SL Baur - - * configure.in (bitmapdir): Reenable --with-session by default for - testing. - -1997-12-18 Kyle Jones - - * etc/Emacs.ad: Don't specify a default toolbar specific - background color. - -1997-12-18 Kyle Jones - - * etc/toolbar: Added support for foregroundToolBarColor - symbol to most icons. - -1997-12-17 SL Baur - - * info/dir (File): Skk and Gnats are packaged. - - * PROBLEMS (Note): Update version numbers. - - * etc/BETA: Update version numbers. - - * etc/NEWS: Update version number. - - * info/dir (File): Update version number. - -1997-12-16 SL Baur - - * XEmacs 20.5-beta11 is released. - -1997-12-14 SL Baur - - * configure.in: Don't bypass graphics library detection - if the `--with-imagick' option is given to configure. - : Print autodetected graphics libraries to be linked with Imagick. - - * Makefile.in (lisp/finder-inf.el): Reverse previous change. - -1997-12-14 Olivier Galibert - - * Makefile.in (install-arch-indep): Build info files if needed. - -1997-12-13 SL Baur - - * Makefile.in (lisp/finder-inf.el): Add dependency on src/. - - * XEmacs 20.5-beta10 is released. - -1997-12-12 SL Baur - - * configure.in (CPP): Don't add special CFLAGS for ix86/Linux. - -1997-12-10 Karl M. Hegbloom - - * configure.in (autodetect ImageMagick): also look for - "X11/magick/magick.h", and if present, define - MAGICK_HEADERS_ARE_UNDER_X11 - -1997-12-11 SL Baur - - * configure.in (imagick_libs): Add autodetection for freetype - -lttf library. - -1997-12-09 SL Baur - - * XEmacs 20.5-beta9 is released. - -1997-12-06 SL Baur - - * XEmacs 20.5-beta8 is released. - - * info/dir: update for further packaging. - * configure.in: remove `tree-x' from XEmacs build. - -1997-11-29 Jeff Miller - - * configure.in: motif menubars need xlwmenu.o - - * updated files in src/ to allow an XEmacs configured for - motif menubars to at least compile. Motif menubars are still - very broken. - -1997-12-05 Aki Vehtari - - * etc/refcard.tex: Updated for 20.3 - -1997-12-02 P E Jareth Hein - - * lwlib/xlwscrollbar.c: fixed colormap/visual handling to work - properly with the information in the core. - - * lwlib/xlwmenu.c: fixed colormap/visual handling to work properly with - the information in the core, and fixed a potental problem with - parentage. - -1997-12-02 SL Baur - - * etc/skk/SKK.tut.E (Hint): Fix typos. - -1997-12-01 SL Baur - - * configure.in (with_session): Properly display flag in configure - status report. - -1997-11-29 SL Baur - - * configure.usage: Remove documentation of obsolete option - --with-gif. - -1997-11-27 SL Baur - - * XEmacs 20.5-beta7 is released. - - * configure.in: When testing for -ltiff, fall back on the extra - libraries -ljpeg, and -lz since some -ltiff's need them. - -1997-11-26 SL Baur - - * lwlib/xlwmenu.c (display_menu): Defer incremental menus properly. - From Glynn Clements - -1997-11-25 Kazuyuki IENAGA - - * configure.in: Improve auto detect of libraries ImageMagick rely - on. - -1997-11-23 Jeff Miller - - * Energize is dead. Removed ENERGIZE ifdef's from code in lwlib - and src. Configure.in modified. --with-energize is no longer a - valid configure option. - - * lwlib/Makefile.in.in removed energize support - * lwlib/lwlib-Xm.c removed energize support - * lwlib/lwlib-config.c removed energize support - - * lwlib/energize/* removed - -1997-11-23 SL Baur - - * Makefile.in: Change references of lisp/utils/finder-inf.el to - lisp/finder-inf.el. - -1997-11-20 SL Baur - - * XEmacs 20.5-beta6 is released. - -1997-11-21 Stephen Turnbull - - * configure.usage: Use `--' convention in "usage:" line. - -1997-11-20 Stephen Turnbull - - * configure.in: added `with_xfs' to list of boolean features. - -1997-11-20 SL Baur - - * XEmacs 20.3 is released for binary kit building. - -1997-11-19 Tor Arntsen - - * PROBLEMS: Removed IRIX entry about xemacs core dumps when using - xemacs dumped on one machine on another. Problem was fixed by 20.3. - -1997-11-19 SL Baur - - * etc/xemacs.1: Document -no-packages, -vanilla. - Document -h. - -1997-11-18 SL Baur - - * configure.usage: New file. - - * configure.in: Use it instead of monster 10k shell variable. - -1997-11-17 SL Baur - - * XEmacs 20.3-pre4 is released. - -1997-11-17 Jens-Ulrik Holger Petersen - - * configure.in (infopath): List "/usr/local/" dirs before "/usr/" - dirs. - -1997-11-17 SL Baur - - * configure.in: Initialize infodir off of datadir. - - * Makefile.in: Force LANG = C for building. - -1997-11-15 SL Baur - - * XEmacs 20.3-pre3 is released. - * XEmacs 20.5-beta5 is released. - -1997-11-13 Marc Paquette - - * nt/Todo: added a task for support of lisp packages through - the registry. - -1997-11-13 Jonathan Harris - - * Renamed files *w32* to *msw* - - * Changed 'w32' and 'win32' to 'mswindows', and HAVE_W32GUI to - HAVE_MS_WINDOWS. Changed files: - cus-edit.el, device.el, faces.el, frame.el, msw-faces.el, - msw.init.el, igrep.el, dumped-lisp.el, font.el, hippie-exp.el, - sysdep.el, console-msw.c, console-msw.h, console.c, - device-msw.c, emacs.c, event-msw.c, event-msw.h, event-stream.c, - events.c, events.h, faces.c, frame-msw.c, frame.c, general.c, - msw-proc.c, objects-msw.c, objects-msw.h, redisplay-msw.c, - redisplay.c, symsinit.h, - - * Didn't change 'win32' in nt.c, nt.h, ntproc.c - - * Deleted w32 build directory since nt build directory now handles - X and native mswindows builds. - -1997-11-11 SL Baur - - * XEmacs 20.5-beta4 is released. - -1997-11-10 SL Baur - - * info/dir: remove packaged entries. - From Glynn Clements - - * configure.in: Puke and die if NAS sound is selected without X. - -1997-11-08 SL Baur - - * XEmacs 20.5-beta3 is released. - * XEmacs 20.3-pre2 is released. - -Wed November 05 23:40:00 1997 - - * w32/xemacs.mak: moved building the DOC file to after the .elcs. - -Sun November 01 12:00:00 1997 - - * Files split from nt to new w32 directory: - ChangeLog, README, Todo, paths.h, config.h, inc/*, runemacs.c, - xemacs.mak. - -1997-11-05 Didier Verna - - * configure.in: Added the --site-prefixes options for the configure - script. You give a colon or space separated list of prefixes, and - subdirectories include/ and lib/ will be added with -I and -L. - -1997-11-05 Martin Buchholz > - - * configure.in: AIX + gcc fixes. - - Don't wrap -B. aixflags changed to start_flags. - -1997-11-04 SL Baur - - * lwlib/lwlib-Xm.c(update_one_menu_entry): Add missing variable. - From Skip Montanaro - -1997-11-04 Adrian Aichner - - * etc/TUTORIAL.de: - Updated copyright information. Translated most of the COPYING - section. Translated the <<.*>> didactic line. - -1997-10-22 Adrian Aichner - - * etc/TUTORIAL.de: Fixed two issues reported by - Achim Oppelt - - * etc/TUTORIAL.de: - Manually applied rejected patch hunks from Marc Aurel's patch. - Some more fixes. - - * etc/TUTORIAL.de: - Applied patches supplied by Marc Aurel <4-tea-2@bong.saar.de>. - They fix yet more typos and quite a few awkward sentences. - -1997-10-21 Adrian Aichner - - * etc/TUTORIAL.de: Manually merged a few more corrections by - Carsten Leonhardt - -1997-10-20 Adrian Aichner - - * etc/TUTORIAL.de: - Applied patches from Andreas Jaeger to 1.2, - then merged them with 1.3 via ediff-buffers. - Andreas found some quite nasty typos still and added many missing commas. - - * etc/TUTORIAL.de: Re-fill-ed paragraphs after patching. - - * etc/TUTORIAL.de: Applied the excellent patches courtesy of - Carsten Leonhardt . - -1997-11-03 MORIOKA Tomohiko - - * Delete etc/TUTORIAL.th because Thai is not supported yet. - -1997-11-02 MORIOKA Tomohiko - - * etc/TUTORIAL.ko: Renamed from etc/TUTORIAL.kr to fit with ISO - 639 (two letter language code). - - * etc/TUTORIAL.ja: Renamed from etc/TUTORIAL.jp to fit with ISO - 639 (two letter language code). - -1997-11-02 SL Baur - - * etc/CHARSETS: New file imported from Emacs 20.1. - -1997-11-02 Kyle Jones - - * lwlib/lwlib-Xaw.c (xaw_pop_instance): Don't use parent - window's coordinates and dimensions to center the - dialog box unless its mapped_when_managed property is - true. This should avoid the top level widget that the - HAVE_SESSION code creates, which is unmapped and - useless for this purpose. - -1997-11-01 SL Baur - - * XEmacs 20.3-pre1 is released. - -1997-10-31 SL Baur - - * XEmacs 19.16 is released. - -1997-10-31 SL Baur - - * XEmacs 20.5-beta2 is released. - -1997-10-30 SL Baur - - * configure.in (xetest): Eliminate tests for PNG, JPEG, - TIFF(broken) and replace with test for ImageMagick. - -1997-10-30 Kyle Jones - - * etc/Emacs.ad: Added *XlwMenu*highlightForeground entry. - Added *XlwMenu*titleForeground entry. - - * lwlib/xlwmenu.h: Added string macro declarations for - titleForeground and highlightForeground properties. - - * lwlib/xlwmenuP.h: Added struct fields for title and - highlight colors. - - * lwlib/xlwmenu.c: Added initialization and usage code - for the new titleForeground and highlightForeground - properties. - -1997-10-29 MORIOKA Tomohiko - - * etc/HELLO: Add Czech. - - * etc/HELLO: Delete Amharic, Thai and Tigrigna. - -1997-10-28 SL Baur - - * XEmacs 20.3-beta94 is released. - -1997-10-28 Andreas Jaeger - - * configure.in: Correct last patch for berkdb. - -1997-10-28 SL Baur - - * XEmacs 20.3-beta93 is released. - -1997-10-27 Martin Buchholz - - * lib-src/make-path.c: - * lib-src/digest-doc.c: - * lib-src/gnuslib.c: Always include config.h before system headers - * configure.in: Improve AIX configure support - - NON_GNU_CC defaults to `xlc' - - CFLAGS defaults to "-O3 -qstrict -qlibansi -qinfo -qro - -qmaxmem=20000" - - check for sin instead of sqrt in -lm to avoid xlc internal error - - Detect -li18n for use with Motif - - Move weird AIX static linking flags from s&m files to configure.in - - use #pragma instead of -ma flag to avoid compiler warnings - -1997-10-25 Kyle Jones - - * lwlib/xlwmenu.c: Use XtRDimension in place of - XmRHorizontalDimension in shadowThickness resource - declaration. - - * lwlib/xlwmenu.c (label_button_draw): Use the button_gc - color as the foreground for selected entries. - - * lwlib/xlwmenu.c (push_button_draw): Use the button_gc - color as the foreground for selected entries. - - * lwlib/xlwmenu.c (toggle_decoration_height): Force - height to be minimum of 2x the shadow thickness. - -1997-10-24 Andreas Jaeger - - * configure.in: Don't choke on Berkeley DB 2.x. - -1997-10-24 SL Baur - - * XEmacs 20.3-beta92 is released. - -1997-10-21 SL Baur - - * Makefile.in (lisp/utils/finder-inf.el): Don't force rebuild if - it already exists (use `make finder' to force rebuild). - -1997-10-18 SL Baur - - * XEmacs 20.3-beta91 is released. - -1997-10-16 Hrvoje Niksic - - * etc/NEWS: document changed package load semantics. - -1997-10-15 Olivier Galibert - - * configure.in: Removed -Olimit=2000 from cc for IRIX. - -1997-10-12 Karl M. Hegbloom - - * configure.in (null_string): Added AC_SUBST(infodir_user_defined) - and removed backquoted echo statement from the infopath report line. - -1997-10-15 Olivier Galibert - - * configure.in: Added detection of the declaration of the timezone - variable in system files. Defines HAVE_TIMEZONE_DECL if yes. - - -1997-10-15 Olivier Galibert - - * config.h.in: Add HAVE_TIMEZONE_DECL for detection of declaration - of the timezone variable in system headers. - - * systime.h: Use HAVE_TIMEZONE_DECL. - -1997-10-14 SL Baur - - * configure.in (all_widgets): Don't allow configuration of - --with-mule if Mule lisp hasn't been installed. - -1997-10-13 SL Baur - - * configure.in: Remove `site-lisp' from list of directories to - make symbolic links for. - - * XEmacs 20.3-beta90 is released. - -1997-10-12 Glynn Clements - - * info/dir: Cosmetic changes to info/dir - -1997-10-13 Hrvoje Niksic - - * etc/NEWS: Updates - -1997-10-12 SL Baur - - * XEmacs 20.5-beta1 is released. - - * XEmacs 19.16-pre9 is released. - - * XEmacs 19.16-pre8 is released. - -1997-10-11 SL Baur - - * XEmacs 20.3-beta28 is released. - - * Makefile.in (src/paths.h): Update PATH_INFOPATH - (infopath): New shell variable. - (infopath_user_defined): Ditto. - - * configure.in (infodir_user_defined): Spelling fixes. - -1997-10-10 Karl M. Hegbloom - - * configure.in: added options and option help docs for infopath - and lockdir - * '' added a line to the report for infopath and lockdir - - * etc/NEWS: Draft entry for the info changes. - -1997-10-10 Karl M. Hegbloom - - * Makefile.in.in (INFOPATH): Added variable and put it into - DUMPENV. - -1997-10-11 SL Baur - - * packages/info/localdir: New directory and file. - - * packages/README: New directory & file. - -1997-10-10 Martin Buchholz - - * Makefile.in: Add `make configure' target - - * etc/BETA: - - remove Chuck as contact name - - random small improvements - - remove I/me references - the message should be that XEmacs - maintenance is an inclusive community effort. - -1997-10-10 SL Baur - - * etc/BETA (Prerequisite): Add further documentation for - package installation. - -1997-10-07 SL Baur - - * XEmacs 19.16-pre7 is released. - -1997-10-05 Damon Lipparelli - - * Makefile.in (install-arch-dep, install-arch-indep): Move the - commands for symlink'ing the system-independent bits into the - system-dependent directory structure from "install-arch-indep" to - "install-arch-dep". - -1997-10-06 Jens-Ulrik Holger Petersen - - * Makefile.in (blddir): variable from "configure". - (finder): use it. - -1997-10-05 SL Baur - - * Makefile.in (GENERATED_LISP): New variable. - (all): Force dependency on finder-inf.el. - (lisp/utils/finder-inf.el): new rule. - -1997-10-04 SL Baur - - * XEmacs 19.16-pre6 is released. - -1997-10-04 SL Baur - - * XEmacs 20.3-beta27 is released. - -1997-10-03 Damon Lipparelli - - * Makefile.in (install-arch-indep): When --prefix != - --exec-prefix, symlink the system-independent bits into the - system-dependent directory structure (rather than the other way - around). - -1997-10-03 Martin Buchholz - - * lib-src/etags.c: etags 12.28 + prototypization - * INSTALL: Better document --site-runtime-libraries - * src/scrollbar-x.c (x_update_scrollbar_instance_status): - FIX: M-x scroll-left; horizontal scrollbar appears; drag it - left; scrollbar disappears; keyboard inoperative. - * configure.in: Remove left-over references to *_switch_x_* - - NAS libaudio is part of $libs_x, not $LIBS - -1997-10-02 SL Baur - - * XEmacs 20.3-beta26 is released. - -1997-09-30 SL Baur - - * XEmacs 20.3-beta25 is released. - - * Makefile.in (install-arch-dep): Install the `Installation' for - future reference. - - * etc/BETA: Document existence of `Installation' file. - - Document requirement of rebuilding finder-inf.el when building - from the full tarball. - - * Makefile.in (top_distclean): Remove finder-inf.el*. - - * configure.in (use_union_type): Default to "yes". - -1997-09-29 Martin Buchholz - - * configure.in: Add tiff autodetection - -1997-09-29 SL Baur - - * lwlib/xlwmenu.c: Add bounds checking. - Check error return on XmStringGetLtoR. - -1997-09-27 SL Baur - - * XEmacs 20.3-beta24 is released. - -1997-09-27 Hrvoje Niksic - - * Makefile.in (custom-loads): New target. - -1997-09-24 SL Baur - - * etc/BETA (XEmacs 20.3 packages): Added explanation of package - hierarchy. - -1997-09-23 SL Baur - - * lwlib/xlwmenu.c: Fix compilation problem with USE_XFONTSET. - From Kazuyuki IENAGA - -1997-09-22 SL Baur - - * XEmacs 19.16-pre4 is released. - -1997-09-20 SL Baur - - * XEmacs 20.3-beta23 is released. - -1997-09-19 SL Baur - - * XEmacs 19.16-pre3 is released. - -1997-09-18 Colin Rafferty - - * etc/NEWS: Various spelling corrections and some grammar - corrections (which/that). - -1997-09-19 Martin Buchholz - - * src/redisplay-tty.c: Fix crashes with non-7bit tty escape - sequences (needs more testing). - * */Makefile*: - - Cleanup man/*/Makefile for consistency. - - use $(MAKEFINFO), $(TEXI2DVI), etc... - - Make combination --with-srcdir + Sun make work properly. - - Change construct: test -d $${dir} || mkdir $${dir} - --> if test ! -d $${dir}; then mkdir $${dir}; fi - * lisp/x11/x-win-sun.el: Fix remaining glitches with - re-mappings of Sun function keys. - * configure.in: Detect libXaw AFTER libXpm to support libXawXpm. - * man/internals/internals.texi: Fix makeinfo compilation error. - -1997-09-17 SL Baur - - * XEmacs 20.3-beta22 is released. - -1997-09-16 SL Baur - - * XEmacs 20.3-beta21 is released. - - * XEmacs 19.16-pre2 is released. - -1997-09-13 SL Baur - - * XEmacs 20.3-beta20 is released. - -1997-09-11 Martin Buchholz - - * configure.in: Use `PATH' for options that take multiple dirs. - - Fix test for $PWD == `pwd` - - Prefer autodetected X11R6 to X11 so that broken HP and Linux - systems can work. (untested) - - * lisp/cl/cl.el: Fix `loop' indentation to be same as `defun'. - * lisp/prim/dumped-lisp.el: cl-extra and cl-seq always end up - being autoloaded - let's make them part of the core. - - * lisp/x11/x-compose.el: - * lisp/x11/x-init.el: - * lisp/x11/x-win-sun.el: - * lisp/x11/x-winxfree86.el: - * src/device-x.c: - * src/event-Xt.c: - - Yet another rewrite of key handling (not the last, though) - - x-keysym-on-keyboard-p is much faster. - - x-keysym-on-keyboard-sans-modifiers-p introduced. - - x-keysym-hashtable introduced. - - allow X11R4 libs to guess keysyms on X11R5 servers. - - A better workaround for the bug that some Xlibs generate - Multi_key a adiaeresis when pressing Multi_key a " - - * src/dgif_lib.c: Make sure size_t is defined before using it. - -1997-09-12 SL Baur - - XEmacs 19.16-pre1 "Queens" is released. - -1997-09-08 SL Baur - - * configure.in: Reverse package-path. - From Colin Rafferty - -1997-09-02 SL Baur - - * XEmacs 20.3-beta19 is released. - - * Makefile.in (finder): New target. - -1997-08-29 SL Baur - - * XEmacs 19.16-beta91 is released. - -1997-08-25 MORIOKA Tomohiko - - * lisp/apel/emu-x20.el (mime-charset-coding-system-alist): - iso-2022-jp-2 is defined as coding-system. - - * lisp/mule/mule-coding.el: Rename `iso-2022-ss2-{7|8}' -> - `iso-2022-{7|8}bit-ss2' to sync with Emacs 20.0.96. - - (iso-2022-jp-2): New coding system. - -1997-08-23 MORIOKA Tomohiko - - * lisp/prim/about.el (about-maintainer-glyph): Fix problem with - jka-compr.el. - -1997-08-20 SL Baur - - * XEmacs 19.16-beta90 is released. - -1997-08-16 SL Baur - - * XEmacs 20.3-beta18 is released. - -1997-08-11 Karl M. Hegbloom - - * etc/NEWS: add a section telling about the Info changes. - -1997-08-09 SL Baur - - * XEmacs 20.3-beta17 is released. - -1997-08-07 Jan Vroonhof - - * etc/gnuserv.1: Described Hrvoje's mods in manpage - -1997-08-09 Martin Buchholz - - * configure.in: - - use-system-malloc renamed to with-system-malloc. - - config.el reimplemented for improved accuracy. - - new variable `blddir' introduced for informational purposes. - * lib-src/config.values.in: new config.el implementation - * lib-src/config.values.sh: new config.el implementation - * lisp/modes/pascal.el: Sync with GNU Emacs, fix infloop problem - (thanks to Espen Skoglund, pascal.el maintainer) - * src/chartab.c: maintainability improvements. - * src/mule-coding.c: FIX for: editing DOS files with ISO2022* - coding systems results in extra CR's inserted into file on saving. - -1997-08-06 SL Baur - - * configure.in: Crash & burn if db-2 is detected. - From Soren Dayton - -1997-07-31 SL Baur - - * XEmacs 20.3-beta16 is released. - -1997-07-31 Martin Buchholz - - * configure.in: --with-x11=no --> --with-xface=no - * lisp/efs/dired-xemacs.el: Rationalize mouse file functions - * src/input-method-xlib.c: Allow xemacs to connect to kinput2 - * event-Xt.c: Fix crashes when no input context available. - * src/mule-coding.c: Use enum eol_type instead of int consistently - * regex.c: Use (void *) 0 instead of NULL in varargs function calls - * src/s/freebsd.h: Wrap #include X11/Xlocale.h inside #ifndef - NOT_C_CODE - -1997-07-27 SL Baur - - * etc/BETA: Update patching instructions. - -1997-07-26 SL Baur - - * XEmacs 20.3-beta15 is released. - -1997-07-25 SL Baur - - * lwlib/xlwscrollbar.c: Add debug malloc support. - * lwlib/xlwmenu.c: Ditto. - * lwlib/lwlib-utils.h: Ditto. - - * configure.in (null_string): Add --use-debug-malloc option. - -1997-07-21 SL Baur - - * info/dir (Packages): Remove AUCTeX, Gnus and Message manuals. - -1997-07-20 SL Baur - - * Makefile.in (install-arch-indep): Create required links when - prefixdir != execdir. - -1997-07-19 SL Baur - - * XEmacs 20.3-beta14 is released. - -1997-07-19 Martin Buchholz - - * src/fns.c (require): Print messages when loading a file as a - result of require. - - * configure.in: - * lisp/utils/config.el: - * lib-src/config.values: - - new file created and installed by building. - - Allow configuration time values to be queried by the lisp code. - - * configure.in: - - check for alloca in libPW on hpux. - - Redo --with-clash-detection - - need to check for termios and friends even if with-tty=no. - - Always define SIGNALS_VIA_CHARACTERS if HAVE_TERMIOS - - better quoting for AIX_SMT_EXP (untested) - - gcc flags now default to "-g -O2 -Wall -Wno-switch" - - * *.[ch]: more warning elimination - - * src/input-method*.c: - * src/s/freebsd.h: - - remove freebsd ifdefs from C code. - - * src/specifier.c: - - fix Fdisplay-table-specifier-p - -1997-07-13 Steven L Baur - - * XEmacs 20.3-beta13 is released. - - * info/dir (Packages): Integrate texinfo manual for PH. - -1997-07-10 Hrvoje Niksic - - * extents.c (print_extent): Print correctly. - -1997-07-13 Steven L Baur - - * configure.in (CPP): Add -Wall to default gcc CFLAGS. - -1997-07-11 Martin Buchholz - - * *Makefile*: More cleanup. - - MAKE CFLAGS=-foo now works with recursive invocations on old makes - - Nuke ld_call_shared from s&m files - - Nuke src/s/*-static.h - - Nuke Solaris and DEC OSF static build support. - - Nuke SHORTNAMES - - Nuke libmld - - CLASH_DETECTION configurable, off by default. - - * *.[ch]: Warning elimination, code cleanup, some 64-bit - safeguarding. - - * sol2.h: More bullet-proofing for Sun bugs in header files. - - * lib-src/etags.c: etags version 12.19. - - * lisp/x11/x-select.el: - * src/xselect.c: Try STRING if selection owner couldn't convert - COMPOUND_TEXT. - - * src/*.c: Change defalt to default_, and in general allow - doc-snarfing functions to recognize and ignore trailing `_' - - * src/*.[ch]: Introduce XVECTOR_DATA and XVECTOR_LENGTH macros and - convert source code to use them consistently. - -1997-07-08 Steven L Baur - - * XEmacs 20.3-beta12 is released. - -1997-07-08 Martin Buchholz - - * configure.in: Set options differently, depending on beta-ness of - build tree. - * *Makefile*: Clean up *clean: targets, esp. Steven's beloved - distclean. - -1997-07-08 Steven L Baur - - * pkg-src/tree-x/Makefile.in.in (xoobr): Pass CFLAGS to the - linker. - From Olivier Galibert - -1997-07-07 Steven L Baur - - * pkg-src/tree-x/Makefile.in.in (distclean): Add target. - -1997-07-06 Steven L Baur - - * lwlib/lwlib-Xm.c (xm_update_one_value): Hand application of mrb - fix. Restoration of lossage from beta10->beta11 upgrade. - - * XEmacs 20.3-beta11 is released. - -1997-07-08 MORIOKA Tomohiko - - * lisp/language/english.el: Add quail-british for British. - - * lisp/language/european.el: Register input-method for various non - quail-latin-1 methods. - -1997-07-05 Martin Buchholz - - * lib-src/getopt*.c: Don't redefine const - let configure do that. - - * configure.in: Better behavior for `configure --with-gcc=no' - - Autodetect ulimit.h - - Remove broken SunOS4 kludge for libXmu - - Autodetect usleep - - * src/s/sol2.h: Support gcc on various Solaris releases. - - * lib-src/*.c: Ansify prototypes. - - * lisp/prim/files.el: Optimize auto-mode-alist. - - * pkg-src/tree-x/Makefile.in.in: `make distclean' now works - - `make install' now works. - - dependencies updated. - - * pkg-src/tree-x/*.[ch]: Fix compile warnings. - - Replace uses of XtVa* with non-varargs variants. - -1997-07-01 MORIOKA Tomohiko - - * lisp/modes/image-mode.el: Add `image-maybe-restore' to - `change-major-mode-hook'. - - * lisp/modes/image-mode.el (image-maybe-restore): New function. - - * src/glyphs.c (make_string_from_file): must protect from - `format-alist'. - -1997-06-30 Steven L Baur - - * pkg-src/tree-x/Makefile.in.in (INSTALL): Add configure written - variable. - -1997-06-29 Steven L Baur - - * configure.in (CPP): Correct typo `print-lib-gcc-file-name' - should be `print-libgcc-file-name' - From Katsumi Yamaoka - - * XEmacs 20.3-beta10 is released. - -1997-06-29 MORIOKA Tomohiko - - * lisp/language/chinese.el: Add chinese-isoir165 (CCITT Extended - GB). - - * lisp/language/chinese.el: Modify charset DOC-strings for CNS - 11643 to be more detailed. - - * lisp/language/arabic.el: Rename `arabic-0', `arabic-1' and - `arabic-2' to `arabic-digit', `arabic-1-column' and - `arabic-2-column' to sync with Emacs/mule-19.34.94-zeta. - - * src/mule-charset.c: Modify charset DOC-strings to be more - detailed. - - Use BOX DRAWINGS characters of JIS X0208. - -1997-06-28 MORIOKA Tomohiko - - * lisp/apel/richtext.el: Add autoload comments for - `richtext-encode' and `richtext-decode'. - - * lisp/prim/format.el (format-alist): Add `text/richtext'. - - * lisp/tl/chartblxmas.el: New file. - - * lisp/x11/x-menubar.el (default-menubar): Add "Show character - table" for MULE menu. - - * lisp/apel/emu.el: Check richtext.el is bundled. - - * lisp/tl/char-table.el (view-charset): New command. - - * lisp/tl/char-table.el: Rename some functions. - - * lisp/packages/hexl.el (hexl-mode-exit): Run - `hexl-mode-exit-hook'. - - * lisp/x11/x-menubar.el (default-menubar): Fix "Describe language - support" and "Set language environment" of mule menu. - - * lisp/apel/file-detect.el: Add autoload comments for function - `add-path', `add-latest-path', `get-latest-path', - `file-installed-p', `exec-installed-p', `module-installed-p' and - variable `exec-suffix-list'. - - * lisp/prim/format.el (format-alist): Add image/jpeg, image/gif, - image/png and image/x-xpm. - - * lisp/modes/image-mode.el: New file. - -1997-06-27 MORIOKA Tomohiko - - * lisp/tm/tm-ew-e.el (tm-eword::encode-string-1): avoid infinite - loop caused by long non-encoded-word element. (cf. [tm-en:1356]) - - (mime/field-encoding-method-alist): Add "Message-ID" as ignored. - -1997-06-25 Steven L Baur - - * XEmacs 20.3-beta9 is released. - - * Makefile.in (dist): Make `make dist' work for me. - -1997-06-25 Martin Buchholz - - * configure.in: - - Change "t" to tabs in sed commands - - Add /g to sed substitition commands when appropriate - - Change XtVa[SG]etValue to Xt[SG]etValue - - Make version variables into Lisp_Objects. - -1997-06-19 Martin Buchholz - - * src/config.h.in: - * configure.in: - - Autodetect X defines using xmkmf. - - Compute rpath on *bsd* systems as well. - - rewrite PRINT_VAR m4 macro. - - detect sizes of void* and long long for future use by unex*.c - * regex.c: _GNU_SOURCE may be defined by config.h; don't redefine. - -1997-06-24 MORIOKA Tomohiko - - * lisp/language/arabic.el: moved from lisp/mule/arabic-hooks.el. - - * lisp/mh-e/mh-e.el (mh-get-new-mail): Decode output as - `mh-folder-coding-system'. - -1997-06-24 MORIOKA Tomohiko - - * lisp/language/ethio-util.el: imported from - Emacs/mule-19.34.94-zeta. - - * lisp/language/arabic-util.el: moved from lisp/mule/arabic.el; - repair Arabic characters. - -1997-06-24 MORIOKA Tomohiko - - * lib-src/update-autoloads.sh: Search lisp/mule/. - - * etc/HELLO: final byte for ethiopic was changed to sync with - Emacs/mule-19.34.94-zeta. - - * lisp/x11/x-menubar.el: Fix "Describe language support" and "Set - language environment" of Mule menu. - - * lisp/language/visual-mode.el: moved from mule/. - - * lisp/language/ethiopic.el: Modify for XEmacs. - - * lisp/language/cyrillic.el: Modify DOC-string of koi8-r; Fixed - problem of setting for `language-info-alist' about koi8-r. - - * lisp/mule/auto-autoloads.el: Enable auto-autoloads.el for mule/. - - * lisp/mule/mule-util.el: New file (imported from - Emacs/mule-19.34.94-zeta). - - * lisp/mule/mule-misc.el: Function `truncate-string-to-width' was - moved to mule-util.el. - - * lisp/prim/dumped-lisp.el, lisp/mule/mule-load.el: - lisp/mule/arabic-hooks.el was moved to lisp/language/arabic.el; - lisp/mule/arabic.el was moved to lisp/language/arabic-util.el; Use - lisp/language/ethiopic.el instead of lisp/mule/ethiopic-hooks.el; - Use lisp/language/ethio-util.el instead of lisp/mule/ethiopic.el. - - * lisp/mule/mule-coding.el (coding-system-docstring): New alias to - emulate Emacs/mule-19.34.94-zeta function. - - * lisp/mule/mule-cmds.el: modified to sync with - Emacs/mule-19.34.94-zeta (mule-prefix was changed to "C-x C-m") - - (set-language-info): Add to "Describe Language Support" and "Set - Language Environment" menu. - - * lisp/mule/mule-charset.el: Function `compose-region' and - `decompose-region' were moved to mule-util.el. - - * lisp/leim/quail.el: modify to sync with latest quail.el of - Emacs/mule in ETL. - - (quail-toggle-mode-temporarily): check `quail-conv-overlay'. - - (quail-map-p): Use `characterp' instead of `integerp'. - -1997-06-23 Steven L Baur - - * etc/NEWS (Commands): Various updates by Hrvoje Niksic. - -1997-06-21 Steven L Baur - - * Makefile.in: Missing FRC.info. - (install-arch-dep): Add missing backslash. - From Glynn Clements - - * XEmacs 20.3-beta8 is released. - -1997-06-20 Olivier Galibert - - * lwlib/lwlib-Xaw.c, lwlib/lwlib-Xlw.c, lwlib/lwlib-Xm.c, - lwlib/lwlib.c: Make 64 bit clean. - -1997-06-20 Steven L Baur - - * etc/gnuserv.1: Updates and cleanup. - From Hrvoje Niksic - -1997-06-19 Martin Buchholz - - * configure.in: - - Autodetect X defines using xmkmf. - - Compute rpath on *bsd* systems as well. - - rewrite PRINT_VAR m4 macro. - - detect sizes of void* and long long for future use by unex*.c - -1997-06-18 Martin Buchholz - - * */Makefile.in.in: Another rewrite - Make makefiles immune from being mangled by various cpp - implementations by quoting non-preprocessor directive lines. - - random cleanup - - Use $(RM) and $(pwd) macros consistently - - Add dependencies for balloon-help source files - - Use getcwd by default instead of getwd. - * lwlib/config.h: Now includes src/config.h - * lwlib/*.c: Use config.h, but DON'T use Xos.h - * lib-src/*.c: Fix compiler warnings - * lisp/version.el: - - Put version information in version.sh instead of version.el - -Wed Jun 18 16:41:43 1997 Steven L Baur - - * configure.in (CPP): Remove hardcoding of -L/usr/local/lib - -I/usr/local/include. - -1997-06-14 Steven L Baur - - * XEmacs 20.3-beta7 is released. - -1997-06-12 Steven L Baur - - * etc/TUTORIAL (things): Synched by Hrvoje Niksic with previous - XEmacs version. - -1997-06-13 MORIOKA Tomohiko - - * lisp/gnus/smiley.el (smiley-deformed-regexp-alist): Modify - regexp for horizontal smiley faces. - (smiley-nosey-regexp-alist): Add horizontal smiley faces. - - * lisp/leim/quail.el (quail-get-translation): Don't use - `string-to-vector' for XEmacs. - -1997-06-13 Gary D. Foster - - * lisp/modes/*.el: Removed all "\177" bindings that were - previously commented out and normalized everything vis a vis - 'backspace and 'delete keysyms. - * lisp/packages/*.el: Normalized all the "\177" bindings - * lisp/modes/cperl-mode.el: Created cperl-electric-delete function - which is a "smart" version of the cperl-electric-backspace - function (it honors the desired delete direction). Bound it to - 'delete and the electric-backspace to 'backspace. - * lisp/packages/pending-del.el: Added cperl-electric-backspace and - cperl-electric-delete to the 'supersede list. - -1997-06-11 Steven L Baur - - * XEmacs 20.3-b6 is released. - - * configure.in (GNU_MALLOC): Check for (-l)PW instead of (-l)-lPW. - Suggested by Martin Buchholz - -1997-06-11 Martin Buchholz - - * src/Makefile.in: - * lwlib/Makefile.in: - * lib-src/Makefile.in: - * Makefile.in: More Makefile cleanup - - add .PHONY targets where necessary - - remove most builtin rules using .SUFFIXES - - -lXau only gets used for linking gnuserv binaries - - No VPATH for root Makefile - - remove gcc v1 support - * configure.in: - - A new test to autodetect need to define NARROWPROTO, - needed by XFree86 - - Consistently use idiom foo=`echo '' $foo | sed -s 's:^ ::' -e ...` - - Immediately exit if SIZEOF_* tests fail. - - Check for libPW - - Use more sophisticated Xpm test that confirms xpm.h and libXpm - are in sync. - * src/s/linux.h: - * src/m/intel386.h: Yet another attempt to clean up linux defines. - -1997-06-10 Steven L Baur - - * lib-src/pop.c: Correct incantation for pop.h. - From Martin Buchholz - -Tue Jun 10 15:11:16 1997 Steven L Baur - - * configure.in (beta): Correct test looking for Beta number. - -1997-06-11 MORIOKA Tomohiko - - * src/Makefile.in.in, mule/language/misc-lang.el, - mule/mule-load.el, mule/ipa-hooks.el: Use - lisp/mule/language/misc-lang.el instead of lisp/mule/ipa-hooks.el; - mule/ipa-hooks.el was deleted. - -1997-06-10 MORIOKA Tomohiko - - * Use lisp/mule/language/thai-util.el instead of - lisp/mule/thai.el. - - * lisp/custom/wid-edit.el: Add widget `coding-system' for mule. - - * lisp/mule/thai-hooks.el, lisp/mule/mule-load.el: Use - lisp/mule/language/thai.el instead of lisp/mule/thai-hooks.el. - - * lisp/mule/language/thai.el: modified for XEmacs. - -1997-06-09 MORIOKA Tomohiko - - * lisp/mule/mule-load.el, src/Makefile.in.in: Use - lisp/mule/language/chinese.el, lisp/mule/language/cyrillic.el, - lisp/mule/language/european.el, lisp/mule/language/greek.el, - lisp/mule/language/japanese.el and lisp/mule/language/korean.el - instead of lisp/mule/chinese-hooks.el, - lisp/mule/cyrillic-hooks.el, lisp/mule/european-hooks.el, - lisp/mule/greek-hooks.el, lisp/mule/japanese-hooks.el and - lisp/mule/korean-hooks.el. - - * lisp/mule/language/*.el was imported from - Emacs/mule-19.34.94-zeta. - - * Use lisp/mule/language/china-util.el instead of - lisp/mule/chinese.el. - -1997-06-08 MORIOKA Tomohiko - - * lisp/apel/emu-x20.el (mime-charset-coding-system-alist): - iso-8859-1, hz-gb-2312, cn-gb-2312, gb2312, cn-big5 and koi8-r - were defined as coding-system. - -1997-06-08 MORIOKA Tomohiko - - * etc/smilies/Face_smile.xbm, etc/smilies/Face_weep.xbm, - etc/smilies/Face_ase2.xbm, etc/smilies/Face_ase3.xbm, - etc/smilies/Face_ase.xbm: Add Japanese smiley faces. - -1997-06-07 MORIOKA Tomohiko - - * lisp/gnus/smiley.el (smiley-deformed-regexp-alist): Add Japanese - smiley faces. - -1997-06-10 Gary D. Foster - - * lisp/modes/view-less.el: Changed \177 bindings to 'delete - * lisp/modes/help.el: Changed \177 bindings to 'delete - -1997-06-10 Gary D. Foster - - * lisp/prim/keydefs.el: Changed all 'delete key bindings to point to - the `backward-or-forward-foo' functions. - * lisp/prim/simple.el: - - Renamed `delete-erases-forward' to `delete-key-deletes-forward'. - - Removed `backspace-or-delete-hook' - - Renamed `backspace-or-delete' to `backward-or-forward-delete-char' - - Added functions: `backward-or-forward-kill-word' - `backward-or-forward-kill-sentence' - `backward-or-forward-kill-sexp' - - Removed the zmacs hacks from all the `b-or-f-foo' functions and - began playing nicely with pending-del. - * lisp/modes/cc-mode.el: - * lisp/modes/cperl-mode.el: Fixed references to delete functions - to use the new names. - -1997-06-09 Steven L Baur - - * XEmacs 20.3-b5 is released. - -1997-06-08 Steven L Baur - - * etc/NEWS: Updates for early beta20.3 stuffs. - From Hrvoje Niksic - -1997-06-05 Steven L Baur - - * XEmacs 20.3-b4 is released. - -1997-06-04 Martin Buchholz - - * src/*/*.h: Remove definitions of HAVE_UNION_WAIT, in accordance - with new Autoconf 2 mechanisms. - * src/syswait.h: - * src/sysdep.c: - * src/process.c: Use only Posix.1 sys/wait.h-defined symbols - - * src/s/netbsd.h: complete rewrite, use ORDINARY_LINK, #ifdef out - old cruft that can be obtained from system header files. - * lib-src/getopt*: Synch with FSF, remove compiler warnings. - - * lib-src/b2m.c: - * src/gifalloc.c: - * lib-src/gnuslib.c: - * lib-src/profile.c: - * lib-src/movemail.c: Fix compiler warnings - - * lib-src/Makefile.in.in: Remove unused -DCONFIG_BROKETS flag - - Fix up compile flags for new etags version - - * etc/NEWS: - * etc/etags.1: - * man/xemacs/programs.texi: - * lib-src/etags.c: Upgraded to etags 12.11 - - * src/config.h.in: Fix inline keyword support - - * configure.in: Use a different mechanism for removing extra white - space. Avoid using foo=`echo $bar`, which loses with various echos. - - new M4 macro XE_SPACE(var, words...) - - Use autoconf 2's AC_HEADER_SYS_WAIT - - Check for Xpm-XpmFree instead of Xpm-XpmReadFileToData to avoid - linking with losing Xpm implementations - - Check for correct wnn4 lib symbols - - Only link with inline.o when using gcc - - Support inline keywords inline, __inline, __inline__ - - Ultrix now implies have_mmap=no - - Sun sound in non-standard dirs now works - - --native-sound-lib no longer ignored on HP & SGI - - gpm configure tests moved after curses configure tests - -1997-06-04 Gary D. Foster - - * lisp/modes/cc-mode.el: Modified `c-electric-delete' to honor the - desired delete direction in both normal and "hungry" modes. - * lisp/modes/cperl-mode.el: Modified `cperl-electric-backspace' to - honor the desired delete direction. - -1997-05-30 Martin Buchholz - - * configure.in: Automagically compute -R path for gcc - -1997-05-30 Gary D. Foster - - * lisp/vm/vm-vars.el: Fixed delete key binding to call - `vm-scroll-down' - -Thu May 29 15:35:07 1997 Martin Buchholz - - * configure.in: Add support for Solaris2.6 -z ignore linker flags - -1997-05-29 Martin Buchholz - - * configure.in: Replace standard Autoconf MMAP test with Neal - Becker's replacement, hacked somewhat. - -1997-05-16 Gary D. Foster - - * lisp/prim/simple.el: Created `backspace-or-delete' function and - `backspace-or-delete-hook' - * lisp/prim/keydefs.el: Changed \177 bindings to point to new - delete function. - * lisp/modes/*.el: Removed conflicting \177 bindings. - * lisp/modes/cc-mode.el: Modified `c-electric-delete' to use new - delete bindings. - * lisp/modes/cperl-mode.el: Modified `cperl-electric-backspace' to - use new delete bindings. - -1997-06-03 MORIOKA Tomohiko - - * lisp/x11/x-menubar.el (default-menubar): Add menu for Mule. - - * lisp/mule/mule-cmds.el: Menu for XEmacs were moved to - x11/x-menubar.el. - -1997-06-03 MORIOKA Tomohiko - - * lisp/leim/quail.el: to avoid compiling warnings about - overlay.el. - -1997-06-03 MORIOKA Tomohiko - - * lisp/leim/quail.el: to sync with quail.el of - Emacs-19.34.94-zeta. - - * lisp/leim/quail/ziranma.el, lisp/leim/quail/tonepy.el, - lisp/leim/quail/py.el, lisp/leim/quail/qj.el, - lisp/leim/quail/sw.el, lisp/leim/quail/ccdospy.el, - lisp/leim/quail/punct.el, lisp/leim/quail/4corner.el, - lisp/leim/quail/symbol-ksc.el, lisp/leim/quail/ethiopic.el, - lisp/leim/quail/hanja.el, lisp/leim/quail/quick-cns.el, - lisp/leim/quail/tsangchi-cns.el, lisp/leim/quail/lrt.el, - lisp/leim/quail/tsangchi-b5.el, lisp/leim/quail/devanagari.el, - lisp/leim/quail/japanese.el, lisp/leim/quail/quick-b5.el, - lisp/leim/quail/punct-b5.el, lisp/leim/quail/qj-b5.el, - lisp/leim/quail/py-b5.el, lisp/leim/quail/ctlau.el, - lisp/leim/quail/ctlaub.el, lisp/leim/quail/ecdict.el, - lisp/leim/quail/array30.el, lisp/leim/quail/hangul3.el, - lisp/leim/quail/hanja-jis.el, lisp/leim/quail/cyrillic.el, - lisp/leim/quail/etzy.el, lisp/leim/quail/greek.el, - lisp/leim/quail/ipa.el, lisp/leim/quail/lao.el, - lisp/leim/quail/zozy.el, lisp/leim/quail/viqr.el, - lisp/leim/quail/latin.el, lisp/leim/quail/thai.el, - lisp/leim/quail/hangul.el: quail of LEIM for Emacs-19.34.94-zeta. - -1997-06-02 MORIOKA Tomohiko - - * mule/korean.el was abolished because it seems not to be used. - - * mule/japanese.el was abolished because it seems not to be used. - -1997-06-01 MORIOKA Tomohiko - - * lisp/tm/gnus-mime-old.el was abolished because XEmacs 20.3 has - Gnus 5.4. - - * lisp/tm/tm-edit.el: updated to 7.108. - - * lisp/tm/tm-view.el: updated to 7.83. - - * lisp/leim/quail.el: modified for XEmacs. - - * lisp/mule/mule-load.el, lisp/mule/mule-process.el: delete - mule-process.el because it is not used. - - * lisp/mule/european.el was abolished because it seems not to be - used. - - * lisp/mule/mule-load.el: must load mule-cmds before setting for - language-environment. - - * lisp/mule/european-hooks.el: Modified for LEIM. - - * lisp/mule/mule-cmds.el: Uncomment key definition for - `toggle-input-method'. - - * lisp/mule/mule-init.el: Comment out about `mule-keymap' (moved - to mule-cmds.el). - - * lisp/mule/mule-cmds.el: Uncomment about `mule-keymap' (moved - from mule-init.el). - - * lisp/tl/tl-atype.el: Don't require tl-str. - - * lisp/tl/tl-atype.el: Use atype.el of APEL. - - * lisp/tl/tl-list.el: Use alist.el of APEL. - -1997-05-31 MORIOKA Tomohiko - - * lisp/tl/richtext.el, lisp/tl/emu-x20.el, lisp/tl/emu-xemacs.el, - lisp/tl/emu.el, lisp/tl/emu-e19.el: moved to apel/. - - * lisp/tl/file-detect.el, lisp/tl/filename.el: replaced by APEL's. - - * lisp/mu/std11-parse.el, lisp/mu/std11.el: moved to apel/. - - * lisp/leim/quail.el: Add new quail.el (imported from Emacs - 19.34.94-epsilon). - - * lisp/leim/skk/skkdic.el: delete skkdic.el temporary because - XEmacs can not compile it. - - * lisp/leim/skk/skkdic.el, lisp/leim/quail/zozy.el, - lisp/leim/quail/ziranma.el, lisp/leim/quail/viqr.el, - lisp/leim/quail/tsangchi-cns.el, lisp/leim/quail/tsangchi-b5.el, - lisp/leim/quail/symbol-ksc.el, lisp/leim/quail/thai.el, - lisp/leim/quail/tonepy.el, lisp/leim/quail/quick-cns.el, - lisp/leim/quail/sw.el, lisp/leim/quail/qj-b5.el, - lisp/leim/quail/qj.el, lisp/leim/quail/quick-b5.el, - lisp/leim/quail/py-b5.el, lisp/leim/quail/py.el, - lisp/leim/quail/lao.el, lisp/leim/quail/latin.el, - lisp/leim/quail/lrt.el, lisp/leim/quail/punct-b5.el, - lisp/leim/quail/punct.el, lisp/leim/quail/hanja-jis.el, - lisp/leim/quail/hanja.el, lisp/leim/quail/ipa.el, - lisp/leim/quail/japanese.el, lisp/leim/quail/hangul3.el, - lisp/leim/quail/etzy.el, lisp/leim/quail/greek.el, - lisp/leim/quail/hangul.el, lisp/leim/quail/ethiopic.el, - lisp/leim/quail/devanagari.el, lisp/leim/quail/ecdict.el, - lisp/leim/quail/ctlau.el, lisp/leim/quail/ctlaub.el, - lisp/leim/quail/cyrillic.el, lisp/leim/quail/array30.el, - lisp/leim/quail/ccdospy.el, lisp/leim/quail/4corner.el: Add LEIM - elisp files; old lisp/quail was abolished. - - * src/Makefile.in.in: Add mule-cmds.elc. - - * lisp/mule/mule-load.el, lisp/mule/mule-cmds.el: Add mule-cmds.el - (imported from Emacs-19.34.94-epsilon and comment out a lot to - avoid conflict with mule-init.el or other XEmacs/mule files). - - * lisp/prim/simple.el (assoc-ignore-case): New function; imported - from Emacs-19.34.94-epsilon. - -1997-05-29 Steven L Baur - - * XEmacs 20.3-beta3 is released. - - * INSTALL: Delete documentation of mocklisp support. - - * configure.in: Delete mocklisp support. - - * etc/FTP: Update mirror info. - - * etc/DISTRIB: Update mirror info. - -1997-05-29 Martin Buchholz - - * configure.in: Replace standard Autoconf MMAP test with Neal - Becker's replacement, hacked somewhat. - -1997-05-28 Martin Buchholz - - * lisp/prim/files.el (auto-mode-alist): Reorg auto-mode-alist again. - - * lib-src/etags.c: Version 12.7 from Francesco. - - * configure.in: Juggle link order of X libraries. - Add support for using zsh to run configure. - Document --with-tty=no. - Fix -no-recursion option. - Recognize and ignore --cache-file option. - Recognize null values for preprocessor symbols converted to shell - variables. This maybe fixes the "-ltermcap" problem. - Remove spurious blanks from various SUBST-ituted variables. - Fix conditional creation of gdbinit. - Conditionally create .sbinit for Sunpro C. - -1997-05-26 Steven L Baur - - * etc/FTP: Correct typo in ftp.cenatls.cena.dgac.fr. - - * etc/DISTRIB: Ditto. - -1997-05-22 Steven L Baur - - * XEmacs 20.3-beta2 is released. - -Thu May 22 04:19:09 1997 Martin Buchholz - - * configure.in: Try to fix all reported bugs with 20.3-b1. - Change HAVE_WNN6 to WNN6. WNN6 correctly autodetected. - extra-verbose now default on beta builds. - extra-verbose now much more verbose. - Don't set libs_termcap to " ". - Detect -lXm AFTER detecting -lXpm. - Use runtime paths before running tests, since AC_TRY_RUN may - depend on it. - with-xim=motif only default on Solaris. - realpath moved from s&m to configure.in. - xemacs-version.h removed. main_1 now contains $canonical as well, - for even more useful backtraces. - termcap handling rewritten. - Create .sbinit for Sun's source browser. - Warn user if no XPM support present. - Warn user if compiling in error checking. - - * Makefile.in: use MAKE_SUBDIR consistently. Remove references to - dynodump. Remove core when cleaning. Remove config.log. - make distclean now functional. - -Tue Jun 4 10:15:54 1996 Per Bothner - - * etc/e/eterm.ti: Add kcub1, kcuf1, kcuu1, kcud1 capabilities. - -Sun May 18 13:03:20 1997 Steven L Baur - - * lwlib/Makefile.in.in (distclean): Clean up config.h. - - * Makefile.in (distclean): Remve config.log. - remove broken dynodump stuffs. - -Sat May 17 20:30:54 1997 Steven L Baur - - * XEmacs 20.3-b1 is released. - -Fri May 16 20:38:19 1997 Steven L Baur - - * info/dir (Packages): Update minor version number. - - * etc/README: Update minor version number. - - * README: Update minor version number. - -Tue May 13 20:35:52 1997 Steven L Baur - - * XEmacs-20.2 is released. - -Sat May 10 16:14:30 1997 Steven L Baur - - * XEmacs 20.2-b6 is released. - -Thu May 8 20:22:34 1997 Steven L Baur - - * XEmacs 20.2-b5 is released. - -Fri May 2 16:50:02 1997 Steven L Baur - - * XEmacs 20.2-b4 is released. - -Thu May 1 18:13:38 1997 Steven L Baur - - * configure.in (--with-xim): Don't default it to Motif since it - causes crashes at startup on some systems. - -Sun Apr 27 12:25:55 1997 Steven L Baur - - * XEmacs 20.2-b3 is released. - -Wed Apr 23 10:33:58 1997 Steven L Baur - - * XEmacs 20.2-b2 is released. - - * configure.in (beta): OPENWINHOME misspelled. - -Mon Apr 21 14:48:29 1997 Steven L Baur - - * etc/BETA (writing): Update with information about how to create - patches. - -Sat Apr 19 16:13:16 1997 Steven L Baur - - * XEmacs 20.2-b1 is released. - -Thu Apr 17 21:33:59 1997 Steven L Baur - - * configure.in (beta): SONY NEWS-OS has /etc/osversion and not - uname. - -Wed Apr 16 17:44:05 1997 Steven L Baur - - * XEmacs 20.1 is re-released. - -Tue Apr 15 21:03:22 1997 Steven L Baur - - * XEmacs 20.1 is released. - -Sat Apr 12 20:11:08 1997 Steven L Baur - - * XEmacs 20.1-b15 is released. - -Sat Apr 12 09:01:32 1997 Hrvoje Niksic - * PROBLEMS: I have cleaned up a bit the PROBLEMS file, by: - 1) changing it into sections -- there is now a section for building, - running and compatibility problems - - 2) removing some obviously obsolete entries -- e.g. those pertaining - to Emacs 18, etc. --> size is off by 20K - - 3) Rearranging the entries by relevance. I have tried to put the most - relevant entries in front. - -Thu Apr 10 19:07:26 1997 Steven L Baur - - * XEmacs 20.1-b14 is released. (Beta 13 was skipped). - -Wed Apr 9 22:52:06 1997 Steven L Baur - - * XEmacs 20.1-b12 is released. - -Sun Apr 6 22:31:00 1997 Tatsuya Ichikawa - - * configure.in: Cosmetic change to summary print of POP/Kerberos/ - Hesiod options. - -Sat Apr 5 09:11:36 1997 Steven L Baur - - * XEmacs 20.1-b11 is released. - -Wed Apr 2 15:27:35 1997 Steven L Baur - - * Makefile.in (install-only): New target. Functionality suggested - by Larry Schwimmer, correct way of doing it suggested by Chuck - Thompson. - - * configure.in: Default to "-Olimit 2000" as suggested by Jamie - Zawinski for SGI cc and Irix 6. - -Tue Apr 1 12:23:13 1997 Steven L Baur - - * configure.in: Add configuration parameters for Emacs 19.34 - movemail.c (--with-pop, --with-kerberos, --with-hesiod). - -Fri Mar 28 19:58:41 1997 Steven L Baur - - * configure.in: Remove garbage if [ ... ] constructs and a - mispatch. - -Thu Mar 27 18:24:19 1997 Steven L Baur - - * XEmacs 20.1-b10 is released. - -Wed Mar 26 22:31:10 1997 Steven L Baur - - * Remove vms top-level directory. - - * XEmacs 19.15 final released to beta testers. - -Tue Mar 25 19:13:27 1997 Steven L Baur - - * XEmacs 19.15 prefinal released to beta testers. - -Mon Mar 24 12:28:17 1997 Steven L Baur - - * configure.in (--debug): Correct documentation. - -Sun Mar 23 17:24:38 1997 Steven L Baur - - * XEmacs 19.15-b104 is released. - -Sat Mar 22 19:56:36 1997 Steven L Baur - - * etc/sgml/CATALOG: Default to html-3.2final. - -Sat Mar 22 17:55:15 1997 Darrell Kindred - - * configure.in (beta): Add configure support for the -rpath flag - for IRIX analogous to the Solaris "-R". - -Sat Mar 22 16:47:08 1997 Steven L Baur - - * info/dir (Packages): Add HM-HTML-Mode to menu. - -Sat Mar 22 21:27:41 1997 Tomasz J. Cholewo - - * configure.in: Echo only current configuration using 'tee -a'. - -Fri Mar 21 21:26:01 1997 Steven L Baur - - * XEmacs-19.15-b103 is released. - * XEmacs-20.0-b9 is released. - - * Makefile.in (top_distclean): Add `Installation' to distclean - rule. - -Fri Mar 21 20:05:29 1997 Darrell Kindred - - * Makefile.in (autoloads): Pass $(MAKE) to update-elc.sh and - update-autoloads.sh. - -Thu Mar 20 20:14:16 1997 Steven L Baur - - * XEmacs-19.15-b102 is released. - -Tue Mar 18 21:52:36 1997 Steven L Baur - - * XEmacs-19.15-b101 is released. - -Mon Mar 17 19:09:29 1997 Steven L Baur - - * XEmacs-20.1-b8 is released. - * XEmacs-19.15-b100 is released. - -Sat Mar 15 17:15:18 1997 Steven L Baur - - * XEmacs-20.1-b7 is released. - * XEmacs-19.15-b99 is released. - - * etc/sgml/CATALOG: Added IE3 DTDs and htmlpro DTD. - -Thu Mar 13 10:40:11 1997 Steven L Baur - - * configure.in: Add sunos4-1-4 header files. - -Wed Mar 12 18:53:08 1997 Steven L Baur - - * configure.in: Use new file bsdos3.h with BSDI 3.0. - -Sat Mar 8 15:19:33 1997 Steven L Baur - - * XEmacs-20.1-b6 is released. - * XEmacs-19.15-b98 is released. - -Wed Mar 5 18:55:36 1997 Steven L Baur - - * Makefile.in (install-arch-indep): Offer to compress lisp sources. - (gzip-el): New targe for compressed installed lisp sources. - -Tue Mar 4 23:28:37 1997 Martin Buchholz - - * lib-src/update-elc.sh: VM is compiled after the byte-compiler, - but before anything else. More flexible about finding an xemacs - to use for byte-compilation (default src/xemacs). Other minor fixes. - -Mon Mar 3 23:57:56 1997 Steven L Baur - - * XEmacs 20.1-b5 is released. - -Mon Mar 3 18:09:17 1997 Steven L Baur - - * XEmacs 20.1-b4 is released. - -Sat Mar 1 15:38:30 1997 Steven L Baur - - * Makefile.in (distclean): Correct typos. - - * XEmacs 19.15-b96 is released. - - * configure.in: Symlink site-lisp when using --srcdir. - Add special handling of lisp directory to allow for multiple - site-packages files. - -Fri Feb 28 20:38:46 1997 Steven L Baur - - * Makefile.in (distclean): Create lock and site-lisp directories - when they don't exist (after being pruned by CVS). - -Tue Mar 4 00:41:38 1997 Hrvoje Niksic - - * etc/sample.Xdefaults: Added customization of foreground and - background colors for the `default' face. - -Wed Feb 26 22:12:12 1997 Steven L Baur - - * Makefile.in (top_distclean): Reset src/PURESIZE.h for - distribution. - - * XEmacs 20.1-b3 is released. - -Sun Feb 23 17:10:09 1997 Steven L Baur - - * XEmacs 20.1-b2 is released. - -Sat Feb 22 14:29:44 1997 Steven L Baur - - * XEmacs 19-15-b'95 is released. - -Fri Feb 21 22:29:51 1997 Martin Buchholz - - * etc/toolbar/workshop-cap-up.xpm: Moved caption up one pixel. - - * lwlib/xlwscrollbar.c : Fix many scrollbar bugs: - - "knob" renamed to "slider" - - leftmost pixel wasn't sensitive to button clicks, while righmost - pixel was. - - many glitches fixed if Emacs*XlwScrollBar.ArrowPosition:same: - - goobers on top of up-arrow removed. - - up-arrow would not always be redrawn when necessary - - slider drag would be `off' by size of up-arrow - - horizontal and vertical scrollbars didn't use exactly the same - dimensions. - - slider was never drawn if XlwScrollBar.shadowThickness was 0. - - Now up- and down-arrows actually work near beginning/end of buffer! - -Thu Feb 20 12:40:57 1997 Jan Vroonhof - - * configure.in (with_xauth): Attempted correction of test for - libXmu on SunOS. - -Sat Feb 15 14:11:03 1997 Steven L Baur - - * XEmacs 20.1-b1 is released. - * XEmacs 19.15-b94 is released. - -Fri Feb 14 23:23:03 1997 Steven L Baur - - * README: ``This directory tree holds version 19.13 ...'' ??? - -Sun Feb 9 16:15:55 1997 Steven L Baur - - * XEmacs 19.15-b93 is released. - XEmacs 20.0 is released to the 'net. - -Fri Feb 7 19:21:34 1997 Steven L Baur - - * XEmacs 20.0try3 is released. - -Wed Feb 5 18:03:06 1997 Steven L Baur - - * XEmacs 20.0try2 is released. - -Mon Feb 3 19:39:08 1997 Steven L Baur - - * XEmacs 19.15-b92 is released. - -Sat Feb 1 18:17:38 1997 Steven L Baur - - * XEmacs 20.0try1 is released. - * XEmacs 19.15-b91 AKA XEmacs '97 NOT! is released. - -Sat Feb 1 00:00:48 1997 Steven L Baur - - * PROBLEMS: Updated from beta test bug reports. - Put in outline-mode/outl-mouse-minor-mode by default. - -Wed Jan 29 19:59:41 1997 Steven L Baur - - * CHANGES-beta: XEmacs 20.0-b93 is released. - -Sat Jan 25 15:43:59 1997 Steven L Baur - - * CHANGES-beta: XEmacs 20.0-b92 is released. - -Fri Jan 24 09:54:01 1997 Steven L Baur - - * lwlib/xlwmenu.c (massage_resource_name): Changed comparison of - char and pointer. - -Thu Jan 23 10:39:34 1997 Martin Buchholz - - * lib-src/update-elc.sh (ignore_dirs): Quoting portability. - -Wed Jan 22 21:07:17 1997 Steven L Baur - * XEmacs 20.0-b91 (prerelease 2) is released. - - * configure.in (--with-scrollbars): Add Athena3d as a toolkit - type. - - * lwlib/lwlib-Xaw.c (xaw_update_one_widget): Let Athena 3d have 0 - borderwidth. - (xaw_scrollbar_scroll): Use SCROLLBAR_LINE_UP and - SCROLLBAR_LINE_DOWN since that's current the only to get to the - bottom of the buffer. :-( - -Tue Jan 21 20:01:19 1997 Steven L. Baur - - * configure.in (beta): Add LWLIB_USES_ATHENA for odd - configurations that use both Motif and Athena. - - * etc/sgml/HTML32.dtd: html-3.2 final dtd added. - -Wed Jan 15 12:55:19 1997 Steven L Baur - - * info/dir (Gnus): Updated spelling and info. - -Mon Jan 13 13:37:27 1997 Steven L Baur - - * configure.in: Remove assignment of NON_GNU_CPP for irix-6.0. - -Mon Jan 13 00:36:01 1997 Martin Buchholz - - * lib-src/make-docfile.c (scan_lisp_file): eliminate doc-string - warnings for ccl-read-* - -Sat Jan 11 12:05:31 1997 Steven L Baur - - * etc/sample.emacs: Remove code snippet that wipes out the cycle - buffer modeline feature. - - * XEmacs 20.0 beta90 (prerelease 1) is released. - * XEmacs 19.15 beta90 (prerelease 1) is released. - -Tue Jan 7 08:45:16 1997 Steven L Baur - - * configure.in (LIBS): Revise test for XFree86 (look for XF86Config). - -Sat Jan 4 14:52:57 1997 Steven L Baur - * XEmacs 20.0 beta 34 is released. - * XEmacs 19.15 beta 7 is released. - -Fri Jan 3 15:18:59 1997 Jeff Miller - - * lwlib/Makefile.in.in: lwlib is required if X11 is used. - -Wed Jan 1 08:30:48 1997 Martin Buchholz - - * src/emacs.c: Make sure - `./temacs -batch -l loadup.el run-temacs ' - works properly - - * src/Makefile.in.in (rtcmacs): Add support for RTC, Sun's - competitor to Purify. - - * man/lispref/symbols.texi: Fix up bit vector documentation - * man/lispref/sequences.texi: Fix up bit vector documentation - - * lisp/sunpro/sunpro-load.el: Only preload mime-setup for Sun. - - * lisp/prim/update-elc.el: Don't rely on autoloads. - -Tue Dec 31 09:46:13 1996 Martin Buchholz - - * lisp/prim/auto-autoloads.el: New, completely program-generated, file - * lib-src/update-autoloads.sh: Rewritten to use auto-autoloads.el. - * lisp/utils/autoload.el: Reorganization of autoload mechanism: - Errors during autoload generation are just that - errors. - - Generated autoloads are now in a separate file of their own. - - Reliability of autoload generation greatly increased. - - Distribution smaller by about 100k. - - `make autoloads' is still the preferred mechanism for update. - - Autoloads are always regenerated completely from scratch. This - avoids errors with obsolete or corrupted autoload entries. - - Caching of autoload entries using timestamps has been eliminated. - - Files that have no autoloads no longer have a comment placed into - the generated autoloads file. - - There was a bug where autoload entries would sometimes end up - being inserted into the *middle* of other autoload entries, - thereby corrupting them. - - * src/event-Xt.c: Remove SUNOS_GCC_L0_BUG kludge. - -Sun Dec 29 05:37:43 1996 Martin Buchholz - - * lib-src/update-autoloads.sh: Make sure that `make autoloads' - doesn't use the autoload facility to load `autoload'; - load it explicity instead. - - * lib-src/update-elc.sh (ignore_dirs): ignore SCCS, CVS, RCS dirs - - * man/Makefile: Reinstate hyperbole & oo-browser manuals - - * lisp/modes/mail-abbrevs.el: Apply patch originated from Noah Friedman - - * src/mule-charset.c: Use lower case for charset registry, to - match XLFD. - - * Makefile.in: replace list of info files with *.info* - one less - maintenance headache - - * etc/sample.emacs: Add sample code to highlight continuation glyph - - * man/oo-browser.texi: Fix TeXability - - * man/hyperbole.texi: Fix TeXability - - * man/vhdl-mode.texi: Fix TeXability - - * lisp/prim/loaddefs.el: Wholesale housecleaning - `make autoloads' should finally work. - - * lib-src/emacsclient.c (main): ANSIfication, compiler warning removal - - * lisp/mule/mule-files.el: Add support for multi-lingual info files. - - * lib-src/update-elc.sh: `make all-elc' was updating files in - `special' directories without using the Makefiles - designed for that purpose. - - make sure ilisp isn't remade every time through `make all-elc'. - - * info/dir (Packages): Add Japanese TM info files - - * src/inline.c: Allow compilation with `gcc -g' - - * src/syntax.c (word_constituent_p): Allow compilation with `gcc -g' - - * src/lread.c: Don't put `...' immediately after a filename, so - that various tools can recognize the filename as such. - - * src/event-Xt.c (x_to_emacs_keysym): Fix crash when - --with-xim=xlib and key event on window frame. - Change return foo to return (foo) when return is a macro. - - * src/editfns.c (Ffollowing_char): docstring fixes. - - * man/tm/Makefile: Add support for Japanese TM info (but not dvi) files. - This Makefile is no longer officially broken. - - * info/dir: Add Japanese tm documents. - - * man/tm/tm-vm-en.texi: Make document TeX-friendly. - - * lib-src/update-autoloads.sh (EMACS): Don't rely on non-portable - xargs -i flag. - - * lisp/mule/mule-files.el (file-coding-system-alist): Make sure - the `binary' coding system is used for .gz and .Z extensions. - - * man/viper.texi: Viper version 2.90 - - * man/ediff.texi: Ediff Version 2.62 - - * lisp/packages/ispell.el (ispell-word): Avoid using strings with - define-key, for compatibility with loaddefs.el - - * lisp/modes/eiffel3.el: Make compatible with update-autoloads. - - * lisp/ilisp/Makefile (elc): Add target to avoid re-compilation. - - * lib-src/update-elc.sh: XEmacs sometimes re-byte-compiled elisp - files in dirs that have their own Makefiles. - - - -Sun Dec 29 17:02:49 1996 Steven L Baur - - * Makefile.in (install-arch-indep): Force compression with `gzip -f'. - - * lib-src/update-elc.sh (NUMTOCOMPILE): Ignore CVS directories. - - * Makefile.in (install-arch-indep): Catch .info-[0-9]* files for - installation. - -Sat Dec 28 15:33:27 1996 Steven L Baur - - * XEmacs 20.0 beta 33 is released. - * XEmacs 19.15 beta 6 is released. - -Fri Dec 27 20:34:58 1996 Richard Mlynarik - - * etc/yow.lines: 20k of new zippy quotes. - -Fri Dec 27 01:02:41 1996 Martin Buchholz - - * Makefile.in (install-arch-indep): Simplify installation of info - pages. - -Sat Dec 21 15:20:20 1996 Steven L Baur - * XEmacs 20.0-b32 released. - - * XEmacs 19.15-b5 released. - -Wed Dec 18 20:22:08 1996 Martin Buchholz - - * configure.in: Reformat. Fix shared include file rename - problem. - - * configure: Reformat. Fix shared include file rename problem. - - * dynodump/dynodump.c (__EXTENSIONS__): Define it. - -Thu Dec 12 13:19:00 1996 Joseph J Nuspl - - * Makefile.in (install-arch-indep): Install infofiles gzipped by - default. - -Tue Dec 10 19:25:25 1996 Steven L Baur - - * CHANGES-beta: XEmacs 20.0-b31 is released. - -Tue Dec 10 18:33:19 1996 Rod Whitby - - * info/vhdl-mode.info: New file. - - * info/dir (Packages): Add vhdl-mode documentation. - -Tue Dec 10 18:27:02 1996 Martin Buchholz - - * configure: Make shared/dynamic flags work much more logically. - -Tue Dec 10 09:17:22 1996 David Worenklein - - * configure.in (machine): Patch to make newly renamed shared - link include files work. - -Sat Dec 7 16:28:10 1996 Martin Buchholz - - * configure.in: Configure for POSIX getcwd if available. - -Thu Dec 5 20:42:35 1996 Steven L Baur - - * etc/edt-user.doc (File): New file from Emacs 19.34. - -Thu Dec 5 11:56:05 1996 Joseph J Nuspl - - * configure.in (LIBS): Fix typo in dialog box test. - - diff --cc configure index 8e677b0,0beba52..0000000 deleted file mode 100755,100755 --- a/configure +++ /dev/null @@@ -1,13639 -1,12575 +1,0 @@@ --#! /bin/sh -- --#### Configuration script for XEmacs. Largely divergent from FSF. --#### Guess values for system-dependent variables and create Makefiles. --#### Generated automatically using autoconf version 2.12 --#### Copyright (C) 1992, 93, 94, 95, 96 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 Ben Wing. - #### Copyright (C) 1998, 1999 J. Kean Johnston. -- --### Don't edit this script! --### This script was automatically generated by the `autoconf' program --### from the file `./configure.in'. --### To rebuild it, execute the command --### autoconf --### in the this directory. You must have autoconf version 2.12 or later. -- --### This file is part of XEmacs. -- --### XEmacs 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 2, or (at your --### option) any later version. -- --### XEmacs 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 XEmacs; see the file COPYING. If not, write to the Free --### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA --### 02111-1307, USA. -- --### For usage, run `./configure --help' --### For more detailed information on building and installing XEmacs, --### 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_help="$ac_help -- --with-x use the X Window System" -- -- -- --if test -n "$ZSH_VERSION"; then -- setopt NO_BAD_PATTERN NO_BANG_HIST NO_BG_NICE NO_EQUALS NO_FUNCTION_ARGZERO -- setopt GLOB_SUBST NO_HUP INTERACTIVE_COMMENTS KSH_ARRAYS NO_MULTIOS NO_NOMATCH -- setopt RM_STAR_SILENT POSIX_BUILTINS SH_FILE_EXPANSION SH_GLOB SH_OPTION_LETTERS -- setopt SH_WORD_SPLIT BSD_ECHO IGNORE_BRACES -- if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi --elif test -n "$BASH_VERSION"; then -- set -o posix -- unset CDPATH --else -- if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi --fi -- --exec_prefix=NONE --host=NONE --no_create= --nonopt=NONE --no_recursion= --prefix=NONE --program_prefix=NONE --program_suffix=NONE --program_transform_name=s,x,x, --silent= --site= --srcdir= --target=NONE --verbose= --x_includes=NONE --x_libraries=NONE -- --bindir='${exec_prefix}/bin' --sbindir='${exec_prefix}/sbin' --libexecdir='${exec_prefix}/libexec' --datadir='${prefix}/share' --sysconfdir='${prefix}/etc' --sharedstatedir='${prefix}/com' --localstatedir='${prefix}/var' --libdir='${{exec_prefix}}/lib' --includedir='${prefix}/include' --oldincludedir='/usr/include' --infodir='${prefix}/info' --mandir='${prefix}/man' -- --subdirs= --MFLAGS= MAKEFLAGS= --ac_max_here_lines=12 -- --trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 -- --# File descriptor usage: --# 0 standard input --# 1 file creation --# 2 errors and warnings --# 3 some systems may open it to /dev/tty --# 4 used on the Kubota Titan --# 6 checking for... messages and results --# 5 compiler messages saved in config.log --if test "$silent" = yes; then -- exec 6>/dev/null --else -- exec 6>&1 --fi --exec 5>./config.log -- --echo "\ --This file contains any messages produced by compilers while --running configure, to aid debugging if configure makes a mistake. --" 1>&5 -- --# Strip out --no-create and --no-recursion so they do not pile up. --# Also quote any args containing shell metacharacters. --ac_configure_args= --for ac_arg --do -- case "$ac_arg" in -- -no-create | --no-create | --no-creat | --no-crea | --no-cre \ -- | --no-cr | --no-c) ;; -- -no-recursion | --no-recursion | --no-recursio | --no-recursi \ -- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; -- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) -- ac_configure_args="$ac_configure_args '$ac_arg'" ;; -- *) ac_configure_args="$ac_configure_args $ac_arg" ;; -- esac --done -- --# NLS nuisances. --# Only set these to C if already set. These must not be set unconditionally --# because not all systems understand e.g. LANG=C (notably SCO). --# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! --# Non-C LC_CTYPE values break the ctype check. --if test "${LANG+set}" = set; then LANG=C; export LANG; fi --if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi --if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi --if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi -- --# confdefs.h avoids OS command line length limits that DEFS can exceed. --rm -rf conftest* confdefs.h --# AIX cpp loses on an empty file, so make sure it contains at least a newline. --echo > confdefs.h -- --# A filename unique to this package, relative to the directory that --# configure is in, which we can look for to find out if srcdir is correct. --ac_unique_file=src/lisp.h -- --# Find the source files, if location was not specified. --if test -z "$srcdir"; then -- ac_srcdir_defaulted=yes -- # Try the directory containing this script, then its parent. -- ac_prog=$0 -- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` -- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. -- srcdir=$ac_confdir -- if test ! -r $srcdir/$ac_unique_file; then -- srcdir=.. -- fi --else -- ac_srcdir_defaulted=no --fi --if test ! -r $srcdir/$ac_unique_file; then -- if test "$ac_srcdir_defaulted" = yes; then -- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } -- else -- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } -- fi --fi --srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` -- --# Prefer explicitly selected file to automatically selected ones. --if test -z "$CONFIG_SITE"; then -- if test "x$prefix" != xNONE; then -- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" -- else -- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" -- fi --fi --for ac_site_file in $CONFIG_SITE; do -- if test -r "$ac_site_file"; then -- echo "loading site script $ac_site_file" -- . "$ac_site_file" -- fi --done -- -- --ac_ext=c --xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS' --xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run' --xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard' --ac_cpp='$CPP '"$xe_cppflags" --ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5' --ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5' --cross_compiling=no -- --if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then -- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. -- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then -- ac_n= ac_c=' --' ac_t=' ' -- else -- ac_n=-n ac_c= ac_t= -- fi --else -- ac_n= ac_c='\c' ac_t= --fi -- -- --progname="`echo $0 | sed 's:^\./\./:\./:'`" -- -- --MAKE_SUBDIR="$MAKE_SUBDIR lib-src" && if test "$extra_verbose" = "yes"; then echo " Appending \"lib-src\" to \$MAKE_SUBDIR"; fi --INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR lib-src" && if test "$extra_verbose" = "yes"; then echo " Appending \"lib-src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi -- --prefix='/usr/local' --exec_prefix='${prefix}' --bindir='${exec_prefix}/bin' --datadir='${prefix}/lib' --statedir='${prefix}/lib' --libdir='${exec_prefix}/lib' --mandir='${prefix}/man/man1' --infodir='${datadir}/${PROGNAME}-${version}/info' --infopath='' --install_pp='' --lispdir='${datadir}/${PROGNAME}-${version}/lisp' - moduledir='${datadir}/${PROGNAME}-${version}/${configuration}/modules' - sitelispdir='${datadir}/xemacs/site-lisp' - sitemoduledir='${datadir}/xemacs/site-modules' --pkgdir='${datadir}/${PROGNAME}-${version}/lisp' --package_path='' --etcdir='${datadir}/${PROGNAME}-${version}/etc' --lockdir='${statedir}/${PROGNAME}/lock' - archlibdir='${datadir}/${PROGNAME}-${version}/${configuration}' - with_site_lisp='no' - with_site_modules='yes' - with_menubars='' - with_scrollbars='' - with_dialogs='' - with_file_coding='' - cpp='' cppflags='' libs='' ldflags='' - dynamic='' - with_x11='' - with_msw='' - rel_alloc='default' - with_system_malloc='default' - with_dlmalloc='default' - native_sound_lib='' - use_assertions="yes" - with_toolbars="" - with_tty="" - use_union_type="no" - with_dnet="" - - - - - arguments="$@" - - quoted_sed_magic=s/"'"/"'"'"'"'"'"'"'"/g - quoted_arguments= - for i in "$@"; do - case "$i" in - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) ;; - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; - *) - quoted_i="`echo '' $i | sed -e 's:^ ::' -e $quoted_sed_magic`" - quoted_arguments="$quoted_arguments '$quoted_i'" ;; - esac - done - - while test $# != 0; do - arg="$1"; shift - case "$arg" in - --no-create|--no-recursion) ;; - -* ) - case "$arg" in - -*=*) - opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\([^=]*\)=.*$:\1:'` - val=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*[^=]*=\(.*\)$:\1:'` - valomitted=no - ;; - -*) - opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\(.*\)$:\1:'` - val="yes" valomitted=yes - ;; - esac - - optname="$opt" - opt="`echo '' $opt | sed -e 's:^ ::' | tr - _`" - - case "${valomitted}-${opt}" in yes-without_* ) - opt=`echo $opt | sed 's/without/with/'` - valomitted="no" val="no" ;; - esac - - case "$opt" in - - with_site_lisp | \ - with_site_modules | \ - with_x | \ - with_x11 | \ - with_msw | \ - with_gcc | \ - dynamic | \ - with_ncurses | \ - with_dnet | \ - with_socks | \ - with_dragndrop | \ - with_cde | \ - with_offix | \ - with_gpm | \ - with_xpm | \ - with_xface | \ - with_gif | \ - with_jpeg | \ - with_png | \ - with_tiff | \ - with_session | \ - with_xmu | \ - with_purify | \ - with_quantify | \ - with_toolbars | \ - with_tty | \ - with_xfs | \ - with_i18n3 | \ - with_mule | \ - with_file_coding| \ - with_canna | \ - with_wnn | \ - with_wnn6 | \ - with_workshop | \ - with_sparcworks | \ - with_tooltalk | \ - with_ldap | \ - with_pop | \ - with_kerberos | \ - with_hesiod | \ - with_dnet | \ - with_infodock | \ - external_widget | \ - verbose | \ - extra_verbose | \ - const_is_losing | \ - usage_tracking | \ - use_union_type | \ - debug | \ - use_assertions | \ - memory_usage_stats | \ - with_clash_detection | \ - with_shlib | \ - no_doc_file ) - case "$val" in - y | ye | yes ) val=yes ;; - n | no ) val=no ;; - * ) (echo "$progname: Usage error:" - echo " " "The \`--$optname' option requires a boolean value: \`yes' or \`no'." - echo " Use \`$progname --help' to show usage.") >&2 && exit 1 ;; - esac - eval "$opt=\"$val\"" ;; - - - srcdir | \ - compiler | \ - cflags | \ - cpp | \ - cppflags | \ - libs | \ - ldflags | \ - cache_file | \ - native_sound_lib| \ - site_lisp | \ - x_includes | \ - x_libraries | \ - site_includes | \ - site_libraries | \ - site_prefixes | \ - site_runtime_libraries ) - if test "$valomitted" = "yes" ; then - if test "$#" = 0 ; then - (echo "$progname: Usage error:" - echo " " "The \`--$optname' option requires a value." - echo " Use \`$progname --help' to show usage.") >&2 && exit 1; - fi - val="$1"; shift - fi - eval "$opt=\"$val\"" - ;; - - rel_alloc | \ - with_dlmalloc | \ - with_debug_malloc | use_debug_malloc | \ - with_system_malloc | use_system_malloc ) - case "$val" in - y | ye | yes ) val=yes ;; - n | no ) val=no ;; - d | de | def | defa | defau | defaul | default ) val=default ;; - * ) (echo "$progname: Usage error:" - echo " " "The \`--$optname' option requires one of these values: - \`yes', \`no', or \`default'." - echo " Use \`$progname --help' to show usage.") >&2 && exit 1 ;; - esac - case "$opt" in use_* ) opt="`echo $opt | sed s/use/with/`" ;; esac - eval "$opt=\"$val\"" - ;; - - "with_database" ) - with_database_berkdb=no - with_database_dbm=no - with_database_gnudbm=no - for x in `echo "$val" | sed -e 's/,/ /g'` ; do - case "$x" in - no ) ;; - b | be | ber | berk | berkd | berkdb ) with_database_berkdb=yes ;; - d | db | dbm ) with_database_dbm=yes ;; - g | gn | gnu | gnud | gnudb | gnudbm ) with_database_gnudbm=yes ;; - * ) (echo "$progname: Usage error:" - echo " " "The \`--$optname' option value - must be either \`no' or a comma-separated list - of one or more of \`berkdb' and either \`dbm' or \`gnudbm'." - echo " Use \`$progname --help' to show usage.") >&2 && exit 1 ;; - esac - done - if test "$with_database_dbm" = "yes" -a \ - "$with_database_gnudbm" = "yes"; then - (echo "$progname: Usage error:" - echo " " "Only one of \`dbm' and \`gnudbm' may be specified - with the \`--$optname' option." - echo " Use \`$progname --help' to show usage.") >&2 && exit 1 - fi - ;; - - "with_sound" ) - case "$val" in - y | ye | yes ) val=native ;; - n | no | non | none ) val=no;; - na | nat | nati | nativ | native ) val=native ;; - ne | net | neta | netau | netaud | netaudi | netaudio | nas ) val=nas ;; - b | bo | bot | both ) val=both;; - * ) (echo "$progname: Usage error:" - echo " " "The \`--$optname' option must have one of these values: - \`native', \`nas', \`both', or \`none'." - echo " Use \`$progname --help' to show usage.") >&2 && exit 1 ;; - esac - eval "$opt=\"$val\"" - ;; - - "with_xim" ) - case "$val" in - y | ye | yes ) val=yes ;; - n | no | non | none ) val=no ;; - x | xl | xli | xlib ) val=xlib ;; - m | mo | mot | moti | motif ) val=motif ;; - * ) (echo "$progname: Usage error:" - echo " " "The \`--$optname' option must have one of these values: - \`motif', \`xlib', \`yes', or \`no'." - echo " Use \`$progname --help' to show usage.") >&2 && exit 1 ;; - esac - eval "$opt=\"$val\"" - ;; - - "mail_locking" ) - case "$val" in - lockf ) val=lockf ;; - flock ) val=flock ;; - file ) val=file ;; - * ) (echo "$progname: Usage error:" - echo " " "The \`--$optname' option must have one of these values: - \`lockf', \`flock', or \`file'." - echo " Use \`$progname --help' to show usage.") >&2 && exit 1 ;; - esac - eval "$opt=\"$val\"" - ;; - - "error_checking" ) - - for x in `echo "$val" | sed -e 's/,/ /g'` ; do - case "$x" in - n | no | non | none ) new_default=no ;; - a | al | all ) new_default=yes ;; - - extents ) error_check_extents=yes ;; - noextents ) error_check_extents=no ;; - - typecheck ) error_check_typecheck=yes ;; - notypecheck ) error_check_typecheck=no ;; - - bufpos ) error_check_bufpos=yes ;; - nobufpos ) error_check_bufpos=no ;; - - gc ) error_check_gc=yes ;; - nogc ) error_check_gc=no ;; - - malloc ) error_check_malloc=yes ;; - nomalloc ) error_check_malloc=no ;; - - * ) bogus_error_check=yes ;; - esac - if test "$bogus_error_check" -o \ - \( -n "$new_default" -a -n "$echeck_notfirst" \) ; then - if test "$error_check_default" = yes ; then - types="\`all' (default), \`none', \`noextents', \`notypecheck', \`nobufpos', \`nogc', and \`nomalloc'." - else - types="\`all', \`none' (default), \`extents', \`typecheck', \`bufpos', \`gc', and \`malloc'." - fi - (echo "$progname: Usage error:" - echo " " "Valid types for the \`--$optname' option are: - $types." - echo " Use \`$progname --help' to show usage.") >&2 && exit 1 - elif test -n "$new_default" ; then - error_check_extents=$new_default - error_check_typecheck=$new_default - error_check_bufpos=$new_default - error_check_gc=$new_default - error_check_malloc=$new_default - new_default= # reset this - fi - echeck_notfirst=true - done - ;; - - - prefix | exec_prefix | bindir | datadir | statedir | libdir | \ - mandir | infodir | infopath | lispdir | etcdir | lockdir | pkgdir | \ - archlibdir | docdir | package_path ) - if test "$valomitted" = "yes"; then - if test "$#" = 0; then - (echo "$progname: Usage error:" - echo " " "The \`--$optname' option requires a value." - echo " Use \`$progname --help' to show usage.") >&2 && exit 1; - fi - val="$1"; shift - fi - eval "$opt=\"$val\"" - - case "$opt" in - lispdir ) { test "$extra_verbose" = "yes" && cat << \EOF - Defining LISPDIR_USER_DEFINED - EOF - cat >> confdefs.h <<\EOF - #define LISPDIR_USER_DEFINED 1 - EOF - } - ;; - sitelispdir ) { test "$extra_verbose" = "yes" && cat << \EOF - Defining SITELISPDIR_USER_DEFINED - EOF - cat >> confdefs.h <<\EOF - #define SITELISPDIR_USER_DEFINED 1 - EOF - } - ;; - moduledir ) { test "$extra_verbose" = "yes" && cat << \EOF - Defining MODULEDIR_USER_DEFINED - EOF - cat >> confdefs.h <<\EOF - #define MODULEDIR_USER_DEFINED 1 - EOF - } - ;; - etcdir ) { test "$extra_verbose" = "yes" && cat << \EOF - Defining ETCDIR_USER_DEFINED - EOF - cat >> confdefs.h <<\EOF - #define ETCDIR_USER_DEFINED 1 - EOF - } - ;; - infodir ) { test "$extra_verbose" = "yes" && cat << \EOF - Defining INFODIR_USER_DEFINED - EOF - cat >> confdefs.h <<\EOF - #define INFODIR_USER_DEFINED 1 - EOF - } - ;; - infopath ) { test "$extra_verbose" = "yes" && cat << \EOF - Defining INFOPATH_USER_DEFINED - EOF - cat >> confdefs.h <<\EOF - #define INFOPATH_USER_DEFINED 1 - EOF - } - ;; - package_path ) { test "$extra_verbose" = "yes" && cat << \EOF - Defining PACKAGE_PATH_USER_DEFINED - EOF - cat >> confdefs.h <<\EOF - #define PACKAGE_PATH_USER_DEFINED 1 - EOF - } - ;; - datadir ) - { test "$extra_verbose" = "yes" && cat << \EOF - Defining INFODIR_USER_DEFINED - EOF - cat >> confdefs.h <<\EOF - #define INFODIR_USER_DEFINED 1 - EOF - } - - { test "$extra_verbose" = "yes" && cat << \EOF - Defining LISPDIR_USER_DEFINED - EOF - cat >> confdefs.h <<\EOF - #define LISPDIR_USER_DEFINED 1 - EOF - } - - { test "$extra_verbose" = "yes" && cat << \EOF - Defining MODULEDIR_USER_DEFINED - EOF - cat >> confdefs.h <<\EOF - #define MODULEDIR_USER_DEFINED 1 - EOF - } - - { test "$extra_verbose" = "yes" && cat << \EOF - Defining ETCDIR_USER_DEFINED - EOF - cat >> confdefs.h <<\EOF - #define ETCDIR_USER_DEFINED 1 - EOF - } - ;; - statedir | lockdir ) { test "$extra_verbose" = "yes" && cat << \EOF - Defining LOCKDIR_USER_DEFINED - EOF - cat >> confdefs.h <<\EOF - #define LOCKDIR_USER_DEFINED 1 - EOF - } - ;; - exec_prefix | libdir | archlibdir ) { test "$extra_verbose" = "yes" && cat << \EOF - Defining ARCHLIBDIR_USER_DEFINED - EOF - cat >> confdefs.h <<\EOF - #define ARCHLIBDIR_USER_DEFINED 1 - EOF - } - ;; - esac - ;; - - "no_create" ) ;; - - "usage" | "help" ) ${PAGER-more} ${srcdir}/configure.usage; exit 0 ;; - - "with_menubars" | \ - "with_scrollbars" | \ - "with_dialogs" ) - case "$val" in - l | lu | luc | luci | lucid ) val=lucid ;; - m | mo | mot | moti | motif ) val=motif ;; - athena3d | athena-3d ) val=athena3d ;; - a | at | ath | athe | athen | athena ) val=athena ;; - n | no | non | none ) val=no ;; - * ) (echo "$progname: Usage error:" - echo " " "The \`--$optname' option must have one of these values: - \`lucid', \`motif', \`athena', \`athena3d', or \`no'." - echo " Use \`$progname --help' to show usage.") >&2 && exit 1 ;; - esac - eval "$opt=\"$val\"" - ;; - - "run_in_place" | \ - "with_gnu_make" ) - echo "configure: warning: Obsolete option \`--$optname' ignored." 1>&2 - ;; - - * ) (echo "$progname: Usage error:" - echo " " "Unrecognized option: $arg" - echo " Use \`$progname --help' to show usage.") >&2 && exit 1 ;; - - esac - ;; - - *-*-*) configuration="$arg" ;; - - *) (echo "$progname: Usage error:" - echo " " "Unrecognized argument: $arg" - echo " Use \`$progname --help' to show usage.") >&2 && exit 1 ;; - - esac - done - - - test -n "$cpp" && CPP="$cpp" - test -n "$cppflags" && CPPFLAGS="$cppflags" - test -n "$libs" && LIBS="$libs" - test -n "$ldflags" && LDFLAGS="$ldflags" - - eval set x "$quoted_arguments"; shift - - test "$extra_verbose" = "yes" && verbose=yes - - test -n "$with_x" && with_x11="$with_x" - - if test "$with_purify" = "yes" -o "$with_quantify" = "yes"; then - test "$with_system_malloc" = "default" && with_system_malloc=yes - fi - - - - if test "$with_cde $with_tooltalk" = "yes no"; then - (echo "$progname: Usage error:" - echo " " "--with-cde requires --with-tooltalk" - echo " Use \`$progname --help' to show usage.") >&2 && exit 1 - elif test "$with_tooltalk" = "no" ; then with_cde=no - elif test "$with_cde" = "yes"; then with_tooltalk=yes - fi - - - case "$srcdir" in - - "" ) - for dir in "`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`" "." ".." ; do - if test -f "$dir/src/lisp.h" -a \ - -f "$dir/lisp/version.el" ; then - srcdir="$dir" - break - fi - done - if test -z "$srcdir" ; then - (echo "$progname: Usage error:" - echo " " "Neither the current directory nor its parent seem to - contain the XEmacs sources. If you do not want to build XEmacs in its - source tree, you should run \`$progname' in the directory in which - you wish to build XEmacs, using the \`--srcdir' option to say where the - sources may be found." - echo " Use \`$progname --help' to show usage.") >&2 && exit 1 - fi - ;; - - * ) - if test ! -f "$srcdir/src/lisp.h" -o \ - ! -f "$srcdir/lisp/version.el" ; then - (echo "$progname: Usage error:" - echo " " "The directory specified with the \`--srcdir' option, - \`$srcdir', doesn't seem to contain the XEmacs sources. You should - either run the \`$progname' script at the top of the XEmacs source - tree, or use the \`--srcdir' option to specify the XEmacs source directory." - echo " Use \`$progname --help' to show usage.") >&2 && exit 1 - fi - ;; - esac - - if test -z "$configuration"; then - configuration=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess` - if test -z "$configuration"; then - (echo "$progname: Usage error:" - echo " " "XEmacs has not been ported to this host type. - Try explicitly specifying the CONFIGURATION when rerunning configure." - echo " Use \`$progname --help' to show usage.") >&2 && exit 1 - fi - fi - - echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 - echo "configure:767: checking whether ln -s works" >&5 - - rm -f conftestdata - if ln -s X conftestdata 2>/dev/null - then - rm -f conftestdata - ac_cv_prog_LN_S="ln -s" - else - ac_cv_prog_LN_S=ln - fi - LN_S="$ac_cv_prog_LN_S" - if test "$ac_cv_prog_LN_S" = "ln -s"; then - echo "$ac_t""yes" 1>&6 - else - echo "$ac_t""no" 1>&6 - fi - - - for dir in lisp etc man info; do - if test ! -d "$dir" ; then - echo Making symbolic link to "$srcdir/$dir" - ${LN_S} "$srcdir/$dir" "$dir" - fi - done - - - absolute_pwd="`pwd`"; - if test -n "$PWD" -a "`cd $PWD && pwd`" = "$absolute_pwd" - then blddir="$PWD" - else blddir="$absolute_pwd"; if test -d "/net"; then - if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi - blddir=`echo "$blddir" | \ - sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"` - fi - fi - - - case "$srcdir" in - /* ) ;; - . ) srcdir="$blddir" ;; - * ) srcdir="`cd $srcdir && pwd`"; if test -d "/net"; then - if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi - srcdir=`echo "$srcdir" | \ - sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"` - fi ;; - esac - - if test `pwd` != `sh -c cd $srcdir && pwd` \ - && test -f "$srcdir/src/config.h"; then - (echo "$progname: WARNING: The directory tree \`$srcdir' is being used" - echo " as a build directory right now; it has been configured in its own" - echo " right. To configure in another directory as well, you MUST" - echo " use GNU make. If you do not have GNU make, then you must" - echo " now do \`make distclean' in $srcdir," - echo " and then run $progname again.") >&2 - extrasub='/^VPATH[ ]*=/c\ - vpath %.c $(srcdir)\ - vpath %.h $(srcdir)\ - vpath %.y $(srcdir)\ - vpath %.l $(srcdir)\ - vpath %.s $(srcdir)\ - vpath %.in $(srcdir)' - fi - - . "$srcdir/version.sh" || exit 1; - if test -n "$emacs_beta_version"; then beta=yes; else beta=no; fi - : "${extra_verbose=$beta}" - version="${emacs_major_version}.${emacs_minor_version}" - { test "$extra_verbose" = "yes" && cat << EOF - Defining EMACS_MAJOR_VERSION = $emacs_major_version - EOF - cat >> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <<\EOF - #define ERROR_CHECK_EXTENTS 1 - EOF - } - - test "${error_check_typecheck=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF - Defining ERROR_CHECK_TYPECHECK - EOF - cat >> confdefs.h <<\EOF - #define ERROR_CHECK_TYPECHECK 1 - EOF - } - - test "${error_check_bufpos=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF - Defining ERROR_CHECK_BUFPOS - EOF - cat >> confdefs.h <<\EOF - #define ERROR_CHECK_BUFPOS 1 - EOF - } - - test "${error_check_gc=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF - Defining ERROR_CHECK_GC - EOF - cat >> confdefs.h <<\EOF - #define ERROR_CHECK_GC 1 - EOF - } - - test "${error_check_malloc=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF - Defining ERROR_CHECK_MALLOC - EOF - cat >> confdefs.h <<\EOF - #define ERROR_CHECK_MALLOC 1 - EOF - } - - if test "${debug:=$beta}" = "yes"; then - use_assertions=yes memory_usage_stats=yes - extra_objs="$extra_objs debug.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"debug.o\"" - fi - { test "$extra_verbose" = "yes" && cat << \EOF - Defining DEBUG_XEMACS - EOF - cat >> confdefs.h <<\EOF - #define DEBUG_XEMACS 1 - EOF - } - - fi - test "$use_assertions" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF - Defining USE_ASSERTIONS - EOF - cat >> confdefs.h <<\EOF - #define USE_ASSERTIONS 1 - EOF - } - - test "$memory_usage_stats" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF - Defining MEMORY_USAGE_STATS - EOF - cat >> confdefs.h <<\EOF - #define MEMORY_USAGE_STATS 1 - EOF - } - - - - echo $ac_n "checking "host system type"""... $ac_c" 1>&6 - echo "configure:992: checking "host system type"" >&5 - internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'` - canonical=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub "$internal_configuration"` - configuration=`echo "$configuration" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'` - canonical=`echo "$canonical" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'` - echo "$ac_t""$configuration" 1>&6 - - - - - - machine='' opsys='' - - case "$canonical" in - sparc-*-* ) machine=sparc ;; - alpha*-*-* ) machine=alpha ;; - vax-*-* ) machine=vax ;; - mips-dec-* ) machine=pmax ;; - mips-sgi-* ) machine=iris4d ;; - romp-ibm-* ) machine=ibmrt ;; - rs6000-ibm-aix* ) machine=ibmrs6000 ;; - powerpc-ibm-aix* ) machine=ibmrs6000 ;; - powerpc*-* ) machine=powerpc ;; - hppa-*-* ) machine=hp800 ;; - m88k-dg-* ) machine=aviion ;; - m68*-sony-* ) machine=news ;; - mips-sony-* ) machine=news-risc ;; - clipper-* ) machine=clipper ;; - arm-* ) machine=arm ;; - ns32k-* ) machine=ns32000 ;; - esac - - case "$canonical" in - *-*-linux* ) opsys=linux ;; - *-*-netbsd* ) opsys=netbsd ;; - *-*-openbsd* ) opsys=openbsd ;; - *-*-nextstep* ) opsys=nextstep ;; - *-*-vms ) opsys=vms ;; - - *-dec-osf1.3 | *-dec-osf2* ) opsys=decosf1-3 ;; - *-dec-osf1.2 | *-dec-osf1* ) opsys=decosf1-2 ;; - *-dec-osf3.[2-9] ) opsys=decosf3-2 ;; - *-dec-osf3* ) opsys=decosf3-1 ;; - *-dec-osf4* ) opsys=decosf4-0 ;; - - *-*-ultrix[0-3].* | *-*-ultrix4.0* ) opsys=bsd4-2 ;; - *-*-ultrix4.[12]* ) opsys=bsd4-3 ;; - *-*-ultrix* ) opsys=ultrix4-3 ;; - - *-*-aix3.1* ) opsys=aix3-1 ;; - *-*-aix3.2.5 ) opsys=aix3-2-5 ;; - *-*-aix3* ) opsys=aix3-2 ;; - *-*-aix4.0* ) opsys=aix4 ;; - *-*-aix4.1* ) opsys=aix4-1 ;; - *-*-aix4* ) opsys=aix4-2 ;; - - *-gnu* ) opsys=gnu ;; - *-*-bsd4.[01] ) opsys=bsd4-1 ;; - *-*-bsd4.2 ) opsys=bsd4-2 ;; - *-*-bsd4.3 ) opsys=bsd4-3 ;; - *-*-aos4.2 ) opsys=bsd4-2 ;; - *-*-aos* ) opsys=bsd4-3 ;; - *-*-sysv0 | *-*-sysvr0 ) opsys=usg5-0 ;; - *-*-sysv2 | *-*-sysvr2 ) opsys=usg5-2 ;; - *-*-sysv2.2 | *-*-sysvr2.2 ) opsys=usg5-2-2 ;; - *-*-sysv3* | *-*-sysvr3* ) opsys=usg5-3 ;; - *-*-sysv4.1* | *-*-sysvr4.1* )opsys=usg5-4 NON_GNU_CPP=/usr/lib/cpp ;; - *-*-sysv4.[2-9]* | *-sysvr4.[2-9]* ) - if test -z "$NON_GNU_CPP" ; then - for prog in "/usr/ccs/lib/cpp" "/lib/cpp"; do - if test -f "$prog"; then NON_GNU_CPP="$prog"; break; fi - done - fi - opsys=usg5-4-2 ;; - *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;; - *-*-mach_bsd4.3* ) opsys=mach-bsd4-3 ;; - esac - - case "$canonical" in - - *-*-netbsd* ) - case "$canonical" in - i[3-9]86-*-netbsd*) machine=intel386 ;; - hp300-*-netbsd* | amiga-*-netbsd* | sun3-*-netbsd* | mac68k-*-netbsd* | da30-*-netbsd* | m68k-*-netbsd* ) - machine=hp9000s300 ;; - pc532-*-netbsd* | ns32k-*-netbsd* ) machine=ns32000 ;; - pmax-*-netbsd* | mips-*-netbsd* ) machine=pmax ;; - esac - ;; - - *-*-openbsd* ) - case "${canonical}" in - i386-*-openbsd*) machine=intel386 ;; - m68k-*-openbsd*) machine=hp9000s300 ;; - mipsel-*-openbsd*) machine=pmax ;; - esac - ;; - - arm-acorn-riscix1.1* ) machine=acorn opsys=riscix1-1 ;; - arm-acorn-riscix1.2* | arm-acorn-riscix ) machine=acorn opsys=riscix1-2 ;; - - fx80-alliant-* ) machine=alliant4 opsys=bsd4-2 ;; - i860-alliant-* ) machine=alliant-2800 opsys=bsd4-3 ;; - - m68*-altos-sysv* ) machine=altos opsys=usg5-2 ;; - - 580-amdahl-sysv* ) machine=amdahl opsys=usg5-2-2 ;; - - m68*-apollo-* ) machine=apollo opsys=bsd4-3 ;; - - we32k-att-sysv* ) machine=att3b opsys=usg5-2-2 ;; - - m68*-att-sysv* ) machine=7300 opsys=usg5-2-2 ;; - - rs6000-bull-bosx* ) machine=ibmrs6000 opsys=aix3-2 ;; # dpx20 - m68*-bull-sysv3* ) machine=dpx2 opsys=usg5-3 ;; # dpx2 - m68*-bull-sysv2* ) machine=sps7 opsys=usg5-2 ;; # sps7 - - - celerity-celerity-bsd* ) machine=celerity opsys=bsd4-2 ;; - - *-convex-bsd* | *-convex-convexos* ) - machine=convex opsys=bsd4-3 - NON_GNU_CPP="cc -E -P" - ;; - - i[3-9]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;; - - i586-dg-dgux*R4* | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;; - m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;; - m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) opsys=dgux5-4r2 ;; - m88k-dg-dgux* ) opsys=dgux ;; - - m68k-motorola-sysv* | m68000-motorola-sysv* ) machine=delta opsys=usg5-3 ;; - m88k-motorola-sysv4* ) - machine=delta88k opsys=usg5-4-2 - ;; - m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) machine=delta88k opsys=usg5-3 ;; - - m68*-dual-sysv* ) machine=dual opsys=usg5-2 ;; - m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;; - - ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;; - - pn-gould-bsd4.2* ) machine=gould opsys=bsd4-2 ;; - pn-gould-bsd4.3* ) machine=gould opsys=bsd4-3 ;; - np1-gould-bsd* ) machine=gould-np1 opsys=bsd4-3 ;; - - m88k-harris-cxux* ) - case "`uname -r`" in - [56].[0-9] ) machine=nh4000 opsys=cxux ;; - [7].[0-9] ) machine=nh4000 opsys=cxux7 ;; - esac - NON_GNU_CPP="/lib/cpp" - ;; - m68k-harris-cxux* ) machine=nh3000 opsys=cxux ;; - powerpc-harris-powerunix ) machine=nh6000 opsys=powerunix NON_GNU_CPP="cc -Xo -E -P" ;; - - xps*-honeywell-sysv* ) machine=xps100 opsys=usg5-2 ;; - - m68*-hp-bsd* ) machine=hp9000s300 opsys=bsd4-3 ;; - - *-hp-hpux* ) - case "$canonical" in - m68* ) machine=hp9000s300 ;; - hppa* ) machine=hp800 ;; - esac - - case "$canonical" in - *-hp-hpux7* ) opsys=hpux ;; - *-hp-hpux8* ) opsys=hpux8 ;; - *-hp-hpux9* ) opsys=hpux9 ;; - *-hp-hpux10* ) opsys=hpux10 ;; - *-hp-hpux11* ) opsys=hpux11 ;; - * ) opsys=hpux ;; - esac - - case "$opsys" in hpux9 | hpux10 ) extra_objs="$extra_objs strcat.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"strcat.o\"" - fi ;; esac - - if test "$opsys" = "hpux10" -o "$opsys" = "hpux11"; then \ - ansi_flag="-Ae"; else ansi_flag="-Aa"; fi - NON_GNU_CC="cc $ansi_flag" NON_GNU_CPP="cc $ansi_flag -E" - - case "$canonical" in *-hp-hpux*shr* ) opsys="${opsys}-shr" ;; esac - ;; - - orion-orion-bsd* ) machine=orion opsys=bsd4-2 ;; - clipper-orion-bsd* ) machine=orion105 opsys=bsd4-2 ;; - - i[3-9]86-ibm-aix1.1* ) machine=ibmps2-aix opsys=usg5-2-2 ;; - i[3-9]86-ibm-aix1.[23]* | i[3-9]86-ibm-aix* ) machine=ibmps2-aix opsys=usg5-3 ;; - i370-ibm-aix*) machine=ibm370aix opsys=usg5-3 ;; - romp-ibm-aos* ) opsys=bsd4-3 ;; - romp-ibm-bsd* ) opsys=bsd4-3 ;; - romp-ibm-mach* ) opsys=mach-bsd4-3 ;; - - m68*-isi-bsd4.2* ) machine=isi-ov opsys=bsd4-2 ;; - m68*-isi-bsd4.3* ) machine=isi-ov opsys=bsd4-3 ;; - - i[3-9]86-intsys-sysv* ) machine=is386 opsys=usg5-2-2 ;; - - i[3-9]86-prime-sysv* ) machine=i386 opsys=usg5-3 ;; - - i[3-9]86-sequent-bsd* ) machine=symmetry opsys=bsd4-3 ;; - - i[3-9]86-sequent-ptx* ) machine=sequent-ptx opsys=ptx NON_GNU_CPP="/lib/cpp" ;; - - i[3-9]86-ncr-sysv* ) machine=ncr386 opsys=usg5-4-2 ;; - - i860-intel-osf1* ) machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp ;; - - i860-*-sysv4* ) machine=i860 opsys=usg5-4 NON_GNU_CC="/bin/cc" NON_GNU_CPP="/usr/ccs/lib/cpp" ;; - - m68*-masscomp-rtu* ) machine=masscomp opsys=rtu ;; - - m68*-megatest-bsd* ) machine=mega68 opsys=bsd4-2 ;; - - mips-mips-usg* ) machine=mips4 ;; - mips-mips-riscos4 ) - machine=mips4 - NON_GNU_CC="cc -systype bsd43" - NON_GNU_CPP="cc -systype bsd43 -E" - case "$canonical" in - mips-mips-riscos4* ) opsys=bsd4-3 ;; - mips-mips-riscos5* ) opsys=riscos5 ;; - esac - ;; - mips-mips-bsd* ) machine=mips opsys=bsd4-3 ;; - mips-mips-* ) machine=mips opsys=usg5-2-2 ;; - - m68*-next-* | m68k-*-nextstep* ) machine=m68k opsys=nextstep ;; - - ns32k-ns-genix* ) machine=ns32000 opsys=usg5-2 ;; - - m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) machine=tower32 opsys=usg5-2-2 ;; - m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) machine=tower32v3 opsys=usg5-3 ;; - - m68*-nixdorf-sysv* ) machine=targon31 opsys=usg5-2-2 ;; - - m68*-nu-sysv* ) machine=nu opsys=usg5-2 ;; - - m68*-plexus-sysv* ) machine=plexus opsys=usg5-2 ;; - - pyramid-pyramid-bsd* ) machine=pyramid opsys=bsd4-2 ;; - - ns32k-sequent-bsd4.2* ) machine=sequent opsys=bsd4-2 ;; - ns32k-sequent-bsd4.3* ) machine=sequent opsys=bsd4-3 ;; - - mips-siemens-sysv* | mips-sni-sysv*) - machine=mips-siemens opsys=usg5-4 - NON_GNU_CC=/usr/ccs/bin/cc - NON_GNU_CPP=/usr/ccs/lib/cpp - ;; - - mips-nec-sysv*) - machine=mips-nec - NON_GNU_CC=/usr/ccs/bin/cc - NON_GNU_CPP=/usr/ccs/lib/cpp - ;; - - m68*-sgi-iris3.5* ) machine=irist opsys=iris3-5 ;; - m68*-sgi-iris3.6* | m68*-sgi-iris*) machine=irist opsys=iris3-6 ;; - mips-sgi-irix3.* ) opsys=irix3-3 ;; - mips-sgi-irix4.* ) opsys=irix4-0 ;; - mips-sgi-irix6* ) opsys=irix6-0 ;; - mips-sgi-irix5.1* ) opsys=irix5-1 ;; - mips-sgi-irix5.2* ) opsys=irix5-2 ;; - mips-sgi-irix5.* ) opsys=irix5-3 ;; - mips-sgi-irix* ) opsys=irix5-0 ;; - - *-sony-newsos[34]* | *-sony-news[34]* ) opsys=bsd4-3 ;; - *-sony-news* ) opsys=newsos5 ;; - - m68*-stride-sysv* ) machine=stride opsys=usg5-2 ;; - - *-*-solaris* | *-*-sunos* | *-sun-mach* | *-sun-bsd* ) - case "$canonical" in - m68*-sunos1* ) machine=sun1 ;; - m68*-sunos2* ) machine=sun2 ;; - m68* ) machine=sun3 ;; - i*86*-sun-sunos[34]* ) machine=sun386 ;; - i*86-*-* ) machine=intel386 ;; - rs6000* ) machine=rs6000 ;; - esac - - case "$canonical" in *-sunos5*) - canonical=`echo $canonical | sed -e s/sunos5/solaris2/`;; - esac - - case "$canonical" in - *-sunos4* ) - #test -f /usr/lib/cpp && NON_GNU_CPP=/usr/lib/cpp ;; - : ;; - *-solaris2* ) - #test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp - RANLIB=':' ;; - esac - - case "$canonical" in - *-solaris* ) - opsys=sol2 - os_release=`uname -r | sed -e 's/^\([0-9]\)\.\([0-9]\).*/\1\2/'` - { test "$extra_verbose" = "yes" && cat << EOF - Defining OS_RELEASE = $os_release - EOF - cat >> confdefs.h <&2 - exit 1 - fi - - if test -z "$dynamic"; then - case "$opsys" in - hpux* | sunos4* ) dynamic=no ;; - *) dynamic=yes ;; - esac - fi - if test "$dynamic" = "yes"; then - case "$opsys" in - hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;; - decosf* ) ld_call_shared="-call_shared" ;; - esac - else case "$opsys" in - sol2 ) - echo "Static linking is not supported on Solaris 2." - echo "Rerun configure without specifying --dynamic=no." - exit 1 ;; - linux ) ld_call_shared="-Bstatic" ;; - decosf* ) ld_call_shared="-non_shared" ;; - esac - fi - - case "$opsys" in aix*) NON_GNU_CC=xlc ;; esac - - stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'` - { test "$extra_verbose" = "yes" && cat << EOF - Defining STACK_TRACE_EYE_CATCHER = $stack_trace_eye_catcher - EOF - cat >> confdefs.h <&2 && exit 1 - elif test "$with_tooltalk" = "no" ; then with_workshop=no - elif test "$with_workshop" = "yes"; then with_tooltalk=yes - fi - - if test "$with_workshop" = "yes"; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining SUNPRO - EOF - cat >> confdefs.h <<\EOF - #define SUNPRO 1 - EOF - } - - extra_objs="$extra_objs sunpro.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"sunpro.o\"" - fi - fi - - if test "$with_clash_detection" = "yes"; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining CLASH_DETECTION - EOF - cat >> confdefs.h <<\EOF - #define CLASH_DETECTION 1 - EOF - } - - extra_objs="$extra_objs filelock.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"filelock.o\"" - fi - fi - - test -n "$compiler" && CC="$compiler" - if test "$with_gcc" = "no"; then case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac - fi - - test "${cflags-unset}" != unset && CFLAGS="$cflags" - if test "${CFLAGS-unset}" != unset - then cflags_specified=yes; - else cflags_specified=no; - fi - - xe_save_CFLAGS="$CFLAGS" - - # Extract the first word of "gcc", so it can be a program name with args. - set dummy gcc; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 - echo "configure:1484: checking for $ac_word" >&5 - - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. - else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="gcc" - break - fi - done - IFS="$ac_save_ifs" - fi - CC="$ac_cv_prog_CC" - if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 - else - echo "$ac_t""no" 1>&6 - fi - - if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. - set dummy cc; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 - echo "configure:1510: checking for $ac_word" >&5 - - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. - else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - ac_prog_rejected=no - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - break - fi - done - IFS="$ac_save_ifs" - if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# -gt 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - set dummy "$ac_dir/$ac_word" "$@" - shift - ac_cv_prog_CC="$@" - fi - fi - fi - CC="$ac_cv_prog_CC" - if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 - else - echo "$ac_t""no" 1>&6 - fi - - test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } - fi - - echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 - echo "configure:1555: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 - - ac_ext=c - xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS' - xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run' - xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard' - ac_cpp='$CPP '"$xe_cppflags" - ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5' - ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5' - cross_compiling=no - - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - ac_cv_prog_cc_works=yes - # If we can't run a trivial program, we are probably using a cross compiler. - if (./conftest; exit) 2>/dev/null; then - ac_cv_prog_cc_cross=no - else - ac_cv_prog_cc_cross=yes - fi - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_cv_prog_cc_works=no - fi - rm -fr conftest* - - echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 - if test $ac_cv_prog_cc_works = no; then - { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } - fi - echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 - echo "configure:1591: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 - echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 - cross_compiling=$ac_cv_prog_cc_cross - - echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 - echo "configure:1596: checking whether we are using GNU C" >&5 - - cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - ac_cv_prog_gcc=yes - else - ac_cv_prog_gcc=no - fi - - echo "$ac_t""$ac_cv_prog_gcc" 1>&6 - - if test $ac_cv_prog_gcc = yes; then - GCC=yes - ac_test_CFLAGS="${CFLAGS+set}" - ac_save_CFLAGS="$CFLAGS" - CFLAGS= - echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 - echo "configure:1617: checking whether ${CC-cc} accepts -g" >&5 - - echo 'void f(){}' > conftest.c - if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then - ac_cv_prog_cc_g=yes - else - ac_cv_prog_cc_g=no - fi - rm -f conftest* - - - echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 - if test "$ac_test_CFLAGS" = set; then - CFLAGS="$ac_save_CFLAGS" - elif test $ac_cv_prog_cc_g = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-O2" - fi - else - GCC= - test "${CFLAGS+set}" = set || CFLAGS="-g" - fi - - if test "$with_gcc" = "no" -a "$GCC" = "yes"; then - CC=${NON_GNU_CC-cc} - # Extract the first word of "gcc", so it can be a program name with args. - set dummy gcc; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 - echo "configure:1646: checking for $ac_word" >&5 - - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. - else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="gcc" - break - fi - done - IFS="$ac_save_ifs" - fi - CC="$ac_cv_prog_CC" - if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 - else - echo "$ac_t""no" 1>&6 - fi - - if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. - set dummy cc; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 - echo "configure:1672: checking for $ac_word" >&5 - - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. - else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - ac_prog_rejected=no - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - break - fi - done - IFS="$ac_save_ifs" - if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# -gt 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - set dummy "$ac_dir/$ac_word" "$@" - shift - ac_cv_prog_CC="$@" - fi - fi - fi - CC="$ac_cv_prog_CC" - if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 - else - echo "$ac_t""no" 1>&6 - fi - - test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } - fi - - echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 - echo "configure:1717: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 - - ac_ext=c - xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS' - xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run' - xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard' - ac_cpp='$CPP '"$xe_cppflags" - ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5' - ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5' - cross_compiling=no - - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - ac_cv_prog_cc_works=yes - # If we can't run a trivial program, we are probably using a cross compiler. - if (./conftest; exit) 2>/dev/null; then - ac_cv_prog_cc_cross=no - else - ac_cv_prog_cc_cross=yes - fi - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_cv_prog_cc_works=no - fi - rm -fr conftest* - - echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 - if test $ac_cv_prog_cc_works = no; then - { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } - fi - echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 - echo "configure:1753: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 - echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 - cross_compiling=$ac_cv_prog_cc_cross - - echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 - echo "configure:1758: checking whether we are using GNU C" >&5 - - cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - ac_cv_prog_gcc=yes - else - ac_cv_prog_gcc=no - fi - - echo "$ac_t""$ac_cv_prog_gcc" 1>&6 - - if test $ac_cv_prog_gcc = yes; then - GCC=yes - ac_test_CFLAGS="${CFLAGS+set}" - ac_save_CFLAGS="$CFLAGS" - CFLAGS= - echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 - echo "configure:1779: checking whether ${CC-cc} accepts -g" >&5 - - echo 'void f(){}' > conftest.c - if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then - ac_cv_prog_cc_g=yes - else - ac_cv_prog_cc_g=no - fi - rm -f conftest* - - - echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 - if test "$ac_test_CFLAGS" = set; then - CFLAGS="$ac_save_CFLAGS" - elif test $ac_cv_prog_cc_g = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-O2" - fi - else - GCC= - test "${CFLAGS+set}" = set || CFLAGS="-g" - fi - - elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then - CC=gcc - # Extract the first word of "gcc", so it can be a program name with args. - set dummy gcc; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 - echo "configure:1808: checking for $ac_word" >&5 - - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. - else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="gcc" - break - fi - done - IFS="$ac_save_ifs" - fi - CC="$ac_cv_prog_CC" - if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 - else - echo "$ac_t""no" 1>&6 - fi - - if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. - set dummy cc; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 - echo "configure:1834: checking for $ac_word" >&5 - - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. - else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - ac_prog_rejected=no - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - break - fi - done - IFS="$ac_save_ifs" - if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# -gt 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - set dummy "$ac_dir/$ac_word" "$@" - shift - ac_cv_prog_CC="$@" - fi - fi - fi - CC="$ac_cv_prog_CC" - if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 - else - echo "$ac_t""no" 1>&6 - fi - - test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } - fi - - echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 - echo "configure:1879: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 - - ac_ext=c - xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS' - xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run' - xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard' - ac_cpp='$CPP '"$xe_cppflags" - ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5' - ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5' - cross_compiling=no - - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - ac_cv_prog_cc_works=yes - # If we can't run a trivial program, we are probably using a cross compiler. - if (./conftest; exit) 2>/dev/null; then - ac_cv_prog_cc_cross=no - else - ac_cv_prog_cc_cross=yes - fi - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_cv_prog_cc_works=no - fi - rm -fr conftest* - - echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 - if test $ac_cv_prog_cc_works = no; then - { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } - fi - echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 - echo "configure:1915: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 - echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 - cross_compiling=$ac_cv_prog_cc_cross - - echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 - echo "configure:1920: checking whether we are using GNU C" >&5 - - cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - ac_cv_prog_gcc=yes - else - ac_cv_prog_gcc=no - fi - - echo "$ac_t""$ac_cv_prog_gcc" 1>&6 - - if test $ac_cv_prog_gcc = yes; then - GCC=yes - ac_test_CFLAGS="${CFLAGS+set}" - ac_save_CFLAGS="$CFLAGS" - CFLAGS= - echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 - echo "configure:1941: checking whether ${CC-cc} accepts -g" >&5 - - echo 'void f(){}' > conftest.c - if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then - ac_cv_prog_cc_g=yes - else - ac_cv_prog_cc_g=no - fi - rm -f conftest* - - - echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 - if test "$ac_test_CFLAGS" = set; then - CFLAGS="$ac_save_CFLAGS" - elif test $ac_cv_prog_cc_g = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-O2" - fi - else - GCC= - test "${CFLAGS+set}" = set || CFLAGS="-g" - fi - - fi - CFLAGS="$xe_save_CFLAGS" - - - test -n "$CPP" -a -d "$CPP" && CPP= - - test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP" - - echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 - echo "configure:1974: checking how to run the C preprocessor" >&5 - # On Suns, sometimes $CPP names a directory. - if test -n "$CPP" && test -d "$CPP"; then - CPP= - fi - if test -z "$CPP"; then - - # This must be in double quotes, not single quotes, because CPP may get - # substituted into the Makefile and "${CC-cc}" will confuse make. - CPP="${CC-cc} -E" - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. - cat > conftest.$ac_ext < - Syntax Error - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" - { (eval echo configure:1993: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out` - if test -z "$ac_err"; then - : - else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP="${CC-cc} -E -traditional-cpp" - cat > conftest.$ac_ext < - Syntax Error - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" - { (eval echo configure:2010: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out` - if test -z "$ac_err"; then - : - else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP=/lib/cpp - fi - rm -f conftest* - fi - rm -f conftest* - ac_cv_prog_CPP="$CPP" - CPP="$ac_cv_prog_CPP" - else - ac_cv_prog_CPP="$CPP" - fi - echo "$ac_t""$CPP" 1>&6 - - - echo $ac_n "checking for AIX""... $ac_c" 1>&6 - echo "configure:2033: checking for AIX" >&5 - cat > conftest.$ac_ext <&5 | - egrep "yes" >/dev/null 2>&1; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF - Defining _ALL_SOURCE - EOF - cat >> confdefs.h <<\EOF - #define _ALL_SOURCE 1 - EOF - } - - else - rm -rf conftest* - echo "$ac_t""no" 1>&6 - fi - rm -f conftest* - - - - echo $ac_n "checking for GNU libc""... $ac_c" 1>&6 - echo "configure:2062: checking for GNU libc" >&5 - cat > conftest.$ac_ext < - int main() { - - #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__) - #error Not a GNU libc system :-( - ******* ======= ******** &&&&&&&& - #endif - - ; return 0; } - EOF - if { (eval echo configure:2076: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - have_glibc=yes - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - have_glibc=no - fi - rm -f conftest* - echo "$ac_t""$have_glibc" 1>&6 - test "$have_glibc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF - Defining _GNU_SOURCE - EOF - cat >> confdefs.h <<\EOF - #define _GNU_SOURCE 1 - EOF - } - - - - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 - then - : - else - conftest_rc="$?" - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - case "$conftest_rc" in - 11) echo "You appear to be using the SunPro C compiler."; __SUNPRO_C=yes ;; - 12) echo "You appear to be using the DEC C compiler." ; __DECC=yes ;; - esac - fi - rm -fr conftest* - - - - - echo "Extracting information from the machine- and system-dependent headers..." - - tempcname="conftest.c" - - - - cat > $tempcname <&6 - echo "configure:2384: checking for dynodump" >&5 - if test "$unexec" != "unexsol2.o"; then - echo "$ac_t""no" 1>&6 - else - echo "$ac_t""yes" 1>&6 - { test "$extra_verbose" = "yes" && cat << \EOF - Defining DYNODUMP - EOF - cat >> confdefs.h <<\EOF - #define DYNODUMP 1 - EOF - } - - MAKE_SUBDIR="$MAKE_SUBDIR dynodump" && if test "$extra_verbose" = "yes"; then echo " Appending \"dynodump\" to \$MAKE_SUBDIR"; fi - SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS dynodump" && if test "$extra_verbose" = "yes"; then echo " Appending \"dynodump\" to \$SRC_SUBDIR_DEPS"; fi - case "$machine" in - sparc ) dynodump_arch=sparc ;; - *86* ) dynodump_arch=i386 ;; - powerpc ) dynodump_arch=ppc ;; - esac - test "$GCC" = "yes" && ld_switch_site="$ld_switch_site -fno-gnu-linker" && if test "$extra_verbose" = "yes"; then echo " Appending \"-fno-gnu-linker\" to \$ld_switch_site"; fi - fi - - - test "$machine$opsys" = "powerpclinux" && start_flags="-T $srcdir/src/ppc.ldscript" - - if test "$unexec" = "unexaix.o"; then - if test "$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 - - echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6 - echo "configure:2422: checking for terminateAndUnload in -lC" >&5 - ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'` - - xe_check_libs=" -lC " - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" - fi - rm -f conftest* - xe_check_libs="" - - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - libs_system="$libs_system -lC" && if test "$extra_verbose" = "yes"; then echo " Appending \"-lC\" to \$libs_system"; fi - else - echo "$ac_t""no" 1>&6 - fi - - - fi - elif test -n "$ld_text_start_addr"; then - start_flags="-T $ld_text_start_addr -e __start" - fi - - - - - if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then - test -z "$linker" && linker='$(CC) -nostdlib' - test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`' - fi - test "$GCC" != "yes" && lib_gcc= - - - - - - case "$site_libraries" in *:* ) site_libraries="`echo '' $site_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac - if test -n "$site_libraries"; then - for arg in $site_libraries; do - case "$arg" in - -* ) ;; - * ) test -d "$arg" || \ - { echo "Error:" "Invalid site library \`$arg': no such directory" >&2; exit 1; } - arg="-L${arg}" ;; - esac - ld_switch_site="$ld_switch_site $arg" && if test "$extra_verbose" = "yes"; then echo " Appending \"$arg\" to \$ld_switch_site"; fi - done - fi - - case "$site_includes" in *:* ) site_includes="`echo '' $site_includes | sed -e 's/^ //' -e 's/:/ /g'`";; esac - if test -n "$site_includes"; then - for arg in $site_includes; do - case "$arg" in - -* ) ;; - * ) test -d "$arg" || \ - { echo "Error:" "Invalid site include \`$arg': no such directory" >&2; exit 1; } - arg="-I${arg}" ;; - esac - c_switch_site="$c_switch_site $arg" && if test "$extra_verbose" = "yes"; then echo " Appending \"$arg\" to \$c_switch_site"; fi - done - fi - - case "$site_prefixes" in *:* ) site_prefixes="`echo '' $site_prefixes | sed -e 's/^ //' -e 's/:/ /g'`";; esac - if test -n "$site_prefixes"; then - for dir in $site_prefixes; do - inc_dir="${dir}/include" - lib_dir="${dir}/lib" - if test ! -d "$dir"; then - { echo "Error:" "Invalid site prefix \`$dir': no such directory" >&2; exit 1; } - elif test ! -d "$inc_dir"; then - { echo "Error:" "Invalid site prefix \`$dir': no such directory \`$inc_dir'" >&2; exit 1; } - elif test ! -d "$lib_dir"; then - { echo "Error:" "Invalid site prefix \`$dir': no such directory \`$lib_dir'" >&2; exit 1; } - else - c_switch_site="$c_switch_site "-I$inc_dir"" && if test "$extra_verbose" = "yes"; then echo " Appending \""-I$inc_dir"\" to \$c_switch_site"; fi - ld_switch_site="$ld_switch_site "-L$lib_dir"" && if test "$extra_verbose" = "yes"; then echo " Appending \""-L$lib_dir"\" to \$ld_switch_site"; fi - fi - done - fi - - - for dir in "/usr/ccs/lib"; do - test -d "$dir" && ld_switch_site="$ld_switch_site -L${dir}" && if test "$extra_verbose" = "yes"; then echo " Appending \"-L${dir}\" to \$ld_switch_site"; fi - done - - case "$site_runtime_libraries" in *:* ) site_runtime_libraries="`echo '' $site_runtime_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac - if test -n "$site_runtime_libraries"; then - LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/ */:/g'`" - export LD_RUN_PATH - fi - - - if test "$dynamic" = "no"; then add_runtime_path=no - elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes - else case "$opsys" in - sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;; - * ) add_runtime_path=no ;; - esac - fi - - if test "$add_runtime_path" = "yes"; then - echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6 - echo "configure:2542: checking "for runtime libraries flag"" >&5 - case "$opsys" in - sol2 ) dash_r="-R" ;; - decosf* | linux* | irix*) dash_r="-rpath " ;; - *) - dash_r="" - for try_dash_r in "-R" "-R " "-rpath "; do - xe_check_libs="${try_dash_r}/no/such/file-or-directory" - - if test "$GCC" = "yes"; then - set x $xe_check_libs; shift; xe_check_libs="" - while test -n "$1"; do - case $1 in - -L | -l | -u ) xe_check_libs="$xe_check_libs $1 $2"; shift ;; - -L* | -l* | -u* | -Wl* | -pg ) xe_check_libs="$xe_check_libs $1" ;; - -Xlinker* ) ;; - * ) xe_check_libs="$xe_check_libs -Xlinker $1" ;; - esac - shift - done - fi - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - dash_r="$try_dash_r" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - fi - rm -f conftest* - xe_check_libs="" - test -n "$dash_r" && break - done ;; - esac - if test -n "$dash_r"; - then echo "$ac_t"""\"${dash_r}\""" 1>&6 - else echo "$ac_t""NONE" 1>&6 - fi - fi - - xe_add_unique_runpath_dir=' - xe_add_p=yes - for xe_dir in $runpath_dirs; do test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no - done - if test "$xe_add_p" = "yes"; then - test -n "$runpath" && runpath="${runpath}:" - runpath="${runpath}${xe_runpath_dir}" - runpath_dirs="$runpath_dirs $xe_runpath_dir" - fi' - - - - - if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then - ld_switch_site=`echo '' $ld_switch_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"` - ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"` - - runpath="" runpath_dirs="" - if test -n "$LD_RUN_PATH"; then - runpath="$LD_RUN_PATH" - elif test "$GCC" = "yes"; then - ld_switch_run_save="$ld_switch_run"; ld_switch_run="" - echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c - xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null' - for arg in `eval "$xe_runpath_link" | grep ' -L'`; do - case "$arg" in P,* | -L* | -R* ) - for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do - { - xe_runpath_dir="$dir" - test "$xe_runpath_dir" != "/lib" -a \ - "$xe_runpath_dir" != "/usr/lib" -a \ - -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \ - eval "$xe_add_unique_runpath_dir" - } - done ;; - esac - done - ld_switch_run="$ld_switch_run_save" - rm -f conftest* - else - for arg in $ld_switch_site $ld_switch_x_site; do - case "$arg" in -L*) { - xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'` - test "$xe_runpath_dir" != "/lib" -a \ - "$xe_runpath_dir" != "/usr/lib" -a \ - -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \ - eval "$xe_add_unique_runpath_dir" - };; esac - done - if test "$opsys $need_motif" = "sol2 yes"; then - xe_runpath_dir="/opt/SUNWdt/lib"; - eval "$xe_add_unique_runpath_dir"; - fi - fi - if test -n "$runpath"; then - ld_switch_run="${dash_r}${runpath}" - - if test "$GCC" = "yes"; then - set x $ld_switch_run; shift; ld_switch_run="" - while test -n "$1"; do - case $1 in - -L | -l | -u ) ld_switch_run="$ld_switch_run $1 $2"; shift ;; - -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;; - -Xlinker* ) ;; - * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;; - esac - shift - done - fi - test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath" - fi - fi - - - - - GNU_MALLOC=yes - if test "$with_dlmalloc" != "no"; then - doug_lea_malloc=yes - else - doug_lea_malloc=no - fi - after_morecore_hook_exists=yes - echo $ac_n "checking for malloc_get_state""... $ac_c" 1>&6 - echo "configure:2673: checking for malloc_get_state" >&5 - - cat > conftest.$ac_ext < - /* Override any gcc2 internal prototype to avoid an error. */ - /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ - char malloc_get_state(); - - int main() { - - /* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ - #if defined (__stub_malloc_get_state) || defined (__stub___malloc_get_state) - choke me - #else - malloc_get_state(); - #endif - - ; return 0; } - EOF - if { (eval echo configure:2699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_func_malloc_get_state=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_malloc_get_state=no" - fi - rm -f conftest* - - if eval "test \"`echo '$ac_cv_func_'malloc_get_state`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : - else - echo "$ac_t""no" 1>&6 - doug_lea_malloc=no - fi - - echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6 - echo "configure:2719: checking for malloc_set_state" >&5 - - cat > conftest.$ac_ext < - /* Override any gcc2 internal prototype to avoid an error. */ - /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ - char malloc_set_state(); - - int main() { - - /* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ - #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state) - choke me - #else - malloc_set_state(); - #endif - - ; return 0; } - EOF - if { (eval echo configure:2745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_func_malloc_set_state=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_malloc_set_state=no" - fi - rm -f conftest* - - if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : - else - echo "$ac_t""no" 1>&6 - doug_lea_malloc=no - fi - - echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6 - echo "configure:2765: checking whether __after_morecore_hook exists" >&5 - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "$ac_t""no" 1>&6 - after_morecore_hook_exists=no - fi - rm -f conftest* - 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" ; then - if test "$GNU_MALLOC" = yes ; then - GNU_MALLOC_reason=" - (Using Doug Lea's new malloc from the GNU C Library.)" - fi - { test "$extra_verbose" = "yes" && cat << \EOF - Defining DOUG_LEA_MALLOC - EOF - cat >> confdefs.h <<\EOF - #define DOUG_LEA_MALLOC 1 - EOF - } - - if test "$after_morecore_hook_exists" = "no" ; then - GNU_MALLOC_reason=" - (Using Doug Lea's new malloc from the Linux C Library.)" - { test "$extra_verbose" = "yes" && cat << \EOF - Defining _NO_MALLOC_WARNING_ - EOF - cat >> confdefs.h <<\EOF - #define _NO_MALLOC_WARNING_ 1 - EOF - } - - fi - use_minimal_tagbits=yes - fi - - - - - # Extract the first word of "ranlib", so it can be a program name with args. - set dummy ranlib; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 - echo "configure:2833: checking for $ac_word" >&5 - - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. - else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_RANLIB="ranlib" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" - fi - RANLIB="$ac_cv_prog_RANLIB" - if test -n "$RANLIB"; then - echo "$ac_t""$RANLIB" 1>&6 - else - echo "$ac_t""no" 1>&6 - fi - - ac_aux_dir= - for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do - if test -f $ac_dir/install-sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f $ac_dir/install.sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - fi - done - if test -z "$ac_aux_dir"; then - { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } - fi - ac_config_guess=$ac_aux_dir/config.guess - ac_config_sub=$ac_aux_dir/config.sub - ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. - - # Find a good install program. We prefer a C program (faster), - # so one script is as good as another. But avoid the broken or - # incompatible versions: - # SysV /etc/install, /usr/sbin/install - # SunOS /usr/etc/install - # IRIX /sbin/install - # AIX /bin/install - # AFS /usr/afsws/bin/install, which mishandles nonexistent args - # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" - # ./install, which can be erroneously created by make from ./install.sh. - echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 - echo "configure:2886: checking for a BSD compatible install" >&5 - if test -z "$INSTALL"; then - - IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - # Account for people who put trailing slashes in PATH elements. - case "$ac_dir/" in - /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - for ac_prog in ginstall installbsd scoinst install; do - if test -f $ac_dir/$ac_prog; then - if test $ac_prog = install && - grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - # OSF/1 installbsd also uses dspmsg, but is usable. - : - else - ac_cv_path_install="$ac_dir/$ac_prog -c" - break 2 - fi - fi - done - ;; - esac - done - IFS="$ac_save_IFS" - - if test "${ac_cv_path_install+set}" = set; then - INSTALL="$ac_cv_path_install" - else - # As a last resort, use the slow shell script. We don't cache a - # path for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the path is relative. - INSTALL="$ac_install_sh" - fi - fi - echo "$ac_t""$INSTALL" 1>&6 - - # Use test -z because SunOS4 sh mishandles braces in ${var-val}. - # It thinks the first close brace ends the variable substitution. - test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - - test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - - for ac_prog in 'bison -y' byacc - do - # Extract the first word of "$ac_prog", so it can be a program name with args. - set dummy $ac_prog; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 - echo "configure:2937: checking for $ac_word" >&5 - - if test -n "$YACC"; then - ac_cv_prog_YACC="$YACC" # Let the user override the test. - else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_YACC="$ac_prog" - break - fi - done - IFS="$ac_save_ifs" - fi - YACC="$ac_cv_prog_YACC" - if test -n "$YACC"; then - echo "$ac_t""$YACC" 1>&6 - else - echo "$ac_t""no" 1>&6 - fi - - test -n "$YACC" && break - done - test -n "$YACC" || YACC="yacc" - - - for ac_hdr in mach/mach.h sys/stropts.h sys/timeb.h sys/time.h unistd.h - do - ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 - echo "configure:2968: checking for $ac_hdr" >&5 - - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" - { (eval echo configure:2976: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out` - if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" - else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" - fi - rm -f conftest* - if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - { test "$extra_verbose" = "yes" && cat << EOF - Defining $ac_tr_hdr - EOF - cat >> confdefs.h <&6 - fi - done - - for ac_hdr in utime.h locale.h libgen.h fcntl.h ulimit.h cygwin/version.h - do - ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 - echo "configure:3009: checking for $ac_hdr" >&5 - - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" - { (eval echo configure:3017: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out` - if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" - else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" - fi - rm -f conftest* - if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - { test "$extra_verbose" = "yes" && cat << EOF - Defining $ac_tr_hdr - EOF - cat >> confdefs.h <&6 - fi - done - - for ac_hdr in kstat.h sys/pstat.h inttypes.h sys/un.h a.out.h - do - ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 - echo "configure:3050: checking for $ac_hdr" >&5 - - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" - { (eval echo configure:3058: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out` - if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" - else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" - fi - rm -f conftest* - if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - { test "$extra_verbose" = "yes" && cat << EOF - Defining $ac_tr_hdr - EOF - cat >> confdefs.h <&6 - fi - done - - echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 - echo "configure:3088: checking for sys/wait.h that is POSIX.1 compatible" >&5 - - cat > conftest.$ac_ext < - #include - #ifndef WEXITSTATUS - #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) - #endif - #ifndef WIFEXITED - #define WIFEXITED(stat_val) (((stat_val) & 255) == 0) - #endif - int main() { - int s; - wait (&s); - s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; - ; return 0; } - EOF - if { (eval echo configure:3107: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_header_sys_wait_h=yes - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_header_sys_wait_h=no - fi - rm -f conftest* - - echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6 - if test $ac_cv_header_sys_wait_h = yes; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_SYS_WAIT_H - EOF - cat >> confdefs.h <<\EOF - #define HAVE_SYS_WAIT_H 1 - EOF - } - - fi - - echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 - echo "configure:3131: checking for ANSI C header files" >&5 - - cat > conftest.$ac_ext < - #include - #include - #include - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" - { (eval echo configure:3142: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out` - if test -z "$ac_err"; then - rm -rf conftest* - ac_cv_header_stdc=yes - else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_header_stdc=no - fi - rm -f conftest* - - if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat > conftest.$ac_ext < - EOF - if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "memchr" >/dev/null 2>&1; then - : - else - rm -rf conftest* - ac_cv_header_stdc=no - fi - rm -f conftest* - - fi - - if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat > conftest.$ac_ext < - EOF - if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "free" >/dev/null 2>&1; then - : - else - rm -rf conftest* - ac_cv_header_stdc=no - fi - rm -f conftest* - - fi - - if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - cat > conftest.$ac_ext < - #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') - #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) - #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) - int main () { int i; for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); - exit (0); } - - EOF - if { (eval echo configure:3206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 - then - : - else - conftest_rc="$?" - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_header_stdc=no - fi - rm -fr conftest* - fi - - echo "$ac_t""$ac_cv_header_stdc" 1>&6 - if test $ac_cv_header_stdc = yes; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining STDC_HEADERS - EOF - cat >> confdefs.h <<\EOF - #define STDC_HEADERS 1 - EOF - } - - fi - - echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 - echo "configure:3232: checking whether time.h and sys/time.h may both be included" >&5 - - cat > conftest.$ac_ext < - #include - #include - int main() { - struct tm *tp; - ; return 0; } - EOF - if { (eval echo configure:3244: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_header_time=yes - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_header_time=no - fi - rm -f conftest* - - echo "$ac_t""$ac_cv_header_time" 1>&6 - if test $ac_cv_header_time = yes; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining TIME_WITH_SYS_TIME - EOF - cat >> confdefs.h <<\EOF - #define TIME_WITH_SYS_TIME 1 - EOF - } - - fi - - echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6 - echo "configure:3268: checking for sys_siglist declaration in signal.h or unistd.h" >&5 - - cat > conftest.$ac_ext < - #include - /* NetBSD declares sys_siglist in unistd.h. */ - #ifdef HAVE_UNISTD_H - #include - #endif - int main() { - char *msg = *(sys_siglist + 1); - ; return 0; } - EOF - if { (eval echo configure:3283: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_decl_sys_siglist=yes - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_decl_sys_siglist=no - fi - rm -f conftest* - - echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6 - if test $ac_cv_decl_sys_siglist = yes; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining SYS_SIGLIST_DECLARED - EOF - cat >> confdefs.h <<\EOF - #define SYS_SIGLIST_DECLARED 1 - EOF - } - - fi - - - echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6 - echo "configure:3308: checking for struct utimbuf" >&5 - cat > conftest.$ac_ext < - #include - #else - #ifdef HAVE_SYS_TIME_H - #include - #else - #include - #endif - #endif - #ifdef HAVE_UTIME_H - #include - #endif - int main() { - static struct utimbuf x; x.actime = x.modtime; - ; return 0; } - EOF - if { (eval echo configure:3329: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_STRUCT_UTIMBUF - EOF - cat >> confdefs.h <<\EOF - #define HAVE_STRUCT_UTIMBUF 1 - EOF - } - - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "$ac_t""no" 1>&6 - fi - rm -f conftest* - - echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 - echo "configure:3349: checking return type of signal handlers" >&5 - - cat > conftest.$ac_ext < - #include - #ifdef signal - #undef signal - #endif - #ifdef __cplusplus - extern "C" void (*signal (int, void (*)(int)))(int); - #else - void (*signal ()) (); - #endif - - int main() { - int i; - ; return 0; } - EOF - if { (eval echo configure:3369: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_type_signal=void - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_type_signal=int - fi - rm -f conftest* - - echo "$ac_t""$ac_cv_type_signal" 1>&6 - { test "$extra_verbose" = "yes" && cat << EOF - Defining RETSIGTYPE = $ac_cv_type_signal - EOF - cat >> confdefs.h <&6 - echo "configure:3391: checking for size_t" >&5 - - cat > conftest.$ac_ext < - #if STDC_HEADERS - #include - #include - #endif - EOF - if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_type_size_t=yes - else - rm -rf conftest* - ac_cv_type_size_t=no - fi - rm -f conftest* - - echo "$ac_t""$ac_cv_type_size_t" 1>&6 - if test $ac_cv_type_size_t = no; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining size_t = unsigned - EOF - cat >> confdefs.h <<\EOF - #define size_t unsigned - EOF - } - - fi - - echo $ac_n "checking for pid_t""... $ac_c" 1>&6 - echo "configure:3425: checking for pid_t" >&5 - - cat > conftest.$ac_ext < - #if STDC_HEADERS - #include - #include - #endif - EOF - if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_type_pid_t=yes - else - rm -rf conftest* - ac_cv_type_pid_t=no - fi - rm -f conftest* - - echo "$ac_t""$ac_cv_type_pid_t" 1>&6 - if test $ac_cv_type_pid_t = no; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining pid_t = int - EOF - cat >> confdefs.h <<\EOF - #define pid_t int - EOF - } - - fi - - echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 - echo "configure:3459: checking for uid_t in sys/types.h" >&5 - - cat > conftest.$ac_ext < - EOF - if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "uid_t" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_type_uid_t=yes - else - rm -rf conftest* - ac_cv_type_uid_t=no - fi - rm -f conftest* - - - echo "$ac_t""$ac_cv_type_uid_t" 1>&6 - if test $ac_cv_type_uid_t = no; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining uid_t = int - EOF - cat >> confdefs.h <<\EOF - #define uid_t int - EOF - } - - { test "$extra_verbose" = "yes" && cat << \EOF - Defining gid_t = int - EOF - cat >> confdefs.h <<\EOF - #define gid_t int - EOF - } - - fi - - echo $ac_n "checking for mode_t""... $ac_c" 1>&6 - echo "configure:3498: checking for mode_t" >&5 - - cat > conftest.$ac_ext < - #if STDC_HEADERS - #include - #include - #endif - EOF - if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_type_mode_t=yes - else - rm -rf conftest* - ac_cv_type_mode_t=no - fi - rm -f conftest* - - echo "$ac_t""$ac_cv_type_mode_t" 1>&6 - if test $ac_cv_type_mode_t = no; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining mode_t = int - EOF - cat >> confdefs.h <<\EOF - #define mode_t int - EOF - } - - fi - - echo $ac_n "checking for off_t""... $ac_c" 1>&6 - echo "configure:3532: checking for off_t" >&5 - - cat > conftest.$ac_ext < - #if STDC_HEADERS - #include - #include - #endif - EOF - if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_type_off_t=yes - else - rm -rf conftest* - ac_cv_type_off_t=no - fi - rm -f conftest* - - echo "$ac_t""$ac_cv_type_off_t" 1>&6 - if test $ac_cv_type_off_t = no; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining off_t = long - EOF - cat >> confdefs.h <<\EOF - #define off_t long - EOF - } - - fi - - - echo $ac_n "checking for struct timeval""... $ac_c" 1>&6 - echo "configure:3567: checking for struct timeval" >&5 - cat > conftest.$ac_ext < - #include - #else - #ifdef HAVE_SYS_TIME_H - #include - #else - #include - #endif - #endif - int main() { - static struct timeval x; x.tv_sec = x.tv_usec; - ; return 0; } - EOF - if { (eval echo configure:3585: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - HAVE_TIMEVAL=yes - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_TIMEVAL - EOF - cat >> confdefs.h <<\EOF - #define HAVE_TIMEVAL 1 - EOF - } - - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "$ac_t""no" 1>&6 - HAVE_TIMEVAL=no - fi - rm -f conftest* - - echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 - echo "configure:3607: checking whether struct tm is in sys/time.h or time.h" >&5 - - cat > conftest.$ac_ext < - #include - int main() { - struct tm *tp; tp->tm_sec; - ; return 0; } - EOF - if { (eval echo configure:3618: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_tm=time.h - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_struct_tm=sys/time.h - fi - rm -f conftest* - - echo "$ac_t""$ac_cv_struct_tm" 1>&6 - if test $ac_cv_struct_tm = sys/time.h; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining TM_IN_SYS_TIME - EOF - cat >> confdefs.h <<\EOF - #define TM_IN_SYS_TIME 1 - EOF - } - - fi - - echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6 - echo "configure:3642: checking for tm_zone in struct tm" >&5 - - cat > conftest.$ac_ext < - #include <$ac_cv_struct_tm> - int main() { - struct tm tm; tm.tm_zone; - ; return 0; } - EOF - if { (eval echo configure:3653: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_tm_zone=yes - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_struct_tm_zone=no - fi - rm -f conftest* - - echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6 - if test "$ac_cv_struct_tm_zone" = yes; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_TM_ZONE - EOF - cat >> confdefs.h <<\EOF - #define HAVE_TM_ZONE 1 - EOF - } - - else - echo $ac_n "checking for tzname""... $ac_c" 1>&6 - echo "configure:3676: checking for tzname" >&5 - - cat > conftest.$ac_ext < - #ifndef tzname /* For SGI. */ - extern char *tzname[]; /* RS6000 and others reject char **tzname. */ - #endif - int main() { - atoi(*tzname); - ; return 0; } - EOF - if { (eval echo configure:3689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - ac_cv_var_tzname=yes - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_var_tzname=no - fi - rm -f conftest* - - echo "$ac_t""$ac_cv_var_tzname" 1>&6 - if test $ac_cv_var_tzname = yes; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_TZNAME - EOF - cat >> confdefs.h <<\EOF - #define HAVE_TZNAME 1 - EOF - } - - fi - fi - - - echo $ac_n "checking for working const""... $ac_c" 1>&6 - echo "configure:3715: checking for working const" >&5 - - cat > conftest.$ac_ext <j = 5; - } - { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ - const int foo = 10; - } - - ; return 0; } - EOF - if { (eval echo configure:3767: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_c_const=yes - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_c_const=no - fi - rm -f conftest* - - echo "$ac_t""$ac_cv_c_const" 1>&6 - if test $ac_cv_c_const = no; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining const = - EOF - cat >> confdefs.h <<\EOF - #define const - EOF - } - - fi - - - echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 - echo "configure:3792: checking whether ${MAKE-make} sets \${MAKE}" >&5 - set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` - - cat > conftestmake <<\EOF - all: - @echo 'ac_maketemp="${MAKE}"' - EOF - # GNU make sometimes prints "make[1]: Entering...", which would confuse us. - eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` - if test -n "$ac_maketemp"; then - eval ac_cv_prog_make_${ac_make}_set=yes - else - eval ac_cv_prog_make_${ac_make}_set=no - fi - rm -f conftestmake - if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then - echo "$ac_t""yes" 1>&6 - SET_MAKE= - else - echo "$ac_t""no" 1>&6 - SET_MAKE="MAKE=${MAKE-make}" - fi - - - echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 - echo "configure:3817: checking whether byte ordering is bigendian" >&5 - - ac_cv_c_bigendian=unknown - # See if sys/param.h defines the BYTE_ORDER macro. - cat > conftest.$ac_ext < - #include - int main() { - - #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN - bogus endian macros - #endif - ; return 0; } - EOF - if { (eval echo configure:3833: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - # It does; now see whether it defined to BIG_ENDIAN or not. - cat > conftest.$ac_ext < - #include - int main() { - - #if BYTE_ORDER != BIG_ENDIAN - not big endian - #endif - ; return 0; } - EOF - if { (eval echo configure:3848: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_c_bigendian=yes - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_c_bigendian=no - fi - rm -f conftest* - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - fi - rm -f conftest* - if test $ac_cv_c_bigendian = unknown; then - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 - then - ac_cv_c_bigendian=no - else - conftest_rc="$?" - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_c_bigendian=yes - fi - rm -fr conftest* - fi - - echo "$ac_t""$ac_cv_c_bigendian" 1>&6 - if test $ac_cv_c_bigendian = yes; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining WORDS_BIGENDIAN - EOF - cat >> confdefs.h <<\EOF - #define WORDS_BIGENDIAN 1 - EOF - } - - fi - - - echo $ac_n "checking size of short""... $ac_c" 1>&6 - echo "configure:3905: checking size of short" >&5 - - cat > conftest.$ac_ext < - main() - { - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(short)); - exit(0); - } - EOF - if { (eval echo configure:3919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 - then - ac_cv_sizeof_short=`cat conftestval` - else - conftest_rc="$?" - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_short=0 - fi - rm -fr conftest* - echo "$ac_t""$ac_cv_sizeof_short" 1>&6 - { test "$extra_verbose" = "yes" && cat << EOF - Defining SIZEOF_SHORT = $ac_cv_sizeof_short - EOF - cat >> confdefs.h <&6 - echo "configure:3947: checking size of int" >&5 - - cat > conftest.$ac_ext < - main() - { - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(int)); - exit(0); - } - EOF - if { (eval echo configure:3961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 - then - ac_cv_sizeof_int=`cat conftestval` - else - conftest_rc="$?" - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_int=0 - fi - rm -fr conftest* - echo "$ac_t""$ac_cv_sizeof_int" 1>&6 - { test "$extra_verbose" = "yes" && cat << EOF - Defining SIZEOF_INT = $ac_cv_sizeof_int - EOF - cat >> confdefs.h <&6 - echo "configure:3983: checking size of long" >&5 - - cat > conftest.$ac_ext < - main() - { - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(long)); - exit(0); - } - EOF - if { (eval echo configure:3997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 - then - ac_cv_sizeof_long=`cat conftestval` - else - conftest_rc="$?" - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_long=0 - fi - rm -fr conftest* - echo "$ac_t""$ac_cv_sizeof_long" 1>&6 - { test "$extra_verbose" = "yes" && cat << EOF - Defining SIZEOF_LONG = $ac_cv_sizeof_long - EOF - cat >> confdefs.h <&6 - echo "configure:4019: checking size of long long" >&5 - - cat > conftest.$ac_ext < - main() - { - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(long long)); - exit(0); - } - EOF - if { (eval echo configure:4033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 - then - ac_cv_sizeof_long_long=`cat conftestval` - else - conftest_rc="$?" - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_long_long=0 - fi - rm -fr conftest* - echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6 - { test "$extra_verbose" = "yes" && cat << EOF - Defining SIZEOF_LONG_LONG = $ac_cv_sizeof_long_long - EOF - cat >> confdefs.h <&6 - echo "configure:4055: checking size of void *" >&5 - - cat > conftest.$ac_ext < - main() - { - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(void *)); - exit(0); - } - EOF - if { (eval echo configure:4069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 - then - ac_cv_sizeof_void_p=`cat conftestval` - else - conftest_rc="$?" - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_void_p=0 - fi - rm -fr conftest* - echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6 - { test "$extra_verbose" = "yes" && cat << EOF - Defining SIZEOF_VOID_P = $ac_cv_sizeof_void_p - EOF - cat >> confdefs.h <&6 - echo "configure:4092: checking for long file names" >&5 - - ac_cv_sys_long_file_names=yes - # Test for long file names in all the places we know might matter: - # . the current directory, where building will happen - # $prefix/lib where we will be installing things - # $exec_prefix/lib likewise - # eval it to expand exec_prefix. - # $TMPDIR if set, where it might want to write temporary files - # if $TMPDIR is not set: - # /tmp where it might want to write temporary files - # /var/tmp likewise - # /usr/tmp likewise - if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then - ac_tmpdirs="$TMPDIR" - else - ac_tmpdirs='/tmp /var/tmp /usr/tmp' - fi - for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do - test -d $ac_dir || continue - test -w $ac_dir || continue # It is less confusing to not echo anything here. - (echo 1 > $ac_dir/conftest9012345) 2>/dev/null - (echo 2 > $ac_dir/conftest9012346) 2>/dev/null - val=`cat $ac_dir/conftest9012345 2>/dev/null` - if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then - ac_cv_sys_long_file_names=no - rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null - break - fi - rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null - done - - echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6 - if test $ac_cv_sys_long_file_names = yes; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_LONG_FILE_NAMES - EOF - cat >> confdefs.h <<\EOF - #define HAVE_LONG_FILE_NAMES 1 - EOF - } - - fi - - - echo $ac_n "checking for sin""... $ac_c" 1>&6 - echo "configure:4138: checking for sin" >&5 - - cat > conftest.$ac_ext < - /* Override any gcc2 internal prototype to avoid an error. */ - /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ - char sin(); - - int main() { - - /* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ - #if defined (__stub_sin) || defined (__stub___sin) - choke me - #else - sin(); - #endif - - ; return 0; } - EOF - if { (eval echo configure:4164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_func_sin=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_sin=no" - fi - rm -f conftest* - - if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : - else - echo "$ac_t""no" 1>&6 - - echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6 - echo "configure:4182: checking for sin in -lm" >&5 - ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'` - - xe_check_libs=" -lm " - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" - fi - rm -f conftest* - xe_check_libs="" - - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo m | sed -e 's/^a-zA-Z0-9_/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - { test "$extra_verbose" = "yes" && cat << EOF - Defining $ac_tr_lib - EOF - cat >> confdefs.h <&6 - fi - - - fi - - - { test "$extra_verbose" = "yes" && cat << \EOF - Defining LISP_FLOAT_TYPE - EOF - cat >> confdefs.h <<\EOF - #define LISP_FLOAT_TYPE 1 - EOF - } - - - cat > conftest.$ac_ext < - int main() { - return atanh(1.0) + asinh(1.0) + acosh(1.0); - ; return 0; } - EOF - if { (eval echo configure:4249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_INVERSE_HYPERBOLIC - EOF - cat >> confdefs.h <<\EOF - #define HAVE_INVERSE_HYPERBOLIC 1 - EOF - } - - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - fi - rm -f conftest* - - echo "checking type of mail spool file locking" 1>&6 - echo "configure:4266: checking type of mail spool file locking" >&5 - test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock - test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf - if test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF - Defining REAL_MAIL_USE_LOCKF - EOF - cat >> confdefs.h <<\EOF - #define REAL_MAIL_USE_LOCKF 1 - EOF - } - - elif test "$mail_locking" = "flock"; then { test "$extra_verbose" = "yes" && cat << \EOF - Defining REAL_MAIL_USE_FLOCK - EOF - cat >> confdefs.h <<\EOF - #define REAL_MAIL_USE_FLOCK 1 - EOF - } - - else mail_locking="dot-locking" - fi - - case "$opsys" in decosf*) - - echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6 - echo "configure:4291: checking for cma_open in -lpthreads" >&5 - ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'` - - xe_check_libs=" -lpthreads " - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" - fi - rm -f conftest* - xe_check_libs="" - - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - { test "$extra_verbose" = "yes" && cat << EOF - Defining $ac_tr_lib - EOF - cat >> confdefs.h <&6 - fi - - - test "$ac_cv_lib_pthreads_cma_open" = "yes" && \ - c_switch_site="$c_switch_site -threads" ;; - esac - - echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6 - echo "configure:4343: checking whether the -xildoff compiler flag is required" >&5 - 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 echo "$ac_t""no" 1>&6; - else echo "$ac_t""yes" 1>&6; ld_switch_site="$ld_switch_site -xildoff" && if test "$extra_verbose" = "yes"; then echo " Appending \"-xildoff\" to \$ld_switch_site"; fi - fi - else echo "$ac_t""no" 1>&6 - fi - - if test "$opsys" = "sol2" && test "$OS_RELEASE" -ge 56; then - echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6 - echo "configure:4354: checking for \"-z ignore\" linker flag" >&5 - case "`ld -h 2>&1`" in - *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6 - ld_switch_site="-z ignore $ld_switch_site" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-z ignore\" to \$ld_switch_site"; fi ;; - *) echo "$ac_t""no" 1>&6 ;; - esac - fi - - - echo "checking "for specified window system"" 1>&6 - echo "configure:4364: checking "for specified window system"" >&5 - - if test "$with_x11" != "no"; then - test "$x_includes $x_libraries" != "NONE NONE" && \ - window_system=x11 with_x11=yes - - - 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 "$x_includes" = "NONE"; then - for dir in "/usr/X11" "/usr/X11R6"; do - if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi - done - fi - - if test "$x_libraries" = "NONE"; then - for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do - if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi - done - fi - - # If we find X, set shell vars x_includes and x_libraries to the - # paths, otherwise set no_x=yes. - # Uses ac_ vars as temps to allow command line to override cache and checks. - # --without-x overrides everything else, but does not touch the cache. - echo $ac_n "checking for X""... $ac_c" 1>&6 - echo "configure:4397: checking for X" >&5 - - # Check whether --with-x or --without-x was given. - if test "${with_x+set}" = set; then - withval="$with_x" - : - fi - - # $have_x is `yes', `no', `disabled', or empty when we do not yet know. - if test "x$with_x" = xno; then - # The user explicitly disabled X. - have_x=disabled - else - if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then - # Both variables are already set. - have_x=yes - else - - # One or both of the vars are not set, and there is no cached value. - ac_x_includes=NO ac_x_libraries=NO - rm -fr conftestdir - if mkdir conftestdir; then - cd conftestdir - # Make sure to not put "make" in the Imakefile rules, since we grep it out. - cat > Imakefile <<'EOF' - acfindx: - @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' - EOF - if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then - # GNU make sometimes prints "make[1]: Entering...", which would confuse us. - eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` - # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. - for ac_extension in a so sl; do - if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && - test -f $ac_im_libdir/libX11.$ac_extension; then - ac_im_usrlibdir=$ac_im_libdir; break - fi - done - # Screen out bogus values from the imake configuration. They are - # bogus both because they are the default anyway, and because - # using them would break gcc on systems where it needs fixed includes. - case "$ac_im_incroot" in - /usr/include) ;; - *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;; - esac - case "$ac_im_usrlibdir" in - /usr/lib | /lib) ;; - *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;; - esac - fi - cd .. - rm -fr conftestdir - fi - - if test "$ac_x_includes" = NO; then - # Guess where to find include files, by looking for this one X11 .h file. - test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h - - # First, try using that file with no special directory specified. - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" - { (eval echo configure:4462: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out` - if test -z "$ac_err"; then - rm -rf conftest* - # We can compile using X headers with no special include directory. - ac_x_includes= - else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - # Look for the header file in a standard set of common directories. - # Check X11 before X11Rn because it is often a symlink to the current release. - for ac_dir in \ - /usr/X11/include \ - /usr/X11R6/include \ - /usr/X11R5/include \ - /usr/X11R4/include \ - \ - /usr/include/X11 \ - /usr/include/X11R6 \ - /usr/include/X11R5 \ - /usr/include/X11R4 \ - \ - /usr/local/X11/include \ - /usr/local/X11R6/include \ - /usr/local/X11R5/include \ - /usr/local/X11R4/include \ - \ - /usr/local/include/X11 \ - /usr/local/include/X11R6 \ - /usr/local/include/X11R5 \ - /usr/local/include/X11R4 \ - \ - /usr/X386/include \ - /usr/x386/include \ - /usr/XFree86/include/X11 \ - \ - /usr/include \ - /usr/local/include \ - /usr/unsupported/include \ - /usr/athena/include \ - /usr/local/x11r5/include \ - /usr/lpp/Xamples/include \ - \ - /usr/openwin/include \ - /usr/openwin/share/include \ - ; \ - do - if test -r "$ac_dir/$x_direct_test_include"; then - ac_x_includes=$ac_dir - break - fi - done - fi - rm -f conftest* - fi # $ac_x_includes = NO - - if test "$ac_x_libraries" = NO; then - # Check for the libraries. - - test -z "$x_direct_test_library" && x_direct_test_library=Xt - test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc - - # See if we find them without any special options. - # Don't add to $LIBS permanently. - ac_save_LIBS="$LIBS" - LIBS="-l$x_direct_test_library $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - LIBS="$ac_save_LIBS" - # We can link X programs with no special library path. - ac_x_libraries= - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - LIBS="$ac_save_LIBS" - # First see if replacing the include by lib works. - # Check X11 before X11Rn because it is often a symlink to the current release. - for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \ - /usr/X11/lib \ - /usr/X11R6/lib \ - /usr/X11R5/lib \ - /usr/X11R4/lib \ - \ - /usr/lib/X11 \ - /usr/lib/X11R6 \ - /usr/lib/X11R5 \ - /usr/lib/X11R4 \ - \ - /usr/local/X11/lib \ - /usr/local/X11R6/lib \ - /usr/local/X11R5/lib \ - /usr/local/X11R4/lib \ - \ - /usr/local/lib/X11 \ - /usr/local/lib/X11R6 \ - /usr/local/lib/X11R5 \ - /usr/local/lib/X11R4 \ - \ - /usr/X386/lib \ - /usr/x386/lib \ - /usr/XFree86/lib/X11 \ - \ - /usr/lib \ - /usr/local/lib \ - /usr/unsupported/lib \ - /usr/athena/lib \ - /usr/local/x11r5/lib \ - /usr/lpp/Xamples/lib \ - /lib/usr/lib/X11 \ - \ - /usr/openwin/lib \ - /usr/openwin/share/lib \ - ; \ - do - for ac_extension in a so sl; do - if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then - ac_x_libraries=$ac_dir - break 2 - fi - done - done - fi - rm -f conftest* - fi # $ac_x_libraries = NO - - if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then - # Didn't find X anywhere. Cache the known absence of X. - ac_cv_have_x="have_x=no" - else - # Record where we found X for the cache. - ac_cv_have_x="have_x=yes \ - ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries" - fi - fi - eval "$ac_cv_have_x" - fi # $with_x != no - - if test "$have_x" != yes; then - echo "$ac_t""$have_x" 1>&6 - no_x=yes - else - # If each of the values was on the command line, it overrides each guess. - test "x$x_includes" = xNONE && x_includes=$ac_x_includes - test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries - # Update the cache value to reflect the command line values. - ac_cv_have_x="have_x=yes \ - ac_x_includes=$x_includes ac_x_libraries=$x_libraries" - echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6 - fi - - if test "$no_x" = yes; then - # Not all programs may use this symbol, but it does not hurt to define it. - { test "$extra_verbose" = "yes" && cat << \EOF - Defining X_DISPLAY_MISSING - EOF - cat >> confdefs.h <<\EOF - #define X_DISPLAY_MISSING 1 - EOF - } - - X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= - else - if test -n "$x_includes"; then - X_CFLAGS="$X_CFLAGS -I$x_includes" - fi - - # It would also be nice to do this for all -L options, not just this one. - if test -n "$x_libraries"; then - X_LIBS="$X_LIBS -L$x_libraries" - # For Solaris; some versions of Sun CC require a space after -R and - # others require no space. Words are not sufficient . . . . - case "`(uname -sr) 2>/dev/null`" in - "SunOS 5"*) - echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6 - echo "configure:4647: checking whether -R must be followed by a space" >&5 - ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - ac_R_nospace=yes - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_R_nospace=no - fi - rm -f conftest* - if test $ac_R_nospace = yes; then - echo "$ac_t""no" 1>&6 - X_LIBS="$X_LIBS -R$x_libraries" - else - LIBS="$ac_xsave_LIBS -R $x_libraries" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - ac_R_space=yes - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_R_space=no - fi - rm -f conftest* - if test $ac_R_space = yes; then - echo "$ac_t""yes" 1>&6 - X_LIBS="$X_LIBS -R $x_libraries" - else - echo "$ac_t""neither works" 1>&6 - fi - fi - LIBS="$ac_xsave_LIBS" - esac - fi - - # Check for system-dependent libraries X programs must link with. - # Do this before checking for the system-independent R6 libraries - # (-lICE), since we may need -lsocket or whatever for X linking. - - if test "$ISC" = yes; then - X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" - else - # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X - # libraries were built with DECnet support. And karl@cs.umb.edu says - # the Alpha needs dnet_stub (dnet does not exist). - if test "$with_dnet" = "no" ; then - ac_cv_lib_dnet_dnet_ntoa=no - else - - echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6 - echo "configure:4716: checking for dnet_ntoa in -ldnet" >&5 - ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'` - - xe_check_libs=" -ldnet " - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" - fi - rm -f conftest* - xe_check_libs="" - - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" - else - echo "$ac_t""no" 1>&6 - fi - - fi - - if test $ac_cv_lib_dnet_dnet_ntoa = no; then - - echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6 - echo "configure:4756: checking for dnet_ntoa in -ldnet_stub" >&5 - ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'` - - xe_check_libs=" -ldnet_stub " - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" - fi - rm -f conftest* - xe_check_libs="" - - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" - else - echo "$ac_t""no" 1>&6 - fi - - - fi - - # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, - # to get the SysV transport functions. - # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4) - # needs -lnsl. - # The nsl library prevents programs from opening the X display - # on Irix 5.2, according to dickey@clark.net. - echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 - echo "configure:4801: checking for gethostbyname" >&5 - - cat > conftest.$ac_ext < - /* Override any gcc2 internal prototype to avoid an error. */ - /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ - char gethostbyname(); - - int main() { - - /* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ - #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname) - choke me - #else - gethostbyname(); - #endif - - ; return 0; } - EOF - if { (eval echo configure:4827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_func_gethostbyname=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_gethostbyname=no" - fi - rm -f conftest* - - if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : - else - echo "$ac_t""no" 1>&6 - fi - - if test $ac_cv_func_gethostbyname = no; then - - echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 - echo "configure:4848: checking for gethostbyname in -lnsl" >&5 - ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` - - xe_check_libs=" -lnsl " - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" - fi - rm -f conftest* - xe_check_libs="" - - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" - else - echo "$ac_t""no" 1>&6 - fi - - - fi - - # lieder@skyler.mavd.honeywell.com says without -lsocket, - # socket/setsockopt and other routines are undefined under SCO ODT - # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary - # on later versions), says simon@lia.di.epfl.ch: it contains - # gethostby* variants that don't use the nameserver (or something). - # -lsocket must be given before -lnsl if both are needed. - # We assume that if connect needs -lnsl, so does gethostbyname. - echo $ac_n "checking for connect""... $ac_c" 1>&6 - echo "configure:4894: checking for connect" >&5 - - cat > conftest.$ac_ext < - /* Override any gcc2 internal prototype to avoid an error. */ - /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ - char connect(); - - int main() { - - /* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ - #if defined (__stub_connect) || defined (__stub___connect) - choke me - #else - connect(); - #endif - - ; return 0; } - EOF - if { (eval echo configure:4920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_func_connect=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_connect=no" - fi - rm -f conftest* - - if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : - else - echo "$ac_t""no" 1>&6 - fi - - if test $ac_cv_func_connect = no; then - - xe_msg_checking="for connect in -lsocket" - test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS" - echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6 - echo "configure:4943: checking "$xe_msg_checking"" >&5 - ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` - - xe_check_libs=" -lsocket $X_EXTRA_LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" - fi - rm -f conftest* - xe_check_libs="" - - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" - else - echo "$ac_t""no" 1>&6 - fi - - - fi - - # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX. - echo $ac_n "checking for remove""... $ac_c" 1>&6 - echo "configure:4983: checking for remove" >&5 - - cat > conftest.$ac_ext < - /* Override any gcc2 internal prototype to avoid an error. */ - /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ - char remove(); - - int main() { - - /* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ - #if defined (__stub_remove) || defined (__stub___remove) - choke me - #else - remove(); - #endif - - ; return 0; } - EOF - if { (eval echo configure:5009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_func_remove=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_remove=no" - fi - rm -f conftest* - - if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : - else - echo "$ac_t""no" 1>&6 - fi - - if test $ac_cv_func_remove = no; then - - echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 - echo "configure:5030: checking for remove in -lposix" >&5 - ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'` - - xe_check_libs=" -lposix " - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" - fi - rm -f conftest* - xe_check_libs="" - - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" - else - echo "$ac_t""no" 1>&6 - fi - - - fi - - # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. - echo $ac_n "checking for shmat""... $ac_c" 1>&6 - echo "configure:5070: checking for shmat" >&5 - - cat > conftest.$ac_ext < - /* Override any gcc2 internal prototype to avoid an error. */ - /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ - char shmat(); - - int main() { - - /* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ - #if defined (__stub_shmat) || defined (__stub___shmat) - choke me - #else - shmat(); - #endif - - ; return 0; } - EOF - if { (eval echo configure:5096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_func_shmat=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_shmat=no" - fi - rm -f conftest* - - if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : - else - echo "$ac_t""no" 1>&6 - fi - - if test $ac_cv_func_shmat = no; then - - echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 - echo "configure:5117: checking for shmat in -lipc" >&5 - ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'` - - xe_check_libs=" -lipc " - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" - fi - rm -f conftest* - xe_check_libs="" - - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" - else - echo "$ac_t""no" 1>&6 - fi - - - fi - fi - - # Check for libraries that X11R6 Xt/Xaw programs need. - ac_save_LDFLAGS="$LDFLAGS" - test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" - # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to - # check for ICE first), but we must link in the order -lSM -lICE or - # we get undefined symbols. So assume we have SM if we have ICE. - # These have to be linked with before -lX11, unlike the other - # libraries we check for below, so use a different variable. - # --interran@uluru.Stanford.EDU, kb@cs.umb.edu. - - echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6 - echo "configure:5167: checking for IceConnectionNumber in -lICE" >&5 - ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'` - - xe_check_libs=" -lICE " - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" - fi - rm -f conftest* - xe_check_libs="" - - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" - else - echo "$ac_t""no" 1>&6 - fi - - - LDFLAGS="$ac_save_LDFLAGS" - - fi - # Autoconf claims to find X library and include dirs for us. - 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 - - case "$with_x11" in - yes ) window_system=x11 HAVE_X_WINDOWS=yes ;; - no ) window_system=none HAVE_X_WINDOWS=no ;; - esac - - if test "$with_x11" = "yes"; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_X_WINDOWS - EOF - cat >> confdefs.h <<\EOF - #define HAVE_X_WINDOWS 1 - EOF - } - - MAKE_SUBDIR="$MAKE_SUBDIR lwlib" && if test "$extra_verbose" = "yes"; then echo " Appending \"lwlib\" to \$MAKE_SUBDIR"; fi - SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS lwlib" && if test "$extra_verbose" = "yes"; then echo " Appending \"lwlib\" to \$SRC_SUBDIR_DEPS"; fi - - 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" - X_LIBS="-L${lib_dir} $X_LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-L${lib_dir}\" to \$X_LIBS"; fi ;; - esac - case "$x_includes" in "$inc_dir"* ) ;; *) - x_includes="$inc_dir $x_includes" - X_CFLAGS="-I${inc_dir} $X_CFLAGS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-I${inc_dir}\" to \$X_CFLAGS"; fi ;; - esac - break; fi - done - - for rel in "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" - X_LIBS="$X_LIBS -L${lib_dir}" && if test "$extra_verbose" = "yes"; then echo " Appending \"-L${lib_dir}\" to \$X_LIBS"; fi - esac - case "$x_includes" in "$inc_dir"* ) ;; *) - x_includes="$x_includes $inc_dir" - X_CFLAGS="$X_CFLAGS -I${inc_dir}" && if test "$extra_verbose" = "yes"; then echo " Appending \"-I${inc_dir}\" to \$X_CFLAGS"; fi - esac - break; fi - done - - if test "$GCC" = yes -a -d /usr/shlib; then X_LIBS="$X_LIBS -L/usr/shlib" && if test "$extra_verbose" = "yes"; then echo " Appending \"-L/usr/shlib\" to \$X_LIBS"; fi; fi - - ld_switch_x_site="$X_LIBS" - - - if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then - ld_switch_site=`echo '' $ld_switch_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"` - ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"` - - runpath="" runpath_dirs="" - if test -n "$LD_RUN_PATH"; then - runpath="$LD_RUN_PATH" - elif test "$GCC" = "yes"; then - ld_switch_run_save="$ld_switch_run"; ld_switch_run="" - echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c - xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null' - for arg in `eval "$xe_runpath_link" | grep ' -L'`; do - case "$arg" in P,* | -L* | -R* ) - for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do - { - xe_runpath_dir="$dir" - test "$xe_runpath_dir" != "/lib" -a \ - "$xe_runpath_dir" != "/usr/lib" -a \ - -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \ - eval "$xe_add_unique_runpath_dir" - } - done ;; - esac - done - ld_switch_run="$ld_switch_run_save" - rm -f conftest* - else - for arg in $ld_switch_site $ld_switch_x_site; do - case "$arg" in -L*) { - xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'` - test "$xe_runpath_dir" != "/lib" -a \ - "$xe_runpath_dir" != "/usr/lib" -a \ - -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \ - eval "$xe_add_unique_runpath_dir" - };; esac - done - if test "$opsys $need_motif" = "sol2 yes"; then - xe_runpath_dir="/opt/SUNWdt/lib"; - eval "$xe_add_unique_runpath_dir"; - fi - fi - if test -n "$runpath"; then - ld_switch_run="${dash_r}${runpath}" - - if test "$GCC" = "yes"; then - set x $ld_switch_run; shift; ld_switch_run="" - while test -n "$1"; do - case $1 in - -L | -l | -u ) ld_switch_run="$ld_switch_run $1 $2"; shift ;; - -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;; - -Xlinker* ) ;; - * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;; - esac - shift - done - fi - test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath" - fi - fi - - - if test "$extra_verbose" = "yes"; then - echo; echo "X11 compilation variables:" - for var in x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS; do eval "echo \"$var = '\$$var'\""; done - echo - fi - - 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 - test ! -z "$bitmapdirs" && { test "$extra_verbose" = "yes" && cat << EOF - Defining BITMAPDIR = "$bitmapdirs" - EOF - cat >> confdefs.h <&6 - echo "configure:5352: checking for X defines extracted by xmkmf" >&5 - rm -fr conftestdir - if mkdir conftestdir; then - cd conftestdir - cat > Imakefile <<'EOF' - xetest: - @echo ${PROTO_DEFINES} ${STD_DEFINES} - EOF - if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then - # GNU make sometimes prints "make[1]: Entering...", which would confuse us. - xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make` - fi - cd .. - rm -fr conftestdir - for word in $xmkmf_defines; do - case "$word" in - -D*=* ) ;; - -D* ) word=`echo '' $word | sed -e 's:^ *-D::'` - { test "$extra_verbose" = "yes" && cat << EOF - Defining $word - EOF - cat >> confdefs.h <&6 - echo "configure:5384: checking for X11/Intrinsic.h" >&5 - - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" - { (eval echo configure:5392: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out` - if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" - else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" - fi - rm -f conftest* - if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : - else - echo "$ac_t""no" 1>&6 - { echo "configure: error: "Unable to find X11 header files."" 1>&2; exit 1; } - fi - - - - echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6 - echo "configure:5416: checking for XOpenDisplay in -lX11" >&5 - ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'` - - xe_check_libs=" -lX11 " - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" - fi - rm -f conftest* - xe_check_libs="" - - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - have_lib_x11=yes - else - echo "$ac_t""no" 1>&6 - fi - - - if test "$have_lib_x11" != "yes"; then - - xe_msg_checking="for XGetFontProperty in -lX11" - test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout" - echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6 - echo "configure:5457: checking "$xe_msg_checking"" >&5 - ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'` - - xe_check_libs=" -lX11 -b i486-linuxaout" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" - fi - rm -f conftest* - xe_check_libs="" - - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site" - else - echo "$ac_t""no" 1>&6 - { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; } - fi - - - fi - libs_x="-lX11" - test "$extra_verbose" = "yes" && echo " Setting libs_x to \"-lX11\"" - - - echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6 - echo "configure:5500: checking for XShapeSelectInput in -lXext" >&5 - ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'` - - xe_check_libs=" -lXext " - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" - fi - rm -f conftest* - xe_check_libs="" - - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - libs_x="-lXext $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lXext\" to \$libs_x"; fi - else - echo "$ac_t""no" 1>&6 - fi - - - - - echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6 - echo "configure:5539: checking for XtOpenDisplay in -lXt" >&5 - ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'` - - xe_check_libs=" -lXt " - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" - fi - rm -f conftest* - xe_check_libs="" - - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - libs_x="-lXt $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lXt\" to \$libs_x"; fi - else - echo "$ac_t""no" 1>&6 - { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; } - fi - - - - echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6 - echo "configure:5578: checking the version of X11 being used" >&5 - cat > conftest.$ac_ext < - int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; } - EOF - if { (eval echo configure:5585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 - then - ./conftest foobar; x11_release=$? - else - conftest_rc="$?" - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - x11_release=4 - fi - rm -fr conftest* - echo "$ac_t""R${x11_release}" 1>&6 - { test "$extra_verbose" = "yes" && cat << EOF - Defining THIS_IS_X11R${x11_release} - EOF - cat >> confdefs.h <&6 - echo "configure:5610: checking for $ac_hdr" >&5 - - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" - { (eval echo configure:5618: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out` - if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" - else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" - fi - rm -f conftest* - if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - { test "$extra_verbose" = "yes" && cat << EOF - Defining $ac_tr_hdr - EOF - cat >> confdefs.h <&6 - fi - done - - - echo $ac_n "checking for XFree86""... $ac_c" 1>&6 - echo "configure:5649: checking for XFree86" >&5 - if test -d "/usr/X386/include" -o \ - -f "/etc/XF86Config" -o \ - -f "/etc/X11/XF86Config" -o \ - -f "/usr/X11R6/lib/X11/XF86Config"; then - echo "$ac_t""yes" 1>&6 - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_XFREE386 - EOF - cat >> confdefs.h <<\EOF - #define HAVE_XFREE386 1 - EOF - } - - else - echo "$ac_t""no" 1>&6 - fi - - test -z "$with_xmu" && { - echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6 - echo "configure:5669: checking for XmuReadBitmapDataFromFile in -lXmu" >&5 - ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'` - - xe_check_libs=" -lXmu " - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" - fi - rm -f conftest* - xe_check_libs="" - - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - with_xmu=yes - else - echo "$ac_t""no" 1>&6 - with_xmu=no - fi - - } - if test "$with_xmu" = "no"; then - extra_objs="$extra_objs xmu.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"xmu.o\"" - fi - else - libs_x="-lXmu $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lXmu\" to \$libs_x"; fi - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_XMU - EOF - cat >> confdefs.h <<\EOF - #define HAVE_XMU 1 - EOF - } - - fi - - - echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6 - echo "configure:5724: checking for main in -lXbsd" >&5 - ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'` - - xe_check_libs=" -lXbsd " - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" - fi - rm -f conftest* - xe_check_libs="" - - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - libs_x="-lXbsd $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lXbsd\" to \$libs_x"; fi - else - echo "$ac_t""no" 1>&6 - fi - - - - if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then - if test "$GCC" = "yes"; then - X_CFLAGS="-mthreads $X_CFLAGS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-mthreads\" to \$X_CFLAGS"; fi - libs_x="-mthreads $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-mthreads\" to \$libs_x"; fi - else - case "$CC" in - "xlc" ) CC="xlc_r" ;; - "xlC" ) CC="xlC_r" ;; - "cc" ) CC="cc_r" ;; - esac - fi - fi - - fi - if test "$with_msw" != "no"; then - echo "checking for MS-Windows" 1>&6 - echo "configure:5773: checking for MS-Windows" >&5 - - echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6 - echo "configure:5776: checking for main in -lgdi32" >&5 - ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'` - - xe_check_libs=" -lgdi32 " - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" - fi - rm -f conftest* - xe_check_libs="" - - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - with_msw=yes - else - echo "$ac_t""no" 1>&6 - fi - - - if test "$with_msw" = "yes"; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_MS_WINDOWS - EOF - cat >> confdefs.h <<\EOF - #define HAVE_MS_WINDOWS 1 - EOF - } - - install_pp="$blddir/lib-src/installexe.sh" - libs_system="$libs_system -lshell32 -lgdi32 -luser32 -lcomctl32" && if test "$extra_verbose" = "yes"; then echo " Appending \"-lshell32 -lgdi32 -luser32 -lcomctl32\" to \$libs_system"; fi - test "$with_dragndrop" != no && dragndrop_proto="$dragndrop_proto msw" && if test "$extra_verbose" = "yes"; then echo " Appending \"msw\" to \$dragndrop_proto"; fi - if test "$window_system" != x11; then - window_system=msw - test "$with_scrollbars" != "no" && with_scrollbars=msw \ - && extra_objs="$extra_objs scrollbar-msw.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"scrollbar-msw.o\"" - fi - test "$with_menubars" != "no" && with_menubars=msw \ - && extra_objs="$extra_objs menubar-msw.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"menubar-msw.o\"" - fi - test "$with_toolbars" != "no" && with_toolbars=msw \ - && extra_objs="$extra_objs toolbar-msw.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"toolbar-msw.o\"" - fi - test "$with_dialogs" != "no" && with_dialogs=msw \ - && extra_objs="$extra_objs dialog-msw.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"dialog-msw.o\"" - fi - else - test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar-msw.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"scrollbar-msw.o\"" - fi - test "$with_menubars" != "no" && extra_objs="$extra_objs menubar-msw.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"menubar-msw.o\"" - fi - test "$with_toolbars" != "no" && extra_objs="$extra_objs toolbar-msw.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"toolbar-msw.o\"" - fi - test "$with_dialogs" != "no" && extra_objs="$extra_objs dialog-msw.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"dialog-msw.o\"" - fi - fi - cat > conftest.$ac_ext < - int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; } - EOF - if { (eval echo configure:5858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 - then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_MSG_SELECT - EOF - cat >> confdefs.h <<\EOF - #define HAVE_MSG_SELECT 1 - EOF - } - - else - conftest_rc="$?" - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - fi - rm -fr conftest* - const_is_losing=no - with_file_coding=yes - extra_objs="$extra_objs console-msw.o device-msw.o event-msw.o frame-msw.o objects-msw.o select-msw.o redisplay-msw.o glyphs-msw.o gui-msw.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"console-msw.o device-msw.o event-msw.o frame-msw.o objects-msw.o select-msw.o redisplay-msw.o glyphs-msw.o gui-msw.o\"" - fi - fi - fi - - - - test -z "$window_system" && window_system="none" - - 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 - echo "configure: warning: --with-$feature ignored: Not valid without window system support" 1>&2 - fi - eval "with_${feature}=no" - done - else - test -z "$with_toolbars" && with_toolbars=yes - fi - - if test "$with_msw" != "yes"; then - for feature in MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES - do - if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then - echo "configure: warning: --with-$feature ignored: Not valid without MS-Windows support" 1>&2 - fi - eval "with_${feature}=no" - done - else - : - fi - - if test "$with_x11" != "yes"; then - for feature in tooltalk cde offix session xim xmu - do - if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then - echo "configure: warning: --with-$feature ignored: Not valid without X support" 1>&2 - fi - eval "with_${feature}=no" - done - fi - - bitmapdir= - - case "$window_system" in - x11 ) HAVE_X_WINDOWS=yes; echo " Using X11." ;; - msw ) HAVE_X_WINDOWS=no ; echo " Using MS-Windows." ;; - none ) HAVE_X_WINDOWS=no ; echo " Using no window system." ;; - esac - - case "$x_libraries" in *X11R4* ) - test "$opsys" = "hpux9" && opsysfile="s/hpux9-x11r4.h" - test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h" - esac - - echo "checking for session-management option" 1>&6 - echo "configure:5934: checking for session-management option" >&5; - if test "$with_session" != "no"; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_SESSION - EOF - cat >> confdefs.h <<\EOF - #define HAVE_SESSION 1 - EOF - } - - fi - - test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no - test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6 - echo "configure:5949: checking for X11/Xauth.h" >&5 - - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" - { (eval echo configure:5957: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out` - if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" - else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" - fi - rm -f conftest* - if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : - else - echo "$ac_t""no" 1>&6 - with_xauth=no - fi - } - test -z "$with_xauth" && { - echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6 - echo "configure:5980: checking for XauGetAuthByAddr in -lXau" >&5 - ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'` - - xe_check_libs=" -lXau " - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" - fi - rm -f conftest* - xe_check_libs="" - - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - : - else - echo "$ac_t""no" 1>&6 - with_xauth=no - fi - - } - test -z "$with_xauth" && with_xauth=yes - if test "$with_xauth" = "yes"; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_XAUTH - EOF - cat >> confdefs.h <<\EOF - #define HAVE_XAUTH 1 - EOF - } - - - T="" - for W in $X_EXTRA_LIBS -lXau $libs_x $X_PRE_LIBS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done - libs_xauth="$T" - - fi - - - - - if test "$with_tooltalk" != "no" ; then - for dir in "" "Tt/" "desktop/" ; do - ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6 - echo "configure:6041: checking for ${dir}tt_c.h" >&5 - - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" - { (eval echo configure:6049: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out` - if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" - else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" - fi - rm -f conftest* - if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - tt_c_h_path="${dir}tt_c.h"; break - else - echo "$ac_t""no" 1>&6 - fi - - done - if test -z "$tt_c_h_path"; then - if test "$with_tooltalk" = "yes"; then - (echo "$progname: Usage error:" - echo " " "Unable to find required tooltalk header files." - echo " Use \`$progname --help' to show usage.") >&2 && exit 1 - fi - with_tooltalk=no - fi - fi - if test "$with_tooltalk" != "no" ; then - for extra_libs in "" "-lI18N -lce" "-lcxx"; do - - xe_msg_checking="for tt_message_create in -ltt" - test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs" - echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6 - echo "configure:6085: checking "$xe_msg_checking"" >&5 - ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'` - - xe_check_libs=" -ltt $extra_libs" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" - fi - rm -f conftest* - xe_check_libs="" - - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - tt_libs="-ltt $extra_libs"; break - else - echo "$ac_t""no" 1>&6 - : - fi - - - done - if test -z "$tt_libs"; then - if test "$with_tooltalk" = "yes"; then - (echo "$progname: Usage error:" - echo " " "Unable to find required tooltalk libraries." - echo " Use \`$progname --help' to show usage.") >&2 && exit 1 - fi - with_tooltalk=no - fi - fi - test -z "$with_tooltalk" && with_tooltalk=yes - if test "$with_tooltalk" = "yes"; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining TOOLTALK - EOF - cat >> confdefs.h <<\EOF - #define TOOLTALK 1 - EOF - } - - { test "$extra_verbose" = "yes" && cat << EOF - Defining TT_C_H_PATH = "$tt_c_h_path" - EOF - cat >> confdefs.h <&6 - echo "configure:6158: checking for Dt/Dt.h" >&5 - - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" - { (eval echo configure:6166: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out` - if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" - else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" - fi - rm -f conftest* - if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : - else - echo "$ac_t""no" 1>&6 - with_cde=no - fi - } - test -z "$with_cde" && { - echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6 - echo "configure:6189: checking for DtDndDragStart in -lDtSvc" >&5 - ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'` - - xe_check_libs=" -lDtSvc " - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" - fi - rm -f conftest* - xe_check_libs="" - - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - : - else - echo "$ac_t""no" 1>&6 - with_cde=no - fi - - } - test -z "$with_cde" && with_cde=yes - if test "$with_dragndrop" = no; then - echo "configure: warning: No CDE without generic Drag'n'Drop support" 1>&2 - with_cde=no - fi - if test "$with_cde" = "yes" ; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_CDE - EOF - cat >> confdefs.h <<\EOF - #define HAVE_CDE 1 - EOF - } - - libs_x="-lDtSvc $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lDtSvc\" to \$libs_x"; fi - dragndrop_proto="$dragndrop_proto CDE" && if test "$extra_verbose" = "yes"; then echo " Appending \"CDE\" to \$dragndrop_proto"; fi - with_tooltalk=yes # CDE requires Tooltalk - need_motif=yes # CDE requires Motif - fi - - test "$window_system" != "x11" && with_offix=no - if test "$with_xmu" != yes -a "$with_x11" = yes; then - echo "configure: warning: No OffiX without real Xmu support" 1>&2 - with_offix=no - fi - if test "$with_dragndrop" = no; then - echo "configure: warning: No OffiX without generic Drag'n'Drop support" 1>&2 - with_offix=no - fi - if test "$with_cde" = yes; then - echo "configure: warning: CDE already found, disabling OffiX support" 1>&2 - with_offix=no - fi - test -z "$with_offix" && with_offix=no - if test "$with_offix" = "yes"; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_OFFIX_DND - EOF - cat >> confdefs.h <<\EOF - #define HAVE_OFFIX_DND 1 - EOF - } - - dnd_objs="$dnd_objs offix.o" && if test "$extra_verbose" = "yes"; then echo " Appending \"offix.o\" to \$dnd_objs"; fi - dragndrop_proto="$dragndrop_proto OffiX" && if test "$extra_verbose" = "yes"; then echo " Appending \"OffiX\" to \$dragndrop_proto"; fi - fi - - echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6 - echo "configure:6274: checking if drag and drop API is needed" >&5 - if test "$with_dragndrop" != "no" ; then - if test -n "$dragndrop_proto" ; then - with_dragndrop=yes - echo "$ac_t""yes (${dragndrop_proto} )" 1>&6 - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_DRAGNDROP - EOF - cat >> confdefs.h <<\EOF - #define HAVE_DRAGNDROP 1 - EOF - } - - extra_objs="$extra_objs dragdrop.o" && if test "$extra_verbose" = "yes"; then echo " Appending \"dragdrop.o\" to \$extra_objs"; fi - else - with_dragndrop=no - echo "$ac_t""no" 1>&6 - fi - fi - - echo "checking for LDAP" 1>&6 - echo "configure:6295: checking for LDAP" >&5 - test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for ldap.h""... $ac_c" 1>&6 - echo "configure:6298: checking for ldap.h" >&5 - - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" - { (eval echo configure:6306: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out` - if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" - else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" - fi - rm -f conftest* - if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : - else - echo "$ac_t""no" 1>&6 - with_ldap=no - fi - } - test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for lber.h""... $ac_c" 1>&6 - echo "configure:6329: checking for lber.h" >&5 - - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" - { (eval echo configure:6337: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out` - if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" - else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" - fi - rm -f conftest* - if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : - else - echo "$ac_t""no" 1>&6 - with_ldap=no - fi - } - if test "$with_ldap" != "no"; then - test -z "$with_umich_ldap" && { - xe_msg_checking="for ldap_open in -lldap" - test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber" - echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6 - echo "configure:6363: checking "$xe_msg_checking"" >&5 - ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'` - - xe_check_libs=" -lldap -llber" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" - fi - rm -f conftest* - xe_check_libs="" - - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - with_umich_ldap=yes - else - echo "$ac_t""no" 1>&6 - with_umich_ldap=no - fi - - } - test "$with_umich_ldap" = "no" && { - echo $ac_n "checking for ldap_set_option in -lldap10""... $ac_c" 1>&6 - echo "configure:6402: checking for ldap_set_option in -lldap10" >&5 - ac_lib_var=`echo ldap10'_'ldap_set_option | sed 'y%./+-%__p_%'` - - xe_check_libs=" -lldap10 " - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" - fi - rm -f conftest* - xe_check_libs="" - - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - with_ns_ldap=yes - else - echo "$ac_t""no" 1>&6 - with_ns_ldap=no - fi - - } - test -z "$with_ldap" -a \( "$with_umich_ldap" = "yes" -o "$with_ns_ldap" = "yes" \) && with_ldap=yes - fi - if test "$with_ldap" = "yes"; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_LDAP - EOF - cat >> confdefs.h <<\EOF - #define HAVE_LDAP 1 - EOF - } - - extra_objs="$extra_objs eldap.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"eldap.o\"" - fi - if test "$with_umich_ldap" = "yes" ; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_UMICH_LDAP - EOF - cat >> confdefs.h <<\EOF - #define HAVE_UMICH_LDAP 1 - EOF - } - - LIBS="-llber $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-llber\" to \$LIBS"; fi - LIBS="-lldap $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lldap\" to \$LIBS"; fi - elif test "$with_ldap" = "yes" -a "$with_ns_ldap" = "yes" ; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_NS_LDAP - EOF - cat >> confdefs.h <<\EOF - #define HAVE_NS_LDAP 1 - EOF - } - - LIBS="-lldap10 $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lldap10\" to \$LIBS"; fi - elif test "$with_ldap" = "yes" ; then - LIBS="-lldap $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lldap\" to \$LIBS"; fi - fi - fi - - - if test "$window_system" != "none"; then - echo "checking for graphics libraries" 1>&6 - echo "configure:6482: checking for graphics libraries" >&5 - - xpm_problem="" - if test -z "$with_xpm"; then - echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6 - echo "configure:6487: checking for Xpm - no older than 3.4f" >&5 - xe_check_libs=-lXpm - cat > conftest.$ac_ext < - int main(int c, char **v) { - return c == 1 ? 0 : - XpmIncludeVersion != XpmLibraryVersion() ? 1 : - XpmIncludeVersion < 30406 ? 2 : 0 ;} - EOF - if { (eval echo configure:6498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 - then - ./conftest dummy_arg; xpm_status=$?; - if test "$xpm_status" = "0"; then - with_xpm=yes; - else - with_xpm=no; - if test "$xpm_status" = "1"; then - xpm_problem="Xpm library version and header file version don't match!" - elif test "$xpm_status" = "2"; then - xpm_problem="Xpm library version is too old!" - else - xpm_problem="Internal xpm detection logic error!" - fi - echo " - *** WARNING *** $xpm_problem - I'm not touching that with a 10-foot pole! - If you really want to use the installed version of Xpm, rerun - configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!" - fi - else - conftest_rc="$?" - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - with_xpm=no - fi - rm -fr conftest* - xe_check_libs= - echo "$ac_t""$with_xpm" 1>&6 - fi - if test "$with_xpm" = "yes"; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_XPM - EOF - cat >> confdefs.h <<\EOF - #define HAVE_XPM 1 - EOF - } - - libs_x="-lXpm $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lXpm\" to \$libs_x"; fi - echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6 - echo "configure:6540: checking for \"FOR_MSW\" xpm" >&5 - xe_check_libs=-lXpm - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - xpm_for_msw=no - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - xpm_for_msw=yes - fi - rm -f conftest* - xe_check_libs= - echo "$ac_t""$xpm_for_msw" 1>&6 - if test "$xpm_for_msw" = "yes"; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining FOR_MSW - EOF - cat >> confdefs.h <<\EOF - #define FOR_MSW 1 - EOF - } - - fi - fi - - test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for compface.h""... $ac_c" 1>&6 - echo "configure:6576: checking for compface.h" >&5 - - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" - { (eval echo configure:6584: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out` - if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" - else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" - fi - rm -f conftest* - if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : - else - echo "$ac_t""no" 1>&6 - with_xface=no - fi - } - test -z "$with_xface" && { - echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6 - echo "configure:6607: checking for UnGenFace in -lcompface" >&5 - ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'` - - xe_check_libs=" -lcompface " - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" - fi - rm -f conftest* - xe_check_libs="" - - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - : - else - echo "$ac_t""no" 1>&6 - with_xface=no - fi - - } - test -z "$with_xface" && with_xface=yes - if test "$with_xface" = "yes"; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_XFACE - EOF - cat >> confdefs.h <<\EOF - #define HAVE_XFACE 1 - EOF - } - - libs_x="-lcompface $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lcompface\" to \$libs_x"; fi - fi - - if test "$with_gif" != "no"; then - with_gif="yes" - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_GIF - EOF - cat >> confdefs.h <<\EOF - #define HAVE_GIF 1 - EOF - } - - extra_objs="$extra_objs dgif_lib.o gif_io.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"dgif_lib.o gif_io.o\"" - fi - fi - - if test "$with_png $with_tiff" != "no no"; then - - echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6 - echo "configure:6675: checking for inflate in -lc" >&5 - ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'` - - xe_check_libs=" -lc " - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" - fi - rm -f conftest* - xe_check_libs="" - - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - : - else - echo "$ac_t""no" 1>&6 - - echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6 - echo "configure:6710: checking for inflate in -lz" >&5 - ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'` - - xe_check_libs=" -lz " - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" - fi - rm -f conftest* - xe_check_libs="" - - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - libs_x="-lz $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lz\" to \$libs_x"; fi - else - echo "$ac_t""no" 1>&6 - - echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6 - echo "configure:6745: checking for inflate in -lgz" >&5 - ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'` - - xe_check_libs=" -lgz " - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" - fi - rm -f conftest* - xe_check_libs="" - - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - libs_x="-lgz $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lgz\" to \$libs_x"; fi - else - echo "$ac_t""no" 1>&6 - fi - - - fi - - - fi - - - fi - - test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6 - echo "configure:6791: checking for jpeglib.h" >&5 - - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" - { (eval echo configure:6799: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out` - if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" - else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" - fi - rm -f conftest* - if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : - else - echo "$ac_t""no" 1>&6 - with_jpeg=no - fi - } - test -z "$with_jpeg" && { - echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6 - echo "configure:6822: checking for jpeg_destroy_decompress in -ljpeg" >&5 - ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'` - - xe_check_libs=" -ljpeg " - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" - fi - rm -f conftest* - xe_check_libs="" - - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - : - else - echo "$ac_t""no" 1>&6 - with_jpeg=no - fi - - } - test -z "$with_jpeg" && with_jpeg=yes - if test "$with_jpeg" = "yes"; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_JPEG - EOF - cat >> confdefs.h <<\EOF - #define HAVE_JPEG 1 - EOF - } - - libs_x="-ljpeg $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-ljpeg\" to \$libs_x"; fi - fi - - png_problem="" - test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6 - echo "configure:6874: checking for pow" >&5 - - cat > conftest.$ac_ext < - /* Override any gcc2 internal prototype to avoid an error. */ - /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ - char pow(); - - int main() { - - /* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ - #if defined (__stub_pow) || defined (__stub___pow) - choke me - #else - pow(); - #endif - - ; return 0; } - EOF - if { (eval echo configure:6900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_func_pow=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_pow=no" - fi - rm -f conftest* - - if eval "test \"`echo '$ac_cv_func_'pow`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : - else - echo "$ac_t""no" 1>&6 - with_png=no - fi - } - test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for png.h""... $ac_c" 1>&6 - echo "configure:6921: checking for png.h" >&5 - - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" - { (eval echo configure:6929: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out` - if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" - else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" - fi - rm -f conftest* - if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : - else - echo "$ac_t""no" 1>&6 - with_png=no - fi - } - test -z "$with_png" && { - echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6 - echo "configure:6952: checking for png_read_image in -lpng" >&5 - ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'` - - xe_check_libs=" -lpng " - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" - fi - rm -f conftest* - xe_check_libs="" - - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - : - else - echo "$ac_t""no" 1>&6 - with_png=no - fi - - } - if test -z "$with_png"; then - echo $ac_n "checking for workable png version information""... $ac_c" 1>&6 - echo "configure:6991: checking for workable png version information" >&5 - xe_check_libs="-lpng -lz" - cat > conftest.$ac_ext < - int main(int c, char **v) { - if (c == 1) return 0; - if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1; - return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;} - EOF - if { (eval echo configure:7002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 - then - ./conftest dummy_arg; png_status=$?; - if test "$png_status" = "0"; then - with_png=yes; - else - with_png=no; - if test "$png_status" = "1"; then - png_problem="PNG library version and header file don't match!" - elif test "$png_status" = "2"; then - png_problem="PNG library version too old (pre 1.0.2)!" - fi - echo " - *** WARNING *** $png_problem - I'm not touching that with a 10-foot pole! - If you really want to use the installed version of libPNG, rerun - configure and add '--with-png=yes', but don't blame me if XEmacs crashes!" - fi - else - conftest_rc="$?" - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - with_png=no - fi - rm -fr conftest* - xe_check_libs= - echo "$ac_t""$with_png" 1>&6 - fi - if test "$with_png" = "yes"; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_PNG - EOF - cat >> confdefs.h <<\EOF - #define HAVE_PNG 1 - EOF - } - - libs_x="-lpng $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lpng\" to \$libs_x"; fi - fi - - test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6 - echo "configure:7045: checking for tiffio.h" >&5 - - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" - { (eval echo configure:7053: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out` - if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" - else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" - fi - rm -f conftest* - if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : - else - echo "$ac_t""no" 1>&6 - with_tiff=no - fi - } - test -z "$with_tiff" && { - echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6 - echo "configure:7076: checking for TIFFClientOpen in -ltiff" >&5 - ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'` - - xe_check_libs=" -ltiff " - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" - fi - rm -f conftest* - xe_check_libs="" - - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - : - else - echo "$ac_t""no" 1>&6 - with_tiff=no - fi - - } - test -z "$with_tiff" && with_tiff=yes - if test "$with_tiff" = "yes"; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_TIFF - EOF - cat >> confdefs.h <<\EOF - #define HAVE_TIFF 1 - EOF - } - - libs_x="-ltiff $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-ltiff\" to \$libs_x"; fi - fi - fi - - - if test "$with_x11" = "yes"; then - - echo "checking for X11 graphics libraries" 1>&6 - echo "configure:7131: checking for X11 graphics libraries" >&5 - - - echo $ac_n "checking for XawScrollbarSetThumb in -lXaw""... $ac_c" 1>&6 - echo "configure:7135: checking for XawScrollbarSetThumb in -lXaw" >&5 - ac_lib_var=`echo Xaw'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'` - - xe_check_libs=" -lXaw " - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" - fi - rm -f conftest* - xe_check_libs="" - - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - have_xaw=yes - else - echo "$ac_t""no" 1>&6 - have_xaw=no - fi - - - - ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6 - echo "configure:7175: checking for Xm/Xm.h" >&5 - - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" - { (eval echo configure:7183: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out` - if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" - else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" - fi - rm -f conftest* - if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - - echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6 - echo "configure:7200: checking for XmStringFree in -lXm" >&5 - ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'` - - xe_check_libs=" -lXm " - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" - fi - rm -f conftest* - xe_check_libs="" - - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - have_motif=yes - else - echo "$ac_t""no" 1>&6 - have_motif=no - fi - - - else - echo "$ac_t""no" 1>&6 - have_motif=no - fi - - - if test "$have_motif" = "yes"; then - echo $ac_n "checking for Lesstif""... $ac_c" 1>&6 - echo "configure:7245: checking for Lesstif" >&5 - cat > conftest.$ac_ext < - #ifdef LESSTIF_VERSION - yes - #endif - - EOF - if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "yes" >/dev/null 2>&1; then - rm -rf conftest* - have_lesstif=yes - else - rm -rf conftest* - have_lesstif=no - fi - rm -f conftest* - - echo "$ac_t""$have_lesstif" 1>&6 - fi - - fi - - case "$with_menubars" in "" | "yes" | "athena" | "athena3d" ) - with_menubars="lucid" ;; - esac - case "$with_dialogs" in "" | "yes" | "lucid" ) - if test "$have_motif" = "yes"; then with_dialogs="motif" - elif test "$have_xaw" = "yes"; then with_dialogs="athena" - else with_dialogs=no - fi ;; - esac - case "$with_scrollbars" in "" | "yes" ) - with_scrollbars="lucid" ;; - esac - - all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars" - - case "$all_widgets" in *athena* ) - { test "$extra_verbose" = "yes" && cat << \EOF - Defining LWLIB_USES_ATHENA - EOF - cat >> confdefs.h <<\EOF - #define LWLIB_USES_ATHENA 1 - EOF - } - - { test "$extra_verbose" = "yes" && cat << \EOF - Defining NEED_ATHENA - EOF - cat >> confdefs.h <<\EOF - #define NEED_ATHENA 1 - EOF - } - - lwlib_objs="$lwlib_objs lwlib-Xaw.o" && if test "$extra_verbose" = "yes"; then echo " Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi - libs_x="-lXaw $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lXaw\" to \$libs_x"; fi ;; - esac - - case "$all_widgets" in *motif* ) - { test "$extra_verbose" = "yes" && cat << \EOF - Defining LWLIB_USES_MOTIF - EOF - cat >> confdefs.h <<\EOF - #define LWLIB_USES_MOTIF 1 - EOF - } - - { test "$extra_verbose" = "yes" && cat << \EOF - Defining NEED_MOTIF - EOF - cat >> confdefs.h <<\EOF - #define NEED_MOTIF 1 - EOF - } - - lwlib_objs="$lwlib_objs lwlib-Xm.o" && if test "$extra_verbose" = "yes"; then echo " Appending \"lwlib-Xm.o\" to \$lwlib_objs"; fi - need_motif=yes ;; - esac - - test "$with_menubars" = "lucid" && lwlib_objs="$lwlib_objs xlwmenu.o" && if test "$extra_verbose" = "yes"; then echo " Appending \"xlwmenu.o\" to \$lwlib_objs"; fi - test "$with_menubars" = "motif" && lwlib_objs="$lwlib_objs xlwmenu.o" && if test "$extra_verbose" = "yes"; then echo " Appending \"xlwmenu.o\" to \$lwlib_objs"; fi - test "$with_scrollbars" = "lucid" && lwlib_objs="$lwlib_objs xlwscrollbar.o" && if test "$extra_verbose" = "yes"; then echo " Appending \"xlwscrollbar.o\" to \$lwlib_objs"; fi - case "$all_widgets" in *lucid* ) - { test "$extra_verbose" = "yes" && cat << \EOF - Defining NEED_LUCID - EOF - cat >> confdefs.h <<\EOF - #define NEED_LUCID 1 - EOF - } - - lwlib_objs="$lwlib_objs lwlib-Xlw.o" && if test "$extra_verbose" = "yes"; then echo " Appending \"lwlib-Xlw.o\" to \$lwlib_objs"; fi ;; - esac - - - - case "$with_scrollbars" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF - Defining LWLIB_SCROLLBARS_ATHENA - EOF - cat >> confdefs.h <<\EOF - #define LWLIB_SCROLLBARS_ATHENA 1 - EOF - } - ;; esac - case "$with_dialogs" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF - Defining LWLIB_DIALOGS_ATHENA - EOF - cat >> confdefs.h <<\EOF - #define LWLIB_DIALOGS_ATHENA 1 - EOF - } - ;; esac - test "$with_scrollbars" = "athena3d" && { test "$extra_verbose" = "yes" && cat << \EOF - Defining LWLIB_SCROLLBARS_ATHENA3D - EOF - cat >> confdefs.h <<\EOF - #define LWLIB_SCROLLBARS_ATHENA3D 1 - EOF - } - - test "$with_dialogs" = "athena3d" && { test "$extra_verbose" = "yes" && cat << \EOF - Defining LWLIB_DIALOGS_ATHENA3D - EOF - cat >> confdefs.h <<\EOF - #define LWLIB_DIALOGS_ATHENA3D 1 - EOF - } - - - test "$with_menubars" != "no" && { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_MENUBARS - EOF - cat >> confdefs.h <<\EOF - #define HAVE_MENUBARS 1 - EOF - } - - test "$with_scrollbars" != "no" && { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_SCROLLBARS - EOF - cat >> confdefs.h <<\EOF - #define HAVE_SCROLLBARS 1 - EOF - } - - test "$with_dialogs" != "no" && { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_DIALOGS - EOF - cat >> confdefs.h <<\EOF - #define HAVE_DIALOGS 1 - EOF - } - - test "$with_toolbars" != "no" && { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_TOOLBARS - EOF - cat >> confdefs.h <<\EOF - #define HAVE_TOOLBARS 1 - EOF - } - - - test "$with_menubars" = "lucid" && { test "$extra_verbose" = "yes" && cat << \EOF - Defining LWLIB_MENUBARS_LUCID - EOF - cat >> confdefs.h <<\EOF - #define LWLIB_MENUBARS_LUCID 1 - EOF - } - - test "$with_scrollbars" = "lucid" && { test "$extra_verbose" = "yes" && cat << \EOF - Defining LWLIB_SCROLLBARS_LUCID - EOF - cat >> confdefs.h <<\EOF - #define LWLIB_SCROLLBARS_LUCID 1 - EOF - } - - - test "$with_menubars" = "motif" && { test "$extra_verbose" = "yes" && cat << \EOF - Defining LWLIB_MENUBARS_MOTIF - EOF - cat >> confdefs.h <<\EOF - #define LWLIB_MENUBARS_MOTIF 1 - EOF - } - - test "$with_scrollbars" = "motif" && { test "$extra_verbose" = "yes" && cat << \EOF - Defining LWLIB_SCROLLBARS_MOTIF - EOF - cat >> confdefs.h <<\EOF - #define LWLIB_SCROLLBARS_MOTIF 1 - EOF - } - - test "$with_dialogs" = "motif" && { test "$extra_verbose" = "yes" && cat << \EOF - Defining LWLIB_DIALOGS_MOTIF - EOF - cat >> confdefs.h <<\EOF - #define LWLIB_DIALOGS_MOTIF 1 - EOF - } - - - test "$with_menubars" != "no" && extra_objs="$extra_objs menubar.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"menubar.o\"" - fi - test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"scrollbar.o\"" - fi - test "$with_dialogs" != "no" && extra_objs="$extra_objs dialog.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"dialog.o\"" - fi - test "$with_toolbars" != "no" && extra_objs="$extra_objs toolbar.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"toolbar.o\"" - fi - - if test "$with_x11" = "yes"; then - test "$with_menubars" != "no" && extra_objs="$extra_objs menubar-x.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"menubar-x.o\"" - fi - test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar-x.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"scrollbar-x.o\"" - fi - test "$with_dialogs" != "no" && extra_objs="$extra_objs dialog-x.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"dialog-x.o\"" - fi - test "$with_toolbars" != "no" && extra_objs="$extra_objs toolbar-x.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"toolbar-x.o\"" - fi - test "$all_widgets" != "no no no no" && extra_objs="$extra_objs gui-x.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"gui-x.o\"" - fi - else - if test \( "$with_sound" = "nas" \) -o \( "$with_sound" = "both" \); then - echo "Attempt to Build NAS sound without X" - echo "Please remove NAS configuration or build with X" - exit 1 - fi - fi - - - test -z "$with_mule" && with_mule=no - test -z "$with_file_coding" && with_file_coding=no - - - if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining FILE_CODING - EOF - cat >> confdefs.h <<\EOF - #define FILE_CODING 1 - EOF - } - - extra_objs="$extra_objs file-coding.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"file-coding.o\"" - fi - fi - - if test "$with_mule" = "yes" ; then - echo "checking for Mule-related features" 1>&6 - echo "configure:7510: checking for Mule-related features" >&5 - { test "$extra_verbose" = "yes" && cat << \EOF - Defining MULE - EOF - cat >> confdefs.h <<\EOF - #define MULE 1 - EOF - } - - { test "$extra_verbose" = "yes" && cat << \EOF - Defining FILE_CODING - EOF - cat >> confdefs.h <<\EOF - #define FILE_CODING 1 - EOF - } - - extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o file-coding.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"mule.o mule-ccl.o mule-charset.o file-coding.o\"" - fi - - for ac_hdr in libintl.h - do - ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 - echo "configure:7535: checking for $ac_hdr" >&5 - - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" - { (eval echo configure:7543: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out` - if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" - else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" - fi - rm -f conftest* - if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - { test "$extra_verbose" = "yes" && cat << EOF - Defining $ac_tr_hdr - EOF - cat >> confdefs.h <&6 - fi - done - - - echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6 - echo "configure:7574: checking for strerror in -lintl" >&5 - ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'` - - xe_check_libs=" -lintl " - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" - fi - rm -f conftest* - xe_check_libs="" - - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - { test "$extra_verbose" = "yes" && cat << EOF - Defining $ac_tr_lib - EOF - cat >> confdefs.h <&6 - fi - - - - echo "checking for Mule input methods" 1>&6 - echo "configure:7623: checking for Mule input methods" >&5 - case "$with_xim" in "" | "yes" ) - echo "checking for XIM" 1>&6 - echo "configure:7626: checking for XIM" >&5 - - echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6 - echo "configure:7629: checking for XOpenIM in -lX11" >&5 - ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'` - - xe_check_libs=" -lX11 " - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" - fi - rm -f conftest* - xe_check_libs="" - - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - with_xim=xlib - else - echo "$ac_t""no" 1>&6 - with_xim=no - fi - - - if test "$have_motif $have_lesstif" = "yes no"; then - - echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6 - echo "configure:7669: checking for XmImMbLookupString in -lXm" >&5 - ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'` - - xe_check_libs=" -lXm " - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" - fi - rm -f conftest* - xe_check_libs="" - - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - with_xim=motif - else - echo "$ac_t""no" 1>&6 - fi - - - fi ;; - esac - if test "$with_xim" != "no"; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_XIM - EOF - cat >> confdefs.h <<\EOF - #define HAVE_XIM 1 - EOF - } - - if test "$with_xim" = "xlib"; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining XIM_XLIB - EOF - cat >> confdefs.h <<\EOF - #define XIM_XLIB 1 - EOF - } - - extra_objs="$extra_objs input-method-xlib.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"input-method-xlib.o\"" - fi - fi - if test "$with_xim" = "motif"; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining XIM_MOTIF - EOF - cat >> confdefs.h <<\EOF - #define XIM_MOTIF 1 - EOF - } - - need_motif=yes - extra_objs="$extra_objs input-method-motif.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"input-method-motif.o\"" - fi - fi - if test "$with_xim" = "motif"; then - with_xfs=no - fi - fi - - if test "$with_xfs" = "yes" ; then - echo "checking for XFontSet" 1>&6 - echo "configure:7750: checking for XFontSet" >&5 - - echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6 - echo "configure:7753: checking for XmbDrawString in -lX11" >&5 - ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'` - - xe_check_libs=" -lX11 " - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" - fi - rm -f conftest* - xe_check_libs="" - - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - : - else - echo "$ac_t""no" 1>&6 - with_xfs=no - fi - - - if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining USE_XFONTSET - EOF - cat >> confdefs.h <<\EOF - #define USE_XFONTSET 1 - EOF - } - - if test "$with_xim" = "no" ; then - extra_objs="$extra_objs input-method-xfs.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"input-method-xfs.o\"" - fi - fi - fi - fi - test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support - test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6 - echo "configure:7809: checking for wnn/jllib.h" >&5 - - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" - { (eval echo configure:7817: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out` - if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" - else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" - fi - rm -f conftest* - if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : - else - echo "$ac_t""no" 1>&6 - with_wnn=no - fi - } - if test "$with_wnn" != "no"; then - for ac_func in crypt - do - echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 - echo "configure:7842: checking for $ac_func" >&5 - - cat > conftest.$ac_ext < - /* Override any gcc2 internal prototype to avoid an error. */ - /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ - char $ac_func(); - - int main() { - - /* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ - #if defined (__stub_$ac_func) || defined (__stub___$ac_func) - choke me - #else - $ac_func(); - #endif - - ; return 0; } - EOF - if { (eval echo configure:7868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" - fi - rm -f conftest* - - if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - { test "$extra_verbose" = "yes" && cat << EOF - Defining $ac_tr_func - EOF - cat >> confdefs.h <&6 - fi - done - - test "$ac_cv_func_crypt" != "yes" && { - echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 - echo "configure:7897: checking for crypt in -lcrypt" >&5 - ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` - - xe_check_libs=" -lcrypt " - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" - fi - rm -f conftest* - xe_check_libs="" - - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - { test "$extra_verbose" = "yes" && cat << EOF - Defining $ac_tr_lib - EOF - cat >> confdefs.h <&6 - fi - - } - fi - if test -z "$with_wnn" -o "$with_wnn" = "yes"; then - - echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6 - echo "configure:7948: checking for jl_dic_list_e in -lwnn" >&5 - ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'` - - xe_check_libs=" -lwnn " - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" - fi - rm -f conftest* - xe_check_libs="" - - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - libwnn=wnn - else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6 - echo "configure:7982: checking for jl_dic_list_e in -lwnn4" >&5 - ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'` - - xe_check_libs=" -lwnn4 " - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" - fi - rm -f conftest* - xe_check_libs="" - - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - libwnn=wnn4 - else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6 - echo "configure:8016: checking for jl_dic_list_e in -lwnn6" >&5 - ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'` - - xe_check_libs=" -lwnn6 " - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" - fi - rm -f conftest* - xe_check_libs="" - - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - libwnn=wnn6 - else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6 - echo "configure:8050: checking for dic_list_e in -lwnn6_fromsrc" >&5 - ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'` - - xe_check_libs=" -lwnn6_fromsrc " - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" - fi - rm -f conftest* - xe_check_libs="" - - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - libwnn=wnn6_fromsrc - else - echo "$ac_t""no" 1>&6 - with_wnn=no - fi - - - fi - - - fi - - - fi - - - fi - test -z "$with_wnn" && with_wnn=yes - if test "$with_wnn" = "yes"; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_WNN - EOF - cat >> confdefs.h <<\EOF - #define HAVE_WNN 1 - EOF - } - - libs_x="-l$libwnn $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-l$libwnn\" to \$libs_x"; fi - extra_objs="$extra_objs mule-wnnfns.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"mule-wnnfns.o\"" - fi - if test "$with_wnn6" != "no"; then - - echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6 - echo "configure:8114: checking for jl_fi_dic_list in -l$libwnn" >&5 - ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'` - - xe_check_libs=" -l$libwnn " - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" - fi - rm -f conftest* - xe_check_libs="" - - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - with_wnn6=yes - else - echo "$ac_t""no" 1>&6 - fi - - - test "$with_wnn6" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF - Defining WNN6 - EOF - cat >> confdefs.h <<\EOF - #define WNN6 1 - EOF - } - - fi - fi - - canna_includes_found=no - if test "$with_canna" != "no"; then - ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6 - echo "configure:8165: checking for canna/jrkanji.h" >&5 - - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" - { (eval echo configure:8173: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out` - if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" - else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" - fi - rm -f conftest* - if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - canna_includes_found=yes - else - echo "$ac_t""no" 1>&6 - fi - - fi - if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \ - -d "/usr/local/canna/include"; then - save_c_switch_site="$c_switch_site" - c_switch_site="$c_switch_site -I/usr/local/canna/include" - ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6 - echo "configure:8200: checking for canna/jrkanji.h" >&5 - - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" - { (eval echo configure:8208: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out` - if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" - else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" - fi - rm -f conftest* - if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - canna_includes_found=yes - else - echo "$ac_t""no" 1>&6 - fi - - if test "$canna_includes_found" != "yes"; then - c_switch_site="$save_c_switch_site" - with_canna="no" - fi - fi - - test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6 - echo "configure:8236: checking for canna/RK.h" >&5 - - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" - { (eval echo configure:8244: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out` - if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" - else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" - fi - rm -f conftest* - if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : - else - echo "$ac_t""no" 1>&6 - with_canna=no - fi - } - test -z "$with_canna" && { - echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6 - echo "configure:8267: checking for RkBgnBun in -lRKC" >&5 - ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'` - - xe_check_libs=" -lRKC " - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" - fi - rm -f conftest* - xe_check_libs="" - - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - : - else - echo "$ac_t""no" 1>&6 - with_canna=no - fi - - } - test -z "$with_canna" && { - echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6 - echo "configure:8306: checking for jrKanjiControl in -lcanna" >&5 - ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'` - - xe_check_libs=" -lcanna " - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" - fi - rm -f conftest* - xe_check_libs="" - - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - : - else - echo "$ac_t""no" 1>&6 - with_canna=no - fi - - } - test -z "$with_canna" && with_canna=yes - if test "$with_canna" = "yes"; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_CANNA - EOF - cat >> confdefs.h <<\EOF - #define HAVE_CANNA 1 - EOF - } - - libs_x="-lcanna -lRKC $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lcanna -lRKC\" to \$libs_x"; fi - extra_objs="$extra_objs mule-canna.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"mule-canna.o\"" - fi - fi - - else for feature in xim canna wnn; do - if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then - echo "configure: warning: "--with-${feature} ignored: Not valid without Mule support"" 1>&2 - fi - eval "with_${feature}=no" - done - fi - - if test "$need_motif" = "yes" ; then - libs_x="-lXm $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lXm\" to \$libs_x"; fi - - echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6 - echo "configure:8371: checking for layout_object_getvalue in -li18n" >&5 - ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'` - - xe_check_libs=" -li18n " - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" - fi - rm -f conftest* - xe_check_libs="" - - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - libs_x="-li18n $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-li18n\" to \$libs_x"; fi - else - echo "$ac_t""no" 1>&6 - fi - - - - if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then - ld_switch_site=`echo '' $ld_switch_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"` - ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"` - - runpath="" runpath_dirs="" - if test -n "$LD_RUN_PATH"; then - runpath="$LD_RUN_PATH" - elif test "$GCC" = "yes"; then - ld_switch_run_save="$ld_switch_run"; ld_switch_run="" - echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c - xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null' - for arg in `eval "$xe_runpath_link" | grep ' -L'`; do - case "$arg" in P,* | -L* | -R* ) - for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do - { - xe_runpath_dir="$dir" - test "$xe_runpath_dir" != "/lib" -a \ - "$xe_runpath_dir" != "/usr/lib" -a \ - -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \ - eval "$xe_add_unique_runpath_dir" - } - done ;; - esac - done - ld_switch_run="$ld_switch_run_save" - rm -f conftest* - else - for arg in $ld_switch_site $ld_switch_x_site; do - case "$arg" in -L*) { - xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'` - test "$xe_runpath_dir" != "/lib" -a \ - "$xe_runpath_dir" != "/usr/lib" -a \ - -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \ - eval "$xe_add_unique_runpath_dir" - };; esac - done - if test "$opsys $need_motif" = "sol2 yes"; then - xe_runpath_dir="/opt/SUNWdt/lib"; - eval "$xe_add_unique_runpath_dir"; - fi - fi - if test -n "$runpath"; then - ld_switch_run="${dash_r}${runpath}" - - if test "$GCC" = "yes"; then - set x $ld_switch_run; shift; ld_switch_run="" - while test -n "$1"; do - case $1 in - -L | -l | -u ) ld_switch_run="$ld_switch_run $1 $2"; shift ;; - -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;; - -Xlinker* ) ;; - * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;; - esac - shift - done - fi - test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath" - fi - fi - - fi - - for ac_func in cbrt closedir dup2 eaccess fmod fpathconf frexp ftime gethostname getpagesize gettimeofday getcwd getwd logb lrand48 matherr mkdir mktime perror poll random rename res_init rint rmdir select setitimer setpgid setlocale setsid sigblock sighold sigprocmask snprintf strcasecmp strerror tzset ulimit usleep utimes waitpid vsnprintf - do - echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 - echo "configure:8473: checking for $ac_func" >&5 - - cat > conftest.$ac_ext < - /* Override any gcc2 internal prototype to avoid an error. */ - /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ - char $ac_func(); - - int main() { - - /* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ - #if defined (__stub_$ac_func) || defined (__stub___$ac_func) - choke me - #else - $ac_func(); - #endif - - ; return 0; } - EOF - if { (eval echo configure:8499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" - fi - rm -f conftest* - - if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - { test "$extra_verbose" = "yes" && cat << EOF - Defining $ac_tr_func - EOF - cat >> confdefs.h <&6 - fi - done - - - - case "$opsys" in - linuxaout* | bsdos3* | freebsd* | decosf4-0* | aix4* ) extra_objs="$extra_objs realpath.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"realpath.o\"" - fi ;; - * ) - case "$canonical" in - *-*-sysv4.2uw2* ) extra_objs="$extra_objs realpath.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"realpath.o\"" - fi ;; - * ) for ac_func in realpath - do - echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 - echo "configure:8540: checking for $ac_func" >&5 - - cat > conftest.$ac_ext < - /* Override any gcc2 internal prototype to avoid an error. */ - /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ - char $ac_func(); - - int main() { - - /* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ - #if defined (__stub_$ac_func) || defined (__stub___$ac_func) - choke me - #else - $ac_func(); - #endif - - ; return 0; } - EOF - if { (eval echo configure:8566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" - fi - rm -f conftest* - - if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - { test "$extra_verbose" = "yes" && cat << EOF - Defining $ac_tr_func - EOF - cat >> confdefs.h <&6 - fi - done - - test "$ac_cv_func_realpath" != "yes" && extra_objs="$extra_objs realpath.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"realpath.o\"" - fi ;; - esac ;; - esac - - for ac_func in getloadavg - do - echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 - echo "configure:8602: checking for $ac_func" >&5 - - cat > conftest.$ac_ext < - /* Override any gcc2 internal prototype to avoid an error. */ - /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ - char $ac_func(); - - int main() { - - /* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ - #if defined (__stub_$ac_func) || defined (__stub___$ac_func) - choke me - #else - $ac_func(); - #endif - - ; return 0; } - EOF - if { (eval echo configure:8628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" - fi - rm -f conftest* - - if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - { test "$extra_verbose" = "yes" && cat << EOF - Defining $ac_tr_func - EOF - cat >> confdefs.h <&6 - fi - done - - - if test "$ac_cv_func_getloadavg" != "yes" - then - extra_objs="$extra_objs getloadavg.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"getloadavg.o\"" - fi - - - echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6 - echo "configure:8664: checking for kstat_open in -lkstat" >&5 - ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'` - - xe_check_libs=" -lkstat " - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" - fi - rm -f conftest* - xe_check_libs="" - - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo kstat | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - { test "$extra_verbose" = "yes" && cat << EOF - Defining $ac_tr_lib - EOF - cat >> confdefs.h <&6 - fi - - - - - echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6 - echo "configure:8714: checking for kvm_read in -lkvm" >&5 - ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'` - - xe_check_libs=" -lkvm " - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" - fi - rm -f conftest* - xe_check_libs="" - - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo kvm | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - { test "$extra_verbose" = "yes" && cat << EOF - Defining $ac_tr_lib - EOF - cat >> confdefs.h <&6 - fi - - - fi - - echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6 - echo "configure:8764: checking whether netdb declares h_errno" >&5 - cat > conftest.$ac_ext < - int main() { - return h_errno; - ; return 0; } - EOF - if { (eval echo configure:8773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_H_ERRNO - EOF - cat >> confdefs.h <<\EOF - #define HAVE_H_ERRNO 1 - EOF - } - - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "$ac_t""no" 1>&6 - fi - rm -f conftest* - - echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6 - echo "configure:8793: checking for sigsetjmp" >&5 - cat > conftest.$ac_ext < - int main() { - sigjmp_buf bar; sigsetjmp (bar, 0); - ; return 0; } - EOF - if { (eval echo configure:8802: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_SIGSETJMP - EOF - cat >> confdefs.h <<\EOF - #define HAVE_SIGSETJMP 1 - EOF - } - - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "$ac_t""no" 1>&6 - fi - rm -f conftest* - - echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6 - echo "configure:8822: checking whether localtime caches TZ" >&5 - - if test "$ac_cv_func_tzset" = "yes"; then - cat > conftest.$ac_ext < - #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); - } - EOF - if { (eval echo configure:8861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 - then - emacs_cv_localtime_cache=no - else - conftest_rc="$?" - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - emacs_cv_localtime_cache=yes - fi - rm -fr conftest* - 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 - echo "$ac_t""$emacs_cv_localtime_cache" 1>&6 - if test $emacs_cv_localtime_cache = yes; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining LOCALTIME_CACHE - EOF - cat >> confdefs.h <<\EOF - #define LOCALTIME_CACHE 1 - EOF - } - - fi - - if test "$HAVE_TIMEVAL" = "yes"; then - echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6 - echo "configure:8891: checking whether gettimeofday accepts one or two arguments" >&5 - cat > conftest.$ac_ext < - #include - #else - #ifdef HAVE_SYS_TIME_H - #include - #else - #include - #endif - #endif - - int main() { - - struct timeval time; - struct timezone dummy; - gettimeofday (&time, &dummy); - - ; return 0; } - EOF - if { (eval echo configure:8915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - echo "$ac_t""two" 1>&6 - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "$ac_t""one" 1>&6 - { test "$extra_verbose" = "yes" && cat << \EOF - Defining GETTIMEOFDAY_ONE_ARGUMENT - EOF - cat >> confdefs.h <<\EOF - #define GETTIMEOFDAY_ONE_ARGUMENT 1 - EOF - } - - fi - rm -f conftest* - fi - - - echo $ac_n "checking for inline""... $ac_c" 1>&6 - echo "configure:8937: checking for inline" >&5 - - ac_cv_c_inline=no - for ac_kw in inline __inline__ __inline; do - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_c_inline=$ac_kw; break - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - fi - rm -f conftest* - done - - - echo "$ac_t""$ac_cv_c_inline" 1>&6 - case "$ac_cv_c_inline" in - inline | yes) ;; - no) { test "$extra_verbose" = "yes" && cat << \EOF - Defining inline = - EOF - cat >> confdefs.h <<\EOF - #define inline - EOF - } - ;; - *) { test "$extra_verbose" = "yes" && cat << EOF - Defining inline = $ac_cv_c_inline - EOF - cat >> confdefs.h <> confdefs.h <<\EOF - #define HAVE_INLINE 1 - EOF - } - - test "$GCC" = "yes" && extra_objs="$extra_objs inline.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"inline.o\"" - fi - fi - - - # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works - # for constant arguments. Useless! - echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 - echo "configure:8999: checking for working alloca.h" >&5 - - cat > conftest.$ac_ext < - int main() { - char *p = alloca(2 * sizeof(int)); - ; return 0; } - EOF - if { (eval echo configure:9009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - ac_cv_header_alloca_h=yes - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_header_alloca_h=no - fi - rm -f conftest* - - echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 - if test $ac_cv_header_alloca_h = yes; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_ALLOCA_H - EOF - cat >> confdefs.h <<\EOF - #define HAVE_ALLOCA_H 1 - EOF - } - - fi - - echo $ac_n "checking for alloca""... $ac_c" 1>&6 - echo "configure:9033: checking for alloca" >&5 - - cat > conftest.$ac_ext < - # else - # ifdef _AIX - #pragma alloca - # else - # ifndef alloca /* predefined by HP cc +Olibcalls */ - char *alloca (); - # endif - # endif - # endif - #endif - - int main() { - char *p = (char *) alloca(1); - ; return 0; } - EOF - if { (eval echo configure:9059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - ac_cv_func_alloca_works=yes - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_func_alloca_works=no - fi - rm -f conftest* - - echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 - if test $ac_cv_func_alloca_works = yes; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_ALLOCA - EOF - cat >> confdefs.h <<\EOF - #define HAVE_ALLOCA 1 - EOF - } - - fi - - if test $ac_cv_func_alloca_works = no; then - # The SVR3 libPW and SVR4 libucb both contain incompatible functions - # that cause trouble. Some versions do not even contain alloca or - # contain a buggy version. If you still want to use their alloca, - # use ar to extract alloca.o from them instead of compiling alloca.c. - ALLOCA=alloca.o - { test "$extra_verbose" = "yes" && cat << \EOF - Defining C_ALLOCA - EOF - cat >> confdefs.h <<\EOF - #define C_ALLOCA 1 - EOF - } - - - echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 - echo "configure:9098: checking whether alloca needs Cray hooks" >&5 - - cat > conftest.$ac_ext <&5 | - egrep "webecray" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_os_cray=yes - else - rm -rf conftest* - ac_cv_os_cray=no - fi - rm -f conftest* - - - echo "$ac_t""$ac_cv_os_cray" 1>&6 - if test $ac_cv_os_cray = yes; then - for ac_func in _getb67 GETB67 getb67; do - echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 - echo "configure:9125: checking for $ac_func" >&5 - - cat > conftest.$ac_ext < - /* Override any gcc2 internal prototype to avoid an error. */ - /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ - char $ac_func(); - - int main() { - - /* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ - #if defined (__stub_$ac_func) || defined (__stub___$ac_func) - choke me - #else - $ac_func(); - #endif - - ; return 0; } - EOF - if { (eval echo configure:9151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" - fi - rm -f conftest* - - if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - { test "$extra_verbose" = "yes" && cat << EOF - Defining CRAY_STACKSEG_END = $ac_func - EOF - cat >> confdefs.h <&6 - fi - - done - fi - - echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 - echo "configure:9181: checking stack direction for C alloca" >&5 - - cat > conftest.$ac_ext < addr) ? 1 : -1; - } - main () - { - exit (find_stack_direction() < 0); - } - EOF - if { (eval echo configure:9203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 - then - ac_cv_c_stack_direction=1 - else - conftest_rc="$?" - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_c_stack_direction=-1 - fi - rm -fr conftest* - - echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 - { test "$extra_verbose" = "yes" && cat << EOF - Defining STACK_DIRECTION = $ac_cv_c_stack_direction - EOF - cat >> confdefs.h <&6 - echo "configure:9232: checking for vfork.h" >&5 - - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" - { (eval echo configure:9240: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out` - if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" - else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" - fi - rm -f conftest* - if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_VFORK_H - EOF - cat >> confdefs.h <<\EOF - #define HAVE_VFORK_H 1 - EOF - } - - else - echo "$ac_t""no" 1>&6 - fi - - echo $ac_n "checking for working vfork""... $ac_c" 1>&6 - echo "configure:9268: checking for working vfork" >&5 - - cat > conftest.$ac_ext < - #include - #include - #ifdef HAVE_UNISTD_H - #include - #endif - #ifdef HAVE_VFORK_H - #include - #endif - /* On some sparc systems, changes by the child to local and incoming - argument registers are propagated back to the parent. - The compiler is told about this with #include , - but some compilers (e.g. gcc -O) don't grok . - Test for this by using a static variable whose address - is put into a register that is clobbered by the vfork. */ - static - #ifdef __cplusplus - sparc_address_test (int arg) - #else - sparc_address_test (arg) int arg; - #endif - { - static pid_t child; - if (!child) { - child = vfork (); - if (child < 0) { - perror ("vfork"); - _exit(2); - } - if (!child) { - arg = getpid(); - write(-1, "", 0); - _exit (arg); - } - } - } - main() { - pid_t parent = getpid (); - pid_t child; - - sparc_address_test (); - - child = vfork (); - - if (child == 0) { - /* Here is another test for sparc vfork register problems. - This test uses lots of local variables, at least - as many local variables as main has allocated so far - including compiler temporaries. 4 locals are enough for - gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. - A buggy compiler should reuse the register of parent - for one of the local variables, since it will think that - parent can't possibly be used any more in this routine. - Assigning to the local variable will thus munge parent - in the parent process. */ - pid_t - p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), - p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); - /* Convince the compiler that p..p7 are live; otherwise, it might - use the same hardware register for all 8 local variables. */ - if (p != p1 || p != p2 || p != p3 || p != p4 - || p != p5 || p != p6 || p != p7) - _exit(1); - - /* On some systems (e.g. IRIX 3.3), - vfork doesn't separate parent from child file descriptors. - If the child closes a descriptor before it execs or exits, - this munges the parent's descriptor as well. - Test for this by closing stdout in the child. */ - _exit(close(fileno(stdout)) != 0); - } else { - int status; - struct stat st; - - while (wait(&status) != child) - ; - exit( - /* Was there some problem with vforking? */ - child < 0 - - /* Did the child fail? (This shouldn't happen.) */ - || status - - /* Did the vfork/compiler bug occur? */ - || parent != getpid() - - /* Did the file descriptor bug occur? */ - || fstat(fileno(stdout), &st) != 0 - ); - } - } - EOF - if { (eval echo configure:9366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 - then - ac_cv_func_vfork_works=yes - else - conftest_rc="$?" - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_func_vfork_works=no - fi - rm -fr conftest* - - echo "$ac_t""$ac_cv_func_vfork_works" 1>&6 - if test $ac_cv_func_vfork_works = no; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining vfork = fork - EOF - cat >> confdefs.h <<\EOF - #define vfork fork - EOF - } - - fi - - - echo $ac_n "checking for working strcoll""... $ac_c" 1>&6 - echo "configure:9392: checking for working strcoll" >&5 - - cat > conftest.$ac_ext < - main () - { - exit (strcoll ("abc", "def") >= 0 || - strcoll ("ABC", "DEF") >= 0 || - strcoll ("123", "456") >= 0); - } - EOF - if { (eval echo configure:9405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 - then - ac_cv_func_strcoll_works=yes - else - conftest_rc="$?" - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_func_strcoll_works=no - fi - rm -fr conftest* - - echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6 - if test $ac_cv_func_strcoll_works = yes; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_STRCOLL - EOF - cat >> confdefs.h <<\EOF - #define HAVE_STRCOLL 1 - EOF - } - - fi - - - for ac_func in getpgrp - do - echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 - echo "configure:9433: checking for $ac_func" >&5 - - cat > conftest.$ac_ext < - /* Override any gcc2 internal prototype to avoid an error. */ - /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ - char $ac_func(); - - int main() { - - /* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ - #if defined (__stub_$ac_func) || defined (__stub___$ac_func) - choke me - #else - $ac_func(); - #endif - - ; return 0; } - EOF - if { (eval echo configure:9459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" - fi - rm -f conftest* - - if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - { test "$extra_verbose" = "yes" && cat << EOF - Defining $ac_tr_func - EOF - cat >> confdefs.h <&6 - fi - done - - echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6 - echo "configure:9487: checking whether getpgrp takes no argument" >&5 - - cat > conftest.$ac_ext < - #include - - int pid; - int pg1, pg2, pg3, pg4; - int ng, np, s, child; - - main() - { - pid = getpid(); - pg1 = getpgrp(0); - pg2 = getpgrp(); - pg3 = getpgrp(pid); - pg4 = getpgrp(1); - - /* - * If all of these values are the same, it's pretty sure that - * we're on a system that ignores getpgrp's first argument. - */ - if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3) - exit(0); - - child = fork(); - if (child < 0) - exit(1); - else if (child == 0) { - np = getpid(); - /* - * If this is Sys V, this will not work; pgrp will be - * set to np because setpgrp just changes a pgrp to be - * the same as the pid. - */ - setpgrp(np, pg1); - ng = getpgrp(0); /* Same result for Sys V and BSD */ - if (ng == pg1) { - exit(1); - } else { - exit(0); - } - } else { - wait(&s); - exit(s>>8); - } - } - - EOF - if { (eval echo configure:9545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 - then - ac_cv_func_getpgrp_void=yes - else - conftest_rc="$?" - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_func_getpgrp_void=no - fi - rm -fr conftest* - - - echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6 - if test $ac_cv_func_getpgrp_void = yes; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining GETPGRP_VOID - EOF - cat >> confdefs.h <<\EOF - #define GETPGRP_VOID 1 - EOF - } - - fi - - - echo $ac_n "checking for working mmap""... $ac_c" 1>&6 - echo "configure:9572: checking for working mmap" >&5 - case "$opsys" in ultrix* ) have_mmap=no ;; *) - cat > conftest.$ac_ext < - #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; - } - EOF - if { (eval echo configure:9608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 - then - have_mmap=yes - else - conftest_rc="$?" - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - have_mmap=no - fi - rm -fr conftest* ;; - esac - echo "$ac_t""$have_mmap" 1>&6 - test "$have_mmap" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_MMAP - EOF - cat >> confdefs.h <<\EOF - #define HAVE_MMAP 1 - EOF - } - - for ac_hdr in unistd.h - do - ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 - echo "configure:9633: checking for $ac_hdr" >&5 - - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" - { (eval echo configure:9641: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out` - if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" - else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" - fi - rm -f conftest* - if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - { test "$extra_verbose" = "yes" && cat << EOF - Defining $ac_tr_hdr - EOF - cat >> confdefs.h <&6 - fi - done - - for ac_func in getpagesize - do - echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 - echo "configure:9673: checking for $ac_func" >&5 - - cat > conftest.$ac_ext < - /* Override any gcc2 internal prototype to avoid an error. */ - /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ - char $ac_func(); - - int main() { - - /* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ - #if defined (__stub_$ac_func) || defined (__stub___$ac_func) - choke me - #else - $ac_func(); - #endif - - ; return 0; } - EOF - if { (eval echo configure:9699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" - fi - rm -f conftest* - - if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - { test "$extra_verbose" = "yes" && cat << EOF - Defining $ac_tr_func - EOF - cat >> confdefs.h <&6 - fi - done - - echo $ac_n "checking for working mmap""... $ac_c" 1>&6 - echo "configure:9727: checking for working mmap" >&5 - - cat > conftest.$ac_ext < - #include - #include - - /* This mess was copied from the GNU getpagesize.h. */ - #ifndef HAVE_GETPAGESIZE - # ifdef HAVE_UNISTD_H - # include - # endif - - /* Assume that all systems that can run configure have sys/param.h. */ - # ifndef HAVE_SYS_PARAM_H - # define HAVE_SYS_PARAM_H 1 - # endif - - # ifdef _SC_PAGESIZE - # define getpagesize() sysconf(_SC_PAGESIZE) - # else /* no _SC_PAGESIZE */ - # ifdef HAVE_SYS_PARAM_H - # include - # ifdef EXEC_PAGESIZE - # define getpagesize() EXEC_PAGESIZE - # else /* no EXEC_PAGESIZE */ - # ifdef NBPG - # define getpagesize() NBPG * CLSIZE - # ifndef CLSIZE - # define CLSIZE 1 - # endif /* no CLSIZE */ - # else /* no NBPG */ - # ifdef NBPC - # define getpagesize() NBPC - # else /* no NBPC */ - # ifdef PAGESIZE - # define getpagesize() PAGESIZE - # endif /* PAGESIZE */ - # endif /* no NBPC */ - # endif /* no NBPG */ - # endif /* no EXEC_PAGESIZE */ - # else /* no HAVE_SYS_PARAM_H */ - # define getpagesize() 8192 /* punt totally */ - # endif /* no HAVE_SYS_PARAM_H */ - # endif /* no _SC_PAGESIZE */ - - #endif /* no HAVE_GETPAGESIZE */ - - #ifdef __cplusplus - extern "C" { void *malloc(unsigned); } - #else - char *malloc(); - #endif - - int - main() - { - char *data, *data2, *data3; - int i, pagesize; - int fd; - - pagesize = getpagesize(); - - /* - * First, make a file with some known garbage in it. - */ - data = malloc(pagesize); - if (!data) - exit(1); - for (i = 0; i < pagesize; ++i) - *(data + i) = rand(); - umask(0); - fd = creat("conftestmmap", 0600); - if (fd < 0) - exit(1); - if (write(fd, data, pagesize) != pagesize) - exit(1); - close(fd); - - /* - * Next, try to mmap the file at a fixed address which - * already has something else allocated at it. If we can, - * also make sure that we see the same garbage. - */ - fd = open("conftestmmap", O_RDWR); - if (fd < 0) - exit(1); - data2 = malloc(2 * pagesize); - if (!data2) - exit(1); - data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); - if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, - MAP_PRIVATE | MAP_FIXED, fd, 0L)) - exit(1); - for (i = 0; i < pagesize; ++i) - if (*(data + i) != *(data2 + i)) - exit(1); - - /* - * Finally, make sure that changes to the mapped area - * do not percolate back to the file as seen by read(). - * (This is a bug on some variants of i386 svr4.0.) - */ - for (i = 0; i < pagesize; ++i) - *(data2 + i) = *(data2 + i) + 1; - data3 = malloc(pagesize); - if (!data3) - exit(1); - if (read(fd, data3, pagesize) != pagesize) - exit(1); - for (i = 0; i < pagesize; ++i) - if (*(data + i) != *(data3 + i)) - exit(1); - close(fd); - unlink("conftestmmap"); - exit(0); - } - - EOF - if { (eval echo configure:9870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 - then - ac_cv_func_mmap_fixed_mapped=yes - else - conftest_rc="$?" - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_func_mmap_fixed_mapped=no - fi - rm -fr conftest* - - echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 - if test $ac_cv_func_mmap_fixed_mapped = yes; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_MMAP - EOF - cat >> confdefs.h <<\EOF - #define HAVE_MMAP 1 - EOF - } - - fi - - - test "$GNU_MALLOC" != "yes" -a "$have_mmap" != "yes" && rel_alloc=no - test "$rel_alloc" = "default" -a "$have_mmap" = "yes" && rel_alloc=yes - test "$rel_alloc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF - Defining REL_ALLOC - EOF - cat >> confdefs.h <<\EOF - #define REL_ALLOC 1 - EOF - } - - - ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for termios.h""... $ac_c" 1>&6 - echo "configure:9908: checking for termios.h" >&5 - - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" - { (eval echo configure:9916: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out` - if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" - else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" - fi - rm -f conftest* - if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_TERMIOS - EOF - cat >> confdefs.h <<\EOF - #define HAVE_TERMIOS 1 - EOF - } - - { test "$extra_verbose" = "yes" && cat << \EOF - Defining SIGNALS_VIA_CHARACTERS - EOF - cat >> confdefs.h <<\EOF - #define SIGNALS_VIA_CHARACTERS 1 - EOF - } - - { test "$extra_verbose" = "yes" && cat << \EOF - Defining NO_TERMIO - EOF - cat >> confdefs.h <<\EOF - #define NO_TERMIO 1 - EOF - } - - else - echo "$ac_t""no" 1>&6 - ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for termio.h""... $ac_c" 1>&6 - echo "configure:9959: checking for termio.h" >&5 - - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" - { (eval echo configure:9967: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out` - if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" - else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" - fi - rm -f conftest* - if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_TERMIO - EOF - cat >> confdefs.h <<\EOF - #define HAVE_TERMIO 1 - EOF - } - - else - echo "$ac_t""no" 1>&6 - fi - - fi - - - - echo $ac_n "checking for socket""... $ac_c" 1>&6 - echo "configure:9999: checking for socket" >&5 - - cat > conftest.$ac_ext < - /* Override any gcc2 internal prototype to avoid an error. */ - /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ - char socket(); - - int main() { - - /* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ - #if defined (__stub_socket) || defined (__stub___socket) - choke me - #else - socket(); - #endif - - ; return 0; } - EOF - if { (eval echo configure:10025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_func_socket=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_socket=no" - fi - rm -f conftest* - - if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6 - echo "configure:10040: checking for netinet/in.h" >&5 - - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" - { (eval echo configure:10048: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out` - if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" - else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" - fi - rm -f conftest* - if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6 - echo "configure:10065: checking for arpa/inet.h" >&5 - - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" - { (eval echo configure:10073: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out` - if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" - else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" - fi - rm -f conftest* - if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_SOCKETS - EOF - cat >> confdefs.h <<\EOF - #define HAVE_SOCKETS 1 - EOF - } - - echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6 - echo "configure:10098: checking "for sun_len member in struct sockaddr_un"" >&5 - cat > conftest.$ac_ext < - #include - #include - - int main() { - static struct sockaddr_un x; x.sun_len = 1; - ; return 0; } - EOF - if { (eval echo configure:10111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_SOCKADDR_SUN_LEN - EOF - cat >> confdefs.h <<\EOF - #define HAVE_SOCKADDR_SUN_LEN 1 - EOF - } - - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "$ac_t""no" 1>&6 - fi - rm -f conftest* - echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6 - echo "configure:10129: checking "for ip_mreq struct in netinet/in.h"" >&5 - cat > conftest.$ac_ext < - #include - - int main() { - static struct ip_mreq x; - ; return 0; } - EOF - if { (eval echo configure:10141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_MULTICAST - EOF - cat >> confdefs.h <<\EOF - #define HAVE_MULTICAST 1 - EOF - } - - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "$ac_t""no" 1>&6 - fi - rm -f conftest* - else - echo "$ac_t""no" 1>&6 - fi - - else - echo "$ac_t""no" 1>&6 - fi - - else - echo "$ac_t""no" 1>&6 - fi - - - echo $ac_n "checking for msgget""... $ac_c" 1>&6 - echo "configure:10172: checking for msgget" >&5 - - cat > conftest.$ac_ext < - /* Override any gcc2 internal prototype to avoid an error. */ - /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ - char msgget(); - - int main() { - - /* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ - #if defined (__stub_msgget) || defined (__stub___msgget) - choke me - #else - msgget(); - #endif - - ; return 0; } - EOF - if { (eval echo configure:10198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_func_msgget=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_msgget=no" - fi - rm -f conftest* - - if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6 - echo "configure:10213: checking for sys/ipc.h" >&5 - - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" - { (eval echo configure:10221: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out` - if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" - else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" - fi - rm -f conftest* - if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6 - echo "configure:10238: checking for sys/msg.h" >&5 - - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" - { (eval echo configure:10246: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out` - if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" - else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" - fi - rm -f conftest* - if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_SYSVIPC - EOF - cat >> confdefs.h <<\EOF - #define HAVE_SYSVIPC 1 - EOF - } - - else - echo "$ac_t""no" 1>&6 - fi - - else - echo "$ac_t""no" 1>&6 - fi - - else - echo "$ac_t""no" 1>&6 - fi - - - ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for dirent.h""... $ac_c" 1>&6 - echo "configure:10284: checking for dirent.h" >&5 - - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" - { (eval echo configure:10292: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out` - if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" - else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" - fi - rm -f conftest* - if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - { test "$extra_verbose" = "yes" && cat << \EOF - Defining SYSV_SYSTEM_DIR - EOF - cat >> confdefs.h <<\EOF - #define SYSV_SYSTEM_DIR 1 - EOF - } - - else - echo "$ac_t""no" 1>&6 - ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6 - echo "configure:10319: checking for sys/dir.h" >&5 - - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" - { (eval echo configure:10327: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out` - if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" - else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" - fi - rm -f conftest* - if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : - else - echo "$ac_t""no" 1>&6 - { test "$extra_verbose" = "yes" && cat << \EOF - Defining NONSYSTEM_DIR_LIBRARY - EOF - cat >> confdefs.h <<\EOF - #define NONSYSTEM_DIR_LIBRARY 1 - EOF - } - - fi - - fi - - - ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for nlist.h""... $ac_c" 1>&6 - echo "configure:10360: checking for nlist.h" >&5 - - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" - { (eval echo configure:10368: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out` - if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" - else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" - fi - rm -f conftest* - if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - { test "$extra_verbose" = "yes" && cat << \EOF - Defining NLIST_STRUCT - EOF - cat >> confdefs.h <<\EOF - #define NLIST_STRUCT 1 - EOF - } - - else - echo "$ac_t""no" 1>&6 - fi - - - - echo "checking "for sound support"" 1>&6 - echo "configure:10398: checking "for sound support"" >&5 - case "$with_sound" in - native | both ) with_native_sound=yes;; - nas | no ) with_native_sound=no;; - esac - test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes - - if test "$with_native_sound" != "no"; then - if test -n "$native_sound_lib"; then - ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6 - echo "configure:10409: checking for multimedia/audio_device.h" >&5 - - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" - { (eval echo configure:10417: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out` - if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" - else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" - fi - rm -f conftest* - if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - sound_found=yes sound_cflags="" - extra_objs="$extra_objs sunplay.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"sunplay.o\"" - fi - else - echo "$ac_t""no" 1>&6 - fi - - fi - - if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then - sound_found=yes - extra_objs="$extra_objs sunplay.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"sunplay.o\"" - fi - if test -d "/usr/demo/SOUND/include" - then sound_cflags="-I/usr/demo/SOUND/include" - else sound_cflags="-I/usr/demo/SOUND" - fi - if test -z "$native_sound_lib" ; then - if test -r "/usr/demo/SOUND/lib/libaudio.a" - then native_sound_lib="/usr/demo/SOUND/lib/libaudio.a" - else native_sound_lib="/usr/demo/SOUND/libaudio.a" - fi - fi - fi - - if test -z "$sound_found"; then - case "$canonical" in - *-sgi-* ) - if test -z "$native_sound_lib"; then - - echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6 - echo "configure:10465: checking for ALopenport in -laudio" >&5 - ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'` - - xe_check_libs=" -laudio " - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" - fi - rm -f conftest* - xe_check_libs="" - - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - native_sound_lib="-laudio" - else - echo "$ac_t""no" 1>&6 - fi - - - fi - if test -n "$native_sound_lib"; then - sound_found=yes sound_cflags="" - extra_objs="$extra_objs sgiplay.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"sgiplay.o\"" - fi - fi ;; - hppa*-hp-hpux* ) - if test -z "$native_sound_lib"; then - - echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6 - echo "configure:10512: checking for AOpenAudio in -lAlib" >&5 - ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'` - - xe_check_libs=" -lAlib " - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" - fi - rm -f conftest* - xe_check_libs="" - - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - native_sound_lib="-lAlib" - else - echo "$ac_t""no" 1>&6 - fi - - - fi - if test -n "$native_sound_lib"; then - sound_found=yes - extra_objs="$extra_objs hpplay.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"hpplay.o\"" - fi - if test "$GCC" = "yes" # Kludge city - then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples" - else sound_cflags="+e -I/usr/audio/examples" - fi - fi ;; - esac - fi - - if test -z "$sound_found"; then - for dir in "machine" "sys" "linux"; do - ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6 - echo "configure:10566: checking for ${dir}/soundcard.h" >&5 - - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" - { (eval echo configure:10574: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out` - if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" - else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" - fi - rm -f conftest* - if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - sound_found=yes - extra_objs="$extra_objs linuxplay.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"linuxplay.o\"" - fi - { test "$extra_verbose" = "yes" && cat << EOF - Defining SOUNDCARD_H_PATH = "${dir}/soundcard.h" - EOF - cat >> confdefs.h <&6 - fi - - done - fi - - test "$sound_found" = "yes" && with_native_sound=yes - fi - - if test -z "$with_sound"; then - if test "$with_native_sound" = "yes" -o -n "$native_sound_lib"; then - with_sound=native - fi - fi - - if test "$with_native_sound" = "yes"; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_NATIVE_SOUND - EOF - cat >> confdefs.h <<\EOF - #define HAVE_NATIVE_SOUND 1 - EOF - } - - test -n "$native_sound_lib" && LIBS="$native_sound_lib $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"$native_sound_lib\" to \$LIBS"; fi - fi - - case "$with_sound" in both | nas ) - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_NAS_SOUND - EOF - cat >> confdefs.h <<\EOF - #define HAVE_NAS_SOUND 1 - EOF - } - - extra_objs="$extra_objs nas.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"nas.o\"" - fi - libs_x="-laudio $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-laudio\" to \$libs_x"; fi - cat > conftest.$ac_ext < - EOF - if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "AuXtErrorJump" >/dev/null 2>&1; then - : - else - rm -rf conftest* - { test "$extra_verbose" = "yes" && cat << \EOF - Defining NAS_NO_ERROR_JUMP - EOF - cat >> confdefs.h <<\EOF - #define NAS_NO_ERROR_JUMP 1 - EOF - } - - fi - rm -f conftest* - - esac - - - test -z "$with_tty" && with_tty=yes - - if test "$with_tty" = "yes" ; then - echo "checking for TTY-related features" 1>&6 - echo "configure:10671: checking for TTY-related features" >&5 - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_TTY - EOF - cat >> confdefs.h <<\EOF - #define HAVE_TTY 1 - EOF - } - - extra_objs="$extra_objs console-tty.o device-tty.o event-tty.o frame-tty.o objects-tty.o redisplay-tty.o cm.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"console-tty.o device-tty.o event-tty.o frame-tty.o objects-tty.o redisplay-tty.o cm.o\"" - fi - - if test -z "$with_ncurses"; then - - echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6 - echo "configure:10687: checking for tgetent in -lncurses" >&5 - ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'` - - xe_check_libs=" -lncurses " - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" - fi - rm -f conftest* - xe_check_libs="" - - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - with_ncurses=yes - else - echo "$ac_t""no" 1>&6 - with_ncurses=no - fi - - - fi - if test "$with_ncurses" = "yes"; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_NCURSES - EOF - cat >> confdefs.h <<\EOF - #define HAVE_NCURSES 1 - EOF - } - - ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6 - echo "configure:10736: checking for ncurses/curses.h" >&5 - - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" - { (eval echo configure:10744: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out` - if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" - else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" - fi - rm -f conftest* - if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - curses_h_path=ncurses/curses.h - else - echo "$ac_t""no" 1>&6 - fi - - ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6 - echo "configure:10766: checking for ncurses/term.h" >&5 - - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" - { (eval echo configure:10774: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out` - if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" - else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" - fi - rm -f conftest* - if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - term_h_path=ncurses/term.h - else - echo "$ac_t""no" 1>&6 - fi - - extra_objs="$extra_objs terminfo.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"terminfo.o\"" - fi - LIBS="-lncurses $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lncurses\" to \$LIBS"; fi - - if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then - save_c_switch_site="$c_switch_site" - c_switch_site="$c_switch_site -I/usr/include/ncurses" - ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6 - echo "configure:10804: checking for ncurses/curses.h" >&5 - - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" - { (eval echo configure:10812: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out` - if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" - else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" - fi - rm -f conftest* - if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - curses_h_path=ncurses/curses.h - else - echo "$ac_t""no" 1>&6 - fi - - if test "$ac_cv_header_ncurses_curses_h" = "yes" - then echo "configure: warning: "Your system has the bogus ncurses include bug."" 1>&2 - else c_switch_site="$save_c_switch_site" - fi - fi - else if test "$have_terminfo" = "yes"; then - extra_objs="$extra_objs terminfo.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"terminfo.o\"" - fi - if test -n "$libs_termcap"; then - LIBS="$libs_termcap $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"$libs_termcap\" to \$LIBS"; fi - else - for lib in curses termlib termcap; do - - echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6 - echo "configure:10847: checking for tgetent in -l$lib" >&5 - ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'` - - xe_check_libs=" -l$lib " - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" - fi - rm -f conftest* - xe_check_libs="" - - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - LIBS="-l${lib} $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-l${lib}\" to \$LIBS"; fi; break - else - echo "$ac_t""no" 1>&6 - fi - - - done - fi - else extra_objs="$extra_objs tparam.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"tparam.o\"" - fi - case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac - if test -n "$libs_termcap"; then - LIBS="$libs_termcap $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"$libs_termcap\" to \$LIBS"; fi - else - - echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6 - echo "configure:10894: checking for tgetent in -lcurses" >&5 - ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'` - - xe_check_libs=" -lcurses " - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" - fi - rm -f conftest* - xe_check_libs="" - - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - LIBS="-lcurses $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lcurses\" to \$LIBS"; fi - else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6 - echo "configure:10928: checking for tgetent in -ltermcap" >&5 - ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'` - - xe_check_libs=" -ltermcap " - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" - fi - rm -f conftest* - xe_check_libs="" - - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - LIBS="-ltermcap $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-ltermcap\" to \$LIBS"; fi - else - echo "$ac_t""no" 1>&6 - extra_objs="$extra_objs termcap.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"termcap.o\"" - fi - fi - - - fi - - - fi - fi - fi - { test "$extra_verbose" = "yes" && cat << EOF - Defining CURSES_H_PATH = "${curses_h_path-curses.h}" - EOF - cat >> confdefs.h <> confdefs.h <&6 - echo "configure:10992: checking for gpm.h" >&5 - - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" - { (eval echo configure:11000: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out` - if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" - else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" - fi - rm -f conftest* - if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : - else - echo "$ac_t""no" 1>&6 - with_gpm=no - fi - } - test -z "$with_gpm" && { - echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6 - echo "configure:11023: checking for Gpm_Open in -lgpm" >&5 - ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'` - - xe_check_libs=" -lgpm " - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" - fi - rm -f conftest* - xe_check_libs="" - - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - with_gpm=yes - else - echo "$ac_t""no" 1>&6 - with_gpm=no - fi - - } - if test "$with_gpm" = "yes"; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_GPM - EOF - cat >> confdefs.h <<\EOF - #define HAVE_GPM 1 - EOF - } - - extra_objs="$extra_objs gpmevent.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"gpmevent.o\"" - fi - LIBS="-lgpm $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lgpm\" to \$LIBS"; fi - fi - - else for feature in ncurses gpm; do - if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then - echo "configure: warning: "--with-${feature} ignored: Not valid without TTY support"" 1>&2 - fi - eval "with_${feature}=no" - done - fi - test "$with_x11" = "yes" -o "$with_tty" = "yes" && extra_objs="$extra_objs event-unixoid.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"event-unixoid.o\"" - fi - - - test "$with_database_gnudbm $with_database_dbm $with_database_berkdb" \ - != "no no no" && echo "checking for database support" 1>&6 - echo "configure:11089: checking for database support" >&5 - - if test "$with_database_gnudbm $with_database_dbm" != "no no"; then - ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6 - echo "configure:11094: checking for ndbm.h" >&5 - - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" - { (eval echo configure:11102: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out` - if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" - else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" - fi - rm -f conftest* - if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : - else - echo "$ac_t""no" 1>&6 - - test "$with_database_gnudbm" = "yes" -o \ - "$with_database_dbm" = "yes" && \ - { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; } - with_database_gnudbm=no with_database_dbm=no - fi - - fi - - if test "$with_database_gnudbm" != "no"; then - - echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6 - echo "configure:11132: checking for dbm_open in -lgdbm" >&5 - ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'` - - xe_check_libs=" -lgdbm " - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" - fi - rm -f conftest* - xe_check_libs="" - - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - with_database_gnudbm=yes with_database_dbm=no libdbm=-lgdbm - else - echo "$ac_t""no" 1>&6 - if test "$with_database_gnudbm" = "yes"; then - { echo "Error:" "Required GNU DBM support cannot be provided." >&2; exit 1; } - fi - with_database_gnudbm=no - fi - - - fi - - if test "$with_database_dbm" != "no"; then - echo $ac_n "checking for dbm_open""... $ac_c" 1>&6 - echo "configure:11176: checking for dbm_open" >&5 - - cat > conftest.$ac_ext < - /* Override any gcc2 internal prototype to avoid an error. */ - /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ - char dbm_open(); - - int main() { - - /* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ - #if defined (__stub_dbm_open) || defined (__stub___dbm_open) - choke me - #else - dbm_open(); - #endif - - ; return 0; } - EOF - if { (eval echo configure:11202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_func_dbm_open=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_dbm_open=no" - fi - rm -f conftest* - - if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then - echo "$ac_t""yes" 1>&6 - with_database_dbm=yes libdbm= - else - echo "$ac_t""no" 1>&6 - - - echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6 - echo "configure:11221: checking for dbm_open in -ldbm" >&5 - ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'` - - xe_check_libs=" -ldbm " - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" - fi - rm -f conftest* - xe_check_libs="" - - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - with_database_dbm=yes libdbm=-ldbm - else - echo "$ac_t""no" 1>&6 - test "$with_database_dbm" = "yes" && \ - { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; } - with_database_dbm=no - fi - - - fi - - fi - - test -n "$libdbm" && LIBS=""$libdbm" $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \""$libdbm"\" to \$LIBS"; fi - test "$with_database_gnudbm" = "yes" -o \ - "$with_database_dbm" = "yes" && \ - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_DBM - EOF - cat >> confdefs.h <<\EOF - #define HAVE_DBM 1 - EOF - } - - - if test "$with_database_berkdb" != "no"; then - echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6 - echo "configure:11278: checking for Berkeley db.h" >&5 - for path in "db/db.h" "db.h"; do - cat > conftest.$ac_ext < - typedef uint8_t u_int8_t; - typedef uint16_t u_int16_t; - typedef uint32_t u_int32_t; - #ifdef WE_DONT_NEED_QUADS - typedef uint64_t u_int64_t; - #endif - #endif - #include <$path> - - int main() { - - ; return 0; } - EOF - if { (eval echo configure:11299: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - db_h_path="$path"; break - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - fi - rm -f conftest* - done - if test -z "$db_h_path" - then echo "$ac_t""no" 1>&6; with_database_berkdb=no - else echo "$ac_t""$db_h_path" 1>&6 - fi - - if test "$with_database_berkdb" != "no"; then - echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6 - echo "configure:11315: checking for Berkeley DB version" >&5 - cat > conftest.$ac_ext < - #if DB_VERSION_MAJOR > 1 - yes - #endif - - EOF - if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "yes" >/dev/null 2>&1; then - rm -rf conftest* - echo "$ac_t""2" 1>&6; dbfunc=db_open - else - rm -rf conftest* - echo "$ac_t""1" 1>&6; dbfunc=dbopen - fi - rm -f conftest* - - echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6 - echo "configure:11336: checking for $dbfunc" >&5 - - cat > conftest.$ac_ext < - /* Override any gcc2 internal prototype to avoid an error. */ - /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ - char $dbfunc(); - - int main() { - - /* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ - #if defined (__stub_$dbfunc) || defined (__stub___$dbfunc) - choke me - #else - $dbfunc(); - #endif - - ; return 0; } - EOF - if { (eval echo configure:11362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_func_$dbfunc=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$dbfunc=no" - fi - rm -f conftest* - - if eval "test \"`echo '$ac_cv_func_'$dbfunc`\" = yes"; then - echo "$ac_t""yes" 1>&6 - with_database_berkdb=yes need_libdb=no - else - echo "$ac_t""no" 1>&6 - - - echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6 - echo "configure:11381: checking for $dbfunc in -ldb" >&5 - ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'` - - xe_check_libs=" -ldb " - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" - fi - rm -f conftest* - xe_check_libs="" - - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - with_database_berkdb=yes need_libdb=yes - else - echo "$ac_t""no" 1>&6 - fi - - - fi - - fi - - if test "$with_database_berkdb" = "yes"; then - { test "$extra_verbose" = "yes" && cat << EOF - Defining DB_H_PATH = "$db_h_path" - EOF - cat >> confdefs.h <> confdefs.h <<\EOF - #define HAVE_BERKELEY_DB 1 - EOF - } - - test "$need_libdb" = "yes" && LIBS="-ldb $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-ldb\" to \$LIBS"; fi - else with_database_berkdb=no - fi - fi - - if test "$with_database_gnudbm $with_database_dbm $with_database_berkdb" \ - != "no no no"; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_DATABASE - EOF - cat >> confdefs.h <<\EOF - #define HAVE_DATABASE 1 - EOF - } - - extra_objs="$extra_objs database.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"database.o\"" - fi - fi - - if test "$with_socks" = "yes"; then - - echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6 - echo "configure:11461: checking for SOCKSinit in -lsocks" >&5 - ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'` - - xe_check_libs=" -lsocks " - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" - fi - rm -f conftest* - xe_check_libs="" - - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo socks | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - { test "$extra_verbose" = "yes" && cat << EOF - Defining $ac_tr_lib - EOF - cat >> confdefs.h <&6 - fi - - - test -n "$ac_cv_lib_socks_SOCKSinit" && { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_SOCKS - EOF - cat >> confdefs.h <<\EOF - #define HAVE_SOCKS 1 - EOF - } - - fi - - if test "$usage_tracking" = "yes"; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining USAGE_TRACKING - EOF - cat >> confdefs.h <<\EOF - #define USAGE_TRACKING 1 - EOF - } - - LIBS="-Bstatic -lut -Bdynamic $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-Bstatic -lut -Bdynamic\" to \$LIBS"; fi - fi - - for ac_hdr in dlfcn.h - do - ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 - echo "configure:11534: checking for $ac_hdr" >&5 - - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" - { (eval echo configure:11542: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out` - if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" - else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" - fi - rm -f conftest* - if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - { test "$extra_verbose" = "yes" && cat << EOF - Defining $ac_tr_hdr - EOF - cat >> confdefs.h <> confdefs.h <<\EOF - #define HAVE_DLFCN_H 1 - EOF - } - - else - echo "$ac_t""no" 1>&6 - fi - done - - test -z "$with_shlib" && test ! -z "$have_dlfcn" && { - echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 - echo "configure:11581: checking for dlopen in -ldl" >&5 - ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` - - xe_check_libs=" -ldl " - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" - fi - rm -f conftest* - xe_check_libs="" - - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_DLOPEN - EOF - cat >> confdefs.h <<\EOF - #define HAVE_DLOPEN 1 - EOF - } - DLL_LIB=dl; with_shlib=yes - else - echo "$ac_t""no" 1>&6 - fi - - } - test -z "$with_shlib" && test ! -z "$have_dlfcn" && { - echo $ac_n "checking for _dlopen in -lc""... $ac_c" 1>&6 - echo "configure:11626: checking for _dlopen in -lc" >&5 - ac_lib_var=`echo c'_'_dlopen | sed 'y%./+-%__p_%'` - - xe_check_libs=" -lc " - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" - fi - rm -f conftest* - xe_check_libs="" - - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_DLOPEN - EOF - cat >> confdefs.h <<\EOF - #define HAVE_DLOPEN 1 - EOF - } - DLL_LIB=; with_shlib=yes - else - echo "$ac_t""no" 1>&6 - fi - - } - test -z "$with_shlib" && test ! -z "$have_dlfcn" && { - echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6 - echo "configure:11671: checking for dlopen in -lc" >&5 - ac_lib_var=`echo c'_'dlopen | sed 'y%./+-%__p_%'` - - xe_check_libs=" -lc " - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" - fi - rm -f conftest* - xe_check_libs="" - - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_DLOPEN - EOF - cat >> confdefs.h <<\EOF - #define HAVE_DLOPEN 1 - EOF - } - DLL_LIB=; with_shlib=yes - else - echo "$ac_t""no" 1>&6 - fi - - } - test -z "$with_shlib" && { - echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 - echo "configure:11716: checking for shl_load in -ldld" >&5 - ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` - - xe_check_libs=" -ldld " - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" - fi - rm -f conftest* - xe_check_libs="" - - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_SHL_LOAD - EOF - cat >> confdefs.h <<\EOF - #define HAVE_SHL_LOAD 1 - EOF - } - DLL_LIB=dld; with_shlib=yes - else - echo "$ac_t""no" 1>&6 - fi - - } - test -z "$with_shlib" && { - echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6 - echo "configure:11761: checking for dld_init in -ldld" >&5 - ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'` - - xe_check_libs=" -ldld " - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" - fi - rm -f conftest* - xe_check_libs="" - - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_DLD_INIT - EOF - cat >> confdefs.h <<\EOF - #define HAVE_DLD_INIT 1 - EOF - } - DLL_LIB=dld; with_shlib=yes - else - echo "$ac_t""no" 1>&6 - fi - - } - if test "$with_shlib" = "yes"; then - - dll_ld= - dll_ldflags= - dll_cflags= - dll_post= - dll_ldo="-o" - ld_dynamic_link_flags= - xehost=$canonical - xealias=$internal_configuration - - echo "checking how to build dynamic libraries for ${xehost}" 1>&6 - echo "configure:11816: checking how to build dynamic libraries for ${xehost}" >&5 - # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts. - case "$xehost" in - *-*-linux-gnu*) ;; - *-*-linux*) xehost=`echo $xehost | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` - esac - - xehost_cpu=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` - xehost_vendor=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` - xehost_os=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` - - case "$xehost_os" in - aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "${COLLECT_NAMES+set}" != set; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; - esac - - # Now see if the compiler is really GCC. - if test "$GCC" = "yes"; then - XEGCC=yes - else - echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6 - echo "configure:11844: checking checking whether we are using GNU C" >&5 - cat > conftest.$ac_ext <&5 | - egrep "yes" >/dev/null 2>&1; then - rm -rf conftest* - XEGCC=yes - else - rm -rf conftest* - XEGCC=no - fi - rm -f conftest* - - echo "$ac_t""${XEGCC}" 1>&6 - fi - - echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6 - echo "configure:11868: checking how to produce PIC code" >&5 - wl= - - can_build_shared=yes - if test "$XEGCC" = yes; then - wl='-Wl,' - - case "$xehost_os" in - aix3* | aix4* | irix5* | irix6* | osf3* | osf4*) - # PIC is the default for these OSes. - ;; - - os2*) - # We can build DLLs from non-PIC. - ;; - amigaos*) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - dll_cflags='-m68020 -resident32 -malways-restore-a4' - ;; - *) - dll_cflags='-fPIC' - ;; - esac - else - # PORTME Check for PIC flags for the system compiler. - case "$xehost_os" in - hpux9* | hpux10*) - # Is there a better link_static_flag that works with the bundled CC? - wl='-Wl,' - dll_cflags='+Z' - ;; - - irix5* | irix6*) - wl='-Wl,' - # PIC (with -KPIC) is the default. - ;; - - os2*) - # We can build DLLs from non-PIC. - ;; - - osf3* | osf4*) - # All OSF/1 code is PIC. - wl='-Wl,' - ;; - - sco3.2v5*) - dll_cflags='-belf -Kpic' - wl='-Wl,' - ;; - - unixware*) - dll_cflags="-KPIC" - wl="-Wl," - ;; - - sysv4*) - dll_cflags="-KPIC" - wl="-Wl," - ;; - - sysv5*) - dll_cflags="-KPIC" - wl="-Wl," - ;; - - solaris2*) - dll_cflags='-KPIC' - wl='-Wl,' - ;; - - sunos4*) - dll_cflags='-PIC' - wl='-Qoption ld ' - ;; - - uts4*) - dll_cflags='-pic' - ;; - - *) - can_build_shared=no - ;; - esac - fi - - if test -n "$dll_cflags"; then - echo "$ac_t""${dll_cflags}" 1>&6 - - # Check to make sure the dll_cflags actually works. - echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6 - echo "configure:11961: checking if PIC flag ${dll_cflags} really works" >&5 - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $dll_cflags -DPIC" - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - - # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also - # reports no error. So, we need to grep stderr for (Bundled). - if grep '(Bundled)' config.log >/dev/null; then - echo "$ac_t""no" 1>&6 - can_build_shared=no - dll_cflags= - else - echo "$ac_t""yes" 1>&6 - fi - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "$ac_t""no" 1>&6 - can_build_shared=no - dll_cflags= - fi - rm -f conftest* - CFLAGS="$save_CFLAGS" - else - echo "$ac_t""none" 1>&6 - fi - - if test "$can_build_shared" = "yes"; then - cc_produces_so=no - xldf= - xcldf= - echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6 - echo "configure:12003: checking if C compiler can produce shared libraries" >&5 - if test "$XEGCC" = yes; then - xcldf="-shared" - xldf="-shared" - else # Not using GCC - case "$xehost_os" in - aix3* | aix4*) - xldf="-bE:ELLSONAME.exp -H512 -T512 -bhalt:4 -bM:SRE -bnoentry -lc" - xcldf="${wl}-bE:ELLSONAME.exp ${wl}-H512 ${wl}-T512 ${wl}-bhalt:4 ${wl}-bM:SRE ${wl}-bnoentry ${wl}-lc" - ;; - - freebsd2* | netbsd* | openbsd*) - xldf="-Bshareable" - xcldf="${wl}-Bshareable" - ;; - - freebsd3*) - xcldf="-shared" - ;; - - hpux*) - xldf="-b +s" - xcldf="${wl}-b ${wl}+s" - ;; - - irix5* | irix6* | osf3* | osf4*) - xcldf="${wl}-shared" - xldf="-shared" - ;; - - sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7* | uts4*) - xcldf="-G" - xldf="-G" - ;; - - sunos4*) - xcldf="${wl}-assert ${wl}pure-text ${wl}-Bstatic" - xldf="-assert pure-text -Bstatic" - ;; - esac - fi # End if if we are using gcc - - if test -n "$xcldf"; then - save_LDFLAGS=$LDFLAGS - save_LIBS=$LIBS - save_xe_libs=$xe_libs - LDFLAGS="$xcldf $LDFLAGS" - LIBS= - xe_libs= - ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5' - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - cc_produces_so=yes - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - cc_produces_so=no - fi - rm -f conftest* - LDFLAGS=$save_LDFLAGS - LIBS=$save_LIBS - xe_libs=$save_xe_libs - ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5' - else - cc_produces_so=no - fi - echo "$ac_t""${cc_produces_so}" 1>&6 - - LTLD=$LD - if test -z "$LTLD"; then - ac_prog=ld - if test "$XEGCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 - echo "configure:12086: checking for ld used by GCC" >&5 - ac_prog=`($CC -print-prog-name=ld) 2>&5` - case "$ac_prog" in - # Accept absolute paths. - /*) - if test -z "$LTLD"; then - case "$ac_prog" in - *gcc-lib*) LTLD="$CC" - ;; - *) LTLD="$ac_prog" - ;; - esac - fi - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac - else - echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 - echo "configure:12111: checking for GNU ld" >&5 - fi - - if test -z "$LTLD"; then - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog"; then - LTLD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some GNU ld's only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - if "$LTLD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then - xe_gnu_ld=yes - else - xe_gnu_ld=no - fi - fi - done - IFS="$ac_save_ifs" - fi - - if test -n "$LTLD"; then - echo "$ac_t""${LTLD}" 1>&6 - else - echo "$ac_t""no" 1>&6 - fi - - if test -z "$LTLD" -a "$cc_produces_so" = no; then - { echo "configure: error: no acceptable linker found in \$PATH" 1>&2; exit 1; } - exit 1 - fi - fi - - ld_dynamic_link_flags= - - # Check to see if it really is or isn't GNU ld. - echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6 - echo "configure:12149: checking if the linker is GNU ld" >&5 - # I'd rather use --version here, but apparently some GNU ld's only accept -v. - if $LTLD -v 2>&1 &5; then - xe_gnu_ld=yes - else - xe_gnu_ld=no - fi - echo "$ac_t""${xe_gnu_ld}" 1>&6 - - case "$xehost_os" in - amigaos* | sunos4*) - # On these operating systems, we should treat GNU ld like the system ld. - gnu_ld_acts_native=yes - ;; - *) - gnu_ld_acts_native=no - ;; - esac - - if test "$cc_produces_so" = "yes"; then - dll_ld=$CC - dll_ldflags=$xcldf - can_build_shared=yes - else - # OK - only NOW do we futz about with ld. - # See if the linker supports building shared libraries. - echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6 - echo "configure:12176: checking whether the linker supports shared libraries" >&5 - dll_ld=$CC - dll_ldflags=$LDFLAGS - ld_shlibs=yes - can_build_shared=yes - if test "$xe_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then - # See if GNU ld supports shared libraries. - if $LTLD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then - dll_ld=$CC - dll_ldflags="-shared" - ld_shlibs=yes - else - ld_shlibs=no - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case "$xehost_os" in - aix3*) - dll_ld=$LTLD - dll_ldflags=$xldf - ;; - - aix4*) - dll_ldflags=$xcldf - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # doesn't break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - dll_ld=$LTLD - dll_ldflags=$xldf - dll_post="/usr/lib/c++rt0.o" - ;; - - # Unfortunately, older versions of FreeBSD 2 don't have this feature. - freebsd2*) - dll_ld=$LTLD - dll_ldflags="-Bshareable" - ;; - - # FreeBSD 3, at last, uses gcc -shared to do shared libraries. - freebsd3*) - dll_ldflags="-shared" - ;; - - hpux*) - dll_ld=$LTLD - dll_ldflags=$xldf - ;; - - irix5* | irix6*) - dll_ld=$LTLD - dll_ldflags=$xldf - ;; - - netbsd*) - # Tested with NetBSD 1.2 ld - dll_ld=$LTLD - dll_ldflags=$xldf - ;; - - openbsd*) - dll_ld=$LTLD - dll_ldflags=$xldf - ;; - - osf3* | osf4*) - dll_ld=$LTLD - dll_ldflags=$xldf - ;; - - # For both SCO and Solaris we MAY want to have LDFLAGS include -z text - sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7*) - dll_ld=$LTLD - case "$dll_ld" in - *gcc*) dll_ldflags="-shared" - dll_ld=$CC - ;; - *) dll_ldflags="-G" - ;; - esac - ;; - - sunos4*) - if test "$XEGCC" = yes; then - dll_ld=$CC - else - dll_ld=$LTLD - fi - dll_ldflags=$xldf - ;; - - uts4*) - dll_ld=$LTLD - dll_ldflags="-G" - ;; - - bsdi*) - dll_ldflags="-r" - dll_ld="shlicc2" - ;; - - *) - ld_shlibs=no - can_build_shared=no - ;; - esac - fi - echo "$ac_t""${ld_shlibs}" 1>&6 - if test "$ld_shlibs" = "no"; then - can_build_shared=no - fi - fi # End of if cc_produces_so = no - - - if test "$xe_gnu_ld" = yes; then - if test "$ld_shlibs" = yes; then - ld_dynamic_link_flags="${wl}-export-dynamic" - fi - fi - - if test -z "$ld_dynamic_link_flags"; then - case "$xehost_os" in - aix3*) - ld_dynamic_link_flags= - ;; - - aix4*) - ld_dynamic_link_flags= - ;; - - freebsd2.2*) - ld_dynamic_link_flags= - ;; - - freebsd2*) - ld_dynamic_link_flags= - ;; - - freebsd3*) - ld_dynamic_link_flags= - ;; - - hpux*) - ld_dynamic_link_flags="${wl}-E" - ;; - - irix5* | irix6*) - ld_dynamic_link_flags= - ;; - - netbsd*) - ld_dynamic_link_flags= - ;; - - openbsd*) - ld_dynamic_link_flags= - ;; - - osf3* | osf4*) - ld_dynamic_link_flags= - ;; - - solaris2* | solaris7*) - ld_dynamic_link_flags="${wl}-Bdynamic" - ;; - - sco3.2v5* | unixware* | sysv5* | sysv4*) - ld_dynamic_link_flags="${wl}-Bexport" - ;; - - sunos4*) - ld_dynamic_link_flags= - ;; - - uts4*) - ld_dynamic_link_flags= - ;; - - bsdi*) - ld_dynamic_link_flags= - ;; - - esac - fi # End of if -z ld_dynamic_link_flags - fi # End of if test "$can_build_shared" = "yes" - - - - - - - - - if test "$can_build_shared" = "yes"; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_SHLIB - EOF - cat >> confdefs.h <<\EOF - #define HAVE_SHLIB 1 - EOF - } - - extra_objs="$extra_objs sysdll.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"sysdll.o\"" - fi - extra_objs="$extra_objs emodules.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"emodules.o\"" - fi - INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR src" && if test "$extra_verbose" = "yes"; then echo " Appending \"src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi - test ! -z "$DLL_LIB" && LIBS="-l${DLL_LIB} $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-l${DLL_LIB}\" to \$LIBS"; fi - for ac_func in dlerror _dlerror - do - echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 - echo "configure:12392: checking for $ac_func" >&5 - - cat > conftest.$ac_ext < - /* Override any gcc2 internal prototype to avoid an error. */ - /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ - char $ac_func(); - - int main() { - - /* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ - #if defined (__stub_$ac_func) || defined (__stub___$ac_func) - choke me - #else - $ac_func(); - #endif - - ; return 0; } - EOF - if { (eval echo configure:12418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" - fi - rm -f conftest* - - if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - { test "$extra_verbose" = "yes" && cat << EOF - Defining $ac_tr_func - EOF - cat >> confdefs.h <&6 - fi - done - - else - echo "configure: warning: disabling shared library support" 1>&2 - with_shlib=no - fi - fi - - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 - then - : - else - conftest_rc="$?" - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - - 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 --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 - fi - rm -fr conftest* - - if test "$win32_processes" = "yes"; then - extra_objs="$extra_objs process-nt.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"process-nt.o\"" - fi - else - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_UNIX_PROCESSES - EOF - cat >> confdefs.h <<\EOF - #define HAVE_UNIX_PROCESSES 1 - EOF - } - - extra_objs="$extra_objs process-unix.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"process-unix.o\"" - fi - fi - - - - T="" - for W in $CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done - CFLAGS="$T" - - - T="" - for W in $extra_objs; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done - extra_objs="$T" - - - T="" - for W in -DHAVE_CONFIG_H $c_switch_site $c_switch_machine $c_switch_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done - c_switch_general="$T" - - - T="" - for W in $c_switch_x_site $X_CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done - c_switch_window_system="$T" - - - T="" - for W in $c_switch_general $c_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done - c_switch_all="$T" - - - T="" - for W in $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_run; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done - ld_switch_general="$T" - - - T="" - for W in $ld_switch_x_site; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done - ld_switch_window_system="$T" - - - T="" - for W in $ld_switch_general $ld_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done - ld_switch_all="$T" - - - T="" - for W in $LIBS $libs_machine $libs_system $libs_standard; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done - ld_libs_general="$T" - - - T="" - for W in $X_EXTRA_LIBS $libs_x $X_PRE_LIBS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done - ld_libs_window_system="$T" - - - T="" - for W in $ld_libs_window_system $ld_libs_general; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done - ld_libs_all="$T" - - - - MAKE_SUBDIR="$MAKE_SUBDIR src" && if test "$extra_verbose" = "yes"; then echo " Appending \"src\" to \$MAKE_SUBDIR"; fi - internal_makefile_list="Makefile.in" - SUBDIR_MAKEFILES='' - test -d lock || mkdir lock - for dir in $MAKE_SUBDIR; do - case "$dir" in */* ) ( for d in `echo $dir | sed 's:/: :g'` ; do - test -d "$d" || mkdir "$d"; cd "$d" - done ) ;; - * ) test -d "$dir" || mkdir "$dir" ;; - esac - - T="" - for W in $SUBDIR_MAKEFILES $dir/Makefile $dir/GNUmakefile; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done - SUBDIR_MAKEFILES="$T" - - - T="" - for W in $internal_makefile_list $dir/Makefile.in; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done - internal_makefile_list="$T" - - done - - - - - for dir in src/s src/m; do - if test ! -d "$dir" ; then - echo Making symbolic link to "$srcdir/$dir" - ${LN_S} "$srcdir/$dir" "$dir" - fi - done - - if test "$extra_verbose" = "yes"; then - echo "" - for var in extra_objs c_switch_general c_switch_window_system c_switch_all ld_switch_general ld_switch_window_system ld_switch_all ld_libs_general ld_libs_window_system ld_libs_all; do eval "echo \"$var = '\$$var'\""; done - echo "" - fi - - if test -f $srcdir/src/gdbinit -a ! -f src/gdbinit ; then - echo "creating src/gdbinit"; echo "" - echo "source $srcdir/src/gdbinit" > src/gdbinit - fi - - if test "$__SUNPRO_C" = "yes"; then - echo "creating .sbinit"; echo "" - ( 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 - - rm -f core - - - - - - - - - - - - - - - - - PREFIX=$prefix - while true; do - case "$PREFIX" in - *\$* ) eval "PREFIX=$PREFIX" ;; - *) break ;; - esac - done - - - - EXEC_PREFIX=$exec_prefix - while true; do - case "$EXEC_PREFIX" in - *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;; - *) break ;; - esac - done - - - - - INFODIR=$infodir - while true; do - case "$INFODIR" in - *\$* ) eval "INFODIR=$INFODIR" ;; - *) break ;; - esac - done - - - - - INFOPATH=$infopath - while true; do - case "$INFOPATH" in - *\$* ) eval "INFOPATH=$INFOPATH" ;; - *) break ;; - esac - done - - - - - PACKAGE_PATH=$package_path - while true; do - case "$PACKAGE_PATH" in - *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;; - *) break ;; - esac - done - - - - - LISPDIR=$lispdir - while true; do - case "$LISPDIR" in - *\$* ) eval "LISPDIR=$LISPDIR" ;; - *) break ;; - esac - done - - - - - MODULEDIR=$moduledir - while true; do - case "$MODULEDIR" in - *\$* ) eval "MODULEDIR=$MODULEDIR" ;; - *) break ;; - esac - done - - - - - SITELISPDIR=$sitelispdir - while true; do - case "$SITELISPDIR" in - *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;; - *) break ;; - esac - done - - - - - SITEMODULEDIR=$sitemoduledir - while true; do - case "$SITEMODULEDIR" in - *\$* ) eval "SITEMODULEDIR=$SITEMODULEDIR" ;; - *) break ;; - esac - done - - - - - ETCDIR=$etcdir - while true; do - case "$ETCDIR" in - *\$* ) eval "ETCDIR=$ETCDIR" ;; - *) break ;; - esac - done - - - - - LOCKDIR=$lockdir - while true; do - case "$LOCKDIR" in - *\$* ) eval "LOCKDIR=$LOCKDIR" ;; - *) break ;; - esac - done - - - - - ARCHLIBDIR=$archlibdir - while true; do - case "$ARCHLIBDIR" in - *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;; - *) break ;; - esac - done - - - - - - - - - - - - - - - - - - - - - RECURSIVE_MAKE="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'" - - - - - - - - : ${XEMACS_CC:=$CC} - - - - if test "$with_site_lisp" = "no"; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining INHIBIT_SITE_LISP - EOF - cat >> confdefs.h <<\EOF - #define INHIBIT_SITE_LISP 1 - EOF - } - - fi - if test "$with_site_modules" = "no"; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining INHIBIT_SITE_MODULES - EOF - cat >> confdefs.h <<\EOF - #define INHIBIT_SITE_MODULES 1 - EOF - } - - fi - - - T="" - for W in $ac_configure_args; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done - ac_configure_args="$T" - - { test "$extra_verbose" = "yes" && cat << EOF - Defining EMACS_CONFIGURATION = "$canonical" - EOF - cat >> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <<\EOF - #define GNU_MALLOC 1 - EOF - } - - elif test "$with_system_malloc" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF - Defining USE_SYSTEM_MALLOC - EOF - cat >> confdefs.h <<\EOF - #define USE_SYSTEM_MALLOC 1 - EOF - } - - elif test "$with_debug_malloc" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF - Defining USE_DEBUG_MALLOC - EOF - cat >> confdefs.h <<\EOF - #define USE_DEBUG_MALLOC 1 - EOF - } - - { test "$extra_verbose" = "yes" && cat << \EOF - Defining USE_SYSTEM_MALLOC - EOF - cat >> confdefs.h <<\EOF - #define USE_SYSTEM_MALLOC 1 - EOF - } - - fi - test "$with_i18n3" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF - Defining I18N3 - EOF - cat >> confdefs.h <<\EOF - #define I18N3 1 - EOF - } - - test "$GCC" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF - Defining USE_GCC - EOF - cat >> confdefs.h <<\EOF - #define USE_GCC 1 - EOF - } - - test "$external_widget" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF - Defining EXTERNAL_WIDGET - EOF - cat >> confdefs.h <<\EOF - #define EXTERNAL_WIDGET 1 - EOF - } - - test "$no_doc_file" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF - Defining NO_DOC_FILE - EOF - cat >> confdefs.h <<\EOF - #define NO_DOC_FILE 1 - EOF - } - - test "$with_purify" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF - Defining PURIFY - EOF - cat >> confdefs.h <<\EOF - #define PURIFY 1 - EOF - } - - test "$with_quantify" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF - Defining QUANTIFY - EOF - cat >> confdefs.h <<\EOF - #define QUANTIFY 1 - EOF - } - - test "$with_pop" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF - Defining MAIL_USE_POP - EOF - cat >> confdefs.h <<\EOF - #define MAIL_USE_POP 1 - EOF - } - - test "$with_kerberos" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF - Defining KERBEROS - EOF - cat >> confdefs.h <<\EOF - #define KERBEROS 1 - EOF - } - - test "$with_hesiod" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF - Defining HESIOD - EOF - cat >> confdefs.h <<\EOF - #define HESIOD 1 - EOF - } - - test "$use_union_type" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF - Defining USE_UNION_TYPE - EOF - cat >> confdefs.h <<\EOF - #define USE_UNION_TYPE 1 - EOF - } - - - - ( - if test -f /etc/osversion; then echo "osversion: `cat /etc/osversion`" - else - echo "uname -a: `uname -a`" - fi - echo "" - echo "$0 $quoted_arguments" - ) > Installation - - xemacs_betaname="" - test ! -z "${emacs_beta_version}" && xemacs_betaname="-b${emacs_beta_version}" - - ( - echo " - - XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'. - - Where should the build process find the source code? $srcdir - What installation prefix should install use? $prefix - What operating system and machine description files should XEmacs use? - \`$opsysfile' and \`$machfile' - What compiler should XEmacs be built with? $CC $CFLAGS - Should XEmacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason} - Should XEmacs use the relocating allocator for buffers? $rel_alloc - What window system should XEmacs use? ${window_system}" - if test "$with_x11" = "yes"; then - echo " Where do we find X Windows header files? $x_includes" - echo " Where do we find X Windows libraries? $x_libraries" - fi - if test -n "$site_includes"; then - echo " Additional header files: $site_includes" - fi - if test -n "$site_libraries"; then - echo " Additional libraries: $site_libraries" - fi - if test -n "$site_prefixes"; then - echo " Additional prefixes: $site_prefixes" - fi - if test -n "$runpath"; then - echo " Runtime library search path: $runpath" - fi - test "$with_dnet" = yes && echo " Compiling in support for DNET." - test "$with_socks" = yes && echo " Compiling in support for SOCKS." - test "$with_xauth" = yes && echo " Compiling in support for XAUTH." - if test "$with_xmu" != yes -a "$with_x11" = yes; then - echo " No Xmu; substituting equivalent routines." - fi - - if test "$with_xpm" = yes; then - echo " Compiling in support for XPM images." - elif test "$with_x11" = yes; then - echo " --------------------------------------------------------------------" - echo " WARNING: Compiling without XPM support." - if test "$xpm_problem" != ""; then - echo " Reason: $xpm_problem" - fi - echo " WARNING: You should strongly consider installing XPM." - echo " WARNING: Otherwise toolbars and other graphics will look suboptimal." - echo " WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)" - echo " --------------------------------------------------------------------" - fi - if test "$with_png" = yes; then - echo " Compiling in support for PNG image handling." - elif test "$window_system" != "none"; then - echo " --------------------------------------------------------------------" - echo " WARNING: Compiling without PNG image support." - if test "$png_problem" != ""; then - echo " Reason: $png_problem" - fi - echo " WARNING: You should strongly consider installing the PNG libraries." - echo " WARNING: Otherwise certain images and glyphs may not display." - echo " WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)" - echo " --------------------------------------------------------------------" - fi - test "$with_gif" = yes && echo " Compiling in support for (builtin) GIF image handling." - test "$with_jpeg" = yes && echo " Compiling in support for JPEG image handling." - test "$with_tiff" = yes && echo " Compiling in support for TIFF image handling." - test "$with_xface" = yes && echo " Compiling in support for X-Face message headers." - case "$with_sound" in - nas ) echo " Compiling in network sound (NAS) support." ;; - native ) echo " Compiling in native sound support." ;; - both ) echo " Compiling in both network and native sound support." ;; - esac - test "$old_nas" = yes && echo " nas library lacks error trapping, will play synchronously." - - test "$with_database_berkdb" = yes && echo " Compiling in support for Berkeley DB." - test "$with_database_dbm" = yes && echo " Compiling in support for DBM." - test "$with_database_gnudbm" = yes && echo " Compiling in support for GNU DBM." - - test "$with_umich_ldap" = yes && echo " Compiling in support for LDAP (UMich libs)." - test "$with_ns_ldap" = yes && echo " Compiling in support for LDAP (Netscape SDK)." - test "$with_ldap" = yes -a "$with_umich_ldap" = no -a "$with_ns_ldap" = no && echo " Compiling in support for LDAP (Generic)." - - test "$with_ncurses" = yes && echo " Compiling in support for ncurses." - test "$with_gpm" = yes && echo " Compiling in support for GPM (General Purpose Mouse)." - - test "$with_mule" = yes && echo " Compiling in Mule (multi-lingual) support." - test "$with_file_coding" = yes && echo " Compiling in File coding support." - test "$with_xim" != no && echo " Compiling in XIM (X11R5+ I18N input method) support." - test "$with_xim" = motif && echo " Using Motif to provide XIM support." - test "$with_xim" = xlib && echo " Using raw Xlib to provide XIM support." - test "$with_xfs" = yes && echo " Using XFontSet to provide bilingual menubar." - test "$with_canna" = yes && echo " Compiling in support for Canna on Mule." - if test "$with_wnn" = yes; then - echo " Compiling in support for the WNN input method on Mule." - test "$with_wnn6" = yes && echo " Using WNN version 6." - fi - test "$with_i18n3" = yes && echo " Compiling in I18N support, level 3 (doesn't currently work)." - - test "$with_cde" = yes && echo " Compiling in support for CDE." - test "$with_tooltalk" = yes && echo " Compiling in support for ToolTalk." - test "$with_offix" = yes && echo " Compiling in support for OffiX." - test "$with_dragndrop" = yes && echo " Compiling in EXPERIMENTAL support for Drag'n'Drop ($dragndrop_proto )." - test "$with_workshop" = yes && echo " Compiling in support for Sun WorkShop." - test "$with_session" != no && echo " Compiling in support for proper session-management." - case "$with_menubars" in - lucid ) echo " Using Lucid menubars." ;; - motif ) echo " Using Motif menubars." - echo " *WARNING* The Motif menubar implementation is currently buggy." - echo " We recommend using the Lucid menubar instead." - echo " Re-run configure with --with-menubars='lucid'." ;; - esac - case "$with_scrollbars" in - lucid ) echo " Using Lucid scrollbars." ;; - motif ) echo " Using Motif scrollbars." ;; - athena ) echo " Using Athena scrollbars." ;; - athena3d ) echo " Using Athena-3d scrollbars." ;; - esac - case "$with_dialogs" in - motif ) - echo " Using Motif dialog boxes." - if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then - echo " *WARNING* The Motif dialog boxes cause problems on AIX 4.3 and higher." - echo " We recommend using the Athena dialog boxes instead." - echo " Install libXaw and re-run configure with --with-dialogs='athena'." - echo " Read the PROBLEMS file for more information." - fi; fi - ;; - athena ) echo " Using Athena dialog boxes." ;; - athena3d ) echo " Using Athena-3d dialog boxes." ;; - esac - test "$with_shlib" = "yes" && echo " Compiling in DLL support." - test "$with_clash_detection" = yes && \ - echo " Clash detection will use \"$lockdir\" for locking files." - echo " movemail will use \"$mail_locking\" for locking mail spool files." - test "$with_pop" = yes && echo " Using POP for mail access." - test "$with_kerberos" = yes && echo " Using Kerberos for POP authentication." - test "$with_hesiod" = yes && echo " Using Hesiod to get POP server host." - test "$use_union_type" = yes && echo " Using the union type for Lisp_Objects." - test "$debug" = yes && echo " Compiling in extra code for debugging." - test "$usage_tracking" = yes && echo " Compiling with usage tracking active (Sun internal)." - if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc" \ - != "no no no no no"; then - echo " WARNING: ---------------------------------------------------------" - echo " WARNING: Compiling in support for runtime error checking." - echo " WARNING: XEmacs will run noticeably more slowly as a result." - echo " WARNING: Error checking is on by default for XEmacs beta releases." - echo " WARNING: ---------------------------------------------------------" - fi - echo "" - ) | tee -a Installation - echo "" - - - # Remove any trailing slashes in these variables. - test -n "$prefix" && - prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'` - test -n "$exec_prefix" && - exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'` - - - for file in $internal_makefile_list; do - test "$file" = src/Makefile.in && \ - file="src/Makefile.in:src/Makefile.in.in:src/depend" - ac_output_files="${ac_output_files+$ac_output_files }$file" - done - ac_output_files="$ac_output_files src/paths.h lib-src/config.values" - if test "$with_shlib" = "yes"; then - ac_output_files="$ac_output_files lib-src/ellcc.h" - fi - - trap '' 1 2 15 - - trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - - test "x$prefix" = xNONE && prefix=$ac_default_prefix - # Let make expand exec_prefix. - test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - - # Any assignment to VPATH causes Sun make to only execute - # the first set of double-colon rules, so remove it if not needed. - # If there is a colon in the path, we need to keep it. - if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' - fi - - trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 - - DEFS=-DHAVE_CONFIG_H - - # Without the "./", some shells look in PATH for config.status. - : ${CONFIG_STATUS=./config.status} - - echo creating $CONFIG_STATUS - rm -f $CONFIG_STATUS - cat > $CONFIG_STATUS </dev/null | sed 1q`: - # - # $0 $ac_configure_args - # - # Compiler output produced by configure, useful for debugging - # configure, is in ./config.log if it exists. - - ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" - for ac_option - do - case "\$ac_option" in - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" - exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; - -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.12" - exit 0 ;; - -help | --help | --hel | --he | --h) - echo "\$ac_cs_usage"; exit 0 ;; - *) echo "\$ac_cs_usage"; exit 1 ;; - esac - done - - ac_given_srcdir=$srcdir - ac_given_INSTALL="$INSTALL" - - trap 'rm -fr `echo "$ac_output_files src/config.h lwlib/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 - EOF - cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF - $ac_vpsub - $extrasub - s%@CFLAGS@%$CFLAGS%g - s%@CPPFLAGS@%$CPPFLAGS%g - s%@CXXFLAGS@%$CXXFLAGS%g - s%@DEFS@%$DEFS%g - s%@LDFLAGS@%$LDFLAGS%g - s%@LIBS@%$LIBS%g - s%@exec_prefix@%$exec_prefix%g - s%@prefix@%$prefix%g - s%@program_transform_name@%$program_transform_name%g - s%@bindir@%$bindir%g - s%@sbindir@%$sbindir%g - s%@libexecdir@%$libexecdir%g - s%@datadir@%$datadir%g - s%@sysconfdir@%$sysconfdir%g - s%@sharedstatedir@%$sharedstatedir%g - s%@localstatedir@%$localstatedir%g - s%@libdir@%$libdir%g - s%@includedir@%$includedir%g - s%@oldincludedir@%$oldincludedir%g - s%@infodir@%$infodir%g - s%@mandir@%$mandir%g - s%@LN_S@%$LN_S%g - s%@blddir@%$blddir%g - s%@CC@%$CC%g - s%@CPP@%$CPP%g - s%@start_flags@%$start_flags%g - s%@ld_switch_shared@%$ld_switch_shared%g - s%@start_files@%$start_files%g - s%@ld@%$ld%g - s%@lib_gcc@%$lib_gcc%g - s%@RANLIB@%$RANLIB%g - s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g - s%@INSTALL_DATA@%$INSTALL_DATA%g - s%@YACC@%$YACC%g - s%@SET_MAKE@%$SET_MAKE%g - s%@X_CFLAGS@%$X_CFLAGS%g - s%@X_PRE_LIBS@%$X_PRE_LIBS%g - s%@X_LIBS@%$X_LIBS%g - s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g - s%@install_pp@%$install_pp%g - s%@libs_xauth@%$libs_xauth%g - s%@dnd_objs@%$dnd_objs%g - s%@lwlib_objs@%$lwlib_objs%g - s%@ALLOCA@%$ALLOCA%g - s%@dll_ld@%$dll_ld%g - s%@dll_cflags@%$dll_cflags%g - s%@dll_ldflags@%$dll_ldflags%g - s%@dll_post@%$dll_post%g - s%@dll_ldo@%$dll_ldo%g - s%@ld_dynamic_link_flags@%$ld_dynamic_link_flags%g - s%@SRC_SUBDIR_DEPS@%$SRC_SUBDIR_DEPS%g - s%@INSTALL_ARCH_DEP_SUBDIR@%$INSTALL_ARCH_DEP_SUBDIR%g - s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g - s%@SUBDIR_MAKEFILES@%$SUBDIR_MAKEFILES%g - s%@PROGNAME@%$PROGNAME%g - s%@version@%$version%g - s%@configuration@%$configuration%g - s%@canonical@%$canonical%g - s%@srcdir@%$srcdir%g - s%@pkgdir@%$pkgdir%g - s%@statedir@%$statedir%g - s%@PREFIX@%$PREFIX%g - s%@EXEC_PREFIX@%$EXEC_PREFIX%g - s%@INFODIR_USER_DEFINED@%$INFODIR_USER_DEFINED%g - s%@INFODIR@%$INFODIR%g - s%@infopath@%$infopath%g - s%@INFOPATH_USER_DEFINED@%$INFOPATH_USER_DEFINED%g - s%@INFOPATH@%$INFOPATH%g - s%@package_path@%$package_path%g - s%@PACKAGE_PATH_USER_DEFINED@%$PACKAGE_PATH_USER_DEFINED%g - s%@PACKAGE_PATH@%$PACKAGE_PATH%g - s%@lispdir@%$lispdir%g - s%@LISPDIR_USER_DEFINED@%$LISPDIR_USER_DEFINED%g - s%@LISPDIR@%$LISPDIR%g - s%@moduledir@%$moduledir%g - s%@MODULEDIR_USER_DEFINED@%$MODULEDIR_USER_DEFINED%g - s%@MODULEDIR@%$MODULEDIR%g - s%@sitelispdir@%$sitelispdir%g - s%@SITELISPDIR_USER_DEFINED@%$SITELISPDIR_USER_DEFINED%g - s%@SITELISPDIR@%$SITELISPDIR%g - s%@sitemoduledir@%$sitemoduledir%g - s%@SITEMODULEDIR_USER_DEFINED@%$SITEMODULEDIR_USER_DEFINED%g - s%@SITEMODULEDIR@%$SITEMODULEDIR%g - s%@etcdir@%$etcdir%g - s%@ETCDIR_USER_DEFINED@%$ETCDIR_USER_DEFINED%g - s%@ETCDIR@%$ETCDIR%g - s%@lockdir@%$lockdir%g - s%@LOCKDIR_USER_DEFINED@%$LOCKDIR_USER_DEFINED%g - s%@LOCKDIR@%$LOCKDIR%g - s%@archlibdir@%$archlibdir%g - s%@ARCHLIBDIR_USER_DEFINED@%$ARCHLIBDIR_USER_DEFINED%g - s%@ARCHLIBDIR@%$ARCHLIBDIR%g - s%@docdir@%$docdir%g - s%@bitmapdir@%$bitmapdir%g - s%@extra_objs@%$extra_objs%g - s%@machfile@%$machfile%g - s%@opsysfile@%$opsysfile%g - s%@c_switch_general@%$c_switch_general%g - s%@c_switch_window_system@%$c_switch_window_system%g - s%@c_switch_all@%$c_switch_all%g - s%@ld_switch_general@%$ld_switch_general%g - s%@ld_switch_window_system@%$ld_switch_window_system%g - s%@ld_switch_all@%$ld_switch_all%g - s%@ld_libs_general@%$ld_libs_general%g - s%@ld_libs_window_system@%$ld_libs_window_system%g - s%@ld_libs_all@%$ld_libs_all%g - s%@RECURSIVE_MAKE@%$RECURSIVE_MAKE%g - s%@native_sound_lib@%$native_sound_lib%g - s%@sound_cflags@%$sound_cflags%g - s%@dynodump_arch@%$dynodump_arch%g - s%@XEMACS_CC@%$XEMACS_CC%g - s%@internal_makefile_list@%$internal_makefile_list%g - - CEOF - EOF - - cat >> $CONFIG_STATUS <<\EOF - - # Split the substitutions into bite-sized pieces for seds with - # small command number limits, like on Digital OSF/1 and HP-UX. - ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. - ac_file=1 # Number of current file. - ac_beg=1 # First line for current file. - ac_end=$ac_max_sed_cmds # Line after last line for current file. - ac_more_lines=: - ac_sed_cmds="" - while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file - else - sed "${ac_end}q" conftest.subs > conftest.s$ac_file - fi - if test ! -s conftest.s$ac_file; then - ac_more_lines=false - rm -f conftest.s$ac_file - else - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f conftest.s$ac_file" - else - ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" - fi - ac_file=`expr $ac_file + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_cmds` - fi - done - if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat - fi - EOF - - cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF - for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; - esac - - # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. - - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" - # A "../" for each directory in $ac_dir_suffix. - ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` - else - ac_dir_suffix= ac_dots= - fi - - case "$ac_given_srcdir" in - .) srcdir=. - if test -z "$ac_dots"; then top_srcdir=. - else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; - /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; - *) # Relative path. - srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" - top_srcdir="$ac_dots$ac_given_srcdir" ;; - esac - - case "$ac_given_INSTALL" in - [/$]*) INSTALL="$ac_given_INSTALL" ;; - *) INSTALL="$ac_dots$ac_given_INSTALL" ;; - esac - - echo creating "$ac_file" - rm -f "$ac_file" - configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." - case "$ac_file" in - *Makefile*) ac_comsub="1i\\ - # $configure_input" ;; - *) ac_comsub= ;; - esac - - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` - sed -e "$ac_comsub - s%@configure_input@%$configure_input%g - s%@srcdir@%$srcdir%g - s%@top_srcdir@%$top_srcdir%g - s%@INSTALL@%$INSTALL%g - " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file - fi; done - rm -f conftest.s* - - # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where - # NAME is the cpp macro being defined and VALUE is the value it is being given. - # - # ac_d sets the value in "#define NAME VALUE" lines. - ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' - ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' - ac_dC='\3' - ac_dD='%g' - # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". - ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' - ac_uB='\([ ]\)%\1#\2define\3' - ac_uC=' ' - ac_uD='\4%g' - # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". - ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' - ac_eB='$%\1#\2define\3' - ac_eC=' ' - ac_eD='%g' - - if test "${CONFIG_HEADERS+set}" != set; then - EOF - cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF - fi - for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; - esac - - echo creating $ac_file - - rm -f conftest.frag conftest.in conftest.out - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` - cat $ac_file_inputs > conftest.in - - EOF - - # Transform confdefs.h into a sed script conftest.vals that substitutes - # the proper values into config.h.in to produce config.h. And first: - # Protect against being on the right side of a sed subst in config.status. - # Protect against being in an unquoted here document in config.status. - rm -f conftest.vals - cat > conftest.hdr <<\EOF - s/[\\&%]/\\&/g - s%[\\$`]%\\&%g - s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp - s%ac_d%ac_u%gp - s%ac_u%ac_e%gp - EOF - sed -n -f conftest.hdr confdefs.h > conftest.vals - rm -f conftest.hdr - - # This sed command replaces #undef with comments. This is necessary, for - # example, in the case of _POSIX_SOURCE, which is predefined and required - # on some systems where configure will not decide to define it. - cat >> conftest.vals <<\EOF - s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% - EOF - - # Break up conftest.vals because some shells have a limit on - # the size of here documents, and old seds have small limits too. - - rm -f conftest.tail - while : - do - ac_lines=`grep -c . conftest.vals` - # grep -c gives empty output for an empty file on some AIX systems. - if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi - # Write a limited-size here document to conftest.frag. - echo ' cat > conftest.frag <> $CONFIG_STATUS - sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS - echo 'CEOF - sed -f conftest.frag conftest.in > conftest.out - rm -f conftest.in - mv conftest.out conftest.in - ' >> $CONFIG_STATUS - sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail - rm -f conftest.vals - mv conftest.tail conftest.vals - done - rm -f conftest.vals - - cat >> $CONFIG_STATUS <<\EOF - rm -f conftest.frag conftest.h - echo "/* $ac_file. Generated automatically by configure. */" > conftest.h - cat conftest.in >> conftest.h - rm -f conftest.in - if cmp -s $ac_file conftest.h 2>/dev/null; then - echo "$ac_file is unchanged" - rm -f conftest.h - else - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - fi - rm -f $ac_file - mv conftest.h $ac_file - fi - fi; done - - EOF - cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF - for dir in . $MAKE_SUBDIR; do - ( - cd $dir - rm -f junk.c - < Makefile.in \ - sed -e '/^# Generated/d' \ - -e 's%/\*\*/#.*%%' \ - -e 's/^ *# */#/' \ - -e '/^##/d' \ - -e '/^#/ { - p - d - }' \ - -e '/./ { - s/\([\"]\)/\\\1/g - s/^/"/ - s/$/"/ - }' > junk.c; - - - - echo creating $dir/Makefile - $CPP -I. -I${top_srcdir}/src junk.c \ - | sed -e 's/^\#.*//' \ - -e 's/^[ ][ ]*$//'\ - -e 's/^ / /' \ - | sed -n -e '/^..*$/p' \ - | sed '/^\"/ { - s/\\\([\"]\)/\1/g - s/^[ ]*\"// - s/\"[ ]*$// - }' > Makefile.new - chmod 444 Makefile.new - mv -f Makefile.new Makefile - - echo creating $dir/GNUmakefile - $CPP -I. -I${top_srcdir}/src -DUSE_GNU_MAKE junk.c \ - | sed -e 's/^\#.*//' \ - -e 's/^[ ][ ]*$//'\ - -e 's/^ / /' \ - | sed -n -e '/^..*$/p' \ - | sed '/^\"/ { - s/\\\([\"]\)/\1/g - s/^[ ]*\"// - s/\"[ ]*$// - }' > Makefile.new - chmod 444 Makefile.new - mv -f Makefile.new GNUmakefile - - rm -f junk.c - ) - done - - sed < config.status >> lib-src/config.values \ - -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \ - -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \ - -e 's/^\([^ ]*\) $/\1 ""/' \ - -e 's/ 1$/ t/' - - - exit 0 - EOF - chmod +x $CONFIG_STATUS - rm -fr confdefs* $ac_clean_files - test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 -archlibdir='${libdir}/${PROGNAME}-${version}/${configuration}' -with_site_lisp='no' -with_menubars='' -with_scrollbars='' -with_dialogs='' -with_file_coding='' -puresize='' -cpp='' cppflags='' libs='' ldflags='' -dynamic='' -with_x11='' -with_msw='' -rel_alloc='default' -with_system_malloc='default' -with_dlmalloc='default' -native_sound_lib='' -use_assertions="yes" -with_toolbars="" -with_tty="" -use_union_type="no" -with_dnet="" - - - - -arguments="$@" - -quoted_sed_magic=s/"'"/"'"'"'"'"'"'"'"/g -quoted_arguments= -for i in "$@"; do - case "$i" in - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) ;; - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; - *) - quoted_i="`echo '' $i | sed -e 's:^ ::' -e $quoted_sed_magic`" - quoted_arguments="$quoted_arguments '$quoted_i'" ;; - esac -done - -while test $# != 0; do - arg="$1"; shift - case "$arg" in - --no-create|--no-recursion) ;; - -* ) - case "$arg" in - -*=*) - opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\([^=]*\)=.*$:\1:'` - val=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*[^=]*=\(.*\)$:\1:'` - valomitted=no - ;; - -*) - opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\(.*\)$:\1:'` - val="yes" valomitted=yes - ;; - esac - - optname="$opt" - opt="`echo '' $opt | sed -e 's:^ ::' | tr - _`" - - case "${valomitted}-${opt}" in yes-without_* ) - opt=`echo $opt | sed 's/without/with/'` - valomitted="no" val="no" ;; - esac - - case "$opt" in - - run_in_place | \ - with_site_lisp | \ - with_x | \ - with_x11 | \ - with_msw | \ - with_gcc | \ - with_gnu_make | \ - dynamic | \ - with_ncurses | \ - with_dnet | \ - with_socks | \ - with_dragndrop | \ - with_cde | \ - with_offix | \ - with_gpm | \ - with_xpm | \ - with_xface | \ - with_gif | \ - with_jpeg | \ - with_png | \ - with_tiff | \ - with_session | \ - with_xmu | \ - with_quantify | \ - with_toolbars | \ - with_tty | \ - with_xfs | \ - with_i18n3 | \ - with_mule | \ - with_file_coding | \ - with_canna | \ - with_wnn | \ - with_wnn6 | \ - with_workshop | \ - with_sparcworks | \ - with_tooltalk | \ - with_ldap | \ - with_pop | \ - with_kerberos | \ - with_hesiod | \ - with_dnet | \ - with_infodock | \ - external_widget | \ - verbose | \ - extra_verbose | \ - const_is_losing | \ - usage_tracking | \ - use_union_type | \ - debug | \ - use_assertions | \ - use_minimal_tagbits | \ - use_indexed_lrecord_implementation | \ - gung_ho | \ - use_assertions | \ - memory_usage_stats | \ - with_clash_detection | \ - with_shlib | \ - no_doc_file ) - case "$val" in - y | ye | yes ) val=yes ;; - n | no ) val=no ;; - * ) (echo "$progname: Usage error:" -echo " " "The \`--$optname' option requires a boolean value: \`yes' or \`no'." -echo " Use \`$progname --help' to show usage.") >&2 && exit 1 ;; - esac - eval "$opt=\"$val\"" ;; - - - srcdir | \ - compiler | \ - cflags | \ - cpp | \ - cppflags | \ - libs | \ - ldflags | \ - puresize | \ - cache_file | \ - native_sound_lib | \ - site_lisp | \ - x_includes | \ - x_libraries | \ - site_includes | \ - site_libraries | \ - site_prefixes | \ - site_runtime_libraries ) - if test "$valomitted" = "yes" ; then - if test "$#" = 0 ; then - (echo "$progname: Usage error:" -echo " " "The \`--$optname' option requires a value." -echo " Use \`$progname --help' to show usage.") >&2 && exit 1; - fi - val="$1"; shift - fi - eval "$opt=\"$val\"" - ;; - - rel_alloc | \ - with_dlmalloc | \ - with_debug_malloc | use_debug_malloc | \ - with_system_malloc | use_system_malloc ) - case "$val" in - y | ye | yes ) val=yes ;; - n | no ) val=no ;; - d | de | def | defa | defau | defaul | default ) val=default ;; - * ) (echo "$progname: Usage error:" -echo " " "The \`--$optname' option requires one of these values: - \`yes', \`no', or \`default'." -echo " Use \`$progname --help' to show usage.") >&2 && exit 1 ;; - esac - case "$opt" in use_* ) opt="`echo $opt | sed s/use/with/`" ;; esac - eval "$opt=\"$val\"" - ;; - - "with_database" ) - with_database_berkdb=no - with_database_dbm=no - with_database_gnudbm=no - for x in `echo "$val" | sed -e 's/,/ /g'` ; do - case "$x" in - no ) ;; - b | be | ber | berk | berkd | berkdb ) with_database_berkdb=yes ;; - d | db | dbm ) with_database_dbm=yes ;; - g | gn | gnu | gnud | gnudb | gnudbm ) with_database_gnudbm=yes ;; - * ) (echo "$progname: Usage error:" -echo " " "The \`--$optname' option value - must be either \`no' or a comma-separated list - of one or more of \`berkdb', \`dbm', or \`gnudbm'." -echo " Use \`$progname --help' to show usage.") >&2 && exit 1 ;; - esac - done - if test "$with_database_dbm" = "yes" -a \ - "$with_database_gnudbm" = "yes"; then - (echo "$progname: Usage error:" -echo " " "Only one of \`dbm' and \`gnudbm' may be specified - with the \`--$optname' option." -echo " Use \`$progname --help' to show usage.") >&2 && exit 1 - fi - ;; - - "with_sound" ) - case "$val" in - y | ye | yes ) val=native ;; - n | no | non | none ) val=no;; - na | nat | nati | nativ | native ) val=native ;; - ne | net | neta | netau | netaud | netaudi | netaudio | nas ) val=nas ;; - b | bo | bot | both ) val=both;; - * ) (echo "$progname: Usage error:" -echo " " "The \`--$optname' option must have one of these values: - \`native', \`nas', \`both', or \`none'." -echo " Use \`$progname --help' to show usage.") >&2 && exit 1 ;; - esac - eval "$opt=\"$val\"" - ;; - - "with_xim" ) - case "$val" in - y | ye | yes ) val=yes ;; - n | no | non | none ) val=no ;; - x | xl | xli | xlib ) val=xlib ;; - m | mo | mot | moti | motif ) val=motif ;; - * ) (echo "$progname: Usage error:" -echo " " "The \`--$optname' option must have one of these values: - \`motif', \`xlib', \`yes', or \`no'." -echo " Use \`$progname --help' to show usage.") >&2 && exit 1 ;; - esac - eval "$opt=\"$val\"" - ;; - - "with_xfs" ) - case "$val" in - y | ye | yes ) val=yes ;; - n | no | non | none ) val=no ;; - * ) (echo "$progname: Usage error:" -echo " " "The \`--$optname' option must have one of these values: - \`yes', or \`no'." -echo " Use \`$progname --help' to show usage.") >&2 && exit 1 ;; - esac - eval "$opt=\"$val\"" - ;; - - "mail_locking" ) - case "$val" in - lockf ) val=lockf ;; - flock ) val=flock ;; - file ) val=file ;; - * ) (echo "$progname: Usage error:" -echo " " "The \`--$optname' option must have one of these values: - \`lockf', \`flock', or \`file'." -echo " Use \`$progname --help' to show usage.") >&2 && exit 1 ;; - esac - eval "$opt=\"$val\"" - ;; - - "error_checking" ) - - for x in `echo "$val" | sed -e 's/,/ /g'` ; do - case "$x" in - n | no | non | none ) new_default=no ;; - a | al | all ) new_default=yes ;; - - extents ) error_check_extents=yes ;; - noextents ) error_check_extents=no ;; - - typecheck ) error_check_typecheck=yes ;; - notypecheck ) error_check_typecheck=no ;; - - bufpos ) error_check_bufpos=yes ;; - nobufpos ) error_check_bufpos=no ;; - - gc ) error_check_gc=yes ;; - nogc ) error_check_gc=no ;; - - malloc ) error_check_malloc=yes ;; - nomalloc ) error_check_malloc=no ;; - - * ) bogus_error_check=yes ;; - esac - if test "$bogus_error_check" -o \ - \( -n "$new_default" -a -n "$echeck_notfirst" \) ; then - if test "$error_check_default" = yes ; then - types="\`all' (default), \`none', \`noextents', \`notypecheck', \`nobufpos', \`nogc', and \`nomalloc'." - else - types="\`all', \`none' (default), \`extents', \`typecheck', \`bufpos', \`gc', and \`malloc'." - fi - (echo "$progname: Usage error:" -echo " " "Valid types for the \`--$optname' option are: - $types." -echo " Use \`$progname --help' to show usage.") >&2 && exit 1 - elif test -n "$new_default" ; then - error_check_extents=$new_default - error_check_typecheck=$new_default - error_check_bufpos=$new_default - error_check_gc=$new_default - error_check_malloc=$new_default - new_default= # reset this - fi - echeck_notfirst=true - done - ;; - - - prefix | exec_prefix | bindir | datadir | statedir | libdir | \ - mandir | infodir | infopath | lispdir | etcdir | lockdir | pkgdir | \ - archlibdir | docdir | package_path ) - if test "$valomitted" = "yes"; then - if test "$#" = 0; then - (echo "$progname: Usage error:" -echo " " "The \`--$optname' option requires a value." -echo " Use \`$progname --help' to show usage.") >&2 && exit 1; - fi - val="$1"; shift - fi - eval "$opt=\"$val\"" - - case "$opt" in - lispdir ) { test "$extra_verbose" = "yes" && cat << \EOF - Defining LISPDIR_USER_DEFINED -EOF -cat >> confdefs.h <<\EOF -#define LISPDIR_USER_DEFINED 1 -EOF -} - ;; - etcdir ) { test "$extra_verbose" = "yes" && cat << \EOF - Defining ETCDIR_USER_DEFINED -EOF -cat >> confdefs.h <<\EOF -#define ETCDIR_USER_DEFINED 1 -EOF -} - ;; - infodir ) { test "$extra_verbose" = "yes" && cat << \EOF - Defining INFODIR_USER_DEFINED -EOF -cat >> confdefs.h <<\EOF -#define INFODIR_USER_DEFINED 1 -EOF -} - ;; - infopath ) { test "$extra_verbose" = "yes" && cat << \EOF - Defining INFOPATH_USER_DEFINED -EOF -cat >> confdefs.h <<\EOF -#define INFOPATH_USER_DEFINED 1 -EOF -} - ;; - package_path ) { test "$extra_verbose" = "yes" && cat << \EOF - Defining PACKAGE_PATH_USER_DEFINED -EOF -cat >> confdefs.h <<\EOF -#define PACKAGE_PATH_USER_DEFINED 1 -EOF -} - ;; - datadir ) - { test "$extra_verbose" = "yes" && cat << \EOF - Defining INFODIR_USER_DEFINED -EOF -cat >> confdefs.h <<\EOF -#define INFODIR_USER_DEFINED 1 -EOF -} - - { test "$extra_verbose" = "yes" && cat << \EOF - Defining LISPDIR_USER_DEFINED -EOF -cat >> confdefs.h <<\EOF -#define LISPDIR_USER_DEFINED 1 -EOF -} - - { test "$extra_verbose" = "yes" && cat << \EOF - Defining ETCDIR_USER_DEFINED -EOF -cat >> confdefs.h <<\EOF -#define ETCDIR_USER_DEFINED 1 -EOF -} - ;; - statedir | lockdir ) { test "$extra_verbose" = "yes" && cat << \EOF - Defining LOCKDIR_USER_DEFINED -EOF -cat >> confdefs.h <<\EOF -#define LOCKDIR_USER_DEFINED 1 -EOF -} - ;; - exec_prefix | libdir | archlibdir ) { test "$extra_verbose" = "yes" && cat << \EOF - Defining ARCHLIBDIR_USER_DEFINED -EOF -cat >> confdefs.h <<\EOF -#define ARCHLIBDIR_USER_DEFINED 1 -EOF -} - ;; - esac - ;; - - "no_create" ) ;; - - "usage" | "help" ) ${PAGER-more} ${srcdir}/configure.usage; exit 0 ;; - - "with_menubars" | "with_scrollbars" | "with_dialogs" ) - case "$val" in - l | lu | luc | luci | lucid ) val=lucid ;; - m | mo | mot | moti | motif ) val=motif ;; - athena3d | athena-3d ) val=athena3d ;; - a | at | ath | athe | athen | athena ) val=athena ;; - n | no | non | none ) val=no ;; - * ) (echo "$progname: Usage error:" -echo " " "The \`--$optname' option must have one of these values: - \`lucid', \`motif', \`athena', \`athena3d', or \`no'." -echo " Use \`$progname --help' to show usage.") >&2 && exit 1 ;; - esac - eval "$opt=\"$val\"" - ;; - - * ) (echo "$progname: Usage error:" -echo " " "Unrecognized option: $arg" -echo " Use \`$progname --help' to show usage.") >&2 && exit 1 ;; - - esac - ;; - - *-*-*) configuration="$arg" ;; - - *) (echo "$progname: Usage error:" -echo " " "Unrecognized argument: $arg" -echo " Use \`$progname --help' to show usage.") >&2 && exit 1 ;; - - esac -done - - -test -n "$cpp" && CPP="$cpp" -test -n "$cppflags" && CPPFLAGS="$cppflags" -test -n "$libs" && LIBS="$libs" -test -n "$ldflags" && LDFLAGS="$ldflags" - -eval set x "$quoted_arguments"; shift - -test "$extra_verbose" = "yes" && verbose=yes - -case "$site_includes" in *:* ) site_includes="`echo '' $site_includes | sed -e 's/^ //' -e 's/:/ /g'`";; esac -case "$site_libraries" in *:* ) site_libraries="`echo '' $site_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac -case "$site_prefixes" in *:* ) site_prefixes="`echo '' $site_prefixes | sed -e 's/^ //' -e 's/:/ /g'`";; esac -case "$site_runtime_libraries" in *:* ) site_runtime_libraries="`echo '' $site_runtime_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac - -test -n "$with_x" && with_x11="$with_x" - - -if test -n "$gung_ho"; then - test -z "$use_minimal_tagbits" && use_minimal_tagbits="$gung_ho" - test -z "$use_indexed_lrecord_implementation" && \ - use_indexed_lrecord_implementation="$gung_ho" -fi -if test "$use_minimal_tagbits" = "no"; then - test "$with_dlmalloc" = "yes" && \ - (echo "$progname: Usage error:" -echo " " "--with-dlmalloc requires --use-minimal-tagbits" -echo " Use \`$progname --help' to show usage.") >&2 && exit 1 - with_dlmalloc=no -fi - - - -if test "$with_cde $with_tooltalk" = "yes no"; then - (echo "$progname: Usage error:" -echo " " "--with-cde requires --with-tooltalk" -echo " Use \`$progname --help' to show usage.") >&2 && exit 1 -elif test "$with_tooltalk" = "no" ; then with_cde=no -elif test "$with_cde" = "yes"; then with_tooltalk=yes -fi - - -if test "$run_in_place" = "yes"; then - echo "configure: warning: "The --run-in-place option is ignored because it is unnecessary."" 1>&2 -fi - -case "$srcdir" in - - "" ) - for dir in "`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`" "." ".." ; do - if test -f "$dir/src/lisp.h" -a \ - -f "$dir/lisp/version.el" ; then - srcdir="$dir" - break - fi - done - if test -z "$srcdir" ; then - (echo "$progname: Usage error:" -echo " " "Neither the current directory nor its parent seem to - contain the XEmacs sources. If you do not want to build XEmacs in its - source tree, you should run \`$progname' in the directory in which - you wish to build XEmacs, using the \`--srcdir' option to say where the - sources may be found." -echo " Use \`$progname --help' to show usage.") >&2 && exit 1 - fi - ;; - - * ) - if test ! -f "$srcdir/src/lisp.h" -o \ - ! -f "$srcdir/lisp/version.el" ; then - (echo "$progname: Usage error:" -echo " " "The directory specified with the \`--srcdir' option, - \`$srcdir', doesn't seem to contain the XEmacs sources. You should - either run the \`$progname' script at the top of the XEmacs source - tree, or use the \`--srcdir' option to specify the XEmacs source directory." -echo " Use \`$progname --help' to show usage.") >&2 && exit 1 - fi - ;; -esac - -if test -z "$configuration"; then - echo $ac_n "checking "host system type"""... $ac_c" 1>&6 -echo "configure:759: checking "host system type"" >&5 - if configuration=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess | \ - sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'` ; then - echo "$ac_t""$configuration" 1>&6 - else - echo "$ac_t""unknown" 1>&6 - (echo "$progname: Usage error:" -echo " " "XEmacs has not been ported to this host type. -Try explicitly specifying the CONFIGURATION when rerunning configure." -echo " Use \`$progname --help' to show usage.") >&2 && exit 1 - fi -fi - -echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:773: checking whether ln -s works" >&5 - -rm -f conftestdata -if ln -s X conftestdata 2>/dev/null -then - rm -f conftestdata - ac_cv_prog_LN_S="ln -s" -else - ac_cv_prog_LN_S=ln -fi -LN_S="$ac_cv_prog_LN_S" -if test "$ac_cv_prog_LN_S" = "ln -s"; then - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - -for dir in lisp etc man info; do - if test ! -d "$dir" ; then - echo Making symbolic link to "$srcdir/$dir" - ${LN_S} "$srcdir/$dir" "$dir" - fi -done - -absolute_pwd="`pwd`"; -if test -n "$PWD" -a "`cd $PWD && pwd`" = "$absolute_pwd" -then blddir="$PWD" -else blddir="$absolute_pwd" -fi - - -case "$srcdir" in - /* ) ;; - . ) srcdir="$blddir" ;; - * ) srcdir="`cd $srcdir && pwd`" ;; -esac - -if test `pwd` != `sh -c cd $srcdir && pwd` \ - && test -f "$srcdir/src/config.h"; then - (echo "$progname: WARNING: The directory tree \`$srcdir' is being used" - echo " as a build directory right now; it has been configured in its own" - echo " right. To configure in another directory as well, you MUST" - echo " use GNU make. If you do not have GNU make, then you must" - echo " now do \`make distclean' in $srcdir," - echo " and then run $progname again.") >&2 - extrasub='/^VPATH[ ]*=/c\ -vpath %.c $(srcdir)\ -vpath %.h $(srcdir)\ -vpath %.y $(srcdir)\ -vpath %.l $(srcdir)\ -vpath %.s $(srcdir)\ -vpath %.in $(srcdir)' -fi - -. "$srcdir/version.sh" || exit 1; -if test -n "$emacs_beta_version"; then beta=yes; else beta=no; fi -: "${extra_verbose=$beta}" -version="${emacs_major_version}.${emacs_minor_version}" -{ test "$extra_verbose" = "yes" && cat << EOF - Defining EMACS_MAJOR_VERSION = $emacs_major_version -EOF -cat >> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <<\EOF -#define ERROR_CHECK_EXTENTS 1 -EOF -} - -test "${error_check_typecheck=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF - Defining ERROR_CHECK_TYPECHECK -EOF -cat >> confdefs.h <<\EOF -#define ERROR_CHECK_TYPECHECK 1 -EOF -} - -test "${error_check_bufpos=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF - Defining ERROR_CHECK_BUFPOS -EOF -cat >> confdefs.h <<\EOF -#define ERROR_CHECK_BUFPOS 1 -EOF -} - -test "${error_check_gc=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF - Defining ERROR_CHECK_GC -EOF -cat >> confdefs.h <<\EOF -#define ERROR_CHECK_GC 1 -EOF -} - -test "${error_check_malloc=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF - Defining ERROR_CHECK_MALLOC -EOF -cat >> confdefs.h <<\EOF -#define ERROR_CHECK_MALLOC 1 -EOF -} - -if test "${debug:=$beta}" = "yes"; then - use_assertions=yes memory_usage_stats=yes - extra_objs="$extra_objs debug.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"debug.o\"" - fi - { test "$extra_verbose" = "yes" && cat << \EOF - Defining DEBUG_XEMACS -EOF -cat >> confdefs.h <<\EOF -#define DEBUG_XEMACS 1 -EOF -} - -fi -test "$use_assertions" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF - Defining USE_ASSERTIONS -EOF -cat >> confdefs.h <<\EOF -#define USE_ASSERTIONS 1 -EOF -} - -test "$memory_usage_stats" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF - Defining MEMORY_USAGE_STATS -EOF -cat >> confdefs.h <<\EOF -#define MEMORY_USAGE_STATS 1 -EOF -} - - - -echo "checking "the configuration name"" 1>&6 -echo "configure:989: checking "the configuration name"" >&5 -internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'` -if canonical=`$srcdir/config.sub "$internal_configuration"` ; then : ; else - exit $? -fi - - - - - -machine='' opsys='' - -case "$canonical" in - sparc-*-* ) machine=sparc ;; - alpha-*-* ) machine=alpha ;; - vax-*-* ) machine=vax ;; - mips-dec-* ) machine=pmax ;; - mips-sgi-* ) machine=iris4d ;; - romp-ibm-* ) machine=ibmrt ;; - rs6000-ibm-aix* ) machine=ibmrs6000 ;; - powerpc-ibm-aix* ) machine=ibmrs6000 ;; - powerpc*-* ) machine=powerpc ;; - hppa-*-* ) machine=hp800 ;; - m88k-dg-* ) machine=aviion ;; - m68*-sony-* ) machine=news ;; - mips-sony-* ) machine=news-risc ;; - clipper-* ) machine=clipper ;; -esac - -case "$canonical" in - *-*-linux* ) opsys=linux ;; - *-*-netbsd* ) opsys=netbsd ;; - *-*-openbsd* ) opsys=openbsd ;; - *-*-nextstep* ) opsys=nextstep ;; - *-*-vms ) opsys=vms ;; - - *-dec-osf1.3 | *-dec-osf2* ) opsys=decosf1-3 ;; - *-dec-osf1.2 | *-dec-osf1* ) opsys=decosf1-2 ;; - *-dec-osf3.[2-9] ) opsys=decosf3-2 ;; - *-dec-osf3* ) opsys=decosf3-1 ;; - *-dec-osf4* ) opsys=decosf4-0 ;; - - *-*-ultrix[0-3].* | *-*-ultrix4.0* ) opsys=bsd4-2 ;; - *-*-ultrix4.[12]* ) opsys=bsd4-3 ;; - *-*-ultrix* ) opsys=ultrix4-3 ;; - - *-*-aix3.1* ) opsys=aix3-1 ;; - *-*-aix3.2.5 ) opsys=aix3-2-5 ;; - *-*-aix3* ) opsys=aix3-2 ;; - *-*-aix4.2* ) opsys=aix4-2 ;; - *-*-aix4.1* ) opsys=aix4-1 ;; - *-*-aix4* ) opsys=aix4 ;; - - *-gnu* ) opsys=gnu ;; - *-*-bsd4.[01] ) opsys=bsd4-1 ;; - *-*-bsd4.2 ) opsys=bsd4-2 ;; - *-*-bsd4.3 ) opsys=bsd4-3 ;; - *-*-aos4.2 ) opsys=bsd4-2 ;; - *-*-aos* ) opsys=bsd4-3 ;; - *-*-sysv0 | *-*-sysvr0 ) opsys=usg5-0 ;; - *-*-sysv2 | *-*-sysvr2 ) opsys=usg5-2 ;; - *-*-sysv2.2 | *-*-sysvr2.2 ) opsys=usg5-2-2 ;; - *-*-sysv3* | *-*-sysvr3* ) opsys=usg5-3 ;; - *-*-sysv4.1* | *-*-sysvr4.1* )opsys=usg5-4 NON_GNU_CPP=/usr/lib/cpp ;; - *-*-sysv4.[2-9]* | *-sysvr4.[2-9]* ) - if test -z "$NON_GNU_CPP" ; then - for prog in "/usr/ccs/lib/cpp" "/lib/cpp"; do - if test -f "$prog"; then NON_GNU_CPP="$prog"; break; fi - done - fi - opsys=usg5-4-2 ;; - *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;; - *-*-mach_bsd4.3* ) opsys=mach-bsd4-3 ;; -esac - -case "$canonical" in - - *-*-netbsd* ) - case "$canonical" in - i[3-9]86-*-netbsd*) machine=intel386 ;; - hp300-*-netbsd* | amiga-*-netbsd* | sun3-*-netbsd* | mac68k-*-netbsd* | da30-*-netbsd* | m68k-*-netbsd* ) - machine=hp9000s300 ;; - pc532-*-netbsd* | ns32k-*-netbsd* ) machine=ns32000 ;; - pmax-*-netbsd* | mips-*-netbsd* ) machine=pmax ;; - esac - ;; - - *-*-openbsd* ) - case "${canonical}" in - alpha*-*-openbsd*) machine=alpha ;; - i386-*-openbsd*) machine=intel386 ;; - m68k-*-openbsd*) machine=hp9000s300 ;; - mipsel-*-openbsd*) machine=pmax ;; - ns32k-*-openbsd*) machine=ns32000 ;; - sparc-*-openbsd*) machine=sparc ;; - vax-*-openbsd*) machine=vax ;; - esac - ;; - - arm-acorn-riscix1.1* ) machine=acorn opsys=riscix1-1 ;; - arm-acorn-riscix1.2* | arm-acorn-riscix ) machine=acorn opsys=riscix1-2 ;; - - fx80-alliant-* ) machine=alliant4 opsys=bsd4-2 ;; - i860-alliant-* ) machine=alliant-2800 opsys=bsd4-3 ;; - - m68*-altos-sysv* ) machine=altos opsys=usg5-2 ;; - - 580-amdahl-sysv* ) machine=amdahl opsys=usg5-2-2 ;; - - m68*-apollo-* ) machine=apollo opsys=bsd4-3 ;; - - we32k-att-sysv* ) machine=att3b opsys=usg5-2-2 ;; - - m68*-att-sysv* ) machine=7300 opsys=usg5-2-2 ;; - - rs6000-bull-bosx* ) machine=ibmrs6000 opsys=aix3-2 ;; # dpx20 - m68*-bull-sysv3* ) machine=dpx2 opsys=usg5-3 ;; # dpx2 - m68*-bull-sysv2* ) machine=sps7 opsys=usg5-2 ;; # sps7 - - - celerity-celerity-bsd* ) machine=celerity opsys=bsd4-2 ;; - - *-convex-bsd* | *-convex-convexos* ) - machine=convex opsys=bsd4-3 - NON_GNU_CPP="cc -E -P" - ;; - - i[3-9]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;; - - i586-dg-dgux*R4* | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;; - m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;; - m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) opsys=dgux5-4r2 ;; - m88k-dg-dgux* ) opsys=dgux ;; - - m68k-motorola-sysv* | m68000-motorola-sysv* ) machine=delta opsys=usg5-3 ;; - m88k-motorola-sysv4* ) - machine=delta88k opsys=usg5-4-2 - ;; - m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) machine=delta88k opsys=usg5-3 ;; - - m68*-dual-sysv* ) machine=dual opsys=usg5-2 ;; - m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;; - - ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;; - - pn-gould-bsd4.2* ) machine=gould opsys=bsd4-2 ;; - pn-gould-bsd4.3* ) machine=gould opsys=bsd4-3 ;; - np1-gould-bsd* ) machine=gould-np1 opsys=bsd4-3 ;; - - m88k-harris-cxux* ) - case "`uname -r`" in - [56].[0-9] ) machine=nh4000 opsys=cxux ;; - [7].[0-9] ) machine=nh4000 opsys=cxux7 ;; - esac - NON_GNU_CPP="/lib/cpp" - ;; - m68k-harris-cxux* ) machine=nh3000 opsys=cxux ;; - powerpc-harris-powerunix ) machine=nh6000 opsys=powerunix NON_GNU_CPP="cc -Xo -E -P" ;; - - xps*-honeywell-sysv* ) machine=xps100 opsys=usg5-2 ;; - - m68*-hp-bsd* ) machine=hp9000s300 opsys=bsd4-3 ;; - - *-hp-hpux* ) - case "$canonical" in - m68* ) machine=hp9000s300 ;; - hppa* ) machine=hp800 ;; - esac - - case "$canonical" in - *-hp-hpux7* ) opsys=hpux ;; - *-hp-hpux8* ) opsys=hpux8 ;; - *-hp-hpux9* ) opsys=hpux9 ;; - *-hp-hpux10* ) opsys=hpux10 ;; - *-hp-hpux11* ) opsys=hpux11 ;; - * ) opsys=hpux ;; - esac - - case "$opsys" in hpux9 | hpux10 ) extra_objs="$extra_objs strcat.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"strcat.o\"" - fi ;; esac - - if test "$opsys" = "hpux10" -o "$opsys" = "hpux11"; then \ - ansi_flag="-Ae"; else ansi_flag="-Aa"; fi - NON_GNU_CC="cc $ansi_flag" NON_GNU_CPP="cc $ansi_flag -E" - - case "$canonical" in *-hp-hpux*shr* ) opsys="${opsys}-shr" ;; esac - ;; - - orion-orion-bsd* ) machine=orion opsys=bsd4-2 ;; - clipper-orion-bsd* ) machine=orion105 opsys=bsd4-2 ;; - - i[3-9]86-ibm-aix1.1* ) machine=ibmps2-aix opsys=usg5-2-2 ;; - i[3-9]86-ibm-aix1.[23]* | i[3-9]86-ibm-aix* ) machine=ibmps2-aix opsys=usg5-3 ;; - i370-ibm-aix*) machine=ibm370aix opsys=usg5-3 ;; - romp-ibm-aos* ) opsys=bsd4-3 ;; - romp-ibm-bsd* ) opsys=bsd4-3 ;; - romp-ibm-mach* ) opsys=mach-bsd4-3 ;; - - m68*-isi-bsd4.2* ) machine=isi-ov opsys=bsd4-2 ;; - m68*-isi-bsd4.3* ) machine=isi-ov opsys=bsd4-3 ;; - - i[3-9]86-intsys-sysv* ) machine=is386 opsys=usg5-2-2 ;; - - i[3-9]86-prime-sysv* ) machine=i386 opsys=usg5-3 ;; - - i[3-9]86-sequent-bsd* ) machine=symmetry opsys=bsd4-3 ;; - - i[3-9]86-sequent-ptx* ) machine=sequent-ptx opsys=ptx NON_GNU_CPP="/lib/cpp" ;; - - i[3-9]86-ncr-sysv* ) machine=ncr386 opsys=usg5-4-2 ;; - - i860-intel-osf1* ) machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp ;; - - i860-*-sysv4* ) machine=i860 opsys=usg5-4 NON_GNU_CC="/bin/cc" NON_GNU_CPP="/usr/ccs/lib/cpp" ;; - - m68*-masscomp-rtu* ) machine=masscomp opsys=rtu ;; - - m68*-megatest-bsd* ) machine=mega68 opsys=bsd4-2 ;; - - mips-mips-usg* ) machine=mips4 ;; - mips-mips-riscos4 ) - machine=mips4 - NON_GNU_CC="cc -systype bsd43" - NON_GNU_CPP="cc -systype bsd43 -E" - case "$canonical" in - mips-mips-riscos4* ) opsys=bsd4-3 ;; - mips-mips-riscos5* ) opsys=riscos5 ;; - esac - ;; - mips-mips-bsd* ) machine=mips opsys=bsd4-3 ;; - mips-mips-* ) machine=mips opsys=usg5-2-2 ;; - - m68*-next-* | m68k-*-nextstep* ) machine=m68k opsys=nextstep ;; - - ns32k-ns-genix* ) machine=ns32000 opsys=usg5-2 ;; - - m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) machine=tower32 opsys=usg5-2-2 ;; - m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) machine=tower32v3 opsys=usg5-3 ;; - - m68*-nixdorf-sysv* ) machine=targon31 opsys=usg5-2-2 ;; - - m68*-nu-sysv* ) machine=nu opsys=usg5-2 ;; - - m68*-plexus-sysv* ) machine=plexus opsys=usg5-2 ;; - - pyramid-pyramid-bsd* ) machine=pyramid opsys=bsd4-2 ;; - - ns32k-sequent-bsd4.2* ) machine=sequent opsys=bsd4-2 ;; - ns32k-sequent-bsd4.3* ) machine=sequent opsys=bsd4-3 ;; - - mips-siemens-sysv* | mips-sni-sysv*) - machine=mips-siemens opsys=usg5-4 - NON_GNU_CC=/usr/ccs/bin/cc - NON_GNU_CPP=/usr/ccs/lib/cpp - ;; - - m68*-sgi-iris3.5* ) machine=irist opsys=iris3-5 ;; - m68*-sgi-iris3.6* | m68*-sgi-iris*) machine=irist opsys=iris3-6 ;; - mips-sgi-irix3.* ) opsys=irix3-3 ;; - mips-sgi-irix4.* ) opsys=irix4-0 ;; - mips-sgi-irix6* ) opsys=irix6-0 ;; - mips-sgi-irix5.1* ) opsys=irix5-1 ;; - mips-sgi-irix5.2* ) opsys=irix5-2 ;; - mips-sgi-irix5.* ) opsys=irix5-3 ;; - mips-sgi-irix* ) opsys=irix5-0 ;; - - *-sony-newsos[34]* | *-sony-news[34]* ) opsys=bsd4-3 ;; - *-sony-news* ) opsys=newsos5 ;; - - m68*-stride-sysv* ) machine=stride opsys=usg5-2 ;; - - *-*-solaris* | *-*-sunos* | *-sun-mach* | *-sun-bsd* ) - case "$canonical" in - m68*-sunos1* ) machine=sun1 ;; - m68*-sunos2* ) machine=sun2 ;; - m68* ) machine=sun3 ;; - i*86*-sun-sunos[34]* ) machine=sun386 ;; - i*86-*-* ) machine=intel386 ;; - rs6000* ) machine=rs6000 ;; - esac - - case "$canonical" in *-sunos5*) - canonical=`echo $canonical | sed -e s/sunos5/solaris2/`;; - esac - - case "$canonical" in - *-sunos4* ) - #test -f /usr/lib/cpp && NON_GNU_CPP=/usr/lib/cpp ;; - : ;; - *-solaris2* ) - #test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp - RANLIB=':' ;; - esac - - case "$canonical" in - *-solaris* ) - opsys=sol2 - os_release=`uname -r | sed -e 's/^\([0-9]\)\.\([0-9]\).*/\1\2/'` - { test "$extra_verbose" = "yes" && cat << EOF - Defining OS_RELEASE = $os_release -EOF -cat >> confdefs.h <&2 - exit 1 -fi - -if test -z "$dynamic"; then - case "$opsys" in - hpux* | sunos4* | sco5 ) dynamic=no ;; - *) dynamic=yes ;; - esac -fi -if test "$dynamic" = "yes"; then - case "$opsys" in - hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;; - decosf* ) ld_call_shared="-call_shared" ;; - esac -else case "$opsys" in - sol2 ) - echo "Static linking is not supported on Solaris 2." - echo "Rerun configure without specifying --dynamic=no." - exit 1 ;; - linux ) ld_call_shared="-Bstatic" ;; - decosf* ) ld_call_shared="-non_shared" ;; - esac -fi - -case "$opsys" in aix*) NON_GNU_CC=xlc ;; esac - -stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'` -{ test "$extra_verbose" = "yes" && cat << EOF - Defining STACK_TRACE_EYE_CATCHER = $stack_trace_eye_catcher -EOF -cat >> confdefs.h <&2 && exit 1 -elif test "$with_tooltalk" = "no" ; then with_workshop=no -elif test "$with_workshop" = "yes"; then with_tooltalk=yes -fi - -if test "$with_workshop" = "yes"; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining SUNPRO -EOF -cat >> confdefs.h <<\EOF -#define SUNPRO 1 -EOF -} - - extra_objs="$extra_objs sunpro.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"sunpro.o\"" - fi -fi - -if test "$with_clash_detection" = "yes"; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining CLASH_DETECTION -EOF -cat >> confdefs.h <<\EOF -#define CLASH_DETECTION 1 -EOF -} - - extra_objs="$extra_objs filelock.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"filelock.o\"" - fi -fi - -test -n "$compiler" && CC="$compiler" -if test "$with_gcc" = "no"; then case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac -fi - -test "${cflags-unset}" != unset && CFLAGS="$cflags" -if test "${CFLAGS-unset}" != unset - then cflags_specified=yes; - else cflags_specified=no; -fi - -xe_save_CFLAGS="$CFLAGS" - -# Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1473: checking for $ac_word" >&5 - -if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="gcc" - break - fi - done - IFS="$ac_save_ifs" -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1499: checking for $ac_word" >&5 - -if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - ac_prog_rejected=no - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - break - fi - done - IFS="$ac_save_ifs" -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# -gt 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - set dummy "$ac_dir/$ac_word" "$@" - shift - ac_cv_prog_CC="$@" - fi -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } -fi - -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1544: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 - -ac_ext=c -xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS' -xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run' -xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard' -ac_cpp='$CPP '"$xe_cppflags" -ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5' -cross_compiling=no - -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - ac_cv_prog_cc_works=yes - # If we can't run a trivial program, we are probably using a cross compiler. - if (./conftest; exit) 2>/dev/null; then - ac_cv_prog_cc_cross=no - else - ac_cv_prog_cc_cross=yes - fi -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_cv_prog_cc_works=no -fi -rm -fr conftest* - -echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 -if test $ac_cv_prog_cc_works = no; then - { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } -fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1580: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 -echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 -cross_compiling=$ac_cv_prog_cc_cross - -echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1585: checking whether we are using GNU C" >&5 - -cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - ac_cv_prog_gcc=yes -else - ac_cv_prog_gcc=no -fi - -echo "$ac_t""$ac_cv_prog_gcc" 1>&6 - -if test $ac_cv_prog_gcc = yes; then - GCC=yes - ac_test_CFLAGS="${CFLAGS+set}" - ac_save_CFLAGS="$CFLAGS" - CFLAGS= - echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1606: checking whether ${CC-cc} accepts -g" >&5 - -echo 'void f(){}' > conftest.c -if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then - ac_cv_prog_cc_g=yes -else - ac_cv_prog_cc_g=no -fi -rm -f conftest* - - -echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 - if test "$ac_test_CFLAGS" = set; then - CFLAGS="$ac_save_CFLAGS" - elif test $ac_cv_prog_cc_g = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-O2" - fi -else - GCC= - test "${CFLAGS+set}" = set || CFLAGS="-g" -fi - -if test "$with_gcc" = "no" -a "$GCC" = "yes"; then - CC=${NON_GNU_CC-cc} - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1635: checking for $ac_word" >&5 - -if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="gcc" - break - fi - done - IFS="$ac_save_ifs" -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1661: checking for $ac_word" >&5 - -if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - ac_prog_rejected=no - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - break - fi - done - IFS="$ac_save_ifs" -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# -gt 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - set dummy "$ac_dir/$ac_word" "$@" - shift - ac_cv_prog_CC="$@" - fi -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } -fi - -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1706: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 - -ac_ext=c -xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS' -xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run' -xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard' -ac_cpp='$CPP '"$xe_cppflags" -ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5' -cross_compiling=no - -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - ac_cv_prog_cc_works=yes - # If we can't run a trivial program, we are probably using a cross compiler. - if (./conftest; exit) 2>/dev/null; then - ac_cv_prog_cc_cross=no - else - ac_cv_prog_cc_cross=yes - fi -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_cv_prog_cc_works=no -fi -rm -fr conftest* - -echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 -if test $ac_cv_prog_cc_works = no; then - { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } -fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1742: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 -echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 -cross_compiling=$ac_cv_prog_cc_cross - -echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1747: checking whether we are using GNU C" >&5 - -cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - ac_cv_prog_gcc=yes -else - ac_cv_prog_gcc=no -fi - -echo "$ac_t""$ac_cv_prog_gcc" 1>&6 - -if test $ac_cv_prog_gcc = yes; then - GCC=yes - ac_test_CFLAGS="${CFLAGS+set}" - ac_save_CFLAGS="$CFLAGS" - CFLAGS= - echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1768: checking whether ${CC-cc} accepts -g" >&5 - -echo 'void f(){}' > conftest.c -if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then - ac_cv_prog_cc_g=yes -else - ac_cv_prog_cc_g=no -fi -rm -f conftest* - - -echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 - if test "$ac_test_CFLAGS" = set; then - CFLAGS="$ac_save_CFLAGS" - elif test $ac_cv_prog_cc_g = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-O2" - fi -else - GCC= - test "${CFLAGS+set}" = set || CFLAGS="-g" -fi - -elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then - CC=gcc - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1797: checking for $ac_word" >&5 - -if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="gcc" - break - fi - done - IFS="$ac_save_ifs" -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1823: checking for $ac_word" >&5 - -if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - ac_prog_rejected=no - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - break - fi - done - IFS="$ac_save_ifs" -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# -gt 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - set dummy "$ac_dir/$ac_word" "$@" - shift - ac_cv_prog_CC="$@" - fi -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } -fi - -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1868: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 - -ac_ext=c -xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS' -xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run' -xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard' -ac_cpp='$CPP '"$xe_cppflags" -ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5' -cross_compiling=no - -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - ac_cv_prog_cc_works=yes - # If we can't run a trivial program, we are probably using a cross compiler. - if (./conftest; exit) 2>/dev/null; then - ac_cv_prog_cc_cross=no - else - ac_cv_prog_cc_cross=yes - fi -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_cv_prog_cc_works=no -fi -rm -fr conftest* - -echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 -if test $ac_cv_prog_cc_works = no; then - { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } -fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1904: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 -echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 -cross_compiling=$ac_cv_prog_cc_cross - -echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1909: checking whether we are using GNU C" >&5 - -cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - ac_cv_prog_gcc=yes -else - ac_cv_prog_gcc=no -fi - -echo "$ac_t""$ac_cv_prog_gcc" 1>&6 - -if test $ac_cv_prog_gcc = yes; then - GCC=yes - ac_test_CFLAGS="${CFLAGS+set}" - ac_save_CFLAGS="$CFLAGS" - CFLAGS= - echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1930: checking whether ${CC-cc} accepts -g" >&5 - -echo 'void f(){}' > conftest.c -if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then - ac_cv_prog_cc_g=yes -else - ac_cv_prog_cc_g=no -fi -rm -f conftest* - - -echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 - if test "$ac_test_CFLAGS" = set; then - CFLAGS="$ac_save_CFLAGS" - elif test $ac_cv_prog_cc_g = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-O2" - fi -else - GCC= - test "${CFLAGS+set}" = set || CFLAGS="-g" -fi - -fi -CFLAGS="$xe_save_CFLAGS" - - -test -n "$CPP" -a -d "$CPP" && CPP= - -test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP" - -echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1963: checking how to run the C preprocessor" >&5 -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - - # This must be in double quotes, not single quotes, because CPP may get - # substituted into the Makefile and "${CC-cc}" will confuse make. - CPP="${CC-cc} -E" - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1982: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP="${CC-cc} -E -traditional-cpp" - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1999: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP=/lib/cpp -fi -rm -f conftest* -fi -rm -f conftest* - ac_cv_prog_CPP="$CPP" - CPP="$ac_cv_prog_CPP" -else - ac_cv_prog_CPP="$CPP" -fi -echo "$ac_t""$CPP" 1>&6 - - -echo $ac_n "checking for AIX""... $ac_c" 1>&6 -echo "configure:2022: checking for AIX" >&5 -cat > conftest.$ac_ext <&5 | - egrep "yes" >/dev/null 2>&1; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF - Defining _ALL_SOURCE -EOF -cat >> confdefs.h <<\EOF -#define _ALL_SOURCE 1 -EOF -} - -else - rm -rf conftest* - echo "$ac_t""no" 1>&6 -fi -rm -f conftest* - - - -echo $ac_n "checking for GNU libc""... $ac_c" 1>&6 -echo "configure:2051: checking for GNU libc" >&5 -cat > conftest.$ac_ext < -int main() { - -#if ! (defined __GLIBC__ || defined __GNU_LIBRARY__) -#error Not a GNU libc system :-( -******* ======= ******** &&&&&&&& -#endif - -; return 0; } -EOF -if { (eval echo configure:2065: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - have_glibc=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - have_glibc=no -fi -rm -f conftest* -echo "$ac_t""$have_glibc" 1>&6 -test "$have_glibc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF - Defining _GNU_SOURCE -EOF -cat >> confdefs.h <<\EOF -#define _GNU_SOURCE 1 -EOF -} - - -echo $ac_n "checking whether we are using SunPro C""... $ac_c" 1>&6 -echo "configure:2086: checking whether we are using SunPro C" >&5 -cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - __sunpro_c=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - __sunpro_c=no -fi -rm -f conftest* -echo "$ac_t""$__sunpro_c" 1>&6 - - - -echo "Extracting information from the machine- and system-dependent headers..." - -tempcname="conftest.c" - - - -cat > $tempcname <&6 -echo "configure:2361: checking for dynodump" >&5 -if test "$unexec" != "unexsol2.o"; then - echo "$ac_t""no" 1>&6 -else - echo "$ac_t""yes" 1>&6 - { test "$extra_verbose" = "yes" && cat << \EOF - Defining DYNODUMP -EOF -cat >> confdefs.h <<\EOF -#define DYNODUMP 1 -EOF -} - - MAKE_SUBDIR="$MAKE_SUBDIR dynodump" && if test "$extra_verbose" = "yes"; then echo " Appending \"dynodump\" to \$MAKE_SUBDIR"; fi - SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS dynodump" && if test "$extra_verbose" = "yes"; then echo " Appending \"dynodump\" to \$SRC_SUBDIR_DEPS"; fi - case "$machine" in - sparc ) dynodump_arch=sparc ;; - *86* ) dynodump_arch=i386 ;; - powerpc ) dynodump_arch=ppc ;; - esac - test "$GCC" = "yes" && ld_switch_site="$ld_switch_site -fno-gnu-linker" && if test "$extra_verbose" = "yes"; then echo " Appending \"-fno-gnu-linker\" to \$ld_switch_site"; fi -fi - - -test "$machine$opsys" = "powerpclinux" && start_flags="-T $srcdir/src/ppc.ldscript" - -if test "$unexec" = "unexaix.o"; then - if test "$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 - -echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6 -echo "configure:2399: checking for terminateAndUnload in -lC" >&5 -ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'` - -xe_check_libs=" -lC " -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -xe_check_libs="" - -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - libs_system="$libs_system -lC" && if test "$extra_verbose" = "yes"; then echo " Appending \"-lC\" to \$libs_system"; fi -else - echo "$ac_t""no" 1>&6 -fi - - - fi -elif test -n "$ld_text_start_addr"; then - start_flags="-T $ld_text_start_addr -e __start" -fi - - - - -if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then - test -z "$linker" && linker='$(CC) -nostdlib' - test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`' -fi -test "$GCC" != "yes" && lib_gcc= - - - - - -if test -n "$site_prefixes"; then - for arg in $site_prefixes; do - case "$arg" in - -* ) ;; - * ) argi="-I${arg}/include" ; argl="-L${arg}/lib" ;; - esac - c_switch_site="$c_switch_site $argi" && if test "$extra_verbose" = "yes"; then echo " Appending \"$argi\" to \$c_switch_site"; fi - ld_switch_site="$ld_switch_site $argl" && if test "$extra_verbose" = "yes"; then echo " Appending \"$argl\" to \$ld_switch_site"; fi - done -fi - -if test -n "$site_libraries"; then - for arg in $site_libraries; do - case "$arg" in -* ) ;; * ) arg="-L${arg}" ;; esac - ld_switch_site="$ld_switch_site $arg" && if test "$extra_verbose" = "yes"; then echo " Appending \"$arg\" to \$ld_switch_site"; fi - done -fi - -if test -n "$site_includes"; then - for arg in $site_includes; do - case "$arg" in -* ) ;; * ) arg="-I${arg}" ;; esac - c_switch_site="$c_switch_site $arg" && if test "$extra_verbose" = "yes"; then echo " Appending \"$arg\" to \$c_switch_site"; fi - done -fi - - -for dir in "/usr/ccs/lib"; do - test -d "$dir" && ld_switch_site="$ld_switch_site -L${dir}" && if test "$extra_verbose" = "yes"; then echo " Appending \"-L${dir}\" to \$ld_switch_site"; fi -done - -if test -n "$site_runtime_libraries"; then - LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/ */:/g'`" - export LD_RUN_PATH -fi - - -if test "$dynamic" = "no"; then add_runtime_path=no -elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes -else case "$opsys" in - sol2 | irix* | *bsd* ) add_runtime_path=yes ;; - * ) add_runtime_path=no ;; - esac -fi - -if test "$add_runtime_path" = "yes"; then - echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6 -echo "configure:2499: checking "for runtime libraries flag"" >&5 - dash_r="" - for try_dash_r in "-R" "-R " "-rpath "; do - xe_check_libs="${try_dash_r}/no/such/file-or-directory" - -if test "$GCC" = "yes"; then - set x $xe_check_libs; shift; xe_check_libs="" - while test -n "$1"; do - case $1 in - -L | -l | -u ) xe_check_libs="$xe_check_libs $1 $2"; shift ;; - -L* | -l* | -u* | -Wl* ) xe_check_libs="$xe_check_libs $1" ;; - -Xlinker* ) ;; - * ) xe_check_libs="$xe_check_libs -Xlinker $1" ;; - esac - shift - done -fi - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - dash_r="$try_dash_r" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 -fi -rm -f conftest* - xe_check_libs="" - test -n "$dash_r" && break - done - if test -n "$dash_r"; - then echo "$ac_t"""\"${dash_r}\""" 1>&6 - else echo "$ac_t""NONE" 1>&6 - fi -fi - -xe_add_unique_runpath_dir=' - xe_add_p=yes - for xe_dir in $runpath_dirs; do test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no - done - if test "$xe_add_p" = "yes"; then - test -n "$runpath" && runpath="${runpath}:" - runpath="${runpath}${xe_runpath_dir}" - runpath_dirs="$runpath_dirs $xe_runpath_dir" - fi' - - - - -if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then - ld_switch_site=`echo '' $ld_switch_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"` - ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"` - - runpath="" runpath_dirs="" - if test -n "$LD_RUN_PATH"; then - runpath="$LD_RUN_PATH" - elif test "$GCC" = "yes"; then - ld_switch_run_save="$ld_switch_run"; ld_switch_run="" - echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c - xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null' - for arg in `eval "$xe_runpath_link" | grep ' -L'`; do - case "$arg" in P,* | -L* | -R* ) - for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do - { -xe_runpath_dir="$dir" - test "$xe_runpath_dir" != "/lib" -a \ - "$xe_runpath_dir" != "/usr/lib" -a \ - -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \ - eval "$xe_add_unique_runpath_dir" -} - done ;; - esac - done - ld_switch_run="$ld_switch_run_save" - rm -f conftest* - else - for arg in $ld_switch_site $ld_switch_x_site; do - case "$arg" in -L*) { -xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'` - test "$xe_runpath_dir" != "/lib" -a \ - "$xe_runpath_dir" != "/usr/lib" -a \ - -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \ - eval "$xe_add_unique_runpath_dir" -};; esac - done - if test "$opsys $need_motif" = "sol2 yes"; then - xe_runpath_dir="/opt/SUNWdt/lib"; - eval "$xe_add_unique_runpath_dir"; - fi - fi - if test -n "$runpath"; then - ld_switch_run="${dash_r}${runpath}" - -if test "$GCC" = "yes"; then - set x $ld_switch_run; shift; ld_switch_run="" - while test -n "$1"; do - case $1 in - -L | -l | -u ) ld_switch_run="$ld_switch_run $1 $2"; shift ;; - -L* | -l* | -u* | -Wl* ) ld_switch_run="$ld_switch_run $1" ;; - -Xlinker* ) ;; - * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;; - esac - shift - done -fi - test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath" - fi -fi - - - -GNU_MALLOC=yes -if test "$with_dlmalloc" != "no"; then - doug_lea_malloc=yes -else - doug_lea_malloc=no -fi -after_morecore_hook_exists=yes -echo $ac_n "checking for malloc_get_state""... $ac_c" 1>&6 -echo "configure:2624: checking for malloc_get_state" >&5 - -cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char malloc_get_state(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_malloc_get_state) || defined (__stub___malloc_get_state) -choke me -#else -malloc_get_state(); -#endif - -; return 0; } -EOF -if { (eval echo configure:2650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_func_malloc_get_state=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_malloc_get_state=no" -fi -rm -f conftest* - -if eval "test \"`echo '$ac_cv_func_'malloc_get_state`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 -doug_lea_malloc=no -fi - -echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6 -echo "configure:2670: checking for malloc_set_state" >&5 - -cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char malloc_set_state(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state) -choke me -#else -malloc_set_state(); -#endif - -; return 0; } -EOF -if { (eval echo configure:2696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_func_malloc_set_state=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_malloc_set_state=no" -fi -rm -f conftest* - -if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 -doug_lea_malloc=no -fi - -echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6 -echo "configure:2716: checking whether __after_morecore_hook exists" >&5 -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "$ac_t""no" 1>&6 - after_morecore_hook_exists=no -fi -rm -f conftest* -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" ; then - if test "$GNU_MALLOC" = yes ; then - GNU_MALLOC_reason=" - (Using Doug Lea's new malloc from the GNU C Library.)" - fi - { test "$extra_verbose" = "yes" && cat << \EOF - Defining DOUG_LEA_MALLOC -EOF -cat >> confdefs.h <<\EOF -#define DOUG_LEA_MALLOC 1 -EOF -} - - if test "$after_morecore_hook_exists" = "no" ; then - GNU_MALLOC_reason=" - (Using Doug Lea's new malloc from the Linux C Library.)" - { test "$extra_verbose" = "yes" && cat << \EOF - Defining _NO_MALLOC_WARNING_ -EOF -cat >> confdefs.h <<\EOF -#define _NO_MALLOC_WARNING_ 1 -EOF -} - - fi - use_minimal_tagbits=yes -fi - - - - -# Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2784: checking for $ac_word" >&5 - -if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_RANLIB="ranlib" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" -fi -RANLIB="$ac_cv_prog_RANLIB" -if test -n "$RANLIB"; then - echo "$ac_t""$RANLIB" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -ac_aux_dir= -for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do - if test -f $ac_dir/install-sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f $ac_dir/install.sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - fi -done -if test -z "$ac_aux_dir"; then - { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } -fi -ac_config_guess=$ac_aux_dir/config.guess -ac_config_sub=$ac_aux_dir/config.sub -ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. - -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# ./install, which can be erroneously created by make from ./install.sh. -echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:2837: checking for a BSD compatible install" >&5 -if test -z "$INSTALL"; then - - IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - # Account for people who put trailing slashes in PATH elements. - case "$ac_dir/" in - /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - for ac_prog in ginstall installbsd scoinst install; do - if test -f $ac_dir/$ac_prog; then - if test $ac_prog = install && - grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - # OSF/1 installbsd also uses dspmsg, but is usable. - : - else - ac_cv_path_install="$ac_dir/$ac_prog -c" - break 2 - fi - fi - done - ;; - esac - done - IFS="$ac_save_IFS" - - if test "${ac_cv_path_install+set}" = set; then - INSTALL="$ac_cv_path_install" - else - # As a last resort, use the slow shell script. We don't cache a - # path for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the path is relative. - INSTALL="$ac_install_sh" - fi -fi -echo "$ac_t""$INSTALL" 1>&6 - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - -for ac_prog in 'bison -y' byacc -do -# Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2888: checking for $ac_word" >&5 - -if test -n "$YACC"; then - ac_cv_prog_YACC="$YACC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_YACC="$ac_prog" - break - fi - done - IFS="$ac_save_ifs" -fi -YACC="$ac_cv_prog_YACC" -if test -n "$YACC"; then - echo "$ac_t""$YACC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -test -n "$YACC" && break -done -test -n "$YACC" || YACC="yacc" - - -for ac_hdr in mach/mach.h sys/stropts.h sys/timeb.h sys/time.h unistd.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2919: checking for $ac_hdr" >&5 - -cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2927: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - { test "$extra_verbose" = "yes" && cat << EOF - Defining $ac_tr_hdr -EOF -cat >> confdefs.h <&6 -fi -done - -for ac_hdr in utime.h locale.h libgen.h fcntl.h ulimit.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2960: checking for $ac_hdr" >&5 - -cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2968: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - { test "$extra_verbose" = "yes" && cat << EOF - Defining $ac_tr_hdr -EOF -cat >> confdefs.h <&6 -fi -done - -for ac_hdr in linux/version.h kstat.h sys/pstat.h inttypes.h sys/un.h a.out.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3001: checking for $ac_hdr" >&5 - -cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3009: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - { test "$extra_verbose" = "yes" && cat << EOF - Defining $ac_tr_hdr -EOF -cat >> confdefs.h <&6 -fi -done - -echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:3039: checking for sys/wait.h that is POSIX.1 compatible" >&5 - -cat > conftest.$ac_ext < -#include -#ifndef WEXITSTATUS -#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) -#endif -#ifndef WIFEXITED -#define WIFEXITED(stat_val) (((stat_val) & 255) == 0) -#endif -int main() { -int s; -wait (&s); -s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; -; return 0; } -EOF -if { (eval echo configure:3058: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_header_sys_wait_h=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_header_sys_wait_h=no -fi -rm -f conftest* - -echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6 -if test $ac_cv_header_sys_wait_h = yes; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_SYS_WAIT_H -EOF -cat >> confdefs.h <<\EOF -#define HAVE_SYS_WAIT_H 1 -EOF -} - -fi - -echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:3082: checking for ANSI C header files" >&5 - -cat > conftest.$ac_ext < -#include -#include -#include -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3093: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - ac_cv_header_stdc=yes -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_header_stdc=no -fi -rm -f conftest* - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. -cat > conftest.$ac_ext < -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "memchr" >/dev/null 2>&1; then - : -else - rm -rf conftest* - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. -cat > conftest.$ac_ext < -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "free" >/dev/null 2>&1; then - : -else - rm -rf conftest* - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. -cat > conftest.$ac_ext < -#define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int main () { int i; for (i = 0; i < 256; i++) -if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); -exit (0); } - -EOF -if { (eval echo configure:3157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 -then - : -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_header_stdc=no -fi -rm -fr conftest* -fi - -echo "$ac_t""$ac_cv_header_stdc" 1>&6 -if test $ac_cv_header_stdc = yes; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining STDC_HEADERS -EOF -cat >> confdefs.h <<\EOF -#define STDC_HEADERS 1 -EOF -} - -fi - -echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:3182: checking whether time.h and sys/time.h may both be included" >&5 - -cat > conftest.$ac_ext < -#include -#include -int main() { -struct tm *tp; -; return 0; } -EOF -if { (eval echo configure:3194: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_header_time=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_header_time=no -fi -rm -f conftest* - -echo "$ac_t""$ac_cv_header_time" 1>&6 -if test $ac_cv_header_time = yes; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining TIME_WITH_SYS_TIME -EOF -cat >> confdefs.h <<\EOF -#define TIME_WITH_SYS_TIME 1 -EOF -} - -fi - -echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6 -echo "configure:3218: checking for sys_siglist declaration in signal.h or unistd.h" >&5 - -cat > conftest.$ac_ext < -#include -/* NetBSD declares sys_siglist in unistd.h. */ -#ifdef HAVE_UNISTD_H -#include -#endif -int main() { -char *msg = *(sys_siglist + 1); -; return 0; } -EOF -if { (eval echo configure:3233: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_decl_sys_siglist=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_decl_sys_siglist=no -fi -rm -f conftest* - -echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6 -if test $ac_cv_decl_sys_siglist = yes; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining SYS_SIGLIST_DECLARED -EOF -cat >> confdefs.h <<\EOF -#define SYS_SIGLIST_DECLARED 1 -EOF -} - -fi - - -echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6 -echo "configure:3258: checking for struct utimbuf" >&5 -cat > conftest.$ac_ext < -#include -#else -#ifdef HAVE_SYS_TIME_H -#include -#else -#include -#endif -#endif -#ifdef HAVE_UTIME_H -#include -#endif -int main() { -static struct utimbuf x; x.actime = x.modtime; -; return 0; } -EOF -if { (eval echo configure:3279: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_STRUCT_UTIMBUF -EOF -cat >> confdefs.h <<\EOF -#define HAVE_STRUCT_UTIMBUF 1 -EOF -} - -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "$ac_t""no" 1>&6 -fi -rm -f conftest* - -echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:3299: checking return type of signal handlers" >&5 - -cat > conftest.$ac_ext < -#include -#ifdef signal -#undef signal -#endif -#ifdef __cplusplus -extern "C" void (*signal (int, void (*)(int)))(int); -#else -void (*signal ()) (); -#endif - -int main() { -int i; -; return 0; } -EOF -if { (eval echo configure:3319: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_type_signal=void -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_type_signal=int -fi -rm -f conftest* - -echo "$ac_t""$ac_cv_type_signal" 1>&6 -{ test "$extra_verbose" = "yes" && cat << EOF - Defining RETSIGTYPE = $ac_cv_type_signal -EOF -cat >> confdefs.h <&6 -echo "configure:3341: checking for size_t" >&5 - -cat > conftest.$ac_ext < -#if STDC_HEADERS -#include -#include -#endif -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_type_size_t=yes -else - rm -rf conftest* - ac_cv_type_size_t=no -fi -rm -f conftest* - -echo "$ac_t""$ac_cv_type_size_t" 1>&6 -if test $ac_cv_type_size_t = no; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining size_t = unsigned -EOF -cat >> confdefs.h <<\EOF -#define size_t unsigned -EOF -} - -fi - -echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:3375: checking for pid_t" >&5 - -cat > conftest.$ac_ext < -#if STDC_HEADERS -#include -#include -#endif -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_type_pid_t=yes -else - rm -rf conftest* - ac_cv_type_pid_t=no -fi -rm -f conftest* - -echo "$ac_t""$ac_cv_type_pid_t" 1>&6 -if test $ac_cv_type_pid_t = no; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining pid_t = int -EOF -cat >> confdefs.h <<\EOF -#define pid_t int -EOF -} - -fi - -echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:3409: checking for uid_t in sys/types.h" >&5 - -cat > conftest.$ac_ext < -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "uid_t" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_type_uid_t=yes -else - rm -rf conftest* - ac_cv_type_uid_t=no -fi -rm -f conftest* - - -echo "$ac_t""$ac_cv_type_uid_t" 1>&6 -if test $ac_cv_type_uid_t = no; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining uid_t = int -EOF -cat >> confdefs.h <<\EOF -#define uid_t int -EOF -} - - { test "$extra_verbose" = "yes" && cat << \EOF - Defining gid_t = int -EOF -cat >> confdefs.h <<\EOF -#define gid_t int -EOF -} - -fi - -echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:3448: checking for mode_t" >&5 - -cat > conftest.$ac_ext < -#if STDC_HEADERS -#include -#include -#endif -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_type_mode_t=yes -else - rm -rf conftest* - ac_cv_type_mode_t=no -fi -rm -f conftest* - -echo "$ac_t""$ac_cv_type_mode_t" 1>&6 -if test $ac_cv_type_mode_t = no; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining mode_t = int -EOF -cat >> confdefs.h <<\EOF -#define mode_t int -EOF -} - -fi - -echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:3482: checking for off_t" >&5 - -cat > conftest.$ac_ext < -#if STDC_HEADERS -#include -#include -#endif -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_type_off_t=yes -else - rm -rf conftest* - ac_cv_type_off_t=no -fi -rm -f conftest* - -echo "$ac_t""$ac_cv_type_off_t" 1>&6 -if test $ac_cv_type_off_t = no; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining off_t = long -EOF -cat >> confdefs.h <<\EOF -#define off_t long -EOF -} - -fi - - -echo $ac_n "checking for struct timeval""... $ac_c" 1>&6 -echo "configure:3517: checking for struct timeval" >&5 -cat > conftest.$ac_ext < -#include -#else -#ifdef HAVE_SYS_TIME_H -#include -#else -#include -#endif -#endif -int main() { -static struct timeval x; x.tv_sec = x.tv_usec; -; return 0; } -EOF -if { (eval echo configure:3535: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - HAVE_TIMEVAL=yes - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_TIMEVAL -EOF -cat >> confdefs.h <<\EOF -#define HAVE_TIMEVAL 1 -EOF -} - -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "$ac_t""no" 1>&6 - HAVE_TIMEVAL=no -fi -rm -f conftest* - -echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:3557: checking whether struct tm is in sys/time.h or time.h" >&5 - -cat > conftest.$ac_ext < -#include -int main() { -struct tm *tp; tp->tm_sec; -; return 0; } -EOF -if { (eval echo configure:3568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_tm=time.h -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_struct_tm=sys/time.h -fi -rm -f conftest* - -echo "$ac_t""$ac_cv_struct_tm" 1>&6 -if test $ac_cv_struct_tm = sys/time.h; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining TM_IN_SYS_TIME -EOF -cat >> confdefs.h <<\EOF -#define TM_IN_SYS_TIME 1 -EOF -} - -fi - -echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6 -echo "configure:3592: checking for tm_zone in struct tm" >&5 - -cat > conftest.$ac_ext < -#include <$ac_cv_struct_tm> -int main() { -struct tm tm; tm.tm_zone; -; return 0; } -EOF -if { (eval echo configure:3603: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_tm_zone=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_struct_tm_zone=no -fi -rm -f conftest* - -echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6 -if test "$ac_cv_struct_tm_zone" = yes; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_TM_ZONE -EOF -cat >> confdefs.h <<\EOF -#define HAVE_TM_ZONE 1 -EOF -} - -else - echo $ac_n "checking for tzname""... $ac_c" 1>&6 -echo "configure:3626: checking for tzname" >&5 - -cat > conftest.$ac_ext < -#ifndef tzname /* For SGI. */ -extern char *tzname[]; /* RS6000 and others reject char **tzname. */ -#endif -int main() { -atoi(*tzname); -; return 0; } -EOF -if { (eval echo configure:3639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - ac_cv_var_tzname=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_var_tzname=no -fi -rm -f conftest* - -echo "$ac_t""$ac_cv_var_tzname" 1>&6 - if test $ac_cv_var_tzname = yes; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_TZNAME -EOF -cat >> confdefs.h <<\EOF -#define HAVE_TZNAME 1 -EOF -} - - fi -fi - - -echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:3665: checking for working const" >&5 - -cat > conftest.$ac_ext <j = 5; -} -{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ - const int foo = 10; -} - -; return 0; } -EOF -if { (eval echo configure:3717: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_c_const=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_c_const=no -fi -rm -f conftest* - -echo "$ac_t""$ac_cv_c_const" 1>&6 -if test $ac_cv_c_const = no; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining const = -EOF -cat >> confdefs.h <<\EOF -#define const -EOF -} - -fi - - -echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:3742: checking whether ${MAKE-make} sets \${MAKE}" >&5 -set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` - -cat > conftestmake <<\EOF -all: - @echo 'ac_maketemp="${MAKE}"' -EOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. -eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` -if test -n "$ac_maketemp"; then - eval ac_cv_prog_make_${ac_make}_set=yes -else - eval ac_cv_prog_make_${ac_make}_set=no -fi -rm -f conftestmake -if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then - echo "$ac_t""yes" 1>&6 - SET_MAKE= -else - echo "$ac_t""no" 1>&6 - SET_MAKE="MAKE=${MAKE-make}" -fi - - -echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:3767: checking whether byte ordering is bigendian" >&5 - -ac_cv_c_bigendian=unknown -# See if sys/param.h defines the BYTE_ORDER macro. -cat > conftest.$ac_ext < -#include -int main() { - -#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN - bogus endian macros -#endif -; return 0; } -EOF -if { (eval echo configure:3783: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - # It does; now see whether it defined to BIG_ENDIAN or not. -cat > conftest.$ac_ext < -#include -int main() { - -#if BYTE_ORDER != BIG_ENDIAN - not big endian -#endif -; return 0; } -EOF -if { (eval echo configure:3798: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_c_bigendian=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_c_bigendian=no -fi -rm -f conftest* -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 -fi -rm -f conftest* -if test $ac_cv_c_bigendian = unknown; then -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 -then - ac_cv_c_bigendian=no -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_c_bigendian=yes -fi -rm -fr conftest* -fi - -echo "$ac_t""$ac_cv_c_bigendian" 1>&6 -if test $ac_cv_c_bigendian = yes; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining WORDS_BIGENDIAN -EOF -cat >> confdefs.h <<\EOF -#define WORDS_BIGENDIAN 1 -EOF -} - -fi - - -echo $ac_n "checking size of short""... $ac_c" 1>&6 -echo "configure:3854: checking size of short" >&5 - -cat > conftest.$ac_ext < -main() -{ - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(short)); - exit(0); -} -EOF -if { (eval echo configure:3868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 -then - ac_cv_sizeof_short=`cat conftestval` -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_short=0 -fi -rm -fr conftest* -echo "$ac_t""$ac_cv_sizeof_short" 1>&6 -{ test "$extra_verbose" = "yes" && cat << EOF - Defining SIZEOF_SHORT = $ac_cv_sizeof_short -EOF -cat >> confdefs.h <&6 -echo "configure:3895: checking size of int" >&5 - -cat > conftest.$ac_ext < -main() -{ - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(int)); - exit(0); -} -EOF -if { (eval echo configure:3909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 -then - ac_cv_sizeof_int=`cat conftestval` -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_int=0 -fi -rm -fr conftest* -echo "$ac_t""$ac_cv_sizeof_int" 1>&6 -{ test "$extra_verbose" = "yes" && cat << EOF - Defining SIZEOF_INT = $ac_cv_sizeof_int -EOF -cat >> confdefs.h <&6 -echo "configure:3930: checking size of long" >&5 - -cat > conftest.$ac_ext < -main() -{ - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(long)); - exit(0); -} -EOF -if { (eval echo configure:3944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 -then - ac_cv_sizeof_long=`cat conftestval` -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_long=0 -fi -rm -fr conftest* -echo "$ac_t""$ac_cv_sizeof_long" 1>&6 -{ test "$extra_verbose" = "yes" && cat << EOF - Defining SIZEOF_LONG = $ac_cv_sizeof_long -EOF -cat >> confdefs.h <&6 -echo "configure:3965: checking size of long long" >&5 - -cat > conftest.$ac_ext < -main() -{ - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(long long)); - exit(0); -} -EOF -if { (eval echo configure:3979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 -then - ac_cv_sizeof_long_long=`cat conftestval` -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_long_long=0 -fi -rm -fr conftest* -echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6 -{ test "$extra_verbose" = "yes" && cat << EOF - Defining SIZEOF_LONG_LONG = $ac_cv_sizeof_long_long -EOF -cat >> confdefs.h <&6 -echo "configure:4000: checking size of void *" >&5 - -cat > conftest.$ac_ext < -main() -{ - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(void *)); - exit(0); -} -EOF -if { (eval echo configure:4014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 -then - ac_cv_sizeof_void_p=`cat conftestval` -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_void_p=0 -fi -rm -fr conftest* -echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6 -{ test "$extra_verbose" = "yes" && cat << EOF - Defining SIZEOF_VOID_P = $ac_cv_sizeof_void_p -EOF -cat >> confdefs.h <&6 -echo "configure:4036: checking for long file names" >&5 - -ac_cv_sys_long_file_names=yes -# Test for long file names in all the places we know might matter: -# . the current directory, where building will happen -# $prefix/lib where we will be installing things -# $exec_prefix/lib likewise -# eval it to expand exec_prefix. -# $TMPDIR if set, where it might want to write temporary files -# if $TMPDIR is not set: -# /tmp where it might want to write temporary files -# /var/tmp likewise -# /usr/tmp likewise -if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then - ac_tmpdirs="$TMPDIR" -else - ac_tmpdirs='/tmp /var/tmp /usr/tmp' -fi -for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do - test -d $ac_dir || continue - test -w $ac_dir || continue # It is less confusing to not echo anything here. - (echo 1 > $ac_dir/conftest9012345) 2>/dev/null - (echo 2 > $ac_dir/conftest9012346) 2>/dev/null - val=`cat $ac_dir/conftest9012345 2>/dev/null` - if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then - ac_cv_sys_long_file_names=no - rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null - break - fi - rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null -done - -echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6 -if test $ac_cv_sys_long_file_names = yes; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_LONG_FILE_NAMES -EOF -cat >> confdefs.h <<\EOF -#define HAVE_LONG_FILE_NAMES 1 -EOF -} - -fi - - - -echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6 -echo "configure:4083: checking for sin in -lm" >&5 -ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'` - -xe_check_libs=" -lm " -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -xe_check_libs="" - -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - { test "$extra_verbose" = "yes" && cat << EOF - Defining $ac_tr_lib -EOF -cat >> confdefs.h <&6 -fi - - - -{ test "$extra_verbose" = "yes" && cat << \EOF - Defining LISP_FLOAT_TYPE -EOF -cat >> confdefs.h <<\EOF -#define LISP_FLOAT_TYPE 1 -EOF -} - - -cat > conftest.$ac_ext < -int main() { -return atanh(1.0) + asinh(1.0) + acosh(1.0); -; return 0; } -EOF -if { (eval echo configure:4148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_INVERSE_HYPERBOLIC -EOF -cat >> confdefs.h <<\EOF -#define HAVE_INVERSE_HYPERBOLIC 1 -EOF -} - -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 -fi -rm -f conftest* - -echo "checking type of mail spool file locking" 1>&6 -echo "configure:4165: checking type of mail spool file locking" >&5 -test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock -test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf -if test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF - Defining REAL_MAIL_USE_LOCKF -EOF -cat >> confdefs.h <<\EOF -#define REAL_MAIL_USE_LOCKF 1 -EOF -} - -elif test "$mail_locking" = "flock"; then { test "$extra_verbose" = "yes" && cat << \EOF - Defining REAL_MAIL_USE_FLOCK -EOF -cat >> confdefs.h <<\EOF -#define REAL_MAIL_USE_FLOCK 1 -EOF -} - -else mail_locking="dot-locking" -fi - - -echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6 -echo "configure:4189: checking for kstat_open in -lkstat" >&5 -ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'` - -xe_check_libs=" -lkstat " -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -xe_check_libs="" - -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo kstat | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - { test "$extra_verbose" = "yes" && cat << EOF - Defining $ac_tr_lib -EOF -cat >> confdefs.h <&6 -fi - - - - -echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6 -echo "configure:4239: checking for kvm_read in -lkvm" >&5 -ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'` - -xe_check_libs=" -lkvm " -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -xe_check_libs="" - -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo kvm | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - { test "$extra_verbose" = "yes" && cat << EOF - Defining $ac_tr_lib -EOF -cat >> confdefs.h <&6 -fi - - - -case "$opsys" in decosf*) - -echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6 -echo "configure:4290: checking for cma_open in -lpthreads" >&5 -ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'` - -xe_check_libs=" -lpthreads " -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -xe_check_libs="" - -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - { test "$extra_verbose" = "yes" && cat << EOF - Defining $ac_tr_lib -EOF -cat >> confdefs.h <&6 -fi - - - test "$ac_cv_lib_pthreads_cma_open" = "yes" && \ - c_switch_site="$c_switch_site -threads" ;; -esac - -echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6 -echo "configure:4342: checking whether the -xildoff compiler flag is required" >&5 -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 echo "$ac_t""no" 1>&6; - else echo "$ac_t""yes" 1>&6; ld_switch_site="$ld_switch_site -xildoff" && if test "$extra_verbose" = "yes"; then echo " Appending \"-xildoff\" to \$ld_switch_site"; fi - fi - else echo "$ac_t""no" 1>&6 -fi - -if test "$opsys" = "sol2" && test "$OS_RELEASE" -ge 56; then - echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6 -echo "configure:4353: checking for \"-z ignore\" linker flag" >&5 - case "`ld -h 2>&1`" in - *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6 - ld_switch_site="-z ignore $ld_switch_site" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-z ignore\" to \$ld_switch_site"; fi ;; - *) echo "$ac_t""no" 1>&6 ;; - esac -fi - - -echo "checking "for specified window system"" 1>&6 -echo "configure:4363: checking "for specified window system"" >&5 - -if test "$with_x11" != "no"; then - test "$x_includes $x_libraries" != "NONE NONE" && \ - window_system=x11 with_x11=yes - - - 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 "$x_includes" = "NONE"; then - for dir in "/usr/X11" "/usr/X11R6"; do - if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi - done - fi - - if test "$x_libraries" = "NONE"; then - for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do - if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi - done - fi - - # If we find X, set shell vars x_includes and x_libraries to the -# paths, otherwise set no_x=yes. -# Uses ac_ vars as temps to allow command line to override cache and checks. -# --without-x overrides everything else, but does not touch the cache. -echo $ac_n "checking for X""... $ac_c" 1>&6 -echo "configure:4396: checking for X" >&5 - -# Check whether --with-x or --without-x was given. -if test "${with_x+set}" = set; then - withval="$with_x" - : -fi - -# $have_x is `yes', `no', `disabled', or empty when we do not yet know. -if test "x$with_x" = xno; then - # The user explicitly disabled X. - have_x=disabled -else - if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then - # Both variables are already set. - have_x=yes - else - -# One or both of the vars are not set, and there is no cached value. -ac_x_includes=NO ac_x_libraries=NO -rm -fr conftestdir -if mkdir conftestdir; then - cd conftestdir - # Make sure to not put "make" in the Imakefile rules, since we grep it out. - cat > Imakefile <<'EOF' -acfindx: - @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' -EOF - if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then - # GNU make sometimes prints "make[1]: Entering...", which would confuse us. - eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` - # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. - for ac_extension in a so sl; do - if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && - test -f $ac_im_libdir/libX11.$ac_extension; then - ac_im_usrlibdir=$ac_im_libdir; break - fi - done - # Screen out bogus values from the imake configuration. They are - # bogus both because they are the default anyway, and because - # using them would break gcc on systems where it needs fixed includes. - case "$ac_im_incroot" in - /usr/include) ;; - *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;; - esac - case "$ac_im_usrlibdir" in - /usr/lib | /lib) ;; - *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;; - esac - fi - cd .. - rm -fr conftestdir -fi - -if test "$ac_x_includes" = NO; then - # Guess where to find include files, by looking for this one X11 .h file. - test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h - - # First, try using that file with no special directory specified. -cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4461: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - # We can compile using X headers with no special include directory. -ac_x_includes= -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - # Look for the header file in a standard set of common directories. -# Check X11 before X11Rn because it is often a symlink to the current release. - for ac_dir in \ - /usr/X11/include \ - /usr/X11R6/include \ - /usr/X11R5/include \ - /usr/X11R4/include \ - \ - /usr/include/X11 \ - /usr/include/X11R6 \ - /usr/include/X11R5 \ - /usr/include/X11R4 \ - \ - /usr/local/X11/include \ - /usr/local/X11R6/include \ - /usr/local/X11R5/include \ - /usr/local/X11R4/include \ - \ - /usr/local/include/X11 \ - /usr/local/include/X11R6 \ - /usr/local/include/X11R5 \ - /usr/local/include/X11R4 \ - \ - /usr/X386/include \ - /usr/x386/include \ - /usr/XFree86/include/X11 \ - \ - /usr/include \ - /usr/local/include \ - /usr/unsupported/include \ - /usr/athena/include \ - /usr/local/x11r5/include \ - /usr/lpp/Xamples/include \ - \ - /usr/openwin/include \ - /usr/openwin/share/include \ - ; \ - do - if test -r "$ac_dir/$x_direct_test_include"; then - ac_x_includes=$ac_dir - break - fi - done -fi -rm -f conftest* -fi # $ac_x_includes = NO - -if test "$ac_x_libraries" = NO; then - # Check for the libraries. - - test -z "$x_direct_test_library" && x_direct_test_library=Xt - test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc - - # See if we find them without any special options. - # Don't add to $LIBS permanently. - ac_save_LIBS="$LIBS" - LIBS="-l$x_direct_test_library $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - LIBS="$ac_save_LIBS" -# We can link X programs with no special library path. -ac_x_libraries= -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - LIBS="$ac_save_LIBS" -# First see if replacing the include by lib works. -# Check X11 before X11Rn because it is often a symlink to the current release. -for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \ - /usr/X11/lib \ - /usr/X11R6/lib \ - /usr/X11R5/lib \ - /usr/X11R4/lib \ - \ - /usr/lib/X11 \ - /usr/lib/X11R6 \ - /usr/lib/X11R5 \ - /usr/lib/X11R4 \ - \ - /usr/local/X11/lib \ - /usr/local/X11R6/lib \ - /usr/local/X11R5/lib \ - /usr/local/X11R4/lib \ - \ - /usr/local/lib/X11 \ - /usr/local/lib/X11R6 \ - /usr/local/lib/X11R5 \ - /usr/local/lib/X11R4 \ - \ - /usr/X386/lib \ - /usr/x386/lib \ - /usr/XFree86/lib/X11 \ - \ - /usr/lib \ - /usr/local/lib \ - /usr/unsupported/lib \ - /usr/athena/lib \ - /usr/local/x11r5/lib \ - /usr/lpp/Xamples/lib \ - /lib/usr/lib/X11 \ - \ - /usr/openwin/lib \ - /usr/openwin/share/lib \ - ; \ -do - for ac_extension in a so sl; do - if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then - ac_x_libraries=$ac_dir - break 2 - fi - done -done -fi -rm -f conftest* -fi # $ac_x_libraries = NO - -if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then - # Didn't find X anywhere. Cache the known absence of X. - ac_cv_have_x="have_x=no" -else - # Record where we found X for the cache. - ac_cv_have_x="have_x=yes \ - ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries" -fi - fi - eval "$ac_cv_have_x" -fi # $with_x != no - -if test "$have_x" != yes; then - echo "$ac_t""$have_x" 1>&6 - no_x=yes -else - # If each of the values was on the command line, it overrides each guess. - test "x$x_includes" = xNONE && x_includes=$ac_x_includes - test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries - # Update the cache value to reflect the command line values. - ac_cv_have_x="have_x=yes \ - ac_x_includes=$x_includes ac_x_libraries=$x_libraries" - echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6 -fi - -if test "$no_x" = yes; then - # Not all programs may use this symbol, but it does not hurt to define it. - { test "$extra_verbose" = "yes" && cat << \EOF - Defining X_DISPLAY_MISSING -EOF -cat >> confdefs.h <<\EOF -#define X_DISPLAY_MISSING 1 -EOF -} - - X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= -else - if test -n "$x_includes"; then - X_CFLAGS="$X_CFLAGS -I$x_includes" - fi - - # It would also be nice to do this for all -L options, not just this one. - if test -n "$x_libraries"; then - X_LIBS="$X_LIBS -L$x_libraries" - # For Solaris; some versions of Sun CC require a space after -R and - # others require no space. Words are not sufficient . . . . - case "`(uname -sr) 2>/dev/null`" in - "SunOS 5"*) - echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6 -echo "configure:4646: checking whether -R must be followed by a space" >&5 - ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - ac_R_nospace=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_R_nospace=no -fi -rm -f conftest* - if test $ac_R_nospace = yes; then - echo "$ac_t""no" 1>&6 - X_LIBS="$X_LIBS -R$x_libraries" - else - LIBS="$ac_xsave_LIBS -R $x_libraries" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - ac_R_space=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_R_space=no -fi -rm -f conftest* - if test $ac_R_space = yes; then - echo "$ac_t""yes" 1>&6 - X_LIBS="$X_LIBS -R $x_libraries" - else - echo "$ac_t""neither works" 1>&6 - fi - fi - LIBS="$ac_xsave_LIBS" - esac - fi - - # Check for system-dependent libraries X programs must link with. - # Do this before checking for the system-independent R6 libraries - # (-lICE), since we may need -lsocket or whatever for X linking. - - if test "$ISC" = yes; then - X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" - else - # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X - # libraries were built with DECnet support. And karl@cs.umb.edu says - # the Alpha needs dnet_stub (dnet does not exist). - if test "$with_dnet" = "no" ; then -ac_cv_lib_dnet_dnet_ntoa=no -else - -echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6 -echo "configure:4715: checking for dnet_ntoa in -ldnet" >&5 -ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'` - -xe_check_libs=" -ldnet " -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -xe_check_libs="" - -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" -else - echo "$ac_t""no" 1>&6 -fi - -fi - - if test $ac_cv_lib_dnet_dnet_ntoa = no; then - -echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6 -echo "configure:4755: checking for dnet_ntoa in -ldnet_stub" >&5 -ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'` - -xe_check_libs=" -ldnet_stub " -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -xe_check_libs="" - -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" -else - echo "$ac_t""no" 1>&6 -fi - - - fi - - # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, - # to get the SysV transport functions. - # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4) - # needs -lnsl. - # The nsl library prevents programs from opening the X display - # on Irix 5.2, according to dickey@clark.net. - echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 -echo "configure:4800: checking for gethostbyname" >&5 - -cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char gethostbyname(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname) -choke me -#else -gethostbyname(); -#endif - -; return 0; } -EOF -if { (eval echo configure:4826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_func_gethostbyname=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_gethostbyname=no" -fi -rm -f conftest* - -if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 -fi - - if test $ac_cv_func_gethostbyname = no; then - -echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:4847: checking for gethostbyname in -lnsl" >&5 -ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` - -xe_check_libs=" -lnsl " -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -xe_check_libs="" - -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" -else - echo "$ac_t""no" 1>&6 -fi - - - fi - - # lieder@skyler.mavd.honeywell.com says without -lsocket, - # socket/setsockopt and other routines are undefined under SCO ODT - # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary - # on later versions), says simon@lia.di.epfl.ch: it contains - # gethostby* variants that don't use the nameserver (or something). - # -lsocket must be given before -lnsl if both are needed. - # We assume that if connect needs -lnsl, so does gethostbyname. - echo $ac_n "checking for connect""... $ac_c" 1>&6 -echo "configure:4893: checking for connect" >&5 - -cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char connect(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_connect) || defined (__stub___connect) -choke me -#else -connect(); -#endif - -; return 0; } -EOF -if { (eval echo configure:4919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_func_connect=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_connect=no" -fi -rm -f conftest* - -if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 -fi - - if test $ac_cv_func_connect = no; then - -xe_msg_checking="for connect in -lsocket" -test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS" -echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6 -echo "configure:4942: checking "$xe_msg_checking"" >&5 -ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` - -xe_check_libs=" -lsocket $X_EXTRA_LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -xe_check_libs="" - -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" -else - echo "$ac_t""no" 1>&6 -fi - - - fi - - # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX. - echo $ac_n "checking for remove""... $ac_c" 1>&6 -echo "configure:4982: checking for remove" >&5 - -cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char remove(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_remove) || defined (__stub___remove) -choke me -#else -remove(); -#endif - -; return 0; } -EOF -if { (eval echo configure:5008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_func_remove=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_remove=no" -fi -rm -f conftest* - -if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 -fi - - if test $ac_cv_func_remove = no; then - -echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 -echo "configure:5029: checking for remove in -lposix" >&5 -ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'` - -xe_check_libs=" -lposix " -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -xe_check_libs="" - -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" -else - echo "$ac_t""no" 1>&6 -fi - - - fi - - # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. - echo $ac_n "checking for shmat""... $ac_c" 1>&6 -echo "configure:5069: checking for shmat" >&5 - -cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char shmat(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_shmat) || defined (__stub___shmat) -choke me -#else -shmat(); -#endif - -; return 0; } -EOF -if { (eval echo configure:5095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_func_shmat=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_shmat=no" -fi -rm -f conftest* - -if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 -fi - - if test $ac_cv_func_shmat = no; then - -echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 -echo "configure:5116: checking for shmat in -lipc" >&5 -ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'` - -xe_check_libs=" -lipc " -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -xe_check_libs="" - -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" -else - echo "$ac_t""no" 1>&6 -fi - - - fi - fi - - # Check for libraries that X11R6 Xt/Xaw programs need. - ac_save_LDFLAGS="$LDFLAGS" - test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" - # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to - # check for ICE first), but we must link in the order -lSM -lICE or - # we get undefined symbols. So assume we have SM if we have ICE. - # These have to be linked with before -lX11, unlike the other - # libraries we check for below, so use a different variable. - # --interran@uluru.Stanford.EDU, kb@cs.umb.edu. - -echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6 -echo "configure:5166: checking for IceConnectionNumber in -lICE" >&5 -ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'` - -xe_check_libs=" -lICE " -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -xe_check_libs="" - -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" -else - echo "$ac_t""no" 1>&6 -fi - - - LDFLAGS="$ac_save_LDFLAGS" - -fi - # Autoconf claims to find X library and include dirs for us. - 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 - -case "$with_x11" in - yes ) window_system=x11 HAVE_X_WINDOWS=yes ;; - no ) window_system=none HAVE_X_WINDOWS=no ;; -esac - -if test "$with_x11" = "yes"; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_X_WINDOWS -EOF -cat >> confdefs.h <<\EOF -#define HAVE_X_WINDOWS 1 -EOF -} - - MAKE_SUBDIR="$MAKE_SUBDIR lwlib" && if test "$extra_verbose" = "yes"; then echo " Appending \"lwlib\" to \$MAKE_SUBDIR"; fi - SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS lwlib" && if test "$extra_verbose" = "yes"; then echo " Appending \"lwlib\" to \$SRC_SUBDIR_DEPS"; fi - - 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" - X_LIBS="-L${lib_dir} $X_LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-L${lib_dir}\" to \$X_LIBS"; fi ;; - esac - case "$x_includes" in "$inc_dir"* ) ;; *) - x_includes="$inc_dir $x_includes" - X_CFLAGS="-I${inc_dir} $X_CFLAGS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-I${inc_dir}\" to \$X_CFLAGS"; fi ;; - esac - break; fi - done - - for rel in "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" - X_LIBS="$X_LIBS -L${lib_dir}" && if test "$extra_verbose" = "yes"; then echo " Appending \"-L${lib_dir}\" to \$X_LIBS"; fi - esac - case "$x_includes" in "$inc_dir"* ) ;; *) - x_includes="$x_includes $inc_dir" - X_CFLAGS="$X_CFLAGS -I${inc_dir}" && if test "$extra_verbose" = "yes"; then echo " Appending \"-I${inc_dir}\" to \$X_CFLAGS"; fi - esac - break; fi - done - - ld_switch_x_site="$X_LIBS" - - -if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then - ld_switch_site=`echo '' $ld_switch_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"` - ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"` - - runpath="" runpath_dirs="" - if test -n "$LD_RUN_PATH"; then - runpath="$LD_RUN_PATH" - elif test "$GCC" = "yes"; then - ld_switch_run_save="$ld_switch_run"; ld_switch_run="" - echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c - xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null' - for arg in `eval "$xe_runpath_link" | grep ' -L'`; do - case "$arg" in P,* | -L* | -R* ) - for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do - { -xe_runpath_dir="$dir" - test "$xe_runpath_dir" != "/lib" -a \ - "$xe_runpath_dir" != "/usr/lib" -a \ - -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \ - eval "$xe_add_unique_runpath_dir" -} - done ;; - esac - done - ld_switch_run="$ld_switch_run_save" - rm -f conftest* - else - for arg in $ld_switch_site $ld_switch_x_site; do - case "$arg" in -L*) { -xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'` - test "$xe_runpath_dir" != "/lib" -a \ - "$xe_runpath_dir" != "/usr/lib" -a \ - -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \ - eval "$xe_add_unique_runpath_dir" -};; esac - done - if test "$opsys $need_motif" = "sol2 yes"; then - xe_runpath_dir="/opt/SUNWdt/lib"; - eval "$xe_add_unique_runpath_dir"; - fi - fi - if test -n "$runpath"; then - ld_switch_run="${dash_r}${runpath}" - -if test "$GCC" = "yes"; then - set x $ld_switch_run; shift; ld_switch_run="" - while test -n "$1"; do - case $1 in - -L | -l | -u ) ld_switch_run="$ld_switch_run $1 $2"; shift ;; - -L* | -l* | -u* | -Wl* ) ld_switch_run="$ld_switch_run $1" ;; - -Xlinker* ) ;; - * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;; - esac - shift - done -fi - test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath" - fi -fi - - - if test "$extra_verbose" = "yes"; then - echo; echo "X11 compilation variables:" - for var in x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS; do eval "echo \"$var = '\$$var'\""; done - echo - fi - - 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 - test ! -z "$bitmapdirs" && { test "$extra_verbose" = "yes" && cat << EOF - Defining BITMAPDIR = "$bitmapdirs" -EOF -cat >> confdefs.h <&6 -echo "configure:5349: checking for X defines extracted by xmkmf" >&5 - rm -fr conftestdir - if mkdir conftestdir; then - cd conftestdir - cat > Imakefile <<'EOF' -xetest: - @echo ${PROTO_DEFINES} ${STD_DEFINES} -EOF - if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then - # GNU make sometimes prints "make[1]: Entering...", which would confuse us. - xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make` - fi - cd .. - rm -fr conftestdir - for word in $xmkmf_defines; do - case "$word" in - -D*=* ) ;; - -D* ) word=`echo '' $word | sed -e 's:^ *-D::'` - { test "$extra_verbose" = "yes" && cat << EOF - Defining $word -EOF -cat >> confdefs.h <&6 -echo "configure:5381: checking for X11/Intrinsic.h" >&5 - -cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5389: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 -{ echo "configure: error: "Unable to find X11 header files."" 1>&2; exit 1; } -fi - - - -echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6 -echo "configure:5413: checking for XOpenDisplay in -lX11" >&5 -ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'` - -xe_check_libs=" -lX11 " -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -xe_check_libs="" - -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - have_lib_x11=yes -else - echo "$ac_t""no" 1>&6 -fi - - - if test "$have_lib_x11" != "yes"; then - -xe_msg_checking="for XGetFontProperty in -lX11" -test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout" -echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6 -echo "configure:5454: checking "$xe_msg_checking"" >&5 -ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'` - -xe_check_libs=" -lX11 -b i486-linuxaout" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -xe_check_libs="" - -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site" -else - echo "$ac_t""no" 1>&6 -{ echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; } -fi - - - fi - libs_x="-lX11" - test "$extra_verbose" = "yes" && echo " Setting libs_x to \"-lX11\"" - - -echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6 -echo "configure:5497: checking for XShapeSelectInput in -lXext" >&5 -ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'` - -xe_check_libs=" -lXext " -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -xe_check_libs="" - -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - libs_x="-lXext $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lXext\" to \$libs_x"; fi -else - echo "$ac_t""no" 1>&6 -fi - - - - -echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6 -echo "configure:5536: checking for XtOpenDisplay in -lXt" >&5 -ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'` - -xe_check_libs=" -lXt " -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -xe_check_libs="" - -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - libs_x="-lXt $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lXt\" to \$libs_x"; fi -else - echo "$ac_t""no" 1>&6 -{ echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; } -fi - - - - echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6 -echo "configure:5575: checking the version of X11 being used" >&5 - cat > conftest.$ac_ext < - int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; } -EOF -if { (eval echo configure:5582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 -then - ./conftest foobar; x11_release=$? -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - x11_release=4 -fi -rm -fr conftest* - echo "$ac_t""R${x11_release}" 1>&6 - { test "$extra_verbose" = "yes" && cat << EOF - Defining THIS_IS_X11R${x11_release} -EOF -cat >> confdefs.h <&6 -echo "configure:5606: checking for $ac_hdr" >&5 - -cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5614: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - { test "$extra_verbose" = "yes" && cat << EOF - Defining $ac_tr_hdr -EOF -cat >> confdefs.h <&6 -fi -done - - - echo $ac_n "checking for XFree86""... $ac_c" 1>&6 -echo "configure:5645: checking for XFree86" >&5 - if test -d "/usr/X386/include" -o \ - -f "/etc/XF86Config" -o \ - -f "/etc/X11/XF86Config" -o \ - -f "/usr/X11R6/lib/X11/XF86Config"; then - echo "$ac_t""yes" 1>&6 - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_XFREE386 -EOF -cat >> confdefs.h <<\EOF -#define HAVE_XFREE386 1 -EOF -} - - else - echo "$ac_t""no" 1>&6 - fi - - test -z "$with_xmu" && { -echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6 -echo "configure:5665: checking for XmuReadBitmapDataFromFile in -lXmu" >&5 -ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'` - -xe_check_libs=" -lXmu " -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -xe_check_libs="" - -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - with_xmu=yes -else - echo "$ac_t""no" 1>&6 -with_xmu=no -fi - - } - if test "$with_xmu" = "no"; then - extra_objs="$extra_objs xmu.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"xmu.o\"" - fi - else - libs_x="-lXmu $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lXmu\" to \$libs_x"; fi - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_XMU -EOF -cat >> confdefs.h <<\EOF -#define HAVE_XMU 1 -EOF -} - - fi - - -echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6 -echo "configure:5720: checking for main in -lXbsd" >&5 -ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'` - -xe_check_libs=" -lXbsd " -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -xe_check_libs="" - -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - libs_x="-lXbsd $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lXbsd\" to \$libs_x"; fi -else - echo "$ac_t""no" 1>&6 -fi - - - - if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then - if test "$GCC" = "yes"; then - X_CFLAGS="-mthreads $X_CFLAGS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-mthreads\" to \$X_CFLAGS"; fi - libs_x="-mthreads $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-mthreads\" to \$libs_x"; fi - else - case "$CC" in - "xlc" ) CC="xlc_r" ;; - "xlC" ) CC="xlC_r" ;; - "cc" ) CC="cc_r" ;; - esac - fi - fi - -fi -if test "$with_msw" != "no"; then - echo "checking for MS-Windows" 1>&6 -echo "configure:5769: checking for MS-Windows" >&5 - -echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6 -echo "configure:5772: checking for main in -lgdi32" >&5 -ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'` - -xe_check_libs=" -lgdi32 " -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -xe_check_libs="" - -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - with_msw=yes -else - echo "$ac_t""no" 1>&6 -fi - - - if test "$with_msw" = "yes"; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_MS_WINDOWS -EOF -cat >> confdefs.h <<\EOF -#define HAVE_MS_WINDOWS 1 -EOF -} - - install_pp="$blddir/lib-src/installexe.sh" - libs_system="$libs_system -lshell32 -lgdi32 -luser32 -lcomctl32" && if test "$extra_verbose" = "yes"; then echo " Appending \"-lshell32 -lgdi32 -luser32 -lcomctl32\" to \$libs_system"; fi - if test "$window_system" != x11; then - window_system=msw - test "$with_scrollbars" != "no" && with_scrollbars=msw \ - && extra_objs="$extra_objs scrollbar-msw.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"scrollbar-msw.o\"" - fi - test "$with_menubars" != "no" && with_menubars=msw \ - && extra_objs="$extra_objs menubar-msw.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"menubar-msw.o\"" - fi - test "$with_toolbars" != "no" && with_toolbars=msw \ - && extra_objs="$extra_objs toolbar-msw.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"toolbar-msw.o\"" - fi - test "$with_dialogs" != "no" && with_dialogs=msw \ - && extra_objs="$extra_objs dialog-msw.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"dialog-msw.o\"" - fi - else - test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar-msw.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"scrollbar-msw.o\"" - fi - test "$with_menubars" != "no" && extra_objs="$extra_objs menubar-msw.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"menubar-msw.o\"" - fi - test "$with_toolbars" != "no" && extra_objs="$extra_objs toolbar-msw.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"toolbar-msw.o\"" - fi - test "$with_dialogs" != "no" && extra_objs="$extra_objs dialog-msw.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"dialog-msw.o\"" - fi - fi - cat > conftest.$ac_ext < - int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; } -EOF -if { (eval echo configure:5853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 -then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_MSG_SELECT -EOF -cat >> confdefs.h <<\EOF -#define HAVE_MSG_SELECT 1 -EOF -} - -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 -fi -rm -fr conftest* - const_is_losing=no - with_file_coding=yes - use_minimal_tagbits=yes - use_indexed_lrecord_implementation=yes - extra_objs="$extra_objs console-msw.o device-msw.o event-msw.o frame-msw.o objects-msw.o select-msw.o redisplay-msw.o glyphs-msw.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"console-msw.o device-msw.o event-msw.o frame-msw.o objects-msw.o select-msw.o redisplay-msw.o glyphs-msw.o\"" - fi - fi -fi - - - -test -z "$window_system" && window_system="none" - -if test "$window_system" = "none"; then - for feature in menubars scrollbars toolbars dialogs dragndrop - do - if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then - echo "configure: warning: --with-$feature ignored: Not valid without window system support" 1>&2 - fi - eval "with_${feature}=no" - done -else - test -z "$with_toolbars" && with_toolbars=yes -fi - -if test "$with_msw" != "yes"; then - for feature in MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES - do - if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then - echo "configure: warning: --with-$feature ignored: Not valid without MS-Windows support" 1>&2 - fi - eval "with_${feature}=no" - done -else - : -fi - -if test "$with_x11" != "yes"; then - for feature in tooltalk cde offix session xim xmu \ - xface - do - if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then - echo "configure: warning: --with-$feature ignored: Not valid without X support" 1>&2 - fi - eval "with_${feature}=no" - done -fi - -bitmapdir= - -case "$window_system" in - x11 ) HAVE_X_WINDOWS=yes; echo " Using X11." ;; - msw ) HAVE_X_WINDOWS=no ; echo " Using MS-Windows." ;; - none ) HAVE_X_WINDOWS=no ; echo " Using no window system." ;; -esac - -case "$x_libraries" in *X11R4* ) - test "$opsys" = "hpux9" && opsysfile="s/hpux9-x11r4.h" - test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h" -esac - -echo "checking for session-management option" 1>&6 -echo "configure:5931: checking for session-management option" >&5; -if test "$with_session" != "no"; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_SESSION -EOF -cat >> confdefs.h <<\EOF -#define HAVE_SESSION 1 -EOF -} - -fi - -test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no -test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6 -echo "configure:5946: checking for X11/Xauth.h" >&5 - -cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5954: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 -with_xauth=no -fi - } -test -z "$with_xauth" && { -echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6 -echo "configure:5977: checking for XauGetAuthByAddr in -lXau" >&5 -ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'` - -xe_check_libs=" -lXau " -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -xe_check_libs="" - -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 -with_xauth=no -fi - - } -test -z "$with_xauth" && with_xauth=yes -if test "$with_xauth" = "yes"; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_XAUTH -EOF -cat >> confdefs.h <<\EOF -#define HAVE_XAUTH 1 -EOF -} - - -T="" -for W in $X_EXTRA_LIBS -lXau $libs_x $X_PRE_LIBS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done -libs_xauth="$T" - -fi - - - - -if test "$with_tooltalk" != "no" ; then - for dir in "" "Tt/" "desktop/" ; do - ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6 -echo "configure:6038: checking for ${dir}tt_c.h" >&5 - -cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6046: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - tt_c_h_path="${dir}tt_c.h"; break -else - echo "$ac_t""no" 1>&6 -fi - - done - if test -z "$tt_c_h_path"; then - if test "$with_tooltalk" = "yes"; then - (echo "$progname: Usage error:" -echo " " "Unable to find required tooltalk header files." -echo " Use \`$progname --help' to show usage.") >&2 && exit 1 - fi - with_tooltalk=no - fi -fi -if test "$with_tooltalk" != "no" ; then - for extra_libs in "" "-lI18N -lce" "-lcxx"; do - -xe_msg_checking="for tt_message_create in -ltt" -test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs" -echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6 -echo "configure:6082: checking "$xe_msg_checking"" >&5 -ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'` - -xe_check_libs=" -ltt $extra_libs" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -xe_check_libs="" - -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - tt_libs="-ltt $extra_libs"; break -else - echo "$ac_t""no" 1>&6 -: -fi - - - done - if test -z "$tt_libs"; then - if test "$with_tooltalk" = "yes"; then - (echo "$progname: Usage error:" -echo " " "Unable to find required tooltalk libraries." -echo " Use \`$progname --help' to show usage.") >&2 && exit 1 - fi - with_tooltalk=no - fi -fi -test -z "$with_tooltalk" && with_tooltalk=yes -if test "$with_tooltalk" = "yes"; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining TOOLTALK -EOF -cat >> confdefs.h <<\EOF -#define TOOLTALK 1 -EOF -} - - { test "$extra_verbose" = "yes" && cat << EOF - Defining TT_C_H_PATH = "$tt_c_h_path" -EOF -cat >> confdefs.h <&6 -echo "configure:6155: checking for Dt/Dt.h" >&5 - -cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6163: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 -with_cde=no -fi - } -test -z "$with_cde" && { -echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6 -echo "configure:6186: checking for DtDndDragStart in -lDtSvc" >&5 -ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'` - -xe_check_libs=" -lDtSvc " -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -xe_check_libs="" - -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 -with_cde=no -fi - - } -test -z "$with_cde" && with_cde=yes -if test "$with_dragndrop" = no; then - echo "configure: warning: No CDE without generic Drag'n'Drop support" 1>&2 - with_cde=no -fi -if test "$with_cde" = "yes" ; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_CDE -EOF -cat >> confdefs.h <<\EOF -#define HAVE_CDE 1 -EOF -} - - libs_x="-lDtSvc $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lDtSvc\" to \$libs_x"; fi - dragndrop_proto="$dragndrop_proto CDE" && if test "$extra_verbose" = "yes"; then echo " Appending \"CDE\" to \$dragndrop_proto"; fi - with_tooltalk=yes # CDE requires Tooltalk - need_motif=yes # CDE requires Motif -fi - -test "$window_system" != "x11" && with_offix=no -if test "$with_xmu" != yes -a "$with_x11" = yes; then - echo "configure: warning: No OffiX without real Xmu support" 1>&2 - with_offix=no -fi -if test "$with_dragndrop" = no; then - echo "configure: warning: No OffiX without generic Drag'n'Drop support" 1>&2 - with_offix=no -fi -if test "$with_cde" = yes; then - echo "configure: warning: CDE already found, disabling OffiX support" 1>&2 - with_offix=no -fi -test -z "$with_offix" && with_offix=no -if test "$with_offix" = "yes"; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_OFFIX_DND -EOF -cat >> confdefs.h <<\EOF -#define HAVE_OFFIX_DND 1 -EOF -} - - dnd_objs="$dnd_objs offix.o" && if test "$extra_verbose" = "yes"; then echo " Appending \"offix.o\" to \$dnd_objs"; fi - dragndrop_proto="$dragndrop_proto OffiX" && if test "$extra_verbose" = "yes"; then echo " Appending \"OffiX\" to \$dragndrop_proto"; fi -fi - -echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6 -echo "configure:6271: checking if drag and drop API is needed" >&5 -if test "$with_dragndrop" != "no" ; then - if test -n "$dragndrop_proto" ; then - with_dragndrop=yes - echo "$ac_t""yes (${dragndrop_proto} )" 1>&6 - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_DRAGNDROP -EOF -cat >> confdefs.h <<\EOF -#define HAVE_DRAGNDROP 1 -EOF -} - - extra_objs="$extra_objs dragdrop.o" && if test "$extra_verbose" = "yes"; then echo " Appending \"dragdrop.o\" to \$extra_objs"; fi - else - with_dragndrop=no - echo "$ac_t""no" 1>&6 - fi -fi - -echo "checking for LDAP" 1>&6 -echo "configure:6292: checking for LDAP" >&5 -test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for ldap.h""... $ac_c" 1>&6 -echo "configure:6295: checking for ldap.h" >&5 - -cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6303: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 -with_ldap=no -fi - } -test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for lber.h""... $ac_c" 1>&6 -echo "configure:6326: checking for lber.h" >&5 - -cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6334: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 -with_ldap=no -fi - } -if test "$with_ldap" != "no"; then - test -z "$with_umich_ldap" && { -xe_msg_checking="for ldap_open in -lldap" -test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber" -echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6 -echo "configure:6360: checking "$xe_msg_checking"" >&5 -ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'` - -xe_check_libs=" -lldap -llber" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -xe_check_libs="" - -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - with_umich_ldap=yes -else - echo "$ac_t""no" 1>&6 -with_umich_ldap=no -fi - - } - test "$with_umich_ldap" = "no" && { -echo $ac_n "checking for ldap_set_option in -lldap10""... $ac_c" 1>&6 -echo "configure:6399: checking for ldap_set_option in -lldap10" >&5 -ac_lib_var=`echo ldap10'_'ldap_set_option | sed 'y%./+-%__p_%'` - -xe_check_libs=" -lldap10 " -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -xe_check_libs="" - -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - with_ns_ldap=yes -else - echo "$ac_t""no" 1>&6 -with_ns_ldap=no -fi - - } - test -z "$with_ldap" -a \( "$with_umich_ldap" = "yes" -o "$with_ns_ldap" = "yes" \) && with_ldap=yes -fi -if test "$with_ldap" = "yes"; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_LDAP -EOF -cat >> confdefs.h <<\EOF -#define HAVE_LDAP 1 -EOF -} - - extra_objs="$extra_objs eldap.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"eldap.o\"" - fi - if test "$with_umich_ldap" = "yes" ; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_UMICH_LDAP -EOF -cat >> confdefs.h <<\EOF -#define HAVE_UMICH_LDAP 1 -EOF -} - - LIBS="-llber $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-llber\" to \$LIBS"; fi - LIBS="-lldap $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lldap\" to \$LIBS"; fi - elif test "$with_ldap" = "yes" -a "$with_ns_ldap" = "yes" ; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_NS_LDAP -EOF -cat >> confdefs.h <<\EOF -#define HAVE_NS_LDAP 1 -EOF -} - - LIBS="-lldap10 $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lldap10\" to \$LIBS"; fi - elif test "$with_ldap" = "yes" ; then - LIBS="-lldap $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lldap\" to \$LIBS"; fi - fi -fi - - -if test "$window_system" != "none"; then - echo "checking for graphics libraries" 1>&6 -echo "configure:6479: checking for graphics libraries" >&5 - - if test -z "$with_xpm"; then - echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6 -echo "configure:6483: checking for Xpm - no older than 3.4f" >&5 - xe_check_libs=-lXpm - cat > conftest.$ac_ext < - int main(int c, char **v) { - return c == 1 ? 0 : - XpmIncludeVersion != XpmLibraryVersion() ? 1 : - XpmIncludeVersion < 30406 ? 2 : 0 ;} -EOF -if { (eval echo configure:6494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 -then - ./conftest dummy_arg; xpm_status=$?; - if test "$?" = "0"; then - with_xpm=yes; - else - with_xpm=no; - if test "$?" = "1"; then - xpm_problem="Xpm library version and header file version don't match!" - elif test "$?" = "2"; then - xpm_problem="Xpm library version is too old!" - else - xpm_problem="Internal xpm detection logic error!" - fi - echo " -*** WARNING *** $problem - I'm not touching that with a 10-foot pole! - If you really want to use the installed version of Xpm, rerun - configure --with-xpm=yes, but don't blame me if XEmacs crashes!" - fi -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - with_xpm=no -fi -rm -fr conftest* - xe_check_libs= - echo "$ac_t""$with_xpm" 1>&6 - fi - if test "$with_xpm" = "yes"; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_XPM -EOF -cat >> confdefs.h <<\EOF -#define HAVE_XPM 1 -EOF -} - - libs_x="-lXpm $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lXpm\" to \$libs_x"; fi - echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6 -echo "configure:6535: checking for \"FOR_MSW\" xpm" >&5 - xe_check_libs=-lXpm - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - xpm_for_msw=no -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - xpm_for_msw=yes -fi -rm -f conftest* - xe_check_libs= - echo "$ac_t""$xpm_for_msw" 1>&6 - if test "$xpm_for_msw" = "yes"; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining FOR_MSW -EOF -cat >> confdefs.h <<\EOF -#define FOR_MSW 1 -EOF -} - - fi - fi - - if test "$with_png $with_tiff" != "no no"; then - -echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6 -echo "configure:6572: checking for inflate in -lc" >&5 -ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'` - -xe_check_libs=" -lc " -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -xe_check_libs="" - -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 - -echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6 -echo "configure:6607: checking for inflate in -lz" >&5 -ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'` - -xe_check_libs=" -lz " -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -xe_check_libs="" - -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - libs_x="-lz $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lz\" to \$libs_x"; fi -else - echo "$ac_t""no" 1>&6 - -echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6 -echo "configure:6642: checking for inflate in -lgz" >&5 -ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'` - -xe_check_libs=" -lgz " -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -xe_check_libs="" - -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - libs_x="-lgz $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lgz\" to \$libs_x"; fi -else - echo "$ac_t""no" 1>&6 -fi - - -fi - - -fi - - - fi - - echo $ac_n "checking for gifreader""... $ac_c" 1>&6 -echo "configure:6687: checking for gifreader" >&5 - test -z "$with_gif" && { ac_safe=`echo "gifrlib.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for gifrlib.h""... $ac_c" 1>&6 -echo "configure:6690: checking for gifrlib.h" >&5 - -cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6698: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 -with_gif=no -fi - } - test -z "$with_gif" && { -echo $ac_n "checking for GetGifError in -lgifreader""... $ac_c" 1>&6 -echo "configure:6721: checking for GetGifError in -lgifreader" >&5 -ac_lib_var=`echo gifreader'_'GetGifError | sed 'y%./+-%__p_%'` - -xe_check_libs=" -lgifreader " -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -xe_check_libs="" - -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 -with_gif=no -fi - - } - test -z "$with_gif" && with_gif=yes - if test "$with_gif" = "yes"; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_GIF -EOF -cat >> confdefs.h <<\EOF -#define HAVE_GIF 1 -EOF -} - - libs_x="-lgifreader $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lgifreader\" to \$libs_x"; fi - fi - - test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6 -echo "configure:6773: checking for jpeglib.h" >&5 - -cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6781: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 -with_jpeg=no -fi - } - test -z "$with_jpeg" && { -echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6 -echo "configure:6804: checking for jpeg_destroy_decompress in -ljpeg" >&5 -ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'` - -xe_check_libs=" -ljpeg " -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -xe_check_libs="" - -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 -with_jpeg=no -fi - - } - test -z "$with_jpeg" && with_jpeg=yes - if test "$with_jpeg" = "yes"; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_JPEG -EOF -cat >> confdefs.h <<\EOF -#define HAVE_JPEG 1 -EOF -} - - libs_x="-ljpeg $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-ljpeg\" to \$libs_x"; fi - fi - - if test -z "$with_png"; then - echo $ac_n "checking for png.h - no older than 0.96""... $ac_c" 1>&6 -echo "configure:6856: checking for png.h - no older than 0.96" >&5 - cat > conftest.$ac_ext < -#if PNG_LIBPNG_VER >= 96 -yes -#endif - -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "yes" >/dev/null 2>&1; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 -else - rm -rf conftest* - echo "$ac_t""no" 1>&6; with_png=no -fi -rm -f conftest* - - fi - test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6 -echo "configure:6878: checking for pow" >&5 - -cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char pow(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_pow) || defined (__stub___pow) -choke me -#else -pow(); -#endif - -; return 0; } -EOF -if { (eval echo configure:6904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_func_pow=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_pow=no" -fi -rm -f conftest* - -if eval "test \"`echo '$ac_cv_func_'pow`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 -with_png=no -fi - } - test -z "$with_png" && { -echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6 -echo "configure:6925: checking for png_read_image in -lpng" >&5 -ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'` - -xe_check_libs=" -lpng " -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -xe_check_libs="" - -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 -with_png=no -fi - - } - test -z "$with_png" && with_png=yes - if test "$with_png" = "yes"; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_PNG -EOF -cat >> confdefs.h <<\EOF -#define HAVE_PNG 1 -EOF -} - - libs_x="-lpng $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lpng\" to \$libs_x"; fi - fi - - test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6 -echo "configure:6977: checking for tiffio.h" >&5 - -cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6985: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 -with_tiff=no -fi - } - test -z "$with_tiff" && { -echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6 -echo "configure:7008: checking for TIFFClientOpen in -ltiff" >&5 -ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'` - -xe_check_libs=" -ltiff " -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -xe_check_libs="" - -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 -with_tiff=no -fi - - } - test -z "$with_tiff" && with_tiff=yes - if test "$with_tiff" = "yes"; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_TIFF -EOF -cat >> confdefs.h <<\EOF -#define HAVE_TIFF 1 -EOF -} - - libs_x="-ltiff $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-ltiff\" to \$libs_x"; fi - fi -fi - - -if test "$with_x11" = "yes"; then - - echo "checking for X11 graphics libraries" 1>&6 -echo "configure:7063: checking for X11 graphics libraries" >&5 - - test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for compface.h""... $ac_c" 1>&6 -echo "configure:7067: checking for compface.h" >&5 - -cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7075: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 -with_xface=no -fi - } - test -z "$with_xface" && { -echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6 -echo "configure:7098: checking for UnGenFace in -lcompface" >&5 -ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'` - -xe_check_libs=" -lcompface " -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -xe_check_libs="" - -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 -with_xface=no -fi - - } - test -z "$with_xface" && with_xface=yes - if test "$with_xface" = "yes"; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_XFACE -EOF -cat >> confdefs.h <<\EOF -#define HAVE_XFACE 1 -EOF -} - - libs_x="-lcompface $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lcompface\" to \$libs_x"; fi - fi - - -echo $ac_n "checking for XawScrollbarSetThumb in -lXaw""... $ac_c" 1>&6 -echo "configure:7150: checking for XawScrollbarSetThumb in -lXaw" >&5 -ac_lib_var=`echo Xaw'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'` - -xe_check_libs=" -lXaw " -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -xe_check_libs="" - -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - have_xaw=yes -else - echo "$ac_t""no" 1>&6 -have_xaw=no -fi - - - - ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6 -echo "configure:7190: checking for Xm/Xm.h" >&5 - -cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7198: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - -echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6 -echo "configure:7215: checking for XmStringFree in -lXm" >&5 -ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'` - -xe_check_libs=" -lXm " -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -xe_check_libs="" - -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - have_motif=yes -else - echo "$ac_t""no" 1>&6 -have_motif=no -fi - - -else - echo "$ac_t""no" 1>&6 -have_motif=no -fi - - - if test "$have_motif" = "yes"; then - echo $ac_n "checking for Lesstif""... $ac_c" 1>&6 -echo "configure:7260: checking for Lesstif" >&5 - cat > conftest.$ac_ext < -#ifdef LESSTIF_VERSION -yes -#endif - -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "yes" >/dev/null 2>&1; then - rm -rf conftest* - have_lesstif=yes -else - rm -rf conftest* - have_lesstif=no -fi -rm -f conftest* - - echo "$ac_t""$have_lesstif" 1>&6 - fi - -fi - -case "$with_menubars" in "" | "yes" | "athena" | "athena3d" ) - with_menubars="lucid" ;; -esac -case "$with_dialogs" in "" | "yes" | "lucid" ) - if test "$have_motif" = "yes"; then with_dialogs="motif" - elif test "$have_xaw" = "yes"; then with_dialogs="athena" - else with_dialogs=no - fi ;; -esac -case "$with_scrollbars" in "" | "yes" ) - with_scrollbars="lucid" ;; -esac - -all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars" - -case "$all_widgets" in *athena* ) - { test "$extra_verbose" = "yes" && cat << \EOF - Defining LWLIB_USES_ATHENA -EOF -cat >> confdefs.h <<\EOF -#define LWLIB_USES_ATHENA 1 -EOF -} - - { test "$extra_verbose" = "yes" && cat << \EOF - Defining NEED_ATHENA -EOF -cat >> confdefs.h <<\EOF -#define NEED_ATHENA 1 -EOF -} - - lwlib_objs="$lwlib_objs lwlib-Xaw.o" && if test "$extra_verbose" = "yes"; then echo " Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi - libs_x="-lXaw $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lXaw\" to \$libs_x"; fi ;; -esac - -case "$all_widgets" in *motif* ) - { test "$extra_verbose" = "yes" && cat << \EOF - Defining LWLIB_USES_MOTIF -EOF -cat >> confdefs.h <<\EOF -#define LWLIB_USES_MOTIF 1 -EOF -} - - { test "$extra_verbose" = "yes" && cat << \EOF - Defining NEED_MOTIF -EOF -cat >> confdefs.h <<\EOF -#define NEED_MOTIF 1 -EOF -} - - lwlib_objs="$lwlib_objs lwlib-Xm.o" && if test "$extra_verbose" = "yes"; then echo " Appending \"lwlib-Xm.o\" to \$lwlib_objs"; fi - need_motif=yes ;; -esac - -test "$with_menubars" = "lucid" && lwlib_objs="$lwlib_objs xlwmenu.o" && if test "$extra_verbose" = "yes"; then echo " Appending \"xlwmenu.o\" to \$lwlib_objs"; fi -test "$with_menubars" = "motif" && lwlib_objs="$lwlib_objs xlwmenu.o" && if test "$extra_verbose" = "yes"; then echo " Appending \"xlwmenu.o\" to \$lwlib_objs"; fi -test "$with_scrollbars" = "lucid" && lwlib_objs="$lwlib_objs xlwscrollbar.o" && if test "$extra_verbose" = "yes"; then echo " Appending \"xlwscrollbar.o\" to \$lwlib_objs"; fi -case "$all_widgets" in *lucid* ) - { test "$extra_verbose" = "yes" && cat << \EOF - Defining NEED_LUCID -EOF -cat >> confdefs.h <<\EOF -#define NEED_LUCID 1 -EOF -} - - lwlib_objs="$lwlib_objs lwlib-Xlw.o" && if test "$extra_verbose" = "yes"; then echo " Appending \"lwlib-Xlw.o\" to \$lwlib_objs"; fi ;; -esac - - - -case "$with_scrollbars" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF - Defining LWLIB_SCROLLBARS_ATHENA -EOF -cat >> confdefs.h <<\EOF -#define LWLIB_SCROLLBARS_ATHENA 1 -EOF -} -;; esac -case "$with_dialogs" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF - Defining LWLIB_DIALOGS_ATHENA -EOF -cat >> confdefs.h <<\EOF -#define LWLIB_DIALOGS_ATHENA 1 -EOF -} - ;; esac -test "$with_scrollbars" = "athena3d" && { test "$extra_verbose" = "yes" && cat << \EOF - Defining LWLIB_SCROLLBARS_ATHENA3D -EOF -cat >> confdefs.h <<\EOF -#define LWLIB_SCROLLBARS_ATHENA3D 1 -EOF -} - -test "$with_dialogs" = "athena3d" && { test "$extra_verbose" = "yes" && cat << \EOF - Defining LWLIB_DIALOGS_ATHENA3D -EOF -cat >> confdefs.h <<\EOF -#define LWLIB_DIALOGS_ATHENA3D 1 -EOF -} - - -test "$with_menubars" != "no" && { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_MENUBARS -EOF -cat >> confdefs.h <<\EOF -#define HAVE_MENUBARS 1 -EOF -} - -test "$with_scrollbars" != "no" && { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_SCROLLBARS -EOF -cat >> confdefs.h <<\EOF -#define HAVE_SCROLLBARS 1 -EOF -} - -test "$with_dialogs" != "no" && { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_DIALOGS -EOF -cat >> confdefs.h <<\EOF -#define HAVE_DIALOGS 1 -EOF -} - -test "$with_toolbars" != "no" && { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_TOOLBARS -EOF -cat >> confdefs.h <<\EOF -#define HAVE_TOOLBARS 1 -EOF -} - - -test "$with_menubars" = "lucid" && { test "$extra_verbose" = "yes" && cat << \EOF - Defining LWLIB_MENUBARS_LUCID -EOF -cat >> confdefs.h <<\EOF -#define LWLIB_MENUBARS_LUCID 1 -EOF -} - -test "$with_scrollbars" = "lucid" && { test "$extra_verbose" = "yes" && cat << \EOF - Defining LWLIB_SCROLLBARS_LUCID -EOF -cat >> confdefs.h <<\EOF -#define LWLIB_SCROLLBARS_LUCID 1 -EOF -} - - -test "$with_menubars" = "motif" && { test "$extra_verbose" = "yes" && cat << \EOF - Defining LWLIB_MENUBARS_MOTIF -EOF -cat >> confdefs.h <<\EOF -#define LWLIB_MENUBARS_MOTIF 1 -EOF -} - -test "$with_scrollbars" = "motif" && { test "$extra_verbose" = "yes" && cat << \EOF - Defining LWLIB_SCROLLBARS_MOTIF -EOF -cat >> confdefs.h <<\EOF -#define LWLIB_SCROLLBARS_MOTIF 1 -EOF -} - -test "$with_dialogs" = "motif" && { test "$extra_verbose" = "yes" && cat << \EOF - Defining LWLIB_DIALOGS_MOTIF -EOF -cat >> confdefs.h <<\EOF -#define LWLIB_DIALOGS_MOTIF 1 -EOF -} - - -test "$with_menubars" != "no" && extra_objs="$extra_objs menubar.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"menubar.o\"" - fi -test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"scrollbar.o\"" - fi -test "$with_dialogs" != "no" && extra_objs="$extra_objs dialog.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"dialog.o\"" - fi -test "$with_toolbars" != "no" && extra_objs="$extra_objs toolbar.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"toolbar.o\"" - fi -test "$all_widgets" != "no no no no" && extra_objs="$extra_objs gui.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"gui.o\"" - fi - -if test "$with_x11" = "yes"; then - test "$with_menubars" != "no" && extra_objs="$extra_objs menubar-x.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"menubar-x.o\"" - fi - test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar-x.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"scrollbar-x.o\"" - fi - test "$with_dialogs" != "no" && extra_objs="$extra_objs dialog-x.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"dialog-x.o\"" - fi - test "$with_toolbars" != "no" && extra_objs="$extra_objs toolbar-x.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"toolbar-x.o\"" - fi - test "$all_widgets" != "no no no no" && extra_objs="$extra_objs gui-x.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"gui-x.o\"" - fi -else - if test \( "$with_sound" = "nas" \) -o \( "$with_sound" = "both" \); then - echo "Attempt to Build NAS sound without X" - echo "Please remove NAS configuration or build with X" - exit 1 - fi -fi - -test "$use_minimal_tagbits" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF - Defining USE_MINIMAL_TAGBITS -EOF -cat >> confdefs.h <<\EOF -#define USE_MINIMAL_TAGBITS 1 -EOF -} - -test "$use_indexed_lrecord_implementation" = "yes" && \ - { test "$extra_verbose" = "yes" && cat << \EOF - Defining USE_INDEXED_LRECORD_IMPLEMENTATION -EOF -cat >> confdefs.h <<\EOF -#define USE_INDEXED_LRECORD_IMPLEMENTATION 1 -EOF -} - - - -test -z "$with_mule" && with_mule=no -test -z "$with_file_coding" && with_file_coding=no - - -if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining FILE_CODING -EOF -cat >> confdefs.h <<\EOF -#define FILE_CODING 1 -EOF -} - - extra_objs="$extra_objs file-coding.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"file-coding.o\"" - fi -fi - -if test "$with_mule" = "yes" ; then - echo "checking for Mule-related features" 1>&6 -echo "configure:7546: checking for Mule-related features" >&5 - { test "$extra_verbose" = "yes" && cat << \EOF - Defining MULE -EOF -cat >> confdefs.h <<\EOF -#define MULE 1 -EOF -} - - { test "$extra_verbose" = "yes" && cat << \EOF - Defining FILE_CODING -EOF -cat >> confdefs.h <<\EOF -#define FILE_CODING 1 -EOF -} - - extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o mule-coding.o file-coding.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"mule.o mule-ccl.o mule-charset.o mule-coding.o file-coding.o\"" - fi - - for ac_hdr in libintl.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:7571: checking for $ac_hdr" >&5 - -cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7579: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - { test "$extra_verbose" = "yes" && cat << EOF - Defining $ac_tr_hdr -EOF -cat >> confdefs.h <&6 -fi -done - - -echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6 -echo "configure:7610: checking for strerror in -lintl" >&5 -ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'` - -xe_check_libs=" -lintl " -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -xe_check_libs="" - -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - { test "$extra_verbose" = "yes" && cat << EOF - Defining $ac_tr_lib -EOF -cat >> confdefs.h <&6 -fi - - - - echo "checking for Mule input methods" 1>&6 -echo "configure:7659: checking for Mule input methods" >&5 - case "$with_xim" in "" | "yes" ) - echo "checking for XIM" 1>&6 -echo "configure:7662: checking for XIM" >&5 - if test "$have_lesstif" = "yes"; then with_xim=xlib - else -echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6 -echo "configure:7666: checking for XmImMbLookupString in -lXm" >&5 -ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'` - -xe_check_libs=" -lXm " -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -xe_check_libs="" - -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - with_xim=motif -else - echo "$ac_t""no" 1>&6 -with_xim=xlib -fi - - - fi - esac - if test "$with_xim" != "no"; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_XIM -EOF -cat >> confdefs.h <<\EOF -#define HAVE_XIM 1 -EOF -} - - if test "$with_xim" = "xlib"; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining XIM_XLIB -EOF -cat >> confdefs.h <<\EOF -#define XIM_XLIB 1 -EOF -} - - extra_objs="$extra_objs input-method-xlib.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"input-method-xlib.o\"" - fi - fi - if test "$with_xim" = "motif"; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining XIM_MOTIF -EOF -cat >> confdefs.h <<\EOF -#define XIM_MOTIF 1 -EOF -} - - need_motif=yes - extra_objs="$extra_objs input-method-motif.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"input-method-motif.o\"" - fi - fi - if test "$with_xim" = "motif"; then - with_xfs=no - fi - fi - - if test "$with_xfs" = "yes" ; then - echo "checking for XFontSet" 1>&6 -echo "configure:7748: checking for XFontSet" >&5 - -echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6 -echo "configure:7751: checking for XmbDrawString in -lX11" >&5 -ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'` - -xe_check_libs=" -lX11 " -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -xe_check_libs="" - -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 -with_xfs=no -fi - - - if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining USE_XFONTSET -EOF -cat >> confdefs.h <<\EOF -#define USE_XFONTSET 1 -EOF -} - - if test "$with_xim" = "no" ; then - extra_objs="$extra_objs input-method-xfs.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"input-method-xfs.o\"" - fi - fi - fi - fi - test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support - test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6 -echo "configure:7807: checking for wnn/jllib.h" >&5 - -cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7815: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 -with_wnn=no -fi - } - if test "$with_wnn" != "no"; then - for ac_func in crypt -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7840: checking for $ac_func" >&5 - -cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:7866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - { test "$extra_verbose" = "yes" && cat << EOF - Defining $ac_tr_func -EOF -cat >> confdefs.h <&6 -fi -done - - test "$ac_cv_func_crypt" != "yes" && { -echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:7895: checking for crypt in -lcrypt" >&5 -ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` - -xe_check_libs=" -lcrypt " -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -xe_check_libs="" - -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - { test "$extra_verbose" = "yes" && cat << EOF - Defining $ac_tr_lib -EOF -cat >> confdefs.h <&6 -fi - - } - fi - test -z "$with_wnn" && { -echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6 -echo "configure:7945: checking for jl_dic_list_e in -lwnn" >&5 -ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'` - -xe_check_libs=" -lwnn " -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -xe_check_libs="" - -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 -with_wnn=no -fi - - } - test -z "$with_wnn" && with_wnn=yes - if test "$with_wnn" = "yes"; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_WNN -EOF -cat >> confdefs.h <<\EOF -#define HAVE_WNN 1 -EOF -} - - libs_x="-lwnn $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lwnn\" to \$libs_x"; fi - extra_objs="$extra_objs mule-wnnfns.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"mule-wnnfns.o\"" - fi - if test "$with_wnn6" != "no"; then - -echo $ac_n "checking for jl_fi_dic_list in -lwnn""... $ac_c" 1>&6 -echo "configure:7999: checking for jl_fi_dic_list in -lwnn" >&5 -ac_lib_var=`echo wnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'` - -xe_check_libs=" -lwnn " -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -xe_check_libs="" - -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - with_wnn6=yes -else - echo "$ac_t""no" 1>&6 -fi - - - test "$with_wnn6" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF - Defining WNN6 -EOF -cat >> confdefs.h <<\EOF -#define WNN6 1 -EOF -} - - fi - fi - - canna_includes_found=no - if test "$with_canna" != "no"; then - ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6 -echo "configure:8050: checking for canna/jrkanji.h" >&5 - -cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8058: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - canna_includes_found=yes -else - echo "$ac_t""no" 1>&6 -fi - - fi - if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \ - -d "/usr/local/canna/include"; then - save_c_switch_site="$c_switch_site" - c_switch_site="$c_switch_site -I/usr/local/canna/include" - ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6 -echo "configure:8085: checking for canna/jrkanji.h" >&5 - -cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8093: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - canna_includes_found=yes -else - echo "$ac_t""no" 1>&6 -fi - - if test "$canna_includes_found" != "yes"; then - c_switch_site="$save_c_switch_site" - with_canna="no" - fi - fi - - test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6 -echo "configure:8121: checking for canna/RK.h" >&5 - -cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8129: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 -with_canna=no -fi - } - test -z "$with_canna" && { -echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6 -echo "configure:8152: checking for RkBgnBun in -lRKC" >&5 -ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'` - -xe_check_libs=" -lRKC " -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -xe_check_libs="" - -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 -with_canna=no -fi - - } - test -z "$with_canna" && { -echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6 -echo "configure:8191: checking for jrKanjiControl in -lcanna" >&5 -ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'` - -xe_check_libs=" -lcanna " -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -xe_check_libs="" - -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 -with_canna=no -fi - - } - test -z "$with_canna" && with_canna=yes - if test "$with_canna" = "yes"; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_CANNA -EOF -cat >> confdefs.h <<\EOF -#define HAVE_CANNA 1 -EOF -} - - libs_x="-lcanna -lRKC $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lcanna -lRKC\" to \$libs_x"; fi - extra_objs="$extra_objs mule-canna.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"mule-canna.o\"" - fi - fi - -else for feature in xim canna wnn; do - if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then - echo "configure: warning: "--with-${feature} ignored: Not valid without Mule support"" 1>&2 - fi - eval "with_${feature}=no" - done -fi - -if test "$need_motif" = "yes" ; then - libs_x="-lXm $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lXm\" to \$libs_x"; fi - -echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6 -echo "configure:8256: checking for layout_object_getvalue in -li18n" >&5 -ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'` - -xe_check_libs=" -li18n " -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -xe_check_libs="" - -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - libs_x="-li18n $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-li18n\" to \$libs_x"; fi -else - echo "$ac_t""no" 1>&6 -fi - - - -if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then - ld_switch_site=`echo '' $ld_switch_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"` - ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"` - - runpath="" runpath_dirs="" - if test -n "$LD_RUN_PATH"; then - runpath="$LD_RUN_PATH" - elif test "$GCC" = "yes"; then - ld_switch_run_save="$ld_switch_run"; ld_switch_run="" - echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c - xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null' - for arg in `eval "$xe_runpath_link" | grep ' -L'`; do - case "$arg" in P,* | -L* | -R* ) - for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do - { -xe_runpath_dir="$dir" - test "$xe_runpath_dir" != "/lib" -a \ - "$xe_runpath_dir" != "/usr/lib" -a \ - -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \ - eval "$xe_add_unique_runpath_dir" -} - done ;; - esac - done - ld_switch_run="$ld_switch_run_save" - rm -f conftest* - else - for arg in $ld_switch_site $ld_switch_x_site; do - case "$arg" in -L*) { -xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'` - test "$xe_runpath_dir" != "/lib" -a \ - "$xe_runpath_dir" != "/usr/lib" -a \ - -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \ - eval "$xe_add_unique_runpath_dir" -};; esac - done - if test "$opsys $need_motif" = "sol2 yes"; then - xe_runpath_dir="/opt/SUNWdt/lib"; - eval "$xe_add_unique_runpath_dir"; - fi - fi - if test -n "$runpath"; then - ld_switch_run="${dash_r}${runpath}" - -if test "$GCC" = "yes"; then - set x $ld_switch_run; shift; ld_switch_run="" - while test -n "$1"; do - case $1 in - -L | -l | -u ) ld_switch_run="$ld_switch_run $1 $2"; shift ;; - -L* | -l* | -u* | -Wl* ) ld_switch_run="$ld_switch_run $1" ;; - -Xlinker* ) ;; - * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;; - esac - shift - done -fi - test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath" - fi -fi - -fi - -for ac_func in cbrt closedir dup2 eaccess fmod fpathconf frexp ftime gethostname getpagesize gettimeofday getcwd getwd logb lrand48 matherr mkdir mktime perror poll random rename res_init rint rmdir select setitimer setpgid setlocale setsid sigblock sighold sigprocmask snprintf strcasecmp strerror tzset ulimit usleep utimes waitpid vsnprintf -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8358: checking for $ac_func" >&5 - -cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:8384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - { test "$extra_verbose" = "yes" && cat << EOF - Defining $ac_tr_func -EOF -cat >> confdefs.h <&6 -fi -done - - - -case "$opsys" in - linuxaout* | bsdos3* | freebsd* | decosf4-0* | aix4* ) extra_objs="$extra_objs realpath.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"realpath.o\"" - fi ;; - * ) - for ac_func in realpath -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8421: checking for $ac_func" >&5 - -cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:8447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - { test "$extra_verbose" = "yes" && cat << EOF - Defining $ac_tr_func -EOF -cat >> confdefs.h <&6 -fi -done - - test "$ac_cv_func_realpath" != "yes" && extra_objs="$extra_objs realpath.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"realpath.o\"" - fi ;; -esac - -echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6 -echo "configure:8480: checking whether netdb declares h_errno" >&5 -cat > conftest.$ac_ext < -int main() { -return h_errno; -; return 0; } -EOF -if { (eval echo configure:8489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_H_ERRNO -EOF -cat >> confdefs.h <<\EOF -#define HAVE_H_ERRNO 1 -EOF -} - -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "$ac_t""no" 1>&6 -fi -rm -f conftest* - -echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6 -echo "configure:8509: checking for sigsetjmp" >&5 -cat > conftest.$ac_ext < -int main() { -sigjmp_buf bar; sigsetjmp (bar, 0); -; return 0; } -EOF -if { (eval echo configure:8518: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_SIGSETJMP -EOF -cat >> confdefs.h <<\EOF -#define HAVE_SIGSETJMP 1 -EOF -} - -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "$ac_t""no" 1>&6 -fi -rm -f conftest* - -echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6 -echo "configure:8538: checking whether localtime caches TZ" >&5 - -if test "$ac_cv_func_tzset" = "yes"; then -cat > conftest.$ac_ext < -#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); -} -EOF -if { (eval echo configure:8577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 -then - emacs_cv_localtime_cache=no -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - emacs_cv_localtime_cache=yes -fi -rm -fr conftest* -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 -echo "$ac_t""$emacs_cv_localtime_cache" 1>&6 -if test $emacs_cv_localtime_cache = yes; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining LOCALTIME_CACHE -EOF -cat >> confdefs.h <<\EOF -#define LOCALTIME_CACHE 1 -EOF -} - -fi - -if test "$HAVE_TIMEVAL" = "yes"; then -echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6 -echo "configure:8606: checking whether gettimeofday accepts one or two arguments" >&5 -cat > conftest.$ac_ext < -#include -#else -#ifdef HAVE_SYS_TIME_H -#include -#else -#include -#endif -#endif - -int main() { - - struct timeval time; - struct timezone dummy; - gettimeofday (&time, &dummy); - -; return 0; } -EOF -if { (eval echo configure:8630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - echo "$ac_t""two" 1>&6 -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "$ac_t""one" 1>&6 - { test "$extra_verbose" = "yes" && cat << \EOF - Defining GETTIMEOFDAY_ONE_ARGUMENT -EOF -cat >> confdefs.h <<\EOF -#define GETTIMEOFDAY_ONE_ARGUMENT 1 -EOF -} - -fi -rm -f conftest* -fi - - -echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:8652: checking for inline" >&5 - -ac_cv_c_inline=no -for ac_kw in inline __inline__ __inline; do - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_c_inline=$ac_kw; break -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 -fi -rm -f conftest* -done - - -echo "$ac_t""$ac_cv_c_inline" 1>&6 -case "$ac_cv_c_inline" in - inline | yes) ;; - no) { test "$extra_verbose" = "yes" && cat << \EOF - Defining inline = -EOF -cat >> confdefs.h <<\EOF -#define inline -EOF -} - ;; - *) { test "$extra_verbose" = "yes" && cat << EOF - Defining inline = $ac_cv_c_inline -EOF -cat >> confdefs.h <> confdefs.h <<\EOF -#define HAVE_INLINE 1 -EOF -} - - test "$GCC" = "yes" && extra_objs="$extra_objs inline.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"inline.o\"" - fi -fi - - -# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works -# for constant arguments. Useless! -echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 -echo "configure:8714: checking for working alloca.h" >&5 - -cat > conftest.$ac_ext < -int main() { -char *p = alloca(2 * sizeof(int)); -; return 0; } -EOF -if { (eval echo configure:8724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - ac_cv_header_alloca_h=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_header_alloca_h=no -fi -rm -f conftest* - -echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 -if test $ac_cv_header_alloca_h = yes; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_ALLOCA_H -EOF -cat >> confdefs.h <<\EOF -#define HAVE_ALLOCA_H 1 -EOF -} - -fi - -echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:8748: checking for alloca" >&5 - -cat > conftest.$ac_ext < -# else -# ifdef _AIX - #pragma alloca -# else -# ifndef alloca /* predefined by HP cc +Olibcalls */ -char *alloca (); -# endif -# endif -# endif -#endif - -int main() { -char *p = (char *) alloca(1); -; return 0; } -EOF -if { (eval echo configure:8774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - ac_cv_func_alloca_works=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_func_alloca_works=no -fi -rm -f conftest* - -echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 -if test $ac_cv_func_alloca_works = yes; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_ALLOCA -EOF -cat >> confdefs.h <<\EOF -#define HAVE_ALLOCA 1 -EOF -} - -fi - -if test $ac_cv_func_alloca_works = no; then - # The SVR3 libPW and SVR4 libucb both contain incompatible functions - # that cause trouble. Some versions do not even contain alloca or - # contain a buggy version. If you still want to use their alloca, - # use ar to extract alloca.o from them instead of compiling alloca.c. - ALLOCA=alloca.o - { test "$extra_verbose" = "yes" && cat << \EOF - Defining C_ALLOCA -EOF -cat >> confdefs.h <<\EOF -#define C_ALLOCA 1 -EOF -} - - -echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:8813: checking whether alloca needs Cray hooks" >&5 - -cat > conftest.$ac_ext <&5 | - egrep "webecray" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_os_cray=yes -else - rm -rf conftest* - ac_cv_os_cray=no -fi -rm -f conftest* - - -echo "$ac_t""$ac_cv_os_cray" 1>&6 -if test $ac_cv_os_cray = yes; then -for ac_func in _getb67 GETB67 getb67; do - echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8840: checking for $ac_func" >&5 - -cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:8866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - { test "$extra_verbose" = "yes" && cat << EOF - Defining CRAY_STACKSEG_END = $ac_func -EOF -cat >> confdefs.h <&6 -fi - -done -fi - -echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:8896: checking stack direction for C alloca" >&5 - -cat > conftest.$ac_ext < addr) ? 1 : -1; -} -main () -{ - exit (find_stack_direction() < 0); -} -EOF -if { (eval echo configure:8918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 -then - ac_cv_c_stack_direction=1 -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_c_stack_direction=-1 -fi -rm -fr conftest* - -echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 -{ test "$extra_verbose" = "yes" && cat << EOF - Defining STACK_DIRECTION = $ac_cv_c_stack_direction -EOF -cat >> confdefs.h <&6 -echo "configure:8946: checking for vfork.h" >&5 - -cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8954: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_VFORK_H -EOF -cat >> confdefs.h <<\EOF -#define HAVE_VFORK_H 1 -EOF -} - -else - echo "$ac_t""no" 1>&6 -fi - -echo $ac_n "checking for working vfork""... $ac_c" 1>&6 -echo "configure:8982: checking for working vfork" >&5 - -cat > conftest.$ac_ext < -#include -#include -#ifdef HAVE_UNISTD_H -#include -#endif -#ifdef HAVE_VFORK_H -#include -#endif -/* On some sparc systems, changes by the child to local and incoming - argument registers are propagated back to the parent. - The compiler is told about this with #include , - but some compilers (e.g. gcc -O) don't grok . - Test for this by using a static variable whose address - is put into a register that is clobbered by the vfork. */ -static -#ifdef __cplusplus -sparc_address_test (int arg) -#else -sparc_address_test (arg) int arg; -#endif -{ - static pid_t child; - if (!child) { - child = vfork (); - if (child < 0) { - perror ("vfork"); - _exit(2); - } - if (!child) { - arg = getpid(); - write(-1, "", 0); - _exit (arg); - } - } -} -main() { - pid_t parent = getpid (); - pid_t child; - - sparc_address_test (); - - child = vfork (); - - if (child == 0) { - /* Here is another test for sparc vfork register problems. - This test uses lots of local variables, at least - as many local variables as main has allocated so far - including compiler temporaries. 4 locals are enough for - gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. - A buggy compiler should reuse the register of parent - for one of the local variables, since it will think that - parent can't possibly be used any more in this routine. - Assigning to the local variable will thus munge parent - in the parent process. */ - pid_t - p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), - p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); - /* Convince the compiler that p..p7 are live; otherwise, it might - use the same hardware register for all 8 local variables. */ - if (p != p1 || p != p2 || p != p3 || p != p4 - || p != p5 || p != p6 || p != p7) - _exit(1); - - /* On some systems (e.g. IRIX 3.3), - vfork doesn't separate parent from child file descriptors. - If the child closes a descriptor before it execs or exits, - this munges the parent's descriptor as well. - Test for this by closing stdout in the child. */ - _exit(close(fileno(stdout)) != 0); - } else { - int status; - struct stat st; - - while (wait(&status) != child) - ; - exit( - /* Was there some problem with vforking? */ - child < 0 - - /* Did the child fail? (This shouldn't happen.) */ - || status - - /* Did the vfork/compiler bug occur? */ - || parent != getpid() - - /* Did the file descriptor bug occur? */ - || fstat(fileno(stdout), &st) != 0 - ); - } -} -EOF -if { (eval echo configure:9080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 -then - ac_cv_func_vfork_works=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_func_vfork_works=no -fi -rm -fr conftest* - -echo "$ac_t""$ac_cv_func_vfork_works" 1>&6 -if test $ac_cv_func_vfork_works = no; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining vfork = fork -EOF -cat >> confdefs.h <<\EOF -#define vfork fork -EOF -} - -fi - - -echo $ac_n "checking for working strcoll""... $ac_c" 1>&6 -echo "configure:9105: checking for working strcoll" >&5 - -cat > conftest.$ac_ext < -main () -{ - exit (strcoll ("abc", "def") >= 0 || - strcoll ("ABC", "DEF") >= 0 || - strcoll ("123", "456") >= 0); -} -EOF -if { (eval echo configure:9118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 -then - ac_cv_func_strcoll_works=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_func_strcoll_works=no -fi -rm -fr conftest* - -echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6 -if test $ac_cv_func_strcoll_works = yes; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_STRCOLL -EOF -cat >> confdefs.h <<\EOF -#define HAVE_STRCOLL 1 -EOF -} - -fi - - -for ac_func in getpgrp -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9145: checking for $ac_func" >&5 - -cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:9171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - { test "$extra_verbose" = "yes" && cat << EOF - Defining $ac_tr_func -EOF -cat >> confdefs.h <&6 -fi -done - -echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6 -echo "configure:9199: checking whether getpgrp takes no argument" >&5 - -cat > conftest.$ac_ext < -#include - -int pid; -int pg1, pg2, pg3, pg4; -int ng, np, s, child; - -main() -{ - pid = getpid(); - pg1 = getpgrp(0); - pg2 = getpgrp(); - pg3 = getpgrp(pid); - pg4 = getpgrp(1); - - /* - * If all of these values are the same, it's pretty sure that - * we're on a system that ignores getpgrp's first argument. - */ - if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3) - exit(0); - - child = fork(); - if (child < 0) - exit(1); - else if (child == 0) { - np = getpid(); - /* - * If this is Sys V, this will not work; pgrp will be - * set to np because setpgrp just changes a pgrp to be - * the same as the pid. - */ - setpgrp(np, pg1); - ng = getpgrp(0); /* Same result for Sys V and BSD */ - if (ng == pg1) { - exit(1); - } else { - exit(0); - } - } else { - wait(&s); - exit(s>>8); - } -} - -EOF -if { (eval echo configure:9257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 -then - ac_cv_func_getpgrp_void=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_func_getpgrp_void=no -fi -rm -fr conftest* - - -echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6 -if test $ac_cv_func_getpgrp_void = yes; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining GETPGRP_VOID -EOF -cat >> confdefs.h <<\EOF -#define GETPGRP_VOID 1 -EOF -} - -fi - - -echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:9283: checking for working mmap" >&5 -case "$opsys" in ultrix* ) have_mmap=no ;; *) -cat > conftest.$ac_ext < -#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; -} -EOF -if { (eval echo configure:9319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 -then - have_mmap=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - have_mmap=no -fi -rm -fr conftest* ;; -esac -echo "$ac_t""$have_mmap" 1>&6 -test "$have_mmap" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_MMAP -EOF -cat >> confdefs.h <<\EOF -#define HAVE_MMAP 1 -EOF -} - - -test "$GNU_MALLOC" != "yes" -a "$have_mmap" != "yes" && rel_alloc=no -test "$rel_alloc" = "default" -a "$have_mmap" = "yes" && rel_alloc=yes -test "$rel_alloc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF - Defining REL_ALLOC -EOF -cat >> confdefs.h <<\EOF -#define REL_ALLOC 1 -EOF -} - - -ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for termios.h""... $ac_c" 1>&6 -echo "configure:9353: checking for termios.h" >&5 - -cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9361: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_TERMIOS -EOF -cat >> confdefs.h <<\EOF -#define HAVE_TERMIOS 1 -EOF -} - - { test "$extra_verbose" = "yes" && cat << \EOF - Defining SIGNALS_VIA_CHARACTERS -EOF -cat >> confdefs.h <<\EOF -#define SIGNALS_VIA_CHARACTERS 1 -EOF -} - - { test "$extra_verbose" = "yes" && cat << \EOF - Defining NO_TERMIO -EOF -cat >> confdefs.h <<\EOF -#define NO_TERMIO 1 -EOF -} - -else - echo "$ac_t""no" 1>&6 -ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for termio.h""... $ac_c" 1>&6 -echo "configure:9404: checking for termio.h" >&5 - -cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9412: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_TERMIO -EOF -cat >> confdefs.h <<\EOF -#define HAVE_TERMIO 1 -EOF -} - -else - echo "$ac_t""no" 1>&6 -fi - -fi - - - -echo $ac_n "checking for socket""... $ac_c" 1>&6 -echo "configure:9444: checking for socket" >&5 - -cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char socket(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_socket) || defined (__stub___socket) -choke me -#else -socket(); -#endif - -; return 0; } -EOF -if { (eval echo configure:9470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_func_socket=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_socket=no" -fi -rm -f conftest* - -if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6 -echo "configure:9485: checking for netinet/in.h" >&5 - -cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9493: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6 -echo "configure:9510: checking for arpa/inet.h" >&5 - -cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9518: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_SOCKETS -EOF -cat >> confdefs.h <<\EOF -#define HAVE_SOCKETS 1 -EOF -} - - echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6 -echo "configure:9543: checking "for sun_len member in struct sockaddr_un"" >&5 - cat > conftest.$ac_ext < -#include -#include - -int main() { -static struct sockaddr_un x; x.sun_len = 1; -; return 0; } -EOF -if { (eval echo configure:9556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_SOCKADDR_SUN_LEN -EOF -cat >> confdefs.h <<\EOF -#define HAVE_SOCKADDR_SUN_LEN 1 -EOF -} - -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "$ac_t""no" 1>&6 -fi -rm -f conftest* - echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6 -echo "configure:9574: checking "for ip_mreq struct in netinet/in.h"" >&5 - cat > conftest.$ac_ext < -#include - -int main() { -static struct ip_mreq x; -; return 0; } -EOF -if { (eval echo configure:9586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_MULTICAST -EOF -cat >> confdefs.h <<\EOF -#define HAVE_MULTICAST 1 -EOF -} - -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "$ac_t""no" 1>&6 -fi -rm -f conftest* -else - echo "$ac_t""no" 1>&6 -fi - -else - echo "$ac_t""no" 1>&6 -fi - -else - echo "$ac_t""no" 1>&6 -fi - - -echo $ac_n "checking for msgget""... $ac_c" 1>&6 -echo "configure:9617: checking for msgget" >&5 - -cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char msgget(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_msgget) || defined (__stub___msgget) -choke me -#else -msgget(); -#endif - -; return 0; } -EOF -if { (eval echo configure:9643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_func_msgget=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_msgget=no" -fi -rm -f conftest* - -if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6 -echo "configure:9658: checking for sys/ipc.h" >&5 - -cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9666: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6 -echo "configure:9683: checking for sys/msg.h" >&5 - -cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9691: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_SYSVIPC -EOF -cat >> confdefs.h <<\EOF -#define HAVE_SYSVIPC 1 -EOF -} - -else - echo "$ac_t""no" 1>&6 -fi - -else - echo "$ac_t""no" 1>&6 -fi - -else - echo "$ac_t""no" 1>&6 -fi - - -ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for dirent.h""... $ac_c" 1>&6 -echo "configure:9729: checking for dirent.h" >&5 - -cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9737: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - { test "$extra_verbose" = "yes" && cat << \EOF - Defining SYSV_SYSTEM_DIR -EOF -cat >> confdefs.h <<\EOF -#define SYSV_SYSTEM_DIR 1 -EOF -} - -else - echo "$ac_t""no" 1>&6 -ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6 -echo "configure:9764: checking for sys/dir.h" >&5 - -cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9772: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 -{ test "$extra_verbose" = "yes" && cat << \EOF - Defining NONSYSTEM_DIR_LIBRARY -EOF -cat >> confdefs.h <<\EOF -#define NONSYSTEM_DIR_LIBRARY 1 -EOF -} - -fi - -fi - - -ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for nlist.h""... $ac_c" 1>&6 -echo "configure:9805: checking for nlist.h" >&5 - -cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9813: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - { test "$extra_verbose" = "yes" && cat << \EOF - Defining NLIST_STRUCT -EOF -cat >> confdefs.h <<\EOF -#define NLIST_STRUCT 1 -EOF -} - -else - echo "$ac_t""no" 1>&6 -fi - - - -echo "checking "for sound support"" 1>&6 -echo "configure:9843: checking "for sound support"" >&5 -case "$with_sound" in - native | both ) with_native_sound=yes;; - nas | no ) with_native_sound=no;; -esac -test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes - -if test "$with_native_sound" != "no"; then - if test -n "$native_sound_lib"; then - ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6 -echo "configure:9854: checking for multimedia/audio_device.h" >&5 - -cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9862: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - sound_found=yes sound_cflags="" - extra_objs="$extra_objs sunplay.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"sunplay.o\"" - fi -else - echo "$ac_t""no" 1>&6 -fi - - fi - - if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then - sound_found=yes - extra_objs="$extra_objs sunplay.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"sunplay.o\"" - fi - if test -d "/usr/demo/SOUND/include" - then sound_cflags="-I/usr/demo/SOUND/include" - else sound_cflags="-I/usr/demo/SOUND" - fi - if test -z "$native_sound_lib" ; then - if test -r "/usr/demo/SOUND/lib/libaudio.a" - then native_sound_lib="/usr/demo/SOUND/lib/libaudio.a" - else native_sound_lib="/usr/demo/SOUND/libaudio.a" - fi - fi - fi - - if test -z "$sound_found"; then - case "$canonical" in - *-sgi-* ) - if test -z "$native_sound_lib"; then - -echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6 -echo "configure:9910: checking for ALopenport in -laudio" >&5 -ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'` - -xe_check_libs=" -laudio " -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -xe_check_libs="" - -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - native_sound_lib="-laudio" -else - echo "$ac_t""no" 1>&6 -fi - - - fi - if test -n "$native_sound_lib"; then - sound_found=yes sound_cflags="" - extra_objs="$extra_objs sgiplay.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"sgiplay.o\"" - fi - fi ;; - hppa*-hp-hpux* ) - if test -z "$native_sound_lib"; then - -echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6 -echo "configure:9957: checking for AOpenAudio in -lAlib" >&5 -ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'` - -xe_check_libs=" -lAlib " -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -xe_check_libs="" - -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - native_sound_lib="-lAlib" -else - echo "$ac_t""no" 1>&6 -fi - - - fi - if test -n "$native_sound_lib"; then - sound_found=yes - extra_objs="$extra_objs hpplay.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"hpplay.o\"" - fi - if test "$GCC" = "yes" # Kludge city - then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples" - else sound_cflags="+e -I/usr/audio/examples" - fi - fi ;; - esac - fi - - if test -z "$sound_found"; then - for dir in "machine" "sys" "linux"; do - ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6 -echo "configure:10011: checking for ${dir}/soundcard.h" >&5 - -cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10019: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - sound_found=yes - extra_objs="$extra_objs linuxplay.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"linuxplay.o\"" - fi - { test "$extra_verbose" = "yes" && cat << EOF - Defining SOUNDCARD_H_PATH = "${dir}/soundcard.h" -EOF -cat >> confdefs.h <&6 -fi - - done - fi - - test "$sound_found" = "yes" && with_native_sound=yes -fi - -if test -z "$with_sound"; then - if test "$with_native_sound" = "yes" -o -n "$native_sound_lib"; then - with_sound=native - fi -fi - -if test "$with_native_sound" = "yes"; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_NATIVE_SOUND -EOF -cat >> confdefs.h <<\EOF -#define HAVE_NATIVE_SOUND 1 -EOF -} - - test -n "$native_sound_lib" && LIBS="$native_sound_lib $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"$native_sound_lib\" to \$LIBS"; fi -fi - -case "$with_sound" in both | nas ) - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_NAS_SOUND -EOF -cat >> confdefs.h <<\EOF -#define HAVE_NAS_SOUND 1 -EOF -} - - extra_objs="$extra_objs nas.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"nas.o\"" - fi - libs_x="-laudio $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-laudio\" to \$libs_x"; fi - cat > conftest.$ac_ext < -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "AuXtErrorJump" >/dev/null 2>&1; then - : -else - rm -rf conftest* - { test "$extra_verbose" = "yes" && cat << \EOF - Defining NAS_NO_ERROR_JUMP -EOF -cat >> confdefs.h <<\EOF -#define NAS_NO_ERROR_JUMP 1 -EOF -} - -fi -rm -f conftest* - -esac - - -test -z "$with_tty" && with_tty=yes - -if test "$with_tty" = "yes" ; then - echo "checking for TTY-related features" 1>&6 -echo "configure:10116: checking for TTY-related features" >&5 - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_TTY -EOF -cat >> confdefs.h <<\EOF -#define HAVE_TTY 1 -EOF -} - - extra_objs="$extra_objs console-tty.o device-tty.o event-tty.o frame-tty.o objects-tty.o redisplay-tty.o cm.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"console-tty.o device-tty.o event-tty.o frame-tty.o objects-tty.o redisplay-tty.o cm.o\"" - fi - - if test -z "$with_ncurses"; then - -echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6 -echo "configure:10132: checking for tgetent in -lncurses" >&5 -ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'` - -xe_check_libs=" -lncurses " -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -xe_check_libs="" - -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - with_ncurses=yes -else - echo "$ac_t""no" 1>&6 -with_ncurses=no -fi - - - fi - if test "$with_ncurses" = "yes"; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_NCURSES -EOF -cat >> confdefs.h <<\EOF -#define HAVE_NCURSES 1 -EOF -} - - ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6 -echo "configure:10181: checking for ncurses/curses.h" >&5 - -cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10189: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - curses_h_path=ncurses/curses.h -else - echo "$ac_t""no" 1>&6 -fi - - ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6 -echo "configure:10211: checking for ncurses/term.h" >&5 - -cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10219: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - term_h_path=ncurses/term.h -else - echo "$ac_t""no" 1>&6 -fi - - extra_objs="$extra_objs terminfo.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"terminfo.o\"" - fi - LIBS="-lncurses $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lncurses\" to \$LIBS"; fi - - if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then - save_c_switch_site="$c_switch_site" - c_switch_site="$c_switch_site -I/usr/include/ncurses" - ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6 -echo "configure:10249: checking for ncurses/curses.h" >&5 - -cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10257: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - curses_h_path=ncurses/curses.h -else - echo "$ac_t""no" 1>&6 -fi - - if test "$ac_cv_header_ncurses_curses_h" = "yes" - then echo "configure: warning: "Your system has the bogus ncurses include bug."" 1>&2 - else c_switch_site="$save_c_switch_site" - fi - fi - else if test "$have_terminfo" = "yes"; then - extra_objs="$extra_objs terminfo.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"terminfo.o\"" - fi - if test -n "$libs_termcap"; then - LIBS="$libs_termcap $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"$libs_termcap\" to \$LIBS"; fi - else - for lib in curses termlib termcap; do - -echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6 -echo "configure:10292: checking for tgetent in -l$lib" >&5 -ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'` - -xe_check_libs=" -l$lib " -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -xe_check_libs="" - -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - LIBS="-l${lib} $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-l${lib}\" to \$LIBS"; fi; break -else - echo "$ac_t""no" 1>&6 -fi - - - done - fi - else extra_objs="$extra_objs tparam.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"tparam.o\"" - fi - case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac - if test -n "$libs_termcap"; then - LIBS="$libs_termcap $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"$libs_termcap\" to \$LIBS"; fi - else - -echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6 -echo "configure:10339: checking for tgetent in -lcurses" >&5 -ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'` - -xe_check_libs=" -lcurses " -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -xe_check_libs="" - -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - LIBS="-lcurses $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lcurses\" to \$LIBS"; fi -else - echo "$ac_t""no" 1>&6 -echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6 -echo "configure:10373: checking for tgetent in -ltermcap" >&5 -ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'` - -xe_check_libs=" -ltermcap " -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -xe_check_libs="" - -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - LIBS="-ltermcap $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-ltermcap\" to \$LIBS"; fi -else - echo "$ac_t""no" 1>&6 -extra_objs="$extra_objs termcap.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"termcap.o\"" - fi -fi - - -fi - - - fi - fi - fi - { test "$extra_verbose" = "yes" && cat << EOF - Defining CURSES_H_PATH = "${curses_h_path-curses.h}" -EOF -cat >> confdefs.h <> confdefs.h <&6 -echo "configure:10437: checking for gpm.h" >&5 - -cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10445: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 -with_gpm=no -fi - } - test -z "$with_gpm" && { -echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6 -echo "configure:10468: checking for Gpm_Open in -lgpm" >&5 -ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'` - -xe_check_libs=" -lgpm " -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -xe_check_libs="" - -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - with_gpm=yes -else - echo "$ac_t""no" 1>&6 -with_gpm=no -fi - - } - if test "$with_gpm" = "yes"; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_GPM -EOF -cat >> confdefs.h <<\EOF -#define HAVE_GPM 1 -EOF -} - - extra_objs="$extra_objs gpmevent.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"gpmevent.o\"" - fi - LIBS="-lgpm $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lgpm\" to \$LIBS"; fi - fi - -else for feature in ncurses gpm; do - if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then - echo "configure: warning: "--with-${feature} ignored: Not valid without TTY support"" 1>&2 - fi - eval "with_${feature}=no" - done -fi -test "$with_x11" = "yes" -o "$with_tty" = "yes" && extra_objs="$extra_objs event-unixoid.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"event-unixoid.o\"" - fi - - -echo "checking for database support" 1>&6 -echo "configure:10533: checking for database support" >&5 - -if test "$with_database_gnudbm" != "no"; then - for ac_hdr in ndbm.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:10540: checking for $ac_hdr" >&5 - -cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10548: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - { test "$extra_verbose" = "yes" && cat << EOF - Defining $ac_tr_hdr -EOF -cat >> confdefs.h <&6 -fi -done - - if test "$have_ndbm_h" = "yes"; then - -echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6 -echo "configure:10580: checking for dbm_open in -lgdbm" >&5 -ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'` - -xe_check_libs=" -lgdbm " -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -xe_check_libs="" - -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - with_database_gnudbm=yes have_libgdbm=yes -else - echo "$ac_t""no" 1>&6 -fi - - - fi - if test "$with_database_gnudbm" != "yes"; then - echo $ac_n "checking for dbm_open""... $ac_c" 1>&6 -echo "configure:10619: checking for dbm_open" >&5 - -cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dbm_open(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_dbm_open) || defined (__stub___dbm_open) -choke me -#else -dbm_open(); -#endif - -; return 0; } -EOF -if { (eval echo configure:10645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_func_dbm_open=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_dbm_open=no" -fi -rm -f conftest* - -if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then - echo "$ac_t""yes" 1>&6 - with_database_gnudbm=yes -else - echo "$ac_t""no" 1>&6 -fi - - fi - if test "$with_database_gnudbm" = "yes"; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_DBM -EOF -cat >> confdefs.h <<\EOF -#define HAVE_DBM 1 -EOF -} - - test "$have_libgdbm" = "yes" && LIBS="-lgdbm $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lgdbm\" to \$LIBS"; fi - with_database_dbm=no - else with_database_gnudbm=no - fi -fi - -if test "$with_database_dbm" != "no"; then - echo $ac_n "checking for dbm_open""... $ac_c" 1>&6 -echo "configure:10681: checking for dbm_open" >&5 - -cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dbm_open(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_dbm_open) || defined (__stub___dbm_open) -choke me -#else -dbm_open(); -#endif - -; return 0; } -EOF -if { (eval echo configure:10707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_func_dbm_open=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_dbm_open=no" -fi -rm -f conftest* - -if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then - echo "$ac_t""yes" 1>&6 - with_database_dbm=yes need_libdbm=no -else - echo "$ac_t""no" 1>&6 -fi - - if test "$need_libdbm" != "no"; then - -echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6 -echo "configure:10728: checking for dbm_open in -ldbm" >&5 -ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'` - -xe_check_libs=" -ldbm " -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -xe_check_libs="" - -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - with_database_dbm=yes need_libdbm=yes -else - echo "$ac_t""no" 1>&6 -fi - - - fi - if test "$with_database_dbm" = "yes"; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_DBM -EOF -cat >> confdefs.h <<\EOF -#define HAVE_DBM 1 -EOF -} - - test "$need_libdbm" = "yes" && LIBS="-ldbm $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-ldbm\" to \$LIBS"; fi - else with_database_dbm=no - fi -fi - -if test "$with_database_berkdb" != "no"; then - echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6 -echo "configure:10781: checking for Berkeley db.h" >&5 - for path in "db/db.h" "db.h"; do - cat > conftest.$ac_ext < -typedef uint8_t u_int8_t; -typedef uint16_t u_int16_t; -typedef uint32_t u_int32_t; -#ifdef WE_DONT_NEED_QUADS -typedef uint64_t u_int64_t; -#endif -#endif -#include <$path> - -int main() { - -; return 0; } -EOF -if { (eval echo configure:10802: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - db_h_path="$path"; break -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 -fi -rm -f conftest* - done - if test -z "$db_h_path" - then echo "$ac_t""no" 1>&6; with_database_berkdb=no - else echo "$ac_t""$db_h_path" 1>&6 - fi - - if test "$with_database_berkdb" != "no"; then - echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6 -echo "configure:10818: checking for Berkeley DB version" >&5 - cat > conftest.$ac_ext < -#if DB_VERSION_MAJOR > 1 -yes -#endif - -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "yes" >/dev/null 2>&1; then - rm -rf conftest* - echo "$ac_t""2" 1>&6; dbfunc=db_open -else - rm -rf conftest* - echo "$ac_t""1" 1>&6; dbfunc=dbopen -fi -rm -f conftest* - - echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6 -echo "configure:10839: checking for $dbfunc" >&5 - -cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $dbfunc(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$dbfunc) || defined (__stub___$dbfunc) -choke me -#else -$dbfunc(); -#endif - -; return 0; } -EOF -if { (eval echo configure:10865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_func_$dbfunc=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$dbfunc=no" -fi -rm -f conftest* - -if eval "test \"`echo '$ac_cv_func_'$dbfunc`\" = yes"; then - echo "$ac_t""yes" 1>&6 - with_database_berkdb=yes need_libdb=no -else - echo "$ac_t""no" 1>&6 - - -echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6 -echo "configure:10884: checking for $dbfunc in -ldb" >&5 -ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'` - -xe_check_libs=" -ldb " -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -xe_check_libs="" - -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - with_database_berkdb=yes need_libdb=yes -else - echo "$ac_t""no" 1>&6 -fi - - -fi - - fi - - if test "$with_database_berkdb" = "yes"; then - { test "$extra_verbose" = "yes" && cat << EOF - Defining DB_H_PATH = "$db_h_path" -EOF -cat >> confdefs.h <> confdefs.h <<\EOF -#define HAVE_BERKELEY_DB 1 -EOF -} - - test "$need_libdb" = "yes" && LIBS="-ldb $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-ldb\" to \$LIBS"; fi - else with_database_berkdb=no - fi -fi - -if test "$with_database_gnudbm $with_database_dbm $with_database_berkdb" \ - != "no no no"; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_DATABASE -EOF -cat >> confdefs.h <<\EOF -#define HAVE_DATABASE 1 -EOF -} - - extra_objs="$extra_objs database.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"database.o\"" - fi -fi - -if test "$with_socks" = "yes"; then - -echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6 -echo "configure:10964: checking for SOCKSinit in -lsocks" >&5 -ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'` - -xe_check_libs=" -lsocks " -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -xe_check_libs="" - -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo socks | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - { test "$extra_verbose" = "yes" && cat << EOF - Defining $ac_tr_lib -EOF -cat >> confdefs.h <&6 -fi - - - test -n "$ac_cv_lib_socks_SOCKSinit" && { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_SOCKS -EOF -cat >> confdefs.h <<\EOF -#define HAVE_SOCKS 1 -EOF -} - -fi - -if test "$usage_tracking" = "yes"; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining USAGE_TRACKING -EOF -cat >> confdefs.h <<\EOF -#define USAGE_TRACKING 1 -EOF -} - - LIBS="-Bstatic -lut -Bdynamic $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-Bstatic -lut -Bdynamic\" to \$LIBS"; fi -fi - -for ac_hdr in dlfcn.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:11037: checking for $ac_hdr" >&5 - -cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11045: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - { test "$extra_verbose" = "yes" && cat << EOF - Defining $ac_tr_hdr -EOF -cat >> confdefs.h <&6 -fi -done - -test -z "$with_shlib" && test ! -z "$have_dlfcn" && { -echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:11076: checking for dlopen in -ldl" >&5 -ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` - -xe_check_libs=" -ldl " -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -xe_check_libs="" - -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_DLOPEN -EOF -cat >> confdefs.h <<\EOF -#define HAVE_DLOPEN 1 -EOF -} - DLL_LIB=dl; with_shlib=yes -else - echo "$ac_t""no" 1>&6 -fi - - } -test -z "$with_shlib" && test ! -z "$have_dlfcn" && { -echo $ac_n "checking for _dlopen in -lc""... $ac_c" 1>&6 -echo "configure:11121: checking for _dlopen in -lc" >&5 -ac_lib_var=`echo c'_'_dlopen | sed 'y%./+-%__p_%'` - -xe_check_libs=" -lc " -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -xe_check_libs="" - -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_DLOPEN -EOF -cat >> confdefs.h <<\EOF -#define HAVE_DLOPEN 1 -EOF -} - DLL_LIB=; with_shlib=yes -else - echo "$ac_t""no" 1>&6 -fi - - } -test -z "$with_shlib" && test ! -z "$have_dlfcn" && { -echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6 -echo "configure:11166: checking for dlopen in -lc" >&5 -ac_lib_var=`echo c'_'dlopen | sed 'y%./+-%__p_%'` - -xe_check_libs=" -lc " -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -xe_check_libs="" - -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_DLOPEN -EOF -cat >> confdefs.h <<\EOF -#define HAVE_DLOPEN 1 -EOF -} - DLL_LIB=; with_shlib=yes -else - echo "$ac_t""no" 1>&6 -fi - - } -test -z "$with_shlib" && { -echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 -echo "configure:11211: checking for shl_load in -ldld" >&5 -ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` - -xe_check_libs=" -ldld " -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -xe_check_libs="" - -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_SHL_LOAD -EOF -cat >> confdefs.h <<\EOF -#define HAVE_SHL_LOAD 1 -EOF -} - DLL_LIB=dld; with_shlib=yes -else - echo "$ac_t""no" 1>&6 -fi - - } -test -z "$with_shlib" && { -echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6 -echo "configure:11256: checking for dld_init in -ldld" >&5 -ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'` - -xe_check_libs=" -ldld " -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -xe_check_libs="" - -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_DLD_INIT -EOF -cat >> confdefs.h <<\EOF -#define HAVE_DLD_INIT 1 -EOF -} - DLL_LIB=dld; with_shlib=yes -else - echo "$ac_t""no" 1>&6 -fi - - } -if test "$with_shlib" = "yes"; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_SHLIB -EOF -cat >> confdefs.h <<\EOF -#define HAVE_SHLIB 1 -EOF -} - - extra_objs="$extra_objs sysdll.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"sysdll.o\"" - fi - extra_objs="$extra_objs dll.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"dll.o\"" - fi - test ! -z "$DLL_LIB" && LIBS="-l${DLL_LIB} $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-l${DLL_LIB}\" to \$LIBS"; fi - -dll_ld="ld" -dll_lflags="-shared" -dll_cflags="-r" -dll_oflags="-o " - -echo $ac_n "checking how to build a shared library""... $ac_c" 1>&6 -echo "configure:11322: checking how to build a shared library" >&5 -case `uname -rs` in - UNIX_SV*|UNIX_System_V*) - dll_lflags="-G" - dll_cflags=-Kpic - dll_ld="ld" - ;; - BSD/OS*) - dll_cflags= - dll_lflags="-r" - dll_ld="shlicc2" - ;; - FreeBSD*2*) - dll_lflags="-Bshareable" - dll_cflags="-fPIC -DPIC" - dll_ld=ld - ;; - SunOS*4.*) - dll_cflags="-P" - dll_lflags="-dp -assert pure-text -assert nodefinitions" - ;; - SunOS*5.*) - dll_ld="cc" - dll_cflags="-KPIC" - dll_lflags="-G" - dll_oflags="-W0,-y-o -W0,-y" - ;; - IRIX*5.*|IRIX*6.*) - dll_cflags="-KPIC" - ;; - OSF1*) - ;; - HP-UX*) - dll_ld="ld" - dll_lflags="-b" - dll_cflags="+z" - ;; - SCO_SV*) - dll_ld="ld" - dll_lflags="-G" - dll_cflags="-Kpic" - ;; - AIX*) - dll_lflags="-H512 -T512 -bhalt:4 -bM:SRE -bE:\${@:.ell=.exp} -b noentry -lc" - dll_ld="ld" - ;; - *) - ;; - esac - - if test "$GCC" = "yes" ; then - dll_cflags="-fPIC" - case `uname -rs` in - SunOS*5.*) - dll_ld="ld" - dll_oflags="-o " - dll_lflags="-G" - ;; - SCO_SV*) - dll_ld="ld" - dll_lflags="-G" - dll_cflags="-b elf" - ;; - FreeBSD*) - dll_cflags="-DDLSYM_NEEDS_UNDERSCORE -DPIC -fPIC" - dll_lflags="-Bshareable" - dll_ld=ld - ;; - BSD/OS*) - dll_cflags= - dll_lflags="-r" - dll_ld="shlicc2" - ;; - UNIX_SV*) - dll_cflags="-fPIC" - ;; - *) - dll_ld="$CC" - dll_lflags="-shared" - esac - fi - - echo "$ac_t"""lflags: $dll_lflags cflags: $dll_cflags"" 1>&6 - - - - - - for ac_func in dlerror -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11413: checking for $ac_func" >&5 - -cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:11439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - { test "$extra_verbose" = "yes" && cat << EOF - Defining $ac_tr_func -EOF -cat >> confdefs.h <&6 -fi -done - - ld_dynamic_link_flags= - case "$opsys" in - hpux*) ld_dynamic_link_flags="-Wl,-E" ;; - linux*) ld_dynamic_link_flags="-rdynamic" ;; - *) ;; - esac -fi - -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 -then - : -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - - 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 --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 -fi -rm -fr conftest* - - -{ test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_UNIX_PROCESSES -EOF -cat >> confdefs.h <<\EOF -#define HAVE_UNIX_PROCESSES 1 -EOF -} - -extra_objs="$extra_objs process-unix.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"process-unix.o\"" - fi - - - -T="" -for W in $CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done -CFLAGS="$T" - - -T="" -for W in $extra_objs; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done -extra_objs="$T" - - -T="" -for W in -DHAVE_CONFIG_H $c_switch_site $c_switch_machine $c_switch_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done -c_switch_general="$T" - - -T="" -for W in $c_switch_x_site $X_CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done -c_switch_window_system="$T" - - -T="" -for W in $c_switch_general $c_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done -c_switch_all="$T" - - -T="" -for W in $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_run; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done -ld_switch_general="$T" - - -T="" -for W in $ld_switch_x_site; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done -ld_switch_window_system="$T" - - -T="" -for W in $ld_switch_general $ld_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done -ld_switch_all="$T" - - -T="" -for W in $LIBS $libs_machine $libs_system $libs_standard; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done -ld_libs_general="$T" - - -T="" -for W in $X_EXTRA_LIBS $libs_x $X_PRE_LIBS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done -ld_libs_window_system="$T" - - -T="" -for W in $ld_libs_window_system $ld_libs_general; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done -ld_libs_all="$T" - - - -MAKE_SUBDIR="$MAKE_SUBDIR src" && if test "$extra_verbose" = "yes"; then echo " Appending \"src\" to \$MAKE_SUBDIR"; fi -internal_makefile_list="Makefile" -SUBDIR_MAKEFILES='' -test -d lock || mkdir lock -for dir in $MAKE_SUBDIR; do - case "$dir" in */* ) ( for d in `echo $dir | sed 's:/: :g'` ; do - test -d "$d" || mkdir "$d"; cd "$d" - done ) ;; - * ) test -d "$dir" || mkdir "$dir" ;; - esac - -T="" -for W in $SUBDIR_MAKEFILES $dir/Makefile; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done -SUBDIR_MAKEFILES="$T" - - -T="" -for W in $internal_makefile_list $dir/Makefile.in; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done -internal_makefile_list="$T" - -done - - - - -for dir in src/s src/m; do - if test ! -d "$dir" ; then - echo Making symbolic link to "$srcdir/$dir" - ${LN_S} "$srcdir/$dir" "$dir" - fi -done - -if test "$extra_verbose" = "yes"; then - echo "" - for var in extra_objs c_switch_general c_switch_window_system c_switch_all ld_switch_general ld_switch_window_system ld_switch_all ld_libs_general ld_libs_window_system ld_libs_all; do eval "echo \"$var = '\$$var'\""; done - echo "" -fi - -if test -f $srcdir/src/gdbinit -a ! -f src/gdbinit ; then - echo "creating src/gdbinit"; echo "" - echo "source $srcdir/src/gdbinit" > src/gdbinit -fi - -if test "$__sunpro_c" = "yes"; then - echo "creating .sbinit"; echo "" - ( 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 - -rm -f core - - - - - - - - - - - - - - - - -PREFIX=$prefix -while true; do - case "$PREFIX" in - *\$* ) eval "PREFIX=$PREFIX" ;; - *) break ;; - esac -done - - - -EXEC_PREFIX=$exec_prefix -while true; do - case "$EXEC_PREFIX" in - *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;; - *) break ;; - esac -done - - - - -INFODIR=$infodir -while true; do - case "$INFODIR" in - *\$* ) eval "INFODIR=$INFODIR" ;; - *) break ;; - esac -done - - - - -INFOPATH=$infopath -while true; do - case "$INFOPATH" in - *\$* ) eval "INFOPATH=$INFOPATH" ;; - *) break ;; - esac -done - - - - -PACKAGE_PATH=$package_path -while true; do - case "$PACKAGE_PATH" in - *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;; - *) break ;; - esac -done - - - - -LISPDIR=$lispdir -while true; do - case "$LISPDIR" in - *\$* ) eval "LISPDIR=$LISPDIR" ;; - *) break ;; - esac -done - - - - - -ETCDIR=$etcdir -while true; do - case "$ETCDIR" in - *\$* ) eval "ETCDIR=$ETCDIR" ;; - *) break ;; - esac -done - - - - -LOCKDIR=$lockdir -while true; do - case "$LOCKDIR" in - *\$* ) eval "LOCKDIR=$LOCKDIR" ;; - *) break ;; - esac -done - - - - -ARCHLIBDIR=$archlibdir -while true; do - case "$ARCHLIBDIR" in - *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;; - *) break ;; - esac -done - - - - - - - - - - - - - - - - - - - - - -RECURSIVE_MAKE="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'" - - - - - - - -# The default is yes -if test "$with_site_lisp" = "no"; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining INHIBIT_SITE_LISP -EOF -cat >> confdefs.h <<\EOF -#define INHIBIT_SITE_LISP 1 -EOF -} - -fi - - -T="" -for W in $ac_configure_args; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done -ac_configure_args="$T" - -{ test "$extra_verbose" = "yes" && cat << EOF - Defining EMACS_CONFIGURATION = "$canonical" -EOF -cat >> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <<\EOF -#define GNU_MALLOC 1 -EOF -} - -elif test "$with_system_malloc" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF - Defining USE_SYSTEM_MALLOC -EOF -cat >> confdefs.h <<\EOF -#define USE_SYSTEM_MALLOC 1 -EOF -} - -elif test "$with_debug_malloc" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF - Defining USE_DEBUG_MALLOC -EOF -cat >> confdefs.h <<\EOF -#define USE_DEBUG_MALLOC 1 -EOF -} - - { test "$extra_verbose" = "yes" && cat << \EOF - Defining USE_SYSTEM_MALLOC -EOF -cat >> confdefs.h <<\EOF -#define USE_SYSTEM_MALLOC 1 -EOF -} - -fi -test "$with_i18n3" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF - Defining I18N3 -EOF -cat >> confdefs.h <<\EOF -#define I18N3 1 -EOF -} - -test "$GCC" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF - Defining USE_GCC -EOF -cat >> confdefs.h <<\EOF -#define USE_GCC 1 -EOF -} - -test "$external_widget" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF - Defining EXTERNAL_WIDGET -EOF -cat >> confdefs.h <<\EOF -#define EXTERNAL_WIDGET 1 -EOF -} - -test "$with_gnu_make" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF - Defining USE_GNU_MAKE -EOF -cat >> confdefs.h <<\EOF -#define USE_GNU_MAKE 1 -EOF -} - -test "$no_doc_file" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF - Defining NO_DOC_FILE -EOF -cat >> confdefs.h <<\EOF -#define NO_DOC_FILE 1 -EOF -} - -test "$with_quantify" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF - Defining QUANTIFY -EOF -cat >> confdefs.h <<\EOF -#define QUANTIFY 1 -EOF -} - -test "$with_pop" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF - Defining MAIL_USE_POP -EOF -cat >> confdefs.h <<\EOF -#define MAIL_USE_POP 1 -EOF -} - -test "$with_kerberos" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF - Defining KERBEROS -EOF -cat >> confdefs.h <<\EOF -#define KERBEROS 1 -EOF -} - -test "$with_hesiod" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF - Defining HESIOD -EOF -cat >> confdefs.h <<\EOF -#define HESIOD 1 -EOF -} - -test "$use_union_type" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF - Defining USE_UNION_TYPE -EOF -cat >> confdefs.h <<\EOF -#define USE_UNION_TYPE 1 -EOF -} - - - -( -if test -f /etc/osversion; then echo "osversion: `cat /etc/osversion`" -else - echo "uname -a: `uname -a`" -fi -echo "" -echo "$0 $quoted_arguments" -) > Installation - -xemacs_betaname="" -test ! -z "${emacs_beta_version}" && xemacs_betaname="-b${emacs_beta_version}" - -( -echo " - -XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'. - - Where should the build process find the source code? $srcdir - What installation prefix should install use? $prefix - What operating system and machine description files should XEmacs use? - \`$opsysfile' and \`$machfile' - What compiler should XEmacs be built with? $CC $CFLAGS - Should XEmacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason} - Should XEmacs use the relocating allocator for buffers? $rel_alloc - What window system should XEmacs use? ${window_system}" -if test "$with_x11" = "yes"; then - echo " Where do we find X Windows header files? $x_includes" - echo " Where do we find X Windows libraries? $x_libraries" -fi -if test -n "$site_includes"; then - echo " Additional header files: $site_includes" -fi -if test -n "$site_libraries"; then - echo " Additional libraries: $site_libraries" -fi -if test -n "$site_prefixes"; then - echo " Additional prefixes: $site_prefixes" -fi -if test -n "$runpath"; then - echo " Runtime library search path: $runpath" -fi -test "$with_dnet" = yes && echo " Compiling in support for DNET." -test "$with_socks" = yes && echo " Compiling in support for SOCKS." -test "$with_xauth" = yes && echo " Compiling in support for XAUTH." -if test "$with_xmu" != yes -a "$with_x11" = yes; then - echo " No Xmu; substituting equivalent routines." -fi - -if test "$with_xpm" = yes; then - echo " Compiling in support for XPM images." -elif test "$with_x11" = yes; then - echo " --------------------------------------------------------------------" - echo " WARNING: Compiling without XPM support." - echo " WARNING: You should strongly considering installing XPM." - echo " WARNING: Otherwise toolbars and other graphics will look suboptimal." - echo " --------------------------------------------------------------------" -fi -test "$with_xface" = yes && echo " Compiling in support for X-Face message headers." -test "$with_gif" = yes && echo " Compiling in support for GIF image conversion." -test "$with_jpeg" = yes && echo " Compiling in support for JPEG image conversion." -test "$with_png" = yes && echo " Compiling in support for PNG image conversion." -test "$with_tiff" = yes && echo " Compiling in support for TIFF image conversion." -case "$with_sound" in - nas ) echo " Compiling in network sound (NAS) support." ;; - native ) echo " Compiling in native sound support." ;; - both ) echo " Compiling in both network and native sound support." ;; -esac -test "$old_nas" = yes && echo " nas library lacks error trapping, will play synchronously" - -test "$with_database_berkdb" = yes && echo " Compiling in support for Berkeley DB." -test "$with_database_dbm" = yes && echo " Compiling in support for DBM." -test "$with_database_gnudbm" = yes && echo " Compiling in support for GNU DBM." - -test "$with_umich_ldap" = yes && echo " Compiling in support for LDAP (UMich libs)." -test "$with_ns_ldap" = yes && echo " Compiling in support for LDAP (Netscape SDK)." -test "$with_ldap" = yes -a "$with_umich_ldap" = no -a "$with_ns_ldap" = no && echo " Compiling in support for LDAP (Generic)." - -test "$with_ncurses" = yes && echo " Compiling in support for ncurses." -test "$with_gpm" = yes && echo " Compiling in support for GPM (General Purpose Mouse)." - -test "$with_mule" = yes && echo " Compiling in Mule (multi-lingual) support." -test "$with_file_coding" = yes && echo " Compiling in File coding support." -test "$with_xim" != no && echo " Compiling in XIM (X11R5+ I18N input method) support." -test "$with_xim" = motif && echo " Using Motif to provide XIM support." -test "$with_xim" = xlib && echo " Using raw Xlib to provide XIM support." -test "$with_xfs" = yes && echo " Using XFontSet to provide bilingual menubar." -test "$with_canna" = yes && echo " Compiling in support for Canna on Mule." -if test "$with_wnn" = yes; then - echo " Compiling in support for the WNN input method on Mule." - test "$with_wnn6" = yes && echo " Using WNN version 6." -fi -test "$with_i18n3" = yes && echo " Compiling in I18N support, level 3 (doesn't currently work)." - -test "$with_cde" = yes && echo " Compiling in support for CDE." -test "$with_tooltalk" = yes && echo " Compiling in support for ToolTalk." -test "$with_offix" = yes && echo " Compiling in support for OffiX." -test "$with_dragndrop" = yes && echo " Compiling in EXPERIMENTAL support for Drag'n'Drop ($dragndrop_proto )." -test "$with_workshop" = yes && echo " Compiling in support for Sun WorkShop." -test "$with_session" != no && echo " Compiling in support for proper session-management." -case "$with_menubars" in - lucid ) echo " Using Lucid menubars." ;; - motif ) echo " Using Motif menubars." - echo " *WARNING* The Motif menubar implementation is currently buggy." - echo " We recommend using the Lucid menubar instead." - echo " Re-run configure with --with-menubars='lucid'." ;; -esac -case "$with_scrollbars" in - lucid ) echo " Using Lucid scrollbars." ;; - motif ) echo " Using Motif scrollbars." ;; - athena ) echo " Using Athena scrollbars." ;; - athena3d ) echo " Using Athena-3d scrollbars." ;; -esac -case "$with_dialogs" in - motif ) echo " Using Motif dialog boxes." ;; - athena ) echo " Using Athena dialog boxes." ;; - athena3d ) echo " Using Athena-3d dialog boxes." ;; -esac -test "$with_shlib" = "yes" && echo " Compiling in DLL support." -test "$with_clash_detection" = yes && \ - echo " Clash detection will use \"$lockdir\" for locking files." -echo " movemail will use \"$mail_locking\" for locking mail spool files." -test "$with_pop" = yes && echo " Using POP for mail access" -test "$with_kerberos" = yes && echo " Using Kerberos for POP authentication" -test "$with_hesiod" = yes && echo " Using Hesiod to get POP server host" -test "$use_union_type" = yes && echo " Using the union type for Lisp_Objects." -test "$use_minimal_tagbits" = yes && echo " Using Lisp_Objects with minimal tagbits." -test "$use_indexed_lrecord_implementation" = yes && echo " Using indexed lrecord implementation." -test "$debug" = yes && echo " Compiling in extra code for debugging." -test "$memory_usage_stats" = yes && echo " Compiling in code for checking XEmacs memory usage." -test "$usage_tracking" = yes && echo " Compiling with usage tracking active (Sun internal)." -if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc" \ - != "no no no no no"; then - echo " WARNING: ---------------------------------------------------------" - echo " WARNING: Compiling in support for runtime error checking." - echo " WARNING: XEmacs will run noticeably more slowly as a result." - echo " WARNING: Error checking is on by default for XEmacs beta releases." - echo " WARNING: ---------------------------------------------------------" -fi -echo "" -) | tee -a Installation -echo "" - -echo '(setq Installation-string "' > Installation.el -sed 's/"/\\"/g' Installation >> Installation.el -echo '")' >> Installation.el - - - -# Remove any trailing slashes in these variables. -test -n "$prefix" && - prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'` -test -n "$exec_prefix" && - exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'` - - -for file in $internal_makefile_list; do - test "$file" = src/Makefile.in && \ - file="src/Makefile.in:src/Makefile.in.in:src/depend" - ac_output_files="${ac_output_files+$ac_output_files }$file" -done -ac_output_files="$ac_output_files src/paths.h lib-src/config.values" - -trap '' 1 2 15 - -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -# Any assignment to VPATH causes Sun make to only execute -# the first set of double-colon rules, so remove it if not needed. -# If there is a colon in the path, we need to keep it. -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' -fi - -trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 - -DEFS=-DHAVE_CONFIG_H - -# Without the "./", some shells look in PATH for config.status. -: ${CONFIG_STATUS=./config.status} - -echo creating $CONFIG_STATUS -rm -f $CONFIG_STATUS -cat > $CONFIG_STATUS </dev/null | sed 1q`: -# -# $0 $ac_configure_args -# -# Compiler output produced by configure, useful for debugging -# configure, is in ./config.log if it exists. - -ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" -for ac_option -do - case "\$ac_option" in - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" - exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; - -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.12" - exit 0 ;; - -help | --help | --hel | --he | --h) - echo "\$ac_cs_usage"; exit 0 ;; - *) echo "\$ac_cs_usage"; exit 1 ;; - esac -done - -ac_given_srcdir=$srcdir -ac_given_INSTALL="$INSTALL" - -trap 'rm -fr `echo "$ac_output_files src/config.h lwlib/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 -EOF -cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF -$ac_vpsub -$extrasub -s%@CFLAGS@%$CFLAGS%g -s%@CPPFLAGS@%$CPPFLAGS%g -s%@CXXFLAGS@%$CXXFLAGS%g -s%@DEFS@%$DEFS%g -s%@LDFLAGS@%$LDFLAGS%g -s%@LIBS@%$LIBS%g -s%@exec_prefix@%$exec_prefix%g -s%@prefix@%$prefix%g -s%@program_transform_name@%$program_transform_name%g -s%@bindir@%$bindir%g -s%@sbindir@%$sbindir%g -s%@libexecdir@%$libexecdir%g -s%@datadir@%$datadir%g -s%@sysconfdir@%$sysconfdir%g -s%@sharedstatedir@%$sharedstatedir%g -s%@localstatedir@%$localstatedir%g -s%@libdir@%$libdir%g -s%@includedir@%$includedir%g -s%@oldincludedir@%$oldincludedir%g -s%@infodir@%$infodir%g -s%@mandir@%$mandir%g -s%@LN_S@%$LN_S%g -s%@blddir@%$blddir%g -s%@CC@%$CC%g -s%@CPP@%$CPP%g -s%@start_flags@%$start_flags%g -s%@ld_switch_shared@%$ld_switch_shared%g -s%@start_files@%$start_files%g -s%@ld@%$ld%g -s%@lib_gcc@%$lib_gcc%g -s%@RANLIB@%$RANLIB%g -s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g -s%@INSTALL_DATA@%$INSTALL_DATA%g -s%@YACC@%$YACC%g -s%@SET_MAKE@%$SET_MAKE%g -s%@X_CFLAGS@%$X_CFLAGS%g -s%@X_PRE_LIBS@%$X_PRE_LIBS%g -s%@X_LIBS@%$X_LIBS%g -s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g -s%@install_pp@%$install_pp%g -s%@libs_xauth@%$libs_xauth%g -s%@dnd_objs@%$dnd_objs%g -s%@lwlib_objs@%$lwlib_objs%g -s%@ALLOCA@%$ALLOCA%g -s%@dll_ld@%$dll_ld%g -s%@dll_cflags@%$dll_cflags%g -s%@dll_oflags@%$dll_oflags%g -s%@dll_lflags@%$dll_lflags%g -s%@SRC_SUBDIR_DEPS@%$SRC_SUBDIR_DEPS%g -s%@INSTALL_ARCH_DEP_SUBDIR@%$INSTALL_ARCH_DEP_SUBDIR%g -s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g -s%@SUBDIR_MAKEFILES@%$SUBDIR_MAKEFILES%g -s%@PROGNAME@%$PROGNAME%g -s%@version@%$version%g -s%@configuration@%$configuration%g -s%@canonical@%$canonical%g -s%@srcdir@%$srcdir%g -s%@pkgdir@%$pkgdir%g -s%@statedir@%$statedir%g -s%@PREFIX@%$PREFIX%g -s%@EXEC_PREFIX@%$EXEC_PREFIX%g -s%@INFODIR_USER_DEFINED@%$INFODIR_USER_DEFINED%g -s%@INFODIR@%$INFODIR%g -s%@infopath@%$infopath%g -s%@INFOPATH_USER_DEFINED@%$INFOPATH_USER_DEFINED%g -s%@INFOPATH@%$INFOPATH%g -s%@package_path@%$package_path%g -s%@PACKAGE_PATH_USER_DEFINED@%$PACKAGE_PATH_USER_DEFINED%g -s%@PACKAGE_PATH@%$PACKAGE_PATH%g -s%@lispdir@%$lispdir%g -s%@LISPDIR_USER_DEFINED@%$LISPDIR_USER_DEFINED%g -s%@LISPDIR@%$LISPDIR%g -s%@etcdir@%$etcdir%g -s%@ETCDIR_USER_DEFINED@%$ETCDIR_USER_DEFINED%g -s%@ETCDIR@%$ETCDIR%g -s%@lockdir@%$lockdir%g -s%@LOCKDIR_USER_DEFINED@%$LOCKDIR_USER_DEFINED%g -s%@LOCKDIR@%$LOCKDIR%g -s%@archlibdir@%$archlibdir%g -s%@ARCHLIBDIR_USER_DEFINED@%$ARCHLIBDIR_USER_DEFINED%g -s%@ARCHLIBDIR@%$ARCHLIBDIR%g -s%@docdir@%$docdir%g -s%@bitmapdir@%$bitmapdir%g -s%@extra_objs@%$extra_objs%g -s%@ld_dynamic_link_flags@%$ld_dynamic_link_flags%g -s%@machfile@%$machfile%g -s%@opsysfile@%$opsysfile%g -s%@c_switch_general@%$c_switch_general%g -s%@c_switch_window_system@%$c_switch_window_system%g -s%@c_switch_all@%$c_switch_all%g -s%@ld_switch_general@%$ld_switch_general%g -s%@ld_switch_window_system@%$ld_switch_window_system%g -s%@ld_switch_all@%$ld_switch_all%g -s%@ld_libs_general@%$ld_libs_general%g -s%@ld_libs_window_system@%$ld_libs_window_system%g -s%@ld_libs_all@%$ld_libs_all%g -s%@RECURSIVE_MAKE@%$RECURSIVE_MAKE%g -s%@native_sound_lib@%$native_sound_lib%g -s%@sound_cflags@%$sound_cflags%g -s%@dynodump_arch@%$dynodump_arch%g -s%@internal_makefile_list@%$internal_makefile_list%g - -CEOF -EOF - -cat >> $CONFIG_STATUS <<\EOF - -# Split the substitutions into bite-sized pieces for seds with -# small command number limits, like on Digital OSF/1 and HP-UX. -ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. -ac_file=1 # Number of current file. -ac_beg=1 # First line for current file. -ac_end=$ac_max_sed_cmds # Line after last line for current file. -ac_more_lines=: -ac_sed_cmds="" -while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file - else - sed "${ac_end}q" conftest.subs > conftest.s$ac_file - fi - if test ! -s conftest.s$ac_file; then - ac_more_lines=false - rm -f conftest.s$ac_file - else - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f conftest.s$ac_file" - else - ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" - fi - ac_file=`expr $ac_file + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_cmds` - fi -done -if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat -fi -EOF - -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF -for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; - esac - - # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. - - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" - # A "../" for each directory in $ac_dir_suffix. - ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` - else - ac_dir_suffix= ac_dots= - fi - - case "$ac_given_srcdir" in - .) srcdir=. - if test -z "$ac_dots"; then top_srcdir=. - else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; - /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; - *) # Relative path. - srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" - top_srcdir="$ac_dots$ac_given_srcdir" ;; - esac - - case "$ac_given_INSTALL" in - [/$]*) INSTALL="$ac_given_INSTALL" ;; - *) INSTALL="$ac_dots$ac_given_INSTALL" ;; - esac - - echo creating "$ac_file" - rm -f "$ac_file" - configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." - case "$ac_file" in - *Makefile*) ac_comsub="1i\\ -# $configure_input" ;; - *) ac_comsub= ;; - esac - - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` - sed -e "$ac_comsub -s%@configure_input@%$configure_input%g -s%@srcdir@%$srcdir%g -s%@top_srcdir@%$top_srcdir%g -s%@INSTALL@%$INSTALL%g -" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file -fi; done -rm -f conftest.s* - -# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where -# NAME is the cpp macro being defined and VALUE is the value it is being given. -# -# ac_d sets the value in "#define NAME VALUE" lines. -ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' -ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' -ac_dC='\3' -ac_dD='%g' -# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". -ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_uB='\([ ]\)%\1#\2define\3' -ac_uC=' ' -ac_uD='\4%g' -# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". -ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_eB='$%\1#\2define\3' -ac_eC=' ' -ac_eD='%g' - -if test "${CONFIG_HEADERS+set}" != set; then -EOF -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF -fi -for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; - esac - - echo creating $ac_file - - rm -f conftest.frag conftest.in conftest.out - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` - cat $ac_file_inputs > conftest.in - -EOF - -# Transform confdefs.h into a sed script conftest.vals that substitutes -# the proper values into config.h.in to produce config.h. And first: -# Protect against being on the right side of a sed subst in config.status. -# Protect against being in an unquoted here document in config.status. -rm -f conftest.vals -cat > conftest.hdr <<\EOF -s/[\\&%]/\\&/g -s%[\\$`]%\\&%g -s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp -s%ac_d%ac_u%gp -s%ac_u%ac_e%gp -EOF -sed -n -f conftest.hdr confdefs.h > conftest.vals -rm -f conftest.hdr - -# This sed command replaces #undef with comments. This is necessary, for -# example, in the case of _POSIX_SOURCE, which is predefined and required -# on some systems where configure will not decide to define it. -cat >> conftest.vals <<\EOF -s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% -EOF - -# Break up conftest.vals because some shells have a limit on -# the size of here documents, and old seds have small limits too. - -rm -f conftest.tail -while : -do - ac_lines=`grep -c . conftest.vals` - # grep -c gives empty output for an empty file on some AIX systems. - if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi - # Write a limited-size here document to conftest.frag. - echo ' cat > conftest.frag <> $CONFIG_STATUS - sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS - echo 'CEOF - sed -f conftest.frag conftest.in > conftest.out - rm -f conftest.in - mv conftest.out conftest.in -' >> $CONFIG_STATUS - sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail - rm -f conftest.vals - mv conftest.tail conftest.vals -done -rm -f conftest.vals - -cat >> $CONFIG_STATUS <<\EOF - rm -f conftest.frag conftest.h - echo "/* $ac_file. Generated automatically by configure. */" > conftest.h - cat conftest.in >> conftest.h - rm -f conftest.in - if cmp -s $ac_file conftest.h 2>/dev/null; then - echo "$ac_file is unchanged" - rm -f conftest.h - else - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - fi - rm -f $ac_file - mv conftest.h $ac_file - fi -fi; done - -EOF -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF -for dir in $MAKE_SUBDIR; do - echo creating $dir/Makefile - ( - cd $dir - rm -f junk.c - < Makefile.in \ - sed -e '/^# Generated/d' \ - -e 's%/\*\*/#.*%%' \ - -e 's/^ *# */#/' \ - -e '/^##/d' \ - -e '/^#/ { -p -d -}' -e '/./ { -s/\([\"]\)/\\\1/g -s/^/"/ -s/$/"/ -}' > junk.c; - $CPP -I. -I${top_srcdir}/src $CPPFLAGS junk.c > junk.cpp; - < junk.cpp \ - sed -e 's/^#.*//' \ - -e 's/^[ ][ ]*$//' \ - -e 's/^ / /' \ - | sed -n -e '/^..*$/p' \ - | sed '/^"/ { -s/\\\([\"]\)/\1/g -s/^[ ]*"// -s/"[ ]*$// -}' > Makefile.new - chmod 444 Makefile.new - mv -f Makefile.new Makefile - rm -f junk.c junk.cpp -) -done - -sed < config.status >> lib-src/config.values \ - -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \ - -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \ - -e 's/^\([^ ]*\) $/\1 ""/' \ - -e 's/ 1$/ t/' - - -exit 0 -EOF -chmod +x $CONFIG_STATUS -rm -fr confdefs* $ac_clean_files -test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 - diff --cc configure.in index e77bf16,3044365..0000000 deleted file mode 100644,100644 --- a/configure.in +++ /dev/null @@@ -1,4212 -1,4070 +1,0 @@@ --dnl Define our own header notice with own copyright --define([AC_INIT_NOTICE], --[#### Configuration script for XEmacs. Largely divergent from FSF. --#### Guess values for system-dependent variables and create Makefiles. --#### Generated automatically using autoconf version] AC_ACVERSION [ --#### Copyright (C) 1992, 93, 94, 95, 96 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 Ben Wing. - #### Copyright (C) 1998, 1999 J. Kean Johnston. -- --### Don't edit this script! --### This script was automatically generated by the `autoconf' program --### from the file `./configure.in'. --### To rebuild it, execute the command --### autoconf --### in the this directory. You must have autoconf version 2.12 or later. -- --### This file is part of XEmacs. -- --### XEmacs 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 2, or (at your --### option) any later version. -- --### XEmacs 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 XEmacs; see the file COPYING. If not, write to the Free --### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA --### 02111-1307, USA. -- --### For usage, run `./configure --help' --### For more detailed information on building and installing XEmacs, --### 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. --]) -- --dnl Since XEmacs has configuration requirements that autoconf cannot --dnl meet, this file is an unholy marriage of custom-baked --dnl configuration code and autoconf macros. -- --dnl We use the m4 quoting characters [ ] (as established by the --dnl autoconf system), so quote them like this: [[foo]] -- --AC_PREREQ(2.12)dnl --dnl Redefine some standard autoconf macros --dnl here is how XEmacs is different: --dnl - no cache file --dnl - non-standard options --dnl - suport for extra-verbosity --dnl - ordinary libs are handled separately from X libs (might be a mistake) --dnl - various random kludges (e.g. -with-dnet=no -- --dnl PRINT_VAR(var var ...) prints values of shell variables --define([PRINT_VAR],[for var in patsubst([$1],[[ --]+],[ ]); do eval "echo \"$var = '\$$var'\""; done]) -- --dnl Disable cache files: --dnl This is controversial, but I am convinced this is the right way to go, --dnl at least by default. Otherwise there are too many surprises. --define([AC_CACHE_LOAD], )dnl --define([AC_CACHE_SAVE], )dnl --define([AC_CACHE_VAL], [ --$2 --])dnl -- --dnl Redefine AC_TRY_RUN_NATIVE to not throw away stderr while running --dnl AC_TRY_RUN_NATIVE(PROGRAM, [ACTION-IF-TRUE [, ACTION-IF-FALSE]]) --define([AC_TRY_RUN_NATIVE], --[cat > conftest.$ac_ext <&AC_FD_CC - then - dnl Do not remove the temporary files here, so they can be examined. - ifelse([$2], , :, [$2]) - else - conftest_rc="$?" - echo "configure: failed program was:" >&AC_FD_CC - cat conftest.$ac_ext >&AC_FD_CC - ifelse([$3], , , [ rm -fr conftest* - $3 - ])dnl - fi - rm -fr conftest*])dnl AC_TRY_RUN_NATIVE - - - dnl Avoid spurious cross-compiling warnings from AC_TRY_RUN - dnl XEmacs is unlikely to ever cross-compile - define([AC_TRY_RUN],[AC_TRY_RUN_NATIVE([$1], [$2], [$3])])dnl - - dnl Redefine AC_DEFINE* to provide more output if extra_verbose - dnl Set VARIABLE to VALUE, verbatim, or 1. - dnl AC_DEFINE(VARIABLE [, VALUE]) - define([AC_DEFINE], - [{ test "$extra_verbose" = "yes" && cat << \EOF - Defining $1[]ifelse($#, 2, [ = $2],) - EOF - cat >> confdefs.h <<\EOF - [#define] $1 ifelse($#, 2, [$2], 1) - EOF - } - ])dnl AC_DEFINE - - define([AC_DEFINE_UNQUOTED], - [{ test "$extra_verbose" = "yes" && cat << EOF - Defining $1[]ifelse($#, 2, [ = $2],) - EOF - cat >> confdefs.h <&AC_FD_CC' - ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&AC_FD_CC' - cross_compiling=no - ]) dnl AC_LANG_C - - dnl The construct foo=`echo $w1 $w2 $w3` fails on some systems if $w1 = -e or -n - dnl So we use the following instead. - dnl XE_SPACE(var, words) - define([XE_SPACE],[ - T="" - for W in $2; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done - $1="$T" - ])dnl XE_SPACE - - dnl XE_ADD_OBJS(foo.o ...) - define([XE_ADD_OBJS], - [extra_objs="$extra_objs [$1]" && dnl - if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"[$1]\"" - fi])dnl XE_ADD_OBJS - - dnl XE_APPEND(value, varname) - define([XE_APPEND], - [[$2]="$[$2] [$1]" && dnl - if test "$extra_verbose" = "yes"; then echo " Appending \"[$1]\" to \$[$2]"; fi]) - - dnl XE_PREPEND(value, varname) - define([XE_PREPEND], - [[$2]="[$1] $[$2]" && dnl - if test "$extra_verbose" = "yes"; then echo " Prepending \"[$1]\" to \$[$2]"; fi]) - - dnl XE_DIE(message) - define([XE_DIE], [{ echo "Error:" $1 >&2; exit 1; }]) - - dnl XE_STRIP_4TH_COMPONENT(var) - dnl Changes i986-pc-linux-gnu to i986-pc-linux, as God (not RMS) intended. - define([XE_STRIP_4TH_COMPONENT], - [$1=`echo "$$1" | sed '[s/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/]'`]) - - dnl Initialize some variables set by options. - dnl The variables have the same names as the options, with - dnl dashes changed to underlines. - - define([AC_INIT_PARSE_ARGS],[ - - dnl Get sane consistent behavior from various shells - dnl Avoid losing with weird user CDPATHs - - if test -n "$ZSH_VERSION"; then - dnl zsh's Bourne shell emulation options - setopt NO_BAD_PATTERN NO_BANG_HIST NO_BG_NICE NO_EQUALS NO_FUNCTION_ARGZERO - setopt GLOB_SUBST NO_HUP INTERACTIVE_COMMENTS KSH_ARRAYS NO_MULTIOS NO_NOMATCH - setopt RM_STAR_SILENT POSIX_BUILTINS SH_FILE_EXPANSION SH_GLOB SH_OPTION_LETTERS - setopt SH_WORD_SPLIT BSD_ECHO IGNORE_BRACES - dnl zsh-3.1-beta drops core on the following - dnl unset CDPATH - if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi - elif test -n "$BASH_VERSION"; then - dnl Use Posix mode with bash - set -o posix - unset CDPATH - else - if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi - fi - - dnl Initialize some variables set by options. - dnl The variables have the same names as the options, with - dnl dashes changed to underlines. - exec_prefix=NONE - host=NONE - no_create= - nonopt=NONE - no_recursion= - prefix=NONE - program_prefix=NONE - program_suffix=NONE - program_transform_name=s,x,x, - silent= - site= - srcdir= - target=NONE - verbose= - x_includes=NONE - x_libraries=NONE - - dnl Installation directory options. - dnl These are left unexpanded so users can "make install exec_prefix=/foo" - dnl and all the variables that are supposed to be based on exec_prefix - dnl by default will actually change. - dnl Use braces instead of parens because sh, perl, etc. also accept them. - dnl If you change these, you need to synchronize with the settings of the - dnl various ..._USER_DEFINED variables further down. - bindir='${exec_prefix}/bin' - sbindir='${exec_prefix}/sbin' - libexecdir='${exec_prefix}/libexec' - datadir='${prefix}/share' - sysconfdir='${prefix}/etc' - sharedstatedir='${prefix}/com' - localstatedir='${prefix}/var' - libdir='${{exec_prefix}}/lib' - includedir='${prefix}/include' - oldincludedir='/usr/include' - infodir='${prefix}/info' - mandir='${prefix}/man' - - dnl Initialize some other variables. - subdirs= - MFLAGS= MAKEFLAGS= - dnl Maximum number of lines to put in a shell here document. - ac_max_here_lines=12 - ])dnl AC_INIT_PARSE_ARGS - - AC_INIT(src/lisp.h)dnl - AC_CONFIG_HEADER(src/config.h lwlib/config.h) - dnl Remove any more than one leading "." element from the path name. - dnl If we do not remove them, then another "./" will be prepended to - dnl the file name each time we use config.status, and the program name - dnl will get larger and larger. This would not be a problem, except - dnl that since progname gets recorded in all the Makefiles this script - dnl produces, move-if-change thinks they're different when they're - dnl not. - dnl - dnl It would be nice if we could put the ./ in a \( \) group and then - dnl apply the * operator to that, so we remove as many leading './././'s - dnl as are present, but some seds (like Ultrix's sed) don't allow you to - dnl apply * to a \( \) group. Bleah. - progname="`echo $0 | sed 's:^\./\./:\./:'`" - - dnl ----------------------------- - dnl Establish some default values - dnl ----------------------------- - - XE_APPEND(lib-src, MAKE_SUBDIR) - XE_APPEND(lib-src, INSTALL_ARCH_DEP_SUBDIR) - - prefix='/usr/local' - exec_prefix='${prefix}' - bindir='${exec_prefix}/bin' - dnl FSF 19.29 changes to: - dnl datadir='${prefix}/share' - dnl sharedstatedir='${prefix}/com' - dnl libexecdir='${exec_prefix}/libexec' - datadir='${prefix}/lib' - statedir='${prefix}/lib' - libdir='${exec_prefix}/lib' - mandir='${prefix}/man/man1' - infodir='${datadir}/${PROGNAME}-${version}/info' - infopath='' - install_pp='' - lispdir='${datadir}/${PROGNAME}-${version}/lisp' - moduledir='${datadir}/${PROGNAME}-${version}/${configuration}/modules' - sitelispdir='${datadir}/xemacs/site-lisp' - sitemoduledir='${datadir}/xemacs/site-modules' - pkgdir='${datadir}/${PROGNAME}-${version}/lisp' - package_path='' - etcdir='${datadir}/${PROGNAME}-${version}/etc' - lockdir='${statedir}/${PROGNAME}/lock' - archlibdir='${datadir}/${PROGNAME}-${version}/${configuration}' - with_site_lisp='no' - with_site_modules='yes' - with_menubars='' - with_scrollbars='' - with_dialogs='' - with_file_coding='' - dnl const_is_losing is removed - we rely on AC_C_CONST instead. - dnl We accept (and ignore) the --const-is-losing option for compatibility. - dnl const_is_losing='yes' - cpp='' cppflags='' libs='' ldflags='' - dynamic='' - with_x11='' - with_msw='' - rel_alloc='default' - with_system_malloc='default' - with_dlmalloc='default' - native_sound_lib='' - dnl use_assertions should be 'yes' by default. Too many people in this - dnl world have core dumps turned off by default or \"cannot find where the - dnl core file went\". At least we should get some useful output ... - use_assertions="yes" - dnl the following is set to yes or no later. - with_toolbars="" - with_tty="" - use_union_type="no" - with_dnet="" - - dnl ------------------ - dnl Options Processing - dnl ------------------ - - define([USAGE_ERROR], - [(echo "$progname: Usage error:" - echo " " $1 - echo " Use \`$progname --help' to show usage.") >&2 && exit 1]) - - dnl Record all the arguments, so we can save them in config.status. - arguments="$@" - - dnl Shell Magic: Quote the quoted arguments in ARGUMENTS. At a later date, - dnl in order to get the arguments back in $@, we have to do an - dnl 'eval set x "$quoted_arguments"; shift' - dnl # We use sed to turn embedded ' into '"'"'. I truly hate sh quoting. - quoted_sed_magic=s/"'"/"'"'"'"'"'"'"'"/g - quoted_arguments= - for i in "$@"; do - case "$i" in - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) ;; - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; - *) - quoted_i="`echo '' $i | sed -e 's:^ ::' -e $quoted_sed_magic`" - quoted_arguments="$quoted_arguments '$quoted_i'" ;; - esac - done - - dnl Do not use shift -- that destroys the argument list, which autoconf needs - dnl to produce config.status. It turns out that "set - $arguments" does not - dnl work portably. - dnl However, it also turns out that many shells cannot expand ${10} at all. - dnl So using an index variable does not work either. It is possible to use - dnl some shell magic to make 'set x "$arguments"; shift' work portably. - while test $# != 0; do - arg="$1"; shift - case "$arg" in - --no-create|--no-recursion) ;; - dnl Anything starting with a hyphen we assume is an option. - -* ) - dnl Separate the switch name from the value it is being given. - case "$arg" in - -*=*) - opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\([[^=]]*\)=.*$:\1:'` - val=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*[[^=]]*=\(.*\)$:\1:'` - valomitted=no - ;; - dnl special case these strings since echo may silently eat them: - dnl --help ) opt=help val=yes valomitted=yes ;; - dnl --version ) opt=version val=yes valomitted=yes ;; - dnl -e ) opt=e val=yes valomitted=yes ;; - dnl -E ) opt=E val=yes valomitted=yes ;; - dnl -n ) opt=n val=yes valomitted=yes ;; - -*) - dnl If FOO is a boolean argument, --FOO is equivalent to - dnl --FOO=yes. Otherwise, the value comes from the next - dnl argument - see below. - opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\(.*\)$:\1:'` - val="yes" valomitted=yes - ;; - esac - - dnl translate "-" in option string to "_" - optname="$opt" - opt="`echo '' $opt | sed -e 's:^ ::' | tr - _`" - - dnl Support --without-FOO as a synonym for --with-FOO=no - case "${valomitted}-${opt}" in yes-without_* ) - opt=`echo $opt | sed 's/without/with/'` - valomitted="no" val="no" ;; - esac - - dnl Process the option. - case "$opt" in - - dnl Process (many) boolean options - with_site_lisp | \ - with_site_modules | \ - with_x | \ - with_x11 | \ - with_msw | \ - with_gcc | \ - dynamic | \ - with_ncurses | \ - with_dnet | \ - with_socks | \ - with_dragndrop | \ - with_cde | \ - with_offix | \ - with_gpm | \ - with_xpm | \ - with_xface | \ - with_gif | \ - with_jpeg | \ - with_png | \ - with_tiff | \ - with_session | \ - with_xmu | \ - with_purify | \ - with_quantify | \ - with_toolbars | \ - with_tty | \ - with_xfs | \ - with_i18n3 | \ - with_mule | \ - with_file_coding| \ - with_canna | \ - with_wnn | \ - with_wnn6 | \ - with_workshop | \ - with_sparcworks | \ - with_tooltalk | \ - with_ldap | \ - with_pop | \ - with_kerberos | \ - with_hesiod | \ - with_dnet | \ - with_infodock | \ - external_widget | \ - verbose | \ - extra_verbose | \ - const_is_losing | \ - usage_tracking | \ - use_union_type | \ - debug | \ - use_assertions | \ - memory_usage_stats | \ - with_clash_detection | \ - with_shlib | \ - no_doc_file ) - dnl Make sure the value given was either "yes" or "no". - case "$val" in - y | ye | yes ) val=yes ;; - n | no ) val=no ;; - * ) USAGE_ERROR("The \`--$optname' option requires a boolean value: \`yes' or \`no'.") ;; - esac - eval "$opt=\"$val\"" ;; - - - dnl Options that take a user-supplied value, as in --x-includes=/usr/X11R6/include - dnl The cache-file option is ignored (for compatibility with other configures) - srcdir | \ - compiler | \ - cflags | \ - cpp | \ - cppflags | \ - libs | \ - ldflags | \ - cache_file | \ - native_sound_lib| \ - site_lisp | \ - x_includes | \ - x_libraries | \ - site_includes | \ - site_libraries | \ - site_prefixes | \ - site_runtime_libraries ) - dnl If the value was omitted, get it from the next argument. - if test "$valomitted" = "yes" ; then - dnl Get the next argument from the argument list, if there is one. - if test "$#" = 0 ; then - USAGE_ERROR("The \`--$optname' option requires a value."); - fi - val="$1"; shift - fi - eval "$opt=\"$val\"" - ;; - - dnl Options that take "yes", "no", or "default" values - rel_alloc | \ - with_dlmalloc | \ - with_debug_malloc | use_debug_malloc | \ - with_system_malloc | use_system_malloc ) - case "$val" in - y | ye | yes ) val=yes ;; - n | no ) val=no ;; - d | de | def | defa | defau | defaul | default ) val=default ;; - * ) USAGE_ERROR(["The \`--$optname' option requires one of these values: - \`yes', \`no', or \`default'."]) ;; - esac - case "$opt" in use_* ) opt="`echo $opt | sed s/use/with/`" ;; esac - eval "$opt=\"$val\"" - ;; - - dnl Has the user requested database support? - "with_database" ) - with_database_berkdb=no - with_database_dbm=no - with_database_gnudbm=no - for x in `echo "$val" | sed -e 's/,/ /g'` ; do - case "$x" in - no ) ;; - b | be | ber | berk | berkd | berkdb ) with_database_berkdb=yes ;; - d | db | dbm ) with_database_dbm=yes ;; - g | gn | gnu | gnud | gnudb | gnudbm ) with_database_gnudbm=yes ;; - * ) USAGE_ERROR(["The \`--$optname' option value - must be either \`no' or a comma-separated list - of one or more of \`berkdb' and either \`dbm' or \`gnudbm'."]) ;; - esac - done - if test "$with_database_dbm" = "yes" -a \ - "$with_database_gnudbm" = "yes"; then - USAGE_ERROR("Only one of \`dbm' and \`gnudbm' may be specified - with the \`--$optname' option.") - fi - ;; - - dnl Has the user requested sound support? - "with_sound" ) - dnl value can be native, nas or both. yes is allowed - dnl as a backwards compatible synonym for native - case "$val" in - y | ye | yes ) val=native ;; - n | no | non | none ) val=no;; - na | nat | nati | nativ | native ) val=native ;; - ne | net | neta | netau | netaud | netaudi | netaudio | nas ) val=nas ;; - b | bo | bot | both ) val=both;; - * ) USAGE_ERROR(["The \`--$optname' option must have one of these values: - \`native', \`nas', \`both', or \`none'."]) ;; - esac - eval "$opt=\"$val\"" - ;; - - dnl Has the user requested XIM support? - "with_xim" ) - case "$val" in - y | ye | yes ) val=yes ;; - n | no | non | none ) val=no ;; - x | xl | xli | xlib ) val=xlib ;; - m | mo | mot | moti | motif ) val=motif ;; - * ) USAGE_ERROR(["The \`--$optname' option must have one of these values: - \`motif', \`xlib', \`yes', or \`no'."]) ;; - esac - eval "$opt=\"$val\"" - ;; - - dnl Mail locking specification - "mail_locking" ) - case "$val" in - lockf ) val=lockf ;; - flock ) val=flock ;; - file ) val=file ;; - * ) USAGE_ERROR(["The \`--$optname' option must have one of these values: - \`lockf', \`flock', or \`file'."]) ;; - esac - eval "$opt=\"$val\"" - ;; - - dnl Has the user requested error-checking? - "error_checking" ) - dnl value can be all, none, and/or a list of categories to check. - dnl Example: --error-checking=all,noextents,nobufpos - dnl Example: --error-checking=none,malloc,gc - - for x in `echo "$val" | sed -e 's/,/ /g'` ; do - case "$x" in - dnl all and none are only permitted as the first in the list. - n | no | non | none ) new_default=no ;; - a | al | all ) new_default=yes ;; - - extents ) error_check_extents=yes ;; - noextents ) error_check_extents=no ;; - - typecheck ) error_check_typecheck=yes ;; - notypecheck ) error_check_typecheck=no ;; - - bufpos ) error_check_bufpos=yes ;; - nobufpos ) error_check_bufpos=no ;; - - gc ) error_check_gc=yes ;; - nogc ) error_check_gc=no ;; - - malloc ) error_check_malloc=yes ;; - nomalloc ) error_check_malloc=no ;; - - * ) bogus_error_check=yes ;; - esac - if test "$bogus_error_check" -o \ - \( -n "$new_default" -a -n "$echeck_notfirst" \) ; then - if test "$error_check_default" = yes ; then - types="\`all' (default), \`none', \`noextents', \`notypecheck', \`nobufpos', \`nogc', and \`nomalloc'." - else - types="\`all', \`none' (default), \`extents', \`typecheck', \`bufpos', \`gc', and \`malloc'." - fi - USAGE_ERROR(["Valid types for the \`--$optname' option are: - $types."]) - elif test -n "$new_default" ; then - error_check_extents=$new_default - error_check_typecheck=$new_default - error_check_bufpos=$new_default - error_check_gc=$new_default - error_check_malloc=$new_default - new_default= # reset this - fi - echeck_notfirst=true - done - ;; - - dnl Has the user tried to tell us where the X files are? - dnl I think these are dopey, but no less than three alpha - dnl testers, at large sites, have said they have their X files - dnl installed in odd places. - - dnl Has the user specified one of the path options? - prefix | exec_prefix | bindir | datadir | statedir | libdir | \ - mandir | infodir | infopath | lispdir | etcdir | lockdir | pkgdir | \ - archlibdir | docdir | package_path ) - dnl If the value was omitted, get it from the next argument. - if test "$valomitted" = "yes"; then - if test "$#" = 0; then - USAGE_ERROR("The \`--$optname' option requires a value."); - fi - val="$1"; shift - fi - eval "$opt=\"$val\"" - - dnl You need to synchronize this with the way the - dnl default values are built. - case "$opt" in - lispdir ) AC_DEFINE(LISPDIR_USER_DEFINED) ;; - sitelispdir ) AC_DEFINE(SITELISPDIR_USER_DEFINED) ;; - moduledir ) AC_DEFINE(MODULEDIR_USER_DEFINED) ;; - etcdir ) AC_DEFINE(ETCDIR_USER_DEFINED) ;; - infodir ) AC_DEFINE(INFODIR_USER_DEFINED) ;; - infopath ) AC_DEFINE(INFOPATH_USER_DEFINED) ;; - package_path ) AC_DEFINE(PACKAGE_PATH_USER_DEFINED) ;; - datadir ) - AC_DEFINE(INFODIR_USER_DEFINED) - AC_DEFINE(LISPDIR_USER_DEFINED) - AC_DEFINE(MODULEDIR_USER_DEFINED) - AC_DEFINE(ETCDIR_USER_DEFINED) ;; - statedir | lockdir ) AC_DEFINE(LOCKDIR_USER_DEFINED) ;; - exec_prefix | libdir | archlibdir ) AC_DEFINE(ARCHLIBDIR_USER_DEFINED) ;; - esac - ;; - - dnl --no-create added by autoconf for use by config.status - "no_create" ) ;; - - dnl Has the user asked for some help? - "usage" | "help" ) ${PAGER-more} ${srcdir}/configure.usage; exit 0 ;; - - dnl Has the user specified the toolkit(s) to use for GUI elements? - "with_menubars" | \ - "with_scrollbars" | \ - "with_dialogs" ) - case "$val" in - l | lu | luc | luci | lucid ) val=lucid ;; - m | mo | mot | moti | motif ) val=motif ;; - athena3d | athena-3d ) val=athena3d ;; - a | at | ath | athe | athen | athena ) val=athena ;; - n | no | non | none ) val=no ;; - * ) USAGE_ERROR(["The \`--$optname' option must have one of these values: - \`lucid', \`motif', \`athena', \`athena3d', or \`no'."]) ;; - esac - eval "$opt=\"$val\"" - ;; - - dnl Obsolete legacy argument? Warn, but otherwise ignore. - "run_in_place" | \ - "with_gnu_make" ) - AC_MSG_WARN([Obsolete option \`--$optname' ignored.]) - ;; - - dnl Unrecognized option? No mercy for user errors. - * ) USAGE_ERROR("Unrecognized option: $arg") ;; - - esac - ;; - - dnl Assume anything with multiple hyphens is a configuration name. - *-*-*) configuration="$arg" ;; - - dnl Unrecognized argument? No mercy for user errors. - *) USAGE_ERROR("Unrecognized argument: $arg") ;; - - esac - done - - dnl ------------------------- - dnl Finish options processing - dnl ------------------------- - - dnl Several options are equivalent to, and override, environment variables. - test -n "$cpp" && CPP="$cpp" - test -n "$cppflags" && CPPFLAGS="$cppflags" - test -n "$libs" && LIBS="$libs" - test -n "$ldflags" && LDFLAGS="$ldflags" - - dnl Get the arguments back. See the diatribe on Shell Magic above. - eval set x "$quoted_arguments"; shift - - dnl --extra-verbose implies --verbose - test "$extra_verbose" = "yes" && verbose=yes - - dnl with_x is an obsolete synonym for with_x11 - test -n "$with_x" && with_x11="$with_x" - - dnl --with-quantify or --with-purify imply --use-system-malloc - if test "$with_purify" = "yes" -o "$with_quantify" = "yes"; then - test "$with_system_malloc" = "default" && with_system_malloc=yes - fi - - dnl XE_CHECK_FEATURE_DEPENDENCY(feature1, feature2) - define([XE_CHECK_FEATURE_DEPENDENCY], - [if test "$with_$1 $with_$2" = "yes no"; then - USAGE_ERROR("--with-$1 requires --with-$2") - elif test "$with_$2" = "no" ; then with_$1=no - elif test "$with_$1" = "yes"; then with_$2=yes - fi - ]) - - dnl CDE requires tooltalk - XE_CHECK_FEATURE_DEPENDENCY(cde, tooltalk) - - dnl Find the source directory. - case "$srcdir" in - - dnl If srcdir is not specified, see if "." or ".." might work. - "" ) - for dir in "`echo $0 | sed 's|//|/|' | sed 's|/[[^/]]*$||'`" "." ".." ; do - if test -f "$dir/src/lisp.h" -a \ - -f "$dir/lisp/version.el" ; then - srcdir="$dir" - break - fi - done - if test -z "$srcdir" ; then - USAGE_ERROR(["Neither the current directory nor its parent seem to - contain the XEmacs sources. If you do not want to build XEmacs in its - source tree, you should run \`$progname' in the directory in which - you wish to build XEmacs, using the \`--srcdir' option to say where the - sources may be found."]) - fi - ;; - - dnl Otherwise, check if the directory they specified is okay. - * ) - if test ! -f "$srcdir/src/lisp.h" -o \ - ! -f "$srcdir/lisp/version.el" ; then - USAGE_ERROR(["The directory specified with the \`--srcdir' option, - \`$srcdir', doesn't seem to contain the XEmacs sources. You should - either run the \`$progname' script at the top of the XEmacs source - tree, or use the \`--srcdir' option to specify the XEmacs source directory."]) - fi - ;; - esac - - dnl ########################################################################### - if test -z "$configuration"; then - dnl Guess the configuration - configuration=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess` - if test -z "$configuration"; then - USAGE_ERROR(["XEmacs has not been ported to this host type. - Try explicitly specifying the CONFIGURATION when rerunning configure."]) - fi - fi - - AC_PROG_LN_S - - dnl Make symlinks for etc, lisp, and info directories while the path - dnl is still relative. We do not symlink lock because someone may - dnl have stuck the source on a read-only partition. Instead we - dnl create it as an actual directory later on if it does not already - dnl exist. - for dir in lisp etc man info; do - if test ! -d "$dir" ; then - echo Making symbolic link to "$srcdir/$dir" - ${LN_S} "$srcdir/$dir" "$dir" - fi - done - - dnl Do our best to deal with automounter brokenness - dnl CANONICALIZE_PATH(varname) - define([CANONICALIZE_PATH], - [if test -d "/net"; then - if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi - $1=`echo "[$]$1" | \ - sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"` - fi])dnl - - dnl Calculate canonical name for blddir (i.e. current directory). - dnl PWD may already be the preferable absolute name for ".", - dnl but we can't trust it - it is sometimes inaccurate. - absolute_pwd="`pwd`"; - if test -n "$PWD" -a "`cd $PWD && pwd`" = "$absolute_pwd" - then blddir="$PWD" - else blddir="$absolute_pwd"; CANONICALIZE_PATH(blddir) - fi - AC_SUBST(blddir) - - dnl Make srcdir absolute, if not already. It is important to - dnl avoid running the path through pwd unnecessary, since pwd can - dnl give you automounter prefixes, which can go away. - case "$srcdir" in - /* ) ;; - . ) srcdir="$blddir" ;; - * ) srcdir="`cd $srcdir && pwd`"; CANONICALIZE_PATH(srcdir) ;; - esac - - dnl Check if the source directory already has a configured system in it. - if test `pwd` != `sh -c cd $srcdir && pwd` \ - && test -f "$srcdir/src/config.h"; then - (echo "$progname: WARNING: The directory tree \`$srcdir' is being used" - echo " as a build directory right now; it has been configured in its own" - echo " right. To configure in another directory as well, you MUST" - echo " use GNU make. If you do not have GNU make, then you must" - echo " now do \`make distclean' in $srcdir," - echo " and then run $progname again.") >&2 - extrasub='/^VPATH[[ ]]*=/c\ - vpath %.c $(srcdir)\ - vpath %.h $(srcdir)\ - vpath %.y $(srcdir)\ - vpath %.l $(srcdir)\ - vpath %.s $(srcdir)\ - vpath %.in $(srcdir)' - fi - - dnl ---------------------------------------- - dnl Find out which version of XEmacs this is - dnl ---------------------------------------- - . "$srcdir/version.sh" || exit 1; - dnl Must do the following first to determine verbosity for AC_DEFINE - if test -n "$emacs_beta_version"; then beta=yes; else beta=no; fi - : "${extra_verbose=$beta}" - version="${emacs_major_version}.${emacs_minor_version}" - AC_DEFINE_UNQUOTED(EMACS_MAJOR_VERSION, $emacs_major_version) - AC_DEFINE_UNQUOTED(EMACS_MINOR_VERSION, $emacs_minor_version) - if test -n "$emacs_beta_version"; then - version="${version}-b${emacs_beta_version}" - AC_DEFINE_UNQUOTED(EMACS_BETA_VERSION, $emacs_beta_version) - fi - AC_DEFINE_UNQUOTED(XEMACS_CODENAME, "$xemacs_codename") - AC_DEFINE_UNQUOTED(EMACS_VERSION, "$version") - - if test "$with_infodock" = "yes"; then - if test ! -f ../ID-INSTALL; then - echo "Cannot build InfoDock without InfoDock sources" - with_infodock=no - fi - fi - - if test "$with_infodock" = "yes"; then - dnl InfoDock version numbers. XEmacs will use the same style of numbering - dnl after the release of XEmacs 21.0. - AC_DEFINE_UNQUOTED(INFODOCK_MAJOR_VERSION, $infodock_major_version) - AC_DEFINE_UNQUOTED(INFODOCK_MINOR_VERSION, $infodock_minor_version) - AC_DEFINE_UNQUOTED(INFODOCK_BUILD_VERSION, $infodock_build_version) - version=${infodock_major_version}.${infodock_minor_version}.${infodock_build_version} - PROGNAME=infodock - CPPFLAGS="$CPPFLAGS -DINFODOCK" - else - PROGNAME=xemacs - fi - - 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 --debug and --extra-verbosity. - if test -n "$emacs_beta_version"; then beta=yes; else beta=no; fi - test "${error_check_extents=$beta}" = yes && AC_DEFINE(ERROR_CHECK_EXTENTS) - test "${error_check_typecheck=$beta}" = yes && AC_DEFINE(ERROR_CHECK_TYPECHECK) - test "${error_check_bufpos=$beta}" = yes && AC_DEFINE(ERROR_CHECK_BUFPOS) - test "${error_check_gc=$beta}" = yes && AC_DEFINE(ERROR_CHECK_GC) - test "${error_check_malloc=$beta}" = yes && AC_DEFINE(ERROR_CHECK_MALLOC) - dnl debug=yes must be set when error checking is present. This should be - dnl fixed up. - dnl debug implies other options - if test "${debug:=$beta}" = "yes"; then - use_assertions=yes memory_usage_stats=yes - XE_ADD_OBJS(debug.o) - AC_DEFINE(DEBUG_XEMACS) - fi - test "$use_assertions" = "yes" && AC_DEFINE(USE_ASSERTIONS) - test "$memory_usage_stats" = "yes" && AC_DEFINE(MEMORY_USAGE_STATS) - - dnl ------------------------------ - dnl Determine the s&m files to use - dnl ------------------------------ - dnl Given the configuration name, set machfile and opsysfile to the - dnl names of the m/*.h and s/*.h files we should use. - - dnl Canonicalize the configuration name. - AC_MSG_CHECKING("host system type") - dnl allow -workshop suffix on configuration name - internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'` - canonical=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub "$internal_configuration"` - XE_STRIP_4TH_COMPONENT(configuration) - XE_STRIP_4TH_COMPONENT(canonical) - AC_MSG_RESULT($configuration) - - dnl If you add support for a new configuration, add code to this - dnl switch statement to recognize your configuration name and select - dnl the appropriate operating system and machine description files. - - dnl You would hope that you could choose an m/*.h file pretty much - dnl based on the machine portion of the configuration name, and an s- - dnl file based on the operating system portion. However, it turns out - dnl that each m/*.h file is pretty manufacturer-specific - for - dnl example, apollo.h, hp9000s300.h, mega68k, news.h, and tad68k are - dnl all 68000 machines; mips.h, pmax.h, and news-risc are all MIPS - dnl machines. So we basically have to have a special case for each - dnl configuration name. - - dnl As far as handling version numbers on operating systems is - dnl concerned, make sure things will fail in a fixable way. If - dnl /etc/MACHINES says nothing about version numbers, be - dnl prepared to handle anything reasonably. If version numbers - dnl matter, be sure /etc/MACHINES says something about it. - - dnl Eric Raymond says we should accept strings like "sysvr4" to mean - dnl "System V Release 4"; he writes, "The old convention encouraged" - dnl "confusion between `system' and `release' levels'." - - machine='' opsys='' - - dnl Straightforward machine determination - case "$canonical" in - sparc-*-* ) machine=sparc ;; - alpha*-*-* ) machine=alpha ;; - vax-*-* ) machine=vax ;; - mips-dec-* ) machine=pmax ;; - mips-sgi-* ) machine=iris4d ;; - romp-ibm-* ) machine=ibmrt ;; - rs6000-ibm-aix* ) machine=ibmrs6000 ;; - powerpc-ibm-aix* ) machine=ibmrs6000 ;; - powerpc*-* ) machine=powerpc ;; - hppa-*-* ) machine=hp800 ;; - m88k-dg-* ) machine=aviion ;; - m68*-sony-* ) machine=news ;; - mips-sony-* ) machine=news-risc ;; - clipper-* ) machine=clipper ;; - arm-* ) machine=arm ;; - ns32k-* ) machine=ns32000 ;; - esac - - dnl Straightforward OS determination - case "$canonical" in - *-*-linux* ) opsys=linux ;; - *-*-netbsd* ) opsys=netbsd ;; - *-*-openbsd* ) opsys=openbsd ;; - *-*-nextstep* ) opsys=nextstep ;; - *-*-vms ) opsys=vms ;; - - dnl DEC OSF - *-dec-osf1.3 | *-dec-osf2* ) opsys=decosf1-3 ;; - *-dec-osf1.2 | *-dec-osf1* ) opsys=decosf1-2 ;; - *-dec-osf3.[[2-9]] ) opsys=decosf3-2 ;; - *-dec-osf3* ) opsys=decosf3-1 ;; - *-dec-osf4* ) opsys=decosf4-0 ;; - - dnl DEC Ultrix - *-*-ultrix[[0-3]].* | *-*-ultrix4.0* ) opsys=bsd4-2 ;; - *-*-ultrix4.[[12]]* ) opsys=bsd4-3 ;; - *-*-ultrix* ) opsys=ultrix4-3 ;; - - dnl AIX - *-*-aix3.1* ) opsys=aix3-1 ;; - *-*-aix3.2.5 ) opsys=aix3-2-5 ;; - *-*-aix3* ) opsys=aix3-2 ;; - *-*-aix4.0* ) opsys=aix4 ;; - *-*-aix4.1* ) opsys=aix4-1 ;; - *-*-aix4* ) opsys=aix4-2 ;; - - dnl Other generic OSes - *-gnu* ) opsys=gnu ;; - *-*-bsd4.[[01]] ) opsys=bsd4-1 ;; - *-*-bsd4.2 ) opsys=bsd4-2 ;; - *-*-bsd4.3 ) opsys=bsd4-3 ;; - *-*-aos4.2 ) opsys=bsd4-2 ;; - *-*-aos* ) opsys=bsd4-3 ;; - *-*-sysv0 | *-*-sysvr0 ) opsys=usg5-0 ;; - *-*-sysv2 | *-*-sysvr2 ) opsys=usg5-2 ;; - *-*-sysv2.2 | *-*-sysvr2.2 ) opsys=usg5-2-2 ;; - *-*-sysv3* | *-*-sysvr3* ) opsys=usg5-3 ;; - *-*-sysv4.1* | *-*-sysvr4.1* )opsys=usg5-4 NON_GNU_CPP=/usr/lib/cpp ;; - *-*-sysv4.[[2-9]]* | *-sysvr4.[[2-9]]* ) - if test -z "$NON_GNU_CPP" ; then - for prog in "/usr/ccs/lib/cpp" "/lib/cpp"; do - if test -f "$prog"; then NON_GNU_CPP="$prog"; break; fi - done - fi - opsys=usg5-4-2 ;; - *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;; - *-*-mach_bsd4.3* ) opsys=mach-bsd4-3 ;; - esac - - case "$canonical" in - - dnl NetBSD ports - *-*-netbsd* ) - case "$canonical" in - i[[3-9]]86-*-netbsd*) machine=intel386 ;; - hp300-*-netbsd* | amiga-*-netbsd* | sun3-*-netbsd* | mac68k-*-netbsd* | da30-*-netbsd* | m68k-*-netbsd* ) - dnl Yes, this is somewhat bogus. - machine=hp9000s300 ;; - pc532-*-netbsd* | ns32k-*-netbsd* ) machine=ns32000 ;; - pmax-*-netbsd* | mips-*-netbsd* ) machine=pmax ;; - esac - ;; - - dnl OpenBSD ports - *-*-openbsd* ) - case "${canonical}" in - i386-*-openbsd*) machine=intel386 ;; - m68k-*-openbsd*) machine=hp9000s300 ;; - mipsel-*-openbsd*) machine=pmax ;; - esac - ;; - - dnl Acorn RISCiX: - arm-acorn-riscix1.1* ) machine=acorn opsys=riscix1-1 ;; - arm-acorn-riscix1.2* | arm-acorn-riscix ) machine=acorn opsys=riscix1-2 ;; - - dnl Alliant machines - fx80-alliant-* ) machine=alliant4 opsys=bsd4-2 ;; - i860-alliant-* ) machine=alliant-2800 opsys=bsd4-3 ;; - - dnl Altos 3068 - m68*-altos-sysv* ) machine=altos opsys=usg5-2 ;; - - dnl Amdahl UTS - 580-amdahl-sysv* ) machine=amdahl opsys=usg5-2-2 ;; - - dnl Apollo, Domain/OS - m68*-apollo-* ) machine=apollo opsys=bsd4-3 ;; - - dnl AT&T 3b2, 3b5, 3b15, 3b20 - we32k-att-sysv* ) machine=att3b opsys=usg5-2-2 ;; - - dnl AT&T 3b1 - The Mighty Unix PC! - m68*-att-sysv* ) machine=7300 opsys=usg5-2-2 ;; - - dnl Bull machines - rs6000-bull-bosx* ) machine=ibmrs6000 opsys=aix3-2 ;; # dpx20 - m68*-bull-sysv3* ) machine=dpx2 opsys=usg5-3 ;; # dpx2 - m68*-bull-sysv2* ) machine=sps7 opsys=usg5-2 ;; # sps7 - - dnl CCI 5/32, 6/32 -- see "Tahoe". - - dnl Celerity - celerity-celerity-bsd* ) machine=celerity opsys=bsd4-2 ;; - - dnl Convex - *-convex-bsd* | *-convex-convexos* ) - machine=convex opsys=bsd4-3 - NON_GNU_CPP="cc -E -P" - ;; - - dnl Cubix QBx/386 - i[[3-9]]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;; - - dnl Data General AViiON Machines - i586-dg-dgux*R4* | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;; - m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;; - m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) opsys=dgux5-4r2 ;; - m88k-dg-dgux* ) opsys=dgux ;; - - dnl Motorola Delta machines - m68k-motorola-sysv* | m68000-motorola-sysv* ) machine=delta opsys=usg5-3 ;; - m88k-motorola-sysv4* ) - dnl jbotte@bnr.ca says that UNIX_System_V 4.0 R40V4.3 m88k mc88110 - dnl needs POSIX_SIGNALS and therefore needs usg5-4-2. - dnl I hope there are not other 4.0 versions for this machine - dnl which really need usg5-4 instead. - machine=delta88k opsys=usg5-4-2 - ;; - m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) machine=delta88k opsys=usg5-3 ;; - - dnl Dual machines - m68*-dual-sysv* ) machine=dual opsys=usg5-2 ;; - m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;; - - dnl Encore machines - ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;; - - dnl Gould Power Node and NP1 - pn-gould-bsd4.2* ) machine=gould opsys=bsd4-2 ;; - pn-gould-bsd4.3* ) machine=gould opsys=bsd4-3 ;; - np1-gould-bsd* ) machine=gould-np1 opsys=bsd4-3 ;; - - dnl Harris Night Hawk machines running CX/UX (a 5000 looks just like a 4000 - dnl as far as XEmacs is concerned). - m88k-harris-cxux* ) - dnl Build needs to be different on 7.0 and later releases - case "`uname -r`" in - [[56]].[[0-9]] ) machine=nh4000 opsys=cxux ;; - [[7]].[[0-9]] ) machine=nh4000 opsys=cxux7 ;; - esac - NON_GNU_CPP="/lib/cpp" - ;; - dnl Harris ecx or gcx running CX/UX (Series 1200, Series 3000) - m68k-harris-cxux* ) machine=nh3000 opsys=cxux ;; - dnl Harris power pc NightHawk running Power UNIX (Series 6000) - powerpc-harris-powerunix ) machine=nh6000 opsys=powerunix NON_GNU_CPP="cc -Xo -E -P" ;; - - dnl Honeywell XPS100 - xps*-honeywell-sysv* ) machine=xps100 opsys=usg5-2 ;; - - dnl HP 9000 series 200 or 300 - m68*-hp-bsd* ) machine=hp9000s300 opsys=bsd4-3 ;; - - dnl HP-UX - *-hp-hpux* ) - dnl Figure out machine and opsys orthogonally - case "$canonical" in - m68* ) machine=hp9000s300 ;; - hppa* ) machine=hp800 ;; - esac - - case "$canonical" in - *-hp-hpux7* ) opsys=hpux ;; - *-hp-hpux8* ) opsys=hpux8 ;; - *-hp-hpux9* ) opsys=hpux9 ;; - *-hp-hpux10* ) opsys=hpux10 ;; - *-hp-hpux11* ) opsys=hpux11 ;; - * ) opsys=hpux ;; - esac - - dnl HP has a broken "strcat" - case "$opsys" in hpux9 | hpux10 ) XE_ADD_OBJS(strcat.o) ;; esac - - if test "$opsys" = "hpux10" -o "$opsys" = "hpux11"; then \ - ansi_flag="-Ae"; else ansi_flag="-Aa"; fi - NON_GNU_CC="cc $ansi_flag" NON_GNU_CPP="cc $ansi_flag -E" - - case "$canonical" in *-hp-hpux*shr* ) opsys="${opsys}-shr" ;; esac - ;; - - dnl Orion machines - orion-orion-bsd* ) machine=orion opsys=bsd4-2 ;; - clipper-orion-bsd* ) machine=orion105 opsys=bsd4-2 ;; - - dnl IBM machines - i[[3-9]]86-ibm-aix1.1* ) machine=ibmps2-aix opsys=usg5-2-2 ;; - i[[3-9]]86-ibm-aix1.[[23]]* | i[[3-9]]86-ibm-aix* ) machine=ibmps2-aix opsys=usg5-3 ;; - i370-ibm-aix*) machine=ibm370aix opsys=usg5-3 ;; - romp-ibm-aos* ) opsys=bsd4-3 ;; - romp-ibm-bsd* ) opsys=bsd4-3 ;; - romp-ibm-mach* ) opsys=mach-bsd4-3 ;; - - dnl Integrated Solutions "Optimum V" - m68*-isi-bsd4.2* ) machine=isi-ov opsys=bsd4-2 ;; - m68*-isi-bsd4.3* ) machine=isi-ov opsys=bsd4-3 ;; - - dnl Intel 386 machines where we do care about the manufacturer - i[[3-9]]86-intsys-sysv* ) machine=is386 opsys=usg5-2-2 ;; - - dnl Prime EXL - i[[3-9]]86-prime-sysv* ) machine=i386 opsys=usg5-3 ;; - - dnl Sequent Symmetry running Dynix - i[[3-9]]86-sequent-bsd* ) machine=symmetry opsys=bsd4-3 ;; - - dnl Sequent Symmetry running DYNIX/ptx - i[[3-9]]86-sequent-ptx* ) machine=sequent-ptx opsys=ptx NON_GNU_CPP="/lib/cpp" ;; - - dnl Unspecified sysv on an ncr machine defaults to svr4.2. - dnl (Plain usg5-4 does not turn on POSIX signals, which we need.) - i[[3-9]]86-ncr-sysv* ) machine=ncr386 opsys=usg5-4-2 ;; - - dnl Intel Paragon OSF/1 - i860-intel-osf1* ) machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp ;; - - dnl Intel 860 - i860-*-sysv4* ) machine=i860 opsys=usg5-4 NON_GNU_CC="/bin/cc" NON_GNU_CPP="/usr/ccs/lib/cpp" ;; - - dnl Masscomp machines - m68*-masscomp-rtu* ) machine=masscomp opsys=rtu ;; - - dnl Megatest machines - m68*-megatest-bsd* ) machine=mega68 opsys=bsd4-2 ;; - - dnl Workstations sold by MIPS - dnl This is not necessarily all workstations using the MIPS processor - - dnl Irises are produced by SGI, and DECstations by DEC. - mips-mips-usg* ) machine=mips4 ;; - mips-mips-riscos4 ) - machine=mips4 - NON_GNU_CC="cc -systype bsd43" - NON_GNU_CPP="cc -systype bsd43 -E" - case "$canonical" in - mips-mips-riscos4* ) opsys=bsd4-3 ;; - mips-mips-riscos5* ) opsys=riscos5 ;; - esac - ;; - mips-mips-bsd* ) machine=mips opsys=bsd4-3 ;; - mips-mips-* ) machine=mips opsys=usg5-2-2 ;; - - dnl NeXT - m68*-next-* | m68k-*-nextstep* ) machine=m68k opsys=nextstep ;; - - dnl The complete machine from National Semiconductor - ns32k-ns-genix* ) machine=ns32000 opsys=usg5-2 ;; - - dnl NCR machines - m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) machine=tower32 opsys=usg5-2-2 ;; - m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) machine=tower32v3 opsys=usg5-3 ;; - - dnl Nixdorf Targon 31 - m68*-nixdorf-sysv* ) machine=targon31 opsys=usg5-2-2 ;; - - dnl Nu (TI or LMI) - m68*-nu-sysv* ) machine=nu opsys=usg5-2 ;; - - dnl Plexus - m68*-plexus-sysv* ) machine=plexus opsys=usg5-2 ;; - - dnl Pyramid machines - pyramid-pyramid-bsd* ) machine=pyramid opsys=bsd4-2 ;; - - dnl Sequent Balance - ns32k-sequent-bsd4.2* ) machine=sequent opsys=bsd4-2 ;; - ns32k-sequent-bsd4.3* ) machine=sequent opsys=bsd4-3 ;; - - dnl Siemens Nixdorf - mips-siemens-sysv* | mips-sni-sysv*) - machine=mips-siemens opsys=usg5-4 - NON_GNU_CC=/usr/ccs/bin/cc - NON_GNU_CPP=/usr/ccs/lib/cpp - ;; - - dnl NEC - mips-nec-sysv*) - machine=mips-nec - NON_GNU_CC=/usr/ccs/bin/cc - NON_GNU_CPP=/usr/ccs/lib/cpp - ;; - - dnl Silicon Graphics machines - dnl Iris 2500 and Iris 2500 Turbo (aka the Iris 3030) - m68*-sgi-iris3.5* ) machine=irist opsys=iris3-5 ;; - m68*-sgi-iris3.6* | m68*-sgi-iris*) machine=irist opsys=iris3-6 ;; - dnl Iris 4D - mips-sgi-irix3.* ) opsys=irix3-3 ;; - mips-sgi-irix4.* ) opsys=irix4-0 ;; - mips-sgi-irix6* ) opsys=irix6-0 ;; - mips-sgi-irix5.1* ) opsys=irix5-1 ;; - mips-sgi-irix5.2* ) opsys=irix5-2 ;; - mips-sgi-irix5.* ) opsys=irix5-3 ;; - mips-sgi-irix* ) opsys=irix5-0 ;; - - dnl SONY machines - *-sony-newsos[[34]]* | *-sony-news[[34]]* ) opsys=bsd4-3 ;; - *-sony-news* ) opsys=newsos5 ;; - - dnl Stride - m68*-stride-sysv* ) machine=stride opsys=usg5-2 ;; - - dnl Suns - *-*-solaris* | *-*-sunos* | *-sun-mach* | *-sun-bsd* ) - dnl Hardware type - case "$canonical" in - m68*-sunos1* ) machine=sun1 ;; - m68*-sunos2* ) machine=sun2 ;; - m68* ) machine=sun3 ;; - i*86*-sun-sunos[[34]]* ) machine=sun386 ;; - i*86-*-* ) machine=intel386 ;; - rs6000* ) machine=rs6000 ;; - esac - - dnl Make $canonical even more so. - case "$canonical" in *-sunos5*) - canonical=`echo $canonical | sed -e s/sunos5/solaris2/`;; - esac - - dnl On SunOS 4, use /usr/lib/cpp, sans dynodump, /bin/ranlib - dnl On SunOS 5, use cc -E, need dynodump, RANLIB not needed - dnl But, SunOS 5.6 no longer needs dynodump because it has a similar - dnl function integrated. - case "$canonical" in - *-sunos4* ) - #test -f /usr/lib/cpp && NON_GNU_CPP=/usr/lib/cpp ;; - : ;; - *-solaris2* ) - #test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp - RANLIB=':' ;; - esac - - case "$canonical" in - *-solaris* ) - opsys=sol2 - os_release=`uname -r | sed -e 's/^\([[0-9]]\)\.\([[0-9]]\).*/\1\2/'` - AC_DEFINE_UNQUOTED(OS_RELEASE, $os_release) ;; - - dnl The last Sun386 ran 4.0. - i*86-*-sunos4* ) opsys=sunos4-0 ;; - *-sunos4.0* ) opsys=sunos4-0 ;; - *-sunos4.1.2* ) opsys=sunos4-1-2 ;; - *-sunos4.1.3* ) opsys=sunos4-1-3 ;; - *-sunos4.1.[[4-9]]* ) opsys=sunos4-1-4 ;; - *-sunos4* | *-sunos ) opsys=sunos4-1 ;; - *-mach* ) opsys=mach-bsd4-3 ;; - * ) opsys=bsd4-2 ;; - esac - - case "$canonical" in *-sunos4*shr* ) opsys="${opsys}-shr" ;; esac - - dnl Watch out for a compiler guaranteed not to work. - test "$opsys $CC" = "sol2 /usr/ucb/cc" && CC="" - ;; - - dnl Tadpole 68k - m68*-tadpole-sysv* ) machine=tad68k opsys=usg5-3 ;; - - dnl Tahoe machines - tahoe-tahoe-bsd4.2* ) machine=tahoe opsys=bsd4-2 ;; - tahoe-tahoe-bsd4.3* ) machine=tahoe opsys=bsd4-3 ;; - - dnl Tandem Integrity S2 - mips-tandem-sysv* ) machine=tandem-s2 opsys=usg5-3 ;; - - dnl Tektronix XD88 - m88k-tektronix-sysv3* ) machine=tekxd88 opsys=usg5-3 ;; - - dnl Tektronix 16000 box (6130?) - ns16k-tektronix-bsd* ) machine=ns16000 opsys=bsd4-2 ;; - dnl Tektronix 4300 - dnl src/m/tek4300.h hints that this is a m68k machine. - m68*-tektronix-bsd* ) machine=tek4300 opsys=bsd4-3 ;; - - dnl Titan P2 or P3 - titan-titan-sysv* ) machine=titan opsys=usg5-3 ;; - - dnl Ustation E30 (SS5E) - m68*-unisys-uniplus* ) machine=ustation opsystem=unipl5-2 ;; - - dnl Vaxen. - vax-dec-* ) - case "$canonical" in - *-sysv[[01]]* | *-sysvr[[01]]* ) opsys=usg5-0 ;; - *-sysv2* | *-sysvr2* ) opsys=usg5-2 ;; - *-mach* ) opsys=mach-bsd4-3 ;; - esac - ;; - - dnl Whitechapel MG1 - ns16k-whitechapel-* ) machine=mg1 ;; - - dnl Wicat - m68*-wicat-sysv* ) machine=wicat opsys=usg5-2 ;; - - dnl Intel 386 machines where we do not care about the manufacturer - i[[3-9]]86-*-* ) - machine=intel386 - case "$canonical" in - *-isc1.* | *-isc2.[[01]]* ) opsys=386-ix ;; - *-isc2.2* ) opsys=isc2-2 ;; - *-isc4.0* ) opsys=isc4-0 ;; - *-isc4.* ) opsys=isc4-1 - GCC_TEST_OPTIONS=-posix - NON_GCC_TEST_OPTIONS=-Xp - ;; - *-isc* ) opsys=isc3-0 ;; - *-esix5* ) opsys=esix5r4 NON_GNU_CPP=/usr/lib/cpp ;; - *-esix* ) opsys=esix ;; - *-mach* ) opsys=mach-bsd4-3 ;; - *-xenix* ) opsys=xenix ;; - *-sco3.2v4* ) opsys=sco4 NON_GNU_CPP=/lib/cpp ;; - *-bsd386* | *-bsdi1* ) opsys=bsd386 ;; - *-bsdi4* ) opsys=bsdos4 ;; - *-bsdi3* ) opsys=bsdos3 ;; - *-bsdi2.1* ) opsys=bsdos2-1 ;; - *-bsdi2* ) opsys=bsdos2 ;; - *-sco3.2v5* ) opsys=sco5 ; - dnl This is a pain. Like the current USL cc, SCO cc -E - dnl tokenizes as it preprocesses, making configure very - dnl unhappy. Unfortunately, /lib/cpp does not understand - dnl flags like "-b elf", so we have to cheat in order to - dnl pick up the right defines for UNEXEC from the s-file. - dnl 01/05/95 robertl@dgii.com - if test "$dynamic" = "yes" ; then - NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE -D_SCO_ELF" ; - else - NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE" ; - fi ;; - *-386bsd* ) opsys=386bsd ;; - *-freebsd* ) opsys=freebsd ;; - *-nextstep* ) opsys=nextstep ;; - *-pc-cygwin* ) opsys=cygwin32 ;; - *-pc-mingw* ) opsys=mingw32 ; - test -z "$with_tty" && with_tty="no";; - dnl Otherwise, we fall through to the generic opsys code at the bottom. - esac - ;; - - dnl Linux/68k - m68k-*-linux* ) machine=m68k opsys=linux ;; - - esac - - if test -z "$machine" -o -z "$opsys"; then - (echo "$progname: XEmacs hasn't been ported to \`$canonical' systems." - echo "$progname: Check \`etc/MACHINES' for recognized configuration names." - ) >&2 - exit 1 - fi - - if test -z "$dynamic"; then - case "$opsys" in - hpux* | sunos4* ) dynamic=no ;; - *) dynamic=yes ;; - esac - fi - if test "$dynamic" = "yes"; then - case "$opsys" in - hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;; - decosf* ) ld_call_shared="-call_shared" ;; - esac - else dnl "$dynamic" = "no" - case "$opsys" in - sol2 ) - echo "Static linking is not supported on Solaris 2." - echo "Rerun configure without specifying --dynamic=no." - exit 1 ;; - linux ) ld_call_shared="-Bstatic" ;; - decosf* ) ld_call_shared="-non_shared" ;; - esac - fi - - dnl Use xlc by default on AIX - case "$opsys" in aix*) NON_GNU_CC=xlc ;; esac - - stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'` - AC_DEFINE_UNQUOTED(STACK_TRACE_EYE_CATCHER, $stack_trace_eye_catcher) - - machfile="m/${machine}.h" - opsysfile="s/${opsys}.h" - - dnl -------------------------------------------------- - dnl Determine the compiler, set up for feature testing - dnl -------------------------------------------------- - - dnl Sun Development environment support - test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias - XE_CHECK_FEATURE_DEPENDENCY(workshop, tooltalk) - if test "$with_workshop" = "yes"; then - AC_DEFINE(SUNPRO) - XE_ADD_OBJS(sunpro.o) - fi - - if test "$with_clash_detection" = "yes"; then - AC_DEFINE(CLASH_DETECTION) - XE_ADD_OBJS(filelock.o) - fi - - dnl Choose a compiler from (in order) - dnl --compiler, env var CC, with_gcc=no && ${NON_GNU_CC:-cc}, AC_PROG_CC - test -n "$compiler" && CC="$compiler" - if test "$with_gcc" = "no"; then dnl Try to find a non-gcc compiler - case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac - fi - - dnl If we don't set CFLAGS here, AC_PROG_CC will set it. - dnl But we know better what's good for us, so we do our own - dnl computation of real CFLAGS later. - dnl --cflags overrides environment variable CFLAGS - test "${cflags-unset}" != unset && CFLAGS="$cflags" - if test "${CFLAGS-unset}" != unset - then cflags_specified=yes; - else cflags_specified=no; - fi - - xe_save_CFLAGS="$CFLAGS" - - AC_PROG_CC dnl Autoconf has its own magic for compiler autodetection - - dnl Retry using random guesswork if AC_PROG_CC got it wrong... - if test "$with_gcc" = "no" -a "$GCC" = "yes"; then - CC=${NON_GNU_CC-cc} - AC_PROG_CC - elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then - CC=gcc - AC_PROG_CC - fi - CFLAGS="$xe_save_CFLAGS" - - 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" - - AC_PROG_CPP - - AC_AIX - - AC_MSG_CHECKING(for GNU libc) - AC_TRY_COMPILE([#include ],[ - #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__) - #error Not a GNU libc system :-( - ******* ======= ******** &&&&&&&& - #endif - ], have_glibc=yes, have_glibc=no) - AC_MSG_RESULT($have_glibc) - dnl I'm tired of pop being broken with GLIBC -slb - dnl Well. then why not fix fucking pop? - test "$have_glibc" = "yes" && AC_DEFINE(_GNU_SOURCE) - - - dnl Identify compilers to enable compiler-specific hacks. - dnl Add support for other compilers HERE! - dnl GCC is already identified elsewhere. - AC_TRY_RUN([int main () { - #if defined __SUNPRO_C - return 11; - #elif defined __DECC - return 12; - #else - return 0; - #endif - }], [], - [case "$conftest_rc" in - 11) echo "You appear to be using the SunPro C compiler."; __SUNPRO_C=yes ;; - 12) echo "You appear to be using the DEC C compiler." ; __DECC=yes ;; - esac]) - - - dnl case "$canonical" in - dnl *-sun-sunos* ) test "$CPP" = "acc -E" && CPP="acc -E -Xs" ;; - dnl esac - - dnl -------------------------------------------------------------------- - dnl Extract some information from the operating system and machine files - dnl -------------------------------------------------------------------- - - echo "Extracting information from the machine- and system-dependent headers..." - - dnl It is not important that this name contain the PID; you cannot run - dnl two configures in the same directory and have anything work - dnl anyway. - tempcname="conftest.c" - - dnl CPP_to_sh(CPP_SYMBOL, SH_VAR, DEFAULT_VALUE) - define([CPP_to_sh], - [[#]ifndef [$1] - [#]define [$1]ifelse([$3],,, [ "$3"]) - [#]endif - configure___ [$2]=[$1] - ])dnl CPP_to_sh - - dnl CPP_boolean_to_sh(CPP_SYMBOL, SH_VAR) - define([CPP_boolean_to_sh], - [[#]ifdef [$1] - configure___ [$2]=yes - [#]else - configure___ [$2]=no - [#]endif - ])dnl CPP_boolean_to_sh - - cat > $tempcname </dev/null`" && \ - eval "$xe_add_unique_runpath_dir" - }])dnl - - dnl XE_COMPUTE_RUNPATH() - define([XE_COMPUTE_RUNPATH],[ - if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then - dnl Remove runtime paths from current ld switches - ld_switch_site=`echo '' $ld_switch_site | sed -e 's:^ ::' -e "s/$dash_r[[^ ]]*//g"` - ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[[^ ]]*//g"` - dnl PRINT_VAR(ld_switch_site ld_switch_x_site) - - dnl Fix up Runtime path - dnl If LD_RUN_PATH is set in environment, use that. - dnl In this case, assume user has set the right value. - runpath="" runpath_dirs="" - if test -n "$LD_RUN_PATH"; then - runpath="$LD_RUN_PATH" - elif test "$GCC" = "yes"; then - dnl Compute runpath from gcc's -v output - ld_switch_run_save="$ld_switch_run"; ld_switch_run="" - echo "int main(int argc, char *argv[[]]) {return 0;}" > conftest.c - xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null' - for arg in `eval "$xe_runpath_link" | grep ' -L'`; do - case "$arg" in P,* | -L* | -R* ) - for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do - XE_ADD_RUNPATH_DIR("$dir") - done ;; - esac - done - ld_switch_run="$ld_switch_run_save" - rm -f conftest* - else - dnl Add all directories with .so files to runpath - for arg in $ld_switch_site $ld_switch_x_site; do - case "$arg" in -L*) XE_ADD_RUNPATH_DIR(`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`);; esac - done - dnl Sometimes /opt/SUNWdt/lib is the only installed Motif available - if test "$opsys $need_motif" = "sol2 yes"; then - xe_runpath_dir="/opt/SUNWdt/lib"; - eval "$xe_add_unique_runpath_dir"; - fi - fi dnl Compute $runpath - - if test -n "$runpath"; then - ld_switch_run="${dash_r}${runpath}" - XE_PROTECT_LINKER_FLAGS(ld_switch_run) - test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath" - fi - fi - ])dnl - XE_COMPUTE_RUNPATH() - - dnl JKJ REMOVEME - dnl XE_SHLIB_STUFF - - 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_get_state, ,doug_lea_malloc=no) - AC_CHECK_FUNC(malloc_set_state, ,doug_lea_malloc=no) - AC_MSG_CHECKING(whether __after_morecore_hook exists) - AC_TRY_LINK([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" ; then - if test "$GNU_MALLOC" = yes ; then - GNU_MALLOC_reason=" - (Using Doug Lea's new malloc from the GNU C Library.)" - fi - AC_DEFINE(DOUG_LEA_MALLOC) - 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_) - fi - use_minimal_tagbits=yes - fi - - 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 - dnl have_libmcheck=no - dnl if test "$error_check_malloc" = "yes" -a \ - dnl "$have_glibc" = "yes" -a \ - dnl "$doug_lea_malloc" = "yes"; then - dnl AC_CHECK_HEADERS(mcheck.h) - dnl AC_CHECK_LIB(mcheck, mcheck, have_libmcheck=yes, have_libmcheck=no) - dnl fi - - dnl if test "$have_libmcheck" = "yes"; then - dnl AC_DEFINE(HAVE_LIBMCHECK) - dnl libmcheck=-lmcheck - dnl AC_SUBST(libmcheck) - dnl fi - - dnl Some other nice autoconf tests. If you add a test here which - dnl should make an entry in src/config.h, do not forget to add an - dnl #undef clause to src/config.h.in for autoconf to modify. - - AC_PROG_RANLIB - AC_PROG_INSTALL - AC_PROG_YACC - - dnl checks for header files - AC_CHECK_HEADERS(mach/mach.h sys/stropts.h sys/timeb.h sys/time.h unistd.h) - AC_CHECK_HEADERS(utime.h locale.h libgen.h fcntl.h ulimit.h cygwin/version.h) - AC_CHECK_HEADERS(kstat.h sys/pstat.h inttypes.h sys/un.h a.out.h) - AC_HEADER_SYS_WAIT - AC_HEADER_STDC - AC_HEADER_TIME - AC_DECL_SYS_SIGLIST - - dnl Some systems have utime.h but do not declare the struct anyplace. - AC_MSG_CHECKING(for struct utimbuf) - AC_TRY_COMPILE([#ifdef TIME_WITH_SYS_TIME - #include - #include - #else - #ifdef HAVE_SYS_TIME_H - #include - #else - #include - #endif - #endif - #ifdef HAVE_UTIME_H - #include - #endif], [static struct utimbuf x; x.actime = x.modtime;], - [AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_STRUCT_UTIMBUF)], - AC_MSG_RESULT(no)) - - dnl checks for typedefs - AC_TYPE_SIGNAL - AC_TYPE_SIZE_T - AC_TYPE_PID_T - AC_TYPE_UID_T - AC_TYPE_MODE_T - AC_TYPE_OFF_T - - AC_MSG_CHECKING(for struct timeval) - AC_TRY_COMPILE([#ifdef TIME_WITH_SYS_TIME - #include - #include - #else - #ifdef HAVE_SYS_TIME_H - #include - #else - #include - #endif - #endif], [static struct timeval x; x.tv_sec = x.tv_usec;], - [AC_MSG_RESULT(yes) - HAVE_TIMEVAL=yes - AC_DEFINE(HAVE_TIMEVAL)], - [AC_MSG_RESULT(no) - HAVE_TIMEVAL=no]) - - dnl checks for structure members - AC_STRUCT_TM - AC_STRUCT_TIMEZONE - - dnl checks for compiler characteristics - AC_C_CONST - - dnl check for Make feature - AC_PROG_MAKE_SET - - dnl check byte order - AC_C_BIGENDIAN - - dnl define SIZEOF_TYPE - AC_CHECK_SIZEOF(short) - if test "$ac_cv_sizeof_short" = 0; then - echo "" - echo "*** PANIC *** Configure tests are not working - compiler is broken." - echo "*** PANIC *** Please examine config.log for compilation errors." - exit 1 - fi - AC_CHECK_SIZEOF(int) - AC_CHECK_SIZEOF(long) - AC_CHECK_SIZEOF(long long) - AC_CHECK_SIZEOF(void *) - - dnl check for long file names - AC_SYS_LONG_FILE_NAMES - - dnl -lm is required by LISP_FLOAT_TYPE, among other things - AC_CHECK_FUNC(sin, ,AC_CHECK_LIB(m, sin)) - - dnl Floating operation support is now unconditional - AC_DEFINE(LISP_FLOAT_TYPE) - - AC_TRY_LINK([#include ], - [return atanh(1.0) + asinh(1.0) + acosh(1.0); ], - AC_DEFINE(HAVE_INVERSE_HYPERBOLIC)) - - dnl Determine type of mail locking from configure args and s&m headers - AC_CHECKING(type of mail spool file locking) - test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock - test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf - if test "$mail_locking" = "lockf"; then AC_DEFINE(REAL_MAIL_USE_LOCKF) - elif test "$mail_locking" = "flock"; then AC_DEFINE(REAL_MAIL_USE_FLOCK) - else mail_locking="dot-locking" - fi - - case "$opsys" in decosf*) - AC_CHECK_LIB(pthreads, cma_open) - test "$ac_cv_lib_pthreads_cma_open" = "yes" && \ - c_switch_site="$c_switch_site -threads" ;; - esac - - 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); XE_APPEND(-xildoff, ld_switch_site) - fi - else AC_MSG_RESULT(no) - fi - - dnl Link with "-z ignore" on Solaris if supported - if test "$opsys" = "sol2" && test "$OS_RELEASE" -ge 56; then - AC_MSG_CHECKING(for \"-z ignore\" linker flag) - case "`ld -h 2>&1`" in - *-z\ ignore\|record* ) AC_MSG_RESULT(yes) - XE_PREPEND(-z ignore, ld_switch_site) ;; - *) AC_MSG_RESULT(no) ;; - esac - fi - - dnl ---------------------- - dnl Choose a window system - dnl ---------------------- - - AC_CHECKING("for specified window system") - - 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 - - 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 "$x_includes" = "NONE"; 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/X11R6"; do - if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi - done - fi - - if test "$x_libraries" = "NONE"; then - for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do - if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi - done - fi - - AC_PATH_XTRA # Autoconf claims to find X library and include dirs for us. - 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 - - case "$with_x11" in - yes ) window_system=x11 HAVE_X_WINDOWS=yes ;; - no ) window_system=none HAVE_X_WINDOWS=no ;; - esac - - if test "$with_x11" = "yes"; then - AC_DEFINE(HAVE_X_WINDOWS) - XE_APPEND(lwlib, MAKE_SUBDIR) - XE_APPEND(lwlib, SRC_SUBDIR_DEPS) - - dnl Try to find Motif/CDE/Tooltalk 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" - XE_PREPEND(-L${lib_dir}, X_LIBS) ;; - esac - case "$x_includes" in "$inc_dir"* ) ;; *) - x_includes="$inc_dir $x_includes" - XE_PREPEND(-I${inc_dir}, X_CFLAGS) ;; - esac - break; dnl only need ONE Motif implementation! - fi - done - - dnl Contrib X libs/includes do NOT take precedence, so AP-pend - for rel in "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" - XE_APPEND(-L${lib_dir}, X_LIBS) - esac - case "$x_includes" in "$inc_dir"* ) ;; *) - x_includes="$x_includes $inc_dir" - XE_APPEND(-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 - if test "$GCC" = yes -a -d /usr/shlib; then XE_APPEND(-L/usr/shlib, X_LIBS); fi - - ld_switch_x_site="$X_LIBS" - - XE_COMPUTE_RUNPATH() - - if test "$extra_verbose" = "yes"; then - echo; echo "X11 compilation variables:" - 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 - test ! -z "$bitmapdirs" && AC_DEFINE_UNQUOTED(BITMAPDIR, "$bitmapdirs") - - dnl Autodetect defines extracted from X config by xmkmf, e.g. NARROWPROTO - AC_CHECKING(for X defines extracted by xmkmf) - rm -fr conftestdir - if mkdir conftestdir; then - cd conftestdir - cat > Imakefile <<'EOF' - xetest: - @echo ${PROTO_DEFINES} ${STD_DEFINES} - EOF - if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then - # GNU make sometimes prints "make[1]: Entering...", which would confuse us. - xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make` - fi - cd .. - rm -fr conftestdir - for word in $xmkmf_defines; do - case "$word" in - -D*=* ) ;; - -D* ) word=`echo '' $word | sed -e 's:^ *-D::'` - AC_DEFINE_UNQUOTED($word) ;; - esac - done - fi - - dnl make sure we can find Intrinsic.h - AC_CHECK_HEADER(X11/Intrinsic.h, , - [AC_MSG_ERROR("Unable to find X11 header files.")]) - - dnl -lXt and -lX11 are required - dnl Some broken systems require the magic "-b i486-linuxaout" flag - AC_CHECK_LIB(X11, XOpenDisplay, have_lib_x11=yes) - if test "$have_lib_x11" != "yes"; then - AC_CHECK_LIB(X11, XGetFontProperty, - ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site", - [AC_MSG_ERROR("Unable to find X11 libraries.")], - -b i486-linuxaout) - fi - libs_x="-lX11" - test "$extra_verbose" = "yes" && echo " Setting libs_x to \"-lX11\"" - - dnl Autodetect -lXext - AC_CHECK_LIB(Xext, XShapeSelectInput, XE_PREPEND(-lXext, libs_x)) - - dnl Require -lXt - AC_CHECK_LIB(Xt, XtOpenDisplay, XE_PREPEND(-lXt, libs_x), - AC_MSG_ERROR("Unable to find X11 libraries.")) - - AC_MSG_CHECKING(the version of X11 being used) - AC_TRY_RUN([#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(THIS_IS_X11R${x11_release}) - - AC_CHECK_HEADERS(X11/Xlocale.h) - - dnl remove this - we should avoid checking for specific OS - AC_MSG_CHECKING(for XFree86) - if test -d "/usr/X386/include" -o \ - -f "/etc/XF86Config" -o \ - -f "/etc/X11/XF86Config" -o \ - -f "/usr/X11R6/lib/X11/XF86Config"; then - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_XFREE386) - else - AC_MSG_RESULT(no) - fi - - dnl autodetect -lXmu - test -z "$with_xmu" && { AC_CHECK_LIB(Xmu, XmuReadBitmapDataFromFile, - with_xmu=yes, with_xmu=no) } - if test "$with_xmu" = "no"; then - XE_ADD_OBJS(xmu.o) - else - XE_PREPEND(-lXmu, libs_x) - AC_DEFINE(HAVE_XMU) - fi - - dnl Autodetect -lXbsd - dnl #### Someone, please add a better function than main - AC_CHECK_LIB(Xbsd, main, XE_PREPEND(-lXbsd, libs_x)) - - dnl Problem with the MIT distribution of X on AIX - if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then - dnl X11R6 requires thread-safe code on AIX for some reason - if test "$GCC" = "yes"; then - XE_PREPEND(-mthreads, X_CFLAGS) - XE_PREPEND(-mthreads, libs_x) - else - case "$CC" in - "xlc" ) CC="xlc_r" ;; - "xlC" ) CC="xlC_r" ;; - "cc" ) CC="cc_r" ;; - esac - fi - fi - - fi dnl $with_x11 = yes - - if test "$with_msw" != "no"; then - AC_CHECKING(for MS-Windows) - AC_CHECK_LIB(gdi32,main,with_msw=yes) - if test "$with_msw" = "yes"; then - AC_DEFINE(HAVE_MS_WINDOWS) - install_pp="$blddir/lib-src/installexe.sh" - XE_APPEND(-lshell32 -lgdi32 -luser32 -lcomctl32, libs_system) - test "$with_dragndrop" != no && XE_APPEND(msw, dragndrop_proto) - if test "$window_system" != x11; then - window_system=msw - test "$with_scrollbars" != "no" && with_scrollbars=msw \ - && XE_ADD_OBJS(scrollbar-msw.o) - test "$with_menubars" != "no" && with_menubars=msw \ - && XE_ADD_OBJS(menubar-msw.o) - test "$with_toolbars" != "no" && with_toolbars=msw \ - && XE_ADD_OBJS(toolbar-msw.o) - test "$with_dialogs" != "no" && with_dialogs=msw \ - && XE_ADD_OBJS(dialog-msw.o) - else - test "$with_scrollbars" != "no" && XE_ADD_OBJS(scrollbar-msw.o) - test "$with_menubars" != "no" && XE_ADD_OBJS(menubar-msw.o) - test "$with_toolbars" != "no" && XE_ADD_OBJS(toolbar-msw.o) - test "$with_dialogs" != "no" && XE_ADD_OBJS(dialog-msw.o) - fi - dnl check for our special version of select - AC_TRY_RUN([#include - int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }], - [AC_DEFINE(HAVE_MSG_SELECT)]) - const_is_losing=no - with_file_coding=yes - XE_ADD_OBJS(console-msw.o device-msw.o event-msw.o frame-msw.o objects-msw.o select-msw.o redisplay-msw.o glyphs-msw.o gui-msw.o) - fi - fi - - AC_SUBST(install_pp) - - test -z "$window_system" && window_system="none" - - 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 mswindows support - currently none - dnl ### MS-Windows folks: add code here..... (martin) - if test "$with_msw" != "yes"; then - for feature in MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES - do - if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then - AC_MSG_WARN([--with-$feature ignored: Not valid without MS-Windows support]) - fi - eval "with_${feature}=no" - done - else - : - fi - - dnl Test for features that require X11 support - if test "$with_x11" != "yes"; then - dnl It ought to be reasonable to have no output device at all, and only use - dnl XEmacs in --batch mode. - dnl if test "$with_tty" = "no" ; then - dnl AC_MSG_ERROR([No window system support and no TTY support - Unable to proceed.]) - dnl fi - for feature in tooltalk cde offix session xim xmu - 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 FSF 19.29 has some bitmapdir stuff here. - bitmapdir= - - case "$window_system" in - x11 ) HAVE_X_WINDOWS=yes; echo " Using X11." ;; - msw ) HAVE_X_WINDOWS=no ; echo " Using MS-Windows." ;; - none ) HAVE_X_WINDOWS=no ; echo " Using no window system." ;; - esac - - 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 session-management - AC_CHECKING(for session-management option); - dnl if test "$with_session" = "yes"; then - if test "$with_session" != "no"; then - AC_DEFINE(HAVE_SESSION) - fi - - dnl Autodetect Xauth - dnl -lXau is only used by gnuclient, so use a special variable for Xauth X libs - test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no - test -z "$with_xauth" && { AC_CHECK_HEADER(X11/Xauth.h, ,with_xauth=no) } - test -z "$with_xauth" && { AC_CHECK_LIB(Xau, XauGetAuthByAddr,[:],with_xauth=no) } - test -z "$with_xauth" && with_xauth=yes - if test "$with_xauth" = "yes"; then - AC_DEFINE(HAVE_XAUTH) - XE_SPACE(libs_xauth, $X_EXTRA_LIBS -lXau $libs_x $X_PRE_LIBS) - fi - AC_SUBST(libs_xauth) - - 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 tooltalk - if test "$with_tooltalk" != "no" ; then - dnl autodetect the location of tt_c.h - dnl tt_c.h might be in Tt or desktop include directories - for dir in "" "Tt/" "desktop/" ; do - AC_CHECK_HEADER(${dir}tt_c.h, tt_c_h_path="${dir}tt_c.h"; break) - done - if test -z "$tt_c_h_path"; then - if test "$with_tooltalk" = "yes"; then - USAGE_ERROR("Unable to find required tooltalk header files.") - fi - with_tooltalk=no - fi - fi - if test "$with_tooltalk" != "no" ; then - for extra_libs in "" "-lI18N -lce" "-lcxx"; do - AC_CHECK_LIB(tt, tt_message_create, - tt_libs="-ltt $extra_libs"; break, [:],$extra_libs) - done - if test -z "$tt_libs"; then - if test "$with_tooltalk" = "yes"; then - USAGE_ERROR("Unable to find required tooltalk libraries.") - fi - with_tooltalk=no - fi - fi - test -z "$with_tooltalk" && with_tooltalk=yes - if test "$with_tooltalk" = "yes"; then - AC_DEFINE(TOOLTALK) - AC_DEFINE_UNQUOTED(TT_C_H_PATH, "$tt_c_h_path") - XE_PREPEND($tt_libs, libs_x) - XE_ADD_OBJS(tooltalk.o) - fi - - dnl Autodetect CDE - test -z "$with_cde" && { AC_CHECK_HEADER(Dt/Dt.h, , with_cde=no) } - test -z "$with_cde" && { AC_CHECK_LIB(DtSvc, DtDndDragStart, [:], with_cde=no) } - test -z "$with_cde" && with_cde=yes - if test "$with_dragndrop" = no; then - AC_MSG_WARN([No CDE without generic Drag'n'Drop support]) - with_cde=no - fi - if test "$with_cde" = "yes" ; then - AC_DEFINE(HAVE_CDE) - XE_PREPEND(-lDtSvc, libs_x) - XE_APPEND(CDE, dragndrop_proto) - with_tooltalk=yes # CDE requires Tooltalk - need_motif=yes # CDE requires Motif - 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 - AC_MSG_WARN([No OffiX without real Xmu support]) - with_offix=no - fi - if test "$with_dragndrop" = no; then - AC_MSG_WARN([No OffiX without generic Drag'n'Drop support]) - with_offix=no - fi - if test "$with_cde" = yes; then - AC_MSG_WARN([CDE already found, disabling OffiX support]) - with_offix=no - fi - test -z "$with_offix" && with_offix=no - if test "$with_offix" = "yes"; then - AC_DEFINE(HAVE_OFFIX_DND) - XE_APPEND(offix.o, dnd_objs) - XE_APPEND(OffiX, dragndrop_proto) - fi - - dnl Autodetect Drag'n'Drop support - dnl always included if CDE, Offix, or MSWindows are defined - AC_MSG_CHECKING(if drag and drop API is needed) - if test "$with_dragndrop" != "no" ; then - if test -n "$dragndrop_proto" ; then - with_dragndrop=yes - AC_MSG_RESULT([yes (${dragndrop_proto} )]) - AC_DEFINE(HAVE_DRAGNDROP) - XE_APPEND(dragdrop.o, extra_objs) - else - with_dragndrop=no - AC_MSG_RESULT(no) - fi - fi - - dnl Autodetect LDAP - AC_CHECKING(for LDAP) - test -z "$with_ldap" && { AC_CHECK_HEADER(ldap.h, ,with_ldap=no) } - test -z "$with_ldap" && { AC_CHECK_HEADER(lber.h, ,with_ldap=no) } - if test "$with_ldap" != "no"; then - test -z "$with_umich_ldap" && { AC_CHECK_LIB(ldap, ldap_open, with_umich_ldap=yes, with_umich_ldap=no, -llber) } - test "$with_umich_ldap" = "no" && { AC_CHECK_LIB(ldap10, ldap_set_option, with_ns_ldap=yes, with_ns_ldap=no) } - test -z "$with_ldap" -a \( "$with_umich_ldap" = "yes" -o "$with_ns_ldap" = "yes" \) && with_ldap=yes - fi - if test "$with_ldap" = "yes"; then - AC_DEFINE(HAVE_LDAP) - XE_ADD_OBJS(eldap.o) - if test "$with_umich_ldap" = "yes" ; then - AC_DEFINE(HAVE_UMICH_LDAP) - XE_PREPEND(-llber, LIBS) - XE_PREPEND(-lldap, LIBS) - elif test "$with_ldap" = "yes" -a "$with_ns_ldap" = "yes" ; then - AC_DEFINE(HAVE_NS_LDAP) - XE_PREPEND(-lldap10, LIBS) - elif test "$with_ldap" = "yes" ; then - XE_PREPEND(-lldap, LIBS) - fi - fi - - dnl ---------------------- - dnl Graphics libraries - dnl ---------------------- - - if test "$window_system" != "none"; then - AC_CHECKING(for graphics libraries) - - dnl Autodetect Xpm - xpm_problem="" - if test -z "$with_xpm"; then - AC_MSG_CHECKING(for Xpm - no older than 3.4f) - xe_check_libs=-lXpm - AC_TRY_RUN([#include - int main(int c, char **v) { - return c == 1 ? 0 : - XpmIncludeVersion != XpmLibraryVersion() ? 1 : - XpmIncludeVersion < 30406 ? 2 : 0 ;}], - [./conftest dummy_arg; xpm_status=$?; - if test "$xpm_status" = "0"; then - with_xpm=yes; - else - with_xpm=no; - if test "$xpm_status" = "1"; then - xpm_problem="Xpm library version and header file version don't match!" - elif test "$xpm_status" = "2"; then - xpm_problem="Xpm library version is too old!" - else - xpm_problem="Internal xpm detection logic error!" - fi - echo " - *** WARNING *** $xpm_problem - I'm not touching that with a 10-foot pole! - If you really want to use the installed version of Xpm, rerun - configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!" - fi], - [with_xpm=no]) - xe_check_libs= - AC_MSG_RESULT($with_xpm) - fi - if test "$with_xpm" = "yes"; then - AC_DEFINE(HAVE_XPM) - XE_PREPEND(-lXpm, libs_x) - AC_MSG_CHECKING(for \"FOR_MSW\" xpm) - xe_check_libs=-lXpm - AC_TRY_LINK(, [XpmCreatePixmapFromData()], - [xpm_for_msw=no], - [xpm_for_msw=yes]) - xe_check_libs= - AC_MSG_RESULT($xpm_for_msw) - if test "$xpm_for_msw" = "yes"; then - AC_DEFINE(FOR_MSW) - fi - fi - - dnl Autodetect XFACE - test -z "$with_xface" && { AC_CHECK_HEADER(compface.h, ,with_xface=no) } - test -z "$with_xface" && { AC_CHECK_LIB(compface, UnGenFace,[:] ,with_xface=no) } - test -z "$with_xface" && with_xface=yes - if test "$with_xface" = "yes"; then - AC_DEFINE(HAVE_XFACE) - XE_PREPEND(-lcompface, libs_x) - fi - - dnl For a brief period we had the GIF code split out into a separate library, - dnl but patent problems, etc. sort of squashed that idea. - dnl We default to building with builtin GIF decoding - if test "$with_gif" != "no"; then - with_gif="yes" - AC_DEFINE(HAVE_GIF) - XE_ADD_OBJS(dgif_lib.o gif_io.o) - fi - - dnl Too many stupid linkers can't detect cascaded lib dependencies until runtime - dnl So we always search for libz compression support. - if test "$with_png $with_tiff" != "no no"; then - AC_CHECK_LIB(c, inflate, [:], [ - AC_CHECK_LIB(z, inflate, [XE_PREPEND(-lz, libs_x)],[ - AC_CHECK_LIB(gz, inflate, [XE_PREPEND(-lgz, libs_x)])])]) - fi - - dnl autodetect JPEG - test -z "$with_jpeg" && { AC_CHECK_HEADER(jpeglib.h, ,with_jpeg=no) } - test -z "$with_jpeg" && { AC_CHECK_LIB(jpeg, jpeg_destroy_decompress,[:],with_jpeg=no) } - test -z "$with_jpeg" && with_jpeg=yes - if test "$with_jpeg" = "yes"; then - AC_DEFINE(HAVE_JPEG) - XE_PREPEND(-ljpeg, libs_x) - fi - - dnl autodetect PNG - png_problem="" - test -z "$with_png" && { AC_CHECK_FUNC(pow, ,with_png=no) } - test -z "$with_png" && { AC_CHECK_HEADER(png.h, ,with_png=no) } - test -z "$with_png" && { AC_CHECK_LIB(png, png_read_image,[:],with_png=no) } - if test -z "$with_png"; then - AC_MSG_CHECKING(for workable png version information) - xe_check_libs="-lpng -lz" - AC_TRY_RUN([#include - int main(int c, char **v) { - if (c == 1) return 0; - if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1; - return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}], - [./conftest dummy_arg; png_status=$?; - if test "$png_status" = "0"; then - with_png=yes; - else - with_png=no; - if test "$png_status" = "1"; then - png_problem="PNG library version and header file don't match!" - elif test "$png_status" = "2"; then - png_problem="PNG library version too old (pre 1.0.2)!" - fi - echo " - *** WARNING *** $png_problem - I'm not touching that with a 10-foot pole! - If you really want to use the installed version of libPNG, rerun - configure and add '--with-png=yes', but don't blame me if XEmacs crashes!" - fi], - [with_png=no]) - xe_check_libs= - AC_MSG_RESULT($with_png) - fi - if test "$with_png" = "yes"; then - AC_DEFINE(HAVE_PNG) - XE_PREPEND(-lpng, libs_x) - fi - - dnl autodetect TIFF - test -z "$with_tiff" && { AC_CHECK_HEADER(tiffio.h, ,with_tiff=no) } - test -z "$with_tiff" && { AC_CHECK_LIB(tiff, TIFFClientOpen,[:],with_tiff=no) } - test -z "$with_tiff" && with_tiff=yes - if test "$with_tiff" = "yes"; then - AC_DEFINE(HAVE_TIFF) - XE_PREPEND(-ltiff, libs_x) - fi - fi - - dnl ---------------------- - dnl X-Specific Graphics libraries - dnl ---------------------- - - if test "$with_x11" = "yes"; then - - AC_CHECKING(for X11 graphics libraries) - - dnl Autodetect -lXaw - AC_CHECK_LIB(Xaw, XawScrollbarSetThumb, have_xaw=yes, have_xaw=no) - dnl if test "$have_xaw" = "yes"; then - dnl AC_CHECK_HEADER(X11/Xaw/Reports.h, [ - dnl XE_APPEND(pkg-src/tree-x, MAKE_SUBDIR) - dnl XE_APPEND(pkg-src/tree-x, INSTALL_ARCH_DEP_SUBDIR)]) - dnl fi - - dnl autodetect Motif - but only add to libs_x later (if necessary) - AC_CHECK_HEADER(Xm/Xm.h, - [AC_CHECK_LIB(Xm, XmStringFree, have_motif=yes, have_motif=no)], - have_motif=no) - - if test "$have_motif" = "yes"; then - dnl autodetect lesstif - AC_MSG_CHECKING(for Lesstif) - AC_EGREP_CPP(yes, - [#include - #ifdef LESSTIF_VERSION - yes - #endif - ], have_lesstif=yes, have_lesstif=no) - AC_MSG_RESULT($have_lesstif) - fi - - fi dnl "$with_x11" = "yes" - - dnl Finish ensuring that we have values for the various toolkit items. - dnl Not all toolkits support all widgets - dnl if Motif is available we use it for the dialog boxes. - - case "$with_menubars" in "" | "yes" | "athena" | "athena3d" ) - with_menubars="lucid" ;; - esac - case "$with_dialogs" in "" | "yes" | "lucid" ) - if test "$have_motif" = "yes"; then with_dialogs="motif" - elif test "$have_xaw" = "yes"; then with_dialogs="athena" - else with_dialogs=no - fi ;; - esac - case "$with_scrollbars" in "" | "yes" ) - with_scrollbars="lucid" ;; - esac - - all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars" - - case "$all_widgets" in *athena* ) - AC_DEFINE(LWLIB_USES_ATHENA) - AC_DEFINE(NEED_ATHENA) - XE_APPEND(lwlib-Xaw.o, lwlib_objs) - XE_PREPEND(-lXaw, libs_x) ;; - esac - - case "$all_widgets" in *motif* ) - AC_DEFINE(LWLIB_USES_MOTIF) - AC_DEFINE(NEED_MOTIF) - XE_APPEND(lwlib-Xm.o, lwlib_objs) - need_motif=yes ;; - esac - - test "$with_menubars" = "lucid" && XE_APPEND(xlwmenu.o, lwlib_objs) - test "$with_menubars" = "motif" && XE_APPEND(xlwmenu.o, lwlib_objs) - test "$with_scrollbars" = "lucid" && XE_APPEND(xlwscrollbar.o, lwlib_objs) - case "$all_widgets" in *lucid* ) - AC_DEFINE(NEED_LUCID) - XE_APPEND(lwlib-Xlw.o, lwlib_objs) ;; - esac - - AC_SUBST(lwlib_objs) - - case "$with_scrollbars" in athena* ) AC_DEFINE(LWLIB_SCROLLBARS_ATHENA);; esac - case "$with_dialogs" in athena* ) AC_DEFINE(LWLIB_DIALOGS_ATHENA) ;; esac - test "$with_scrollbars" = "athena3d" && AC_DEFINE(LWLIB_SCROLLBARS_ATHENA3D) - test "$with_dialogs" = "athena3d" && AC_DEFINE(LWLIB_DIALOGS_ATHENA3D) - - test "$with_menubars" != "no" && AC_DEFINE(HAVE_MENUBARS) - test "$with_scrollbars" != "no" && AC_DEFINE(HAVE_SCROLLBARS) - test "$with_dialogs" != "no" && AC_DEFINE(HAVE_DIALOGS) - test "$with_toolbars" != "no" && AC_DEFINE(HAVE_TOOLBARS) - - test "$with_menubars" = "lucid" && AC_DEFINE(LWLIB_MENUBARS_LUCID) - test "$with_scrollbars" = "lucid" && AC_DEFINE(LWLIB_SCROLLBARS_LUCID) - - test "$with_menubars" = "motif" && AC_DEFINE(LWLIB_MENUBARS_MOTIF) - test "$with_scrollbars" = "motif" && AC_DEFINE(LWLIB_SCROLLBARS_MOTIF) - test "$with_dialogs" = "motif" && AC_DEFINE(LWLIB_DIALOGS_MOTIF) - - test "$with_menubars" != "no" && XE_ADD_OBJS(menubar.o) - test "$with_scrollbars" != "no" && XE_ADD_OBJS(scrollbar.o) - test "$with_dialogs" != "no" && XE_ADD_OBJS(dialog.o) - test "$with_toolbars" != "no" && XE_ADD_OBJS(toolbar.o) - - if test "$with_x11" = "yes"; then - test "$with_menubars" != "no" && XE_ADD_OBJS(menubar-x.o) - test "$with_scrollbars" != "no" && XE_ADD_OBJS(scrollbar-x.o) - test "$with_dialogs" != "no" && XE_ADD_OBJS(dialog-x.o) - test "$with_toolbars" != "no" && XE_ADD_OBJS(toolbar-x.o) - test "$all_widgets" != "no no no no" && XE_ADD_OBJS(gui-x.o) - else - if test \( "$with_sound" = "nas" \) -o \( "$with_sound" = "both" \); then - echo "Attempt to Build NAS sound without X" - echo "Please remove NAS configuration or build with X" - exit 1 - fi - fi - - dnl ---------------------- - dnl Mule-dependent options - dnl ---------------------- - - test -z "$with_mule" && with_mule=no - test -z "$with_file_coding" && with_file_coding=no - - dnl if test "$with_mule" = "yes" && test ! -d "$srcdir/lisp/mule"; then - dnl echo "Attempt to Build with Mule without Mule/Lisp" - dnl echo "Please install the XEmacs/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) - XE_ADD_OBJS(file-coding.o) - fi - - if test "$with_mule" = "yes" ; then - AC_CHECKING(for Mule-related features) - AC_DEFINE(MULE) - AC_DEFINE(FILE_CODING) - XE_ADD_OBJS(mule.o mule-ccl.o mule-charset.o file-coding.o) - - dnl Use -lintl to get internationalized strerror for Mule - AC_CHECK_HEADERS(libintl.h) - AC_CHECK_LIB(intl, strerror) - - AC_CHECKING(for Mule input methods) - dnl Do we have the XmIm* routines? And if so, do we want to use them? - dnl XIM seems to be flaky except on Solaris... - dnl test -z "$with_xim" -a "$opsys" != "sol2" && with_xim=no - case "$with_xim" in "" | "yes" ) - AC_CHECKING(for XIM) - AC_CHECK_LIB(X11, XOpenIM, with_xim=xlib, with_xim=no) - dnl XIM + Lesstif is not (yet?) usable - if test "$have_motif $have_lesstif" = "yes no"; then - AC_CHECK_LIB(Xm, XmImMbLookupString, with_xim=motif) - fi ;; - esac - if test "$with_xim" != "no"; then - AC_DEFINE(HAVE_XIM) - if test "$with_xim" = "xlib"; then - AC_DEFINE(XIM_XLIB) - XE_ADD_OBJS(input-method-xlib.o) - fi - if test "$with_xim" = "motif"; then - AC_DEFINE(XIM_MOTIF) - need_motif=yes - XE_ADD_OBJS(input-method-motif.o) - fi - if test "$with_xim" = "motif"; then - with_xfs=no - fi - fi - - dnl "with_xfs" = "yes" - if test "$with_xfs" = "yes" ; then - AC_CHECKING(for XFontSet) - AC_CHECK_LIB(X11, XmbDrawString, [:], with_xfs=no) - if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then - AC_DEFINE(USE_XFONTSET) - if test "$with_xim" = "no" ; then - XE_ADD_OBJS(input-method-xfs.o) - fi - fi - fi dnl with_xfs - - dnl Autodetect WNN - test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support - test -z "$with_wnn" && { AC_CHECK_HEADER(wnn/jllib.h, ,with_wnn=no) } - dnl Detour to find crypt - if test "$with_wnn" != "no"; then - AC_CHECK_FUNCS(crypt) - test "$ac_cv_func_crypt" != "yes" && { AC_CHECK_LIB(crypt, crypt) } - fi - dnl Back to our regularly scheduled wnn hunting - if test -z "$with_wnn" -o "$with_wnn" = "yes"; then - AC_CHECK_LIB(wnn,jl_dic_list_e,libwnn=wnn, - AC_CHECK_LIB(wnn4,jl_dic_list_e,libwnn=wnn4, - AC_CHECK_LIB(wnn6,jl_dic_list_e,libwnn=wnn6, - AC_CHECK_LIB(wnn6_fromsrc,dic_list_e,libwnn=wnn6_fromsrc,with_wnn=no)))) - fi - test -z "$with_wnn" && with_wnn=yes - if test "$with_wnn" = "yes"; then - AC_DEFINE(HAVE_WNN) - XE_PREPEND(-l$libwnn, libs_x) - XE_ADD_OBJS(mule-wnnfns.o) - if test "$with_wnn6" != "no"; then - AC_CHECK_LIB($libwnn, jl_fi_dic_list, with_wnn6=yes) - test "$with_wnn6" = "yes" && AC_DEFINE(WNN6) - fi - fi - - dnl Autodetect canna - canna_includes_found=no - if test "$with_canna" != "no"; then - AC_CHECK_HEADER(canna/jrkanji.h,canna_includes_found=yes) - fi - if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \ - -d "/usr/local/canna/include"; then - save_c_switch_site="$c_switch_site" - c_switch_site="$c_switch_site -I/usr/local/canna/include" - AC_CHECK_HEADER(canna/jrkanji.h,canna_includes_found=yes) - if test "$canna_includes_found" != "yes"; then - c_switch_site="$save_c_switch_site" - with_canna="no" - fi - fi - - test -z "$with_canna" && { AC_CHECK_HEADER(canna/RK.h, , with_canna=no) } - test -z "$with_canna" && { AC_CHECK_LIB(RKC, RkBgnBun, [:],with_canna=no) } - test -z "$with_canna" && { AC_CHECK_LIB(canna,jrKanjiControl,[:],with_canna=no) } - test -z "$with_canna" && with_canna=yes - if test "$with_canna" = "yes"; then - AC_DEFINE(HAVE_CANNA) - XE_PREPEND(-lcanna -lRKC, libs_x) - XE_ADD_OBJS(mule-canna.o) - fi - - 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 - - - dnl At this point, we know whether we need the motif lib or not. - if test "$need_motif" = "yes" ; then - XE_PREPEND(-lXm, libs_x) - dnl AIX needs the following library for use with Motif - AC_CHECK_LIB(i18n, layout_object_getvalue, [XE_PREPEND(-li18n, libs_x)]) - XE_COMPUTE_RUNPATH() - fi - - AC_CHECK_FUNCS(cbrt closedir dup2 eaccess fmod fpathconf frexp ftime gethostname getpagesize gettimeofday getcwd getwd logb lrand48 matherr mkdir mktime perror poll random rename res_init rint rmdir select setitimer setpgid setlocale setsid sigblock sighold sigprocmask snprintf strcasecmp strerror tzset ulimit usleep utimes waitpid vsnprintf) - - dnl realpath is buggy on linux, decosf and aix4 - - dnl The realpath() in linux libc (4.6.27) sometimes fails with ELOOP. - dnl The realpath in ELF linux libc's is O.K. - dnl For example, call realpath on a file thirty-five or so directories deep - dnl and you get ELOOP even if no symlinks at all are involved. - dnl Reports as of 11/1997 indicate BSDi has problems too. - dnl The realpath() in UnixWare2.1.3 could not get any pathname fragment in error condition. - case "$opsys" in - linuxaout* | bsdos3* | freebsd* | decosf4-0* | aix4* ) XE_ADD_OBJS(realpath.o) ;; - * ) - case "$canonical" in - *-*-sysv4.2uw2* ) XE_ADD_OBJS(realpath.o) ;; - * ) AC_CHECK_FUNCS(realpath) - test "$ac_cv_func_realpath" != "yes" && XE_ADD_OBJS(realpath.o) ;; - esac ;; - esac - - dnl Check whether the system provides getloadavg (Solaris 7 has it) - AC_CHECK_FUNCS(getloadavg) - - if test "$ac_cv_func_getloadavg" != "yes" - then - XE_ADD_OBJS(getloadavg.o) - - dnl Used by getloadavg() - does not require root priveleges - AC_CHECK_LIB(kstat, kstat_open) - - 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_TRY_LINK([#include ], - [return h_errno;], - [AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_H_ERRNO)], - [AC_MSG_RESULT(no)]) - - AC_MSG_CHECKING(for sigsetjmp) - AC_TRY_COMPILE([#include ], - [sigjmp_buf bar; sigsetjmp (bar, 0);], - [AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_SIGSETJMP)], - [AC_MSG_RESULT(no)]) - - AC_MSG_CHECKING(whether localtime caches TZ) - AC_CACHE_VAL(emacs_cv_localtime_cache, - [if test "$ac_cv_func_tzset" = "yes"; then - AC_TRY_RUN([#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) - fi - - if test "$HAVE_TIMEVAL" = "yes"; then - AC_MSG_CHECKING(whether gettimeofday accepts one or two arguments) - AC_TRY_LINK([ - #ifdef TIME_WITH_SYS_TIME - #include - #include - #else - #ifdef HAVE_SYS_TIME_H - #include - #else - #include - #endif - #endif - ], - [ - struct timeval time; - struct timezone dummy; - gettimeofday (&time, &dummy); - ], - [AC_MSG_RESULT(two)], - [AC_MSG_RESULT(one) - AC_DEFINE(GETTIMEOFDAY_ONE_ARGUMENT)]) - fi - - - AC_C_INLINE - if test "$ac_cv_c_inline" != "no"; then - AC_DEFINE(HAVE_INLINE) - test "$GCC" = "yes" && XE_ADD_OBJS(inline.o) - fi - - 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 - - AC_FUNC_ALLOCA - test -n "$ALLOCA" && XE_ADD_OBJS($ALLOCA) - - dnl Check whether vfork exists and works correctly. (This does more - dnl than just check for its existence.) If so, it defines HAVE_VFORK_H. - dnl If not, it defines vfork to be fork. - AC_FUNC_VFORK - - 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_TRY_RUN([#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) ;; - esac - AC_MSG_RESULT($have_mmap) - test "$have_mmap" = "yes" && AC_DEFINE(HAVE_MMAP) - AC_FUNC_MMAP - - 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" && rel_alloc=no - test "$rel_alloc" = "default" -a "$have_mmap" = "yes" && rel_alloc=yes - test "$rel_alloc" = "yes" && AC_DEFINE(REL_ALLOC) - - dnl Check for terminal 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) - AC_DEFINE(SIGNALS_VIA_CHARACTERS) - AC_DEFINE(NO_TERMIO), - [AC_CHECK_HEADER(termio.h, [AC_DEFINE(HAVE_TERMIO)])]) - - - dnl Check for Internet sockets. - AC_CHECK_FUNC(socket, - [AC_CHECK_HEADER(netinet/in.h, - [AC_CHECK_HEADER(arpa/inet.h, [ - AC_DEFINE(HAVE_SOCKETS) - AC_MSG_CHECKING("for sun_len member in struct sockaddr_un") - AC_TRY_LINK([ - #include - #include - #include - ], - [static struct sockaddr_un x; x.sun_len = 1;], - [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SOCKADDR_SUN_LEN)], - [AC_MSG_RESULT(no)]) - AC_MSG_CHECKING("for ip_mreq struct in netinet/in.h") - AC_TRY_LINK([ - #include - #include - ], - [static struct ip_mreq x;], - [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_MULTICAST)], - [AC_MSG_RESULT(no)])])])]) - - dnl Check for SYS V IPC. (Inferior to sockets.) - AC_CHECK_FUNC(msgget, - [AC_CHECK_HEADER(sys/ipc.h, - [AC_CHECK_HEADER(sys/msg.h, - [AC_DEFINE(HAVE_SYSVIPC)])])]) - - dnl Check for directory variants - AC_CHECK_HEADER(dirent.h, [AC_DEFINE(SYSV_SYSTEM_DIR)], - [AC_CHECK_HEADER(sys/dir.h, , [AC_DEFINE(NONSYSTEM_DIR_LIBRARY)])]) - - dnl Check for nlist.h - AC_CHECK_HEADER(nlist.h, AC_DEFINE(NLIST_STRUCT), ) - - dnl Check for sound of various sorts. - - dnl Autodetect native sound - AC_CHECKING("for sound support") - case "$with_sound" in - native | both ) with_native_sound=yes;; - nas | no ) with_native_sound=no;; - esac - test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes - - if test "$with_native_sound" != "no"; then - dnl Maybe sound is already on include path... - if test -n "$native_sound_lib"; then - AC_CHECK_HEADER(multimedia/audio_device.h, - [sound_found=yes sound_cflags="" - XE_ADD_OBJS(sunplay.o)]) - fi - - dnl Autodetect Sun native sound from SUNWaudmo package - if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then - sound_found=yes - XE_ADD_OBJS(sunplay.o) - if test -d "/usr/demo/SOUND/include" - then sound_cflags="-I/usr/demo/SOUND/include" - else sound_cflags="-I/usr/demo/SOUND" - fi - if test -z "$native_sound_lib" ; then - if test -r "/usr/demo/SOUND/lib/libaudio.a" - then native_sound_lib="/usr/demo/SOUND/lib/libaudio.a" - else native_sound_lib="/usr/demo/SOUND/libaudio.a" - fi - fi - fi - - dnl Check for SGI and HP native sound libs - if test -z "$sound_found"; then - case "$canonical" in - *-sgi-* ) - if test -z "$native_sound_lib"; then - AC_CHECK_LIB(audio, ALopenport, native_sound_lib="-laudio") - fi - if test -n "$native_sound_lib"; then - sound_found=yes sound_cflags="" - XE_ADD_OBJS(sgiplay.o) - fi ;; - hppa*-hp-hpux* ) - if test -z "$native_sound_lib"; then - AC_CHECK_LIB(Alib, AOpenAudio, native_sound_lib="-lAlib") - fi - if test -n "$native_sound_lib"; then - sound_found=yes - XE_ADD_OBJS(hpplay.o) - if test "$GCC" = "yes" # Kludge city - then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples" - else sound_cflags="+e -I/usr/audio/examples" - fi - fi ;; - esac - fi - - dnl Check for Linux/BSD native sound - if test -z "$sound_found"; then - for dir in "machine" "sys" "linux"; do - AC_CHECK_HEADER(${dir}/soundcard.h, - sound_found=yes - XE_ADD_OBJS(linuxplay.o) - [AC_DEFINE_UNQUOTED(SOUNDCARD_H_PATH, "${dir}/soundcard.h")] - break) - done - fi - - test "$sound_found" = "yes" && with_native_sound=yes - fi - - if test -z "$with_sound"; then - if test "$with_native_sound" = "yes" -o -n "$native_sound_lib"; then - with_sound=native - fi - fi - - if test "$with_native_sound" = "yes"; then - AC_DEFINE(HAVE_NATIVE_SOUND) - test -n "$native_sound_lib" && XE_PREPEND($native_sound_lib, LIBS) - fi - - case "$with_sound" in both | nas ) - AC_DEFINE(HAVE_NAS_SOUND) - XE_ADD_OBJS(nas.o) - XE_PREPEND(-laudio, libs_x) - dnl If the nas library does not contain the error jump point, - dnl then we force safer behavior. - AC_EGREP_HEADER(AuXtErrorJump,audio/Xtutil.h,,[AC_DEFINE(NAS_NO_ERROR_JUMP)]) - esac - - dnl --------------------- - dnl TTY-dependent options - dnl --------------------- - - test -z "$with_tty" && with_tty=yes - - if test "$with_tty" = "yes" ; then - AC_CHECKING(for TTY-related features) - AC_DEFINE(HAVE_TTY) - XE_ADD_OBJS(console-tty.o device-tty.o event-tty.o frame-tty.o objects-tty.o redisplay-tty.o cm.o) - - dnl Autodetect ncurses. - if test -z "$with_ncurses"; then - AC_CHECK_LIB(ncurses, tgetent, with_ncurses=yes, with_ncurses=no) - fi - if test "$with_ncurses" = "yes"; then - AC_DEFINE(HAVE_NCURSES) - AC_CHECK_HEADER(ncurses/curses.h, curses_h_path=ncurses/curses.h) - AC_CHECK_HEADER(ncurses/term.h, term_h_path=ncurses/term.h) - XE_ADD_OBJS(terminfo.o) - XE_PREPEND(-lncurses, LIBS) - - if test "$ac_cv_header_ncurses_curses_h" != "yes" ; 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/curses.h, curses_h_path=ncurses/curses.h) - if test "$ac_cv_header_ncurses_curses_h" = "yes" - then AC_MSG_WARN("Your system has the bogus ncurses include bug.") - else c_switch_site="$save_c_switch_site" - fi - fi - else dnl "$with_ncurses" = "no" - dnl Autodetect terminfo/-lcurses/-ltermlib/-ltermcap - if test "$have_terminfo" = "yes"; then - XE_ADD_OBJS(terminfo.o) - if test -n "$libs_termcap"; then - XE_PREPEND($libs_termcap, LIBS) - else - for lib in curses termlib termcap; do - AC_CHECK_LIB($lib, tgetent, XE_PREPEND(-l${lib}, LIBS); break) - done - fi - else dnl "$have_terminfo" = "no" && "with_ncurses" = "no" - XE_ADD_OBJS(tparam.o) - dnl The HP-UX curses library seems to have a badly broken version of select(2) - dnl that makes "poll: interrupted system call" messages to appear and - dnl Emacs suprocesses to hang (e.g. TeX compilation w/ AUCTeX) */ - case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac - if test -n "$libs_termcap"; then - XE_PREPEND($libs_termcap, LIBS) - else - AC_CHECK_LIB(curses, tgetent, XE_PREPEND(-lcurses, LIBS), - AC_CHECK_LIB(termcap, tgetent, XE_PREPEND(-ltermcap, LIBS), - XE_ADD_OBJS(termcap.o))) - fi - fi - fi - AC_DEFINE_UNQUOTED(CURSES_H_PATH, "${curses_h_path-curses.h}") - AC_DEFINE_UNQUOTED(TERM_H_PATH, "${term_h_path-term.h}") - - dnl Autodetect gpm - test -z "$with_gpm" && { AC_CHECK_HEADER(gpm.h, , with_gpm=no) } - test -z "$with_gpm" && { AC_CHECK_LIB(gpm, Gpm_Open, with_gpm=yes, with_gpm=no) } - if test "$with_gpm" = "yes"; then - AC_DEFINE(HAVE_GPM) - XE_ADD_OBJS(gpmevent.o) - XE_PREPEND(-lgpm, LIBS) - fi - - else dnl "$with_tty" = "no" - for feature in ncurses 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}=no" - done - fi dnl with_tty - - dnl Do we need event-unixoid.o ? - test "$with_x11" = "yes" -o "$with_tty" = "yes" && XE_ADD_OBJS(event-unixoid.o) - - 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. - - test "$with_database_gnudbm $with_database_dbm $with_database_berkdb" \ - != "no no no" && AC_CHECKING(for database support) - - dnl Check for ndbm.h, required for either kind of DBM support. - if test "$with_database_gnudbm $with_database_dbm" != "no no"; then - AC_CHECK_HEADER(ndbm.h, [:], [ - test "$with_database_gnudbm" = "yes" -o \ - "$with_database_dbm" = "yes" && \ - XE_DIE("Required DBM support cannot be provided.") - with_database_gnudbm=no with_database_dbm=no]) - fi - - dnl Check for DBM support in libgdbm. - if test "$with_database_gnudbm" != "no"; then - AC_CHECK_LIB(gdbm, dbm_open, [ - with_database_gnudbm=yes with_database_dbm=no libdbm=-lgdbm], [ - if test "$with_database_gnudbm" = "yes"; then - XE_DIE("Required GNU DBM support cannot be provided.") - fi - with_database_gnudbm=no]) - fi - - dnl Check for DBM support in libc and libdbm. - if test "$with_database_dbm" != "no"; then - AC_CHECK_FUNC(dbm_open, [with_database_dbm=yes libdbm=], [ - AC_CHECK_LIB(dbm, dbm_open, [with_database_dbm=yes libdbm=-ldbm], [ - test "$with_database_dbm" = "yes" && \ - XE_DIE("Required DBM support cannot be provided.") - with_database_dbm=no])]) - fi - - dnl Tell make about the DBM support we detected. - test -n "$libdbm" && XE_PREPEND("$libdbm", LIBS) - test "$with_database_gnudbm" = "yes" -o \ - "$with_database_dbm" = "yes" && \ - AC_DEFINE(HAVE_DBM) - - dnl Check for Berkeley DB. - if test "$with_database_berkdb" != "no"; then - AC_MSG_CHECKING(for Berkeley db.h) - for path in "db/db.h" "db.h"; do - AC_TRY_COMPILE([#ifdef HAVE_INTTYPES_H - #define __BIT_TYPES_DEFINED__ - #include - typedef uint8_t u_int8_t; - typedef uint16_t u_int16_t; - typedef uint32_t u_int32_t; - #ifdef WE_DONT_NEED_QUADS - typedef uint64_t u_int64_t; - #endif - #endif - #include <$path> - ],[], db_h_path="$path"; break) - done - if test -z "$db_h_path" - then AC_MSG_RESULT(no); with_database_berkdb=no - else AC_MSG_RESULT($db_h_path) - fi - - if test "$with_database_berkdb" != "no"; then - AC_MSG_CHECKING(for Berkeley DB version) - AC_EGREP_CPP(yes, - [#include <$db_h_path> - #if DB_VERSION_MAJOR > 1 - yes - #endif - ], [AC_MSG_RESULT(2); dbfunc=db_open], [AC_MSG_RESULT(1); dbfunc=dbopen]) - AC_CHECK_FUNC($dbfunc, with_database_berkdb=yes need_libdb=no, [ - AC_CHECK_LIB(db, $dbfunc, with_database_berkdb=yes need_libdb=yes)]) - fi - - if test "$with_database_berkdb" = "yes"; then - AC_DEFINE_UNQUOTED(DB_H_PATH, "$db_h_path") - AC_DEFINE(HAVE_BERKELEY_DB) - test "$need_libdb" = "yes" && XE_PREPEND(-ldb, LIBS) - else with_database_berkdb=no - fi - fi - - if test "$with_database_gnudbm $with_database_dbm $with_database_berkdb" \ - != "no no no"; then - AC_DEFINE(HAVE_DATABASE) - XE_ADD_OBJS(database.o) - 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) - fi - - dnl Usage tracking (undocumented and likely unused option) - if test "$usage_tracking" = "yes"; then - AC_DEFINE(USAGE_TRACKING) - XE_PREPEND(-Bstatic -lut -Bdynamic, LIBS) - fi - - dnl autodetect dll support - AC_CHECK_HEADERS(dlfcn.h, [have_dlfcn=yes - AC_DEFINE(HAVE_DLFCN_H)]) - test -z "$with_shlib" && test ! -z "$have_dlfcn" && { AC_CHECK_LIB(dl, dlopen, [ AC_DEFINE(HAVE_DLOPEN) DLL_LIB=dl; with_shlib=yes]) } - test -z "$with_shlib" && test ! -z "$have_dlfcn" && { AC_CHECK_LIB(c, _dlopen, [ AC_DEFINE(HAVE_DLOPEN) DLL_LIB=; with_shlib=yes]) } - test -z "$with_shlib" && test ! -z "$have_dlfcn" && { AC_CHECK_LIB(c, dlopen, [ AC_DEFINE(HAVE_DLOPEN) DLL_LIB=; with_shlib=yes]) } - test -z "$with_shlib" && { AC_CHECK_LIB(dld, shl_load, [ AC_DEFINE(HAVE_SHL_LOAD) DLL_LIB=dld; with_shlib=yes]) } - test -z "$with_shlib" && { AC_CHECK_LIB(dld, dld_init, [ AC_DEFINE(HAVE_DLD_INIT) DLL_LIB=dld; with_shlib=yes]) } - if test "$with_shlib" = "yes"; then - XE_SHLIB_STUFF - if test "$can_build_shared" = "yes"; then - AC_DEFINE(HAVE_SHLIB) - XE_ADD_OBJS(sysdll.o) - XE_ADD_OBJS(emodules.o) - XE_APPEND(src, INSTALL_ARCH_DEP_SUBDIR) - test ! -z "$DLL_LIB" && XE_PREPEND(-l${DLL_LIB}, LIBS) - AC_CHECK_FUNCS(dlerror _dlerror) - else - AC_MSG_WARN(disabling shared library support) - with_shlib=no - fi - 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_TRY_RUN will - dnl have reported incorrect results. - AC_TRY_RUN([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 --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]) - - dnl Process support - if test "$win32_processes" = "yes"; then - XE_ADD_OBJS(process-nt.o) - else - AC_DEFINE(HAVE_UNIX_PROCESSES) - XE_ADD_OBJS(process-unix.o) - fi - - dnl -------------------------------- - dnl Compute SUBST-itutable variables - dnl -------------------------------- - - dnl We ignore (C|LD)_SWITCH_X_(MACHINE|SYSTEM) - dnl Use XE_SPACE instead of plain assignment statements to remove extraneous blanks - XE_SPACE(CFLAGS, $CFLAGS) - XE_SPACE(extra_objs, $extra_objs) - XE_SPACE(c_switch_general, -DHAVE_CONFIG_H $c_switch_site $c_switch_machine $c_switch_system) - XE_SPACE(c_switch_window_system, $c_switch_x_site $X_CFLAGS) - XE_SPACE(c_switch_all, $c_switch_general $c_switch_window_system) - XE_SPACE(ld_switch_general, $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_run) - XE_SPACE(ld_switch_window_system, $ld_switch_x_site) - XE_SPACE(ld_switch_all, $ld_switch_general $ld_switch_window_system) - XE_SPACE(ld_libs_general, $LIBS $libs_machine $libs_system $libs_standard) - XE_SPACE(ld_libs_window_system, $X_EXTRA_LIBS $libs_x $X_PRE_LIBS) - XE_SPACE(ld_libs_all, $ld_libs_window_system $ld_libs_general) - - dnl Compute lists of Makefiles and subdirs - AC_SUBST(SRC_SUBDIR_DEPS) - XE_APPEND(src, MAKE_SUBDIR) - 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 - XE_SPACE(SUBDIR_MAKEFILES, $SUBDIR_MAKEFILES $dir/Makefile $dir/GNUmakefile) - XE_SPACE(internal_makefile_list, $internal_makefile_list $dir/Makefile.in) - done - AC_SUBST(INSTALL_ARCH_DEP_SUBDIR) - AC_SUBST(MAKE_SUBDIR) - AC_SUBST(SUBDIR_MAKEFILES) - - dnl Make s&m symlinks in the src directory, for config.h - for dir in src/s src/m; do - if test ! -d "$dir" ; then - echo Making symbolic link to "$srcdir/$dir" - ${LN_S} "$srcdir/$dir" "$dir" - fi - done - - if test "$extra_verbose" = "yes"; then - echo "" - PRINT_VAR(extra_objs - c_switch_general c_switch_window_system c_switch_all - ld_switch_general ld_switch_window_system ld_switch_all - ld_libs_general ld_libs_window_system ld_libs_all) - echo "" - fi - - dnl Create some auxiliary files - if test -f $srcdir/src/gdbinit -a ! -f src/gdbinit ; then - echo "creating src/gdbinit"; echo "" - echo "source $srcdir/src/gdbinit" > src/gdbinit - fi - - dnl Create top level .sbinit for Sun compilers - if test "$__SUNPRO_C" = "yes"; then - echo "creating .sbinit"; echo "" - ( 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 - - dnl There are no more compile tests; remove the core they created. - rm -f core - - dnl ---------------------------------------------- - dnl Substitute into Makefile, config.h and paths.h - dnl ---------------------------------------------- - - dnl what sort of things to edit into Makefile, config.h and paths.h - dnl configuration here uncanonicalized to avoid exceeding size limits. - - AC_SUBST(PROGNAME) - AC_SUBST(version) - AC_SUBST(configuration) - AC_SUBST(canonical) - AC_SUBST(srcdir) - AC_SUBST(bindir) - AC_SUBST(datadir) - AC_SUBST(pkgdir) - AC_SUBST(statedir) - AC_SUBST(libdir) - AC_SUBST(mandir) - - AC_SUBST(prefix) - 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) - 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) - AC_SUBST(INFOPATH_USER_DEFINED) - INFOPATH=$infopath - while true; do - case "$INFOPATH" in - *\$* ) eval "INFOPATH=$INFOPATH" ;; - *) break ;; - esac - done - AC_SUBST(INFOPATH) - - AC_SUBST(package_path) - AC_SUBST(PACKAGE_PATH_USER_DEFINED) - PACKAGE_PATH=$package_path - while true; do - case "$PACKAGE_PATH" in - *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;; - *) break ;; - esac - done - AC_SUBST(PACKAGE_PATH) - - AC_SUBST(lispdir) - AC_SUBST(LISPDIR_USER_DEFINED) - LISPDIR=$lispdir - while true; do - case "$LISPDIR" in - *\$* ) eval "LISPDIR=$LISPDIR" ;; - *) break ;; - esac - done - AC_SUBST(LISPDIR) - - AC_SUBST(moduledir) - AC_SUBST(MODULEDIR_USER_DEFINED) - MODULEDIR=$moduledir - while true; do - case "$MODULEDIR" in - *\$* ) eval "MODULEDIR=$MODULEDIR" ;; - *) break ;; - esac - done - AC_SUBST(MODULEDIR) - - AC_SUBST(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) - AC_SUBST(SITEMODULEDIR_USER_DEFINED) - SITEMODULEDIR=$sitemoduledir - while true; do - case "$SITEMODULEDIR" in - *\$* ) eval "SITEMODULEDIR=$SITEMODULEDIR" ;; - *) break ;; - esac - done - AC_SUBST(SITEMODULEDIR) - - AC_SUBST(etcdir) - AC_SUBST(ETCDIR_USER_DEFINED) - ETCDIR=$etcdir - while true; do - case "$ETCDIR" in - *\$* ) eval "ETCDIR=$ETCDIR" ;; - *) break ;; - esac - done - AC_SUBST(ETCDIR) - - AC_SUBST(lockdir) - AC_SUBST(LOCKDIR_USER_DEFINED) - LOCKDIR=$lockdir - while true; do - case "$LOCKDIR" in - *\$* ) eval "LOCKDIR=$LOCKDIR" ;; - *) break ;; - esac - done - AC_SUBST(LOCKDIR) - - AC_SUBST(archlibdir) - AC_SUBST(ARCHLIBDIR_USER_DEFINED) - ARCHLIBDIR=$archlibdir - while true; do - case "$ARCHLIBDIR" in - *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;; - *) break ;; - esac - done - AC_SUBST(ARCHLIBDIR) - - AC_SUBST(docdir) - AC_SUBST(bitmapdir) - AC_SUBST(extra_objs) - - 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="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'" - AC_SUBST(RECURSIVE_MAKE) - - AC_SUBST(native_sound_lib) - AC_SUBST(sound_cflags) - AC_SUBST(RANLIB) - AC_SUBST(dynodump_arch) - - dnl Preliminary support for using a different compiler for xemacs itself. - dnl Useful for building XEmacs with a C++ or 64-bit compiler. - : ${XEMACS_CC:=$CC} - AC_SUBST(XEMACS_CC) - - - dnl The default is no - if test "$with_site_lisp" = "no"; then - AC_DEFINE(INHIBIT_SITE_LISP) - fi - dnl The default is yes - if test "$with_site_modules" = "no"; then - AC_DEFINE(INHIBIT_SITE_MODULES) - fi - - XE_SPACE(ac_configure_args, $ac_configure_args) - AC_DEFINE_UNQUOTED(EMACS_CONFIGURATION, "$canonical") - AC_DEFINE_UNQUOTED(EMACS_CONFIG_OPTIONS, "$ac_configure_args") - AC_DEFINE_UNQUOTED(config_machfile, "$machfile") - AC_DEFINE_UNQUOTED(config_opsysfile, "$opsysfile") - - dnl Following are deprecated - - null_string="" - AC_DEFINE_UNQUOTED(LD_SWITCH_X_SITE, $null_string) - AC_DEFINE_UNQUOTED(LD_SWITCH_X_SITE_AUX, $null_string) - AC_DEFINE_UNQUOTED(C_SWITCH_X_SITE, $null_string) - AC_DEFINE_UNQUOTED(LD_SWITCH_SITE, $null_string) - AC_DEFINE_UNQUOTED(C_SWITCH_SITE, $null_string) - - 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) - elif test "$with_system_malloc" = "yes"; then AC_DEFINE(USE_SYSTEM_MALLOC) - elif test "$with_debug_malloc" = "yes"; then AC_DEFINE(USE_DEBUG_MALLOC) - AC_DEFINE(USE_SYSTEM_MALLOC) - fi - test "$with_i18n3" = "yes" && AC_DEFINE(I18N3) - test "$GCC" = "yes" && AC_DEFINE(USE_GCC) - test "$external_widget" = "yes" && AC_DEFINE(EXTERNAL_WIDGET) - test "$no_doc_file" = "yes" && AC_DEFINE(NO_DOC_FILE) - dnl test "$const_is_losing" = "yes" && AC_DEFINE(CONST_IS_LOSING) - test "$with_purify" = "yes" && AC_DEFINE(PURIFY) - test "$with_quantify" = "yes" && AC_DEFINE(QUANTIFY) - test "$with_pop" = "yes" && AC_DEFINE(MAIL_USE_POP) - test "$with_kerberos" = "yes" && AC_DEFINE(KERBEROS) - test "$with_hesiod" = "yes" && AC_DEFINE(HESIOD) - test "$use_union_type" = "yes" && AC_DEFINE(USE_UNION_TYPE) - - dnl ------------------------------- - dnl Report on what we decided to do - dnl ------------------------------- - - ( - 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 $quoted_arguments" - ) > Installation - - xemacs_betaname="" - test ! -z "${emacs_beta_version}" && xemacs_betaname="-b${emacs_beta_version}" - - dnl Start stdout redirection to '| tee -a Installation' - ( - echo " - - XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'. - - Where should the build process find the source code? $srcdir - What installation prefix should install use? $prefix - What operating system and machine description files should XEmacs use? - \`$opsysfile' and \`$machfile' - What compiler should XEmacs be built with? $CC $CFLAGS - Should XEmacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason} - Should XEmacs use the relocating allocator for buffers? $rel_alloc - What window system should XEmacs use? ${window_system}" - if test "$with_x11" = "yes"; then - echo " Where do we find X Windows header files? $x_includes" - echo " Where do we find X Windows libraries? $x_libraries" - fi - if test -n "$site_includes"; then - echo " Additional header files: $site_includes" - fi - if test -n "$site_libraries"; then - echo " Additional libraries: $site_libraries" - fi - if test -n "$site_prefixes"; then - echo " Additional prefixes: $site_prefixes" - fi - if test -n "$runpath"; then - echo " Runtime library search path: $runpath" - fi - test "$with_dnet" = yes && echo " Compiling in support for DNET." - test "$with_socks" = yes && echo " Compiling in support for SOCKS." - test "$with_xauth" = yes && echo " Compiling in support for XAUTH." - if test "$with_xmu" != yes -a "$with_x11" = yes; then - echo " No Xmu; substituting equivalent routines." - fi - - if test "$with_xpm" = yes; then - echo " Compiling in support for XPM images." - elif test "$with_x11" = yes; then - echo " --------------------------------------------------------------------" - echo " WARNING: Compiling without XPM support." - if test "$xpm_problem" != ""; then - echo " Reason: $xpm_problem" - fi - echo " WARNING: You should strongly consider installing XPM." - echo " WARNING: Otherwise toolbars and other graphics will look suboptimal." - echo " WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)" - echo " --------------------------------------------------------------------" - fi - if test "$with_png" = yes; then - echo " Compiling in support for PNG image handling." - elif test "$window_system" != "none"; then - echo " --------------------------------------------------------------------" - echo " WARNING: Compiling without PNG image support." - if test "$png_problem" != ""; then - echo " Reason: $png_problem" - fi - echo " WARNING: You should strongly consider installing the PNG libraries." - echo " WARNING: Otherwise certain images and glyphs may not display." - echo " WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)" - echo " --------------------------------------------------------------------" - fi - test "$with_gif" = yes && echo " Compiling in support for (builtin) GIF image handling." - test "$with_jpeg" = yes && echo " Compiling in support for JPEG image handling." - test "$with_tiff" = yes && echo " Compiling in support for TIFF image handling." - test "$with_xface" = yes && echo " Compiling in support for X-Face message headers." - case "$with_sound" in - nas ) echo " Compiling in network sound (NAS) support." ;; - native ) echo " Compiling in native sound support." ;; - both ) echo " Compiling in both network and native sound support." ;; - esac - test "$old_nas" = yes && echo " nas library lacks error trapping, will play synchronously." - - test "$with_database_berkdb" = yes && echo " Compiling in support for Berkeley DB." - test "$with_database_dbm" = yes && echo " Compiling in support for DBM." - test "$with_database_gnudbm" = yes && echo " Compiling in support for GNU DBM." - - test "$with_umich_ldap" = yes && echo " Compiling in support for LDAP (UMich libs)." - test "$with_ns_ldap" = yes && echo " Compiling in support for LDAP (Netscape SDK)." - test "$with_ldap" = yes -a "$with_umich_ldap" = no -a "$with_ns_ldap" = no && echo " Compiling in support for LDAP (Generic)." - - test "$with_ncurses" = yes && echo " Compiling in support for ncurses." - test "$with_gpm" = yes && echo " Compiling in support for GPM (General Purpose Mouse)." - - test "$with_mule" = yes && echo " Compiling in Mule (multi-lingual) support." - test "$with_file_coding" = yes && echo " Compiling in File coding support." - test "$with_xim" != no && echo " Compiling in XIM (X11R5+ I18N input method) support." - test "$with_xim" = motif && echo " Using Motif to provide XIM support." - test "$with_xim" = xlib && echo " Using raw Xlib to provide XIM support." - test "$with_xfs" = yes && echo " Using XFontSet to provide bilingual menubar." - test "$with_canna" = yes && echo " Compiling in support for Canna on Mule." - if test "$with_wnn" = yes; then - echo " Compiling in support for the WNN input method on Mule." - test "$with_wnn6" = yes && echo " Using WNN version 6." - fi - test "$with_i18n3" = yes && echo " Compiling in I18N support, level 3 (doesn't currently work)." - - test "$with_cde" = yes && echo " Compiling in support for CDE." - test "$with_tooltalk" = yes && echo " Compiling in support for ToolTalk." - test "$with_offix" = yes && echo " Compiling in support for OffiX." - test "$with_dragndrop" = yes && echo " Compiling in EXPERIMENTAL support for Drag'n'Drop ($dragndrop_proto )." - test "$with_workshop" = yes && echo " Compiling in support for Sun WorkShop." - test "$with_session" != no && echo " Compiling in support for proper session-management." - case "$with_menubars" in - lucid ) echo " Using Lucid menubars." ;; - motif ) echo " Using Motif menubars." - echo " *WARNING* The Motif menubar implementation is currently buggy." - echo " We recommend using the Lucid menubar instead." - echo " Re-run configure with --with-menubars='lucid'." ;; - esac - case "$with_scrollbars" in - lucid ) echo " Using Lucid scrollbars." ;; - motif ) echo " Using Motif scrollbars." ;; - athena ) echo " Using Athena scrollbars." ;; - athena3d ) echo " Using Athena-3d scrollbars." ;; - esac - case "$with_dialogs" in - motif ) - echo " Using Motif dialog boxes." - if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then - echo " *WARNING* The Motif dialog boxes cause problems on AIX 4.3 and higher." - echo " We recommend using the Athena dialog boxes instead." - echo " Install libXaw and re-run configure with --with-dialogs='athena'." - echo " Read the PROBLEMS file for more information." - fi; fi - ;; - athena ) echo " Using Athena dialog boxes." ;; - athena3d ) echo " Using Athena-3d dialog boxes." ;; - esac - test "$with_shlib" = "yes" && echo " Compiling in DLL support." - test "$with_clash_detection" = yes && \ - echo " Clash detection will use \"$lockdir\" for locking files." - echo " movemail will use \"$mail_locking\" for locking mail spool files." - test "$with_pop" = yes && echo " Using POP for mail access." - test "$with_kerberos" = yes && echo " Using Kerberos for POP authentication." - test "$with_hesiod" = yes && echo " Using Hesiod to get POP server host." - test "$use_union_type" = yes && echo " Using the union type for Lisp_Objects." - test "$debug" = yes && echo " Compiling in extra code for debugging." - test "$usage_tracking" = yes && echo " Compiling with usage tracking active (Sun internal)." - if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc" \ - != "no no no no no"; then - echo " WARNING: ---------------------------------------------------------" - echo " WARNING: Compiling in support for runtime error checking." - echo " WARNING: XEmacs will run noticeably more slowly as a result." - echo " WARNING: Error checking is on by default for XEmacs beta releases." - echo " WARNING: ---------------------------------------------------------" - fi - echo "" - ) | tee -a Installation - dnl echo "The above configure report is appended to \"Installation\" file." - echo "" - - 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. - test -n "$prefix" && - prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([[^/]]\)/*$,\1,'` - test -n "$exec_prefix" && - exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([[^/]]\)/*$,\1,'` - - dnl Build Makefile.in's from Makefile.in.in's - dnl except ./Makefile from $srcdir/Makefile.in - - for file in $internal_makefile_list; do - test "$file" = src/Makefile.in && \ - file="src/Makefile.in:src/Makefile.in.in:src/depend" - ac_output_files="${ac_output_files+$ac_output_files }$file" - done - ac_output_files="$ac_output_files src/paths.h lib-src/config.values" - if test "$with_shlib" = "yes"; then - ac_output_files="$ac_output_files lib-src/ellcc.h" - fi - - AC_OUTPUT($ac_output_files, - [for dir in . $MAKE_SUBDIR; do - ( - cd $dir - rm -f junk.c - < Makefile.in \ - sed -e '/^# Generated/d' \ - -e 's%/\*\*/#.*%%' \ - -e 's/^ *# */#/' \ - dnl Delete Makefile.in.in comment lines - -e '/^##/d' \ - dnl Pass through CPP directives unchanged - -e '/^#/ { - p - d - }' \ - dnl Quote other lines to protect from CPP substitution - -e '/./ { - s/\([[\"]]\)/\\\1/g - s/^/"/ - s/$/"/ - }' > junk.c; - - dnl Create a GNUmakefile and Makefile from Makefile.in. - - changequote(<<,>>)dnl - dnl CPP_MAKEFILE(CPPFLAGS,filename) - define(<>, - echo creating $dir/<<$2>> - $CPP -I. -I${top_srcdir}/src <<$1>> junk.c \ - dnl Delete line directives inserted by $CPP - | sed -e 's/^\#.*//' \ - dnl Delete spurious blanks inserted by $CPP - -e 's/^[ TAB][ TAB]*$//'\ - -e 's/^ /TAB/' \ - dnl Delete blank lines - | sed -n -e '/^..*$/p' \ - dnl Restore lines quoted above to original contents. - | sed '/^\"/ { - s/\\\([\"]\)/\1/g - s/^[ TAB]*\"// - s/\"[ TAB]*$// - }' > Makefile.new - chmod 444 Makefile.new - mv -f Makefile.new <<$2>> - )dnl CPP_MAKEFILE - - CPP_MAKEFILE(,Makefile) - CPP_MAKEFILE(-DUSE_GNU_MAKE,GNUmakefile) - changequote([,])dnl - rm -f junk.c - ) - done - - dnl Append AC_DEFINE information to lib-src/config.values - dnl (AC_SUBST information is already there (see config.values.sh). - sed < config.status >> lib-src/config.values \ - -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \ - -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \ - -e 's/^\([[^ ]]*\) $/\1 ""/' \ - -e 's/ 1$/ t/' - - ], - [CPP="$CPP" - top_srcdir="$srcdir" - MAKE_SUBDIR="$MAKE_SUBDIR" - ])dnl -if AC_TRY_EVAL(ac_link) && test -s conftest && (./conftest; exit) 2>&AC_FD_CC -then -dnl Do not remove the temporary files here, so they can be examined. - ifelse([$2], , :, [$2]) -else - echo "configure: failed program was:" >&AC_FD_CC - cat conftest.$ac_ext >&AC_FD_CC -ifelse([$3], , , [ rm -fr conftest* - $3 -])dnl -fi -rm -fr conftest*])dnl AC_TRY_RUN_NATIVE - - -dnl Avoid spurious cross-compiling warnings from AC_TRY_RUN -dnl XEmacs is unlikely to ever cross-compile -define([AC_TRY_RUN],[AC_TRY_RUN_NATIVE([$1], [$2], [$3])])dnl - -dnl Redefine AC_DEFINE* to provide more output if extra_verbose -dnl Set VARIABLE to VALUE, verbatim, or 1. -dnl AC_DEFINE(VARIABLE [, VALUE]) -define([AC_DEFINE], -[{ test "$extra_verbose" = "yes" && cat << \EOF - Defining $1[]ifelse($#, 2, [ = $2],) -EOF -cat >> confdefs.h <<\EOF -[#define] $1 ifelse($#, 2, [$2], 1) -EOF -} -])dnl AC_DEFINE - -define([AC_DEFINE_UNQUOTED], -[{ test "$extra_verbose" = "yes" && cat << EOF - Defining $1[]ifelse($#, 2, [ = $2],) -EOF -cat >> confdefs.h <&AC_FD_CC' -ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&AC_FD_CC' -cross_compiling=no -]) dnl AC_LANG_C - -dnl The construct foo=`echo $w1 $w2 $w3` fails on some systems if $w1 = -e or -n -dnl So we use the following instead. -dnl XE_SPACE(var, words) -define([XE_SPACE],[ -T="" -for W in $2; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done -$1="$T" -])dnl XE_SPACE - -dnl XE_ADD_OBJS(foo.o ...) -define([XE_ADD_OBJS], -[extra_objs="$extra_objs [$1]" && dnl - if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"[$1]\"" - fi])dnl XE_ADD_OBJS - -dnl XE_APPEND(value, varname) -define([XE_APPEND], -[[$2]="$[$2] [$1]" && dnl - if test "$extra_verbose" = "yes"; then echo " Appending \"[$1]\" to \$[$2]"; fi]) - -dnl XE_PREPEND(value, varname) -define([XE_PREPEND], -[[$2]="[$1] $[$2]" && dnl - if test "$extra_verbose" = "yes"; then echo " Prepending \"[$1]\" to \$[$2]"; fi]) - - -dnl Initialize some variables set by options. -dnl The variables have the same names as the options, with -dnl dashes changed to underlines. - -define([AC_INIT_PARSE_ARGS],[ - -dnl Get sane consistent behavior from various shells -dnl Avoid losing with weird user CDPATHs - -if test -n "$ZSH_VERSION"; then - dnl zsh's Bourne shell emulation options - setopt NO_BAD_PATTERN NO_BANG_HIST NO_BG_NICE NO_EQUALS NO_FUNCTION_ARGZERO - setopt GLOB_SUBST NO_HUP INTERACTIVE_COMMENTS KSH_ARRAYS NO_MULTIOS NO_NOMATCH - setopt RM_STAR_SILENT POSIX_BUILTINS SH_FILE_EXPANSION SH_GLOB SH_OPTION_LETTERS - setopt SH_WORD_SPLIT BSD_ECHO IGNORE_BRACES - dnl zsh-3.1-beta drops core on the following - dnl unset CDPATH - if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi -elif test -n "$BASH_VERSION"; then - dnl Use Posix mode with bash - set -o posix - unset CDPATH -else - if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi -fi - -dnl Initialize some variables set by options. -dnl The variables have the same names as the options, with -dnl dashes changed to underlines. -exec_prefix=NONE -host=NONE -no_create= -nonopt=NONE -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -target=NONE -verbose= -x_includes=NONE -x_libraries=NONE - -dnl Installation directory options. -dnl These are left unexpanded so users can "make install exec_prefix=/foo" -dnl and all the variables that are supposed to be based on exec_prefix -dnl by default will actually change. -dnl Use braces instead of parens because sh, perl, etc. also accept them. -dnl If you change these, you need to synchronize with the settings of the -dnl various ..._USER_DEFINED variables further down. -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -libdir='${{exec_prefix}}/lib' -includedir='${prefix}/include' -oldincludedir='/usr/include' -infodir='${prefix}/info' -mandir='${prefix}/man' - -dnl Initialize some other variables. -subdirs= -MFLAGS= MAKEFLAGS= -dnl Maximum number of lines to put in a shell here document. -ac_max_here_lines=12 -])dnl AC_INIT_PARSE_ARGS - -AC_INIT(src/lisp.h)dnl -AC_CONFIG_HEADER(src/config.h lwlib/config.h) -dnl Remove any more than one leading "." element from the path name. -dnl If we do not remove them, then another "./" will be prepended to -dnl the file name each time we use config.status, and the program name -dnl will get larger and larger. This would not be a problem, except -dnl that since progname gets recorded in all the Makefiles this script -dnl produces, move-if-change thinks they're different when they're -dnl not. -dnl -dnl It would be nice if we could put the ./ in a \( \) group and then -dnl apply the * operator to that, so we remove as many leading './././'s -dnl as are present, but some seds (like Ultrix's sed) don't allow you to -dnl apply * to a \( \) group. Bleah. -progname="`echo $0 | sed 's:^\./\./:\./:'`" - -dnl ----------------------------- -dnl Establish some default values -dnl ----------------------------- - -XE_APPEND(lib-src, MAKE_SUBDIR) -XE_APPEND(lib-src, INSTALL_ARCH_DEP_SUBDIR) - -dnl run_in_place='no' -prefix='/usr/local' -exec_prefix='${prefix}' -bindir='${exec_prefix}/bin' -dnl FSF 19.29 changes to: -dnl datadir='${prefix}/share' -dnl sharedstatedir='${prefix}/com' -dnl libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/lib' -statedir='${prefix}/lib' -libdir='${exec_prefix}/lib' -mandir='${prefix}/man/man1' -infodir='${datadir}/${PROGNAME}-${version}/info' -infopath='' -install_pp='' -lispdir='${datadir}/${PROGNAME}-${version}/lisp' -dnl sitelispdir='${datadir}/xemacs/site-lisp' -pkgdir='${datadir}/${PROGNAME}-${version}/lisp' -package_path='' -etcdir='${datadir}/${PROGNAME}-${version}/etc' -lockdir='${statedir}/${PROGNAME}/lock' -archlibdir='${libdir}/${PROGNAME}-${version}/${configuration}' -with_site_lisp='no' -with_menubars='' -with_scrollbars='' -with_dialogs='' -with_file_coding='' -dnl const_is_losing is removed - we rely on AC_C_CONST instead. -dnl We accept (and ignore) the --const-is-losing option for compatibility. -dnl const_is_losing='yes' -puresize='' -cpp='' cppflags='' libs='' ldflags='' -dynamic='' -with_x11='' -with_msw='' -rel_alloc='default' -with_system_malloc='default' -with_dlmalloc='default' -native_sound_lib='' -dnl use_assertions should be 'yes' by default. Too many people in this -dnl world have core dumps turned off by default or \"cannot find where the -dnl core file went\". At least we should get some useful output ... -use_assertions="yes" -dnl the following is set to yes or no later. -with_toolbars="" -with_tty="" -use_union_type="no" -with_dnet="" - -dnl ------------------ -dnl Options Processing -dnl ------------------ - -define([USAGE_ERROR], -[(echo "$progname: Usage error:" -echo " " $1 -echo " Use \`$progname --help' to show usage.") >&2 && exit 1]) - -dnl Record all the arguments, so we can save them in config.status. -arguments="$@" - -dnl Shell Magic: Quote the quoted arguments in ARGUMENTS. At a later date, -dnl in order to get the arguments back in $@, we have to do an -dnl 'eval set x "$quoted_arguments"; shift' -dnl # We use sed to turn embedded ' into '"'"'. I truly hate sh quoting. -quoted_sed_magic=s/"'"/"'"'"'"'"'"'"'"/g -quoted_arguments= -for i in "$@"; do - case "$i" in - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) ;; - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; - *) - quoted_i="`echo '' $i | sed -e 's:^ ::' -e $quoted_sed_magic`" - quoted_arguments="$quoted_arguments '$quoted_i'" ;; - esac -done - -dnl Do not use shift -- that destroys the argument list, which autoconf needs -dnl to produce config.status. It turns out that "set - $arguments" does not -dnl work portably. -dnl However, it also turns out that many shells cannot expand ${10} at all. -dnl So using an index variable does not work either. It is possible to use -dnl some shell magic to make 'set x "$arguments"; shift' work portably. -while test $# != 0; do - arg="$1"; shift - case "$arg" in - --no-create|--no-recursion) ;; - dnl Anything starting with a hyphen we assume is an option. - -* ) - dnl Separate the switch name from the value it is being given. - case "$arg" in - -*=*) - opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\([[^=]]*\)=.*$:\1:'` - val=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*[[^=]]*=\(.*\)$:\1:'` - valomitted=no - ;; - dnl special case these strings since echo may silently eat them: - dnl --help ) opt=help val=yes valomitted=yes ;; - dnl --version ) opt=version val=yes valomitted=yes ;; - dnl -e ) opt=e val=yes valomitted=yes ;; - dnl -E ) opt=E val=yes valomitted=yes ;; - dnl -n ) opt=n val=yes valomitted=yes ;; - -*) - dnl If FOO is a boolean argument, --FOO is equivalent to - dnl --FOO=yes. Otherwise, the value comes from the next - dnl argument - see below. - opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\(.*\)$:\1:'` - val="yes" valomitted=yes - ;; - esac - - dnl translate "-" in option string to "_" - optname="$opt" - opt="`echo '' $opt | sed -e 's:^ ::' | tr - _`" - - dnl Support --without-FOO as a synonym for --with-FOO=no - case "${valomitted}-${opt}" in yes-without_* ) - opt=`echo $opt | sed 's/without/with/'` - valomitted="no" val="no" ;; - esac - - dnl Process the option. - case "$opt" in - - dnl Process (many) boolean options - run_in_place | \ - with_site_lisp | \ - with_x | \ - with_x11 | \ - with_msw | \ - with_gcc | \ - with_gnu_make | \ - dynamic | \ - with_ncurses | \ - with_dnet | \ - with_socks | \ - with_dragndrop | \ - with_cde | \ - with_offix | \ - with_gpm | \ - with_xpm | \ - with_xface | \ - with_gif | \ - with_jpeg | \ - with_png | \ - with_tiff | \ - with_session | \ - with_xmu | \ - with_quantify | \ - with_toolbars | \ - with_tty | \ - with_xfs | \ - with_i18n3 | \ - with_mule | \ - with_file_coding | \ - with_canna | \ - with_wnn | \ - with_wnn6 | \ - with_workshop | \ - with_sparcworks | \ - with_tooltalk | \ - with_ldap | \ - with_pop | \ - with_kerberos | \ - with_hesiod | \ - with_dnet | \ - with_infodock | \ - external_widget | \ - verbose | \ - extra_verbose | \ - const_is_losing | \ - usage_tracking | \ - use_union_type | \ - debug | \ - use_assertions | \ - use_minimal_tagbits | \ - use_indexed_lrecord_implementation | \ - gung_ho | \ - use_assertions | \ - memory_usage_stats | \ - with_clash_detection | \ - with_shlib | \ - no_doc_file ) - dnl Make sure the value given was either "yes" or "no". - case "$val" in - y | ye | yes ) val=yes ;; - n | no ) val=no ;; - * ) USAGE_ERROR("The \`--$optname' option requires a boolean value: \`yes' or \`no'.") ;; - esac - eval "$opt=\"$val\"" ;; - - - dnl Options that take a user-supplied value, as in --puresize=8000000 - dnl The cache-file option is ignored (for compatibility with other configures) - srcdir | \ - compiler | \ - cflags | \ - cpp | \ - cppflags | \ - libs | \ - ldflags | \ - puresize | \ - cache_file | \ - native_sound_lib | \ - site_lisp | \ - x_includes | \ - x_libraries | \ - site_includes | \ - site_libraries | \ - site_prefixes | \ - site_runtime_libraries ) - dnl If the value was omitted, get it from the next argument. - if test "$valomitted" = "yes" ; then - dnl Get the next argument from the argument list, if there is one. - if test "$#" = 0 ; then - USAGE_ERROR("The \`--$optname' option requires a value."); - fi - val="$1"; shift - fi - eval "$opt=\"$val\"" - ;; - - dnl Options that take "yes", "no", or "default" values - rel_alloc | \ - with_dlmalloc | \ - with_debug_malloc | use_debug_malloc | \ - with_system_malloc | use_system_malloc ) - case "$val" in - y | ye | yes ) val=yes ;; - n | no ) val=no ;; - d | de | def | defa | defau | defaul | default ) val=default ;; - * ) USAGE_ERROR(["The \`--$optname' option requires one of these values: - \`yes', \`no', or \`default'."]) ;; - esac - case "$opt" in use_* ) opt="`echo $opt | sed s/use/with/`" ;; esac - eval "$opt=\"$val\"" - ;; - - dnl Has the user requested database support? - "with_database" ) - with_database_berkdb=no - with_database_dbm=no - with_database_gnudbm=no - for x in `echo "$val" | sed -e 's/,/ /g'` ; do - case "$x" in - no ) ;; - b | be | ber | berk | berkd | berkdb ) with_database_berkdb=yes ;; - d | db | dbm ) with_database_dbm=yes ;; - g | gn | gnu | gnud | gnudb | gnudbm ) with_database_gnudbm=yes ;; - * ) USAGE_ERROR(["The \`--$optname' option value - must be either \`no' or a comma-separated list - of one or more of \`berkdb', \`dbm', or \`gnudbm'."]) ;; - esac - done - if test "$with_database_dbm" = "yes" -a \ - "$with_database_gnudbm" = "yes"; then - USAGE_ERROR("Only one of \`dbm' and \`gnudbm' may be specified - with the \`--$optname' option.") - fi - ;; - - dnl Has the user requested sound support? - "with_sound" ) - dnl value can be native, nas or both. yes is allowed - dnl as a backwards compatible synonym for native - case "$val" in - y | ye | yes ) val=native ;; - n | no | non | none ) val=no;; - na | nat | nati | nativ | native ) val=native ;; - ne | net | neta | netau | netaud | netaudi | netaudio | nas ) val=nas ;; - b | bo | bot | both ) val=both;; - * ) USAGE_ERROR(["The \`--$optname' option must have one of these values: - \`native', \`nas', \`both', or \`none'."]) ;; - esac - eval "$opt=\"$val\"" - ;; - - dnl Has the user requested XIM support? - "with_xim" ) - case "$val" in - y | ye | yes ) val=yes ;; - n | no | non | none ) val=no ;; - x | xl | xli | xlib ) val=xlib ;; - m | mo | mot | moti | motif ) val=motif ;; - * ) USAGE_ERROR(["The \`--$optname' option must have one of these values: - \`motif', \`xlib', \`yes', or \`no'."]) ;; - esac - eval "$opt=\"$val\"" - ;; - - dnl XFontSet support? - "with_xfs" ) - case "$val" in - y | ye | yes ) val=yes ;; - n | no | non | none ) val=no ;; - * ) USAGE_ERROR(["The \`--$optname' option must have one of these values: - \`yes', or \`no'."]) ;; - esac - eval "$opt=\"$val\"" - ;; - - dnl Mail locking specification - "mail_locking" ) - case "$val" in - lockf ) val=lockf ;; - flock ) val=flock ;; - file ) val=file ;; - * ) USAGE_ERROR(["The \`--$optname' option must have one of these values: - \`lockf', \`flock', or \`file'."]) ;; - esac - eval "$opt=\"$val\"" - ;; - - dnl Has the user requested error-checking? - "error_checking" ) - dnl value can be all, none, and/or a list of categories to check. - dnl Example: --error-checking=all,noextents,nobufpos - dnl Example: --error-checking=none,malloc,gc - - for x in `echo "$val" | sed -e 's/,/ /g'` ; do - case "$x" in - dnl all and none are only permitted as the first in the list. - n | no | non | none ) new_default=no ;; - a | al | all ) new_default=yes ;; - - extents ) error_check_extents=yes ;; - noextents ) error_check_extents=no ;; - - typecheck ) error_check_typecheck=yes ;; - notypecheck ) error_check_typecheck=no ;; - - bufpos ) error_check_bufpos=yes ;; - nobufpos ) error_check_bufpos=no ;; - - gc ) error_check_gc=yes ;; - nogc ) error_check_gc=no ;; - - malloc ) error_check_malloc=yes ;; - nomalloc ) error_check_malloc=no ;; - - * ) bogus_error_check=yes ;; - esac - if test "$bogus_error_check" -o \ - \( -n "$new_default" -a -n "$echeck_notfirst" \) ; then - if test "$error_check_default" = yes ; then - types="\`all' (default), \`none', \`noextents', \`notypecheck', \`nobufpos', \`nogc', and \`nomalloc'." - else - types="\`all', \`none' (default), \`extents', \`typecheck', \`bufpos', \`gc', and \`malloc'." - fi - USAGE_ERROR(["Valid types for the \`--$optname' option are: - $types."]) - elif test -n "$new_default" ; then - error_check_extents=$new_default - error_check_typecheck=$new_default - error_check_bufpos=$new_default - error_check_gc=$new_default - error_check_malloc=$new_default - new_default= # reset this - fi - echeck_notfirst=true - done - ;; - - dnl Has the user tried to tell us where the X files are? - dnl I think these are dopey, but no less than three alpha - dnl testers, at large sites, have said they have their X files - dnl installed in odd places. - - dnl Has the user specified one of the path options? - prefix | exec_prefix | bindir | datadir | statedir | libdir | \ - mandir | infodir | infopath | lispdir | etcdir | lockdir | pkgdir | \ - archlibdir | docdir | package_path ) - dnl If the value was omitted, get it from the next argument. - if test "$valomitted" = "yes"; then - if test "$#" = 0; then - USAGE_ERROR("The \`--$optname' option requires a value."); - fi - val="$1"; shift - fi - eval "$opt=\"$val\"" - - dnl You need to synchronize this with the way the - dnl default values are built. - case "$opt" in - lispdir ) AC_DEFINE(LISPDIR_USER_DEFINED) ;; -dnl sitelispdir ) AC_DEFINE(SITELISPDIR_USER_DEFINED) ;; - etcdir ) AC_DEFINE(ETCDIR_USER_DEFINED) ;; - infodir ) AC_DEFINE(INFODIR_USER_DEFINED) ;; - infopath ) AC_DEFINE(INFOPATH_USER_DEFINED) ;; - package_path ) AC_DEFINE(PACKAGE_PATH_USER_DEFINED) ;; - datadir ) - AC_DEFINE(INFODIR_USER_DEFINED) - AC_DEFINE(LISPDIR_USER_DEFINED) - AC_DEFINE(ETCDIR_USER_DEFINED) ;; - statedir | lockdir ) AC_DEFINE(LOCKDIR_USER_DEFINED) ;; - exec_prefix | libdir | archlibdir ) AC_DEFINE(ARCHLIBDIR_USER_DEFINED) ;; - esac - ;; - - dnl --no-create added by autoconf for use by config.status - "no_create" ) ;; - - dnl Has the user asked for some help? - "usage" | "help" ) ${PAGER-more} ${srcdir}/configure.usage; exit 0 ;; - - dnl Has the user specified what toolkit to use for the menubars, - dnl scrollbar or dialogs? - "with_menubars" | "with_scrollbars" | "with_dialogs" ) - case "$val" in - l | lu | luc | luci | lucid ) val=lucid ;; - m | mo | mot | moti | motif ) val=motif ;; - athena3d | athena-3d ) val=athena3d ;; - a | at | ath | athe | athen | athena ) val=athena ;; - n | no | non | none ) val=no ;; - * ) USAGE_ERROR(["The \`--$optname' option must have one of these values: - \`lucid', \`motif', \`athena', \`athena3d', or \`no'."]) ;; - esac - eval "$opt=\"$val\"" - ;; - - dnl Fail on unrecognized arguments. - * ) USAGE_ERROR("Unrecognized option: $arg") ;; - - esac - ;; - - dnl Assume anything with multiple hyphens is a configuration name. - *-*-*) configuration="$arg" ;; - - dnl Anything else is an error - *) USAGE_ERROR("Unrecognized argument: $arg") ;; - - esac -done - -dnl ------------------------- -dnl Finish options processing -dnl ------------------------- - -dnl Several options are equivalent to, and override, environment variables. -test -n "$cpp" && CPP="$cpp" -test -n "$cppflags" && CPPFLAGS="$cppflags" -test -n "$libs" && LIBS="$libs" -test -n "$ldflags" && LDFLAGS="$ldflags" - -dnl Get the arguments back. See the diatribe on Shell Magic above. -eval set x "$quoted_arguments"; shift - -dnl --extra-verbose implies --verbose -test "$extra_verbose" = "yes" && verbose=yes - -dnl Allow use of either ":" or spaces for lists of directories -define(COLON_TO_SPACE, - [case "$[$1]" in *:* [)] [$1]="`echo '' $[$1] | sed -e 's/^ //' -e 's/:/ /g'`";; esac])dnl -COLON_TO_SPACE(site_includes) -COLON_TO_SPACE(site_libraries) -COLON_TO_SPACE(site_prefixes) -COLON_TO_SPACE(site_runtime_libraries) - -dnl with_x is an obsolete synonym for with_x11 -test -n "$with_x" && with_x11="$with_x" - -dnl --gung-ho=val is a synonym for -dnl --use-minimal-tagbits=val --use-indexed-lrecord-implementation=val - -if test -n "$gung_ho"; then - test -z "$use_minimal_tagbits" && use_minimal_tagbits="$gung_ho" - test -z "$use_indexed_lrecord_implementation" && \ - use_indexed_lrecord_implementation="$gung_ho" -fi -if test "$use_minimal_tagbits" = "no"; then - test "$with_dlmalloc" = "yes" && \ - USAGE_ERROR("--with-dlmalloc requires --use-minimal-tagbits") - with_dlmalloc=no -fi - -dnl XE_CHECK_FEATURE_DEPENDENCY(feature1, feature2) -define([XE_CHECK_FEATURE_DEPENDENCY], -[if test "$with_$1 $with_$2" = "yes no"; then - USAGE_ERROR("--with-$1 requires --with-$2") -elif test "$with_$2" = "no" ; then with_$1=no -elif test "$with_$1" = "yes"; then with_$2=yes -fi -]) - -dnl CDE requires tooltalk -XE_CHECK_FEATURE_DEPENDENCY(cde, tooltalk) - -dnl Ignore useless run-in-place flag -if test "$run_in_place" = "yes"; then - AC_MSG_WARN("The --run-in-place option is ignored because it is unnecessary.") -fi - -dnl Find the source directory. -case "$srcdir" in - - dnl If srcdir is not specified, see if "." or ".." might work. - "" ) - for dir in "`echo $0 | sed 's|//|/|' | sed 's|/[[^/]]*$||'`" "." ".." ; do - if test -f "$dir/src/lisp.h" -a \ - -f "$dir/lisp/version.el" ; then - srcdir="$dir" - break - fi - done - if test -z "$srcdir" ; then - USAGE_ERROR(["Neither the current directory nor its parent seem to - contain the XEmacs sources. If you do not want to build XEmacs in its - source tree, you should run \`$progname' in the directory in which - you wish to build XEmacs, using the \`--srcdir' option to say where the - sources may be found."]) - fi - ;; - - dnl Otherwise, check if the directory they specified is okay. - * ) - if test ! -f "$srcdir/src/lisp.h" -o \ - ! -f "$srcdir/lisp/version.el" ; then - USAGE_ERROR(["The directory specified with the \`--srcdir' option, - \`$srcdir', doesn't seem to contain the XEmacs sources. You should - either run the \`$progname' script at the top of the XEmacs source - tree, or use the \`--srcdir' option to specify the XEmacs source directory."]) - fi - ;; -esac - -dnl ########################################################################### -if test -z "$configuration"; then - AC_MSG_CHECKING("host system type") - dnl Guess the configuration and remove 4th name component, if present. - if configuration=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess | \ - sed '[s/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/]'` ; then - AC_MSG_RESULT($configuration) - else - AC_MSG_RESULT(unknown) - USAGE_ERROR(["XEmacs has not been ported to this host type. -Try explicitly specifying the CONFIGURATION when rerunning configure."]) - fi -fi - -AC_PROG_LN_S - -dnl Make symlinks for etc, lisp, and info directories while the path -dnl is still relative. We do not symlink lock because someone may -dnl have stuck the source on a read-only partition. Instead we -dnl create it as an actual directory later on if it does not already -dnl exist. -for dir in lisp etc man info; do - if test ! -d "$dir" ; then - echo Making symbolic link to "$srcdir/$dir" - ${LN_S} "$srcdir/$dir" "$dir" - fi -done - -dnl Calculate canonical name for blddir (i.e. current directory). -dnl PWD may already be the preferable absolute name for ".", -dnl but we can't trust it - it is sometimes inaccurate. -absolute_pwd="`pwd`"; -if test -n "$PWD" -a "`cd $PWD && pwd`" = "$absolute_pwd" -then blddir="$PWD" -else blddir="$absolute_pwd" -fi -AC_SUBST(blddir) - -dnl Make srcdir absolute, if not already. It is important to -dnl avoid running the path through pwd unnecessary, since pwd can -dnl give you automounter prefixes, which can go away. -case "$srcdir" in - /* ) ;; - . ) srcdir="$blddir" ;; - * ) srcdir="`cd $srcdir && pwd`" ;; -esac - -dnl Check if the source directory already has a configured system in it. -if test `pwd` != `sh -c cd $srcdir && pwd` \ - && test -f "$srcdir/src/config.h"; then - (echo "$progname: WARNING: The directory tree \`$srcdir' is being used" - echo " as a build directory right now; it has been configured in its own" - echo " right. To configure in another directory as well, you MUST" - echo " use GNU make. If you do not have GNU make, then you must" - echo " now do \`make distclean' in $srcdir," - echo " and then run $progname again.") >&2 - extrasub='/^VPATH[[ ]]*=/c\ -vpath %.c $(srcdir)\ -vpath %.h $(srcdir)\ -vpath %.y $(srcdir)\ -vpath %.l $(srcdir)\ -vpath %.s $(srcdir)\ -vpath %.in $(srcdir)' -fi - -dnl ---------------------------------------- -dnl Find out which version of XEmacs this is -dnl ---------------------------------------- -. "$srcdir/version.sh" || exit 1; -dnl Must do the following first to determine verbosity for AC_DEFINE -if test -n "$emacs_beta_version"; then beta=yes; else beta=no; fi -: "${extra_verbose=$beta}" -version="${emacs_major_version}.${emacs_minor_version}" -AC_DEFINE_UNQUOTED(EMACS_MAJOR_VERSION, $emacs_major_version) -AC_DEFINE_UNQUOTED(EMACS_MINOR_VERSION, $emacs_minor_version) -if test -n "$emacs_beta_version"; then - version="${version}-b${emacs_beta_version}" - AC_DEFINE_UNQUOTED(EMACS_BETA_VERSION, $emacs_beta_version) -fi -AC_DEFINE_UNQUOTED(XEMACS_CODENAME, "$xemacs_codename") -AC_DEFINE_UNQUOTED(EMACS_VERSION, "$version") - -if test "$with_infodock" = "yes"; then - if test ! -f ../ID-INSTALL; then - echo "Cannot build InfoDock without InfoDock sources" - with_infodock=no - fi -fi - -if test "$with_infodock" = "yes"; then - dnl InfoDock version numbers. XEmacs will use the same style of numbering - dnl after the release of XEmacs 21.0. - AC_DEFINE_UNQUOTED(INFODOCK_MAJOR_VERSION, $infodock_major_version) - AC_DEFINE_UNQUOTED(INFODOCK_MINOR_VERSION, $infodock_minor_version) - AC_DEFINE_UNQUOTED(INFODOCK_BUILD_VERSION, $infodock_build_version) - version=${infodock_major_version}.${infodock_minor_version}.${infodock_build_version} - PROGNAME=infodock - CPPFLAGS="$CPPFLAGS -DINFODOCK" -else - PROGNAME=xemacs -fi - -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 --debug and --extra-verbosity. -if test -n "$emacs_beta_version"; then beta=yes; else beta=no; fi -test "${error_check_extents=$beta}" = yes && AC_DEFINE(ERROR_CHECK_EXTENTS) -test "${error_check_typecheck=$beta}" = yes && AC_DEFINE(ERROR_CHECK_TYPECHECK) -test "${error_check_bufpos=$beta}" = yes && AC_DEFINE(ERROR_CHECK_BUFPOS) -test "${error_check_gc=$beta}" = yes && AC_DEFINE(ERROR_CHECK_GC) -test "${error_check_malloc=$beta}" = yes && AC_DEFINE(ERROR_CHECK_MALLOC) -dnl debug=yes must be set when error checking is present. This should be -dnl fixed up. -dnl debug implies other options -if test "${debug:=$beta}" = "yes"; then - use_assertions=yes memory_usage_stats=yes - XE_ADD_OBJS(debug.o) - AC_DEFINE(DEBUG_XEMACS) -fi -test "$use_assertions" = "yes" && AC_DEFINE(USE_ASSERTIONS) -test "$memory_usage_stats" = "yes" && AC_DEFINE(MEMORY_USAGE_STATS) - -dnl ------------------------------ -dnl Determine the s&m files to use -dnl ------------------------------ -dnl Given the configuration name, set machfile and opsysfile to the -dnl names of the m/*.h and s/*.h files we should use. - -dnl Canonicalize the configuration name. -AC_CHECKING("the configuration name") -dnl allow -workshop suffix on configuration name -internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'` -if canonical=`$srcdir/config.sub "$internal_configuration"` ; then : ; else - exit $? -fi - -dnl If you add support for a new configuration, add code to this -dnl switch statement to recognize your configuration name and select -dnl the appropriate operating system and machine description files. - -dnl You would hope that you could choose an m/*.h file pretty much -dnl based on the machine portion of the configuration name, and an s- -dnl file based on the operating system portion. However, it turns out -dnl that each m/*.h file is pretty manufacturer-specific - for -dnl example, apollo.h, hp9000s300.h, mega68k, news.h, and tad68k are -dnl all 68000 machines; mips.h, pmax.h, and news-risc are all MIPS -dnl machines. So we basically have to have a special case for each -dnl configuration name. - -dnl As far as handling version numbers on operating systems is -dnl concerned, make sure things will fail in a fixable way. If -dnl /etc/MACHINES says nothing about version numbers, be -dnl prepared to handle anything reasonably. If version numbers -dnl matter, be sure /etc/MACHINES says something about it. - -dnl Eric Raymond says we should accept strings like "sysvr4" to mean -dnl "System V Release 4"; he writes, "The old convention encouraged" -dnl "confusion between `system' and `release' levels'." - -machine='' opsys='' - -dnl Straightforward machine determination -case "$canonical" in - sparc-*-* ) machine=sparc ;; - alpha-*-* ) machine=alpha ;; - vax-*-* ) machine=vax ;; - mips-dec-* ) machine=pmax ;; - mips-sgi-* ) machine=iris4d ;; - romp-ibm-* ) machine=ibmrt ;; - rs6000-ibm-aix* ) machine=ibmrs6000 ;; - powerpc-ibm-aix* ) machine=ibmrs6000 ;; - powerpc*-* ) machine=powerpc ;; - hppa-*-* ) machine=hp800 ;; - m88k-dg-* ) machine=aviion ;; - m68*-sony-* ) machine=news ;; - mips-sony-* ) machine=news-risc ;; - clipper-* ) machine=clipper ;; -esac - -dnl Straightforward OS determination -case "$canonical" in - *-*-linux* ) opsys=linux ;; - *-*-netbsd* ) opsys=netbsd ;; - *-*-openbsd* ) opsys=openbsd ;; - *-*-nextstep* ) opsys=nextstep ;; - *-*-vms ) opsys=vms ;; - - dnl DEC OSF - *-dec-osf1.3 | *-dec-osf2* ) opsys=decosf1-3 ;; - *-dec-osf1.2 | *-dec-osf1* ) opsys=decosf1-2 ;; - *-dec-osf3.[[2-9]] ) opsys=decosf3-2 ;; - *-dec-osf3* ) opsys=decosf3-1 ;; - *-dec-osf4* ) opsys=decosf4-0 ;; - - dnl DEC Ultrix - *-*-ultrix[[0-3]].* | *-*-ultrix4.0* ) opsys=bsd4-2 ;; - *-*-ultrix4.[[12]]* ) opsys=bsd4-3 ;; - *-*-ultrix* ) opsys=ultrix4-3 ;; - - dnl AIX - *-*-aix3.1* ) opsys=aix3-1 ;; - *-*-aix3.2.5 ) opsys=aix3-2-5 ;; - *-*-aix3* ) opsys=aix3-2 ;; - *-*-aix4.2* ) opsys=aix4-2 ;; - *-*-aix4.1* ) opsys=aix4-1 ;; - *-*-aix4* ) opsys=aix4 ;; - - dnl Other generic OSes - *-gnu* ) opsys=gnu ;; - *-*-bsd4.[[01]] ) opsys=bsd4-1 ;; - *-*-bsd4.2 ) opsys=bsd4-2 ;; - *-*-bsd4.3 ) opsys=bsd4-3 ;; - *-*-aos4.2 ) opsys=bsd4-2 ;; - *-*-aos* ) opsys=bsd4-3 ;; - *-*-sysv0 | *-*-sysvr0 ) opsys=usg5-0 ;; - *-*-sysv2 | *-*-sysvr2 ) opsys=usg5-2 ;; - *-*-sysv2.2 | *-*-sysvr2.2 ) opsys=usg5-2-2 ;; - *-*-sysv3* | *-*-sysvr3* ) opsys=usg5-3 ;; - *-*-sysv4.1* | *-*-sysvr4.1* )opsys=usg5-4 NON_GNU_CPP=/usr/lib/cpp ;; - *-*-sysv4.[[2-9]]* | *-sysvr4.[[2-9]]* ) - if test -z "$NON_GNU_CPP" ; then - for prog in "/usr/ccs/lib/cpp" "/lib/cpp"; do - if test -f "$prog"; then NON_GNU_CPP="$prog"; break; fi - done - fi - opsys=usg5-4-2 ;; - *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;; - *-*-mach_bsd4.3* ) opsys=mach-bsd4-3 ;; -esac - -case "$canonical" in - - dnl NetBSD ports - *-*-netbsd* ) - case "$canonical" in - i[[3-9]]86-*-netbsd*) machine=intel386 ;; - hp300-*-netbsd* | amiga-*-netbsd* | sun3-*-netbsd* | mac68k-*-netbsd* | da30-*-netbsd* | m68k-*-netbsd* ) - dnl Yes, this is somewhat bogus. - machine=hp9000s300 ;; - pc532-*-netbsd* | ns32k-*-netbsd* ) machine=ns32000 ;; - pmax-*-netbsd* | mips-*-netbsd* ) machine=pmax ;; - esac - ;; - - dnl OpenBSD ports - *-*-openbsd* ) - case "${canonical}" in - alpha*-*-openbsd*) machine=alpha ;; - i386-*-openbsd*) machine=intel386 ;; - m68k-*-openbsd*) machine=hp9000s300 ;; - mipsel-*-openbsd*) machine=pmax ;; - ns32k-*-openbsd*) machine=ns32000 ;; - sparc-*-openbsd*) machine=sparc ;; - vax-*-openbsd*) machine=vax ;; - esac - ;; - - dnl Acorn RISCiX: - arm-acorn-riscix1.1* ) machine=acorn opsys=riscix1-1 ;; - arm-acorn-riscix1.2* | arm-acorn-riscix ) machine=acorn opsys=riscix1-2 ;; - - dnl Alliant machines - fx80-alliant-* ) machine=alliant4 opsys=bsd4-2 ;; - i860-alliant-* ) machine=alliant-2800 opsys=bsd4-3 ;; - - dnl Altos 3068 - m68*-altos-sysv* ) machine=altos opsys=usg5-2 ;; - - dnl Amdahl UTS - 580-amdahl-sysv* ) machine=amdahl opsys=usg5-2-2 ;; - - dnl Apollo, Domain/OS - m68*-apollo-* ) machine=apollo opsys=bsd4-3 ;; - - dnl AT&T 3b2, 3b5, 3b15, 3b20 - we32k-att-sysv* ) machine=att3b opsys=usg5-2-2 ;; - - dnl AT&T 3b1 - The Mighty Unix PC! - m68*-att-sysv* ) machine=7300 opsys=usg5-2-2 ;; - - dnl Bull machines - rs6000-bull-bosx* ) machine=ibmrs6000 opsys=aix3-2 ;; # dpx20 - m68*-bull-sysv3* ) machine=dpx2 opsys=usg5-3 ;; # dpx2 - m68*-bull-sysv2* ) machine=sps7 opsys=usg5-2 ;; # sps7 - - dnl CCI 5/32, 6/32 -- see "Tahoe". - - dnl Celerity - celerity-celerity-bsd* ) machine=celerity opsys=bsd4-2 ;; - - dnl Convex - *-convex-bsd* | *-convex-convexos* ) - machine=convex opsys=bsd4-3 - NON_GNU_CPP="cc -E -P" - ;; - - dnl Cubix QBx/386 - i[[3-9]]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;; - - dnl Data General AViiON Machines - i586-dg-dgux*R4* | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;; - m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;; - m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) opsys=dgux5-4r2 ;; - m88k-dg-dgux* ) opsys=dgux ;; - - dnl Motorola Delta machines - m68k-motorola-sysv* | m68000-motorola-sysv* ) machine=delta opsys=usg5-3 ;; - m88k-motorola-sysv4* ) - dnl jbotte@bnr.ca says that UNIX_System_V 4.0 R40V4.3 m88k mc88110 - dnl needs POSIX_SIGNALS and therefore needs usg5-4-2. - dnl I hope there are not other 4.0 versions for this machine - dnl which really need usg5-4 instead. - machine=delta88k opsys=usg5-4-2 - ;; - m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) machine=delta88k opsys=usg5-3 ;; - - dnl Dual machines - m68*-dual-sysv* ) machine=dual opsys=usg5-2 ;; - m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;; - - dnl Encore machines - ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;; - - dnl Gould Power Node and NP1 - pn-gould-bsd4.2* ) machine=gould opsys=bsd4-2 ;; - pn-gould-bsd4.3* ) machine=gould opsys=bsd4-3 ;; - np1-gould-bsd* ) machine=gould-np1 opsys=bsd4-3 ;; - - dnl Harris Night Hawk machines running CX/UX (a 5000 looks just like a 4000 - dnl as far as XEmacs is concerned). - m88k-harris-cxux* ) - dnl Build needs to be different on 7.0 and later releases - case "`uname -r`" in - [[56]].[[0-9]] ) machine=nh4000 opsys=cxux ;; - [[7]].[[0-9]] ) machine=nh4000 opsys=cxux7 ;; - esac - NON_GNU_CPP="/lib/cpp" - ;; - dnl Harris ecx or gcx running CX/UX (Series 1200, Series 3000) - m68k-harris-cxux* ) machine=nh3000 opsys=cxux ;; - dnl Harris power pc NightHawk running Power UNIX (Series 6000) - powerpc-harris-powerunix ) machine=nh6000 opsys=powerunix NON_GNU_CPP="cc -Xo -E -P" ;; - - dnl Honeywell XPS100 - xps*-honeywell-sysv* ) machine=xps100 opsys=usg5-2 ;; - - dnl HP 9000 series 200 or 300 - m68*-hp-bsd* ) machine=hp9000s300 opsys=bsd4-3 ;; - - dnl HP-UX - *-hp-hpux* ) - dnl Figure out machine and opsys orthogonally - case "$canonical" in - m68* ) machine=hp9000s300 ;; - hppa* ) machine=hp800 ;; - esac - - case "$canonical" in - *-hp-hpux7* ) opsys=hpux ;; - *-hp-hpux8* ) opsys=hpux8 ;; - *-hp-hpux9* ) opsys=hpux9 ;; - *-hp-hpux10* ) opsys=hpux10 ;; - *-hp-hpux11* ) opsys=hpux11 ;; - * ) opsys=hpux ;; - esac - - dnl HP has a broken "strcat" - case "$opsys" in hpux9 | hpux10 ) XE_ADD_OBJS(strcat.o) ;; esac - - if test "$opsys" = "hpux10" -o "$opsys" = "hpux11"; then \ - ansi_flag="-Ae"; else ansi_flag="-Aa"; fi - NON_GNU_CC="cc $ansi_flag" NON_GNU_CPP="cc $ansi_flag -E" - - case "$canonical" in *-hp-hpux*shr* ) opsys="${opsys}-shr" ;; esac - ;; - - dnl Orion machines - orion-orion-bsd* ) machine=orion opsys=bsd4-2 ;; - clipper-orion-bsd* ) machine=orion105 opsys=bsd4-2 ;; - - dnl IBM machines - i[[3-9]]86-ibm-aix1.1* ) machine=ibmps2-aix opsys=usg5-2-2 ;; - i[[3-9]]86-ibm-aix1.[[23]]* | i[[3-9]]86-ibm-aix* ) machine=ibmps2-aix opsys=usg5-3 ;; - i370-ibm-aix*) machine=ibm370aix opsys=usg5-3 ;; - romp-ibm-aos* ) opsys=bsd4-3 ;; - romp-ibm-bsd* ) opsys=bsd4-3 ;; - romp-ibm-mach* ) opsys=mach-bsd4-3 ;; - - dnl Integrated Solutions "Optimum V" - m68*-isi-bsd4.2* ) machine=isi-ov opsys=bsd4-2 ;; - m68*-isi-bsd4.3* ) machine=isi-ov opsys=bsd4-3 ;; - - dnl Intel 386 machines where we do care about the manufacturer - i[[3-9]]86-intsys-sysv* ) machine=is386 opsys=usg5-2-2 ;; - - dnl Prime EXL - i[[3-9]]86-prime-sysv* ) machine=i386 opsys=usg5-3 ;; - - dnl Sequent Symmetry running Dynix - i[[3-9]]86-sequent-bsd* ) machine=symmetry opsys=bsd4-3 ;; - - dnl Sequent Symmetry running DYNIX/ptx - i[[3-9]]86-sequent-ptx* ) machine=sequent-ptx opsys=ptx NON_GNU_CPP="/lib/cpp" ;; - - dnl Unspecified sysv on an ncr machine defaults to svr4.2. - dnl (Plain usg5-4 does not turn on POSIX signals, which we need.) - i[[3-9]]86-ncr-sysv* ) machine=ncr386 opsys=usg5-4-2 ;; - - dnl Intel Paragon OSF/1 - i860-intel-osf1* ) machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp ;; - - dnl Intel 860 - i860-*-sysv4* ) machine=i860 opsys=usg5-4 NON_GNU_CC="/bin/cc" NON_GNU_CPP="/usr/ccs/lib/cpp" ;; - - dnl Masscomp machines - m68*-masscomp-rtu* ) machine=masscomp opsys=rtu ;; - - dnl Megatest machines - m68*-megatest-bsd* ) machine=mega68 opsys=bsd4-2 ;; - - dnl Workstations sold by MIPS - dnl This is not necessarily all workstations using the MIPS processor - - dnl Irises are produced by SGI, and DECstations by DEC. - mips-mips-usg* ) machine=mips4 ;; - mips-mips-riscos4 ) - machine=mips4 - NON_GNU_CC="cc -systype bsd43" - NON_GNU_CPP="cc -systype bsd43 -E" - case "$canonical" in - mips-mips-riscos4* ) opsys=bsd4-3 ;; - mips-mips-riscos5* ) opsys=riscos5 ;; - esac - ;; - mips-mips-bsd* ) machine=mips opsys=bsd4-3 ;; - mips-mips-* ) machine=mips opsys=usg5-2-2 ;; - - dnl NeXT - m68*-next-* | m68k-*-nextstep* ) machine=m68k opsys=nextstep ;; - - dnl The complete machine from National Semiconductor - ns32k-ns-genix* ) machine=ns32000 opsys=usg5-2 ;; - - dnl NCR machines - m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) machine=tower32 opsys=usg5-2-2 ;; - m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) machine=tower32v3 opsys=usg5-3 ;; - - dnl Nixdorf Targon 31 - m68*-nixdorf-sysv* ) machine=targon31 opsys=usg5-2-2 ;; - - dnl Nu (TI or LMI) - m68*-nu-sysv* ) machine=nu opsys=usg5-2 ;; - - dnl Plexus - m68*-plexus-sysv* ) machine=plexus opsys=usg5-2 ;; - - dnl Pyramid machines - pyramid-pyramid-bsd* ) machine=pyramid opsys=bsd4-2 ;; - - dnl Sequent Balance - ns32k-sequent-bsd4.2* ) machine=sequent opsys=bsd4-2 ;; - ns32k-sequent-bsd4.3* ) machine=sequent opsys=bsd4-3 ;; - - dnl Siemens Nixdorf - mips-siemens-sysv* | mips-sni-sysv*) - machine=mips-siemens opsys=usg5-4 - NON_GNU_CC=/usr/ccs/bin/cc - NON_GNU_CPP=/usr/ccs/lib/cpp - ;; - - dnl Silicon Graphics machines - dnl Iris 2500 and Iris 2500 Turbo (aka the Iris 3030) - m68*-sgi-iris3.5* ) machine=irist opsys=iris3-5 ;; - m68*-sgi-iris3.6* | m68*-sgi-iris*) machine=irist opsys=iris3-6 ;; - dnl Iris 4D - mips-sgi-irix3.* ) opsys=irix3-3 ;; - mips-sgi-irix4.* ) opsys=irix4-0 ;; - mips-sgi-irix6* ) opsys=irix6-0 ;; - mips-sgi-irix5.1* ) opsys=irix5-1 ;; - mips-sgi-irix5.2* ) opsys=irix5-2 ;; - mips-sgi-irix5.* ) opsys=irix5-3 ;; - mips-sgi-irix* ) opsys=irix5-0 ;; - - dnl SONY machines - *-sony-newsos[[34]]* | *-sony-news[[34]]* ) opsys=bsd4-3 ;; - *-sony-news* ) opsys=newsos5 ;; - - dnl Stride - m68*-stride-sysv* ) machine=stride opsys=usg5-2 ;; - - dnl Suns - *-*-solaris* | *-*-sunos* | *-sun-mach* | *-sun-bsd* ) - dnl Hardware type - case "$canonical" in - m68*-sunos1* ) machine=sun1 ;; - m68*-sunos2* ) machine=sun2 ;; - m68* ) machine=sun3 ;; - i*86*-sun-sunos[[34]]* ) machine=sun386 ;; - i*86-*-* ) machine=intel386 ;; - rs6000* ) machine=rs6000 ;; - esac - - dnl Make $canonical even more so. - case "$canonical" in *-sunos5*) - canonical=`echo $canonical | sed -e s/sunos5/solaris2/`;; - esac - - dnl On SunOS 4, use /usr/lib/cpp, sans dynodump, /bin/ranlib - dnl On SunOS 5, use cc -E, need dynodump, RANLIB not needed - dnl But, SunOS 5.6 no longer needs dynodump because it has a similar - dnl function integrated. - case "$canonical" in - *-sunos4* ) - #test -f /usr/lib/cpp && NON_GNU_CPP=/usr/lib/cpp ;; - : ;; - *-solaris2* ) - #test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp - RANLIB=':' ;; - esac - - case "$canonical" in - *-solaris* ) - opsys=sol2 - os_release=`uname -r | sed -e 's/^\([[0-9]]\)\.\([[0-9]]\).*/\1\2/'` - AC_DEFINE_UNQUOTED(OS_RELEASE, $os_release) ;; - - dnl The last Sun386 ran 4.0. - i*86-*-sunos4* ) opsys=sunos4-0 ;; - *-sunos4.0* ) opsys=sunos4-0 ;; - *-sunos4.1.2* ) opsys=sunos4-1-2 ;; - *-sunos4.1.3* ) opsys=sunos4-1-3 ;; - *-sunos4.1.[[4-9]]* ) opsys=sunos4-1-4 ;; - *-sunos4* | *-sunos ) opsys=sunos4-1 ;; - *-mach* ) opsys=mach-bsd4-3 ;; - * ) opsys=bsd4-2 ;; - esac - - case "$canonical" in *-sunos4*shr* ) opsys="${opsys}-shr" ;; esac - - dnl Watch out for a compiler guaranteed not to work. - test "$opsys $CC" = "sol2 /usr/ucb/cc" && CC="" - ;; - - dnl Tadpole 68k - m68*-tadpole-sysv* ) machine=tad68k opsys=usg5-3 ;; - - dnl Tahoe machines - tahoe-tahoe-bsd4.2* ) machine=tahoe opsys=bsd4-2 ;; - tahoe-tahoe-bsd4.3* ) machine=tahoe opsys=bsd4-3 ;; - - dnl Tandem Integrity S2 - mips-tandem-sysv* ) machine=tandem-s2 opsys=usg5-3 ;; - - dnl Tektronix XD88 - m88k-tektronix-sysv3* ) machine=tekxd88 opsys=usg5-3 ;; - - dnl Tektronix 16000 box (6130?) - ns16k-tektronix-bsd* ) machine=ns16000 opsys=bsd4-2 ;; - dnl Tektronix 4300 - dnl src/m/tek4300.h hints that this is a m68k machine. - m68*-tektronix-bsd* ) machine=tek4300 opsys=bsd4-3 ;; - - dnl Titan P2 or P3 - titan-titan-sysv* ) machine=titan opsys=usg5-3 ;; - - dnl Ustation E30 (SS5E) - m68*-unisys-uniplus* ) machine=ustation opsystem=unipl5-2 ;; - - dnl Vaxen. - vax-dec-* ) - case "$canonical" in - *-sysv[[01]]* | *-sysvr[[01]]* ) opsys=usg5-0 ;; - *-sysv2* | *-sysvr2* ) opsys=usg5-2 ;; - *-mach* ) opsys=mach-bsd4-3 ;; - esac - ;; - - dnl Whitechapel MG1 - ns16k-whitechapel-* ) machine=mg1 ;; - - dnl Wicat - m68*-wicat-sysv* ) machine=wicat opsys=usg5-2 ;; - - dnl Intel 386 machines where we do not care about the manufacturer - i[[3-9]]86-*-* ) - machine=intel386 - case "$canonical" in - *-isc1.* | *-isc2.[[01]]* ) opsys=386-ix ;; - *-isc2.2* ) opsys=isc2-2 ;; - *-isc4.0* ) opsys=isc4-0 ;; - *-isc4.* ) opsys=isc4-1 - GCC_TEST_OPTIONS=-posix - NON_GCC_TEST_OPTIONS=-Xp - ;; - *-isc* ) opsys=isc3-0 ;; - *-esix5* ) opsys=esix5r4 NON_GNU_CPP=/usr/lib/cpp ;; - *-esix* ) opsys=esix ;; - *-mach* ) opsys=mach-bsd4-3 ;; - *-xenix* ) opsys=xenix ;; - *-sco3.2v4* ) opsys=sco4 NON_GNU_CPP=/lib/cpp ;; - *-bsd386* | *-bsdi1* ) opsys=bsd386 ;; - *-bsdi3* ) opsys=bsdos3 ;; - *-bsdi2.1* ) opsys=bsdos2-1 ;; - *-bsdi2* ) opsys=bsdos2 ;; - *-sco3.2v5* ) opsys=sco5 ; - dnl This is a pain. Like the current USL cc, SCO cc -E - dnl tokenizes as it preprocesses, making configure very - dnl unhappy. Unfortunately, /lib/cpp does not understand - dnl flags like "-b elf", so we have to cheat in order to - dnl pick up the right defines for UNEXEC from the s-file. - dnl 01/05/95 robertl@dgii.com - if test "$dynamic" = "yes" ; then - NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE -D_SCO_ELF" ; - else - NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE" ; - fi ;; - *-386bsd* ) opsys=386bsd ;; - *-freebsd* ) opsys=freebsd ;; - *-nextstep* ) opsys=nextstep ;; - *-pc-cygwin32 ) opsys=cygwin32 ;; - dnl Otherwise, we fall through to the generic opsys code at the bottom. - esac - ;; - - dnl Linux/68k - m68k-*-linux* ) machine=m68k opsys=linux ;; - -esac - -if test -z "$machine" -o -z "$opsys"; then - (echo "$progname: XEmacs hasn't been ported to \`$canonical' systems." - echo "$progname: Check \`etc/MACHINES' for recognized configuration names." - ) >&2 - exit 1 -fi - -if test -z "$dynamic"; then - case "$opsys" in - hpux* | sunos4* | sco5 ) dynamic=no ;; - *) dynamic=yes ;; - esac -fi -if test "$dynamic" = "yes"; then - case "$opsys" in - hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;; - decosf* ) ld_call_shared="-call_shared" ;; - esac -else dnl "$dynamic" = "no" - case "$opsys" in - sol2 ) - echo "Static linking is not supported on Solaris 2." - echo "Rerun configure without specifying --dynamic=no." - exit 1 ;; - linux ) ld_call_shared="-Bstatic" ;; - decosf* ) ld_call_shared="-non_shared" ;; - esac -fi - -dnl Use xlc by default on AIX -case "$opsys" in aix*) NON_GNU_CC=xlc ;; esac - -stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'` -AC_DEFINE_UNQUOTED(STACK_TRACE_EYE_CATCHER, $stack_trace_eye_catcher) - -machfile="m/${machine}.h" -opsysfile="s/${opsys}.h" - -dnl -------------------------------------------------- -dnl Determine the compiler, set up for feature testing -dnl -------------------------------------------------- - -dnl Sun Development environment support -test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias -XE_CHECK_FEATURE_DEPENDENCY(workshop, tooltalk) -if test "$with_workshop" = "yes"; then - AC_DEFINE(SUNPRO) - XE_ADD_OBJS(sunpro.o) -fi - -if test "$with_clash_detection" = "yes"; then - AC_DEFINE(CLASH_DETECTION) - XE_ADD_OBJS(filelock.o) -fi - -dnl Choose a compiler from (in order) -dnl --compiler, env var CC, with_gcc=no && ${NON_GNU_CC:-cc}, AC_PROG_CC -test -n "$compiler" && CC="$compiler" -if test "$with_gcc" = "no"; then dnl Try to find a non-gcc compiler - case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac -fi - -dnl If we don't set CFLAGS here, AC_PROG_CC will set it. -dnl But we know better what's good for us, so we do our own -dnl computation of real CFLAGS later. -dnl --cflags overrides environment variable CFLAGS -test "${cflags-unset}" != unset && CFLAGS="$cflags" -if test "${CFLAGS-unset}" != unset - then cflags_specified=yes; - else cflags_specified=no; -fi - -xe_save_CFLAGS="$CFLAGS" - -AC_PROG_CC dnl Autoconf has its own magic for compiler autodetection - -dnl Retry using random guesswork if AC_PROG_CC got it wrong... -if test "$with_gcc" = "no" -a "$GCC" = "yes"; then - CC=${NON_GNU_CC-cc} - AC_PROG_CC -elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then - CC=gcc - AC_PROG_CC -fi -CFLAGS="$xe_save_CFLAGS" - -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" - -AC_PROG_CPP - -AC_AIX - -AC_MSG_CHECKING(for GNU libc) -AC_TRY_COMPILE([#include ],[ -#if ! (defined __GLIBC__ || defined __GNU_LIBRARY__) -#error Not a GNU libc system :-( -******* ======= ******** &&&&&&&& -#endif -], have_glibc=yes, have_glibc=no) -AC_MSG_RESULT($have_glibc) -dnl I'm tired of pop being broken with GLIBC -slb -dnl Well. then why not fix fucking pop? -test "$have_glibc" = "yes" && AC_DEFINE(_GNU_SOURCE) - -AC_MSG_CHECKING(whether we are using SunPro C) -AC_TRY_COMPILE([],[#ifndef __SUNPRO_C -#error Not a SunPro compiler :-( -******* ======= ******** &&&&&&&& -#endif -], __sunpro_c=yes, __sunpro_c=no) -AC_MSG_RESULT($__sunpro_c) - -dnl case "$canonical" in -dnl *-sun-sunos* ) test "$CPP" = "acc -E" && CPP="acc -E -Xs" ;; -dnl esac - -dnl -------------------------------------------------------------------- -dnl Extract some information from the operating system and machine files -dnl -------------------------------------------------------------------- - -echo "Extracting information from the machine- and system-dependent headers..." - -dnl It is not important that this name contain the PID; you cannot run -dnl two configures in the same directory and have anything work -dnl anyway. -tempcname="conftest.c" - -dnl CPP_to_sh(CPP_SYMBOL, SH_VAR, DEFAULT_VALUE) -define([CPP_to_sh], -[[#]ifndef [$1] -[#]define [$1]ifelse([$3],,, [ "$3"]) -[#]endif -configure___ [$2]=[$1] -])dnl CPP_to_sh - -dnl CPP_boolean_to_sh(CPP_SYMBOL, SH_VAR) -define([CPP_boolean_to_sh], -[[#]ifdef [$1] -configure___ [$2]=yes -[#]else -configure___ [$2]=no -[#]endif -])dnl CPP_boolean_to_sh - -cat > $tempcname </dev/null`" && \ - eval "$xe_add_unique_runpath_dir" -}])dnl - -dnl XE_COMPUTE_RUNPATH() -define([XE_COMPUTE_RUNPATH],[ -if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then - dnl Remove runtime paths from current ld switches - ld_switch_site=`echo '' $ld_switch_site | sed -e 's:^ ::' -e "s/$dash_r[[^ ]]*//g"` - ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[[^ ]]*//g"` - dnl PRINT_VAR(ld_switch_site ld_switch_x_site) - - dnl Fix up Runtime path - dnl If LD_RUN_PATH is set in environment, use that. - dnl In this case, assume user has set the right value. - runpath="" runpath_dirs="" - if test -n "$LD_RUN_PATH"; then - runpath="$LD_RUN_PATH" - elif test "$GCC" = "yes"; then - dnl Compute runpath from gcc's -v output - ld_switch_run_save="$ld_switch_run"; ld_switch_run="" - echo "int main(int argc, char *argv[[]]) {return 0;}" > conftest.c - xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null' - for arg in `eval "$xe_runpath_link" | grep ' -L'`; do - case "$arg" in P,* | -L* | -R* ) - for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do - XE_ADD_RUNPATH_DIR("$dir") - done ;; - esac - done - ld_switch_run="$ld_switch_run_save" - rm -f conftest* - else - dnl Add all directories with .so files to runpath - for arg in $ld_switch_site $ld_switch_x_site; do - case "$arg" in -L*) XE_ADD_RUNPATH_DIR(`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`);; esac - done - dnl Sometimes /opt/SUNWdt/lib is the only installed Motif available - if test "$opsys $need_motif" = "sol2 yes"; then - xe_runpath_dir="/opt/SUNWdt/lib"; - eval "$xe_add_unique_runpath_dir"; - fi - fi dnl Compute $runpath - - if test -n "$runpath"; then - ld_switch_run="${dash_r}${runpath}" - XE_PROTECT_LINKER_FLAGS(ld_switch_run) - test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath" - fi -fi -])dnl -XE_COMPUTE_RUNPATH() - -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_get_state, ,doug_lea_malloc=no) -AC_CHECK_FUNC(malloc_set_state, ,doug_lea_malloc=no) -AC_MSG_CHECKING(whether __after_morecore_hook exists) -AC_TRY_LINK([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" ; then - if test "$GNU_MALLOC" = yes ; then - GNU_MALLOC_reason=" - (Using Doug Lea's new malloc from the GNU C Library.)" - fi - AC_DEFINE(DOUG_LEA_MALLOC) - 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_) - fi - use_minimal_tagbits=yes -fi - -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 -dnl have_libmcheck=no -dnl if test "$error_check_malloc" = "yes" -a \ -dnl "$have_glibc" = "yes" -a \ -dnl "$doug_lea_malloc" = "yes"; then -dnl AC_CHECK_HEADERS(mcheck.h) -dnl AC_CHECK_LIB(mcheck, mcheck, have_libmcheck=yes, have_libmcheck=no) -dnl fi - -dnl if test "$have_libmcheck" = "yes"; then -dnl AC_DEFINE(HAVE_LIBMCHECK) -dnl libmcheck=-lmcheck -dnl AC_SUBST(libmcheck) -dnl fi - -dnl Some other nice autoconf tests. If you add a test here which -dnl should make an entry in src/config.h, do not forget to add an -dnl #undef clause to src/config.h.in for autoconf to modify. - -AC_PROG_RANLIB -AC_PROG_INSTALL -AC_PROG_YACC - -dnl checks for header files -AC_CHECK_HEADERS(mach/mach.h sys/stropts.h sys/timeb.h sys/time.h unistd.h) -AC_CHECK_HEADERS(utime.h locale.h libgen.h fcntl.h ulimit.h) -AC_CHECK_HEADERS(linux/version.h kstat.h sys/pstat.h inttypes.h sys/un.h a.out.h) -AC_HEADER_SYS_WAIT -AC_HEADER_STDC -AC_HEADER_TIME -AC_DECL_SYS_SIGLIST - -dnl Some systems have utime.h but do not declare the struct anyplace. -AC_MSG_CHECKING(for struct utimbuf) -AC_TRY_COMPILE([#ifdef TIME_WITH_SYS_TIME -#include -#include -#else -#ifdef HAVE_SYS_TIME_H -#include -#else -#include -#endif -#endif -#ifdef HAVE_UTIME_H -#include -#endif], [static struct utimbuf x; x.actime = x.modtime;], - [AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_STRUCT_UTIMBUF)], - AC_MSG_RESULT(no)) - -dnl checks for typedefs -AC_TYPE_SIGNAL -AC_TYPE_SIZE_T -AC_TYPE_PID_T -AC_TYPE_UID_T -AC_TYPE_MODE_T -AC_TYPE_OFF_T - -AC_MSG_CHECKING(for struct timeval) -AC_TRY_COMPILE([#ifdef TIME_WITH_SYS_TIME -#include -#include -#else -#ifdef HAVE_SYS_TIME_H -#include -#else -#include -#endif -#endif], [static struct timeval x; x.tv_sec = x.tv_usec;], - [AC_MSG_RESULT(yes) - HAVE_TIMEVAL=yes - AC_DEFINE(HAVE_TIMEVAL)], - [AC_MSG_RESULT(no) - HAVE_TIMEVAL=no]) - -dnl checks for structure members -AC_STRUCT_TM -AC_STRUCT_TIMEZONE - -dnl checks for compiler characteristics -AC_C_CONST - -dnl check for Make feature -AC_PROG_MAKE_SET - -dnl check byte order -AC_C_BIGENDIAN - -dnl define SIZEOF_TYPE -AC_CHECK_SIZEOF(short) -if test "$ac_cv_sizeof_short" = 0; then - echo "" - echo "*** PANIC *** Configure tests are not working - compiler is broken." - echo "*** PANIC *** Please examine config.log for compilation errors." - exit 1 -fi -AC_CHECK_SIZEOF(int) -AC_CHECK_SIZEOF(long) -AC_CHECK_SIZEOF(long long) -AC_CHECK_SIZEOF(void *) - -dnl check for long file names -AC_SYS_LONG_FILE_NAMES - -dnl -lm is required by LISP_FLOAT_TYPE, among other things -AC_CHECK_LIB(m, sin) - -dnl Floating operation support is now unconditional -AC_DEFINE(LISP_FLOAT_TYPE) - -AC_TRY_LINK([#include ], - [return atanh(1.0) + asinh(1.0) + acosh(1.0); ], - AC_DEFINE(HAVE_INVERSE_HYPERBOLIC)) - -dnl Determine type of mail locking from configure args and s&m headers -AC_CHECKING(type of mail spool file locking) -test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock -test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf -if test "$mail_locking" = "lockf"; then AC_DEFINE(REAL_MAIL_USE_LOCKF) -elif test "$mail_locking" = "flock"; then AC_DEFINE(REAL_MAIL_USE_FLOCK) -else mail_locking="dot-locking" -fi - -dnl Used by getloadavg() - does not require root priveleges -AC_CHECK_LIB(kstat, kstat_open) - -dnl Another way to get the load average -AC_CHECK_LIB(kvm, kvm_read) - -case "$opsys" in decosf*) - AC_CHECK_LIB(pthreads, cma_open) - test "$ac_cv_lib_pthreads_cma_open" = "yes" && \ - c_switch_site="$c_switch_site -threads" ;; -esac - -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); XE_APPEND(-xildoff, ld_switch_site) - fi - else AC_MSG_RESULT(no) -fi - -dnl Link with "-z ignore" on Solaris if supported -if test "$opsys" = "sol2" && test "$OS_RELEASE" -ge 56; then - AC_MSG_CHECKING(for \"-z ignore\" linker flag) - case "`ld -h 2>&1`" in - *-z\ ignore\|record* ) AC_MSG_RESULT(yes) - XE_PREPEND(-z ignore, ld_switch_site) ;; - *) AC_MSG_RESULT(no) ;; - esac -fi - -dnl ---------------------- -dnl Choose a window system -dnl ---------------------- - -AC_CHECKING("for specified window system") - -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 - - 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 "$x_includes" = "NONE"; 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/X11R6"; do - if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi - done - fi - - if test "$x_libraries" = "NONE"; then - for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do - if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi - done - fi - - AC_PATH_XTRA # Autoconf claims to find X library and include dirs for us. - 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 - -case "$with_x11" in - yes ) window_system=x11 HAVE_X_WINDOWS=yes ;; - no ) window_system=none HAVE_X_WINDOWS=no ;; -esac - -if test "$with_x11" = "yes"; then - AC_DEFINE(HAVE_X_WINDOWS) - XE_APPEND(lwlib, MAKE_SUBDIR) - XE_APPEND(lwlib, SRC_SUBDIR_DEPS) - - dnl Try to find Motif/CDE/Tooltalk 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" - XE_PREPEND(-L${lib_dir}, X_LIBS) ;; - esac - case "$x_includes" in "$inc_dir"* ) ;; *) - x_includes="$inc_dir $x_includes" - XE_PREPEND(-I${inc_dir}, X_CFLAGS) ;; - esac - break; dnl only need ONE Motif implementation! - fi - done - - dnl Contrib X libs/includes do NOT take precedence, so AP-pend - for rel in "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" - XE_APPEND(-L${lib_dir}, X_LIBS) - esac - case "$x_includes" in "$inc_dir"* ) ;; *) - x_includes="$x_includes $inc_dir" - XE_APPEND(-I${inc_dir}, X_CFLAGS) - esac - break; dnl Only need ONE X11 implementation ! - fi - done - - ld_switch_x_site="$X_LIBS" - - XE_COMPUTE_RUNPATH() - - if test "$extra_verbose" = "yes"; then - echo; echo "X11 compilation variables:" - 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 - test ! -z "$bitmapdirs" && AC_DEFINE_UNQUOTED(BITMAPDIR, "$bitmapdirs") - - dnl Autodetect defines extracted from X config by xmkmf, e.g. NARROWPROTO - AC_CHECKING(for X defines extracted by xmkmf) - rm -fr conftestdir - if mkdir conftestdir; then - cd conftestdir - cat > Imakefile <<'EOF' -xetest: - @echo ${PROTO_DEFINES} ${STD_DEFINES} -EOF - if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then - # GNU make sometimes prints "make[1]: Entering...", which would confuse us. - xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make` - fi - cd .. - rm -fr conftestdir - for word in $xmkmf_defines; do - case "$word" in - -D*=* ) ;; - -D* ) word=`echo '' $word | sed -e 's:^ *-D::'` - AC_DEFINE_UNQUOTED($word) ;; - esac - done - fi - - dnl make sure we can find Intrinsic.h - AC_CHECK_HEADER(X11/Intrinsic.h, , - [AC_MSG_ERROR("Unable to find X11 header files.")]) - - dnl -lXt and -lX11 are required - dnl Some broken systems require the magic "-b i486-linuxaout" flag - AC_CHECK_LIB(X11, XOpenDisplay, have_lib_x11=yes) - if test "$have_lib_x11" != "yes"; then - AC_CHECK_LIB(X11, XGetFontProperty, - ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site", - [AC_MSG_ERROR("Unable to find X11 libraries.")], - -b i486-linuxaout) - fi - libs_x="-lX11" - test "$extra_verbose" = "yes" && echo " Setting libs_x to \"-lX11\"" - - dnl Autodetect -lXext - AC_CHECK_LIB(Xext, XShapeSelectInput, XE_PREPEND(-lXext, libs_x)) - - dnl Require -lXt - AC_CHECK_LIB(Xt, XtOpenDisplay, XE_PREPEND(-lXt, libs_x), - AC_MSG_ERROR("Unable to find X11 libraries.")) - - AC_MSG_CHECKING(the version of X11 being used) - AC_TRY_RUN([#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(THIS_IS_X11R${x11_release}) - - AC_CHECK_HEADERS(X11/Xlocale.h) - - dnl remove this - we should avoid checking for specific OS - AC_MSG_CHECKING(for XFree86) - if test -d "/usr/X386/include" -o \ - -f "/etc/XF86Config" -o \ - -f "/etc/X11/XF86Config" -o \ - -f "/usr/X11R6/lib/X11/XF86Config"; then - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_XFREE386) - else - AC_MSG_RESULT(no) - fi - - dnl autodetect -lXmu - test -z "$with_xmu" && { AC_CHECK_LIB(Xmu, XmuReadBitmapDataFromFile, - with_xmu=yes, with_xmu=no) } - if test "$with_xmu" = "no"; then - XE_ADD_OBJS(xmu.o) - else - XE_PREPEND(-lXmu, libs_x) - AC_DEFINE(HAVE_XMU) - fi - - dnl Autodetect -lXbsd - dnl #### Someone, please add a better function than main - AC_CHECK_LIB(Xbsd, main, XE_PREPEND(-lXbsd, libs_x)) - - dnl Problem with the MIT distribution of X on AIX - if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then - dnl X11R6 requires thread-safe code on AIX for some reason - if test "$GCC" = "yes"; then - XE_PREPEND(-mthreads, X_CFLAGS) - XE_PREPEND(-mthreads, libs_x) - else - case "$CC" in - "xlc" ) CC="xlc_r" ;; - "xlC" ) CC="xlC_r" ;; - "cc" ) CC="cc_r" ;; - esac - fi - fi - -fi dnl $with_x11 = yes - -if test "$with_msw" != "no"; then - AC_CHECKING(for MS-Windows) - AC_CHECK_LIB(gdi32,main,with_msw=yes) - if test "$with_msw" = "yes"; then - AC_DEFINE(HAVE_MS_WINDOWS) - install_pp="$blddir/lib-src/installexe.sh" - XE_APPEND(-lshell32 -lgdi32 -luser32 -lcomctl32, libs_system) - if test "$window_system" != x11; then - window_system=msw - test "$with_scrollbars" != "no" && with_scrollbars=msw \ - && XE_ADD_OBJS(scrollbar-msw.o) - test "$with_menubars" != "no" && with_menubars=msw \ - && XE_ADD_OBJS(menubar-msw.o) - test "$with_toolbars" != "no" && with_toolbars=msw \ - && XE_ADD_OBJS(toolbar-msw.o) - test "$with_dialogs" != "no" && with_dialogs=msw \ - && XE_ADD_OBJS(dialog-msw.o) - else - test "$with_scrollbars" != "no" && XE_ADD_OBJS(scrollbar-msw.o) - test "$with_menubars" != "no" && XE_ADD_OBJS(menubar-msw.o) - test "$with_toolbars" != "no" && XE_ADD_OBJS(toolbar-msw.o) - test "$with_dialogs" != "no" && XE_ADD_OBJS(dialog-msw.o) - fi - dnl check for our special version of select - AC_TRY_RUN([#include - int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }], - [AC_DEFINE(HAVE_MSG_SELECT)]) - const_is_losing=no - with_file_coding=yes - use_minimal_tagbits=yes - use_indexed_lrecord_implementation=yes - XE_ADD_OBJS(console-msw.o device-msw.o event-msw.o frame-msw.o objects-msw.o select-msw.o redisplay-msw.o glyphs-msw.o) - fi -fi - -AC_SUBST(install_pp) - -test -z "$window_system" && window_system="none" - -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 - 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 mswindows support - currently none -dnl ### MS-Windows folks: add code here..... (martin) -if test "$with_msw" != "yes"; then - for feature in MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES - do - if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then - AC_MSG_WARN([--with-$feature ignored: Not valid without MS-Windows support]) - fi - eval "with_${feature}=no" - done -else - : -fi - -dnl Test for features that require X11 support -if test "$with_x11" != "yes"; then - dnl It ought to be reasonable to have no output device at all, and only use - dnl XEmacs in --batch mode. - dnl if test "$with_tty" = "no" ; then - dnl AC_MSG_ERROR([No window system support and no TTY support - Unable to proceed.]) - dnl fi - for feature in tooltalk cde offix session xim xmu \ - xface - 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 FSF 19.29 has some bitmapdir stuff here. -bitmapdir= - -case "$window_system" in - x11 ) HAVE_X_WINDOWS=yes; echo " Using X11." ;; - msw ) HAVE_X_WINDOWS=no ; echo " Using MS-Windows." ;; - none ) HAVE_X_WINDOWS=no ; echo " Using no window system." ;; -esac - -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 session-management -AC_CHECKING(for session-management option); -dnl if test "$with_session" = "yes"; then -if test "$with_session" != "no"; then - AC_DEFINE(HAVE_SESSION) -fi - -dnl Autodetect Xauth -dnl -lXau is only used by gnuclient, so use a special variable for Xauth X libs -test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no -test -z "$with_xauth" && { AC_CHECK_HEADER(X11/Xauth.h, ,with_xauth=no) } -test -z "$with_xauth" && { AC_CHECK_LIB(Xau, XauGetAuthByAddr,[:],with_xauth=no) } -test -z "$with_xauth" && with_xauth=yes -if test "$with_xauth" = "yes"; then - AC_DEFINE(HAVE_XAUTH) - XE_SPACE(libs_xauth, $X_EXTRA_LIBS -lXau $libs_x $X_PRE_LIBS) -fi -AC_SUBST(libs_xauth) - -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 tooltalk -if test "$with_tooltalk" != "no" ; then - dnl autodetect the location of tt_c.h - dnl tt_c.h might be in Tt or desktop include directories - for dir in "" "Tt/" "desktop/" ; do - AC_CHECK_HEADER(${dir}tt_c.h, tt_c_h_path="${dir}tt_c.h"; break) - done - if test -z "$tt_c_h_path"; then - if test "$with_tooltalk" = "yes"; then - USAGE_ERROR("Unable to find required tooltalk header files.") - fi - with_tooltalk=no - fi -fi -if test "$with_tooltalk" != "no" ; then - for extra_libs in "" "-lI18N -lce" "-lcxx"; do - AC_CHECK_LIB(tt, tt_message_create, - tt_libs="-ltt $extra_libs"; break, [:],$extra_libs) - done - if test -z "$tt_libs"; then - if test "$with_tooltalk" = "yes"; then - USAGE_ERROR("Unable to find required tooltalk libraries.") - fi - with_tooltalk=no - fi -fi -test -z "$with_tooltalk" && with_tooltalk=yes -if test "$with_tooltalk" = "yes"; then - AC_DEFINE(TOOLTALK) - AC_DEFINE_UNQUOTED(TT_C_H_PATH, "$tt_c_h_path") - XE_PREPEND($tt_libs, libs_x) - XE_ADD_OBJS(tooltalk.o) -fi - -dnl Autodetect CDE -test -z "$with_cde" && { AC_CHECK_HEADER(Dt/Dt.h, , with_cde=no) } -test -z "$with_cde" && { AC_CHECK_LIB(DtSvc, DtDndDragStart, [:], with_cde=no) } -test -z "$with_cde" && with_cde=yes -if test "$with_dragndrop" = no; then - AC_MSG_WARN([No CDE without generic Drag'n'Drop support]) - with_cde=no -fi -if test "$with_cde" = "yes" ; then - AC_DEFINE(HAVE_CDE) - XE_PREPEND(-lDtSvc, libs_x) - XE_APPEND(CDE, dragndrop_proto) - with_tooltalk=yes # CDE requires Tooltalk - need_motif=yes # CDE requires Motif -fi - -dnl Always compile OffiX unless --without-offix is given, no -dnl X11 support is compiled in, no standard Xmu is avaiable, -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 - AC_MSG_WARN([No OffiX without real Xmu support]) - with_offix=no -fi -if test "$with_dragndrop" = no; then - AC_MSG_WARN([No OffiX without generic Drag'n'Drop support]) - with_offix=no -fi -if test "$with_cde" = yes; then - AC_MSG_WARN([CDE already found, disabling OffiX support]) - with_offix=no -fi -test -z "$with_offix" && with_offix=no -if test "$with_offix" = "yes"; then - AC_DEFINE(HAVE_OFFIX_DND) - XE_APPEND(offix.o, dnd_objs) - XE_APPEND(OffiX, dragndrop_proto) -fi - -dnl Autodetect Drag'n'Drop support -dnl always included if CDE, Offix, or MSWindows are defined -AC_MSG_CHECKING(if drag and drop API is needed) -if test "$with_dragndrop" != "no" ; then - if test -n "$dragndrop_proto" ; then - with_dragndrop=yes - AC_MSG_RESULT([yes (${dragndrop_proto} )]) - AC_DEFINE(HAVE_DRAGNDROP) - XE_APPEND(dragdrop.o, extra_objs) - else - with_dragndrop=no - AC_MSG_RESULT(no) - fi -fi - -dnl Autodetect LDAP -AC_CHECKING(for LDAP) -test -z "$with_ldap" && { AC_CHECK_HEADER(ldap.h, ,with_ldap=no) } -test -z "$with_ldap" && { AC_CHECK_HEADER(lber.h, ,with_ldap=no) } -if test "$with_ldap" != "no"; then - test -z "$with_umich_ldap" && { AC_CHECK_LIB(ldap, ldap_open, with_umich_ldap=yes, with_umich_ldap=no, -llber) } - test "$with_umich_ldap" = "no" && { AC_CHECK_LIB(ldap10, ldap_set_option, with_ns_ldap=yes, with_ns_ldap=no) } - test -z "$with_ldap" -a \( "$with_umich_ldap" = "yes" -o "$with_ns_ldap" = "yes" \) && with_ldap=yes -fi -if test "$with_ldap" = "yes"; then - AC_DEFINE(HAVE_LDAP) - XE_ADD_OBJS(eldap.o) - if test "$with_umich_ldap" = "yes" ; then - AC_DEFINE(HAVE_UMICH_LDAP) - XE_PREPEND(-llber, LIBS) - XE_PREPEND(-lldap, LIBS) - elif test "$with_ldap" = "yes" -a "$with_ns_ldap" = "yes" ; then - AC_DEFINE(HAVE_NS_LDAP) - XE_PREPEND(-lldap10, LIBS) - elif test "$with_ldap" = "yes" ; then - XE_PREPEND(-lldap, LIBS) - fi -fi - -dnl ---------------------- -dnl Graphics libraries -dnl ---------------------- - -if test "$window_system" != "none"; then - AC_CHECKING(for graphics libraries) - - dnl Autodetect Xpm - if test -z "$with_xpm"; then - AC_MSG_CHECKING(for Xpm - no older than 3.4f) - xe_check_libs=-lXpm - AC_TRY_RUN([#include - int main(int c, char **v) { - return c == 1 ? 0 : - XpmIncludeVersion != XpmLibraryVersion() ? 1 : - XpmIncludeVersion < 30406 ? 2 : 0 ;}], - [./conftest dummy_arg; xpm_status=$?; - if test "$?" = "0"; then - with_xpm=yes; - else - with_xpm=no; - if test "$?" = "1"; then - xpm_problem="Xpm library version and header file version don't match!" - elif test "$?" = "2"; then - xpm_problem="Xpm library version is too old!" - else - xpm_problem="Internal xpm detection logic error!" - fi - echo " -*** WARNING *** $problem - I'm not touching that with a 10-foot pole! - If you really want to use the installed version of Xpm, rerun - configure --with-xpm=yes, but don't blame me if XEmacs crashes!" - fi], - [with_xpm=no]) - xe_check_libs= - AC_MSG_RESULT($with_xpm) - fi - if test "$with_xpm" = "yes"; then - AC_DEFINE(HAVE_XPM) - XE_PREPEND(-lXpm, libs_x) - AC_MSG_CHECKING(for \"FOR_MSW\" xpm) - xe_check_libs=-lXpm - AC_TRY_LINK(, [XpmCreatePixmapFromData()], - [xpm_for_msw=no], - [xpm_for_msw=yes]) - xe_check_libs= - AC_MSG_RESULT($xpm_for_msw) - if test "$xpm_for_msw" = "yes"; then - AC_DEFINE(FOR_MSW) - fi - fi - - dnl Too many stupid linkers can't detect cascaded lib dependencies until runtime - dnl So we always search for libz compression support. - if test "$with_png $with_tiff" != "no no"; then - AC_CHECK_LIB(c, inflate, [:], [ - AC_CHECK_LIB(z, inflate, [XE_PREPEND(-lz, libs_x)],[ - AC_CHECK_LIB(gz, inflate, [XE_PREPEND(-lgz, libs_x)])])]) - fi - - dnl Autodetect GIFlib - AC_MSG_CHECKING(for gifreader) - test -z "$with_gif" && { AC_CHECK_HEADER(gifrlib.h, ,with_gif=no) } - test -z "$with_gif" && { AC_CHECK_LIB(gifreader, GetGifError,[:] ,with_gif=no) } - test -z "$with_gif" && with_gif=yes - if test "$with_gif" = "yes"; then - AC_DEFINE(HAVE_GIF) - XE_PREPEND(-lgifreader, libs_x) - fi - - dnl autodetect JPEG - test -z "$with_jpeg" && { AC_CHECK_HEADER(jpeglib.h, ,with_jpeg=no) } - test -z "$with_jpeg" && { AC_CHECK_LIB(jpeg, jpeg_destroy_decompress,[:],with_jpeg=no) } - test -z "$with_jpeg" && with_jpeg=yes - if test "$with_jpeg" = "yes"; then - AC_DEFINE(HAVE_JPEG) - XE_PREPEND(-ljpeg, libs_x) - fi - - dnl autodetect PNG - if test -z "$with_png"; then - AC_MSG_CHECKING(for png.h - no older than 0.96) - AC_EGREP_CPP(yes, -[#include -#if PNG_LIBPNG_VER >= 96 -yes -#endif -], [AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no); with_png=no]) - fi - test -z "$with_png" && { AC_CHECK_FUNC(pow, ,with_png=no) } - test -z "$with_png" && { AC_CHECK_LIB(png, png_read_image,[:],with_png=no) } - test -z "$with_png" && with_png=yes - if test "$with_png" = "yes"; then - AC_DEFINE(HAVE_PNG) - XE_PREPEND(-lpng, libs_x) - fi - - dnl autodetect TIFF - test -z "$with_tiff" && { AC_CHECK_HEADER(tiffio.h, ,with_tiff=no) } - test -z "$with_tiff" && { AC_CHECK_LIB(tiff, TIFFClientOpen,[:],with_tiff=no) } - test -z "$with_tiff" && with_tiff=yes - if test "$with_tiff" = "yes"; then - AC_DEFINE(HAVE_TIFF) - XE_PREPEND(-ltiff, libs_x) - fi -fi - -dnl ---------------------- -dnl Graphics libraries -dnl ---------------------- - -if test "$with_x11" = "yes"; then - - AC_CHECKING(for X11 graphics libraries) - - dnl Autodetect XFACE - test -z "$with_xface" && { AC_CHECK_HEADER(compface.h, ,with_xface=no) } - test -z "$with_xface" && { AC_CHECK_LIB(compface, UnGenFace,[:] ,with_xface=no) } - test -z "$with_xface" && with_xface=yes - if test "$with_xface" = "yes"; then - AC_DEFINE(HAVE_XFACE) - XE_PREPEND(-lcompface, libs_x) - fi - - dnl Autodetect -lXaw - AC_CHECK_LIB(Xaw, XawScrollbarSetThumb, have_xaw=yes, have_xaw=no) - dnl if test "$have_xaw" = "yes"; then - dnl AC_CHECK_HEADER(X11/Xaw/Reports.h, [ - dnl XE_APPEND(pkg-src/tree-x, MAKE_SUBDIR) - dnl XE_APPEND(pkg-src/tree-x, INSTALL_ARCH_DEP_SUBDIR)]) - dnl fi - - dnl autodetect Motif - but only add to libs_x later (if necessary) - AC_CHECK_HEADER(Xm/Xm.h, - [AC_CHECK_LIB(Xm, XmStringFree, have_motif=yes, have_motif=no)], - have_motif=no) - - if test "$have_motif" = "yes"; then - dnl autodetect lesstif - AC_MSG_CHECKING(for Lesstif) - AC_EGREP_CPP(yes, -[#include -#ifdef LESSTIF_VERSION -yes -#endif -], have_lesstif=yes, have_lesstif=no) - AC_MSG_RESULT($have_lesstif) - fi - -fi dnl "$with_x11" = "yes" - -dnl Finish ensuring that we have values for the various toolkit items. -dnl Not all toolkits support all widgets -dnl if Motif is available we use it for the dialog boxes. - -case "$with_menubars" in "" | "yes" | "athena" | "athena3d" ) - with_menubars="lucid" ;; -esac -case "$with_dialogs" in "" | "yes" | "lucid" ) - if test "$have_motif" = "yes"; then with_dialogs="motif" - elif test "$have_xaw" = "yes"; then with_dialogs="athena" - else with_dialogs=no - fi ;; -esac -case "$with_scrollbars" in "" | "yes" ) - with_scrollbars="lucid" ;; -esac - -all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars" - -case "$all_widgets" in *athena* ) - AC_DEFINE(LWLIB_USES_ATHENA) - AC_DEFINE(NEED_ATHENA) - XE_APPEND(lwlib-Xaw.o, lwlib_objs) - XE_PREPEND(-lXaw, libs_x) ;; -esac - -case "$all_widgets" in *motif* ) - AC_DEFINE(LWLIB_USES_MOTIF) - AC_DEFINE(NEED_MOTIF) - XE_APPEND(lwlib-Xm.o, lwlib_objs) - need_motif=yes ;; -esac - -test "$with_menubars" = "lucid" && XE_APPEND(xlwmenu.o, lwlib_objs) -test "$with_menubars" = "motif" && XE_APPEND(xlwmenu.o, lwlib_objs) -test "$with_scrollbars" = "lucid" && XE_APPEND(xlwscrollbar.o, lwlib_objs) -case "$all_widgets" in *lucid* ) - AC_DEFINE(NEED_LUCID) - XE_APPEND(lwlib-Xlw.o, lwlib_objs) ;; -esac - -AC_SUBST(lwlib_objs) - -case "$with_scrollbars" in athena* ) AC_DEFINE(LWLIB_SCROLLBARS_ATHENA);; esac -case "$with_dialogs" in athena* ) AC_DEFINE(LWLIB_DIALOGS_ATHENA) ;; esac -test "$with_scrollbars" = "athena3d" && AC_DEFINE(LWLIB_SCROLLBARS_ATHENA3D) -test "$with_dialogs" = "athena3d" && AC_DEFINE(LWLIB_DIALOGS_ATHENA3D) - -test "$with_menubars" != "no" && AC_DEFINE(HAVE_MENUBARS) -test "$with_scrollbars" != "no" && AC_DEFINE(HAVE_SCROLLBARS) -test "$with_dialogs" != "no" && AC_DEFINE(HAVE_DIALOGS) -test "$with_toolbars" != "no" && AC_DEFINE(HAVE_TOOLBARS) - -test "$with_menubars" = "lucid" && AC_DEFINE(LWLIB_MENUBARS_LUCID) -test "$with_scrollbars" = "lucid" && AC_DEFINE(LWLIB_SCROLLBARS_LUCID) - -test "$with_menubars" = "motif" && AC_DEFINE(LWLIB_MENUBARS_MOTIF) -test "$with_scrollbars" = "motif" && AC_DEFINE(LWLIB_SCROLLBARS_MOTIF) -test "$with_dialogs" = "motif" && AC_DEFINE(LWLIB_DIALOGS_MOTIF) - -test "$with_menubars" != "no" && XE_ADD_OBJS(menubar.o) -test "$with_scrollbars" != "no" && XE_ADD_OBJS(scrollbar.o) -test "$with_dialogs" != "no" && XE_ADD_OBJS(dialog.o) -test "$with_toolbars" != "no" && XE_ADD_OBJS(toolbar.o) -test "$all_widgets" != "no no no no" && XE_ADD_OBJS(gui.o) - -if test "$with_x11" = "yes"; then - test "$with_menubars" != "no" && XE_ADD_OBJS(menubar-x.o) - test "$with_scrollbars" != "no" && XE_ADD_OBJS(scrollbar-x.o) - test "$with_dialogs" != "no" && XE_ADD_OBJS(dialog-x.o) - test "$with_toolbars" != "no" && XE_ADD_OBJS(toolbar-x.o) - test "$all_widgets" != "no no no no" && XE_ADD_OBJS(gui-x.o) -else - if test \( "$with_sound" = "nas" \) -o \( "$with_sound" = "both" \); then - echo "Attempt to Build NAS sound without X" - echo "Please remove NAS configuration or build with X" - exit 1 - fi -fi - -test "$use_minimal_tagbits" = "yes" && AC_DEFINE(USE_MINIMAL_TAGBITS) -test "$use_indexed_lrecord_implementation" = "yes" && \ - AC_DEFINE(USE_INDEXED_LRECORD_IMPLEMENTATION) - -dnl ---------------------- -dnl Mule-dependent options -dnl ---------------------- - -test -z "$with_mule" && with_mule=no -test -z "$with_file_coding" && with_file_coding=no - -dnl if test "$with_mule" = "yes" && test ! -d "$srcdir/lisp/mule"; then -dnl echo "Attempt to Build with Mule without Mule/Lisp" -dnl echo "Please install the XEmacs/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) - XE_ADD_OBJS(file-coding.o) -fi - -if test "$with_mule" = "yes" ; then - AC_CHECKING(for Mule-related features) - AC_DEFINE(MULE) - AC_DEFINE(FILE_CODING) - XE_ADD_OBJS(mule.o mule-ccl.o mule-charset.o mule-coding.o file-coding.o) - - dnl Use -lintl to get internationalized strerror for Mule - AC_CHECK_HEADERS(libintl.h) - AC_CHECK_LIB(intl, strerror) - - AC_CHECKING(for Mule input methods) - dnl Do we have the XmIm* routines? And if so, do we want to use them? - dnl XIM seems to be flaky except on Solaris... - dnl test -z "$with_xim" -a "$opsys" != "sol2" && with_xim=no - case "$with_xim" in "" | "yes" ) - AC_CHECKING(for XIM) - dnl XIM + Lesstif is not (yet?) usable - if test "$have_lesstif" = "yes"; then with_xim=xlib - else AC_CHECK_LIB(Xm, XmImMbLookupString, with_xim=motif, with_xim=xlib) - fi - esac - if test "$with_xim" != "no"; then - AC_DEFINE(HAVE_XIM) - if test "$with_xim" = "xlib"; then - AC_DEFINE(XIM_XLIB) - XE_ADD_OBJS(input-method-xlib.o) - fi - if test "$with_xim" = "motif"; then - AC_DEFINE(XIM_MOTIF) - need_motif=yes - XE_ADD_OBJS(input-method-motif.o) - fi - if test "$with_xim" = "motif"; then - with_xfs=no - fi - fi - - dnl "with_xim" = "yes" - if test "$with_xfs" = "yes" ; then - AC_CHECKING(for XFontSet) - AC_CHECK_LIB(X11, XmbDrawString, [:], with_xfs=no) - if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then - AC_DEFINE(USE_XFONTSET) - if test "$with_xim" = "no" ; then - XE_ADD_OBJS(input-method-xfs.o) - fi - fi - fi dnl with_xim - - dnl Autodetect WNN - test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support - test -z "$with_wnn" && { AC_CHECK_HEADER(wnn/jllib.h, ,with_wnn=no) } - dnl Detour to find crypt - if test "$with_wnn" != "no"; then - AC_CHECK_FUNCS(crypt) - test "$ac_cv_func_crypt" != "yes" && { AC_CHECK_LIB(crypt, crypt) } - fi - dnl Back to our regularly scheduled wnn hunting - test -z "$with_wnn" && { AC_CHECK_LIB(wnn,jl_dic_list_e,[:],with_wnn=no) } - test -z "$with_wnn" && with_wnn=yes - if test "$with_wnn" = "yes"; then - AC_DEFINE(HAVE_WNN) - XE_PREPEND(-lwnn, libs_x) - XE_ADD_OBJS(mule-wnnfns.o) - if test "$with_wnn6" != "no"; then - AC_CHECK_LIB(wnn, jl_fi_dic_list, with_wnn6=yes) - test "$with_wnn6" = "yes" && AC_DEFINE(WNN6) - fi - fi - - dnl Autodetect canna - canna_includes_found=no - if test "$with_canna" != "no"; then - AC_CHECK_HEADER(canna/jrkanji.h,canna_includes_found=yes) - fi - if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \ - -d "/usr/local/canna/include"; then - save_c_switch_site="$c_switch_site" - c_switch_site="$c_switch_site -I/usr/local/canna/include" - AC_CHECK_HEADER(canna/jrkanji.h,canna_includes_found=yes) - if test "$canna_includes_found" != "yes"; then - c_switch_site="$save_c_switch_site" - with_canna="no" - fi - fi - - test -z "$with_canna" && { AC_CHECK_HEADER(canna/RK.h, , with_canna=no) } - test -z "$with_canna" && { AC_CHECK_LIB(RKC, RkBgnBun, [:],with_canna=no) } - test -z "$with_canna" && { AC_CHECK_LIB(canna,jrKanjiControl,[:],with_canna=no) } - test -z "$with_canna" && with_canna=yes - if test "$with_canna" = "yes"; then - AC_DEFINE(HAVE_CANNA) - XE_PREPEND(-lcanna -lRKC, libs_x) - XE_ADD_OBJS(mule-canna.o) - fi - -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 - - -dnl At this point, we know whether we need the motif lib or not. -if test "$need_motif" = "yes" ; then - XE_PREPEND(-lXm, libs_x) - dnl AIX needs the following library for use with Motif - AC_CHECK_LIB(i18n, layout_object_getvalue, [XE_PREPEND(-li18n, libs_x)]) - XE_COMPUTE_RUNPATH() -fi - -AC_CHECK_FUNCS(cbrt closedir dup2 eaccess fmod fpathconf frexp ftime gethostname getpagesize gettimeofday getcwd getwd logb lrand48 matherr mkdir mktime perror poll random rename res_init rint rmdir select setitimer setpgid setlocale setsid sigblock sighold sigprocmask snprintf strcasecmp strerror tzset ulimit usleep utimes waitpid vsnprintf) - -dnl realpath is buggy on linux, decosf and aix4 - -dnl The realpath() in linux libc (4.6.27) sometimes fails with ELOOP. -dnl The realpath in ELF linux libc's is O.K. -dnl For example, call realpath on a file thirty-five or so directories deep -dnl and you get ELOOP even if no symlinks at all are involved. -dnl Reports as of 11/1997 indicate BSDi has problems too. -case "$opsys" in - linuxaout* | bsdos3* | freebsd* | decosf4-0* | aix4* ) XE_ADD_OBJS(realpath.o) ;; - * ) - AC_CHECK_FUNCS(realpath) - test "$ac_cv_func_realpath" != "yes" && XE_ADD_OBJS(realpath.o) ;; -esac - -dnl If netdb.h does not declare h_errno, we must declare it by hand. -AC_MSG_CHECKING(whether netdb declares h_errno) -AC_TRY_LINK([#include ], - [return h_errno;], - [AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_H_ERRNO)], - [AC_MSG_RESULT(no)]) - -AC_MSG_CHECKING(for sigsetjmp) -AC_TRY_COMPILE([#include ], - [sigjmp_buf bar; sigsetjmp (bar, 0);], - [AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_SIGSETJMP)], - [AC_MSG_RESULT(no)]) - -AC_MSG_CHECKING(whether localtime caches TZ) -AC_CACHE_VAL(emacs_cv_localtime_cache, -[if test "$ac_cv_func_tzset" = "yes"; then -AC_TRY_RUN([#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) -fi - -if test "$HAVE_TIMEVAL" = "yes"; then -AC_MSG_CHECKING(whether gettimeofday accepts one or two arguments) -AC_TRY_LINK([ -#ifdef TIME_WITH_SYS_TIME -#include -#include -#else -#ifdef HAVE_SYS_TIME_H -#include -#else -#include -#endif -#endif - ], - [ - struct timeval time; - struct timezone dummy; - gettimeofday (&time, &dummy); -], - [AC_MSG_RESULT(two)], - [AC_MSG_RESULT(one) - AC_DEFINE(GETTIMEOFDAY_ONE_ARGUMENT)]) -fi - - -AC_C_INLINE -if test "$ac_cv_c_inline" != "no"; then - AC_DEFINE(HAVE_INLINE) - test "$GCC" = "yes" && XE_ADD_OBJS(inline.o) -fi - -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 - -AC_FUNC_ALLOCA -test -n "$ALLOCA" && XE_ADD_OBJS($ALLOCA) - -dnl Check whether vfork exists and works correctly. (This does more -dnl than just check for its existence.) If so, it defines HAVE_VFORK_H. -dnl If not, it defines vfork to be fork. -AC_FUNC_VFORK - -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_TRY_RUN([#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) ;; -esac -AC_MSG_RESULT($have_mmap) -test "$have_mmap" = "yes" && AC_DEFINE(HAVE_MMAP) - -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" && rel_alloc=no -test "$rel_alloc" = "default" -a "$have_mmap" = "yes" && rel_alloc=yes -test "$rel_alloc" = "yes" && AC_DEFINE(REL_ALLOC) - -dnl Check for terminal 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) - AC_DEFINE(SIGNALS_VIA_CHARACTERS) - AC_DEFINE(NO_TERMIO), - [AC_CHECK_HEADER(termio.h, [AC_DEFINE(HAVE_TERMIO)])]) - - -dnl Check for Internet sockets. -AC_CHECK_FUNC(socket, - [AC_CHECK_HEADER(netinet/in.h, - [AC_CHECK_HEADER(arpa/inet.h, [ - AC_DEFINE(HAVE_SOCKETS) - AC_MSG_CHECKING("for sun_len member in struct sockaddr_un") - AC_TRY_LINK([ -#include -#include -#include - ], - [static struct sockaddr_un x; x.sun_len = 1;], - [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SOCKADDR_SUN_LEN)], - [AC_MSG_RESULT(no)]) - AC_MSG_CHECKING("for ip_mreq struct in netinet/in.h") - AC_TRY_LINK([ -#include -#include - ], - [static struct ip_mreq x;], - [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_MULTICAST)], - [AC_MSG_RESULT(no)])])])]) - -dnl Check for SYS V IPC. (Inferior to sockets.) -AC_CHECK_FUNC(msgget, - [AC_CHECK_HEADER(sys/ipc.h, - [AC_CHECK_HEADER(sys/msg.h, - [AC_DEFINE(HAVE_SYSVIPC)])])]) - -dnl Check for directory variants -AC_CHECK_HEADER(dirent.h, [AC_DEFINE(SYSV_SYSTEM_DIR)], - [AC_CHECK_HEADER(sys/dir.h, , [AC_DEFINE(NONSYSTEM_DIR_LIBRARY)])]) - -dnl Check for nlist.h -AC_CHECK_HEADER(nlist.h, AC_DEFINE(NLIST_STRUCT), ) - -dnl Check for sound of various sorts. - -dnl Autodetect native sound -AC_CHECKING("for sound support") -case "$with_sound" in - native | both ) with_native_sound=yes;; - nas | no ) with_native_sound=no;; -esac -test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes - -if test "$with_native_sound" != "no"; then - dnl Maybe sound is already on include path... - if test -n "$native_sound_lib"; then - AC_CHECK_HEADER(multimedia/audio_device.h, - [sound_found=yes sound_cflags="" - XE_ADD_OBJS(sunplay.o)]) - fi - - dnl Autodetect Sun native sound from SUNWaudmo package - if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then - sound_found=yes - XE_ADD_OBJS(sunplay.o) - if test -d "/usr/demo/SOUND/include" - then sound_cflags="-I/usr/demo/SOUND/include" - else sound_cflags="-I/usr/demo/SOUND" - fi - if test -z "$native_sound_lib" ; then - if test -r "/usr/demo/SOUND/lib/libaudio.a" - then native_sound_lib="/usr/demo/SOUND/lib/libaudio.a" - else native_sound_lib="/usr/demo/SOUND/libaudio.a" - fi - fi - fi - - dnl Check for SGI and HP native sound libs - if test -z "$sound_found"; then - case "$canonical" in - *-sgi-* ) - if test -z "$native_sound_lib"; then - AC_CHECK_LIB(audio, ALopenport, native_sound_lib="-laudio") - fi - if test -n "$native_sound_lib"; then - sound_found=yes sound_cflags="" - XE_ADD_OBJS(sgiplay.o) - fi ;; - hppa*-hp-hpux* ) - if test -z "$native_sound_lib"; then - AC_CHECK_LIB(Alib, AOpenAudio, native_sound_lib="-lAlib") - fi - if test -n "$native_sound_lib"; then - sound_found=yes - XE_ADD_OBJS(hpplay.o) - if test "$GCC" = "yes" # Kludge city - then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples" - else sound_cflags="+e -I/usr/audio/examples" - fi - fi ;; - esac - fi - - dnl Check for Linux/BSD native sound - if test -z "$sound_found"; then - for dir in "machine" "sys" "linux"; do - AC_CHECK_HEADER(${dir}/soundcard.h, - sound_found=yes - XE_ADD_OBJS(linuxplay.o) - [AC_DEFINE_UNQUOTED(SOUNDCARD_H_PATH, "${dir}/soundcard.h")] - break) - done - fi - - test "$sound_found" = "yes" && with_native_sound=yes -fi - -if test -z "$with_sound"; then - if test "$with_native_sound" = "yes" -o -n "$native_sound_lib"; then - with_sound=native - fi -fi - -if test "$with_native_sound" = "yes"; then - AC_DEFINE(HAVE_NATIVE_SOUND) - test -n "$native_sound_lib" && XE_PREPEND($native_sound_lib, LIBS) -fi - -case "$with_sound" in both | nas ) - AC_DEFINE(HAVE_NAS_SOUND) - XE_ADD_OBJS(nas.o) - XE_PREPEND(-laudio, libs_x) - dnl If the nas library does not contain the error jump point, - dnl then we force safer behaviour. - AC_EGREP_HEADER(AuXtErrorJump,audio/Xtutil.h,,[AC_DEFINE(NAS_NO_ERROR_JUMP)]) -esac - -dnl --------------------- -dnl TTY-dependent options -dnl --------------------- - -test -z "$with_tty" && with_tty=yes - -if test "$with_tty" = "yes" ; then - AC_CHECKING(for TTY-related features) - AC_DEFINE(HAVE_TTY) - XE_ADD_OBJS(console-tty.o device-tty.o event-tty.o frame-tty.o objects-tty.o redisplay-tty.o cm.o) - - dnl Autodetect ncurses. - if test -z "$with_ncurses"; then - AC_CHECK_LIB(ncurses, tgetent, with_ncurses=yes, with_ncurses=no) - fi - if test "$with_ncurses" = "yes"; then - AC_DEFINE(HAVE_NCURSES) - AC_CHECK_HEADER(ncurses/curses.h, curses_h_path=ncurses/curses.h) - AC_CHECK_HEADER(ncurses/term.h, term_h_path=ncurses/term.h) - XE_ADD_OBJS(terminfo.o) - XE_PREPEND(-lncurses, LIBS) - - if test "$ac_cv_header_ncurses_curses_h" != "yes" ; 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/curses.h, curses_h_path=ncurses/curses.h) - if test "$ac_cv_header_ncurses_curses_h" = "yes" - then AC_MSG_WARN("Your system has the bogus ncurses include bug.") - else c_switch_site="$save_c_switch_site" - fi - fi - else dnl "$with_ncurses" = "no" - dnl Autodetect terminfo/-lcurses/-ltermlib/-ltermcap - if test "$have_terminfo" = "yes"; then - XE_ADD_OBJS(terminfo.o) - if test -n "$libs_termcap"; then - XE_PREPEND($libs_termcap, LIBS) - else - for lib in curses termlib termcap; do - AC_CHECK_LIB($lib, tgetent, XE_PREPEND(-l${lib}, LIBS); break) - done - fi - else dnl "$have_terminfo" = "no" && "with_ncurses" = "no" - XE_ADD_OBJS(tparam.o) - dnl The HP-UX curses library seems to have a badly broken version of select(2) - dnl that makes "poll: interrupted system call" messages to appear and - dnl Emacs suprocesses to hang (e.g. TeX compilation w/ AUCTeX) */ - case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac - if test -n "$libs_termcap"; then - XE_PREPEND($libs_termcap, LIBS) - else - AC_CHECK_LIB(curses, tgetent, XE_PREPEND(-lcurses, LIBS), - AC_CHECK_LIB(termcap, tgetent, XE_PREPEND(-ltermcap, LIBS), - XE_ADD_OBJS(termcap.o))) - fi - fi - fi - AC_DEFINE_UNQUOTED(CURSES_H_PATH, "${curses_h_path-curses.h}") - AC_DEFINE_UNQUOTED(TERM_H_PATH, "${term_h_path-term.h}") - - dnl Autodetect gpm - test -z "$with_gpm" && { AC_CHECK_HEADER(gpm.h, , with_gpm=no) } - test -z "$with_gpm" && { AC_CHECK_LIB(gpm, Gpm_Open, with_gpm=yes, with_gpm=no) } - if test "$with_gpm" = "yes"; then - AC_DEFINE(HAVE_GPM) - XE_ADD_OBJS(gpmevent.o) - XE_PREPEND(-lgpm, LIBS) - fi - -else dnl "$with_tty" = "no" - for feature in ncurses 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}=no" - done -fi dnl with_tty - -dnl Do we need event-unixoid.o ? -test "$with_x11" = "yes" -o "$with_tty" = "yes" && XE_ADD_OBJS(event-unixoid.o) - -dnl Database support -dnl -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 Note that unless support for DB/(G)DBM is explicitly disabled, we always -dnl want to check for libdb/lib(g)dbm. Also note that libc will not be -dnl checked if we have the libraries. -dnl If support for DB/(G)DBM is requested, but we neither have libdb/lib(g)dbm, -dnl nor does libc implement it, we are a bit lost :) - -AC_CHECKING(for database support) - -if test "$with_database_gnudbm" != "no"; then - AC_CHECK_HEADERS(ndbm.h, have_ndbm_h=yes) - if test "$have_ndbm_h" = "yes"; then - AC_CHECK_LIB(gdbm, dbm_open, with_database_gnudbm=yes have_libgdbm=yes) - fi - if test "$with_database_gnudbm" != "yes"; then - AC_CHECK_FUNC(dbm_open, with_database_gnudbm=yes) - fi - if test "$with_database_gnudbm" = "yes"; then - AC_DEFINE(HAVE_DBM) - test "$have_libgdbm" = "yes" && XE_PREPEND(-lgdbm, LIBS) - with_database_dbm=no - else with_database_gnudbm=no - fi -fi - -if test "$with_database_dbm" != "no"; then - AC_CHECK_FUNC(dbm_open, with_database_dbm=yes need_libdbm=no) - if test "$need_libdbm" != "no"; then - AC_CHECK_LIB(dbm, dbm_open, with_database_dbm=yes need_libdbm=yes) - fi - if test "$with_database_dbm" = "yes"; then - AC_DEFINE(HAVE_DBM) - test "$need_libdbm" = "yes" && XE_PREPEND(-ldbm, LIBS) - else with_database_dbm=no - fi -fi - -if test "$with_database_berkdb" != "no"; then - AC_MSG_CHECKING(for Berkeley db.h) - for path in "db/db.h" "db.h"; do - AC_TRY_COMPILE([#ifdef HAVE_INTTYPES_H -#define __BIT_TYPES_DEFINED__ -#include -typedef uint8_t u_int8_t; -typedef uint16_t u_int16_t; -typedef uint32_t u_int32_t; -#ifdef WE_DONT_NEED_QUADS -typedef uint64_t u_int64_t; -#endif -#endif -#include <$path> -],[], db_h_path="$path"; break) - done - if test -z "$db_h_path" - then AC_MSG_RESULT(no); with_database_berkdb=no - else AC_MSG_RESULT($db_h_path) - fi - - if test "$with_database_berkdb" != "no"; then - AC_MSG_CHECKING(for Berkeley DB version) - AC_EGREP_CPP(yes, -[#include <$db_h_path> -#if DB_VERSION_MAJOR > 1 -yes -#endif -], [AC_MSG_RESULT(2); dbfunc=db_open], [AC_MSG_RESULT(1); dbfunc=dbopen]) - AC_CHECK_FUNC($dbfunc, with_database_berkdb=yes need_libdb=no, [ - AC_CHECK_LIB(db, $dbfunc, with_database_berkdb=yes need_libdb=yes)]) - fi - - if test "$with_database_berkdb" = "yes"; then - AC_DEFINE_UNQUOTED(DB_H_PATH, "$db_h_path") - AC_DEFINE(HAVE_BERKELEY_DB) - test "$need_libdb" = "yes" && XE_PREPEND(-ldb, LIBS) - else with_database_berkdb=no - fi -fi - -if test "$with_database_gnudbm $with_database_dbm $with_database_berkdb" \ - != "no no no"; then - AC_DEFINE(HAVE_DATABASE) - XE_ADD_OBJS(database.o) -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) -fi - -dnl Usage tracking (undocumented and likely unused option) -if test "$usage_tracking" = "yes"; then - AC_DEFINE(USAGE_TRACKING) - XE_PREPEND(-Bstatic -lut -Bdynamic, LIBS) -fi - -dnl autodetect dll support -AC_CHECK_HEADERS(dlfcn.h, have_dlfcn=yes) -test -z "$with_shlib" && test ! -z "$have_dlfcn" && { AC_CHECK_LIB(dl, dlopen, [ AC_DEFINE(HAVE_DLOPEN) DLL_LIB=dl; with_shlib=yes]) } -test -z "$with_shlib" && test ! -z "$have_dlfcn" && { AC_CHECK_LIB(c, _dlopen, [ AC_DEFINE(HAVE_DLOPEN) DLL_LIB=; with_shlib=yes]) } -test -z "$with_shlib" && test ! -z "$have_dlfcn" && { AC_CHECK_LIB(c, dlopen, [ AC_DEFINE(HAVE_DLOPEN) DLL_LIB=; with_shlib=yes]) } -test -z "$with_shlib" && { AC_CHECK_LIB(dld, shl_load, [ AC_DEFINE(HAVE_SHL_LOAD) DLL_LIB=dld; with_shlib=yes]) } -test -z "$with_shlib" && { AC_CHECK_LIB(dld, dld_init, [ AC_DEFINE(HAVE_DLD_INIT) DLL_LIB=dld; with_shlib=yes]) } -if test "$with_shlib" = "yes"; then - AC_DEFINE(HAVE_SHLIB) - XE_ADD_OBJS(sysdll.o) - XE_ADD_OBJS(dll.o) - test ! -z "$DLL_LIB" && XE_PREPEND(-l${DLL_LIB}, LIBS) - XE_MAKE_SHAREDLIB - AC_CHECK_FUNCS(dlerror) - ld_dynamic_link_flags= - dnl Fill this in with other values as this gets more testing - case "$opsys" in - hpux*) ld_dynamic_link_flags="-Wl,-E" ;; - linux*) ld_dynamic_link_flags="-rdynamic" ;; - *) ;; - esac -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_TRY_RUN will -dnl have reported incorrect results. -AC_TRY_RUN([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 --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]) - -dnl Process support (hardcoded) -dnl every system that supports this runs configure, the others don't - -dnl We're not ready for this yet. -AC_DEFINE(HAVE_UNIX_PROCESSES) -XE_ADD_OBJS(process-unix.o) - -dnl -------------------------------- -dnl Compute SUBST-itutable variables -dnl -------------------------------- - -dnl We ignore (C|LD)_SWITCH_X_(MACHINE|SYSTEM) -dnl Use XE_SPACE instead of plain assignment statements to remove extraneous blanks -XE_SPACE(CFLAGS, $CFLAGS) -XE_SPACE(extra_objs, $extra_objs) -XE_SPACE(c_switch_general, -DHAVE_CONFIG_H $c_switch_site $c_switch_machine $c_switch_system) -XE_SPACE(c_switch_window_system, $c_switch_x_site $X_CFLAGS) -XE_SPACE(c_switch_all, $c_switch_general $c_switch_window_system) -XE_SPACE(ld_switch_general, $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_run) -XE_SPACE(ld_switch_window_system, $ld_switch_x_site) -XE_SPACE(ld_switch_all, $ld_switch_general $ld_switch_window_system) -XE_SPACE(ld_libs_general, $LIBS $libs_machine $libs_system $libs_standard) -XE_SPACE(ld_libs_window_system, $X_EXTRA_LIBS $libs_x $X_PRE_LIBS) -XE_SPACE(ld_libs_all, $ld_libs_window_system $ld_libs_general) - -dnl Compute lists of Makefiles and subdirs -AC_SUBST(SRC_SUBDIR_DEPS) -XE_APPEND(src, MAKE_SUBDIR) -internal_makefile_list="Makefile" -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 - XE_SPACE(SUBDIR_MAKEFILES, $SUBDIR_MAKEFILES $dir/Makefile) - XE_SPACE(internal_makefile_list, $internal_makefile_list $dir/Makefile.in) -done -AC_SUBST(INSTALL_ARCH_DEP_SUBDIR) -AC_SUBST(MAKE_SUBDIR) -AC_SUBST(SUBDIR_MAKEFILES) - -dnl Make s&m symlinks in the src directory, for config.h -for dir in src/s src/m; do - if test ! -d "$dir" ; then - echo Making symbolic link to "$srcdir/$dir" - ${LN_S} "$srcdir/$dir" "$dir" - fi -done - -if test "$extra_verbose" = "yes"; then - echo "" - PRINT_VAR(extra_objs - c_switch_general c_switch_window_system c_switch_all - ld_switch_general ld_switch_window_system ld_switch_all - ld_libs_general ld_libs_window_system ld_libs_all) - echo "" -fi - -dnl Create some auxiliary files -if test -f $srcdir/src/gdbinit -a ! -f src/gdbinit ; then - echo "creating src/gdbinit"; echo "" - echo "source $srcdir/src/gdbinit" > src/gdbinit -fi - -dnl Create top level .sbinit for Sun compilers -if test "$__sunpro_c" = "yes"; then - echo "creating .sbinit"; echo "" - ( 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 - -dnl There are no more compile tests; remove the core they created. -rm -f core - -dnl ---------------------------------------------- -dnl Substitute into Makefile, config.h and paths.h -dnl ---------------------------------------------- - -dnl what sort of things to edit into Makefile, config.h and paths.h -dnl configuration here uncanonicalized to avoid exceeding size limits. - -AC_SUBST(PROGNAME) -AC_SUBST(version) -AC_SUBST(configuration) -AC_SUBST(canonical) -AC_SUBST(srcdir) -AC_SUBST(bindir) -AC_SUBST(datadir) -AC_SUBST(pkgdir) -AC_SUBST(statedir) -AC_SUBST(libdir) -AC_SUBST(mandir) - -AC_SUBST(prefix) -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) -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) -AC_SUBST(INFOPATH_USER_DEFINED) -INFOPATH=$infopath -while true; do - case "$INFOPATH" in - *\$* ) eval "INFOPATH=$INFOPATH" ;; - *) break ;; - esac -done -AC_SUBST(INFOPATH) - -AC_SUBST(package_path) -AC_SUBST(PACKAGE_PATH_USER_DEFINED) -PACKAGE_PATH=$package_path -while true; do - case "$PACKAGE_PATH" in - *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;; - *) break ;; - esac -done -AC_SUBST(PACKAGE_PATH) - -AC_SUBST(lispdir) -AC_SUBST(LISPDIR_USER_DEFINED) -LISPDIR=$lispdir -while true; do - case "$LISPDIR" in - *\$* ) eval "LISPDIR=$LISPDIR" ;; - *) break ;; - esac -done -AC_SUBST(LISPDIR) - -dnl AC_SUBST(sitelispdir) -dnl AC_SUBST(SITELISPDIR_USER_DEFINED) -dnl SITELISPDIR=$sitelispdir -dnl while true; do -dnl case "$SITELISPDIR" in -dnl *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;; -dnl *) break ;; -dnl esac -dnl done -dnl AC_SUBST(SITELISPDIR) - -AC_SUBST(etcdir) -AC_SUBST(ETCDIR_USER_DEFINED) -ETCDIR=$etcdir -while true; do - case "$ETCDIR" in - *\$* ) eval "ETCDIR=$ETCDIR" ;; - *) break ;; - esac -done -AC_SUBST(ETCDIR) - -AC_SUBST(lockdir) -AC_SUBST(LOCKDIR_USER_DEFINED) -LOCKDIR=$lockdir -while true; do - case "$LOCKDIR" in - *\$* ) eval "LOCKDIR=$LOCKDIR" ;; - *) break ;; - esac -done -AC_SUBST(LOCKDIR) - -AC_SUBST(archlibdir) -AC_SUBST(ARCHLIBDIR_USER_DEFINED) -ARCHLIBDIR=$archlibdir -while true; do - case "$ARCHLIBDIR" in - *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;; - *) break ;; - esac -done -AC_SUBST(ARCHLIBDIR) - -AC_SUBST(docdir) -AC_SUBST(bitmapdir) -AC_SUBST(extra_objs) -AC_SUBST(ld_dynamic_link_flags) - -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 (deprecated) -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="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'" -AC_SUBST(RECURSIVE_MAKE) - -AC_SUBST(native_sound_lib) -AC_SUBST(sound_cflags) -AC_SUBST(RANLIB) -AC_SUBST(dynodump_arch) - -# The default is yes -if test "$with_site_lisp" = "no"; then - AC_DEFINE(INHIBIT_SITE_LISP) -fi - -XE_SPACE(ac_configure_args, $ac_configure_args) -AC_DEFINE_UNQUOTED(EMACS_CONFIGURATION, "$canonical") -AC_DEFINE_UNQUOTED(EMACS_CONFIG_OPTIONS, "$ac_configure_args") -AC_DEFINE_UNQUOTED(config_machfile, "$machfile") -AC_DEFINE_UNQUOTED(config_opsysfile, "$opsysfile") - -dnl Following are deprecated - -null_string="" -AC_DEFINE_UNQUOTED(LD_SWITCH_X_SITE, $null_string) -AC_DEFINE_UNQUOTED(LD_SWITCH_X_SITE_AUX, $null_string) -AC_DEFINE_UNQUOTED(C_SWITCH_X_SITE, $null_string) -AC_DEFINE_UNQUOTED(LD_SWITCH_SITE, $null_string) -AC_DEFINE_UNQUOTED(C_SWITCH_SITE, $null_string) - -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. - -test -n "$puresize" && AC_DEFINE_UNQUOTED(RAW_PURESIZE, $puresize) - -if test "$GNU_MALLOC" = "yes"; then AC_DEFINE(GNU_MALLOC) -elif test "$with_system_malloc" = "yes"; then AC_DEFINE(USE_SYSTEM_MALLOC) -elif test "$with_debug_malloc" = "yes"; then AC_DEFINE(USE_DEBUG_MALLOC) - AC_DEFINE(USE_SYSTEM_MALLOC) -fi -test "$with_i18n3" = "yes" && AC_DEFINE(I18N3) -test "$GCC" = "yes" && AC_DEFINE(USE_GCC) -test "$external_widget" = "yes" && AC_DEFINE(EXTERNAL_WIDGET) -test "$with_gnu_make" = "yes" && AC_DEFINE(USE_GNU_MAKE) -test "$no_doc_file" = "yes" && AC_DEFINE(NO_DOC_FILE) -dnl test "$const_is_losing" = "yes" && AC_DEFINE(CONST_IS_LOSING) -test "$with_quantify" = "yes" && AC_DEFINE(QUANTIFY) -test "$with_pop" = "yes" && AC_DEFINE(MAIL_USE_POP) -test "$with_kerberos" = "yes" && AC_DEFINE(KERBEROS) -test "$with_hesiod" = "yes" && AC_DEFINE(HESIOD) -test "$use_union_type" = "yes" && AC_DEFINE(USE_UNION_TYPE) - -dnl ------------------------------- -dnl Report on what we decided to do -dnl ------------------------------- - -( -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 $quoted_arguments" -) > Installation - -xemacs_betaname="" -test ! -z "${emacs_beta_version}" && xemacs_betaname="-b${emacs_beta_version}" - -dnl Start stdout redirection to '| tee -a Installation' -( -echo " - -XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'. - - Where should the build process find the source code? $srcdir - What installation prefix should install use? $prefix - What operating system and machine description files should XEmacs use? - \`$opsysfile' and \`$machfile' - What compiler should XEmacs be built with? $CC $CFLAGS - Should XEmacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason} - Should XEmacs use the relocating allocator for buffers? $rel_alloc - What window system should XEmacs use? ${window_system}" -if test "$with_x11" = "yes"; then - echo " Where do we find X Windows header files? $x_includes" - echo " Where do we find X Windows libraries? $x_libraries" -fi -if test -n "$site_includes"; then - echo " Additional header files: $site_includes" -fi -if test -n "$site_libraries"; then - echo " Additional libraries: $site_libraries" -fi -if test -n "$site_prefixes"; then - echo " Additional prefixes: $site_prefixes" -fi -if test -n "$runpath"; then - echo " Runtime library search path: $runpath" -fi -test "$with_dnet" = yes && echo " Compiling in support for DNET." -test "$with_socks" = yes && echo " Compiling in support for SOCKS." -test "$with_xauth" = yes && echo " Compiling in support for XAUTH." -if test "$with_xmu" != yes -a "$with_x11" = yes; then - echo " No Xmu; substituting equivalent routines." -fi - -if test "$with_xpm" = yes; then - echo " Compiling in support for XPM images." -elif test "$with_x11" = yes; then - echo " --------------------------------------------------------------------" - echo " WARNING: Compiling without XPM support." - echo " WARNING: You should strongly considering installing XPM." - echo " WARNING: Otherwise toolbars and other graphics will look suboptimal." - echo " --------------------------------------------------------------------" -fi -test "$with_xface" = yes && echo " Compiling in support for X-Face message headers." -test "$with_gif" = yes && echo " Compiling in support for GIF image conversion." -test "$with_jpeg" = yes && echo " Compiling in support for JPEG image conversion." -test "$with_png" = yes && echo " Compiling in support for PNG image conversion." -test "$with_tiff" = yes && echo " Compiling in support for TIFF image conversion." -case "$with_sound" in - nas ) echo " Compiling in network sound (NAS) support." ;; - native ) echo " Compiling in native sound support." ;; - both ) echo " Compiling in both network and native sound support." ;; -esac -test "$old_nas" = yes && echo " nas library lacks error trapping, will play synchronously" - -test "$with_database_berkdb" = yes && echo " Compiling in support for Berkeley DB." -test "$with_database_dbm" = yes && echo " Compiling in support for DBM." -test "$with_database_gnudbm" = yes && echo " Compiling in support for GNU DBM." - -test "$with_umich_ldap" = yes && echo " Compiling in support for LDAP (UMich libs)." -test "$with_ns_ldap" = yes && echo " Compiling in support for LDAP (Netscape SDK)." -test "$with_ldap" = yes -a "$with_umich_ldap" = no -a "$with_ns_ldap" = no && echo " Compiling in support for LDAP (Generic)." - -test "$with_ncurses" = yes && echo " Compiling in support for ncurses." -test "$with_gpm" = yes && echo " Compiling in support for GPM (General Purpose Mouse)." - -test "$with_mule" = yes && echo " Compiling in Mule (multi-lingual) support." -test "$with_file_coding" = yes && echo " Compiling in File coding support." -test "$with_xim" != no && echo " Compiling in XIM (X11R5+ I18N input method) support." -test "$with_xim" = motif && echo " Using Motif to provide XIM support." -test "$with_xim" = xlib && echo " Using raw Xlib to provide XIM support." -test "$with_xfs" = yes && echo " Using XFontSet to provide bilingual menubar." -test "$with_canna" = yes && echo " Compiling in support for Canna on Mule." -if test "$with_wnn" = yes; then - echo " Compiling in support for the WNN input method on Mule." - test "$with_wnn6" = yes && echo " Using WNN version 6." -fi -test "$with_i18n3" = yes && echo " Compiling in I18N support, level 3 (doesn't currently work)." - -test "$with_cde" = yes && echo " Compiling in support for CDE." -test "$with_tooltalk" = yes && echo " Compiling in support for ToolTalk." -test "$with_offix" = yes && echo " Compiling in support for OffiX." -test "$with_dragndrop" = yes && echo " Compiling in EXPERIMENTAL support for Drag'n'Drop ($dragndrop_proto )." -test "$with_workshop" = yes && echo " Compiling in support for Sun WorkShop." -test "$with_session" != no && echo " Compiling in support for proper session-management." -case "$with_menubars" in - lucid ) echo " Using Lucid menubars." ;; - motif ) echo " Using Motif menubars." - echo " *WARNING* The Motif menubar implementation is currently buggy." - echo " We recommend using the Lucid menubar instead." - echo " Re-run configure with --with-menubars='lucid'." ;; -esac -case "$with_scrollbars" in - lucid ) echo " Using Lucid scrollbars." ;; - motif ) echo " Using Motif scrollbars." ;; - athena ) echo " Using Athena scrollbars." ;; - athena3d ) echo " Using Athena-3d scrollbars." ;; -esac -case "$with_dialogs" in - motif ) echo " Using Motif dialog boxes." ;; - athena ) echo " Using Athena dialog boxes." ;; - athena3d ) echo " Using Athena-3d dialog boxes." ;; -esac -test "$with_shlib" = "yes" && echo " Compiling in DLL support." -test "$with_clash_detection" = yes && \ - echo " Clash detection will use \"$lockdir\" for locking files." -echo " movemail will use \"$mail_locking\" for locking mail spool files." -test "$with_pop" = yes && echo " Using POP for mail access" -test "$with_kerberos" = yes && echo " Using Kerberos for POP authentication" -test "$with_hesiod" = yes && echo " Using Hesiod to get POP server host" -test "$use_union_type" = yes && echo " Using the union type for Lisp_Objects." -test "$use_minimal_tagbits" = yes && echo " Using Lisp_Objects with minimal tagbits." -test "$use_indexed_lrecord_implementation" = yes && echo " Using indexed lrecord implementation." -test "$debug" = yes && echo " Compiling in extra code for debugging." -test "$memory_usage_stats" = yes && echo " Compiling in code for checking XEmacs memory usage." -test "$usage_tracking" = yes && echo " Compiling with usage tracking active (Sun internal)." -if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc" \ - != "no no no no no"; then - echo " WARNING: ---------------------------------------------------------" - echo " WARNING: Compiling in support for runtime error checking." - echo " WARNING: XEmacs will run noticeably more slowly as a result." - echo " WARNING: Error checking is on by default for XEmacs beta releases." - echo " WARNING: ---------------------------------------------------------" -fi -echo "" -) | tee -a Installation -dnl echo "The above configure report is appended to \"Installation\" file." -echo "" - -dnl Generate Installation.el -echo '(setq Installation-string "' > Installation.el -sed 's/"/\\"/g' Installation >> Installation.el -echo '")' >> Installation.el - -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. -test -n "$prefix" && - prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([[^/]]\)/*$,\1,'` -test -n "$exec_prefix" && - exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([[^/]]\)/*$,\1,'` - -dnl Build Makefile.in's from Makefile.in.in's -dnl except ./Makefile from $srcdir/Makefile.in - -for file in $internal_makefile_list; do - test "$file" = src/Makefile.in && \ - file="src/Makefile.in:src/Makefile.in.in:src/depend" - ac_output_files="${ac_output_files+$ac_output_files }$file" -done -ac_output_files="$ac_output_files src/paths.h lib-src/config.values" - -AC_OUTPUT($ac_output_files, -[for dir in $MAKE_SUBDIR; do - echo creating $dir/Makefile - ( -changequote(<<, >>)dnl - cd $dir - rm -f junk.c - < Makefile.in \ - sed -e '/^# Generated/d' \ - -e 's%/\*\*/#.*%%' \ - -e 's/^ *# */#/' \ - -e '/^##/d' \ - -e '/^#/ { -p -d -}' -e '/./ { -s/\([\"]\)/\\\1/g -s/^/"/ -s/$/"/ -}' > junk.c; - $CPP -I. -I${top_srcdir}/src $CPPFLAGS junk.c > junk.cpp; - < junk.cpp \ - sed -e 's/^#.*//' \ - -e 's/^[ TAB][ TAB]*$//' \ - -e 's/^ /TAB/' \ - | sed -n -e '/^..*$/p' \ - | sed '/^"/ { -s/\\\([\"]\)/\1/g -s/^[ TAB]*"// -s/"[ TAB]*$// -}' > Makefile.new - chmod 444 Makefile.new - mv -f Makefile.new Makefile - rm -f junk.c junk.cpp -changequote([, ])dnl -) -done - -dnl Append AC_DEFINE information to lib-src/config.values -dnl (AC_SUBST information is already there (see config.values.sh). -sed < config.status >> lib-src/config.values \ - -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \ - -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \ - -e 's/^\([[^ ]]*\) $/\1 ""/' \ - -e 's/ 1$/ t/' - -], -[CPP="$CPP" - CPPFLAGS="$CPPFLAGS" - top_srcdir="$srcdir" - MAKE_SUBDIR="$MAKE_SUBDIR" -]) diff --cc lib-src/pstogif index 7ddbcd3,9ff1cbf..0000000 deleted file mode 100755,100755 --- a/lib-src/pstogif +++ /dev/null @@@ -1,189 -1,189 +1,0 @@@ --: # -*-Perl-*- --eval 'exec perl -w -S $0 ${1+"$@"}' # Portability kludge -- if 0; --# --# pstogif.pl v1.0, July 1994, by Nikos Drakos --# Computer Based Learning Unit, University of Leeds. --# --# Accompanies LaTeX2HTML Version 96.1 --# --# Script to convert an arbitrary PostScript image to a cropped GIF image --# suitable for incorporation into HTML documents as inlined images to be --# viewed with WWW browsers. --# --# This is based on the pstoepsi script --# by Doug Crabill dgc@cs.purdue.edu --# --# Please note the following: --# - The source PostScript file must end --# in a .ps extention. This is a GhostScript requirement, not mine... --# - The -density argument has no effect unless the --# color depth (set with the -depth argument) is equal to 1. --# - Valid arguments for -depth are 1,8, or 24. --# --# This software is provided as is without any guarantee. --# --# Nikos Drakos (ND), nikos@cbl.leeds.ac.uk --# Computer Based Learning Unit, University of Leeds. --# --# 15 Jan 96 HS Call ppmquant only if needed. Fixed bug relative to --# V 95.3 . --# --# 15 Dec 95 HS (Herbert Swan Added support for --# the flip=option. This allows images to be oriented differently --# in the paper versus the electronic media --# --# 1 Nov 95 jmn - modified for use with gs ppm driver - from jhrg's patches --# note that ppmtops.ps and ppmtops3.ps are no longer needed --# --# 20 JUL 94 ND Converted to Perl and made several changes eg it now accepts --# parameters from environment variables or from command line or will use --# default ones. --# --# 1 APR 94 ND Changed the suffixes of multi-page files from xbm to gif (oops!) --# --# -- --##################################################################### --$| =1; --&read_args; -- --### You may need to specify some pathnames here if you want to --### run the script without LaTeX2HTML -- --# Ghostscript --$GS= $ENV{'GS'} || 'gs'; -- --# Comes with LaTeX2HTML (For ghostscript versions greater than 3.0 --# you need the newer pstoppm.ps) --#$PSTOPPM= $ENV{'PSTOPPM'} || --# 'pstoppm.ps'; -- - # Available in the PBMPLUS library - $PNMCROP=$ENV{'PNMCROP'} || 'pnmcrop' ; - - # Also in PBMPLUS - $PNMFLIP=$ENV{'PNMFLIP'} || 'pnmflip' ; - - # Also in PBMPPLUS - $PPMTOGIF=$ENV{'PPMTOGIF'} || 'ppmtogif' ; - - # Also in PBMPPLUS - $REDUCE_COLOR=$ENV{'PPMQUANT'} || 'ppmquant 256' ; - - $OUTFILE = $ENV{'OUTFILE'} || $out; - - # Valid choices for $COLOR_DEPTH are 1, 8 or 24. - $DEPTH = $ENV{'DEPTH'} || $depth || 24; - - #Default density is 72 - $DENSITY = $ENV{'DENSITY'} || $density || 72; - - # Valid choices are any numbers greater than zero - # Useful choices are numbers between 0.1 - 5 - # Large numbers may generate very large intermediate files - # and will take longer to process - $SCALE = $ENV{'SCALE'} || $scale; # No default value - - $PAPERSIZE = $ENV{'PAPERSIZE'} || $papersize; # No default value; - - $DEBUG = $ENV{'DEBUG'} || $DEBUG || 0; - - ###################################################################### - - &main; - - sub read_args { - local($_); - local($color); - while ($ARGV[0] =~ /^-/) { - $_ = shift @ARGV; - if (/^-h(elp)?$/) { - &usage; exit} - elsif (/^-out$/) { - $out = shift @ARGV; - } - elsif (/^-(.*)$/) { - eval "\$$1 = shift \@ARGV"; # Create and set a flag $ - } - } - } - - sub main { - local($base, $outfile, $i, $j); - $base = &test_args; - $outfile = $OUTFILE || "$base.gif"; - open(STDERR, ">/dev/null") unless $DEBUG; - &convert($base); - if (-f "$base.ppm") { - &crop_scale_etc("$base.ppm", $outfile); - } - else { - foreach $i (<$base.[1-9]*ppm>) { - $j = $i; - $j =~ s/\.(.*)ppm/$1.gif/; - &crop_scale_etc($i, $j)} - } - &cleanup($base); - } - - sub crop_scale_etc { - local($in, $out) = @_; - local($tmp) = $in . ".tmp"; - open(STDERR, ">/dev/null") unless $DEBUG; - - if ($flip) { - rename($tmp, $in) unless system("$PNMFLIP -$flip $in > $tmp"); - } - system("$PNMCROP $in > $tmp"); - - if (system("$PPMTOGIF $tmp > $out")) { - print "Running ppmquant for $out\n"; - system("$REDUCE_COLOR < $tmp|$PPMTOGIF - > $out"); - } - unlink $tmp; - print "Writing $out\n"; - } - - sub test_args { - local($file) = $ARGV[0]; - if (! ($file =~ s/\.ps$//)) { - print "The name of the input file must end in '.ps'\n"; - exit} - elsif (! ( -f "$file.ps")) { - print "Cannot find file $file.ps\n."; - exit} - elsif (! ($DEPTH =~ /^(1|8|24)$/)) { - print "The color depth must be 1 or 8 or 24. You specified $DEPTH\n"; - exit - } - if (defined $SCALE) { - if ($SCALE > 0) { - $DENSITY = int($SCALE * $DENSITY)} - else { - print "Error: The scale must be greater than 0.\n" . - "You specified $SCALE\n"; - exit} - } - $file; - } - - sub convert { - local($base) = @_; - local($paperopt) = "-sPAPERSIZE=$PAPERSIZE" if $PAPERSIZE; - local($ppmtype) = join('', "ppm",$DEPTH,"run"); - local($density) = "-r$DENSITY" if ($DENSITY != 72); - open (GS, "|$GS -q -dNOPAUSE -dNO_PAUSE -sDEVICE=ppmraw $density -sOutputFile=$base.ppm $paperopt $base.ps"); - close GS; - } - - sub cleanup { - local($base) = @_; - unlink <$base[0-9.]*ppm>; - } - - sub usage { - print "Usage: pstogif [-h(elp)] [-out ] [-depth ] [-flip ] [-density ] .ps\n\n"; - } - - -# Available in the PBMPLUS libary -$PNMCROP=$ENV{'PNMCROP'} || 'pnmcrop' ; - -# Also in PBMPLUS -$PNMFLIP=$ENV{'PNMFLIP'} || 'pnmflip' ; - -# Also in PBMPPLUS -$PPMTOGIF=$ENV{'PPMTOGIF'} || 'ppmtogif' ; - -# Also in PBMPPLUS -$REDUCE_COLOR=$ENV{'PPMQUANT'} || 'ppmquant 256' ; - -$OUTFILE = $ENV{'OUTFILE'} || $out; - -# Valid choices for $COLOR_DEPTH are 1, 8 or 24. -$DEPTH = $ENV{'DEPTH'} || $depth || 24; - -#Default density is 72 -$DENSITY = $ENV{'DENSITY'} || $density || 72; - -# Valid choices are any numbers greater than zero -# Useful choices are numbers between 0.1 - 5 -# Large numbers may generate very large intermediate files -# and will take longer to process -$SCALE = $ENV{'SCALE'} || $scale; # No default value - -$PAPERSIZE = $ENV{'PAPERSIZE'} || $papersize; # No default value; - -$DEBUG = $ENV{'DEBUG'} || $DEBUG || 0; - -###################################################################### - -&main; - -sub read_args { - local($_); - local($color); - while ($ARGV[0] =~ /^-/) { - $_ = shift @ARGV; - if (/^-h(elp)?$/) { - &usage; exit} - elsif (/^-out$/) { - $out = shift @ARGV; - } - elsif (/^-(.*)$/) { - eval "\$$1 = shift \@ARGV"; # Create and set a flag $ - } - } -} - -sub main { - local($base, $outfile, $i, $j); - $base = &test_args; - $outfile = $OUTFILE || "$base.gif"; - open(STDERR, ">/dev/null") unless $DEBUG; - &convert($base); - if (-f "$base.ppm") { - &crop_scale_etc("$base.ppm", $outfile); - } - else { - foreach $i (<$base.[1-9]*ppm>) { - $j = $i; - $j =~ s/\.(.*)ppm/$1.gif/; - &crop_scale_etc($i, $j)} - } - &cleanup($base); -} - -sub crop_scale_etc { - local($in, $out) = @_; - local($tmp) = $in . ".tmp"; - open(STDERR, ">/dev/null") unless $DEBUG; - - if ($flip) { - rename($tmp, $in) unless system("$PNMFLIP -$flip $in > $tmp"); - } - system("$PNMCROP $in > $tmp"); - - if (system("$PPMTOGIF $tmp > $out")) { - print "Running ppmquant for $out\n"; - system("$REDUCE_COLOR < $tmp|$PPMTOGIF - > $out"); - } - unlink $tmp; - print "Writing $out\n"; -} - -sub test_args { - local($file) = $ARGV[0]; - if (! ($file =~ s/\.ps$//)) { - print "The name of the input file must end in '.ps'\n"; - exit} - elsif (! ( -f "$file.ps")) { - print "Cannot find file $file.ps\n."; - exit} - elsif (! ($DEPTH =~ /^(1|8|24)$/)) { - print "The color depth must be 1 or 8 or 24. You specified $DEPTH\n"; - exit - } - if (defined $SCALE) { - if ($SCALE > 0) { - $DENSITY = int($SCALE * $DENSITY)} - else { - print "Error: The scale must be greater than 0.\n" . - "You specified $SCALE\n"; - exit} - } - $file; -} - -sub convert { - local($base) = @_; - local($paperopt) = "-sPAPERSIZE=$PAPERSIZE" if $PAPERSIZE; - local($ppmtype) = join('', "ppm",$DEPTH,"run"); - local($density) = "-r$DENSITY" if ($DENSITY != 72); - open (GS, "|$GS -q -dNOPAUSE -dNO_PAUSE -sDEVICE=ppmraw $density -sOutputFile=$base.ppm $paperopt $base.ps"); - close GS; -} - -sub cleanup { - local($base) = @_; - unlink <$base[0-9.]*ppm>; -} - -sub usage { - print "Usage: pstogif [-h(elp)] [-out ] [-depth ] [-flip ] [-density ] .ps\n\n"; -} - - diff --cc lib-src/update-elc.sh index 5d3f461,f0cfc45..0000000 deleted file mode 100644,100644 --- a/lib-src/update-elc.sh +++ /dev/null @@@ -1,190 -1,183 +1,0 @@@ --#!/bin/sh --# update-elc.sh --- recompile all missing or out-of-date .elc files -- --# Author: Jamie Zawinski, Ben Wing, Martin Buchholz --# Maintainer: Martin Buchholz --# Keywords: recompile byte-compile .el .elc -- --# This file is part of XEmacs. -- --# XEmacs 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 2, or (at your option) --# any later version. -- --# XEmacs 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 XEmacs; see the file COPYING. If not, write to --# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, --# Boston, MA 02111-1307, USA. -- --### Commentary: --## Recompile all .elc files that need recompilation. Requires a --## working version of "xemacs". Correctly handles the case where the --## .elc files are missing; thus you can execute "rm lisp/*/*.elc" --## before running this script. Run this from the parent of the --## "lisp" directory, or another nearby directory. -- --set -e -- --# Try to find the lisp directory in several places. --# (Sun workspaces have an "editor" directory) --for dir in . .. ../.. editor ../editor ; do -- if test -d $dir/lisp/. ; then cd $dir ; break ; fi --done -- --if test ! -d lisp/. ; then -- echo "$0: Cannot find the \"lisp\" directory." -- exit 1 --fi -- --if test -z "$EMACS"; then EMACS="./src/xemacs"; fi --export EMACS -- --echo " (using $EMACS)" -- --# fuckin' sysv, man... --if [ "`uname -r | sed 's/[^0-9]*\([0-9]*\).*/\1/'`" -gt 4 ]; then -- echon() -- { -- /bin/echo $* '\c' -- } --else -- echon() -- { -- echo -n $* -- } --fi -- - EMACS_DIR=`cd \`dirname $EMACS\` && pwd`; - CANON_PWD=`pwd` - # Account for various system automounter configurations - if test -d "/net"; then - if test -d "/tmp_mnt/net"; then tdir="/tmp_mnt/net"; else tdir="/tmp_mnt"; fi - EMACS_DIR=`echo "$EMACS_DIR" | \ - sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"` - CANON_PWD=`echo "$CANON_PWD" | \ - sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"` - fi - REAL="$EMACS_DIR/`basename $EMACS`" - - echo "Recompiling in $CANON_PWD" - echo " with $REAL..." - - BYTECOMP="$REAL -batch -vanilla " - - $EMACS -batch -vanilla -l $CANON_PWD/lisp/cleantree -f batch-remove-old-elc lisp - - prune_vc="( -name '.*' -o -name SCCS -o -name RCS -o -name CVS ) -prune -o" - - # $els is a list of all .el files - # $elcs is a list of all .elc files - els=/tmp/update-elc-1.$$ elcs=/tmp/update-elc-2.$$ - rm -f $els $elcs - trap "rm -f $els $elcs" 0 1 2 3 15 - find lisp/. $prune_vc -name '*.el' -print | sort > $els - find lisp/. $prune_vc -name '*.elc' -print | sed 's/elc$/el/' | sort > $elcs - - - echon "Deleting .elc files without .el files..." - comm -13 $els $elcs | sed -e '\!/vm.el!d' -e 's/el$/elc/' | \ - while read file ; do echo rm "$file" ; rm "$file" ; done - echo done. - - - # Compute patterns to ignore when searching for files - ignore_dirs="" - ignore_pattern='' - - # Only use Mule XEmacs to compile Mule-specific elisp dirs - echon "Checking for Mule support..." - lisp_prog='(princ (featurep (quote mule)))' - mule_p="`$EMACS -batch -vanilla -eval \"$lisp_prog\"`" - if test "$mule_p" = nil ; then - echo No - ignore_dirs="$ignore_dirs mule" - else - echo Yes - fi - - # first recompile the byte-compiler, so that the other compiles take place - # with the latest version (assuming we're compiling the lisp dir of the emacs - # we're running, which might not be the case, but often is.) - #echo "Checking the byte compiler..." - #$BYTECOMP -f batch-byte-recompile-directory lisp/bytecomp - - # Prepare for byte-compiling directories with directory-specific instructions - # Not necessary any more, but I want to keep the text current to cut & paste - # into the package lisp maintenance tree. - #make_special_commands='' - #make_special () { - # dir="$1"; shift; - # ignore_dirs="$ignore_dirs $dir" - # make_special_commands="$make_special_commands \ - #echo \"Compiling in lisp/$dir\"; \ - #(cd \"lisp/$dir\" && ${MAKE:-make} EMACS=$REAL ${1+$*}); \ - #echo \"lisp/$dir done.\";" - #} - - #if test "$mule_p" != nil; then - # make_special skk all - #fi - - ## AUCTeX is a package now - # if test "$mule_p" = nil ; then - # make_special auctex some - # else - # make_special auctex some MULE_ELC=tex-jp.elc - # fi - #make_special cc-mode all - # EFS is now packaged - # make_special efs x20 - #make_special eos -k # not strictly necessary... - ## make_special gnus some # Now this is a package. - # hyperbole is now packaged - # make_special hyperbole elc - # We're not ready for the following, yet. - #make_special ilisp XEmacsELC=custom-load.elc elc - # ilisp is now packaged - # make_special ilisp elc - # oobr is now packaged - # make_special oobr HYPB_ELC='' elc - ## W3 is a package now. - #make_special w3 xemacs-w3 - - for dir in $ignore_dirs ; do - ignore_pattern="${ignore_pattern}/\\/$dir\\//d - /\\/$dir\$/d - " - done - - # Other special-case filenames that don't get byte-compiled - ignore_pattern="$ignore_pattern"' - \!/,!d - \!/paths.el$!d - \!/loadup.el$!d - \!/loadup-el.el$!d - \!/update-elc.el$!d - \!/dumped-lisp.el$!d - \!/make-docfile.el$!d - \!/site-start.el$!d - \!/site-load.el$!d - \!/site-init.el$!d - \!/version.el$!d - \!/very-early-lisp.el$!d - ' - - echo "Compiling files without .elc..." - NUMTOCOMPILE=20 # compile this many files with each invocation - comm -23 $els $elcs | \ - sed "$ignore_pattern" | \ - xargs -t -n$NUMTOCOMPILE $BYTECOMP -f batch-byte-compile - echo "Compiling files without .elc... Done" - - #if test "$mule_p" != nil; then - # eval "$make_special_commands" - #fi -REAL=`cd \`dirname $EMACS\` ; pwd | sed 's|^/tmp_mnt||'`/`basename $EMACS` -BYTECOMP="$REAL -batch -vanilla " -echo "Recompiling in `pwd|sed 's|^/tmp_mnt||'`" -echo " with $REAL..." - -$EMACS -batch -vanilla -l `pwd`/lisp/cleantree -f batch-remove-old-elc lisp - -prune_vc="( -name '.*' -o -name SCCS -o -name RCS -o -name CVS ) -prune -o" - -# $els is a list of all .el files -# $elcs is a list of all .elc files -els=/tmp/update-elc-1.$$ elcs=/tmp/update-elc-2.$$ -rm -f $els $elcs -trap "rm -f $els $elcs" 0 1 2 3 15 -find lisp/. $prune_vc -name '*.el' -print | sort > $els -find lisp/. $prune_vc -name '*.elc' -print | sed 's/elc$/el/' | sort > $elcs - - -echon "Deleting .elc files without .el files..." -comm -13 $els $elcs | sed -e '\!/vm.el!d' -e 's/el$/elc/' | \ - while read file ; do echo rm "$file" ; rm "$file" ; done -echo done. - - -# Compute patterns to ignore when searching for files -ignore_dirs="" -ignore_pattern='' - -# Only use Mule XEmacs to compile Mule-specific elisp dirs -echon "Checking for Mule support..." -lisp_prog='(princ (featurep (quote mule)))' -mule_p="`$EMACS -batch -vanilla -eval \"$lisp_prog\"`" -if test "$mule_p" = nil ; then - echo No - ignore_dirs="$ignore_dirs its egg mule language leim skk" - ignore_pattern='\!/tl/char-table.el$!d -\!/tl/chartblxmas.el$!d -\!/mu/latex-math-symbol.el$!d -' -else - echo Yes -fi - -# first recompile the byte-compiler, so that the other compiles take place -# with the latest version (assuming we're compiling the lisp dir of the emacs -# we're running, which might not be the case, but often is.) -#echo "Checking the byte compiler..." -#$BYTECOMP -f batch-byte-recompile-directory lisp/bytecomp - -# Prepare for byte-compiling directories with directory-specific instructions -# Not necessary any more, but I want to keep the text current to cut & paste -# into the package lisp maintenance tree. -#make_special_commands='' -#make_special () { -# dir="$1"; shift; -# ignore_dirs="$ignore_dirs $dir" -# make_special_commands="$make_special_commands \ -#echo \"Compiling in lisp/$dir\"; \ -#(cd \"lisp/$dir\" && ${MAKE:-make} EMACS=$REAL ${1+$*}); \ -#echo \"lisp/$dir done.\";" -#} - -#if test "$mule_p" != nil; then -# make_special skk all -#fi - -## AUCTeX is a package now -# if test "$mule_p" = nil ; then -# make_special auctex some -# else -# make_special auctex some MULE_ELC=tex-jp.elc -# fi -#make_special cc-mode all -# EFS is now packaged -# make_special efs x20 -#make_special eos -k # not strictly necessary... -## make_special gnus some # Now this is a package. -# hyperbole is now packaged -# make_special hyperbole elc -# We're not ready for the following, yet. -#make_special ilisp XEmacsELC=custom-load.elc elc -# ilisp is now packaged -# make_special ilisp elc -# oobr is now packaged -# make_special oobr HYPB_ELC='' elc -## W3 is a package now. -#make_special w3 xemacs-w3 - -for dir in $ignore_dirs ; do - ignore_pattern="${ignore_pattern}/\\/$dir\\//d -/\\/$dir\$/d -" -done - -# Other special-case filenames that don't get byte-compiled -ignore_pattern="$ignore_pattern"' -\!/,!d -\!/paths.el$!d -\!/loadup.el$!d -\!/loadup-el.el$!d -\!/update-elc.el$!d -\!/dumped-lisp.el$!d -\!/make-docfile.el$!d -\!/site-start.el$!d -\!/site-load.el$!d -\!/site-init.el$!d -\!/version.el$!d -\!/very-early-lisp.el$!d -\!/Installation.el$!d -' - -echo "Compiling files without .elc..." -NUMTOCOMPILE=20 # compile this many files with each invocation -comm -23 $els $elcs | \ - sed "$ignore_pattern" | \ - xargs -t -n$NUMTOCOMPILE $BYTECOMP -f batch-byte-compile -echo "Compiling files without .elc... Done" - -#if test "$mule_p" != nil; then -# eval "$make_special_commands" -#fi diff --cc lisp/ChangeLog index a8c5f60,c2f1b30..0000000 deleted file mode 100644,100644 --- a/lisp/ChangeLog +++ /dev/null @@@ -1,4580 -1,3205 +1,0 @@@ - 1999-05-14 XEmacs Build Bot - - * XEmacs 21.2.14 is released - - 1999-05-13 SL Baur - - * about.el: update contact info for jason and slb. - - 1999-05-13 SL Baur - - * mule/european.el (setup-romanian-environment): Add Romanian - support from Emacs/Mule romanian.el. - - 1999-03-17 Jan Vroonhof - - * cus-face.el: Label all custom changes with the 'custom' tag. - - * cus-edit.el: idem ditto. - - * faces.el: Added suport for adding device tags to various functions. - (custom): New device tag. - (face-spec-set): Call reset face with tags argument. No longer do - x-init-global-faces hack. - - * faces.el (frob-face-property): Use an anonymous specifier to map - frob-face-property-1 over. - - * x-font-menu.el (font-menu-set-font): Always specify all - properties to custom. - - 1999-05-12 SL Baur - - * mule/european.el (setup-czech-environment): Add czech support. - From David Sauer - - 1999-03-15 SL Baur - - * check-features.el: Turn hard errors into warnings. - - 1999-03-21 SL Baur - - * simple.el (delete-key-deletes-forward): As per discussion on - xemacs-beta, default to t. - - 1999-05-11 Hrvoje Niksic - - * loadup.el: Define Installation-string before loading anything. - - 1999-05-06 Gunnar Evermann - - * files.el (auto-mode-alist): fix typo in regex for .bash_* files - From Anders Stenman - - 1999-05-03 Hrvoje Niksic - - * wid-edit.el (widget-glyph-find): Ditto. - - * packages.el (locate-library): Ditto. - - * loadup.el (really-early-error-handler): Ditto. - - * lib-complete.el (read-library): Ditto. - - * faces.el (set-face-stipple): Ditto. - - * code-files.el (load): Use new calling style of locate-file. - - 1999-05-03 Hrvoje Niksic - - * packages.el (packages-unbytecompiled-lisp): Installation.el is - dead. - - 1999-05-03 Hrvoje Niksic - - * dumped-lisp.el (preloaded-file-list): Don't load - Installation.el. - - * loadup.el (Installation-string): Define it here. - - 1999-05-03 Hrvoje Niksic - - * dumped-lisp.el (preloaded-file-list): Revert previous change -- - Installation.el needs to be loaded before `dump-paths', otherwise - the dumping process won't find it. - - 1999-03-13 Adrian Aichner - - * dumped-lisp.el (preloaded-file-list): Load Installation.el after - subr so that we can use `replace-in-string' in Installation.el to - get rid of C-m chars under the native Windows build. - - 1999-04-29 Andy Piper - - * make-docfile.el: canonicalize file and directory names. - - * device.el (call-device-method): new function for calling device - specific methods. - (define-device-method): new function for defining device methods. - (define-device-method*): ditto. - - 1999-04-27 Hrvoje Niksic - - * subr.el (buffer-string): Support new FSFmacs 20.4 stuff. - - 1999-04-08 MORIOKA Tomohiko - - * mule/cyrillic.el (cyrillic-koi8-r-decode-table): New variable. - (cyrillic-koi8-r-encode-table): Likewise. - (ccl-decode-koi8): Use `cyrillic-koi8-r-decode-table'. - (ccl-encode-koi8): Use `cyrillic-koi8-r-encode-table'. - - * mule/mule-misc.el (split-char-or-char-int): New function [moved - from vietnamese.el]. - - * mule/vietnamese.el: Move function `split-char-or-char-int' to - mule/mule-misc.el. - - 1999-04-08 MORIOKA Tomohiko - - * mule/thai-xtis.el: - - Change font registry name from "Thai94x94-0" to "xtis-0". - - Change mnemonic of coding-system `tis-620' to "TIS620". - - 1999-04-06 MORIOKA Tomohiko - - * mule/ethiopic.el: fixed. - - 1999-03-30 MORIOKA Tomohiko - - * dumped-lisp.el: Add ethiopic, thai-xtis and vietnamese. - - * mule/thai-xtis.el: New file. - - * mule/vietnamese.el: New file. - - * mule/ethiopic.el: New file. - - 1999-04-22 Hrvoje Niksic - - * bytecomp.el (byte-compile-close-variables): Leave - debug-issue-ebola-notices alone. - - 1999-04-11 Oscar Figueiredo - - * ldap.el (ldap-host-parameters-alist): Make `Search Base' appear - at the top of the buffer since it is the most important thing to - customize - (ldap-get-host-parameter): New defun - (ldap-search): Add a new parameter `withdn' to retrieve the - distinguished names of entries - - 1999-04-22 Kai Haberzettl - - * startup.el (splash-frame-body): Date and spelling fixes. - - 1999-03-16 Colin Rafferty - - * view-less.el (toggle-truncate-lines): add autoload tag - - 1999-04-19 Hrvoje Niksic - - * format.el (format-alist): Disable image stuff. - - 1999-04-17 Hrvoje Niksic - - * wid-edit.el (widget-glyph-find): Search by directories, then by - suffixes rather than the other way around. - (widget-image-conversion): Renamed to - `widget-image-file-name-suffixes'. - - 1999-04-16 Olivier Galibert - - * mule/mule-charset.el: Made old functions obsolete, remove the - unspeakably evil (and inexistant in fsf's) charset-leading-byte. - (charset-iso-graphic-plane): Rename from charset-graphic. - (charset-iso-final-char): Rename from charset-final. - (charset-width): Rename from charset-columns. - (charset-bytes): Added from fsf compatibility, returns always 1. - - * mule/mule-misc.el: Move charset-doc-string alias to - mule-charset.el - - 1999-04-14 Colin Rafferty - - * x-faces.el (x-make-font-bold-italic): honor - *try-oblique-before-italic-fonts* - - 1999-04-14 Hrvoje Niksic - - * cl-extra.el (coerce): Coerce numbers to characters correctly. - - 1998-12-02 Hrvoje Niksic - - * x-faces.el (try-oblique-before-italic-fonts): Use the right - name. - - 1999-04-14 Dave Gillesipe - - * cl-extra.el (equalp): Would bug out for lists. - - 1999-03-12 Charles G Waldman - - * about.el (about-hackers): Change cgw's email address - - 1999-03-12 XEmacs Build Bot - - * XEmacs 21.2.13 is released - - 1999-03-12 SL Baur - - * simple.el (delete-key-deletes-forward): Revert to previous - behavior. - - 1999-01-18 Didier Verna - - * menubar-items.el (xemacs-splash-buffer): handle the case of - multiple elements in the splash buffer body. - - * startup.el (splash-frame-timeout): new constant: interval - between splash buffer elements. - (command-line-1): handle splash buffer with multiple elements (use - a timeout). - (splash-frame-body): Originally `startup-splash-frame-body'. - Rewrote a cleaner and more readable version. This can now be array, - in which case each element is displayed in turn in the splash buffer. - (splash-frame-static-body): new constant. Persistent information - across all splash buffer elements (preserves the possibility to give - it in different languages. - (circulate-splash-frame-elements): new function. Used as a timeout - to circulate through all splash frame elements and display them in - sequence. - (display-splash-frame): originally `startup-splash-frame'. Handle - the case of multiple elements in the splash buffer body. Now - returns a timeout id if multiple elements to display, or nil. - - 1999-02-19 Jan Vroonhof - - * x-faces.el (x-init-global-faces): Add default tag to specifiers, - so they can be overridden by x-init-face-from-resources. - Additionally specify the font name also with an x tag. - - 1999-03-08 Andy Piper - - * package-get.el (package-get-base): autoload. - - * menubar-items.el (default-menubar): add update menu item. Fix - custom menu to only be activated when package-base is available. - - * package-get.el (package-get-custom): don't load - package-get-custom as it is auto-generated. Fix group definition. - - 1999-03-05 Didier Verna - - * cus-dep.el (Custom-make-dependencies): use `prin1-to-string' - instead of `symbol-name' (Thanks Kyle). - - * cus-edit.el (custom-save-variables): use `prin1' instead of - princ to write symbols. - - 1999-03-05 XEmacs Build Bot - - * XEmacs 21.2.12 is released - - 1999-03-05 SL Baur - - * menubar-items.el (default-menubar): Add kfm browsing support. - From Neal Becker - - 1999-03-03 Steven Baur - - * font-lock.el (font-lock-revert-cleanup): Null out to avoid repeated - calls to font-lock during buffer reversion. - - 1999-02-12 Didier Verna - - * info.el (Info-build-node-completions): unconditionally widen the - tag table buffer. - - 1999-02-19 Paul Stodghill - - * x-faces.el (x-init-face-from-resources): - Only set fonts in the 'x locale. - - 1999-03-04 Adrian Aichner - - * package-ui.el (pui-install-selected-packages): Don't throw on - `package-admin-delete-binary-package' returning nil since it's - normal. Reindent function. - (pui-add-required-packages): Handle case where packages selected - for installation have never been installed. - - 1999-03-03 Martin Buchholz - - * menubar-items.el (default-menubar): - Implement the ``Mule->Set coding system of process'' menu item. - - 1999-02-18 Martin Buchholz - - * files.el (auto-mode-alist): Use c-mode for *.i pre-processed cpp - files - - Change some `if's to `when's - - 1999-03-01 XEmacs Build Bot - - * XEmacs 21.2.11 is released - - 1999-02-22 Jan Vroonhof - - * userlock.el (ask-user-about-supersession-threat-dbox): Guard - against window close (Fix Bug #460). - (ask-user-about-lock-dbox): Idem. - - 1999-02-25 SL Baur - - * mule/mule-charset.el (charset-leading-byte): New function. - From Kazuyuki IENAGA - - 1999-02-12 Andy Piper - - * about.el (xemacs-hackers): change andy's email address. - (about-url-alist): change andy's web page address. - (about-xemacs): add piper. - - 1999-02-16 SL Baur - - * dumped-lisp.el (preloaded-file-list): Core mule files moved out - of mule-base into lisp/mule. - - 1999-02-16 SL Baur - - * mule/arabic.el: - mule/canna-leim.el: - mule/chinese.el: - mule/cyrillic.el: - mule/english.el: - mule/european.el: - mule/greek.el: - mule/hebrew.el: - mule/japanese.el: - mule/kinsoku.el: - mule/korean.el: - mule/misc-lang.el: - mule/mule-category.el: - mule/mule-ccl.el: - mule/mule-charset.el: - mule/mule-cmds.el: - mule/mule-coding.el: - mule/mule-files.el: - mule/mule-help.el: - mule/mule-init.el: - mule/mule-misc.el: - mule/mule-tty-init.el: - mule/mule-x-init.el: - mule/viet-chars.el: Remerge from mule-base. - - * dumped-lisp.el (preloaded-file-list): Core mule files moved out - of mule-base into lisp/mule. - - 1999-02-10 Adrian Aichner - - * process.el (exec-to-string): Use `shell-command-switch' in place - of hard-wired "-c" (for WindowsNT). - - 1999-02-08 Charles G Waldman - - * menubar-items.el (default-menubar): Remove obsolete - "Gopher" item - - 1999-02-06 Jan Vroonhof - - * package-admin.el (package-admin-get-install-dir): First fall - back to the location of xemacs-base for non-mule packages. - - 1999-02-15 Martin Buchholz - - * paths.el: - - improved automounter tmp directory support. - - support 4 (!) empirically discovered automounter conventions - - 1999-02-12 SL Baur - - * etags.el (pop-tag-mark): autoload to match key binding. - - 1999-02-05 XEmacs Build Bot - - * XEmacs 21.2.10 is released - - 1999-02-02 Jan Vroonhof - - * package-get.el (package-get-remote-filename): Don't bug out for - a local file name in the search entry. - - 1999-02-02 XEmacs Build Bot - - * XEmacs 21.2.9 is released - - 1999-01-19 Didier Verna - - * replace.el (replace-search-function): new variable containing a - function to perform a search-forward. - (replace-re-search-function): new variable containing a function - to perform a re-search-forward. - (perform-replace): use them. - - 1999-01-25 Didier Verna - - * select.el (selection-owner-p): use the name `XEmacs'. - (cut-copy-clear-internal): ditto. - - 1999-01-18 Andy Piper - - * about.el (about-url-alist): Update my entry. - (xemacs-hackers): Ditto. - - 1999-01-14 Adrian Aichner - - * buffer.el (switch-to-buffer): Fixing documentation. - * minibuf.el (minibuffer-completion-table): ditto. - * cl-macs.el (return-from): ditto. - - 1999-01-04 Didier Verna - - * replace.el (delete-non-matching-lines): temporarily disable - case-folding when called interactively with a regexp containing - uppercase characters. - (delete-matching-lines): ditto. - (count-matches): ditto. - (list-matching-lines): ditto. - - 1999-01-07 Colin Rafferty - - * window.el (shrink-window-if-larger-than-buffer): Clean up. Only - abort if current window is split horizontally, not if others are - split. Got rid of unnecessary minibuffer checking. Also, add - some comments (it's still complex). - - 1999-01-12 Robert Pluim - - * package-get.el: changed address for doc.ic.ac.uk to - sunsite.doc.ic.ac.uk - - 1999-01-09 Oscar Figueiredo - - * ldap.el (toplevel): Remove requires so that the file compiles - with a non LDAP-enabled XEmacs binary. Provide `ldap'. - - 1999-01-10 J. Kean Johnston - - * dump-paths.el: Calculate module-directory and set - module-load-path to the load path for modules. - - * loadup.el: Get bootstrap value of module-load-path from the - environment variable EMACSBOOTSTRAPMODULEPATH. - - Display the module load path if we're debugging paths. - - * setup-paths.el: Added function paths-find-site-module-directory. - - Added function paths-find-module-directory. - - Added function paths-construct-module-load-path. Uses new - environment variable EMACSMODULEPATH. - - 1998-12-30 Martin Buchholz - - * font.el (font-default-object-for-device): - Oops! This `or' can't be replaced by `unless'. - Fixed inability to run w3, among other things. - - 1998-12-17 Charles G. Waldman - - * package-admin.el: Change initialization of - package-admin-install-function dependent on system type. - Change package-admin-install-function-mswindows to use - "minitar". - - 1998-12-23 Hrvoje Niksic - - * mouse.el (default-mouse-motion-handler): Disable help echo while - in the minibuffer. - - 1998-12-28 Martin Buchholz - - * XEmacs 21.2.8 is released. - - 1998-12-24 Martin Buchholz - - * XEmacs 21.2.7 is released. - - 1998-12-07 Jan Vroonhof - - * package-ui.el (pui-list-packages): Set truncate-lines. - - * package-get.el (package-get-download-menu): Use - `package-ui-add-site'. Add a a toggle to indicate it is in the list. - - * package-ui.el (pui-help): Ditch in favor of `describe-mode' - (pui-help-string): idem. - (list-packages-mode): New major mode. - (pui-list-packages): Use 'list-packages-mode' in the package buffer. - (pui-install-selected-packages): Add suport for removing packages. - (pui-toggle-package-delete-key): New function. - (pui-popup-context-sensitive): New kludge. - (pui-list-packages): Add warning when `package-get-remote' is nil. - (package-ui-add-site): New function. - - 1998-12-01 Didier Verna - - * hyper-apropos.el (hyper-where-is): added the missing autoload. - - 1998-11-29 Oscar Figueiredo - - * ldap.el: Custom-ized - (toplevel): Do not provide `ldap' which is provided by C level - LDAP code - (ldap-search): Docstring and stylistic fixes as suggested by Hrvoje - - 1998-12-05 Hrvoje Niksic - - * isearch-mode.el (isearch-mode): Really fix keymap lossage. - - 1998-12-17 Andy Piper - - * sound.el (sound-load-list): name changed from sound-load-alist. - (sound-extension-list): name changed from sound-ext-list. - (load-default-sounds): use new names. - (load-sound-file): use new names. - - 1998-12-16 Andy Piper - - * XEmacs 21.2.6 is released - - 1998-11-30 Hrvoje Niksic - - * cus-dep.el (Custom-make-dependencies): Be smarter about trapping - errors. - - 1998-12-04 Hrvoje Niksic - - * wid-edit.el (widget-echo-this-extent): Set - help-echo-owns-message to t. - - 1998-11-30 Greg Klanderman - - * package-get.el (package-get-download-menu): use toggles for - each site in the download site menu. - - 1998-12-01 Jan Vroonhof - - * package-get.el (package-get): If we cannot find a package - because package-get-remote is not set, give a more helpful - error message. - - 1998-11-30 Greg Klanderman - - * package-get.el (package-get-remote-filename): use an EFS path - with user anonymous if no user is specified. - - 1998-12-10 Jan Vroonhof - - * faces.el (face-spec-set): Re-init fallfacks for default after - calling reset-face on the default face. - - 1998-12-10 Jan Vroonhof - - * package-admin.el (package-admin-default-install-function): - Behave as advertised. Make sure the pkg-dir is proper for - default-directory. - (package-admin-add-binary-package): Make sure the pkg-dir is - proper for default-directory. - (package-admin-install-function-mswindows): Make sure the pkg-dir - is proper for default-directory. - - 1998-12-05 XEmacs Build Bot - - * XEmacs 21.2.5 is released - - 1998-12-05 SL Baur - - * files.el (binary-file-regexps): regexp-opt is not available at - bytecompile time. - - 1998-11-30 Martin Buchholz - - * x-win-xfree86.el: - * x-win-sun.el (x-win-init-sun): - * x-win-sun.el: - * x-mouse.el (mouse-track-and-copy-to-cutbuffer): - * x-iso8859-1.el: - * x-init.el (init-post-x-win): - * x-init.el (init-pre-x-win): - * x-init.el (x-initialize-compose): - * x-init.el: - * x-compose.el: - * winnt.el: - * widget.el: - * wid-edit.el (widget-glyph-click): - * wid-edit.el (widget-glyph-find): - * wid-edit.el (widget-type): - * view-less.el (view-buffer-other-window): - * very-early-lisp.el: - * version.el: - * toolbar.el: - * toolbar-items.el: - * term/sun.el (suntool-map): - * term/sun-mouse.el: - * term/internal.el: - * syntax.el (modify-syntax-entry): - * symbol-syntax.el: - * subr.el: - * startup.el (lock-directory): - * simple.el (set-comment-column): - * simple.el (backward-delete-char-untabify): - * shadow.el (find-emacs-lisp-shadows): - * shadow.el: - * setup-paths.el (paths-construct-info-path): - * select.el (cut-copy-clear-internal): - * process.el (call-process-region): - * process.el (start-process-shell-command): - * process.el: - * paths.el (rmail-spool-directory): - * paragraphs.el (use-hard-newlines): - * package-get.el (package-get-dependencies): - * package-admin.el (package-admin-delete-binary-package): - * obsolete.el (truncate-string): - * obsolete.el (store-substring): - * mouse.el (default-mouse-track-maybe-own-selection): - * mouse.el (mouse-yank-at-point): - * modeline.el: - * modeline.el (mouse-drag-modeline): - * minibuf.el (read-directory-name-internal): - * minibuf.el (read-file-name-internal): - * minibuf.el (read-file-name-internal-1): - * minibuf.el (read-file-name-2): - * minibuf.el (exact-minibuffer-completion-p): - * minibuf.el (read-from-minibuffer): - * minibuf.el: - * menubar.el (check-menu-syntax): - * map-ynp.el (map-y-or-n-p): - * make-docfile.el (docfile-out-of-date): - * loadup.el ((member "run-temacs" command-line-args)): - * loadup.el ((member "no-site-file" command-line-args)): - * loadup.el (really-early-error-handler): - * loadup.el: - * loadhist.el: - * loaddefs.el: - * lisp-mnt.el (lm-verify): - * lib-complete.el (lib-complete:cache-completions): - * lib-complete.el (library-all-completions): - * itimer.el (itimer-run-expired-timers): - * info.el (Info-mode): - * info.el (Info-insert-file-contents): - * info.el (Info-rebuild-dir): - * info.el (Info-build-dir-anew): - * info.el (Info-parse-dir-entries): - * info.el (Info-dir-outdated-p): - * info.el (Info-insert-dir): - * info.el (info-xref): - * info.el: - * hyper-apropos.el (hyper-apropos-get-doc): - * hyper-apropos.el (hyper-describe-face): - * hyper-apropos.el (hyper-apropos-mode): - * hyper-apropos.el: - * help.el (list-processes): - * help.el: - * gnuserv.el: - * font.el (mswindows-font-create-name): - * font.el (font-default-font-for-device): - * font.el (x-font-create-object): - * font.el (font-registry): - * font.el: - * font-lock.el (font-lock-keywords): - * font-lock.el: - * finder.el (finder-compile-keywords): - * find-paths.el (paths-find-recursive-path): - * fill.el (set-justification-center): - * fill.el (fill-region-as-paragraph): - * files.el (insert-directory): - * files.el (wildcard-to-regexp): - * files.el (recover-file): - * files.el (basic-save-buffer): - * files.el (delete-auto-save-file-if-necessary): - * files.el (file-relative-name): - * files.el (backup-extract-version): - * files.el (backup-buffer): - * files.el (set-visited-file-name): - * files.el (set-auto-mode): - * files.el (interpreter-mode-alist): - * files.el: - * files.el (find-file-noselect): - * files.el (abbreviate-file-name): - * files.el (parse-colon-path): - * files.el (directory-abbrev-alist): - * etags.el (visit-tags-table-buffer): - * easymenu.el (easy-menu-define): - * dragdrop.el (experimental-dragdrop-drag): - * dragdrop.el (dragdrop-drop-do-functions): - * dragdrop.el (dragdrop-drop-at-point): - * disass.el (disassemble-1): - * disass.el (disassemble-internal): - * disass.el (disassemble): - * disass.el: - * derived.el (derived-mode-init-mode-variables): - * derived.el (define-derived-mode): - * custom.el (defgroup): - * cus-edit.el (custom-quote): - * config.el: - * code-process.el (open-network-stream): - * code-process.el (start-process): - * code-process.el (call-process-region): - * code-process.el (call-process): - * code-process.el: - * code-files.el (insert-file-contents): - * code-files.el: - * code-files.el (buffer-file-coding-system-for-read): - * cmdloop.el (yes-or-no-p-minibuf): - * cl.el: - * cl-macs.el: - * cl-extra.el: - * callers-of-rpt.el (make-caller-report): - * callers-of-rpt.el: - * bytecomp.el (batch-byte-recompile-directory): - * bytecomp.el (batch-byte-compile-1): - * bytecomp.el (batch-byte-compile): - * bytecomp.el (display-call-tree): - * bytecomp.el (byte-compile-insert): - * bytecomp.el (byte-compile-two-args-19->20): - * bytecomp.el (byte-compile-variable-ref): - * bytecomp.el (byte-compile-form): - * bytecomp.el (byte-compile-top-level-body): - * bytecomp.el (byte-compile-out-toplevel): - * bytecomp.el (byte-compile-byte-code-maker): - * bytecomp.el (byte-compile-file-form-defmumble): - * bytecomp.el (byte-compile-file-form): - * bytecomp.el (byte-compile-keep-pending): - * bytecomp.el (byte-compile-insert-header): - * bytecomp.el (byte-compile-from-buffer): - * bytecomp.el (byte-compile-file): - * bytecomp.el (byte-recompile-file): - * bytecomp.el (byte-compile-close-variables): - * bytecomp.el (byte-compile-warn-about-unused-variables): - * bytecomp.el (byte-compile-warn-about-unresolved-functions): - * bytecomp.el (byte-compiler-legal-options): - * bytecomp.el (byte-compile-lapcode): - * bytecomp.el (byte-optimize-log): - * bytecomp.el ((fboundp 'defsubst)): - * bytecomp.el: - * bytecomp-runtime.el: - * byte-optimize.el (byte-optimize-apply): - * byte-optimize.el (car): - * byte-optimize.el (byte-optimize-form): - * byte-optimize.el (byte-optimize-form-code-walker): - * byte-optimize.el: - * build-report.el (build-report-insert-installation-file): - * build-report.el (build-report): - * auto-show.el: - * apropos.el (apropos-documentation): - - mega patch - - clean up byte-compile warnings - - remove unused variables - - Use common lisp style hashtable functions - - byte compiler cleanup - - use #'(lambda ...) instead of '(lambda ...) or (function (lambda ...)) - - remove old backquote syntax usage - - move some cl functionality into C for speed. - - remove last remaining VMS support - - spelling fixes - - implement last, butlast, nbutlast, copy-list in C. - - new macro ignore-file-errors, similar to ignore-errors - (ignore-file-errors (delete-file "foo")) - - get frequent garbage collection during loadup.el by tweaking - gc-cons-threshold, rather than explicitly calling garbage-collect - - default delete-key-deletes-forward to `t'. - - 1998-11-28 SL Baur - - * XEmacs 21.2-beta4 is released. - - 1998-11-27 Jan Vroonhof - - * easymenu.el (easy-menu-add-item): Wraper around add-menu-btton. - (easy-menu-item-present-p): Wrapper around find-menu-item. - (easy-menu-remove-item): Wrapper around delete-menu-item. - - * menubar.el (delete-menu-item): Add 'from-menu' argument. - (add-menu-button): Add 'in-menu' argument. - (add-menu-item-1): Add in-menu support to helper function. - - 1998-11-27 Katsumi Yamaoka - - * isearch-mode.el (isearch-mode): Fix keymap lossage. - - 1998-11-26 Jan Vroonhof - - * faces.el (get-custom-frame-properties): Revert Hrvoje Niksic change - of Dec 4, 1997. - - 1998-11-25 Hrvoje Niksic - - * process.el (shell-command-on-region): Report if the command - succeeded or failed. - - 1998-11-24 Hrvoje Niksic - - * subr.el (buffer-substring-no-properties): Comment out. - - 1998-11-07 Adrian Aichner - - * msw-faces.el (mswindows-find-smaller-font): Turning font names - into font instances first, like `x-frob-font-size' does. - (mswindows-find-larger-font): ditto - - 1998-11-04 Greg Klanderman - - * package-ui.el (pui-install-selected-packages): fix args in call - to `package-get'. - - 1998-10-29 Jan Vroonhof - - * package-get.el (host-name): New widget type. - (package-get-remote): Better customization using new type. - (package-get-download-sites): idem dito. - - (package-get-custom): Do not use package-get-all untill we have - runtime dependencies. - - (package-get-remove-copy): Default to 't' we no longer need this - kludge as we do not currently use depenencies. - - (package-get-was-current): New variable. - (package-get-require-base): New 'force-current' argument. - (package-get-update-base): idem - (package-get-package-provider): idem - (package-get-locate-index-file): New 'no-remote' argument. - (package-get-locate-file): idem. - - (package-get-maybe-save-index): New function. - (package-get-update-base): Use it. - - 1998-10-28 Greg Klanderman - - * package-get.el (package-get-remote): default to nil; by default, - don't go out to the net via EFS. They must select a download site. - (package-get-download-sites): new variable. - (package-get-download-menu): new function. - (package-get-locate-index-file): new function. - (package-get-update-base): use it. - - * menubar-items.el (default-menubar): add "Update Package Index" - and "Add Download Site" menus under Options | Manage Packages. - - 1998-10-19 Greg Klanderman - - * package-get.el (package-get): bugfix code checking installed version - for case where package is not currently installed. - (package-get-require-signed-base-updates): new variable. - (package-get-update-base-from-buffer): remove REMOTE-SOURCE arg, it was - deemed not a goot thing. Use the variable - package-get-allow-unsigned-base-updates instead. - - 1998-10-16 Greg Klanderman - - * package-get.el (package-get): Don't install an older version than - we already have unless explicitly told to. Issue a warning. - - * package-ui.el (pui-add-required-packages): when adding - dependencies, don't add packages that are up to date. - (pui-package-symbol-char): Don't consider a package out of date - if you have a newer version installed than the latest version in - package-get-base. - - * package-get.el (package-get-base-filename): document that it may - be a path relative to package-get-remote; new default value. - (package-get-locate-file): new function. - (package-get-update-base): use it to expand package-get-base-filename. - (package-get-save-base): new function to save the package-get database - to file. - (package-get-update-base-from-buffer): add REMOTE-SOURCE argument. - (package-get-update-base): pass the REMOTE-SOURCE arg. - (package-get-update-base-entry): call package-get-custom-add-entry. - (package-get-file-installed-p): removed; no longer needed. - (package-get-create-custom): ditto. - (toplevel): remove code to build and load package-get-custom.el - (package-get-custom-add-entry): new function. - - 1998-10-12 Hrvoje Niksic - - * wid-edit.el (widget-button-click): Don't switch window. - - 1998-10-22 Jan Vroonhof - - * cus-face.el (custom-set-face-update-spec): Add autoload cookie - - 1998-10-20 Malcolm Box - - * etags.el (find-tag-default): Run find-tag-hook using - run-hooks rather than funcall - - 1998-10-19 Hrvoje Niksic - - * isearch-mode.el (isearch-mode): Set the current minor mode maps - and the current local map as the parents to isearch-mode-map. - - 1998-10-15 SL Baur - - * XEmacs 21.2-beta3 is released. - - 1998-10-15 Greg Klanderman - - * package-get.el (package-get-update-base): use - insert-file-contents-internal, not insert-file-contents-literally. - - 1998-10-14 Jan Vroonhof - - * auto-save.el: expand-file 'auto-save-*-dir' at runtime not at - dump time. - - 1998-10-15 Greg Klanderman - - * package-get.el (package-get-update-base-entry): new function. - (package-get-update-base): renamed; was `package-get-load-base'. - cleanup, and use package-get-update-base-from-buffer. - (package-get-update-base-from-buffer): new function. - (package-get-update-base-entries): new; helper for above. - Do not eval lisp grabbed over ftp; parse it from new format. - - 1998-10-15 Greg Klanderman - - * files.el (set-auto-mode): Don't play games loading package-get - database; package-get-package-provider will handle it all. - - 1998-10-14 Greg Klanderman - - * package-get.el (package-get-base-filename): new variable. - (package-get-require-base): new function. - (package-get-pgp-signed-begin-line): new variable. - (package-get-pgp-signature-begin-line): ditto. - (package-get-pgp-signature-end-line): ditto. - (package-get-load-base): new function. - (package-get-interactive-package-query): - (package-get-update-all): - (package-get-dependencies): - (package-get-package-provider): - (package-get-custom): use package-get-require-base. - [package-get-custom loading]: disable for now. - - * package-ui.el (pui-list-packages): use (package-get-require-base) - - 1998-10-14 Jan Vroonhof - - * package-ui.el: Correct obvious thinko in choosing extent face. - - 1998-10-12 Jan Vroonhof - - * menubar-items.el (default-menubar): pui-list-package has nothing - to with Customize. Move all the package stuff to a new Item in Options. - - * package-ui.el (pui-menu): Add menu and Popup menu. - - * package-get.el (package-get): Use new - package-admin-get-install-dir. - - * package-admin.el (package-admin-get-install-dir): New syntax. - Conserve package location and put mule packages where mule-base is. - - * package-get.el : Customized - - * package-ui.el (pui): Customized - (pui-package-install-dest-dir): New variable. - (pui-install-selected-packages): Use it - - 1998-10-12 SL Baur - - * package-get.el (package-get-interactive-package-query): Move - dependency on package-get-base to run-time. - (package-get-update-all): Ditto. - (package-get-dependencies): Ditto. - (package-get-package-provider): Ditto. - (package-get-custom): Ditto. - - 1998-10-11 Glynn Clements - - * events.el: Remove 'ascii-character property from 'backspace - and 'delete symbols - - 1998-10-11 SL Baur - - * package-get-base.el: removed. - - 1998-09-23 Didier Verna - - * simple.el (search-caps-disable-folding): moved from isearch-mode.el - (no-upper-case-p): new function. - (with-search-caps-disable-folding): new macro. - (with-interactive-search-caps-disable-folding): new macro. - (zap-to-char): In interactive mode, do a case-sensitive search if - the character is uppercase. - (zap-up-to-char): ditto. - - * replace.el (perform-replace): use the function no-upper-case-p. - - * isearch-mode.el (isearch-fix-case): ditto. - make obsolete `with-caps-disable-folding' and - `isearch-no-upper-case-p'. - - * etags.el (find-tag-internal): use `with-search-caps-disable-folding'. - (tags-search): ditto. - (tags-query-replace): ditto. - - * info.el (Info-search): ditto. - - 1998-10-07 Jan Vroonhof - - * x-font-menu.el (font-menu-set-font): Respect font-menu-frame-local - - 1998-10-07 Greg Klanderman - - * package-admin.el (package-admin-rmtree): rewritten. need to - check for "." and ".." before symlink check. expand files and - directories with respect to DIRECTORY, not default-directory. - - 1998-10-04 Greg Klanderman - - * package-get.el (package-get-all): add INSTALL-DIR argument. - - 1998-10-06 Greg Klanderman - - * package-ui.el (pui-add-required-packages): new function, select - dependent packages. - (pui-display-keymap): bind it. - (pui-help-string): document it. - (pui-install-selected-packages): package-get-all -> package-get. - - * package-get.el (package-get-dependencies): new function. - - 1998-10-04 Hrvoje Niksic - - * isearch-mode.el (isearch-done): Use regexp-search-ring-max for - regexps. - - 1998-10-05 Hrvoje Niksic - - * mouse.el (default-mouse-track-point-at-opening-quote-p): New - function. - (default-mouse-track-normalize-point): Use it. - - 1998-09-30 Jan Vroonhof - - * package-admin.el (package-admin-delete-binary-package): - General cleanup. Remove unnessary use of progn and - save-excursion. - (package-admin-delete-binary-package): Do NOT mess with file - modes. That is evil. - (package-admin-delete-binary-package): Wrap all deleting in - condition-case. The data in MANIFEST is untrustworthy. - (package-admin-delete-binary-package): Let the OS worry about non - empty directories. - - 1998-10-09 SL Baur - - * lisp-mnt.el (lm-commentary): Fix InfoDock-style comment - processing. - (lm-report-bug): Fix mail address to send bug reports to. - - 1998-09-29 SL Baur - - * XEmacs 21.2-beta2 is released. - - 1998-08-14 Jan Vroonhof - - * files.el (auto-mode-alist): Enhanced regexp for perl-mode - - 1998-09-22 Karl M. Hegbloom - - * info.el (Info-mode): Document page turning by double clicks in - docstring so `M-x describe-mode' will display it. - - 1998-09-20 Karl M. Hegbloom - - * info.el (Info-mouse-track-double-click-hook): Use character - widths to calculate a border region where double clicking does - page turning, and return `nil' by default so other hooks, such as - region highlighting, will be run. - - 1998-09-29 Colin Rafferty - - * sound.el (default-sound-directory-list): Initialize with all the - "sounds" directories in `data-directory-list'. It used to just be - the first one. - - * packages.el (locate-data-directory-list): Created. This gives - the list of matching directories, unlike `locate-data-directory', - which just gives the first one. - - 1998-09-26 Jan Vroonhof - - * minibuf.el (read-from-minibuffer): No longer bind help-form but - make a binding in the local keymap until help-char handling is - improved. - - * help.el (help-keymap-with-help-key): Provide keymap with help - binding. - (help-print-help-form): New helper function. - - 1998-09-23 Hrvoje Niksic - - * isearch-mode.el (isearch-highlight): set-extent-endpoints can - move extent to another buffer; no need to create a new extent. - (isearch-fix-case): New function. - (isearch-search-and-update): Use it. - - 1998-09-22 Hrvoje Niksic - - * isearch-mode.el (isearch-mode): Use overriding-local-map to set - the keymap, not minor-mode-map-alist. - (isearch-done): Restore overriding-local-map. - - 1998-09-21 Martin Buchholz - - * bytecomp.el (byte-compile-buffer-substring): - Fix for: (byte-compile (defun f () (buffer-substring))) - ==> ** buffer-substring called with 3 args, but requires 0-3 - - new code not only works, but is more readable, too. - - 1998-09-20 Jonathan Harris - - * msw-faces.el (mswindows-init-device-faces): Don't try to - specify a default font at this late stage. Do try to force - creation of the default face font so that if it fails we get - an error now instead of a crash at frame creation. - - mswindows-font-canonicalize-name, mswindows-make-font-unbold, - mswindows-make-font-unitalic: Canonical default weight - changed from "Normal" to "Regular". - - mswindows-make-font-bold / -bold-italic: Supplied device was - not being passed into call to mswindows-find-smaller-font. - - 1998-09-10 Bjrn Torkelsson - - * package-get.el (package-get-remote): Fix the path where to find - the packages on xemacs.org. - - 1998-09-08 Hrvoje Niksic - - * about.el (about-maintainer-info): Update Ben's entry. - - 1998-09-24 Martin Buchholz - - * lisp/shadow.el (find-emacs-lisp-shadows): - - `member' was being called on lists of length 2000! - - Replace with hashtables. - - Replace hand-coded loops with (dolist) - - Fix comment typo - - 1998-09-20 Darryl Okahata - - * packages.el: Added new function, `package-delete-name', to - delete existing packages from the installed package database - (`packages-package-list'). Also added the "pkginfo" directory - to `packages-special-base-regexp', so that the pkginfo directory - would not get added to `late-packages'. - - * package-admin.el: Added ability to delete an installed package - (added low-level function, `package-admin-delete-package'). - Understands how to use the pkginfo/MANIFEST. file to - delete the package. When installing a package, will also - create a MANIFEST.* file if one is not provided by the - package. If the MANIFEST.* doesn't exist when deleting a - package, the functions will fall back to attempting to delete - any package-specific lisp directory. - - * package-get.el: Moved some functions to package-admin.el. - Added interactive function `package-get-delete-package', for - use by users for deleting a package. - - Also modified to not require the prescence of efs. - - 1998-09-22 Hrvoje Niksic - - * files.el (find-file-noselect): Handle all signals, kill the - buffer and resignal. - - 1998-09-23 SL Baur - - * cl-macs.el (glyph-image): Add setf method. - - 1998-09-06 Darryl Okahata - - * package-get.el: Fixed broken EFS downloading. Also, look for - .tar.gz files first, in preference over .tgz files. - - * package-ui.el: Fix display of package version numbers. - - 1998-08-27 Jan Vroonhof - - * x-font-menu.el (font-menu-set-font): Add "pt" units to size - argument. - - 1998-09-03 Darryl Okahata - - * list-mode.el: `display-completion-list': added new/optional - keyword `:completion-string', which allows the programmer to - change the "Possible completions are:" prompt. - - * menubar-items.el: Added new pulldown menu-pick to start up the - visual package browser/installer: - - Options->Customize->List Packages - - * package-admin.el: Added hooks for installing under both Unix - and MS Windows. Does additional error checking. No longer - calls "add-big-package.sh" to install packages under Unix; now - calls gunzip & tar directly. - - * package-get.el: Added ability to install packages from files - on a local disk/CDROM. Now deletes any existing package lisp - directory. Does completion on available packages when - querying for package names. Will also search for .tgz files - in addition for .tar.gz files. Tries to reload - auto-autoloads, as a convenience when loading new packages, - and also tries to add any new package paths to `load-path'. - Changed all occurences of `concat' to use `expand-file-name'. - - * package-ui.el: New file which implements the main visual - package browser/installer, which is started via a menu pick or - M-x pui-list packages. - - 1998-09-03 Hrvoje Niksic - - * startup.el (load-init-file): spelling fix. - - 1998-09-02 Michael Sperber [Mr. Preprocessor] - - * startup.el (normal-top-level): Load auto-autoload files - covariantly with their precedence. - - 1998-08-26 Jan Vroonhof - - * menubar-items.el (default-menubar): Remove "Font Weight" - option, there is currently no custom equivalent.. Customize-faces - is "Edit faces". - - * x-font-menu.el (font-menu-set-font): Use customize to set - default face. - - * faces.el (face-spec-update-all-matching): New function. - - * cus-face.el (custom-set-face-update-spec): New function. - Interface to customize faces from elisp. - - (custom-face-value-create): Show the customized settings if set - but not saved. - - 1998-08-26 Jan Vroonhof - - (custom-face-value-create): Show the customized settings if set - but not saved. - - 1998-08-31 Hrvoje Niksic - - * keydefs.el (global-map): Add FSF 20.3 binding of - query-replace-regexp. - - 1998-08-21 Greg Klanderman - - * minibuf.el (read-file-name-internal-1): use - user-name-completion-1 instead of user-name-completion. - - 1998-08-19 Michael Sperber [Mr. Preprocessor] - - * loadup.el: - * make-docfile.el: - * update-elc.el: Don't set `source-directory' (now defunct as a - global variable) no more. - - * packages.el (packages-list-autoloads): Made `source-directory' - (now defunct as a global variable) a parameter. - - 1998-08-13 Carsten Leonhardt - - * about.el (about-hackers): new email - - 1998-08-16 SL Baur - - * lisp-mode.el (with-string-as-buffer-contents): Set indentation. - - 1998-07-17 Didier Verna - - * faces.el (set-face-property): - (set-face-dim-p): - (face-dim-p): updated the doc strings now that the dim property isn't - tty-specific. - (face-equal): the dim property is now a common one. - - * cus-face.el (custom-face-attributes): New face attribute: `dim' - Renamed the `stipple' attribute to `background-pixmap'. - (custom-face-background-pixmap): make custom-face-stipple an - obsolete alias for this. - - 1998-08-11 Michael Sperber [Mr. Preprocessor] - - * find-paths.el (paths-file-readable-directory-p): Created and - used. - - * loadup.el: Don't set inhibit-... flags from run-temacs. - - 1998-08-06 Michael Sperber [Mr. Preprocessor] - - * packages.el (packages-data-path-depth): Added and used. - - 1998-08-05 Charles G. Waldman - - * about.el: - - Change .xpm to .png, delete "zcat" section. - - cosmetic fix in the 'marcpa' entry. - - * etc/photos - - convert all .xpm.Z to .png - - rename mrb to martin - - rename mcook-m to mcookm - - 1998-07-31 Martin Buchholz - - * x-init.el (x-initialize-compose): Add support for - dead-circumflex as YET ANOTHER NAME for that dead key. - - 1998-08-05 Colin Rafferty - - * setup-paths.el (paths-construct-exec-path): Made the - last-packages really be last. - (paths-construct-data-directory-list): Ditto. - - 1998-08-01 Kai Haberzettl - - * startup.el(startup-splash-frame-body): - Update Copyright notice in splash screen - - 1998-07-20 Greg Klanderman - - * minibuf.el (read-file-name-internal-1): do ~user completion. - - 1998-07-22 Jan Vroonhof - - * font-lock.el (font-lock-fontify-glumped-region): Add guard - aginst destroyed extents - - 1998-07-24 Greg Klanderman - - * package-get.el (package-get): add `install-dir' argument. - - 1998-07-20 John Jones - - * package-get.el: calls to package-get-update-all will only - update packages which are already installed. - - 1998-07-23 SL Baur - - * autoload.el (update-file-autoloads): Ensure autoloads buffer is - writable. - - 1998-07-20 Colin Rafferty - - * about.el (about-hackers): Correct my email. - - 1998-07-20 Kai Haberzettl - - * about.el (about-hackers): new email-address. - - 1998-07-25 SL Baur - - * minibuf.el (read-number): Don't let `input-error' condition - escape. - - 1998-07-20 Greg Klanderman - - * about.el (about-hackers): use my `email-for-life' address. - --1998-07-19 SL Baur -- -- * XEmacs 21.2-beta1 is released. -- --1998-07-12 Oscar Figueiredo -- -- * ldap.el (ldap-search): Doc string change -- --1998-07-16 Colin Rafferty -- -- * menubar-items.el (default-menubar): Removed references to -- `data-directory', and use `locate-data-file' instead, and made -- then greyed out if they don't exist. -- --1998-07-14 Oscar Figueiredo -- -- * keymap.el (events-to-keys): Use `format' instead of `concat' -- since the latter does not accept integer args anymore -- --1998-07-15 SL Baur -- -- * dumped-lisp.el (preloaded-file-list): Usage of Lisp read-time -- macros replaced. -- --1998-07-14 SL Baur -- -- * make-docfile.el: Get first initialization from very-early-lisp.el -- * update-elc.el: Ditto. -- * loadup.el (really-early-error-handler): Ditto. -- -- * packages.el (packages-unbytecompiled-lisp): Add new file, -- very-early-lisp.el. -- -- * very-early-lisp.el: New file. -- --1998-07-14 SL Baur -- -- * Symbols that have been obsolete for at least 3 years removed (II). -- -- * obsolete.el (eval-current-buffer): Make compatible. -- (byte-code-function-p): Ditto. -- (send-string): Removed. -- (send-region): Removed. -- (screen-scrollbar-width): Removed. -- (set-screen-scrollbar-width): Removed. -- (set-screen-left-margin-width): Removed. -- (set-screen-right-margin-width): Removed. -- (screen-left-margin-width): Removed. -- (screen-right-margin-width): Removed. -- (set-buffer-left-margin-width): Removed. -- (set-buffer-right-margin-width): Removed. -- (buffer-left-margin-width): Removed. -- (buffer-right-margin-width): Removed. -- (x-set-frame-icon-pixmap): Removed. -- (x-set-screen-icon-pixmap): Removed. -- (pixel-name): Removed. -- (make-pixmap): Removed. -- (make-cursor): Removed. -- (pixmap-width): Removed. -- (pixmap-contributes-to-line-height-p): Removed. -- (set-pixmap-contributes-to-line-height): Removed. -- --1998-07-13 SL Baur -- -- * obsolete.el (popup-menu-up-p): removed. -- (read-no-blanks-input): Removed. -- (wholenump): Removed. -- (ring-mod): Removed (what was ring-mod?). -- (current-time-seconds): Removed. -- (run-special-hook-with-args): Removed. -- (dot): Removed. -- (dot-marker): Removed. -- (dot-min): Removed. -- (dot-max): Removed. -- (window-dot): Removed. -- (set-window-dot): Removed. -- -- * bytecomp.el: Remove bytecompiler support for `dot', `dot-max' and -- `dot-min'. -- -- * minibuf.el: (read-no-blanks-input): remove commented-out copy. -- -- * code-files.el (insert-file-contents): Rename -- run-special-hook-with-args to run-hook-with-args-until-success. -- (write-region): Ditto. -- --1998-07-12 SL Baur -- -- * about.el: Fix typos, update release date. -- -- * Symbols that have been obsolete for at least 3 years removed. -- -- * cl-macs.el (cl-parse-loop-clause): Delete obsolete references to -- screen- functions. -- (toplevel): remove setf methods for screen functions. -- * cl-macs.el (extent-data): defsetf removed. -- * obsolete.el (lisp-indent-hook): Make compatible, it's used too -- many places to remove. -- (comment-indent-hook): Ditto. -- * obsolete.el (get-screen-for-buffer-default-screen-name): Remove. -- (buffer-dedicated-screen): Ditto. -- (deiconify-screen): Ditto. -- (delete-screen): Ditto. -- (event-screen): Ditto. -- (find-file-other-screen): Ditto. -- (find-file-read-only-other-screen): Ditto. -- (live-screen-p): Ditto. -- (screen-height): Ditto. -- (screen-iconified-p): Ditto. -- (screen-list): Ditto. -- (screen-live-p): Ditto. -- (screen-name): Ditto. -- (screen-parameters): Ditto. -- (screen-pixel-height): Ditto. -- (screen-pixel-width): Ditto. -- (screen-root-window): Ditto. -- (screen-selected-window): Ditto. -- (screen-totally-visible-p): Ditto. -- (screen-visible-p): Ditto. -- (screen-width): Ditto. -- (screenp): Ditto. -- (get-screen-for-buffer): Ditto. -- (get-screen-for-buffer-noselect): Ditto. -- (get-other-screen): Ditto. -- (iconify-screen): Ditto. -- (lower-screen): Ditto. -- (mail-other-screen): Ditto. -- (make-screen): Ditto. -- (make-screen-invisible): Ditto. -- (make-screen-visible): Ditto. -- (modify-screen-parameters): Ditto. -- (new-screen): Ditto. -- (next-screen): Ditto. -- (next-multiscreen-window): Ditto. -- (other-screen): Ditto. -- (previous-screen): Ditto. -- (previous-multiscreen-window): Ditto. -- (raise-screen): Ditto. -- (redraw-screen): Ditto. -- (select-screen): Ditto. -- (selected-screen): Ditto. -- (set-buffer-dedicated-screen): Ditto. -- (set-screen-height): Ditto. -- (set-screen-position): Ditto. -- (set-screen-size): Ditto. -- (set-screen-width): Ditto. -- (show-temp-buffer-in-current-screen): Ditto. -- (switch-to-buffer-other-screen): Ditto. -- (visible-screen-list): Ditto. -- (window-screen): Ditto. -- (x-set-screen-pointer): Ditto. -- (x-set-frame-pointer): Ditto. -- (screen-title-format): Ditto. -- (screen-icon-title-format): Ditto. -- (terminal-screen): Ditto. -- (delete-screen-hook): Ditto. -- (create-screen-hook): Ditto. -- (mouse-enter-screen-hook): Ditto. -- (mouse-leave-screen-hook): Ditto. -- (map-screen-hook): Ditto. -- (unmap-screen-hook): Ditto. -- (default-screen-alist): Ditto. -- (default-screen-name): Ditto. -- (x-screen-defaults): Ditto. -- (x-create-screen): Ditto. -- * obsolete.el: meta-flag removed. -- baud-rate removed. -- sleep-for-millisecs removed. -- extent-data removed. -- set-extent-data removed. -- set-extent-attribute removed. -- extent-glyph removed. -- extent-layout removed. -- set-extent-layout removed. -- list-faces-display removed. -- list-faces removed. -- trim-versions-without-asking removed. -- after-write-file-hooks removed. -- truename removed. -- auto-fill-hook removed. -- blink-paren-hook removed. -- select-screen-hook, deselect-screen-hook removed. -- auto-raise-screen, auto-lower-screen removed. -- -- * msw-mouse.el: Global change resource -> mswindows-resource. -- -- * XEmacs 21.0-pre5 is released. -- --1998-07-11 SL Baur -- -- * about.el (about-hackers): Credits update. -- --1998-07-11 Hrvoje Niksic -- -- * register.el (insert-register): Don't activate the region. -- --1998-07-10 SL Baur -- -- * select.el: Restore x-* symbols for backwards compatibility: -- x-copy-primary-selection, x-kill-primary-selection, -- x-delete-primary-selection, x-select-make-extent-for-selection, -- x-valid-simple-selection-, x-cut-copy-clear-internal. -- --1998-07-09 SL Baur -- -- * XEmacs 21.0-pre4 is released. -- --1998-06-28 Hrvoje Niksic -- -- * menubar-items.el (default-menubar): Use `report-emacs-bug' for -- reporting bugs. -- (maybe-add-init-button): Fix semantics under Windows. Use -- `expand-file-name' rather than `concat'. -- -- * help.el (print-messages): New function. -- --1998-07-05 Oscar Figueiredo -- -- * ldap.el (ldap-host-parameters-alist): Docstring fixes -- --1998-07-04 Jonathan Harris -- -- * about.el: Tweaked my entry in about-hackers. -- -- * find-paths.el (paths-emacs-root-p): -- Relaxed emacs-root checking of an in-place installation to -- also accomodate the flat layout used on MS Windows. -- --1998-06-29 John Jones -- -- * package-get.el: calls to package-get-update-all will only -- update packages which are already installed. -- --1998-07-05 Andy Piper -- -- * faces.el (xpm-color-symbols): remove hardcoded defaults these -- are handled by the gui-element face fallbacks now. -- -- * x-faces.el: default gui-element face to "background" as well as -- the default face. -- -- * msw-faces.el (mswindows-init-device-faces): remove gui-element -- and default face settings since these are set as fallbacks now in -- the appropriate domain. -- --1998-07-02 SL Baur -- -- * text-mode.el (text-mode): Reorder regexp so the OR part -- corresponding to `page-delim' goes first and the hack in -- `forward-paragraph' will work. -- With bug analysis from Bob Weiner -- --1998-06-29 Kyle Jones -- -- * subr.el (remove-hook): When checking the hook value -- with functionp, don't apply car to it. -- --1998-06-24 Jonathan Harris -- -- * package-get.el (package-get-remote-filename): -- Don't use file-name-as-directory because the local directory -- separator conventions might not be the same as ftp's. -- --1998-06-27 Oscar Figueiredo -- -- * ldap.el (ldap-host-parameters-alist): New name of -- `ldap-host-parameters-plist' -- --1998-06-26 Adrian Aichner -- -- * package-get.el: Using (require 'package-get-base), now that it -- provides itself. Consequently removed all instances of (load -- "package-get-base.el"). -- --1998-06-29 Kyle Jones -- -- * subr.el (remove-hook): Don't treat the hook value as a -- list unless it is both consp and not functionp. -- --1998-06-29 SL Baur -- -- * about.el: Email address for Ben Wing is ben@xemacs.org. -- * auto-show.el: Ditto. -- * bytecomp.el: Ditto. -- * faces.el: Ditto. -- * x-scrollbar.el: Ditto. -- * x-misc.el: Ditto. -- * tty-init.el: Ditto. -- * toolbar-items.el: Ditto. -- * symbol-syntax.el: Ditto. -- * specifier.el: Ditto. -- * objects.el: Ditto. -- * hyper-apropos.el: Ditto. -- * glyphs.el: Ditto. -- --1998-06-27 Hrvoje Niksic -- -- * mouse.el (drag-window-divider): vertical-divider-draggable-p -> -- vertical-divider-always-visible-p. -- (default-mouse-motion-handler): Ditto. -- --1998-06-21 Hrvoje Niksic -- -- * scrollbar.el (scrollbars-visible-p): Simplify. Always set the -- global value. -- --1998-06-21 Oliver Graf -- -- * build-reports.el: changed receiver to xemacs-build-reports list -- --1998-06-19 Jonathan Harris -- -- * font.el: Split font-family-mappings into X and -- mswindows-specific versions. -- mswindows-font-create-[object|name]: Treat supplied size -- as a pointsize. Added underline and strikethru handling. -- -- * msw-faces.el: changed default mswindows charset to western. -- -- * msw-glyphs.el: removed space in border-glyph font string that -- was inserted to get round bugs in the mswindows C font code. -- --1998-06-27 SL Baur -- -- * about.el (about-hackers): Credits update. -- -- * help-nomule.el (tutorial-supported-languages): Add Romanian -- TUTORIAL. -- -- * code-files.el (file-coding-system-alist): Hardwire TUTORIAL.ro -- to ISO-8859-2. -- --1998-06-19 Jonathan Harris -- -- * font.el: Split font-family-mappings into X and -- mswindows-specific versions. -- mswindows-font-create-[object|name]: Treat supplied size -- as a pointsize. Added underline and strikethru handling. -- -- * msw-faces.el: changed default mswindows charset to western. -- -- * msw-glyphs.el: removed space in border-glyph font string that -- was inserted to get round bugs in the mswindows C font code. -- --1998-06-15 Jonathan Harris -- -- * minibuf.el: make read-color-completion-table call -- (mswindows-color-list for mswindows devices. -- --1998-06-18 Sam Mikes -- -- * lisp/font-lock.el -- (font-lock-match-c++-style-declaration-item-and-skip-to-next): -- Let declaration items contain non-word symbol characters. -- --1998-06-15 Adrian Aichner -- -- * package-get.el (package-get-package-provider): Added autoload -- cookie. Loading "package-get-base.el" in ALL functions that use -- it. Fixed some (interactive ...) with multiple argument specs -- again. Cosmetic indentation changes. -- --1998-05-27 Glynn Clements -- -- * info.el (Info-insert-dir): Don't use nreverse on variables -- that you want to use later. -- --1998-06-17 Glynn Clements -- -- * x-mouse.el (x-set-point-and-move-selection): Replace call -- to x-kill-primary-selection with kill-primary-selection -- --1998-06-12 Martin Buchholz -- -- * simple.el (what-cursor-position): Make cursor position reported -- use value of column-number-start-at-one -- --1998-06-17 SL Baur -- -- * about.el (xemacs-hackers): Fix Jareth's email address. -- --1998-06-16 SL Baur -- -- * startup.el (startup-splash-frame): Remove -- `xemacs-startup-logo-function'. -- --1998-06-15 SL Baur -- -- * about.el (about-hackers): Update credits list. -- --1998-06-06 Jeff Miller -- -- * lisp/sound.el: Update sound-ext to allow filenames with -- extensions to be found by load-sound-file -- --1998-06-14 Oscar Figueiredo -- -- * info.el (Info-rebuild-outdated-dir): Removed variable -- (Info-auto-generate-directory): New variable -- (Info-save-auto-generated-dir): New variable -- (Info-maybe-update-dir): Use `Info-auto-generate-directory' -- (Info-build-dir-anew): Second parameter removed. Use -- `Info-save-auto-generated-dir' -- (Info-rebuild-dir): Ditto -- --1998-06-02 Christoph Wedler -- -- * list-mode.el (next-list-mode-item): Would not recognize -- border between directly neighbored items. -- --1998-06-12 Andy Piper -- -- * package-get.el: add autoloads for some functions. -- --1998-06-10 Hrvoje Niksic -- -- * specifier.el (let-specifier): Tiny docfixes. -- --1998-06-12 Andy Piper -- -- * msw-mouse.el: set selection-pointer-glyph to Normal. -- --1998-06-09 Per Abrahamsen -- -- * wid-edit.el (widget-specify-secret): New function. -- (widget-after-change): Use it. -- (widget-specify-field): Use it. -- --1998-06-08 Hrvoje Niksic -- -- * mouse.el (drag-window-divider): Use `(not done)' instead of -- `doit'; reuse result of `window-pixel-edges'. -- -- * modeline.el (drag-modeline-event-lag): Rename to -- drag-divider-event-lag. -- --1998-06-07 Hrvoje Niksic -- -- * specifier.el (let-specifier): Rewritten not to generate needless -- `let's; clarified documentation; support TAG-SET and HOW-TO-ADD -- arguments. -- --1998-05-28 Hrvoje Niksic -- -- * minibuf.el (read-file-name-1): Setup buffer-local value of -- `completion-ignore-case' in completions buffer under Windows. -- --1998-06-06 Kirill M. Katsnelson -- -- * about.el (about-maintainer-glyph): Fix support for not -- compressed images. -- --1998-06-04 Kirill M. Katsnelson -- -- * cmdloop.el (cancel-mode-internal): Defined this do-nothing function. -- -- * mouse.el (mouse-track): Cancel selection if misc-user event with -- `cancel-mode-internal' function is fetched. -- --1998-06-03 Hrvoje Niksic -- -- * files.el (save-some-buffers-1): Fixed return value. -- --1998-06-01 Oliver Graf -- -- * dragdrop.el: added experimental -- --1998-05-26 Stephen J. Turnbull -- -- * startup.el (after-init-hook, init-file-user, -- user-init-directory, load-user-init-file): Purge references -- to "~/.xemacs/init.el" from docstrings. -- -- (load-user-init-file) Use paths-construct-path to construct -- paths to user init files. Go directly to ~/.emacs, do not -- search ~/.xemacs/, do not load `default-custom-file'. -- --1998-06-03 Hrvoje Niksic -- -- * files.el (interpreter-mode-alist): Catch wish and tclsh before -- general *sh. -- (inhibit-first-line-modes-regexps): Added `.tar.gz'. -- --1998-06-03 Andy Piper -- -- * menubar-items.el (default-menubar): add Update Packages to customize -- menu. -- --1998-06-02 Andy Piper -- -- * faces.el: use toolbar face as a fallback for toolbar properties -- in xpm-color-symbols instead of default. -- -- * msw-faces.el: rename 3d-object -> gui-element face. -- --1998-06-06 SL Baur -- -- * startup.el (xemacs-startup-logo-function): New variable. -- (startup-splash-frame): Use it. -- --1998-06-02 Hrvoje Niksic -- -- * files.el (save-some-buffers): Would wait 1 second. -- (save-some-buffers-1): Delete other windows here instead of in -- `save-some-buffers'. -- (save-some-buffers): Force redisplay only if windows were deleted. -- --1998-06-02 Didier Verna -- -- * cus-face.el (custom-face-attributes): generalized the use of -- toggle buttons for boolean attributes. -- Re-ordered the items a bit. -- --1998-06-01 SL Baur -- -- * sound.el (default-sound-directory): Use `locate-data-directory' -- to find the sounds directory. -- --1998-05-29 Andy Piper -- -- * sound.el: default sound-ext to .wav under mswindows, .au -- otherwise. load-default sounds without extensions. -- --1998-05-27 Bjrn Torkelsson -- -- * menubar-items.el (default-menubar): Dim out "Submit Bug Report" -- if send-pr is not bound. -- --1998-06-01 Andy Piper -- -- * files.el: grok idl files in auto-mode-alist. --1998-06-01 Jeff Miller -- -- * minibuf.el (exact-minibuffer-completion-p): check for nil before -- calling `upcase'. -- --1998-05-30 Andy Piper -- -- * msw-glyphs.el: add xbm to the list of image types supported. -- --1998-05-30 Kirill M. Katsnelson -- -- * msw-init.el (init-post-mswindows-win): Load InfoDock toolbar -- instead of XEmacs one when dumping InfoDock. -- --1998-05-30 Kirill M. Katsnelson -- -- * obsolete.el (has-modeline-p): Added obsolete alias `has-modeline-p' -- for `modeline-visible-p' -- -- * winnt.el (nt-quote-process-args): Fix for duplicating argv[0]. -- --1998-05-29 Andy Piper -- -- * msw-select.el (mswindows-cut-copy-clear-clipboard): deleted -- since it's not used anymore. doc string fixes. -- -- * package-get.el (package-get-file-installed-p): new function. use -- instead of file-installed-p which is in an external package. -- --1998-05-28 Oliver Graf -- -- * dragdrop.el (dragdrop-drop-url-default): dropped pop-to-buffer in -- favor of select-window/switch-to-buffer -- --Wed May 27, 1998 Darryl Okahata -- -- * startup.el: changed (getenv "HOME") to (user-home-directory) -- --1998-05-25 Oliver Graf -- -- * frame.el (cde-start-drag) moved to dragdrop.el -- (offix-start-drag-region) moved to dragdrop.el -- (offix-start-drag) moved to dragdrop.el -- * dragdrop.el (cde-start-drag) moved from frame.el -- (offix-start-drag-region) moved from frame.el -- (offix-start-drag) moved from frame.el -- (cde-start-drag-region) cde drag regions -- * mouse.el (mouse-drag-or-yank) will now call cde-start-drag-region -- --1998-05-26 Oliver Graf -- -- * dragdrop.el: created dragdrop-drag prototypes -- (cde-start-drag-region) fixed typo -- --1998-05-28 SL Baur -- -- * simple.el (after-init-hook): Remove reader macro. -- -- * packages.el (packages-hardcoded-lisp): Get rid of reader -- macros. Update DOC string. -- --1998-05-25 Hrvoje Niksic -- -- * mouse.el (drag-window-divider): Ditto. -- -- * modeline.el (mouse-drag-modeline): Use it. -- -- * lisp-mode.el (let-specifier): Specify indentation. -- -- * specifier.el (let-specifier): Renamed from -- `with-specifier-instance'. -- --1998-05-27 Andy Piper -- -- * x-faces.el: -- * faces.el: move definition of xpm-color-symbols from x-faces.el -- to faces. Predicate x-get-resource on the presence of x. -- -- * msw-faces.el: set 3d-object face rather than modeline. Specifiy -- faces as specfier defaults. -- -- * package-get.el: don't use package-admin-add-single-file-package. -- --1998-05-25 Hrvoje Niksic -- -- * toolbar-items.el: Fixup tooltips. -- (toolbar-gnus): Don't use obsolete variable -- toolbar-news-frame-properties. -- (toolbar-news-reader): Default to `gnus' instead of -- `not-configured'. -- -- * files.el (auto-mode-alist): Correctly recognize `.emacs' under -- Windows. -- --1998-05-25 Andy Piper -- -- * package-get.el: rename -installedp -> -installed-p. -- --1998-05-23 Kirill M. Katsnelson -- -- * glyphs.el (init-glyphs): Created `border-glyph' face, with no -- attributes, and assinged it to continuation, truncation and -- hscroll glyphs. -- -- * msw-glyphs.el: Assigned WinDings font to `border-glyph' face, -- and made continuation, truncation and hscroll glyphs arrow -- characters out of that font. -- --1998-05-22 Hrvoje Niksic -- -- * minibuf.el (minibuffer-electric-separator): Play nicely with -- directory-sep-char being \. -- (minibuffer-electric-tilde): Ditto. -- (read-file-name-map): Ditto. -- --1998-05-22 Hrvoje Niksic -- -- * mouse.el (default-mouse-track-maybe-own-selection): Pause only -- on X devices. -- (default-mouse-track-deal-with-down-event): Avoid -- `x-disown-selection'; use `disown-selection' instead. -- --1998-05-21 Andy Piper -- -- * select.el: -- * x-select.el: selection cleanup. (x-cut-copy-clear-internal) -- moved to (cut-copy-clear-internal) in select.el. Ditto for -- (x-delete-primary-selection) (x-kill-primary-selection) -- (x-copy-primary-selection). -- (own-clipboard): new function. -- -- * msw-select.el: use the new kill/delete/copy/cut-copy-clear -- functions in select.el. remove old ones. -- (mswindows-own-clipboard): new function. -- --1998-05-21 Andy Piper -- -- * gnuserv.el: allow connections from mswindows type devices. -- --1998-05-20 Andy Piper -- -- * msw-glyphs.el: change image type used from cursor to resource. -- --1998-05-20 Kirill M. Katsnelson -- -- * x-scrollbar.el (x-init-scrollbar-from-resources): Added support -- for {top,bottom}-{left,right} values in addition to -- {top,bottom}_{left,right}. -- Use x-get-resource instead of x-get-resource-and-bogosity-check. -- --1998-05-20 Hrvoje Niksic -- -- * cl-macs.el (specifier-instance): Undefine its setf method. -- -- * specifier.el (with-specifier-instance): Added docstring. -- -- * mouse.el (drag-window-divider): Ditto. -- -- * modeline.el (mouse-drag-modeline): Use it. -- -- * lisp-mode.el (with-specifier-instance): Define its indentation -- level. -- -- * specifier.el (with-specifier-instance): New macro. -- --1998-05-19 Andy Piper -- -- * package-get.el (package-get-create-custom): new function to -- auto-generate package-get-custom.el from package-get-base.el. -- * (package-get-ever-installedp): new function. -- * (package-get-custom): new function to get all packages specified -- by customize. -- --1998-05-19 Hrvoje Niksic -- -- * cus-edit.el (custom-file): Revert to `~/.emacs'. -- --1998-05-23 SL Baur -- -- * cl-extra.el: Reverse previous float change. -- --1998-05-17 Andy Piper -- -- * x-faces.el: -- * faces.el (try-font-name): moved from x-faces.el since it is -- required by w3 under mswindows as well X. -- --1998-05-18 Kirill M. Katsnelson -- -- * winnt.el: Removed evil (setq completion-ignore-case t) -- clause, one more overlookef fsfism. -- (nt-quote-args-functions-alist): End sentences with double space. -- --1998-05-18 Kirill M. Katsnelson -- -- * window-xemacs.el (push-window-configuration): Remove kludgery of -- recaching default-toolbar specifier. -- (pop-window-configuration): Ditto. -- (unpop-window-configuration): Ditto. -- --1998-05-16 Hrvoje Niksic -- -- * modeline.el (modeline-minor-mode-menu): Don't use :menu-tag. -- --1998-05-17 Kirill M. Katsnelson -- -- * winnt.el (nt-quote-args-verbatim): Added function. -- (nt-quote-args-prefix-quote): Added function. -- (nt-quote-args-backslash-quote): Added function. -- (nt-quote-args-double-quote): Added function. -- (nt-quote-args-functions-alist): New variable. -- (nt-quote-process-args): Added function. This is the main quoting -- work horse called from process-nt.c -- --1998-05-16 Kirill M. Katsnelson -- -- * winnt.el: Removed duplicate definitions for backspace, -- delete, M-backspace and C-M-backspace. -- (file-name-buffer-file-type-alist): Removed this variable. -- (find-buffer-file-type): Removed function. -- (find-file-binary): Removed function. -- (find-file-text): Removed function. -- (find-file-not-found-set-buffer-file-type): Removed function. -- (save-to-unix-hook): Removed function. -- (revert-from-unix-hook): Removed function. -- (using-unix-filesystems): Removed function. -- (original-make-auto-save-file-name): DEFSUBR to avoid doc snarf -- warning. -- (x-set-selection): Removed function. -- (x-get-selection): Removed function. -- Removed commented FSFisms. -- Replaced copyright notice (this file is not part of GNU Emacs). -- (nt-shell-mode-hook): Moved here from a lambda expression. Added -- comint-process-echoes setting to t. -- --1998-05-17 Michael Sperber [Mr. Preprocessor] -- -- * packages.el (packages-no-package-hierarchy-regexp): Introduced -- and used following the interface change of -- `paths-find-recursive-path'. -- -- * find-paths.el (paths-find-recursive-path): Exclusion is now by a -- regexp instead of a list of base names. -- (paths-version-control-filename-regexp): -- (paths-lisp-filename-regexp): (paths-no-lisp-directory-regexp): -- Introduced and used following the interface change of -- `paths-find-recursive-path'. -- --1998-05-16 Hrvoje Niksic -- -- * simple.el (delete-forward-p): Make it a defun; do X garbage only -- on X devices, rather than on all non-TTY devices. -- --1998-05-16 Kirill M. Katsnelson -- -- * msw-mouse.el: New file. Sets up cursor shapes for Windows. -- -- * dumped-lisp.el (preloaded-file-list): Added msw-mouse.el -- --1998-05-17 Adrian Aichner -- -- * itimer.el (activate-itimer): Fixed usage of integers -- as argument to `concat'. -- --1998-05-17 Glynn Clements -- -- * itimer.el (start-itimer): replace the use of `concat' with -- `format' -- --1998-05-16 SL Baur -- -- * mode-motion.el (mode-motion-hook): Clarify docstring. -- From Bob Weiner -- -- * loadhist.el (symbol-file): Supply prompt string when used -- interactively. -- From Bob Weiner -- --1998-05-16 Hrvoje Niksic -- -- * loadup.el (really-early-error-handler): Ditto. -- -- * update-elc.el: Ditto. -- -- * setup-paths.el (paths-construct-exec-path): Ditto. -- -- * make-docfile.el: Ditto. -- -- * find-paths.el (paths-decode-directory-path): Use split-path -- instead of decode-path. -- -- * files.el (parse-colon-path): Update docstring reference. -- --1998-05-15 Jonathan Harris -- -- * msw-init.el: -- * x-init.el: -- Bind cut'n'paste keys to non window-system specific functions. -- -- * msw-select.el: New function mswindows-clear-clipboard. -- mswindows-cut-copy-clipboard extended to handle clearing of the -- selection and renamed to mswindows-cut-copy-clear-clipboard. -- -- * select.el: on mswindows devices delete-primary-selection -- calls mswindows-clear-clipboard. -- --1998-05-15 Hrvoje Niksic -- -- * simple.el (quoted-insert): Inhibit quit when using read-char. -- -- * cmdloop.el (read-char): Don't inhibit quit. -- (read-char-exclusive): Ditto. -- (read-char): Signal quit if quit-char was pressed. -- (read-char-exclusive): Ditto. -- (read-quoted-char): Return a character, not integer. -- -- * menubar-items.el (default-popup-menu): Use Andy's generic -- selection code. -- (default-popup-menu): Fix code. -- --1998-05-14 Oliver Graf -- -- * dragdrop.el (dragdrop-function-widget): this time it's done -- --1998-05-13 Oliver Graf -- -- * dumped-lisp.el: dragdrop.el now based on dragdrop-api feature -- --1998-05-15 Kirill M. Katsnelson -- -- * device.el (device-pixel-width): -- (device-pixel-height): -- (device-mm-width): -- (device-mm-height): -- (device-bitplanes): -- (device-color-cells): Swapped parameters to device-system-metric -- according to the interface change. -- --1998-05-14 Kirill M. Katsnelson -- -- * mouse.el (default-mouse-motion-handler): Use new name of the -- function event-over-vertical-divider-p. -- Do not set E-W arrow cursor over the divider if -- vertical-divider-draggable-p is nil in the window. -- ([top-level]): Use new name for the variable -- vertical-divider-map. -- (drag-window-divider): Respect vertical-divider-draggable-p. -- Variable name typo fixes. -- --1998-05-14 Hrvoje Niksic -- -- * keymap.el (kbd): Define here; handle string constants and -- others... -- --1998-05-15 Christian Nyb -- -- * simple.el (zap-up-to-char): New function. Behaves like `zap-to-char' -- in Emacs 18. -- --1998-05-13 Didier Verna -- -- * mouse.el (drag-window-divider): give the vertical divider a -- pressed look when dragging it. -- --1998-05-13 Andy Piper -- -- * faces.el: predicate some more face operations on x or mswindows -- not just x. -- -- * modeline.el: enable modeline coloring for mswindows. -- --1998-05-13 Michael Sperber [Mr. Preprocessor] -- -- * minibuf.el (minibuffer-default): Added variable; compatible with -- FSF Emacs. -- (next-history-element): Used `minibuffer-default'. -- --1998-05-12 Oliver Graf -- -- * dragdrop.el (dragdrop-function-widget): button and mods ok -- arguments still look a bit strange -- (dragdrop-compare-mods) created -- (dragdrop-drop-do-functions) correctly checks for buttons and -- modifiers -- --1998-05-14 Hrvoje Niksic -- -- * setup-paths.el (paths-default-info-directories): Replace -- path-separator with directory-sep-char. -- -- * files.el (path-separator): Don't define it here. -- --1998-05-14 Hrvoje Niksic -- -- * update-elc.el: Ditto. -- -- * setup-paths.el (paths-construct-exec-path): Ditto. -- -- * make-docfile.el: Ditto. -- -- * loadup.el (really-early-error-handler): Ditto. -- -- * find-paths.el (paths-decode-directory-path): Use decode-path -- instead of decode-path-internal. -- -- * files.el (parse-colon-path): Update docstring. -- --1998-05-13 Hrvoje Niksic -- -- * subr.el (get-buffer-window-list): Make BUFFER optional. -- -- * window-xemacs.el (windows-of-buffer): Defalias to -- get-buffer-window-list. -- --1998-05-12 Hrvoje Niksic -- -- * disass.el: Fix maintainer keyword. -- -- * bytecomp.el (byte-compile-and-load-file): Autoload. -- (byte-compile-buffer): Ditto. -- -- * lisp-mode.el (eval-last-sexp): Skip ` in `variable' so that the -- value is returned, not the name. -- (lisp-imenu-generic-expression): Enable it. -- (lisp-mode-variables): Ditto. -- (lisp-indent-offset): Change defconst to defvar. -- (lisp-indent-function): Ditto. -- (lisp-body-indent): Ditto. -- --1998-05-12 Hrvoje Niksic -- -- * modeline.el: Use zap-last-kbd-macro-event. -- -- * lisp-mode.el (eval-interactive): If eval-interactive-verbose is -- nil, don't attempt to do anything with messages. -- (eval-last-sexp): Use `letf' for clarity. -- --1998-05-12 Hrvoje Niksic -- -- * startup.el: It's still `.emacs', not yet `.xemacs/init.el'. -- --1998-05-11 Martin Buchholz -- -- * buff-menu.el: -- * lisp-mode.el: -- * obsolete.el: -- Change empty docstrings into no doc strings at all. -- Fix bogus FSF-format docstrings. -- * etags.el: Fix docstring. -- --1998-05-11 Jan Vroonhof -- -- * package-get.el (package-get): Use internal md5 -- --1998-05-13 SL Baur -- -- * about.el (about-xemacs): Correct abuse of concat. -- --1998-05-11 SL Baur -- -- * info.el (Info-mode): Use easymenu. -- --1998-05-12 Hrvoje Niksic -- -- * apropos.el (apropos): Don't use concat with integers. -- -- * cmdloop.el (describe-last-error): Handle the case when no error -- was seen gracefully. -- -- * apropos.el (apropos-print): Use with-displaying-help-buffer as -- defun. -- (apropos-describe-plist): Ditto. -- -- * help.el (with-displaying-help-buffer): Revert to a defun. -- (describe-key): Use it as defun. -- (describe-mode): Ditto. -- (describe-bindings): Ditto. -- (describe-prefix-bindings): Ditto. -- (describe-installation): Ditto. -- (view-lossage): Ditto. -- (describe-function): Ditto. -- (describe-variable): Ditto. -- (describe-syntax): Ditto. -- --1998-05-11 Oliver Graf -- -- * dragdrop.el: changed order of require/provide -- (dragdrop-drop-mime-default) changed to new calling conventions -- (dragdrop-drop-do-functions) changed to new calling conventions -- (dragdrop-function-widget) this one needs more work... -- --1998-05-10 Oliver Graf -- -- * about.el: another small change in my entry -- * dragdrop.el (dragdrop-drop-log-function): logging added -- plus customizations -- changed interface to handler functions. now called with event -- and object -- --1998-05-12 Kirill M. Katsnelson -- -- * glyphs.el (divider-pointer-glyph): Declared new glyph, -- E-W arrow pointer displayed over draggable dividers. -- -- * mouse.el (default-mouse-motion-handler): Show it when -- appropriate. -- (drag-window-divider): Added. -- ([top-level]): Initialized window-divider-map with a keymap -- binding the above function to left button down event. -- -- * x-mouse.el (x-init-pointer-shape): Initialize -- divider-pointer-glyph from Cursor.dividerPointer, or use default -- E-W double arrow. -- --1998-04-30 Gunnar Evermann -- -- * toolbar-items.el (toolbar-compile): respect should-use-dialog-box-p -- --1998-05-11 Hrvoje Niksic -- -- * simple.el (count-words-buffer): Don't query for buffer. -- (count-lines-buffer): Ditto. -- --1998-05-11 Jan Vroonhof -- -- * help.el (where-is): add optional insert argument. -- --1998-05-11 Hrvoje Niksic -- -- * help.el (describe-key-briefly): New argument INSERT. -- -- * simple.el (eval-expression): New optional argument; synch with -- FSF 20.3. -- -- * keydefs.el (global-map): Add new register bindings. -- -- * register.el: Synched with FSF 20.3. -- --1998-05-11 Jan Vroonhof -- -- * window-xemacs.el (recenter): all arguments are optional. -- --1998-05-10 Kirill M. Katsnelson -- -- * device.el: (device-pixel-width): Reflected name/parameters -- change to device-system-metric. -- (device-pixel-height): Ditto. -- (device-mm-width): Ditto. -- (device-mm-height): Ditto. -- (device-bitplanes): Ditto. -- (device-color-cells): Ditto. -- --1998-05-10 Hrvoje Niksic -- -- * cl-extra.el (cl-float-limits): Removed; move code to top-level. -- -- * cl.el (most-positive-fixnum): Document. -- (most-negative-fixnum): Ditto. -- -- * cus-dep.el: Updated comment. -- -- * cus-load.el: Use most-positive-fixnum as the gc-inhibiting -- constant. -- -- * cus-load.el (custom-put): Removed. -- -- * files.el (after-find-file): Just resignal quit instead of -- signaling "canceled". -- --1998-05-10 Hrvoje Niksic -- -- * frame.el (other-frame): Use `focus-frame' instead of -- select-frame kludges. -- -- * lisp-mode.el: Update lisp-indent-function for -- save-selected-frame and with-selected-frame. -- -- * frame.el (save-selected-frame): New macro. -- (with-selected-frame): Ditto. -- (other-frame): Use `set-frame-focus'. -- --1998-05-06 Oliver Graf -- -- * dragdrop.el (dragdrop-drop-dispatch): changed to new list concept -- (dragdrop-drop-url-default) default handler for URL drops created -- (dragdrop-drop-mime-default) default handler for MIME drops created -- (dragdrop-drop-functions) default custom for handling drops created -- (dragdrop-drop-do-functions) helper for drgadrop-drop-dispatch -- --1998-05-05 Jonathan Harris -- -- * mouse.el: Removed redundant mouse-mswindows-drop function. -- --1998-05-05 Oliver Graf -- -- * about.el: changed some text in my entry -- * dragdrop.el: added customs -- --1998-05-04 Oliver Graf -- -- * mouse.el: killed global drop key bindings -- (mouse-offix-drop) removed -- * dragdrop.el: created -- * dumped-lisp.el: inclusion of dragdrop.el for window-systems -- --1998-05-09 Kirill M. Katsnelson -- -- * x-scrollbar.el (x-init-scrollbar-from-resources): Initialize -- scrollbar-on-{left,top}-p from *scrollBarPlacement resources. -- -- * x-misc.el (x-get-resource-and-maybe-bogosity-check): Removed -- obsolete comment. -- -- * scrollbar.el (scrollbars-visible-p): Use new -- {vertical,horizontal}-scrollbar-visible-p specifiers. -- --1998-04-18 Kirill M. Katsnelson -- -- * device.el (device-pixel-height): -- (device-pixel-width): -- (device-mm-width): -- (device-mm-height): -- (device-bitplanes): -- (device-color-cells): Moved these 6 functions from device.c; they -- all use single (device-system-metrics) call. -- --1998-05-09 SL Baur -- -- * dumped-lisp.el (preloaded-file-list): x-menubar.el and x-toolbar.el -- were renamed. -- -- * menubar-items.el: -- * toolbar-items.el: Renamed from x-menubar/x-toolbar. -- Suggested by Hrvoje Niksic -- -- * help.el (help-map): Remove Hyperbole keybinding logic. -- Suggested by: Michael Ernst -- --1998-05-08 SL Baur -- -- * x-menubar.el (default-menubar): Enable 'mail-user-agent' feature. -- From SAKIYAMA Nobuo -- --1998-05-07 Andy Piper -- -- * msw-glyphs.el: use nicer icon3 from the frame icon. -- --1998-05-07 SL Baur -- -- * version.el (emacs-version): Remove InfoDock conditionals. -- -- * startup.el (startup-splash-frame): Change ID logo name. -- --1998-05-06 Hrvoje Niksic -- -- * files.el (after-find-file): If the user presses C-g on -- directory-creation prompt, kill the buffer. -- --1998-05-06 SL Baur -- -- * simple.el (count-words-region): Reverse previous change. -- --1998-05-05 Hrvoje Niksic -- -- * replace.el (query-replace): Just call perform-replace. -- (query-replace-regexp): Ditto. -- (perform-replace): Move region handling here. -- (perform-replace): Use the new arg to match-data. -- --1998-03-08 Kyle Jones -- -- * x-init.el: Install X specific display table that -- displays char 0240 as a space to avoid whatever it is -- that screws up display of that character code. -- --1998-05-03 Hrvoje Niksic -- -- * help.el (function-arglist): If no arguments are documented for a -- subr, print nothing rather than incorrect output. -- --1998-05-05 SL Baur -- -- * cmdloop.el (command-error): Update bail-out error message to use -- `emacs-program-name'. -- -- * lib-complete.el: Remove reader macro cruft. -- -- * dumped-lisp.el (preloaded-file-list): Phase I: remove InfoDock -- cruft. -- -- * simple.el (count-words-region): Drop interactive-p check on the -- message. -- --1998-05-04 Jonathan Harris -- -- * font.el -- * msw-faces.el -- Correct spelling of mswindows-font-canonicalize-name. -- --1998-05-03 Oscar Figueiredo -- -- * ldap.el (ldap-host-parameters-alist): Replaced with -- `ldap-host-parameters-plist' -- (ldap-search): Adapt to previous change -- --1998-05-02 SL Baur -- -- * about.el (about-hackers): Update Bob Weiner bio. -- (about-maintainer-info): Ditto. -- --1998-05-02 Hrvoje Niksic -- -- * simple.el (display-warning-minimum-level): Docfix. -- --1998-04-04 Per Abrahamsen -- -- * widget.el (:default-get): New keyword. -- * wid-edit.el (default, widget-default-default-get): Define it. -- (group, widget-group-default-get): Define it. -- (menu-choice, widget-choice-default-get): Define it. -- (widget-default-get): New function. -- (widget-choice-action): Call it. -- (widget-editable-list-entry-create): Call it. -- --1998-05-01 Hrvoje Niksic -- -- * byte-optimize.el (byte-boolean-vars): Removed. -- (byte-optimize-lapcode): Use `built-in-variable-type' instead of -- lookup through `byte-boolean-vars'. -- --1998-05-01 Kirill M. Katsnelson -- -- * x-scrollbar.el (x-init-scrollbar-from-resources): Stuff -- resource-provided values into ghost specs for scrollbar-height and -- scrollbar-width. -- --1998-05-01 Hrvoje Niksic -- -- * byte-optimize.el: Don't attempt to optimize /=. -- -- * bytecomp.el (byte-compile-one-ore-more-args): New function. -- (byte-compile-/=): Ditto. -- --1998-05-02 SL Baur -- -- * apropos.el: Use `with-displaying-help-buffer'. -- (apropos-print): Remove explicit mentions of "*Apropos*" buffer. -- Use `with-displaying-help-buffer'. -- (apropos-follow): Do not give special treatment to buffer cursor -- was in prior to a mouse click. -- (apropos-describe-plist): Use `with-displaying-help-buffer'. -- (apropos-print-doc): Set correct buffer for setting text -- properties. -- --1998-05-01 SL Baur -- -- * help.el (help-buffer-prefix-string): New variable. -- (help-buffer-name): Use it. -- -- * modeline.el (modeline-minor-mode-menu): Alphabetize the minor -- mode menu. -- --1998-04-30 Greg Klanderman -- -- * frame.el (other-frame): Work even when focus-follows-mouse is true. -- --1998-05-01 Hrvoje Niksic -- -- * files.el (find-file-noselect): Update docstring. -- (find-file-noselect): Signal an error if found an unreadable file. -- (file-chase-links): Save the match data. -- (normal-mode): Use `lwarn' and `error-message-string'. -- (interpreter-mode-alist): Change defconst to defvar. -- (inhibit-first-line-modes-regexps): Ditto. -- (inhibit-first-line-modes-regexps): Added .tgz. -- (inhibit-first-line-modes-suffixes): Change defconst to defvar. -- (change-major-mode-with-file-name): New user-option. -- (set-visited-file-name): Synched with FSF. -- (file-name-extension): New function, from FSF 20.3. -- (file-relative-name): Synched with FSF. -- (save-some-buffers): Support the C-r feature. -- (recover-session): Synched with FSF. -- (kill-some-buffers): Ditto. -- (set-auto-mode): New argument JUST-FROM-FILE-NAME. -- --1998-04-30 SL Baur -- -- * files.el (insert-file): Undo previous change and reenable use of -- format.el. -- --1998-04-30 Hrvoje Niksic -- -- * window-xemacs.el (recenter): Define. -- --1998-04-29 Andy Piper -- -- * font.el (mswindows-font-create-name) -- (mswindows-font-create-object): new functions for mswindows type -- fonts. -- -- * msw-faces.el (mswindows-font-canicolize-name): fix so that -- strings are parsed as well as font objects. -- --1998-04-30 Hrvoje Niksic -- -- * modeline.el (defining-kbd-macro): Restore modeline indication of -- kbd-macro being recorded. -- (add-minor-mode): Simplify docstring. -- (modeline-minor-mode-menu): Remove stuff. -- --1998-04-29 Andy Piper -- -- * code-process.el (call-process): dynamically decide process -- coding type. -- --1998-04-29 Jim Radford -- -- * modeline.el: Add line-number-mode, column-number-mode to -- the modeline minor-mode menu. Button2 on the line number does -- goto-line. -- --1998-04-29 Andy Piper -- -- * mouse.el: move x-selection-owner-p type things to -- selection-owner-p. -- -- * msw-init.el: copy zmacs stuff from x-init.el -- -- * msw-select.el (mswindows-own-selection) -- (mswindows-disown-selection) (mswindows-selection-owner-p): new -- functions. Very simple minded implementation of selectio -- ownership. -- -- * select.el (own-selection) (disown-selection) -- (activate-region-as-selection) (select-make-extent-for-selection) -- (valid-simple-selection-p): functions moved from x-select.el for -- generalized selection. -- -- * x-select.el: see select.el changes. -- -- * x-toolbar.el: use new selection functions. -- --1998-04-28 Michael Sperber [Mr. Preprocessor] -- -- * packages.el (packages-find-package-directories): Fixed bug that -- would pick up multiple site-package directories. -- (package-locations): Added "xemacs-packages" as a late package -- location. -- -- * find-paths.el: Now uses `emacs-program-name' and -- `emacs-program-version'. -- Additions to enforce version-specific directories in -- `paths-find-version-directory'. -- --1998-04-29 SL Baur -- -- * default.el: Removed. -- * site-start.el: Removed. -- --1998-04-29 Didier Verna -- -- * minibuf.el (minibuffer-history-minimum-string-length): Default -- to nil. -- --1998-04-28 SL Baur -- -- * find-paths.el (paths-program-name): Rename. -- (paths-emacs-root-p): Ditto. -- (paths-find-site-directory): Ditto. -- --1998-04-26 Karl M. Hegbloom -- -- * lisp-mode.el (emacs-lisp-mode-popup-menu-1): Add menu entry for -- `emacs-lisp-byte-compile-and-load'. -- --1998-04-26 Oscar Figueiredo -- -- * ldap.el (ldap-search): Fixed additional parameter passing to -- `ldap-open' -- --1998-04-27 Andy Piper -- -- * select.el (kill-primary-selection) (selection-owner-p) -- (copy-primary-selection) (yank-clipboard-selection) -- (selection-exists-p) (delete-primary-selection): new file and -- functions that do the right thing for the selected device. -- -- * x-menubar.el: use generalised selection functions. -- -- * dumped-lisp.el: dump select.el. -- --1998-04-27 SL Baur -- -- * find-paths.el (paths-progname): New variable. -- (paths-emacs-root-p): Use it. -- (paths-find-site-directory): Ditto. -- --1998-04-26 SL Baur -- -- * loadup.el ((member "dump" command-line-args)): Dump as -- `infodock' if InfoDock. -- --1998-04-25 SL Baur -- -- * find-paths.el (construct-emacs-version): Simplify, include -- program name in the return value. -- * (paths-find-version-directory): Use it. -- --1998-04-25 Oscar Figueiredo -- -- * info.el (Info-parse-dir-entries): Fixed regexp -- (Info-build-dir-anew): Remove full suffix and capitalize info file -- name for files with no @direntry -- (Info-batch-rebuild-dir): New function -- (Info-suffixed-file): Check for regular files instead of simple -- file existence (could catch directories before) -- --1998-04-25 Michael Sperber [Mr. Preprocessor] -- -- * setup-paths.el, find-paths.el: Removed uses of `not' which -- temacs doesn't have. -- -- * find-paths.el (paths-find-emacs-roots): Included exec-prefix -- into root searching. -- --1998-04-24 Martin Buchholz -- -- * subr.el: Remove definition of `not'. -- --Sat Apr 24 1998 Andy Piper -- -- * msw-glyphs.el: enable graphics support. -- --1998-04-23 Didier Verna -- -- * x-menubar.el (default-menubar): restored the line-number-mode -- option. -- -- * misc doc string updates related to the options menu. -- --1998-04-24 SL Baur -- -- * setup-paths.el (paths-construct-load-path): Fix typo. -- --1998-04-23 Michael Sperber [Mr. Preprocessor] -- -- * x-menubar.el (default-menubar): font-menu-this-frame-only-p and -- font-menu-ignore-scaled-fonts don't have to be bound now; this -- gets us one step further towards making --no-autoloads work. -- -- * startup.el (normal-top-level): Load auto-autoloads only if -- lisp-directory is non-nil. -- -- * setup-paths.el (paths-construct-load-path): Made it robust -- against nil lisp-directory. -- -- * startup.el (startup-setup-paths-warning): Added `lisp-directory' -- to the list of variables that cause a warning when nil. -- -- * toolbar.el (init-toolbar-location): Now works even when there's -- no toolbar icon directory. -- --1998-04-23 Hrvoje Niksic -- -- * help.el (view-lossage): Recognize it. -- -- * simple.el (log-message): Mark multiline messages. -- --1998-04-22 SL Baur -- -- * info.el (Info-exit): `toolbar-info-frame' doesn't necessarily exist. -- --1998-4-20 Stephen J. Turnbull -- -- * package-get.el (package-get-all): add `\n' separator to -- interactive specification so that both variables are read -- --1998-04-22 Didier Verna -- -- * x-menubar.el: ported the options menu to Custom. -- Moved the "read only" toggle button to the buffers menu. -- Corrected some missing ;;;###autoload or defcustom. -- -- * scrollbar.el (scrollbars-visible-p): defcustom wrapper around -- the scrollbar-visible specifier for options menu handling. -- -- * toolbar.el (toolbar-visible-p) -- (toolbar-captioned-p) -- (default-toolbar-position): defcustom wrappers around -- the toolbar specifiers for options menu handling. -- -- * frame.el (get-frame-for-buffer-default-instance-limit): -- defcustom it for options menu handling. -- -- * font-lock.el (font-lock-mode): defcustom and autolaod the variable -- font-lock-mode for options menu handling. -- -- * cus-start.el: added Custom properties to overwrite-mode for -- options menu handling. -- --Wed Apr 22 12:59:35 1998 Andy Piper -- -- * about.el: shameless self-promotion. -- --1998-04-21 Hrvoje Niksic -- -- * simple.el (raw-append-message): Slightly optimize. -- (remove-message): Use `push' for clarity. -- (append-message): Ditto. -- (display-warning): Dito. -- (raw-append-message): Send the message to the appropriate device. -- --1998-04-22 SL Baur -- -- * auto-save.el (auto-save-cyclic-hash-14): De-ebolification. -- From Sean MacLennan -- --1998-04-18 Michael Sperber [Mr. Preprocessor] -- -- * setup-paths.el: Changed `directory-sep-char' to -- `path-separator', following a change in GNU Emacs. -- --1998-04-19 Oscar Figueiredo -- -- * info.el (Info-maybe-update-dir): Bug fix in `conservative' behaviour -- (Info-build-dir-anew): Add a final newline. -- (Info-build-dir-anew): Do not issue warning when rebuilding policy -- is `always' -- (Info-rebuild-dir): Ditto -- -- * dumped-lisp.el (preloaded-file-list): Added ldap.el -- --1998-04-21 SL Baur -- -- * simple.el (count-words-buffer): Retain zmacs region. -- (count-words-region): Ditto. -- * simple.el: (what-line): Expanded line counts. -- (count-lines): New parameter to conditionalize whether collapsed -- lines get counted. -- From Bob Weiner -- --1998-04-19 SL Baur -- -- * packages.el (package-locations): infodock-packages must override -- mule-packages and packages. -- --1998-04-19 Jonathan Harris -- -- * wid-edit.el: -- remove rude messages from widget-activation-widget-mapper -- and widget-activation-glyph-mapper -- --1998-04-17 Jonathan Harris -- -- * toolbar.el: Remove (featurep 'x) test from -- toolbar-make-button-list -- --1998-04-17 Hrvoje Niksic -- -- * gnuserv.el (gnuserv-edit): Switch to the next gnuserv buffer -- only if in the same frame. -- --1998-04-17 Michael Sperber [Mr. Preprocessor] -- -- * packages.el (package-locations): Added site-packages hierarchy. -- -- * setup-paths.el (paths-default-info-directories): Introduced and -- used. -- -- * packages.el, setup-paths.el: Set various path searching depths -- to 1. -- -- * packages.el (packages-hierarchy-depth): -- (packages-load-path-depth): Introduced and used. -- -- * setup-paths.el (paths-load-path-depth): Introduced and used. -- -- * find-paths.el (paths-find-recursive-path): Added max-depth -- parameter. -- --1998-04-15 Michael Sperber [Mr. Preprocessor] -- -- * setup-paths.el (paths-construct-info-path): Removed -- dependency on behavior of (file-name-as-directory ""). -- --1998-04-09 Oscar Figueiredo -- -- * ldap.el (ldap-search): Adapt to the new low-level API using ldap -- lisp objects -- --1998-04-14 Michael Sperber [Mr. Preprocessor] -- -- * dump-paths.el, startup.el: Added handling for --debug-paths. -- --1998-04-15 William M. Perry -- -- * wid-edit.el: We cannot just set the help-echo or balloon-help -- properties for an extent based on the :help-echo widget -- property, since help-echo and balloon-help cause an EXTENT to -- get passed in, where :help-echo functions are expecting a WIDGET -- --1998-04-15 Kirill M. Katsnelson -- -- * scrollbar.el (init-scrollbar-from-resources): Call -- mswindows-init-scrollbar-metrics when appropriate. -- --Thu Apr 16 12:59:35 1998 Andy Piper -- -- * dumped-lisp.el: dump x-toolbar for window system -- -- * msw-init.el (init-post-mswindows-win): enable toolbars if we -- have support and xpm. -- --1998-04-16 SL Baur -- -- * files.el (toggle-read-only): Fix docstring. -- From Didier Verna -- --1998-04-14 Michael Sperber [Mr. Preprocessor] -- -- * startup.el (normal-top-level): Load autoload-file-name without -- specifying an extension---some people only auto-autoload.el.gz. -- --1998-04-06 Hrvoje Niksic -- -- * files.el (backup-enable-predicate): Don't bomb on NAME being -- nil. -- --1998-04-13 Michael Sperber [Mr. Preprocessor] -- -- * find-paths.el, packages.el: Now prefers configure'd paths. -- This shouldn't cause any of the originally anticipated problems as -- the current paths architecture will not define the various -- configure-xxx variables if they're not specified on the configure -- command line. -- -- * find-paths.el, setup-paths.el, packages.el: Removed all -- mentionings of "/" as a path separator. -- Used paths-construct-path throughout. -- -- * find-paths.el (paths-construct-path): Created to assemble paths -- from directory components. -- -- * setup-paths.el, packages.el: Used paths-decode-directory-path -- instead of decode-path-internal. -- -- * find-paths.el: Removed unused (and bogus) paths-find-emacs-path -- and associates. -- (paths-decode-directory-path) Created. -- -- * setup-paths.el: Changed configure-exec-path to -- configure-exec-directory. -- --1998-04-11 Michael Sperber [Mr. Preprocessor] -- -- * packages.el (packages-find-packages): Fixed decoding of -- EMACSPACKAGEPATH. -- -- * startup.el: -no-packages -> -no-early-packages. -- -- (packages-load-package-lisps): Fixed loading of auto-autoload -- files. -- -- * startup.el (normal-top-level): Fixed loading of core -- auto-autoload. -- -- * obsolete.el: Un-obsoleted site-directory. Sigh. -- -- * startup.el, packages.el, dump-paths.el: Added proper settings -- for site-directory and lisp-directory variables. -- -- * startup.el, loadup.el: Renamed inhibit-update-autoloads to -- inhibit-package-autoloads and fixed handling of it. -- -- * startup.el, packages.el, dump-paths.el, loadup.el: Fixed -- handling of former inhibit-package-init, now -- inhibit-early-packages, to make -vanilla etc. work. -- --1998-04-10 Kirill M. Katsnelson -- -- * code-process.el (start-process): Fallback to 'undecided instead -- of 'binary for process input coding stream. -- -- * process.el (start-process): Docstring fix. -- --1998-04-09 Oscar Figueiredo -- -- * info.el (Info-insert-dir): Do not insert temporary dir files -- in Info-dir-file-attributes -- (Info-build-dir-anew): Ensure temporary buffer is not read-only -- (Info-rebuild-dir): Ditto. -- --1998-04-09 Michael Sperber [Mr. Preprocessor] -- -- * obsolete.el: Added obsoleteness declarations for -- `site-directory' and `Info-default-directory-list'. -- --1998-04-08 Michael Sperber [Mr. Preprocessor] -- -- * find-paths.el (paths-find-emacs-root): Only look at the -- executable at the end of the symlink chain for determining the -- Emacs root. -- --1998-04-07 Michael Sperber [Mr. Preprocessor] -- -- * setup-paths.el (paths-construct-info-path): Changed construction -- to cater to gone default in configure. -- -- * find-paths.el (paths-uniq-append): Added. -- -- * packages.el: Rewritten package path construction once again. -- -- * dump-paths.el, startup.el: Removed package-path as a global -- variable. -- -- * package-admin.el (package-admin-add-single-file-package): -- (package-admin-add-binary-package): Changed package-path to -- late-packages. -- -- * packages.el (packages-split-path): Split path at "/" rather than -- nil according to change in emacs.c. -- --1998-04-06 Michael Sperber [Mr. Preprocessor] -- -- * setup-paths.el (paths-construct-info-path): Changed info path -- order so that directories come out right. -- (paths-find-lock-directory): Fixed bug: It used to think -- configure-lock-directory is a path. -- --1998-04-06 Jeff Miller -- -- * x-toolbar.el: Added toolbar-vector-xxxxxx defvars. Modified -- initial-toolbar-spec to use new toolbar-vector-xxxxxx defvars. This -- eases the use of toolbar-add/kill-item functions. -- --1998-04-07 Kirill M. Katsnelson -- -- * code-files.el (file-coding-system-alist): Commented out -- loaddefs.el magical treatment. -- --1998-04-06 Oscar Figueiredo -- -- * info.el (Info-rebuild-outdated-dir): Added new option -- `conservative' and made it the default -- (Info-rebuild-dir): Appropriately parse multi-line description -- strings, and multi-section dir files. Issue warning when dir -- is rebuilt as temporary -- (Info-build-dir-anew): Issue warning when dir is built as -- temporary -- --1998-04-04 Kirill M. Katsnelson -- -- * list-mode.el (list-mode-map): Bind highlight motion commands to -- standard keys left, right, C-b and C-f. -- --1998-03-29 Karl M. Hegbloom -- -- * files.el (auto-mode-alist): allow .sc for Scheme->C -- --1998-04-06 SL Baur -- -- * loadup.el (pureload): Don't quote (garbage-collect). -- --1998-04-04 SL Baur -- -- * package-get-base.el: Updated. -- --1998-04-04 Hrvoje Niksic -- -- * isearch-mode.el (isearch-just-started): New variable. -- (isearch-mode): Set it. -- (isearch-repeat): Advance one character forward only if the search -- was successful, and was not just started. -- (isearch-repeat): Clear isearch-just-started. -- --1998-04-02 SL Baur -- -- * finder.el (finder-compile-keywords): Don't eval new finder-inf -- if running -batch. -- --1998-03-26 Hrvoje Niksic -- -- * subr.el (listify-key-sequence): Removed. -- --1998-03-31 Hrvoje Niksic -- -- * bytecomp.el (byte-compile-print-gensym): New option. -- (byte-compile-output-file-form): Use it. -- (byte-compile-output-docform): Ditto. -- (byte-compile-compiled-obj-to-list): Ditto. -- --Sun Mar 29 1998 Andy Piper -- -- * msw-glyphs.el: set frame icon if xpm support. -- --1998-03-30 Kyle Jones -- -- * help.el: Code that pretty prints variable values -- removed. -- --1998-04-02 SL Baur -- -- * find-paths.el (paths-emacs-root-p): Correct test for installation -- directory. -- From Michael Sperber [Mr. Preprocessor] -- --1998-03-30 Kyle Jones -- -- * loaddefs.el: Don't set debug-ignored-errors; leave -- its default value set to nil. -- --1998-03-29 Damon Lipparelli -- -- * info.el (Info-rebuild-dir): fixed mis-spelling. -- --1998-03-29 Oscar Figueiredo -- -- * info.el (Info-rebuild-outdated-dir): New custom var -- (Info-insert-node): Create/update dir file when needed, ie when it -- does not exist or is older than some info files in directory -- --1998-04-01 Michael Sperber [Mr. Preprocessor] -- -- * setup-paths.el, dump-paths.el, startup.el, packages.el: Allowed -- for last packages, mainly for using a 20.4 package base. -- -- * packages.el (late-packages): Typo fix. It was called -- early-packages. -- -- * find-paths.el (paths-find-emacs-root): Bug fix: it now chases -- relative symlinks correctly. -- (paths-find-emacs-roots): More rigorous checking for plausible -- configuration-time root. -- -- * startup.el (normal-top-level): Added a warning if XEmacs cannot -- find its roots. -- --1998-03-27 Martin Buchholz -- -- * faces.el: Fix docstrings. -- * glyphs.el: Fix docstrings. -- * mouse.el: Fix docstrings. -- -- * frame.el: Change phrase `current frame' to `selected frame'. -- -- * faces.el (face-spec-set-match-display): Make FRAME arg optional. -- -- * bytecomp.el (displaying-byte-compile-warnings): Rewrite some -- macros using backquote to make them infinitely more readable. -- --1998-03-30 SL Baur -- -- * packages.el (packages-find-package-path): Hardcoded specialized -- InfoDock support until we can clean this up. -- -- * help.el (describe-bindings-1): Return the value of the bindings -- help buffer created. -- (describe-bindings): Ditto. -- -- * simple.el (set-variable): Restore previous behavior of not -- bombing if the variable to set is not boundp. -- --1998-03-30 Michael Sperber [Mr. Preprocessor] -- -- * packages.el (packages-handle-package-dumped-lisps): Allow for -- non-local files to be loaded off the package-lisp variable. -- --1998-03-27 Kyle Jones -- -- * x-faces.el: Global X resources should override -- specs for all device classes (color, grayscale, mono); -- code currently doesn't override any of them. Fixed by -- calling remove-specifier with '(x default) as the tag -- set and allowing inexact matches. -- --1998-03-27 Kyle Jones -- -- * faces.el: Separated face intializations based on -- device classes into device type specific (tag set, -- instantiator) pairs. -- --1998-03-09 Hrvoje Niksic -- -- * wid-edit.el (widget-choice-action): Remember user's explicit -- choice. -- (widget-choice-value-create): Respect it. -- From Richard Stallman -- --1998-03-26 Michael Sperber [Mr. Preprocessor] -- -- * setup-paths.el (paths-construct-info-path): Always append -- existing directories from configure-time info path. -- -- * startup.el (startup-setup-paths): Renamed misnamed info-path to -- Info-directory-list. -- -- * info.el: Removed Info-default-directory-list which was broken by -- design. -- Removed bogus initialization of Info-directory-list---startup.el -- can do a much better job. -- Added autoload of Info-directory-list. -- -- * setup-paths.el (paths-construct-load-path): Fixed a bug pointed -- out by Martin Buchholz : EMACSLOADPATH used to -- be exclusive; now it's merely given precedence, just like in the -- old days. -- --1998-03-25 Michael Sperber [Mr. Preprocessor] -- -- * find-paths.el (paths-find-architecture-directory): Fix bug with -- finding; it used to default too early. -- --1998-03-25 Martin Buchholz -- -- * packages.el (packages-split-path): Fix a bug; it used to fail -- for paths that weren't split. -- --1998-03-26 SL Baur -- -- * finder.el (finder-compile-keywords): trap on errors. -- --1998-03-24 Kyle Jones -- -- * x-faces.el (remove-specifier-specs-matching-tag-set-cdrs): Pass -- fourth argument of t so that only the specs exactly -- matching the tag lists are removed. -- --1998-03-25 SL Baur -- -- * make-docfile.el: Don't discard the BOOTSTRAPLOADPATH. -- --1998-03-23 SL Baur -- -- * minibuf.el (mouse-read-file-name-1): If a default directory was -- specified, use it for generating the completions. -- --1998-03-23 Michael Sperber [Mr. Preprocessor] -- -- * update-elc.el: Now respects inhibit-package-init and -- inhibit-site-lisp. -- Now does path construction with loadup-paths. -- -- * startup.el (normal-top-level, startup-setup-paths): Now respects -- inhibit-package-init and inhibit-site-lisp. -- -- * packages.el (packages-find-package-path): Extended package path -- by version-specific hierarchies. -- (packages-find-packages): Now respects inhibit flag and -- inhibit-site-lisp. -- Moved path setup to loadup-paths. -- -- * make-docfile.el: Now respects inhibit-package-init and -- inhibit-site-lisp. -- Now does path construction with loadup-paths. -- -- * loadup.el: Now respects inhibit-package-init and -- inhibit-site-lisp. -- -- * dumped-lisp.el (preloaded-file-list): Added loadup-paths. -- -- * loadup-paths.el: New file: setup load-path to encompass -- packages. -- --1998-03-22 SL Baur -- -- * auto-show.el: load-gc renamed to pureload. -- * site-load.el: Ditto. -- * packages.el (toplevel): Ditto. -- * loadup.el (really-early-error-handler): Ditto. -- * dumped-lisp.el (preloaded-file-list): Ditto. -- * cus-face.el (custom-declare-face): Ditto. -- --1998-03-22 Michael Sperber [Mr. Preprocessor] -- -- * : The Big Path Searching Overhaul. -- -- * find-paths.el: New file: find and assemble paths in the -- installation hierarchy. -- -- * setup-paths.el: New file: global layout of paths and directories -- within the XEmacs hierarchy. -- -- * packages.el: Replaced everything related to path searching and -- startup by code in terms of find-paths. -- -- * loadup.el, make-docfile.el, update-elc.el, startup.el: Now calls -- the new path searching engine. -- -- * dumped-lisp.el (preloaded-file-list): Added new files find-paths -- and setup-paths. -- --1998-03-22 SL Baur -- -- * dumped-lisp.el (preloaded-file-list): Load setup-paths.elc not -- setup-paths.el. -- --1998-03-20 Kirill M. Katsnelson -- -- * msw-glyphs.el: Added check for 'mswindows feature, so the file -- compiles identically in any configuration. -- Removed irrelevant commentary. -- --1998-03-20 Kirill M. Katsnelson -- -- * simple.el (set-variable): Allow setting specifiers. -- --1998-03-19 SL Baur -- -- * lisp.el (forward-sexp): Revert previous change. -- --1998-03-18 SL Baur -- -- * frame.el (frame-initialize): Use `delete-console' instead of -- `delete-device' to delete the stream console to match the usage in -- Fkill_emacs. -- --1998-03-16 SL Baur -- -- * files.el (cdpath-previous): New variable. -- (cd): Use it. -- From Bob Weiner -- --1998-03-15 Kyle Jones -- -- * keydefs.el: Changed keybindings of forward-char, -- backward, scroll-up and scroll-down to point to their -- -command counterparts. -- -- * simple.el: New functions: forwarc-char-command, -- backwrad-char-command, scroll-up-command, -- scroll-down-command which work liek their counterparts -- except that they honor the variable -- signal-error-on-buffer-boundary. -- -- Definition of signal-error-on-buffer-boundary received -- from src/cmds.c. -- -- defvar declaration added for word-across-newline to avoid -- byte-compiler warning about the free variable reference. -- --1998-03-14 Kirill M. Katsnelson -- -- * winnt.el: Removed "%t" from the beginning of -- modeline-format. From now on, there's no nt-specifics in the modeline. -- --1998-03-14 SL Baur -- -- * setup-paths.el (paths-setup-paths-warning): Replace occurrences -- of `when' with `if'. -- --1998-03-03 Kirill M. Katsnelson -- -- * msw-glyphs.el: New file. Defines TTY-style glyphs for -- mswindows. Must be reworked along with glyphs.el, or -- merged into it, after there is images support. -- -- * dumped-lisp.el (preloaded-file-list): Dump msw-glyphs.el when -- 'mswindows. -- --1998-03-13 SL Baur -- -- * faces.el: fix for text cursor initialization. -- Suggested by Kyle Jones -- From Andy Piper -- --1998-03-11 Pete Ware -- -- * files.el (set-auto-mode): If a mode is not fboundp, check to see -- if there is an existing package that handles it and warn the user -- about that mode. -- --1998-03-02 Kirill M. Katsnelson -- -- * x-menubar.el (default-menubar): Greyed out "Help / Basics / -- Installation" menu item when Installation-string is not bound. -- --1998-03-11 SL Baur -- -- * lisp.el (forward-sexp): Fix for test for balanced sexp. -- From Jeremiah W. James -- --1998-03-10 Kyle Jones -- -- * msw-faces.el: -- * faces.el: Fix face initialization. -- --1998-03-10 Glynn Clements -- -- * files.el (backup-enable-predicate): fix breakage introduced -- by TMPDIR patch. -- --1998-03-09 Kyle Jones -- -- * x-faces.el (x-init-face-from-resources): The -- TTY face property retrieval functions don't return -- specifiers, so use face-property instead. -- --1998-03-09 SL Baur -- -- * mwheel.el (mwheel-install): Use portable keysyms and syntax. -- --1998-03-09 Kyle Jones -- -- * x-menubar.el: Expanded documentation for -- option-save-faces. Changed Options -> Browse Faces -- menu entry to invoke customize-face. -- --1998-03-09 Kyle Jones -- -- * faces.el: Most face initialization moved out of -- init-other-random-faces to the top level so that the -- initialization happens before Xemacs is dumped. Much -- of the fascist "face-differs-from-default-p or FROB!" -- code has been retired in favor of letting the user do -- what they want to do. Face initialization code changed -- to use `default' specifier tag so that the settings can -- be overridden later if the user wishes it. -- --1998-03-08 SL Baur -- -- * about.el (about-hackers): Update contributors list. -- --1998-03-07 Kyle Jones -- -- * specifier.el: Define new specifier tag `default'. -- -- * modeline.el: Initialize faces using `default' tag. -- -- * x-faces.el (x-init-face-from-resources): Remove -- specifier specs containing the `default' tag before -- adding new specs. -- --1998-03-02 John Jones -- -- * package-get.el (package-get-all): fixed arguments on call to -- package-admin-add-single-file-package. -- * package-get.el (package-get-installedp): fixed to match -- advertised behavior. -- * package-get.el: added function package-get-update-all which -- installs newest versions of all the current packages (if they are -- not already installed). -- --1998-03-04 Jens-Ulrik Petersen -- -- * files.el (find-file-noselect): Uncommented `truename' binding in -- `let*' and use it later to set `buffer-file-truename' iff it's -- still nil, as happens for example when finding a compressed -- file with "jka-compr". -- --Wed Mar 04 08:55:12 1998 Andy Piper -- -- * faces.el: in make-face-* type functions do the operation for all -- window systems, not just the first one found. -- -- * font.el: call mswindows-list-fonts for mswindows. -- --1998-03-02 Glynn Clements -- -- * code-process.el (call-process-region): -- * process.el (call-process-region): -- * package-get.el (package-get-dir): -- * files.el (backup-enable-predicate): -- * gnuserv.el (gnuserv-temp-file-regexp): -- Use temp-directory in place of `/tmp'. -- --Fri Feb 20 21:22:34 1998 Darryl Okahata -- -- * "Fast" dired-in-C enhancements for Windows 95/NT: -- -- * files.el: Added function, `wildcard-to-regexp', from GNU -- Emacs. -- -- * files.el (insert-directory): Modified to use special -- dired-in-C enhancements if present. -- --Mon Mar 02 11:37:36 1998 Andy Piper -- -- * code-files.el: make default coding no-conversion. -- --1998-03-02 SL Baur -- -- * dumped-lisp.el (preloaded-file-list): Find Installation.el from -- the load-path. -- -- * update-elc.el: Strip directory when testing for files not to -- bytecompile. -- --1998-03-02 Aki Vehtari -- -- * lisp-mode.el: Use recommended form for menus. -- -- * info.el (Info-construct-menu): Use recommended form for menus. -- -- * gnuserv.el (gnuserv-edit-files): Use recommended form for menu -- entry. -- --1998-02-28 Kyle Jones -- -- * frame.el: Resurrect get-frame-for-buffer-default-to-current. -- (get-frame-for-buffer-noselect): Always return frames -- in the not-this-window-p cond clause. -- --1998-02-27 SL Baur -- -- * help.el (describe-installation): New function. -- -- * x-menubar.el (default-menubar): Add describe-installation to -- Help menu. -- -- * packages.el (packages-unbytecompiled-lisp): Installation.el -- should not be bytecompiled. -- -- * dumped-lisp.el (preloaded-file-list): Dump Installation with -- XEmacs. -- -- * x-menubar.el (default-menubar): Use correct guard for VM menu -- entry. -- -- * coding.el: Add coding systems for iso-8859-[12] for No-Mule + file -- coding. -- From Andy Piper -- --1998-02-26 Oscar Figueiredo -- -- * ldap.el: Do not require ldap-internal at compile time. -- --Tue Feb 17 12:50:37 1998 Andy Piper -- -- * code-files.el: new file. a virtual copy of mule-files.el -- but without charset -- dependencies. (toggle-buffer-file-ocding-system) new function for -- changing the eol type for the current buffer. -- -- * code-process.el: new file. a copy of -- mule-process.el. mule-process.el will disappear when things have -- settled. -- -- * coding.el: new file. a virtual copy of mule-files.el but -- without charset dependencies. (coding-system-base) new function -- for getting the parent coding system of a coding system with eol -- type set. -- -- * dumped-lisp.el: add above files for the non-mule case. -- --1998-02-25 Kyle Jones -- -- * window-xemacs.el (display-buffer): If no explicit -- frame is specified, search for a window that displays -- the buffer on the currently selected frame, before -- searching other frames. -- --1998-02-25 Kyle Jones -- -- * frame.el (get-frame-for-buffer): If not-this-window-p -- is non-nil, use window on the selected frame if it is not -- also the selected window. When defaulting, search for -- windows on the currently selected fgrame before searching -- other frames. -- --1998-02-25 Didier Verna -- -- * modeline.el (modeline-swap-buffers): originally named -- `mouse-release-modeline'. Whether to actually swap the buffers is -- decided in `mouse-drag-modeline'. -- (mouse-drag-modeline): A button release event is considered a -- mouse click is both X (modeline scroll) and Y (modeline drag) pos -- stay unchanged. -- --1998-02-25 SL Baur -- -- * x-menubar.el: Put redo on the menubar. -- From Aki Vehtari -- --1998-02-22 Greg Klanderman -- -- * bytecomp.el (displaying-byte-compile-warnings): if -- temp-buffer-show-function is set, use it to display current set of -- warnings in the "*Compile-Log-Show*" buffer. -- -- * simple.el (display-warning-buffer): if temp-buffer-show-function -- is set, use it to display current set of warnings in the -- "*Warnings-Show*" buffer. -- --1998-02-20 Karl M. Hegbloom -- -- * cl-extra.el (equalp): Make (equalp ?A ?a) return t as in -- Common Lisp. -- --1998-02-23 Aki Vehtari -- -- * menubar.el: Allow button descriptors at least 2 long. -- -- * x-menubar.el (default-menubar): Use recommended forms. -- (file-menu-filter): Remove. -- (edit-menu-filter): Remove. -- --1998-02-24 SL Baur -- -- * about.el (about-hackers): Updated. -- --1998-02-22 Greg Klanderman -- -- * help.el (help-max-help-buffers): new variable -- (help-register-and-maybe-prune-excess): new function -- (help-buffer-name): use help-max-help-buffers. -- (with-displaying-help-buffer): use -- help-register-and-maybe-prune-excess. -- -- * help.el (help-maybe-pretty-print-value): if the value fits on -- one line, let it. -- --1998-02-21 Greg Klanderman -- -- * (with-displaying-help-buffer): there is no need to kill the buffer -- if it exists, becasuse with-output-to-temp-buffer will clear it. -- further, killing the buffer violates the rule that -- temp-buffer-show-function, if set, has the full responsibility of -- showing the temp buffer. killing the buffer fucks with the window -- configuration, hosing temp-buffer-show-function. -- -- --1998-02-23 Didier Verna -- -- * modeline.el (mouse-drag-modeline): -- - Always scroll the modeline that was originally clicked on. -- - Use x pixels instead of x characters (which doesn't work anyway) -- as horizontal reference for modeline dragging. This allows us to -- keep on dragging the modeline even if the motion event occurs in -- another window. -- --1998-02-23 Didier Verna -- -- * x-mouse.el (x-init-pointer-shape): use a crossed-arrows cursor -- glyph on the modeline to indicate that dragging the mouse has an -- effect both horizontally and vertically. -- --1998-02-24 SL Baur -- -- * about.el (about-xemacs): Get rid of redundant visible version -- number. -- --1998-02-19 SL Baur -- -- * about.el (about-hackers): Update credits. -- --1997-12-22 Christoph Wedler -- -- * prim/register.el (view-register): Show register type file-query. -- --1998-02-17 Kyle Jones -- -- * mode-motion.el (mode-motion-highlight-internal): -- save-excursion inside save-window-exucrsion form to -- hide buffer point changes from save-window-excursion. -- Prevents display flickering when the mouse pointer -- moves. -- --1998-02-17 Didier Verna -- -- * mouse.el (default-mouse-track-set-point-in-window): rewrote this -- function to handle correctly the case of a toolbar one side of the -- window: scrolling will not necessarily happen. -- --1998-02-17 Kyle Jones -- -- * files.el (after-find-file): Restore missing argument -- to format that provides filename for "... consider M-x -- recover-file" message. Also call `message' with "%s" -- as the first arg instead of an arbitrary string. -- --1998-02-18 SL Baur -- -- * about.el (about-hackers): Various additions. -- --1998-02-15 SL Baur -- -- * autoload.el (generate-file-autoloads-1): Don't force an extra -- line out when copying on-the-same line autoloads. -- -- * x-menubar.el (default-menubar): Add Sokoban to the menubar if it -- is installed. -- --1998-02-14 Martin Buchholz -- -- * x11/x-win-xfree86.el (x-win-init-xfree86): -- * x11/x-win-sun.el (x-win-init-sun): -- * x11/x-init.el (x-initialize-compose): -- * prim/simple.el: -- (backward-or-forward-kill-sexp): -- (backward-or-forward-kill-sentence): -- (backward-or-forward-kill-word): -- (backward-or-forward-delete-char): -- * prim/isearch-mode.el (isearch-help-or-delete-char): -- Use x-keysym-on-keyboard-sans-modifiers-p instead of -- x-keysym-on-keyboard-p to detect backspace. -- Use symbols instead of strings (now deprecated) with x-keysym-*-p. -- Clean up symbols used with dead keys, checking Linux and solaris -- keysyms. -- Simplify x-win-*.el using above methods. -- Change documentation for x-keysym-*-p functions. -- --1998-02-14 SL Baur -- -- * about.el (about-hackers): Restore entries for Michael Sperber and -- Vinnie Shelton. -- From Vinnie Shelton -- --1998-02-14 Hrvoje Niksic -- -- * simple.el (count-words-region): Ditto. -- --1998-02-12 Hrvoje Niksic -- -- * simple.el (count-words-buffer): Document. Don't print anything -- if non-interactive. -- --1998-02-12 SL Baur -- -- * packages.el (packages-hardcoded-lisp): easymenu.el is in -- multiple files in InfoDock. -- --1998-02-11 SL Baur -- -- * packages.el (packages-hardcoded-lisp): id-vers.elc is loaded -- from version.el in InfoDock. -- -- * dumped-lisp.el (preloaded-file-list): Don't treat InfoDock -- specially. -- --1998-02-09 Karl M. Hegbloom -- -- * bytecomp-runtime.el (proclaim-inline): Single quotes around -- variable name in docstring. -- --1998-02-10 Andreas Jaeger -- -- * menubar.h: Include "gui.h". -- --1998-02-10 SL Baur -- -- * site-load.el: Fix documentation. -- --1998-02-09 SL Baur -- -- * package-get-base.el (package-get-base): Updated. -- -- * keymap.el: PC-ize. -- --1998-02-08 Karl M. Hegbloom -- -- * hyper-apropos.el (hyper-apropos-get-doc): Print the `loaded -- from' on a fresh line. -- --1998-02-08 Hrvoje Niksic -- -- * help.el (help-maybe-pretty-print-value): prin1, not princ the -- object. -- --1998-02-09 SL Baur -- -- * undo-stack.el: PC-ize. -- -- * cmdloop.el: PC-ize. -- --1998-02-08 SL Baur -- -- * bytecomp-runtime.el: PC-ize. -- -- * byte-optimize.el: Prolog fixup. PC-ize. -- -- * cus-dep.el: Spelling fix. -- -- * text-mode.el: Synch with Emacs 20.2. (Original ChangeLog -- entries follow). -- --1997-08-29 Richard Stallman -- -- * text-mode.el (text-mode-hook-identify): New function, -- put on text-mode-hook. Set text-mode-variant here. -- (text-mode): Don't set it here. -- --1997-08-27 Richard Stallman -- -- * text-mode.el (text-mode-hook): New defvar. -- (text-mode-variant): New variable. -- (text-mode): Set that variable locally. -- (toggle-text-mode-auto-fill): New command. -- --1997-06-15 Richard Stallman -- -- * text-mode.el (text-mode): Let all-white lines separate paragraphs. -- --1997-06-11 Richard Stallman -- -- * text-mode.el (paragraph-indent-text-mode): -- Renamed from spaced-text-mode. -- (text-mode-map): Bind TAB to indent-relative. -- (indented-text-mode-map): Variable deleted. -- (indented-text-mode): Now an alias for text-mode. -- --1998-02-05 SL Baur -- -- * loadup.el: test-atoms debugging stuffs removed. -- --1998-02-03 Martin Buchholz > -- -- * lisp/loaddefs.el (completion-ignored-extensions): Add ".class" -- --1997-12-30 Colin Rafferty -- -- * help.el (describe-beta): Made it use `locate-data-file'. -- (describe-distribution): Ditto. -- (describe-copying): Ditto. -- (describe-project): Ditto. -- (view-emacs-news): Ditto. -- -- * help-nomule.el (help-with-tutorial): Made it use -- `locate-data-file' to find tutorial. -- --1998-01-28 Jonathon Harris -- -- * about.el: Corrected my email address. -- -- * mouse.el: Added 'mouse-mswindows-drop' similar to -- 'mouse-offix-drop'. -- --1998-01-27 SL Baur -- -- * loadup.el (running-xemacs): Spelling fix. -- --1998-01-26 Colin Rafferty -- -- * packages.el (packages-find-packages-1): Don't allow a backwards -- compatible lisp tree to overwrite `preloaded-file-list'. -- --1998-01-26 SL Baur -- -- * loadup.el: Don't delete "xemacs" prior to dumping. -- --1998-01-24 SL Baur -- -- * package-info.el (pi-last-mod-date): New function. -- (pi-author-version): New function. -- (batch-update-package-info): Use them. -- --1998-01-23 Colin Rafferty -- -- * frame.el (get-frame-for-buffer-default-to-current): Create. -- (get-frame-for-buffer-noselect): Allow user to use current frame -- with `get-frame-for-buffer-default-to-current'. -- --1998-01-22 Hrvoje Niksic -- -- * bytecomp.el (byte-compile-output-file-form): Set print-gensym. -- (byte-compile-output-docform): Ditto. -- (byte-compile-compiled-obj-to-list): Ditto. -- --1998-01-22 Kyle Jones -- -- * startup.el (command-line-1): Removed code that ran -- buffer-menu. -- --1998-01-21 Hrvoje Niksic -- -- * help-macro.el (make-help-screen): Bind `help-read-key' via flet. -- --1998-01-17 Hrvoje Niksic -- -- * frame.el (suspend-emacs-or-iconify-frame): Check using -- `device-on-window-system-p' instead of explicitly checking for X, -- so that the same logic works for MS Windows. -- (suspend-or-iconify-emacs): Ditto. -- --1998-01-14 Hrvoje Niksic -- -- * about.el (about-maintainer-info): Andy Piper is back. -- (xemacs-hackers): Updated Andy Piper's email address. -- (about-hackers): Added Jonathan Harris. -- (about-hackers): Updated Tibor Polgar's email address. -- --1998-01-18 SL Baur -- -- * about.el: Add xemacs.org email manager. -- -- * package-get-base.el (package-get-base): Updated with most recent -- package updates. -- --1998-01-14 Jens-Ulrik Holger Petersen -- -- * help.el (function-arglist): Use `indirect-function' instead of -- `symbol-function' so that aliases are treated correctly. -- --1998-01-13 Jens-Ulrik Holger Petersen -- -- * help.el (help-map): Add f1 binding to `help-for-help'. -- Suggested by Karl M. Hegbloom . -- (describe-key-briefly): Use `princ' "%s" to print object. -- (with-displaying-help-buffer): Kill buffer if it exists, again. -- (describe-key): Use `princ' "%s" to print object. -- (describe-function-1): Use `princ' "%s" to print object. -- Commented out alias lines removed. -- (help-pretty-print-limit): New variable to control pretty-printing -- of variable values. -- (help-maybe-pretty-print-value): Steve wins! Renamed back from -- `help-pretty-print-value' again. Only print-print when OBJECT is -- list of length less than `help-pretty-print-limit'. -- (describe-variable): Use `help-maybe-pretty-print-value' again. -- --1998-01-18 SL Baur -- -- * simple.el (blink-matching-open): Remove C++ kludge. -- Suggested by Bob Weiner -- --1998-01-14 Karl M. Hegbloom -- -- * info.el (Info-default-directory-list): Made the documentation -- more explanitory. -- --1998-01-13 Martin Buchholz -- -- * lisp/packages.el: -- * lisp/package-admin.el: -- * lisp/build-report.el: -- Fix typos. -- --1998-01-14 Christoph Wedler -- -- * Patches/font-lock.el (java-font-lock-keywords-*): Would produce -- warnings in Java buffers without final newline and editing the -- last line. -- --1998-01-17 SL Baur -- -- * packages.el (packages-find-packages-1): Don't allow a backwards -- compatible lisp tree to overwrite `preloaded-file-list'. -- Suggested by Colin Rafferty -- -- * mouse.el (mouse-offix-drop): Set undo-boundary. -- From Oliver Graf -- --1998-01-13 SL Baur -- -- * loadup.el (load-gc): rewrite as defun. -- Print something sensical if a required dump-time file isn't found. -- --1998-01-12 SL Baur -- -- * menubar.el (check-menu-syntax): Emergency dirty fix -- the 0 plist -- bug strikes a menudescriptor. -- -- * package-get-base.el (package-get-base): Updated. -- -- * package-info.el (batch-update-package-info): Derive REQUIRES -- from the Makefile. -- --1998-01-13 Hrvoje Niksic -- -- * files.el (save-some-buffers): Don't play games with deleting -- other windows if we are in the minibuffer window. -- --1998-01-08 Karl M. Hegbloom -- -- * modeline.el (modeline-minor-mode-menu): Add support for :active -- (add-minor-mode): Document :active property to TOGGLE. -- --1998-01-07 Karl M. Hegbloom -- -- * modeline.el (modeline-minor-mode-menu): Add support for an -- `:included' predicate in the `toggle-sym' plist. -- (add-minor-mode): Document the :included property, format -- docstring some more. -- (modeline-minor-mode-menu): Documentation string added. -- --1998-01-02 Karl M. Hegbloom -- -- * modeline.el (modeline-minor-mode-menu): genmenlab the menu -- labels from the symbol-names by thwacking off the overly redundant -- and overused "mode", parenthesizing "minor", and capitalizing the -- resultant strings. Also shortened the menu's title by eliminating -- the redundant buffer name. -- (add-minor-mode): Beautified the docstring, added mention of the -- `:menu-tag' property of TOGGLE. -- (modeline-minor-mode-menu): Frinked the `:menu-tag' property on -- `toggle-sym' to beatify the mode-life menus. -- * (abbrev-mode): (put)'ed a `:menu-tag' on it and -- `auto-fill-function'. -- --1998-01-02 Karl M. Hegbloom <> -- -- * modeline.el (modeline-minor-mode-menu): Changed the string-only -- menus to :style 'toggle. -- --1997-12-10 Markus Linnala -- -- * simple.el: Use mh-user-agent-compose as mh-e-user-agent. -- --1997-12-11 Christoph Wedler -- -- * packages/hyper-apropos.el (hyper-apropos-insert-face): Would -- only recognize first hyperlink. -- (hyper-apropos-highlightify): Deletia, this is already done by -- `hyper-apropos-insert-face'. -- (hyper-apropos-help-mode): Don't call `hyper-apropos-highlightify. -- --1998-01-09 SL Baur -- -- * x-toolbar.el (toolbar-ispell-internal): Use ispell-message for -- mail. -- (toolbar-mail-reader): Add support for `send'. -- From Jonathan Marten -- --1998-01-05 Karl M. Hegbloom <> -- -- * info.el (Info-emacs-info-file-name): Add defvar for -- `Info-emacs-info-file-name' so that `Info-goto-emacs-command-node' -- will function properly. -- --1998-01-05 Gary D. Foster -- -- * simple.el: make the backwards delete function called by -- `backward-or-forward-delete-char' user configurable. -- --1998-01-09 Karl M. Hegbloom -- -- * hyper-apropos.el (hyper-apropos-get-doc): Print where a byte -- compiled function got loaded from. -- --1998-01-09 SL Baur -- -- * term/apollo.el: Synched up with InfoDock 3.6.2. -- --1998-01-08 SL Baur -- -- * startup.el (load-init-file): Load autoloads earlier. -- (startup-splash-frame): Handle InfoDock logo. -- -- * x-init.el (init-post-x-win): Don't call init-x-toolbar in -- InfoDock. -- (x-init-toolbar-from-resources): Move from x-toolbar.el. -- -- * toolbar.el (init-toolbar-from-resources): InfoDock x-toolbar.el -- doesn't have this function. -- -- * packages.el (locate-data-file): Fix to call `locate-file'. -- --1998-01-07 SL Baur -- -- * dumped-lisp.el (preloaded-file-list): InfoDock uses its own -- version of version.el. -- (preloaded-file-list): Ditto for x-menubar.el and x-toolbar.el. -- -- * x-menubar.el (default-menubar): Guard reference to -- `gnuserv-frame'. -- (default-menubar): Guard references to `font-lock-mode'. -- (default-menubar): Guard references to font-menu-this-frame-only-p'. -- (default-menubar): Guard references to `font-menu-ignore-scaled-fonts'. -- -- * make-docfile.el: Don't snarf doc strings from autoloads. -- -- * startup.el (load-init-file): Use algorithm from loaddefs.el for -- loading auto-autoloads files. -- -- * loaddefs.el: Disable dumping autoloads. -- --1998-01-05 SL Baur -- -- * lisp-mnt.el: Synch to Emacs 20.2. -- -- * help.el: Remove manual autoload of `finder-by-keyword'. -- -- * finder.el (finder-by-keyword): Autoload. -- -- * help.el: Conditionalize hyperbole setup. -- --1998-01-04 SL Baur -- -- * packages.el (package-require): Update to reflect new data format. -- --1998-01-02 Didier Verna -- -- * x-menubar.el (default-menubar): make the tutorials available -- through the menubar. (Plus some compilation warnings cleanup). -- --1998-01-04 SL Baur -- -- * check-features.el: New file. Perform sanity check after build. -- -- * dumped-lisp.el (preloaded-file-list): Move tooltalk dumped lisp -- files to tooltalk package. -- (preloaded-file-list): Moved sparcworks dumped lisp files to Sun -- package. -- -- * package-admin.el (package-admin-xemacs): Use better default for -- location of XEmacs binary. -- --1998-01-03 Aki Vehtari -- -- * x-menubar.el (buffers-menu-submenus-for-groups-p): Replace const -- tag with sexp and add value tag with value `t'. -- --1998-01-03 SL Baur -- -- * package-get.el: Changes to work with real data. -- From Pete Ware -- -- * packages.el (packages-reload-autoloads): Guard load for the time -- being. -- -- * update-elc.el ("packages.el"): Force loading packages.el instead -- of possibly out-of-date packges.elc. -- * make-docfile.el ("packages.el"): Ditto. -- --1998-01-02 Colin Rafferty -- -- * build-report.el (build-report-delete-regexp): Added a rule for -- the main tarball shadowing anything past it. -- --1998-01-02 SL Baur -- -- * packages.el (package-provide): Delete a previous provide. -- -- * package-info.el: New file. -- -- * package-get.el: New file. -- From Pete Ware -- (package-get): Fix md5 computation to work with Mule. -- --1997-12-11 Jens-Ulrik Holger Petersen -- -- * simple.el (log-message-*): Quote symbols in docstrings properly. -- --1998-01-01 SL Baur -- -- * packages.el (packages-new-autoloads): Ignore symbolic links. -- -- * cus-face.el (face-custom-attributes-get): Fix typo. -- From Jens-Ulrik Holger Petersen -- --1997-12-31 SL Baur -- -- * startup.el (load-init-file): Reload new or changed autoloads -- unless inhibited. Reload modified dumped lisp (stubbed). -- -- * packages.el (packages-new-autoloads): New function. -- (packages-reload-autoloads): New function. -- (packages-reload-dumped-lisp): New (stub) function. -- -- * loadup.el: Inhibit reloading dumped files when running temacs. -- -- * loadhist.el (file-provides): Extend to handle variant -- extensions. -- -- * replace.el (query-replace): Fix typo. -- --1997-12-30 SL Baur -- -- * make-docfile.el: list-autoloads-path has been renamed. -- * update-elc.el: list-autoloads has been renamed. -- -- * packages.el (packages-list-autoloads): Renamed. -- (packages-list-autoloads-path): Ditto. -- --1997-12-29 Colin Rafferty -- -- * packages.el (packages-find-packages-1): Made it signal a warning -- for an error in an auto-autoload.el file. -- --1997-12-30 SL Baur -- -- * x-menubar.el (buffers-menu-submenus-for-groups-p): Replace sexp -- tag with const. -- From Aki Vehtari -- -- * dumped-lisp.el (preloaded-file-list): Dump loadhist with XEmacs. -- -- * loadhist.el (unload-feature): Remove autoload. -- --1997-12-28 SL Baur -- -- * loadhist.el: Unpackaged. -- -- * help.el (describe-symbol-find-file): Rename -- `describe-function-find-file' and make old name obsolete. -- (describe-function-1): Use it. -- (describe-function-1): Guard reference to -- `compiled-function-annotation'. -- --1997-12-27 Jens-Ulrik Holger Petersen -- -- * help.el (help-mode-bury): Now a call to `help-mode-quit' with -- argument. -- (help-mode-quit): New optional arg to control whether it kills or -- buries. Tidied up. -- (with-displaying-help-buffer): Don't kill buffer initially, even -- if it exists: it is erased by `with-output-to-temp-buffer' anyway. -- (help-pretty-print-value): Rename back from -- `help-maybe-pretty-print-value'! If `pp-internal' is available -- use it, otherwise use dumped `cl-prettyprint'. -- (describe-variable): Use `help-pretty-print-value' again. -- (find-func): Removed reference to "find-func" at end. -- --1997-12-26 Kirill M. Katsnelson -- -- * dumped-lisp.el: x-menubar.el dumped along with mswindows native -- GUI XEmacs. Rename? x-menubar is rather window system -- independant, except for a couple of items. -- --1997-12-26 SL Baur -- -- * x-menubar.el (default-menubar): Remove hyperbole and oobr -- entries as they will no longer be distributed with XEmacs. -- -- * format.el (format-alist): Fix image/tiff regexps. -- From P. E. Jareth Hein -- -- * help.el (help-maybe-pretty-print-value): Rename. -- (describe-variable): Use it. -- (describe-variable): Add trailing linefeed. -- --1997-12-26 Jens-Ulrik Holger Petersen -- -- * help.el (describe-function-1): Don't output anything for -- arglist of autoload functions. -- --1997-12-26 Jens-Ulrik Holger Petersen -- -- * help.el (describe-function-1): Don't output anything for -- arglist of autoload functions. -- --1997-12-26 Jens-Ulrik Holger Petersen -- -- * help.el (help-mode-map): New bindings for `help-mode-bury', -- `describe-function-at-point', `describe-variable-at-point', -- `Info-elisp-ref', `customize-variable', `help-next-section' and -- `help-prev-section'. -- (help-next-section): New function. -- (help-prev-section): New function. -- (help-mode-quit): Changed to kill the help buffer. -- (help-mode-bury): Formerly `help-mode-quit'. Bury buffer -- correctly. -- (help-buffer-name): New function to generate the name of help -- buffers. -- (with-displaying-help-buffer): Is now a macro. Takes an new first -- argument giving the name of the help buffer. -- (describe-key): Use `with-displaying-help-buffer' with name. -- (describe-mode): Ditto. -- (describe-bindings): Ditto. -- (describe-prefix-bindings): Ditto. -- (view-lossage): Ditto. -- (with-syntax-table): New macro. -- (function-called-at-point): Use `ignore-errors' and -- `with-syntax-table'. -- (function-at-point): Ditto. -- (describe-function): Use `with-displaying-help-buffer' with name. -- (function-arglist): Extracted from `describe-function-1'. Returns -- function's arglist as string. -- (function-documentation): Extracted from `describe-function-1'. -- Returns function's docstring. -- (describe-function-1): Remove all the "stream" garbage, including -- the stream argument. Use `function-arglist' and -- `function-documentation'. -- (describe-function-arglist): Just use `function-arglist'. -- (variable-at-point): Use `ignore-errors' and `with-syntax-table'. -- (help-pretty-print-value): New function to help with -- pretty-printing variable values. Knows about `#<...>'. Needs -- `pp-internal'. -- (describe-variable): Use `with-displaying-help-buffer' with name. -- Formatting improved. Display file where variable is defined, if -- known. Use `help-pretty-print-value'. -- (describe-syntax): Use `with-displaying-help-buffer' with name. -- (list-processes): Remove "stream" garbage. -- --1997-12-25 SL Baur -- -- * x-init.el (x-initialize-keyboard): Don't load x-win*.el files, -- call a dumped routine instead. -- -- * x-win-xfree86.el: Wrap file in defun. -- * x-win-sun.el: Ditto. -- --1997-12-23 SL Baur -- -- * help.el (view-emacs-news): Remove usage of outl-mouse which -- advises functions and does other evil things. -- --1997-12-22 SL Baur -- -- * format.el (format-alist): Add `image/tiff'. -- From P. E. Jareth Hein -- --1997-12-21 SL Baur -- -- * about.el (about-hackers): More names added. -- -- * make-docfile.el: Remove superfluous package path search. -- -- * loaddefs.el: Commentary changes. Removal of VM autoloads. -- --1997-12-20 SL Baur -- -- * shadow.el (find-emacs-lisp-shadows): Add _pkg to the list of -- ignored shadows. -- --1997-12-18 SL Baur -- -- * startup.el (set-default-load-path): Make sure lisp and site-lisp -- get trailing slashes when added to the load-path. -- -- * x-init.el (init-x-win): Locate where XEmacs X localization files -- are. -- --1997-12-18 Kyle Jones -- -- * x-faces.el: Added support for foregroundToolBarColor -- to xpm-color-symbols. -- --1997-12-17 Hrvoje Niksic -- -- * etags.el (tags-remove-duplicates): Removed. -- (buffer-tag-table-list): Use `delete-duplicates'. -- -- * cl-extra.el (coerce): Coerce to bit-vector and weak-list -- correctly. -- (get*): Defalias to `get'. -- -- * cl.el (eql): Compare integers with `eq'. -- (cl-map-extents): Check for `map-extents' first. -- --1997-12-17 Didier Verna -- -- * leim/quail/latin-pre.el ("french-prefix"): doc string cleanup + -- added the 'numero', 'copyright' and 'trademark' symbols. -- -- * leim/quail/latin-post.el ("french-postfix"): see above. -- --1997-12-15 Hrvoje Niksic -- -- * widget.el (define-widget): Check the arguments. -- -- * cus-edit.el (customize-face): Use `check-argument-type'. -- (custom-variable-value-create): Use `signal' to signal error. -- (custom-variable-reset-saved): Ditto. -- (custom-variable-reset-standard): Ditto. -- (custom-face-reset-saved): Ditto. -- -- * wid-edit.el (widget-prompt-value): Use `signal' to signal error. -- (widget-default-format-handler): Ditto. -- (widget-checklist-add-item): Ditto. -- (widget-radio-add-item): Ditto. -- (widget-editable-list-entry-create): Ditto. -- (widget-sexp-prompt-value): Ditto. -- -- * custom.el (custom-declare-variable): Signal errors better. -- (custom-handle-keyword): Ditto. -- (custom-declare-group): Ditto. -- -- * window-xemacs.el (windows): Ditto. -- -- * menubar.el (menu): Ditto. -- -- * keydefs.el (keyboard): Ditto. -- -- * minibuf.el (minibuffer): Ditto. -- -- * process.el (execute): Ditto. -- -- * fill.el (fill): Ditto. -- -- * modeline.el (modeline): Ditto. -- -- * help.el (help): Ditto. -- -- * faces.el (faces): Ditto. -- -- * files.el (files): Ditto. -- -- * x-init.el (x): Ditto. -- -- * lisp-mode.el (lisp): Ditto. -- -- * process.el (processes): Ditto. -- -- * mouse.el (mouse): Ditto. -- -- * abbrev.el (abbrev): Moved from cus-edit. -- -- * font-lock.el (lisp-font-lock-keywords-1): Recognize `defcustom' -- as variable declaration. -- --1997-12-15 Hrvoje Niksic -- -- * menubar.el (find-menu-item): Use `check-argument-type'. -- (find-menu-item): Cosmetic changes. -- --1997-12-18 SL Baur -- -- * x-menubar.el (default-menubar): Guard usage of lpr-switches. -- --1997-12-17 SL Baur -- -- * startup.el (set-default-load-path): Only search package-path -- when not running temacs. -- -- * dumped-lisp.el (preloaded-file-list): Remove Egg/Its dumped lisp -- files. -- -- * loadup.el: Correct commentary. Reformatting. -- (really-early-error-handler): Use absolute path to the -- first dumped-lisp.el file. -- (really-early-error-handler): Print full path name of -- each dumped lisp file (inherited from InfoDock). -- -- * shadow.el (find-emacs-lisp-shadows): Ignore multiple -- dumped-lisp.el files. -- -- * make-docfile.el (preloaded-file-list): Reorder when the -- package-path is searched. -- * update-elc.el: Ditto. -- -- * lisp-mode.el (call-with-condition-handler): Treat the same as -- `condition-case' for indentation. -- -- * about.el (about-xemacs): Update release date. -- --1997-12-17 Hrvoje Niksic -- -- * cl-macs.el (case): Signal error if `t' or `otherwise' are seen -- anywhere but at the last clause. -- (ecase): Disallow `t' and `otherwise'. -- --1997-12-16 Jens-Ulrik Holger Petersen -- -- * cus-edit.el (custom-buffer-create-buttons): New function -- from stuff moved out of `custom-buffer-create-internal'. -- (custom-novice): New variable. Default t. -- (custom-display-global-buttons): Ditto. Default `top'. -- (custom-buffer-create-internal): Only display help if -- `custom-novice' is non-nil. Display global buttons according to -- `custom-display-global-buttons'. -- --1997-12-15 Hrvoje Niksic -- -- * menubar.el (find-menu-item): Use `check-argument-type'. -- (find-menu-item): Cosmetic changes. -- --1997-12-15 Hrvoje Niksic -- -- * modeline.el (mouse-drag-modeline): Give the modeline a "pressed" -- look. -- --1997-12-16 Oscar Figueiredo -- -- * format.el (format-deannotate-region): Bug fix. -- Deannotating a region containing unknown tags would fail -- (causing decoding of text/enriched to fail at user level) -- --1997-12-16 Kyle Jones -- -- * minibuf.el (read-directory-name): Support sixth -- arg, HISTORY, as already documented. -- --1997-12-17 Hrvoje Niksic -- -- * etags.el (get-tag-table-buffer): Use explicit lists as arguments -- to `ecase'. -- --1997-12-14 SL Baur -- -- * skk/skk-leim.el (skk-auto-fill-activate): Synch with -- skk-activate. -- --1997-12-13 SL Baur -- -- * dumped-lisp.el (preloaded-file-list): Remove debugging statement. diff --cc lisp/auto-autoloads.el index b485276,55a4534..0000000 deleted file mode 100644,100644 --- a/lisp/auto-autoloads.el +++ /dev/null @@@ -1,1758 -1,1575 +1,0 @@@ --;;; DO NOT MODIFY THIS FILE --(if (featurep 'Standard-autoloads) (error "Already loaded")) -- --;;;### (autoloads nil "abbrev" "lisp/abbrev.el") -- --;;;*** -- --;;;### (autoloads (about-xemacs) "about" "lisp/about.el") -- --(autoload 'about-xemacs "about" "\ --Describe the True Editor and its minions." t nil) -- --;;;*** -- - ;;;### (autoloads (set-modified-alist modify-alist remove-alist set-alist del-alist put-alist) "alist" "lisp/alist.el") - - (autoload 'put-alist "alist" "\ - Modify ALIST to set VALUE to ITEM. - If there is a pair whose car is ITEM, replace its cdr by VALUE. - If there is not such pair, create new pair (ITEM . VALUE) and - return new alist whose car is the new pair and cdr is ALIST. - [tomo's ELIS like function]" nil nil) - - (autoload 'del-alist "alist" "\ - If there is a pair whose key is ITEM, delete it from ALIST. - [tomo's ELIS emulating function]" nil nil) - - (autoload 'set-alist "alist" "\ - Modify a alist indicated by SYMBOL to set VALUE to ITEM." nil nil) - - (autoload 'remove-alist "alist" "\ - Remove ITEM from the alist indicated by SYMBOL." nil nil) - - (autoload 'modify-alist "alist" "\ - Modify alist DEFAULT into alist MODIFIER." nil nil) - - (autoload 'set-modified-alist "alist" "\ - Modify a value of a symbol SYM into alist MODIFIER. - The symbol SYM should be alist. If it is not bound, - its value regard as nil." nil nil) - - ;;;*** - --;;;### (autoloads (apropos-documentation apropos-value apropos apropos-command) "apropos" "lisp/apropos.el") -- --(fset 'command-apropos 'apropos-command) -- --(autoload 'apropos-command "apropos" "\ --Shows commands (interactively callable functions) that match REGEXP. --With optional prefix ARG or if `apropos-do-all' is non-nil, also show --variables." t nil) -- --(autoload 'apropos "apropos" "\ --Show all bound symbols whose names match REGEXP. --With optional prefix ARG or if `apropos-do-all' is non-nil, also show unbound --symbols and key bindings, which is a little more time-consuming. --Returns list of symbols and documentation found." t nil) -- --(autoload 'apropos-value "apropos" "\ --Show all symbols whose value's printed image matches REGEXP. --With optional prefix ARG or if `apropos-do-all' is non-nil, also looks --at the function and at the names and values of properties. --Returns list of symbols and values found." t nil) -- --(autoload 'apropos-documentation "apropos" "\ --Show symbols whose documentation contain matches for REGEXP. --With optional prefix ARG or if `apropos-do-all' is non-nil, also use --documentation that is not stored in the documentation file and show key --bindings. --Returns list of symbols and documentation found." t nil) -- --;;;*** -- --;;;### (autoloads (batch-update-directory batch-update-autoloads update-autoloads-from-directory update-autoloads-here update-file-autoloads generate-file-autoloads) "autoload" "lisp/autoload.el") -- --(autoload 'generate-file-autoloads "autoload" "\ --Insert at point a loaddefs autoload section for FILE. --autoloads are generated for defuns and defmacros in FILE --marked by `generate-autoload-cookie' (which see). --If FILE is being visited in a buffer, the contents of the buffer --are used." t nil) -- --(autoload 'update-file-autoloads "autoload" "\ --Update the autoloads for FILE in `generated-autoload-file' --\(which FILE might bind in its local variables). --This functions refuses to update autoloads files." t nil) -- --(autoload 'update-autoloads-here "autoload" "\ --Update sections of the current buffer generated by `update-file-autoloads'." t nil) -- --(autoload 'update-autoloads-from-directory "autoload" "\ --Update `generated-autoload-file' with all the current autoloads from DIR. --This runs `update-file-autoloads' on each .el file in DIR. --Obsolete autoload entries for files that no longer exist are deleted." t nil) -- --(autoload 'batch-update-autoloads "autoload" "\ --Update the autoloads for the files or directories on the command line. --Runs `update-file-autoloads' on files and `update-directory-autoloads' --on directories. Must be used only with -batch, and kills Emacs on completion. --Each file will be processed even if an error occurred previously. --For example, invoke `xemacs -batch -f batch-update-autoloads *.el'. --The directory to which the auto-autoloads.el file must be the first parameter --on the command line." nil nil) -- --(autoload 'batch-update-directory "autoload" "\ --Update the autoloads for the directory on the command line. --Runs `update-file-autoloads' on each file in the given directory, must --be used only with -batch and kills XEmacs on completion." nil nil) -- --;;;*** -- --;;;### (autoloads nil "buff-menu" "lisp/buff-menu.el") -- --(defvar list-buffers-directory nil) -- --(make-variable-buffer-local 'list-buffers-directory) -- --;;;*** -- --;;;### (autoloads (batch-byte-recompile-directory batch-byte-recompile-directory-norecurse batch-byte-compile display-call-tree byte-compile-sexp byte-compile compile-defun byte-compile-buffer byte-compile-and-load-file byte-compile-file byte-recompile-file byte-recompile-directory byte-force-recompile) "bytecomp" "lisp/bytecomp.el") -- --(autoload 'byte-force-recompile "bytecomp" "\ --Recompile every `.el' file in DIRECTORY that already has a `.elc' file. --Files in subdirectories of DIRECTORY are processed also." t nil) -- --(autoload 'byte-recompile-directory "bytecomp" "\ --Recompile every `.el' file in DIRECTORY that needs recompilation. --This is if a `.elc' file exists but is older than the `.el' file. --Files in subdirectories of DIRECTORY are processed also unless argument --NORECURSION is non-nil. -- --If the `.elc' file does not exist, normally the `.el' file is *not* compiled. --But a prefix argument (optional second arg) means ask user, --for each such `.el' file, whether to compile it. Prefix argument 0 means --don't ask and compile the file anyway. -- --A nonzero prefix argument also means ask about each subdirectory. -- --If the fourth argument FORCE is non-nil, --recompile every `.el' file that already has a `.elc' file." t nil) -- --(autoload 'byte-recompile-file "bytecomp" "\ --Recompile a file of Lisp code named FILENAME if it needs recompilation. --This is if the `.elc' file exists but is older than the `.el' file. -- --If the `.elc' file does not exist, normally the `.el' file is *not* --compiled. But a prefix argument (optional second arg) means ask user --whether to compile it. Prefix argument 0 don't ask and recompile anyway." t nil) -- --(autoload 'byte-compile-file "bytecomp" "\ --Compile a file of Lisp code named FILENAME into a file of byte code. --The output file's name is made by appending `c' to the end of FILENAME. --With prefix arg (noninteractively: 2nd arg), load the file after compiling." t nil) -- --(autoload 'byte-compile-and-load-file "bytecomp" "\ --Compile a file of Lisp code named FILENAME into a file of byte code, --and then load it. The output file's name is made by appending \"c\" to --the end of FILENAME." t nil) -- --(autoload 'byte-compile-buffer "bytecomp" "\ --Byte-compile and evaluate contents of BUFFER (default: the current buffer)." t nil) -- --(autoload 'compile-defun "bytecomp" "\ --Compile and evaluate the current top-level form. --Print the result in the minibuffer. --With argument, insert value in current buffer after the form." t nil) -- --(autoload 'byte-compile "bytecomp" "\ --If FORM is a symbol, byte-compile its function definition. --If FORM is a lambda or a macro, byte-compile it as a function." nil nil) -- --(autoload 'byte-compile-sexp "bytecomp" "\ --Compile and return SEXP." nil nil) -- --(autoload 'display-call-tree "bytecomp" "\ --Display a call graph of a specified file. --This lists which functions have been called, what functions called --them, and what functions they call. The list includes all functions --whose definitions have been compiled in this Emacs session, as well as --all functions called by those functions. -- --The call graph does not include macros, inline functions, or --primitives that the byte-code interpreter knows about directly (eq, --cons, etc.). -- --The call tree also lists those functions which are not known to be called --\(that is, to which no calls have been compiled), and which cannot be --invoked interactively." t nil) -- --(autoload 'batch-byte-compile "bytecomp" "\ --Run `byte-compile-file' on the files remaining on the command line. --Use this from the command line, with `-batch'; --it won't work in an interactive Emacs. --Each file is processed even if an error occurred previously. --For example, invoke \"xemacs -batch -f batch-byte-compile $emacs/ ~/*.el\"" nil nil) -- --(autoload 'batch-byte-recompile-directory-norecurse "bytecomp" "\ --Same as `batch-byte-recompile-directory' but without recursion." nil nil) -- --(autoload 'batch-byte-recompile-directory "bytecomp" "\ --Runs `byte-recompile-directory' on the dirs remaining on the command line. --Must be used only with `-batch', and kills Emacs on completion. --For example, invoke `xemacs -batch -f batch-byte-recompile-directory .'." nil nil) -- --;;;*** -- - ;;;### (autoloads (compiler-macroexpand define-compiler-macro ignore-file-errors ignore-errors assert check-type typep deftype cl-struct-setf-expander defstruct define-modify-macro callf2 callf letf* letf rotatef shiftf remf cl-do-pop psetf setf get-setf-method defsetf define-setf-method declare the locally multiple-value-setq multiple-value-bind lexical-let* lexical-let symbol-macrolet macrolet labels flet progv psetq do-all-symbols do-symbols dotimes dolist do* do loop return-from return block etypecase typecase ecase case load-time-value eval-when destructuring-bind function* defmacro* defun* gentemp gensym cl-compile-time-init) "cl-macs" "lisp/cl-macs.el") - - (autoload 'cl-compile-time-init "cl-macs" nil nil nil) - - (autoload 'gensym "cl-macs" "\ - Generate a new uninterned symbol. - The name is made by appending a number to PREFIX, default \"G\"." nil nil) - - (autoload 'gentemp "cl-macs" "\ - Generate a new interned symbol with a unique name. - The name is made by appending a number to PREFIX, default \"G\"." nil nil) - - (autoload 'defun* "cl-macs" "\ - (defun* NAME ARGLIST [DOCSTRING] BODY...): define NAME as a function. - Like normal `defun', except ARGLIST allows full Common Lisp conventions, - and BODY is implicitly surrounded by (block NAME ...)." nil 'macro) - - (autoload 'defmacro* "cl-macs" "\ - (defmacro* NAME ARGLIST [DOCSTRING] BODY...): define NAME as a macro. - Like normal `defmacro', except ARGLIST allows full Common Lisp conventions, - and BODY is implicitly surrounded by (block NAME ...)." nil 'macro) - - (autoload 'function* "cl-macs" "\ - (function* SYMBOL-OR-LAMBDA): introduce a function. - Like normal `function', except that if argument is a lambda form, its - ARGLIST allows full Common Lisp conventions." nil 'macro) - - (autoload 'destructuring-bind "cl-macs" nil nil 'macro) - - (autoload 'eval-when "cl-macs" "\ - (eval-when (WHEN...) BODY...): control when BODY is evaluated. - If `compile' is in WHEN, BODY is evaluated when compiled at top-level. - If `load' is in WHEN, BODY is evaluated when loaded after top-level compile. - If `eval' is in WHEN, BODY is evaluated when interpreted or at non-top-level." nil 'macro) - - (autoload 'load-time-value "cl-macs" "\ - Like `progn', but evaluates the body at load time. - The result of the body appears to the compiler as a quoted constant." nil 'macro) - - (autoload 'case "cl-macs" "\ - (case EXPR CLAUSES...): evals EXPR, chooses from CLAUSES on that value. - Each clause looks like (KEYLIST BODY...). EXPR is evaluated and compared - against each key in each KEYLIST; the corresponding BODY is evaluated. - If no clause succeeds, case returns nil. A single atom may be used in - place of a KEYLIST of one atom. A KEYLIST of `t' or `otherwise' is - allowed only in the final clause, and matches if no other keys match. - Key values are compared by `eql'." nil 'macro) - - (autoload 'ecase "cl-macs" "\ - (ecase EXPR CLAUSES...): like `case', but error if no case fits. - `otherwise'-clauses are not allowed." nil 'macro) - - (autoload 'typecase "cl-macs" "\ - (typecase EXPR CLAUSES...): evals EXPR, chooses from CLAUSES on that value. - Each clause looks like (TYPE BODY...). EXPR is evaluated and, if it - satisfies TYPE, the corresponding BODY is evaluated. If no clause succeeds, - typecase returns nil. A TYPE of `t' or `otherwise' is allowed only in the - final clause, and matches if no other keys match." nil 'macro) - - (autoload 'etypecase "cl-macs" "\ - (etypecase EXPR CLAUSES...): like `typecase', but error if no case fits. - `otherwise'-clauses are not allowed." nil 'macro) - - (autoload 'block "cl-macs" "\ - (block NAME BODY...): define a lexically-scoped block named NAME. - NAME may be any symbol. Code inside the BODY forms can call `return-from' - to jump prematurely out of the block. This differs from `catch' and `throw' - in two respects: First, the NAME is an unevaluated symbol rather than a - quoted symbol or other form; and second, NAME is lexically rather than - dynamically scoped: Only references to it within BODY will work. These - references may appear inside macro expansions, but not inside functions - called from BODY." nil 'macro) - - (autoload 'return "cl-macs" "\ - (return [RESULT]): return from the block named nil. - This is equivalent to `(return-from nil RESULT)'." nil 'macro) - - (autoload 'return-from "cl-macs" "\ - (return-from NAME [RESULT]): return from the block named NAME. - This jumps out to the innermost enclosing `(block NAME ...)' form, - returning RESULT from that form (or nil if RESULT is omitted). - This is compatible with Common Lisp, but note that `defun' and - `defmacro' do not create implicit blocks as they do in Common Lisp." nil 'macro) - - (autoload 'loop "cl-macs" "\ - (loop CLAUSE...): The Common Lisp `loop' macro. - Valid clauses are: - for VAR from/upfrom/downfrom NUM to/upto/downto/above/below NUM by NUM, - for VAR in LIST by FUNC, for VAR on LIST by FUNC, for VAR = INIT then EXPR, - for VAR across ARRAY, repeat NUM, with VAR = INIT, while COND, until COND, - always COND, never COND, thereis COND, collect EXPR into VAR, - append EXPR into VAR, nconc EXPR into VAR, sum EXPR into VAR, - count EXPR into VAR, maximize EXPR into VAR, minimize EXPR into VAR, - if COND CLAUSE [and CLAUSE]... else CLAUSE [and CLAUSE...], - unless COND CLAUSE [and CLAUSE]... else CLAUSE [and CLAUSE...], - do EXPRS..., initially EXPRS..., finally EXPRS..., return EXPR, - finally return EXPR, named NAME." nil 'macro) - - (autoload 'do "cl-macs" "\ - The Common Lisp `do' loop. - Format is: (do ((VAR INIT [STEP])...) (END-TEST [RESULT...]) BODY...)" nil 'macro) - - (autoload 'do* "cl-macs" "\ - The Common Lisp `do*' loop. - Format is: (do* ((VAR INIT [STEP])...) (END-TEST [RESULT...]) BODY...)" nil 'macro) - - (autoload 'dolist "cl-macs" "\ - (dolist (VAR LIST [RESULT]) BODY...): loop over a list. - Evaluate BODY with VAR bound to each `car' from LIST, in turn. - Then evaluate RESULT to get return value, default nil." nil 'macro) - - (autoload 'dotimes "cl-macs" "\ - (dotimes (VAR COUNT [RESULT]) BODY...): loop a certain number of times. - Evaluate BODY with VAR bound to successive integers from 0, inclusive, - to COUNT, exclusive. Then evaluate RESULT to get return value, default - nil." nil 'macro) - - (autoload 'do-symbols "cl-macs" "\ - (dosymbols (VAR [OBARRAY [RESULT]]) BODY...): loop over all symbols. - Evaluate BODY with VAR bound to each interned symbol, or to each symbol - from OBARRAY." nil 'macro) - - (autoload 'do-all-symbols "cl-macs" nil nil 'macro) - - (autoload 'psetq "cl-macs" "\ - (psetq SYM VAL SYM VAL ...): set SYMs to the values VALs in parallel. - This is like `setq', except that all VAL forms are evaluated (in order) - before assigning any symbols SYM to the corresponding values." nil 'macro) - - (autoload 'progv "cl-macs" "\ - (progv SYMBOLS VALUES BODY...): bind SYMBOLS to VALUES dynamically in BODY. - The forms SYMBOLS and VALUES are evaluated, and must evaluate to lists. - Each SYMBOL in the first list is bound to the corresponding VALUE in the - second list (or made unbound if VALUES is shorter than SYMBOLS); then the - BODY forms are executed and their result is returned. This is much like - a `let' form, except that the list of symbols can be computed at run-time." nil 'macro) - - (autoload 'flet "cl-macs" "\ - (flet ((FUNC ARGLIST BODY...) ...) FORM...): make temporary function defns. - This is an analogue of `let' that operates on the function cell of FUNC - rather than its value cell. The FORMs are evaluated with the specified - function definitions in place, then the definitions are undone (the FUNCs - go back to their previous definitions, or lack thereof)." nil 'macro) - - (autoload 'labels "cl-macs" "\ - (labels ((FUNC ARGLIST BODY...) ...) FORM...): make temporary func bindings. - This is like `flet', except the bindings are lexical instead of dynamic. - Unlike `flet', this macro is fully compliant with the Common Lisp standard." nil 'macro) - - (autoload 'macrolet "cl-macs" "\ - (macrolet ((NAME ARGLIST BODY...) ...) FORM...): make temporary macro defns. - This is like `flet', but for macros instead of functions." nil 'macro) - - (autoload 'symbol-macrolet "cl-macs" "\ - (symbol-macrolet ((NAME EXPANSION) ...) FORM...): make symbol macro defns. - Within the body FORMs, references to the variable NAME will be replaced - by EXPANSION, and (setq NAME ...) will act like (setf EXPANSION ...)." nil 'macro) - - (autoload 'lexical-let "cl-macs" "\ - (lexical-let BINDINGS BODY...): like `let', but lexically scoped. - The main visible difference is that lambdas inside BODY will create - lexical closures as in Common Lisp." nil 'macro) - - (autoload 'lexical-let* "cl-macs" "\ - (lexical-let* BINDINGS BODY...): like `let*', but lexically scoped. - The main visible difference is that lambdas inside BODY will create - lexical closures as in Common Lisp." nil 'macro) - - (autoload 'multiple-value-bind "cl-macs" "\ - (multiple-value-bind (SYM SYM...) FORM BODY): collect multiple return values. - FORM must return a list; the BODY is then executed with the first N elements - of this list bound (`let'-style) to each of the symbols SYM in turn. This - is analogous to the Common Lisp `multiple-value-bind' macro, using lists to - simulate true multiple return values. For compatibility, (values A B C) is - a synonym for (list A B C)." nil 'macro) - - (autoload 'multiple-value-setq "cl-macs" "\ - (multiple-value-setq (SYM SYM...) FORM): collect multiple return values. - FORM must return a list; the first N elements of this list are stored in - each of the symbols SYM in turn. This is analogous to the Common Lisp - `multiple-value-setq' macro, using lists to simulate true multiple return - values. For compatibility, (values A B C) is a synonym for (list A B C)." nil 'macro) - - (autoload 'locally "cl-macs" nil nil 'macro) - - (autoload 'the "cl-macs" nil nil 'macro) - - (autoload 'declare "cl-macs" nil nil 'macro) - - (autoload 'define-setf-method "cl-macs" "\ - (define-setf-method NAME ARGLIST BODY...): define a `setf' method. - This method shows how to handle `setf's to places of the form (NAME ARGS...). - The argument forms ARGS are bound according to ARGLIST, as if NAME were - going to be expanded as a macro, then the BODY forms are executed and must - return a list of five elements: a temporary-variables list, a value-forms - list, a store-variables list (of length one), a store-form, and an access- - form. See `defsetf' for a simpler way to define most setf-methods." nil 'macro) - - (autoload 'defsetf "cl-macs" "\ - (defsetf NAME FUNC): define a `setf' method. - This macro is an easy-to-use substitute for `define-setf-method' that works - well for simple place forms. In the simple `defsetf' form, `setf's of - the form (setf (NAME ARGS...) VAL) are transformed to function or macro - calls of the form (FUNC ARGS... VAL). Example: (defsetf aref aset). - Alternate form: (defsetf NAME ARGLIST (STORE) BODY...). - Here, the above `setf' call is expanded by binding the argument forms ARGS - according to ARGLIST, binding the value form VAL to STORE, then executing - BODY, which must return a Lisp form that does the necessary `setf' operation. - Actually, ARGLIST and STORE may be bound to temporary variables which are - introduced automatically to preserve proper execution order of the arguments. - Example: (defsetf nth (n x) (v) (list 'setcar (list 'nthcdr n x) v))." nil 'macro) - - (autoload 'get-setf-method "cl-macs" "\ - Return a list of five values describing the setf-method for PLACE. - PLACE may be any Lisp form which can appear as the PLACE argument to - a macro like `setf' or `incf'." nil nil) - - (autoload 'setf "cl-macs" "\ - (setf PLACE VAL PLACE VAL ...): set each PLACE to the value of its VAL. - This is a generalized version of `setq'; the PLACEs may be symbolic - references such as (car x) or (aref x i), as well as plain symbols. - For example, (setf (cadar x) y) is equivalent to (setcar (cdar x) y). - The return value is the last VAL in the list." nil 'macro) - - (autoload 'psetf "cl-macs" "\ - (psetf PLACE VAL PLACE VAL ...): set PLACEs to the values VALs in parallel. - This is like `setf', except that all VAL forms are evaluated (in order) - before assigning any PLACEs to the corresponding values." nil 'macro) - - (autoload 'cl-do-pop "cl-macs" nil nil nil) - - (autoload 'remf "cl-macs" "\ - (remf PLACE TAG): remove TAG from property list PLACE. - PLACE may be a symbol, or any generalized variable allowed by `setf'. - The form returns true if TAG was found and removed, nil otherwise." nil 'macro) - - (autoload 'shiftf "cl-macs" "\ - (shiftf PLACE PLACE... VAL): shift left among PLACEs. - Example: (shiftf A B C) sets A to B, B to C, and returns the old A. - Each PLACE may be a symbol, or any generalized variable allowed by `setf'." nil 'macro) - - (autoload 'rotatef "cl-macs" "\ - (rotatef PLACE...): rotate left among PLACEs. - Example: (rotatef A B C) sets A to B, B to C, and C to A. It returns nil. - Each PLACE may be a symbol, or any generalized variable allowed by `setf'." nil 'macro) - - (autoload 'letf "cl-macs" "\ - (letf ((PLACE VALUE) ...) BODY...): temporarily bind to PLACEs. - This is the analogue of `let', but with generalized variables (in the - sense of `setf') for the PLACEs. Each PLACE is set to the corresponding - VALUE, then the BODY forms are executed. On exit, either normally or - because of a `throw' or error, the PLACEs are set back to their original - values. Note that this macro is *not* available in Common Lisp. - As a special case, if `(PLACE)' is used instead of `(PLACE VALUE)', - the PLACE is not modified before executing BODY." nil 'macro) - - (autoload 'letf* "cl-macs" "\ - (letf* ((PLACE VALUE) ...) BODY...): temporarily bind to PLACEs. - This is the analogue of `let*', but with generalized variables (in the - sense of `setf') for the PLACEs. Each PLACE is set to the corresponding - VALUE, then the BODY forms are executed. On exit, either normally or - because of a `throw' or error, the PLACEs are set back to their original - values. Note that this macro is *not* available in Common Lisp. - As a special case, if `(PLACE)' is used instead of `(PLACE VALUE)', - the PLACE is not modified before executing BODY." nil 'macro) - - (autoload 'callf "cl-macs" "\ - (callf FUNC PLACE ARGS...): set PLACE to (FUNC PLACE ARGS...). - FUNC should be an unquoted function name. PLACE may be a symbol, - or any generalized variable allowed by `setf'." nil 'macro) - - (autoload 'callf2 "cl-macs" "\ - (callf2 FUNC ARG1 PLACE ARGS...): set PLACE to (FUNC ARG1 PLACE ARGS...). - Like `callf', but PLACE is the second argument of FUNC, not the first." nil 'macro) - - (autoload 'define-modify-macro "cl-macs" "\ - (define-modify-macro NAME ARGLIST FUNC): define a `setf'-like modify macro. - If NAME is called, it combines its PLACE argument with the other arguments - from ARGLIST using FUNC: (define-modify-macro incf (&optional (n 1)) +)" nil 'macro) - - (autoload 'defstruct "cl-macs" "\ - (defstruct (NAME OPTIONS...) (SLOT SLOT-OPTS...)...): define a struct type. - This macro defines a new Lisp data type called NAME, which contains data - stored in SLOTs. This defines a `make-NAME' constructor, a `copy-NAME' - copier, a `NAME-p' predicate, and setf-able `NAME-SLOT' accessors." nil 'macro) - - (autoload 'cl-struct-setf-expander "cl-macs" nil nil nil) - - (autoload 'deftype "cl-macs" "\ - (deftype NAME ARGLIST BODY...): define NAME as a new data type. - The type name can then be used in `typecase', `check-type', etc." nil 'macro) - - (autoload 'typep "cl-macs" "\ - Check that OBJECT is of type TYPE. - TYPE is a Common Lisp-style type specifier." nil nil) - - (autoload 'check-type "cl-macs" "\ - Verify that FORM is of type TYPE; signal an error if not. - STRING is an optional description of the desired type." nil 'macro) - - (autoload 'assert "cl-macs" "\ - Verify that FORM returns non-nil; signal an error if not. - Second arg SHOW-ARGS means to include arguments of FORM in message. - Other args STRING and ARGS... are arguments to be passed to `error'. - They are not evaluated unless the assertion fails. If STRING is - omitted, a default message listing FORM itself is used." nil 'macro) - - (autoload 'ignore-errors "cl-macs" "\ - Execute FORMS; if an error occurs, return nil. - Otherwise, return result of last FORM." nil 'macro) - - (autoload 'ignore-file-errors "cl-macs" "\ - Execute FORMS; if an error of type `file-error' occurs, return nil. - Otherwise, return result of last FORM." nil 'macro) - - (autoload 'define-compiler-macro "cl-macs" "\ - (define-compiler-macro FUNC ARGLIST BODY...): Define a compiler-only macro. - This is like `defmacro', but macro expansion occurs only if the call to - FUNC is compiled (i.e., not interpreted). Compiler macros should be used - for optimizing the way calls to FUNC are compiled; the form returned by - BODY should do the same thing as a call to the normal function called - FUNC, though possibly more efficiently. Note that, like regular macros, - compiler macros are expanded repeatedly until no further expansions are - possible. Unlike regular macros, BODY can decide to \"punt\" and leave the - original function call alone by declaring an initial `&whole foo' parameter - and then returning foo." nil 'macro) - - (autoload 'compiler-macroexpand "cl-macs" nil nil nil) - - ;;;*** - - ;;;### (autoloads (batch-remove-old-elc) "cleantree" "lisp/cleantree.el") - - (autoload 'batch-remove-old-elc "cleantree" nil nil nil) - - ;;;*** - - ;;;### (autoloads (config-value config-value-hash-table) "config" "lisp/config.el") - - (autoload 'config-value-hash-table "config" "\ - Return hash table of configuration parameters and their values." nil nil) - - (autoload 'config-value "config" "\ - Return the value of the configuration parameter CONFIG_SYMBOL." nil nil) - - ;;;*** - - ;;;### (autoloads (Custom-make-dependencies) "cus-dep" "lisp/cus-dep.el") - - (autoload 'Custom-make-dependencies "cus-dep" "\ - Extract custom dependencies from .el files in SUBDIRS. - SUBDIRS is a list of directories. If it is nil, the command-line - arguments are used. If it is a string, only that directory is - processed. This function is especially useful in batch mode. - - Batch usage: xemacs -batch -l cus-dep.el -f Custom-make-dependencies DIRS" t nil) - - ;;;*** - - ;;;### (autoloads (customize-menu-create custom-menu-create custom-save-all customize-save-customized customize-browse custom-buffer-create-other-window custom-buffer-create customize-apropos-groups customize-apropos-faces customize-apropos-options customize-apropos customize-saved customize-customized customize-face-other-window customize-face customize-option-other-window customize-changed-options customize-variable customize-other-window customize customize-save-variable customize-set-variable customize-set-value) "cus-edit" "lisp/cus-edit.el") - - (autoload 'customize-set-value "cus-edit" "\ - Set VARIABLE to VALUE. VALUE is a Lisp object. - - If VARIABLE has a `variable-interactive' property, that is used as if - it were the arg to `interactive' (which see) to interactively read the value. - - If VARIABLE has a `custom-type' property, it must be a widget and the - `:prompt-value' property of that widget will be used for reading the value." t nil) - - (autoload 'customize-set-variable "cus-edit" "\ - Set the default for VARIABLE to VALUE. VALUE is a Lisp object. - - If VARIABLE has a `custom-set' property, that is used for setting - VARIABLE, otherwise `set-default' is used. - - The `customized-value' property of the VARIABLE will be set to a list - with a quoted VALUE as its sole list member. - - If VARIABLE has a `variable-interactive' property, that is used as if - it were the arg to `interactive' (which see) to interactively read the value. - - If VARIABLE has a `custom-type' property, it must be a widget and the - `:prompt-value' property of that widget will be used for reading the value. " t nil) - - (autoload 'customize-save-variable "cus-edit" "\ - Set the default for VARIABLE to VALUE, and save it for future sessions. - If VARIABLE has a `custom-set' property, that is used for setting - VARIABLE, otherwise `set-default' is used. - - The `customized-value' property of the VARIABLE will be set to a list - with a quoted VALUE as its sole list member. - - If VARIABLE has a `variable-interactive' property, that is used as if - it were the arg to `interactive' (which see) to interactively read the value. - - If VARIABLE has a `custom-type' property, it must be a widget and the - `:prompt-value' property of that widget will be used for reading the value. " t nil) - - (autoload 'customize "cus-edit" "\ - Select a customization buffer which you can use to set user options. - User options are structured into \"groups\". - The default group is `Emacs'." t nil) - - (defalias 'customize-group 'customize) - - (autoload 'customize-other-window "cus-edit" "\ - Customize SYMBOL, which must be a customization group." t nil) - - (defalias 'customize-group-other-window 'customize-other-window) - - (defalias 'customize-option 'customize-variable) - - (autoload 'customize-variable "cus-edit" "\ - Customize SYMBOL, which must be a user option variable." t nil) - - (autoload 'customize-changed-options "cus-edit" "\ - Customize all user option variables whose default values changed recently. - This means, in other words, variables defined with a `:version' keyword." t nil) - - (defalias 'customize-variable-other-window 'customize-option-other-window) - - (autoload 'customize-option-other-window "cus-edit" "\ - Customize SYMBOL, which must be a user option variable. - Show the buffer in another window, but don't select it." t nil) - - (autoload 'customize-face "cus-edit" "\ - Customize SYMBOL, which should be a face name or nil. - If SYMBOL is nil, customize all faces." t nil) - - (autoload 'customize-face-other-window "cus-edit" "\ - Show customization buffer for FACE in other window." t nil) - - (autoload 'customize-customized "cus-edit" "\ - Customize all user options set since the last save in this session." t nil) - - (autoload 'customize-saved "cus-edit" "\ - Customize all already saved user options." t nil) - - (autoload 'customize-apropos "cus-edit" "\ - Customize all user options matching REGEXP. - If ALL is `options', include only options. - If ALL is `faces', include only faces. - If ALL is `groups', include only groups. - If ALL is t (interactively, with prefix arg), include options which are not - user-settable, as well as faces and groups." t nil) - - (autoload 'customize-apropos-options "cus-edit" "\ - Customize all user options matching REGEXP. - With prefix arg, include options which are not user-settable." t nil) - - (autoload 'customize-apropos-faces "cus-edit" "\ - Customize all user faces matching REGEXP." t nil) - - (autoload 'customize-apropos-groups "cus-edit" "\ - Customize all user groups matching REGEXP." t nil) - - (autoload 'custom-buffer-create "cus-edit" "\ - Create a buffer containing OPTIONS. - Optional NAME is the name of the buffer. - OPTIONS should be an alist of the form ((SYMBOL WIDGET)...), where - SYMBOL is a customization option, and WIDGET is a widget for editing - that option." nil nil) - - (autoload 'custom-buffer-create-other-window "cus-edit" "\ - Create a buffer containing OPTIONS. - Optional NAME is the name of the buffer. - OPTIONS should be an alist of the form ((SYMBOL WIDGET)...), where - SYMBOL is a customization option, and WIDGET is a widget for editing - that option." nil nil) - - (autoload 'customize-browse "cus-edit" "\ - Create a tree browser for the customize hierarchy." t nil) - - (defcustom custom-file "~/.emacs" "File used for storing customization information.\nIf you change this from the default \"~/.emacs\" you need to\nexplicitly load that file for the settings to take effect." :type 'file :group 'customize) - - (autoload 'customize-save-customized "cus-edit" "\ - Save all user options which have been set in this session." t nil) - - (autoload 'custom-save-all "cus-edit" "\ - Save all customizations in `custom-file'." nil nil) - - (autoload 'custom-menu-create "cus-edit" "\ - Create menu for customization group SYMBOL. - The menu is in a format applicable to `easy-menu-define'." nil nil) - - (autoload 'customize-menu-create "cus-edit" "\ - Return a customize menu for customization group SYMBOL. - If optional NAME is given, use that as the name of the menu. - Otherwise the menu will be named `Customize'. - The format is suitable for use with `easy-menu-define'." nil nil) - - ;;;*** - - ;;;### (autoloads (custom-set-faces custom-set-face-update-spec custom-declare-face) "cus-face" "lisp/cus-face.el") - - (autoload 'custom-declare-face "cus-face" "\ - Like `defface', but FACE is evaluated as a normal argument." nil nil) - - (autoload 'custom-set-face-update-spec "cus-face" "\ - Customize the FACE for display types matching DISPLAY, merging - in the new items from PLIST" nil nil) - - (autoload 'custom-set-faces "cus-face" "\ - Initialize faces according to user preferences. - The arguments should be a list where each entry has the form: - - (FACE SPEC [NOW]) - - SPEC will be stored as the saved value for FACE. If NOW is present - and non-nil, FACE will also be created according to SPEC. - - See `defface' for the format of SPEC." nil nil) - - ;;;*** - - ;;;### (autoloads (disassemble) "disass" "lisp/disass.el") - - (autoload 'disassemble "disass" "\ - Print disassembled code for OBJECT in (optional) BUFFER. - OBJECT can be a symbol defined as a function, or a function itself - \(a lambda expression or a compiled-function object). - If OBJECT is not already compiled, we compile it, but do not - redefine OBJECT if it is a symbol." t nil) - - ;;;*** - - ;;;### (autoloads (standard-display-european standard-display-underline standard-display-graphic standard-display-g1 standard-display-ascii standard-display-default standard-display-8bit make-display-table describe-current-display-table) "disp-table" "lisp/disp-table.el") - - (autoload 'describe-current-display-table "disp-table" "\ - Describe the display table in use in the selected window and buffer." t nil) - - (autoload 'make-display-table "disp-table" "\ - Return a new, empty display table." nil nil) - - (autoload 'standard-display-8bit "disp-table" "\ - Display characters in the range L to H literally." nil nil) - - (autoload 'standard-display-default "disp-table" "\ - Display characters in the range L to H using the default notation." nil nil) - - (autoload 'standard-display-ascii "disp-table" "\ - Display character C using printable string S." nil nil) - - (autoload 'standard-display-g1 "disp-table" "\ - Display character C as character SC in the g1 character set. - This function assumes that your terminal uses the SO/SI characters; - it is meaningless for an X frame." nil nil) - - (autoload 'standard-display-graphic "disp-table" "\ - Display character C as character GC in graphics character set. - This function assumes VT100-compatible escapes; it is meaningless for an - X frame." nil nil) - - (autoload 'standard-display-underline "disp-table" "\ - Display character C as character UC plus underlining." nil nil) - - (autoload 'standard-display-european "disp-table" "\ - Toggle display of European characters encoded with ISO 8859. - When enabled, characters in the range of 160 to 255 display not - as octal escapes, but as accented characters. - With prefix argument, enable European character display iff arg is positive." t nil) - - ;;;*** - - ;;;### (autoloads nil "easymenu" "lisp/easymenu.el") - - ;;;*** - - ;;;### (autoloads (pop-tag-mark tags-apropos list-tags tags-query-replace tags-search tags-loop-continue next-file tag-complete-symbol find-tag-other-window find-tag visit-tags-table) "etags" "lisp/etags.el") - - (autoload 'visit-tags-table "etags" "\ - Tell tags commands to use tags table file FILE when all else fails. - FILE should be the name of a file created with the `etags' program. - A directory name is ok too; it means file TAGS in that directory." t nil) - - (autoload 'find-tag "etags" "\ - *Find tag whose name contains TAGNAME. - Selects the buffer that the tag is contained in - and puts point at its definition. - If TAGNAME is a null string, the expression in the buffer - around or before point is used as the tag name. - If called interactively with a numeric argument, searches for the next tag - in the tag table that matches the tagname used in the previous find-tag. - If second arg OTHER-WINDOW is non-nil, uses another window to display - the tag. - - This version of this function supports multiple active tags tables, - and completion. - - Variables of note: - - tag-table-alist controls which tables apply to which buffers - tags-file-name a default tags table - tags-build-completion-table controls completion behavior - buffer-tag-table another way of specifying a buffer-local table - make-tags-files-invisible whether tags tables should be very hidden - tag-mark-stack-max how many tags-based hops to remember" t nil) - - (autoload 'find-tag-other-window "etags" "\ - *Find tag whose name contains TAGNAME. - Selects the buffer that the tag is contained in in another window - and puts point at its definition. - If TAGNAME is a null string, the expression in the buffer - around or before point is used as the tag name. - If second arg NEXT is non-nil (interactively, with prefix arg), - searches for the next tag in the tag table - that matches the tagname used in the previous find-tag. - - This version of this function supports multiple active tags tables, - and completion. - - Variables of note: - - tag-table-alist controls which tables apply to which buffers - tags-file-name a default tags table - tags-build-completion-table controls completion behavior - buffer-tag-table another way of specifying a buffer-local table - make-tags-files-invisible whether tags tables should be very hidden - tag-mark-stack-max how many tags-based hops to remember" t nil) - - (autoload 'tag-complete-symbol "etags" "\ - The function used to do tags-completion (using 'tag-completion-predicate)." t nil) - - (autoload 'next-file "etags" "\ - Select next file among files in current tag table(s). - - A first argument of t (prefix arg, if interactive) initializes to the - beginning of the list of files in the (first) tags table. If the argument - is neither nil nor t, it is evalled to initialize the list of files. - - Non-nil second argument NOVISIT means use a temporary buffer - to save time and avoid uninteresting warnings. - - Value is nil if the file was already visited; - if the file was newly read in, the value is the filename." t nil) - - (autoload 'tags-loop-continue "etags" "\ - Continue last \\[tags-search] or \\[tags-query-replace] command. - Used noninteractively with non-nil argument to begin such a command (the - argument is passed to `next-file', which see). - Two variables control the processing we do on each file: - the value of `tags-loop-scan' is a form to be executed on each file - to see if it is interesting (it returns non-nil if so) - and `tags-loop-operate' is a form to execute to operate on an interesting file - If the latter returns non-nil, we exit; otherwise we scan the next file." t nil) - - (autoload 'tags-search "etags" "\ - Search through all files listed in tags table for match for REGEXP. - Stops when a match is found. - To continue searching for next match, use command \\[tags-loop-continue]. - - See documentation of variable `tag-table-alist'." t nil) - - (autoload 'tags-query-replace "etags" "\ - Query-replace-regexp FROM with TO through all files listed in tags table. - Third arg DELIMITED (prefix arg) means replace only word-delimited matches. - If you exit (\\[keyboard-quit] or ESC), you can resume the query-replace - with the command \\[tags-loop-continue]. - - See documentation of variable `tag-table-alist'." t nil) - - (autoload 'list-tags "etags" "\ - Display list of tags in FILE." t nil) - - (autoload 'tags-apropos "etags" "\ - Display list of all tags in tag table REGEXP matches." t nil) - (define-key esc-map "*" 'pop-tag-mark) - - (autoload 'pop-tag-mark "etags" "\ - Go to last tag position. - `find-tag' maintains a mark-stack seperate from the \\[set-mark-command] mark-stack. - This function pops (and moves to) the tag at the top of this stack." t nil) - - ;;;*** - - ;;;### (autoloads (finder-by-keyword) "finder" "lisp/finder.el") - - (autoload 'finder-by-keyword "finder" "\ - Find packages matching a given keyword." t nil) - - ;;;*** - - ;;;### (autoloads (font-lock-set-defaults-1 font-lock-fontify-buffer turn-off-font-lock turn-on-font-lock font-lock-mode) "font-lock" "lisp/font-lock.el") - - (defcustom font-lock-auto-fontify t "*Whether font-lock should automatically fontify files as they're loaded.\nThis will only happen if font-lock has fontifying keywords for the major\nmode of the file. You can get finer-grained control over auto-fontification\nby using this variable in combination with `font-lock-mode-enable-list' or\n`font-lock-mode-disable-list'." :type 'boolean :group 'font-lock) - - (defcustom font-lock-mode-enable-list nil "*List of modes to auto-fontify, if `font-lock-auto-fontify' is nil." :type '(repeat (symbol :tag "Mode")) :group 'font-lock) - - (defcustom font-lock-mode-disable-list nil "*List of modes not to auto-fontify, if `font-lock-auto-fontify' is t." :type '(repeat (symbol :tag "Mode")) :group 'font-lock) - - (defcustom font-lock-use-colors '(color) "*Specification for when Font Lock will set up color defaults.\nNormally this should be '(color), meaning that Font Lock will set up\ncolor defaults that are only used on color displays. Set this to nil\nif you don't want Font Lock to set up color defaults at all. This\nshould be one of\n\n-- a list of valid tags, meaning that the color defaults will be used\n when all of the tags apply. (e.g. '(color x))\n-- a list whose first element is 'or and whose remaining elements are\n lists of valid tags, meaning that the defaults will be used when\n any of the tag lists apply.\n-- nil, meaning that the defaults should not be set up at all.\n\n(If you specify face values in your init file, they will override any\nthat Font Lock specifies, regardless of whether you specify the face\nvalues before or after loading Font Lock.)\n\nSee also `font-lock-use-fonts'. If you want more control over the faces\nused for fontification, see the documentation of `font-lock-mode' for\nhow to do it." :type 'sexp :group 'font-lock) - - (defcustom font-lock-use-fonts '(or (mono) (grayscale)) "*Specification for when Font Lock will set up non-color defaults.\n\nNormally this should be '(or (mono) (grayscale)), meaning that Font\nLock will set up non-color defaults that are only used on either mono\nor grayscale displays. Set this to nil if you don't want Font Lock to\nset up non-color defaults at all. This should be one of\n\n-- a list of valid tags, meaning that the non-color defaults will be used\n when all of the tags apply. (e.g. '(grayscale x))\n-- a list whose first element is 'or and whose remaining elements are\n lists of valid tags, meaning that the defaults will be used when\n any of the tag lists apply.\n-- nil, meaning that the defaults should not be set up at all.\n\n(If you specify face values in your init file, they will override any\nthat Font Lock specifies, regardless of whether you specify the face\nvalues before or after loading Font Lock.)\n\nSee also `font-lock-use-colors'. If you want more control over the faces\nused for fontification, see the documentation of `font-lock-mode' for\nhow to do it." :type 'sexp :group 'font-lock) - - (defcustom font-lock-maximum-decoration t "*If non-nil, the maximum decoration level for fontifying.\nIf nil, use the minimum decoration (equivalent to level 0).\nIf t, use the maximum decoration available.\nIf a number, use that level of decoration (or if not available the maximum).\nIf a list, each element should be a cons pair of the form (MAJOR-MODE . LEVEL),\nwhere MAJOR-MODE is a symbol or t (meaning the default). For example:\n ((c++-mode . 2) (c-mode . t) (t . 1))\nmeans use level 2 decoration for buffers in `c++-mode', the maximum decoration\navailable for buffers in `c-mode', and level 1 decoration otherwise." :type '(choice (const :tag "default" nil) (const :tag "maximum" t) (integer :tag "level" 1) (repeat :menu-tag "mode specific" :tag "mode specific" :value ((t . t)) (cons :tag "Instance" (radio :tag "Mode" (const :tag "all" t) (symbol :tag "name")) (radio :tag "Decoration" (const :tag "default" nil) (const :tag "maximum" t) (integer :tag "level" 1))))) :group 'font-lock) - - (define-obsolete-variable-alias 'font-lock-use-maximal-decoration 'font-lock-maximum-decoration) - - (defcustom font-lock-maximum-size (* 250 1024) "*If non-nil, the maximum size for buffers for fontifying.\nOnly buffers less than this can be fontified when Font Lock mode is turned on.\nIf nil, means size is irrelevant.\nIf a list, each element should be a cons pair of the form (MAJOR-MODE . SIZE),\nwhere MAJOR-MODE is a symbol or t (meaning the default). For example:\n ((c++-mode . 256000) (c-mode . 256000) (rmail-mode . 1048576))\nmeans that the maximum size is 250K for buffers in `c++-mode' or `c-mode', one\nmegabyte for buffers in `rmail-mode', and size is irrelevant otherwise." :type '(choice (const :tag "none" nil) (integer :tag "size") (repeat :menu-tag "mode specific" :tag "mode specific" :value ((t)) (cons :tag "Instance" (radio :tag "Mode" (const :tag "all" t) (symbol :tag "name")) (radio :tag "Size" (const :tag "none" nil) (integer :tag "size"))))) :group 'font-lock) - - (defvar font-lock-keywords nil "\ - A list of the keywords to highlight. - Each element should be of the form: - - MATCHER - (MATCHER . MATCH) - (MATCHER . FACENAME) - (MATCHER . HIGHLIGHT) - (MATCHER HIGHLIGHT ...) - (eval . FORM) - - where HIGHLIGHT should be either MATCH-HIGHLIGHT or MATCH-ANCHORED. - - FORM is an expression, whose value should be a keyword element, - evaluated when the keyword is (first) used in a buffer. This feature - can be used to provide a keyword that can only be generated when Font - Lock mode is actually turned on. - - For highlighting single items, typically only MATCH-HIGHLIGHT is required. - However, if an item or (typically) items is to be highlighted following the - instance of another item (the anchor) then MATCH-ANCHORED may be required. - - MATCH-HIGHLIGHT should be of the form: - - (MATCH FACENAME OVERRIDE LAXMATCH) - - Where MATCHER can be either the regexp to search for, a variable - containing the regexp to search for, or the function to call to make - the search (called with one argument, the limit of the search). MATCH - is the subexpression of MATCHER to be highlighted. FACENAME is either - a symbol naming a face, or an expression whose value is the face name - to use. If you want FACENAME to be a symbol that evaluates to a face, - use a form like \"(progn sym)\". - - OVERRIDE and LAXMATCH are flags. If OVERRIDE is t, existing fontification may - be overwritten. If `keep', only parts not already fontified are highlighted. - If `prepend' or `append', existing fontification is merged with the new, in - which the new or existing fontification, respectively, takes precedence. - If LAXMATCH is non-nil, no error is signalled if there is no MATCH in MATCHER. - - For example, an element of the form highlights (if not already highlighted): - - \"\\\\\\=\" Discrete occurrences of \"foo\" in the value of the - variable `font-lock-keyword-face'. - (\"fu\\\\(bar\\\\)\" . 1) Substring \"bar\" within all occurrences of \"fubar\" in - the value of `font-lock-keyword-face'. - (\"fubar\" . fubar-face) Occurrences of \"fubar\" in the value of `fubar-face'. - (\"foo\\\\|bar\" 0 foo-bar-face t) - Occurrences of either \"foo\" or \"bar\" in the value - of `foo-bar-face', even if already highlighted. - - MATCH-ANCHORED should be of the form: - - (MATCHER PRE-MATCH-FORM POST-MATCH-FORM MATCH-HIGHLIGHT ...) - - Where MATCHER is as for MATCH-HIGHLIGHT with one exception; see below. - PRE-MATCH-FORM and POST-MATCH-FORM are evaluated before the first, and after - the last, instance MATCH-ANCHORED's MATCHER is used. Therefore they can be - used to initialize before, and cleanup after, MATCHER is used. Typically, - PRE-MATCH-FORM is used to move to some position relative to the original - MATCHER, before starting with MATCH-ANCHORED's MATCHER. POST-MATCH-FORM might - be used to move, before resuming with MATCH-ANCHORED's parent's MATCHER. - - For example, an element of the form highlights (if not already highlighted): - - (\"\\\\\\=\" (0 anchor-face) (\"\\\\\\=\" nil nil (0 item-face))) - - Discrete occurrences of \"anchor\" in the value of `anchor-face', and subsequent - discrete occurrences of \"item\" (on the same line) in the value of `item-face'. - (Here PRE-MATCH-FORM and POST-MATCH-FORM are nil. Therefore \"item\" is - initially searched for starting from the end of the match of \"anchor\", and - searching for subsequent instance of \"anchor\" resumes from where searching - for \"item\" concluded.) - - The above-mentioned exception is as follows. The limit of the MATCHER search - defaults to the end of the line after PRE-MATCH-FORM is evaluated. - However, if PRE-MATCH-FORM returns a position greater than the position after - PRE-MATCH-FORM is evaluated, that position is used as the limit of the search. - It is generally a bad idea to return a position greater than the end of the - line, i.e., cause the MATCHER search to span lines. - - Note that the MATCH-ANCHORED feature is experimental; in the future, we may - replace it with other ways of providing this functionality. - - These regular expressions should not match text which spans lines. While - \\[font-lock-fontify-buffer] handles multi-line patterns correctly, updating - when you edit the buffer does not, since it considers text one line at a time. - - Be very careful composing regexps for this list; - the wrong pattern can dramatically slow things down!") - - (make-variable-buffer-local 'font-lock-keywords) - - (defcustom font-lock-mode nil "Non nil means `font-lock-mode' is on" :group 'font-lock :type 'boolean :initialize 'custom-initialize-default :require 'font-lock :set (function (lambda (var val) (font-lock-mode (or val 0))))) - - (defvar font-lock-mode-hook nil "\ - Function or functions to run on entry to font-lock-mode.") - - (autoload 'font-lock-mode "font-lock" "\ - Toggle Font Lock Mode. - With arg, turn font-lock mode on if and only if arg is positive. - - When Font Lock mode is enabled, text is fontified as you type it: - - - Comments are displayed in `font-lock-comment-face'; - - Strings are displayed in `font-lock-string-face'; - - Documentation strings (in Lisp-like languages) are displayed in - `font-lock-doc-string-face'; - - Language keywords (\"reserved words\") are displayed in - `font-lock-keyword-face'; - - Function names in their defining form are displayed in - `font-lock-function-name-face'; - - Variable names in their defining form are displayed in - `font-lock-variable-name-face'; - - Type names are displayed in `font-lock-type-face'; - - References appearing in help files and the like are displayed - in `font-lock-reference-face'; - - Preprocessor declarations are displayed in - `font-lock-preprocessor-face'; - - and - - - Certain other expressions are displayed in other faces according - to the value of the variable `font-lock-keywords'. - - Where modes support different levels of fontification, you can use the variable - `font-lock-maximum-decoration' to specify which level you generally prefer. - When you turn Font Lock mode on/off the buffer is fontified/defontified, though - fontification occurs only if the buffer is less than `font-lock-maximum-size'. - To fontify a buffer without turning on Font Lock mode, and regardless of buffer - size, you can use \\[font-lock-fontify-buffer]. - - See the variable `font-lock-keywords' for customization." t nil) - - (autoload 'turn-on-font-lock "font-lock" "\ - Unconditionally turn on Font Lock mode." nil nil) - - (autoload 'turn-off-font-lock "font-lock" "\ - Unconditionally turn off Font Lock mode." nil nil) - - (autoload 'font-lock-fontify-buffer "font-lock" "\ - Fontify the current buffer the way `font-lock-mode' would. - See `font-lock-mode' for details. - - This can take a while for large buffers." t nil) - - (autoload 'font-lock-set-defaults-1 "font-lock" nil nil nil) - - (add-minor-mode 'font-lock-mode " Font") - - ;;;*** - - ;;;### (autoloads (x-font-build-cache font-default-size-for-device font-default-encoding-for-device font-default-registry-for-device font-default-family-for-device font-default-object-for-device font-default-font-for-device font-create-object) "font" "lisp/font.el") - - (autoload 'font-create-object "font" nil nil nil) - - (autoload 'font-default-font-for-device "font" nil nil nil) - - (autoload 'font-default-object-for-device "font" nil nil nil) - - (autoload 'font-default-family-for-device "font" nil nil nil) - - (autoload 'font-default-registry-for-device "font" nil nil nil) - - (autoload 'font-default-encoding-for-device "font" nil nil nil) - - (autoload 'font-default-size-for-device "font" nil nil nil) - - (autoload 'x-font-build-cache "font" nil nil nil) - - ;;;*** - - ;;;### (autoloads (gnuserv-start gnuserv-running-p) "gnuserv" "lisp/gnuserv.el") - - (defcustom gnuserv-frame nil "*The frame to be used to display all edited files.\nIf nil, then a new frame is created for each file edited.\nIf t, then the currently selected frame will be used.\nIf a function, then this will be called with a symbol `x' or `tty' as the\nonly argument, and its return value will be interpreted as above." :tag "Gnuserv Frame" :type '(radio (const :tag "Create new frame each time" nil) (const :tag "Use selected frame" t) (function-item :tag "Use main Emacs frame" gnuserv-main-frame-function) (function-item :tag "Use visible frame, otherwise create new" gnuserv-visible-frame-function) (function-item :tag "Create special Gnuserv frame and use it" gnuserv-special-frame-function) (function :tag "Other")) :group 'gnuserv :group 'frames) - - (autoload 'gnuserv-running-p "gnuserv" "\ - Return non-nil if a gnuserv process is running from this XEmacs session." nil nil) - - (autoload 'gnuserv-start "gnuserv" "\ - Allow this Emacs process to be a server for client processes. - This starts a gnuserv communications subprocess through which - client \"editors\" (gnuclient and gnudoit) can send editing commands to - this Emacs job. See the gnuserv(1) manual page for more details. - - Prefix arg means just kill any existing server communications subprocess." t nil) - - ;;;*** - - ;;;### (autoloads nil "help-macro" "lisp/help-macro.el") - - (defcustom three-step-help t "*Non-nil means give more info about Help command in three steps.\nThe three steps are simple prompt, prompt with all options,\nand window listing and describing the options.\nA value of nil means skip the middle step, so that\n\\[help-command] \\[help-command] gives the window that lists the options." :type 'boolean :group 'help-appearance) - - ;;;*** - - ;;;### (autoloads (hyper-apropos-popup-menu hyper-apropos-set-variable hyper-set-variable hyper-apropos-read-variable-symbol hyper-describe-function hyper-where-is hyper-describe-variable hyper-describe-face hyper-describe-key-briefly hyper-describe-key hyper-apropos) "hyper-apropos" "lisp/hyper-apropos.el") - - (autoload 'hyper-apropos "hyper-apropos" "\ - Display lists of functions and variables matching REGEXP - in buffer \"*Hyper Apropos*\". If optional prefix arg is given, then the - value of `hyper-apropos-programming-apropos' is toggled for this search. - See also `hyper-apropos-mode'." t nil) - - (autoload 'hyper-describe-key "hyper-apropos" nil t nil) - - (autoload 'hyper-describe-key-briefly "hyper-apropos" nil t nil) - - (autoload 'hyper-describe-face "hyper-apropos" "\ - Describe face.. - See also `hyper-apropos' and `hyper-describe-function'." t nil) - - (autoload 'hyper-describe-variable "hyper-apropos" "\ - Hypertext drop-in replacement for `describe-variable'. - See also `hyper-apropos' and `hyper-describe-function'." t nil) - - (autoload 'hyper-where-is "hyper-apropos" "\ - Print message listing key sequences that invoke specified command." t nil) - - (autoload 'hyper-describe-function "hyper-apropos" "\ - Hypertext replacement for `describe-function'. Unlike `describe-function' - in that the symbol under the cursor is the default if it is a function. - See also `hyper-apropos' and `hyper-describe-variable'." t nil) - - (autoload 'hyper-apropos-read-variable-symbol "hyper-apropos" "\ - Hypertext drop-in replacement for `describe-variable'. - See also `hyper-apropos' and `hyper-describe-function'." nil nil) - - (define-obsolete-function-alias 'hypropos-read-variable-symbol 'hyper-apropos-read-variable-symbol) - - (define-obsolete-function-alias 'hypropos-get-doc 'hyper-apropos-get-doc) - - (autoload 'hyper-set-variable "hyper-apropos" nil t nil) - - (autoload 'hyper-apropos-set-variable "hyper-apropos" "\ - Interactively set the variable on the current line." t nil) - - (define-obsolete-function-alias 'hypropos-set-variable 'hyper-apropos-set-variable) - - (autoload 'hyper-apropos-popup-menu "hyper-apropos" nil t nil) - - (define-obsolete-function-alias 'hypropos-popup-menu 'hyper-apropos-popup-menu) - - ;;;*** - - ;;;### (autoloads (Info-elisp-ref Info-emacs-key Info-goto-emacs-key-command-node Info-goto-emacs-command-node Info-emacs-command Info-search Info-visit-file Info-goto-node Info-batch-rebuild-dir Info-query info) "info" "lisp/info.el") - - (defvar Info-directory-list nil "\ - List of directories to search for Info documentation files. - - The first directory in this list, the \"dir\" file there will become - the (dir)Top node of the Info documentation tree. If you wish to - modify the info search path, use `M-x customize-variable, - Info-directory-list' to do so.") - - (autoload 'info "info" "\ - Enter Info, the documentation browser. - Optional argument FILE specifies the file to examine; - the default is the top-level directory of Info. - - In interactive use, a prefix argument directs this command - to read a file name from the minibuffer." t nil) - - (autoload 'Info-query "info" "\ - Enter Info, the documentation browser. Prompt for name of Info file." t nil) - - (autoload 'Info-batch-rebuild-dir "info" "\ - (Re)build info `dir' files in the directories remaining on the command line. - Use this from the command line, with `-batch'; - it won't work in an interactive Emacs. - Each file is processed even if an error occurred previously. - For example, invoke \"xemacs -batch -f Info-batch-rebuild-dir /usr/local/info\"" nil nil) - - (autoload 'Info-goto-node "info" "\ - Go to info node named NAME. Give just NODENAME or (FILENAME)NODENAME. - Actually, the following interpretations of NAME are tried in order: - (FILENAME)NODENAME - (FILENAME) (using Top node) - NODENAME (in current file) - TAGNAME (see below) - FILENAME (using Top node) - where TAGNAME is a string that appears in quotes: \"TAGNAME\", in an - annotation for any node of any file. (See `a' and `x' commands.)" t nil) - - (autoload 'Info-visit-file "info" "\ - Directly visit an info file." t nil) - - (autoload 'Info-search "info" "\ - Search for REGEXP, starting from point, and select node it's found in." t nil) - - (autoload 'Info-emacs-command "info" "\ - Look up an Emacs command in the Emacs manual in the Info system. - This command is designed to be used whether you are already in Info or not." t nil) - - (autoload 'Info-goto-emacs-command-node "info" "\ - Look up an Emacs command in the Emacs manual in the Info system. - This command is designed to be used whether you are already in Info or not." t nil) - - (autoload 'Info-goto-emacs-key-command-node "info" "\ - Look up an Emacs key sequence in the Emacs manual in the Info system. - This command is designed to be used whether you are already in Info or not." t nil) - - (autoload 'Info-emacs-key "info" "\ - Look up an Emacs key sequence in the Emacs manual in the Info system. - This command is designed to be used whether you are already in Info or not." t nil) - - (autoload 'Info-elisp-ref "info" "\ - Look up an Emacs Lisp function in the Elisp manual in the Info system. - This command is designed to be used whether you are already in Info or not." t nil) - - ;;;*** - - ;;;### (autoloads nil "itimer-autosave" "lisp/itimer-autosave.el") - - ;;;*** - - ;;;### (autoloads nil "loaddefs" "lisp/loaddefs.el") - - ;;;*** - - ;;;### (autoloads nil "loadhist" "lisp/loadhist.el") - - ;;;*** - - ;;;### (autoloads (mwheel-install) "mwheel" "lisp/mwheel.el") - - (autoload 'mwheel-install "mwheel" "\ - Enable mouse wheel support." nil nil) - - ;;;*** - - ;;;### (autoloads (package-admin-add-binary-package package-admin-add-single-file-package) "package-admin" "lisp/package-admin.el") - - (autoload 'package-admin-add-single-file-package "package-admin" "\ - Install a single file Lisp package into XEmacs package hierarchy. - `file' should be the full path to the lisp file to install. - `destdir' should be a simple directory name. - The optional `pkg-dir' can be used to override the default package hierarchy - \(car (last late-packages))." t nil) - - (autoload 'package-admin-add-binary-package "package-admin" "\ - Install a pre-bytecompiled XEmacs package into package hierarchy." t nil) - - ;;;*** - - ;;;### (autoloads (package-get-custom package-get-package-provider package-get package-get-dependencies package-get-all package-get-update-all package-get-delete-package package-get-save-base package-get-update-base-from-buffer package-get-update-base package-get-update-base-entry package-get-require-base package-get-download-menu) "package-get" "lisp/package-get.el") - - (defvar package-get-base nil "\ - List of packages that are installed at this site. - For each element in the alist, car is the package name and the cdr is - a plist containing information about the package. Typical fields - kept in the plist are: - - version - version of this package - provides - list of symbols provided - requires - list of symbols that are required. - These in turn are provided by other packages. - filename - name of the file. - size - size of the file (aka the bundled package) - md5sum - computed md5 checksum - description - What this package is for. - type - Whether this is a 'binary (default) or 'single file package - - More fields may be added as needed. An example: - - '( - (name - (version \"\" - file \"filename\" - description \"what this package is about.\" - provides () - requires () - size - md5sum \"\" - file \"filename\" - description \"what this package is about.\" - provides () - requires () - size - md5sum \" Move right after insertion. - C-c ^ Move up after insertion. - C-c . Move down after insertion. - C-c ` Move northwest (nw) after insertion. - C-c ' Move northeast (ne) after insertion. - C-c / Move southwest (sw) after insertion. - C-c \\ Move southeast (se) after insertion. - The current direction is displayed in the modeline. The initial - direction is right. Whitespace is inserted and tabs are changed to - spaces when required by movement. You can move around in the buffer - with these commands: - \\[picture-move-down] Move vertically to SAME column in previous line. - \\[picture-move-up] Move vertically to SAME column in next line. - \\[picture-end-of-line] Move to column following last non-whitespace character. - \\[picture-forward-column] Move right inserting spaces if required. - \\[picture-backward-column] Move left changing tabs to spaces if required. - C-c C-f Move in direction of current picture motion. - C-c C-b Move in opposite direction of current picture motion. - Return Move to beginning of next line. - You can edit tabular text with these commands: - M-Tab Move to column beneath (or at) next interesting character. - `Indents' relative to a previous line. - Tab Move to next stop in tab stop list. - C-c Tab Set tab stops according to context of this line. - With ARG resets tab stops to default (global) value. - See also documentation of variable picture-tab-chars - which defines \"interesting character\". You can manually - change the tab stop list with command \\[edit-tab-stops]. - You can manipulate text with these commands: - C-d Clear (replace) ARG columns after point without moving. - C-c C-d Delete char at point - the command normally assigned to C-d. - \\[picture-backward-clear-column] Clear (replace) ARG columns before point, moving back over them. - \\[picture-clear-line] Clear ARG lines, advancing over them. The cleared - text is saved in the kill ring. - \\[picture-open-line] Open blank line(s) beneath current line. - You can manipulate rectangles with these commands: - C-c C-k Clear (or kill) a rectangle and save it. - C-c C-w Like C-c C-k except rectangle is saved in named register. - C-c C-y Overlay (or insert) currently saved rectangle at point. - C-c C-x Like C-c C-y except rectangle is taken from named register. - \\[copy-rectangle-to-register] Copies a rectangle to a register. - \\[advertised-undo] Can undo effects of rectangle overlay commands - commands if invoked soon enough. - You can return to the previous mode with: - C-c C-c Which also strips trailing whitespace from every line. - Stripping is suppressed by supplying an argument. - - Entry to this mode calls the value of picture-mode-hook if non-nil. - - Note that Picture mode commands will work outside of Picture mode, but - they are not defaultly assigned to keys." t nil) - - (defalias 'edit-picture 'picture-mode) - - ;;;*** - - ;;;### (autoloads (clear-rectangle string-rectangle open-rectangle insert-rectangle yank-rectangle kill-rectangle extract-rectangle delete-extract-rectangle delete-rectangle) "rect" "lisp/rect.el") - - (autoload 'delete-rectangle "rect" "\ - Delete (don't save) text in rectangle with point and mark as corners. - The same range of columns is deleted in each line starting with the line - where the region begins and ending with the line where the region ends." t nil) - - (autoload 'delete-extract-rectangle "rect" "\ - Delete contents of rectangle and return it as a list of strings. - Arguments START and END are the corners of the rectangle. - The value is list of strings, one for each line of the rectangle." nil nil) - - (autoload 'extract-rectangle "rect" "\ - Return contents of rectangle with corners at START and END. - Value is list of strings, one for each line of the rectangle." nil nil) - - (defvar killed-rectangle nil "\ - Rectangle for yank-rectangle to insert.") - - (autoload 'kill-rectangle "rect" "\ - Delete rectangle with corners at point and mark; save as last killed one. - Calling from program, supply two args START and END, buffer positions. - But in programs you might prefer to use `delete-extract-rectangle'." t nil) - - (autoload 'yank-rectangle "rect" "\ - Yank the last killed rectangle with upper left corner at point." t nil) - - (autoload 'insert-rectangle "rect" "\ - Insert text of RECTANGLE with upper left corner at point. - RECTANGLE's first line is inserted at point, its second - line is inserted at a point vertically under point, etc. - RECTANGLE should be a list of strings. - After this command, the mark is at the upper left corner - and point is at the lower right corner." nil nil) - - (autoload 'open-rectangle "rect" "\ - Blank out rectangle with corners at point and mark, shifting text right. - The text previously in the region is not overwritten by the blanks, - but instead winds up to the right of the rectangle." t nil) - - (autoload 'string-rectangle "rect" "\ - Insert STRING on each line of the region-rectangle, shifting text right. - The left edge of the rectangle specifies the column for insertion. - This command does not delete or overwrite any existing text. - - Called from a program, takes three args; START, END and STRING." t nil) - - (autoload 'clear-rectangle "rect" "\ - Blank out rectangle with corners at point and mark. - The text previously in the region is overwritten by the blanks. - When called from a program, requires two args which specify the corners." t nil) - - ;;;*** - - ;;;### (autoloads (list-load-path-shadows) "shadow" "lisp/shadow.el") - - (autoload 'list-load-path-shadows "shadow" "\ - Display a list of Emacs Lisp files that shadow other files. - - This function lists potential load-path problems. Directories in the - `load-path' variable are searched, in order, for Emacs Lisp - files. When a previously encountered file name is found again, a - message is displayed indicating that the later file is \"hidden\" by - the earlier. - - For example, suppose `load-path' is set to - - \(\"/usr/gnu/emacs/site-lisp\" \"/usr/gnu/emacs/share/emacs/19.30/lisp\") - - and that each of these directories contains a file called XXX.el. Then - XXX.el in the site-lisp directory is referred to by all of: - \(require 'XXX), (autoload .... \"XXX\"), (load-library \"XXX\") etc. - - The first XXX.el file prevents emacs from seeing the second (unless - the second is loaded explicitly via load-file). - - When not intended, such shadowings can be the source of subtle - problems. For example, the above situation may have arisen because the - XXX package was not distributed with versions of emacs prior to - 19.30. An emacs maintainer downloaded XXX from elsewhere and installed - it. Later, XXX was updated and included in the emacs distribution. - Unless the emacs maintainer checks for this, the new version of XXX - will be hidden behind the old (which may no longer work with the new - emacs version). - - This function performs these checks and flags all possible - shadowings. Because a .el file may exist without a corresponding .elc - \(or vice-versa), these suffixes are essentially ignored. A file - XXX.elc in an early directory (that does not contain XXX.el) is - considered to shadow a later file XXX.el, and vice-versa. - - When run interactively, the shadowings (if any) are displayed in a - buffer called `*Shadows*'. Shadowings are located by calling the - \(non-interactive) companion function, `find-emacs-lisp-shadows'." t nil) - - ;;;*** - - ;;;### (autoloads (load-default-sounds load-sound-file) "sound" "lisp/sound.el") - - (or sound-alist (setq sound-alist '((ready nil) (warp nil)))) - - (autoload 'load-sound-file "sound" "\ - Read in an audio-file and add it to the sound-alist. - - You can only play sound files if you are running on display 0 of the - console of a machine with native sound support or running a NetAudio - server and XEmacs has the necessary sound support compiled in. - - The sound file must be in the Sun/NeXT U-LAW format, except on Linux, - where .wav files are also supported by the sound card drivers." t nil) - - (autoload 'load-default-sounds "sound" "\ - Load and install some sound files as beep-types, using - `load-sound-file'. This only works if you're on display 0 of the - console of a machine with native sound support or running a NetAudio - server and XEmacs has the necessary sound support compiled in." t nil) - - ;;;*** - - ;;;### (autoloads (ask-user-about-supersession-threat ask-user-about-lock) "userlock" "lisp/userlock.el") - - (autoload 'ask-user-about-lock "userlock" "\ - Ask user what to do when he wants to edit FILE but it is locked by USER. - This function has a choice of three things to do: - do (signal 'file-locked (list FILE USER)) - to refrain from editing the file - return t (grab the lock on the file) - return nil (edit the file even though it is locked). - You can rewrite it to use any criterion you like to choose which one to do." nil nil) - - (autoload 'ask-user-about-supersession-threat "userlock" "\ - Ask a user who is about to modify an obsolete buffer what to do. - This function has two choices: it can return, in which case the modification - of the buffer will proceed, or it can (signal 'file-supersession (file)), - in which case the proposed buffer modification will not be made. - - You can rewrite this to use any criterion you like to choose which one to do. - The buffer in question is current when this function is called." nil nil) - - ;;;*** - - ;;;### (autoloads (toggle-truncate-lines auto-view-mode view-major-mode view-mode view-minor-mode view-buffer-other-window view-file-other-window view-buffer view-file) "view-less" "lisp/view-less.el") - - (defvar view-minor-mode-map (let ((map (make-keymap))) (set-keymap-name map 'view-minor-mode-map) (suppress-keymap map) (define-key map "-" 'negative-argument) (define-key map " " 'scroll-up) (define-key map "f" 'scroll-up) (define-key map "b" 'scroll-down) (define-key map 'backspace 'scroll-down) (define-key map 'delete 'scroll-down) (define-key map " " 'view-scroll-lines-up) (define-key map "\n" 'view-scroll-lines-up) (define-key map "e" 'view-scroll-lines-up) (define-key map "j" 'view-scroll-lines-up) (define-key map "y" 'view-scroll-lines-down) (define-key map "k" 'view-scroll-lines-down) (define-key map "d" 'view-scroll-some-lines-up) (define-key map "u" 'view-scroll-some-lines-down) (define-key map "r" 'recenter) (define-key map "t" 'toggle-truncate-lines) (define-key map "N" 'view-buffer) (define-key map "E" 'view-file) (define-key map "P" 'view-buffer) (define-key map "!" 'shell-command) (define-key map "|" 'shell-command-on-region) (define-key map "=" 'what-line) (define-key map "?" 'view-search-backward) (define-key map "h" 'view-mode-describe) (define-key map "s" 'view-repeat-search) (define-key map "n" 'view-repeat-search) (define-key map "/" 'view-search-forward) (define-key map "\\" 'view-search-backward) (define-key map "g" 'view-goto-line) (define-key map "G" 'view-last-windowful) (define-key map "%" 'view-goto-percent) (define-key map "p" 'view-goto-percent) (define-key map "m" 'point-to-register) (define-key map "'" 'register-to-point) (define-key map "C" 'view-cleanup-backspaces) (define-key map "" 'view-quit) (define-key map "" 'view-quit-toggle-ro) (define-key map "q" 'view-quit) map)) - - (defvar view-mode-map (let ((map (copy-keymap view-minor-mode-map))) (set-keymap-name map 'view-mode-map) map)) - - (autoload 'view-file "view-less" "\ - Find FILE, enter view mode. With prefix arg OTHER-P, use other window." t nil) - - (autoload 'view-buffer "view-less" "\ - Switch to BUF, enter view mode. With prefix arg use other window." t nil) - - (autoload 'view-file-other-window "view-less" "\ - Find FILE in other window, and enter view mode." t nil) - - (autoload 'view-buffer-other-window "view-less" "\ - Switch to BUFFER in another window, and enter view mode." t nil) - - (autoload 'view-minor-mode "view-less" "\ - Minor mode for viewing text, with bindings like `less'. - Commands are: - \\ - 0..9 prefix args - - prefix minus - \\[scroll-up] page forward - \\[scroll-down] page back - \\[view-scroll-lines-up] scroll prefix-arg lines forward, default 1. - \\[view-scroll-lines-down] scroll prefix-arg lines backward, default 1. - \\[view-scroll-some-lines-down] scroll prefix-arg lines backward, default 10. - \\[view-scroll-some-lines-up] scroll prefix-arg lines forward, default 10. - \\[what-line] print line number - \\[view-mode-describe] print this help message - \\[view-search-forward] regexp search, uses previous string if you just hit RET - \\[view-search-backward] as above but searches backward - \\[view-repeat-search] repeat last search - \\[view-goto-line] goto line prefix-arg, default 1 - \\[view-last-windowful] goto line prefix-arg, default last line - \\[view-goto-percent] goto a position by percentage - \\[toggle-truncate-lines] toggle truncate-lines - \\[view-file] view another file - \\[view-buffer] view another buffer - \\[view-cleanup-backspaces] cleanup backspace constructions - \\[shell-command] execute a shell command - \\[shell-command-on-region] execute a shell command with the region as input - \\[view-quit] exit view-mode, and bury the current buffer. - - If invoked with the optional (prefix) arg non-nil, view-mode cleans up - backspace constructions. - - More precisely: - \\{view-minor-mode-map}" t nil) - - (autoload 'view-mode "view-less" "\ - View the current buffer using view-minor-mode. This exists to be 99.9% - compatible with the implementations of `view-mode' in view.el and older - versions of view-less.el." t nil) - - (autoload 'view-major-mode "view-less" "\ - View the current buffer using view-mode, as a major mode. - This function has a nonstandard name because `view-mode' is wrongly - named but is like this for compatibility reasons." t nil) - - (autoload 'auto-view-mode "view-less" "\ - If the file of the current buffer is not writable, call view-mode. - This is meant to be added to `find-file-hooks'." nil nil) - - (autoload 'toggle-truncate-lines "view-less" "\ - Toggles the values of truncate-lines. - Positive prefix arg sets, negative disables." t nil) - - ;;;*** - - ;;;### (autoloads (widget-minor-mode widget-browse-other-window widget-browse widget-browse-at) "wid-browse" "lisp/wid-browse.el") - - (autoload 'widget-browse-at "wid-browse" "\ - Browse the widget under point." t nil) - - (autoload 'widget-browse "wid-browse" "\ - Create a widget browser for WIDGET." t nil) - - (autoload 'widget-browse-other-window "wid-browse" "\ - Show widget browser for WIDGET in other window." t nil) - - (autoload 'widget-minor-mode "wid-browse" "\ - Togle minor mode for traversing widgets. - With arg, turn widget mode on if and only if arg is positive." t nil) - - ;;;*** - - ;;;### (autoloads (widget-delete widget-create widget-prompt-value) "wid-edit" "lisp/wid-edit.el") - - (autoload 'widget-prompt-value "wid-edit" "\ - Prompt for a value matching WIDGET, using PROMPT. - The current value is assumed to be VALUE, unless UNBOUND is non-nil." nil nil) - - (autoload 'widget-create "wid-edit" "\ - Create widget of TYPE. - The optional ARGS are additional keyword arguments." nil nil) - - (autoload 'widget-delete "wid-edit" "\ - Delete WIDGET." nil nil) - - ;;;*** - - ;;;### (autoloads (font-menu-weight-constructor font-menu-size-constructor font-menu-family-constructor reset-device-font-menus) "x-font-menu" "lisp/x-font-menu.el") - - (defcustom font-menu-ignore-scaled-fonts t "*If non-nil, then the font menu will try to show only bitmap fonts." :type 'boolean :group 'font-menu) - - (defcustom font-menu-this-frame-only-p nil "*If non-nil, then changing the default font from the font menu will only\naffect one frame instead of all frames." :type 'boolean :group 'font-menu) - - (fset 'install-font-menus 'reset-device-font-menus) - - (autoload 'reset-device-font-menus "x-font-menu" "\ - Generates the `Font', `Size', and `Weight' submenus for the Options menu. - This is run the first time that a font-menu is needed for each device. - If you don't like the lazy invocation of this function, you can add it to - `create-device-hook' and that will make the font menus respond more quickly - when they are selected for the first time. If you add fonts to your system, - or if you change your font path, you can call this to re-initialize the menus." nil nil) - - (autoload 'font-menu-family-constructor "x-font-menu" nil nil nil) - - (autoload 'font-menu-size-constructor "x-font-menu" nil nil nil) - - (autoload 'font-menu-weight-constructor "x-font-menu" nil nil nil) - - ;;;*** - - ;;;### (autoloads (x-win-init-sun) "x-win-sun" "lisp/x-win-sun.el") - - (autoload 'x-win-init-sun "x-win-sun" nil nil nil) - - ;;;*** - - ;;;### (autoloads (x-win-init-xfree86) "x-win-xfree86" "lisp/x-win-xfree86.el") - - (autoload 'x-win-init-xfree86 "x-win-xfree86" nil nil nil) - - ;;;*** - - (provide 'Standard-autoloads) -;;;### (autoloads (compiler-macroexpand define-compiler-macro ignore-errors assert check-type typep deftype cl-struct-setf-expander defstruct define-modify-macro callf2 callf letf* letf rotatef shiftf remf cl-do-pop psetf setf get-setf-method defsetf define-setf-method declare the locally multiple-value-setq multiple-value-bind lexical-let* lexical-let symbol-macrolet macrolet labels flet progv psetq do-all-symbols do-symbols dotimes dolist do* do loop return-from return block etypecase typecase ecase case load-time-value eval-when destructuring-bind function* defmacro* defun* gentemp gensym cl-compile-time-init) "cl-macs" "lisp/cl-macs.el") - -(autoload 'cl-compile-time-init "cl-macs" nil nil nil) - -(autoload 'gensym "cl-macs" "\ -Generate a new uninterned symbol. -The name is made by appending a number to PREFIX, default \"G\"." nil nil) - -(autoload 'gentemp "cl-macs" "\ -Generate a new interned symbol with a unique name. -The name is made by appending a number to PREFIX, default \"G\"." nil nil) - -(autoload 'defun* "cl-macs" "\ -(defun* NAME ARGLIST [DOCSTRING] BODY...): define NAME as a function. -Like normal `defun', except ARGLIST allows full Common Lisp conventions, -and BODY is implicitly surrounded by (block NAME ...)." nil 'macro) - -(autoload 'defmacro* "cl-macs" "\ -(defmacro* NAME ARGLIST [DOCSTRING] BODY...): define NAME as a macro. -Like normal `defmacro', except ARGLIST allows full Common Lisp conventions, -and BODY is implicitly surrounded by (block NAME ...)." nil 'macro) - -(autoload 'function* "cl-macs" "\ -(function* SYMBOL-OR-LAMBDA): introduce a function. -Like normal `function', except that if argument is a lambda form, its -ARGLIST allows full Common Lisp conventions." nil 'macro) - -(autoload 'destructuring-bind "cl-macs" nil nil 'macro) - -(autoload 'eval-when "cl-macs" "\ -(eval-when (WHEN...) BODY...): control when BODY is evaluated. -If `compile' is in WHEN, BODY is evaluated when compiled at top-level. -If `load' is in WHEN, BODY is evaluated when loaded after top-level compile. -If `eval' is in WHEN, BODY is evaluated when interpreted or at non-top-level." nil 'macro) - -(autoload 'load-time-value "cl-macs" "\ -Like `progn', but evaluates the body at load time. -The result of the body appears to the compiler as a quoted constant." nil 'macro) - -(autoload 'case "cl-macs" "\ -(case EXPR CLAUSES...): evals EXPR, chooses from CLAUSES on that value. -Each clause looks like (KEYLIST BODY...). EXPR is evaluated and compared -against each key in each KEYLIST; the corresponding BODY is evaluated. -If no clause succeeds, case returns nil. A single atom may be used in -place of a KEYLIST of one atom. A KEYLIST of `t' or `otherwise' is -allowed only in the final clause, and matches if no other keys match. -Key values are compared by `eql'." nil 'macro) - -(autoload 'ecase "cl-macs" "\ -(ecase EXPR CLAUSES...): like `case', but error if no case fits. -`otherwise'-clauses are not allowed." nil 'macro) - -(autoload 'typecase "cl-macs" "\ -(typecase EXPR CLAUSES...): evals EXPR, chooses from CLAUSES on that value. -Each clause looks like (TYPE BODY...). EXPR is evaluated and, if it -satisfies TYPE, the corresponding BODY is evaluated. If no clause succeeds, -typecase returns nil. A TYPE of `t' or `otherwise' is allowed only in the -final clause, and matches if no other keys match." nil 'macro) - -(autoload 'etypecase "cl-macs" "\ -(etypecase EXPR CLAUSES...): like `typecase', but error if no case fits. -`otherwise'-clauses are not allowed." nil 'macro) - -(autoload 'block "cl-macs" "\ -(block NAME BODY...): define a lexically-scoped block named NAME. -NAME may be any symbol. Code inside the BODY forms can call `return-from' -to jump prematurely out of the block. This differs from `catch' and `throw' -in two respects: First, the NAME is an unevaluated symbol rather than a -quoted symbol or other form; and second, NAME is lexically rather than -dynamically scoped: Only references to it within BODY will work. These -references may appear inside macro expansions, but not inside functions -called from BODY." nil 'macro) - -(autoload 'return "cl-macs" "\ -(return [RESULT]): return from the block named nil. -This is equivalent to `(return-from nil RESULT)'." nil 'macro) - -(autoload 'return-from "cl-macs" "\ -(return-from NAME [RESULT]): return from the block named NAME. -This jump out to the innermost enclosing `(block NAME ...)' form, -returning RESULT from that form (or nil if RESULT is omitted). -This is compatible with Common Lisp, but note that `defun' and -`defmacro' do not create implicit blocks as they do in Common Lisp." nil 'macro) - -(autoload 'loop "cl-macs" "\ -(loop CLAUSE...): The Common Lisp `loop' macro. -Valid clauses are: - for VAR from/upfrom/downfrom NUM to/upto/downto/above/below NUM by NUM, - for VAR in LIST by FUNC, for VAR on LIST by FUNC, for VAR = INIT then EXPR, - for VAR across ARRAY, repeat NUM, with VAR = INIT, while COND, until COND, - always COND, never COND, thereis COND, collect EXPR into VAR, - append EXPR into VAR, nconc EXPR into VAR, sum EXPR into VAR, - count EXPR into VAR, maximize EXPR into VAR, minimize EXPR into VAR, - if COND CLAUSE [and CLAUSE]... else CLAUSE [and CLAUSE...], - unless COND CLAUSE [and CLAUSE]... else CLAUSE [and CLAUSE...], - do EXPRS..., initially EXPRS..., finally EXPRS..., return EXPR, - finally return EXPR, named NAME." nil 'macro) - -(autoload 'do "cl-macs" "\ -The Common Lisp `do' loop. -Format is: (do ((VAR INIT [STEP])...) (END-TEST [RESULT...]) BODY...)" nil 'macro) - -(autoload 'do* "cl-macs" "\ -The Common Lisp `do*' loop. -Format is: (do* ((VAR INIT [STEP])...) (END-TEST [RESULT...]) BODY...)" nil 'macro) - -(autoload 'dolist "cl-macs" "\ -(dolist (VAR LIST [RESULT]) BODY...): loop over a list. -Evaluate BODY with VAR bound to each `car' from LIST, in turn. -Then evaluate RESULT to get return value, default nil." nil 'macro) - -(autoload 'dotimes "cl-macs" "\ -(dotimes (VAR COUNT [RESULT]) BODY...): loop a certain number of times. -Evaluate BODY with VAR bound to successive integers from 0, inclusive, -to COUNT, exclusive. Then evaluate RESULT to get return value, default -nil." nil 'macro) - -(autoload 'do-symbols "cl-macs" "\ -(dosymbols (VAR [OBARRAY [RESULT]]) BODY...): loop over all symbols. -Evaluate BODY with VAR bound to each interned symbol, or to each symbol -from OBARRAY." nil 'macro) - -(autoload 'do-all-symbols "cl-macs" nil nil 'macro) - -(autoload 'psetq "cl-macs" "\ -(psetq SYM VAL SYM VAL ...): set SYMs to the values VALs in parallel. -This is like `setq', except that all VAL forms are evaluated (in order) -before assigning any symbols SYM to the corresponding values." nil 'macro) - -(autoload 'progv "cl-macs" "\ -(progv SYMBOLS VALUES BODY...): bind SYMBOLS to VALUES dynamically in BODY. -The forms SYMBOLS and VALUES are evaluated, and must evaluate to lists. -Each SYMBOL in the first list is bound to the corresponding VALUE in the -second list (or made unbound if VALUES is shorter than SYMBOLS); then the -BODY forms are executed and their result is returned. This is much like -a `let' form, except that the list of symbols can be computed at run-time." nil 'macro) - -(autoload 'flet "cl-macs" "\ -(flet ((FUNC ARGLIST BODY...) ...) FORM...): make temporary function defns. -This is an analogue of `let' that operates on the function cell of FUNC -rather than its value cell. The FORMs are evaluated with the specified -function definitions in place, then the definitions are undone (the FUNCs -go back to their previous definitions, or lack thereof)." nil 'macro) - -(autoload 'labels "cl-macs" "\ -(labels ((FUNC ARGLIST BODY...) ...) FORM...): make temporary func bindings. -This is like `flet', except the bindings are lexical instead of dynamic. -Unlike `flet', this macro is fully complaint with the Common Lisp standard." nil 'macro) - -(autoload 'macrolet "cl-macs" "\ -(macrolet ((NAME ARGLIST BODY...) ...) FORM...): make temporary macro defns. -This is like `flet', but for macros instead of functions." nil 'macro) - -(autoload 'symbol-macrolet "cl-macs" "\ -(symbol-macrolet ((NAME EXPANSION) ...) FORM...): make symbol macro defns. -Within the body FORMs, references to the variable NAME will be replaced -by EXPANSION, and (setq NAME ...) will act like (setf EXPANSION ...)." nil 'macro) - -(autoload 'lexical-let "cl-macs" "\ -(lexical-let BINDINGS BODY...): like `let', but lexically scoped. -The main visible difference is that lambdas inside BODY will create -lexical closures as in Common Lisp." nil 'macro) - -(autoload 'lexical-let* "cl-macs" "\ -(lexical-let* BINDINGS BODY...): like `let*', but lexically scoped. -The main visible difference is that lambdas inside BODY will create -lexical closures as in Common Lisp." nil 'macro) - -(autoload 'multiple-value-bind "cl-macs" "\ -(multiple-value-bind (SYM SYM...) FORM BODY): collect multiple return values. -FORM must return a list; the BODY is then executed with the first N elements -of this list bound (`let'-style) to each of the symbols SYM in turn. This -is analogous to the Common Lisp `multiple-value-bind' macro, using lists to -simulate true multiple return values. For compatibility, (values A B C) is -a synonym for (list A B C)." nil 'macro) - -(autoload 'multiple-value-setq "cl-macs" "\ -(multiple-value-setq (SYM SYM...) FORM): collect multiple return values. -FORM must return a list; the first N elements of this list are stored in -each of the symbols SYM in turn. This is analogous to the Common Lisp -`multiple-value-setq' macro, using lists to simulate true multiple return -values. For compatibility, (values A B C) is a synonym for (list A B C)." nil 'macro) - -(autoload 'locally "cl-macs" nil nil 'macro) - -(autoload 'the "cl-macs" nil nil 'macro) - -(autoload 'declare "cl-macs" nil nil 'macro) - -(autoload 'define-setf-method "cl-macs" "\ -(define-setf-method NAME ARGLIST BODY...): define a `setf' method. -This method shows how to handle `setf's to places of the form (NAME ARGS...). -The argument forms ARGS are bound according to ARGLIST, as if NAME were -going to be expanded as a macro, then the BODY forms are executed and must -return a list of five elements: a temporary-variables list, a value-forms -list, a store-variables list (of length one), a store-form, and an access- -form. See `defsetf' for a simpler way to define most setf-methods." nil 'macro) - -(autoload 'defsetf "cl-macs" "\ -(defsetf NAME FUNC): define a `setf' method. -This macro is an easy-to-use substitute for `define-setf-method' that works -well for simple place forms. In the simple `defsetf' form, `setf's of -the form (setf (NAME ARGS...) VAL) are transformed to function or macro -calls of the form (FUNC ARGS... VAL). Example: (defsetf aref aset). -Alternate form: (defsetf NAME ARGLIST (STORE) BODY...). -Here, the above `setf' call is expanded by binding the argument forms ARGS -according to ARGLIST, binding the value form VAL to STORE, then executing -BODY, which must return a Lisp form that does the necessary `setf' operation. -Actually, ARGLIST and STORE may be bound to temporary variables which are -introduced automatically to preserve proper execution order of the arguments. -Example: (defsetf nth (n x) (v) (list 'setcar (list 'nthcdr n x) v))." nil 'macro) - -(autoload 'get-setf-method "cl-macs" "\ -Return a list of five values describing the setf-method for PLACE. -PLACE may be any Lisp form which can appear as the PLACE argument to -a macro like `setf' or `incf'." nil nil) - -(autoload 'setf "cl-macs" "\ -(setf PLACE VAL PLACE VAL ...): set each PLACE to the value of its VAL. -This is a generalized version of `setq'; the PLACEs may be symbolic -references such as (car x) or (aref x i), as well as plain symbols. -For example, (setf (cadar x) y) is equivalent to (setcar (cdar x) y). -The return value is the last VAL in the list." nil 'macro) - -(autoload 'psetf "cl-macs" "\ -(psetf PLACE VAL PLACE VAL ...): set PLACEs to the values VALs in parallel. -This is like `setf', except that all VAL forms are evaluated (in order) -before assigning any PLACEs to the corresponding values." nil 'macro) - -(autoload 'cl-do-pop "cl-macs" nil nil nil) - -(autoload 'remf "cl-macs" "\ -(remf PLACE TAG): remove TAG from property list PLACE. -PLACE may be a symbol, or any generalized variable allowed by `setf'. -The form returns true if TAG was found and removed, nil otherwise." nil 'macro) - -(autoload 'shiftf "cl-macs" "\ -(shiftf PLACE PLACE... VAL): shift left among PLACEs. -Example: (shiftf A B C) sets A to B, B to C, and returns the old A. -Each PLACE may be a symbol, or any generalized variable allowed by `setf'." nil 'macro) - -(autoload 'rotatef "cl-macs" "\ -(rotatef PLACE...): rotate left among PLACEs. -Example: (rotatef A B C) sets A to B, B to C, and C to A. It returns nil. -Each PLACE may be a symbol, or any generalized variable allowed by `setf'." nil 'macro) - -(autoload 'letf "cl-macs" "\ -(letf ((PLACE VALUE) ...) BODY...): temporarily bind to PLACEs. -This is the analogue of `let', but with generalized variables (in the -sense of `setf') for the PLACEs. Each PLACE is set to the corresponding -VALUE, then the BODY forms are executed. On exit, either normally or -because of a `throw' or error, the PLACEs are set back to their original -values. Note that this macro is *not* available in Common Lisp. -As a special case, if `(PLACE)' is used instead of `(PLACE VALUE)', -the PLACE is not modified before executing BODY." nil 'macro) - -(autoload 'letf* "cl-macs" "\ -(letf* ((PLACE VALUE) ...) BODY...): temporarily bind to PLACEs. -This is the analogue of `let*', but with generalized variables (in the -sense of `setf') for the PLACEs. Each PLACE is set to the corresponding -VALUE, then the BODY forms are executed. On exit, either normally or -because of a `throw' or error, the PLACEs are set back to their original -values. Note that this macro is *not* available in Common Lisp. -As a special case, if `(PLACE)' is used instead of `(PLACE VALUE)', -the PLACE is not modified before executing BODY." nil 'macro) - -(autoload 'callf "cl-macs" "\ -(callf FUNC PLACE ARGS...): set PLACE to (FUNC PLACE ARGS...). -FUNC should be an unquoted function name. PLACE may be a symbol, -or any generalized variable allowed by `setf'." nil 'macro) - -(autoload 'callf2 "cl-macs" "\ -(callf2 FUNC ARG1 PLACE ARGS...): set PLACE to (FUNC ARG1 PLACE ARGS...). -Like `callf', but PLACE is the second argument of FUNC, not the first." nil 'macro) - -(autoload 'define-modify-macro "cl-macs" "\ -(define-modify-macro NAME ARGLIST FUNC): define a `setf'-like modify macro. -If NAME is called, it combines its PLACE argument with the other arguments -from ARGLIST using FUNC: (define-modify-macro incf (&optional (n 1)) +)" nil 'macro) - -(autoload 'defstruct "cl-macs" "\ -(defstruct (NAME OPTIONS...) (SLOT SLOT-OPTS...)...): define a struct type. -This macro defines a new Lisp data type called NAME, which contains data -stored in SLOTs. This defines a `make-NAME' constructor, a `copy-NAME' -copier, a `NAME-p' predicate, and setf-able `NAME-SLOT' accessors." nil 'macro) - -(autoload 'cl-struct-setf-expander "cl-macs" nil nil nil) - -(autoload 'deftype "cl-macs" "\ -(deftype NAME ARGLIST BODY...): define NAME as a new data type. -The type name can then be used in `typecase', `check-type', etc." nil 'macro) - -(autoload 'typep "cl-macs" "\ -Check that OBJECT is of type TYPE. -TYPE is a Common Lisp-style type specifier." nil nil) - -(autoload 'check-type "cl-macs" "\ -Verify that FORM is of type TYPE; signal an error if not. -STRING is an optional description of the desired type." nil 'macro) - -(autoload 'assert "cl-macs" "\ -Verify that FORM returns non-nil; signal an error if not. -Second arg SHOW-ARGS means to include arguments of FORM in message. -Other args STRING and ARGS... are arguments to be passed to `error'. -They are not evaluated unless the assertion fails. If STRING is -omitted, a default message listing FORM itself is used." nil 'macro) - -(autoload 'ignore-errors "cl-macs" "\ -Execute FORMS; if an error occurs, return nil. -Otherwise, return result of last FORM." nil 'macro) - -(autoload 'define-compiler-macro "cl-macs" "\ -(define-compiler-macro FUNC ARGLIST BODY...): Define a compiler-only macro. -This is like `defmacro', but macro expansion occurs only if the call to -FUNC is compiled (i.e., not interpreted). Compiler macros should be used -for optimizing the way calls to FUNC are compiled; the form returned by -BODY should do the same thing as a call to the normal function called -FUNC, though possibly more efficiently. Note that, like regular macros, -compiler macros are expanded repeatedly until no further expansions are -possible. Unlike regular macros, BODY can decide to \"punt\" and leave the -original function call alone by declaring an initial `&whole foo' parameter -and then returning foo." nil 'macro) - -(autoload 'compiler-macroexpand "cl-macs" nil nil nil) - -;;;*** - -;;;### (autoloads (batch-remove-old-elc) "cleantree" "lisp/cleantree.el") - -(autoload 'batch-remove-old-elc "cleantree" nil nil nil) - -;;;*** - -;;;### (autoloads (config-value config-value-hash-table) "config" "lisp/config.el") - -(autoload 'config-value-hash-table "config" "\ -Return hashtable of configuration parameters and their values." nil nil) - -(autoload 'config-value "config" "\ -Return the value of the configuration parameter CONFIG_SYMBOL." nil nil) - -;;;*** - -;;;### (autoloads (Custom-make-dependencies) "cus-dep" "lisp/cus-dep.el") - -(autoload 'Custom-make-dependencies "cus-dep" "\ -Extract custom dependencies from .el files in SUBDIRS. -SUBDIRS is a list of directories. If it is nil, the command-line -arguments are used. If it is a string, only that directory is -processed. This function is especially useful in batch mode. - -Batch usage: xemacs -batch -l cus-dep.el -f Custom-make-dependencies DIRS" t nil) - -;;;*** - -;;;### (autoloads (customize-menu-create custom-menu-create custom-save-all customize-save-customized customize-browse custom-buffer-create-other-window custom-buffer-create customize-apropos-groups customize-apropos-faces customize-apropos-options customize-apropos customize-saved customize-customized customize-face-other-window customize-face customize-option-other-window customize-changed-options customize-variable customize-other-window customize customize-save-variable customize-set-variable customize-set-value) "cus-edit" "lisp/cus-edit.el") - -(autoload 'customize-set-value "cus-edit" "\ -Set VARIABLE to VALUE. VALUE is a Lisp object. - -If VARIABLE has a `variable-interactive' property, that is used as if -it were the arg to `interactive' (which see) to interactively read the value. - -If VARIABLE has a `custom-type' property, it must be a widget and the -`:prompt-value' property of that widget will be used for reading the value." t nil) - -(autoload 'customize-set-variable "cus-edit" "\ -Set the default for VARIABLE to VALUE. VALUE is a Lisp object. - -If VARIABLE has a `custom-set' property, that is used for setting -VARIABLE, otherwise `set-default' is used. - -The `customized-value' property of the VARIABLE will be set to a list -with a quoted VALUE as its sole list member. - -If VARIABLE has a `variable-interactive' property, that is used as if -it were the arg to `interactive' (which see) to interactively read the value. - -If VARIABLE has a `custom-type' property, it must be a widget and the -`:prompt-value' property of that widget will be used for reading the value. " t nil) - -(autoload 'customize-save-variable "cus-edit" "\ -Set the default for VARIABLE to VALUE, and save it for future sessions. -If VARIABLE has a `custom-set' property, that is used for setting -VARIABLE, otherwise `set-default' is used. - -The `customized-value' property of the VARIABLE will be set to a list -with a quoted VALUE as its sole list member. - -If VARIABLE has a `variable-interactive' property, that is used as if -it were the arg to `interactive' (which see) to interactively read the value. - -If VARIABLE has a `custom-type' property, it must be a widget and the -`:prompt-value' property of that widget will be used for reading the value. " t nil) - -(autoload 'customize "cus-edit" "\ -Select a customization buffer which you can use to set user options. -User options are structured into \"groups\". -The default group is `Emacs'." t nil) - -(defalias 'customize-group 'customize) - -(autoload 'customize-other-window "cus-edit" "\ -Customize SYMBOL, which must be a customization group." t nil) - -(defalias 'customize-group-other-window 'customize-other-window) - -(defalias 'customize-option 'customize-variable) - -(autoload 'customize-variable "cus-edit" "\ -Customize SYMBOL, which must be a user option variable." t nil) - -(autoload 'customize-changed-options "cus-edit" "\ -Customize all user option variables whose default values changed recently. -This means, in other words, variables defined with a `:version' keyword." t nil) - -(defalias 'customize-variable-other-window 'customize-option-other-window) - -(autoload 'customize-option-other-window "cus-edit" "\ -Customize SYMBOL, which must be a user option variable. -Show the buffer in another window, but don't select it." t nil) - -(autoload 'customize-face "cus-edit" "\ -Customize SYMBOL, which should be a face name or nil. -If SYMBOL is nil, customize all faces." t nil) - -(autoload 'customize-face-other-window "cus-edit" "\ -Show customization buffer for FACE in other window." t nil) - -(autoload 'customize-customized "cus-edit" "\ -Customize all user options set since the last save in this session." t nil) - -(autoload 'customize-saved "cus-edit" "\ -Customize all already saved user options." t nil) - -(autoload 'customize-apropos "cus-edit" "\ -Customize all user options matching REGEXP. -If ALL is `options', include only options. -If ALL is `faces', include only faces. -If ALL is `groups', include only groups. -If ALL is t (interactively, with prefix arg), include options which are not -user-settable, as well as faces and groups." t nil) - -(autoload 'customize-apropos-options "cus-edit" "\ -Customize all user options matching REGEXP. -With prefix arg, include options which are not user-settable." t nil) - -(autoload 'customize-apropos-faces "cus-edit" "\ -Customize all user faces matching REGEXP." t nil) - -(autoload 'customize-apropos-groups "cus-edit" "\ -Customize all user groups matching REGEXP." t nil) - -(autoload 'custom-buffer-create "cus-edit" "\ -Create a buffer containing OPTIONS. -Optional NAME is the name of the buffer. -OPTIONS should be an alist of the form ((SYMBOL WIDGET)...), where -SYMBOL is a customization option, and WIDGET is a widget for editing -that option." nil nil) - -(autoload 'custom-buffer-create-other-window "cus-edit" "\ -Create a buffer containing OPTIONS. -Optional NAME is the name of the buffer. -OPTIONS should be an alist of the form ((SYMBOL WIDGET)...), where -SYMBOL is a customization option, and WIDGET is a widget for editing -that option." nil nil) - -(autoload 'customize-browse "cus-edit" "\ -Create a tree browser for the customize hierarchy." t nil) - -(defcustom custom-file "~/.emacs" "File used for storing customization information.\nIf you change this from the default \"~/.emacs\" you need to\nexplicitly load that file for the settings to take effect." :type 'file :group 'customize) - -(autoload 'customize-save-customized "cus-edit" "\ -Save all user options which have been set in this session." t nil) - -(autoload 'custom-save-all "cus-edit" "\ -Save all customizations in `custom-file'." nil nil) - -(autoload 'custom-menu-create "cus-edit" "\ -Create menu for customization group SYMBOL. -The menu is in a format applicable to `easy-menu-define'." nil nil) - -(autoload 'customize-menu-create "cus-edit" "\ -Return a customize menu for customization group SYMBOL. -If optional NAME is given, use that as the name of the menu. -Otherwise the menu will be named `Customize'. -The format is suitable for use with `easy-menu-define'." nil nil) - -;;;*** - -;;;### (autoloads (custom-set-faces custom-declare-face) "cus-face" "lisp/cus-face.el") - -(autoload 'custom-declare-face "cus-face" "\ -Like `defface', but FACE is evaluated as a normal argument." nil nil) - -(autoload 'custom-set-faces "cus-face" "\ -Initialize faces according to user preferences. -The arguments should be a list where each entry has the form: - - (FACE SPEC [NOW]) - -SPEC will be stored as the saved value for FACE. If NOW is present -and non-nil, FACE will also be created according to SPEC. - -See `defface' for the format of SPEC." nil nil) - -;;;*** - -;;;### (autoloads (disassemble) "disass" "lisp/disass.el") - -(autoload 'disassemble "disass" "\ -Print disassembled code for OBJECT in (optional) BUFFER. -OBJECT can be a symbol defined as a function, or a function itself -\(a lambda expression or a compiled-function object). -If OBJECT is not already compiled, we compile it, but do not -redefine OBJECT if it is a symbol." t nil) - -;;;*** - -;;;### (autoloads (standard-display-european standard-display-underline standard-display-graphic standard-display-g1 standard-display-ascii standard-display-default standard-display-8bit make-display-table describe-current-display-table) "disp-table" "lisp/disp-table.el") - -(autoload 'describe-current-display-table "disp-table" "\ -Describe the display table in use in the selected window and buffer." t nil) - -(autoload 'make-display-table "disp-table" "\ -Return a new, empty display table." nil nil) - -(autoload 'standard-display-8bit "disp-table" "\ -Display characters in the range L to H literally." nil nil) - -(autoload 'standard-display-default "disp-table" "\ -Display characters in the range L to H using the default notation." nil nil) - -(autoload 'standard-display-ascii "disp-table" "\ -Display character C using printable string S." nil nil) - -(autoload 'standard-display-g1 "disp-table" "\ -Display character C as character SC in the g1 character set. -This function assumes that your terminal uses the SO/SI characters; -it is meaningless for an X frame." nil nil) - -(autoload 'standard-display-graphic "disp-table" "\ -Display character C as character GC in graphics character set. -This function assumes VT100-compatible escapes; it is meaningless for an -X frame." nil nil) - -(autoload 'standard-display-underline "disp-table" "\ -Display character C as character UC plus underlining." nil nil) - -(autoload 'standard-display-european "disp-table" "\ -Toggle display of European characters encoded with ISO 8859. -When enabled, characters in the range of 160 to 255 display not -as octal escapes, but as accented characters. -With prefix argument, enable European character display iff arg is positive." t nil) - -;;;*** - -;;;### (autoloads nil "easymenu" "lisp/easymenu.el") - -;;;*** - -;;;### (autoloads (tags-apropos list-tags tags-query-replace tags-search tags-loop-continue next-file tag-complete-symbol find-tag-other-window find-tag visit-tags-table) "etags" "lisp/etags.el") - -(autoload 'visit-tags-table "etags" "\ -Tell tags commands to use tags table file FILE when all else fails. -FILE should be the name of a file created with the `etags' program. -A directory name is ok too; it means file TAGS in that directory." t nil) - -(autoload 'find-tag "etags" "\ -*Find tag whose name contains TAGNAME. - Selects the buffer that the tag is contained in -and puts point at its definition. - If TAGNAME is a null string, the expression in the buffer -around or before point is used as the tag name. - If called interactively with a numeric argument, searches for the next tag -in the tag table that matches the tagname used in the previous find-tag. - If second arg OTHER-WINDOW is non-nil, uses another window to display -the tag. - -This version of this function supports multiple active tags tables, -and completion. - -Variables of note: - - tag-table-alist controls which tables apply to which buffers - tags-file-name a default tags table - tags-build-completion-table controls completion behavior - buffer-tag-table another way of specifying a buffer-local table - make-tags-files-invisible whether tags tables should be very hidden - tag-mark-stack-max how many tags-based hops to remember" t nil) - -(autoload 'find-tag-other-window "etags" "\ -*Find tag whose name contains TAGNAME. - Selects the buffer that the tag is contained in in another window -and puts point at its definition. - If TAGNAME is a null string, the expression in the buffer -around or before point is used as the tag name. - If second arg NEXT is non-nil (interactively, with prefix arg), -searches for the next tag in the tag table -that matches the tagname used in the previous find-tag. - -This version of this function supports multiple active tags tables, -and completion. - -Variables of note: - - tag-table-alist controls which tables apply to which buffers - tags-file-name a default tags table - tags-build-completion-table controls completion behavior - buffer-tag-table another way of specifying a buffer-local table - make-tags-files-invisible whether tags tables should be very hidden - tag-mark-stack-max how many tags-based hops to remember" t nil) - -(autoload 'tag-complete-symbol "etags" "\ -The function used to do tags-completion (using 'tag-completion-predicate)." t nil) - -(autoload 'next-file "etags" "\ -Select next file among files in current tag table(s). - -A first argument of t (prefix arg, if interactive) initializes to the -beginning of the list of files in the (first) tags table. If the argument -is neither nil nor t, it is evalled to initialize the list of files. - -Non-nil second argument NOVISIT means use a temporary buffer -to save time and avoid uninteresting warnings. - -Value is nil if the file was already visited; -if the file was newly read in, the value is the filename." t nil) - -(autoload 'tags-loop-continue "etags" "\ -Continue last \\[tags-search] or \\[tags-query-replace] command. -Used noninteractively with non-nil argument to begin such a command (the -argument is passed to `next-file', which see). -Two variables control the processing we do on each file: -the value of `tags-loop-scan' is a form to be executed on each file -to see if it is interesting (it returns non-nil if so) -and `tags-loop-operate' is a form to execute to operate on an interesting file -If the latter returns non-nil, we exit; otherwise we scan the next file." t nil) - -(autoload 'tags-search "etags" "\ -Search through all files listed in tags table for match for REGEXP. -Stops when a match is found. -To continue searching for next match, use command \\[tags-loop-continue]. - -See documentation of variable `tag-table-alist'." t nil) - -(autoload 'tags-query-replace "etags" "\ -Query-replace-regexp FROM with TO through all files listed in tags table. -Third arg DELIMITED (prefix arg) means replace only word-delimited matches. -If you exit (\\[keyboard-quit] or ESC), you can resume the query-replace -with the command \\[tags-loop-continue]. - -See documentation of variable `tag-table-alist'." t nil) - -(autoload 'list-tags "etags" "\ -Display list of tags in FILE." t nil) - -(autoload 'tags-apropos "etags" "\ -Display list of all tags in tag table REGEXP matches." t nil) -(define-key esc-map "*" 'pop-tag-mark) - -;;;*** - -;;;### (autoloads (finder-by-keyword) "finder" "lisp/finder.el") - -(autoload 'finder-by-keyword "finder" "\ -Find packages matching a given keyword." t nil) - -;;;*** - -;;;### (autoloads (font-lock-set-defaults-1 font-lock-fontify-buffer turn-off-font-lock turn-on-font-lock font-lock-mode) "font-lock" "lisp/font-lock.el") - -(defcustom font-lock-auto-fontify t "*Whether font-lock should automatically fontify files as they're loaded.\nThis will only happen if font-lock has fontifying keywords for the major\nmode of the file. You can get finer-grained control over auto-fontification\nby using this variable in combination with `font-lock-mode-enable-list' or\n`font-lock-mode-disable-list'." :type 'boolean :group 'font-lock) - -(defcustom font-lock-mode-enable-list nil "*List of modes to auto-fontify, if `font-lock-auto-fontify' is nil." :type '(repeat (symbol :tag "Mode")) :group 'font-lock) - -(defcustom font-lock-mode-disable-list nil "*List of modes not to auto-fontify, if `font-lock-auto-fontify' is t." :type '(repeat (symbol :tag "Mode")) :group 'font-lock) - -(defcustom font-lock-use-colors '(color) "*Specification for when Font Lock will set up color defaults.\nNormally this should be '(color), meaning that Font Lock will set up\ncolor defaults that are only used on color displays. Set this to nil\nif you don't want Font Lock to set up color defaults at all. This\nshould be one of\n\n-- a list of valid tags, meaning that the color defaults will be used\n when all of the tags apply. (e.g. '(color x))\n-- a list whose first element is 'or and whose remaining elements are\n lists of valid tags, meaning that the defaults will be used when\n any of the tag lists apply.\n-- nil, meaning that the defaults should not be set up at all.\n\n(If you specify face values in your init file, they will override any\nthat Font Lock specifies, regardless of whether you specify the face\nvalues before or after loading Font Lock.)\n\nSee also `font-lock-use-fonts'. If you want more control over the faces\nused for fontification, see the documentation of `font-lock-mode' for\nhow to do it." :type 'sexp :group 'font-lock) - -(defcustom font-lock-use-fonts '(or (mono) (grayscale)) "*Specification for when Font Lock will set up non-color defaults.\n\nNormally this should be '(or (mono) (grayscale)), meaning that Font\nLock will set up non-color defaults that are only used on either mono\nor grayscale displays. Set this to nil if you don't want Font Lock to\nset up non-color defaults at all. This should be one of\n\n-- a list of valid tags, meaning that the non-color defaults will be used\n when all of the tags apply. (e.g. '(grayscale x))\n-- a list whose first element is 'or and whose remaining elements are\n lists of valid tags, meaning that the defaults will be used when\n any of the tag lists apply.\n-- nil, meaning that the defaults should not be set up at all.\n\n(If you specify face values in your init file, they will override any\nthat Font Lock specifies, regardless of whether you specify the face\nvalues before or after loading Font Lock.)\n\nSee also `font-lock-use-colors'. If you want more control over the faces\nused for fontification, see the documentation of `font-lock-mode' for\nhow to do it." :type 'sexp :group 'font-lock) - -(defcustom font-lock-maximum-decoration t "*If non-nil, the maximum decoration level for fontifying.\nIf nil, use the minimum decoration (equivalent to level 0).\nIf t, use the maximum decoration available.\nIf a number, use that level of decoration (or if not available the maximum).\nIf a list, each element should be a cons pair of the form (MAJOR-MODE . LEVEL),\nwhere MAJOR-MODE is a symbol or t (meaning the default). For example:\n ((c++-mode . 2) (c-mode . t) (t . 1))\nmeans use level 2 decoration for buffers in `c++-mode', the maximum decoration\navailable for buffers in `c-mode', and level 1 decoration otherwise." :type '(choice (const :tag "default" nil) (const :tag "maximum" t) (integer :tag "level" 1) (repeat :menu-tag "mode specific" :tag "mode specific" :value ((t . t)) (cons :tag "Instance" (radio :tag "Mode" (const :tag "all" t) (symbol :tag "name")) (radio :tag "Decoration" (const :tag "default" nil) (const :tag "maximum" t) (integer :tag "level" 1))))) :group 'font-lock) - -(define-obsolete-variable-alias 'font-lock-use-maximal-decoration 'font-lock-maximum-decoration) - -(defcustom font-lock-maximum-size (* 250 1024) "*If non-nil, the maximum size for buffers for fontifying.\nOnly buffers less than this can be fontified when Font Lock mode is turned on.\nIf nil, means size is irrelevant.\nIf a list, each element should be a cons pair of the form (MAJOR-MODE . SIZE),\nwhere MAJOR-MODE is a symbol or t (meaning the default). For example:\n ((c++-mode . 256000) (c-mode . 256000) (rmail-mode . 1048576))\nmeans that the maximum size is 250K for buffers in `c++-mode' or `c-mode', one\nmegabyte for buffers in `rmail-mode', and size is irrelevant otherwise." :type '(choice (const :tag "none" nil) (integer :tag "size") (repeat :menu-tag "mode specific" :tag "mode specific" :value ((t)) (cons :tag "Instance" (radio :tag "Mode" (const :tag "all" t) (symbol :tag "name")) (radio :tag "Size" (const :tag "none" nil) (integer :tag "size"))))) :group 'font-lock) - -(defvar font-lock-keywords nil "\ -A list of the keywords to highlight. -Each element should be of the form: - - MATCHER - (MATCHER . MATCH) - (MATCHER . FACENAME) - (MATCHER . HIGHLIGHT) - (MATCHER HIGHLIGHT ...) - (eval . FORM) - -where HIGHLIGHT should be either MATCH-HIGHLIGHT or MATCH-ANCHORED. - -FORM is an expression, whose value should be a keyword element, -evaluated when the keyword is (first) used in a buffer. This feature -can be used to provide a keyword that can only be generated when Font -Lock mode is actually turned on. - -For highlighting single items, typically only MATCH-HIGHLIGHT is required. -However, if an item or (typically) items is to be highlighted following the -instance of another item (the anchor) then MATCH-ANCHORED may be required. - -MATCH-HIGHLIGHT should be of the form: - - (MATCH FACENAME OVERRIDE LAXMATCH) - -Where MATCHER can be either the regexp to search for, a variable -containing the regexp to search for, or the function to call to make -the search (called with one argument, the limit of the search). MATCH -is the subexpression of MATCHER to be highlighted. FACENAME is either -a symbol naming a face, or an expression whose value is the face name -to use. If you want FACENAME to be a symbol that evaluates to a face, -use a form like \"(progn sym)\". - -OVERRIDE and LAXMATCH are flags. If OVERRIDE is t, existing fontification may -be overwritten. If `keep', only parts not already fontified are highlighted. -If `prepend' or `append', existing fontification is merged with the new, in -which the new or existing fontification, respectively, takes precedence. -If LAXMATCH is non-nil, no error is signalled if there is no MATCH in MATCHER. - -For example, an element of the form highlights (if not already highlighted): - - \"\\\\\\=\" Discrete occurrences of \"foo\" in the value of the - variable `font-lock-keyword-face'. - (\"fu\\\\(bar\\\\)\" . 1) Substring \"bar\" within all occurrences of \"fubar\" in - the value of `font-lock-keyword-face'. - (\"fubar\" . fubar-face) Occurrences of \"fubar\" in the value of `fubar-face'. - (\"foo\\\\|bar\" 0 foo-bar-face t) - Occurrences of either \"foo\" or \"bar\" in the value - of `foo-bar-face', even if already highlighted. - -MATCH-ANCHORED should be of the form: - - (MATCHER PRE-MATCH-FORM POST-MATCH-FORM MATCH-HIGHLIGHT ...) - -Where MATCHER is as for MATCH-HIGHLIGHT with one exception; see below. -PRE-MATCH-FORM and POST-MATCH-FORM are evaluated before the first, and after -the last, instance MATCH-ANCHORED's MATCHER is used. Therefore they can be -used to initialise before, and cleanup after, MATCHER is used. Typically, -PRE-MATCH-FORM is used to move to some position relative to the original -MATCHER, before starting with MATCH-ANCHORED's MATCHER. POST-MATCH-FORM might -be used to move, before resuming with MATCH-ANCHORED's parent's MATCHER. - -For example, an element of the form highlights (if not already highlighted): - - (\"\\\\\\=\" (0 anchor-face) (\"\\\\\\=\" nil nil (0 item-face))) - - Discrete occurrences of \"anchor\" in the value of `anchor-face', and subsequent - discrete occurrences of \"item\" (on the same line) in the value of `item-face'. - (Here PRE-MATCH-FORM and POST-MATCH-FORM are nil. Therefore \"item\" is - initially searched for starting from the end of the match of \"anchor\", and - searching for subsequent instance of \"anchor\" resumes from where searching - for \"item\" concluded.) - -The above-mentioned exception is as follows. The limit of the MATCHER search -defaults to the end of the line after PRE-MATCH-FORM is evaluated. -However, if PRE-MATCH-FORM returns a position greater than the position after -PRE-MATCH-FORM is evaluated, that position is used as the limit of the search. -It is generally a bad idea to return a position greater than the end of the -line, i.e., cause the MATCHER search to span lines. - -Note that the MATCH-ANCHORED feature is experimental; in the future, we may -replace it with other ways of providing this functionality. - -These regular expressions should not match text which spans lines. While -\\[font-lock-fontify-buffer] handles multi-line patterns correctly, updating -when you edit the buffer does not, since it considers text one line at a time. - -Be very careful composing regexps for this list; -the wrong pattern can dramatically slow things down!") - -(make-variable-buffer-local 'font-lock-keywords) - -(defcustom font-lock-mode nil "Non nil means `font-lock-mode' is on" :group 'font-lock :type 'boolean :initialize 'custom-initialize-default :require 'font-lock :set '(lambda (var val) (font-lock-mode (or val 0)))) - -(defvar font-lock-mode-hook nil "\ -Function or functions to run on entry to font-lock-mode.") - -(autoload 'font-lock-mode "font-lock" "\ -Toggle Font Lock Mode. -With arg, turn font-lock mode on if and only if arg is positive. - -When Font Lock mode is enabled, text is fontified as you type it: - - - Comments are displayed in `font-lock-comment-face'; - - Strings are displayed in `font-lock-string-face'; - - Documentation strings (in Lisp-like languages) are displayed in - `font-lock-doc-string-face'; - - Language keywords (\"reserved words\") are displayed in - `font-lock-keyword-face'; - - Function names in their defining form are displayed in - `font-lock-function-name-face'; - - Variable names in their defining form are displayed in - `font-lock-variable-name-face'; - - Type names are displayed in `font-lock-type-face'; - - References appearing in help files and the like are displayed - in `font-lock-reference-face'; - - Preprocessor declarations are displayed in - `font-lock-preprocessor-face'; - - and - - - Certain other expressions are displayed in other faces according - to the value of the variable `font-lock-keywords'. - -Where modes support different levels of fontification, you can use the variable -`font-lock-maximum-decoration' to specify which level you generally prefer. -When you turn Font Lock mode on/off the buffer is fontified/defontified, though -fontification occurs only if the buffer is less than `font-lock-maximum-size'. -To fontify a buffer without turning on Font Lock mode, and regardless of buffer -size, you can use \\[font-lock-fontify-buffer]. - -See the variable `font-lock-keywords' for customization." t nil) - -(autoload 'turn-on-font-lock "font-lock" "\ -Unconditionally turn on Font Lock mode." nil nil) - -(autoload 'turn-off-font-lock "font-lock" "\ -Unconditionally turn off Font Lock mode." nil nil) - -(autoload 'font-lock-fontify-buffer "font-lock" "\ -Fontify the current buffer the way `font-lock-mode' would. -See `font-lock-mode' for details. - -This can take a while for large buffers." t nil) - -(autoload 'font-lock-set-defaults-1 "font-lock" nil nil nil) - -(add-minor-mode 'font-lock-mode " Font") - -;;;*** - -;;;### (autoloads (x-font-build-cache font-default-size-for-device font-default-encoding-for-device font-default-registry-for-device font-default-family-for-device font-default-object-for-device font-default-font-for-device font-create-object) "font" "lisp/font.el") - -(autoload 'font-create-object "font" nil nil nil) - -(autoload 'font-default-font-for-device "font" nil nil nil) - -(autoload 'font-default-object-for-device "font" nil nil nil) - -(autoload 'font-default-family-for-device "font" nil nil nil) - -(autoload 'font-default-registry-for-device "font" nil nil nil) - -(autoload 'font-default-encoding-for-device "font" nil nil nil) - -(autoload 'font-default-size-for-device "font" nil nil nil) - -(autoload 'x-font-build-cache "font" nil nil nil) - -;;;*** - -;;;### (autoloads (gnuserv-start gnuserv-running-p) "gnuserv" "lisp/gnuserv.el") - -(defcustom gnuserv-frame nil "*The frame to be used to display all edited files.\nIf nil, then a new frame is created for each file edited.\nIf t, then the currently selected frame will be used.\nIf a function, then this will be called with a symbol `x' or `tty' as the\nonly argument, and its return value will be interpreted as above." :tag "Gnuserv Frame" :type '(radio (const :tag "Create new frame each time" nil) (const :tag "Use selected frame" t) (function-item :tag "Use main Emacs frame" gnuserv-main-frame-function) (function-item :tag "Use visible frame, otherwise create new" gnuserv-visible-frame-function) (function-item :tag "Create special Gnuserv frame and use it" gnuserv-special-frame-function) (function :tag "Other")) :group 'gnuserv :group 'frames) - -(autoload 'gnuserv-running-p "gnuserv" "\ -Return non-nil if a gnuserv process is running from this XEmacs session." nil nil) - -(autoload 'gnuserv-start "gnuserv" "\ -Allow this Emacs process to be a server for client processes. -This starts a gnuserv communications subprocess through which -client \"editors\" (gnuclient and gnudoit) can send editing commands to -this Emacs job. See the gnuserv(1) manual page for more details. - -Prefix arg means just kill any existing server communications subprocess." t nil) - -;;;*** - -;;;### (autoloads nil "help-macro" "lisp/help-macro.el") - -(defcustom three-step-help t "*Non-nil means give more info about Help command in three steps.\nThe three steps are simple prompt, prompt with all options,\nand window listing and describing the options.\nA value of nil means skip the middle step, so that\n\\[help-command] \\[help-command] gives the window that lists the options." :type 'boolean :group 'help-appearance) - -;;;*** - -;;;### (autoloads (hyper-apropos-popup-menu hyper-apropos-set-variable hyper-set-variable hyper-apropos-read-variable-symbol hyper-describe-function hyper-describe-variable hyper-describe-face hyper-describe-key-briefly hyper-describe-key hyper-apropos) "hyper-apropos" "lisp/hyper-apropos.el") - -(autoload 'hyper-apropos "hyper-apropos" "\ -Display lists of functions and variables matching REGEXP -in buffer \"*Hyper Apropos*\". If optional prefix arg is given, then the -value of `hyper-apropos-programming-apropos' is toggled for this search. -See also `hyper-apropos-mode'." t nil) - -(autoload 'hyper-describe-key "hyper-apropos" nil t nil) - -(autoload 'hyper-describe-key-briefly "hyper-apropos" nil t nil) - -(autoload 'hyper-describe-face "hyper-apropos" "\ -Describe face.. -See also `hyper-apropos' and `hyper-describe-function'." t nil) - -(autoload 'hyper-describe-variable "hyper-apropos" "\ -Hypertext drop-in replacement for `describe-variable'. -See also `hyper-apropos' and `hyper-describe-function'." t nil) - -(autoload 'hyper-describe-function "hyper-apropos" "\ -Hypertext replacement for `describe-function'. Unlike `describe-function' -in that the symbol under the cursor is the default if it is a function. -See also `hyper-apropos' and `hyper-describe-variable'." t nil) - -(autoload 'hyper-apropos-read-variable-symbol "hyper-apropos" "\ -Hypertext drop-in replacement for `describe-variable'. -See also `hyper-apropos' and `hyper-describe-function'." nil nil) - -(define-obsolete-function-alias 'hypropos-read-variable-symbol 'hyper-apropos-read-variable-symbol) - -(define-obsolete-function-alias 'hypropos-get-doc 'hyper-apropos-get-doc) - -(autoload 'hyper-set-variable "hyper-apropos" nil t nil) - -(autoload 'hyper-apropos-set-variable "hyper-apropos" "\ -Interactively set the variable on the current line." t nil) - -(define-obsolete-function-alias 'hypropos-set-variable 'hyper-apropos-set-variable) - -(autoload 'hyper-apropos-popup-menu "hyper-apropos" nil t nil) - -(define-obsolete-function-alias 'hypropos-popup-menu 'hyper-apropos-popup-menu) - -;;;*** - -;;;### (autoloads (Info-elisp-ref Info-emacs-key Info-goto-emacs-key-command-node Info-goto-emacs-command-node Info-emacs-command Info-search Info-visit-file Info-goto-node Info-batch-rebuild-dir Info-query info) "info" "lisp/info.el") - -(defvar Info-directory-list nil "\ -List of directories to search for Info documentation files. - -The first directory in this list, the \"dir\" file there will become -the (dir)Top node of the Info documentation tree. If you wish to -modify the info search path, use `M-x customize-variable, -Info-directory-list' to do so.") - -(autoload 'info "info" "\ -Enter Info, the documentation browser. -Optional argument FILE specifies the file to examine; -the default is the top-level directory of Info. - -In interactive use, a prefix argument directs this command -to read a file name from the minibuffer." t nil) - -(autoload 'Info-query "info" "\ -Enter Info, the documentation browser. Prompt for name of Info file." t nil) - -(autoload 'Info-batch-rebuild-dir "info" "\ -(Re)build info `dir' files in the directories remaining on the command line. -Use this from the command line, with `-batch'; -it won't work in an interactive Emacs. -Each file is processed even if an error occurred previously. -For example, invoke \"xemacs -batch -f Info-batch-rebuild-dir /usr/local/info\"" nil nil) - -(autoload 'Info-goto-node "info" "\ -Go to info node named NAME. Give just NODENAME or (FILENAME)NODENAME. -Actually, the following interpretations of NAME are tried in order: - (FILENAME)NODENAME - (FILENAME) (using Top node) - NODENAME (in current file) - TAGNAME (see below) - FILENAME (using Top node) -where TAGNAME is a string that appears in quotes: \"TAGNAME\", in an -annotation for any node of any file. (See `a' and `x' commands.)" t nil) - -(autoload 'Info-visit-file "info" "\ -Directly visit an info file." t nil) - -(autoload 'Info-search "info" "\ -Search for REGEXP, starting from point, and select node it's found in." t nil) - -(autoload 'Info-emacs-command "info" "\ -Look up an Emacs command in the Emacs manual in the Info system. -This command is designed to be used whether you are already in Info or not." t nil) - -(autoload 'Info-goto-emacs-command-node "info" "\ -Look up an Emacs command in the Emacs manual in the Info system. -This command is designed to be used whether you are already in Info or not." t nil) - -(autoload 'Info-goto-emacs-key-command-node "info" "\ -Look up an Emacs key sequence in the Emacs manual in the Info system. -This command is designed to be used whether you are already in Info or not." t nil) - -(autoload 'Info-emacs-key "info" "\ -Look up an Emacs key sequence in the Emacs manual in the Info system. -This command is designed to be used whether you are already in Info or not." t nil) - -(autoload 'Info-elisp-ref "info" "\ -Look up an Emacs Lisp function in the Elisp manual in the Info system. -This command is designed to be used whether you are already in Info or not." t nil) - -;;;*** - -;;;### (autoloads nil "itimer-autosave" "lisp/itimer-autosave.el") - -;;;*** - -;;;### (autoloads nil "loaddefs" "lisp/loaddefs.el") - -;;;*** - -;;;### (autoloads nil "loadhist" "lisp/loadhist.el") - -;;;*** - -;;;### (autoloads (mwheel-install) "mwheel" "lisp/mwheel.el") - -(autoload 'mwheel-install "mwheel" "\ -Enable mouse wheel support." nil nil) - -;;;*** - -;;;### (autoloads (package-admin-add-binary-package package-admin-add-single-file-package) "package-admin" "lisp/package-admin.el") - -(autoload 'package-admin-add-single-file-package "package-admin" "\ -Install a single file Lisp package into XEmacs package hierarchy. -`file' should be the full path to the lisp file to install. -`destdir' should be a simple directory name. -The optional `pkg-dir' can be used to override the default package hierarchy -\(car (last late-packages))." t nil) - -(autoload 'package-admin-add-binary-package "package-admin" "\ -Install a pre-bytecompiled XEmacs package into package hierarchy." t nil) - -;;;*** - -;;;### (autoloads (package-get-custom package-get-package-provider package-get package-get-all package-get-update-all) "package-get" "lisp/package-get.el") - -(autoload 'package-get-update-all "package-get" "\ -Fetch and install the latest versions of all currently installed packages." t nil) - -(autoload 'package-get-all "package-get" "\ -Fetch PACKAGE with VERSION and all other required packages. -Uses `package-get-base' to determine just what is required and what -package provides that functionality. If VERSION is nil, retrieves -latest version. Optional argument FETCHED-PACKAGES is used to keep -track of packages already fetched." t nil) - -(autoload 'package-get "package-get" "\ -Fetch PACKAGE from remote site. -Optional arguments VERSION indicates which version to retrieve, nil -means most recent version. CONFLICT indicates what happens if the -package is already installed. Valid values for CONFLICT are: -'always always retrieve the package even if it is already installed -'never do not retrieve the package if it is installed. - -The value of `package-get-base' is used to determine what files should -be retrieved. The value of `package-get-remote' is used to determine -where a package should be retrieved from. The sites are tried in -order so one is better off listing easily reached sites first. - -Once the package is retrieved, its md5 checksum is computed. If that -sum does not match that stored in `package-get-base' for this version -of the package, an error is signalled." t nil) - -(autoload 'package-get-package-provider "package-get" "\ -Search for a package that provides SYM and return the name and - version. Searches in `package-get-base' for SYM. If SYM is a - consp, then it must match a corresponding (provide (SYM VERSION)) from - the package." t nil) - -(autoload 'package-get-custom "package-get" "\ -Fetch and install the latest versions of all customized packages." t nil) - -;;;*** - -;;;### (autoloads (picture-mode) "picture" "lisp/picture.el") - -(autoload 'picture-mode "picture" "\ -Switch to Picture mode, in which a quarter-plane screen model is used. -Printing characters replace instead of inserting themselves with motion -afterwards settable by these commands: - C-c < Move left after insertion. - C-c > Move right after insertion. - C-c ^ Move up after insertion. - C-c . Move down after insertion. - C-c ` Move northwest (nw) after insertion. - C-c ' Move northeast (ne) after insertion. - C-c / Move southwest (sw) after insertion. - C-c \\ Move southeast (se) after insertion. -The current direction is displayed in the modeline. The initial -direction is right. Whitespace is inserted and tabs are changed to -spaces when required by movement. You can move around in the buffer -with these commands: - \\[picture-move-down] Move vertically to SAME column in previous line. - \\[picture-move-up] Move vertically to SAME column in next line. - \\[picture-end-of-line] Move to column following last non-whitespace character. - \\[picture-forward-column] Move right inserting spaces if required. - \\[picture-backward-column] Move left changing tabs to spaces if required. - C-c C-f Move in direction of current picture motion. - C-c C-b Move in opposite direction of current picture motion. - Return Move to beginning of next line. -You can edit tabular text with these commands: - M-Tab Move to column beneath (or at) next interesting character. - `Indents' relative to a previous line. - Tab Move to next stop in tab stop list. - C-c Tab Set tab stops according to context of this line. - With ARG resets tab stops to default (global) value. - See also documentation of variable picture-tab-chars - which defines \"interesting character\". You can manually - change the tab stop list with command \\[edit-tab-stops]. -You can manipulate text with these commands: - C-d Clear (replace) ARG columns after point without moving. - C-c C-d Delete char at point - the command normally assigned to C-d. - \\[picture-backward-clear-column] Clear (replace) ARG columns before point, moving back over them. - \\[picture-clear-line] Clear ARG lines, advancing over them. The cleared - text is saved in the kill ring. - \\[picture-open-line] Open blank line(s) beneath current line. -You can manipulate rectangles with these commands: - C-c C-k Clear (or kill) a rectangle and save it. - C-c C-w Like C-c C-k except rectangle is saved in named register. - C-c C-y Overlay (or insert) currently saved rectangle at point. - C-c C-x Like C-c C-y except rectangle is taken from named register. - \\[copy-rectangle-to-register] Copies a rectangle to a register. - \\[advertised-undo] Can undo effects of rectangle overlay commands - commands if invoked soon enough. -You can return to the previous mode with: - C-c C-c Which also strips trailing whitespace from every line. - Stripping is suppressed by supplying an argument. - -Entry to this mode calls the value of picture-mode-hook if non-nil. - -Note that Picture mode commands will work outside of Picture mode, but -they are not defaultly assigned to keys." t nil) - -(defalias 'edit-picture 'picture-mode) - -;;;*** - -;;;### (autoloads (clear-rectangle string-rectangle open-rectangle insert-rectangle yank-rectangle kill-rectangle extract-rectangle delete-extract-rectangle delete-rectangle) "rect" "lisp/rect.el") - -(autoload 'delete-rectangle "rect" "\ -Delete (don't save) text in rectangle with point and mark as corners. -The same range of columns is deleted in each line starting with the line -where the region begins and ending with the line where the region ends." t nil) - -(autoload 'delete-extract-rectangle "rect" "\ -Delete contents of rectangle and return it as a list of strings. -Arguments START and END are the corners of the rectangle. -The value is list of strings, one for each line of the rectangle." nil nil) - -(autoload 'extract-rectangle "rect" "\ -Return contents of rectangle with corners at START and END. -Value is list of strings, one for each line of the rectangle." nil nil) - -(defvar killed-rectangle nil "\ -Rectangle for yank-rectangle to insert.") - -(autoload 'kill-rectangle "rect" "\ -Delete rectangle with corners at point and mark; save as last killed one. -Calling from program, supply two args START and END, buffer positions. -But in programs you might prefer to use `delete-extract-rectangle'." t nil) - -(autoload 'yank-rectangle "rect" "\ -Yank the last killed rectangle with upper left corner at point." t nil) - -(autoload 'insert-rectangle "rect" "\ -Insert text of RECTANGLE with upper left corner at point. -RECTANGLE's first line is inserted at point, its second -line is inserted at a point vertically under point, etc. -RECTANGLE should be a list of strings. -After this command, the mark is at the upper left corner -and point is at the lower right corner." nil nil) - -(autoload 'open-rectangle "rect" "\ -Blank out rectangle with corners at point and mark, shifting text right. -The text previously in the region is not overwritten by the blanks, -but instead winds up to the right of the rectangle." t nil) - -(autoload 'string-rectangle "rect" "\ -Insert STRING on each line of the region-rectangle, shifting text right. -The left edge of the rectangle specifies the column for insertion. -This command does not delete or overwrite any existing text. - -Called from a program, takes three args; START, END and STRING." t nil) - -(autoload 'clear-rectangle "rect" "\ -Blank out rectangle with corners at point and mark. -The text previously in the region is overwritten by the blanks. -When called from a program, requires two args which specify the corners." t nil) - -;;;*** - -;;;### (autoloads (list-load-path-shadows) "shadow" "lisp/shadow.el") - -(autoload 'list-load-path-shadows "shadow" "\ -Display a list of Emacs Lisp files that shadow other files. - -This function lists potential load-path problems. Directories in the -`load-path' variable are searched, in order, for Emacs Lisp -files. When a previously encountered file name is found again, a -message is displayed indicating that the later file is \"hidden\" by -the earlier. - -For example, suppose `load-path' is set to - -\(\"/usr/gnu/emacs/site-lisp\" \"/usr/gnu/emacs/share/emacs/19.30/lisp\") - -and that each of these directories contains a file called XXX.el. Then -XXX.el in the site-lisp directory is referred to by all of: -\(require 'XXX), (autoload .... \"XXX\"), (load-library \"XXX\") etc. - -The first XXX.el file prevents emacs from seeing the second (unless -the second is loaded explicitly via load-file). - -When not intended, such shadowings can be the source of subtle -problems. For example, the above situation may have arisen because the -XXX package was not distributed with versions of emacs prior to -19.30. An emacs maintainer downloaded XXX from elsewhere and installed -it. Later, XXX was updated and included in the emacs distribution. -Unless the emacs maintainer checks for this, the new version of XXX -will be hidden behind the old (which may no longer work with the new -emacs version). - -This function performs these checks and flags all possible -shadowings. Because a .el file may exist without a corresponding .elc -\(or vice-versa), these suffixes are essentially ignored. A file -XXX.elc in an early directory (that does not contain XXX.el) is -considered to shadow a later file XXX.el, and vice-versa. - -When run interactively, the shadowings (if any) are displayed in a -buffer called `*Shadows*'. Shadowings are located by calling the -\(non-interactive) companion function, `find-emacs-lisp-shadows'." t nil) - -;;;*** - -;;;### (autoloads (load-default-sounds load-sound-file) "sound" "lisp/sound.el") - -(or sound-alist (setq sound-alist '((ready nil) (warp nil)))) - -(autoload 'load-sound-file "sound" "\ -Read in an audio-file and add it to the sound-alist. - -You can only play sound files if you are running on display 0 of the -console of a machine with native sound support or running a NetAudio -server and XEmacs has the necessary sound support compiled in. - -The sound file must be in the Sun/NeXT U-LAW format, except on Linux, -where .wav files are also supported by the sound card drivers." t nil) - -(autoload 'load-default-sounds "sound" "\ -Load and install some sound files as beep-types, using -`load-sound-file'. This only works if you're on display 0 of the -console of a machine with native sound support or running a NetAudio -server and XEmacs has the necessary sound support compiled in." t nil) - -;;;*** - -;;;### (autoloads (ask-user-about-supersession-threat ask-user-about-lock) "userlock" "lisp/userlock.el") - -(autoload 'ask-user-about-lock "userlock" "\ -Ask user what to do when he wants to edit FILE but it is locked by USER. -This function has a choice of three things to do: - do (signal 'file-locked (list FILE USER)) - to refrain from editing the file - return t (grab the lock on the file) - return nil (edit the file even though it is locked). -You can rewrite it to use any criterion you like to choose which one to do." nil nil) - -(autoload 'ask-user-about-supersession-threat "userlock" "\ -Ask a user who is about to modify an obsolete buffer what to do. -This function has two choices: it can return, in which case the modification -of the buffer will proceed, or it can (signal 'file-supersession (file)), -in which case the proposed buffer modification will not be made. - -You can rewrite this to use any criterion you like to choose which one to do. -The buffer in question is current when this function is called." nil nil) - -;;;*** - -;;;### (autoloads (auto-view-mode view-major-mode view-mode view-minor-mode view-buffer-other-window view-file-other-window view-buffer view-file) "view-less" "lisp/view-less.el") - -(defvar view-minor-mode-map (let ((map (make-keymap))) (set-keymap-name map 'view-minor-mode-map) (suppress-keymap map) (define-key map "-" 'negative-argument) (define-key map " " 'scroll-up) (define-key map "f" 'scroll-up) (define-key map "b" 'scroll-down) (define-key map 'backspace 'scroll-down) (define-key map 'delete 'scroll-down) (define-key map " " 'view-scroll-lines-up) (define-key map "\n" 'view-scroll-lines-up) (define-key map "e" 'view-scroll-lines-up) (define-key map "j" 'view-scroll-lines-up) (define-key map "y" 'view-scroll-lines-down) (define-key map "k" 'view-scroll-lines-down) (define-key map "d" 'view-scroll-some-lines-up) (define-key map "u" 'view-scroll-some-lines-down) (define-key map "r" 'recenter) (define-key map "t" 'toggle-truncate-lines) (define-key map "N" 'view-buffer) (define-key map "E" 'view-file) (define-key map "P" 'view-buffer) (define-key map "!" 'shell-command) (define-key map "|" 'shell-command-on-region) (define-key map "=" 'what-line) (define-key map "?" 'view-search-backward) (define-key map "h" 'view-mode-describe) (define-key map "s" 'view-repeat-search) (define-key map "n" 'view-repeat-search) (define-key map "/" 'view-search-forward) (define-key map "\\" 'view-search-backward) (define-key map "g" 'view-goto-line) (define-key map "G" 'view-last-windowful) (define-key map "%" 'view-goto-percent) (define-key map "p" 'view-goto-percent) (define-key map "m" 'point-to-register) (define-key map "'" 'register-to-point) (define-key map "C" 'view-cleanup-backspaces) (define-key map "" 'view-quit) (define-key map "" 'view-quit-toggle-ro) (define-key map "q" 'view-quit) map)) - -(defvar view-mode-map (let ((map (copy-keymap view-minor-mode-map))) (set-keymap-name map 'view-mode-map) map)) - -(autoload 'view-file "view-less" "\ -Find FILE, enter view mode. With prefix arg OTHER-P, use other window." t nil) - -(autoload 'view-buffer "view-less" "\ -Switch to BUF, enter view mode. With prefix arg use other window." t nil) - -(autoload 'view-file-other-window "view-less" "\ -Find FILE in other window, and enter view mode." t nil) - -(autoload 'view-buffer-other-window "view-less" "\ -Switch to BUFFER in another window, and enter view mode." t nil) - -(autoload 'view-minor-mode "view-less" "\ -Minor mode for viewing text, with bindings like `less'. -Commands are: -\\ -0..9 prefix args -- prefix minus -\\[scroll-up] page forward -\\[scroll-down] page back -\\[view-scroll-lines-up] scroll prefix-arg lines forward, default 1. -\\[view-scroll-lines-down] scroll prefix-arg lines backward, default 1. -\\[view-scroll-some-lines-down] scroll prefix-arg lines backward, default 10. -\\[view-scroll-some-lines-up] scroll prefix-arg lines forward, default 10. -\\[what-line] print line number -\\[view-mode-describe] print this help message -\\[view-search-forward] regexp search, uses previous string if you just hit RET -\\[view-search-backward] as above but searches backward -\\[view-repeat-search] repeat last search -\\[view-goto-line] goto line prefix-arg, default 1 -\\[view-last-windowful] goto line prefix-arg, default last line -\\[view-goto-percent] goto a position by percentage -\\[toggle-truncate-lines] toggle truncate-lines -\\[view-file] view another file -\\[view-buffer] view another buffer -\\[view-cleanup-backspaces] cleanup backspace constructions -\\[shell-command] execute a shell command -\\[shell-command-on-region] execute a shell command with the region as input -\\[view-quit] exit view-mode, and bury the current buffer. - -If invoked with the optional (prefix) arg non-nil, view-mode cleans up -backspace constructions. - -More precisely: -\\{view-minor-mode-map}" t nil) - -(autoload 'view-mode "view-less" "\ -View the current buffer using view-minor-mode. This exists to be 99.9% -compatible with the implementations of `view-mode' in view.el and older -versions of view-less.el." t nil) - -(autoload 'view-major-mode "view-less" "\ -View the current buffer using view-mode, as a major mode. -This function has a nonstandard name because `view-mode' is wrongly -named but is like this for compatibility reasons." t nil) - -(autoload 'auto-view-mode "view-less" "\ -If the file of the current buffer is not writable, call view-mode. -This is meant to be added to `find-file-hooks'." nil nil) - -;;;*** - -;;;### (autoloads (widget-minor-mode widget-browse-other-window widget-browse widget-browse-at) "wid-browse" "lisp/wid-browse.el") - -(autoload 'widget-browse-at "wid-browse" "\ -Browse the widget under point." t nil) - -(autoload 'widget-browse "wid-browse" "\ -Create a widget browser for WIDGET." t nil) - -(autoload 'widget-browse-other-window "wid-browse" "\ -Show widget browser for WIDGET in other window." t nil) - -(autoload 'widget-minor-mode "wid-browse" "\ -Togle minor mode for traversing widgets. -With arg, turn widget mode on if and only if arg is positive." t nil) - -;;;*** - -;;;### (autoloads (widget-delete widget-create widget-prompt-value) "wid-edit" "lisp/wid-edit.el") - -(autoload 'widget-prompt-value "wid-edit" "\ -Prompt for a value matching WIDGET, using PROMPT. -The current value is assumed to be VALUE, unless UNBOUND is non-nil." nil nil) - -(autoload 'widget-create "wid-edit" "\ -Create widget of TYPE. -The optional ARGS are additional keyword arguments." nil nil) - -(autoload 'widget-delete "wid-edit" "\ -Delete WIDGET." nil nil) - -;;;*** - -;;;### (autoloads (font-menu-weight-constructor font-menu-size-constructor font-menu-family-constructor reset-device-font-menus) "x-font-menu" "lisp/x-font-menu.el") - -(defcustom font-menu-ignore-scaled-fonts t "*If non-nil, then the font menu will try to show only bitmap fonts." :type 'boolean :group 'x) - -(defcustom font-menu-this-frame-only-p nil "*If non-nil, then changing the default font from the font menu will only\naffect one frame instead of all frames." :type 'boolean :group 'x) - -(fset 'install-font-menus 'reset-device-font-menus) - -(autoload 'reset-device-font-menus "x-font-menu" "\ -Generates the `Font', `Size', and `Weight' submenus for the Options menu. -This is run the first time that a font-menu is needed for each device. -If you don't like the lazy invocation of this function, you can add it to -`create-device-hook' and that will make the font menus respond more quickly -when they are selected for the first time. If you add fonts to your system, -or if you change your font path, you can call this to re-initialize the menus." nil nil) - -(autoload 'font-menu-family-constructor "x-font-menu" nil nil nil) - -(autoload 'font-menu-size-constructor "x-font-menu" nil nil nil) - -(autoload 'font-menu-weight-constructor "x-font-menu" nil nil nil) - -;;;*** - -(provide 'Standard-autoloads) diff --cc lisp/bytecomp.el index d8ab789,95bce46..0000000 deleted file mode 100644,100644 --- a/lisp/bytecomp.el +++ /dev/null @@@ -1,4162 -1,4157 +1,0 @@@ --;;; bytecomp.el --- compilation of Lisp code into byte code. -- --;;; Copyright (C) 1985-1987, 1991-1994 Free Software Foundation, Inc. --;;; Copyright (C) 1996 Ben Wing. -- --;; Author: Jamie Zawinski --;; Hallvard Furuseth --;; Keywords: internal -- --;; Subsequently modified by RMS and others. -- - (defconst byte-compile-version (purecopy "2.26 XEmacs; 1998-10-07.")) - - ;; This file is part of XEmacs. - - ;; XEmacs 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 2, or (at your option) - ;; any later version. - - ;; XEmacs 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 XEmacs; see the file COPYING. If not, write to the - ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, - ;; Boston, MA 02111-1307, USA. - - ;;; Synched up with: FSF 19.30. - - ;;; Commentary: - - ;; The Emacs Lisp byte compiler. This crunches lisp source into a - ;; sort of p-code which takes up less space and can be interpreted - ;; faster. The user entry points are byte-compile-file, - ;; byte-recompile-directory and byte-compile-buffer. - - ;;; Code: - - ;;; ======================================================================== - ;;; Entry points: - ;;; byte-recompile-directory, byte-compile-file, - ;;; batch-byte-compile, batch-byte-recompile-directory, - ;;; byte-compile, compile-defun, - ;;; display-call-tree - ;;; RMS says: - ;;; (byte-compile-buffer and byte-compile-and-load-file were turned off - ;;; because they are not terribly useful and get in the way of completion.) - ;;; But I'm leaving them. --ben - - ;;; This version of the byte compiler has the following improvements: - ;;; + optimization of compiled code: - ;;; - removal of unreachable code; - ;;; - removal of calls to side-effectless functions whose return-value - ;;; is unused; - ;;; - compile-time evaluation of safe constant forms, such as (consp nil) - ;;; and (ash 1 6); - ;;; - open-coding of literal lambdas; - ;;; - peephole optimization of emitted code; - ;;; - trivial functions are left uncompiled for speed. - ;;; + support for inline functions; - ;;; + compile-time evaluation of arbitrary expressions; - ;;; + compile-time warning messages for: - ;;; - functions being redefined with incompatible arglists; - ;;; - functions being redefined as macros, or vice-versa; - ;;; - functions or macros defined multiple times in the same file; - ;;; - functions being called with the incorrect number of arguments; - ;;; - functions being called which are not defined globally, in the - ;;; file, or as autoloads; - ;;; - assignment and reference of undeclared free variables; - ;;; - various syntax errors; - ;;; + correct compilation of nested defuns, defmacros, defvars and defsubsts; - ;;; + correct compilation of top-level uses of macros; - ;;; + the ability to generate a histogram of functions called. - - ;;; User customization variables: - ;;; - ;;; byte-compile-verbose Whether to report the function currently being - ;;; compiled in the minibuffer; - ;;; byte-optimize Whether to do optimizations; this may be - ;;; t, nil, 'source, or 'byte; - ;;; byte-optimize-log Whether to report (in excruciating detail) - ;;; exactly which optimizations have been made. - ;;; This may be t, nil, 'source, or 'byte; - ;;; byte-compile-error-on-warn Whether to stop compilation when a warning is - ;;; produced; - ;;; byte-compile-delete-errors Whether the optimizer may delete calls or - ;;; variable references that are side-effect-free - ;;; except that they may return an error. - ;;; byte-compile-generate-call-tree Whether to generate a histogram of - ;;; function calls. This can be useful for - ;;; finding unused functions, as well as simple - ;;; performance metering. - ;;; byte-compile-warnings List of warnings to issue, or t. May contain - ;;; 'free-vars (references to variables not in the - ;;; current lexical scope) - ;;; 'unused-vars (non-global variables bound but - ;;; not referenced) - ;;; 'unresolved (calls to unknown functions) - ;;; 'callargs (lambda calls with args that don't - ;;; match the lambda's definition) - ;;; 'subr-callargs (calls to subrs with args that - ;;; don't match the subr's definition) - ;;; 'redefine (function cell redefined from - ;;; a macro to a lambda or vice versa, - ;;; or redefined to take other args) - ;;; 'obsolete (obsolete variables and functions) - ;;; 'pedantic (references to Emacs-compatible - ;;; symbols) - ;;; byte-compile-emacs19-compatibility Whether the compiler should - ;;; generate .elc files which can be loaded into - ;;; generic emacs 19. - ;;; emacs-lisp-file-regexp Regexp for the extension of source-files; - ;;; see also the function byte-compile-dest-file. - ;;; byte-compile-overwrite-file If nil, delete old .elc files before saving. - ;;; - ;;; Most of the above parameters can also be set on a file-by-file basis; see - ;;; the documentation of the `byte-compiler-options' macro. - - ;;; New Features: - ;;; - ;;; o The form `defsubst' is just like `defun', except that the function - ;;; generated will be open-coded in compiled code which uses it. This - ;;; means that no function call will be generated, it will simply be - ;;; spliced in. Lisp functions calls are very slow, so this can be a - ;;; big win. - ;;; - ;;; You can generally accomplish the same thing with `defmacro', but in - ;;; that case, the defined procedure can't be used as an argument to - ;;; mapcar, etc. - ;;; - ;;; o You can make a given function be inline even if it has already been - ;;; defined with `defun' by using the `proclaim-inline' form like so: - ;;; (proclaim-inline my-function) - ;;; This is, in fact, exactly what `defsubst' does. To make a function no - ;;; longer be inline, you must use `proclaim-notinline'. Beware that if - ;;; you define a function with `defsubst' and later redefine it with - ;;; `defun', it will still be open-coded until you use proclaim-notinline. - ;;; - ;;; o You can also open-code one particular call to a function without - ;;; open-coding all calls. Use the 'inline' form to do this, like so: - ;;; - ;;; (inline (foo 1 2 3)) ;; `foo' will be open-coded - ;;; or... - ;;; (inline ;; `foo' and `baz' will be - ;;; (foo 1 2 3 (bar 5)) ;; open-coded, but `bar' will not. - ;;; (baz 0)) - ;;; - ;;; o It is possible to open-code a function in the same file it is defined - ;;; in without having to load that file before compiling it. the - ;;; byte-compiler has been modified to remember function definitions in - ;;; the compilation environment in the same way that it remembers macro - ;;; definitions. - ;;; - ;;; o Forms like ((lambda ...) ...) are open-coded. - ;;; - ;;; o The form `eval-when-compile' is like progn, except that the body - ;;; is evaluated at compile-time. When it appears at top-level, this - ;;; is analogous to the Common Lisp idiom (eval-when (compile) ...). - ;;; When it does not appear at top-level, it is similar to the - ;;; Common Lisp #. reader macro (but not in interpreted code). - ;;; - ;;; o The form `eval-and-compile' is similar to eval-when-compile, but - ;;; the whole form is evalled both at compile-time and at run-time. - ;;; - ;;; o The command M-x byte-compile-and-load-file does what you'd think. - ;;; - ;;; o The command compile-defun is analogous to eval-defun. - ;;; - ;;; o If you run byte-compile-file on a filename which is visited in a - ;;; buffer, and that buffer is modified, you are asked whether you want - ;;; to save the buffer before compiling. - ;;; - ;;; o You can add this to /etc/magic to make file(1) recognize the files - ;;; generated by this compiler: - ;;; - ;;; 0 string ;ELC GNU Emacs Lisp compiled file, - ;;; >4 byte x version %d - ;;; - ;;; TO DO: - ;;; - ;;; o Should implement declarations and proclamations, notably special, - ;;; unspecial, and ignore. Do this in such a way as to not break cl.el. - ;;; o The bound-but-not-used warnings are not issued for variables whose - ;;; bindings were established in the arglist, due to the lack of an - ;;; ignore declaration. Once ignore exists, this should be turned on. - ;;; o Warn about functions and variables defined but not used? - ;;; Maybe add some kind of `export' declaration for this? - ;;; (With interactive functions being automatically exported?) - ;;; o Any reference to a variable, even one which is a no-op, will cause - ;;; the warning not to be given. Possibly we could use the for-effect - ;;; flag to determine when this reference is useless; possibly more - ;;; complex flow analysis would be necessary. - ;;; o If the optimizer deletes a variable reference, we might be left with - ;;; a bound-but-not-referenced warning. Generally this is ok, but not if - ;;; it's a synergistic result of macroexpansion. Need some way to note - ;;; that a varref is being optimized away? Of course it would be nice to - ;;; optimize away the binding too, someday, but it's unsafe today. - ;;; o (See byte-optimize.el for the optimization TODO list.) - - (require 'backquote) - - (or (fboundp 'defsubst) - ;; This really ought to be loaded already! - (load-library "bytecomp-runtime")) - - (eval-when-compile - (defvar byte-compile-single-version nil - "If this is true, the choice of emacs version (v19 or v20) byte-codes will - be hard-coded into bytecomp when it compiles itself. If the compiler itself - is compiled with optimization, this causes a speedup.") - - (cond - (byte-compile-single-version - (defmacro byte-compile-single-version () t) - (defmacro byte-compile-version-cond (cond) (list 'quote (eval cond)))) - (t - (defmacro byte-compile-single-version () nil) - (defmacro byte-compile-version-cond (cond) cond))) - ) - - (defvar emacs-lisp-file-regexp (purecopy "\\.el$") - "*Regexp which matches Emacs Lisp source files. - You may want to redefine `byte-compile-dest-file' if you change this.") - - ;; This enables file name handlers such as jka-compr - ;; to remove parts of the file name that should not be copied - ;; through to the output file name. - (defun byte-compiler-base-file-name (filename) - (let ((handler (find-file-name-handler filename - 'byte-compiler-base-file-name))) - (if handler - (funcall handler 'byte-compiler-base-file-name filename) - filename))) - - (unless (fboundp 'byte-compile-dest-file) - ;; The user may want to redefine this along with emacs-lisp-file-regexp, - ;; so only define it if it is undefined. - (defun byte-compile-dest-file (filename) - "Convert an Emacs Lisp source file name to a compiled file name." - (setq filename (byte-compiler-base-file-name filename)) - (setq filename (file-name-sans-versions filename)) - (if (string-match emacs-lisp-file-regexp filename) - (concat (substring filename 0 (match-beginning 0)) ".elc") - (concat filename ".elc")))) - - ;; This can be the 'byte-compile property of any symbol. - (autoload 'byte-compile-inline-expand "byte-optimize") - - ;; This is the entrypoint to the lapcode optimizer pass1. - (autoload 'byte-optimize-form "byte-optimize") - ;; This is the entrypoint to the lapcode optimizer pass2. - (autoload 'byte-optimize-lapcode "byte-optimize") - (autoload 'byte-compile-unfold-lambda "byte-optimize") - - ;; This is the entry point to the decompiler, which is used by the - ;; disassembler. The disassembler just requires 'byte-compile, but - ;; that doesn't define this function, so this seems to be a reasonable - ;; thing to do. - (autoload 'byte-decompile-bytecode "byte-optimize") - - (defvar byte-compile-verbose - (and (not noninteractive) (> (device-baud-rate) search-slow-speed)) - "*Non-nil means print messages describing progress of byte-compiler.") - - (defvar byte-compile-emacs19-compatibility - (not (emacs-version>= 20)) - "*Non-nil means generate output that can run in Emacs 19.") - - (defvar byte-compile-print-gensym t - "*Non-nil means generate code that creates unique symbols at run-time. - This is achieved by printing uninterned symbols using the `#:SYMBOL' - notation, so that they will be read uninterned when run. - - With this feature, code that uses uninterned symbols in macros will - not be runnable under pre-21.0 XEmacsen. - - When `byte-compile-emacs19-compatibility' is non-nil, this variable is - ignored and considered to be nil.") - - (defvar byte-optimize t - "*Enables optimization in the byte compiler. - nil means don't do any optimization. - t means do all optimizations. - `source' means do source-level optimizations only. - `byte' means do code-level optimizations only.") - - (defvar byte-compile-delete-errors t - "*If non-nil, the optimizer may delete forms that may signal an error. - This includes variable references and calls to functions such as `car'.") - - ;; XEmacs addition - (defvar byte-compile-new-bytecodes nil - "This is completely ignored. It is only around for backwards - compatibility.") - - - ;; FSF enables byte-compile-dynamic-docstrings but not byte-compile-dynamic - ;; by default. This would be a reasonable conservative approach except - ;; for the fact that if you enable either of these, you get incompatible - ;; byte code that can't be read by XEmacs 19.13 or before or FSF 19.28 or - ;; before. - ;; - ;; Therefore, neither is enabled for 19.14. Both are enabled for 20.0 - ;; because we have no reason to be conservative about changing the - ;; way things work. (Ben) - - ;; However, I don't think that defaulting byte-compile-dynamic to nil - ;; is a compatibility issue - rather it is a performance issue. - ;; Therefore I am setting byte-compile-dynamic back to nil. (mrb) - - (defvar byte-compile-dynamic nil - "*If non-nil, compile function bodies so they load lazily. - They are hidden comments in the compiled file, and brought into core when the - function is called. - - To enable this option, make it a file-local variable - in the source file you want it to apply to. - For example, add -*-byte-compile-dynamic: t;-*- on the first line. - - When this option is true, if you load the compiled file and then move it, - the functions you loaded will not be able to run.") - - (defvar byte-compile-dynamic-docstrings (emacs-version>= 20) - "*If non-nil, compile doc strings for lazy access. - We bury the doc strings of functions and variables - inside comments in the file, and bring them into core only when they - are actually needed. - - When this option is true, if you load the compiled file and then move it, - you won't be able to find the documentation of anything in that file. - - To disable this option for a certain file, make it a file-local variable - in the source file. For example, add this to the first line: - -*-byte-compile-dynamic-docstrings:nil;-*- - You can also set the variable globally. - - This option is enabled by default because it reduces Emacs memory usage.") - - (defvar byte-optimize-log nil - "*If true, the byte-compiler will log its optimizations into *Compile-Log*. - If this is 'source, then only source-level optimizations will be logged. - If it is 'byte, then only byte-level optimizations will be logged.") - - (defvar byte-compile-error-on-warn nil - "*If true, the byte-compiler reports warnings with `error'.") - - ;; byte-compile-warning-types in FSF. - (defvar byte-compile-default-warnings - '(redefine callargs subr-callargs free-vars unresolved unused-vars obsolete) - "*The warnings used when byte-compile-warnings is t.") - - (defvar byte-compile-warnings t - "*List of warnings that the compiler should issue (t for the default set). - Elements of the list may be: - - free-vars references to variables not in the current lexical scope. - unused-vars references to non-global variables bound but not referenced. - unresolved calls to unknown functions. - callargs lambda calls with args that don't match the definition. - subr-callargs calls to subrs with args that don't match the definition. - redefine function cell redefined from a macro to a lambda or vice - versa, or redefined to take a different number of arguments. - obsolete use of an obsolete function or variable. - pedantic warn of use of compatible symbols. - - The default set is specified by `byte-compile-default-warnings' and - normally encompasses all possible warnings. - - See also the macro `byte-compiler-options'.") - - (defvar byte-compile-generate-call-tree nil - "*Non-nil means collect call-graph information when compiling. - This records functions that were called and from where. - If the value is t, compilation displays the call graph when it finishes. - If the value is neither t nor nil, compilation asks you whether to display - the graph. - - The call tree only lists functions called, not macros used. Those functions - which the byte-code interpreter knows about directly (eq, cons, etc.) are - not reported. - - The call tree also lists those functions which are not known to be called - \(that is, to which no calls have been compiled). Functions which can be - invoked interactively are excluded from this list.") - - (defconst byte-compile-call-tree nil "Alist of functions and their call tree. - Each element looks like - - \(FUNCTION CALLERS CALLS\) - - where CALLERS is a list of functions that call FUNCTION, and CALLS - is a list of functions for which calls were generated while compiling - FUNCTION.") - - (defvar byte-compile-call-tree-sort 'name - "*If non-nil, sort the call tree. - The values `name', `callers', `calls', `calls+callers' - specify different fields to sort on.") - - (defvar byte-compile-overwrite-file t - "If nil, old .elc files are deleted before the new is saved, and .elc - files will have the same modes as the corresponding .el file. Otherwise, - existing .elc files will simply be overwritten, and the existing modes - will not be changed. If this variable is nil, then an .elc file which - is a symbolic link will be turned into a normal file, instead of the file - which the link points to being overwritten.") - - (defvar byte-recompile-directory-ignore-errors-p nil - "If true, then `byte-recompile-directory' will continue compiling even - when an error occurs in a file. This is bound to t by - `batch-byte-recompile-directory'.") - - (defvar byte-recompile-directory-recursively t - "*If true, then `byte-recompile-directory' will recurse on subdirectories.") - - (defvar byte-compile-constants nil - "list of all constants encountered during compilation of this form") - (defvar byte-compile-variables nil - "list of all variables encountered during compilation of this form") - (defvar byte-compile-bound-variables nil - "Alist of variables bound in the context of the current form, - that is, the current lexical environment. This list lives partly - on the specbind stack. The cdr of each cell is an integer bitmask.") - - (defconst byte-compile-referenced-bit 1) - (defconst byte-compile-assigned-bit 2) - (defconst byte-compile-arglist-bit 4) - (defconst byte-compile-global-bit 8) - - (defvar byte-compile-free-references) - (defvar byte-compile-free-assignments) - - (defvar byte-compiler-error-flag) - - (defconst byte-compile-initial-macro-environment - (purecopy - '((byte-compiler-options . (lambda (&rest forms) - (apply 'byte-compiler-options-handler forms))) - (eval-when-compile . (lambda (&rest body) - (list 'quote (eval (byte-compile-top-level - (cons 'progn body)))))) - (eval-and-compile . (lambda (&rest body) - (eval (cons 'progn body)) - (cons 'progn body))))) - "The default macro-environment passed to macroexpand by the compiler. - Placing a macro here will cause a macro to have different semantics when - expanded by the compiler as when expanded by the interpreter.") - - (defvar byte-compile-macro-environment byte-compile-initial-macro-environment - "Alist of macros defined in the file being compiled. - Each element looks like (MACRONAME . DEFINITION). It is - \(MACRONAME . nil) when a macro is redefined as a function.") - - (defvar byte-compile-function-environment nil - "Alist of functions defined in the file being compiled. - This is so we can inline them when necessary. - Each element looks like (FUNCTIONNAME . DEFINITION). It is - \(FUNCTIONNAME . nil) when a function is redefined as a macro.") - - (defvar byte-compile-autoload-environment nil - "Alist of functions and macros defined by autoload in the file being compiled. - This is so we can suppress warnings about calls to these functions, even though - they do not have `real' definitions. - Each element looks like (FUNCTIONNAME . CALL-TO-AUTOLOAD).") - - (defvar byte-compile-unresolved-functions nil - "Alist of undefined functions to which calls have been compiled (used for - warnings when the function is later defined with incorrect args).") - - (defvar byte-compile-file-domain) ; domain of file being compiled - - (defvar byte-compile-tag-number 0) - (defvar byte-compile-output nil - "Alist describing contents to put in byte code string. - Each element is (INDEX . VALUE)") - (defvar byte-compile-depth 0 "Current depth of execution stack.") - (defvar byte-compile-maxdepth 0 "Maximum depth of execution stack.") - - - ;;; The byte codes; this information is duplicated in bytecode.c - - (defconst byte-code-vector nil - "An array containing byte-code names indexed by byte-code values.") - - (defconst byte-stack+-info nil - "An array with the stack adjustment for each byte-code.") - - (defmacro byte-defop (opcode stack-adjust opname &optional docstring) - ;; This is a speed-hack for building the byte-code-vector at compile-time. - ;; We fill in the vector at macroexpand-time, and then after the last call - ;; to byte-defop, we write the vector out as a constant instead of writing - ;; out a bunch of calls to aset. - ;; Actually, we don't fill in the vector itself, because that could make - ;; it problematic to compile big changes to this compiler; we store the - ;; values on its plist, and remove them later in -extrude. - (let ((v1 (or (get 'byte-code-vector 'tmp-compile-time-value) - (put 'byte-code-vector 'tmp-compile-time-value - (make-vector 256 nil)))) - (v2 (or (get 'byte-stack+-info 'tmp-compile-time-value) - (put 'byte-stack+-info 'tmp-compile-time-value - (make-vector 256 nil))))) - (aset v1 opcode opname) - (aset v2 opcode stack-adjust)) - (if docstring - (list 'defconst opname opcode (concat "Byte code opcode " docstring ".")) - (list 'defconst opname opcode))) - - (defmacro byte-extrude-byte-code-vectors () - (prog1 (list 'setq 'byte-code-vector - (get 'byte-code-vector 'tmp-compile-time-value) - 'byte-stack+-info - (get 'byte-stack+-info 'tmp-compile-time-value)) - (remprop 'byte-code-vector 'tmp-compile-time-value) - (remprop 'byte-stack+-info 'tmp-compile-time-value))) - - - ;; unused: 0-7 - - ;; These opcodes are special in that they pack their argument into the - ;; opcode word. - ;; - (byte-defop 8 1 byte-varref "for variable reference") - (byte-defop 16 -1 byte-varset "for setting a variable") - (byte-defop 24 -1 byte-varbind "for binding a variable") - (byte-defop 32 0 byte-call "for calling a function") - (byte-defop 40 0 byte-unbind "for unbinding special bindings") - ;; codes 8-47 are consumed by the preceding opcodes - - ;; unused: 48-55 - - (byte-defop 56 -1 byte-nth) - (byte-defop 57 0 byte-symbolp) - (byte-defop 58 0 byte-consp) - (byte-defop 59 0 byte-stringp) - (byte-defop 60 0 byte-listp) - (byte-defop 61 -1 byte-old-eq) - (byte-defop 62 -1 byte-old-memq) - (byte-defop 63 0 byte-not) - (byte-defop 64 0 byte-car) - (byte-defop 65 0 byte-cdr) - (byte-defop 66 -1 byte-cons) - (byte-defop 67 0 byte-list1) - (byte-defop 68 -1 byte-list2) - (byte-defop 69 -2 byte-list3) - (byte-defop 70 -3 byte-list4) - (byte-defop 71 0 byte-length) - (byte-defop 72 -1 byte-aref) - (byte-defop 73 -2 byte-aset) - (byte-defop 74 0 byte-symbol-value) - (byte-defop 75 0 byte-symbol-function) ; this was commented out - (byte-defop 76 -1 byte-set) - (byte-defop 77 -1 byte-fset) ; this was commented out - (byte-defop 78 -1 byte-get) - (byte-defop 79 -2 byte-substring) - (byte-defop 80 -1 byte-concat2) - (byte-defop 81 -2 byte-concat3) - (byte-defop 82 -3 byte-concat4) - (byte-defop 83 0 byte-sub1) - (byte-defop 84 0 byte-add1) - (byte-defop 85 -1 byte-eqlsign) - (byte-defop 86 -1 byte-gtr) - (byte-defop 87 -1 byte-lss) - (byte-defop 88 -1 byte-leq) - (byte-defop 89 -1 byte-geq) - (byte-defop 90 -1 byte-diff) - (byte-defop 91 0 byte-negate) - (byte-defop 92 -1 byte-plus) - (byte-defop 93 -1 byte-max) - (byte-defop 94 -1 byte-min) - (byte-defop 95 -1 byte-mult) - (byte-defop 96 1 byte-point) - (byte-defop 97 -1 byte-eq) ; new as of v20 - (byte-defop 98 0 byte-goto-char) - (byte-defop 99 0 byte-insert) - (byte-defop 100 1 byte-point-max) - (byte-defop 101 1 byte-point-min) - (byte-defop 102 0 byte-char-after) - (byte-defop 103 1 byte-following-char) - (byte-defop 104 1 byte-preceding-char) - (byte-defop 105 1 byte-current-column) - (byte-defop 106 0 byte-indent-to) - (byte-defop 107 -1 byte-equal) ; new as of v20 - (byte-defop 108 1 byte-eolp) - (byte-defop 109 1 byte-eobp) - (byte-defop 110 1 byte-bolp) - (byte-defop 111 1 byte-bobp) - (byte-defop 112 1 byte-current-buffer) - (byte-defop 113 0 byte-set-buffer) - (byte-defop 114 0 byte-save-current-buffer - "To make a binding to record the current buffer.") - ;;(byte-defop 114 1 byte-read-char-OBSOLETE) ;obsolete as of v19 - (byte-defop 115 -1 byte-memq) ; new as of v20 - (byte-defop 116 1 byte-interactive-p) - - (byte-defop 117 0 byte-forward-char) - (byte-defop 118 0 byte-forward-word) - (byte-defop 119 -1 byte-skip-chars-forward) - (byte-defop 120 -1 byte-skip-chars-backward) - (byte-defop 121 0 byte-forward-line) - (byte-defop 122 0 byte-char-syntax) - (byte-defop 123 -1 byte-buffer-substring) - (byte-defop 124 -1 byte-delete-region) - (byte-defop 125 -1 byte-narrow-to-region) - (byte-defop 126 1 byte-widen) - (byte-defop 127 0 byte-end-of-line) - - ;; unused: 128 - - ;; These store their argument in the next two bytes - (byte-defop 129 1 byte-constant2 - "for reference to a constant with vector index >= byte-constant-limit") - (byte-defop 130 0 byte-goto "for unconditional jump") - (byte-defop 131 -1 byte-goto-if-nil "to pop value and jump if it's nil") - (byte-defop 132 -1 byte-goto-if-not-nil - "to pop value and jump if it's not nil") - (byte-defop 133 -1 byte-goto-if-nil-else-pop - "to examine top-of-stack, jump and don't pop it if it's nil, - otherwise pop it") - (byte-defop 134 -1 byte-goto-if-not-nil-else-pop - "to examine top-of-stack, jump and don't pop it if it's non-nil, - otherwise pop it") - - (byte-defop 135 -1 byte-return "to pop a value and return it from `byte-code'") - (byte-defop 136 -1 byte-discard "to discard one value from stack") - (byte-defop 137 1 byte-dup "to duplicate the top of the stack") - - (byte-defop 138 0 byte-save-excursion - "to make a binding to record the buffer, point and mark") - (byte-defop 139 0 byte-save-window-excursion - "to make a binding to record entire window configuration") - (byte-defop 140 0 byte-save-restriction - "to make a binding to record the current buffer clipping restrictions") - (byte-defop 141 -1 byte-catch - "for catch. Takes, on stack, the tag and an expression for the body") - (byte-defop 142 -1 byte-unwind-protect - "for unwind-protect. Takes, on stack, an expression for the unwind-action") - - ;; For condition-case. Takes, on stack, the variable to bind, - ;; an expression for the body, and a list of clauses. - (byte-defop 143 -2 byte-condition-case) - - ;; For entry to with-output-to-temp-buffer. - ;; Takes, on stack, the buffer name. - ;; Binds standard-output and does some other things. - ;; Returns with temp buffer on the stack in place of buffer name. - (byte-defop 144 0 byte-temp-output-buffer-setup) - - ;; For exit from with-output-to-temp-buffer. - ;; Expects the temp buffer on the stack underneath value to return. - ;; Pops them both, then pushes the value back on. - ;; Unbinds standard-output and makes the temp buffer visible. - (byte-defop 145 -1 byte-temp-output-buffer-show) - - ;; To unbind back to the beginning of this frame. - ;; Not used yet, but will be needed for tail-recursion elimination. - (byte-defop 146 0 byte-unbind-all) - - (byte-defop 147 -2 byte-set-marker) - (byte-defop 148 0 byte-match-beginning) - (byte-defop 149 0 byte-match-end) - (byte-defop 150 0 byte-upcase) - (byte-defop 151 0 byte-downcase) - (byte-defop 152 -1 byte-string=) - (byte-defop 153 -1 byte-string<) - (byte-defop 154 -1 byte-old-equal) - (byte-defop 155 -1 byte-nthcdr) - (byte-defop 156 -1 byte-elt) - (byte-defop 157 -1 byte-old-member) - (byte-defop 158 -1 byte-old-assq) - (byte-defop 159 0 byte-nreverse) - (byte-defop 160 -1 byte-setcar) - (byte-defop 161 -1 byte-setcdr) - (byte-defop 162 0 byte-car-safe) - (byte-defop 163 0 byte-cdr-safe) - (byte-defop 164 -1 byte-nconc) - (byte-defop 165 -1 byte-quo) - (byte-defop 166 -1 byte-rem) - (byte-defop 167 0 byte-numberp) - (byte-defop 168 0 byte-integerp) - - ;; unused: 169 - - ;; These are not present in FSF. - ;; - (byte-defop 170 0 byte-rel-goto) - (byte-defop 171 -1 byte-rel-goto-if-nil) - (byte-defop 172 -1 byte-rel-goto-if-not-nil) - (byte-defop 173 -1 byte-rel-goto-if-nil-else-pop) - (byte-defop 174 -1 byte-rel-goto-if-not-nil-else-pop) - - (byte-defop 175 nil byte-listN) - (byte-defop 176 nil byte-concatN) - (byte-defop 177 nil byte-insertN) - - ;; unused: 178-181 - - ;; these ops are new to v20 - (byte-defop 182 -1 byte-member) - (byte-defop 183 -1 byte-assq) - - ;; unused: 184-191 - - (byte-defop 192 1 byte-constant "for reference to a constant") - ;; codes 193-255 are consumed by byte-constant. - (defconst byte-constant-limit 64 - "Exclusive maximum index usable in the `byte-constant' opcode.") - - (defconst byte-goto-ops (purecopy - '(byte-goto byte-goto-if-nil byte-goto-if-not-nil - byte-goto-if-nil-else-pop - byte-goto-if-not-nil-else-pop)) - "List of byte-codes whose offset is a pc.") - - (defconst byte-goto-always-pop-ops - (purecopy '(byte-goto-if-nil byte-goto-if-not-nil))) - - (defconst byte-rel-goto-ops - (purecopy '(byte-rel-goto byte-rel-goto-if-nil byte-rel-goto-if-not-nil - byte-rel-goto-if-nil-else-pop byte-rel-goto-if-not-nil-else-pop)) - "byte-codes for relative jumps.") - - (byte-extrude-byte-code-vectors) - - ;;; lapcode generator - ;;; - ;;; the byte-compiler now does source -> lapcode -> bytecode instead of - ;;; source -> bytecode, because it's a lot easier to make optimizations - ;;; on lapcode than on bytecode. - ;;; - ;;; Elements of the lapcode list are of the form ( . ) - ;;; where instruction is a symbol naming a byte-code instruction, - ;;; and parameter is an argument to that instruction, if any. - ;;; - ;;; The instruction can be the pseudo-op TAG, which means that this position - ;;; in the instruction stream is a target of a goto. (car PARAMETER) will be - ;;; the PC for this location, and the whole instruction "(TAG pc)" will be the - ;;; parameter for some goto op. - ;;; - ;;; If the operation is varbind, varref, varset or push-constant, then the - ;;; parameter is (variable/constant . index_in_constant_vector). - ;;; - ;;; First, the source code is macroexpanded and optimized in various ways. - ;;; Then the resultant code is compiled into lapcode. Another set of - ;;; optimizations are then run over the lapcode. Then the variables and - ;;; constants referenced by the lapcode are collected and placed in the - ;;; constants-vector. (This happens now so that variables referenced by dead - ;;; code don't consume space.) And finally, the lapcode is transformed into - ;;; compacted byte-code. - ;;; - ;;; A distinction is made between variables and constants because the variable- - ;;; referencing instructions are more sensitive to the variables being near the - ;;; front of the constants-vector than the constant-referencing instructions. - ;;; Also, this lets us notice references to free variables. - - (defun byte-compile-lapcode (lap) - "Turns lapcode into bytecode. The lapcode is destroyed." - ;; Lapcode modifications: changes the ID of a tag to be the tag's PC. - (let ((pc 0) ; Program counter - op off ; Operation & offset - (bytes '()) ; Put the output bytes here - (patchlist nil) ; List of tags and goto's to patch - rest rel tmp) - (while lap - (setq op (car (car lap)) - off (cdr (car lap))) - (cond ((not (symbolp op)) - (error "Non-symbolic opcode `%s'" op)) - ((eq op 'TAG) - (setcar off pc) - (push off patchlist)) - ((memq op byte-goto-ops) - (setq pc (+ pc 3)) - (setq bytes (cons (cons pc (cdr off)) - (cons nil - (cons (symbol-value op) bytes)))) - (push bytes patchlist)) - (t - (setq bytes - (cond ((cond ((consp off) - ;; Variable or constant reference - (setq off (cdr off)) - (eq op 'byte-constant))) - (cond ((< off byte-constant-limit) - (setq pc (1+ pc)) - (cons (+ byte-constant off) bytes)) - (t - (setq pc (+ 3 pc)) - (cons (lsh off -8) - (cons (logand off 255) - (cons byte-constant2 bytes)))))) - ((and (<= byte-listN (symbol-value op)) - (<= (symbol-value op) byte-insertN)) - (setq pc (+ 2 pc)) - (cons off (cons (symbol-value op) bytes))) - ((< off 6) - (setq pc (1+ pc)) - (cons (+ (symbol-value op) off) bytes)) - ((< off 256) - (setq pc (+ 2 pc)) - (cons off (cons (+ (symbol-value op) 6) bytes))) - (t - (setq pc (+ 3 pc)) - (cons (lsh off -8) - (cons (logand off 255) - (cons (+ (symbol-value op) 7) - bytes)))))))) - (setq lap (cdr lap))) - ;;(if (not (= pc (length bytes))) - ;; (error "Compiler error: pc mismatch - %s %s" pc (length bytes))) - (cond (t ;; starting with Emacs 19. - ;; Make relative jumps - (setq patchlist (nreverse patchlist)) - (while (progn - (setq off 0) ; PC change because of deleted bytes - (setq rest patchlist) - (while rest - (setq tmp (car rest)) - (and (consp (car tmp)) ; Jump - (prog1 (null (nth 1 tmp)) ; Absolute jump - (setq tmp (car tmp))) - (progn - (setq rel (- (car (cdr tmp)) (car tmp))) - (and (<= -129 rel) (< rel 128))) - (progn - ;; Convert to relative jump. - (setcdr (car rest) (cdr (cdr (car rest)))) - (setcar (cdr (car rest)) - (+ (car (cdr (car rest))) - (- byte-rel-goto byte-goto))) - (setq off (1- off)))) - (setcar tmp (+ (car tmp) off)) ; Adjust PC - (setq rest (cdr rest))) - ;; If optimizing, repeat until no change. - (and byte-optimize - (not (zerop off))))))) - ;; Patch PC into jumps - (let (bytes) - (while patchlist - (setq bytes (car patchlist)) - (cond ((atom (car bytes))) ; Tag - ((nth 1 bytes) ; Relative jump - (setcar bytes (+ (- (car (cdr (car bytes))) (car (car bytes))) - 128))) - (t ; Absolute jump - (setq pc (car (cdr (car bytes)))) ; Pick PC from tag - (setcar (cdr bytes) (logand pc 255)) - (setcar bytes (lsh pc -8)))) - (setq patchlist (cdr patchlist)))) - (concat (nreverse bytes)))) - - - ;;; byte compiler messages - - (defvar byte-compile-current-form nil) - (defvar byte-compile-current-file nil) - (defvar byte-compile-dest-file nil) - - (defmacro byte-compile-log (format-string &rest args) - `(when (and byte-optimize (memq byte-optimize-log '(t source))) - (let ((print-escape-newlines t) - (print-level 4) - (print-length 4)) - (byte-compile-log-1 (format ,format-string ,@args))))) - - (defconst byte-compile-last-warned-form 'nothing) - - ;; Log a message STRING in *Compile-Log*. - ;; Also log the current function and file if not already done. - (defun byte-compile-log-1 (string &optional fill) - (let* ((this-form (or byte-compile-current-form "toplevel forms")) - (while-compiling-msg - (when (or byte-compile-current-file - (not (eq this-form byte-compile-last-warned-form))) - (format - "While compiling %s%s:" - this-form - (cond - ((stringp byte-compile-current-file) - (concat " in file " byte-compile-current-file)) - ((bufferp byte-compile-current-file) - (concat " in buffer " - (buffer-name byte-compile-current-file))) - ("")))))) - (if noninteractive - (progn - (when while-compiling-msg (message "%s" while-compiling-msg)) - (message " %s" string)) - (with-current-buffer (get-buffer-create "*Compile-Log*") - (goto-char (point-max)) - (when byte-compile-current-file - (when (> (point-max) (point-min)) - (insert "\n\^L\n")) - (insert (current-time-string) "\n")) - (when while-compiling-msg (insert while-compiling-msg "\n")) - (insert " " string "\n") - (when (and fill (not (string-match "\n" string))) - (let ((fill-prefix " ") - (fill-column 78)) - (fill-paragraph nil))))) - (setq byte-compile-current-file nil) - (setq byte-compile-last-warned-form this-form))) - - ;; Log the start of a file in *Compile-Log*, and mark it as done. - ;; But do nothing in batch mode. - (defun byte-compile-log-file () - (when (and byte-compile-current-file (not noninteractive)) - (with-current-buffer (get-buffer-create "*Compile-Log*") - (when (> (point-max) (point-min)) - (goto-char (point-max)) - (insert "\n\^L\n")) - (insert "Compiling " - (if (stringp byte-compile-current-file) - (concat "file " byte-compile-current-file) - (concat "buffer " (buffer-name byte-compile-current-file))) - " at " (current-time-string) "\n") - (setq byte-compile-current-file nil)))) - - (defun byte-compile-warn (format &rest args) - (setq format (apply 'format format args)) - (if byte-compile-error-on-warn - (error "%s" format) ; byte-compile-file catches and logs it - (byte-compile-log-1 (concat "** " format) t) - ;;; RMS says: - ;;; It is useless to flash warnings too fast to be read. - ;;; Besides, they will all be shown at the end. - ;;; and comments out the next two lines. - (or noninteractive ; already written on stdout. - (message "Warning: %s" format)))) - - ;;; This function should be used to report errors that have halted - ;;; compilation of the current file. - (defun byte-compile-report-error (error-info) - (setq byte-compiler-error-flag t) - (byte-compile-log-1 - (concat "!! " - (format (if (cdr error-info) "%s (%s)" "%s") - (get (car error-info) 'error-message) - (prin1-to-string (cdr error-info)))))) - - ;;; Used by make-obsolete. - (defun byte-compile-obsolete (form) - (let ((new (get (car form) 'byte-obsolete-info))) - (if (memq 'obsolete byte-compile-warnings) - (byte-compile-warn "%s is an obsolete function; %s" (car form) - (if (stringp (car new)) - (car new) - (format "use %s instead." (car new))))) - (funcall (or (cdr new) 'byte-compile-normal-call) form))) - - ;;; Used by make-obsolete. - (defun byte-compile-compatible (form) - (let ((new (get (car form) 'byte-compatible-info))) - (if (memq 'pedantic byte-compile-warnings) - (byte-compile-warn "%s is provided for compatibility; %s" (car form) - (if (stringp (car new)) - (car new) - (format "use %s instead." (car new))))) - (funcall (or (cdr new) 'byte-compile-normal-call) form))) - - ;; Compiler options - - (defconst byte-compiler-legal-options - '((optimize byte-optimize (t nil source byte) val) - (file-format byte-compile-emacs19-compatibility (emacs19 emacs20) - (eq val 'emacs19)) - (delete-errors byte-compile-delete-errors (t nil) val) - (verbose byte-compile-verbose (t nil) val) - (new-bytecodes byte-compile-new-bytecodes (t nil) val) - (warnings byte-compile-warnings - ((callargs subr-callargs redefine free-vars unused-vars unresolved)) - val))) - - ;; XEmacs addition - (defconst byte-compiler-obsolete-options - '((new-bytecodes t))) - - ;; Inhibit v19/v20 selectors if the version is hardcoded. - ;; #### This should print a warning if the user tries to change something - ;; than can't be changed because the running compiler doesn't support it. - (cond - ((byte-compile-single-version) - (setcar (cdr (cdr (assq 'file-format byte-compiler-legal-options))) - (if (byte-compile-version-cond byte-compile-emacs19-compatibility) - '(emacs19) '(emacs20))))) - - ;; now we can copy it. - (setq byte-compiler-legal-options (purecopy byte-compiler-legal-options)) - - (defun byte-compiler-options-handler (&rest args) - (let (key val desc choices) - (while args - (if (or (atom (car args)) (nthcdr 2 (car args)) (null (cdr (car args)))) - (error "malformed byte-compiler-option %s" (car args))) - (setq key (car (car args)) - val (car (cdr (car args))) - desc (assq key byte-compiler-legal-options)) - (or desc - (error "unknown byte-compiler option %s" key)) - (if (assq key byte-compiler-obsolete-options) - (byte-compile-warn "%s is an obsolete byte-compiler option." key)) - (setq choices (nth 2 desc)) - (if (consp (car choices)) - (let* (this - (handler 'cons) - (var (nth 1 desc)) - (ret (and (memq (car val) '(+ -)) - (copy-sequence (if (eq t (symbol-value var)) - (car choices) - (symbol-value var)))))) - (setq choices (car choices)) - (while val - (setq this (car val)) - (cond ((memq this choices) - (setq ret (funcall handler this ret))) - ((eq this '+) (setq handler 'cons)) - ((eq this '-) (setq handler 'delq)) - ((error "%s only accepts %s." key choices))) - (setq val (cdr val))) - (set (nth 1 desc) ret)) - (or (memq val choices) - (error "%s must be one of %s." key choices)) - (set (nth 1 desc) (eval (nth 3 desc)))) - (setq args (cdr args))) - nil)) - - ;;; sanity-checking arglists - - (defun byte-compile-fdefinition (name macro-p) - (let* ((list (if (memq macro-p '(nil subr)) - byte-compile-function-environment - byte-compile-macro-environment)) - (env (cdr (assq name list)))) - (or env - (let ((fn name)) - (while (and (symbolp fn) - (fboundp fn) - (or (symbolp (symbol-function fn)) - (consp (symbol-function fn)) - (and (not macro-p) - (compiled-function-p (symbol-function fn))) - (and (eq macro-p 'subr) (subrp fn)))) - (setq fn (symbol-function fn))) - (if (or (and (not macro-p) (compiled-function-p fn)) - (and (eq macro-p 'subr) (subrp fn))) - fn - (and (consp fn) - (not (eq macro-p 'subr)) - (if (eq 'macro (car fn)) - (cdr fn) - (if macro-p - nil - (if (eq 'autoload (car fn)) - nil - fn))))))))) - - (defun byte-compile-arglist-signature (arglist) - (let ((args 0) - opts - restp) - (while arglist - (cond ((eq (car arglist) '&optional) - (or opts (setq opts 0))) - ((eq (car arglist) '&rest) - (if (cdr arglist) - (setq restp t - arglist nil))) - (t - (if opts - (setq opts (1+ opts)) - (setq args (1+ args))))) - (setq arglist (cdr arglist))) - (cons args (if restp nil (if opts (+ args opts) args))))) - - - (defun byte-compile-arglist-signatures-congruent-p (old new) - (not (or - (> (car new) (car old)) ; requires more args now - (and (null (cdr old)) ; tooks rest-args, doesn't any more - (cdr new)) - (and (cdr new) (cdr old) ; can't take as many args now - (< (cdr new) (cdr old))) - ))) - - (defun byte-compile-arglist-signature-string (signature) - (cond ((null (cdr signature)) - (format "%d+" (car signature))) - ((= (car signature) (cdr signature)) - (format "%d" (car signature))) - (t (format "%d-%d" (car signature) (cdr signature))))) - - - ;; Warn if the form is calling a function with the wrong number of arguments. - (defun byte-compile-callargs-warn (form) - (let* ((def (or (byte-compile-fdefinition (car form) nil) - (byte-compile-fdefinition (car form) t))) - (sig (and def (byte-compile-arglist-signature - (if (eq 'lambda (car-safe def)) - (nth 1 def) - (if (compiled-function-p def) - (compiled-function-arglist def) - '(&rest def)))))) - (ncall (length (cdr form)))) - (if (and (null def) - (fboundp 'subr-min-args) - (setq def (byte-compile-fdefinition (car form) 'subr))) - (setq sig (cons (subr-min-args def) (subr-max-args def)))) - (if sig - (if (or (< ncall (car sig)) - (and (cdr sig) (> ncall (cdr sig)))) - (byte-compile-warn - "%s called with %d argument%s, but %s %s" - (car form) ncall - (if (= 1 ncall) "" "s") - (if (< ncall (car sig)) - "requires" - "accepts only") - (byte-compile-arglist-signature-string sig))) - (or (fboundp (car form)) ; might be a subr or autoload. - ;; ## this doesn't work with recursion. - (eq (car form) byte-compile-current-form) - ;; It's a currently-undefined function. - ;; Remember number of args in call. - (let ((cons (assq (car form) byte-compile-unresolved-functions)) - (n (length (cdr form)))) - (if cons - (or (memq n (cdr cons)) - (setcdr cons (cons n (cdr cons)))) - (setq byte-compile-unresolved-functions - (cons (list (car form) n) - byte-compile-unresolved-functions)))))))) - - ;; Warn if the function or macro is being redefined with a different - ;; number of arguments. - (defun byte-compile-arglist-warn (form macrop) - (let ((old (byte-compile-fdefinition (nth 1 form) macrop))) - (if old - (let ((sig1 (byte-compile-arglist-signature - (if (eq 'lambda (car-safe old)) - (nth 1 old) - (if (compiled-function-p old) - (compiled-function-arglist old) - '(&rest def))))) - (sig2 (byte-compile-arglist-signature (nth 2 form)))) - (or (byte-compile-arglist-signatures-congruent-p sig1 sig2) - (byte-compile-warn "%s %s used to take %s %s, now takes %s" - (if (eq (car form) 'defun) "function" "macro") - (nth 1 form) - (byte-compile-arglist-signature-string sig1) - (if (equal sig1 '(1 . 1)) "argument" "arguments") - (byte-compile-arglist-signature-string sig2)))) - ;; This is the first definition. See if previous calls are compatible. - (let ((calls (assq (nth 1 form) byte-compile-unresolved-functions)) - nums sig min max) - (if calls - (progn - (setq sig (byte-compile-arglist-signature (nth 2 form)) - nums (sort (copy-sequence (cdr calls)) (function <)) - min (car nums) - max (car (nreverse nums))) - (if (or (< min (car sig)) - (and (cdr sig) (> max (cdr sig)))) - (byte-compile-warn - "%s being defined to take %s%s, but was previously called with %s" - (nth 1 form) - (byte-compile-arglist-signature-string sig) - (if (equal sig '(1 . 1)) " arg" " args") - (byte-compile-arglist-signature-string (cons min max)))) - - (setq byte-compile-unresolved-functions - (delq calls byte-compile-unresolved-functions))))) - ))) - - ;; If we have compiled any calls to functions which are not known to be - ;; defined, issue a warning enumerating them. - ;; `unresolved' in the list `byte-compile-warnings' disables this. - (defun byte-compile-warn-about-unresolved-functions (&optional msg) - (if (memq 'unresolved byte-compile-warnings) - (let ((byte-compile-current-form (or msg "the end of the data"))) - ;; First delete the autoloads from the list. - (if byte-compile-autoload-environment - (let ((rest byte-compile-unresolved-functions)) - (while rest - (if (assq (car (car rest)) byte-compile-autoload-environment) - (setq byte-compile-unresolved-functions - (delq (car rest) byte-compile-unresolved-functions))) - (setq rest (cdr rest))))) - ;; Now warn. - (if (cdr byte-compile-unresolved-functions) - (let* ((str "The following functions are not known to be defined: ") - (L (+ (length str) 5)) - (rest (reverse byte-compile-unresolved-functions)) - s) - (while rest - (setq s (symbol-name (car (car rest))) - L (+ L (length s) 2) - rest (cdr rest)) - (if (<= L (1- fill-column)) - (setq str (concat str " " s (and rest ","))) - (setq str (concat str "\n " s (and rest ",")) - L (+ (length s) 4)))) - (byte-compile-warn "%s" str)) - (if byte-compile-unresolved-functions - (byte-compile-warn "the function %s is not known to be defined." - (car (car byte-compile-unresolved-functions))))))) - nil) - - (defun byte-compile-defvar-p (var) - ;; Whether the byte compiler thinks that non-lexical references to this - ;; variable are ok. - (or (globally-boundp var) - (let ((rest byte-compile-bound-variables)) - (while (and rest var) - (if (and (eq var (car-safe (car rest))) - (not (= 0 (logand (cdr (car rest)) - byte-compile-global-bit)))) - (setq var nil)) - (setq rest (cdr rest))) - ;; if var is nil at this point, it's a defvar in this file. - (not var)))) - - - ;;; If we have compiled bindings of variables which have no referents, warn. - (defun byte-compile-warn-about-unused-variables () - (let ((rest byte-compile-bound-variables) - (unreferenced '()) - cell) - (while (and rest - ;; only warn about variables whose lifetime is now ending, - ;; that is, variables from the lexical scope that is now - ;; terminating. (Think nested lets.) - (not (eq (car rest) 'new-scope))) - (setq cell (car rest)) - (if (and (= 0 (logand byte-compile-referenced-bit (cdr cell))) - ;; Don't warn about declared-but-unused arguments, - ;; for two reasons: first, the arglist structure - ;; might be imposed by external forces, and we don't - ;; have (declare (ignore x)) yet; and second, inline - ;; expansion produces forms like - ;; ((lambda (arg) (byte-code "..." [arg])) x) - ;; which we can't (ok, well, don't) recognize as - ;; containing a reference to arg, so every inline - ;; expansion would generate a warning. (If we had - ;; `ignore' then inline expansion could emit an - ;; ignore declaration.) - (= 0 (logand byte-compile-arglist-bit (cdr cell))) - ;; Don't warn about defvars because this is a - ;; legitimate special binding. - (not (byte-compile-defvar-p (car cell)))) - (setq unreferenced (cons (car cell) unreferenced))) - (setq rest (cdr rest))) - (setq unreferenced (nreverse unreferenced)) - (while unreferenced - (byte-compile-warn - (format "variable %s bound but not referenced" (car unreferenced))) - (setq unreferenced (cdr unreferenced))))) - - - (defmacro byte-compile-constant-symbol-p (symbol) - `(or (keywordp ,symbol) (memq ,symbol '(nil t)))) - - (defmacro byte-compile-constp (form) - ;; Returns non-nil if FORM is a constant. - `(cond ((consp ,form) (eq (car ,form) 'quote)) - ((symbolp ,form) (byte-compile-constant-symbol-p ,form)) - (t))) - - (defmacro byte-compile-close-variables (&rest body) - `(let - (;; - ;; Close over these variables to encapsulate the - ;; compilation state - ;; - (byte-compile-macro-environment - ;; Copy it because the compiler may patch into the - ;; macroenvironment. - (copy-alist byte-compile-initial-macro-environment)) - (byte-compile-function-environment nil) - (byte-compile-autoload-environment nil) - (byte-compile-unresolved-functions nil) - (byte-compile-bound-variables nil) - (byte-compile-free-references nil) - (byte-compile-free-assignments nil) - ;; - ;; Close over these variables so that `byte-compiler-options' - ;; can change them on a per-file basis. - ;; - (byte-compile-verbose byte-compile-verbose) - (byte-optimize byte-optimize) - (byte-compile-emacs19-compatibility - byte-compile-emacs19-compatibility) - (byte-compile-dynamic byte-compile-dynamic) - (byte-compile-dynamic-docstrings - byte-compile-dynamic-docstrings) - (byte-compile-warnings (if (eq byte-compile-warnings t) - byte-compile-default-warnings - byte-compile-warnings)) - (byte-compile-file-domain nil)) - (prog1 - (progn ,@body) - (if (memq 'unused-vars byte-compile-warnings) - ;; done compiling in this scope, warn now. - (byte-compile-warn-about-unused-variables))))) - - - (defmacro displaying-byte-compile-warnings (&rest body) - `(let* ((byte-compile-log-buffer (get-buffer-create "*Compile-Log*")) - (byte-compile-point-max-prev (point-max byte-compile-log-buffer))) - ;; Log the file name or buffer name. - (byte-compile-log-file) - ;; Record how much is logged now. - ;; We will display the log buffer if anything more is logged - ;; before the end of BODY. - (defvar byte-compile-warnings-beginning) - (let ((byte-compile-warnings-beginning - (if (boundp 'byte-compile-warnings-beginning) - byte-compile-warnings-beginning - (point-max byte-compile-log-buffer)))) - - (unwind-protect - (condition-case error-info - (progn ,@body) - (error - (byte-compile-report-error error-info))) - - ;; Always set point in log to start of interesting output. - (with-current-buffer byte-compile-log-buffer - (let ((show-begin - (progn (goto-char byte-compile-point-max-prev) - (skip-chars-forward "\^L\n") - (point)))) - ;; If there were compilation warnings, display them. - (if temp-buffer-show-function - (let ((show-buffer (get-buffer-create "*Compile-Log-Show*"))) - ;; Always clean show-buffer, even when not displaying it, - ;; so that misleading previous messages aren't left around. - (with-current-buffer show-buffer - (setq buffer-read-only nil) - (erase-buffer)) - (copy-to-buffer show-buffer show-begin (point-max)) - (when (< byte-compile-warnings-beginning (point-max)) - (funcall temp-buffer-show-function show-buffer))) - (when (< byte-compile-warnings-beginning (point-max)) - (select-window - (prog1 (selected-window) - (select-window (display-buffer (current-buffer))) - (goto-char show-begin) - (recenter 1))))))))))) - - - ;;;###autoload - (defun byte-force-recompile (directory) - "Recompile every `.el' file in DIRECTORY that already has a `.elc' file. - Files in subdirectories of DIRECTORY are processed also." - (interactive "DByte force recompile (directory): ") - (byte-recompile-directory directory nil t)) - - ;;;###autoload - (defun byte-recompile-directory (directory &optional arg norecursion force) - "Recompile every `.el' file in DIRECTORY that needs recompilation. - This is if a `.elc' file exists but is older than the `.el' file. - Files in subdirectories of DIRECTORY are processed also unless argument - NORECURSION is non-nil. - - If the `.elc' file does not exist, normally the `.el' file is *not* compiled. - But a prefix argument (optional second arg) means ask user, - for each such `.el' file, whether to compile it. Prefix argument 0 means - don't ask and compile the file anyway. - - A nonzero prefix argument also means ask about each subdirectory. - - If the fourth argument FORCE is non-nil, - recompile every `.el' file that already has a `.elc' file." - (interactive "DByte recompile directory: \nP") - (if arg - (setq arg (prefix-numeric-value arg))) - (if noninteractive - nil - (save-some-buffers) - (redraw-modeline)) - (let ((directories (list (expand-file-name directory))) - (file-count 0) - (dir-count 0) - last-dir) - (displaying-byte-compile-warnings - (while directories - (setq directory (file-name-as-directory (car directories))) - (or noninteractive (message "Checking %s..." directory)) - (let ((files (directory-files directory)) - source dest) - (while files - (setq source (expand-file-name (car files) directory)) - (if (and (not (member (car files) '("." ".." "RCS" "CVS" "SCCS"))) - ;; Stay away from directory back-links, etc: - (not (file-symlink-p source)) - (file-directory-p source) - byte-recompile-directory-recursively) - ;; This file is a subdirectory. Handle them differently. - (if (or (null arg) - (eq arg 0) - (y-or-n-p (concat "Check " source "? "))) - (setq directories - (nconc directories (list source)))) - ;; It is an ordinary file. Decide whether to compile it. - (if (and (string-match emacs-lisp-file-regexp source) - (not (auto-save-file-name-p source)) - (setq dest (byte-compile-dest-file source)) - (if (file-exists-p dest) - ;; File was already compiled. - (or force (file-newer-than-file-p source dest)) - ;; No compiled file exists yet. - (and arg - (or (eq 0 arg) - (y-or-n-p (concat "Compile " source "? ")))))) - (progn ;(if (and noninteractive (not byte-compile-verbose)) - ; (message "Compiling %s..." source)) - ; we do this in byte-compile-file. - (if byte-recompile-directory-ignore-errors-p - (batch-byte-compile-1 source) - (byte-compile-file source)) - (or noninteractive - (message "Checking %s..." directory)) - (setq file-count (1+ file-count)) - (if (not (eq last-dir directory)) - (setq last-dir directory - dir-count (1+ dir-count))) - ))) - (setq files (cdr files)))) - (setq directories (cdr directories)))) - (message "Done (Total of %d file%s compiled%s)" - file-count (if (= file-count 1) "" "s") - (if (> dir-count 1) (format " in %d directories" dir-count) "")))) - - ;;;###autoload - (defun byte-recompile-file (filename &optional force) - "Recompile a file of Lisp code named FILENAME if it needs recompilation. - This is if the `.elc' file exists but is older than the `.el' file. - - If the `.elc' file does not exist, normally the `.el' file is *not* - compiled. But a prefix argument (optional second arg) means ask user - whether to compile it. Prefix argument 0 don't ask and recompile anyway." - (interactive "fByte recompile file: \nP") - (let ((dest)) - (if (and (string-match emacs-lisp-file-regexp filename) - (not (auto-save-file-name-p filename)) - (setq dest (byte-compile-dest-file filename)) - (if (file-exists-p dest) - (file-newer-than-file-p filename dest) - (and force - (or (eq 0 force) - (y-or-n-p (concat "Compile " filename "? ")))))) - (byte-compile-file filename)))) - - ;;;###autoload - (defun byte-compile-file (filename &optional load) - "Compile a file of Lisp code named FILENAME into a file of byte code. - The output file's name is made by appending `c' to the end of FILENAME. - With prefix arg (noninteractively: 2nd arg), load the file after compiling." - ;; (interactive "fByte compile file: \nP") - (interactive - (let ((file buffer-file-name) - (file-name nil) - (file-dir nil)) - (and file - (eq (cdr (assq 'major-mode (buffer-local-variables))) - 'emacs-lisp-mode) - (setq file-name (file-name-nondirectory file) - file-dir (file-name-directory file))) - (list (read-file-name (if current-prefix-arg - "Byte compile and load file: " - "Byte compile file: ") - file-dir nil nil file-name) - current-prefix-arg))) - ;; Expand now so we get the current buffer's defaults - (setq filename (expand-file-name filename)) - - ;; If we're compiling a file that's in a buffer and is modified, offer - ;; to save it first. - (or noninteractive - (let ((b (get-file-buffer (expand-file-name filename)))) - (if (and b (buffer-modified-p b) - (y-or-n-p (format "save buffer %s first? " (buffer-name b)))) - (save-excursion (set-buffer b) (save-buffer))))) - - (if (or noninteractive byte-compile-verbose) ; XEmacs change - (message "Compiling %s..." filename)) - (let (;;(byte-compile-current-file (file-name-nondirectory filename)) - (byte-compile-current-file filename) - target-file input-buffer output-buffer - byte-compile-dest-file) - (setq target-file (byte-compile-dest-file filename)) - (setq byte-compile-dest-file target-file) - (save-excursion - (setq input-buffer (get-buffer-create " *Compiler Input*")) - (set-buffer input-buffer) - (erase-buffer) - (insert-file-contents filename) - ;; Run hooks including the uncompression hook. - ;; If they change the file name, then change it for the output also. - (let ((buffer-file-name filename) - (default-major-mode 'emacs-lisp-mode) - (enable-local-eval nil)) - (normal-mode) - (setq filename buffer-file-name))) - (setq byte-compiler-error-flag nil) - ;; It is important that input-buffer not be current at this call, - ;; so that the value of point set in input-buffer - ;; within byte-compile-from-buffer lingers in that buffer. - (setq output-buffer (byte-compile-from-buffer input-buffer filename)) - (if byte-compiler-error-flag - nil - (if byte-compile-verbose - (message "Compiling %s...done" filename)) - (kill-buffer input-buffer) - (save-excursion - (set-buffer output-buffer) - (goto-char (point-max)) - (insert "\n") ; aaah, unix. - (setq target-file (byte-compile-dest-file filename)) - (unless byte-compile-overwrite-file - (ignore-file-errors (delete-file target-file))) - (if (file-writable-p target-file) - (progn - (when (memq system-type '(ms-dos windows-nt)) - (defvar buffer-file-type) - (setq buffer-file-type t)) - (write-region 1 (point-max) target-file)) - ;; This is just to give a better error message than write-region - (signal 'file-error - (list "Opening output file" - (if (file-exists-p target-file) - "cannot overwrite file" - "directory not writable or nonexistent") - target-file))) - (or byte-compile-overwrite-file - (condition-case () - (set-file-modes target-file (file-modes filename)) - (error nil))) - (kill-buffer (current-buffer))) - (if (and byte-compile-generate-call-tree - (or (eq t byte-compile-generate-call-tree) - (y-or-n-p (format "Report call tree for %s? " filename)))) - (save-excursion - (display-call-tree filename))) - (if load - (load target-file)) - t))) - - ;; RMS comments the next two out. - - ;;;###autoload - (defun byte-compile-and-load-file (&optional filename) - "Compile a file of Lisp code named FILENAME into a file of byte code, - and then load it. The output file's name is made by appending \"c\" to - the end of FILENAME." - (interactive) - (if filename ; I don't get it, (interactive-p) doesn't always work - (byte-compile-file filename t) - (let ((current-prefix-arg '(4))) - (call-interactively 'byte-compile-file)))) - - ;;;###autoload - (defun byte-compile-buffer (&optional buffer) - "Byte-compile and evaluate contents of BUFFER (default: the current buffer)." - (interactive "bByte compile buffer: ") - (setq buffer (if buffer (get-buffer buffer) (current-buffer))) - (message "Compiling %s..." buffer) - (let* ((filename (or (buffer-file-name buffer) - (prin1-to-string buffer))) - (byte-compile-current-file buffer)) - (byte-compile-from-buffer buffer filename t)) - (message "Compiling %s...done" buffer) - t) - - ;;; compiling a single function - ;;;###autoload - (defun compile-defun (&optional arg) - "Compile and evaluate the current top-level form. - Print the result in the minibuffer. - With argument, insert value in current buffer after the form." - (interactive "P") - (save-excursion - (end-of-defun) - (beginning-of-defun) - (let* ((byte-compile-current-file (buffer-file-name)) - (load-file-name (buffer-file-name)) - (byte-compile-last-warned-form 'nothing) - (value (eval (displaying-byte-compile-warnings - (byte-compile-sexp (read (current-buffer)) - "toplevel forms"))))) - (cond (arg - (message "Compiling from buffer... done.") - (prin1 value (current-buffer)) - (insert "\n")) - ((message "%s" (prin1-to-string value))))))) - - (defvar byte-compile-inbuffer) - (defvar byte-compile-outbuffer) - - (defun byte-compile-from-buffer (byte-compile-inbuffer filename &optional eval) - ;; buffer --> output-buffer, or buffer --> eval form, return nil - (let (byte-compile-outbuffer - ;; Prevent truncation of flonums and lists as we read and print them - (float-output-format nil) - (case-fold-search nil) - (print-length nil) - (print-level nil) - ;; Simulate entry to byte-compile-top-level - (byte-compile-constants nil) - (byte-compile-variables nil) - (byte-compile-tag-number 0) - (byte-compile-depth 0) - (byte-compile-maxdepth 0) - (byte-compile-output nil) - ;; #### This is bound in b-c-close-variables. - ;; (byte-compile-warnings (if (eq byte-compile-warnings t) - ;; byte-compile-warning-types - ;; byte-compile-warnings)) - ) - (byte-compile-close-variables - (save-excursion - (setq byte-compile-outbuffer - (set-buffer (get-buffer-create " *Compiler Output*"))) - (erase-buffer) - ;; (emacs-lisp-mode) - (setq case-fold-search nil) - (and filename - (not eval) - (byte-compile-insert-header filename - byte-compile-inbuffer - byte-compile-outbuffer)) - - ;; This is a kludge. Some operating systems (OS/2, DOS) need to - ;; write files containing binary information specially. - ;; Under most circumstances, such files will be in binary - ;; overwrite mode, so those OS's use that flag to guess how - ;; they should write their data. Advise them that .elc files - ;; need to be written carefully. - (setq overwrite-mode 'overwrite-mode-binary)) - (displaying-byte-compile-warnings - (save-excursion - (set-buffer byte-compile-inbuffer) - (goto-char 1) - - ;; Compile the forms from the input buffer. - (while (progn - (while (progn (skip-chars-forward " \t\n\^L") - (looking-at ";")) - (forward-line 1)) - (not (eobp))) - (byte-compile-file-form (read byte-compile-inbuffer))) - - ;; Compile pending forms at end of file. - (byte-compile-flush-pending) - (byte-compile-warn-about-unresolved-functions) - ;; Should we always do this? When calling multiple files, it - ;; would be useful to delay this warning until all have - ;; been compiled. - (setq byte-compile-unresolved-functions nil))) - (save-excursion - (set-buffer byte-compile-outbuffer) - (goto-char (point-min)))) - (if (not eval) - byte-compile-outbuffer - (let (form) - (while (condition-case nil - (progn (setq form (read byte-compile-outbuffer)) - t) - (end-of-file nil)) - (eval form))) - (kill-buffer byte-compile-outbuffer) - nil))) - - (defun byte-compile-insert-header (filename byte-compile-inbuffer - byte-compile-outbuffer) - (set-buffer byte-compile-inbuffer) - (let ((dynamic-docstrings byte-compile-dynamic-docstrings)) - (set-buffer byte-compile-outbuffer) - (goto-char 1) - ;; - ;; The magic number of .elc files is ";ELC", or 0x3B454C43. After that is - ;; the file-format version number (19 or 20) as a byte, followed by some - ;; nulls. The primary motivation for doing this is to get some binary - ;; characters up in the first line of the file so that `diff' will simply - ;; say "Binary files differ" instead of actually doing a diff of two .elc - ;; files. An extra benefit is that you can add this to /etc/magic: - ;; - ;; 0 string ;ELC GNU Emacs Lisp compiled file, - ;; >4 byte x version %d - ;; - (insert - ";ELC" - (if (byte-compile-version-cond byte-compile-emacs19-compatibility) 19 20) - "\000\000\000\n" - ) - (insert ";;; compiled by " - (or (and (boundp 'user-mail-address) user-mail-address) - (concat (user-login-name) "@" (system-name))) - " on " - (current-time-string) "\n;;; from file " filename "\n") - (insert ";;; emacs version " emacs-version ".\n") - (insert ";;; bytecomp version " byte-compile-version "\n;;; " - (cond - ((eq byte-optimize 'source) "source-level optimization only") - ((eq byte-optimize 'byte) "byte-level optimization only") - (byte-optimize "optimization is on") - (t "optimization is off")) - (if (byte-compile-version-cond byte-compile-emacs19-compatibility) - "; compiled with Emacs 19 compatibility.\n" - ".\n")) - (if (not (byte-compile-version-cond byte-compile-emacs19-compatibility)) - (insert ";;; this file uses opcodes which do not exist in Emacs 19.\n" - ;; Have to check if emacs-version is bound so that this works - ;; in files loaded early in loadup.el. - "\n(if (and (boundp 'emacs-version)\n" - "\t (or (and (boundp 'epoch::version) epoch::version)\n" - "\t (string-lessp emacs-version \"20\")))\n" - " (error \"`" - ;; prin1-to-string is used to quote backslashes. - (substring (prin1-to-string (file-name-nondirectory filename)) - 1 -1) - "' was compiled for Emacs 20\"))\n\n")) - (insert "(or (boundp 'current-load-list) (setq current-load-list nil))\n" - "\n") - (if (and (byte-compile-version-cond byte-compile-emacs19-compatibility) - dynamic-docstrings) - (insert ";;; this file uses opcodes which do not exist prior to\n" - ";;; XEmacs 19.14/GNU Emacs 19.29 or later." - ;; Have to check if emacs-version is bound so that this works - ;; in files loaded early in loadup.el. - "\n(if (and (boundp 'emacs-version)\n" - "\t (or (and (boundp 'epoch::version) epoch::version)\n" - "\t (and (not (string-match \"XEmacs\" emacs-version))\n" - "\t (string-lessp emacs-version \"19.29\"))\n" - "\t (string-lessp emacs-version \"19.14\")))\n" - " (error \"`" - ;; prin1-to-string is used to quote backslashes. - (substring (prin1-to-string (file-name-nondirectory filename)) - 1 -1) - "' was compiled for XEmacs 19.14/Emacs 19.29 or later\"))\n\n" - ) - )) - - ;; back in the inbuffer; determine and set the coding system for the .elc - ;; file if under Mule. If there are any extended characters in the - ;; input file, use `escape-quoted' to make sure that both binary and - ;; extended characters are output properly and distinguished properly. - ;; Otherwise, use `no-conversion' for maximum portability with non-Mule - ;; Emacsen. - (when (featurep 'mule) - (defvar buffer-file-coding-system) - (if (save-excursion - (set-buffer byte-compile-inbuffer) - (goto-char (point-min)) - ;; mrb- There must be a better way than skip-chars-forward - (skip-chars-forward (concat (char-to-string 0) "-" - (char-to-string 255))) - (eq (point) (point-max))) - (setq buffer-file-coding-system 'no-conversion) - (insert "(require 'mule)\n;;;###coding system: escape-quoted\n") - (setq buffer-file-coding-system 'escape-quoted) - ;; #### Lazy loading not yet implemented for MULE files - ;; mrb - Fix this someday. - (save-excursion - (set-buffer byte-compile-inbuffer) - (setq byte-compile-dynamic nil - byte-compile-dynamic-docstrings nil)) - ;;(external-debugging-output (prin1-to-string (buffer-local-variables)))) - )) - ) - - - (defun byte-compile-output-file-form (form) - ;; writes the given form to the output buffer, being careful of docstrings - ;; in defun, defmacro, defvar, defconst and autoload because make-docfile is - ;; so amazingly stupid. - ;; defalias calls are output directly by byte-compile-file-form-defmumble; - ;; it does not pay to first build the defalias in defmumble and then parse - ;; it here. - (if (and (memq (car-safe form) '(defun defmacro defvar defconst autoload)) - (stringp (nth 3 form))) - (byte-compile-output-docform nil nil '("\n(" 3 ")") form nil - (eq (car form) 'autoload)) - (let ((print-escape-newlines t) - (print-length nil) - (print-level nil) - (print-readably t) ; print #[] for bytecode, 'x for (quote x) - (print-gensym (if (and byte-compile-print-gensym - (not byte-compile-emacs19-compatibility)) - t nil))) - (princ "\n" byte-compile-outbuffer) - (prin1 form byte-compile-outbuffer) - nil))) - - (defun byte-compile-output-docform (preface name info form specindex quoted) - "Print a form with a doc string. INFO is (prefix doc-index postfix). - If PREFACE and NAME are non-nil, print them too, - before INFO and the FORM but after the doc string itself. - If SPECINDEX is non-nil, it is the index in FORM - of the function bytecode string. In that case, - we output that argument and the following argument (the constants vector) - together, for lazy loading. - QUOTED says that we have to put a quote before the - list that represents a doc string reference. - `autoload' needs that." - ;; We need to examine byte-compile-dynamic-docstrings - ;; in the input buffer (now current), not in the output buffer. - (let ((dynamic-docstrings byte-compile-dynamic-docstrings)) - (set-buffer - (prog1 (current-buffer) - (set-buffer byte-compile-outbuffer) - (let (position) - - ;; Insert the doc string, and make it a comment with #@LENGTH. - (and (>= (nth 1 info) 0) - dynamic-docstrings - (progn - ;; Make the doc string start at beginning of line - ;; for make-docfile's sake. - (insert "\n") - (setq position - (byte-compile-output-as-comment - (nth (nth 1 info) form) nil)) - ;; If the doc string starts with * (a user variable), - ;; negate POSITION. - (if (and (stringp (nth (nth 1 info) form)) - (> (length (nth (nth 1 info) form)) 0) - (char= (aref (nth (nth 1 info) form) 0) ?*)) - (setq position (- position))))) - - (if preface - (progn - (insert preface) - (prin1 name byte-compile-outbuffer))) - (insert (car info)) - (let ((print-escape-newlines t) - (print-readably t) ; print #[] for bytecode, 'x for (quote x) - ;; Use a cons cell to say that we want - ;; print-gensym-alist not to be cleared between calls - ;; to print functions. - (print-gensym (if (and byte-compile-print-gensym - (not byte-compile-emacs19-compatibility)) - '(t) nil)) - print-gensym-alist - (index 0)) - (prin1 (car form) byte-compile-outbuffer) - (while (setq form (cdr form)) - (setq index (1+ index)) - (insert " ") - (cond ((and (numberp specindex) (= index specindex)) - (let ((position - (byte-compile-output-as-comment - (cons (car form) (nth 1 form)) - t))) - (princ (format "(#$ . %d) nil" position) - byte-compile-outbuffer) - (setq form (cdr form)) - (setq index (1+ index)))) - ((= index (nth 1 info)) - (if position - (princ (format (if quoted "'(#$ . %d)" "(#$ . %d)") - position) - byte-compile-outbuffer) - (let ((print-escape-newlines nil)) - (goto-char (prog1 (1+ (point)) - (prin1 (car form) - byte-compile-outbuffer))) - (insert "\\\n") - (goto-char (point-max))))) - (t - (prin1 (car form) byte-compile-outbuffer))))) - (insert (nth 2 info)))))) - nil) - - (defvar for-effect) ; ## Kludge! This should be an arg, not a special. - - (defun byte-compile-keep-pending (form &optional handler) - (if (memq byte-optimize '(t source)) - (setq form (byte-optimize-form form t))) - (if handler - (let ((for-effect t)) - ;; To avoid consing up monstrously large forms at load time, we split - ;; the output regularly. - (and (memq (car-safe form) '(fset defalias define-function)) - (nthcdr 300 byte-compile-output) - (byte-compile-flush-pending)) - (funcall handler form) - (when for-effect - (byte-compile-discard))) - (byte-compile-form form t)) - nil) - - (defun byte-compile-flush-pending () - (if byte-compile-output - (let ((form (byte-compile-out-toplevel t 'file))) - (cond ((eq (car-safe form) 'progn) - (mapcar 'byte-compile-output-file-form (cdr form))) - (form - (byte-compile-output-file-form form))) - (setq byte-compile-constants nil - byte-compile-variables nil - byte-compile-depth 0 - byte-compile-maxdepth 0 - byte-compile-output nil)))) - - (defun byte-compile-file-form (form) - (let ((byte-compile-current-form nil) ; close over this for warnings. - handler) - (cond - ((not (consp form)) - (byte-compile-keep-pending form)) - ((and (symbolp (car form)) - (setq handler (get (car form) 'byte-hunk-handler))) - (cond ((setq form (funcall handler form)) - (byte-compile-flush-pending) - (byte-compile-output-file-form form)))) - ((eq form (setq form (macroexpand form byte-compile-macro-environment))) - (byte-compile-keep-pending form)) - (t - (byte-compile-file-form form))))) - - ;; Functions and variables with doc strings must be output separately, - ;; so make-docfile can recognize them. Most other things can be output - ;; as byte-code. - - (put 'defsubst 'byte-hunk-handler 'byte-compile-file-form-defsubst) - (defun byte-compile-file-form-defsubst (form) - (cond ((assq (nth 1 form) byte-compile-unresolved-functions) - (setq byte-compile-current-form (nth 1 form)) - (byte-compile-warn "defsubst %s was used before it was defined" - (nth 1 form)))) - (byte-compile-file-form - (macroexpand form byte-compile-macro-environment)) - ;; Return nil so the form is not output twice. - nil) - - (put 'autoload 'byte-hunk-handler 'byte-compile-file-form-autoload) - (defun byte-compile-file-form-autoload (form) - ;; - ;; If this is an autoload of a macro, and all arguments are constants (that - ;; is, there is no hairy computation going on here) then evaluate the form - ;; at compile-time. This is so that we can make use of macros which we - ;; have autoloaded from the file being compiled. Normal function autoloads - ;; are not automatically evaluated at compile time, because there's not - ;; much point to it (so why bother cluttering up the compile-time namespace.) - ;; - ;; If this is an autoload of a function, then record its definition in the - ;; byte-compile-autoload-environment to suppress any `not known to be - ;; defined' warnings at the end of this file (this only matters for - ;; functions which are autoloaded and compiled in the same file, if the - ;; autoload already exists in the compilation environment, we wouldn't have - ;; warned anyway.) - ;; - (let* ((name (if (byte-compile-constp (nth 1 form)) - (eval (nth 1 form)))) - ;; In v19, the 5th arg to autoload can be t, nil, 'macro, or 'keymap. - (macrop (and (byte-compile-constp (nth 5 form)) - (memq (eval (nth 5 form)) '(t macro)))) - ;; (functionp (and (byte-compile-constp (nth 5 form)) - ;; (eq 'nil (eval (nth 5 form))))) - ) - (if (and macrop - (let ((form form)) - ;; all forms are constant - (while (if (setq form (cdr form)) - (byte-compile-constp (car form)))) - (null form))) - ;; eval the macro autoload into the compilation enviroment - (eval form)) - - (if name - (let ((old (assq name byte-compile-autoload-environment))) - (cond (old - (if (memq 'redefine byte-compile-warnings) - (byte-compile-warn "multiple autoloads for %s" name)) - (setcdr old form)) - (t - ;; We only use the names in the autoload environment, but - ;; it might be useful to have the bodies some day. - (setq byte-compile-autoload-environment - (cons (cons name form) - byte-compile-autoload-environment))))))) - ;; - ;; Now output the form. - (if (stringp (nth 3 form)) - form - ;; No doc string, so we can compile this as a normal form. - (byte-compile-keep-pending form 'byte-compile-normal-call))) - - (put 'defvar 'byte-hunk-handler 'byte-compile-file-form-defvar) - (put 'defconst 'byte-hunk-handler 'byte-compile-file-form-defvar) - (defun byte-compile-file-form-defvar (form) - (if (> (length form) 4) - (byte-compile-warn "%s used with too many args (%s)" - (car form) (nth 1 form))) - (if (and (> (length form) 3) (not (stringp (nth 3 form)))) - (byte-compile-warn "Third arg to %s %s is not a string: %s" - (car form) (nth 1 form) (nth 3 form))) - (if (null (nth 3 form)) - ;; Since there is no doc string, we can compile this as a normal form, - ;; and not do a file-boundary. - (byte-compile-keep-pending form) - (if (memq 'free-vars byte-compile-warnings) - (setq byte-compile-bound-variables - (cons (cons (nth 1 form) byte-compile-global-bit) - byte-compile-bound-variables))) - (cond ((consp (nth 2 form)) - (setq form (copy-sequence form)) - (setcar (cdr (cdr form)) - (byte-compile-top-level (nth 2 form) nil 'file)))) - - ;; The following turns out not to be necessary, since we emit a call to - ;; defvar, which can hack Vfile_domain by itself! - ;; - ;; If a file domain has been set, emit (put 'VAR 'variable-domain ...) - ;; after this defvar. - ; (if byte-compile-file-domain - ; (progn - ; ;; Actually, this will emit the (put ...) before the (defvar ...) - ; ;; but I don't think that can matter in this case. - ; (byte-compile-keep-pending - ; (list 'put (list 'quote (nth 1 form)) ''variable-domain - ; (list 'quote byte-compile-file-domain))))) - form)) - - (put 'require 'byte-hunk-handler 'byte-compile-file-form-eval-boundary) - (defun byte-compile-file-form-eval-boundary (form) - (eval form) - (byte-compile-keep-pending form 'byte-compile-normal-call)) - - (put 'progn 'byte-hunk-handler 'byte-compile-file-form-progn) - (put 'prog1 'byte-hunk-handler 'byte-compile-file-form-progn) - (put 'prog2 'byte-hunk-handler 'byte-compile-file-form-progn) - (defun byte-compile-file-form-progn (form) - (mapcar 'byte-compile-file-form (cdr form)) - ;; Return nil so the forms are not output twice. - nil) - - ;; This handler is not necessary, but it makes the output from dont-compile - ;; and similar macros cleaner. - (put 'eval 'byte-hunk-handler 'byte-compile-file-form-eval) - (defun byte-compile-file-form-eval (form) - (if (eq (car-safe (nth 1 form)) 'quote) - (nth 1 (nth 1 form)) - (byte-compile-keep-pending form))) - - (put 'defun 'byte-hunk-handler 'byte-compile-file-form-defun) - (defun byte-compile-file-form-defun (form) - (byte-compile-file-form-defmumble form nil)) - - (put 'defmacro 'byte-hunk-handler 'byte-compile-file-form-defmacro) - (defun byte-compile-file-form-defmacro (form) - (byte-compile-file-form-defmumble form t)) - - (defun byte-compile-compiled-obj-to-list (obj) - ;; #### this is fairly disgusting. Rewrite the code instead - ;; so that it doesn't create compiled objects in the first place! - ;; Much better than creating them and then "uncreating" them - ;; like this. - (read (concat "(" - (substring (let ((print-readably t) - (print-gensym - (if (and byte-compile-print-gensym - (not byte-compile-emacs19-compatibility)) - '(t) nil)) - (print-gensym-alist nil)) - (prin1-to-string obj)) - 2 -1) - ")"))) - - (defun byte-compile-file-form-defmumble (form macrop) - (let* ((name (car (cdr form))) - (this-kind (if macrop 'byte-compile-macro-environment - 'byte-compile-function-environment)) - (that-kind (if macrop 'byte-compile-function-environment - 'byte-compile-macro-environment)) - (this-one (assq name (symbol-value this-kind))) - (that-one (assq name (symbol-value that-kind))) - (byte-compile-free-references nil) - (byte-compile-free-assignments nil)) - - ;; When a function or macro is defined, add it to the call tree so that - ;; we can tell when functions are not used. - (if byte-compile-generate-call-tree - (or (assq name byte-compile-call-tree) - (setq byte-compile-call-tree - (cons (list name nil nil) byte-compile-call-tree)))) - - (setq byte-compile-current-form name) ; for warnings - (when (memq 'redefine byte-compile-warnings) - (byte-compile-arglist-warn form macrop)) - (defvar filename) ; #### filename used free - (when byte-compile-verbose - (message "Compiling %s... (%s)" - (if filename (file-name-nondirectory filename) "") - (nth 1 form))) - (cond (that-one - (when (and (memq 'redefine byte-compile-warnings) - ;; hack hack: don't warn when compiling the stubs in - ;; bytecomp-runtime... - (not (assq (nth 1 form) - byte-compile-initial-macro-environment))) - (byte-compile-warn - "%s defined multiple times, as both function and macro" - (nth 1 form))) - (setcdr that-one nil)) - (this-one - (when (and (memq 'redefine byte-compile-warnings) - ;; hack: don't warn when compiling the magic internal - ;; byte-compiler macros in bytecomp-runtime.el... - (not (assq (nth 1 form) - byte-compile-initial-macro-environment))) - (byte-compile-warn "%s %s defined multiple times in this file" - (if macrop "macro" "function") - (nth 1 form)))) - ((and (fboundp name) - (or (subrp (symbol-function name)) - (eq (car-safe (symbol-function name)) - (if macrop 'lambda 'macro)))) - (if (memq 'redefine byte-compile-warnings) - (byte-compile-warn "%s %s being redefined as a %s" - (if (subrp (symbol-function name)) - "subr" - (if macrop "function" "macro")) - (nth 1 form) - (if macrop "macro" "function"))) - ;; shadow existing definition - (set this-kind - (cons (cons name nil) (symbol-value this-kind))))) - (let ((body (nthcdr 3 form))) - (if (and (stringp (car body)) - (symbolp (car-safe (cdr-safe body))) - (car-safe (cdr-safe body)) - (stringp (car-safe (cdr-safe (cdr-safe body))))) - (byte-compile-warn "Probable `\"' without `\\' in doc string of %s" - (nth 1 form)))) - (let* ((new-one (byte-compile-lambda (cons 'lambda (nthcdr 2 form)))) - (code (byte-compile-byte-code-maker new-one))) - (if this-one - (setcdr this-one new-one) - (set this-kind - (cons (cons name new-one) (symbol-value this-kind)))) - (if (and (stringp (nth 3 form)) - (eq 'quote (car-safe code)) - (eq 'lambda (car-safe (nth 1 code)))) - (cons (car form) - (cons name (cdr (nth 1 code)))) - (byte-compile-flush-pending) - (if (not (stringp (nth 3 form))) - ;; No doc string. Provide -1 as the "doc string index" - ;; so that no element will be treated as a doc string. - (byte-compile-output-docform - "\n(defalias '" - name - (cond ((atom code) - (if macrop '(" '(macro . #[" -1 "])") '(" #[" -1 "]"))) - ((eq (car code) 'quote) - (setq code new-one) - (if macrop '(" '(macro " -1 ")") '(" '(" -1 ")"))) - ((if macrop '(" (cons 'macro (" -1 "))") '(" (" -1 ")")))) - ;; FSF just calls `(append code nil)' here but that relies - ;; on horrible C kludges in concat() that accept byte- - ;; compiled objects and pretend they're vectors. - (if (compiled-function-p code) - (byte-compile-compiled-obj-to-list code) - (append code nil)) - (and (atom code) byte-compile-dynamic - 1) - nil) - ;; Output the form by hand, that's much simpler than having - ;; b-c-output-file-form analyze the defalias. - (byte-compile-output-docform - "\n(defalias '" - name - (cond ((atom code) ; compiled-function-p - (if macrop '(" '(macro . #[" 4 "])") '(" #[" 4 "]"))) - ((eq (car code) 'quote) - (setq code new-one) - (if macrop '(" '(macro " 2 ")") '(" '(" 2 ")"))) - ((if macrop '(" (cons 'macro (" 5 "))") '(" (" 5 ")")))) - ;; The result of byte-compile-byte-code-maker is either a - ;; compiled-function object, or a list of some kind. If it's - ;; not a cons, we must coerce it into a list of the elements - ;; to be printed to the file. - (if (consp code) - code - (nconc (list - (compiled-function-arglist code) - (compiled-function-instructions code) - (compiled-function-constants code) - (compiled-function-stack-depth code)) - (let ((doc (documentation code t))) - (if doc (list doc))) - (if (commandp code) - (list (nth 1 (compiled-function-interactive code)))))) - (and (atom code) byte-compile-dynamic - 1) - nil)) - (princ ")" byte-compile-outbuffer) - nil)))) - - ;; Print Lisp object EXP in the output file, inside a comment, - ;; and return the file position it will have. - ;; If QUOTED is non-nil, print with quoting; otherwise, print without quoting. - (defun byte-compile-output-as-comment (exp quoted) - (let ((position (point))) - (set-buffer - (prog1 (current-buffer) - (set-buffer byte-compile-outbuffer) - - ;; Insert EXP, and make it a comment with #@LENGTH. - (insert " ") - (if quoted - (prin1 exp byte-compile-outbuffer) - (princ exp byte-compile-outbuffer)) - (goto-char position) - ;; Quote certain special characters as needed. - ;; get_doc_string in doc.c does the unquoting. - (while (search-forward "\^A" nil t) - (replace-match "\^A\^A" t t)) - (goto-char position) - (while (search-forward "\000" nil t) - (replace-match "\^A0" t t)) - (goto-char position) - (while (search-forward "\037" nil t) - (replace-match "\^A_" t t)) - (goto-char (point-max)) - (insert "\037") - (goto-char position) - (insert "#@" (format "%d" (- (point-max) position))) - - ;; Save the file position of the object. - ;; Note we should add 1 to skip the space - ;; that we inserted before the actual doc string, - ;; and subtract 1 to convert from an 1-origin Emacs position - ;; to a file position; they cancel. - (setq position (point)) - (goto-char (point-max)))) - position)) - - - - ;; The `domain' declaration. This is legal only at top-level in a file, and - ;; should generally be the first form in the file. It is not legal inside - ;; function bodies. - - (put 'domain 'byte-hunk-handler 'byte-compile-file-form-domain) - (defun byte-compile-file-form-domain (form) - (if (not (null (cdr (cdr form)))) - (byte-compile-warn "domain used with too many arguments: %s" form)) - (let ((domain (nth 1 form))) - (or (null domain) - (stringp domain) - (progn - (byte-compile-warn - "argument to `domain' declaration must be a literal string: %s" - form) - (setq domain nil))) - (setq byte-compile-file-domain domain)) - (byte-compile-keep-pending form 'byte-compile-normal-call)) - - (defun byte-compile-domain (form) - (byte-compile-warn "The `domain' declaration is legal only at top-level: %s" - (let ((print-escape-newlines t) - (print-level 4) - (print-length 4)) - (prin1-to-string form))) - (byte-compile-normal-call - (list 'signal ''error - (list 'quote (list "`domain' used inside a function" form))))) - - ;; This is part of bytecomp.el in 19.35: - (put 'custom-declare-variable 'byte-hunk-handler - 'byte-compile-file-form-custom-declare-variable) - (defun byte-compile-file-form-custom-declare-variable (form) - (if (memq 'free-vars byte-compile-warnings) - (setq byte-compile-bound-variables - (cons (cons (nth 1 (nth 1 form)) - byte-compile-global-bit) - byte-compile-bound-variables))) - form) - - - ;;;###autoload - (defun byte-compile (form) - "If FORM is a symbol, byte-compile its function definition. - If FORM is a lambda or a macro, byte-compile it as a function." - (displaying-byte-compile-warnings - (byte-compile-close-variables - (let* ((fun (if (symbolp form) - (and (fboundp form) (symbol-function form)) - form)) - (macro (eq (car-safe fun) 'macro))) - (if macro - (setq fun (cdr fun))) - (cond ((eq (car-safe fun) 'lambda) - (setq fun (if macro - (cons 'macro (byte-compile-lambda fun)) - (byte-compile-lambda fun))) - (if (symbolp form) - (defalias form fun) - fun))))))) - - ;;;###autoload - (defun byte-compile-sexp (sexp &optional msg) - "Compile and return SEXP." - (displaying-byte-compile-warnings - (byte-compile-close-variables - (prog1 - (byte-compile-top-level sexp) - (byte-compile-warn-about-unresolved-functions msg))))) - - ;; Given a function made by byte-compile-lambda, make a form which produces it. - (defun byte-compile-byte-code-maker (fun) - (cond - ;; ## atom is faster than compiled-func-p. - ((atom fun) ; compiled-function-p - fun) - ;; b-c-lambda didn't produce a compiled-function, so it must be a trivial - ;; function. - ((let (tmp) - (if (and (setq tmp (assq 'byte-code (cdr-safe (cdr fun)))) - (null (cdr (memq tmp fun)))) - ;; Generate a make-byte-code call. - (let* ((interactive (assq 'interactive (cdr (cdr fun))))) - (nconc (list 'make-byte-code - (list 'quote (nth 1 fun)) ;arglist - (nth 1 tmp) ;instructions - (nth 2 tmp) ;constants - (nth 3 tmp)) ;stack-depth - (cond ((stringp (nth 2 fun)) - (list (nth 2 fun))) ;docstring - (interactive - (list nil))) - (cond (interactive - (list (if (or (null (nth 1 interactive)) - (stringp (nth 1 interactive))) - (nth 1 interactive) - ;; Interactive spec is a list or a variable - ;; (if it is correct). - (list 'quote (nth 1 interactive)))))))) - ;; a non-compiled function (probably trivial) - (list 'quote fun)))))) - - ;; Byte-compile a lambda-expression and return a valid function. - ;; The value is usually a compiled function but may be the original - ;; lambda-expression. - (defun byte-compile-lambda (fun) - (or (eq 'lambda (car-safe fun)) - (error "not a lambda -- %s" (prin1-to-string fun))) - (let* ((arglist (nth 1 fun)) - (byte-compile-bound-variables - (let ((new-bindings - (mapcar #'(lambda (x) (cons x byte-compile-arglist-bit)) - (and (memq 'free-vars byte-compile-warnings) - (delq '&rest (delq '&optional - (copy-sequence arglist))))))) - (nconc new-bindings - (cons 'new-scope byte-compile-bound-variables)))) - (body (cdr (cdr fun))) - (doc (if (stringp (car body)) - (prog1 (car body) - (setq body (cdr body))))) - (int (assq 'interactive body))) - (dolist (arg arglist) - (cond ((not (symbolp arg)) - (byte-compile-warn "non-symbol in arglist: %S" arg)) - ((byte-compile-constant-symbol-p arg) - (byte-compile-warn "constant symbol in arglist: %s" arg)) - ((and (char= ?\& (aref (symbol-name arg) 0)) - (not (eq arg '&optional)) - (not (eq arg '&rest))) - (byte-compile-warn "unrecognized `&' keyword in arglist: %s" - arg)))) - (cond (int - ;; Skip (interactive) if it is in front (the most usual location). - (if (eq int (car body)) - (setq body (cdr body))) - (cond ((consp (cdr int)) - (if (cdr (cdr int)) - (byte-compile-warn "malformed interactive spec: %s" - (prin1-to-string int))) - ;; If the interactive spec is a call to `list', - ;; don't compile it, because `call-interactively' - ;; looks at the args of `list'. - (let ((form (nth 1 int))) - (while (or (eq (car-safe form) 'let) - (eq (car-safe form) 'let*) - (eq (car-safe form) 'save-excursion)) - (while (consp (cdr form)) - (setq form (cdr form))) - (setq form (car form))) - (or (eq (car-safe form) 'list) - (setq int (list 'interactive - (byte-compile-top-level (nth 1 int))))))) - ((cdr int) - (byte-compile-warn "malformed interactive spec: %s" - (prin1-to-string int)))))) - (let ((compiled (byte-compile-top-level (cons 'progn body) nil 'lambda))) - (if (memq 'unused-vars byte-compile-warnings) - ;; done compiling in this scope, warn now. - (byte-compile-warn-about-unused-variables)) - (if (eq 'byte-code (car-safe compiled)) - (apply 'make-byte-code - (append (list arglist) - ;; byte-string, constants-vector, stack depth - (cdr compiled) - ;; optionally, the doc string. - (if (or doc int) - (list doc)) - ;; optionally, the interactive spec. - (if int - (list (nth 1 int))))) - (setq compiled - (nconc (if int (list int)) - (cond ((eq (car-safe compiled) 'progn) (cdr compiled)) - (compiled (list compiled))))) - (nconc (list 'lambda arglist) - (if (or doc (stringp (car compiled))) - (cons doc (cond (compiled) - (body (list nil)))) - compiled)))))) - - (defun byte-compile-constants-vector () - ;; Builds the constants-vector from the current variables and constants. - ;; This modifies the constants from (const . nil) to (const . offset). - ;; To keep the byte-codes to look up the vector as short as possible: - ;; First 6 elements are vars, as there are one-byte varref codes for those. - ;; Next up to byte-constant-limit are constants, still with one-byte codes. - ;; Next variables again, to get 2-byte codes for variable lookup. - ;; The rest of the constants and variables need 3-byte byte-codes. - (let* ((i -1) - (rest (nreverse byte-compile-variables)) ; nreverse because the first - (other (nreverse byte-compile-constants)) ; vars often are used most. - ret tmp - (limits '(5 ; Use the 1-byte varref codes, - 63 ; 1-constlim ; 1-byte byte-constant codes, - 255 ; 2-byte varref codes, - 65535)) ; 3-byte codes for the rest. - limit) - (while (or rest other) - (setq limit (car limits)) - (while (and rest (not (eq i limit))) - (if (setq tmp (assq (car (car rest)) ret)) - (setcdr (car rest) (cdr tmp)) - (setcdr (car rest) (setq i (1+ i))) - (setq ret (cons (car rest) ret))) - (setq rest (cdr rest))) - (setq limits (cdr limits) - rest (prog1 other - (setq other rest)))) - (apply 'vector (nreverse (mapcar 'car ret))))) - - ;; Given an expression FORM, compile it and return an equivalent byte-code - ;; expression (a call to the function byte-code). - (defun byte-compile-top-level (form &optional for-effect output-type) - ;; OUTPUT-TYPE advises about how form is expected to be used: - ;; 'eval or nil -> a single form, - ;; 'progn or t -> a list of forms, - ;; 'lambda -> body of a lambda, - ;; 'file -> used at file-level. - (let ((byte-compile-constants nil) - (byte-compile-variables nil) - (byte-compile-tag-number 0) - (byte-compile-depth 0) - (byte-compile-maxdepth 0) - (byte-compile-output nil)) - (if (memq byte-optimize '(t source)) - (setq form (byte-optimize-form form for-effect))) - (while (and (eq (car-safe form) 'progn) (null (cdr (cdr form)))) - (setq form (nth 1 form))) - (if (and (eq 'byte-code (car-safe form)) - (not (memq byte-optimize '(t byte))) - (stringp (nth 1 form)) - (vectorp (nth 2 form)) - (natnump (nth 3 form))) - form - (byte-compile-form form for-effect) - (byte-compile-out-toplevel for-effect output-type)))) - - (defun byte-compile-out-toplevel (&optional for-effect output-type) - (if for-effect - ;; The stack is empty. Push a value to be returned from (byte-code ..). - (if (eq (car (car byte-compile-output)) 'byte-discard) - (setq byte-compile-output (cdr byte-compile-output)) - (byte-compile-push-constant - ;; Push any constant - preferably one which already is used, and - ;; a number or symbol - ie not some big sequence. The return value - ;; isn't returned, but it would be a shame if some textually large - ;; constant was not optimized away because we chose to return it. - (and (not (assq nil byte-compile-constants)) ; Nil is often there. - (let ((tmp (reverse byte-compile-constants))) - (while (and tmp (not (or (symbolp (car (car tmp))) - (numberp (car (car tmp)))))) - (setq tmp (cdr tmp))) - (car (car tmp))))))) - (byte-compile-out 'byte-return 0) - (setq byte-compile-output (nreverse byte-compile-output)) - (if (memq byte-optimize '(t byte)) - (setq byte-compile-output - (byte-optimize-lapcode byte-compile-output for-effect))) - - ;; Decompile trivial functions: - ;; only constants and variables, or a single funcall except in lambdas. - ;; Except for Lisp_Compiled objects, forms like (foo "hi") - ;; are still quicker than (byte-code "..." [foo "hi"] 2). - ;; Note that even (quote foo) must be parsed just as any subr by the - ;; interpreter, so quote should be compiled into byte-code in some contexts. - ;; What to leave uncompiled: - ;; lambda -> never. we used to leave it uncompiled if the body was - ;; a single atom, but that causes confusion if the docstring - ;; uses the (file . pos) syntax. Besides, now that we have - ;; the Lisp_Compiled type, the compiled form is faster. - ;; eval -> atom, quote or (function atom atom atom) - ;; progn -> as <> or (progn <> atom) - ;; file -> as progn, but takes both quotes and atoms, and longer forms. - (let (rest - (maycall (not (eq output-type 'lambda))) ; t if we may make a funcall. - tmp body) - (cond - ;; #### This should be split out into byte-compile-nontrivial-function-p. - ((or (eq output-type 'lambda) - (nthcdr (if (eq output-type 'file) 50 8) byte-compile-output) - (assq 'TAG byte-compile-output) ; Not necessary, but speeds up a bit. - (not (setq tmp (assq 'byte-return byte-compile-output))) - (progn - (setq rest (nreverse - (cdr (memq tmp (reverse byte-compile-output))))) - (while (cond - ((memq (car (car rest)) '(byte-varref byte-constant)) - (setq tmp (car (cdr (car rest)))) - (if (if (eq (car (car rest)) 'byte-constant) - (or (consp tmp) - (and (symbolp tmp) - (not (byte-compile-constant-symbol-p tmp))))) - (if maycall - (setq body (cons (list 'quote tmp) body))) - (setq body (cons tmp body)))) - ((and maycall - ;; Allow a funcall if at most one atom follows it. - (null (nthcdr 3 rest)) - (setq tmp - ;; XEmacs change for rms funs - (or (and - (byte-compile-version-cond - byte-compile-emacs19-compatibility) - (get (car (car rest)) - 'byte-opcode19-invert)) - (get (car (car rest)) - 'byte-opcode-invert))) - (or (null (cdr rest)) - (and (memq output-type '(file progn t)) - (cdr (cdr rest)) - (eq (car (nth 1 rest)) 'byte-discard) - (progn (setq rest (cdr rest)) t)))) - (setq maycall nil) ; Only allow one real function call. - (setq body (nreverse body)) - (setq body (list - (if (and (eq tmp 'funcall) - (eq (car-safe (car body)) 'quote)) - (cons (nth 1 (car body)) (cdr body)) - (cons tmp body)))) - (or (eq output-type 'file) - (not (delq nil (mapcar 'consp (cdr (car body)))))))) - (setq rest (cdr rest))) - rest)) - (let ((byte-compile-vector (byte-compile-constants-vector))) - (list 'byte-code (byte-compile-lapcode byte-compile-output) - byte-compile-vector byte-compile-maxdepth))) - ;; it's a trivial function - ((cdr body) (cons 'progn (nreverse body))) - ((car body))))) - - ;; Given BODY, compile it and return a new body. - (defun byte-compile-top-level-body (body &optional for-effect) - (setq body (byte-compile-top-level (cons 'progn body) for-effect t)) - (cond ((eq (car-safe body) 'progn) - (cdr body)) - (body - (list body)))) - - ;; This is the recursive entry point for compiling each subform of an - ;; expression. - ;; If for-effect is non-nil, byte-compile-form will output a byte-discard - ;; before terminating (ie. no value will be left on the stack). - ;; A byte-compile handler may, when for-effect is non-nil, choose output code - ;; which does not leave a value on the stack, and then set for-effect to nil - ;; (to prevent byte-compile-form from outputting the byte-discard). - ;; If a handler wants to call another handler, it should do so via - ;; byte-compile-form, or take extreme care to handle for-effect correctly. - ;; (Use byte-compile-form-do-effect to reset the for-effect flag too.) - ;; - (defun byte-compile-form (form &optional for-effect) - (setq form (macroexpand form byte-compile-macro-environment)) - (cond ((not (consp form)) - (cond ((or (not (symbolp form)) - (byte-compile-constant-symbol-p form)) - (byte-compile-constant form)) - ((and for-effect byte-compile-delete-errors) - (setq for-effect nil)) - (t (byte-compile-variable-ref 'byte-varref form)))) - ((symbolp (car form)) - (let* ((fn (car form)) - (handler (get fn 'byte-compile))) - (if (memq fn '(t nil)) - (byte-compile-warn "%s called as a function" fn)) - (if (and handler - (or (not (byte-compile-version-cond - byte-compile-emacs19-compatibility)) - (not (get (get fn 'byte-opcode) 'emacs20-opcode)))) - (funcall handler form) - (if (memq 'callargs byte-compile-warnings) - (byte-compile-callargs-warn form)) - (byte-compile-normal-call form)))) - ((and (or (compiled-function-p (car form)) - (eq (car-safe (car form)) 'lambda)) - ;; if the form comes out the same way it went in, that's - ;; because it was malformed, and we couldn't unfold it. - (not (eq form (setq form (byte-compile-unfold-lambda form))))) - (byte-compile-form form for-effect) - (setq for-effect nil)) - ((byte-compile-normal-call form))) - (when for-effect - (byte-compile-discard))) - - (defun byte-compile-normal-call (form) - (if byte-compile-generate-call-tree - (byte-compile-annotate-call-tree form)) - (byte-compile-push-constant (car form)) - (mapcar 'byte-compile-form (cdr form)) ; wasteful, but faster. - (byte-compile-out 'byte-call (length (cdr form)))) - - ;; kludge added to XEmacs to work around the bogosities of a nonlexical lisp. - (or (fboundp 'globally-boundp) (fset 'globally-boundp 'boundp)) - - (defun byte-compile-variable-ref (base-op var &optional varbind-flags) - (if (or (not (symbolp var)) (byte-compile-constant-symbol-p var)) - (byte-compile-warn - (case base-op - (byte-varref "Variable reference to %s %s") - (byte-varset "Attempt to set %s %s") - (byte-varbind "Attempt to let-bind %s %s")) - (if (symbolp var) "constant symbol" "non-symbol") - var) - (if (and (get var 'byte-obsolete-variable) - (memq 'obsolete byte-compile-warnings)) - (let ((ob (get var 'byte-obsolete-variable))) - (byte-compile-warn "%s is an obsolete variable; %s" var - (if (stringp ob) - ob - (format "use %s instead." ob))))) - (if (and (get var 'byte-compatible-variable) - (memq 'pedantic byte-compile-warnings)) - (let ((ob (get var 'byte-compatible-variable))) - (byte-compile-warn "%s is provided for compatibility; %s" var - (if (stringp ob) - ob - (format "use %s instead." ob))))) - (if (memq 'free-vars byte-compile-warnings) - (if (eq base-op 'byte-varbind) - (setq byte-compile-bound-variables - (cons (cons var (or varbind-flags 0)) - byte-compile-bound-variables)) - (or (globally-boundp var) - (let ((cell (assq var byte-compile-bound-variables))) - (if cell (setcdr cell - (logior (cdr cell) - (if (eq base-op 'byte-varset) - byte-compile-assigned-bit - byte-compile-referenced-bit))))) - (if (eq base-op 'byte-varset) - (or (memq var byte-compile-free-assignments) - (progn - (byte-compile-warn "assignment to free variable %s" - var) - (setq byte-compile-free-assignments - (cons var byte-compile-free-assignments)))) - (or (memq var byte-compile-free-references) - (progn - (byte-compile-warn "reference to free variable %s" var) - (setq byte-compile-free-references - (cons var byte-compile-free-references))))))))) - (let ((tmp (assq var byte-compile-variables))) - (or tmp - (setq tmp (list var) - byte-compile-variables (cons tmp byte-compile-variables))) - (byte-compile-out base-op tmp))) - - (defmacro byte-compile-get-constant (const) - `(or (if (stringp ,const) - (assoc ,const byte-compile-constants) - (assq ,const byte-compile-constants)) - (car (setq byte-compile-constants - (cons (list ,const) byte-compile-constants))))) - - ;; Use this when the value of a form is a constant. This obeys for-effect. - (defun byte-compile-constant (const) - (if for-effect - (setq for-effect nil) - (byte-compile-out 'byte-constant (byte-compile-get-constant const)))) - - ;; Use this for a constant that is not the value of its containing form. - ;; This ignores for-effect. - (defun byte-compile-push-constant (const) - (let ((for-effect nil)) - (inline (byte-compile-constant const)))) - - - ;; Compile those primitive ordinary functions - ;; which have special byte codes just for speed. - - (defmacro byte-defop-compiler (function &optional compile-handler) - ;; add a compiler-form for FUNCTION. - ;; If function is a symbol, then the variable "byte-SYMBOL" must name - ;; the opcode to be used. If function is a list, the first element - ;; is the function and the second element is the bytecode-symbol. - ;; COMPILE-HANDLER is the function to use to compile this byte-op, or - ;; may be the abbreviations 0, 1, 2, 3, 0-1, 1-2, 2-3, 0+1, 1+1, 2+1, - ;; 0-1+1, 1-2+1, 2-3+1, 0+2, or 1+2. If it is nil, then the handler is - ;; "byte-compile-SYMBOL." - (let (opcode) - (if (symbolp function) - (setq opcode (intern (concat "byte-" (symbol-name function)))) - (setq opcode (car (cdr function)) - function (car function))) - (let ((fnform - (list 'put (list 'quote function) ''byte-compile - (list 'quote - (or (cdr (assq compile-handler - '((0 . byte-compile-no-args) - (1 . byte-compile-one-arg) - (2 . byte-compile-two-args) - (3 . byte-compile-three-args) - (0-1 . byte-compile-zero-or-one-arg) - (1-2 . byte-compile-one-or-two-args) - (2-3 . byte-compile-two-or-three-args) - (0+1 . byte-compile-no-args-with-one-extra) - (1+1 . byte-compile-one-arg-with-one-extra) - (2+1 . byte-compile-two-args-with-one-extra) - (0-1+1 . byte-compile-zero-or-one-arg-with-one-extra) - (1-2+1 . byte-compile-one-or-two-args-with-one-extra) - (2-3+1 . byte-compile-two-or-three-args-with-one-extra) - (0+2 . byte-compile-no-args-with-two-extra) - (1+2 . byte-compile-one-arg-with-two-extra) - - ))) - compile-handler - (intern (concat "byte-compile-" - (symbol-name function)))))))) - (if opcode - (list 'progn fnform - (list 'put (list 'quote function) - ''byte-opcode (list 'quote opcode)) - (list 'put (list 'quote opcode) - ''byte-opcode-invert (list 'quote function))) - fnform)))) - - (defmacro byte-defop-compiler20 (function &optional compile-handler) - ;; Just like byte-defop-compiler, but defines an opcode that will only - ;; be used when byte-compile-emacs19-compatibility is false. - (if (and (byte-compile-single-version) - byte-compile-emacs19-compatibility) - ;; #### instead of doing nothing, this should do some remprops, - ;; #### to protect against the case where a single-version compiler - ;; #### is loaded into a world that has contained a multi-version one. - nil - (list 'progn - (list 'put - (list 'quote - (or (car (cdr-safe function)) - (intern (concat "byte-" - (symbol-name (or (car-safe function) function)))))) - ''emacs20-opcode t) - (list 'byte-defop-compiler function compile-handler)))) - - ;; XEmacs addition: - (defmacro byte-defop-compiler-rmsfun (function &optional compile-handler) - ;; for functions like `eq' that compile into different opcodes depending - ;; on the Emacs version: byte-old-eq for v19, byte-eq for v20. - (let ((opcode (intern (concat "byte-" (symbol-name function)))) - (opcode19 (intern (concat "byte-old-" (symbol-name function)))) - (fnform - (list 'put (list 'quote function) ''byte-compile - (list 'quote - (or (cdr (assq compile-handler - '((2 . byte-compile-two-args-19->20) - ))) - compile-handler - (intern (concat "byte-compile-" - (symbol-name function)))))))) - (list 'progn fnform - (list 'put (list 'quote function) - ''byte-opcode (list 'quote opcode)) - (list 'put (list 'quote function) - ''byte-opcode19 (list 'quote opcode19)) - (list 'put (list 'quote opcode) - ''byte-opcode-invert (list 'quote function)) - (list 'put (list 'quote opcode19) - ''byte-opcode19-invert (list 'quote function))))) - - (defmacro byte-defop-compiler-1 (function &optional compile-handler) - (list 'byte-defop-compiler (list function nil) compile-handler)) - - - (put 'byte-call 'byte-opcode-invert 'funcall) - (put 'byte-list1 'byte-opcode-invert 'list) - (put 'byte-list2 'byte-opcode-invert 'list) - (put 'byte-list3 'byte-opcode-invert 'list) - (put 'byte-list4 'byte-opcode-invert 'list) - (put 'byte-listN 'byte-opcode-invert 'list) - (put 'byte-concat2 'byte-opcode-invert 'concat) - (put 'byte-concat3 'byte-opcode-invert 'concat) - (put 'byte-concat4 'byte-opcode-invert 'concat) - (put 'byte-concatN 'byte-opcode-invert 'concat) - (put 'byte-insertN 'byte-opcode-invert 'insert) - - ;; How old is this stuff? -slb - ;(byte-defop-compiler (dot byte-point) 0+1) - ;(byte-defop-compiler (dot-max byte-point-max) 0+1) - ;(byte-defop-compiler (dot-min byte-point-min) 0+1) - (byte-defop-compiler point 0+1) - (byte-defop-compiler-rmsfun eq 2) - (byte-defop-compiler point-max 0+1) - (byte-defop-compiler point-min 0+1) - (byte-defop-compiler following-char 0+1) - (byte-defop-compiler preceding-char 0+1) - (byte-defop-compiler current-column 0+1) - ;; FSF has special function here; generalized here by the 1+2 stuff. - (byte-defop-compiler (indent-to-column byte-indent-to) 1+2) - (byte-defop-compiler indent-to 1+2) - (byte-defop-compiler-rmsfun equal 2) - (byte-defop-compiler eolp 0+1) - (byte-defop-compiler eobp 0+1) - (byte-defop-compiler bolp 0+1) - (byte-defop-compiler bobp 0+1) - (byte-defop-compiler current-buffer 0) - ;;(byte-defop-compiler read-char 0) ;; obsolete - (byte-defop-compiler-rmsfun memq 2) - (byte-defop-compiler interactive-p 0) - (byte-defop-compiler widen 0+1) - (byte-defop-compiler end-of-line 0-1+1) - (byte-defop-compiler forward-char 0-1+1) - (byte-defop-compiler forward-line 0-1+1) - (byte-defop-compiler symbolp 1) - (byte-defop-compiler consp 1) - (byte-defop-compiler stringp 1) - (byte-defop-compiler listp 1) - (byte-defop-compiler not 1) - (byte-defop-compiler (null byte-not) 1) - (byte-defop-compiler car 1) - (byte-defop-compiler cdr 1) - (byte-defop-compiler length 1) - (byte-defop-compiler symbol-value 1) - (byte-defop-compiler symbol-function 1) - (byte-defop-compiler (1+ byte-add1) 1) - (byte-defop-compiler (1- byte-sub1) 1) - (byte-defop-compiler goto-char 1+1) - (byte-defop-compiler char-after 0-1+1) - (byte-defop-compiler set-buffer 1) - ;;(byte-defop-compiler set-mark 1) ;; obsolete - (byte-defop-compiler forward-word 1+1) - (byte-defop-compiler char-syntax 1+1) - (byte-defop-compiler nreverse 1) - (byte-defop-compiler car-safe 1) - (byte-defop-compiler cdr-safe 1) - (byte-defop-compiler numberp 1) - (byte-defop-compiler integerp 1) - (byte-defop-compiler skip-chars-forward 1-2+1) - (byte-defop-compiler skip-chars-backward 1-2+1) - (byte-defop-compiler (eql byte-eq) 2) - (byte-defop-compiler20 old-eq 2) - (byte-defop-compiler20 old-memq 2) - (byte-defop-compiler cons 2) - (byte-defop-compiler aref 2) - (byte-defop-compiler get 2+1) - (byte-defop-compiler nth 2) - (byte-defop-compiler substring 2-3) - (byte-defop-compiler (move-marker byte-set-marker) 2-3) - (byte-defop-compiler set-marker 2-3) - (byte-defop-compiler match-beginning 1) - (byte-defop-compiler match-end 1) - (byte-defop-compiler upcase 1+1) - (byte-defop-compiler downcase 1+1) - (byte-defop-compiler string= 2) - (byte-defop-compiler string< 2) - (byte-defop-compiler (string-equal byte-string=) 2) - (byte-defop-compiler (string-lessp byte-string<) 2) - (byte-defop-compiler20 old-equal 2) - (byte-defop-compiler nthcdr 2) - (byte-defop-compiler elt 2) - (byte-defop-compiler20 old-member 2) - (byte-defop-compiler20 old-assq 2) - (byte-defop-compiler (rplaca byte-setcar) 2) - (byte-defop-compiler (rplacd byte-setcdr) 2) - (byte-defop-compiler setcar 2) - (byte-defop-compiler setcdr 2) - (byte-defop-compiler delete-region 2+1) - (byte-defop-compiler narrow-to-region 2+1) - (byte-defop-compiler (% byte-rem) 2) - (byte-defop-compiler aset 3) - - (byte-defop-compiler-rmsfun member 2) - (byte-defop-compiler-rmsfun assq 2) - - (byte-defop-compiler max byte-compile-associative) - (byte-defop-compiler min byte-compile-associative) - (byte-defop-compiler (+ byte-plus) byte-compile-associative) - (byte-defop-compiler (* byte-mult) byte-compile-associative) - - ;;####(byte-defop-compiler move-to-column 1) - (byte-defop-compiler-1 interactive byte-compile-noop) - (byte-defop-compiler-1 domain byte-compile-domain) - - ;; As of GNU Emacs 19.18 and Lucid Emacs 19.8, mod and % are different: `%' - ;; means integral remainder and may have a negative result; `mod' is always - ;; positive, and accepts floating point args. All code which uses `mod' and - ;; requires the new interpretation must be compiled with bytecomp version 2.18 - ;; or newer, or the emitted code will run the byte-code for `%' instead of an - ;; actual call to `mod'. So be careful of compiling new code with an old - ;; compiler. Note also that `%' is more efficient than `mod' because the - ;; former is byte-coded and the latter is not. - ;;(byte-defop-compiler (mod byte-rem) 2) - - - (defun byte-compile-subr-wrong-args (form n) - (when (memq 'subr-callargs byte-compile-warnings) - (byte-compile-warn "%s called with %d arg%s, but requires %s" - (car form) (length (cdr form)) - (if (= 1 (length (cdr form))) "" "s") n)) - ;; get run-time wrong-number-of-args error. - (byte-compile-normal-call form)) - - (defun byte-compile-no-args (form) - (case (length (cdr form)) - (0 (byte-compile-out (get (car form) 'byte-opcode) 0)) - (t (byte-compile-subr-wrong-args form "none")))) - - (defun byte-compile-one-arg (form) - (case (length (cdr form)) - (1 (byte-compile-form (car (cdr form))) ;; Push the argument - (byte-compile-out (get (car form) 'byte-opcode) 0)) - (t (byte-compile-subr-wrong-args form 1)))) - - (defun byte-compile-two-args (form) - (case (length (cdr form)) - (2 (byte-compile-form (nth 1 form)) ;; Push the arguments - (byte-compile-form (nth 2 form)) - (byte-compile-out (get (car form) 'byte-opcode) 0)) - (t (byte-compile-subr-wrong-args form 2)))) - - (defun byte-compile-three-args (form) - (case (length (cdr form)) - (3 (byte-compile-form (nth 1 form)) ;; Push the arguments - (byte-compile-form (nth 2 form)) - (byte-compile-form (nth 3 form)) - (byte-compile-out (get (car form) 'byte-opcode) 0)) - (t (byte-compile-subr-wrong-args form 3)))) - - (defun byte-compile-zero-or-one-arg (form) - (case (length (cdr form)) - (0 (byte-compile-one-arg (append form '(nil)))) - (1 (byte-compile-one-arg form)) - (t (byte-compile-subr-wrong-args form "0-1")))) - - (defun byte-compile-one-or-two-args (form) - (case (length (cdr form)) - (1 (byte-compile-two-args (append form '(nil)))) - (2 (byte-compile-two-args form)) - (t (byte-compile-subr-wrong-args form "1-2")))) - - (defun byte-compile-two-or-three-args (form) - (case (length (cdr form)) - (2 (byte-compile-three-args (append form '(nil)))) - (3 (byte-compile-three-args form)) - (t (byte-compile-subr-wrong-args form "2-3")))) - - ;; from Ben Wing : some inlined functions have extra - ;; optional args added to them in XEmacs 19.12. Changing the byte - ;; interpreter to deal with these args would be wrong and cause - ;; incompatibility, so we generate non-inlined calls for those cases. - ;; Without the following functions, spurious warnings will be generated; - ;; however, they would still compile correctly because - ;; `byte-compile-subr-wrong-args' also converts the call to non-inlined. - - (defun byte-compile-no-args-with-one-extra (form) - (case (length (cdr form)) - (0 (byte-compile-no-args form)) - (1 (byte-compile-normal-call form)) - (t (byte-compile-subr-wrong-args form "0-1")))) - - (defun byte-compile-one-arg-with-one-extra (form) - (case (length (cdr form)) - (1 (byte-compile-one-arg form)) - (2 (byte-compile-normal-call form)) - (t (byte-compile-subr-wrong-args form "1-2")))) - - (defun byte-compile-two-args-with-one-extra (form) - (case (length (cdr form)) - (2 (byte-compile-two-args form)) - (3 (byte-compile-normal-call form)) - (t (byte-compile-subr-wrong-args form "2-3")))) - - (defun byte-compile-zero-or-one-arg-with-one-extra (form) - (case (length (cdr form)) - (0 (byte-compile-one-arg (append form '(nil)))) - (1 (byte-compile-one-arg form)) - (2 (byte-compile-normal-call form)) - (t (byte-compile-subr-wrong-args form "0-2")))) - - (defun byte-compile-one-or-two-args-with-one-extra (form) - (case (length (cdr form)) - (1 (byte-compile-two-args (append form '(nil)))) - (2 (byte-compile-two-args form)) - (3 (byte-compile-normal-call form)) - (t (byte-compile-subr-wrong-args form "1-3")))) - - (defun byte-compile-two-or-three-args-with-one-extra (form) - (case (length (cdr form)) - (2 (byte-compile-three-args (append form '(nil)))) - (3 (byte-compile-three-args form)) - (4 (byte-compile-normal-call form)) - (t (byte-compile-subr-wrong-args form "2-4")))) - - (defun byte-compile-no-args-with-two-extra (form) - (case (length (cdr form)) - (0 (byte-compile-no-args form)) - ((1 2) (byte-compile-normal-call form)) - (t (byte-compile-subr-wrong-args form "0-2")))) - - (defun byte-compile-one-arg-with-two-extra (form) - (case (length (cdr form)) - (1 (byte-compile-one-arg form)) - ((2 3) (byte-compile-normal-call form)) - (t (byte-compile-subr-wrong-args form "1-3")))) - - ;; XEmacs: used for functions that have a different opcode in v19 than v20. - ;; this includes `eq', `equal', and other old-ified functions. - (defun byte-compile-two-args-19->20 (form) - (if (not (= (length form) 3)) - (byte-compile-subr-wrong-args form 2) - (byte-compile-form (car (cdr form))) ;; Push the arguments - (byte-compile-form (nth 2 form)) - (if (byte-compile-version-cond byte-compile-emacs19-compatibility) - (byte-compile-out (get (car form) 'byte-opcode19) 0) - (byte-compile-out (get (car form) 'byte-opcode) 0)))) - - (defun byte-compile-noop (form) - (byte-compile-constant nil)) - - (defun byte-compile-discard () - (byte-compile-out 'byte-discard 0)) - - ;; Compile a function that accepts one or more args and is right-associative. - ;; We do it by left-associativity so that the operations - ;; are done in the same order as in interpreted code. - ;(defun byte-compile-associative (form) - ; (if (cdr form) - ; (let ((opcode (get (car form) 'byte-opcode)) - ; (args (copy-sequence (cdr form)))) - ; (byte-compile-form (car args)) - ; (setq args (cdr args)) - ; (while args - ; (byte-compile-form (car args)) - ; (byte-compile-out opcode 0) - ; (setq args (cdr args)))) - ; (byte-compile-constant (eval form)))) - - ;; Compile a function that accepts one or more args and is right-associative. - ;; We do it by left-associativity so that the operations - ;; are done in the same order as in interpreted code. - (defun byte-compile-associative (form) - (let ((args (cdr form)) - (opcode (get (car form) 'byte-opcode))) - (case (length args) - (0 (byte-compile-constant (eval form))) - (t (byte-compile-form (car args)) - (dolist (arg (cdr args)) - (byte-compile-form arg) - (byte-compile-out opcode 0)))))) - - - ;; more complicated compiler macros - - (byte-defop-compiler list) - (byte-defop-compiler concat) - (byte-defop-compiler fset) - (byte-defop-compiler insert) - (byte-defop-compiler-1 function byte-compile-function-form) - (byte-defop-compiler-1 - byte-compile-minus) - (byte-defop-compiler (/ byte-quo) byte-compile-quo) - (byte-defop-compiler nconc) - (byte-defop-compiler-1 beginning-of-line) - - (byte-defop-compiler (= byte-eqlsign) byte-compile-arithcompare) - (byte-defop-compiler (< byte-lss) byte-compile-arithcompare) - (byte-defop-compiler (> byte-gtr) byte-compile-arithcompare) - (byte-defop-compiler (<= byte-leq) byte-compile-arithcompare) - (byte-defop-compiler (>= byte-geq) byte-compile-arithcompare) - - (defun byte-compile-arithcompare (form) - (case (length (cdr form)) - (0 (byte-compile-subr-wrong-args form "1 or more")) - (1 (byte-compile-constant t)) - (2 (byte-compile-two-args form)) - (t (byte-compile-normal-call form)))) - - (byte-defop-compiler /= byte-compile-/=) - - (defun byte-compile-/= (form) - (case (length (cdr form)) - (0 (byte-compile-subr-wrong-args form "1 or more")) - (1 (byte-compile-constant t)) - ;; optimize (/= X Y) to (not (= X Y)) - (2 (byte-compile-form-do-effect `(not (= ,@(cdr form))))) - (t (byte-compile-normal-call form)))) - - ;; buffer-substring now has its own function. This used to be - ;; 2+1, but now all args are optional. - (byte-defop-compiler buffer-substring) - - (defun byte-compile-buffer-substring (form) - ;; buffer-substring used to take exactly two args, but now takes 0-3. - ;; convert 0-2 to two args and use special bytecode operand. - ;; convert 3 args to a normal call. - (case (length (cdr form)) - (0 (byte-compile-two-args (append form '(nil nil)))) - (1 (byte-compile-two-args (append form '(nil)))) - (2 (byte-compile-two-args form)) - (3 (byte-compile-normal-call form)) - (t (byte-compile-subr-wrong-args form "0-3")))) - - (defun byte-compile-list (form) - (let* ((args (cdr form)) - (nargs (length args))) - (cond - ((= nargs 0) - (byte-compile-constant nil)) - ((< nargs 5) - (mapcar 'byte-compile-form args) - (byte-compile-out - (aref [byte-list1 byte-list2 byte-list3 byte-list4] (1- nargs)) - 0)) - ((< nargs 256) - (mapcar 'byte-compile-form args) - (byte-compile-out 'byte-listN nargs)) - (t (byte-compile-normal-call form))))) - - (defun byte-compile-concat (form) - (let* ((args (cdr form)) - (nargs (length args))) - ;; Concat of one arg is not a no-op if arg is not a string. - (cond - ((memq nargs '(2 3 4)) - (mapcar 'byte-compile-form args) - (byte-compile-out - (aref [byte-concat2 byte-concat3 byte-concat4] (- nargs 2)) - 0)) - ((eq nargs 0) - (byte-compile-form "")) - ((< nargs 256) - (mapcar 'byte-compile-form args) - (byte-compile-out 'byte-concatN nargs)) - ((byte-compile-normal-call form))))) - - (defun byte-compile-minus (form) - (let ((args (cdr form))) - (case (length args) - (0 (byte-compile-subr-wrong-args form "1 or more")) - (1 (byte-compile-form (car args)) - (byte-compile-out 'byte-negate 0)) - (t (byte-compile-form (car args)) - (dolist (elt (cdr args)) - (byte-compile-form elt) - (byte-compile-out 'byte-diff 0)))))) - - (defun byte-compile-quo (form) - (let ((args (cdr form))) - (case (length args) - (0 (byte-compile-subr-wrong-args form "1 or more")) - (1 (byte-compile-constant 1) - (byte-compile-form (car args)) - (byte-compile-out 'byte-quo 0)) - (t (byte-compile-form (car args)) - (dolist (elt (cdr args)) - (byte-compile-form elt) - (byte-compile-out 'byte-quo 0)))))) - - (defun byte-compile-nconc (form) - (let ((args (cdr form))) - (case (length args) - (0 (byte-compile-constant nil)) - ;; nconc of one arg is a noop, even if that arg isn't a list. - (1 (byte-compile-form (car args))) - (t (byte-compile-form (car args)) - (dolist (elt (cdr args)) - (byte-compile-form elt) - (byte-compile-out 'byte-nconc 0)))))) - - (defun byte-compile-fset (form) - ;; warn about forms like (fset 'foo '(lambda () ...)) - ;; (where the lambda expression is non-trivial...) - ;; Except don't warn if the first argument is 'make-byte-code, because - ;; I'm sick of getting mail asking me whether that warning is a problem. - (let ((fn (nth 2 form)) - body) - (when (and (eq (car-safe fn) 'quote) - (eq (car-safe (setq fn (nth 1 fn))) 'lambda) - (not (eq (car-safe (cdr-safe (nth 1 form))) 'make-byte-code))) - (setq body (cdr (cdr fn))) - (if (stringp (car body)) (setq body (cdr body))) - (if (eq 'interactive (car-safe (car body))) (setq body (cdr body))) - (if (and (consp (car body)) - (not (eq 'byte-code (car (car body))))) - (byte-compile-warn - "A quoted lambda form is the second argument of fset. This is probably - not what you want, as that lambda cannot be compiled. Consider using - the syntax (function (lambda (...) ...)) instead.")))) - (byte-compile-two-args form)) - - (defun byte-compile-funarg (form) - ;; (mapcar '(lambda (x) ..) ..) ==> (mapcar (function (lambda (x) ..)) ..) - ;; for cases where it's guaranteed that first arg will be used as a lambda. - (byte-compile-normal-call - (let ((fn (nth 1 form))) - (if (and (eq (car-safe fn) 'quote) - (eq (car-safe (nth 1 fn)) 'lambda)) - (cons (car form) - (cons (cons 'function (cdr fn)) - (cdr (cdr form)))) - form)))) - - ;; (function foo) must compile like 'foo, not like (symbol-function 'foo). - ;; Otherwise it will be incompatible with the interpreter, - ;; and (funcall (function foo)) will lose with autoloads. - - (defun byte-compile-function-form (form) - (byte-compile-constant - (cond ((symbolp (nth 1 form)) - (nth 1 form)) - ((byte-compile-lambda (nth 1 form)))))) - - (defun byte-compile-insert (form) - (cond ((null (cdr form)) - (byte-compile-constant nil)) - ((<= (length form) 256) - (mapcar 'byte-compile-form (cdr form)) - (if (cdr (cdr form)) - (byte-compile-out 'byte-insertN (length (cdr form))) - (byte-compile-out 'byte-insert 0))) - ((memq t (mapcar 'consp (cdr (cdr form)))) - (byte-compile-normal-call form)) - ;; We can split it; there is no function call after inserting 1st arg. - (t - (while (setq form (cdr form)) - (byte-compile-form (car form)) - (byte-compile-out 'byte-insert 0) - (when (cdr form) - (byte-compile-discard)))))) - - ;; alas, the old (pre-19.12, and all existing versions of FSFmacs 19) - ;; byte compiler will generate incorrect code for - ;; (beginning-of-line nil buffer) because it buggily doesn't - ;; check the number of arguments passed to beginning-of-line. - - (defun byte-compile-beginning-of-line (form) - (let ((len (length form))) - (cond ((> len 3) - (byte-compile-subr-wrong-args form "0-2")) - ((or (= len 3) (not (byte-compile-constp (nth 1 form)))) - (byte-compile-normal-call form)) - (t - (byte-compile-form - (list 'forward-line - (if (integerp (setq form (or (eval (nth 1 form)) 1))) - (1- form) - (byte-compile-warn - "Non-numeric arg to beginning-of-line: %s" form) - (list '1- (list 'quote form)))) - t) - (byte-compile-constant nil))))) - - - (byte-defop-compiler set) - (byte-defop-compiler-1 setq) - (byte-defop-compiler-1 set-default) - (byte-defop-compiler-1 setq-default) - - (byte-defop-compiler-1 quote) - (byte-defop-compiler-1 quote-form) - - (defun byte-compile-setq (form) - (let ((args (cdr form)) var val) - (if (null args) - ;; (setq), with no arguments. - (byte-compile-form nil for-effect) - (while args - (setq var (pop args)) - (if (null args) - ;; Odd number of args? Let `set' get the error. - (byte-compile-form `(set ',var) for-effect) - (setq val (pop args)) - (if (keywordp var) - ;; (setq :foo ':foo) compatibility kludge - (byte-compile-form `(set ',var ,val) (if args t for-effect)) - (byte-compile-form val) - (unless (or args for-effect) - (byte-compile-out 'byte-dup 0)) - (byte-compile-variable-ref 'byte-varset var)))))) - (setq for-effect nil)) - - (defun byte-compile-set (form) - ;; Compile (set 'foo x) as (setq foo x) for trivially better code and so - ;; that we get applicable warnings. Compile everything else (including - ;; malformed calls) like a normal 2-arg byte-coded function. - (let ((symform (nth 1 form)) - (valform (nth 2 form)) - sym) - (if (and (= (length form) 3) - (= (safe-length symform) 2) - (eq (car symform) 'quote) - (symbolp (setq sym (car (cdr symform)))) - (not (byte-compile-constant-symbol-p sym))) - (byte-compile-setq `(setq ,sym ,valform)) - (byte-compile-two-args form)))) - - (defun byte-compile-setq-default (form) - (let ((args (cdr form))) - (if (null args) - ;; (setq-default), with no arguments. - (byte-compile-form nil for-effect) - ;; emit multiple calls to `set-default' if necessary - (while args - (byte-compile-form - ;; Odd number of args? Let `set-default' get the error. - `(set-default ',(pop args) ,@(if args (list (pop args)) nil)) - (if args t for-effect))))) - (setq for-effect nil)) - - - (defun byte-compile-set-default (form) - (let* ((args (cdr form)) - (nargs (length args)) - (var (car args))) - (when (and (= (safe-length var) 2) - (eq (car var) 'quote)) - (let ((sym (nth 1 var))) - (cond - ((not (symbolp sym)) - (byte-compile-warn "Attempt to set-globally non-symbol %s" sym)) - ((byte-compile-constant-symbol-p sym) - (byte-compile-warn "Attempt to set-globally constant symbol %s" sym)) - ((let ((cell (assq sym byte-compile-bound-variables))) - (and cell - (setcdr cell (logior (cdr cell) byte-compile-assigned-bit)) - t))) - ;; notice calls to set-default/setq-default for variables which - ;; have not been declared with defvar/defconst. - ((globally-boundp sym)) ; OK - ((not (memq 'free-vars byte-compile-warnings))) ; warnings suppressed? - ((memq sym byte-compile-free-assignments)) ; already warned about sym - (t - (byte-compile-warn "assignment to free variable %s" sym) - (push sym byte-compile-free-assignments))))) - (if (= nargs 2) - ;; now emit a normal call to set-default - (byte-compile-normal-call form) - (byte-compile-subr-wrong-args form 2)))) - - - (defun byte-compile-quote (form) - (byte-compile-constant (car (cdr form)))) - - (defun byte-compile-quote-form (form) - (byte-compile-constant (byte-compile-top-level (nth 1 form)))) - - - ;;; control structures - - (defun byte-compile-body (body &optional for-effect) - (while (cdr body) - (byte-compile-form (car body) t) - (setq body (cdr body))) - (byte-compile-form (car body) for-effect)) - - (proclaim-inline byte-compile-body-do-effect) - (defun byte-compile-body-do-effect (body) - (byte-compile-body body for-effect) - (setq for-effect nil)) - - (proclaim-inline byte-compile-form-do-effect) - (defun byte-compile-form-do-effect (form) - (byte-compile-form form for-effect) - (setq for-effect nil)) - - (byte-defop-compiler-1 inline byte-compile-progn) - (byte-defop-compiler-1 progn) - (byte-defop-compiler-1 prog1) - (byte-defop-compiler-1 prog2) - (byte-defop-compiler-1 if) - (byte-defop-compiler-1 cond) - (byte-defop-compiler-1 and) - (byte-defop-compiler-1 or) - (byte-defop-compiler-1 while) - (byte-defop-compiler-1 funcall) - (byte-defop-compiler-1 apply byte-compile-funarg) - (byte-defop-compiler-1 mapcar byte-compile-funarg) - (byte-defop-compiler-1 mapatoms byte-compile-funarg) - (byte-defop-compiler-1 mapconcat byte-compile-funarg) - (byte-defop-compiler-1 let) - (byte-defop-compiler-1 let*) - - (defun byte-compile-progn (form) - (byte-compile-body-do-effect (cdr form))) - - (defun byte-compile-prog1 (form) - (setq form (cdr form)) - (byte-compile-form-do-effect (pop form)) - (byte-compile-body form t)) - - (defun byte-compile-prog2 (form) - (setq form (cdr form)) - (byte-compile-form (pop form) t) - (byte-compile-form-do-effect (pop form)) - (byte-compile-body form t)) - - (defmacro byte-compile-goto-if (cond discard tag) - `(byte-compile-goto - (if ,cond - (if ,discard 'byte-goto-if-not-nil 'byte-goto-if-not-nil-else-pop) - (if ,discard 'byte-goto-if-nil 'byte-goto-if-nil-else-pop)) - ,tag)) - - (defun byte-compile-if (form) - (byte-compile-form (car (cdr form))) - (if (null (nthcdr 3 form)) - ;; No else-forms - (let ((donetag (byte-compile-make-tag))) - (byte-compile-goto-if nil for-effect donetag) - (byte-compile-form (nth 2 form) for-effect) - (byte-compile-out-tag donetag)) - (let ((donetag (byte-compile-make-tag)) (elsetag (byte-compile-make-tag))) - (byte-compile-goto 'byte-goto-if-nil elsetag) - (byte-compile-form (nth 2 form) for-effect) - (byte-compile-goto 'byte-goto donetag) - (byte-compile-out-tag elsetag) - (byte-compile-body (cdr (cdr (cdr form))) for-effect) - (byte-compile-out-tag donetag))) - (setq for-effect nil)) - - (defun byte-compile-cond (clauses) - (let ((donetag (byte-compile-make-tag)) - nexttag clause) - (while (setq clauses (cdr clauses)) - (setq clause (car clauses)) - (cond ((or (eq (car clause) t) - (and (eq (car-safe (car clause)) 'quote) - (car-safe (cdr-safe (car clause))))) - ;; Unconditional clause - (setq clause (cons t clause) - clauses nil)) - ((cdr clauses) - (byte-compile-form (car clause)) - (if (null (cdr clause)) - ;; First clause is a singleton. - (byte-compile-goto-if t for-effect donetag) - (setq nexttag (byte-compile-make-tag)) - (byte-compile-goto 'byte-goto-if-nil nexttag) - (byte-compile-body (cdr clause) for-effect) - (byte-compile-goto 'byte-goto donetag) - (byte-compile-out-tag nexttag))))) - ;; Last clause - (and (cdr clause) (not (eq (car clause) t)) - (progn (byte-compile-form (car clause)) - (byte-compile-goto-if nil for-effect donetag) - (setq clause (cdr clause)))) - (byte-compile-body-do-effect clause) - (byte-compile-out-tag donetag))) - - (defun byte-compile-and (form) - (let ((failtag (byte-compile-make-tag)) - (args (cdr form))) - (if (null args) - (byte-compile-form-do-effect t) - (while (cdr args) - (byte-compile-form (car args)) - (byte-compile-goto-if nil for-effect failtag) - (setq args (cdr args))) - (byte-compile-form-do-effect (car args)) - (byte-compile-out-tag failtag)))) - - (defun byte-compile-or (form) - (let ((wintag (byte-compile-make-tag)) - (args (cdr form))) - (if (null args) - (byte-compile-form-do-effect nil) - (while (cdr args) - (byte-compile-form (car args)) - (byte-compile-goto-if t for-effect wintag) - (setq args (cdr args))) - (byte-compile-form-do-effect (car args)) - (byte-compile-out-tag wintag)))) - - (defun byte-compile-while (form) - (let ((endtag (byte-compile-make-tag)) - (looptag (byte-compile-make-tag))) - (byte-compile-out-tag looptag) - (byte-compile-form (car (cdr form))) - (byte-compile-goto-if nil for-effect endtag) - (byte-compile-body (cdr (cdr form)) t) - (byte-compile-goto 'byte-goto looptag) - (byte-compile-out-tag endtag) - (setq for-effect nil))) - - (defun byte-compile-funcall (form) - (mapcar 'byte-compile-form (cdr form)) - (byte-compile-out 'byte-call (length (cdr (cdr form))))) - - - (defun byte-compile-let (form) - ;; First compute the binding values in the old scope. - (let ((varlist (car (cdr form)))) - (while varlist - (if (consp (car varlist)) - (byte-compile-form (car (cdr (car varlist)))) - (byte-compile-push-constant nil)) - (setq varlist (cdr varlist)))) - (let ((byte-compile-bound-variables - (cons 'new-scope byte-compile-bound-variables)) - (varlist (reverse (car (cdr form)))) - (extra-flags - ;; If this let is of the form (let (...) (byte-code ...)) - ;; then assume that it is the result of a transformation of - ;; ((lambda (...) (byte-code ... )) ...) and thus compile - ;; the variable bindings as if they were arglist bindings - ;; (which matters for what warnings.) - (if (eq 'byte-code (car-safe (nth 2 form))) - byte-compile-arglist-bit - nil))) - (while varlist - (byte-compile-variable-ref 'byte-varbind - (if (consp (car varlist)) - (car (car varlist)) - (car varlist)) - extra-flags) - (setq varlist (cdr varlist))) - (byte-compile-body-do-effect (cdr (cdr form))) - (if (memq 'unused-vars byte-compile-warnings) - ;; done compiling in this scope, warn now. - (byte-compile-warn-about-unused-variables)) - (byte-compile-out 'byte-unbind (length (car (cdr form)))))) - - (defun byte-compile-let* (form) - (let ((byte-compile-bound-variables - (cons 'new-scope byte-compile-bound-variables)) - (varlist (copy-sequence (car (cdr form))))) - (while varlist - (if (atom (car varlist)) - (byte-compile-push-constant nil) - (byte-compile-form (car (cdr (car varlist)))) - (setcar varlist (car (car varlist)))) - (byte-compile-variable-ref 'byte-varbind (car varlist)) - (setq varlist (cdr varlist))) - (byte-compile-body-do-effect (cdr (cdr form))) - (if (memq 'unused-vars byte-compile-warnings) - ;; done compiling in this scope, warn now. - (byte-compile-warn-about-unused-variables)) - (byte-compile-out 'byte-unbind (length (car (cdr form)))))) - - - ;;(byte-defop-compiler-1 /= byte-compile-negated) - (byte-defop-compiler-1 atom byte-compile-negated) - (byte-defop-compiler-1 nlistp byte-compile-negated) - - ;;(put '/= 'byte-compile-negated-op '=) - (put 'atom 'byte-compile-negated-op 'consp) - (put 'nlistp 'byte-compile-negated-op 'listp) - - (defun byte-compile-negated (form) - (byte-compile-form-do-effect (byte-compile-negation-optimizer form))) - - ;; Even when optimization is off, atom is optimized to (not (consp ...)). - (defun byte-compile-negation-optimizer (form) - ;; an optimizer for forms where is less efficient than (not ) - (list 'not - (cons (or (get (car form) 'byte-compile-negated-op) - (error - "Compiler error: `%s' has no `byte-compile-negated-op' property" - (car form))) - (cdr form)))) - - ;;; other tricky macro-like special-forms - - (byte-defop-compiler-1 catch) - (byte-defop-compiler-1 unwind-protect) - (byte-defop-compiler-1 condition-case) - (byte-defop-compiler-1 save-excursion) - (byte-defop-compiler-1 save-current-buffer) - (byte-defop-compiler-1 save-restriction) - (byte-defop-compiler-1 save-window-excursion) - (byte-defop-compiler-1 with-output-to-temp-buffer) - ;; no track-mouse. - - (defun byte-compile-catch (form) - (byte-compile-form (car (cdr form))) - (byte-compile-push-constant - (byte-compile-top-level (cons 'progn (cdr (cdr form))) for-effect)) - (byte-compile-out 'byte-catch 0)) - - (defun byte-compile-unwind-protect (form) - (byte-compile-push-constant - (byte-compile-top-level-body (cdr (cdr form)) t)) - (byte-compile-out 'byte-unwind-protect 0) - (byte-compile-form-do-effect (car (cdr form))) - (byte-compile-out 'byte-unbind 1)) - - ;;(defun byte-compile-track-mouse (form) - ;; (byte-compile-form - ;; (list - ;; 'funcall - ;; (list 'quote - ;; (list 'lambda nil - ;; (cons 'track-mouse - ;; (byte-compile-top-level-body (cdr form)))))))) - - (defun byte-compile-condition-case (form) - (let* ((var (nth 1 form)) - (byte-compile-bound-variables - (if var - (cons (cons var 0) - (cons 'new-scope byte-compile-bound-variables)) - (cons 'new-scope byte-compile-bound-variables)))) - (or (symbolp var) - (byte-compile-warn - "%s is not a variable-name or nil (in condition-case)" - (prin1-to-string var))) - (byte-compile-push-constant var) - (byte-compile-push-constant (byte-compile-top-level - (nth 2 form) for-effect)) - (let ((clauses (cdr (cdr (cdr form)))) - compiled-clauses) - (while clauses - (let* ((clause (car clauses)) - (condition (car clause))) - (cond ((not (or (symbolp condition) - (and (listp condition) - (let ((syms condition) (ok t)) - (while syms - (if (not (symbolp (car syms))) - (setq ok nil)) - (setq syms (cdr syms))) - ok)))) - (byte-compile-warn - "%s is not a symbol naming a condition or a list of such (in condition-case)" - (prin1-to-string condition))) - ;; ((not (or (eq condition 't) - ;; (and (stringp (get condition 'error-message)) - ;; (consp (get condition 'error-conditions))))) - ;; (byte-compile-warn - ;; "%s is not a known condition name (in condition-case)" - ;; condition)) - ) - (setq compiled-clauses - (cons (cons condition - (byte-compile-top-level-body - (cdr clause) for-effect)) - compiled-clauses))) - (setq clauses (cdr clauses))) - (byte-compile-push-constant (nreverse compiled-clauses))) - (if (memq 'unused-vars byte-compile-warnings) - ;; done compiling in this scope, warn now. - (byte-compile-warn-about-unused-variables)) - (byte-compile-out 'byte-condition-case 0))) - - - (defun byte-compile-save-excursion (form) - (byte-compile-out 'byte-save-excursion 0) - (byte-compile-body-do-effect (cdr form)) - (byte-compile-out 'byte-unbind 1)) - - (defun byte-compile-save-restriction (form) - (byte-compile-out 'byte-save-restriction 0) - (byte-compile-body-do-effect (cdr form)) - (byte-compile-out 'byte-unbind 1)) - - (defun byte-compile-save-current-buffer (form) - (if (byte-compile-version-cond byte-compile-emacs19-compatibility) - ;; `save-current-buffer' special form is not available in XEmacs 19. - (byte-compile-form - `(let ((_byte_compiler_save_buffer_emulation_closure_ (current-buffer))) - (unwind-protect - (progn ,@(cdr form)) - (and (buffer-live-p _byte_compiler_save_buffer_emulation_closure_) - (set-buffer _byte_compiler_save_buffer_emulation_closure_))))) - (byte-compile-out 'byte-save-current-buffer 0) - (byte-compile-body-do-effect (cdr form)) - (byte-compile-out 'byte-unbind 1))) - - (defun byte-compile-save-window-excursion (form) - (byte-compile-push-constant - (byte-compile-top-level-body (cdr form) for-effect)) - (byte-compile-out 'byte-save-window-excursion 0)) - - (defun byte-compile-with-output-to-temp-buffer (form) - (byte-compile-form (car (cdr form))) - (byte-compile-out 'byte-temp-output-buffer-setup 0) - (byte-compile-body (cdr (cdr form))) - (byte-compile-out 'byte-temp-output-buffer-show 0)) - - - ;;; top-level forms elsewhere - - (byte-defop-compiler-1 defun) - (byte-defop-compiler-1 defmacro) - (byte-defop-compiler-1 defvar) - (byte-defop-compiler-1 defconst byte-compile-defvar) - (byte-defop-compiler-1 autoload) - ;; According to Mly this can go now that lambda is a macro - ;(byte-defop-compiler-1 lambda byte-compile-lambda-form) - (byte-defop-compiler-1 defalias) - (byte-defop-compiler-1 define-function) - - (defun byte-compile-defun (form) - ;; This is not used for file-level defuns with doc strings. - (byte-compile-two-args ; Use this to avoid byte-compile-fset's warning. - (list 'fset (list 'quote (nth 1 form)) - (byte-compile-byte-code-maker - (byte-compile-lambda (cons 'lambda (cdr (cdr form))))))) - (byte-compile-discard) - (byte-compile-constant (nth 1 form))) - - (defun byte-compile-defmacro (form) - ;; This is not used for file-level defmacros with doc strings. - (byte-compile-body-do-effect - (list (list 'fset (list 'quote (nth 1 form)) - (let ((code (byte-compile-byte-code-maker - (byte-compile-lambda - (cons 'lambda (cdr (cdr form))))))) - (if (eq (car-safe code) 'make-byte-code) - (list 'cons ''macro code) - (list 'quote (cons 'macro (eval code)))))) - (list 'quote (nth 1 form))))) - - (defun byte-compile-defvar (form) - ;; This is not used for file-level defvar/consts with doc strings: - ;; byte-compile-file-form-defvar will be used in that case. - (let ((var (nth 1 form)) - (value (nth 2 form)) - (string (nth 3 form))) - (if (> (length form) 4) - (byte-compile-warn "%s used with too many args" (car form))) - (if (memq 'free-vars byte-compile-warnings) - (setq byte-compile-bound-variables - (cons (cons var byte-compile-global-bit) - byte-compile-bound-variables))) - (byte-compile-body-do-effect - (list (if (cdr (cdr form)) - (if (eq (car form) 'defconst) - (list 'setq var value) - (list 'or (list 'boundp (list 'quote var)) - (list 'setq var value)))) - ;; Put the defined variable in this library's load-history entry - ;; just as a real defvar would. - (list 'setq 'current-load-list - (list 'cons (list 'quote var) - 'current-load-list)) - (if string - (list 'put (list 'quote var) ''variable-documentation string)) - (list 'quote var))))) - - (defun byte-compile-autoload (form) - (and (byte-compile-constp (nth 1 form)) - (byte-compile-constp (nth 5 form)) - (memq (eval (nth 5 form)) '(t macro)) ; macro-p - (not (fboundp (eval (nth 1 form)))) - (byte-compile-warn - "The compiler ignores `autoload' except at top level. You should - probably put the autoload of the macro `%s' at top-level." - (eval (nth 1 form)))) - (byte-compile-normal-call form)) - - ;; Lambda's in valid places are handled as special cases by various code. - ;; The ones that remain are errors. - ;; According to Mly this can go now that lambda is a macro - ;(defun byte-compile-lambda-form (form) - ; (byte-compile-warn - ; "`lambda' used in function position is invalid: probably you mean #'%s" - ; (let ((print-escape-newlines t) - ; (print-level 4) - ; (print-length 4)) - ; (prin1-to-string form))) - ; (byte-compile-normal-call - ; (list 'signal ''error - ; (list 'quote (list "`lambda' used in function position" form))))) - - ;; Compile normally, but deal with warnings for the function being defined. - (defun byte-compile-defalias (form) - (if (and (consp (cdr form)) (consp (nth 1 form)) - (eq (car (nth 1 form)) 'quote) - (consp (cdr (nth 1 form))) - (symbolp (nth 1 (nth 1 form))) - (consp (nthcdr 2 form)) - (consp (nth 2 form)) - (eq (car (nth 2 form)) 'quote) - (consp (cdr (nth 2 form))) - (symbolp (nth 1 (nth 2 form)))) - (progn - (byte-compile-defalias-warn (nth 1 (nth 1 form)) - (nth 1 (nth 2 form))) - (setq byte-compile-function-environment - (cons (cons (nth 1 (nth 1 form)) - (nth 1 (nth 2 form))) - byte-compile-function-environment)))) - (byte-compile-normal-call form)) - - (defun byte-compile-define-function (form) - (byte-compile-defalias form)) - - ;; Turn off warnings about prior calls to the function being defalias'd. - ;; This could be smarter and compare those calls with - ;; the function it is being aliased to. - (defun byte-compile-defalias-warn (new alias) - (let ((calls (assq new byte-compile-unresolved-functions))) - (if calls - (setq byte-compile-unresolved-functions - (delq calls byte-compile-unresolved-functions))))) - - ;;; tags - - ;; Note: Most operations will strip off the 'TAG, but it speeds up - ;; optimization to have the 'TAG as a part of the tag. - ;; Tags will be (TAG . (tag-number . stack-depth)). - (defun byte-compile-make-tag () - (list 'TAG (setq byte-compile-tag-number (1+ byte-compile-tag-number)))) - - - (defun byte-compile-out-tag (tag) - (push tag byte-compile-output) - (if (cdr (cdr tag)) - (progn - ;; ## remove this someday - (and byte-compile-depth - (not (= (cdr (cdr tag)) byte-compile-depth)) - (error "Compiler bug: depth conflict at tag %d" (car (cdr tag)))) - (setq byte-compile-depth (cdr (cdr tag)))) - (setcdr (cdr tag) byte-compile-depth))) - - (defun byte-compile-goto (opcode tag) - (push (cons opcode tag) byte-compile-output) - (setcdr (cdr tag) (if (memq opcode byte-goto-always-pop-ops) - (1- byte-compile-depth) - byte-compile-depth)) - (setq byte-compile-depth (and (not (eq opcode 'byte-goto)) - (1- byte-compile-depth)))) - - (defun byte-compile-out (opcode offset) - (push (cons opcode offset) byte-compile-output) - (case opcode - (byte-call - (setq byte-compile-depth (- byte-compile-depth offset))) - (byte-return - ;; This is actually an unnecessary case, because there should be - ;; no more opcodes behind byte-return. - (setq byte-compile-depth nil)) - (t - (setq byte-compile-depth (+ byte-compile-depth - (or (aref byte-stack+-info - (symbol-value opcode)) - (- (1- offset)))) - byte-compile-maxdepth (max byte-compile-depth - byte-compile-maxdepth)))) - ;;(if (< byte-compile-depth 0) (error "Compiler error: stack underflow")) - ) - - - ;;; call tree stuff - - (defun byte-compile-annotate-call-tree (form) - (let (entry) - ;; annotate the current call - (if (setq entry (assq (car form) byte-compile-call-tree)) - (or (memq byte-compile-current-form (nth 1 entry)) ;callers - (setcar (cdr entry) - (cons byte-compile-current-form (nth 1 entry)))) - (push (list (car form) (list byte-compile-current-form) nil) - byte-compile-call-tree)) - ;; annotate the current function - (if (setq entry (assq byte-compile-current-form byte-compile-call-tree)) - (or (memq (car form) (nth 2 entry)) ;called - (setcar (cdr (cdr entry)) - (cons (car form) (nth 2 entry)))) - (push (list byte-compile-current-form nil (list (car form))) - byte-compile-call-tree)))) - - ;; Renamed from byte-compile-report-call-tree - ;; to avoid interfering with completion of byte-compile-file. - ;;;###autoload - (defun display-call-tree (&optional filename) - "Display a call graph of a specified file. - This lists which functions have been called, what functions called - them, and what functions they call. The list includes all functions - whose definitions have been compiled in this Emacs session, as well as - all functions called by those functions. - - The call graph does not include macros, inline functions, or - primitives that the byte-code interpreter knows about directly \(eq, - cons, etc.\). - - The call tree also lists those functions which are not known to be called - \(that is, to which no calls have been compiled\), and which cannot be - invoked interactively." - (interactive) - (message "Generating call tree...") - (with-output-to-temp-buffer "*Call-Tree*" - (set-buffer "*Call-Tree*") - (erase-buffer) - (message "Generating call tree... (sorting on %s)" - byte-compile-call-tree-sort) - (insert "Call tree for " - (cond ((null byte-compile-current-file) (or filename "???")) - ((stringp byte-compile-current-file) - byte-compile-current-file) - (t (buffer-name byte-compile-current-file))) - " sorted on " - (prin1-to-string byte-compile-call-tree-sort) - ":\n\n") - (if byte-compile-call-tree-sort - (setq byte-compile-call-tree - (sort byte-compile-call-tree - (cond - ((eq byte-compile-call-tree-sort 'callers) - #'(lambda (x y) (< (length (nth 1 x)) - (length (nth 1 y))))) - ((eq byte-compile-call-tree-sort 'calls) - #'(lambda (x y) (< (length (nth 2 x)) - (length (nth 2 y))))) - ((eq byte-compile-call-tree-sort 'calls+callers) - #'(lambda (x y) (< (+ (length (nth 1 x)) - (length (nth 2 x))) - (+ (length (nth 1 y)) - (length (nth 2 y)))))) - ((eq byte-compile-call-tree-sort 'name) - #'(lambda (x y) (string< (car x) - (car y)))) - (t (error - "`byte-compile-call-tree-sort': `%s' - unknown sort mode" - byte-compile-call-tree-sort)))))) - (message "Generating call tree...") - (let ((rest byte-compile-call-tree) - (b (current-buffer)) - f p - callers calls) - (while rest - (prin1 (car (car rest)) b) - (setq callers (nth 1 (car rest)) - calls (nth 2 (car rest))) - (insert "\t" - (cond ((not (fboundp (setq f (car (car rest))))) - (if (null f) - " ";; shouldn't insert nil then, actually -sk - " ")) - ((subrp (setq f (symbol-function f))) - " ") - ((symbolp f) - (format " ==> %s" f)) - ((compiled-function-p f) - "") - ((not (consp f)) - "") - ((eq 'macro (car f)) - (if (or (compiled-function-p (cdr f)) - (assq 'byte-code (cdr (cdr (cdr f))))) - " " - " ")) - ((assq 'byte-code (cdr (cdr f))) - "") - ((eq 'lambda (car f)) - "") - (t "???")) - (format " (%d callers + %d calls = %d)" - ;; Does the optimizer eliminate common subexpressions?-sk - (length callers) - (length calls) - (+ (length callers) (length calls))) - "\n") - (if callers - (progn - (insert " called by:\n") - (setq p (point)) - (insert " " (if (car callers) - (mapconcat 'symbol-name callers ", ") - "")) - (let ((fill-prefix " ")) - (fill-region-as-paragraph p (point))))) - (if calls - (progn - (insert " calls:\n") - (setq p (point)) - (insert " " (mapconcat 'symbol-name calls ", ")) - (let ((fill-prefix " ")) - (fill-region-as-paragraph p (point))))) - (insert "\n") - (setq rest (cdr rest))) - - (message "Generating call tree...(finding uncalled functions...)") - (setq rest byte-compile-call-tree) - (let ((uncalled nil)) - (while rest - (or (nth 1 (car rest)) - (null (setq f (car (car rest)))) - (byte-compile-fdefinition f t) - (commandp (byte-compile-fdefinition f nil)) - (setq uncalled (cons f uncalled))) - (setq rest (cdr rest))) - (if uncalled - (let ((fill-prefix " ")) - (insert "Noninteractive functions not known to be called:\n ") - (setq p (point)) - (insert (mapconcat 'symbol-name (nreverse uncalled) ", ")) - (fill-region-as-paragraph p (point))))) - ) - (message "Generating call tree...done.") - )) - - - ;;; by crl@newton.purdue.edu - ;;; Only works noninteractively. - ;;;###autoload - (defun batch-byte-compile () - "Run `byte-compile-file' on the files remaining on the command line. - Use this from the command line, with `-batch'; - it won't work in an interactive Emacs. - Each file is processed even if an error occurred previously. - For example, invoke \"xemacs -batch -f batch-byte-compile $emacs/ ~/*.el\"" - ;; command-line-args-left is what is left of the command line (from - ;; startup.el) - (defvar command-line-args-left) ;Avoid 'free variable' warning - (if (not noninteractive) - (error "`batch-byte-compile' is to be used only with -batch")) - (let ((error nil)) - (while command-line-args-left - (if (file-directory-p (expand-file-name (car command-line-args-left))) - (let ((files (directory-files (car command-line-args-left))) - source dest) - (while files - (if (and (string-match emacs-lisp-file-regexp (car files)) - (not (auto-save-file-name-p (car files))) - (setq source (expand-file-name - (car files) - (car command-line-args-left))) - (setq dest (byte-compile-dest-file source)) - (file-exists-p dest) - (file-newer-than-file-p source dest)) - (if (null (batch-byte-compile-1 source)) - (setq error t))) - (setq files (cdr files)))) - (if (null (batch-byte-compile-1 (car command-line-args-left))) - (setq error t))) - (setq command-line-args-left (cdr command-line-args-left))) - (message "Done") - (kill-emacs (if error 1 0)))) - - (defun batch-byte-compile-1 (file) - (condition-case err - (progn (byte-compile-file file) t) - (error - (princ ">>Error occurred processing ") - (princ file) - (princ ": ") - (if (fboundp 'display-error) ; XEmacs 19.8+ - (display-error err nil) - (princ (or (get (car err) 'error-message) (car err))) - (mapcar #'(lambda (x) (princ " ") (prin1 x)) (cdr err))) - (princ "\n") - nil))) - - ;;;###autoload - (defun batch-byte-recompile-directory-norecurse () - "Same as `batch-byte-recompile-directory' but without recursion." - (setq byte-recompile-directory-recursively nil) - (batch-byte-recompile-directory)) - - ;;;###autoload - (defun batch-byte-recompile-directory () - "Runs `byte-recompile-directory' on the dirs remaining on the command line. - Must be used only with `-batch', and kills Emacs on completion. - For example, invoke `xemacs -batch -f batch-byte-recompile-directory .'." - ;; command-line-args-left is what is left of the command line (startup.el) - (defvar command-line-args-left) ;Avoid 'free variable' warning - (if (not noninteractive) - (error "batch-byte-recompile-directory is to be used only with -batch")) - (or command-line-args-left - (setq command-line-args-left '("."))) - (let ((byte-recompile-directory-ignore-errors-p t)) - (while command-line-args-left - (byte-recompile-directory (car command-line-args-left)) - (setq command-line-args-left (cdr command-line-args-left)))) - (kill-emacs 0)) - - (make-obsolete 'elisp-compile-defun 'compile-defun) - (make-obsolete 'byte-compile-report-call-tree 'display-call-tree) - - ;; other make-obsolete calls in obsolete.el. - - (provide 'byte-compile) - (provide 'bytecomp) - - - ;;; report metering (see the hacks in bytecode.c) - - (if (boundp 'byte-code-meter) - (defun byte-compile-report-ops () - (defvar byte-code-meter) - (with-output-to-temp-buffer "*Meter*" - (set-buffer "*Meter*") - (let ((i 0) n op off) - (while (< i 256) - (setq n (aref (aref byte-code-meter 0) i) - off nil) - (if t ;(not (zerop n)) - (progn - (setq op i) - (setq off nil) - (cond ((< op byte-nth) - (setq off (logand op 7)) - (setq op (logand op 248))) - ((>= op byte-constant) - (setq off (- op byte-constant) - op byte-constant))) - (setq op (aref byte-code-vector op)) - (insert (format "%-4d" i)) - (insert (symbol-name op)) - (if off (insert " [" (int-to-string off) "]")) - (indent-to 40) - (insert (int-to-string n) "\n"))) - (setq i (1+ i))))))) - - - ;; To avoid "lisp nesting exceeds max-lisp-eval-depth" when bytecomp compiles - ;; itself, compile some of its most used recursive functions (at load time). - ;; - (eval-when-compile - (or (compiled-function-p (symbol-function 'byte-compile-form)) - (assq 'byte-code (symbol-function 'byte-compile-form)) - (let ((byte-optimize nil) ; do it fast - (byte-compile-warnings nil)) - (mapcar #'(lambda (x) - (or noninteractive (message "compiling %s..." x)) - (byte-compile x) - (or noninteractive (message "compiling %s...done" x))) - '(byte-compile-normal-call - byte-compile-form - byte-compile-body - ;; Inserted some more than necessary, to speed it up. - byte-compile-top-level - byte-compile-out-toplevel - byte-compile-constant - byte-compile-variable-ref)))) - nil) - - ;;; bytecomp.el ends here -(defconst byte-compile-version (purecopy "2.25 XEmacs; 22-Mar-96.")) - -;; This file is part of XEmacs. - -;; XEmacs 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 2, or (at your option) -;; any later version. - -;; XEmacs 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 XEmacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. - -;;; Synched up with: FSF 19.30. - -;;; Commentary: - -;; The Emacs Lisp byte compiler. This crunches lisp source into a -;; sort of p-code which takes up less space and can be interpreted -;; faster. The user entry points are byte-compile-file, -;; byte-recompile-directory and byte-compile-buffer. - -;;; Code: - -;;; ======================================================================== -;;; Entry points: -;;; byte-recompile-directory, byte-compile-file, -;;; batch-byte-compile, batch-byte-recompile-directory, -;;; byte-compile, compile-defun, -;;; display-call-tree -;;; RMS says: -;;; (byte-compile-buffer and byte-compile-and-load-file were turned off -;;; because they are not terribly useful and get in the way of completion.) -;;; But I'm leaving them. --ben - -;;; This version of the byte compiler has the following improvements: -;;; + optimization of compiled code: -;;; - removal of unreachable code; -;;; - removal of calls to side-effectless functions whose return-value -;;; is unused; -;;; - compile-time evaluation of safe constant forms, such as (consp nil) -;;; and (ash 1 6); -;;; - open-coding of literal lambdas; -;;; - peephole optimization of emitted code; -;;; - trivial functions are left uncompiled for speed. -;;; + support for inline functions; -;;; + compile-time evaluation of arbitrary expressions; -;;; + compile-time warning messages for: -;;; - functions being redefined with incompatible arglists; -;;; - functions being redefined as macros, or vice-versa; -;;; - functions or macros defined multiple times in the same file; -;;; - functions being called with the incorrect number of arguments; -;;; - functions being called which are not defined globally, in the -;;; file, or as autoloads; -;;; - assignment and reference of undeclared free variables; -;;; - various syntax errors; -;;; + correct compilation of nested defuns, defmacros, defvars and defsubsts; -;;; + correct compilation of top-level uses of macros; -;;; + the ability to generate a histogram of functions called. - -;;; User customization variables: -;;; -;;; byte-compile-verbose Whether to report the function currently being -;;; compiled in the minibuffer; -;;; byte-optimize Whether to do optimizations; this may be -;;; t, nil, 'source, or 'byte; -;;; byte-optimize-log Whether to report (in excruciating detail) -;;; exactly which optimizations have been made. -;;; This may be t, nil, 'source, or 'byte; -;;; byte-compile-error-on-warn Whether to stop compilation when a warning is -;;; produced; -;;; byte-compile-delete-errors Whether the optimizer may delete calls or -;;; variable references that are side-effect-free -;;; except that they may return an error. -;;; byte-compile-generate-call-tree Whether to generate a histogram of -;;; function calls. This can be useful for -;;; finding unused functions, as well as simple -;;; performance metering. -;;; byte-compile-warnings List of warnings to issue, or t. May contain -;;; 'free-vars (references to variables not in the -;;; current lexical scope) -;;; 'unused-vars (non-global variables bound but -;;; not referenced) -;;; 'unresolved (calls to unknown functions) -;;; 'callargs (lambda calls with args that don't -;;; match the lambda's definition) -;;; 'redefine (function cell redefined from -;;; a macro to a lambda or vice versa, -;;; or redefined to take other args) -;;; 'obsolete (obsolete variables and functions) -;;; 'pedantic (references to Emacs-compatible -;;; symbols) -;;; byte-compile-emacs19-compatibility Whether the compiler should -;;; generate .elc files which can be loaded into -;;; generic emacs 19. -;;; emacs-lisp-file-regexp Regexp for the extension of source-files; -;;; see also the function byte-compile-dest-file. -;;; byte-compile-overwrite-file If nil, delete old .elc files before saving. -;;; -;;; Most of the above parameters can also be set on a file-by-file basis; see -;;; the documentation of the `byte-compiler-options' macro. - -;;; New Features: -;;; -;;; o The form `defsubst' is just like `defun', except that the function -;;; generated will be open-coded in compiled code which uses it. This -;;; means that no function call will be generated, it will simply be -;;; spliced in. Lisp functions calls are very slow, so this can be a -;;; big win. -;;; -;;; You can generally accomplish the same thing with `defmacro', but in -;;; that case, the defined procedure can't be used as an argument to -;;; mapcar, etc. -;;; -;;; o You can make a given function be inline even if it has already been -;;; defined with `defun' by using the `proclaim-inline' form like so: -;;; (proclaim-inline my-function) -;;; This is, in fact, exactly what `defsubst' does. To make a function no -;;; longer be inline, you must use `proclaim-notinline'. Beware that if -;;; you define a function with `defsubst' and later redefine it with -;;; `defun', it will still be open-coded until you use proclaim-notinline. -;;; -;;; o You can also open-code one particular call to a function without -;;; open-coding all calls. Use the 'inline' form to do this, like so: -;;; -;;; (inline (foo 1 2 3)) ;; `foo' will be open-coded -;;; or... -;;; (inline ;; `foo' and `baz' will be -;;; (foo 1 2 3 (bar 5)) ;; open-coded, but `bar' will not. -;;; (baz 0)) -;;; -;;; o It is possible to open-code a function in the same file it is defined -;;; in without having to load that file before compiling it. the -;;; byte-compiler has been modified to remember function definitions in -;;; the compilation environment in the same way that it remembers macro -;;; definitions. -;;; -;;; o Forms like ((lambda ...) ...) are open-coded. -;;; -;;; o The form `eval-when-compile' is like progn, except that the body -;;; is evaluated at compile-time. When it appears at top-level, this -;;; is analogous to the Common Lisp idiom (eval-when (compile) ...). -;;; When it does not appear at top-level, it is similar to the -;;; Common Lisp #. reader macro (but not in interpreted code). -;;; -;;; o The form `eval-and-compile' is similar to eval-when-compile, but -;;; the whole form is evalled both at compile-time and at run-time. -;;; -;;; o The command M-x byte-compile-and-load-file does what you'd think. -;;; -;;; o The command compile-defun is analogous to eval-defun. -;;; -;;; o If you run byte-compile-file on a filename which is visited in a -;;; buffer, and that buffer is modified, you are asked whether you want -;;; to save the buffer before compiling. -;;; -;;; o You can add this to /etc/magic to make file(1) recognise the files -;;; generated by this compiler: -;;; -;;; 0 string ;ELC GNU Emacs Lisp compiled file, -;;; >4 byte x version %d -;;; -;;; TO DO: -;;; -;;; o Should implement declarations and proclamations, notably special, -;;; unspecial, and ignore. Do this in such a way as to not break cl.el. -;;; o The bound-but-not-used warnings are not issued for variables whose -;;; bindings were established in the arglist, due to the lack of an -;;; ignore declaration. Once ignore exists, this should be turned on. -;;; o Warn about functions and variables defined but not used? -;;; Maybe add some kind of `export' declaration for this? -;;; (With interactive functions being automatically exported?) -;;; o Any reference to a variable, even one which is a no-op, will cause -;;; the warning not to be given. Possibly we could use the for-effect -;;; flag to determine when this reference is useless; possibly more -;;; complex flow analysis would be necessary. -;;; o If the optimizer deletes a variable reference, we might be left with -;;; a bound-but-not-referenced warning. Generally this is ok, but not if -;;; it's a synergistic result of macroexpansion. Need some way to note -;;; that a varref is being optimized away? Of course it would be nice to -;;; optimize away the binding too, someday, but it's unsafe today. -;;; o (See byte-optimize.el for the optimization TODO list.) - -(require 'backquote) - -(or (fboundp 'defsubst) - ;; This really ought to be loaded already! - (load-library "bytecomp-runtime")) - -(eval-when-compile - (defvar byte-compile-single-version nil - "If this is true, the choice of emacs version (v19 or v20) byte-codes will -be hard-coded into bytecomp when it compiles itself. If the compiler itself -is compiled with optimization, this causes a speedup.") - - (cond (byte-compile-single-version - (defmacro byte-compile-single-version () t) - (defmacro byte-compile-version-cond (cond) (list 'quote (eval cond)))) - (t - (defmacro byte-compile-single-version () nil) - (defmacro byte-compile-version-cond (cond) cond))) - ) - -(defvar emacs-lisp-file-regexp (if (eq system-type 'vax-vms) - (purecopy "\\.EL\\(;[0-9]+\\)?$") - (purecopy "\\.el$")) - "*Regexp which matches Emacs Lisp source files. -You may want to redefine `byte-compile-dest-file' if you change this.") - -;; This enables file name handlers such as jka-compr -;; to remove parts of the file name that should not be copied -;; through to the output file name. -(defun byte-compiler-base-file-name (filename) - (let ((handler (find-file-name-handler filename - 'byte-compiler-base-file-name))) - (if handler - (funcall handler 'byte-compiler-base-file-name filename) - filename))) - -(or (fboundp 'byte-compile-dest-file) - ;; The user may want to redefine this along with emacs-lisp-file-regexp, - ;; so only define it if it is undefined. - (defun byte-compile-dest-file (filename) - "Convert an Emacs Lisp source file name to a compiled file name." - (setq filename (byte-compiler-base-file-name filename)) - (setq filename (file-name-sans-versions filename)) - (cond ((eq system-type 'vax-vms) - (concat (substring filename 0 (string-match ";" filename)) "c")) - ((string-match emacs-lisp-file-regexp filename) - (concat (substring filename 0 (match-beginning 0)) ".elc")) - (t (concat filename ".elc"))))) - -;; This can be the 'byte-compile property of any symbol. -(autoload 'byte-compile-inline-expand "byte-optimize") - -;; This is the entrypoint to the lapcode optimizer pass1. -(autoload 'byte-optimize-form "byte-optimize") -;; This is the entrypoint to the lapcode optimizer pass2. -(autoload 'byte-optimize-lapcode "byte-optimize") -(autoload 'byte-compile-unfold-lambda "byte-optimize") - -;; This is the entry point to the decompiler, which is used by the -;; disassembler. The disassembler just requires 'byte-compile, but -;; that doesn't define this function, so this seems to be a reasonable -;; thing to do. -(autoload 'byte-decompile-bytecode "byte-opt") - -(defvar byte-compile-verbose - (and (not noninteractive) (> (device-baud-rate) search-slow-speed)) - "*Non-nil means print messages describing progress of byte-compiler.") - -(defvar byte-compile-emacs19-compatibility - (not (emacs-version>= 20)) - "*Non-nil means generate output that can run in Emacs 19.") - -(defvar byte-compile-print-gensym t - "*Non-nil means generate code that creates unique symbols at run-time. -This is achieved by printing uninterned symbols using the `#:SYMBOL' -notation, so that they will be read uninterned when run. - -With this feature, code that uses uninterned symbols in macros will -not be runnable under pre-21.0 XEmacsen. - -When `byte-compile-emacs19-compatibility' is non-nil, this variable is -ignored and considered to be nil.") - -(defvar byte-optimize t - "*Enables optimization in the byte compiler. -nil means don't do any optimization. -t means do all optimizations. -`source' means do source-level optimizations only. -`byte' means do code-level optimizations only.") - -(defvar byte-compile-delete-errors t - "*If non-nil, the optimizer may delete forms that may signal an error. -This includes variable references and calls to functions such as `car'.") - -;; XEmacs addition -(defvar byte-compile-new-bytecodes nil - "This is completely ignored. It is only around for backwards -compatibility.") - - -;; FSF enables byte-compile-dynamic-docstrings but not byte-compile-dynamic -;; by default. This would be a reasonable conservative approach except -;; for the fact that if you enable either of these, you get incompatible -;; byte code that can't be read by XEmacs 19.13 or before or FSF 19.28 or -;; before. -;; -;; Therefore, neither is enabled for 19.14. Both are enabled for 20.0 -;; because we have no reason to be conservative about changing the -;; way things work. (Ben) - -;; However, I don't think that defaulting byte-compile-dynamic to nil -;; is a compatibility issue - rather it is a performance issue. -;; Therefore I am setting byte-compile-dynamic back to nil. (mrb) - -(defvar byte-compile-dynamic nil - "*If non-nil, compile function bodies so they load lazily. -They are hidden comments in the compiled file, and brought into core when the -function is called. - -To enable this option, make it a file-local variable -in the source file you want it to apply to. -For example, add -*-byte-compile-dynamic: t;-*- on the first line. - -When this option is true, if you load the compiled file and then move it, -the functions you loaded will not be able to run.") - -(defvar byte-compile-dynamic-docstrings (emacs-version>= 20) - "*If non-nil, compile doc strings for lazy access. -We bury the doc strings of functions and variables -inside comments in the file, and bring them into core only when they -are actually needed. - -When this option is true, if you load the compiled file and then move it, -you won't be able to find the documentation of anything in that file. - -To disable this option for a certain file, make it a file-local variable -in the source file. For example, add this to the first line: - -*-byte-compile-dynamic-docstrings:nil;-*- -You can also set the variable globally. - -This option is enabled by default because it reduces Emacs memory usage.") - -(defvar byte-optimize-log nil - "*If true, the byte-compiler will log its optimizations into *Compile-Log*. -If this is 'source, then only source-level optimizations will be logged. -If it is 'byte, then only byte-level optimizations will be logged.") - -(defvar byte-compile-error-on-warn nil - "*If true, the byte-compiler reports warnings with `error'.") - -;; byte-compile-warning-types in FSF. -(defvar byte-compile-default-warnings - '(redefine callargs free-vars unresolved unused-vars obsolete) - "*The warnings used when byte-compile-warnings is t.") - -(defvar byte-compile-warnings t - "*List of warnings that the compiler should issue (t for the default set). -Elements of the list may be: - - free-vars references to variables not in the current lexical scope. - unused-vars references to non-global variables bound but not referenced. - unresolved calls to unknown functions. - callargs lambda calls with args that don't match the definition. - redefine function cell redefined from a macro to a lambda or vice - versa, or redefined to take a different number of arguments. - obsolete use of an obsolete function or variable. - pedantic warn of use of compatible symbols. - -The default set is specified by `byte-compile-default-warnings' and -normally encompasses all possible warnings. - -See also the macro `byte-compiler-options'.") - -(defvar byte-compile-generate-call-tree nil - "*Non-nil means collect call-graph information when compiling. -This records functions were called and from where. -If the value is t, compilation displays the call graph when it finishes. -If the value is neither t nor nil, compilation asks you whether to display -the graph. - -The call tree only lists functions called, not macros used. Those functions -which the byte-code interpreter knows about directly (eq, cons, etc.) are -not reported. - -The call tree also lists those functions which are not known to be called -\(that is, to which no calls have been compiled). Functions which can be -invoked interactively are excluded from this list.") - -(defconst byte-compile-call-tree nil "Alist of functions and their call tree. -Each element looks like - - \(FUNCTION CALLERS CALLS\) - -where CALLERS is a list of functions that call FUNCTION, and CALLS -is a list of functions for which calls were generated while compiling -FUNCTION.") - -(defvar byte-compile-call-tree-sort 'name - "*If non-nil, sort the call tree. -The values `name', `callers', `calls', `calls+callers' -specify different fields to sort on.") - -(defvar byte-compile-overwrite-file t - "If nil, old .elc files are deleted before the new is saved, and .elc -files will have the same modes as the corresponding .el file. Otherwise, -existing .elc files will simply be overwritten, and the existing modes -will not be changed. If this variable is nil, then an .elc file which -is a symbolic link will be turned into a normal file, instead of the file -which the link points to being overwritten.") - -(defvar byte-recompile-directory-ignore-errors-p nil - "If true, then `byte-recompile-directory' will continue compiling even -when an error occurs in a file. This is bound to t by -`batch-byte-recompile-directory'.") - -(defvar byte-recompile-directory-recursively t - "*If true, then `byte-recompile-directory' will recurse on subdirectories.") - -(defvar byte-compile-constants nil - "list of all constants encountered during compilation of this form") -(defvar byte-compile-variables nil - "list of all variables encountered during compilation of this form") -(defvar byte-compile-bound-variables nil - "Alist of variables bound in the context of the current form, -that is, the current lexical environment. This list lives partly -on the specbind stack. The cdr of each cell is an integer bitmask.") - -(defconst byte-compile-referenced-bit 1) -(defconst byte-compile-assigned-bit 2) -(defconst byte-compile-arglist-bit 4) -(defconst byte-compile-global-bit 8) - -(defvar byte-compile-free-references) -(defvar byte-compile-free-assignments) - -(defvar byte-compiler-error-flag) - -(defconst byte-compile-initial-macro-environment - (purecopy - '((byte-compiler-options . (lambda (&rest forms) - (apply 'byte-compiler-options-handler forms))) - (eval-when-compile . (lambda (&rest body) - (list 'quote (eval (byte-compile-top-level - (cons 'progn body)))))) - (eval-and-compile . (lambda (&rest body) - (eval (cons 'progn body)) - (cons 'progn body))))) - "The default macro-environment passed to macroexpand by the compiler. -Placing a macro here will cause a macro to have different semantics when -expanded by the compiler as when expanded by the interpreter.") - -(defvar byte-compile-macro-environment byte-compile-initial-macro-environment - "Alist of macros defined in the file being compiled. -Each element looks like (MACRONAME . DEFINITION). It is -\(MACRONAME . nil) when a macro is redefined as a function.") - -(defvar byte-compile-function-environment nil - "Alist of functions defined in the file being compiled. -This is so we can inline them when necessary. -Each element looks like (FUNCTIONNAME . DEFINITION). It is -\(FUNCTIONNAME . nil) when a function is redefined as a macro.") - -(defvar byte-compile-autoload-environment nil - "Alist of functions and macros defined by autoload in the file being compiled. -This is so we can suppress warnings about calls to these functions, even though -they do not have `real' definitions. -Each element looks like (FUNCTIONNAME . CALL-TO-AUTOLOAD).") - -(defvar byte-compile-unresolved-functions nil - "Alist of undefined functions to which calls have been compiled (used for -warnings when the function is later defined with incorrect args).") - -(defvar byte-compile-file-domain) ; domain of file being compiled - -(defvar byte-compile-tag-number 0) -(defvar byte-compile-output nil - "Alist describing contents to put in byte code string. -Each element is (INDEX . VALUE)") -(defvar byte-compile-depth 0 "Current depth of execution stack.") -(defvar byte-compile-maxdepth 0 "Maximum depth of execution stack.") - - -;;; The byte codes; this information is duplicated in bytecode.c - -(defconst byte-code-vector nil - "An array containing byte-code names indexed by byte-code values.") - -(defconst byte-stack+-info nil - "An array with the stack adjustment for each byte-code.") - -(defmacro byte-defop (opcode stack-adjust opname &optional docstring) - ;; This is a speed-hack for building the byte-code-vector at compile-time. - ;; We fill in the vector at macroexpand-time, and then after the last call - ;; to byte-defop, we write the vector out as a constant instead of writing - ;; out a bunch of calls to aset. - ;; Actually, we don't fill in the vector itself, because that could make - ;; it problematic to compile big changes to this compiler; we store the - ;; values on its plist, and remove them later in -extrude. - (let ((v1 (or (get 'byte-code-vector 'tmp-compile-time-value) - (put 'byte-code-vector 'tmp-compile-time-value - (make-vector 256 nil)))) - (v2 (or (get 'byte-stack+-info 'tmp-compile-time-value) - (put 'byte-stack+-info 'tmp-compile-time-value - (make-vector 256 nil))))) - (aset v1 opcode opname) - (aset v2 opcode stack-adjust)) - (if docstring - (list 'defconst opname opcode (concat "Byte code opcode " docstring ".")) - (list 'defconst opname opcode))) - -(defmacro byte-extrude-byte-code-vectors () - (prog1 (list 'setq 'byte-code-vector - (get 'byte-code-vector 'tmp-compile-time-value) - 'byte-stack+-info - (get 'byte-stack+-info 'tmp-compile-time-value)) - (remprop 'byte-code-vector 'tmp-compile-time-value) - (remprop 'byte-stack+-info 'tmp-compile-time-value))) - - -;; unused: 0-7 - -;; These opcodes are special in that they pack their argument into the -;; opcode word. -;; -(byte-defop 8 1 byte-varref "for variable reference") -(byte-defop 16 -1 byte-varset "for setting a variable") -(byte-defop 24 -1 byte-varbind "for binding a variable") -(byte-defop 32 0 byte-call "for calling a function") -(byte-defop 40 0 byte-unbind "for unbinding special bindings") -;; codes 8-47 are consumed by the preceding opcodes - -;; unused: 48-55 - -(byte-defop 56 -1 byte-nth) -(byte-defop 57 0 byte-symbolp) -(byte-defop 58 0 byte-consp) -(byte-defop 59 0 byte-stringp) -(byte-defop 60 0 byte-listp) -(byte-defop 61 -1 byte-old-eq) -(byte-defop 62 -1 byte-old-memq) -(byte-defop 63 0 byte-not) -(byte-defop 64 0 byte-car) -(byte-defop 65 0 byte-cdr) -(byte-defop 66 -1 byte-cons) -(byte-defop 67 0 byte-list1) -(byte-defop 68 -1 byte-list2) -(byte-defop 69 -2 byte-list3) -(byte-defop 70 -3 byte-list4) -(byte-defop 71 0 byte-length) -(byte-defop 72 -1 byte-aref) -(byte-defop 73 -2 byte-aset) -(byte-defop 74 0 byte-symbol-value) -(byte-defop 75 0 byte-symbol-function) ; this was commented out -(byte-defop 76 -1 byte-set) -(byte-defop 77 -1 byte-fset) ; this was commented out -(byte-defop 78 -1 byte-get) -(byte-defop 79 -2 byte-substring) -(byte-defop 80 -1 byte-concat2) -(byte-defop 81 -2 byte-concat3) -(byte-defop 82 -3 byte-concat4) -(byte-defop 83 0 byte-sub1) -(byte-defop 84 0 byte-add1) -(byte-defop 85 -1 byte-eqlsign) -(byte-defop 86 -1 byte-gtr) -(byte-defop 87 -1 byte-lss) -(byte-defop 88 -1 byte-leq) -(byte-defop 89 -1 byte-geq) -(byte-defop 90 -1 byte-diff) -(byte-defop 91 0 byte-negate) -(byte-defop 92 -1 byte-plus) -(byte-defop 93 -1 byte-max) -(byte-defop 94 -1 byte-min) -(byte-defop 95 -1 byte-mult) -(byte-defop 96 1 byte-point) -(byte-defop 97 -1 byte-eq) ; new as of v20 -(byte-defop 98 0 byte-goto-char) -(byte-defop 99 0 byte-insert) -(byte-defop 100 1 byte-point-max) -(byte-defop 101 1 byte-point-min) -(byte-defop 102 0 byte-char-after) -(byte-defop 103 1 byte-following-char) -(byte-defop 104 1 byte-preceding-char) -(byte-defop 105 1 byte-current-column) -(byte-defop 106 0 byte-indent-to) -(byte-defop 107 -1 byte-equal) ; new as of v20 -(byte-defop 108 1 byte-eolp) -(byte-defop 109 1 byte-eobp) -(byte-defop 110 1 byte-bolp) -(byte-defop 111 1 byte-bobp) -(byte-defop 112 1 byte-current-buffer) -(byte-defop 113 0 byte-set-buffer) -(byte-defop 114 0 byte-save-current-buffer - "To make a binding to record the current buffer.") -;;(byte-defop 114 1 byte-read-char-OBSOLETE) ;obsolete as of v19 -(byte-defop 115 -1 byte-memq) ; new as of v20 -(byte-defop 116 1 byte-interactive-p) - -(byte-defop 117 0 byte-forward-char) -(byte-defop 118 0 byte-forward-word) -(byte-defop 119 -1 byte-skip-chars-forward) -(byte-defop 120 -1 byte-skip-chars-backward) -(byte-defop 121 0 byte-forward-line) -(byte-defop 122 0 byte-char-syntax) -(byte-defop 123 -1 byte-buffer-substring) -(byte-defop 124 -1 byte-delete-region) -(byte-defop 125 -1 byte-narrow-to-region) -(byte-defop 126 1 byte-widen) -(byte-defop 127 0 byte-end-of-line) - -;; unused: 128 - -;; These store their argument in the next two bytes -(byte-defop 129 1 byte-constant2 - "for reference to a constant with vector index >= byte-constant-limit") -(byte-defop 130 0 byte-goto "for unconditional jump") -(byte-defop 131 -1 byte-goto-if-nil "to pop value and jump if it's nil") -(byte-defop 132 -1 byte-goto-if-not-nil - "to pop value and jump if it's not nil") -(byte-defop 133 -1 byte-goto-if-nil-else-pop - "to examine top-of-stack, jump and don't pop it if it's nil, -otherwise pop it") -(byte-defop 134 -1 byte-goto-if-not-nil-else-pop - "to examine top-of-stack, jump and don't pop it if it's non nil, -otherwise pop it") - -(byte-defop 135 -1 byte-return "to pop a value and return it from `byte-code'") -(byte-defop 136 -1 byte-discard "to discard one value from stack") -(byte-defop 137 1 byte-dup "to duplicate the top of the stack") - -(byte-defop 138 0 byte-save-excursion - "to make a binding to record the buffer, point and mark") -(byte-defop 139 0 byte-save-window-excursion - "to make a binding to record entire window configuration") -(byte-defop 140 0 byte-save-restriction - "to make a binding to record the current buffer clipping restrictions") -(byte-defop 141 -1 byte-catch - "for catch. Takes, on stack, the tag and an expression for the body") -(byte-defop 142 -1 byte-unwind-protect - "for unwind-protect. Takes, on stack, an expression for the unwind-action") - -;; For condition-case. Takes, on stack, the variable to bind, -;; an expression for the body, and a list of clauses. -(byte-defop 143 -2 byte-condition-case) - -;; For entry to with-output-to-temp-buffer. -;; Takes, on stack, the buffer name. -;; Binds standard-output and does some other things. -;; Returns with temp buffer on the stack in place of buffer name. -(byte-defop 144 0 byte-temp-output-buffer-setup) - -;; For exit from with-output-to-temp-buffer. -;; Expects the temp buffer on the stack underneath value to return. -;; Pops them both, then pushes the value back on. -;; Unbinds standard-output and makes the temp buffer visible. -(byte-defop 145 -1 byte-temp-output-buffer-show) - -;; To unbind back to the beginning of this frame. -;; Not used yet, but will be needed for tail-recursion elimination. -(byte-defop 146 0 byte-unbind-all) - -(byte-defop 147 -2 byte-set-marker) -(byte-defop 148 0 byte-match-beginning) -(byte-defop 149 0 byte-match-end) -(byte-defop 150 0 byte-upcase) -(byte-defop 151 0 byte-downcase) -(byte-defop 152 -1 byte-string=) -(byte-defop 153 -1 byte-string<) -(byte-defop 154 -1 byte-old-equal) -(byte-defop 155 -1 byte-nthcdr) -(byte-defop 156 -1 byte-elt) -(byte-defop 157 -1 byte-old-member) -(byte-defop 158 -1 byte-old-assq) -(byte-defop 159 0 byte-nreverse) -(byte-defop 160 -1 byte-setcar) -(byte-defop 161 -1 byte-setcdr) -(byte-defop 162 0 byte-car-safe) -(byte-defop 163 0 byte-cdr-safe) -(byte-defop 164 -1 byte-nconc) -(byte-defop 165 -1 byte-quo) -(byte-defop 166 -1 byte-rem) -(byte-defop 167 0 byte-numberp) -(byte-defop 168 0 byte-integerp) - -;; unused: 169 - -;; These are not present in FSF. -;; -(byte-defop 170 0 byte-rel-goto) -(byte-defop 171 -1 byte-rel-goto-if-nil) -(byte-defop 172 -1 byte-rel-goto-if-not-nil) -(byte-defop 173 -1 byte-rel-goto-if-nil-else-pop) -(byte-defop 174 -1 byte-rel-goto-if-not-nil-else-pop) - -(byte-defop 175 nil byte-listN) -(byte-defop 176 nil byte-concatN) -(byte-defop 177 nil byte-insertN) - -;; unused: 178-181 - -;; these ops are new to v20 -(byte-defop 182 -1 byte-member) -(byte-defop 183 -1 byte-assq) - -;; unused: 184-191 - -(byte-defop 192 1 byte-constant "for reference to a constant") -;; codes 193-255 are consumed by byte-constant. -(defconst byte-constant-limit 64 - "Exclusive maximum index usable in the `byte-constant' opcode.") - -(defconst byte-goto-ops (purecopy - '(byte-goto byte-goto-if-nil byte-goto-if-not-nil - byte-goto-if-nil-else-pop - byte-goto-if-not-nil-else-pop)) - "List of byte-codes whose offset is a pc.") - -(defconst byte-goto-always-pop-ops - (purecopy '(byte-goto-if-nil byte-goto-if-not-nil))) - -(defconst byte-rel-goto-ops - (purecopy '(byte-rel-goto byte-rel-goto-if-nil byte-rel-goto-if-not-nil - byte-rel-goto-if-nil-else-pop byte-rel-goto-if-not-nil-else-pop)) - "byte-codes for relative jumps.") - -(byte-extrude-byte-code-vectors) - -;;; lapcode generator -;;; -;;; the byte-compiler now does source -> lapcode -> bytecode instead of -;;; source -> bytecode, because it's a lot easier to make optimizations -;;; on lapcode than on bytecode. -;;; -;;; Elements of the lapcode list are of the form ( . ) -;;; where instruction is a symbol naming a byte-code instruction, -;;; and parameter is an argument to that instruction, if any. -;;; -;;; The instruction can be the pseudo-op TAG, which means that this position -;;; in the instruction stream is a target of a goto. (car PARAMETER) will be -;;; the PC for this location, and the whole instruction "(TAG pc)" will be the -;;; parameter for some goto op. -;;; -;;; If the operation is varbind, varref, varset or push-constant, then the -;;; parameter is (variable/constant . index_in_constant_vector). -;;; -;;; First, the source code is macroexpanded and optimized in various ways. -;;; Then the resultant code is compiled into lapcode. Another set of -;;; optimizations are then run over the lapcode. Then the variables and -;;; constants referenced by the lapcode are collected and placed in the -;;; constants-vector. (This happens now so that variables referenced by dead -;;; code don't consume space.) And finally, the lapcode is transformed into -;;; compacted byte-code. -;;; -;;; A distinction is made between variables and constants because the variable- -;;; referencing instructions are more sensitive to the variables being near the -;;; front of the constants-vector than the constant-referencing instructions. -;;; Also, this lets us notice references to free variables. - -(defun byte-compile-lapcode (lap) - "Turns lapcode into bytecode. The lapcode is destroyed." - ;; Lapcode modifications: changes the ID of a tag to be the tag's PC. - (let ((pc 0) ; Program counter - op off ; Operation & offset - (bytes '()) ; Put the output bytes here - (patchlist nil) ; List of tags and goto's to patch - rest rel tmp) - (while lap - (setq op (car (car lap)) - off (cdr (car lap))) - (cond ((not (symbolp op)) - (error "Non-symbolic opcode `%s'" op)) - ((eq op 'TAG) - (setcar off pc) - (setq patchlist (cons off patchlist))) - ((memq op byte-goto-ops) - (setq pc (+ pc 3)) - (setq bytes (cons (cons pc (cdr off)) - (cons nil - (cons (symbol-value op) bytes)))) - (setq patchlist (cons bytes patchlist))) - (t - (setq bytes - (cond ((cond ((consp off) - ;; Variable or constant reference - (setq off (cdr off)) - (eq op 'byte-constant))) - (cond ((< off byte-constant-limit) - (setq pc (1+ pc)) - (cons (+ byte-constant off) bytes)) - (t - (setq pc (+ 3 pc)) - (cons (lsh off -8) - (cons (logand off 255) - (cons byte-constant2 bytes)))))) - ((and (<= byte-listN (symbol-value op)) - (<= (symbol-value op) byte-insertN)) - (setq pc (+ 2 pc)) - (cons off (cons (symbol-value op) bytes))) - ((< off 6) - (setq pc (1+ pc)) - (cons (+ (symbol-value op) off) bytes)) - ((< off 256) - (setq pc (+ 2 pc)) - (cons off (cons (+ (symbol-value op) 6) bytes))) - (t - (setq pc (+ 3 pc)) - (cons (lsh off -8) - (cons (logand off 255) - (cons (+ (symbol-value op) 7) - bytes)))))))) - (setq lap (cdr lap))) - ;;(if (not (= pc (length bytes))) - ;; (error "Compiler error: pc mismatch - %s %s" pc (length bytes))) - (cond (t ;; starting with Emacs 19. - ;; Make relative jumps - (setq patchlist (nreverse patchlist)) - (while (progn - (setq off 0) ; PC change because of deleted bytes - (setq rest patchlist) - (while rest - (setq tmp (car rest)) - (and (consp (car tmp)) ; Jump - (prog1 (null (nth 1 tmp)) ; Absolute jump - (setq tmp (car tmp))) - (progn - (setq rel (- (car (cdr tmp)) (car tmp))) - (and (<= -129 rel) (< rel 128))) - (progn - ;; Convert to relative jump. - (setcdr (car rest) (cdr (cdr (car rest)))) - (setcar (cdr (car rest)) - (+ (car (cdr (car rest))) - (- byte-rel-goto byte-goto))) - (setq off (1- off)))) - (setcar tmp (+ (car tmp) off)) ; Adjust PC - (setq rest (cdr rest))) - ;; If optimizing, repeat until no change. - (and byte-optimize - (not (zerop off))))))) - ;; Patch PC into jumps - (let (bytes) - (while patchlist - (setq bytes (car patchlist)) - (cond ((atom (car bytes))) ; Tag - ((nth 1 bytes) ; Relative jump - (setcar bytes (+ (- (car (cdr (car bytes))) (car (car bytes))) - 128))) - (t ; Absolute jump - (setq pc (car (cdr (car bytes)))) ; Pick PC from tag - (setcar (cdr bytes) (logand pc 255)) - (setcar bytes (lsh pc -8)))) - (setq patchlist (cdr patchlist)))) - (concat (nreverse bytes)))) - - -;;; byte compiler messages - -(defvar byte-compile-current-form nil) -(defvar byte-compile-current-file nil) -(defvar byte-compile-dest-file nil) - -(defmacro byte-compile-log (format-string &rest args) - (list 'and - 'byte-optimize - '(memq byte-optimize-log '(t source)) - (list 'let '((print-escape-newlines t) - (print-level 4) - (print-length 4)) - (list 'byte-compile-log-1 - (cons 'format - (cons format-string - (mapcar - '(lambda (x) - (if (symbolp x) (list 'prin1-to-string x) x)) - args))))))) - -(defconst byte-compile-last-warned-form nil) - -;; Log a message STRING in *Compile-Log*. -;; Also log the current function and file if not already done. -(defun byte-compile-log-1 (string &optional fill) - (let ((this-form (or byte-compile-current-form "toplevel forms"))) - (cond - (noninteractive - (if (or byte-compile-current-file - (and byte-compile-last-warned-form - (not (eq this-form byte-compile-last-warned-form)))) - (message - (format "While compiling %s%s:" - this-form - (if byte-compile-current-file - (if (stringp byte-compile-current-file) - (concat " in file " byte-compile-current-file) - (concat " in buffer " - (buffer-name byte-compile-current-file))) - "")))) - (message " %s" string)) - (t - (save-excursion - (set-buffer (get-buffer-create "*Compile-Log*")) - (goto-char (point-max)) - (cond ((or byte-compile-current-file - (and byte-compile-last-warned-form - (not (eq this-form byte-compile-last-warned-form)))) - (if byte-compile-current-file - (insert "\n\^L\n" (current-time-string) "\n")) - (insert "While compiling " - (if (stringp this-form) this-form - (format "%s" this-form))) - (if byte-compile-current-file - (if (stringp byte-compile-current-file) - (insert " in file " byte-compile-current-file) - (insert " in buffer " - (buffer-name byte-compile-current-file)))) - (insert ":\n"))) - (insert " " string "\n") - (if (and fill (not (string-match "\n" string))) - (let ((fill-prefix " ") - (fill-column 78)) - (fill-paragraph nil))) - ))) - (setq byte-compile-current-file nil - byte-compile-last-warned-form this-form))) - -;; Log the start of a file in *Compile-Log*, and mark it as done. -;; But do nothing in batch mode. -(defun byte-compile-log-file () - (and byte-compile-current-file (not noninteractive) - (save-excursion - (set-buffer (get-buffer-create "*Compile-Log*")) - (goto-char (point-max)) - (insert "\n\^L\nCompiling " - (if (stringp byte-compile-current-file) - (concat "file " byte-compile-current-file) - (concat "buffer " (buffer-name byte-compile-current-file))) - " at " (current-time-string) "\n") - (setq byte-compile-current-file nil)))) - -(defun byte-compile-warn (format &rest args) - (setq format (apply 'format format args)) - (if byte-compile-error-on-warn - (error "%s" format) ; byte-compile-file catches and logs it - (byte-compile-log-1 (concat "** " format) t) -;;; RMS says: -;;; It is useless to flash warnings too fast to be read. -;;; Besides, they will all be shown at the end. -;;; and comments out the next two lines. - (or noninteractive ; already written on stdout. - (message "Warning: %s" format)))) - -;;; This function should be used to report errors that have halted -;;; compilation of the current file. -(defun byte-compile-report-error (error-info) - (setq byte-compiler-error-flag t) - (byte-compile-log-1 - (concat "!! " - (format (if (cdr error-info) "%s (%s)" "%s") - (get (car error-info) 'error-message) - (prin1-to-string (cdr error-info)))))) - -;;; Used by make-obsolete. -(defun byte-compile-obsolete (form) - (let ((new (get (car form) 'byte-obsolete-info))) - (if (memq 'obsolete byte-compile-warnings) - (byte-compile-warn "%s is an obsolete function; %s" (car form) - (if (stringp (car new)) - (car new) - (format "use %s instead." (car new))))) - (funcall (or (cdr new) 'byte-compile-normal-call) form))) - -;;; Used by make-obsolete. -(defun byte-compile-compatible (form) - (let ((new (get (car form) 'byte-compatible-info))) - (if (memq 'pedantic byte-compile-warnings) - (byte-compile-warn "%s is provided for compatibility; %s" (car form) - (if (stringp (car new)) - (car new) - (format "use %s instead." (car new))))) - (funcall (or (cdr new) 'byte-compile-normal-call) form))) - -;; Compiler options - -(defconst byte-compiler-legal-options - '((optimize byte-optimize (t nil source byte) val) - (file-format byte-compile-emacs19-compatibility (emacs19 emacs20) - (eq val 'emacs19)) - (delete-errors byte-compile-delete-errors (t nil) val) - (verbose byte-compile-verbose (t nil) val) - (new-bytecodes byte-compile-new-bytecodes (t nil) val) - (warnings byte-compile-warnings - ((callargs redefine free-vars unused-vars unresolved)) - val))) - -;; XEmacs addition -(defconst byte-compiler-obsolete-options - '((new-bytecodes t))) - -;; Inhibit v19/v20 selectors if the version is hardcoded. -;; #### This should print a warning if the user tries to change something -;; than can't be changed because the running compiler doesn't support it. -(cond - ((byte-compile-single-version) - (setcar (cdr (cdr (assq 'file-format byte-compiler-legal-options))) - (if (byte-compile-version-cond byte-compile-emacs19-compatibility) - '(emacs19) '(emacs20))))) - -;; now we can copy it. -(setq byte-compiler-legal-options (purecopy byte-compiler-legal-options)) - -(defun byte-compiler-options-handler (&rest args) - (let (key val desc choices) - (while args - (if (or (atom (car args)) (nthcdr 2 (car args)) (null (cdr (car args)))) - (error "malformed byte-compiler-option %s" (car args))) - (setq key (car (car args)) - val (car (cdr (car args))) - desc (assq key byte-compiler-legal-options)) - (or desc - (error "unknown byte-compiler option %s" key)) - (if (assq key byte-compiler-obsolete-options) - (byte-compile-warn "%s is an obsolete byte-compiler option." key)) - (setq choices (nth 2 desc)) - (if (consp (car choices)) - (let* (this - (handler 'cons) - (var (nth 1 desc)) - (ret (and (memq (car val) '(+ -)) - (copy-sequence (if (eq t (symbol-value var)) - (car choices) - (symbol-value var)))))) - (setq choices (car choices)) - (while val - (setq this (car val)) - (cond ((memq this choices) - (setq ret (funcall handler this ret))) - ((eq this '+) (setq handler 'cons)) - ((eq this '-) (setq handler 'delq)) - ((error "%s only accepts %s." key choices))) - (setq val (cdr val))) - (set (nth 1 desc) ret)) - (or (memq val choices) - (error "%s must be one of %s." key choices)) - (set (nth 1 desc) (eval (nth 3 desc)))) - (setq args (cdr args))) - nil)) - -;;; sanity-checking arglists - -(defun byte-compile-fdefinition (name macro-p) - (let* ((list (if (memq macro-p '(nil subr)) - byte-compile-function-environment - byte-compile-macro-environment)) - (env (cdr (assq name list)))) - (or env - (let ((fn name)) - (while (and (symbolp fn) - (fboundp fn) - (or (symbolp (symbol-function fn)) - (consp (symbol-function fn)) - (and (not macro-p) - (compiled-function-p (symbol-function fn))) - (and (eq macro-p 'subr) (subrp fn)))) - (setq fn (symbol-function fn))) - (if (or (and (not macro-p) (compiled-function-p fn)) - (and (eq macro-p 'subr) (subrp fn))) - fn - (and (consp fn) - (not (eq macro-p 'subr)) - (if (eq 'macro (car fn)) - (cdr fn) - (if macro-p - nil - (if (eq 'autoload (car fn)) - nil - fn))))))))) - -(defun byte-compile-arglist-signature (arglist) - (let ((args 0) - opts - restp) - (while arglist - (cond ((eq (car arglist) '&optional) - (or opts (setq opts 0))) - ((eq (car arglist) '&rest) - (if (cdr arglist) - (setq restp t - arglist nil))) - (t - (if opts - (setq opts (1+ opts)) - (setq args (1+ args))))) - (setq arglist (cdr arglist))) - (cons args (if restp nil (if opts (+ args opts) args))))) - - -(defun byte-compile-arglist-signatures-congruent-p (old new) - (not (or - (> (car new) (car old)) ; requires more args now - (and (null (cdr old)) ; tooks rest-args, doesn't any more - (cdr new)) - (and (cdr new) (cdr old) ; can't take as many args now - (< (cdr new) (cdr old))) - ))) - -(defun byte-compile-arglist-signature-string (signature) - (cond ((null (cdr signature)) - (format "%d+" (car signature))) - ((= (car signature) (cdr signature)) - (format "%d" (car signature))) - (t (format "%d-%d" (car signature) (cdr signature))))) - - -;; Warn if the form is calling a function with the wrong number of arguments. -(defun byte-compile-callargs-warn (form) - (let* ((def (or (byte-compile-fdefinition (car form) nil) - (byte-compile-fdefinition (car form) t))) - (sig (and def (byte-compile-arglist-signature - (if (eq 'lambda (car-safe def)) - (nth 1 def) - (if (compiled-function-p def) - (compiled-function-arglist def) - '(&rest def)))))) - (ncall (length (cdr form)))) - (if (and (null def) - (fboundp 'subr-min-args) - (setq def (byte-compile-fdefinition (car form) 'subr))) - (setq sig (cons (subr-min-args def) (subr-max-args def)))) - (if sig - (if (or (< ncall (car sig)) - (and (cdr sig) (> ncall (cdr sig)))) - (byte-compile-warn - "%s called with %d argument%s, but %s %s" - (car form) ncall - (if (= 1 ncall) "" "s") - (if (< ncall (car sig)) - "requires" - "accepts only") - (byte-compile-arglist-signature-string sig))) - (or (fboundp (car form)) ; might be a subr or autoload. - ;; ## this doesn't work with recursion. - (eq (car form) byte-compile-current-form) - ;; It's a currently-undefined function. - ;; Remember number of args in call. - (let ((cons (assq (car form) byte-compile-unresolved-functions)) - (n (length (cdr form)))) - (if cons - (or (memq n (cdr cons)) - (setcdr cons (cons n (cdr cons)))) - (setq byte-compile-unresolved-functions - (cons (list (car form) n) - byte-compile-unresolved-functions)))))))) - -;; Warn if the function or macro is being redefined with a different -;; number of arguments. -(defun byte-compile-arglist-warn (form macrop) - (let ((old (byte-compile-fdefinition (nth 1 form) macrop))) - (if old - (let ((sig1 (byte-compile-arglist-signature - (if (eq 'lambda (car-safe old)) - (nth 1 old) - (if (compiled-function-p old) - (compiled-function-arglist old) - '(&rest def))))) - (sig2 (byte-compile-arglist-signature (nth 2 form)))) - (or (byte-compile-arglist-signatures-congruent-p sig1 sig2) - (byte-compile-warn "%s %s used to take %s %s, now takes %s" - (if (eq (car form) 'defun) "function" "macro") - (nth 1 form) - (byte-compile-arglist-signature-string sig1) - (if (equal sig1 '(1 . 1)) "argument" "arguments") - (byte-compile-arglist-signature-string sig2)))) - ;; This is the first definition. See if previous calls are compatible. - (let ((calls (assq (nth 1 form) byte-compile-unresolved-functions)) - nums sig min max) - (if calls - (progn - (setq sig (byte-compile-arglist-signature (nth 2 form)) - nums (sort (copy-sequence (cdr calls)) (function <)) - min (car nums) - max (car (nreverse nums))) - (if (or (< min (car sig)) - (and (cdr sig) (> max (cdr sig)))) - (byte-compile-warn - "%s being defined to take %s%s, but was previously called with %s" - (nth 1 form) - (byte-compile-arglist-signature-string sig) - (if (equal sig '(1 . 1)) " arg" " args") - (byte-compile-arglist-signature-string (cons min max)))) - - (setq byte-compile-unresolved-functions - (delq calls byte-compile-unresolved-functions))))) - ))) - -;; If we have compiled any calls to functions which are not known to be -;; defined, issue a warning enumerating them. -;; `unresolved' in the list `byte-compile-warnings' disables this. -(defun byte-compile-warn-about-unresolved-functions (&optional msg) - (if (memq 'unresolved byte-compile-warnings) - (let ((byte-compile-current-form (or msg "the end of the data"))) - ;; First delete the autoloads from the list. - (if byte-compile-autoload-environment - (let ((rest byte-compile-unresolved-functions)) - (while rest - (if (assq (car (car rest)) byte-compile-autoload-environment) - (setq byte-compile-unresolved-functions - (delq (car rest) byte-compile-unresolved-functions))) - (setq rest (cdr rest))))) - ;; Now warn. - (if (cdr byte-compile-unresolved-functions) - (let* ((str "The following functions are not known to be defined: ") - (L (+ (length str) 5)) - (rest (reverse byte-compile-unresolved-functions)) - s) - (while rest - (setq s (symbol-name (car (car rest))) - L (+ L (length s) 2) - rest (cdr rest)) - (if (<= L (1- fill-column)) - (setq str (concat str " " s (and rest ","))) - (setq str (concat str "\n " s (and rest ",")) - L (+ (length s) 4)))) - (byte-compile-warn "%s" str)) - (if byte-compile-unresolved-functions - (byte-compile-warn "the function %s is not known to be defined." - (car (car byte-compile-unresolved-functions))))))) - nil) - -(defun byte-compile-defvar-p (var) - ;; Whether the byte compiler thinks that nonexical references to this - ;; variable are ok. - (or (globally-boundp var) - (let ((rest byte-compile-bound-variables)) - (while (and rest var) - (if (and (eq var (car-safe (car rest))) - (not (= 0 (logand (cdr (car rest)) - byte-compile-global-bit)))) - (setq var nil)) - (setq rest (cdr rest))) - ;; if var is nil at this point, it's a defvar in this file. - (not var)))) - - -;;; If we have compiled bindings of variables which have no referents, warn. -(defun byte-compile-warn-about-unused-variables () - (let ((rest byte-compile-bound-variables) - (unreferenced '()) - cell) - (while (and rest - ;; only warn about variables whose lifetime is now ending, - ;; that is, variables from the lexical scope that is now - ;; terminating. (Think nested lets.) - (not (eq (car rest) 'new-scope))) - (setq cell (car rest)) - (if (and (= 0 (logand byte-compile-referenced-bit (cdr cell))) - ;; Don't warn about declared-but-unused arguments, - ;; for two reasons: first, the arglist structure - ;; might be imposed by external forces, and we don't - ;; have (declare (ignore x)) yet; and second, inline - ;; expansion produces forms like - ;; ((lambda (arg) (byte-code "..." [arg])) x) - ;; which we can't (ok, well, don't) recognise as - ;; containing a reference to arg, so every inline - ;; expansion would generate a warning. (If we had - ;; `ignore' then inline expansion could emit an - ;; ignore declaration.) - (= 0 (logand byte-compile-arglist-bit (cdr cell))) - ;; Don't warn about defvars because this is a - ;; legitimate special binding. - (not (byte-compile-defvar-p (car cell)))) - (setq unreferenced (cons (car cell) unreferenced))) - (setq rest (cdr rest))) - (setq unreferenced (nreverse unreferenced)) - (while unreferenced - (byte-compile-warn - (format "variable %s bound but not referenced" (car unreferenced))) - (setq unreferenced (cdr unreferenced))))) - - -(defmacro byte-compile-constp (form) - ;; Returns non-nil if FORM is a constant. - (` (cond ((consp (, form)) (eq (car (, form)) 'quote)) - ((not (symbolp (, form)))) - ((keywordp (, form))) - ((memq (, form) '(nil t)))))) - -(defmacro byte-compile-close-variables (&rest body) - `(let - (;; - ;; Close over these variables to encapsulate the - ;; compilation state - ;; - (byte-compile-macro-environment - ;; Copy it because the compiler may patch into the - ;; macroenvironment. - (copy-alist byte-compile-initial-macro-environment)) - (byte-compile-function-environment nil) - (byte-compile-autoload-environment nil) - (byte-compile-unresolved-functions nil) - (byte-compile-bound-variables nil) - (byte-compile-free-references nil) - (byte-compile-free-assignments nil) - ;; - ;; Close over these variables so that `byte-compiler-options' - ;; can change them on a per-file basis. - ;; - (byte-compile-verbose byte-compile-verbose) - (byte-optimize byte-optimize) - (byte-compile-emacs19-compatibility - byte-compile-emacs19-compatibility) - (byte-compile-dynamic byte-compile-dynamic) - (byte-compile-dynamic-docstrings - byte-compile-dynamic-docstrings) - (byte-compile-warnings (if (eq byte-compile-warnings t) - byte-compile-default-warnings - byte-compile-warnings)) - (byte-compile-file-domain nil) - ) - (prog1 - (progn ,@body) - (if (memq 'unused-vars byte-compile-warnings) - ;; done compiling in this scope, warn now. - (byte-compile-warn-about-unused-variables))))) - - -(defvar byte-compile-warnings-point-max nil) -(defmacro displaying-byte-compile-warnings (&rest body) - `(let ((byte-compile-warnings-point-max byte-compile-warnings-point-max)) - ;; Log the file name. - (byte-compile-log-file) - ;; Record how much is logged now. - ;; We will display the log buffer if anything more is logged - ;; before the end of BODY. - (or byte-compile-warnings-point-max - (save-excursion - (set-buffer (get-buffer-create "*Compile-Log*")) - (setq byte-compile-warnings-point-max (point-max)))) - (unwind-protect - (condition-case error-info - (progn ,@body) - (error - (byte-compile-report-error error-info))) - (save-excursion - ;; If there were compilation warnings, display them. - (set-buffer "*Compile-Log*") - (if (= byte-compile-warnings-point-max (point-max)) - nil - (if temp-buffer-show-function - (let ((show-buffer (get-buffer-create "*Compile-Log-Show*"))) - (save-excursion - (set-buffer show-buffer) - (setq buffer-read-only nil) - (erase-buffer)) - (copy-to-buffer show-buffer - (save-excursion - (goto-char byte-compile-warnings-point-max) - (forward-line -1) - (point)) - (point-max)) - (funcall temp-buffer-show-function show-buffer)) - (select-window - (prog1 (selected-window) - (select-window (display-buffer (current-buffer))) - (goto-char byte-compile-warnings-point-max) - (recenter 1))))))))) - - -;;;###autoload -(defun byte-force-recompile (directory) - "Recompile every `.el' file in DIRECTORY that already has a `.elc' file. -Files in subdirectories of DIRECTORY are processed also." - (interactive "DByte force recompile (directory): ") - (byte-recompile-directory directory nil t)) - -;;;###autoload -(defun byte-recompile-directory (directory &optional arg norecursion force) - "Recompile every `.el' file in DIRECTORY that needs recompilation. -This is if a `.elc' file exists but is older than the `.el' file. -Files in subdirectories of DIRECTORY are processed also unless argument -NORECURSION is non-nil. - -If the `.elc' file does not exist, normally the `.el' file is *not* compiled. -But a prefix argument (optional second arg) means ask user, -for each such `.el' file, whether to compile it. Prefix argument 0 means -don't ask and compile the file anyway. - -A nonzero prefix argument also means ask about each subdirectory. - -If the fourth argument FORCE is non-nil, -recompile every `.el' file that already has a `.elc' file." - (interactive "DByte recompile directory: \nP") - (if arg - (setq arg (prefix-numeric-value arg))) - (if noninteractive - nil - (save-some-buffers) - (redraw-modeline)) - (let ((directories (list (expand-file-name directory))) - (file-count 0) - (dir-count 0) - last-dir) - (displaying-byte-compile-warnings - (while directories - (setq directory (file-name-as-directory (car directories))) - (or noninteractive (message "Checking %s..." directory)) - (let ((files (directory-files directory)) - source dest) - (while files - (setq source (expand-file-name (car files) directory)) - (if (and (not (member (car files) '("." ".." "RCS" "CVS" "SCCS"))) - ;; Stay away from directory back-links, etc: - (not (file-symlink-p source)) - (file-directory-p source) - byte-recompile-directory-recursively) - ;; This file is a subdirectory. Handle them differently. - (if (or (null arg) - (eq arg 0) - (y-or-n-p (concat "Check " source "? "))) - (setq directories - (nconc directories (list source)))) - ;; It is an ordinary file. Decide whether to compile it. - (if (and (string-match emacs-lisp-file-regexp source) - (not (auto-save-file-name-p source)) - (setq dest (byte-compile-dest-file source)) - (if (file-exists-p dest) - ;; File was already compiled. - (or force (file-newer-than-file-p source dest)) - ;; No compiled file exists yet. - (and arg - (or (eq 0 arg) - (y-or-n-p (concat "Compile " source "? ")))))) - (progn ;(if (and noninteractive (not byte-compile-verbose)) - ; (message "Compiling %s..." source)) - ; we do this in byte-compile-file. - (if byte-recompile-directory-ignore-errors-p - (batch-byte-compile-1 source) - (byte-compile-file source)) - (or noninteractive - (message "Checking %s..." directory)) - (setq file-count (1+ file-count)) - (if (not (eq last-dir directory)) - (setq last-dir directory - dir-count (1+ dir-count))) - ))) - (setq files (cdr files)))) - (setq directories (cdr directories)))) - (message "Done (Total of %d file%s compiled%s)" - file-count (if (= file-count 1) "" "s") - (if (> dir-count 1) (format " in %d directories" dir-count) "")))) - -;;;###autoload -(defun byte-recompile-file (filename &optional force) - "Recompile a file of Lisp code named FILENAME if it needs recompilation. -This is if the `.elc' file exists but is older than the `.el' file. - -If the `.elc' file does not exist, normally the `.el' file is *not* -compiled. But a prefix argument (optional second arg) means ask user -whether to compile it. Prefix argument 0 don't ask and recompile anyway." - (interactive "fByte recompile file: \nP") - (let ((dest)) - (if (and (string-match emacs-lisp-file-regexp filename) - (not (auto-save-file-name-p filename)) - (setq dest (byte-compile-dest-file filename)) - (if (file-exists-p dest) - (file-newer-than-file-p filename dest) - (and force - (or (eq 0 force) - (y-or-n-p (concat "Compile " filename "? ")))))) - (byte-compile-file filename)))) - -(defvar kanji-flag nil) - -;;;###autoload -(defun byte-compile-file (filename &optional load) - "Compile a file of Lisp code named FILENAME into a file of byte code. -The output file's name is made by appending `c' to the end of FILENAME. -With prefix arg (noninteractively: 2nd arg), load the file after compiling." -;; (interactive "fByte compile file: \nP") - (interactive - (let ((file buffer-file-name) - (file-name nil) - (file-dir nil)) - (and file - (eq (cdr (assq 'major-mode (buffer-local-variables))) - 'emacs-lisp-mode) - (setq file-name (file-name-nondirectory file) - file-dir (file-name-directory file))) - (list (read-file-name (if current-prefix-arg - "Byte compile and load file: " - "Byte compile file: ") - file-dir nil nil file-name) - current-prefix-arg))) - ;; Expand now so we get the current buffer's defaults - (setq filename (expand-file-name filename)) - - ;; If we're compiling a file that's in a buffer and is modified, offer - ;; to save it first. - (or noninteractive - (let ((b (get-file-buffer (expand-file-name filename)))) - (if (and b (buffer-modified-p b) - (y-or-n-p (format "save buffer %s first? " (buffer-name b)))) - (save-excursion (set-buffer b) (save-buffer))))) - - (if (or noninteractive byte-compile-verbose) ; XEmacs change - (message "Compiling %s..." filename)) - (let (;;(byte-compile-current-file (file-name-nondirectory filename)) - (byte-compile-current-file filename) - (debug-issue-ebola-notices 0) ; Hack -slb - target-file input-buffer output-buffer - byte-compile-dest-file) - (setq target-file (byte-compile-dest-file filename)) - (setq byte-compile-dest-file target-file) - (save-excursion - (setq input-buffer (get-buffer-create " *Compiler Input*")) - (set-buffer input-buffer) - (erase-buffer) - (insert-file-contents filename) - ;; Run hooks including the uncompression hook. - ;; If they change the file name, then change it for the output also. - (let ((buffer-file-name filename) - (default-major-mode 'emacs-lisp-mode) - (enable-local-eval nil)) - (normal-mode) - (setq filename buffer-file-name))) - (setq byte-compiler-error-flag nil) - ;; It is important that input-buffer not be current at this call, - ;; so that the value of point set in input-buffer - ;; within byte-compile-from-buffer lingers in that buffer. - (setq output-buffer (byte-compile-from-buffer input-buffer filename)) - (if byte-compiler-error-flag - nil - (if byte-compile-verbose - (message "Compiling %s...done" filename)) - (kill-buffer input-buffer) - (save-excursion - (set-buffer output-buffer) - (goto-char (point-max)) - (insert "\n") ; aaah, unix. - (let ((vms-stmlf-recfm t)) - (setq target-file (byte-compile-dest-file filename)) - (or byte-compile-overwrite-file - (condition-case () - (delete-file target-file) - (error nil))) - (if (file-writable-p target-file) - (let ((kanji-flag nil)) ; for nemacs, from Nakagawa Takayuki - (if (or (eq system-type 'ms-dos) (eq system-type 'windows-nt)) - (setq buffer-file-type t)) - (write-region 1 (point-max) target-file)) - ;; This is just to give a better error message than write-region - (signal 'file-error - (list "Opening output file" - (if (file-exists-p target-file) - "cannot overwrite file" - "directory not writable or nonexistent") - target-file))) - (or byte-compile-overwrite-file - (condition-case () - (set-file-modes target-file (file-modes filename)) - (error nil)))) - (kill-buffer (current-buffer))) - (if (and byte-compile-generate-call-tree - (or (eq t byte-compile-generate-call-tree) - (y-or-n-p (format "Report call tree for %s? " filename)))) - (save-excursion - (display-call-tree filename))) - (if load - (load target-file)) - t))) - -;; RMS comments the next two out. - -;;;###autoload -(defun byte-compile-and-load-file (&optional filename) - "Compile a file of Lisp code named FILENAME into a file of byte code, -and then load it. The output file's name is made by appending \"c\" to -the end of FILENAME." - (interactive) - (if filename ; I don't get it, (interactive-p) doesn't always work - (byte-compile-file filename t) - (let ((current-prefix-arg '(4))) - (call-interactively 'byte-compile-file)))) - -;;;###autoload -(defun byte-compile-buffer (&optional buffer) - "Byte-compile and evaluate contents of BUFFER (default: the current buffer)." - (interactive "bByte compile buffer: ") - (setq buffer (if buffer (get-buffer buffer) (current-buffer))) - (message "Compiling %s..." buffer) - (let* ((filename (or (buffer-file-name buffer) - (prin1-to-string buffer))) - (byte-compile-current-file buffer)) - (byte-compile-from-buffer buffer filename t)) - (message "Compiling %s...done" buffer) - t) - -;;; compiling a single function -;;;###autoload -(defun compile-defun (&optional arg) - "Compile and evaluate the current top-level form. -Print the result in the minibuffer. -With argument, insert value in current buffer after the form." - (interactive "P") - (save-excursion - (end-of-defun) - (beginning-of-defun) - (let* ((byte-compile-current-file (buffer-file-name)) - (load-file-name (buffer-file-name)) - (byte-compile-last-warned-form 'nothing) - (value (eval (displaying-byte-compile-warnings - (byte-compile-sexp (read (current-buffer)) - "toplevel forms"))))) - (cond (arg - (message "Compiling from buffer... done.") - (prin1 value (current-buffer)) - (insert "\n")) - ((message "%s" (prin1-to-string value))))))) - -(defvar byte-compile-inbuffer) -(defvar byte-compile-outbuffer) - -(defun byte-compile-from-buffer (byte-compile-inbuffer filename &optional eval) - ;; buffer --> output-buffer, or buffer --> eval form, return nil - (let (byte-compile-outbuffer - ;; Prevent truncation of flonums and lists as we read and print them - (float-output-format nil) - (case-fold-search nil) - (print-length nil) - (print-level nil) - ;; Simulate entry to byte-compile-top-level - (byte-compile-constants nil) - (byte-compile-variables nil) - (byte-compile-tag-number 0) - (byte-compile-depth 0) - (byte-compile-maxdepth 0) - (byte-compile-output nil) - ;; #### This is bound in b-c-close-variables. - ;; (byte-compile-warnings (if (eq byte-compile-warnings t) - ;; byte-compile-warning-types - ;; byte-compile-warnings)) - ) - (byte-compile-close-variables - (save-excursion - (setq byte-compile-outbuffer - (set-buffer (get-buffer-create " *Compiler Output*"))) - (erase-buffer) - ;; (emacs-lisp-mode) - (setq case-fold-search nil) - (and filename - (not eval) - (byte-compile-insert-header filename - byte-compile-inbuffer - byte-compile-outbuffer)) - - ;; This is a kludge. Some operating systems (OS/2, DOS) need to - ;; write files containing binary information specially. - ;; Under most circumstances, such files will be in binary - ;; overwrite mode, so those OS's use that flag to guess how - ;; they should write their data. Advise them that .elc files - ;; need to be written carefully. - (setq overwrite-mode 'overwrite-mode-binary)) - (displaying-byte-compile-warnings - (save-excursion - (set-buffer byte-compile-inbuffer) - (goto-char 1) - - ;; Compile the forms from the input buffer. - (while (progn - (while (progn (skip-chars-forward " \t\n\^l") - (looking-at ";")) - (forward-line 1)) - (not (eobp))) - (byte-compile-file-form (read byte-compile-inbuffer))) - - ;; Compile pending forms at end of file. - (byte-compile-flush-pending) - (byte-compile-warn-about-unresolved-functions) - ;; Should we always do this? When calling multiple files, it - ;; would be useful to delay this warning until all have - ;; been compiled. - (setq byte-compile-unresolved-functions nil))) - (save-excursion - (set-buffer byte-compile-outbuffer) - (goto-char (point-min)))) - (if (not eval) - byte-compile-outbuffer - (let (form) - (while (condition-case nil - (progn (setq form (read byte-compile-outbuffer)) - t) - (end-of-file nil)) - (eval form))) - (kill-buffer byte-compile-outbuffer) - nil))) - -(defun byte-compile-insert-header (filename byte-compile-inbuffer - byte-compile-outbuffer) - (set-buffer byte-compile-inbuffer) - (let ((dynamic-docstrings byte-compile-dynamic-docstrings)) - (set-buffer byte-compile-outbuffer) - (goto-char 1) - ;; - ;; The magic number of .elc files is ";ELC", or 0x3B454C43. After that is - ;; the file-format version number (19 or 20) as a byte, followed by some - ;; nulls. The primary motivation for doing this is to get some binary - ;; characters up in the first line of the file so that `diff' will simply - ;; say "Binary files differ" instead of actually doing a diff of two .elc - ;; files. An extra benefit is that you can add this to /etc/magic: - ;; - ;; 0 string ;ELC GNU Emacs Lisp compiled file, - ;; >4 byte x version %d - ;; - (insert - ";ELC" - (if (byte-compile-version-cond byte-compile-emacs19-compatibility) 19 20) - "\000\000\000\n" - ) - (insert ";;; compiled by " - (or (and (boundp 'user-mail-address) user-mail-address) - (concat (user-login-name) "@" (system-name))) - " on " - (current-time-string) "\n;;; from file " filename "\n") - (insert ";;; emacs version " emacs-version ".\n") - (insert ";;; bytecomp version " byte-compile-version "\n;;; " - (cond - ((eq byte-optimize 'source) "source-level optimization only") - ((eq byte-optimize 'byte) "byte-level optimization only") - (byte-optimize "optimization is on") - (t "optimization is off")) - (if (byte-compile-version-cond byte-compile-emacs19-compatibility) - "; compiled with Emacs 19 compatibility.\n" - ".\n")) - (if (not (byte-compile-version-cond byte-compile-emacs19-compatibility)) - (insert ";;; this file uses opcodes which do not exist in Emacs 19.\n" - ;; Have to check if emacs-version is bound so that this works - ;; in files loaded early in loadup.el. - "\n(if (and (boundp 'emacs-version)\n" - "\t (or (and (boundp 'epoch::version) epoch::version)\n" - "\t (string-lessp emacs-version \"20\")))\n" - " (error \"`" - ;; prin1-to-string is used to quote backslashes. - (substring (prin1-to-string (file-name-nondirectory filename)) - 1 -1) - "' was compiled for Emacs 20\"))\n\n")) - (insert "(or (boundp 'current-load-list) (setq current-load-list nil))\n" - "\n") - (if (and (byte-compile-version-cond byte-compile-emacs19-compatibility) - dynamic-docstrings) - (insert ";;; this file uses opcodes which do not exist prior to\n" - ";;; XEmacs 19.14/GNU Emacs 19.29 or later." - ;; Have to check if emacs-version is bound so that this works - ;; in files loaded early in loadup.el. - "\n(if (and (boundp 'emacs-version)\n" - "\t (or (and (boundp 'epoch::version) epoch::version)\n" - "\t (and (not (string-match \"XEmacs\" emacs-version))\n" - "\t (string-lessp emacs-version \"19.29\"))\n" - "\t (string-lessp emacs-version \"19.14\")))\n" - " (error \"`" - ;; prin1-to-string is used to quote backslashes. - (substring (prin1-to-string (file-name-nondirectory filename)) - 1 -1) - "' was compiled for XEmacs 19.14/Emacs 19.29 or later\"))\n\n" - ) - )) - - ;; back in the inbuffer; determine and set the coding system for the .elc - ;; file if under Mule. If there are any extended characters in the - ;; input file, use `escape-quoted' to make sure that both binary and - ;; extended characters are output properly and distinguished properly. - ;; Otherwise, use `no-conversion' for maximum portability with non-Mule - ;; Emacsen. - (if (featurep 'mule) - (if (save-excursion - (set-buffer byte-compile-inbuffer) - (goto-char (point-min)) - ;; mrb- There must be a better way than skip-chars-forward - (skip-chars-forward (concat (char-to-string 0) "-" - (char-to-string 255))) - (eq (point) (point-max))) - (setq buffer-file-coding-system 'no-conversion) - (insert "(require 'mule)\n;;;###coding system: escape-quoted\n") - (setq buffer-file-coding-system 'escape-quoted) - ;; Lazy loading not yet implemented for MULE files - ;; mrb - Fix this someday. - (save-excursion - (set-buffer byte-compile-inbuffer) - (setq byte-compile-dynamic nil - byte-compile-dynamic-docstrings nil)) - ;;(external-debugging-output (prin1-to-string (buffer-local-variables)))) - )) - ) - - -(defun byte-compile-output-file-form (form) - ;; writes the given form to the output buffer, being careful of docstrings - ;; in defun, defmacro, defvar, defconst and autoload because make-docfile is - ;; so amazingly stupid. - ;; defalias calls are output directly by byte-compile-file-form-defmumble; - ;; it does not pay to first build the defalias in defmumble and then parse - ;; it here. - (if (and (memq (car-safe form) '(defun defmacro defvar defconst autoload)) - (stringp (nth 3 form))) - (byte-compile-output-docform nil nil '("\n(" 3 ")") form nil - (eq (car form) 'autoload)) - (let ((print-escape-newlines t) - (print-length nil) - (print-level nil) - (print-readably t) ; print #[] for bytecode, 'x for (quote x) - (print-gensym (if (and byte-compile-print-gensym - (not byte-compile-emacs19-compatibility)) - t nil))) - (princ "\n" byte-compile-outbuffer) - (prin1 form byte-compile-outbuffer) - nil))) - -(defun byte-compile-output-docform (preface name info form specindex quoted) - "Print a form with a doc string. INFO is (prefix doc-index postfix). -If PREFACE and NAME are non-nil, print them too, -before INFO and the FORM but after the doc string itself. -If SPECINDEX is non-nil, it is the index in FORM -of the function bytecode string. In that case, -we output that argument and the following argument (the constants vector) -together, for lazy loading. -QUOTED says that we have to put a quote before the -list that represents a doc string reference. -`autoload' needs that." - ;; We need to examine byte-compile-dynamic-docstrings - ;; in the input buffer (now current), not in the output buffer. - (let ((dynamic-docstrings byte-compile-dynamic-docstrings)) - (set-buffer - (prog1 (current-buffer) - (set-buffer byte-compile-outbuffer) - (let (position) - - ;; Insert the doc string, and make it a comment with #@LENGTH. - (and (>= (nth 1 info) 0) - dynamic-docstrings - (progn - ;; Make the doc string start at beginning of line - ;; for make-docfile's sake. - (insert "\n") - (setq position - (byte-compile-output-as-comment - (nth (nth 1 info) form) nil)) - ;; If the doc string starts with * (a user variable), - ;; negate POSITION. - (if (and (stringp (nth (nth 1 info) form)) - (> (length (nth (nth 1 info) form)) 0) - (char= (aref (nth (nth 1 info) form) 0) ?*)) - (setq position (- position))))) - - (if preface - (progn - (insert preface) - (prin1 name byte-compile-outbuffer))) - (insert (car info)) - (let ((print-escape-newlines t) - (print-readably t) ; print #[] for bytecode, 'x for (quote x) - ;; Use a cons cell to say that we want - ;; print-gensym-alist not to be cleared between calls - ;; to print functions. - (print-gensym (if (and byte-compile-print-gensym - (not byte-compile-emacs19-compatibility)) - '(t) nil)) - print-gensym-alist - (index 0)) - (prin1 (car form) byte-compile-outbuffer) - (while (setq form (cdr form)) - (setq index (1+ index)) - (insert " ") - (cond ((and (numberp specindex) (= index specindex)) - (let ((position - (byte-compile-output-as-comment - (cons (car form) (nth 1 form)) - t))) - (princ (format "(#$ . %d) nil" position) - byte-compile-outbuffer) - (setq form (cdr form)) - (setq index (1+ index)))) - ((= index (nth 1 info)) - (if position - (princ (format (if quoted "'(#$ . %d)" "(#$ . %d)") - position) - byte-compile-outbuffer) - (let ((print-escape-newlines nil)) - (goto-char (prog1 (1+ (point)) - (prin1 (car form) - byte-compile-outbuffer))) - (insert "\\\n") - (goto-char (point-max))))) - (t - (prin1 (car form) byte-compile-outbuffer))))) - (insert (nth 2 info)))))) - nil) - -(defvar for-effect) ; ## Kludge! This should be an arg, not a special. - -(defun byte-compile-keep-pending (form &optional handler) - (if (memq byte-optimize '(t source)) - (setq form (byte-optimize-form form t))) - (if handler - (let ((for-effect t)) - ;; To avoid consing up monstrously large forms at load time, we split - ;; the output regularly. - (and (memq (car-safe form) '(fset defalias define-function)) - (nthcdr 300 byte-compile-output) - (byte-compile-flush-pending)) - (funcall handler form) - (if for-effect - (byte-compile-discard))) - (byte-compile-form form t)) - nil) - -(defun byte-compile-flush-pending () - (if byte-compile-output - (let ((form (byte-compile-out-toplevel t 'file))) - (cond ((eq (car-safe form) 'progn) - (mapcar 'byte-compile-output-file-form (cdr form))) - (form - (byte-compile-output-file-form form))) - (setq byte-compile-constants nil - byte-compile-variables nil - byte-compile-depth 0 - byte-compile-maxdepth 0 - byte-compile-output nil)))) - -(defun byte-compile-file-form (form) - (let ((byte-compile-current-form nil) ; close over this for warnings. - handler) - (cond - ((not (consp form)) - (byte-compile-keep-pending form)) - ((and (symbolp (car form)) - (setq handler (get (car form) 'byte-hunk-handler))) - (cond ((setq form (funcall handler form)) - (byte-compile-flush-pending) - (byte-compile-output-file-form form)))) - ((eq form (setq form (macroexpand form byte-compile-macro-environment))) - (byte-compile-keep-pending form)) - (t - (byte-compile-file-form form))))) - -;; Functions and variables with doc strings must be output separately, -;; so make-docfile can recognise them. Most other things can be output -;; as byte-code. - -(put 'defsubst 'byte-hunk-handler 'byte-compile-file-form-defsubst) -(defun byte-compile-file-form-defsubst (form) - (cond ((assq (nth 1 form) byte-compile-unresolved-functions) - (setq byte-compile-current-form (nth 1 form)) - (byte-compile-warn "defsubst %s was used before it was defined" - (nth 1 form)))) - (byte-compile-file-form - (macroexpand form byte-compile-macro-environment)) - ;; Return nil so the form is not output twice. - nil) - -(put 'autoload 'byte-hunk-handler 'byte-compile-file-form-autoload) -(defun byte-compile-file-form-autoload (form) - ;; - ;; If this is an autoload of a macro, and all arguments are constants (that - ;; is, there is no hairy computation going on here) then evaluate the form - ;; at compile-time. This is so that we can make use of macros which we - ;; have autoloaded from the file being compiled. Normal function autoloads - ;; are not automatically evaluated at compile time, because there's not - ;; much point to it (so why bother cluttering up the compile-time namespace.) - ;; - ;; If this is an autoload of a function, then record its definition in the - ;; byte-compile-autoload-environment to suppress any `not known to be - ;; defined' warnings at the end of this file (this only matters for - ;; functions which are autoloaded and compiled in the same file, if the - ;; autoload already exists in the compilation environment, we wouldn't have - ;; warned anyway.) - ;; - (let* ((name (if (byte-compile-constp (nth 1 form)) - (eval (nth 1 form)))) - ;; In v19, the 5th arg to autoload can be t, nil, 'macro, or 'keymap. - (macrop (and (byte-compile-constp (nth 5 form)) - (memq (eval (nth 5 form)) '(t macro)))) -;; (functionp (and (byte-compile-constp (nth 5 form)) -;; (eq 'nil (eval (nth 5 form))))) - ) - (if (and macrop - (let ((form form)) - ;; all forms are constant - (while (if (setq form (cdr form)) - (byte-compile-constp (car form)))) - (null form))) - ;; eval the macro autoload into the compilation enviroment - (eval form)) - - (if name - (let ((old (assq name byte-compile-autoload-environment))) - (cond (old - (if (memq 'redefine byte-compile-warnings) - (byte-compile-warn "multiple autoloads for %s" name)) - (setcdr old form)) - (t - ;; We only use the names in the autoload environment, but - ;; it might be useful to have the bodies some day. - (setq byte-compile-autoload-environment - (cons (cons name form) - byte-compile-autoload-environment))))))) - ;; - ;; Now output the form. - (if (stringp (nth 3 form)) - form - ;; No doc string, so we can compile this as a normal form. - (byte-compile-keep-pending form 'byte-compile-normal-call))) - -(put 'defvar 'byte-hunk-handler 'byte-compile-file-form-defvar) -(put 'defconst 'byte-hunk-handler 'byte-compile-file-form-defvar) -(defun byte-compile-file-form-defvar (form) - (if (> (length form) 4) - (byte-compile-warn "%s used with too many args (%s)" - (car form) (nth 1 form))) - (if (and (> (length form) 3) (not (stringp (nth 3 form)))) - (byte-compile-warn "Third arg to %s %s is not a string: %s" - (car form) (nth 1 form) (nth 3 form))) - (if (null (nth 3 form)) - ;; Since there is no doc string, we can compile this as a normal form, - ;; and not do a file-boundary. - (byte-compile-keep-pending form) - (if (memq 'free-vars byte-compile-warnings) - (setq byte-compile-bound-variables - (cons (cons (nth 1 form) byte-compile-global-bit) - byte-compile-bound-variables))) - (cond ((consp (nth 2 form)) - (setq form (copy-sequence form)) - (setcar (cdr (cdr form)) - (byte-compile-top-level (nth 2 form) nil 'file)))) - - ;; The following turns out not to be necessary, since we emit a call to - ;; defvar, which can hack Vfile_domain by itself! - ;; - ;; If a file domain has been set, emit (put 'VAR 'variable-domain ...) - ;; after this defvar. -; (if byte-compile-file-domain -; (progn -; ;; Actually, this will emit the (put ...) before the (defvar ...) -; ;; but I don't think that can matter in this case. -; (byte-compile-keep-pending -; (list 'put (list 'quote (nth 1 form)) ''variable-domain -; (list 'quote byte-compile-file-domain))))) - form)) - -(put 'require 'byte-hunk-handler 'byte-compile-file-form-eval-boundary) -(defun byte-compile-file-form-eval-boundary (form) - (eval form) - (byte-compile-keep-pending form 'byte-compile-normal-call)) - -(put 'progn 'byte-hunk-handler 'byte-compile-file-form-progn) -(put 'prog1 'byte-hunk-handler 'byte-compile-file-form-progn) -(put 'prog2 'byte-hunk-handler 'byte-compile-file-form-progn) -(defun byte-compile-file-form-progn (form) - (mapcar 'byte-compile-file-form (cdr form)) - ;; Return nil so the forms are not output twice. - nil) - -;; This handler is not necessary, but it makes the output from dont-compile -;; and similar macros cleaner. -(put 'eval 'byte-hunk-handler 'byte-compile-file-form-eval) -(defun byte-compile-file-form-eval (form) - (if (eq (car-safe (nth 1 form)) 'quote) - (nth 1 (nth 1 form)) - (byte-compile-keep-pending form))) - -(put 'defun 'byte-hunk-handler 'byte-compile-file-form-defun) -(defun byte-compile-file-form-defun (form) - (byte-compile-file-form-defmumble form nil)) - -(put 'defmacro 'byte-hunk-handler 'byte-compile-file-form-defmacro) -(defun byte-compile-file-form-defmacro (form) - (byte-compile-file-form-defmumble form t)) - -(defun byte-compile-compiled-obj-to-list (obj) - ;; #### this is fairly disgusting. Rewrite the code instead - ;; so that it doesn't create compiled objects in the first place! - ;; Much better than creating them and then "uncreating" them - ;; like this. - (read (concat "(" - (substring (let ((print-readably t) - (print-gensym - (if (and byte-compile-print-gensym - (not byte-compile-emacs19-compatibility)) - '(t) nil)) - (print-gensym-alist nil)) - (prin1-to-string obj)) - 2 -1) - ")"))) - -(defun byte-compile-file-form-defmumble (form macrop) - (let* ((name (car (cdr form))) - (this-kind (if macrop 'byte-compile-macro-environment - 'byte-compile-function-environment)) - (that-kind (if macrop 'byte-compile-function-environment - 'byte-compile-macro-environment)) - (this-one (assq name (symbol-value this-kind))) - (that-one (assq name (symbol-value that-kind))) - (byte-compile-free-references nil) - (byte-compile-free-assignments nil)) - - ;; When a function or macro is defined, add it to the call tree so that - ;; we can tell when functions are not used. - (if byte-compile-generate-call-tree - (or (assq name byte-compile-call-tree) - (setq byte-compile-call-tree - (cons (list name nil nil) byte-compile-call-tree)))) - - (setq byte-compile-current-form name) ; for warnings - (if (memq 'redefine byte-compile-warnings) - (byte-compile-arglist-warn form macrop)) - (if byte-compile-verbose - (message "Compiling %s... (%s)" - ;; #### filename used free - (if filename (file-name-nondirectory filename) "") - (nth 1 form))) - (cond (that-one - (if (and (memq 'redefine byte-compile-warnings) - ;; hack hack: don't warn when compiling the stubs in - ;; bytecomp-runtime... - (not (assq (nth 1 form) - byte-compile-initial-macro-environment))) - (byte-compile-warn - "%s defined multiple times, as both function and macro" - (nth 1 form))) - (setcdr that-one nil)) - (this-one - (if (and (memq 'redefine byte-compile-warnings) - ;; hack: don't warn when compiling the magic internal - ;; byte-compiler macros in bytecomp-runtime.el... - (not (assq (nth 1 form) - byte-compile-initial-macro-environment))) - (byte-compile-warn "%s %s defined multiple times in this file" - (if macrop "macro" "function") - (nth 1 form)))) - ((and (fboundp name) - (or (subrp (symbol-function name)) - (eq (car-safe (symbol-function name)) - (if macrop 'lambda 'macro)))) - (if (memq 'redefine byte-compile-warnings) - (byte-compile-warn "%s %s being redefined as a %s" - (if (subrp (symbol-function name)) - "subr" - (if macrop "function" "macro")) - (nth 1 form) - (if macrop "macro" "function"))) - ;; shadow existing definition - (set this-kind - (cons (cons name nil) (symbol-value this-kind)))) - ) - (let ((body (nthcdr 3 form))) - (if (and (stringp (car body)) - (symbolp (car-safe (cdr-safe body))) - (car-safe (cdr-safe body)) - (stringp (car-safe (cdr-safe (cdr-safe body))))) - (byte-compile-warn "Probable `\"' without `\\' in doc string of %s" - (nth 1 form)))) - (let* ((new-one (byte-compile-lambda (cons 'lambda (nthcdr 2 form)))) - (code (byte-compile-byte-code-maker new-one))) - (if this-one - (setcdr this-one new-one) - (set this-kind - (cons (cons name new-one) (symbol-value this-kind)))) - (if (and (stringp (nth 3 form)) - (eq 'quote (car-safe code)) - (eq 'lambda (car-safe (nth 1 code)))) - (cons (car form) - (cons name (cdr (nth 1 code)))) - (byte-compile-flush-pending) - (if (not (stringp (nth 3 form))) - ;; No doc string. Provide -1 as the "doc string index" - ;; so that no element will be treated as a doc string. - (byte-compile-output-docform - "\n(defalias '" - name - (cond ((atom code) - (if macrop '(" '(macro . #[" -1 "])") '(" #[" -1 "]"))) - ((eq (car code) 'quote) - (setq code new-one) - (if macrop '(" '(macro " -1 ")") '(" '(" -1 ")"))) - ((if macrop '(" (cons 'macro (" -1 "))") '(" (" -1 ")")))) - ;; FSF just calls `(append code nil)' here but that relies - ;; on horrible C kludges in concat() that accept byte- - ;; compiled objects and pretend they're vectors. - (if (compiled-function-p code) - (byte-compile-compiled-obj-to-list code) - (append code nil)) - (and (atom code) byte-compile-dynamic - 1) - nil) - ;; Output the form by hand, that's much simpler than having - ;; b-c-output-file-form analyze the defalias. - (byte-compile-output-docform - "\n(defalias '" - name - (cond ((atom code) ; compiled-function-p - (if macrop '(" '(macro . #[" 4 "])") '(" #[" 4 "]"))) - ((eq (car code) 'quote) - (setq code new-one) - (if macrop '(" '(macro " 2 ")") '(" '(" 2 ")"))) - ((if macrop '(" (cons 'macro (" 5 "))") '(" (" 5 ")")))) - ;; The result of byte-compile-byte-code-maker is either a - ;; compiled-function object, or a list of some kind. If it's - ;; not a cons, we must coerce it into a list of the elements - ;; to be printed to the file. - (if (consp code) - code - (nconc (list - (compiled-function-arglist code) - (compiled-function-instructions code) - (compiled-function-constants code) - (compiled-function-stack-depth code)) - (let ((doc (documentation code t))) - (if doc (list doc))) - (if (commandp code) - (list (nth 1 (compiled-function-interactive code)))))) - (and (atom code) byte-compile-dynamic - 1) - nil)) - (princ ")" byte-compile-outbuffer) - nil)))) - -;; Print Lisp object EXP in the output file, inside a comment, -;; and return the file position it will have. -;; If QUOTED is non-nil, print with quoting; otherwise, print without quoting. -(defun byte-compile-output-as-comment (exp quoted) - (let ((position (point))) - (set-buffer - (prog1 (current-buffer) - (set-buffer byte-compile-outbuffer) - - ;; Insert EXP, and make it a comment with #@LENGTH. - (insert " ") - (if quoted - (prin1 exp byte-compile-outbuffer) - (princ exp byte-compile-outbuffer)) - (goto-char position) - ;; Quote certain special characters as needed. - ;; get_doc_string in doc.c does the unquoting. - (while (search-forward "\^A" nil t) - (replace-match "\^A\^A" t t)) - (goto-char position) - (while (search-forward "\000" nil t) - (replace-match "\^A0" t t)) - (goto-char position) - (while (search-forward "\037" nil t) - (replace-match "\^A_" t t)) - (goto-char (point-max)) - (insert "\037") - (goto-char position) - (insert "#@" (format "%d" (- (point-max) position))) - - ;; Save the file position of the object. - ;; Note we should add 1 to skip the space - ;; that we inserted before the actual doc string, - ;; and subtract 1 to convert from an 1-origin Emacs position - ;; to a file position; they cancel. - (setq position (point)) - (goto-char (point-max)))) - position)) - - - -;; The `domain' declaration. This is legal only at top-level in a file, and -;; should generally be the first form in the file. It is not legal inside -;; function bodies. - -(put 'domain 'byte-hunk-handler 'byte-compile-file-form-domain) -(defun byte-compile-file-form-domain (form) - (if (not (null (cdr (cdr form)))) - (byte-compile-warn "domain used with too many arguments: %s" form)) - (let ((domain (nth 1 form))) - (or (null domain) - (stringp domain) - (progn - (byte-compile-warn - "argument to `domain' declaration must be a literal string: %s" - form) - (setq domain nil))) - (setq byte-compile-file-domain domain)) - (byte-compile-keep-pending form 'byte-compile-normal-call)) - -(defun byte-compile-domain (form) - (byte-compile-warn "The `domain' declaration is legal only at top-level: %s" - (let ((print-escape-newlines t) - (print-level 4) - (print-length 4)) - (prin1-to-string form))) - (byte-compile-normal-call - (list 'signal ''error - (list 'quote (list "`domain' used inside a function" form))))) - -;; This is part of bytecomp.el in 19.35: -(put 'custom-declare-variable 'byte-hunk-handler - 'byte-compile-file-form-custom-declare-variable) -(defun byte-compile-file-form-custom-declare-variable (form) - (if (memq 'free-vars byte-compile-warnings) - (setq byte-compile-bound-variables - (cons (cons (nth 1 (nth 1 form)) - byte-compile-global-bit) - byte-compile-bound-variables))) - form) - - -;;;###autoload -(defun byte-compile (form) - "If FORM is a symbol, byte-compile its function definition. -If FORM is a lambda or a macro, byte-compile it as a function." - (displaying-byte-compile-warnings - (byte-compile-close-variables - (let* ((fun (if (symbolp form) - (and (fboundp form) (symbol-function form)) - form)) - (macro (eq (car-safe fun) 'macro))) - (if macro - (setq fun (cdr fun))) - (cond ((eq (car-safe fun) 'lambda) - (setq fun (if macro - (cons 'macro (byte-compile-lambda fun)) - (byte-compile-lambda fun))) - (if (symbolp form) - (defalias form fun) - fun))))))) - -;;;###autoload -(defun byte-compile-sexp (sexp &optional msg) - "Compile and return SEXP." - (displaying-byte-compile-warnings - (byte-compile-close-variables - (prog1 - (byte-compile-top-level sexp) - (byte-compile-warn-about-unresolved-functions msg))))) - -;; Given a function made by byte-compile-lambda, make a form which produces it. -(defun byte-compile-byte-code-maker (fun) - (cond - ;; ## atom is faster than compiled-func-p. - ((atom fun) ; compiled-function-p - fun) - ;; b-c-lambda didn't produce a compiled-function, so it must be a trivial - ;; function. - ((let (tmp) - (if (and (setq tmp (assq 'byte-code (cdr-safe (cdr fun)))) - (null (cdr (memq tmp fun)))) - ;; Generate a make-byte-code call. - (let* ((interactive (assq 'interactive (cdr (cdr fun))))) - (nconc (list 'make-byte-code - (list 'quote (nth 1 fun)) ;arglist - (nth 1 tmp) ;bytes - (nth 2 tmp) ;consts - (nth 3 tmp)) ;depth - (cond ((stringp (nth 2 fun)) - (list (nth 2 fun))) ;doc - (interactive - (list nil))) - (cond (interactive - (list (if (or (null (nth 1 interactive)) - (stringp (nth 1 interactive))) - (nth 1 interactive) - ;; Interactive spec is a list or a variable - ;; (if it is correct). - (list 'quote (nth 1 interactive)))))))) - ;; a non-compiled function (probably trivial) - (list 'quote fun)))))) - -;; Byte-compile a lambda-expression and return a valid function. -;; The value is usually a compiled function but may be the original -;; lambda-expression. -(defun byte-compile-lambda (fun) - (or (eq 'lambda (car-safe fun)) - (error "not a lambda -- %s" (prin1-to-string fun))) - (let* ((arglist (nth 1 fun)) - (byte-compile-bound-variables - (let ((new-bindings - (mapcar (function (lambda (x) - (cons x byte-compile-arglist-bit))) - (and (memq 'free-vars byte-compile-warnings) - (delq '&rest (delq '&optional - (copy-sequence arglist))))))) - (nconc new-bindings - (cons 'new-scope byte-compile-bound-variables)))) - (body (cdr (cdr fun))) - (doc (if (stringp (car body)) - (prog1 (car body) - (setq body (cdr body))))) - (int (assq 'interactive body))) - (let ((rest arglist)) - (while rest - (cond ((not (symbolp (car rest))) - (byte-compile-warn "non-symbol in arglist: %s" - (prin1-to-string (car rest)))) - ((memq (car rest) '(t nil)) - (byte-compile-warn "constant in arglist: %s" (car rest))) - ((and (char= ?\& (aref (symbol-name (car rest)) 0)) - (not (memq (car rest) '(&optional &rest)))) - (byte-compile-warn "unrecognised `&' keyword in arglist: %s" - (car rest)))) - (setq rest (cdr rest)))) - (cond (int - ;; Skip (interactive) if it is in front (the most usual location). - (if (eq int (car body)) - (setq body (cdr body))) - (cond ((consp (cdr int)) - (if (cdr (cdr int)) - (byte-compile-warn "malformed interactive spec: %s" - (prin1-to-string int))) - ;; If the interactive spec is a call to `list', - ;; don't compile it, because `call-interactively' - ;; looks at the args of `list'. - (let ((form (nth 1 int))) - (while (or (eq (car-safe form) 'let) - (eq (car-safe form) 'let*) - (eq (car-safe form) 'save-excursion)) - (while (consp (cdr form)) - (setq form (cdr form))) - (setq form (car form))) - (or (eq (car-safe form) 'list) - (setq int (list 'interactive - (byte-compile-top-level (nth 1 int))))))) - ((cdr int) - (byte-compile-warn "malformed interactive spec: %s" - (prin1-to-string int)))))) - (let ((compiled (byte-compile-top-level (cons 'progn body) nil 'lambda))) - (if (memq 'unused-vars byte-compile-warnings) - ;; done compiling in this scope, warn now. - (byte-compile-warn-about-unused-variables)) - (if (eq 'byte-code (car-safe compiled)) - (apply 'make-byte-code - (append (list arglist) - ;; byte-string, constants-vector, stack depth - (cdr compiled) - ;; optionally, the doc string. - (if (or doc int) - (list doc)) - ;; optionally, the interactive spec. - (if int - (list (nth 1 int))))) - (setq compiled - (nconc (if int (list int)) - (cond ((eq (car-safe compiled) 'progn) (cdr compiled)) - (compiled (list compiled))))) - (nconc (list 'lambda arglist) - (if (or doc (stringp (car compiled))) - (cons doc (cond (compiled) - (body (list nil)))) - compiled)))))) - -(defun byte-compile-constants-vector () - ;; Builds the constants-vector from the current variables and constants. - ;; This modifies the constants from (const . nil) to (const . offset). - ;; To keep the byte-codes to look up the vector as short as possible: - ;; First 6 elements are vars, as there are one-byte varref codes for those. - ;; Next up to byte-constant-limit are constants, still with one-byte codes. - ;; Next variables again, to get 2-byte codes for variable lookup. - ;; The rest of the constants and variables need 3-byte byte-codes. - (let* ((i -1) - (rest (nreverse byte-compile-variables)) ; nreverse because the first - (other (nreverse byte-compile-constants)) ; vars often are used most. - ret tmp - (limits '(5 ; Use the 1-byte varref codes, - 63 ; 1-constlim ; 1-byte byte-constant codes, - 255 ; 2-byte varref codes, - 65535)) ; 3-byte codes for the rest. - limit) - (while (or rest other) - (setq limit (car limits)) - (while (and rest (not (eq i limit))) - (if (setq tmp (assq (car (car rest)) ret)) - (setcdr (car rest) (cdr tmp)) - (setcdr (car rest) (setq i (1+ i))) - (setq ret (cons (car rest) ret))) - (setq rest (cdr rest))) - (setq limits (cdr limits) - rest (prog1 other - (setq other rest)))) - (apply 'vector (nreverse (mapcar 'car ret))))) - -;; Given an expression FORM, compile it and return an equivalent byte-code -;; expression (a call to the function byte-code). -(defun byte-compile-top-level (form &optional for-effect output-type) - ;; OUTPUT-TYPE advises about how form is expected to be used: - ;; 'eval or nil -> a single form, - ;; 'progn or t -> a list of forms, - ;; 'lambda -> body of a lambda, - ;; 'file -> used at file-level. - (let ((byte-compile-constants nil) - (byte-compile-variables nil) - (byte-compile-tag-number 0) - (byte-compile-depth 0) - (byte-compile-maxdepth 0) - (byte-compile-output nil)) - (if (memq byte-optimize '(t source)) - (setq form (byte-optimize-form form for-effect))) - (while (and (eq (car-safe form) 'progn) (null (cdr (cdr form)))) - (setq form (nth 1 form))) - (if (and (eq 'byte-code (car-safe form)) - (not (memq byte-optimize '(t byte))) - (stringp (nth 1 form)) - (vectorp (nth 2 form)) - (natnump (nth 3 form))) - form - (byte-compile-form form for-effect) - (byte-compile-out-toplevel for-effect output-type)))) - -(defun byte-compile-out-toplevel (&optional for-effect output-type) - (if for-effect - ;; The stack is empty. Push a value to be returned from (byte-code ..). - (if (eq (car (car byte-compile-output)) 'byte-discard) - (setq byte-compile-output (cdr byte-compile-output)) - (byte-compile-push-constant - ;; Push any constant - preferably one which already is used, and - ;; a number or symbol - ie not some big sequence. The return value - ;; isn't returned, but it would be a shame if some textually large - ;; constant was not optimized away because we chose to return it. - (and (not (assq nil byte-compile-constants)) ; Nil is often there. - (let ((tmp (reverse byte-compile-constants))) - (while (and tmp (not (or (symbolp (car (car tmp))) - (numberp (car (car tmp)))))) - (setq tmp (cdr tmp))) - (car (car tmp))))))) - (byte-compile-out 'byte-return 0) - (setq byte-compile-output (nreverse byte-compile-output)) - (if (memq byte-optimize '(t byte)) - (setq byte-compile-output - (byte-optimize-lapcode byte-compile-output for-effect))) - - ;; Decompile trivial functions: - ;; only constants and variables, or a single funcall except in lambdas. - ;; Except for Lisp_Compiled objects, forms like (foo "hi") - ;; are still quicker than (byte-code "..." [foo "hi"] 2). - ;; Note that even (quote foo) must be parsed just as any subr by the - ;; interpreter, so quote should be compiled into byte-code in some contexts. - ;; What to leave uncompiled: - ;; lambda -> never. we used to leave it uncompiled if the body was - ;; a single atom, but that causes confusion if the docstring - ;; uses the (file . pos) syntax. Besides, now that we have - ;; the Lisp_Compiled type, the compiled form is faster. - ;; eval -> atom, quote or (function atom atom atom) - ;; progn -> as <> or (progn <> atom) - ;; file -> as progn, but takes both quotes and atoms, and longer forms. - (let (rest - (maycall (not (eq output-type 'lambda))) ; t if we may make a funcall. - tmp body) - (cond - ;; #### This should be split out into byte-compile-nontrivial-function-p. - ((or (eq output-type 'lambda) - (nthcdr (if (eq output-type 'file) 50 8) byte-compile-output) - (assq 'TAG byte-compile-output) ; Not necessary, but speeds up a bit. - (not (setq tmp (assq 'byte-return byte-compile-output))) - (progn - (setq rest (nreverse - (cdr (memq tmp (reverse byte-compile-output))))) - (while (cond - ((memq (car (car rest)) '(byte-varref byte-constant)) - (setq tmp (car (cdr (car rest)))) - (if (if (eq (car (car rest)) 'byte-constant) - (or (consp tmp) - (and (symbolp tmp) - (not (keywordp tmp)) - (not (memq tmp '(nil t)))))) - (if maycall - (setq body (cons (list 'quote tmp) body))) - (setq body (cons tmp body)))) - ((and maycall - ;; Allow a funcall if at most one atom follows it. - (null (nthcdr 3 rest)) - (setq tmp - ;; XEmacs change for rms funs - (or (and - (byte-compile-version-cond - byte-compile-emacs19-compatibility) - (get (car (car rest)) - 'byte-opcode19-invert)) - (get (car (car rest)) - 'byte-opcode-invert))) - (or (null (cdr rest)) - (and (memq output-type '(file progn t)) - (cdr (cdr rest)) - (eq (car (nth 1 rest)) 'byte-discard) - (progn (setq rest (cdr rest)) t)))) - (setq maycall nil) ; Only allow one real function call. - (setq body (nreverse body)) - (setq body (list - (if (and (eq tmp 'funcall) - (eq (car-safe (car body)) 'quote)) - (cons (nth 1 (car body)) (cdr body)) - (cons tmp body)))) - (or (eq output-type 'file) - (not (delq nil (mapcar 'consp (cdr (car body)))))))) - (setq rest (cdr rest))) - rest)) - (let ((byte-compile-vector (byte-compile-constants-vector))) - (list 'byte-code (byte-compile-lapcode byte-compile-output) - byte-compile-vector byte-compile-maxdepth))) - ;; it's a trivial function - ((cdr body) (cons 'progn (nreverse body))) - ((car body))))) - -;; Given BODY, compile it and return a new body. -(defun byte-compile-top-level-body (body &optional for-effect) - (setq body (byte-compile-top-level (cons 'progn body) for-effect t)) - (cond ((eq (car-safe body) 'progn) - (cdr body)) - (body - (list body)))) - -;; This is the recursive entry point for compiling each subform of an -;; expression. -;; If for-effect is non-nil, byte-compile-form will output a byte-discard -;; before terminating (ie no value will be left on the stack). -;; A byte-compile handler may, when for-effect is non-nil, choose output code -;; which does not leave a value on the stack, and then set for-effect to nil -;; (to prevent byte-compile-form from outputting the byte-discard). -;; If a handler wants to call another handler, it should do so via -;; byte-compile-form, or take extreme care to handle for-effect correctly. -;; (Use byte-compile-form-do-effect to reset the for-effect flag too.) -;; -(defun byte-compile-form (form &optional for-effect) - (setq form (macroexpand form byte-compile-macro-environment)) - (cond ((not (consp form)) - ;; XEmacs addition: keywordp - (cond ((or (not (symbolp form)) (keywordp form) (memq form '(nil t))) - (byte-compile-constant form)) - ((and for-effect byte-compile-delete-errors) - (setq for-effect nil)) - (t (byte-compile-variable-ref 'byte-varref form)))) - ((symbolp (car form)) - (let* ((fn (car form)) - (handler (get fn 'byte-compile))) - (if (memq fn '(t nil)) - (byte-compile-warn "%s called as a function" fn)) - (if (and handler - (or (not (byte-compile-version-cond - byte-compile-emacs19-compatibility)) - (not (get (get fn 'byte-opcode) 'emacs20-opcode)))) - (funcall handler form) - (if (memq 'callargs byte-compile-warnings) - (byte-compile-callargs-warn form)) - (byte-compile-normal-call form)))) - ((and (or (compiled-function-p (car form)) - (eq (car-safe (car form)) 'lambda)) - ;; if the form comes out the same way it went in, that's - ;; because it was malformed, and we couldn't unfold it. - (not (eq form (setq form (byte-compile-unfold-lambda form))))) - (byte-compile-form form for-effect) - (setq for-effect nil)) - ((byte-compile-normal-call form))) - (if for-effect - (byte-compile-discard))) - -(defun byte-compile-normal-call (form) - (if byte-compile-generate-call-tree - (byte-compile-annotate-call-tree form)) - (byte-compile-push-constant (car form)) - (mapcar 'byte-compile-form (cdr form)) ; wasteful, but faster. - (byte-compile-out 'byte-call (length (cdr form)))) - -;; kludge added to XEmacs to work around the bogosities of a nonlexical lisp. -(or (fboundp 'globally-boundp) (fset 'globally-boundp 'boundp)) - -(defun byte-compile-variable-ref (base-op var &optional varbind-flags) - (if (or (not (symbolp var)) (keywordp var) (memq var '(nil t))) - (byte-compile-warn (if (eq base-op 'byte-varbind) - "Attempt to let-bind %s %s" - "Variable reference to %s %s") - (if (symbolp var) "constant" "nonvariable") - (prin1-to-string var)) - (if (and (get var 'byte-obsolete-variable) - (memq 'obsolete byte-compile-warnings)) - (let ((ob (get var 'byte-obsolete-variable))) - (byte-compile-warn "%s is an obsolete variable; %s" var - (if (stringp ob) - ob - (format "use %s instead." ob))))) - (if (and (get var 'byte-compatible-variable) - (memq 'pedantic byte-compile-warnings)) - (let ((ob (get var 'byte-compatible-variable))) - (byte-compile-warn "%s is provided for compatibility; %s" var - (if (stringp ob) - ob - (format "use %s instead." ob))))) - (if (memq 'free-vars byte-compile-warnings) - (if (eq base-op 'byte-varbind) - (setq byte-compile-bound-variables - (cons (cons var (or varbind-flags 0)) - byte-compile-bound-variables)) - (or (globally-boundp var) - (let ((cell (assq var byte-compile-bound-variables))) - (if cell (setcdr cell - (logior (cdr cell) - (if (eq base-op 'byte-varset) - byte-compile-assigned-bit - byte-compile-referenced-bit))))) - (if (eq base-op 'byte-varset) - (or (memq var byte-compile-free-assignments) - (progn - (byte-compile-warn "assignment to free variable %s" - var) - (setq byte-compile-free-assignments - (cons var byte-compile-free-assignments)))) - (or (memq var byte-compile-free-references) - (progn - (byte-compile-warn "reference to free variable %s" var) - (setq byte-compile-free-references - (cons var byte-compile-free-references))))))))) - (let ((tmp (assq var byte-compile-variables))) - (or tmp - (setq tmp (list var) - byte-compile-variables (cons tmp byte-compile-variables))) - (byte-compile-out base-op tmp))) - -(defmacro byte-compile-get-constant (const) - (` (or (if (stringp (, const)) - (assoc (, const) byte-compile-constants) - (assq (, const) byte-compile-constants)) - (car (setq byte-compile-constants - (cons (list (, const)) byte-compile-constants)))))) - -;; Use this when the value of a form is a constant. This obeys for-effect. -(defun byte-compile-constant (const) - (if for-effect - (setq for-effect nil) - (byte-compile-out 'byte-constant (byte-compile-get-constant const)))) - -;; Use this for a constant that is not the value of its containing form. -;; This ignores for-effect. -(defun byte-compile-push-constant (const) - (let ((for-effect nil)) - (inline (byte-compile-constant const)))) - - -;; Compile those primitive ordinary functions -;; which have special byte codes just for speed. - -(defmacro byte-defop-compiler (function &optional compile-handler) - ;; add a compiler-form for FUNCTION. - ;; If function is a symbol, then the variable "byte-SYMBOL" must name - ;; the opcode to be used. If function is a list, the first element - ;; is the function and the second element is the bytecode-symbol. - ;; COMPILE-HANDLER is the function to use to compile this byte-op, or - ;; may be the abbreviations 0, 1, 2, 3, 0-1, 1-2, 2-3, 0+1, 1+1, 2+1, - ;; 0-1+1, 1-2+1, 2-3+1, 0+2, or 1+2. If it is nil, then the handler is - ;; "byte-compile-SYMBOL." - (let (opcode) - (if (symbolp function) - (setq opcode (intern (concat "byte-" (symbol-name function)))) - (setq opcode (car (cdr function)) - function (car function))) - (let ((fnform - (list 'put (list 'quote function) ''byte-compile - (list 'quote - (or (cdr (assq compile-handler - '((0 . byte-compile-no-args) - (1 . byte-compile-one-arg) - (2 . byte-compile-two-args) - (3 . byte-compile-three-args) - (0-1 . byte-compile-zero-or-one-arg) - (1-2 . byte-compile-one-or-two-args) - (2-3 . byte-compile-two-or-three-args) - (0+1 . byte-compile-no-args-with-one-extra) - (1+1 . byte-compile-one-arg-with-one-extra) - (2+1 . byte-compile-two-args-with-one-extra) - (0-1+1 . byte-compile-zero-or-one-arg-with-one-extra) - (1-2+1 . byte-compile-one-or-two-args-with-one-extra) - (2-3+1 . byte-compile-two-or-three-args-with-one-extra) - (0+2 . byte-compile-no-args-with-two-extra) - (1+2 . byte-compile-one-arg-with-two-extra) - - ))) - compile-handler - (intern (concat "byte-compile-" - (symbol-name function)))))))) - (if opcode - (list 'progn fnform - (list 'put (list 'quote function) - ''byte-opcode (list 'quote opcode)) - (list 'put (list 'quote opcode) - ''byte-opcode-invert (list 'quote function))) - fnform)))) - -(defmacro byte-defop-compiler20 (function &optional compile-handler) - ;; Just like byte-defop-compiler, but defines an opcode that will only - ;; be used when byte-compile-emacs19-compatibility is false. - (if (and (byte-compile-single-version) - byte-compile-emacs19-compatibility) - ;; #### instead of doing nothing, this should do some remprops, - ;; #### to protect against the case where a single-version compiler - ;; #### is loaded into a world that has contained a multi-version one. - nil - (list 'progn - (list 'put - (list 'quote - (or (car (cdr-safe function)) - (intern (concat "byte-" - (symbol-name (or (car-safe function) function)))))) - ''emacs20-opcode t) - (list 'byte-defop-compiler function compile-handler)))) - -;; XEmacs addition: -(defmacro byte-defop-compiler-rmsfun (function &optional compile-handler) - ;; for functions like `eq' that compile into different opcodes depending - ;; on the Emacs version: byte-old-eq for v19, byte-eq for v20. - (let ((opcode (intern (concat "byte-" (symbol-name function)))) - (opcode19 (intern (concat "byte-old-" (symbol-name function)))) - (fnform - (list 'put (list 'quote function) ''byte-compile - (list 'quote - (or (cdr (assq compile-handler - '((2 . byte-compile-two-args-19->20) - ))) - compile-handler - (intern (concat "byte-compile-" - (symbol-name function)))))))) - (list 'progn fnform - (list 'put (list 'quote function) - ''byte-opcode (list 'quote opcode)) - (list 'put (list 'quote function) - ''byte-opcode19 (list 'quote opcode19)) - (list 'put (list 'quote opcode) - ''byte-opcode-invert (list 'quote function)) - (list 'put (list 'quote opcode19) - ''byte-opcode19-invert (list 'quote function))))) - -(defmacro byte-defop-compiler-1 (function &optional compile-handler) - (list 'byte-defop-compiler (list function nil) compile-handler)) - - -(put 'byte-call 'byte-opcode-invert 'funcall) -(put 'byte-list1 'byte-opcode-invert 'list) -(put 'byte-list2 'byte-opcode-invert 'list) -(put 'byte-list3 'byte-opcode-invert 'list) -(put 'byte-list4 'byte-opcode-invert 'list) -(put 'byte-listN 'byte-opcode-invert 'list) -(put 'byte-concat2 'byte-opcode-invert 'concat) -(put 'byte-concat3 'byte-opcode-invert 'concat) -(put 'byte-concat4 'byte-opcode-invert 'concat) -(put 'byte-concatN 'byte-opcode-invert 'concat) -(put 'byte-insertN 'byte-opcode-invert 'insert) - -;; How old is this stuff? -slb -;(byte-defop-compiler (dot byte-point) 0+1) -;(byte-defop-compiler (dot-max byte-point-max) 0+1) -;(byte-defop-compiler (dot-min byte-point-min) 0+1) -(byte-defop-compiler point 0+1) -(byte-defop-compiler-rmsfun eq 2) -(byte-defop-compiler point-max 0+1) -(byte-defop-compiler point-min 0+1) -(byte-defop-compiler following-char 0+1) -(byte-defop-compiler preceding-char 0+1) -(byte-defop-compiler current-column 0+1) -;; FSF has special function here; generalized here by the 1+2 stuff. -(byte-defop-compiler (indent-to-column byte-indent-to) 1+2) -(byte-defop-compiler indent-to 1+2) -(byte-defop-compiler-rmsfun equal 2) -(byte-defop-compiler eolp 0+1) -(byte-defop-compiler eobp 0+1) -(byte-defop-compiler bolp 0+1) -(byte-defop-compiler bobp 0+1) -(byte-defop-compiler current-buffer 0) -;;(byte-defop-compiler read-char 0) ;; obsolete -(byte-defop-compiler-rmsfun memq 2) -(byte-defop-compiler interactive-p 0) -(byte-defop-compiler widen 0+1) -(byte-defop-compiler end-of-line 0-1+1) -(byte-defop-compiler forward-char 0-1+1) -(byte-defop-compiler forward-line 0-1+1) -(byte-defop-compiler symbolp 1) -(byte-defop-compiler consp 1) -(byte-defop-compiler stringp 1) -(byte-defop-compiler listp 1) -(byte-defop-compiler not 1) -(byte-defop-compiler (null byte-not) 1) -(byte-defop-compiler car 1) -(byte-defop-compiler cdr 1) -(byte-defop-compiler length 1) -(byte-defop-compiler symbol-value 1) -(byte-defop-compiler symbol-function 1) -(byte-defop-compiler (1+ byte-add1) 1) -(byte-defop-compiler (1- byte-sub1) 1) -(byte-defop-compiler goto-char 1+1) -(byte-defop-compiler char-after 0-1+1) -(byte-defop-compiler set-buffer 1) -;;(byte-defop-compiler set-mark 1) ;; obsolete -(byte-defop-compiler forward-word 1+1) -(byte-defop-compiler char-syntax 1+1) -(byte-defop-compiler nreverse 1) -(byte-defop-compiler car-safe 1) -(byte-defop-compiler cdr-safe 1) -(byte-defop-compiler numberp 1) -(byte-defop-compiler integerp 1) -(byte-defop-compiler skip-chars-forward 1-2+1) -(byte-defop-compiler skip-chars-backward 1-2+1) -(byte-defop-compiler (eql byte-eq) 2) -(byte-defop-compiler20 old-eq 2) -(byte-defop-compiler20 old-memq 2) -(byte-defop-compiler cons 2) -(byte-defop-compiler aref 2) -(byte-defop-compiler (= byte-eqlsign) byte-compile-one-or-more-args) -(byte-defop-compiler (< byte-lss) byte-compile-one-or-more-args) -(byte-defop-compiler (> byte-gtr) byte-compile-one-or-more-args) -(byte-defop-compiler (<= byte-leq) byte-compile-one-or-more-args) -(byte-defop-compiler (>= byte-geq) byte-compile-one-or-more-args) -(byte-defop-compiler /= byte-compile-/=) -(byte-defop-compiler get 2+1) -(byte-defop-compiler nth 2) -(byte-defop-compiler substring 2-3) -(byte-defop-compiler (move-marker byte-set-marker) 2-3) -(byte-defop-compiler set-marker 2-3) -(byte-defop-compiler match-beginning 1) -(byte-defop-compiler match-end 1) -(byte-defop-compiler upcase 1+1) -(byte-defop-compiler downcase 1+1) -(byte-defop-compiler string= 2) -(byte-defop-compiler string< 2) -(byte-defop-compiler (string-equal byte-string=) 2) -(byte-defop-compiler (string-lessp byte-string<) 2) -(byte-defop-compiler20 old-equal 2) -(byte-defop-compiler nthcdr 2) -(byte-defop-compiler elt 2) -(byte-defop-compiler20 old-member 2) -(byte-defop-compiler20 old-assq 2) -(byte-defop-compiler (rplaca byte-setcar) 2) -(byte-defop-compiler (rplacd byte-setcdr) 2) -(byte-defop-compiler setcar 2) -(byte-defop-compiler setcdr 2) -;; buffer-substring now has its own function. This used to be -;; 2+1, but now all args are optional. -(byte-defop-compiler buffer-substring) -(byte-defop-compiler delete-region 2+1) -(byte-defop-compiler narrow-to-region 2+1) -(byte-defop-compiler (% byte-rem) 2) -(byte-defop-compiler aset 3) - -(byte-defop-compiler-rmsfun member 2) -(byte-defop-compiler-rmsfun assq 2) - -(byte-defop-compiler max byte-compile-associative) -(byte-defop-compiler min byte-compile-associative) -(byte-defop-compiler (+ byte-plus) byte-compile-associative) -(byte-defop-compiler (* byte-mult) byte-compile-associative) - -;;####(byte-defop-compiler move-to-column 1) -(byte-defop-compiler-1 interactive byte-compile-noop) -(byte-defop-compiler-1 domain byte-compile-domain) - -;; As of GNU Emacs 19.18 and Lucid Emacs 19.8, mod and % are different: `%' -;; means integral remainder and may have a negative result; `mod' is always -;; positive, and accepts floating point args. All code which uses `mod' and -;; requires the new interpretation must be compiled with bytecomp version 2.18 -;; or newer, or the emitted code will run the byte-code for `%' instead of an -;; actual call to `mod'. So be careful of compiling new code with an old -;; compiler. Note also that `%' is more efficient than `mod' because the -;; former is byte-coded and the latter is not. -;;(byte-defop-compiler (mod byte-rem) 2) - - -(defun byte-compile-subr-wrong-args (form n) - (byte-compile-warn "%s called with %d arg%s, but requires %s" - (car form) (length (cdr form)) - (if (= 1 (length (cdr form))) "" "s") n) - ;; get run-time wrong-number-of-args error. - (byte-compile-normal-call form)) - -(defun byte-compile-no-args (form) - (if (not (= (length form) 1)) - (byte-compile-subr-wrong-args form "none") - (byte-compile-out (get (car form) 'byte-opcode) 0))) - -(defun byte-compile-one-arg (form) - (if (not (= (length form) 2)) - (byte-compile-subr-wrong-args form 1) - (byte-compile-form (car (cdr form))) ;; Push the argument - (byte-compile-out (get (car form) 'byte-opcode) 0))) - -(defun byte-compile-two-args (form) - (if (not (= (length form) 3)) - (byte-compile-subr-wrong-args form 2) - (byte-compile-form (car (cdr form))) ;; Push the arguments - (byte-compile-form (nth 2 form)) - (byte-compile-out (get (car form) 'byte-opcode) 0))) - -(defun byte-compile-three-args (form) - (if (not (= (length form) 4)) - (byte-compile-subr-wrong-args form 3) - (byte-compile-form (car (cdr form))) ;; Push the arguments - (byte-compile-form (nth 2 form)) - (byte-compile-form (nth 3 form)) - (byte-compile-out (get (car form) 'byte-opcode) 0))) - -(defun byte-compile-zero-or-one-arg (form) - (let ((len (length form))) - (cond ((= len 1) (byte-compile-one-arg (append form '(nil)))) - ((= len 2) (byte-compile-one-arg form)) - (t (byte-compile-subr-wrong-args form "0-1"))))) - -(defun byte-compile-one-or-two-args (form) - (let ((len (length form))) - (cond ((= len 2) (byte-compile-two-args (append form '(nil)))) - ((= len 3) (byte-compile-two-args form)) - (t (byte-compile-subr-wrong-args form "1-2"))))) - -(defun byte-compile-two-or-three-args (form) - (let ((len (length form))) - (cond ((= len 3) (byte-compile-three-args (append form '(nil)))) - ((= len 4) (byte-compile-three-args form)) - (t (byte-compile-subr-wrong-args form "2-3"))))) - -;; from Ben Wing : some inlined functions have extra -;; optional args added to them in XEmacs 19.12. Changing the byte -;; interpreter to deal with these args would be wrong and cause -;; incompatibility, so we generate non-inlined calls for those cases. -;; Without the following functions, spurious warnings will be generated; -;; however, they would still compile correctly because -;; `byte-compile-subr-wrong-args' also converts the call to non-inlined. - -(defun byte-compile-no-args-with-one-extra (form) - (let ((len (length form))) - (cond ((= len 1) (byte-compile-no-args form)) - ((= len 2) (byte-compile-normal-call form)) - (t (byte-compile-subr-wrong-args form "0-1"))))) - -(defun byte-compile-one-arg-with-one-extra (form) - (let ((len (length form))) - (cond ((= len 2) (byte-compile-one-arg form)) - ((= len 3) (byte-compile-normal-call form)) - (t (byte-compile-subr-wrong-args form "1-2"))))) - -(defun byte-compile-two-args-with-one-extra (form) - (let ((len (length form))) - (cond ((= len 3) (byte-compile-two-args form)) - ((= len 4) (byte-compile-normal-call form)) - (t (byte-compile-subr-wrong-args form "2-3"))))) - -(defun byte-compile-zero-or-one-arg-with-one-extra (form) - (let ((len (length form))) - (cond ((= len 1) (byte-compile-one-arg (append form '(nil)))) - ((= len 2) (byte-compile-one-arg form)) - ((= len 3) (byte-compile-normal-call form)) - (t (byte-compile-subr-wrong-args form "0-2"))))) - -(defun byte-compile-one-or-two-args-with-one-extra (form) - (let ((len (length form))) - (cond ((= len 2) (byte-compile-two-args (append form '(nil)))) - ((= len 3) (byte-compile-two-args form)) - ((= len 4) (byte-compile-normal-call form)) - (t (byte-compile-subr-wrong-args form "1-3"))))) - -(defun byte-compile-two-or-three-args-with-one-extra (form) - (let ((len (length form))) - (cond ((= len 3) (byte-compile-three-args (append form '(nil)))) - ((= len 4) (byte-compile-three-args form)) - ((= len 5) (byte-compile-normal-call form)) - (t (byte-compile-subr-wrong-args form "2-4"))))) - -(defun byte-compile-no-args-with-two-extra (form) - (let ((len (length form))) - (cond ((= len 1) (byte-compile-no-args form)) - ((or (= len 2) (= len 3)) (byte-compile-normal-call form)) - (t (byte-compile-subr-wrong-args form "0-2"))))) - -(defun byte-compile-one-arg-with-two-extra (form) - (let ((len (length form))) - (cond ((= len 2) (byte-compile-one-arg form)) - ((or (= len 3) (= len 4)) (byte-compile-normal-call form)) - (t (byte-compile-subr-wrong-args form "1-3"))))) - -;; XEmacs: used for functions that have a different opcode in v19 than v20. -;; this includes `eq', `equal', and other old-ified functions. -(defun byte-compile-two-args-19->20 (form) - (if (not (= (length form) 3)) - (byte-compile-subr-wrong-args form 2) - (byte-compile-form (car (cdr form))) ;; Push the arguments - (byte-compile-form (nth 2 form)) - (if (byte-compile-version-cond byte-compile-emacs19-compatibility) - (byte-compile-out (get (car form) 'byte-opcode19) 0) - (byte-compile-out (get (car form) 'byte-opcode) 0)))) - -(defun byte-compile-noop (form) - (byte-compile-constant nil)) - -(defun byte-compile-discard () - (byte-compile-out 'byte-discard 0)) - - -;; Compile a function that accepts one or more args and is right-associative. -;; We do it by left-associativity so that the operations -;; are done in the same order as in interpreted code. -(defun byte-compile-associative (form) - (if (cdr form) - (let ((opcode (get (car form) 'byte-opcode)) - (args (copy-sequence (cdr form)))) - (byte-compile-form (car args)) - (setq args (cdr args)) - (while args - (byte-compile-form (car args)) - (byte-compile-out opcode 0) - (setq args (cdr args)))) - (byte-compile-constant (eval form)))) - - -;; more complicated compiler macros - -(byte-defop-compiler list) -(byte-defop-compiler concat) -(byte-defop-compiler fset) -(byte-defop-compiler insert) -(byte-defop-compiler-1 function byte-compile-function-form) -(byte-defop-compiler-1 - byte-compile-minus) -(byte-defop-compiler (/ byte-quo) byte-compile-quo) -(byte-defop-compiler nconc) -(byte-defop-compiler-1 beginning-of-line) - -(defun byte-compile-one-or-more-args (form) - (let ((len (length form))) - (cond ((= len 1) (byte-compile-subr-wrong-args form "1 or more")) - ((= len 2) (byte-compile-constant t)) - ((= len 3) (byte-compile-two-args form)) - (t (byte-compile-normal-call form))))) - -(defun byte-compile-/= (form) - (let ((len (length form))) - (cond ((= len 1) (byte-compile-subr-wrong-args form "1 or more")) - ((= len 2) (byte-compile-constant t)) - ;; optimize (/= X Y) to (not (= X Y)) - ((= len 3) (byte-compile-form-do-effect `(not (= ,@(cdr form))))) - (t (byte-compile-normal-call form))))) - -(defun byte-compile-buffer-substring (form) - (let ((len (length form))) - ;; buffer-substring used to take exactly two args, but now takes 0-3. - ;; convert 0-2 to two args and use special bytecode operand. - ;; convert 3 args to a normal call. - (cond ((= len 1) (setq form (append form '(nil nil))) - (= len 2) (setq form (append form '(nil))))) - (cond ((= len 3) (byte-compile-two-args form)) - ((= len 4) (byte-compile-normal-call form)) - (t (byte-compile-subr-wrong-args form "0-3"))))) - -(defun byte-compile-list (form) - (let ((count (length (cdr form)))) - (cond ((= count 0) - (byte-compile-constant nil)) - ((< count 5) - (mapcar 'byte-compile-form (cdr form)) - (byte-compile-out - (aref [byte-list1 byte-list2 byte-list3 byte-list4] (1- count)) 0)) - ((< count 256) - (mapcar 'byte-compile-form (cdr form)) - (byte-compile-out 'byte-listN count)) - (t (byte-compile-normal-call form))))) - -(defun byte-compile-concat (form) - (let ((count (length (cdr form)))) - (cond ((and (< 1 count) (< count 5)) - (mapcar 'byte-compile-form (cdr form)) - (byte-compile-out - (aref [byte-concat2 byte-concat3 byte-concat4] (- count 2)) - 0)) - ;; Concat of one arg is not a no-op if arg is not a string. - ((= count 0) - (byte-compile-form "")) - ((< count 256) - (mapcar 'byte-compile-form (cdr form)) - (byte-compile-out 'byte-concatN count)) - ((byte-compile-normal-call form))))) - -(defun byte-compile-minus (form) - (if (null (setq form (cdr form))) - (byte-compile-constant 0) - (byte-compile-form (car form)) - (if (cdr form) - (while (setq form (cdr form)) - (byte-compile-form (car form)) - (byte-compile-out 'byte-diff 0)) - (byte-compile-out 'byte-negate 0)))) - -(defun byte-compile-quo (form) - (let ((len (length form))) - (cond ((<= len 2) - (byte-compile-subr-wrong-args form "2 or more")) - (t - (byte-compile-form (car (setq form (cdr form)))) - (while (setq form (cdr form)) - (byte-compile-form (car form)) - (byte-compile-out 'byte-quo 0)))))) - -(defun byte-compile-nconc (form) - (let ((len (length form))) - (cond ((= len 1) - (byte-compile-constant nil)) - ((= len 2) - ;; nconc of one arg is a noop, even if that arg isn't a list. - (byte-compile-form (nth 1 form))) - (t - (byte-compile-form (car (setq form (cdr form)))) - (while (setq form (cdr form)) - (byte-compile-form (car form)) - (byte-compile-out 'byte-nconc 0)))))) - -(defun byte-compile-fset (form) - ;; warn about forms like (fset 'foo '(lambda () ...)) - ;; (where the lambda expression is non-trivial...) - ;; Except don't warn if the first argument is 'make-byte-code, because - ;; I'm sick of getting mail asking me whether that warning is a problem. - (let ((fn (nth 2 form)) - body) - (if (and (eq (car-safe fn) 'quote) - (eq (car-safe (setq fn (nth 1 fn))) 'lambda) - (not (eq (car-safe (cdr-safe (nth 1 form))) 'make-byte-code))) - (progn - (setq body (cdr (cdr fn))) - (if (stringp (car body)) (setq body (cdr body))) - (if (eq 'interactive (car-safe (car body))) (setq body (cdr body))) - (if (and (consp (car body)) - (not (eq 'byte-code (car (car body))))) - (byte-compile-warn - "A quoted lambda form is the second argument of fset. This is probably - not what you want, as that lambda cannot be compiled. Consider using - the syntax (function (lambda (...) ...)) instead."))))) - (byte-compile-two-args form)) - -(defun byte-compile-funarg (form) - ;; (mapcar '(lambda (x) ..) ..) ==> (mapcar (function (lambda (x) ..)) ..) - ;; for cases where it's guaranteed that first arg will be used as a lambda. - (byte-compile-normal-call - (let ((fn (nth 1 form))) - (if (and (eq (car-safe fn) 'quote) - (eq (car-safe (nth 1 fn)) 'lambda)) - (cons (car form) - (cons (cons 'function (cdr fn)) - (cdr (cdr form)))) - form)))) - -;; (function foo) must compile like 'foo, not like (symbol-function 'foo). -;; Otherwise it will be incompatible with the interpreter, -;; and (funcall (function foo)) will lose with autoloads. - -(defun byte-compile-function-form (form) - (byte-compile-constant - (cond ((symbolp (nth 1 form)) - (nth 1 form)) - ((byte-compile-lambda (nth 1 form)))))) - -(defun byte-compile-insert (form) - (cond ((null (cdr form)) - (byte-compile-constant nil)) - ((<= (length form) 256) - (mapcar 'byte-compile-form (cdr form)) - (if (cdr (cdr form)) - (byte-compile-out 'byte-insertN (length (cdr form))) - (byte-compile-out 'byte-insert 0))) - ((memq t (mapcar 'consp (cdr (cdr form)))) - (byte-compile-normal-call form)) - ;; We can split it; there is no function call after inserting 1st arg. - (t - (while (setq form (cdr form)) - (byte-compile-form (car form)) - (byte-compile-out 'byte-insert 0) - (if (cdr form) - (byte-compile-discard)))))) - -;; alas, the old (pre-19.12, and all existing versions of FSFmacs 19) -;; byte compiler will generate incorrect code for -;; (beginning-of-line nil buffer) because it buggily doesn't -;; check the number of arguments passed to beginning-of-line. - -(defun byte-compile-beginning-of-line (form) - (let ((len (length form))) - (cond ((> len 3) - (byte-compile-subr-wrong-args form "0-2")) - ((or (= len 3) (not (byte-compile-constp (nth 1 form)))) - (byte-compile-normal-call form)) - (t - (byte-compile-form - (list 'forward-line - (if (integerp (setq form (or (eval (nth 1 form)) 1))) - (1- form) - (byte-compile-warn - "Non-numeric arg to beginning-of-line: %s" form) - (list '1- (list 'quote form)))) - t) - (byte-compile-constant nil))))) - - -(byte-defop-compiler set) -(byte-defop-compiler-1 setq) -(byte-defop-compiler-1 set-default) -(byte-defop-compiler-1 setq-default) - -(byte-defop-compiler-1 quote) -(byte-defop-compiler-1 quote-form) - -(defun byte-compile-setq (form) - (let ((args (cdr form))) - (if args - (while args - (byte-compile-form (car (cdr args))) - (or for-effect (cdr (cdr args)) - (byte-compile-out 'byte-dup 0)) - (byte-compile-variable-ref 'byte-varset (car args)) - (setq args (cdr (cdr args)))) - ;; (setq), with no arguments. - (byte-compile-form nil for-effect)) - (setq for-effect nil))) - -(defun byte-compile-set (form) - ;; Compile (set 'foo x) as (setq foo x) for trivially better code and so - ;; that we get applicable warnings. Compile everything else (including - ;; malformed calls) like a normal 2-arg byte-coded function. - (if (or (not (eq (car-safe (nth 1 form)) 'quote)) - (not (= (length form) 3)) - (not (= (length (nth 1 form)) 2))) - (byte-compile-two-args form) - (byte-compile-setq (list 'setq (nth 1 (nth 1 form)) (nth 2 form))))) - -(defun byte-compile-setq-default (form) - (let ((rest (cdr form))) - ;; emit multiple calls to set-default if necessary - (while rest - (byte-compile-form - (list 'set-default (list 'quote (car rest)) (car (cdr rest))) - (not (null (cdr (cdr rest))))) - (setq rest (cdr (cdr rest)))))) - -(defun byte-compile-set-default (form) - (let ((rest (cdr form))) - (if (cdr (cdr (cdr form))) - ;; emit multiple calls to set-default if necessary; all but last - ;; for-effect (this recurses.) - (while rest - (byte-compile-form - (list 'set-default (car rest) (car (cdr rest))) - (not (null (cdr rest)))) - (setq rest (cdr (cdr rest)))) - ;; else, this is the one-armed version - (let ((var (nth 1 form)) - ;;(val (nth 2 form)) - ) - ;; notice calls to set-default/setq-default for variables which - ;; have not been declared with defvar/defconst. - (if (and (memq 'free-vars byte-compile-warnings) - (or (null var) - (and (eq (car-safe var) 'quote) - (= 2 (length var))))) - (let ((sym (nth 1 var)) - cell) - (or (and sym (symbolp sym) (globally-boundp sym)) - (and (setq cell (assq sym byte-compile-bound-variables)) - (setcdr cell (logior (cdr cell) - byte-compile-assigned-bit))) - (memq sym byte-compile-free-assignments) - (if (or (not (symbolp sym)) (memq sym '(t nil))) - (progn - (byte-compile-warn - "Attempt to set-globally %s %s" - (if (symbolp sym) "constant" "nonvariable") - (prin1-to-string sym))) - (progn - (byte-compile-warn "assignment to free variable %s" sym) - (setq byte-compile-free-assignments - (cons sym byte-compile-free-assignments))))))) - ;; now emit a normal call to set-default (or possibly multiple calls) - (byte-compile-normal-call form))))) - - -(defun byte-compile-quote (form) - (byte-compile-constant (car (cdr form)))) - -(defun byte-compile-quote-form (form) - (byte-compile-constant (byte-compile-top-level (nth 1 form)))) - - -;;; control structures - -(defun byte-compile-body (body &optional for-effect) - (while (cdr body) - (byte-compile-form (car body) t) - (setq body (cdr body))) - (byte-compile-form (car body) for-effect)) - -(proclaim-inline byte-compile-body-do-effect) -(defun byte-compile-body-do-effect (body) - (byte-compile-body body for-effect) - (setq for-effect nil)) - -(proclaim-inline byte-compile-form-do-effect) -(defun byte-compile-form-do-effect (form) - (byte-compile-form form for-effect) - (setq for-effect nil)) - -(byte-defop-compiler-1 inline byte-compile-progn) -(byte-defop-compiler-1 progn) -(byte-defop-compiler-1 prog1) -(byte-defop-compiler-1 prog2) -(byte-defop-compiler-1 if) -(byte-defop-compiler-1 cond) -(byte-defop-compiler-1 and) -(byte-defop-compiler-1 or) -(byte-defop-compiler-1 while) -(byte-defop-compiler-1 funcall) -(byte-defop-compiler-1 apply byte-compile-funarg) -(byte-defop-compiler-1 mapcar byte-compile-funarg) -(byte-defop-compiler-1 mapatoms byte-compile-funarg) -(byte-defop-compiler-1 mapconcat byte-compile-funarg) -(byte-defop-compiler-1 let) -(byte-defop-compiler-1 let*) - -(defun byte-compile-progn (form) - (byte-compile-body-do-effect (cdr form))) - -(defun byte-compile-prog1 (form) - (byte-compile-form-do-effect (car (cdr form))) - (byte-compile-body (cdr (cdr form)) t)) - -(defun byte-compile-prog2 (form) - (byte-compile-form (nth 1 form) t) - (byte-compile-form-do-effect (nth 2 form)) - (byte-compile-body (cdr (cdr (cdr form))) t)) - -(defmacro byte-compile-goto-if (cond discard tag) - (` (byte-compile-goto - (if (, cond) - (if (, discard) 'byte-goto-if-not-nil 'byte-goto-if-not-nil-else-pop) - (if (, discard) 'byte-goto-if-nil 'byte-goto-if-nil-else-pop)) - (, tag)))) - -(defun byte-compile-if (form) - (byte-compile-form (car (cdr form))) - (if (null (nthcdr 3 form)) - ;; No else-forms - (let ((donetag (byte-compile-make-tag))) - (byte-compile-goto-if nil for-effect donetag) - (byte-compile-form (nth 2 form) for-effect) - (byte-compile-out-tag donetag)) - (let ((donetag (byte-compile-make-tag)) (elsetag (byte-compile-make-tag))) - (byte-compile-goto 'byte-goto-if-nil elsetag) - (byte-compile-form (nth 2 form) for-effect) - (byte-compile-goto 'byte-goto donetag) - (byte-compile-out-tag elsetag) - (byte-compile-body (cdr (cdr (cdr form))) for-effect) - (byte-compile-out-tag donetag))) - (setq for-effect nil)) - -(defun byte-compile-cond (clauses) - (let ((donetag (byte-compile-make-tag)) - nexttag clause) - (while (setq clauses (cdr clauses)) - (setq clause (car clauses)) - (cond ((or (eq (car clause) t) - (and (eq (car-safe (car clause)) 'quote) - (car-safe (cdr-safe (car clause))))) - ;; Unconditional clause - (setq clause (cons t clause) - clauses nil)) - ((cdr clauses) - (byte-compile-form (car clause)) - (if (null (cdr clause)) - ;; First clause is a singleton. - (byte-compile-goto-if t for-effect donetag) - (setq nexttag (byte-compile-make-tag)) - (byte-compile-goto 'byte-goto-if-nil nexttag) - (byte-compile-body (cdr clause) for-effect) - (byte-compile-goto 'byte-goto donetag) - (byte-compile-out-tag nexttag))))) - ;; Last clause - (and (cdr clause) (not (eq (car clause) t)) - (progn (byte-compile-form (car clause)) - (byte-compile-goto-if nil for-effect donetag) - (setq clause (cdr clause)))) - (byte-compile-body-do-effect clause) - (byte-compile-out-tag donetag))) - -(defun byte-compile-and (form) - (let ((failtag (byte-compile-make-tag)) - (args (cdr form))) - (if (null args) - (byte-compile-form-do-effect t) - (while (cdr args) - (byte-compile-form (car args)) - (byte-compile-goto-if nil for-effect failtag) - (setq args (cdr args))) - (byte-compile-form-do-effect (car args)) - (byte-compile-out-tag failtag)))) - -(defun byte-compile-or (form) - (let ((wintag (byte-compile-make-tag)) - (args (cdr form))) - (if (null args) - (byte-compile-form-do-effect nil) - (while (cdr args) - (byte-compile-form (car args)) - (byte-compile-goto-if t for-effect wintag) - (setq args (cdr args))) - (byte-compile-form-do-effect (car args)) - (byte-compile-out-tag wintag)))) - -(defun byte-compile-while (form) - (let ((endtag (byte-compile-make-tag)) - (looptag (byte-compile-make-tag))) - (byte-compile-out-tag looptag) - (byte-compile-form (car (cdr form))) - (byte-compile-goto-if nil for-effect endtag) - (byte-compile-body (cdr (cdr form)) t) - (byte-compile-goto 'byte-goto looptag) - (byte-compile-out-tag endtag) - (setq for-effect nil))) - -(defun byte-compile-funcall (form) - (mapcar 'byte-compile-form (cdr form)) - (byte-compile-out 'byte-call (length (cdr (cdr form))))) - - -(defun byte-compile-let (form) - ;; First compute the binding values in the old scope. - (let ((varlist (car (cdr form)))) - (while varlist - (if (consp (car varlist)) - (byte-compile-form (car (cdr (car varlist)))) - (byte-compile-push-constant nil)) - (setq varlist (cdr varlist)))) - (let ((byte-compile-bound-variables - (cons 'new-scope byte-compile-bound-variables)) - (varlist (reverse (car (cdr form)))) - (extra-flags - ;; If this let is of the form (let (...) (byte-code ...)) - ;; then assume that it is the result of a transformation of - ;; ((lambda (...) (byte-code ... )) ...) and thus compile - ;; the variable bindings as if they were arglist bindings - ;; (which matters for what warnings.) - (if (eq 'byte-code (car-safe (nth 2 form))) - byte-compile-arglist-bit - nil))) - (while varlist - (byte-compile-variable-ref 'byte-varbind - (if (consp (car varlist)) - (car (car varlist)) - (car varlist)) - extra-flags) - (setq varlist (cdr varlist))) - (byte-compile-body-do-effect (cdr (cdr form))) - (if (memq 'unused-vars byte-compile-warnings) - ;; done compiling in this scope, warn now. - (byte-compile-warn-about-unused-variables)) - (byte-compile-out 'byte-unbind (length (car (cdr form)))))) - -(defun byte-compile-let* (form) - (let ((byte-compile-bound-variables - (cons 'new-scope byte-compile-bound-variables)) - (varlist (copy-sequence (car (cdr form))))) - (while varlist - (if (atom (car varlist)) - (byte-compile-push-constant nil) - (byte-compile-form (car (cdr (car varlist)))) - (setcar varlist (car (car varlist)))) - (byte-compile-variable-ref 'byte-varbind (car varlist)) - (setq varlist (cdr varlist))) - (byte-compile-body-do-effect (cdr (cdr form))) - (if (memq 'unused-vars byte-compile-warnings) - ;; done compiling in this scope, warn now. - (byte-compile-warn-about-unused-variables)) - (byte-compile-out 'byte-unbind (length (car (cdr form)))))) - - -;;(byte-defop-compiler-1 /= byte-compile-negated) -(byte-defop-compiler-1 atom byte-compile-negated) -(byte-defop-compiler-1 nlistp byte-compile-negated) - -;;(put '/= 'byte-compile-negated-op '=) -(put 'atom 'byte-compile-negated-op 'consp) -(put 'nlistp 'byte-compile-negated-op 'listp) - -(defun byte-compile-negated (form) - (byte-compile-form-do-effect (byte-compile-negation-optimizer form))) - -;; Even when optimization is off, atom is optimized to (not (consp ...)). -(defun byte-compile-negation-optimizer (form) - ;; an optimizer for forms where is less efficient than (not ) - (list 'not - (cons (or (get (car form) 'byte-compile-negated-op) - (error - "Compiler error: `%s' has no `byte-compile-negated-op' property" - (car form))) - (cdr form)))) - -;;; other tricky macro-like special-forms - -(byte-defop-compiler-1 catch) -(byte-defop-compiler-1 unwind-protect) -(byte-defop-compiler-1 condition-case) -(byte-defop-compiler-1 save-excursion) -(byte-defop-compiler-1 save-current-buffer) -(byte-defop-compiler-1 save-restriction) -(byte-defop-compiler-1 save-window-excursion) -(byte-defop-compiler-1 with-output-to-temp-buffer) -;; no track-mouse. - -(defun byte-compile-catch (form) - (byte-compile-form (car (cdr form))) - (byte-compile-push-constant - (byte-compile-top-level (cons 'progn (cdr (cdr form))) for-effect)) - (byte-compile-out 'byte-catch 0)) - -(defun byte-compile-unwind-protect (form) - (byte-compile-push-constant - (byte-compile-top-level-body (cdr (cdr form)) t)) - (byte-compile-out 'byte-unwind-protect 0) - (byte-compile-form-do-effect (car (cdr form))) - (byte-compile-out 'byte-unbind 1)) - -;;(defun byte-compile-track-mouse (form) -;; (byte-compile-form -;; (list -;; 'funcall -;; (list 'quote -;; (list 'lambda nil -;; (cons 'track-mouse -;; (byte-compile-top-level-body (cdr form)))))))) - -(defun byte-compile-condition-case (form) - (let* ((var (nth 1 form)) - (byte-compile-bound-variables - (if var - (cons (cons var 0) - (cons 'new-scope byte-compile-bound-variables)) - (cons 'new-scope byte-compile-bound-variables)))) - (or (symbolp var) - (byte-compile-warn - "%s is not a variable-name or nil (in condition-case)" - (prin1-to-string var))) - (byte-compile-push-constant var) - (byte-compile-push-constant (byte-compile-top-level - (nth 2 form) for-effect)) - (let ((clauses (cdr (cdr (cdr form)))) - compiled-clauses) - (while clauses - (let* ((clause (car clauses)) - (condition (car clause))) - (cond ((not (or (symbolp condition) - (and (listp condition) - (let ((syms condition) (ok t)) - (while syms - (if (not (symbolp (car syms))) - (setq ok nil)) - (setq syms (cdr syms))) - ok)))) - (byte-compile-warn - "%s is not a symbol naming a condition or a list of such (in condition-case)" - (prin1-to-string condition))) -;; ((not (or (eq condition 't) -;; (and (stringp (get condition 'error-message)) -;; (consp (get condition 'error-conditions))))) -;; (byte-compile-warn -;; "%s is not a known condition name (in condition-case)" -;; condition)) - ) - (setq compiled-clauses - (cons (cons condition - (byte-compile-top-level-body - (cdr clause) for-effect)) - compiled-clauses))) - (setq clauses (cdr clauses))) - (byte-compile-push-constant (nreverse compiled-clauses))) - (if (memq 'unused-vars byte-compile-warnings) - ;; done compiling in this scope, warn now. - (byte-compile-warn-about-unused-variables)) - (byte-compile-out 'byte-condition-case 0))) - - -(defun byte-compile-save-excursion (form) - (byte-compile-out 'byte-save-excursion 0) - (byte-compile-body-do-effect (cdr form)) - (byte-compile-out 'byte-unbind 1)) - -(defun byte-compile-save-restriction (form) - (byte-compile-out 'byte-save-restriction 0) - (byte-compile-body-do-effect (cdr form)) - (byte-compile-out 'byte-unbind 1)) - -(defun byte-compile-save-current-buffer (form) - (if (byte-compile-version-cond byte-compile-emacs19-compatibility) - ;; `save-current-buffer' special form is not available in XEmacs 19. - (byte-compile-form - `(let ((_byte_compiler_save_buffer_emulation_closure_ (current-buffer))) - (unwind-protect - (progn ,@(cdr form)) - (and (buffer-live-p _byte_compiler_save_buffer_emulation_closure_) - (set-buffer _byte_compiler_save_buffer_emulation_closure_))))) - (byte-compile-out 'byte-save-current-buffer 0) - (byte-compile-body-do-effect (cdr form)) - (byte-compile-out 'byte-unbind 1))) - -(defun byte-compile-save-window-excursion (form) - (byte-compile-push-constant - (byte-compile-top-level-body (cdr form) for-effect)) - (byte-compile-out 'byte-save-window-excursion 0)) - -(defun byte-compile-with-output-to-temp-buffer (form) - (byte-compile-form (car (cdr form))) - (byte-compile-out 'byte-temp-output-buffer-setup 0) - (byte-compile-body (cdr (cdr form))) - (byte-compile-out 'byte-temp-output-buffer-show 0)) - - -;;; top-level forms elsewhere - -(byte-defop-compiler-1 defun) -(byte-defop-compiler-1 defmacro) -(byte-defop-compiler-1 defvar) -(byte-defop-compiler-1 defconst byte-compile-defvar) -(byte-defop-compiler-1 autoload) -;; According to Mly this can go now that lambda is a macro -;(byte-defop-compiler-1 lambda byte-compile-lambda-form) -(byte-defop-compiler-1 defalias) -(byte-defop-compiler-1 define-function) - -(defun byte-compile-defun (form) - ;; This is not used for file-level defuns with doc strings. - (byte-compile-two-args ; Use this to avoid byte-compile-fset's warning. - (list 'fset (list 'quote (nth 1 form)) - (byte-compile-byte-code-maker - (byte-compile-lambda (cons 'lambda (cdr (cdr form))))))) - (byte-compile-discard) - (byte-compile-constant (nth 1 form))) - -(defun byte-compile-defmacro (form) - ;; This is not used for file-level defmacros with doc strings. - (byte-compile-body-do-effect - (list (list 'fset (list 'quote (nth 1 form)) - (let ((code (byte-compile-byte-code-maker - (byte-compile-lambda - (cons 'lambda (cdr (cdr form))))))) - (if (eq (car-safe code) 'make-byte-code) - (list 'cons ''macro code) - (list 'quote (cons 'macro (eval code)))))) - (list 'quote (nth 1 form))))) - -(defun byte-compile-defvar (form) - ;; This is not used for file-level defvar/consts with doc strings: - ;; byte-compile-file-form-defvar will be used in that case. - (let ((var (nth 1 form)) - (value (nth 2 form)) - (string (nth 3 form))) - (if (> (length form) 4) - (byte-compile-warn "%s used with too many args" (car form))) - (if (memq 'free-vars byte-compile-warnings) - (setq byte-compile-bound-variables - (cons (cons var byte-compile-global-bit) - byte-compile-bound-variables))) - (byte-compile-body-do-effect - (list (if (cdr (cdr form)) - (if (eq (car form) 'defconst) - (list 'setq var value) - (list 'or (list 'boundp (list 'quote var)) - (list 'setq var value)))) - ;; Put the defined variable in this library's load-history entry - ;; just as a real defvar would. - (list 'setq 'current-load-list - (list 'cons (list 'quote var) - 'current-load-list)) - (if string - (list 'put (list 'quote var) ''variable-documentation string)) - (list 'quote var))))) - -(defun byte-compile-autoload (form) - (and (byte-compile-constp (nth 1 form)) - (byte-compile-constp (nth 5 form)) - (memq (eval (nth 5 form)) '(t macro)) ; macro-p - (not (fboundp (eval (nth 1 form)))) - (byte-compile-warn - "The compiler ignores `autoload' except at top level. You should - probably put the autoload of the macro `%s' at top-level." - (eval (nth 1 form)))) - (byte-compile-normal-call form)) - -;; Lambda's in valid places are handled as special cases by various code. -;; The ones that remain are errors. -;; According to Mly this can go now that lambda is a macro -;(defun byte-compile-lambda-form (form) -; (byte-compile-warn -; "`lambda' used in function position is invalid: probably you mean #'%s" -; (let ((print-escape-newlines t) -; (print-level 4) -; (print-length 4)) -; (prin1-to-string form))) -; (byte-compile-normal-call -; (list 'signal ''error -; (list 'quote (list "`lambda' used in function position" form))))) - -;; Compile normally, but deal with warnings for the function being defined. -(defun byte-compile-defalias (form) - (if (and (consp (cdr form)) (consp (nth 1 form)) - (eq (car (nth 1 form)) 'quote) - (consp (cdr (nth 1 form))) - (symbolp (nth 1 (nth 1 form))) - (consp (nthcdr 2 form)) - (consp (nth 2 form)) - (eq (car (nth 2 form)) 'quote) - (consp (cdr (nth 2 form))) - (symbolp (nth 1 (nth 2 form)))) - (progn - (byte-compile-defalias-warn (nth 1 (nth 1 form)) - (nth 1 (nth 2 form))) - (setq byte-compile-function-environment - (cons (cons (nth 1 (nth 1 form)) - (nth 1 (nth 2 form))) - byte-compile-function-environment)))) - (byte-compile-normal-call form)) - -(defun byte-compile-define-function (form) - (byte-compile-defalias form)) - -;; Turn off warnings about prior calls to the function being defalias'd. -;; This could be smarter and compare those calls with -;; the function it is being aliased to. -(defun byte-compile-defalias-warn (new alias) - (let ((calls (assq new byte-compile-unresolved-functions))) - (if calls - (setq byte-compile-unresolved-functions - (delq calls byte-compile-unresolved-functions))))) - -;;; tags - -;; Note: Most operations will strip off the 'TAG, but it speeds up -;; optimization to have the 'TAG as a part of the tag. -;; Tags will be (TAG . (tag-number . stack-depth)). -(defun byte-compile-make-tag () - (list 'TAG (setq byte-compile-tag-number (1+ byte-compile-tag-number)))) - - -(defun byte-compile-out-tag (tag) - (setq byte-compile-output (cons tag byte-compile-output)) - (if (cdr (cdr tag)) - (progn - ;; ## remove this someday - (and byte-compile-depth - (not (= (cdr (cdr tag)) byte-compile-depth)) - (error "Compiler bug: depth conflict at tag %d" (car (cdr tag)))) - (setq byte-compile-depth (cdr (cdr tag)))) - (setcdr (cdr tag) byte-compile-depth))) - -(defun byte-compile-goto (opcode tag) - (setq byte-compile-output (cons (cons opcode tag) byte-compile-output)) - (setcdr (cdr tag) (if (memq opcode byte-goto-always-pop-ops) - (1- byte-compile-depth) - byte-compile-depth)) - (setq byte-compile-depth (and (not (eq opcode 'byte-goto)) - (1- byte-compile-depth)))) - -(defun byte-compile-out (opcode offset) - (setq byte-compile-output (cons (cons opcode offset) byte-compile-output)) - (cond ((eq opcode 'byte-call) - (setq byte-compile-depth (- byte-compile-depth offset))) - ((eq opcode 'byte-return) - ;; This is actually an unnecessary case, because there should be - ;; no more opcodes behind byte-return. - (setq byte-compile-depth nil)) - (t - (setq byte-compile-depth (+ byte-compile-depth - (or (aref byte-stack+-info - (symbol-value opcode)) - (- (1- offset)))) - byte-compile-maxdepth (max byte-compile-depth - byte-compile-maxdepth)))) - ;;(if (< byte-compile-depth 0) (error "Compiler error: stack underflow")) - ) - - -;;; call tree stuff - -(defun byte-compile-annotate-call-tree (form) - (let (entry) - ;; annotate the current call - (if (setq entry (assq (car form) byte-compile-call-tree)) - (or (memq byte-compile-current-form (nth 1 entry)) ;callers - (setcar (cdr entry) - (cons byte-compile-current-form (nth 1 entry)))) - (setq byte-compile-call-tree - (cons (list (car form) (list byte-compile-current-form) nil) - byte-compile-call-tree))) - ;; annotate the current function - (if (setq entry (assq byte-compile-current-form byte-compile-call-tree)) - (or (memq (car form) (nth 2 entry)) ;called - (setcar (cdr (cdr entry)) - (cons (car form) (nth 2 entry)))) - (setq byte-compile-call-tree - (cons (list byte-compile-current-form nil (list (car form))) - byte-compile-call-tree))) - )) - -;; Renamed from byte-compile-report-call-tree -;; to avoid interfering with completion of byte-compile-file. -;;;###autoload -(defun display-call-tree (&optional filename) - "Display a call graph of a specified file. -This lists which functions have been called, what functions called -them, and what functions they call. The list includes all functions -whose definitions have been compiled in this Emacs session, as well as -all functions called by those functions. - -The call graph does not include macros, inline functions, or -primitives that the byte-code interpreter knows about directly \(eq, -cons, etc.\). - -The call tree also lists those functions which are not known to be called -\(that is, to which no calls have been compiled\), and which cannot be -invoked interactively." - (interactive) - (message "Generating call tree...") - (with-output-to-temp-buffer "*Call-Tree*" - (set-buffer "*Call-Tree*") - (erase-buffer) - (message "Generating call tree... (sorting on %s)" - byte-compile-call-tree-sort) - (insert "Call tree for " - (cond ((null byte-compile-current-file) (or filename "???")) - ((stringp byte-compile-current-file) - byte-compile-current-file) - (t (buffer-name byte-compile-current-file))) - " sorted on " - (prin1-to-string byte-compile-call-tree-sort) - ":\n\n") - (if byte-compile-call-tree-sort - (setq byte-compile-call-tree - (sort byte-compile-call-tree - (cond - ((eq byte-compile-call-tree-sort 'callers) - (function (lambda (x y) (< (length (nth 1 x)) - (length (nth 1 y)))))) - ((eq byte-compile-call-tree-sort 'calls) - (function (lambda (x y) (< (length (nth 2 x)) - (length (nth 2 y)))))) - ((eq byte-compile-call-tree-sort 'calls+callers) - (function (lambda (x y) (< (+ (length (nth 1 x)) - (length (nth 2 x))) - (+ (length (nth 1 y)) - (length (nth 2 y))))))) - ((eq byte-compile-call-tree-sort 'name) - (function (lambda (x y) (string< (car x) - (car y))))) - (t (error - "`byte-compile-call-tree-sort': `%s' - unknown sort mode" - byte-compile-call-tree-sort)))))) - (message "Generating call tree...") - (let ((rest byte-compile-call-tree) - (b (current-buffer)) - f p - callers calls) - (while rest - (prin1 (car (car rest)) b) - (setq callers (nth 1 (car rest)) - calls (nth 2 (car rest))) - (insert "\t" - (cond ((not (fboundp (setq f (car (car rest))))) - (if (null f) - " ";; shouldn't insert nil then, actually -sk - " ")) - ((subrp (setq f (symbol-function f))) - " ") - ((symbolp f) - (format " ==> %s" f)) - ((compiled-function-p f) - "") - ((not (consp f)) - "") - ((eq 'macro (car f)) - (if (or (compiled-function-p (cdr f)) - (assq 'byte-code (cdr (cdr (cdr f))))) - " " - " ")) - ((assq 'byte-code (cdr (cdr f))) - "") - ((eq 'lambda (car f)) - "") - (t "???")) - (format " (%d callers + %d calls = %d)" - ;; Does the optimizer eliminate common subexpressions?-sk - (length callers) - (length calls) - (+ (length callers) (length calls))) - "\n") - (if callers - (progn - (insert " called by:\n") - (setq p (point)) - (insert " " (if (car callers) - (mapconcat 'symbol-name callers ", ") - "")) - (let ((fill-prefix " ")) - (fill-region-as-paragraph p (point))))) - (if calls - (progn - (insert " calls:\n") - (setq p (point)) - (insert " " (mapconcat 'symbol-name calls ", ")) - (let ((fill-prefix " ")) - (fill-region-as-paragraph p (point))))) - (insert "\n") - (setq rest (cdr rest))) - - (message "Generating call tree...(finding uncalled functions...)") - (setq rest byte-compile-call-tree) - (let ((uncalled nil)) - (while rest - (or (nth 1 (car rest)) - (null (setq f (car (car rest)))) - (byte-compile-fdefinition f t) - (commandp (byte-compile-fdefinition f nil)) - (setq uncalled (cons f uncalled))) - (setq rest (cdr rest))) - (if uncalled - (let ((fill-prefix " ")) - (insert "Noninteractive functions not known to be called:\n ") - (setq p (point)) - (insert (mapconcat 'symbol-name (nreverse uncalled) ", ")) - (fill-region-as-paragraph p (point))))) - ) - (message "Generating call tree...done.") - )) - - -;;; by crl@newton.purdue.edu -;;; Only works noninteractively. -;;;###autoload -(defun batch-byte-compile () - "Run `byte-compile-file' on the files remaining on the command line. -Use this from the command line, with `-batch'; -it won't work in an interactive Emacs. -Each file is processed even if an error occurred previously. -For example, invoke \"xemacs -batch -f batch-byte-compile $emacs/ ~/*.el\"" - ;; command-line-args-left is what is left of the command line (from - ;; startup.el) - (defvar command-line-args-left) ;Avoid 'free variable' warning - (if (not noninteractive) - (error "`batch-byte-compile' is to be used only with -batch")) - (let ((error nil) - (debug-issue-ebola-notices 0)) ; Hack -slb - (while command-line-args-left - (if (file-directory-p (expand-file-name (car command-line-args-left))) - (let ((files (directory-files (car command-line-args-left))) - source dest) - (while files - (if (and (string-match emacs-lisp-file-regexp (car files)) - (not (auto-save-file-name-p (car files))) - (setq source (expand-file-name - (car files) - (car command-line-args-left))) - (setq dest (byte-compile-dest-file source)) - (file-exists-p dest) - (file-newer-than-file-p source dest)) - (if (null (batch-byte-compile-1 source)) - (setq error t))) - (setq files (cdr files)))) - (if (null (batch-byte-compile-1 (car command-line-args-left))) - (setq error t))) - (setq command-line-args-left (cdr command-line-args-left))) - (message "Done") - (kill-emacs (if error 1 0)))) - -(defun batch-byte-compile-1 (file) - (condition-case err - (progn (byte-compile-file file) t) - (error - (princ ">>Error occurred processing ") - (princ file) - (princ ": ") - (if (fboundp 'display-error) ; XEmacs 19.8+ - (display-error err nil) - (princ (or (get (car err) 'error-message) (car err))) - (mapcar '(lambda (x) (princ " ") (prin1 x)) (cdr err))) - (princ "\n") - nil))) - -;;;###autoload -(defun batch-byte-recompile-directory-norecurse () - "Same as `batch-byte-recompile-directory' but without recursion." - (setq byte-recompile-directory-recursively nil) - (batch-byte-recompile-directory)) - -;;;###autoload -(defun batch-byte-recompile-directory () - "Runs `byte-recompile-directory' on the dirs remaining on the command line. -Must be used only with `-batch', and kills Emacs on completion. -For example, invoke `xemacs -batch -f batch-byte-recompile-directory .'." - ;; command-line-args-left is what is left of the command line (startup.el) - (defvar command-line-args-left) ;Avoid 'free variable' warning - (if (not noninteractive) - (error "batch-byte-recompile-directory is to be used only with -batch")) - (or command-line-args-left - (setq command-line-args-left '("."))) - (let ((byte-recompile-directory-ignore-errors-p t) - (debug-issue-ebola-notices 0)) - (while command-line-args-left - (byte-recompile-directory (car command-line-args-left)) - (setq command-line-args-left (cdr command-line-args-left)))) - (kill-emacs 0)) - -(make-obsolete 'elisp-compile-defun 'compile-defun) -(make-obsolete 'byte-compile-report-call-tree 'display-call-tree) - -;; other make-obsolete calls in obsolete.el. - -(provide 'byte-compile) -(provide 'bytecomp) - - -;;; report metering (see the hacks in bytecode.c) - -(if (boundp 'byte-code-meter) - (defun byte-compile-report-ops () - (defvar byte-code-meter) - (with-output-to-temp-buffer "*Meter*" - (set-buffer "*Meter*") - (let ((i 0) n op off) - (while (< i 256) - (setq n (aref (aref byte-code-meter 0) i) - off nil) - (if t ;(not (zerop n)) - (progn - (setq op i) - (setq off nil) - (cond ((< op byte-nth) - (setq off (logand op 7)) - (setq op (logand op 248))) - ((>= op byte-constant) - (setq off (- op byte-constant) - op byte-constant))) - (setq op (aref byte-code-vector op)) - (insert (format "%-4d" i)) - (insert (symbol-name op)) - (if off (insert " [" (int-to-string off) "]")) - (indent-to 40) - (insert (int-to-string n) "\n"))) - (setq i (1+ i))))))) - - -;; To avoid "lisp nesting exceeds max-lisp-eval-depth" when bytecomp compiles -;; itself, compile some of its most used recursive functions (at load time). -;; -(eval-when-compile - (or (compiled-function-p (symbol-function 'byte-compile-form)) - (assq 'byte-code (symbol-function 'byte-compile-form)) - (let ((byte-optimize nil) ; do it fast - (byte-compile-warnings nil)) - (mapcar '(lambda (x) - (or noninteractive (message "compiling %s..." x)) - (byte-compile x) - (or noninteractive (message "compiling %s...done" x))) - '(byte-compile-normal-call - byte-compile-form - byte-compile-body - ;; Inserted some more than necessary, to speed it up. - byte-compile-top-level - byte-compile-out-toplevel - byte-compile-constant - byte-compile-variable-ref)))) - nil) - -;;; bytecomp.el ends here diff --cc lisp/custom-load.el index 54b38b3,d4da910..0000000 deleted file mode 100644,100644 --- a/lisp/custom-load.el +++ /dev/null @@@ -1,87 -1,81 +1,0 @@@ --;;; custom-load.el --- automatically extracted custom dependencies -- --;;; Code: -- --(custom-add-loads 'extensions '("auto-show" "wid-edit")) --(custom-add-loads 'info-faces '("info")) --(custom-add-loads 'custom-buffer '("cus-edit")) --(custom-add-loads 'custom-faces '("cus-edit")) --(custom-add-loads 'auto-show '("auto-show")) --(custom-add-loads 'drag-n-drop '("dragdrop")) --(custom-add-loads 'mouse '("mouse" "mwheel")) --(custom-add-loads 'etags '("etags")) - (custom-add-loads 'package-tools '("package-get" "package-ui")) --(custom-add-loads 'widgets '("wid-browse" "wid-edit")) --(custom-add-loads 'menu '("menubar-items")) --(custom-add-loads 'minibuffer '("simple" "minibuf")) --(custom-add-loads 'log-message '("simple")) --(custom-add-loads 'environment '("frame" "keydefs" "minibuf" "modeline" "window-xemacs" "menubar" "x-init" "toolbar-items" "cus-edit" "gnuserv" "sound")) --(custom-add-loads 'sound '("sound")) - (custom-add-loads 'pui '("package-ui")) --(custom-add-loads 'terminals '("gnuserv")) --(custom-add-loads 'auto-save '("files" "auto-save")) --(custom-add-loads 'mail '("simple")) --(custom-add-loads 'custom-menu '("cus-edit")) --(custom-add-loads 'docs '("hyper-apropos" "info")) --(custom-add-loads 'tools '("etags" "hyper-apropos")) --(custom-add-loads 'editing-basics '("cmdloop" "simple" "files" "lisp")) --(custom-add-loads 'internal '("cus-edit")) --(custom-add-loads 'help-appearance '("help" "help-macro")) --(custom-add-loads 'build-report '("build-report")) --(custom-add-loads 'buffers-menu '("menubar-items")) --(custom-add-loads 'hypermedia '("wid-edit")) --(custom-add-loads 'lisp '("lisp" "lisp-mode" "hyper-apropos")) --(custom-add-loads 'applications '("cus-edit")) --(custom-add-loads 'help '("help" "cus-edit" "hyper-apropos" "info")) --(custom-add-loads 'keyboard '("cmdloop")) --(custom-add-loads 'hyper-apropos-faces '("hyper-apropos")) - (custom-add-loads 'ldap '("ldap")) --(custom-add-loads 'widget-browse '("wid-browse")) --(custom-add-loads 'data '("auto-save")) --(custom-add-loads 'warnings '("simple")) --(custom-add-loads 'widget-documentation '("wid-edit")) - (custom-add-loads 'comm '("ldap")) --(custom-add-loads 'backup '("files")) --(custom-add-loads 'frames '("frame" "window-xemacs" "gui" "gnuserv")) --(custom-add-loads 'customize '("cus-edit" "wid-edit")) --(custom-add-loads 'custom-browse '("cus-edit")) --(custom-add-loads 'abbrev '("abbrev" "files")) --(custom-add-loads 'programming '("cus-edit")) --(custom-add-loads 'toolbar '("toolbar-items")) --(custom-add-loads 'dired '("files")) --(custom-add-loads 'dnd-debug '("dragdrop")) - (custom-add-loads 'package-get '("package-get")) --(custom-add-loads 'killing '("simple")) --(custom-add-loads 'widget-button '("wid-edit")) --(custom-add-loads 'paren-blinking '("simple")) --(custom-add-loads 'find-file '("files")) - (custom-add-loads 'font-menu '("x-font-menu")) --(custom-add-loads 'files '("files")) --(custom-add-loads 'build '("build-report")) --(custom-add-loads 'font-lock '("font-lock")) --(custom-add-loads 'external '("process" "cus-edit")) --(custom-add-loads 'development '("process" "lisp-mode" "cus-edit")) --(custom-add-loads 'gnuserv '("gnuserv")) --(custom-add-loads 'fill-comments '("simple")) --(custom-add-loads 'windows '("window" "window-xemacs")) --(custom-add-loads 'widget-faces '("wid-edit")) --(custom-add-loads 'languages '("lisp-mode" "cus-edit" "font-lock")) --(custom-add-loads 'fill '("simple" "fill")) --(custom-add-loads 'custom-magic-faces '("cus-edit")) --(custom-add-loads 'display '("toolbar" "scrollbar" "auto-show")) --(custom-add-loads 'faces '("faces" "cus-edit" "font-lock" "font" "hyper-apropos" "info" "wid-edit")) --(custom-add-loads 'emacs '("faces" "help" "files" "cus-edit" "package-get")) --(custom-add-loads 'processes '("process" "gnuserv")) --(custom-add-loads 'hyper-apropos '("hyper-apropos")) --(custom-add-loads 'wp '("cus-edit")) --(custom-add-loads 'vc '("files")) --(custom-add-loads 'isearch '("isearch-mode")) --(custom-add-loads 'font-lock-faces '("font-lock")) --(custom-add-loads 'modeline '("modeline")) --(custom-add-loads 'editing '("simple" "abbrev" "fill" "mouse" "dragdrop" "cus-edit")) --(custom-add-loads 'matching '("simple" "isearch-mode" "hyper-apropos")) --(custom-add-loads 'i18n '("cus-edit")) --(custom-add-loads 'info '("toolbar-items" "info")) --(custom-add-loads 'x '("x-faces" "x-font-menu")) -- --;;; custom-load.el ends here diff --cc lisp/dump-paths.el index 10117d5,81e4de3..0000000 deleted file mode 100644,100644 --- a/lisp/dump-paths.el +++ /dev/null @@@ -1,86 -1,72 +1,0 @@@ --;; dump-paths.el --- set up XEmacs paths for dumping -- --;; Copyright (C) 1985, 1986, 1992, 1994, 1997 Free Software Foundation, Inc. -- --;; Maintainer: XEmacs Development Team --;; Keywords: internal, dumped -- --;; This file is part of XEmacs. -- --;; XEmacs 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 2, or (at your option) --;; any later version. -- --;; XEmacs 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 XEmacs; see the file COPYING. If not, write to the Free --;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA --;; 02111-1307, USA. -- --;;; Synched up with: Not in FSF -- --;;; Commentary: -- --;; This sets up the various paths for continuing loading files for --;; dumping. -- --(let ((debug-paths (or debug-paths -- (and (getenv "EMACSDEBUGPATHS") -- t))) -- (roots (paths-find-emacs-roots invocation-directory -- invocation-name))) -- -- (if debug-paths -- (princ (format "XEmacs thinks the roots of its hierarchy are:\n%S\n" -- roots))) -- -- (let ((stuff (packages-find-packages roots))) -- (setq late-packages (car (cdr stuff)))) -- -- (setq late-package-load-path (packages-find-package-load-path late-packages)) -- -- (if debug-paths -- (progn -- (princ (format "configure-package-path:\n%S\n" configure-package-path) -- 'external-debugging-output) -- (princ (format "late-packages and late-package-load-path:\n%S\n%S\n" -- late-packages late-package-load-path) -- 'external-debugging-output))) -- -- (setq lisp-directory (paths-find-lisp-directory roots)) -- (if debug-paths -- (princ (format "lisp-directory:\n%S\n" lisp-directory) -- 'external-debugging-output)) -- (setq site-directory (and (null inhibit-site-lisp) -- (paths-find-site-lisp-directory roots))) -- (if (and debug-paths (null inhibit-site-lisp)) -- (princ (format "site-directory:\n%S\n" site-directory) -- 'external-debugging-output)) -- -- (setq load-path (paths-construct-load-path roots -- '() -- late-package-load-path -- '() -- lisp-directory - site-directory)) - - (setq module-directory (paths-find-module-directory roots)) - (if debug-paths - (princ (format "module-directory:\n%S\n" module-directory) - 'external-debugging-output)) - (setq site-module-directory (and (null inhibit-site-modules) - (paths-find-site-module-directory roots))) - (if (and debug-paths (null inhibit-site-modules)) - (princ (format "site-module-directory:\n%S\n" site-module-directory) - 'external-debugging-output)) - - (setq module-load-path (paths-construct-module-load-path roots - module-directory - site-module-directory))) - - ;;; dump-paths.el ends here - site-directory))) - -;;; dump-paths.el ends here diff --cc lisp/dumped-lisp.el index 07c67ce,cbbecfb..0000000 deleted file mode 100644,100644 --- a/lisp/dumped-lisp.el +++ /dev/null @@@ -1,219 -1,220 +1,0 @@@ --(setq preloaded-file-list -- (assemble-list -- "backquote" ; needed for defsubst etc. -- "bytecomp-runtime" ; define defsubst - "find-paths" - "packages" ; Bootstrap run-time lisp environment - "setup-paths" - "dump-paths" - "subr" ; load the most basic Lisp functions - "replace" ; match-string used in version.el. - ; Ignore compiled-by-mistake version.elc - "version.el" - "cl" - "cl-extra" - "cl-seq" - "widget" - "custom" ; Before the world so everything can be - ; customized - "cus-start" ; for customization of builtin variables - "cmdloop" - "keymap" - "syntax" - "device" - "console" - "obsolete" - "specifier" - "faces" ; must be loaded before any make-face call - ;;(pureload "facemenu") #### not yet ported - "glyphs" - "objects" - "extents" - "events" - "text-props" - "process" ;; This is bad. network-streams may not be defined. - (when-feature multicast "multicast") ; #+network-streams implicitely true - "frame" ; move up here cause some stuff needs it here - "map-ynp" - "simple" - "keydefs" ; Before loaddefs so that keymap vars exist. - "abbrev" - "derived" - "minibuf" - "list-mode" - "modeline" ; needs simple.el to be loaded first - ;; If SparcWorks support is included some additional packages are - ;; dumped which would normally have autoloads. To avoid - ;; duplicate doc string warnings, SparcWorks uses a separate - ;; autoloads file with the dumped packages removed. - ;; After fixing, eos/loaddefs-eos and loaddefs appear identical?!! - ;; So just make loaddefs-eos go away... - ;;(pureload (if (featurep 'sparcworks) "eos/loaddefs-eos" "loaddefs")) - "startup" ; For initialization of - ; `emacs-user-extension-dir' - "misc" - ;; (pureload "profile") - (unless-feature mule "help-nomule") - "help" - ;; (pureload "hyper-apropos") Soon... - (unless-feature file-coding "files-nomule") - "files" - "lib-complete" - "format" - "indent" - "isearch-mode" - "buffer" - "buff-menu" - "undo-stack" - "window" - "window-xemacs" - "paths.el" ; don't get confused if paths compiled. - "lisp" - "page" - "register" - "iso8859-1" ; This must be before any modes - ; (sets standard syntax table.) - "paragraphs" - "easymenu" ; Added for 20.3. - "lisp-mode" - "text-mode" - "fill" - "auto-save" ; Added for 20.4 - - (when-feature windows-nt "winnt") - (when-feature lisp-float-type "float-sup") - "itimer" ; for vars auto-save-timeout and - ; auto-gc-threshold - "itimer-autosave" - (when-feature toolbar "toolbar") - (when-feature scrollbar "scrollbar") - (when-feature menubar "menubar") - (when-feature dialog "dialog") - (when-feature mule "mule-charset") - (when-feature file-coding "coding") - (when-feature mule "mule-coding") - ;; Handle I/O of files with extended characters. - (when-feature file-coding "code-files") - (when-feature mule "mule-files") - ;; Handle process with encoding/decoding non-ascii coding-system. - (when-feature file-coding "code-process") - (when-feature mule "mule-help") - ;; Load the remaining basic files. - (when-feature mule "mule-category") - (when-feature mule "mule-ccl") - (when-feature mule "mule-misc") - (when-feature mule "kinsoku") - (when-feature (and mule x) "mule-x-init") - (when-feature (and mule tty) "mule-tty-init") - (when-feature mule "mule-cmds") ; to sync with Emacs 20.1 - - ;; after this goes the specific lisp routines for a particular input system - ;; 97.2.5 JHod Shouldn't these go into a site-load file to allow site - ;; or user switching of input systems??? - ;(if (featurep 'wnn) - ; (progn - ; (pureload "egg") - ; (pureload "egg-wnn") - ; (setq egg-default-startup-file "eggrc-wnn"))) - - ;; (if (and (boundp 'CANNA) CANNA) - ;; (pureload "canna") - ;; ) - - ;; Now load files to set up all the different languages/environments - ;; that Mule knows about. - - (when-feature mule "arabic") - (when-feature mule "chinese") - (when-feature mule "mule/cyrillic") ; overloaded in leim/quail - (when-feature mule "english") - (when-feature mule "ethiopic") - (when-feature mule "european") - (when-feature mule "mule/greek") ; overloaded in leim/quail - (when-feature mule "hebrew") - (when-feature mule "japanese") - (when-feature mule "korean") - (when-feature mule "misc-lang") - (when-feature mule "thai-xtis") - (when-feature mule "viet-chars") - (when-feature mule "vietnamese") - - ;; Specialized language support - (when-feature (and mule CANNA) "canna-leim") - ;; Egg/Its is now a package - ; (when-feature (and mule wnn) "egg-leim") - ; (when-feature (and mule wnn) "egg-kwnn-leim") - ; (when-feature (and mule wnn) "egg-cwnn-leim") - ; (when-feature mule "egg-sj3-leim") - ;; SKK is now a package - ; (when-feature mule "skk-leim") - - ;; Set up the XEmacs environment for Mule. - ;; Assumes the existence of various stuff above. - (when-feature mule "mule-init") - - ;; Enable Mule capability for Gnus, mail, etc... - ;; Moved to sunpro-load.el - the default only for Sun. - ;;(pureload "mime-setup") - ;;; mule-load.el ends here - (when-feature window-system "gui") - (when-feature window-system "mode-motion") - (when-feature window-system "mouse") - (when-feature window-system "select") - (when-feature dragdrop-api "dragdrop") - ;; preload the X code, for faster startup. - (when-feature (and (not infodock) - (or x mswindows) menubar) "menubar-items") - (when-feature (and infodock (or x mswindows) menubar) "id-menus") - (when-feature x "x-faces") - (when-feature x "x-iso8859-1") - (when-feature x "x-mouse") - (when-feature x "x-select") - (when-feature (and x scrollbar) "x-scrollbar") - (when-feature x "x-misc") - (when-feature x "x-init") - (when-feature (and (not infodock) - window-system toolbar) "toolbar-items") - (when-feature x "x-win-xfree86") - (when-feature x "x-win-sun") - ;; preload the mswindows code. - (when-feature mswindows "msw-glyphs") - (when-feature mswindows "msw-faces") - (when-feature mswindows "msw-mouse") - (when-feature mswindows "msw-init") - (when-feature mswindows "msw-select") - ;; preload the TTY init code. - (when-feature tty "tty-init") - ;;; Formerly in tooltalk/tooltalk-load.el - ;; Moved to tooltalk package - ;; (when-feature tooltalk "tooltalk-macros") - ;; (when-feature tooltalk "tooltalk-util") - ;; (when-feature tooltalk "tooltalk-init") - ;; "vc-hooks" ; Packaged. Available in two versions. - ;; "ediff-hook" ; Packaged. - "fontl-hooks" - "auto-show" - (when-feature ldap "ldap") - - ;; (when-feature energize "energize/energize-load.el") - ;;; formerly in sunpro/sunpro-load.el - ;; (when-feature (and mule sparcworks) "mime-setup") - - ;; Moved to Sun package - ;; (when-feature sparcworks "cc-mode") ; Requires cc-mode package - ;; (when-feature sparcworks "sunpro-init") - ;; (when-feature sparcworks "ring") - ;; (when-feature sparcworks "comint") ; Requires comint package - ;; (when-feature sparcworks "annotations") - - ;;; formerly in eos/sun-eos-load.el - ;; (when-feature sparcworks "sun-eos-init") - ;; (when-feature sparcworks "sun-eos-common") - ;; (when-feature sparcworks "sun-eos-editor") - ;; (when-feature sparcworks "sun-eos-browser") - ;; (when-feature sparcworks "sun-eos-debugger") - ;; (when-feature sparcworks "sun-eos-debugger-extra") - ;; (when-feature sparcworks "sun-eos-menubar") - "loadhist" ; Must be dumped before loaddefs is loaded - "loaddefs" ; <=== autoloads get loaded here - )) - "Installation.el" - "find-paths" - "packages" ; Bootstrap run-time lisp environment - "setup-paths" - "dump-paths" - "subr" ; load the most basic Lisp functions - "replace" ; match-string used in version.el. - ; Ignore compiled-by-mistake version.elc - "version.el" - "cl" - "cl-extra" - "cl-seq" - "widget" - "custom" ; Before the world so everything can be - ; customized - "cus-start" ; for customization of builtin variables - "cmdloop" - "keymap" - "syntax" - "device" - "console" - "obsolete" - "specifier" - "faces" ; must be loaded before any make-face call -;;(pureload "facemenu") #### not yet ported - "glyphs" - "objects" - "extents" - "events" - "text-props" - "process" ;; This is bad. network-streams may not be defined. - (when-feature multicast "multicast") ; #+network-streams implicitely true - "frame" ; move up here cause some stuff needs it here - "map-ynp" - "simple" - "keydefs" ; Before loaddefs so that keymap vars exist. - "abbrev" - "derived" - "minibuf" - "list-mode" - "modeline" ; needs simple.el to be loaded first -;; If SparcWorks support is included some additional packages are -;; dumped which would normally have autoloads. To avoid -;; duplicate doc string warnings, SparcWorks uses a separate -;; autoloads file with the dumped packages removed. -;; After fixing, eos/loaddefs-eos and loaddefs appear identical?!! -;; So just make loaddefs-eos go away... -;;(pureload (if (featurep 'sparcworks) "eos/loaddefs-eos" "loaddefs")) - "startup" ; For initialization of - ; `emacs-user-extension-dir' - "misc" - ;; (pureload "profile") - (unless-feature mule "help-nomule") - "help" - ;; (pureload "hyper-apropos") Soon... - (unless-feature file-coding "files-nomule") - "files" - "lib-complete" - "format" - "indent" - "isearch-mode" - "buffer" - "buff-menu" - "undo-stack" - "window" - "window-xemacs" - "paths.el" ; don't get confused if paths compiled. - "lisp" - "page" - "register" - "iso8859-1" ; This must be before any modes - ; (sets standard syntax table.) - "paragraphs" - "easymenu" ; Added for 20.3. - "lisp-mode" - "text-mode" - "fill" - "auto-save" ; Added for 20.4 - - (when-feature windows-nt "winnt") - (when-feature lisp-float-type "float-sup") - "itimer" ; for vars auto-save-timeout and - ; auto-gc-threshold - "itimer-autosave" - (when-feature toolbar "toolbar") - (when-feature scrollbar "scrollbar") - (when-feature menubar "menubar") - (when-feature dialog "dialog") - (when-feature mule "mule-charset") - (when-feature file-coding "coding") - (when-feature mule "mule-coding") -;; Handle I/O of files with extended characters. - (when-feature file-coding "code-files") - (when-feature mule "mule-files") -;; Handle process with encoding/decoding non-ascii coding-system. - (when-feature file-coding "code-process") - (when-feature mule "mule-help") -;; Load the remaining basic files. - (when-feature mule "mule-category") - (when-feature mule "mule-ccl") - (when-feature mule "mule-misc") - (when-feature mule "kinsoku") - (when-feature (and mule x) "mule-x-init") - (when-feature (and mule tty) "mule-tty-init") - (when-feature mule "mule-cmds") ; to sync with Emacs 20.1 - -;; after this goes the specific lisp routines for a particular input system -;; 97.2.5 JHod Shouldn't these go into a site-load file to allow site -;; or user switching of input systems??? -;(if (featurep 'wnn) -; (progn -; (pureload "egg") -; (pureload "egg-wnn") -; (setq egg-default-startup-file "eggrc-wnn"))) - -;; (if (and (boundp 'CANNA) CANNA) -;; (pureload "canna") -;; ) - -;; Now load files to set up all the different languages/environments -;; that Mule knows about. - - (when-feature mule "arabic") - (when-feature mule "chinese") - (when-feature mule "mule-base/cyrillic") ; overloaded in leim/quail - (when-feature mule "english") -;; (when-feature mule "ethiopic") - (when-feature mule "european") - (when-feature mule "mule-base/greek") ; overloaded in leim/quail - (when-feature mule "hebrew") - (when-feature mule "japanese") - (when-feature mule "korean") - (when-feature mule "misc-lang") -;; (when-feature mule "thai") - (when-feature mule "viet-chars") -;; (when-feature mule "vietnamese") - - ;; Specialized language support - (when-feature (and mule CANNA) "canna-leim") -;; Egg/Its is now a package -; (when-feature (and mule wnn) "egg-leim") -; (when-feature (and mule wnn) "egg-kwnn-leim") -; (when-feature (and mule wnn) "egg-cwnn-leim") -; (when-feature mule "egg-sj3-leim") -;; SKK is now a package -; (when-feature mule "skk-leim") - -;; Set up the XEmacs environment for Mule. -;; Assumes the existence of various stuff above. - (when-feature mule "mule-init") - -;; Enable Mule capability for Gnus, mail, etc... -;; Moved to sunpro-load.el - the default only for Sun. -;;(pureload "mime-setup") -;;; mule-load.el ends here - (when-feature window-system "gui") - (when-feature window-system "mode-motion") - (when-feature window-system "mouse") - (when-feature window-system "select") - (when-feature dragdrop-api "dragdrop") -;; preload the X code, for faster startup. - (when-feature (and (not infodock) - (or x mswindows) menubar) "menubar-items") - (when-feature (and infodock (or x mswindows) menubar) "id-menus") - (when-feature x "x-faces") - (when-feature x "x-iso8859-1") - (when-feature x "x-mouse") - (when-feature x "x-select") - (when-feature (and x scrollbar) "x-scrollbar") - (when-feature x "x-misc") - (when-feature x "x-init") - (when-feature (and (not infodock) - window-system toolbar) "toolbar-items") - (when-feature x "x-win-xfree86") - (when-feature x "x-win-sun") -;; preload the mswindows code. - (when-feature mswindows "msw-glyphs") - (when-feature mswindows "msw-faces") - (when-feature mswindows "msw-mouse") - (when-feature mswindows "msw-init") - (when-feature mswindows "msw-select") -;; preload the TTY init code. - (when-feature tty "tty-init") -;;; Formerly in tooltalk/tooltalk-load.el - ;; Moved to tooltalk package - ;; (when-feature tooltalk "tooltalk-macros") - ;; (when-feature tooltalk "tooltalk-util") - ;; (when-feature tooltalk "tooltalk-init") - ;; "vc-hooks" ; Packaged. Available in two versions. - ;; "ediff-hook" ; Packaged. - "fontl-hooks" - "auto-show" - (when-feature ldap "ldap") - -;; (when-feature energize "energize/energize-load.el") -;;; formerly in sunpro/sunpro-load.el -;; (when-feature (and mule sparcworks) "mime-setup") - - ;; Moved to Sun package - ;; (when-feature sparcworks "cc-mode") ; Requires cc-mode package - ;; (when-feature sparcworks "sunpro-init") - ;; (when-feature sparcworks "ring") - ;; (when-feature sparcworks "comint") ; Requires comint package - ;; (when-feature sparcworks "annotations") - -;;; formerly in eos/sun-eos-load.el -;; (when-feature sparcworks "sun-eos-init") -;; (when-feature sparcworks "sun-eos-common") -;; (when-feature sparcworks "sun-eos-editor") -;; (when-feature sparcworks "sun-eos-browser") -;; (when-feature sparcworks "sun-eos-debugger") -;; (when-feature sparcworks "sun-eos-debugger-extra") -;; (when-feature sparcworks "sun-eos-menubar") - "loadhist" ; Must be dumped before loaddefs is loaded - "loaddefs" ; <=== autoloads get loaded here -)) diff --cc lisp/files.el index 186043f,591648d..0000000 deleted file mode 100644,100644 --- a/lisp/files.el +++ /dev/null @@@ -1,3252 -1,3291 +1,0 @@@ --;;; files.el --- file input and output commands for XEmacs. -- --;; Copyright (C) 1985-1987, 1992-1995, 1997 Free Software Foundation, Inc. --;; Copyright (C) 1995 Sun Microsystems. -- --;; Maintainer: XEmacs Development Team --;; Keywords: extensions, dumped -- --;; This file is part of XEmacs. -- --;; XEmacs 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 2, or (at your option) --;; any later version. -- --;; XEmacs 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 XEmacs; see the file COPYING. If not, write to the Free --;; Software Foundation, Inc. 59 Temple Place - Suite 330, Boston, MA --;; 02111-1307, USA. -- --;;; Synched up with: FSF 20.3 (but diverging) --;;; Warning: Merging this file is tough. Beware. -- --;;; Commentary: -- --;; This file is dumped with XEmacs. -- --;; Defines most of XEmacs's file- and directory-handling functions, --;; including basic file visiting, backup generation, link handling, --;; ITS-id version control, load- and write-hook handling, and the like. -- --;;; Code: -- --;; XEmacs: Avoid compilation warnings. --(defvar coding-system-for-read) --(defvar buffer-file-coding-system) -- --(defgroup files nil -- "Support editing files." -- :group 'emacs) -- --(defgroup backup nil -- "Backups of edited data files." -- :group 'files) -- --(defgroup find-file nil -- "Finding and editing files." -- :group 'files) -- -- --;; XEmacs: In buffer.c --;(defconst delete-auto-save-files t --; "*Non-nil means delete auto-save file when a buffer is saved or killed.") -- --;; FSF has automount-dir-prefix. Our directory-abbrev-alist is more general. --;; note: tmp_mnt bogosity conversion is established in paths.el. --(defcustom directory-abbrev-alist nil -- "*Alist of abbreviations for file directories. --A list of elements of the form (FROM . TO), each meaning to replace --FROM with TO when it appears in a directory name. --This replacement is done when setting up the default directory of a --newly visited file. *Every* FROM string should start with \\\\` or ^. -- --Use this feature when you have directories which you normally refer to --via absolute symbolic links or to eliminate automounter mount points --from the beginning of your filenames. Make TO the name of the link, --and FROM the name it is linked to." -- :type '(repeat (cons :format "%v" -- :value ("\\`" . "") -- (regexp :tag "From") -- (regexp :tag "To"))) -- :group 'find-file) -- - (defcustom make-backup-files t - "*Non-nil means make a backup of a file the first time it is saved. - This can be done by renaming the file or by copying. - - Renaming means that XEmacs renames the existing file so that it is a - backup file, then writes the buffer into a new file. Any other names - that the old file had will now refer to the backup file. The new file - is owned by you and its group is defaulted. - - Copying means that XEmacs copies the existing file into the backup - file, then writes the buffer on top of the existing file. Any other - names that the old file had will now refer to the new (edited) file. - The file's owner and group are unchanged. - - The choice of renaming or copying is controlled by the variables - `backup-by-copying', `backup-by-copying-when-linked' and - `backup-by-copying-when-mismatch'. See also `backup-inhibited'." - :type 'boolean - :group 'backup) - - ;; Do this so that local variables based on the file name - ;; are not overridden by the major mode. - (defvar backup-inhibited nil - "Non-nil means don't make a backup, regardless of the other parameters. - This variable is intended for use by making it local to a buffer. - But it is local only if you make it local.") - (put 'backup-inhibited 'permanent-local t) - - (defcustom backup-by-copying nil - "*Non-nil means always use copying to create backup files. - See documentation of variable `make-backup-files'." - :type 'boolean - :group 'backup) - - (defcustom backup-by-copying-when-linked nil - "*Non-nil means use copying to create backups for files with multiple names. - This causes the alternate names to refer to the latest version as edited. - This variable is relevant only if `backup-by-copying' is nil." - :type 'boolean - :group 'backup) - - (defcustom backup-by-copying-when-mismatch nil - "*Non-nil means create backups by copying if this preserves owner or group. - Renaming may still be used (subject to control of other variables) - when it would not result in changing the owner or group of the file; - that is, for files which are owned by you and whose group matches - the default for a new file created there by you. - This variable is relevant only if `backup-by-copying' is nil." - :type 'boolean - :group 'backup) - - (defvar backup-enable-predicate - #'(lambda (name) - (not (or (null name) - (string-match "^/tmp/" name) - (let ((tmpdir (temp-directory))) - (and tmpdir - (string-match (concat "\\`" (regexp-quote tmpdir) "/") - tmpdir)))))) - "Predicate that looks at a file name and decides whether to make backups. - Called with an absolute file name as argument, it returns t to enable backup.") - - (defcustom buffer-offer-save nil - "*Non-nil in a buffer means offer to save the buffer on exit - even if the buffer is not visiting a file. - Automatically local in all buffers." - :type 'boolean - :group 'find-file) - (make-variable-buffer-local 'buffer-offer-save) - - ;; FSF uses normal defconst - (defvaralias 'find-file-visit-truename 'find-file-use-truenames) - (defvaralias 'find-file-existing-other-name 'find-file-compare-truenames) - - (defcustom revert-without-query nil - "*Specify which files should be reverted without query. - The value is a list of regular expressions. - If the file name matches one of these regular expressions, - then `revert-buffer' reverts the file without querying - if the file has changed on disk and you have not edited the buffer." - :type '(repeat (regexp "")) - :group 'find-file) - - (defvar buffer-file-number nil - "The device number and file number of the file visited in the current buffer. - The value is a list of the form (FILENUM DEVNUM). - This pair of numbers uniquely identifies the file. - If the buffer is visiting a new file, the value is nil.") - (make-variable-buffer-local 'buffer-file-number) - (put 'buffer-file-number 'permanent-local t) - - (defvar buffer-file-numbers-unique (not (memq system-type '(windows-nt))) - "Non-nil means that buffer-file-number uniquely identifies files.") - - (defcustom file-precious-flag nil - "*Non-nil means protect against I/O errors while saving files. - Some modes set this non-nil in particular buffers. - - This feature works by writing the new contents into a temporary file - and then renaming the temporary file to replace the original. - In this way, any I/O error in writing leaves the original untouched, - and there is never any instant where the file is nonexistent. - - Note that this feature forces backups to be made by copying. - Yet, at the same time, saving a precious file - breaks any hard links between it and other files." - :type 'boolean - :group 'backup) - - (defcustom version-control nil - "*Control use of version numbers for backup files. - t means make numeric backup versions unconditionally. - nil means make them for files that have some already. - `never' means do not make them." - :type 'boolean - :group 'backup - :group 'vc) - - ;; This is now defined in efs. - ;(defvar dired-kept-versions 2 - ; "*When cleaning directory, number of versions to keep.") - - (defcustom delete-old-versions nil - "*If t, delete excess backup versions silently. - If nil, ask confirmation. Any other value prevents any trimming." - :type '(choice (const :tag "Delete" t) - (const :tag "Ask" nil) - (sexp :tag "Leave" :format "%t\n" other)) - :group 'backup) - - (defcustom kept-old-versions 2 - "*Number of oldest versions to keep when a new numbered backup is made." - :type 'integer - :group 'backup) - - (defcustom kept-new-versions 2 - "*Number of newest versions to keep when a new numbered backup is made. - Includes the new backup. Must be > 0" - :type 'integer - :group 'backup) - - (defcustom require-final-newline nil - "*Value of t says silently ensure a file ends in a newline when it is saved. - Non-nil but not t says ask user whether to add a newline when there isn't one. - nil means don't add newlines." - :type '(choice (const :tag "Off" nil) - (const :tag "Add" t) - (sexp :tag "Ask" :format "%t\n" ask)) - :group 'editing-basics) - - (defcustom auto-save-default t - "*Non-nil says by default do auto-saving of every file-visiting buffer." - :type 'boolean - :group 'auto-save) - - (defcustom auto-save-visited-file-name nil - "*Non-nil says auto-save a buffer in the file it is visiting, when practical. - Normally auto-save files are written under other names." - :type 'boolean - :group 'auto-save) - - (defcustom save-abbrevs nil - "*Non-nil means save word abbrevs too when files are saved. - Loading an abbrev file sets this to t." - :type 'boolean - :group 'abbrev) - - (defcustom find-file-run-dired t - "*Non-nil says run dired if `find-file' is given the name of a directory." - :type 'boolean - :group 'find-file) - - ;;;It is not useful to make this a local variable. - ;;;(put 'find-file-not-found-hooks 'permanent-local t) - (defvar find-file-not-found-hooks nil - "List of functions to be called for `find-file' on nonexistent file. - These functions are called as soon as the error is detected. - `buffer-file-name' is already set up. - The functions are called in the order given until one of them returns non-nil.") - - ;;;It is not useful to make this a local variable. - ;;;(put 'find-file-hooks 'permanent-local t) - (defvar find-file-hooks nil - "List of functions to be called after a buffer is loaded from a file. - The buffer's local variables (if any) will have been processed before the - functions are called.") - - (defvar write-file-hooks nil - "List of functions to be called before writing out a buffer to a file. - If one of them returns non-nil, the file is considered already written - and the rest are not called. - These hooks are considered to pertain to the visited file. - So this list is cleared if you change the visited file name. - See also `write-contents-hooks' and `continue-save-buffer'.") - ;;; However, in case someone does make it local... - (put 'write-file-hooks 'permanent-local t) - - (defvar local-write-file-hooks nil - "Just like `write-file-hooks', except intended for per-buffer use. - The functions in this list are called before the ones in - `write-file-hooks'. - - This variable is meant to be used for hooks that have to do with a - particular visited file. Therefore, it is a permanent local, so that - changing the major mode does not clear it. However, calling - `set-visited-file-name' does clear it.") - (make-variable-buffer-local 'local-write-file-hooks) - (put 'local-write-file-hooks 'permanent-local t) - - - ;; #### think about this (added by Sun). - (put 'after-set-visited-file-name-hooks 'permanent-local t) - (defvar after-set-visited-file-name-hooks nil - "List of functions to be called after \\[set-visited-file-name] - or during \\[write-file]. - You can use this hook to restore local values of write-file-hooks, - after-save-hook, and revert-buffer-function, which pertain - to a specific file and therefore are normally killed by a rename. - Put hooks pertaining to the buffer contents on write-contents-hooks - and revert-buffer-insert-file-contents-function.") - - (defvar write-contents-hooks nil - "List of functions to be called before writing out a buffer to a file. - If one of them returns non-nil, the file is considered already written - and the rest are not called. - These hooks are considered to pertain to the buffer's contents, - not to the particular visited file; thus, `set-visited-file-name' does - not clear this variable, but changing the major mode does clear it. - See also `write-file-hooks' and `continue-save-buffer'.") - - ;; XEmacs addition - ;; Energize needed this to hook into save-buffer at a lower level; we need - ;; to provide a new output method, but don't want to have to duplicate all - ;; of the backup file and file modes logic.that does not occur if one uses - ;; a write-file-hook which returns non-nil. - (put 'write-file-data-hooks 'permanent-local t) - (defvar write-file-data-hooks nil - "List of functions to be called to put the bytes on disk. - These functions receive the name of the file to write to as argument. - The default behavior is to call - (write-region (point-min) (point-max) filename nil t) - If one of them returns non-nil, the file is considered already written - and the rest are not called. - These hooks are considered to pertain to the visited file. - So this list is cleared if you change the visited file name. - See also `write-file-hooks'.") - - (defcustom enable-local-variables t - "*Control use of local-variables lists in files you visit. - The value can be t, nil or something else. - A value of t means local-variables lists are obeyed; - nil means they are ignored; anything else means query. - - The command \\[normal-mode] always obeys local-variables lists - and ignores this variable." - :type '(choice (const :tag "Obey" t) - (const :tag "Ignore" nil) - (sexp :tag "Query" :format "%t\n" other)) - :group 'find-file) - - (defcustom enable-local-eval 'maybe - "*Control processing of the \"variable\" `eval' in a file's local variables. - The value can be t, nil or something else. - A value of t means obey `eval' variables; - nil means ignore them; anything else means query. - - The command \\[normal-mode] always obeys local-variables lists - and ignores this variable." - :type '(choice (const :tag "Obey" t) - (const :tag "Ignore" nil) - (sexp :tag "Query" :format "%t\n" other)) - :group 'find-file) - - ;; Avoid losing in versions where CLASH_DETECTION is disabled. - (or (fboundp 'lock-buffer) - (defalias 'lock-buffer 'ignore)) - (or (fboundp 'unlock-buffer) - (defalias 'unlock-buffer 'ignore)) - - ;;FSFmacs bastardized ange-ftp cruft - ;; This hook function provides support for ange-ftp host name - ;; completion. It runs the usual ange-ftp hook, but only for - ;; completion operations. Having this here avoids the need - ;; to load ange-ftp when it's not really in use. - ;(defun ange-ftp-completion-hook-function (op &rest args) - ; (if (memq op '(file-name-completion file-name-all-completions)) - ; (apply 'ange-ftp-hook-function op args) - ; (let ((inhibit-file-name-handlers - ; (cons 'ange-ftp-completion-hook-function - ; (and (eq inhibit-file-name-operation op) - ; inhibit-file-name-handlers))) - ; (inhibit-file-name-operation op)) - ; (apply op args)) - - (defun convert-standard-filename (filename) - "Convert a standard file's name to something suitable for the current OS. - This function's standard definition is trivial; it just returns the argument. - However, on some systems, the function is redefined - with a definition that really does change some file names." - filename) - - (defun pwd () - "Show the current default directory." - (interactive nil) - (message "Directory %s" default-directory)) - - (defvar cd-path nil - "Value of the CDPATH environment variable, as a list. - Not actually set up until the first time you use it.") - - (defvar cdpath-previous nil - "Prior value of the CDPATH environment variable.") - - (defun parse-colon-path (cd-path) - "Explode a colon-separated search path into a list of directory names. - - If you think you want to use this, you probably don't. This function - is provided for backward compatibility. A more robust implementation - of the same functionality is available as `split-path', which see." - (and cd-path - (let (cd-list (cd-start 0) cd-colon) - (setq cd-path (concat cd-path path-separator)) - (while (setq cd-colon (string-match path-separator cd-path cd-start)) - (setq cd-list - (nconc cd-list - (list (if (= cd-start cd-colon) - nil - (substitute-in-file-name - (file-name-as-directory - (substring cd-path cd-start cd-colon))))))) - (setq cd-start (+ cd-colon 1))) - cd-list))) - - (defun cd-absolute (dir) - "Change current directory to given absolute file name DIR." - ;; Put the name into directory syntax now, - ;; because otherwise expand-file-name may give some bad results. - (setq dir (file-name-as-directory dir)) - ;; XEmacs change: stig@hackvan.com - (if find-file-use-truenames - (setq dir (file-truename dir))) - (setq dir (abbreviate-file-name (expand-file-name dir))) - (cond ((not (file-directory-p dir)) - (error "%s is not a directory" dir)) - ;; this breaks ange-ftp, which doesn't (can't?) overload `file-executable-p'. - ;;((not (file-executable-p dir)) - ;; (error "Cannot cd to %s: Permission denied" dir)) - (t - (setq default-directory dir)))) - - (defun cd (dir) - "Make DIR become the current buffer's default directory. - If your environment includes a `CDPATH' variable, try each one of that - colon-separated list of directories when resolving a relative directory name." - (interactive - ;; XEmacs change? (read-file-name => read-directory-name) - (list (read-directory-name "Change default directory: " - default-directory default-directory - (and (member cd-path '(nil ("./"))) - (null (getenv "CDPATH")))))) - (if (file-name-absolute-p dir) - (cd-absolute (expand-file-name dir)) - ;; XEmacs - (unless (and cd-path (equal (getenv "CDPATH") cdpath-previous)) - ;;#### Unix-specific - (let ((trypath (parse-colon-path - (setq cdpath-previous (getenv "CDPATH"))))) - (setq cd-path (or trypath (list "./"))))) - (or (catch 'found - (mapcar #'(lambda (x) - (let ((f (expand-file-name (concat x dir)))) - (if (file-directory-p f) - (progn - (cd-absolute f) - (throw 'found t))))) - cd-path) - nil) - ;; jwz: give a better error message to those of us with the - ;; good taste not to use a kludge like $CDPATH. - (if (equal cd-path '("./")) - (error "No such directory: %s" (expand-file-name dir)) - (error "Directory not found in $CDPATH: %s" dir))))) - - (defun load-file (file) - "Load the Lisp file named FILE." - (interactive "fLoad file: ") - (load (expand-file-name file) nil nil t)) - - ; We now dump utils/lib-complete.el which has improved versions of this. - ;(defun load-library (library) - ; "Load the library named LIBRARY. - ;This is an interface to the function `load'." - ; (interactive "sLoad library: ") - ; (load library)) - ; - ;(defun find-library (library) - ; "Find the library of Lisp code named LIBRARY. - ;This searches `load-path' for a file named either \"LIBRARY\" or \"LIBRARY.el\"." - ; (interactive "sFind library file: ") - ; (let ((f (locate-file library load-path ":.el:"))) - ; (if f - ; (find-file f) - ; (error "Couldn't locate library %s" library)))) - - (defun file-local-copy (file &optional buffer) - "Copy the file FILE into a temporary file on this machine. - Returns the name of the local copy, or nil, if FILE is directly - accessible." - (let ((handler (find-file-name-handler file 'file-local-copy))) - (if handler - (funcall handler 'file-local-copy file) - nil))) - - ;; XEmacs change block - ; We have this in C and use the realpath() system call. - - ;(defun file-truename (filename &optional counter prev-dirs) - ; [... lots of code snipped ...] - ; filename)) - - ;; XEmacs addition. Called from `insert-file-contents-internal' - ;; at the appropriate time. - (defun compute-buffer-file-truename (&optional buffer) - "Recompute BUFFER's value of `buffer-file-truename' - based on the current value of `buffer-file-name'. - BUFFER defaults to the current buffer if unspecified." - (save-excursion - (set-buffer (or buffer (current-buffer))) - (cond ((null buffer-file-name) - (setq buffer-file-truename nil)) - ((setq buffer-file-truename (file-truename buffer-file-name)) - ;; it exists, we're done. - nil) - (t - ;; the file doesn't exist, but maybe the directory does. - (let* ((dir (file-name-directory buffer-file-name)) - (truedir (file-truename dir))) - (if truedir (setq dir truedir)) - (setq buffer-file-truename - (expand-file-name (file-name-nondirectory buffer-file-name) - dir))))) - (if (and find-file-use-truenames buffer-file-truename) - (setq buffer-file-name (abbreviate-file-name buffer-file-truename) - default-directory (file-name-directory buffer-file-name))) - buffer-file-truename)) - ;; End XEmacs change block - - (defun file-chase-links (filename) - "Chase links in FILENAME until a name that is not a link. - Does not examine containing directories for links, - unlike `file-truename'." - (let (tem (count 100) (newname filename)) - (while (setq tem (file-symlink-p newname)) - (save-match-data - (if (= count 0) - (error "Apparent cycle of symbolic links for %s" filename)) - ;; In the context of a link, `//' doesn't mean what XEmacs thinks. - (while (string-match "//+" tem) - (setq tem (concat (substring tem 0 (1+ (match-beginning 0))) - (substring tem (match-end 0))))) - ;; Handle `..' by hand, since it needs to work in the - ;; target of any directory symlink. - ;; This code is not quite complete; it does not handle - ;; embedded .. in some cases such as ./../foo and foo/bar/../../../lose. - (while (string-match "\\`\\.\\./" tem) ;#### Unix specific - (setq tem (substring tem 3)) - (setq newname (file-name-as-directory - ;; Do the .. by hand. - (directory-file-name - (file-name-directory - ;; Chase links in the default dir of the symlink. - (file-chase-links - (directory-file-name - (file-name-directory newname)))))))) - (setq newname (expand-file-name tem (file-name-directory newname))) - (setq count (1- count)))) - newname)) - - (defun switch-to-other-buffer (arg) - "Switch to the previous buffer. With a numeric arg, n, switch to the nth - most recent buffer. With an arg of 0, buries the current buffer at the - bottom of the buffer stack." - (interactive "p") - (if (eq arg 0) - (bury-buffer (current-buffer))) - (switch-to-buffer - (if (<= arg 1) (other-buffer (current-buffer)) - (nth (1+ arg) (buffer-list))))) - - (defun switch-to-buffer-other-window (buffer) - "Select buffer BUFFER in another window." - (interactive "BSwitch to buffer in other window: ") - (let ((pop-up-windows t)) - ;; XEmacs: this used to have (selected-frame) as the third argument, - ;; but this is obnoxious. If the user wants the buffer in a - ;; different frame, then it should be this way. - - ;; Change documented above undone --mrb - (pop-to-buffer buffer t (selected-frame)))) - - (defun switch-to-buffer-other-frame (buffer) - "Switch to buffer BUFFER in a newly-created frame." - (interactive "BSwitch to buffer in other frame: ") - (let* ((name (get-frame-name-for-buffer buffer)) - (frame (make-frame (if name - (list (cons 'name (symbol-name name))))))) - (pop-to-buffer buffer t frame) - (make-frame-visible frame) - buffer)) - - (defun find-file (filename &optional codesys) - "Edit file FILENAME. - Switch to a buffer visiting file FILENAME, - creating one if none already exists. - Under XEmacs/Mule, optional second argument specifies the - coding system to use when decoding the file. Interactively, - with a prefix argument, you will be prompted for the coding system." - (interactive "FFind file: \nZCoding system: ") - (if codesys - (let ((coding-system-for-read - (get-coding-system codesys))) - (switch-to-buffer (find-file-noselect filename))) - (switch-to-buffer (find-file-noselect filename)))) - - (defun find-file-other-window (filename &optional codesys) - "Edit file FILENAME, in another window. - May create a new window, or reuse an existing one. - See the function `display-buffer'. - Under XEmacs/Mule, optional second argument specifies the - coding system to use when decoding the file. Interactively, - with a prefix argument, you will be prompted for the coding system." - (interactive "FFind file in other window: \nZCoding system: ") - (if codesys - (let ((coding-system-for-read - (get-coding-system codesys))) - (switch-to-buffer-other-window (find-file-noselect filename))) - (switch-to-buffer-other-window (find-file-noselect filename)))) - - (defun find-file-other-frame (filename &optional codesys) - "Edit file FILENAME, in a newly-created frame. - Under XEmacs/Mule, optional second argument specifies the - coding system to use when decoding the file. Interactively, - with a prefix argument, you will be prompted for the coding system." - (interactive "FFind file in other frame: \nZCoding system: ") - (if codesys - (let ((coding-system-for-read - (get-coding-system codesys))) - (switch-to-buffer-other-frame (find-file-noselect filename))) - (switch-to-buffer-other-frame (find-file-noselect filename)))) - - (defun find-file-read-only (filename &optional codesys) - "Edit file FILENAME but don't allow changes. - Like \\[find-file] but marks buffer as read-only. - Use \\[toggle-read-only] to permit editing. - Under XEmacs/Mule, optional second argument specifies the - coding system to use when decoding the file. Interactively, - with a prefix argument, you will be prompted for the coding system." - (interactive "fFind file read-only: \nZCoding system: ") - (if codesys - (let ((coding-system-for-read - (get-coding-system codesys))) - (find-file filename)) - (find-file filename)) - (setq buffer-read-only t) - (current-buffer)) - - (defun find-file-read-only-other-window (filename &optional codesys) - "Edit file FILENAME in another window but don't allow changes. - Like \\[find-file-other-window] but marks buffer as read-only. - Use \\[toggle-read-only] to permit editing. - Under XEmacs/Mule, optional second argument specifies the - coding system to use when decoding the file. Interactively, - with a prefix argument, you will be prompted for the coding system." - (interactive "fFind file read-only other window: \nZCoding system: ") - (if codesys - (let ((coding-system-for-read - (get-coding-system codesys))) - (find-file-other-window filename)) - (find-file-other-window filename)) - (setq buffer-read-only t) - (current-buffer)) - - (defun find-file-read-only-other-frame (filename &optional codesys) - "Edit file FILENAME in another frame but don't allow changes. - Like \\[find-file-other-frame] but marks buffer as read-only. - Use \\[toggle-read-only] to permit editing. - Under XEmacs/Mule, optional second argument specifies the - coding system to use when decoding the file. Interactively, - with a prefix argument, you will be prompted for the coding system." - (interactive "fFind file read-only other frame: \nZCoding system: ") - (if codesys - (let ((coding-system-for-read - (get-coding-system codesys))) - (find-file-other-frame filename)) - (find-file-other-frame filename)) - (setq buffer-read-only t) - (current-buffer)) - - (defun find-alternate-file-other-window (filename &optional codesys) - "Find file FILENAME as a replacement for the file in the next window. - This command does not select that window. - Under XEmacs/Mule, optional second argument specifies the - coding system to use when decoding the file. Interactively, - with a prefix argument, you will be prompted for the coding system." - (interactive - (save-selected-window - (other-window 1) - (let ((file buffer-file-name) - (file-name nil) - (file-dir nil)) - (and file - (setq file-name (file-name-nondirectory file) - file-dir (file-name-directory file))) - (list (read-file-name - "Find alternate file: " file-dir nil nil file-name) - (if (and current-prefix-arg (featurep 'mule)) - (read-coding-system "Coding-system: ")))))) - (if (one-window-p) - (find-file-other-window filename) - (save-selected-window - (other-window 1) - (find-alternate-file filename codesys)))) - - (defun find-alternate-file (filename &optional codesys) - "Find file FILENAME, select its buffer, kill previous buffer. - If the current buffer now contains an empty file that you just visited - \(presumably by mistake), use this command to visit the file you really want. - Under XEmacs/Mule, optional second argument specifies the - coding system to use when decoding the file. Interactively, - with a prefix argument, you will be prompted for the coding system." - (interactive - (let ((file buffer-file-name) - (file-name nil) - (file-dir nil)) - (and file - (setq file-name (file-name-nondirectory file) - file-dir (file-name-directory file))) - (list (read-file-name - "Find alternate file: " file-dir nil nil file-name) - (if (and current-prefix-arg (featurep 'mule)) - (read-coding-system "Coding-system: "))))) - (and (buffer-modified-p) (buffer-file-name) - ;; (not buffer-read-only) - (not (yes-or-no-p (format - "Buffer %s is modified; kill anyway? " - (buffer-name)))) - (error "Aborted")) - (let ((obuf (current-buffer)) - (ofile buffer-file-name) - (onum buffer-file-number) - (otrue buffer-file-truename) - (oname (buffer-name))) - (if (get-buffer " **lose**") - (kill-buffer " **lose**")) - (rename-buffer " **lose**") - (setq buffer-file-name nil) - (setq buffer-file-number nil) - (setq buffer-file-truename nil) - (unwind-protect - (progn - (unlock-buffer) - (if codesys - (let ((coding-system-for-read - (get-coding-system codesys))) - (find-file filename)) - (find-file filename))) - (cond ((eq obuf (current-buffer)) - (setq buffer-file-name ofile) - (setq buffer-file-number onum) - (setq buffer-file-truename otrue) - (lock-buffer) - (rename-buffer oname)))) - (or (eq (current-buffer) obuf) - (kill-buffer obuf)))) - - (defun create-file-buffer (filename) - "Create a suitably named buffer for visiting FILENAME, and return it. - FILENAME (sans directory) is used unchanged if that name is free; - otherwise a string <2> or <3> or ... is appended to get an unused name." - (let ((handler (find-file-name-handler filename 'create-file-buffer))) - (if handler - (funcall handler 'create-file-buffer filename) - (let ((lastname (file-name-nondirectory filename))) - (if (string= lastname "") - (setq lastname filename)) - (generate-new-buffer lastname))))) - - (defun generate-new-buffer (name) - "Create and return a buffer with a name based on NAME. - Choose the buffer's name using `generate-new-buffer-name'." - (get-buffer-create (generate-new-buffer-name name))) - - (defvar abbreviated-home-dir nil - "The user's homedir abbreviated according to `directory-abbrev-alist'.") - - (defun abbreviate-file-name (filename &optional hack-homedir) - "Return a version of FILENAME shortened using `directory-abbrev-alist'. - See documentation of variable `directory-abbrev-alist' for more information. - If optional argument HACK-HOMEDIR is non-nil, then this also substitutes - \"~\" for the user's home directory." - (let ((handler (find-file-name-handler filename 'abbreviate-file-name))) - (if handler - (funcall handler 'abbreviate-file-name filename hack-homedir) - ;; Get rid of the prefixes added by the automounter. - ;;(if (and (string-match automount-dir-prefix filename) - ;; (file-exists-p (file-name-directory - ;; (substring filename (1- (match-end 0)))))) - ;; (setq filename (substring filename (1- (match-end 0))))) - (let ((tail directory-abbrev-alist)) - ;; If any elt of directory-abbrev-alist matches this name, - ;; abbreviate accordingly. - (while tail - (when (string-match (car (car tail)) filename) - (setq filename - (concat (cdr (car tail)) (substring filename (match-end 0))))) - (setq tail (cdr tail)))) - (when hack-homedir - ;; Compute and save the abbreviated homedir name. - ;; We defer computing this until the first time it's needed, to - ;; give time for directory-abbrev-alist to be set properly. - ;; We include a slash at the end, to avoid spurious matches - ;; such as `/usr/foobar' when the home dir is `/usr/foo'. - (or abbreviated-home-dir - (setq abbreviated-home-dir - (let ((abbreviated-home-dir "$foo")) - (concat "\\`" (regexp-quote (abbreviate-file-name - (expand-file-name "~"))) - "\\(/\\|\\'\\)")))) - ;; If FILENAME starts with the abbreviated homedir, - ;; make it start with `~' instead. - (if (and (string-match abbreviated-home-dir filename) - ;; If the home dir is just /, don't change it. - (not (and (= (match-end 0) 1) ;#### unix-specific - (= (aref filename 0) ?/))) - (not (and (memq system-type '(ms-dos windows-nt)) - (save-match-data - (string-match "^[a-zA-Z]:/$" filename))))) - (setq filename - (concat "~" - (substring filename - (match-beginning 1) (match-end 1)) - (substring filename (match-end 0)))))) - filename))) - - (defcustom find-file-not-true-dirname-list nil - "*List of logical names for which visiting shouldn't save the true dirname." - :type '(repeat (string :tag "Name")) - :group 'find-file) - - ;; This function is needed by FSF vc.el. I hope somebody can make it - ;; work for XEmacs. -sb. - ;; #### In what way does it not work? --hniksic - (defun find-buffer-visiting (filename) - "Return the buffer visiting file FILENAME (a string). - This is like `get-file-buffer', except that it checks for any buffer - visiting the same file, possibly under a different name. - If there is no such live buffer, return nil." - (let ((buf (get-file-buffer filename)) - (truename (abbreviate-file-name (file-truename filename)))) - (or buf - (let ((list (buffer-list)) found) - (while (and (not found) list) - (save-excursion - (set-buffer (car list)) - (if (and buffer-file-name - (string= buffer-file-truename truename)) - (setq found (car list)))) - (setq list (cdr list))) - found) - (let ((number (nthcdr 10 (file-attributes truename))) - (list (buffer-list)) found) - (and buffer-file-numbers-unique - number - (while (and (not found) list) - (save-excursion - (set-buffer (car list)) - (if (and buffer-file-number - (equal buffer-file-number number) - ;; Verify this buffer's file number - ;; still belongs to its file. - (file-exists-p buffer-file-name) - (equal (nthcdr 10 (file-attributes buffer-file-name)) - number)) - (setq found (car list)))) - (setq list (cdr list)))) - found)))) - - (defun insert-file-contents-literally (filename &optional visit beg end replace) - "Like `insert-file-contents', q.v., but only reads in the file. - A buffer may be modified in several ways after reading into the buffer due - to advanced Emacs features, such as file-name-handlers, format decoding, - find-file-hooks, etc. - This function ensures that none of these modifications will take place." - (let ((file-name-handler-alist nil) - (format-alist nil) - (after-insert-file-functions nil) - (find-buffer-file-type-function - (if (fboundp 'find-buffer-file-type) - (symbol-function 'find-buffer-file-type) - nil))) - (unwind-protect - (progn - (fset 'find-buffer-file-type (lambda (filename) t)) - (insert-file-contents filename visit beg end replace)) - (if find-buffer-file-type-function - (fset 'find-buffer-file-type find-buffer-file-type-function) - (fmakunbound 'find-buffer-file-type))))) - - (defun find-file-noselect (filename &optional nowarn rawfile) - "Read file FILENAME into a buffer and return the buffer. - If a buffer exists visiting FILENAME, return that one, but - verify that the file has not changed since visited or saved. - The buffer is not selected, just returned to the caller. - If NOWARN is non-nil, warning messages will be suppressed. - If RAWFILE is non-nil, the file is read literally." - (setq filename (abbreviate-file-name (expand-file-name filename))) - (if (file-directory-p filename) - (if (and (fboundp 'dired-noselect) find-file-run-dired) - (dired-noselect (if find-file-use-truenames - (abbreviate-file-name (file-truename filename)) - filename)) - (error "%s is a directory" filename)) - (let* ((buf (get-file-buffer filename)) - (truename (abbreviate-file-name (file-truename filename))) - (number (nthcdr 10 (file-attributes truename))) - ; ;; Find any buffer for a file which has same truename. - ; (other (and (not buf) (find-buffer-visiting filename))) - (error nil)) - - ; ;; Let user know if there is a buffer with the same truename. - ; (if (and (not buf) same-truename (not nowarn)) - ; (message "%s and %s are the same file (%s)" - ; filename (buffer-file-name same-truename) - ; truename) - ; (if (and (not buf) same-number (not nowarn)) - ; (message "%s and %s are the same file" - ; filename (buffer-file-name same-number)))) - ; ;; Optionally also find that buffer. - ; (if (or find-file-existing-other-name find-file-visit-truename) - ; (setq buf (or same-truename same-number))) - - (when (and buf - (or find-file-compare-truenames find-file-use-truenames) - (not nowarn)) - (save-excursion - (set-buffer buf) - (if (not (string-equal buffer-file-name filename)) - (message "%s and %s are the same file (%s)" - filename buffer-file-name - buffer-file-truename)))) - - (if buf - (or nowarn - (verify-visited-file-modtime buf) - (cond ((not (file-exists-p filename)) - (error "File %s no longer exists!" filename)) - ;; Certain files should be reverted automatically - ;; if they have changed on disk and not in the buffer. - ((and (not (buffer-modified-p buf)) - (dolist (rx revert-without-query nil) - (when (string-match rx filename) - (return t)))) - (with-current-buffer buf - (message "Reverting file %s..." filename) - (revert-buffer t t) - (message "Reverting file %s... done" filename))) - ((yes-or-no-p - (if (string= (file-name-nondirectory filename) - (buffer-name buf)) - (format - (if (buffer-modified-p buf) - (gettext "File %s changed on disk. Discard your edits? ") - (gettext "File %s changed on disk. Reread from disk? ")) - (file-name-nondirectory filename)) - (format - (if (buffer-modified-p buf) - (gettext "File %s changed on disk. Discard your edits in %s? ") - (gettext "File %s changed on disk. Reread from disk into %s? ")) - (file-name-nondirectory filename) - (buffer-name buf)))) - (with-current-buffer buf - (revert-buffer t t))))) - ;; Else: we must create a new buffer for filename - (save-excursion - ;;; The truename stuff makes this obsolete. - ;;; (let* ((link-name (car (file-attributes filename))) - ;;; (linked-buf (and (stringp link-name) - ;;; (get-file-buffer link-name)))) - ;;; (if (bufferp linked-buf) - ;;; (message "Symbolic link to file in buffer %s" - ;;; (buffer-name linked-buf)))) - (setq buf (create-file-buffer filename)) - ;; Catch various signals, such as QUIT, and kill the buffer - ;; in that case. - (condition-case data - (progn - (set-buffer-major-mode buf) - (set-buffer buf) - (erase-buffer) - (condition-case () - (if rawfile - (insert-file-contents-literally filename t) - (insert-file-contents filename t)) - (file-error - (when (and (file-exists-p filename) - (not (file-readable-p filename))) - (signal 'file-error (list "File is not readable" filename))) - (if rawfile - ;; Unconditionally set error - (setq error t) - (or - ;; Run find-file-not-found-hooks until one returns non-nil. - (run-hook-with-args-until-success 'find-file-not-found-hooks) - ;; If they fail too, set error. - (setq error t))))) - ;; Find the file's truename, and maybe use that as visited name. - ;; automatically computed in XEmacs, unless jka-compr was used! - (unless buffer-file-truename - (setq buffer-file-truename truename)) - (setq buffer-file-number number) - (and find-file-use-truenames - ;; This should be in C. Put pathname - ;; abbreviations that have been explicitly - ;; requested back into the pathname. Most - ;; importantly, strip out automounter /tmp_mnt - ;; directories so that auto-save will work - (setq buffer-file-name (abbreviate-file-name buffer-file-name))) - ;; Set buffer's default directory to that of the file. - (setq default-directory (file-name-directory buffer-file-name)) - ;; Turn off backup files for certain file names. Since - ;; this is a permanent local, the major mode won't eliminate it. - (and (not (funcall backup-enable-predicate buffer-file-name)) - (progn - (make-local-variable 'backup-inhibited) - (setq backup-inhibited t))) - (if rawfile - ;; #### FSF 20.3 sets buffer-file-coding-system to - ;; `no-conversion' here. Should we copy? It also - ;; makes `find-file-literally' a local variable - ;; and sets it to t. - nil - (after-find-file error (not nowarn)) - (setq buf (current-buffer)))) - (t - (kill-buffer buf) - (signal (car data) (cdr data)))))) - buf))) - - ;; FSF has `insert-file-literally' and `find-file-literally' here. - - (defvar after-find-file-from-revert-buffer nil) - - (defun after-find-file (&optional error warn noauto - after-find-file-from-revert-buffer - nomodes) - "Called after finding a file and by the default revert function. - Sets buffer mode, parses local variables. - Optional args ERROR, WARN, and NOAUTO: ERROR non-nil means there was an - error in reading the file. WARN non-nil means warn if there - exists an auto-save file more recent than the visited file. - NOAUTO means don't mess with auto-save mode. - Fourth arg AFTER-FIND-FILE-FROM-REVERT-BUFFER non-nil - means this call was from `revert-buffer'. - Fifth arg NOMODES non-nil means don't alter the file's modes. - Finishes by calling the functions in `find-file-hooks'." - (setq buffer-read-only (not (file-writable-p buffer-file-name))) - (if noninteractive - nil - (let* (not-serious - (msg - (cond ((and error (file-attributes buffer-file-name)) - (setq buffer-read-only t) - (gettext "File exists, but cannot be read.")) - ((not buffer-read-only) - (if (and warn - (file-newer-than-file-p (make-auto-save-file-name) - buffer-file-name)) - (format "%s has auto save data; consider M-x recover-file" - (file-name-nondirectory buffer-file-name)) - (setq not-serious t) - (if error (gettext "(New file)") nil))) - ((not error) - (setq not-serious t) - (gettext "Note: file is write protected")) - ((file-attributes (directory-file-name default-directory)) - (gettext "File not found and directory write-protected")) - ((file-exists-p (file-name-directory buffer-file-name)) - (setq buffer-read-only nil)) - (t - ;; If the directory the buffer is in doesn't exist, - ;; offer to create it. It's better to do this now - ;; than when we save the buffer, because we want - ;; autosaving to work. - (setq buffer-read-only nil) - ;; XEmacs - (or (file-exists-p (file-name-directory buffer-file-name)) - (condition-case nil - (if (yes-or-no-p - (format - "\ - The directory containing %s does not exist. Create? " - (abbreviate-file-name buffer-file-name))) - (make-directory (file-name-directory - buffer-file-name) - t)) - (quit - (kill-buffer (current-buffer)) - (signal 'quit nil)))) - nil)))) - (if msg - (progn - (message "%s" msg) - (or not-serious (sit-for 1 t))))) - (if (and auto-save-default (not noauto)) - (auto-save-mode t))) - (unless nomodes - (normal-mode t) - (run-hooks 'find-file-hooks))) - - (defun normal-mode (&optional find-file) - "Choose the major mode for this buffer automatically. - Also sets up any specified local variables of the file. - Uses the visited file name, the -*- line, and the local variables spec. - - This function is called automatically from `find-file'. In that case, - we may set up specified local variables depending on the value of - `enable-local-variables': if it is t, we do; if it is nil, we don't; - otherwise, we query. `enable-local-variables' is ignored if you - run `normal-mode' explicitly." - (interactive) - (or find-file (funcall (or default-major-mode 'fundamental-mode))) - (and (condition-case err - (progn (set-auto-mode) - t) - (error (message "File mode specification error: %s" - (prin1-to-string err)) - nil)) - (condition-case err - (hack-local-variables (not find-file)) - (error (lwarn 'local-variables 'warning - "File local-variables error: %s" - (error-message-string err)))))) - - ;; #### This variable sucks in the package model. There should be a - ;; way for new packages to add their entries to auto-mode-alist in a - ;; clean way. Per Abrahamsen suggested splitting auto-mode-alist to - ;; several distinct variables such as, in order of precedence, - ;; `user-auto-mode-alist' for users, `package-auto-mode-alist' for - ;; packages and `auto-mode-alist' (which might also be called - ;; `default-auto-mode-alist') for default stuff, such as some of the - ;; entries below. - - (defvar auto-mode-alist - '(("\\.te?xt\\'" . text-mode) - ("\\.[chi]\\'" . c-mode) - ("\\.el\\'" . emacs-lisp-mode) - ("\\.\\(?:[CH]\\|cc\\|hh\\)\\'" . c++-mode) - ("\\.[ch]\\(pp\\|xx\\|\\+\\+\\)\\'" . c++-mode) - ("\\.java\\'" . java-mode) - ("\\.idl\\'" . idl-mode) - ("\\.f\\(?:or\\)?\\'" . fortran-mode) - ("\\.F\\(?:OR\\)?\\'" . fortran-mode) - ("\\.[fF]90\\'" . f90-mode) - ;;; Less common extensions come here - ;;; so more common ones above are found faster. - ("\\.\\([pP][Llm]\\|al\\)\\'" . perl-mode) - ("\\.py\\'" . python-mode) - ("\\.texi\\(?:nfo\\)?\\'" . texinfo-mode) - ("\\.ad[abs]\\'" . ada-mode) - ("\\.c?l\\(?:i?sp\\)?\\'" . lisp-mode) - ("\\.p\\(?:as\\)?\\'" . pascal-mode) - ("\\.ltx\\'" . latex-mode) - ("\\.[sS]\\'" . asm-mode) - ("[Cc]hange.?[Ll]og?\\(?:.[0-9]+\\)?\\'" . change-log-mode) - ("\\$CHANGE_LOG\\$\\.TXT" . change-log-mode) - ("\\.scm?\\(?:\\.[0-9]*\\)?\\'" . scheme-mode) - ("\\.e\\'" . eiffel-mode) - ("\\.mss\\'" . scribe-mode) - ("\\.m\\(?:[mes]\\|an\\)\\'" . nroff-mode) - ("\\.icn\\'" . icon-mode) - ("\\.\\(?:[ckz]?sh\\|shar\\)\\'" . sh-mode) - ;; #### Unix-specific! - ("/\\.\\(?:bash_\\|z\\)?\\(profile\\|login\\|logout\\)\\'" . sh-mode) - ("/\\.\\(?:[ckz]sh\\|bash\\|tcsh\\|es\\|xinit\\|startx\\)rc\\'" . sh-mode) - ("/\\.\\(?:[kz]shenv\\|xsession\\)\\'" . sh-mode) - ;; The following come after the ChangeLog pattern for the sake of - ;; ChangeLog.1, etc. and after the .scm.[0-9] pattern too. - ("\\.[12345678]\\'" . nroff-mode) - ("\\.[tT]e[xX]\\'" . tex-mode) - ("\\.\\(?:sty\\|cls\\|bbl\\)\\'" . latex-mode) - ("\\.bib\\'" . bibtex-mode) - ("\\.article\\'" . text-mode) - ("\\.letter\\'" . text-mode) - ("\\.\\(?:tcl\\|exp\\)\\'" . tcl-mode) - ("\\.wrl\\'" . vrml-mode) - ("\\.awk\\'" . awk-mode) - ("\\.prolog\\'" . prolog-mode) - ("\\.\\(?:arc\\|zip\\|lzh\\|zoo\\)\\'" . archive-mode) - ;; Mailer puts message to be edited in /tmp/Re.... or Message - ;; #### Unix-specific! - ("\\`/tmp/Re" . text-mode) - ("/Message[0-9]*\\'" . text-mode) - ("/drafts/[0-9]+\\'" . mh-letter-mode) - ;; some news reader is reported to use this - ("^/tmp/fol/" . text-mode) - ("\\.y\\'" . c-mode) - ("\\.lex\\'" . c-mode) - ("\\.m\\'" . objc-mode) - ("\\.oak\\'" . scheme-mode) - ("\\.s?html?\\'" . html-mode) - ("\\.htm?l?3\\'" . html3-mode) - ("\\.\\(?:sgml?\\|dtd\\)\\'" . sgml-mode) - ("\\.c?ps\\'" . postscript-mode) - ;; .emacs following a directory delimiter in either Unix or - ;; Windows syntax. - ("[/\\][._].*emacs\\'" . emacs-lisp-mode) - ("\\.m4\\'" . autoconf-mode) - ("configure\\.in\\'" . autoconf-mode) - ("\\.ml\\'" . lisp-mode) - ("\\.ma?k\\'" . makefile-mode) - ("[Mm]akefile\\(\\.\\|\\'\\)" . makefile-mode) - ("\\.X\\(defaults\\|environment\\|resources\\|modmap\\)\\'" . xrdb-mode) - ;; #### The following three are Unix-specific (but do we care?) - ("/app-defaults/" . xrdb-mode) - ("\\.[^/]*wm2?\\(?:rc\\)?\\'" . winmgr-mode) - ("\\.\\(?:jpe?g\\|JPE?G\\|png\\|PNG\\|gif\\|GIF\\|tiff?\\|TIFF?\\)\\'" . image-mode) - ) - "Alist of filename patterns vs. corresponding major mode functions. - Each element looks like (REGEXP . FUNCTION) or (REGEXP FUNCTION NON-NIL). - \(NON-NIL stands for anything that is not nil; the value does not matter.) - Visiting a file whose name matches REGEXP specifies FUNCTION as the - mode function to use. FUNCTION will be called, unless it is nil. - - If the element has the form (REGEXP FUNCTION NON-NIL), then after - calling FUNCTION (if it's not nil), we delete the suffix that matched - REGEXP and search the list again for another match.") - - (defvar interpreter-mode-alist - '(("^#!.*csh" . sh-mode) - ("^#!.*\\b\\(scope\\|wish\\|tcl\\|tclsh\\|expect\\)" . tcl-mode) - ("^#!.*sh\\b" . sh-mode) - ("perl" . perl-mode) - ("python" . python-mode) - ("awk\\b" . awk-mode) - ("rexx" . rexx-mode) - ("scm" . scheme-mode) - ("^:" . sh-mode)) - "Alist mapping interpreter names to major modes. - This alist is used to guess the major mode of a file based on the - contents of the first line. This line often contains something like: - #!/bin/sh - but may contain something more imaginative like - #! /bin/env python - or - eval 'exec perl -w -S $0 ${1+\"$@\"}'. - - Each alist element looks like (INTERPRETER . MODE). - The car of each element is a regular expression which is compared - with the name of the interpreter specified in the first line. - If it matches, mode MODE is selected.") - - (defvar binary-file-regexps - (purecopy - '("\\.\\(?:bz2\\|elc\\|g\\(if\\|z\\)\\|jp\\(eg\\|g\\)\\|png\\|t\\(ar\\|gz\\|iff\\)\\|[Zo]\\)\\'")) - "List of regexps of filenames containing binary (non-text) data.") - - ; (eval-when-compile - ; (require 'regexp-opt) - ; (list - ; (format "\\.\\(?:%s\\)\\'" - ; (regexp-opt - ; '("tar" - ; "tgz" - ; "gz" - ; "bz2" - ; "Z" - ; "o" - ; "elc" - ; "png" - ; "gif" - ; "tiff" - ; "jpg" - ; "jpeg")))))) - - (defvar inhibit-first-line-modes-regexps - (purecopy binary-file-regexps) - "List of regexps; if one matches a file name, don't look for `-*-'.") - - (defvar inhibit-first-line-modes-suffixes nil - "List of regexps for what to ignore, for `inhibit-first-line-modes-regexps'. - When checking `inhibit-first-line-modes-regexps', we first discard - from the end of the file name anything that matches one of these regexps.") - - (defvar user-init-file - "" ; set by command-line - "File name including directory of user's initialization file.") - - (defun set-auto-mode (&optional just-from-file-name) - "Select major mode appropriate for current buffer. - This checks for a -*- mode tag in the buffer's text, - compares the filename against the entries in `auto-mode-alist', - or checks the interpreter that runs this file against - `interpreter-mode-alist'. - - It does not check for the `mode:' local variable in the - Local Variables section of the file; for that, use `hack-local-variables'. - - If `enable-local-variables' is nil, this function does not check for a - -*- mode tag. - - If the optional argument JUST-FROM-FILE-NAME is non-nil, - then we do not set anything but the major mode, - and we don't even do that unless it would come from the file name." - (save-excursion - ;; Look for -*-MODENAME-*- or -*- ... mode: MODENAME; ... -*- - ;; Do this by calling the hack-local-variables helper to avoid redundancy. - ;; We bind enable-local-variables to nil this time because we're going to - ;; call hack-local-variables-prop-line again later, "for real." Note that - ;; this temporary binding does not prevent hack-local-variables-prop-line - ;; from setting the major mode. - (or (and enable-local-variables - (let ((enable-local-variables nil)) - (hack-local-variables-prop-line nil)) - ) - ;; It's not in the -*- line, so check the auto-mode-alist, unless - ;; this buffer isn't associated with a file. - (null buffer-file-name) - (let ((name (file-name-sans-versions buffer-file-name)) - (keep-going t)) - (while keep-going - (setq keep-going nil) - (let ((alist auto-mode-alist) - (mode nil)) - ;; Find first matching alist entry. - (let ((case-fold-search - (memq system-type '(windows-nt)))) - (while (and (not mode) alist) - (if (string-match (car (car alist)) name) - (if (and (consp (cdr (car alist))) - (nth 2 (car alist))) - (progn - (setq mode (car (cdr (car alist))) - name (substring name 0 (match-beginning 0)) - keep-going t)) - (setq mode (cdr (car alist)) - keep-going nil))) - (setq alist (cdr alist)))) - (unless just-from-file-name - ;; If we can't deduce a mode from the file name, - ;; look for an interpreter specified in the first line. - (if (and (null mode) - (save-excursion ; XEmacs - (goto-char (point-min)) - (looking-at "#!"))) - (let ((firstline - (buffer-substring - (point-min) - (save-excursion - (goto-char (point-min)) (end-of-line) (point))))) - (setq alist interpreter-mode-alist) - (while alist - (if (string-match (car (car alist)) firstline) - (progn - (setq mode (cdr (car alist))) - (setq alist nil)) - (setq alist (cdr alist))))))) - (if mode - (if (not (fboundp mode)) - (let ((name (package-get-package-provider mode))) - (if name - (message "Mode %s is not installed. Download package %s" mode name) - (message "Mode %s either doesn't exist or is not a known package" mode)) - (sit-for 2) - (error "%s" mode)) - (unless (and just-from-file-name - (or - ;; Don't reinvoke major mode. - (eq mode major-mode) - ;; Don't lose on minor modes. - (assq mode minor-mode-alist))) - (funcall mode)))))))))) - - (defvar hack-local-variables-hook nil - "Normal hook run after processing a file's local variables specs. - Major modes can use this to examine user-specified local variables - in order to initialize other data structure based on them. - - This hook runs even if there were no local variables or if their - evaluation was suppressed. See also `enable-local-variables' and - `enable-local-eval'.") - - (defun hack-local-variables (&optional force) - "Parse, and bind or evaluate as appropriate, any local variables - for current buffer." - ;; Don't look for -*- if this file name matches any - ;; of the regexps in inhibit-first-line-modes-regexps. - (if (or (null buffer-file-name) ; don't lose if buffer has no file! - (not (let ((temp inhibit-first-line-modes-regexps) - (name (if buffer-file-name - (file-name-sans-versions buffer-file-name) - (buffer-name)))) - (while (let ((sufs inhibit-first-line-modes-suffixes)) - (while (and sufs (not - (string-match (car sufs) name))) - (setq sufs (cdr sufs))) - sufs) - (setq name (substring name 0 (match-beginning 0)))) - (while (and temp - (not (string-match (car temp) name))) - (setq temp (cdr temp)) - temp)))) - (progn - ;; Look for variables in the -*- line. - (hack-local-variables-prop-line force) - ;; Look for "Local variables:" block in last page. - (hack-local-variables-last-page force))) - (run-hooks 'hack-local-variables-hook)) - - ;;; Local variables may be specified in the last page of the file (within 3k - ;;; from the end of the file and after the last ^L) in the form - ;;; - ;;; Local variables: - ;;; variable-name: variable-value - ;;; end: - ;;; - ;;; The lines may begin with a common prefix, like ";;; " in the above - ;;; example. They may also have a common suffix (" */" for example). In - ;;; this form, the local variable "mode" can be used to change the major - ;;; mode, and the local variable "eval" can be used to evaluate an arbitrary - ;;; form. - ;;; - ;;; Local variables may also be specified in the first line of the file. - ;;; Embedded in this line are a pair of "-*-" sequences. What lies between - ;;; them are variable-name/variable-value pairs, like: - ;;; - ;;; -*- mode: emacs-lisp -*- - ;;; or -*- mode: postscript; version-control: never -*- - ;;; or -*- tags-file-name: "/foo/bar/TAGS" -*- - ;;; - ;;; The local variable "eval" is not used with this form. For hysterical - ;;; reasons, the syntax "-*- modename -*-" is allowed as well. - ;;; - - (defun hack-local-variables-p (modeline) - (or (eq enable-local-variables t) - (and enable-local-variables - (save-window-excursion - (condition-case nil - (switch-to-buffer (current-buffer)) - (error - ;; If we fail to switch in the selected window, - ;; it is probably a minibuffer. - ;; So try another window. - (condition-case nil - (switch-to-buffer-other-window (current-buffer)) - (error - (switch-to-buffer-other-frame (current-buffer)))))) - (or modeline (save-excursion - (beginning-of-line) - (set-window-start (selected-window) (point)))) - (y-or-n-p (format - "Set local variables as specified %s of %s? " - (if modeline "in -*- line" "at end") - (if buffer-file-name - (file-name-nondirectory buffer-file-name) - (concat "buffer " (buffer-name))))))))) - - (defun hack-local-variables-last-page (&optional force) - ;; Set local variables set in the "Local Variables:" block of the last page. - (save-excursion - (goto-char (point-max)) - (search-backward "\n\^L" (max (- (point-max) 3000) (point-min)) 'move) - (if (let ((case-fold-search t)) - (and (search-forward "Local Variables:" nil t) - (or force - (hack-local-variables-p nil)))) - (let ((continue t) - prefix prefixlen suffix beg - (enable-local-eval enable-local-eval)) - ;; The prefix is what comes before "local variables:" in its line. - ;; The suffix is what comes after "local variables:" in its line. - (skip-chars-forward " \t") - (or (eolp) - (setq suffix (buffer-substring (point) - (progn (end-of-line) (point))))) - (goto-char (match-beginning 0)) - (or (bolp) - (setq prefix - (buffer-substring (point) - (progn (beginning-of-line) (point))))) - (if prefix (setq prefixlen (length prefix) - prefix (regexp-quote prefix))) - (if suffix (setq suffix (concat (regexp-quote suffix) "$"))) - (while continue - ;; Look at next local variable spec. - (if selective-display (re-search-forward "[\n\C-m]") - (forward-line 1)) - ;; Skip the prefix, if any. - (if prefix - (if (looking-at prefix) - (forward-char prefixlen) - (error "Local variables entry is missing the prefix"))) - ;; Find the variable name; strip whitespace. - (skip-chars-forward " \t") - (setq beg (point)) - (skip-chars-forward "^:\n") - (if (eolp) (error "Missing colon in local variables entry")) - (skip-chars-backward " \t") - (let* ((str (buffer-substring beg (point))) - (var (read str)) - val) - ;; Setting variable named "end" means end of list. - (if (string-equal (downcase str) "end") - (setq continue nil) - ;; Otherwise read the variable value. - (skip-chars-forward "^:") - (forward-char 1) - (setq val (read (current-buffer))) - (skip-chars-backward "\n") - (skip-chars-forward " \t") - (or (if suffix (looking-at suffix) (eolp)) - (error "Local variables entry is terminated incorrectly")) - ;; Set the variable. "Variables" mode and eval are funny. - (hack-one-local-variable var val)))))))) - - ;; jwz - New Version 20.1/19.15 - (defun hack-local-variables-prop-line (&optional force) - ;; Set local variables specified in the -*- line. - ;; Returns t if mode was set. - (let ((result nil)) - (save-excursion - (goto-char (point-min)) - (skip-chars-forward " \t\n\r") - (let ((end (save-excursion - ;; If the file begins with "#!" - ;; (un*x exec interpreter magic), look - ;; for mode frobs in the first two - ;; lines. You cannot necessarily - ;; put them in the first line of - ;; such a file without screwing up - ;; the interpreter invocation. - (end-of-line (and (looking-at "^#!") 2)) - (point)))) - ;; Parse the -*- line into the `result' alist. - (cond ((not (search-forward "-*-" end t)) - ;; doesn't have one. - (setq force t)) - ((looking-at "[ \t]*\\([^ \t\n\r:;]+\\)\\([ \t]*-\\*-\\)") - ;; Antiquated form: "-*- ModeName -*-". - (setq result - (list (cons 'mode - (intern (buffer-substring - (match-beginning 1) - (match-end 1))))) - )) - (t - ;; Usual form: '-*-' [ ':' ';' ]* '-*-' - ;; (last ";" is optional). - (save-excursion - (if (search-forward "-*-" end t) - (setq end (- (point) 3)) - (error "-*- not terminated before end of line"))) - (while (< (point) end) - (or (looking-at "[ \t]*\\([^ \t\n:]+\\)[ \t]*:[ \t]*") - (error "malformed -*- line")) - (goto-char (match-end 0)) - ;; There used to be a downcase here, - ;; but the manual didn't say so, - ;; and people want to set var names that aren't all lc. - (let ((key (intern (buffer-substring - (match-beginning 1) - (match-end 1)))) - (val (save-restriction - (narrow-to-region (point) end) - (read (current-buffer))))) - ;; Case sensitivity! Icepicks in my forehead! - (if (equal (downcase (symbol-name key)) "mode") - (setq key 'mode)) - (setq result (cons (cons key val) result)) - (skip-chars-forward " \t;"))) - (setq result (nreverse result)))))) - - (let ((set-any-p (or force - ;; It's OK to force null specifications. - (null result) - ;; It's OK to force mode-only specifications. - (let ((remaining result) - (mode-specs-only t)) - (while remaining - (if (eq (car (car remaining)) 'mode) - (setq remaining (cdr remaining)) - ;; Otherwise, we have a real local. - (setq mode-specs-only nil - remaining nil)) - ) - mode-specs-only) - ;; Otherwise, check. - (hack-local-variables-p t))) - (mode-p nil)) - (while result - (let ((key (car (car result))) - (val (cdr (car result)))) - (cond ((eq key 'mode) - (setq mode-p t) - (let ((mode (intern (concat (downcase (symbol-name val)) - "-mode")))) - ;; Without this guard, `normal-mode' would potentially run - ;; the major mode function twice: once via `set-auto-mode' - ;; and once via `hack-local-variables'. - (if (not (eq mode major-mode)) - (funcall mode)) - )) - (set-any-p - (hack-one-local-variable key val)) - (t - nil))) - (setq result (cdr result))) - mode-p))) - - (defconst ignored-local-variables - (list 'enable-local-eval) - "Variables to be ignored in a file's local variable spec.") - - ;; Get confirmation before setting these variables as locals in a file. - (put 'debugger 'risky-local-variable t) - (put 'enable-local-eval 'risky-local-variable t) - (put 'ignored-local-variables 'risky-local-variable t) - (put 'eval 'risky-local-variable t) - (put 'file-name-handler-alist 'risky-local-variable t) - (put 'minor-mode-map-alist 'risky-local-variable t) - (put 'after-load-alist 'risky-local-variable t) - (put 'buffer-file-name 'risky-local-variable t) - (put 'buffer-auto-save-file-name 'risky-local-variable t) - (put 'buffer-file-truename 'risky-local-variable t) - (put 'exec-path 'risky-local-variable t) - (put 'load-path 'risky-local-variable t) - (put 'exec-directory 'risky-local-variable t) - (put 'process-environment 'risky-local-variable t) - ;; Don't wait for outline.el to be loaded, for the sake of outline-minor-mode. - (put 'outline-level 'risky-local-variable t) - (put 'rmail-output-file-alist 'risky-local-variable t) - - ;; This one is safe because the user gets to check it before it is used. - (put 'compile-command 'safe-local-variable t) - - ;(defun hack-one-local-variable-quotep (exp) - ; (and (consp exp) (eq (car exp) 'quote) (consp (cdr exp)))) - - ;; "Set" one variable in a local variables spec. - ;; A few variable names are treated specially. - (defun hack-one-local-variable (var val) - (cond ((eq var 'mode) - (funcall (intern (concat (downcase (symbol-name val)) - "-mode")))) - ((memq var ignored-local-variables) - nil) - ;; "Setting" eval means either eval it or do nothing. - ;; Likewise for setting hook variables. - ((or (get var 'risky-local-variable) - (and - (string-match "-hooks?$\\|-functions?$\\|-forms?$\\|-program$\\|-command$" - (symbol-name var)) - (not (get var 'safe-local-variable)))) - ; ;; Permit evaling a put of a harmless property - ; ;; if the args do nothing tricky. - ; (if (or (and (eq var 'eval) - ; (consp val) - ; (eq (car val) 'put) - ; (hack-one-local-variable-quotep (nth 1 val)) - ; (hack-one-local-variable-quotep (nth 2 val)) - ; ;; Only allow safe values of lisp-indent-hook; - ; ;; not functions. - ; (or (numberp (nth 3 val)) - ; (equal (nth 3 val) ''defun)) - ; (memq (nth 1 (nth 2 val)) - ; '(lisp-indent-hook))) - (if (and (not (zerop (user-uid))) - (or (eq enable-local-eval t) - (and enable-local-eval - (save-window-excursion - (switch-to-buffer (current-buffer)) - (save-excursion - (beginning-of-line) - (set-window-start (selected-window) (point))) - (setq enable-local-eval - (y-or-n-p (format "Process `eval' or hook local variables in file %s? " - (file-name-nondirectory buffer-file-name)))))))) - (if (eq var 'eval) - (save-excursion (eval val)) - (make-local-variable var) - (set var val)) - (message "Ignoring `eval:' in file's local variables"))) - ;; Ordinary variable, really set it. - (t (make-local-variable var) - (set var val)))) - - (defcustom change-major-mode-with-file-name t - "*Non-nil means \\[write-file] should set the major mode from the file name. - However, the mode will not be changed if - \(1) a local variables list or the `-*-' line specifies a major mode, or - \(2) the current major mode is a \"special\" mode, - \ not suitable for ordinary files, or - \(3) the new file name does not particularly specify any mode." - :type 'boolean - :group 'editing-basics) - - (defun set-visited-file-name (filename &optional no-query along-with-file) - "Change name of file visited in current buffer to FILENAME. - The next time the buffer is saved it will go in the newly specified file. - nil or empty string as argument means make buffer not be visiting any file. - Remember to delete the initial contents of the minibuffer - if you wish to pass an empty string as the argument. - - The optional second argument NO-QUERY, if non-nil, inhibits asking for - confirmation in the case where another buffer is already visiting FILENAME. - - The optional third argument ALONG-WITH-FILE, if non-nil, means that - the old visited file has been renamed to the new name FILENAME." - (interactive "FSet visited file name: ") - (if (buffer-base-buffer) - (error "An indirect buffer cannot visit a file")) - (let (truename) - (if filename - (setq filename - (if (string-equal filename "") - nil - (expand-file-name filename)))) - (if filename - (progn - (setq truename (file-truename filename)) - ;; #### Do we need to check if truename is non-nil? - (if find-file-use-truenames - (setq filename truename)))) - (let ((buffer (and filename (find-buffer-visiting filename)))) - (and buffer (not (eq buffer (current-buffer))) - (not no-query) - (not (y-or-n-p (message "A buffer is visiting %s; proceed? " - filename))) - (error "Aborted"))) - (or (equal filename buffer-file-name) - (progn - (and filename (lock-buffer filename)) - (unlock-buffer))) - (setq buffer-file-name filename) - (if filename ; make buffer name reflect filename. - (let ((new-name (file-name-nondirectory buffer-file-name))) - (if (string= new-name "") - (error "Empty file name")) - (setq default-directory (file-name-directory buffer-file-name)) - (or (string= new-name (buffer-name)) - (rename-buffer new-name t)))) - (setq buffer-backed-up nil) - (or along-with-file - (clear-visited-file-modtime)) - (compute-buffer-file-truename) ; insert-file-contents does this too. - ; ;; Abbreviate the file names of the buffer. - ; (if truename - ; (progn - ; (setq buffer-file-truename (abbreviate-file-name truename)) - ; (if find-file-visit-truename - ; (setq buffer-file-name buffer-file-truename)))) - (setq buffer-file-number - (if filename - (nthcdr 10 (file-attributes buffer-file-name)) - nil))) - ;; write-file-hooks is normally used for things like ftp-find-file - ;; that visit things that are not local files as if they were files. - ;; Changing to visit an ordinary local file instead should flush the hook. - (kill-local-variable 'write-file-hooks) - (kill-local-variable 'after-save-hook) - (kill-local-variable 'local-write-file-hooks) - (kill-local-variable 'write-file-data-hooks) - (kill-local-variable 'revert-buffer-function) - (kill-local-variable 'backup-inhibited) - ;; If buffer was read-only because of version control, - ;; that reason is gone now, so make it writable. - (when (boundp 'vc-mode) - (if vc-mode - (setq buffer-read-only nil)) - (kill-local-variable 'vc-mode)) - ;; Turn off backup files for certain file names. - ;; Since this is a permanent local, the major mode won't eliminate it. - (and buffer-file-name - (not (funcall backup-enable-predicate buffer-file-name)) - (progn - (make-local-variable 'backup-inhibited) - (setq backup-inhibited t))) - (let ((oauto buffer-auto-save-file-name)) - ;; If auto-save was not already on, turn it on if appropriate. - (if (not buffer-auto-save-file-name) - (and buffer-file-name auto-save-default - (auto-save-mode t)) - ;; If auto save is on, start using a new name. - ;; We deliberately don't rename or delete the old auto save - ;; for the old visited file name. This is because perhaps - ;; the user wants to save the new state and then compare with the - ;; previous state from the auto save file. - (setq buffer-auto-save-file-name - (make-auto-save-file-name))) - ;; Rename the old auto save file if any. - (and oauto buffer-auto-save-file-name - (file-exists-p oauto) - (rename-file oauto buffer-auto-save-file-name t))) - (if buffer-file-name - (not along-with-file) - (set-buffer-modified-p t)) - ;; Update the major mode, if the file name determines it. - (condition-case nil - ;; Don't change the mode if it is special. - (or (not change-major-mode-with-file-name) - (get major-mode 'mode-class) - ;; Don't change the mode if the local variable list specifies it. - (hack-local-variables t) - (set-auto-mode t)) - (error nil)) - ;; #### ?? - (run-hooks 'after-set-visited-file-name-hooks)) - - (defun write-file (filename &optional confirm codesys) - "Write current buffer into file FILENAME. - Makes buffer visit that file, and marks it not modified. - If the buffer is already visiting a file, you can specify - a directory name as FILENAME, to write a file of the same - old name in that directory. - If optional second arg CONFIRM is non-nil, - ask for confirmation for overwriting an existing file. - Under XEmacs/Mule, optional third argument specifies the - coding system to use when encoding the file. Interactively, - with a prefix argument, you will be prompted for the coding system." - ;; (interactive "FWrite file: ") - (interactive - (list (if buffer-file-name - (read-file-name "Write file: " - nil nil nil nil) - (read-file-name "Write file: " - (cdr (assq 'default-directory - (buffer-local-variables))) - nil nil (buffer-name))) - t - (if (and current-prefix-arg (featurep 'mule)) - (read-coding-system "Coding system: ")))) - (and (eq (current-buffer) mouse-grabbed-buffer) - (error "Can't write minibuffer window")) - (or (null filename) (string-equal filename "") - (progn - ;; If arg is just a directory, - ;; use same file name, but in that directory. - (if (and (file-directory-p filename) buffer-file-name) - (setq filename (concat (file-name-as-directory filename) - (file-name-nondirectory buffer-file-name)))) - (and confirm - (file-exists-p filename) - (or (y-or-n-p (format "File `%s' exists; overwrite? " filename)) - (error "Canceled"))) - (set-visited-file-name filename))) - (set-buffer-modified-p t) - (setq buffer-read-only nil) - (if codesys - (let ((buffer-file-coding-system (get-coding-system codesys))) - (save-buffer)) - (save-buffer))) - - (defun backup-buffer () - "Make a backup of the disk file visited by the current buffer, if appropriate. - This is normally done before saving the buffer the first time. - If the value is non-nil, it is the result of `file-modes' on the original file; - this means that the caller, after saving the buffer, should change the modes - of the new file to agree with the old modes." - (if buffer-file-name - (let ((handler (find-file-name-handler buffer-file-name 'backup-buffer))) - (if handler - (funcall handler 'backup-buffer) - (if (and make-backup-files - (not backup-inhibited) - (not buffer-backed-up) - (file-exists-p buffer-file-name) - (memq (aref (elt (file-attributes buffer-file-name) 8) 0) - '(?- ?l))) - (let ((real-file-name buffer-file-name) - backup-info backupname targets setmodes) - ;; If specified name is a symbolic link, chase it to the target. - ;; Thus we make the backups in the directory where the real file is. - (setq real-file-name (file-chase-links real-file-name)) - (setq backup-info (find-backup-file-name real-file-name) - backupname (car backup-info) - targets (cdr backup-info)) - ;;; (if (file-directory-p buffer-file-name) - ;;; (error "Cannot save buffer in directory %s" buffer-file-name)) - (if backup-info - (condition-case () - (let ((delete-old-versions - ;; If have old versions to maybe delete, - ;; ask the user to confirm now, before doing anything. - ;; But don't actually delete til later. - (and targets - (or (eq delete-old-versions t) - (eq delete-old-versions nil)) - (or delete-old-versions - (y-or-n-p (format "Delete excess backup versions of %s? " - real-file-name)))))) - ;; Actually write the back up file. - (condition-case () - (if (or file-precious-flag - ; (file-symlink-p buffer-file-name) - backup-by-copying - (and backup-by-copying-when-linked - (> (file-nlinks real-file-name) 1)) - (and backup-by-copying-when-mismatch - (let ((attr (file-attributes real-file-name))) - (or (nth 9 attr) - (not (file-ownership-preserved-p real-file-name)))))) - (condition-case () - (copy-file real-file-name backupname t t) - (file-error - ;; If copying fails because file BACKUPNAME - ;; is not writable, delete that file and try again. - (if (and (file-exists-p backupname) - (not (file-writable-p backupname))) - (delete-file backupname)) - (copy-file real-file-name backupname t t))) - ;; rename-file should delete old backup. - (rename-file real-file-name backupname t) - (setq setmodes (file-modes backupname))) - (file-error - ;; If trouble writing the backup, write it in ~. - (setq backupname (expand-file-name "~/%backup%~")) - (message "Cannot write backup file; backing up in ~/%%backup%%~") - (sleep-for 1) - (condition-case () - (copy-file real-file-name backupname t t) - (file-error - ;; If copying fails because file BACKUPNAME - ;; is not writable, delete that file and try again. - (if (and (file-exists-p backupname) - (not (file-writable-p backupname))) - (delete-file backupname)) - (copy-file real-file-name backupname t t))))) - (setq buffer-backed-up t) - ;; Now delete the old versions, if desired. - (if delete-old-versions - (while targets - (ignore-file-errors (delete-file (car targets))) - (setq targets (cdr targets)))) - setmodes) - (file-error nil))))))))) - - (defun file-name-sans-versions (name &optional keep-backup-version) - "Return FILENAME sans backup versions or strings. - This is a separate procedure so your site-init or startup file can - redefine it. - If the optional argument KEEP-BACKUP-VERSION is non-nil, - we do not remove backup version numbers, only true file version numbers." - (let ((handler (find-file-name-handler name 'file-name-sans-versions))) - (if handler - (funcall handler 'file-name-sans-versions name keep-backup-version) - (substring name 0 - (if keep-backup-version - (length name) - (or (string-match "\\.~[0-9.]+~\\'" name) - ;; XEmacs - VC uses extensions like ".~tagname~" or ".~1.1.5.2~" - (let ((pos (string-match "\\.~\\([^.~ \t]+\\|[0-9.]+\\)~\\'" name))) - (and pos - ;; #### - is this filesystem check too paranoid? - (file-exists-p (substring name 0 pos)) - pos)) - (string-match "~\\'" name) - (length name))))))) - - (defun file-ownership-preserved-p (file) - "Return t if deleting FILE and rewriting it would preserve the owner." - (let ((handler (find-file-name-handler file 'file-ownership-preserved-p))) - (if handler - (funcall handler 'file-ownership-preserved-p file) - (let ((attributes (file-attributes file))) - ;; Return t if the file doesn't exist, since it's true that no - ;; information would be lost by an (attempted) delete and create. - (or (null attributes) - (= (nth 2 attributes) (user-uid))))))) - - (defun file-name-sans-extension (filename) - "Return FILENAME sans final \"extension\". - The extension, in a file name, is the part that follows the last `.'." - (save-match-data - (let ((file (file-name-sans-versions (file-name-nondirectory filename))) - directory) - (if (string-match "\\.[^.]*\\'" file) - (if (setq directory (file-name-directory filename)) - (expand-file-name (substring file 0 (match-beginning 0)) - directory) - (substring file 0 (match-beginning 0))) - filename)))) - - (defun file-name-extension (filename &optional period) - "Return FILENAME's final \"extension\". - The extension, in a file name, is the part that follows the last `.'. - Return nil for extensionless file names such as `foo'. - Return the empty string for file names such as `foo.'. - - If PERIOD is non-nil, then the returned value includes the period - that delimits the extension, and if FILENAME has no extension, - the value is \"\"." - (save-match-data - (let ((file (file-name-sans-versions (file-name-nondirectory filename)))) - (if (string-match "\\.[^.]*\\'" file) - (substring file (+ (match-beginning 0) (if period 0 1))) - (if period - ""))))) - - (defun make-backup-file-name (file) - "Create the non-numeric backup file name for FILE. - This is a separate function so you can redefine it for customization." - (if (eq system-type 'ms-dos) - (let ((fn (file-name-nondirectory file))) - (concat (file-name-directory file) - (if (string-match "\\([^.]*\\)\\(\\..*\\)?" fn) - (substring fn 0 (match-end 1))) - ".bak")) - (concat file "~"))) - - (defun backup-file-name-p (file) - "Return non-nil if FILE is a backup file name (numeric or not). - This is a separate function so you can redefine it for customization. - You may need to redefine `file-name-sans-versions' as well." - (if (eq system-type 'ms-dos) - (string-match "\\.bak\\'" file) - (string-match "~\\'" file))) - - ;; This is used in various files. - ;; The usage of bv-length is not very clean, - ;; but I can't see a good alternative, - ;; so as of now I am leaving it alone. - (defun backup-extract-version (fn) - "Given the name of a numeric backup file, return the backup number. - Uses the free variable `bv-length', whose value should be - the index in the name where the version number begins." - (declare (special bv-length)) - (if (and (string-match "[0-9]+~\\'" fn bv-length) - (= (match-beginning 0) bv-length)) - (string-to-int (substring fn bv-length -1)) - 0)) - - (defun find-backup-file-name (fn) - "Find a file name for a backup file, and suggestions for deletions. - Value is a list whose car is the name for the backup file - and whose cdr is a list of old versions to consider deleting now. - If the value is nil, don't make a backup." - (let ((handler (find-file-name-handler fn 'find-backup-file-name))) - ;; Run a handler for this function so that ange-ftp can refuse to do it. - (if handler - (funcall handler 'find-backup-file-name fn) - (if (eq version-control 'never) - (list (make-backup-file-name fn)) - (let* ((base-versions (concat (file-name-nondirectory fn) ".~")) - ;; used by backup-extract-version: - (bv-length (length base-versions)) - possibilities - (versions nil) - (high-water-mark 0) - (deserve-versions-p nil) - (number-to-delete 0)) - (condition-case () - (setq possibilities (file-name-all-completions - base-versions - (file-name-directory fn)) - versions (sort (mapcar - #'backup-extract-version - possibilities) - '<) - high-water-mark (apply #'max 0 versions) - deserve-versions-p (or version-control - (> high-water-mark 0)) - number-to-delete (- (length versions) - kept-old-versions kept-new-versions -1)) - (file-error - (setq possibilities nil))) - (if (not deserve-versions-p) - (list (make-backup-file-name fn)) - (cons (concat fn ".~" (int-to-string (1+ high-water-mark)) "~") - (if (and (> number-to-delete 0) - ;; Delete nothing if there is overflow - ;; in the number of versions to keep. - (>= (+ kept-new-versions kept-old-versions -1) 0)) - (mapcar #'(lambda (n) - (concat fn ".~" (int-to-string n) "~")) - (let ((v (nthcdr kept-old-versions versions))) - (rplacd (nthcdr (1- number-to-delete) v) ()) - v)))))))))) - - (defun file-nlinks (filename) - "Return number of names file FILENAME has." - (car (cdr (file-attributes filename)))) - - (defun file-relative-name (filename &optional directory) - "Convert FILENAME to be relative to DIRECTORY (default: default-directory). - This function returns a relative file name which is equivalent to FILENAME - when used with that default directory as the default. - If this is impossible (which can happen on MSDOS and Windows - when the file name and directory use different drive names) - then it returns FILENAME." - (save-match-data - (let ((fname (expand-file-name filename))) - (setq directory (file-name-as-directory - (expand-file-name (or directory default-directory)))) - ;; On Microsoft OSes, if FILENAME and DIRECTORY have different - ;; drive names, they can't be relative, so return the absolute name. - (if (and (memq system-type '(ms-dos windows-nt)) - (not (string-equal (substring fname 0 2) - (substring directory 0 2)))) - filename - (let ((ancestor ".") - (fname-dir (file-name-as-directory fname))) - (while (and (not (string-match (concat "^" (regexp-quote directory)) - fname-dir)) - (not (string-match (concat "^" (regexp-quote directory)) fname))) - (setq directory (file-name-directory (substring directory 0 -1)) - ancestor (if (equal ancestor ".") - ".." - (concat "../" ancestor)))) - ;; Now ancestor is empty, or .., or ../.., etc. - (if (string-match (concat "^" (regexp-quote directory)) fname) - ;; We matched within FNAME's directory part. - ;; Add the rest of FNAME onto ANCESTOR. - (let ((rest (substring fname (match-end 0)))) - (if (and (equal ancestor ".") - (not (equal rest ""))) - ;; But don't bother with ANCESTOR if it would give us `./'. - rest - (concat (file-name-as-directory ancestor) rest))) - ;; We matched FNAME's directory equivalent. - ancestor)))))) - - (defun save-buffer (&optional args) - "Save current buffer in visited file if modified. Versions described below. - - By default, makes the previous version into a backup file - if previously requested or if this is the first save. - With 1 or 3 \\[universal-argument]'s, marks this version - to become a backup when the next save is done. - With 2 or 3 \\[universal-argument]'s, - unconditionally makes the previous version into a backup file. - With argument of 0, never makes the previous version into a backup file. - - If a file's name is FOO, the names of its numbered backup versions are - FOO.~i~ for various integers i. A non-numbered backup file is called FOO~. - Numeric backups (rather than FOO~) will be made if value of - `version-control' is not the atom `never' and either there are already - numeric versions of the file being backed up, or `version-control' is - non-nil. - We don't want excessive versions piling up, so there are variables - `kept-old-versions', which tells XEmacs how many oldest versions to keep, - and `kept-new-versions', which tells how many newest versions to keep. - Defaults are 2 old versions and 2 new. - `dired-kept-versions' controls dired's clean-directory (.) command. - If `delete-old-versions' is nil, system will query user - before trimming versions. Otherwise it does it silently." - (interactive "_p") - (let ((modp (buffer-modified-p)) - (large (> (buffer-size) 50000)) - (make-backup-files (or (and make-backup-files (not (eq args 0))) - (memq args '(16 64))))) - (and modp (memq args '(16 64)) (setq buffer-backed-up nil)) - (if (and modp large) (display-message - 'progress (format "Saving file %s..." - (buffer-file-name)))) - (basic-save-buffer) - (and modp (memq args '(4 64)) (setq buffer-backed-up nil)))) - - (defun delete-auto-save-file-if-necessary (&optional force) - "Delete auto-save file for current buffer if `delete-auto-save-files' is t. - Normally delete only if the file was written by this XEmacs - since the last real save, but optional arg FORCE non-nil means delete anyway." - (and buffer-auto-save-file-name delete-auto-save-files - (not (string= buffer-file-name buffer-auto-save-file-name)) - (or force (recent-auto-save-p)) - (progn - (ignore-file-errors (delete-file buffer-auto-save-file-name)) - (set-buffer-auto-saved)))) - - ;; XEmacs change (from Sun) - ;; used to communicate with continue-save-buffer: - (defvar continue-save-buffer-hooks-tail nil) - - ;; Not in FSFmacs - (defun basic-write-file-data (realname truename) - ;; call the hooks until the bytes are put - ;; call write-region as a last resort - (let ((region-written nil) - (hooks write-file-data-hooks)) - (while (and hooks (not region-written)) - (setq region-written (funcall (car hooks) realname) - hooks (cdr hooks))) - (if (not region-written) - (write-region (point-min) (point-max) realname nil t truename)))) - - (put 'after-save-hook 'permanent-local t) - (defvar after-save-hook nil - "Normal hook that is run after a buffer is saved to its file. - These hooks are considered to pertain to the visited file. - So this list is cleared if you change the visited file name.") - - (defun files-fetch-hook-value (hook) - (let ((localval (symbol-value hook)) - (globalval (default-value hook))) - (if (memq t localval) - (setq localval (append (delq t localval) (delq t globalval)))) - localval)) - - (defun basic-save-buffer () - "Save the current buffer in its visited file, if it has been modified. - After saving the buffer, run `after-save-hook'." - (interactive) - (save-excursion - ;; In an indirect buffer, save its base buffer instead. - (if (buffer-base-buffer) - (set-buffer (buffer-base-buffer))) - (if (buffer-modified-p) - (let ((recent-save (recent-auto-save-p))) - ;; If buffer has no file name, ask user for one. - (or buffer-file-name - (let ((filename - (expand-file-name - (read-file-name "File to save in: ") nil))) - (and (file-exists-p filename) - (or (y-or-n-p (format "File `%s' exists; overwrite? " - filename)) - (error "Canceled"))) - (set-visited-file-name filename))) - (or (verify-visited-file-modtime (current-buffer)) - (not (file-exists-p buffer-file-name)) - (yes-or-no-p - (format "%s has changed since visited or saved. Save anyway? " - (file-name-nondirectory buffer-file-name))) - (error "Save not confirmed")) - (save-restriction - (widen) - (and (> (point-max) 1) - (/= (char-after (1- (point-max))) ?\n) - (not (and (eq selective-display t) - (= (char-after (1- (point-max))) ?\r))) - (or (eq require-final-newline t) - (and require-final-newline - (y-or-n-p - (format "Buffer %s does not end in newline. Add one? " - (buffer-name))))) - (save-excursion - (goto-char (point-max)) - (insert ?\n))) - ;; - ;; Run the write-file-hooks until one returns non-null. - ;; Bind after-save-hook to nil while running the - ;; write-file-hooks so that if this function is called - ;; recursively (from inside a write-file-hook) the - ;; after-hooks will only get run once (from the - ;; outermost call). - ;; - ;; Ugh, have to duplicate logic of run-hook-with-args-until-success - (let ((hooks (append (files-fetch-hook-value 'write-contents-hooks) - (files-fetch-hook-value - 'local-write-file-hooks) - (files-fetch-hook-value 'write-file-hooks))) - (after-save-hook nil) - (local-write-file-hooks nil) - (write-contents-hooks nil) - (write-file-hooks nil) - done) - (while (and hooks - (let ((continue-save-buffer-hooks-tail hooks)) - (not (setq done (funcall (car hooks)))))) - (setq hooks (cdr hooks))) - ;; If a hook returned t, file is already "written". - ;; Otherwise, write it the usual way now. - (if (not done) - (basic-save-buffer-1))) - ;; XEmacs: next two clauses (buffer-file-number setting and - ;; set-file-modes) moved into basic-save-buffer-1. - ) - ;; If the auto-save file was recent before this command, - ;; delete it now. - (delete-auto-save-file-if-necessary recent-save) - ;; Support VC `implicit' locking. - (when (fboundp 'vc-after-save) - (vc-after-save)) - (run-hooks 'after-save-hook)) - (display-message 'no-log "(No changes need to be saved)")))) - - ;; This does the "real job" of writing a buffer into its visited file - ;; and making a backup file. This is what is normally done - ;; but inhibited if one of write-file-hooks returns non-nil. - ;; It returns a value to store in setmodes. - (defun basic-save-buffer-1 () - (let (setmodes tempsetmodes) - (if (not (file-writable-p buffer-file-name)) - (let ((dir (file-name-directory buffer-file-name))) - (if (not (file-directory-p dir)) - (error "%s is not a directory" dir) - (if (not (file-exists-p buffer-file-name)) - (error "Directory %s write-protected" dir) - (if (yes-or-no-p - (format "File %s is write-protected; try to save anyway? " - (file-name-nondirectory - buffer-file-name))) - (setq tempsetmodes t) - (error - "Attempt to save to a file which you aren't allowed to write")))))) - (or buffer-backed-up - (setq setmodes (backup-buffer))) - (let ((dir (file-name-directory buffer-file-name))) - (if (and file-precious-flag - (file-writable-p dir)) - ;; If file is precious, write temp name, then rename it. - ;; This requires write access to the containing dir, - ;; which is why we don't try it if we don't have that access. - (let ((realname buffer-file-name) - tempname nogood i succeed - (old-modtime (visited-file-modtime))) - (setq i 0) - (setq nogood t) - ;; Find the temporary name to write under. - (while nogood - (setq tempname (format "%s#tmp#%d" dir i)) - (setq nogood (file-exists-p tempname)) - (setq i (1+ i))) - (unwind-protect - (progn (clear-visited-file-modtime) - (write-region (point-min) (point-max) - tempname nil realname - buffer-file-truename) - (setq succeed t)) - ;; If writing the temp file fails, - ;; delete the temp file. - (or succeed - (progn - (delete-file tempname) - (set-visited-file-modtime old-modtime)))) - ;; Since we have created an entirely new file - ;; and renamed it, make sure it gets the - ;; right permission bits set. - (setq setmodes (file-modes buffer-file-name)) - ;; We succeeded in writing the temp file, - ;; so rename it. - (rename-file tempname buffer-file-name t)) - ;; If file not writable, see if we can make it writable - ;; temporarily while we write it. - ;; But no need to do so if we have just backed it up - ;; (setmodes is set) because that says we're superseding. - (cond ((and tempsetmodes (not setmodes)) - ;; Change the mode back, after writing. - (setq setmodes (file-modes buffer-file-name)) - (set-file-modes buffer-file-name 511))) - (basic-write-file-data buffer-file-name buffer-file-truename))) - (setq buffer-file-number - (if buffer-file-name - (nth 10 (file-attributes buffer-file-name)) - nil)) - (if setmodes - (condition-case () - (set-file-modes buffer-file-name setmodes) - (error nil))))) - - ;; XEmacs change, from Sun - (defun continue-save-buffer () - "Provide a clean way for a write-file-hook to wrap AROUND - the execution of the remaining hooks and writing to disk. - Do not call this function except from a functions - on the write-file-hooks or write-contents-hooks list. - A hook that calls this function must return non-nil, - to signal completion to its caller. continue-save-buffer - always returns non-nil." - (let ((hooks (cdr (or continue-save-buffer-hooks-tail - (error - "continue-save-buffer called outside a write-file-hook!")))) - (done nil)) - ;; Do something like this: - ;; (let ((write-file-hooks hooks)) (basic-save-buffer)) - ;; First run the rest of the hooks. - (while (and hooks - (let ((continue-save-buffer-hooks-tail hooks)) - (not (setq done (funcall (car hooks)))))) - (setq hooks (cdr hooks))) - ;; - ;; If a hook returned t, file is already "written". - (if (not done) - (basic-save-buffer-1)) - 'continue-save-buffer)) - - (defcustom save-some-buffers-query-display-buffer t - "*Non-nil makes `\\[save-some-buffers]' switch to the buffer offered for saving." - :type 'boolean - :group 'editing-basics) - - (defun save-some-buffers (&optional arg exiting) - "Save some modified file-visiting buffers. Asks user about each one. - Optional argument (the prefix) non-nil means save all with no questions. - Optional second argument EXITING means ask about certain non-file buffers - as well as about file buffers." - (interactive "P") - (save-excursion - ;; `delete-other-windows' can bomb during autoloads generation, so - ;; guard it well. - (if (or noninteractive - (eq (selected-window) (minibuffer-window)) - (not save-some-buffers-query-display-buffer)) - ;; If playing with windows is unsafe or undesired, just do the - ;; usual drill. - (save-some-buffers-1 arg exiting nil) - ;; Else, protect the windows. - (when (save-window-excursion - (save-some-buffers-1 arg exiting t)) - ;; Force redisplay. - (sit-for 0))))) - - ;; XEmacs - do not use queried flag - (defun save-some-buffers-1 (arg exiting switch-buffer) - (let* ((switched nil) - (files-done - (map-y-or-n-p - (lambda (buffer) - (and (buffer-modified-p buffer) - (not (buffer-base-buffer buffer)) - ;; XEmacs addition: - (not (symbol-value-in-buffer 'save-buffers-skip buffer)) - (or - (buffer-file-name buffer) - (and exiting - (progn - (set-buffer buffer) - (and buffer-offer-save (> (buffer-size) 0))))) - (if arg - t - ;; #### We should provide a per-buffer means to - ;; disable the switching. For instance, you might - ;; want to turn it off for buffers the contents of - ;; which is meaningless to humans, such as - ;; `.newsrc.eld'. - (when switch-buffer - (unless (one-window-p) - (delete-other-windows)) - (setq switched t) - ;; #### Consider using `display-buffer' here for 21.1! - ;;(display-buffer buffer nil (selected-frame))) - (switch-to-buffer buffer t)) - (if (buffer-file-name buffer) - (format "Save file %s? " - (buffer-file-name buffer)) - (format "Save buffer %s? " - (buffer-name buffer)))))) - (lambda (buffer) - (set-buffer buffer) - (condition-case () - (save-buffer) - (error nil))) - (buffer-list) - '("buffer" "buffers" "save") - ;;instead of this we just say "yes all", "no all", etc. - ;;"save all the rest" - ;;"save only this buffer" "save no more buffers") - ;; this is rather bogus. --ben - ;; (it makes the dialog box too big, and you get an error - ;; "wrong type argument: framep, nil" when you hit q after - ;; choosing the option from the dialog box) - - ;; We should fix the dialog box rather than disabling - ;; this! --hniksic - (list (list ?\C-r (lambda (buf) - ;; #### FSF has an EXIT-ACTION argument - ;; to `view-buffer'. - (view-buffer buf) - (setq view-exit-action - (lambda (ignore) - (exit-recursive-edit))) - (recursive-edit) - ;; Return nil to ask about BUF again. - nil) - "display the current buffer")))) - (abbrevs-done - (and save-abbrevs abbrevs-changed - (progn - (if (or arg - (y-or-n-p (format "Save abbrevs in %s? " abbrev-file-name))) - (write-abbrev-file nil)) - ;; Don't keep bothering user if he says no. - (setq abbrevs-changed nil) - t)))) - (or (> files-done 0) abbrevs-done - (display-message 'no-log "(No files need saving)")) - switched)) - - - (defun not-modified (&optional arg) - "Mark current buffer as unmodified, not needing to be saved. - With prefix arg, mark buffer as modified, so \\[save-buffer] will save. - - It is not a good idea to use this function in Lisp programs, because it - prints a message in the minibuffer. Instead, use `set-buffer-modified-p'." - (interactive "_P") - (if arg ;; rewritten for I18N3 snarfing - (display-message 'command "Modification-flag set") - (display-message 'command "Modification-flag cleared")) - (set-buffer-modified-p arg)) - - (defun toggle-read-only (&optional arg) - "Toggle the current buffer's read-only status. - With arg, set read-only iff arg is positive." - (interactive "_P") - (setq buffer-read-only - (if (null arg) - (not buffer-read-only) - (> (prefix-numeric-value arg) 0))) - ;; Force modeline redisplay - (redraw-modeline)) - - (defun insert-file (filename &optional codesys) - "Insert contents of file FILENAME into buffer after point. - Set mark after the inserted text. - - Under XEmacs/Mule, optional second argument specifies the - coding system to use when decoding the file. Interactively, - with a prefix argument, you will be prompted for the coding system. - - This function is meant for the user to run interactively. - Don't call it from programs! Use `insert-file-contents' instead. - \(Its calling sequence is different; see its documentation)." - (interactive "*fInsert file: \nZCoding system: ") - (if (file-directory-p filename) - (signal 'file-error (list "Opening input file" "file is a directory" - filename))) - (let ((tem - (if codesys - (let ((coding-system-for-read - (get-coding-system codesys))) - (insert-file-contents filename)) - (insert-file-contents filename)))) - (push-mark (+ (point) (car (cdr tem)))))) - - (defun append-to-file (start end filename &optional codesys) - "Append the contents of the region to the end of file FILENAME. - When called from a function, expects three arguments, - START, END and FILENAME. START and END are buffer positions - saying what text to write. - Under XEmacs/Mule, optional fourth argument specifies the - coding system to use when encoding the file. Interactively, - with a prefix argument, you will be prompted for the coding system." - (interactive "r\nFAppend to file: \nZCoding system: ") - (if codesys - (let ((buffer-file-coding-system (get-coding-system codesys))) - (write-region start end filename t)) - (write-region start end filename t))) - - (defun file-newest-backup (filename) - "Return most recent backup file for FILENAME or nil if no backups exist." - (let* ((filename (expand-file-name filename)) - (file (file-name-nondirectory filename)) - (dir (file-name-directory filename)) - (comp (file-name-all-completions file dir)) - newest) - (while comp - (setq file (concat dir (car comp)) - comp (cdr comp)) - (if (and (backup-file-name-p file) - (or (null newest) (file-newer-than-file-p file newest))) - (setq newest file))) - newest)) - - (defun rename-uniquely () - "Rename current buffer to a similar name not already taken. - This function is useful for creating multiple shell process buffers - or multiple mail buffers, etc." - (interactive) - (save-match-data - (let* ((base-name (if (and (string-match "<[0-9]+>\\'" (buffer-name)) - (not (and buffer-file-name - (string= (buffer-name) - (file-name-nondirectory - buffer-file-name))))) - ;; If the existing buffer name has a , - ;; which isn't part of the file name (if any), - ;; then get rid of that. - (substring (buffer-name) 0 (match-beginning 0)) - (buffer-name))) - (new-buf (generate-new-buffer base-name)) - (name (buffer-name new-buf))) - (kill-buffer new-buf) - (rename-buffer name) - (redraw-modeline)))) - - (defun make-directory-path (path) - "Create all the directories along path that don't exist yet." - (interactive "Fdirectory path to create: ") - (make-directory path t)) - - (defun make-directory (dir &optional parents) - "Create the directory DIR and any nonexistent parent dirs. - Interactively, the default choice of directory to create - is the current default directory for file names. - That is useful when you have visited a file in a nonexistent directory. - - Noninteractively, the second (optional) argument PARENTS says whether - to create parent directories if they don't exist." - (interactive (list (let ((current-prefix-arg current-prefix-arg)) - (read-directory-name "Create directory: ")) - current-prefix-arg)) - (let ((handler (find-file-name-handler dir 'make-directory))) - (if handler - (funcall handler 'make-directory dir parents) - (if (not parents) - (make-directory-internal dir) - (let ((dir (directory-file-name (expand-file-name dir))) - create-list) - (while (not (file-exists-p dir)) - (setq create-list (cons dir create-list) - dir (directory-file-name (file-name-directory dir)))) - (while create-list - (make-directory-internal (car create-list)) - (setq create-list (cdr create-list)))))))) - - (put 'revert-buffer-function 'permanent-local t) - (defvar revert-buffer-function nil - "Function to use to revert this buffer, or nil to do the default. - The function receives two arguments IGNORE-AUTO and NOCONFIRM, - which are the arguments that `revert-buffer' received.") - - (put 'revert-buffer-insert-file-contents-function 'permanent-local t) - (defvar revert-buffer-insert-file-contents-function nil - "Function to use to insert contents when reverting this buffer. - Gets two args, first the nominal file name to use, - and second, t if reading the auto-save file.") - - (defvar before-revert-hook nil - "Normal hook for `revert-buffer' to run before reverting. - If `revert-buffer-function' is used to override the normal revert - mechanism, this hook is not used.") - - (defvar after-revert-hook nil - "Normal hook for `revert-buffer' to run after reverting. - Note that the hook value that it runs is the value that was in effect - before reverting; that makes a difference if you have buffer-local - hook functions. - - If `revert-buffer-function' is used to override the normal revert - mechanism, this hook is not used.") - - (defvar revert-buffer-internal-hook nil - "Don't use this.") - - (defun revert-buffer (&optional ignore-auto noconfirm preserve-modes) - "Replace the buffer text with the text of the visited file on disk. - This undoes all changes since the file was visited or saved. - With a prefix argument, offer to revert from latest auto-save file, if - that is more recent than the visited file. - - This command also works for special buffers that contain text which - doesn't come from a file, but reflects some other data base instead: - for example, Dired buffers and buffer-list buffers. In these cases, - it reconstructs the buffer contents from the appropriate data base. - - When called from Lisp, the first argument is IGNORE-AUTO; only offer - to revert from the auto-save file when this is nil. Note that the - sense of this argument is the reverse of the prefix argument, for the - sake of backward compatibility. IGNORE-AUTO is optional, defaulting - to nil. - - Optional second argument NOCONFIRM means don't ask for confirmation at - all. - - Optional third argument PRESERVE-MODES non-nil means don't alter - the files modes. Normally we reinitialize them using `normal-mode'. - - If the value of `revert-buffer-function' is non-nil, it is called to - do all the work for this command. Otherwise, the hooks - `before-revert-hook' and `after-revert-hook' are run at the beginning - and the end, and if `revert-buffer-insert-file-contents-function' is - non-nil, it is called instead of rereading visited file contents." - - ;; I admit it's odd to reverse the sense of the prefix argument, but - ;; there is a lot of code out there which assumes that the first - ;; argument should be t to avoid consulting the auto-save file, and - ;; there's no straightforward way to encourage authors to notice a - ;; reversal of the argument sense. So I'm just changing the user - ;; interface, but leaving the programmatic interface the same. - (interactive (list (not current-prefix-arg))) - (if revert-buffer-function - (funcall revert-buffer-function ignore-auto noconfirm) - (let* ((opoint (point)) - (auto-save-p (and (not ignore-auto) - (recent-auto-save-p) - buffer-auto-save-file-name - (file-readable-p buffer-auto-save-file-name) - (y-or-n-p - "Buffer has been auto-saved recently. Revert from auto-save file? "))) - (file-name (if auto-save-p - buffer-auto-save-file-name - buffer-file-name))) - (cond ((null file-name) - (error "Buffer does not seem to be associated with any file")) - ((or noconfirm - (and (not (buffer-modified-p)) - (let (found) - (dolist (rx revert-without-query found) - (when (string-match rx file-name) - (setq found t))))) - (yes-or-no-p (format "Revert buffer from file %s? " - file-name))) - (run-hooks 'before-revert-hook) - ;; If file was backed up but has changed since, - ;; we shd make another backup. - (and (not auto-save-p) - (not (verify-visited-file-modtime (current-buffer))) - (setq buffer-backed-up nil)) - ;; Get rid of all undo records for this buffer. - (or (eq buffer-undo-list t) - (setq buffer-undo-list nil)) - ;; Effectively copy the after-revert-hook status, - ;; since after-find-file will clobber it. - (let ((global-hook (default-value 'after-revert-hook)) - (local-hook-p (local-variable-p 'after-revert-hook - (current-buffer))) - (local-hook (and (local-variable-p 'after-revert-hook - (current-buffer)) - after-revert-hook))) - (let (buffer-read-only - ;; Don't make undo records for the reversion. - (buffer-undo-list t)) - (if revert-buffer-insert-file-contents-function - (funcall revert-buffer-insert-file-contents-function - file-name auto-save-p) - (if (not (file-exists-p file-name)) - (error "File %s no longer exists!" file-name)) - ;; Bind buffer-file-name to nil - ;; so that we don't try to lock the file. - (let ((buffer-file-name nil)) - (or auto-save-p - (unlock-buffer))) - (widen) - (insert-file-contents file-name (not auto-save-p) - nil nil t))) - (goto-char (min opoint (point-max))) - ;; Recompute the truename in case changes in symlinks - ;; have changed the truename. - ;XEmacs: already done by insert-file-contents - ;;(setq buffer-file-truename - ;;(abbreviate-file-name (file-truename buffer-file-name))) - (after-find-file nil nil t t preserve-modes) - ;; Run after-revert-hook as it was before we reverted. - (setq-default revert-buffer-internal-hook global-hook) - (if local-hook-p - (progn - (make-local-variable 'revert-buffer-internal-hook) - (setq revert-buffer-internal-hook local-hook)) - (kill-local-variable 'revert-buffer-internal-hook)) - (run-hooks 'revert-buffer-internal-hook)) - t))))) - - (defun recover-file (file) - "Visit file FILE, but get contents from its last auto-save file." - ;; Actually putting the file name in the minibuffer should be used - ;; only rarely. - ;; Not just because users often use the default. - (interactive "FRecover file: ") - (setq file (expand-file-name file)) - (let ((handler (or (find-file-name-handler file 'recover-file) - (find-file-name-handler - (let ((buffer-file-name file)) - (make-auto-save-file-name)) - 'recover-file)))) - (if handler - (funcall handler 'recover-file file) - (if (auto-save-file-name-p file) - (error "%s is an auto-save file" file)) - (let ((file-name (let ((buffer-file-name file)) - (make-auto-save-file-name)))) - (cond ((if (file-exists-p file) - (not (file-newer-than-file-p file-name file)) - (not (file-exists-p file-name))) - (error "Auto-save file %s not current" file-name)) - ((save-window-excursion - (with-output-to-temp-buffer "*Directory*" - (buffer-disable-undo standard-output) - (call-process "ls" nil standard-output nil - (if (file-symlink-p file) "-lL" "-l") - file file-name)) - (yes-or-no-p (format "Recover auto save file %s? " file-name))) - (switch-to-buffer (find-file-noselect file t)) - (let ((buffer-read-only nil)) - (erase-buffer) - (insert-file-contents file-name nil)) - (after-find-file nil nil t)) - (t (error "Recover-file cancelled."))))))) - - (defun recover-session () - "Recover auto save files from a previous Emacs session. - This command first displays a Dired buffer showing you the - previous sessions that you could recover from. - To choose one, move point to the proper line and then type C-c C-c. - Then you'll be asked about a number of files to recover." - (interactive) - (unless (fboundp 'dired) - (error "recover-session requires dired")) - (if (null auto-save-list-file-prefix) - (error - "You set `auto-save-list-file-prefix' to disable making session files")) - (dired (concat auto-save-list-file-prefix "*")) - (goto-char (point-min)) - (or (looking-at "Move to the session you want to recover,") - (let ((inhibit-read-only t)) - (insert "Move to the session you want to recover,\n" - "then type C-c C-c to select it.\n\n" - "You can also delete some of these files;\n" - "type d on a line to mark that file for deletion.\n\n"))) - (use-local-map (let ((map (make-sparse-keymap))) - (set-keymap-parents map (list (current-local-map))) - map)) - (define-key (current-local-map) "\C-c\C-c" 'recover-session-finish)) - - (defun recover-session-finish () - "Choose one saved session to recover auto-save files from. - This command is used in the special Dired buffer created by - \\[recover-session]." - (interactive) - ;; Get the name of the session file to recover from. - (let ((file (dired-get-filename)) - files - (buffer (get-buffer-create " *recover*"))) - ;; #### dired-do-flagged-delete in FSF. - ;; This version is for ange-ftp - ;;(dired-do-deletions t) - ;; This version is for efs - (dired-expunge-deletions) - (unwind-protect - (save-excursion - ;; Read in the auto-save-list file. - (set-buffer buffer) - (erase-buffer) - (insert-file-contents file) - ;; Loop thru the text of that file - ;; and get out the names of the files to recover. - (while (not (eobp)) - (let (thisfile autofile) - (if (eolp) - ;; This is a pair of lines for a non-file-visiting buffer. - ;; Get the auto-save file name and manufacture - ;; a "visited file name" from that. - (progn - (forward-line 1) - (setq autofile - (buffer-substring-no-properties - (point) - (save-excursion - (end-of-line) - (point)))) - (setq thisfile - (expand-file-name - (substring - (file-name-nondirectory autofile) - 1 -1) - (file-name-directory autofile))) - (forward-line 1)) - ;; This pair of lines is a file-visiting - ;; buffer. Use the visited file name. - (progn - (setq thisfile - (buffer-substring-no-properties - (point) (progn (end-of-line) (point)))) - (forward-line 1) - (setq autofile - (buffer-substring-no-properties - (point) (progn (end-of-line) (point)))) - (forward-line 1))) - ;; Ignore a file if its auto-save file does not exist now. - (if (file-exists-p autofile) - (setq files (cons thisfile files))))) - (setq files (nreverse files)) - ;; The file contains a pair of line for each auto-saved buffer. - ;; The first line of the pair contains the visited file name - ;; or is empty if the buffer was not visiting a file. - ;; The second line is the auto-save file name. - (if files - (map-y-or-n-p "Recover %s? " - (lambda (file) - (condition-case nil - (save-excursion (recover-file file)) - (error - "Failed to recover `%s'" file))) - files - '("file" "files" "recover")) - (message "No files can be recovered from this session now"))) - (kill-buffer buffer)))) - - (defun kill-some-buffers (&optional list) - "For each buffer in LIST, ask whether to kill it. - LIST defaults to all existing live buffers." - (interactive) - (if (null list) - (setq list (buffer-list))) - (while list - (let* ((buffer (car list)) - (name (buffer-name buffer))) - (and (not (string-equal name "")) - (/= (aref name 0) ?\ ) - (yes-or-no-p - (format - (if (buffer-modified-p buffer) - (gettext "Buffer %s HAS BEEN EDITED. Kill? ") - (gettext "Buffer %s is unmodified. Kill? ")) - name)) - (kill-buffer buffer))) - (setq list (cdr list)))) - - (defun auto-save-mode (arg) - "Toggle auto-saving of contents of current buffer. - With prefix argument ARG, turn auto-saving on if positive, else off." - (interactive "P") - (setq buffer-auto-save-file-name - (and (if (null arg) - (or (not buffer-auto-save-file-name) - ;; If autosave is off because buffer has shrunk, - ;; then toggling should turn it on. - (< buffer-saved-size 0)) - (or (eq arg t) (listp arg) (and (integerp arg) (> arg 0)))) - (if (and buffer-file-name auto-save-visited-file-name - (not buffer-read-only)) - buffer-file-name - (make-auto-save-file-name)))) - ;; If -1 was stored here, to temporarily turn off saving, - ;; turn it back on. - (and (< buffer-saved-size 0) - (setq buffer-saved-size 0)) - (if (interactive-p) - (if buffer-auto-save-file-name ;; rewritten for I18N3 snarfing - (display-message 'command "Auto-save on (in this buffer)") - (display-message 'command "Auto-save off (in this buffer)"))) - buffer-auto-save-file-name) - - (defun rename-auto-save-file () - "Adjust current buffer's auto save file name for current conditions. - Also rename any existing auto save file, if it was made in this session." - (let ((osave buffer-auto-save-file-name)) - (setq buffer-auto-save-file-name - (make-auto-save-file-name)) - (if (and osave buffer-auto-save-file-name - (not (string= buffer-auto-save-file-name buffer-file-name)) - (not (string= buffer-auto-save-file-name osave)) - (file-exists-p osave) - (recent-auto-save-p)) - (rename-file osave buffer-auto-save-file-name t)))) - - ;; see also ../packages/auto-save.el - (defun make-auto-save-file-name (&optional filename) - "Return file name to use for auto-saves of current buffer. - Does not consider `auto-save-visited-file-name' as that variable is checked - before calling this function. You can redefine this for customization. - See also `auto-save-file-name-p'." - (let ((fname (or filename buffer-file-name)) - name) - (setq name - (if fname - (concat (file-name-directory fname) - "#" - (file-name-nondirectory fname) - "#") - - ;; Deal with buffers that don't have any associated files. (Mail - ;; mode tends to create a good number of these.) - - (let ((buffer-name (buffer-name)) - (limit 0)) - ;; Use technique from Sebastian Kremer's auto-save - ;; package to turn slashes into \\!. This ensures that - ;; the auto-save buffer name is unique. - - ;; #### - yuck! yuck! yuck! move this functionality - ;; somewhere else and make the name translation customizable. - ;; Using "\!" as part of a filename on a UNIX filesystem is nearly - ;; IMPOSSIBLE to get past a shell parser. -stig - - (while (string-match "[/\\]" buffer-name limit) - (setq buffer-name - (concat (substring buffer-name 0 (match-beginning 0)) - (if (string= (substring buffer-name - (match-beginning 0) - (match-end 0)) - "/") - "\\!" - "\\\\") - (substring buffer-name (match-end 0)))) - (setq limit (1+ (match-end 0)))) - - ;; (expand-file-name (format "#%s#%s#" (buffer-name) (make-temp-name ""))) - - ;; jwz: putting the emacs PID in the auto-save file name - ;; is bad news, because that defeats auto-save-recovery of - ;; *mail* buffers -- the (sensible) code in sendmail.el - ;; calls (make-auto-save-file-name) to determine whether - ;; there is unsent, auto-saved mail to recover. If that - ;; mail came from a previous emacs process (far and away - ;; the most likely case) then this can never succeed as - ;; the pid differs. - - (expand-file-name (format "#%s#" buffer-name))) - )) - ;; don't try to write auto-save files in unwritable places. Unless - ;; there's already an autosave file here, put ours somewhere safe. --Stig - (if (or (file-writable-p name) - (file-exists-p name)) - name - (expand-file-name (concat "~/" (file-name-nondirectory name)))))) - - (defun auto-save-file-name-p (filename) - "Return non-nil if FILENAME can be yielded by `make-auto-save-file-name'. - FILENAME should lack slashes. - You can redefine this for customization." - (string-match "\\`#.*#\\'" filename)) - - (defun wildcard-to-regexp (wildcard) - "Given a shell file name pattern WILDCARD, return an equivalent regexp. - The generated regexp will match a filename iff the filename - matches that wildcard according to shell rules. Only wildcards known - by `sh' are supported." - (let* ((i (string-match "[[.*+\\^$?]" wildcard)) - ;; Copy the initial run of non-special characters. - (result (substring wildcard 0 i)) - (len (length wildcard))) - ;; If no special characters, we're almost done. - (if i - (while (< i len) - (let ((ch (aref wildcard i)) - j) - (setq - result - (concat result - (cond - ((eq ch ?\[) ; [...] maps to regexp char class - (progn - (setq i (1+ i)) - (concat - (cond - ((eq (aref wildcard i) ?!) ; [!...] -> [^...] - (progn - (setq i (1+ i)) - (if (eq (aref wildcard i) ?\]) - (progn - (setq i (1+ i)) - "[^]") - "[^"))) - ((eq (aref wildcard i) ?^) - ;; Found "[^". Insert a `\0' character - ;; (which cannot happen in a filename) - ;; into the character class, so that `^' - ;; is not the first character after `[', - ;; and thus non-special in a regexp. - (progn - (setq i (1+ i)) - "[\000^")) - ((eq (aref wildcard i) ?\]) - ;; I don't think `]' can appear in a - ;; character class in a wildcard, but - ;; let's be general here. - (progn - (setq i (1+ i)) - "[]")) - (t "[")) - (prog1 ; copy everything upto next `]'. - (substring wildcard - i - (setq j (string-match - "]" wildcard i))) - (setq i (if j (1- j) (1- len))))))) - ((eq ch ?.) "\\.") - ((eq ch ?*) "[^\000]*") - ((eq ch ?+) "\\+") - ((eq ch ?^) "\\^") - ((eq ch ?$) "\\$") - ((eq ch ?\\) "\\\\") ; probably cannot happen... - ((eq ch ??) "[^\000]") - (t (char-to-string ch))))) - (setq i (1+ i))))) - ;; Shell wildcards should match the entire filename, - ;; not its part. Make the regexp say so. - (concat "\\`" result "\\'"))) - - (defcustom list-directory-brief-switches "-CF" - "*Switches for list-directory to pass to `ls' for brief listing." - :type 'string - :group 'dired) - - (defcustom list-directory-verbose-switches "-l" - "*Switches for list-directory to pass to `ls' for verbose listing," - :type 'string - :group 'dired) - - (defun list-directory (dirname &optional verbose) - "Display a list of files in or matching DIRNAME, a la `ls'. - DIRNAME is globbed by the shell if necessary. - Prefix arg (second arg if noninteractive) means supply -l switch to `ls'. - Actions controlled by variables `list-directory-brief-switches' - and `list-directory-verbose-switches'." - (interactive (let ((pfx current-prefix-arg)) - (list (read-file-name (if pfx (gettext "List directory (verbose): ") - (gettext "List directory (brief): ")) - nil default-directory nil) - pfx))) - (let ((switches (if verbose list-directory-verbose-switches - list-directory-brief-switches))) - (or dirname (setq dirname default-directory)) - (setq dirname (expand-file-name dirname)) - (with-output-to-temp-buffer "*Directory*" - (buffer-disable-undo standard-output) - (princ "Directory ") - (princ dirname) - (terpri) - (save-excursion - (set-buffer "*Directory*") - (setq default-directory (file-name-directory dirname)) - (let ((wildcard (not (file-directory-p dirname)))) - (insert-directory dirname switches wildcard (not wildcard))))))) - - (defvar insert-directory-program "ls" - "Absolute or relative name of the `ls' program used by `insert-directory'.") - - ;; insert-directory - ;; - must insert _exactly_one_line_ describing FILE if WILDCARD and - ;; FULL-DIRECTORY-P is nil. - ;; The single line of output must display FILE's name as it was - ;; given, namely, an absolute path name. - ;; - must insert exactly one line for each file if WILDCARD or - ;; FULL-DIRECTORY-P is t, plus one optional "total" line - ;; before the file lines, plus optional text after the file lines. - ;; Lines are delimited by "\n", so filenames containing "\n" are not - ;; allowed. - ;; File lines should display the basename. - ;; - must be consistent with - ;; - functions dired-move-to-filename, (these two define what a file line is) - ;; dired-move-to-end-of-filename, - ;; dired-between-files, (shortcut for (not (dired-move-to-filename))) - ;; dired-insert-headerline - ;; dired-after-subdir-garbage (defines what a "total" line is) - ;; - variable dired-subdir-regexp - (defun insert-directory (file switches &optional wildcard full-directory-p) - "Insert directory listing for FILE, formatted according to SWITCHES. - Leaves point after the inserted text. - SWITCHES may be a string of options, or a list of strings. - Optional third arg WILDCARD means treat FILE as shell wildcard. - Optional fourth arg FULL-DIRECTORY-P means file is a directory and - switches do not contain `d', so that a full listing is expected. - - This works by running a directory listing program - whose name is in the variable `insert-directory-program'. - If WILDCARD, it also runs the shell specified by `shell-file-name'." - ;; We need the directory in order to find the right handler. - (let ((handler (find-file-name-handler (expand-file-name file) - 'insert-directory))) - (if handler - (funcall handler 'insert-directory file switches - wildcard full-directory-p) - (cond - ((and (fboundp 'mswindows-insert-directory) - (eq system-type 'windows-nt)) - (mswindows-insert-directory file switches wildcard full-directory-p)) - (t - (if wildcard - ;; Run ls in the directory of the file pattern we asked for. - (let ((default-directory - (if (file-name-absolute-p file) - (file-name-directory file) - (file-name-directory (expand-file-name file)))) - (pattern (file-name-nondirectory file)) - (beg 0)) - ;; Quote some characters that have special meanings in shells; - ;; but don't quote the wildcards--we want them to be special. - ;; We also currently don't quote the quoting characters - ;; in case people want to use them explicitly to quote - ;; wildcard characters. - ;;#### Unix-specific - (while (string-match "[ \t\n;<>&|()#$]" pattern beg) - (setq pattern - (concat (substring pattern 0 (match-beginning 0)) - "\\" - (substring pattern (match-beginning 0))) - beg (1+ (match-end 0)))) - (call-process shell-file-name nil t nil - "-c" (concat "\\" ;; Disregard shell aliases! - insert-directory-program - " -d " - (if (stringp switches) - switches - (mapconcat 'identity switches " ")) - " " - pattern))) - ;; SunOS 4.1.3, SVr4 and others need the "." to list the - ;; directory if FILE is a symbolic link. - (apply 'call-process - insert-directory-program nil t nil - (let (list) - (if (listp switches) - (setq list switches) - (if (not (equal switches "")) - (progn - ;; Split the switches at any spaces - ;; so we can pass separate options as separate args. - (while (string-match " " switches) - (setq list (cons (substring switches 0 (match-beginning 0)) - list) - switches (substring switches (match-end 0)))) - (setq list (cons switches list))))) - (append list - (list - (if full-directory-p - (concat (file-name-as-directory file) - ;;#### Unix-specific - ".") - file))))))))))) - - (defvar kill-emacs-query-functions nil - "Functions to call with no arguments to query about killing XEmacs. - If any of these functions returns nil, killing Emacs is cancelled. - `save-buffers-kill-emacs' (\\[save-buffers-kill-emacs]) calls these functions, - but `kill-emacs', the low level primitive, does not. - See also `kill-emacs-hook'.") - - (defun save-buffers-kill-emacs (&optional arg) - "Offer to save each buffer, then kill this XEmacs process. - With prefix arg, silently save all file-visiting buffers, then kill." - (interactive "P") - (save-some-buffers arg t) - (and (or (not (memq t (mapcar #'(lambda (buf) (and (buffer-file-name buf) - (buffer-modified-p buf))) - (buffer-list)))) - (yes-or-no-p "Modified buffers exist; exit anyway? ")) - (or (not (fboundp 'process-list)) - ;; process-list is not defined on VMS. - (let ((processes (process-list)) - active) - (while processes - (and (memq (process-status (car processes)) '(run stop open)) - (let ((val (process-kill-without-query (car processes)))) - (process-kill-without-query (car processes) val) - val) - (setq active t)) - (setq processes (cdr processes))) - (or - (not active) - (save-excursion - (save-window-excursion - (delete-other-windows) - (list-processes) - (yes-or-no-p - "Active processes exist; kill them and exit anyway? ")))))) - ;; Query the user for other things, perhaps. - (run-hook-with-args-until-failure 'kill-emacs-query-functions) - (kill-emacs))) - - (defun symlink-expand-file-name (filename) - "If FILENAME is a symlink, return its non-symlink equivalent. - Unlike `file-truename', this doesn't chase symlinks in directory - components of the file or expand a relative pathname into an - absolute one." - (let ((count 20)) - (while (and (> count 0) (file-symlink-p filename)) - (setq filename (file-symlink-p filename) - count (1- count))) - (if (> count 0) - filename - (error "Apparently circular symlink path")))) - - ;; Suggested by Michael Kifer - (defun file-remote-p (file-name) - "Test whether FILE-NAME is looked for on a remote system." - (cond ((not allow-remote-paths) nil) - ((featurep 'ange-ftp) (ange-ftp-ftp-path file-name)) - ((fboundp 'efs-ftp-path) (efs-ftp-path file-name)) - (t nil))) - - ;; #### FSF has file-name-non-special here. - - ;;; files.el ends here -;;; Turn off backup files on VMS since it has version numbers. -(defcustom make-backup-files (not (eq system-type 'vax-vms)) - "*Non-nil means make a backup of a file the first time it is saved. -This can be done by renaming the file or by copying. - -Renaming means that XEmacs renames the existing file so that it is a -backup file, then writes the buffer into a new file. Any other names -that the old file had will now refer to the backup file. The new file -is owned by you and its group is defaulted. - -Copying means that XEmacs copies the existing file into the backup -file, then writes the buffer on top of the existing file. Any other -names that the old file had will now refer to the new (edited) file. -The file's owner and group are unchanged. - -The choice of renaming or copying is controlled by the variables -`backup-by-copying', `backup-by-copying-when-linked' and -`backup-by-copying-when-mismatch'. See also `backup-inhibited'." - :type 'boolean - :group 'backup) - -;; Do this so that local variables based on the file name -;; are not overridden by the major mode. -(defvar backup-inhibited nil - "Non-nil means don't make a backup, regardless of the other parameters. -This variable is intended for use by making it local to a buffer. -But it is local only if you make it local.") -(put 'backup-inhibited 'permanent-local t) - -(defcustom backup-by-copying nil - "*Non-nil means always use copying to create backup files. -See documentation of variable `make-backup-files'." - :type 'boolean - :group 'backup) - -(defcustom backup-by-copying-when-linked nil - "*Non-nil means use copying to create backups for files with multiple names. -This causes the alternate names to refer to the latest version as edited. -This variable is relevant only if `backup-by-copying' is nil." - :type 'boolean - :group 'backup) - -(defcustom backup-by-copying-when-mismatch nil - "*Non-nil means create backups by copying if this preserves owner or group. -Renaming may still be used (subject to control of other variables) -when it would not result in changing the owner or group of the file; -that is, for files which are owned by you and whose group matches -the default for a new file created there by you. -This variable is relevant only if `backup-by-copying' is nil." - :type 'boolean - :group 'backup) - -(defvar backup-enable-predicate - #'(lambda (name) - (not (or (null name) - (string-match "^/tmp/" name) - (let ((tmpdir (temp-directory))) - (and tmpdir - (string-match (concat "\\`" (regexp-quote tmpdir) "/") - tmpdir)))))) - "Predicate that looks at a file name and decides whether to make backups. -Called with an absolute file name as argument, it returns t to enable backup.") - -(defcustom buffer-offer-save nil - "*Non-nil in a buffer means offer to save the buffer on exit -even if the buffer is not visiting a file. -Automatically local in all buffers." - :type 'boolean - :group 'find-file) -(make-variable-buffer-local 'buffer-offer-save) - -;; FSF uses normal defconst -(defvaralias 'find-file-visit-truename 'find-file-use-truenames) -(defvaralias 'find-file-existing-other-name 'find-file-compare-truenames) - -(defcustom revert-without-query nil - "*Specify which files should be reverted without query. -The value is a list of regular expressions. -If the file name matches one of these regular expressions, -then `revert-buffer' reverts the file without querying -if the file has changed on disk and you have not edited the buffer." - :type '(repeat (regexp "")) - :group 'find-file) - -(defvar buffer-file-number nil - "The device number and file number of the file visited in the current buffer. -The value is a list of the form (FILENUM DEVNUM). -This pair of numbers uniquely identifies the file. -If the buffer is visiting a new file, the value is nil.") -(make-variable-buffer-local 'buffer-file-number) -(put 'buffer-file-number 'permanent-local t) - -(defvar buffer-file-numbers-unique (not (memq system-type '(windows-nt))) - "Non-nil means that buffer-file-number uniquely identifies files.") - -(defcustom file-precious-flag nil - "*Non-nil means protect against I/O errors while saving files. -Some modes set this non-nil in particular buffers. - -This feature works by writing the new contents into a temporary file -and then renaming the temporary file to replace the original. -In this way, any I/O error in writing leaves the original untouched, -and there is never any instant where the file is nonexistent. - -Note that this feature forces backups to be made by copying. -Yet, at the same time, saving a precious file -breaks any hard links between it and other files." - :type 'boolean - :group 'backup) - -(defcustom version-control nil - "*Control use of version numbers for backup files. -t means make numeric backup versions unconditionally. -nil means make them for files that have some already. -`never' means do not make them." - :type 'boolean - :group 'backup - :group 'vc) - -;; This is now defined in efs. -;(defvar dired-kept-versions 2 -; "*When cleaning directory, number of versions to keep.") - -(defcustom delete-old-versions nil - "*If t, delete excess backup versions silently. -If nil, ask confirmation. Any other value prevents any trimming." - :type '(choice (const :tag "Delete" t) - (const :tag "Ask" nil) - (sexp :tag "Leave" :format "%t\n" other)) - :group 'backup) - -(defcustom kept-old-versions 2 - "*Number of oldest versions to keep when a new numbered backup is made." - :type 'integer - :group 'backup) - -(defcustom kept-new-versions 2 - "*Number of newest versions to keep when a new numbered backup is made. -Includes the new backup. Must be > 0" - :type 'integer - :group 'backup) - -(defcustom require-final-newline nil - "*Value of t says silently ensure a file ends in a newline when it is saved. -Non-nil but not t says ask user whether to add a newline when there isn't one. -nil means don't add newlines." - :type '(choice (const :tag "Off" nil) - (const :tag "Add" t) - (sexp :tag "Ask" :format "%t\n" ask)) - :group 'editing-basics) - -(defcustom auto-save-default t - "*Non-nil says by default do auto-saving of every file-visiting buffer." - :type 'boolean - :group 'auto-save) - -(defcustom auto-save-visited-file-name nil - "*Non-nil says auto-save a buffer in the file it is visiting, when practical. -Normally auto-save files are written under other names." - :type 'boolean - :group 'auto-save) - -(defcustom save-abbrevs nil - "*Non-nil means save word abbrevs too when files are saved. -Loading an abbrev file sets this to t." - :type 'boolean - :group 'abbrev) - -(defcustom find-file-run-dired t - "*Non-nil says run dired if `find-file' is given the name of a directory." - :type 'boolean - :group 'find-file) - -;;;It is not useful to make this a local variable. -;;;(put 'find-file-not-found-hooks 'permanent-local t) -(defvar find-file-not-found-hooks nil - "List of functions to be called for `find-file' on nonexistent file. -These functions are called as soon as the error is detected. -`buffer-file-name' is already set up. -The functions are called in the order given until one of them returns non-nil.") - -;;;It is not useful to make this a local variable. -;;;(put 'find-file-hooks 'permanent-local t) -(defvar find-file-hooks nil - "List of functions to be called after a buffer is loaded from a file. -The buffer's local variables (if any) will have been processed before the -functions are called.") - -(defvar write-file-hooks nil - "List of functions to be called before writing out a buffer to a file. -If one of them returns non-nil, the file is considered already written -and the rest are not called. -These hooks are considered to pertain to the visited file. -So this list is cleared if you change the visited file name. -See also `write-contents-hooks' and `continue-save-buffer'.") -;;; However, in case someone does make it local... -(put 'write-file-hooks 'permanent-local t) - -(defvar local-write-file-hooks nil - "Just like `write-file-hooks', except intended for per-buffer use. -The functions in this list are called before the ones in -`write-file-hooks'. - -This variable is meant to be used for hooks that have to do with a -particular visited file. Therefore, it is a permanent local, so that -changing the major mode does not clear it. However, calling -`set-visited-file-name' does clear it.") -(make-variable-buffer-local 'local-write-file-hooks) -(put 'local-write-file-hooks 'permanent-local t) - - -;; #### think about this (added by Sun). -(put 'after-set-visited-file-name-hooks 'permanent-local t) -(defvar after-set-visited-file-name-hooks nil - "List of functions to be called after \\[set-visited-file-name] -or during \\[write-file]. -You can use this hook to restore local values of write-file-hooks, -after-save-hook, and revert-buffer-function, which pertain -to a specific file and therefore are normally killed by a rename. -Put hooks pertaining to the buffer contents on write-contents-hooks -and revert-buffer-insert-file-contents-function.") - -(defvar write-contents-hooks nil - "List of functions to be called before writing out a buffer to a file. -If one of them returns non-nil, the file is considered already written -and the rest are not called. -These hooks are considered to pertain to the buffer's contents, -not to the particular visited file; thus, `set-visited-file-name' does -not clear this variable, but changing the major mode does clear it. -See also `write-file-hooks' and `continue-save-buffer'.") - -;; XEmacs addition -;; Energize needed this to hook into save-buffer at a lower level; we need -;; to provide a new output method, but don't want to have to duplicate all -;; of the backup file and file modes logic.that does not occur if one uses -;; a write-file-hook which returns non-nil. -(put 'write-file-data-hooks 'permanent-local t) -(defvar write-file-data-hooks nil - "List of functions to be called to put the bytes on disk. -These functions receive the name of the file to write to as argument. -The default behavior is to call - (write-region (point-min) (point-max) filename nil t) -If one of them returns non-nil, the file is considered already written -and the rest are not called. -These hooks are considered to pertain to the visited file. -So this list is cleared if you change the visited file name. -See also `write-file-hooks'.") - -(defcustom enable-local-variables t - "*Control use of local-variables lists in files you visit. -The value can be t, nil or something else. -A value of t means local-variables lists are obeyed; -nil means they are ignored; anything else means query. - -The command \\[normal-mode] always obeys local-variables lists -and ignores this variable." - :type '(choice (const :tag "Obey" t) - (const :tag "Ignore" nil) - (sexp :tag "Query" :format "%t\n" other)) - :group 'find-file) - -(defcustom enable-local-eval 'maybe - "*Control processing of the \"variable\" `eval' in a file's local variables. -The value can be t, nil or something else. -A value of t means obey `eval' variables; -nil means ignore them; anything else means query. - -The command \\[normal-mode] always obeys local-variables lists -and ignores this variable." - :type '(choice (const :tag "Obey" t) - (const :tag "Ignore" nil) - (sexp :tag "Query" :format "%t\n" other)) - :group 'find-file) - -;; Avoid losing in versions where CLASH_DETECTION is disabled. -(or (fboundp 'lock-buffer) - (defalias 'lock-buffer 'ignore)) -(or (fboundp 'unlock-buffer) - (defalias 'unlock-buffer 'ignore)) - -;;FSFmacs bastardized ange-ftp cruft -;; This hook function provides support for ange-ftp host name -;; completion. It runs the usual ange-ftp hook, but only for -;; completion operations. Having this here avoids the need -;; to load ange-ftp when it's not really in use. -;(defun ange-ftp-completion-hook-function (op &rest args) -; (if (memq op '(file-name-completion file-name-all-completions)) -; (apply 'ange-ftp-hook-function op args) -; (let ((inhibit-file-name-handlers -; (cons 'ange-ftp-completion-hook-function -; (and (eq inhibit-file-name-operation op) -; inhibit-file-name-handlers))) -; (inhibit-file-name-operation op)) -; (apply op args)) - -(defun convert-standard-filename (filename) - "Convert a standard file's name to something suitable for the current OS. -This function's standard definition is trivial; it just returns the argument. -However, on some systems, the function is redefined -with a definition that really does change some file names." - filename) - -(defun pwd () - "Show the current default directory." - (interactive nil) - (message "Directory %s" default-directory)) - -(defvar cd-path nil - "Value of the CDPATH environment variable, as a list. -Not actually set up until the first time you use it.") - -(defvar cdpath-previous nil - "Prior value of the CDPATH environment variable.") - -(defun parse-colon-path (cd-path) - "Explode a colon-separated search path into a list of directory names. - -If you think you want to use this, you probably don't. This function -is provided for backward compatibility. A more robust implementation -of the same functionality is available as `split-path', which see." - (and cd-path - (let (cd-list (cd-start 0) cd-colon) - (setq cd-path (concat cd-path path-separator)) - (while (setq cd-colon (string-match path-separator cd-path cd-start)) - (setq cd-list - (nconc cd-list - (list (if (= cd-start cd-colon) - nil - (substitute-in-file-name - (file-name-as-directory - (substring cd-path cd-start cd-colon))))))) - (setq cd-start (+ cd-colon 1))) - cd-list))) - -(defun cd-absolute (dir) - "Change current directory to given absolute file name DIR." - ;; Put the name into directory syntax now, - ;; because otherwise expand-file-name may give some bad results. - (if (not (eq system-type 'vax-vms)) - (setq dir (file-name-as-directory dir))) - ;; XEmacs change: stig@hackvan.com - (if find-file-use-truenames - (setq dir (file-truename dir))) - (setq dir (abbreviate-file-name (expand-file-name dir))) - (cond ((not (file-directory-p dir)) - (error "%s is not a directory" dir)) - ;; this breaks ange-ftp, which doesn't (can't?) overload `file-executable-p'. - ;;((not (file-executable-p dir)) - ;; (error "Cannot cd to %s: Permission denied" dir)) - (t - (setq default-directory dir)))) - -(defun cd (dir) - "Make DIR become the current buffer's default directory. -If your environment includes a `CDPATH' variable, try each one of that -colon-separated list of directories when resolving a relative directory name." - (interactive - ;; XEmacs change? (read-file-name => read-directory-name) - (list (read-directory-name "Change default directory: " - default-directory default-directory - (and (member cd-path '(nil ("./"))) - (null (getenv "CDPATH")))))) - (if (file-name-absolute-p dir) - (cd-absolute (expand-file-name dir)) - ;; XEmacs - (unless (and cd-path (equal (getenv "CDPATH") cdpath-previous)) - ;;#### Unix-specific - (let ((trypath (parse-colon-path - (setq cdpath-previous (getenv "CDPATH"))))) - (setq cd-path (or trypath (list "./"))))) - (or (catch 'found - (mapcar #'(lambda (x) - (let ((f (expand-file-name (concat x dir)))) - (if (file-directory-p f) - (progn - (cd-absolute f) - (throw 'found t))))) - cd-path) - nil) - ;; jwz: give a better error message to those of us with the - ;; good taste not to use a kludge like $CDPATH. - (if (equal cd-path '("./")) - (error "No such directory: %s" (expand-file-name dir)) - (error "Directory not found in $CDPATH: %s" dir))))) - -(defun load-file (file) - "Load the Lisp file named FILE." - (interactive "fLoad file: ") - (load (expand-file-name file) nil nil t)) - -; We now dump utils/lib-complete.el which has improved versions of this. -;(defun load-library (library) -; "Load the library named LIBRARY. -;This is an interface to the function `load'." -; (interactive "sLoad library: ") -; (load library)) -; -;(defun find-library (library) -; "Find the library of Lisp code named LIBRARY. -;This searches `load-path' for a file named either \"LIBRARY\" or \"LIBRARY.el\"." -; (interactive "sFind library file: ") -; (let ((f (locate-file library load-path ":.el:"))) -; (if f -; (find-file f) -; (error "Couldn't locate library %s" library)))) - -(defun file-local-copy (file &optional buffer) - "Copy the file FILE into a temporary file on this machine. -Returns the name of the local copy, or nil, if FILE is directly -accessible." - (let ((handler (find-file-name-handler file 'file-local-copy))) - (if handler - (funcall handler 'file-local-copy file) - nil))) - -;; XEmacs change block -; We have this in C and use the realpath() system call. - -;(defun file-truename (filename &optional counter prev-dirs) -; [... lots of code snipped ...] -; filename)) - -;; XEmacs addition. Called from `insert-file-contents-internal' -;; at the appropriate time. -(defun compute-buffer-file-truename (&optional buffer) - "Recompute BUFFER's value of `buffer-file-truename' -based on the current value of `buffer-file-name'. -BUFFER defaults to the current buffer if unspecified." - (save-excursion - (set-buffer (or buffer (current-buffer))) - (cond ((null buffer-file-name) - (setq buffer-file-truename nil)) - ((setq buffer-file-truename (file-truename buffer-file-name)) - ;; it exists, we're done. - nil) - (t - ;; the file doesn't exist, but maybe the directory does. - (let* ((dir (file-name-directory buffer-file-name)) - (truedir (file-truename dir))) - (if truedir (setq dir truedir)) - (setq buffer-file-truename - (expand-file-name (file-name-nondirectory buffer-file-name) - dir))))) - (if (and find-file-use-truenames buffer-file-truename) - (setq buffer-file-name (abbreviate-file-name buffer-file-truename) - default-directory (file-name-directory buffer-file-name))) - buffer-file-truename)) -;; End XEmacs change block - -(defun file-chase-links (filename) - "Chase links in FILENAME until a name that is not a link. -Does not examine containing directories for links, -unlike `file-truename'." - (let (tem (count 100) (newname filename)) - (while (setq tem (file-symlink-p newname)) - (save-match-data - (if (= count 0) - (error "Apparent cycle of symbolic links for %s" filename)) - ;; In the context of a link, `//' doesn't mean what XEmacs thinks. - (while (string-match "//+" tem) - (setq tem (concat (substring tem 0 (1+ (match-beginning 0))) - (substring tem (match-end 0))))) - ;; Handle `..' by hand, since it needs to work in the - ;; target of any directory symlink. - ;; This code is not quite complete; it does not handle - ;; embedded .. in some cases such as ./../foo and foo/bar/../../../lose. - (while (string-match "\\`\\.\\./" tem) ;#### Unix specific - (setq tem (substring tem 3)) - (setq newname (file-name-as-directory - ;; Do the .. by hand. - (directory-file-name - (file-name-directory - ;; Chase links in the default dir of the symlink. - (file-chase-links - (directory-file-name - (file-name-directory newname)))))))) - (setq newname (expand-file-name tem (file-name-directory newname))) - (setq count (1- count)))) - newname)) - -(defun switch-to-other-buffer (arg) - "Switch to the previous buffer. With a numeric arg, n, switch to the nth -most recent buffer. With an arg of 0, buries the current buffer at the -bottom of the buffer stack." - (interactive "p") - (if (eq arg 0) - (bury-buffer (current-buffer))) - (switch-to-buffer - (if (<= arg 1) (other-buffer (current-buffer)) - (nth (1+ arg) (buffer-list))))) - -(defun switch-to-buffer-other-window (buffer) - "Select buffer BUFFER in another window." - (interactive "BSwitch to buffer in other window: ") - (let ((pop-up-windows t)) - ;; XEmacs: this used to have (selected-frame) as the third argument, - ;; but this is obnoxious. If the user wants the buffer in a - ;; different frame, then it should be this way. - - ;; Change documented above undone --mrb - (pop-to-buffer buffer t (selected-frame)))) - -(defun switch-to-buffer-other-frame (buffer) - "Switch to buffer BUFFER in a newly-created frame." - (interactive "BSwitch to buffer in other frame: ") - (let* ((name (get-frame-name-for-buffer buffer)) - (frame (make-frame (if name - (list (cons 'name (symbol-name name))))))) - (pop-to-buffer buffer t frame) - (make-frame-visible frame) - buffer)) - -(defun find-file (filename &optional codesys) - "Edit file FILENAME. -Switch to a buffer visiting file FILENAME, -creating one if none already exists. -Under XEmacs/Mule, optional second argument specifies the -coding system to use when decoding the file. Interactively, -with a prefix argument, you will be prompted for the coding system." - (interactive "FFind file: \nZCoding system: ") - (if codesys - (let ((coding-system-for-read - (get-coding-system codesys))) - (switch-to-buffer (find-file-noselect filename))) - (switch-to-buffer (find-file-noselect filename)))) - -(defun find-file-other-window (filename &optional codesys) - "Edit file FILENAME, in another window. -May create a new window, or reuse an existing one. -See the function `display-buffer'. -Under XEmacs/Mule, optional second argument specifies the -coding system to use when decoding the file. Interactively, -with a prefix argument, you will be prompted for the coding system." - (interactive "FFind file in other window: \nZCoding system: ") - (if codesys - (let ((coding-system-for-read - (get-coding-system codesys))) - (switch-to-buffer-other-window (find-file-noselect filename))) - (switch-to-buffer-other-window (find-file-noselect filename)))) - -(defun find-file-other-frame (filename &optional codesys) - "Edit file FILENAME, in a newly-created frame. -Under XEmacs/Mule, optional second argument specifies the -coding system to use when decoding the file. Interactively, -with a prefix argument, you will be prompted for the coding system." - (interactive "FFind file in other frame: \nZCoding system: ") - (if codesys - (let ((coding-system-for-read - (get-coding-system codesys))) - (switch-to-buffer-other-frame (find-file-noselect filename))) - (switch-to-buffer-other-frame (find-file-noselect filename)))) - -(defun find-file-read-only (filename &optional codesys) - "Edit file FILENAME but don't allow changes. -Like \\[find-file] but marks buffer as read-only. -Use \\[toggle-read-only] to permit editing. -Under XEmacs/Mule, optional second argument specifies the -coding system to use when decoding the file. Interactively, -with a prefix argument, you will be prompted for the coding system." - (interactive "fFind file read-only: \nZCoding system: ") - (if codesys - (let ((coding-system-for-read - (get-coding-system codesys))) - (find-file filename)) - (find-file filename)) - (setq buffer-read-only t) - (current-buffer)) - -(defun find-file-read-only-other-window (filename &optional codesys) - "Edit file FILENAME in another window but don't allow changes. -Like \\[find-file-other-window] but marks buffer as read-only. -Use \\[toggle-read-only] to permit editing. -Under XEmacs/Mule, optional second argument specifies the -coding system to use when decoding the file. Interactively, -with a prefix argument, you will be prompted for the coding system." - (interactive "fFind file read-only other window: \nZCoding system: ") - (if codesys - (let ((coding-system-for-read - (get-coding-system codesys))) - (find-file-other-window filename)) - (find-file-other-window filename)) - (setq buffer-read-only t) - (current-buffer)) - -(defun find-file-read-only-other-frame (filename &optional codesys) - "Edit file FILENAME in another frame but don't allow changes. -Like \\[find-file-other-frame] but marks buffer as read-only. -Use \\[toggle-read-only] to permit editing. -Under XEmacs/Mule, optional second argument specifies the -coding system to use when decoding the file. Interactively, -with a prefix argument, you will be prompted for the coding system." - (interactive "fFind file read-only other frame: \nZCoding system: ") - (if codesys - (let ((coding-system-for-read - (get-coding-system codesys))) - (find-file-other-frame filename)) - (find-file-other-frame filename)) - (setq buffer-read-only t) - (current-buffer)) - -(defun find-alternate-file-other-window (filename &optional codesys) - "Find file FILENAME as a replacement for the file in the next window. -This command does not select that window. -Under XEmacs/Mule, optional second argument specifies the -coding system to use when decoding the file. Interactively, -with a prefix argument, you will be prompted for the coding system." - (interactive - (save-selected-window - (other-window 1) - (let ((file buffer-file-name) - (file-name nil) - (file-dir nil)) - (and file - (setq file-name (file-name-nondirectory file) - file-dir (file-name-directory file))) - (list (read-file-name - "Find alternate file: " file-dir nil nil file-name) - (if (and current-prefix-arg (featurep 'mule)) - (read-coding-system "Coding-system: ")))))) - (if (one-window-p) - (find-file-other-window filename) - (save-selected-window - (other-window 1) - (find-alternate-file filename codesys)))) - -(defun find-alternate-file (filename &optional codesys) - "Find file FILENAME, select its buffer, kill previous buffer. -If the current buffer now contains an empty file that you just visited -\(presumably by mistake), use this command to visit the file you really want. -Under XEmacs/Mule, optional second argument specifies the -coding system to use when decoding the file. Interactively, -with a prefix argument, you will be prompted for the coding system." - (interactive - (let ((file buffer-file-name) - (file-name nil) - (file-dir nil)) - (and file - (setq file-name (file-name-nondirectory file) - file-dir (file-name-directory file))) - (list (read-file-name - "Find alternate file: " file-dir nil nil file-name) - (if (and current-prefix-arg (featurep 'mule)) - (read-coding-system "Coding-system: "))))) - (and (buffer-modified-p) (buffer-file-name) - ;; (not buffer-read-only) - (not (yes-or-no-p (format - "Buffer %s is modified; kill anyway? " - (buffer-name)))) - (error "Aborted")) - (let ((obuf (current-buffer)) - (ofile buffer-file-name) - (onum buffer-file-number) - (otrue buffer-file-truename) - (oname (buffer-name))) - (if (get-buffer " **lose**") - (kill-buffer " **lose**")) - (rename-buffer " **lose**") - (setq buffer-file-name nil) - (setq buffer-file-number nil) - (setq buffer-file-truename nil) - (unwind-protect - (progn - (unlock-buffer) - (if codesys - (let ((coding-system-for-read - (get-coding-system codesys))) - (find-file filename)) - (find-file filename))) - (cond ((eq obuf (current-buffer)) - (setq buffer-file-name ofile) - (setq buffer-file-number onum) - (setq buffer-file-truename otrue) - (lock-buffer) - (rename-buffer oname)))) - (or (eq (current-buffer) obuf) - (kill-buffer obuf)))) - -(defun create-file-buffer (filename) - "Create a suitably named buffer for visiting FILENAME, and return it. -FILENAME (sans directory) is used unchanged if that name is free; -otherwise a string <2> or <3> or ... is appended to get an unused name." - (let ((handler (find-file-name-handler filename 'create-file-buffer))) - (if handler - (funcall handler 'create-file-buffer filename) - (let ((lastname (file-name-nondirectory filename))) - (if (string= lastname "") - (setq lastname filename)) - (generate-new-buffer lastname))))) - -(defun generate-new-buffer (name) - "Create and return a buffer with a name based on NAME. -Choose the buffer's name using `generate-new-buffer-name'." - (get-buffer-create (generate-new-buffer-name name))) - -(defvar abbreviated-home-dir nil - "The user's homedir abbreviated according to `directory-abbrev-alist'.") - -(defun abbreviate-file-name (filename &optional hack-homedir) - "Return a version of FILENAME shortened using `directory-abbrev-alist'. -See documentation of variable `directory-abbrev-alist' for more information. -If optional argument HACK-HOMEDIR is non-nil, then this also substitutes -\"~\" for the user's home directory." - (let ((handler (find-file-name-handler filename 'abbreviate-file-name))) - (if handler - (funcall handler 'abbreviate-file-name filename hack-homedir) - ;; Get rid of the prefixes added by the automounter. - ;;(if (and (string-match automount-dir-prefix filename) - ;; (file-exists-p (file-name-directory - ;; (substring filename (1- (match-end 0)))))) - ;; (setq filename (substring filename (1- (match-end 0))))) - (let ((tail directory-abbrev-alist)) - ;; If any elt of directory-abbrev-alist matches this name, - ;; abbreviate accordingly. - (while tail - (if (string-match (car (car tail)) filename) - (setq filename - (concat (cdr (car tail)) (substring filename (match-end 0))))) - (setq tail (cdr tail)))) - (if hack-homedir - (progn - ;; Compute and save the abbreviated homedir name. - ;; We defer computing this until the first time it's needed, to - ;; give time for directory-abbrev-alist to be set properly. - ;; We include a slash at the end, to avoid spurious matches - ;; such as `/usr/foobar' when the home dir is `/usr/foo'. - (or abbreviated-home-dir - (setq abbreviated-home-dir - (let ((abbreviated-home-dir "$foo")) - (concat "\\`" (regexp-quote (abbreviate-file-name - (expand-file-name "~"))) - "\\(/\\|\\'\\)")))) - ;; If FILENAME starts with the abbreviated homedir, - ;; make it start with `~' instead. - (if (and (string-match abbreviated-home-dir filename) - ;; If the home dir is just /, don't change it. - (not (and (= (match-end 0) 1) ;#### unix-specific - (= (aref filename 0) ?/))) - (not (and (or (eq system-type 'ms-dos) - (eq system-type 'windows-nt)) - (save-match-data - (string-match "^[a-zA-Z]:/$" filename))))) - (setq filename - (concat "~" - (substring filename - (match-beginning 1) (match-end 1)) - (substring filename (match-end 0))))))) - filename))) - -(defcustom find-file-not-true-dirname-list nil - "*List of logical names for which visiting shouldn't save the true dirname. -On VMS, when you visit a file using a logical name that searches a path, -you may or may not want the visited file name to record the specific -directory where the file was found. If you *do not* want that, add the logical -name to this list as a string." - :type '(repeat (string :tag "Name")) - :group 'find-file) - -;; This function is needed by FSF vc.el. I hope somebody can make it -;; work for XEmacs. -sb. -;; #### In what way does it not work? --hniksic -(defun find-buffer-visiting (filename) - "Return the buffer visiting file FILENAME (a string). -This is like `get-file-buffer', except that it checks for any buffer -visiting the same file, possibly under a different name. -If there is no such live buffer, return nil." - (let ((buf (get-file-buffer filename)) - (truename (abbreviate-file-name (file-truename filename)))) - (or buf - (let ((list (buffer-list)) found) - (while (and (not found) list) - (save-excursion - (set-buffer (car list)) - (if (and buffer-file-name - (string= buffer-file-truename truename)) - (setq found (car list)))) - (setq list (cdr list))) - found) - (let ((number (nthcdr 10 (file-attributes truename))) - (list (buffer-list)) found) - (and buffer-file-numbers-unique - number - (while (and (not found) list) - (save-excursion - (set-buffer (car list)) - (if (and buffer-file-number - (equal buffer-file-number number) - ;; Verify this buffer's file number - ;; still belongs to its file. - (file-exists-p buffer-file-name) - (equal (nthcdr 10 (file-attributes buffer-file-name)) - number)) - (setq found (car list)))) - (setq list (cdr list)))) - found)))) - -(defun insert-file-contents-literally (filename &optional visit beg end replace) - "Like `insert-file-contents', q.v., but only reads in the file. -A buffer may be modified in several ways after reading into the buffer due -to advanced Emacs features, such as file-name-handlers, format decoding, -find-file-hooks, etc. - This function ensures that none of these modifications will take place." - (let ((file-name-handler-alist nil) - (format-alist nil) - (after-insert-file-functions nil) - (find-buffer-file-type-function - (if (fboundp 'find-buffer-file-type) - (symbol-function 'find-buffer-file-type) - nil))) - (unwind-protect - (progn - (fset 'find-buffer-file-type (lambda (filename) t)) - (insert-file-contents filename visit beg end replace)) - (if find-buffer-file-type-function - (fset 'find-buffer-file-type find-buffer-file-type-function) - (fmakunbound 'find-buffer-file-type))))) - -(defun find-file-noselect (filename &optional nowarn rawfile) - "Read file FILENAME into a buffer and return the buffer. -If a buffer exists visiting FILENAME, return that one, but -verify that the file has not changed since visited or saved. -The buffer is not selected, just returned to the caller. -If NOWARN is non-nil, warning messages will be suppressed. -If RAWFILE is non-nil, the file is read literally." - (setq filename (abbreviate-file-name (expand-file-name filename))) - (if (file-directory-p filename) - (if (and (fboundp 'dired-noselect) find-file-run-dired) - (dired-noselect (if find-file-use-truenames - (abbreviate-file-name (file-truename filename)) - filename)) - (error "%s is a directory" filename)) - (let* ((buf (get-file-buffer filename)) - (truename (abbreviate-file-name (file-truename filename))) - (number (nthcdr 10 (file-attributes truename))) -; ;; Find any buffer for a file which has same truename. -; (other (and (not buf) (find-buffer-visiting filename))) - (error nil)) - -; ;; Let user know if there is a buffer with the same truename. -; (if (and (not buf) same-truename (not nowarn)) -; (message "%s and %s are the same file (%s)" -; filename (buffer-file-name same-truename) -; truename) -; (if (and (not buf) same-number (not nowarn)) -; (message "%s and %s are the same file" -; filename (buffer-file-name same-number)))) -; ;; Optionally also find that buffer. -; (if (or find-file-existing-other-name find-file-visit-truename) -; (setq buf (or same-truename same-number))) - - (when (and buf - (or find-file-compare-truenames find-file-use-truenames) - (not nowarn)) - (save-excursion - (set-buffer buf) - (if (not (string-equal buffer-file-name filename)) - (message "%s and %s are the same file (%s)" - filename buffer-file-name - buffer-file-truename)))) - - (if buf - (or nowarn - (verify-visited-file-modtime buf) - (cond ((not (file-exists-p filename)) - (error "File %s no longer exists!" filename)) - ;; Certain files should be reverted automatically - ;; if they have changed on disk and not in the buffer. - ((and (not (buffer-modified-p buf)) - (dolist (rx revert-without-query nil) - (when (string-match rx filename) - (return t)))) - (with-current-buffer buf - (message "Reverting file %s..." filename) - (revert-buffer t t) - (message "Reverting file %s... done" filename))) - ((yes-or-no-p - (if (string= (file-name-nondirectory filename) - (buffer-name buf)) - (format - (if (buffer-modified-p buf) - (gettext "File %s changed on disk. Discard your edits? ") - (gettext "File %s changed on disk. Reread from disk? ")) - (file-name-nondirectory filename)) - (format - (if (buffer-modified-p buf) - (gettext "File %s changed on disk. Discard your edits in %s? ") - (gettext "File %s changed on disk. Reread from disk into %s? ")) - (file-name-nondirectory filename) - (buffer-name buf)))) - (with-current-buffer buf - (revert-buffer t t))))) - ;; Else: we must create a new buffer for filename - (save-excursion -;;; The truename stuff makes this obsolete. -;;; (let* ((link-name (car (file-attributes filename))) -;;; (linked-buf (and (stringp link-name) -;;; (get-file-buffer link-name)))) -;;; (if (bufferp linked-buf) -;;; (message "Symbolic link to file in buffer %s" -;;; (buffer-name linked-buf)))) - (setq buf (create-file-buffer filename)) - (set-buffer-major-mode buf) - (set-buffer buf) - (erase-buffer) - (if rawfile - (condition-case () - (insert-file-contents-literally filename t) - (file-error - (when (and (file-exists-p filename) - (not (file-readable-p filename))) - (kill-buffer buf) - (signal 'file-error (list "File is not readable" filename))) - ;; Unconditionally set error - (setq error t))) - (condition-case () - (insert-file-contents filename t) - (file-error - (when (and (file-exists-p filename) - (not (file-readable-p filename))) - (kill-buffer buf) - (signal 'file-error (list "File is not readable" filename))) - ;; Run find-file-not-found-hooks until one returns non-nil. - (or (run-hook-with-args-until-success 'find-file-not-found-hooks) - ;; If they fail too, set error. - (setq error t))))) - ;; Find the file's truename, and maybe use that as visited name. - ;; automatically computed in XEmacs, unless jka-compr was used! - (unless buffer-file-truename - (setq buffer-file-truename truename)) - (setq buffer-file-number number) - ;; On VMS, we may want to remember which directory in a search list - ;; the file was found in. - (and (eq system-type 'vax-vms) - (let (logical) - (if (string-match ":" (file-name-directory filename)) - (setq logical (substring (file-name-directory filename) - 0 (match-beginning 0)))) - (not (member logical find-file-not-true-dirname-list))) - (setq buffer-file-name buffer-file-truename)) - (and find-file-use-truenames - ;; This should be in C. Put pathname abbreviations that have - ;; been explicitly requested back into the pathname. Most - ;; importantly, strip out automounter /tmp_mnt directories so - ;; that auto-save will work - (setq buffer-file-name (abbreviate-file-name buffer-file-name))) - ;; Set buffer's default directory to that of the file. - (setq default-directory (file-name-directory buffer-file-name)) - ;; Turn off backup files for certain file names. Since - ;; this is a permanent local, the major mode won't eliminate it. - (and (not (funcall backup-enable-predicate buffer-file-name)) - (progn - (make-local-variable 'backup-inhibited) - (setq backup-inhibited t))) - (if rawfile - ;; #### FSF 20.3 sets buffer-file-coding-system to - ;; `no-conversion' here. Should we copy? It also makes - ;; `find-file-literally' a local variable and sets it to t. - nil - (after-find-file error (not nowarn)) - (setq buf (current-buffer))))) - buf))) - -;; FSF has `insert-file-literally' and `find-file-literally' here. - -(defvar after-find-file-from-revert-buffer nil) - -(defun after-find-file (&optional error warn noauto - after-find-file-from-revert-buffer - nomodes) - "Called after finding a file and by the default revert function. -Sets buffer mode, parses local variables. -Optional args ERROR, WARN, and NOAUTO: ERROR non-nil means there was an -error in reading the file. WARN non-nil means warn if there -exists an auto-save file more recent than the visited file. -NOAUTO means don't mess with auto-save mode. -Fourth arg AFTER-FIND-FILE-FROM-REVERT-BUFFER non-nil - means this call was from `revert-buffer'. -Fifth arg NOMODES non-nil means don't alter the file's modes. -Finishes by calling the functions in `find-file-hooks'." - (setq buffer-read-only (not (file-writable-p buffer-file-name))) - (if noninteractive - nil - (let* (not-serious - (msg - (cond ((and error (file-attributes buffer-file-name)) - (setq buffer-read-only t) - (gettext "File exists, but cannot be read.")) - ((not buffer-read-only) - (if (and warn - (file-newer-than-file-p (make-auto-save-file-name) - buffer-file-name)) - (format "%s has auto save data; consider M-x recover-file" - (file-name-nondirectory buffer-file-name)) - (setq not-serious t) - (if error (gettext "(New file)") nil))) - ((not error) - (setq not-serious t) - (gettext "Note: file is write protected")) - ((file-attributes (directory-file-name default-directory)) - (gettext "File not found and directory write-protected")) - ((file-exists-p (file-name-directory buffer-file-name)) - (setq buffer-read-only nil)) - (t - ;; If the directory the buffer is in doesn't exist, - ;; offer to create it. It's better to do this now - ;; than when we save the buffer, because we want - ;; autosaving to work. - (setq buffer-read-only nil) - ;; XEmacs - (or (file-exists-p (file-name-directory buffer-file-name)) - (condition-case nil - (if (yes-or-no-p - (format - "\ -The directory containing %s does not exist. Create? " - (abbreviate-file-name buffer-file-name))) - (make-directory (file-name-directory - buffer-file-name) - t)) - (quit - (kill-buffer (current-buffer)) - (signal 'quit nil)))) - nil)))) - (if msg - (progn - (message "%s" msg) - (or not-serious (sit-for 1 t))))) - (if (and auto-save-default (not noauto)) - (auto-save-mode t))) - (unless nomodes - (normal-mode t) - (run-hooks 'find-file-hooks))) - -(defun normal-mode (&optional find-file) - "Choose the major mode for this buffer automatically. -Also sets up any specified local variables of the file. -Uses the visited file name, the -*- line, and the local variables spec. - -This function is called automatically from `find-file'. In that case, -we may set up specified local variables depending on the value of -`enable-local-variables': if it is t, we do; if it is nil, we don't; -otherwise, we query. `enable-local-variables' is ignored if you -run `normal-mode' explicitly." - (interactive) - (or find-file (funcall (or default-major-mode 'fundamental-mode))) - (and (condition-case err - (progn (set-auto-mode) - t) - (error (message "File mode specification error: %s" - (prin1-to-string err)) - nil)) - (condition-case err - (hack-local-variables (not find-file)) - (error (lwarn 'local-variables 'warning - "File local-variables error: %s" - (error-message-string err)))))) - -;; #### This variable sucks in the package model. There should be a -;; way for new packages to add their entries to auto-mode-alist in a -;; clean way. Per Abrahamsen suggested splitting auto-mode-alist to -;; several distinct variables such as, in order of precedence, -;; `user-auto-mode-alist' for users, `package-auto-mode-alist' for -;; packages and `auto-mode-alist' (which might also be called -;; `default-auto-mode-alist') for default stuff, such as some of the -;; entries below. - -(defvar auto-mode-alist - '(("\\.te?xt\\'" . text-mode) - ("\\.[ch]\\'" . c-mode) - ("\\.el\\'" . emacs-lisp-mode) - ("\\.\\([CH]\\|cc\\|hh\\)\\'" . c++-mode) - ("\\.[ch]\\(pp\\|xx\\|\\+\\+\\)\\'" . c++-mode) - ("\\.java\\'" . java-mode) - ("\\.idl\\'" . idl-mode) - ("\\.f\\(or\\)?\\'" . fortran-mode) - ("\\.F\\(OR\\)?\\'" . fortran-mode) - ("\\.[fF]90\\'" . f90-mode) -;;; Less common extensions come here -;;; so more common ones above are found faster. - ("\\.p[lm]\\'" . perl-mode) - ("\\.py\\'" . python-mode) - ("\\.texi\\(nfo\\)?\\'" . texinfo-mode) - ("\\.ad[abs]\\'" . ada-mode) - ("\\.c?l\\(i?sp\\)?\\'" . lisp-mode) - ("\\.p\\(as\\)?\\'" . pascal-mode) - ("\\.ltx\\'" . latex-mode) - ("\\.[sS]\\'" . asm-mode) - ("[Cc]hange.?[Ll]og?\\(.[0-9]+\\)?\\'" . change-log-mode) - ("\\$CHANGE_LOG\\$\\.TXT" . change-log-mode) - ("\\.scm?\\(?:\\.[0-9]*\\)?\\'" . scheme-mode) - ("\\.e\\'" . eiffel-mode) - ("\\.mss\\'" . scribe-mode) - ("\\.m\\([mes]\\|an\\)\\'" . nroff-mode) - ("\\.icn\\'" . icon-mode) - ("\\.\\([ckz]?sh\\|shar\\)\\'" . sh-mode) - ;; #### Unix-specific! - ("/\\.\\(bash_\\|z\\)?\\(profile\\|login\||logout\\)\\'" . sh-mode) - ("/\\.\\([ckz]sh\\|bash\\|tcsh\\|es\\|xinit\\|startx\\)rc\\'" . sh-mode) - ("/\\.\\([kz]shenv\\|xsession\\)\\'" . sh-mode) - ;; The following come after the ChangeLog pattern for the sake of - ;; ChangeLog.1, etc. and after the .scm.[0-9] pattern too. - ("\\.[12345678]\\'" . nroff-mode) - ("\\.[tT]e[xX]\\'" . tex-mode) - ("\\.\\(sty\\|cls\\|bbl\\)\\'" . latex-mode) - ("\\.bib\\'" . bibtex-mode) - ("\\.article\\'" . text-mode) - ("\\.letter\\'" . text-mode) - ("\\.\\(tcl\\|exp\\)\\'" . tcl-mode) - ("\\.wrl\\'" . vrml-mode) - ("\\.awk\\'" . awk-mode) - ("\\.prolog\\'" . prolog-mode) - ("\\.tar\\'" . tar-mode) - ("\\.\\(arc\\|zip\\|lzh\\|zoo\\)\\'" . archive-mode) - ;; Mailer puts message to be edited in /tmp/Re.... or Message - ;; #### Unix-specific! - ("\\`/tmp/Re" . text-mode) - ("/Message[0-9]*\\'" . text-mode) - ("/drafts/[0-9]+\\'" . mh-letter-mode) - ;; some news reader is reported to use this - ("^/tmp/fol/" . text-mode) - ("\\.y\\'" . c-mode) - ("\\.lex\\'" . c-mode) - ("\\.m\\'" . objc-mode) - ("\\.oak\\'" . scheme-mode) - ("\\.s?html?\\'" . html-mode) - ("\\.htm?l?3\\'" . html3-mode) - ("\\.\\(sgml?\\|dtd\\)\\'" . sgml-mode) - ("\\.c?ps\\'" . postscript-mode) - ;; .emacs following a directory delimiter in either Unix or - ;; Windows syntax. - ("[/\\][._].*emacs\\'" . emacs-lisp-mode) - ("\\.m4\\'" . autoconf-mode) - ("configure\\.in\\'" . autoconf-mode) - ("\\.ml\\'" . lisp-mode) - ("\\.ma?k\\'" . makefile-mode) - ("[Mm]akefile\\(\\.\\|\\'\\)" . makefile-mode) - ("\\.X\\(defaults\\|environment\\|resources\\|modmap\\)\\'" . xrdb-mode) - ;; #### The following three are Unix-specific (but do we care?) - ("/app-defaults/" . xrdb-mode) - ("\\.[^/]*wm\\'" . winmgr-mode) - ("\\.[^/]*wm2?rc" . winmgr-mode) - ("\\.[Jj][Pp][Ee]?[Gg]\\'" . image-mode) - ("\\.[Pp][Nn][Gg]\\'" . image-mode) - ("\\.[Gg][Ii][Ff]\\'" . image-mode) - ) -"Alist of filename patterns vs. corresponding major mode functions. -Each element looks like (REGEXP . FUNCTION) or (REGEXP FUNCTION NON-NIL). -\(NON-NIL stands for anything that is not nil; the value does not matter.) -Visiting a file whose name matches REGEXP specifies FUNCTION as the -mode function to use. FUNCTION will be called, unless it is nil. - -If the element has the form (REGEXP FUNCTION NON-NIL), then after -calling FUNCTION (if it's not nil), we delete the suffix that matched -REGEXP and search the list again for another match.") - -(defvar interpreter-mode-alist - '(("^#!.*csh" . sh-mode) - ("^#!.*\\b\\(scope\\|wish\\|tcl\\|tclsh\\|expect\\)" . tcl-mode) - ("^#!.*sh\\b" . sh-mode) - ("perl" . perl-mode) - ("python" . python-mode) - ("awk\\b" . awk-mode) - ("rexx" . rexx-mode) - ("scm" . scheme-mode) - ("^:" . sh-mode)) - "Alist mapping interpreter names to major modes. -This alist is used to guess the major mode of a file based on the -contents of the first line. This line often contains something like: -#!/bin/sh -but may contain something more imaginative like -#! /bin/env python -or -eval 'exec perl -w -S $0 ${1+\"$@\"}'. - -Each alist element looks like (INTERPRETER . MODE). -The car of each element is a regular expression which is compared -with the name of the interpreter specified in the first line. -If it matches, mode MODE is selected.") - -(defvar inhibit-first-line-modes-regexps (purecopy '("\\.tar\\'" "\\.tgz\\'" - "\\.tar\\.gz\\'")) - "List of regexps; if one matches a file name, don't look for `-*-'.") - -(defvar inhibit-first-line-modes-suffixes nil - "List of regexps for what to ignore, for `inhibit-first-line-modes-regexps'. -When checking `inhibit-first-line-modes-regexps', we first discard -from the end of the file name anything that matches one of these regexps.") - -(defvar user-init-file - "" ; set by command-line - "File name including directory of user's initialization file.") - -(defun set-auto-mode (&optional just-from-file-name) - "Select major mode appropriate for current buffer. -This checks for a -*- mode tag in the buffer's text, -compares the filename against the entries in `auto-mode-alist', -or checks the interpreter that runs this file against -`interpreter-mode-alist'. - -It does not check for the `mode:' local variable in the -Local Variables section of the file; for that, use `hack-local-variables'. - -If `enable-local-variables' is nil, this function does not check for a --*- mode tag. - -If the optional argument JUST-FROM-FILE-NAME is non-nil, -then we do not set anything but the major mode, -and we don't even do that unless it would come from the file name." - (save-excursion - ;; Look for -*-MODENAME-*- or -*- ... mode: MODENAME; ... -*- - ;; Do this by calling the hack-local-variables helper to avoid redundancy. - ;; We bind enable-local-variables to nil this time because we're going to - ;; call hack-local-variables-prop-line again later, "for real." Note that - ;; this temporary binding does not prevent hack-local-variables-prop-line - ;; from setting the major mode. - (or (and enable-local-variables - (let ((enable-local-variables nil)) - (hack-local-variables-prop-line nil)) - ) - ;; It's not in the -*- line, so check the auto-mode-alist, unless - ;; this buffer isn't associated with a file. - (null buffer-file-name) - (let ((name (file-name-sans-versions buffer-file-name)) - (keep-going t)) - (while keep-going - (setq keep-going nil) - (let ((alist auto-mode-alist) - (mode nil)) - ;; Find first matching alist entry. - (let ((case-fold-search - (memq system-type '(vax-vms windows-nt)))) - (while (and (not mode) alist) - (if (string-match (car (car alist)) name) - (if (and (consp (cdr (car alist))) - (nth 2 (car alist))) - (progn - (setq mode (car (cdr (car alist))) - name (substring name 0 (match-beginning 0)) - keep-going t)) - (setq mode (cdr (car alist)) - keep-going nil))) - (setq alist (cdr alist)))) - (unless just-from-file-name - ;; If we can't deduce a mode from the file name, - ;; look for an interpreter specified in the first line. - (if (and (null mode) - (save-excursion ; XEmacs - (goto-char (point-min)) - (looking-at "#!"))) - (let ((firstline - (buffer-substring - (point-min) - (save-excursion - (goto-char (point-min)) (end-of-line) (point))))) - (setq alist interpreter-mode-alist) - (while alist - (if (string-match (car (car alist)) firstline) - (progn - (setq mode (cdr (car alist))) - (setq alist nil)) - (setq alist (cdr alist))))))) - (if mode - (if (not (fboundp mode)) - (progn - (if (or (not (boundp 'package-get-base)) - (not package-get-base)) - (load "package-get-base")) - (require 'package-get) - (let ((name (package-get-package-provider mode))) - (if name - (message "Mode %s is not installed. Download package %s" mode name) - (message "Mode %s either doesn't exist or is not a known package" mode)) - (sit-for 2) - (error "%s" mode))) - (unless (and just-from-file-name - (or - ;; Don't reinvoke major mode. - (eq mode major-mode) - ;; Don't lose on minor modes. - (assq mode minor-mode-alist))) - (funcall mode)))))))))) - -(defvar hack-local-variables-hook nil - "Normal hook run after processing a file's local variables specs. -Major modes can use this to examine user-specified local variables -in order to initialize other data structure based on them. - -This hook runs even if there were no local variables or if their -evaluation was suppressed. See also `enable-local-variables' and -`enable-local-eval'.") - -(defun hack-local-variables (&optional force) - "Parse, and bind or evaluate as appropriate, any local variables -for current buffer." - ;; Don't look for -*- if this file name matches any - ;; of the regexps in inhibit-first-line-modes-regexps. - (if (or (null buffer-file-name) ; don't lose if buffer has no file! - (not (let ((temp inhibit-first-line-modes-regexps) - (name (if buffer-file-name - (file-name-sans-versions buffer-file-name) - (buffer-name)))) - (while (let ((sufs inhibit-first-line-modes-suffixes)) - (while (and sufs (not - (string-match (car sufs) name))) - (setq sufs (cdr sufs))) - sufs) - (setq name (substring name 0 (match-beginning 0)))) - (while (and temp - (not (string-match (car temp) name))) - (setq temp (cdr temp)) - temp)))) - (progn - ;; Look for variables in the -*- line. - (hack-local-variables-prop-line force) - ;; Look for "Local variables:" block in last page. - (hack-local-variables-last-page force))) - (run-hooks 'hack-local-variables-hook)) - -;;; Local variables may be specified in the last page of the file (within 3k -;;; from the end of the file and after the last ^L) in the form -;;; -;;; Local variables: -;;; variable-name: variable-value -;;; end: -;;; -;;; The lines may begin with a common prefix, like ";;; " in the above -;;; example. They may also have a common suffix (" */" for example). In -;;; this form, the local variable "mode" can be used to change the major -;;; mode, and the local variable "eval" can be used to evaluate an arbitrary -;;; form. -;;; -;;; Local variables may also be specified in the first line of the file. -;;; Embedded in this line are a pair of "-*-" sequences. What lies between -;;; them are variable-name/variable-value pairs, like: -;;; -;;; -*- mode: emacs-lisp -*- -;;; or -*- mode: postscript; version-control: never -*- -;;; or -*- tags-file-name: "/foo/bar/TAGS" -*- -;;; -;;; The local variable "eval" is not used with this form. For hysterical -;;; reasons, the syntax "-*- modename -*-" is allowed as well. -;;; - -(defun hack-local-variables-p (modeline) - (or (eq enable-local-variables t) - (and enable-local-variables - (save-window-excursion - (condition-case nil - (switch-to-buffer (current-buffer)) - (error - ;; If we fail to switch in the selected window, - ;; it is probably a minibuffer. - ;; So try another window. - (condition-case nil - (switch-to-buffer-other-window (current-buffer)) - (error - (switch-to-buffer-other-frame (current-buffer)))))) - (or modeline (save-excursion - (beginning-of-line) - (set-window-start (selected-window) (point)))) - (y-or-n-p (format - "Set local variables as specified %s of %s? " - (if modeline "in -*- line" "at end") - (if buffer-file-name - (file-name-nondirectory buffer-file-name) - (concat "buffer " (buffer-name))))))))) - -(defun hack-local-variables-last-page (&optional force) - ;; Set local variables set in the "Local Variables:" block of the last page. - (save-excursion - (goto-char (point-max)) - (search-backward "\n\^L" (max (- (point-max) 3000) (point-min)) 'move) - (if (let ((case-fold-search t)) - (and (search-forward "Local Variables:" nil t) - (or force - (hack-local-variables-p nil)))) - (let ((continue t) - prefix prefixlen suffix beg - (enable-local-eval enable-local-eval)) - ;; The prefix is what comes before "local variables:" in its line. - ;; The suffix is what comes after "local variables:" in its line. - (skip-chars-forward " \t") - (or (eolp) - (setq suffix (buffer-substring (point) - (progn (end-of-line) (point))))) - (goto-char (match-beginning 0)) - (or (bolp) - (setq prefix - (buffer-substring (point) - (progn (beginning-of-line) (point))))) - (if prefix (setq prefixlen (length prefix) - prefix (regexp-quote prefix))) - (if suffix (setq suffix (concat (regexp-quote suffix) "$"))) - (while continue - ;; Look at next local variable spec. - (if selective-display (re-search-forward "[\n\C-m]") - (forward-line 1)) - ;; Skip the prefix, if any. - (if prefix - (if (looking-at prefix) - (forward-char prefixlen) - (error "Local variables entry is missing the prefix"))) - ;; Find the variable name; strip whitespace. - (skip-chars-forward " \t") - (setq beg (point)) - (skip-chars-forward "^:\n") - (if (eolp) (error "Missing colon in local variables entry")) - (skip-chars-backward " \t") - (let* ((str (buffer-substring beg (point))) - (var (read str)) - val) - ;; Setting variable named "end" means end of list. - (if (string-equal (downcase str) "end") - (setq continue nil) - ;; Otherwise read the variable value. - (skip-chars-forward "^:") - (forward-char 1) - (setq val (read (current-buffer))) - (skip-chars-backward "\n") - (skip-chars-forward " \t") - (or (if suffix (looking-at suffix) (eolp)) - (error "Local variables entry is terminated incorrectly")) - ;; Set the variable. "Variables" mode and eval are funny. - (hack-one-local-variable var val)))))))) - -;; jwz - New Version 20.1/19.15 -(defun hack-local-variables-prop-line (&optional force) - ;; Set local variables specified in the -*- line. - ;; Returns t if mode was set. - (let ((result nil)) - (save-excursion - (goto-char (point-min)) - (skip-chars-forward " \t\n\r") - (let ((end (save-excursion - ;; If the file begins with "#!" - ;; (un*x exec interpreter magic), look - ;; for mode frobs in the first two - ;; lines. You cannot necessarily - ;; put them in the first line of - ;; such a file without screwing up - ;; the interpreter invocation. - (end-of-line (and (looking-at "^#!") 2)) - (point)))) - ;; Parse the -*- line into the `result' alist. - (cond ((not (search-forward "-*-" end t)) - ;; doesn't have one. - (setq force t)) - ((looking-at "[ \t]*\\([^ \t\n\r:;]+\\)\\([ \t]*-\\*-\\)") - ;; Antiquated form: "-*- ModeName -*-". - (setq result - (list (cons 'mode - (intern (buffer-substring - (match-beginning 1) - (match-end 1))))) - )) - (t - ;; Usual form: '-*-' [ ':' ';' ]* '-*-' - ;; (last ";" is optional). - (save-excursion - (if (search-forward "-*-" end t) - (setq end (- (point) 3)) - (error "-*- not terminated before end of line"))) - (while (< (point) end) - (or (looking-at "[ \t]*\\([^ \t\n:]+\\)[ \t]*:[ \t]*") - (error "malformed -*- line")) - (goto-char (match-end 0)) - ;; There used to be a downcase here, - ;; but the manual didn't say so, - ;; and people want to set var names that aren't all lc. - (let ((key (intern (buffer-substring - (match-beginning 1) - (match-end 1)))) - (val (save-restriction - (narrow-to-region (point) end) - (read (current-buffer))))) - ;; Case sensitivity! Icepicks in my forehead! - (if (equal (downcase (symbol-name key)) "mode") - (setq key 'mode)) - (setq result (cons (cons key val) result)) - (skip-chars-forward " \t;"))) - (setq result (nreverse result)))))) - - (let ((set-any-p (or force - ;; It's OK to force null specifications. - (null result) - ;; It's OK to force mode-only specifications. - (let ((remaining result) - (mode-specs-only t)) - (while remaining - (if (eq (car (car remaining)) 'mode) - (setq remaining (cdr remaining)) - ;; Otherwise, we have a real local. - (setq mode-specs-only nil - remaining nil)) - ) - mode-specs-only) - ;; Otherwise, check. - (hack-local-variables-p t))) - (mode-p nil)) - (while result - (let ((key (car (car result))) - (val (cdr (car result)))) - (cond ((eq key 'mode) - (setq mode-p t) - (let ((mode (intern (concat (downcase (symbol-name val)) - "-mode")))) - ;; Without this guard, `normal-mode' would potentially run - ;; the major mode function twice: once via `set-auto-mode' - ;; and once via `hack-local-variables'. - (if (not (eq mode major-mode)) - (funcall mode)) - )) - (set-any-p - (hack-one-local-variable key val)) - (t - nil))) - (setq result (cdr result))) - mode-p))) - -(defconst ignored-local-variables - (list 'enable-local-eval) - "Variables to be ignored in a file's local variable spec.") - -;; Get confirmation before setting these variables as locals in a file. -(put 'debugger 'risky-local-variable t) -(put 'enable-local-eval 'risky-local-variable t) -(put 'ignored-local-variables 'risky-local-variable t) -(put 'eval 'risky-local-variable t) -(put 'file-name-handler-alist 'risky-local-variable t) -(put 'minor-mode-map-alist 'risky-local-variable t) -(put 'after-load-alist 'risky-local-variable t) -(put 'buffer-file-name 'risky-local-variable t) -(put 'buffer-auto-save-file-name 'risky-local-variable t) -(put 'buffer-file-truename 'risky-local-variable t) -(put 'exec-path 'risky-local-variable t) -(put 'load-path 'risky-local-variable t) -(put 'exec-directory 'risky-local-variable t) -(put 'process-environment 'risky-local-variable t) -;; Don't wait for outline.el to be loaded, for the sake of outline-minor-mode. -(put 'outline-level 'risky-local-variable t) -(put 'rmail-output-file-alist 'risky-local-variable t) - -;; This one is safe because the user gets to check it before it is used. -(put 'compile-command 'safe-local-variable t) - -;(defun hack-one-local-variable-quotep (exp) -; (and (consp exp) (eq (car exp) 'quote) (consp (cdr exp)))) - -;; "Set" one variable in a local variables spec. -;; A few variable names are treated specially. -(defun hack-one-local-variable (var val) - (cond ((eq var 'mode) - (funcall (intern (concat (downcase (symbol-name val)) - "-mode")))) - ((memq var ignored-local-variables) - nil) - ;; "Setting" eval means either eval it or do nothing. - ;; Likewise for setting hook variables. - ((or (get var 'risky-local-variable) - (and - (string-match "-hooks?$\\|-functions?$\\|-forms?$\\|-program$\\|-command$" - (symbol-name var)) - (not (get var 'safe-local-variable)))) -; ;; Permit evaling a put of a harmless property -; ;; if the args do nothing tricky. -; (if (or (and (eq var 'eval) -; (consp val) -; (eq (car val) 'put) -; (hack-one-local-variable-quotep (nth 1 val)) -; (hack-one-local-variable-quotep (nth 2 val)) -; ;; Only allow safe values of lisp-indent-hook; -; ;; not functions. -; (or (numberp (nth 3 val)) -; (equal (nth 3 val) ''defun)) -; (memq (nth 1 (nth 2 val)) -; '(lisp-indent-hook))) - (if (and (not (zerop (user-uid))) - (or (eq enable-local-eval t) - (and enable-local-eval - (save-window-excursion - (switch-to-buffer (current-buffer)) - (save-excursion - (beginning-of-line) - (set-window-start (selected-window) (point))) - (setq enable-local-eval - (y-or-n-p (format "Process `eval' or hook local variables in file %s? " - (file-name-nondirectory buffer-file-name)))))))) - (if (eq var 'eval) - (save-excursion (eval val)) - (make-local-variable var) - (set var val)) - (message "Ignoring `eval:' in file's local variables"))) - ;; Ordinary variable, really set it. - (t (make-local-variable var) - (set var val)))) - -(defcustom change-major-mode-with-file-name t - "*Non-nil means \\[write-file] should set the major mode from the file name. -However, the mode will not be changed if -\(1) a local variables list or the `-*-' line specifies a major mode, or -\(2) the current major mode is a \"special\" mode, -\ not suitable for ordinary files, or -\(3) the new file name does not particularly specify any mode." - :type 'boolean - :group 'editing-basics) - -(defun set-visited-file-name (filename &optional no-query along-with-file) - "Change name of file visited in current buffer to FILENAME. -The next time the buffer is saved it will go in the newly specified file. -nil or empty string as argument means make buffer not be visiting any file. -Remember to delete the initial contents of the minibuffer -if you wish to pass an empty string as the argument. - -The optional second argument NO-QUERY, if non-nil, inhibits asking for -confirmation in the case where another buffer is already visiting FILENAME. - -The optional third argument ALONG-WITH-FILE, if non-nil, means that -the old visited file has been renamed to the new name FILENAME." - (interactive "FSet visited file name: ") - (if (buffer-base-buffer) - (error "An indirect buffer cannot visit a file")) - (let (truename) - (if filename - (setq filename - (if (string-equal filename "") - nil - (expand-file-name filename)))) - (if filename - (progn - (setq truename (file-truename filename)) - ;; #### Do we need to check if truename is non-nil? - (if find-file-use-truenames - (setq filename truename)))) - (let ((buffer (and filename (find-buffer-visiting filename)))) - (and buffer (not (eq buffer (current-buffer))) - (not no-query) - (not (y-or-n-p (message "A buffer is visiting %s; proceed? " - filename))) - (error "Aborted"))) - (or (equal filename buffer-file-name) - (progn - (and filename (lock-buffer filename)) - (unlock-buffer))) - (setq buffer-file-name filename) - (if filename ; make buffer name reflect filename. - (let ((new-name (file-name-nondirectory buffer-file-name))) - (if (string= new-name "") - (error "Empty file name")) - (if (eq system-type 'vax-vms) - (setq new-name (downcase new-name))) - (setq default-directory (file-name-directory buffer-file-name)) - (or (string= new-name (buffer-name)) - (rename-buffer new-name t)))) - (setq buffer-backed-up nil) - (or along-with-file - (clear-visited-file-modtime)) - (compute-buffer-file-truename) ; insert-file-contents does this too. -; ;; Abbreviate the file names of the buffer. -; (if truename -; (progn -; (setq buffer-file-truename (abbreviate-file-name truename)) -; (if find-file-visit-truename -; (setq buffer-file-name buffer-file-truename)))) - (setq buffer-file-number - (if filename - (nthcdr 10 (file-attributes buffer-file-name)) - nil))) - ;; write-file-hooks is normally used for things like ftp-find-file - ;; that visit things that are not local files as if they were files. - ;; Changing to visit an ordinary local file instead should flush the hook. - (kill-local-variable 'write-file-hooks) - (kill-local-variable 'after-save-hook) - (kill-local-variable 'local-write-file-hooks) - (kill-local-variable 'write-file-data-hooks) - (kill-local-variable 'revert-buffer-function) - (kill-local-variable 'backup-inhibited) - ;; If buffer was read-only because of version control, - ;; that reason is gone now, so make it writable. - (when (boundp 'vc-mode) - (if vc-mode - (setq buffer-read-only nil)) - (kill-local-variable 'vc-mode)) - ;; Turn off backup files for certain file names. - ;; Since this is a permanent local, the major mode won't eliminate it. - (and buffer-file-name - (not (funcall backup-enable-predicate buffer-file-name)) - (progn - (make-local-variable 'backup-inhibited) - (setq backup-inhibited t))) - (let ((oauto buffer-auto-save-file-name)) - ;; If auto-save was not already on, turn it on if appropriate. - (if (not buffer-auto-save-file-name) - (and buffer-file-name auto-save-default - (auto-save-mode t)) - ;; If auto save is on, start using a new name. - ;; We deliberately don't rename or delete the old auto save - ;; for the old visited file name. This is because perhaps - ;; the user wants to save the new state and then compare with the - ;; previous state from the auto save file. - (setq buffer-auto-save-file-name - (make-auto-save-file-name))) - ;; Rename the old auto save file if any. - (and oauto buffer-auto-save-file-name - (file-exists-p oauto) - (rename-file oauto buffer-auto-save-file-name t))) - (if buffer-file-name - (not along-with-file) - (set-buffer-modified-p t)) - ;; Update the major mode, if the file name determines it. - (condition-case nil - ;; Don't change the mode if it is special. - (or (not change-major-mode-with-file-name) - (get major-mode 'mode-class) - ;; Don't change the mode if the local variable list specifies it. - (hack-local-variables t) - (set-auto-mode t)) - (error nil)) - ;; #### ?? - (run-hooks 'after-set-visited-file-name-hooks)) - -(defun write-file (filename &optional confirm codesys) - "Write current buffer into file FILENAME. -Makes buffer visit that file, and marks it not modified. -If the buffer is already visiting a file, you can specify -a directory name as FILENAME, to write a file of the same -old name in that directory. -If optional second arg CONFIRM is non-nil, -ask for confirmation for overwriting an existing file. -Under XEmacs/Mule, optional third argument specifies the -coding system to use when encoding the file. Interactively, -with a prefix argument, you will be prompted for the coding system." -;; (interactive "FWrite file: ") - (interactive - (list (if buffer-file-name - (read-file-name "Write file: " - nil nil nil nil) - (read-file-name "Write file: " - (cdr (assq 'default-directory - (buffer-local-variables))) - nil nil (buffer-name))) - t - (if (and current-prefix-arg (featurep 'mule)) - (read-coding-system "Coding system: ")))) - (and (eq (current-buffer) mouse-grabbed-buffer) - (error "Can't write minibuffer window")) - (or (null filename) (string-equal filename "") - (progn - ;; If arg is just a directory, - ;; use same file name, but in that directory. - (if (and (file-directory-p filename) buffer-file-name) - (setq filename (concat (file-name-as-directory filename) - (file-name-nondirectory buffer-file-name)))) - (and confirm - (file-exists-p filename) - (or (y-or-n-p (format "File `%s' exists; overwrite? " filename)) - (error "Canceled"))) - (set-visited-file-name filename))) - (set-buffer-modified-p t) - (setq buffer-read-only nil) - (if codesys - (let ((buffer-file-coding-system (get-coding-system codesys))) - (save-buffer)) - (save-buffer))) - -(defun backup-buffer () - "Make a backup of the disk file visited by the current buffer, if appropriate. -This is normally done before saving the buffer the first time. -If the value is non-nil, it is the result of `file-modes' on the original file; -this means that the caller, after saving the buffer, should change the modes -of the new file to agree with the old modes." - (if buffer-file-name - (let ((handler (find-file-name-handler buffer-file-name 'backup-buffer))) - (if handler - (funcall handler 'backup-buffer) - (if (and make-backup-files - (not backup-inhibited) - (not buffer-backed-up) - (file-exists-p buffer-file-name) - (memq (aref (elt (file-attributes buffer-file-name) 8) 0) - '(?- ?l))) - (let ((real-file-name buffer-file-name) - backup-info backupname targets setmodes) - ;; If specified name is a symbolic link, chase it to the target. - ;; Thus we make the backups in the directory where the real file is. - (setq real-file-name (file-chase-links real-file-name)) - (setq backup-info (find-backup-file-name real-file-name) - backupname (car backup-info) - targets (cdr backup-info)) -;;; (if (file-directory-p buffer-file-name) -;;; (error "Cannot save buffer in directory %s" buffer-file-name)) - (if backup-info - (condition-case () - (let ((delete-old-versions - ;; If have old versions to maybe delete, - ;; ask the user to confirm now, before doing anything. - ;; But don't actually delete til later. - (and targets - (or (eq delete-old-versions t) - (eq delete-old-versions nil)) - (or delete-old-versions - (y-or-n-p (format "Delete excess backup versions of %s? " - real-file-name)))))) - ;; Actually write the back up file. - (condition-case () - (if (or file-precious-flag - ; (file-symlink-p buffer-file-name) - backup-by-copying - (and backup-by-copying-when-linked - (> (file-nlinks real-file-name) 1)) - (and backup-by-copying-when-mismatch - (let ((attr (file-attributes real-file-name))) - (or (nth 9 attr) - (not (file-ownership-preserved-p real-file-name)))))) - (condition-case () - (copy-file real-file-name backupname t t) - (file-error - ;; If copying fails because file BACKUPNAME - ;; is not writable, delete that file and try again. - (if (and (file-exists-p backupname) - (not (file-writable-p backupname))) - (delete-file backupname)) - (copy-file real-file-name backupname t t))) - ;; rename-file should delete old backup. - (rename-file real-file-name backupname t) - (setq setmodes (file-modes backupname))) - (file-error - ;; If trouble writing the backup, write it in ~. - (setq backupname (expand-file-name "~/%backup%~")) - (message "Cannot write backup file; backing up in ~/%%backup%%~") - (sleep-for 1) - (condition-case () - (copy-file real-file-name backupname t t) - (file-error - ;; If copying fails because file BACKUPNAME - ;; is not writable, delete that file and try again. - (if (and (file-exists-p backupname) - (not (file-writable-p backupname))) - (delete-file backupname)) - (copy-file real-file-name backupname t t))))) - (setq buffer-backed-up t) - ;; Now delete the old versions, if desired. - (if delete-old-versions - (while targets - (condition-case () - (delete-file (car targets)) - (file-error nil)) - (setq targets (cdr targets)))) - setmodes) - (file-error nil))))))))) - -(defun file-name-sans-versions (name &optional keep-backup-version) - "Return FILENAME sans backup versions or strings. -This is a separate procedure so your site-init or startup file can -redefine it. -If the optional argument KEEP-BACKUP-VERSION is non-nil, -we do not remove backup version numbers, only true file version numbers." - (let ((handler (find-file-name-handler name 'file-name-sans-versions))) - (if handler - (funcall handler 'file-name-sans-versions name keep-backup-version) - (substring name 0 - (if (eq system-type 'vax-vms) - ;; VMS version number is (a) semicolon, optional - ;; sign, zero or more digits or (b) period, option - ;; sign, zero or more digits, provided this is the - ;; second period encountered outside of the - ;; device/directory part of the file name. - (or (string-match ";[-+]?[0-9]*\\'" name) - (if (string-match "\\.[^]>:]*\\(\\.[-+]?[0-9]*\\)\\'" - name) - (match-beginning 1)) - (length name)) - (if keep-backup-version - (length name) - (or (string-match "\\.~[0-9.]+~\\'" name) - ;; XEmacs - VC uses extensions like ".~tagname~" or ".~1.1.5.2~" - (let ((pos (string-match "\\.~\\([^.~ \t]+\\|[0-9.]+\\)~\\'" name))) - (and pos - ;; #### - is this filesystem check too paranoid? - (file-exists-p (substring name 0 pos)) - pos)) - (string-match "~\\'" name) - (length name)))))))) - -(defun file-ownership-preserved-p (file) - "Return t if deleting FILE and rewriting it would preserve the owner." - (let ((handler (find-file-name-handler file 'file-ownership-preserved-p))) - (if handler - (funcall handler 'file-ownership-preserved-p file) - (let ((attributes (file-attributes file))) - ;; Return t if the file doesn't exist, since it's true that no - ;; information would be lost by an (attempted) delete and create. - (or (null attributes) - (= (nth 2 attributes) (user-uid))))))) - -(defun file-name-sans-extension (filename) - "Return FILENAME sans final \"extension\". -The extension, in a file name, is the part that follows the last `.'." - (save-match-data - (let ((file (file-name-sans-versions (file-name-nondirectory filename))) - directory) - (if (string-match "\\.[^.]*\\'" file) - (if (setq directory (file-name-directory filename)) - (expand-file-name (substring file 0 (match-beginning 0)) - directory) - (substring file 0 (match-beginning 0))) - filename)))) - -(defun file-name-extension (filename &optional period) - "Return FILENAME's final \"extension\". -The extension, in a file name, is the part that follows the last `.'. -Return nil for extensionless file names such as `foo'. -Return the empty string for file names such as `foo.'. - -If PERIOD is non-nil, then the returned value includes the period -that delimits the extension, and if FILENAME has no extension, -the value is \"\"." - (save-match-data - (let ((file (file-name-sans-versions (file-name-nondirectory filename)))) - (if (string-match "\\.[^.]*\\'" file) - (substring file (+ (match-beginning 0) (if period 0 1))) - (if period - ""))))) - -(defun make-backup-file-name (file) - "Create the non-numeric backup file name for FILE. -This is a separate function so you can redefine it for customization." - (if (eq system-type 'ms-dos) - (let ((fn (file-name-nondirectory file))) - (concat (file-name-directory file) - (if (string-match "\\([^.]*\\)\\(\\..*\\)?" fn) - (substring fn 0 (match-end 1))) - ".bak")) - (concat file "~"))) - -(defun backup-file-name-p (file) - "Return non-nil if FILE is a backup file name (numeric or not). -This is a separate function so you can redefine it for customization. -You may need to redefine `file-name-sans-versions' as well." - (if (eq system-type 'ms-dos) - (string-match "\\.bak\\'" file) - (string-match "~\\'" file))) - -;; This is used in various files. -;; The usage of bv-length is not very clean, -;; but I can't see a good alternative, -;; so as of now I am leaving it alone. -(defun backup-extract-version (fn) - "Given the name of a numeric backup file, return the backup number. -Uses the free variable `bv-length', whose value should be -the index in the name where the version number begins." - (declare (special bv-length)) - (if (and (string-match "[0-9]+~\\'" fn bv-length) - (= (match-beginning 0) bv-length)) - (string-to-int (substring fn bv-length -1)) - 0)) - -;; I believe there is no need to alter this behavior for VMS; -;; since backup files are not made on VMS, it should not get called. -(defun find-backup-file-name (fn) - "Find a file name for a backup file, and suggestions for deletions. -Value is a list whose car is the name for the backup file - and whose cdr is a list of old versions to consider deleting now. -If the value is nil, don't make a backup." - (let ((handler (find-file-name-handler fn 'find-backup-file-name))) - ;; Run a handler for this function so that ange-ftp can refuse to do it. - (if handler - (funcall handler 'find-backup-file-name fn) - (if (eq version-control 'never) - (list (make-backup-file-name fn)) - (let* ((base-versions (concat (file-name-nondirectory fn) ".~")) - ;; used by backup-extract-version: - (bv-length (length base-versions)) - possibilities - (versions nil) - (high-water-mark 0) - (deserve-versions-p nil) - (number-to-delete 0)) - (condition-case () - (setq possibilities (file-name-all-completions - base-versions - (file-name-directory fn)) - versions (sort (mapcar - #'backup-extract-version - possibilities) - '<) - high-water-mark (apply #'max 0 versions) - deserve-versions-p (or version-control - (> high-water-mark 0)) - number-to-delete (- (length versions) - kept-old-versions kept-new-versions -1)) - (file-error - (setq possibilities nil))) - (if (not deserve-versions-p) - (list (make-backup-file-name fn)) - (cons (concat fn ".~" (int-to-string (1+ high-water-mark)) "~") - (if (and (> number-to-delete 0) - ;; Delete nothing if there is overflow - ;; in the number of versions to keep. - (>= (+ kept-new-versions kept-old-versions -1) 0)) - (mapcar #'(lambda (n) - (concat fn ".~" (int-to-string n) "~")) - (let ((v (nthcdr kept-old-versions versions))) - (rplacd (nthcdr (1- number-to-delete) v) ()) - v)))))))))) - -(defun file-nlinks (filename) - "Return number of names file FILENAME has." - (car (cdr (file-attributes filename)))) - -(defun file-relative-name (filename &optional directory) - "Convert FILENAME to be relative to DIRECTORY (default: default-directory). -This function returns a relative file name which is equivalent to FILENAME -when used with that default directory as the default. -If this is impossible (which can happen on MSDOS and Windows -when the file name and directory use different drive names) -then it returns FILENAME." - (save-match-data - (let ((fname (expand-file-name filename))) - (setq directory (file-name-as-directory - (expand-file-name (or directory default-directory)))) - ;; On Microsoft OSes, if FILENAME and DIRECTORY have different - ;; drive names, they can't be relative, so return the absolute name. - (if (and (or (eq system-type 'ms-dos) - (eq system-type 'windows-nt)) - (not (string-equal (substring fname 0 2) - (substring directory 0 2)))) - filename - (let ((ancestor ".") - (fname-dir (file-name-as-directory fname))) - (while (and (not (string-match (concat "^" (regexp-quote directory)) - fname-dir)) - (not (string-match (concat "^" (regexp-quote directory)) fname))) - (setq directory (file-name-directory (substring directory 0 -1)) - ancestor (if (equal ancestor ".") - ".." - (concat "../" ancestor)))) - ;; Now ancestor is empty, or .., or ../.., etc. - (if (string-match (concat "^" (regexp-quote directory)) fname) - ;; We matched within FNAME's directory part. - ;; Add the rest of FNAME onto ANCESTOR. - (let ((rest (substring fname (match-end 0)))) - (if (and (equal ancestor ".") - (not (equal rest ""))) - ;; But don't bother with ANCESTOR if it would give us `./'. - rest - (concat (file-name-as-directory ancestor) rest))) - ;; We matched FNAME's directory equivalent. - ancestor)))))) - -(defun save-buffer (&optional args) - "Save current buffer in visited file if modified. Versions described below. - -By default, makes the previous version into a backup file - if previously requested or if this is the first save. -With 1 or 3 \\[universal-argument]'s, marks this version - to become a backup when the next save is done. -With 2 or 3 \\[universal-argument]'s, - unconditionally makes the previous version into a backup file. -With argument of 0, never makes the previous version into a backup file. - -If a file's name is FOO, the names of its numbered backup versions are - FOO.~i~ for various integers i. A non-numbered backup file is called FOO~. -Numeric backups (rather than FOO~) will be made if value of - `version-control' is not the atom `never' and either there are already - numeric versions of the file being backed up, or `version-control' is - non-nil. -We don't want excessive versions piling up, so there are variables - `kept-old-versions', which tells XEmacs how many oldest versions to keep, - and `kept-new-versions', which tells how many newest versions to keep. - Defaults are 2 old versions and 2 new. -`dired-kept-versions' controls dired's clean-directory (.) command. -If `delete-old-versions' is nil, system will query user - before trimming versions. Otherwise it does it silently." - (interactive "_p") - (let ((modp (buffer-modified-p)) - (large (> (buffer-size) 50000)) - (make-backup-files (or (and make-backup-files (not (eq args 0))) - (memq args '(16 64))))) - (and modp (memq args '(16 64)) (setq buffer-backed-up nil)) - (if (and modp large) (display-message - 'progress (format "Saving file %s..." - (buffer-file-name)))) - (basic-save-buffer) - (and modp (memq args '(4 64)) (setq buffer-backed-up nil)))) - -(defun delete-auto-save-file-if-necessary (&optional force) - "Delete auto-save file for current buffer if `delete-auto-save-files' is t. -Normally delete only if the file was written by this XEmacs -since the last real save, but optional arg FORCE non-nil means delete anyway." - (and buffer-auto-save-file-name delete-auto-save-files - (not (string= buffer-file-name buffer-auto-save-file-name)) - (or force (recent-auto-save-p)) - (progn - (condition-case () - (delete-file buffer-auto-save-file-name) - (file-error nil)) - (set-buffer-auto-saved)))) - -;; XEmacs change (from Sun) -;; used to communicate with continue-save-buffer: -(defvar continue-save-buffer-hooks-tail nil) - -;; Not in FSFmacs -(defun basic-write-file-data (realname truename) - ;; call the hooks until the bytes are put - ;; call write-region as a last resort - (let ((region-written nil) - (hooks write-file-data-hooks)) - (while (and hooks (not region-written)) - (setq region-written (funcall (car hooks) realname) - hooks (cdr hooks))) - (if (not region-written) - (write-region (point-min) (point-max) realname nil t truename)))) - -(put 'after-save-hook 'permanent-local t) -(defvar after-save-hook nil - "Normal hook that is run after a buffer is saved to its file. -These hooks are considered to pertain to the visited file. -So this list is cleared if you change the visited file name.") - -(defun files-fetch-hook-value (hook) - (let ((localval (symbol-value hook)) - (globalval (default-value hook))) - (if (memq t localval) - (setq localval (append (delq t localval) (delq t globalval)))) - localval)) - -(defun basic-save-buffer () - "Save the current buffer in its visited file, if it has been modified. -After saving the buffer, run `after-save-hook'." - (interactive) - (save-excursion - ;; In an indirect buffer, save its base buffer instead. - (if (buffer-base-buffer) - (set-buffer (buffer-base-buffer))) - (if (buffer-modified-p) - (let ((recent-save (recent-auto-save-p))) - ;; On VMS, rename file and buffer to get rid of version number. - (if (and (eq system-type 'vax-vms) - (not (string= buffer-file-name - (file-name-sans-versions buffer-file-name)))) - (let (buffer-new-name) - ;; Strip VMS version number before save. - (setq buffer-file-name - (file-name-sans-versions buffer-file-name)) - ;; Construct a (unique) buffer name to correspond. - (let ((buf (create-file-buffer (downcase buffer-file-name)))) - (setq buffer-new-name (buffer-name buf)) - (kill-buffer buf)) - (rename-buffer buffer-new-name))) - ;; If buffer has no file name, ask user for one. - (or buffer-file-name - (let ((filename - (expand-file-name - (read-file-name "File to save in: ") nil))) - (and (file-exists-p filename) - (or (y-or-n-p (format "File `%s' exists; overwrite? " - filename)) - (error "Canceled"))) - (set-visited-file-name filename))) - (or (verify-visited-file-modtime (current-buffer)) - (not (file-exists-p buffer-file-name)) - (yes-or-no-p - (format "%s has changed since visited or saved. Save anyway? " - (file-name-nondirectory buffer-file-name))) - (error "Save not confirmed")) - (save-restriction - (widen) - (and (> (point-max) 1) - (/= (char-after (1- (point-max))) ?\n) - (not (and (eq selective-display t) - (= (char-after (1- (point-max))) ?\r))) - (or (eq require-final-newline t) - (and require-final-newline - (y-or-n-p - (format "Buffer %s does not end in newline. Add one? " - (buffer-name))))) - (save-excursion - (goto-char (point-max)) - (insert ?\n))) - ;; - ;; Run the write-file-hooks until one returns non-null. - ;; Bind after-save-hook to nil while running the - ;; write-file-hooks so that if this function is called - ;; recursively (from inside a write-file-hook) the - ;; after-hooks will only get run once (from the - ;; outermost call). - ;; - ;; Ugh, have to duplicate logic of run-hook-with-args-until-success - (let ((hooks (append (files-fetch-hook-value 'write-contents-hooks) - (files-fetch-hook-value - 'local-write-file-hooks) - (files-fetch-hook-value 'write-file-hooks))) - (after-save-hook nil) - (local-write-file-hooks nil) - (write-contents-hooks nil) - (write-file-hooks nil) - done) - (while (and hooks - (let ((continue-save-buffer-hooks-tail hooks)) - (not (setq done (funcall (car hooks)))))) - (setq hooks (cdr hooks))) - ;; If a hook returned t, file is already "written". - ;; Otherwise, write it the usual way now. - (if (not done) - (basic-save-buffer-1))) - ;; XEmacs: next two clauses (buffer-file-number setting and - ;; set-file-modes) moved into basic-save-buffer-1. - ) - ;; If the auto-save file was recent before this command, - ;; delete it now. - (delete-auto-save-file-if-necessary recent-save) - ;; Support VC `implicit' locking. - (when (fboundp 'vc-after-save) - (vc-after-save)) - (run-hooks 'after-save-hook)) - (display-message 'no-log "(No changes need to be saved)")))) - -;; This does the "real job" of writing a buffer into its visited file -;; and making a backup file. This is what is normally done -;; but inhibited if one of write-file-hooks returns non-nil. -;; It returns a value to store in setmodes. -(defun basic-save-buffer-1 () - (let (setmodes tempsetmodes) - (if (not (file-writable-p buffer-file-name)) - (let ((dir (file-name-directory buffer-file-name))) - (if (not (file-directory-p dir)) - (error "%s is not a directory" dir) - (if (not (file-exists-p buffer-file-name)) - (error "Directory %s write-protected" dir) - (if (yes-or-no-p - (format "File %s is write-protected; try to save anyway? " - (file-name-nondirectory - buffer-file-name))) - (setq tempsetmodes t) - (error - "Attempt to save to a file which you aren't allowed to write")))))) - (or buffer-backed-up - (setq setmodes (backup-buffer))) - (let ((dir (file-name-directory buffer-file-name))) - (if (and file-precious-flag - (file-writable-p dir)) - ;; If file is precious, write temp name, then rename it. - ;; This requires write access to the containing dir, - ;; which is why we don't try it if we don't have that access. - (let ((realname buffer-file-name) - tempname nogood i succeed - (old-modtime (visited-file-modtime))) - (setq i 0) - (setq nogood t) - ;; Find the temporary name to write under. - (while nogood - (setq tempname (format "%s#tmp#%d" dir i)) - (setq nogood (file-exists-p tempname)) - (setq i (1+ i))) - (unwind-protect - (progn (clear-visited-file-modtime) - (write-region (point-min) (point-max) - tempname nil realname - buffer-file-truename) - (setq succeed t)) - ;; If writing the temp file fails, - ;; delete the temp file. - (or succeed - (progn - (delete-file tempname) - (set-visited-file-modtime old-modtime)))) - ;; Since we have created an entirely new file - ;; and renamed it, make sure it gets the - ;; right permission bits set. - (setq setmodes (file-modes buffer-file-name)) - ;; We succeeded in writing the temp file, - ;; so rename it. - (rename-file tempname buffer-file-name t)) - ;; If file not writable, see if we can make it writable - ;; temporarily while we write it. - ;; But no need to do so if we have just backed it up - ;; (setmodes is set) because that says we're superseding. - (cond ((and tempsetmodes (not setmodes)) - ;; Change the mode back, after writing. - (setq setmodes (file-modes buffer-file-name)) - (set-file-modes buffer-file-name 511))) - (basic-write-file-data buffer-file-name buffer-file-truename))) - (setq buffer-file-number - (if buffer-file-name - (nth 10 (file-attributes buffer-file-name)) - nil)) - (if setmodes - (condition-case () - (set-file-modes buffer-file-name setmodes) - (error nil))))) - -;; XEmacs change, from Sun -(defun continue-save-buffer () - "Provide a clean way for a write-file-hook to wrap AROUND -the execution of the remaining hooks and writing to disk. -Do not call this function except from a functions -on the write-file-hooks or write-contents-hooks list. -A hook that calls this function must return non-nil, -to signal completion to its caller. continue-save-buffer -always returns non-nil." - (let ((hooks (cdr (or continue-save-buffer-hooks-tail - (error - "continue-save-buffer called outside a write-file-hook!")))) - (done nil)) - ;; Do something like this: - ;; (let ((write-file-hooks hooks)) (basic-save-buffer)) - ;; First run the rest of the hooks. - (while (and hooks - (let ((continue-save-buffer-hooks-tail hooks)) - (not (setq done (funcall (car hooks)))))) - (setq hooks (cdr hooks))) - ;; - ;; If a hook returned t, file is already "written". - (if (not done) - (basic-save-buffer-1)) - 'continue-save-buffer)) - -(defcustom save-some-buffers-query-display-buffer t - "*Non-nil makes `\\[save-some-buffers]' switch to the buffer offered for saving." - :type 'boolean - :group 'editing-basics) - -(defun save-some-buffers (&optional arg exiting) - "Save some modified file-visiting buffers. Asks user about each one. -Optional argument (the prefix) non-nil means save all with no questions. -Optional second argument EXITING means ask about certain non-file buffers - as well as about file buffers." - (interactive "P") - (save-excursion - ;; `delete-other-windows' can bomb during autoloads generation, so - ;; guard it well. - (if (or noninteractive - (eq (selected-window) (minibuffer-window)) - (not save-some-buffers-query-display-buffer)) - ;; If playing with windows is unsafe or undesired, just do the - ;; usual drill. - (save-some-buffers-1 arg exiting nil) - ;; Else, protect the windows. - (when (save-window-excursion - (save-some-buffers-1 arg exiting t)) - ;; Force redisplay. - (sit-for 0))))) - -;; XEmacs - do not use queried flag -(defun save-some-buffers-1 (arg exiting switch-buffer) - (let* ((switched nil) - (files-done - (map-y-or-n-p - (lambda (buffer) - (and (buffer-modified-p buffer) - (not (buffer-base-buffer buffer)) - ;; XEmacs addition: - (not (symbol-value-in-buffer 'save-buffers-skip buffer)) - (or - (buffer-file-name buffer) - (and exiting - (progn - (set-buffer buffer) - (and buffer-offer-save (> (buffer-size) 0))))) - (if arg - t - ;; #### We should provide a per-buffer means to - ;; disable the switching. For instance, you might - ;; want to turn it off for buffers the contents of - ;; which is meaningless to humans, such as - ;; `.newsrc.eld'. - (when switch-buffer - (unless (one-window-p) - (delete-other-windows)) - (setq switched t) - ;; #### Consider using `display-buffer' here for 21.1! - ;;(display-buffer buffer nil (selected-frame))) - (switch-to-buffer buffer t)) - (if (buffer-file-name buffer) - (format "Save file %s? " - (buffer-file-name buffer)) - (format "Save buffer %s? " - (buffer-name buffer)))))) - (lambda (buffer) - (set-buffer buffer) - (condition-case () - (save-buffer) - (error nil))) - (buffer-list) - '("buffer" "buffers" "save") - ;;instead of this we just say "yes all", "no all", etc. - ;;"save all the rest" - ;;"save only this buffer" "save no more buffers") - ;; this is rather bogus. --ben - ;; (it makes the dialog box too big, and you get an error - ;; "wrong type argument: framep, nil" when you hit q after - ;; choosing the option from the dialog box) - - ;; We should fix the dialog box rather than disabling - ;; this! --hniksic - (list (list ?\C-r (lambda (buf) - ;; #### FSF has an EXIT-ACTION argument - ;; to `view-buffer'. - (view-buffer buf) - (setq view-exit-action - (lambda (ignore) - (exit-recursive-edit))) - (recursive-edit) - ;; Return nil to ask about BUF again. - nil) - "display the current buffer")))) - (abbrevs-done - (and save-abbrevs abbrevs-changed - (progn - (if (or arg - (y-or-n-p (format "Save abbrevs in %s? " abbrev-file-name))) - (write-abbrev-file nil)) - ;; Don't keep bothering user if he says no. - (setq abbrevs-changed nil) - t)))) - (or (> files-done 0) abbrevs-done - (display-message 'no-log "(No files need saving)")) - switched)) - - -(defun not-modified (&optional arg) - "Mark current buffer as unmodified, not needing to be saved. -With prefix arg, mark buffer as modified, so \\[save-buffer] will save. - -It is not a good idea to use this function in Lisp programs, because it -prints a message in the minibuffer. Instead, use `set-buffer-modified-p'." - (interactive "_P") - (if arg ;; rewritten for I18N3 snarfing - (display-message 'command "Modification-flag set") - (display-message 'command "Modification-flag cleared")) - (set-buffer-modified-p arg)) - -(defun toggle-read-only (&optional arg) - "Toggle the current buffer's read-only status. -With arg, set read-only iff arg is positive." - (interactive "_P") - (setq buffer-read-only - (if (null arg) - (not buffer-read-only) - (> (prefix-numeric-value arg) 0))) - ;; Force modeline redisplay - (redraw-modeline)) - -(defun insert-file (filename &optional codesys) - "Insert contents of file FILENAME into buffer after point. -Set mark after the inserted text. - -Under XEmacs/Mule, optional second argument specifies the -coding system to use when decoding the file. Interactively, -with a prefix argument, you will be prompted for the coding system. - -This function is meant for the user to run interactively. -Don't call it from programs! Use `insert-file-contents' instead. -\(Its calling sequence is different; see its documentation)." - (interactive "*fInsert file: \nZCoding system: ") - (if (file-directory-p filename) - (signal 'file-error (list "Opening input file" "file is a directory" - filename))) - (let ((tem - (if codesys - (let ((coding-system-for-read - (get-coding-system codesys))) - (insert-file-contents filename)) - (insert-file-contents filename)))) - (push-mark (+ (point) (car (cdr tem)))))) - -(defun append-to-file (start end filename &optional codesys) - "Append the contents of the region to the end of file FILENAME. -When called from a function, expects three arguments, -START, END and FILENAME. START and END are buffer positions -saying what text to write. -Under XEmacs/Mule, optional fourth argument specifies the -coding system to use when encoding the file. Interactively, -with a prefix argument, you will be prompted for the coding system." - (interactive "r\nFAppend to file: \nZCoding system: ") - (if codesys - (let ((buffer-file-coding-system (get-coding-system codesys))) - (write-region start end filename t)) - (write-region start end filename t))) - -(defun file-newest-backup (filename) - "Return most recent backup file for FILENAME or nil if no backups exist." - (let* ((filename (expand-file-name filename)) - (file (file-name-nondirectory filename)) - (dir (file-name-directory filename)) - (comp (file-name-all-completions file dir)) - newest) - (while comp - (setq file (concat dir (car comp)) - comp (cdr comp)) - (if (and (backup-file-name-p file) - (or (null newest) (file-newer-than-file-p file newest))) - (setq newest file))) - newest)) - -(defun rename-uniquely () - "Rename current buffer to a similar name not already taken. -This function is useful for creating multiple shell process buffers -or multiple mail buffers, etc." - (interactive) - (save-match-data - (let* ((base-name (if (and (string-match "<[0-9]+>\\'" (buffer-name)) - (not (and buffer-file-name - (string= (buffer-name) - (file-name-nondirectory - buffer-file-name))))) - ;; If the existing buffer name has a , - ;; which isn't part of the file name (if any), - ;; then get rid of that. - (substring (buffer-name) 0 (match-beginning 0)) - (buffer-name))) - (new-buf (generate-new-buffer base-name)) - (name (buffer-name new-buf))) - (kill-buffer new-buf) - (rename-buffer name) - (redraw-modeline)))) - -(defun make-directory-path (path) - "Create all the directories along path that don't exist yet." - (interactive "Fdirectory path to create: ") - (make-directory path t)) - -(defun make-directory (dir &optional parents) - "Create the directory DIR and any nonexistent parent dirs. -Interactively, the default choice of directory to create -is the current default directory for file names. -That is useful when you have visited a file in a nonexistent directory. - -Noninteractively, the second (optional) argument PARENTS says whether -to create parent directories if they don't exist." - (interactive (list (let ((current-prefix-arg current-prefix-arg)) - (read-directory-name "Create directory: ")) - current-prefix-arg)) - (let ((handler (find-file-name-handler dir 'make-directory))) - (if handler - (funcall handler 'make-directory dir parents) - (if (not parents) - (make-directory-internal dir) - (let ((dir (directory-file-name (expand-file-name dir))) - create-list) - (while (not (file-exists-p dir)) - (setq create-list (cons dir create-list) - dir (directory-file-name (file-name-directory dir)))) - (while create-list - (make-directory-internal (car create-list)) - (setq create-list (cdr create-list)))))))) - -(put 'revert-buffer-function 'permanent-local t) -(defvar revert-buffer-function nil - "Function to use to revert this buffer, or nil to do the default. -The function receives two arguments IGNORE-AUTO and NOCONFIRM, -which are the arguments that `revert-buffer' received.") - -(put 'revert-buffer-insert-file-contents-function 'permanent-local t) -(defvar revert-buffer-insert-file-contents-function nil - "Function to use to insert contents when reverting this buffer. -Gets two args, first the nominal file name to use, -and second, t if reading the auto-save file.") - -(defvar before-revert-hook nil - "Normal hook for `revert-buffer' to run before reverting. -If `revert-buffer-function' is used to override the normal revert -mechanism, this hook is not used.") - -(defvar after-revert-hook nil - "Normal hook for `revert-buffer' to run after reverting. -Note that the hook value that it runs is the value that was in effect -before reverting; that makes a difference if you have buffer-local -hook functions. - -If `revert-buffer-function' is used to override the normal revert -mechanism, this hook is not used.") - -(defvar revert-buffer-internal-hook nil - "Don't use this.") - -(defun revert-buffer (&optional ignore-auto noconfirm preserve-modes) - "Replace the buffer text with the text of the visited file on disk. -This undoes all changes since the file was visited or saved. -With a prefix argument, offer to revert from latest auto-save file, if -that is more recent than the visited file. - -This command also works for special buffers that contain text which -doesn't come from a file, but reflects some other data base instead: -for example, Dired buffers and buffer-list buffers. In these cases, -it reconstructs the buffer contents from the appropriate data base. - -When called from Lisp, the first argument is IGNORE-AUTO; only offer -to revert from the auto-save file when this is nil. Note that the -sense of this argument is the reverse of the prefix argument, for the -sake of backward compatibility. IGNORE-AUTO is optional, defaulting -to nil. - -Optional second argument NOCONFIRM means don't ask for confirmation at -all. - -Optional third argument PRESERVE-MODES non-nil means don't alter -the files modes. Normally we reinitialize them using `normal-mode'. - -If the value of `revert-buffer-function' is non-nil, it is called to -do all the work for this command. Otherwise, the hooks -`before-revert-hook' and `after-revert-hook' are run at the beginning -and the end, and if `revert-buffer-insert-file-contents-function' is -non-nil, it is called instead of rereading visited file contents." - - ;; I admit it's odd to reverse the sense of the prefix argument, but - ;; there is a lot of code out there which assumes that the first - ;; argument should be t to avoid consulting the auto-save file, and - ;; there's no straightforward way to encourage authors to notice a - ;; reversal of the argument sense. So I'm just changing the user - ;; interface, but leaving the programmatic interface the same. - (interactive (list (not current-prefix-arg))) - (if revert-buffer-function - (funcall revert-buffer-function ignore-auto noconfirm) - (let* ((opoint (point)) - (auto-save-p (and (not ignore-auto) - (recent-auto-save-p) - buffer-auto-save-file-name - (file-readable-p buffer-auto-save-file-name) - (y-or-n-p - "Buffer has been auto-saved recently. Revert from auto-save file? "))) - (file-name (if auto-save-p - buffer-auto-save-file-name - buffer-file-name))) - (cond ((null file-name) - (error "Buffer does not seem to be associated with any file")) - ((or noconfirm - (and (not (buffer-modified-p)) - (let (found) - (dolist (rx revert-without-query found) - (when (string-match rx file-name) - (setq found t))))) - (yes-or-no-p (format "Revert buffer from file %s? " - file-name))) - (run-hooks 'before-revert-hook) - ;; If file was backed up but has changed since, - ;; we shd make another backup. - (and (not auto-save-p) - (not (verify-visited-file-modtime (current-buffer))) - (setq buffer-backed-up nil)) - ;; Get rid of all undo records for this buffer. - (or (eq buffer-undo-list t) - (setq buffer-undo-list nil)) - ;; Effectively copy the after-revert-hook status, - ;; since after-find-file will clobber it. - (let ((global-hook (default-value 'after-revert-hook)) - (local-hook-p (local-variable-p 'after-revert-hook - (current-buffer))) - (local-hook (and (local-variable-p 'after-revert-hook - (current-buffer)) - after-revert-hook))) - (let (buffer-read-only - ;; Don't make undo records for the reversion. - (buffer-undo-list t)) - (if revert-buffer-insert-file-contents-function - (funcall revert-buffer-insert-file-contents-function - file-name auto-save-p) - (if (not (file-exists-p file-name)) - (error "File %s no longer exists!" file-name)) - ;; Bind buffer-file-name to nil - ;; so that we don't try to lock the file. - (let ((buffer-file-name nil)) - (or auto-save-p - (unlock-buffer))) - (widen) - (insert-file-contents file-name (not auto-save-p) - nil nil t))) - (goto-char (min opoint (point-max))) - ;; Recompute the truename in case changes in symlinks - ;; have changed the truename. - ;XEmacs: already done by insert-file-contents - ;;(setq buffer-file-truename - ;;(abbreviate-file-name (file-truename buffer-file-name))) - (after-find-file nil nil t t preserve-modes) - ;; Run after-revert-hook as it was before we reverted. - (setq-default revert-buffer-internal-hook global-hook) - (if local-hook-p - (progn - (make-local-variable 'revert-buffer-internal-hook) - (setq revert-buffer-internal-hook local-hook)) - (kill-local-variable 'revert-buffer-internal-hook)) - (run-hooks 'revert-buffer-internal-hook)) - t))))) - -(defun recover-file (file) - "Visit file FILE, but get contents from its last auto-save file." - ;; Actually putting the file name in the minibuffer should be used - ;; only rarely. - ;; Not just because users often use the default. - (interactive "FRecover file: ") - (setq file (expand-file-name file)) - (let ((handler (or (find-file-name-handler file 'recover-file) - (find-file-name-handler - (let ((buffer-file-name file)) - (make-auto-save-file-name)) - 'recover-file)))) - (if handler - (funcall handler 'recover-file file) - (if (auto-save-file-name-p file) - (error "%s is an auto-save file" file)) - (let ((file-name (let ((buffer-file-name file)) - (make-auto-save-file-name)))) - (cond ((if (file-exists-p file) - (not (file-newer-than-file-p file-name file)) - (not (file-exists-p file-name))) - (error "Auto-save file %s not current" file-name)) - ((save-window-excursion - (if (not (eq system-type 'vax-vms)) - (with-output-to-temp-buffer "*Directory*" - (buffer-disable-undo standard-output) - (call-process "ls" nil standard-output nil - (if (file-symlink-p file) "-lL" "-l") - file file-name))) - (yes-or-no-p (format "Recover auto save file %s? " file-name))) - (switch-to-buffer (find-file-noselect file t)) - (let ((buffer-read-only nil)) - (erase-buffer) - (insert-file-contents file-name nil)) - (after-find-file nil nil t)) - (t (error "Recover-file cancelled."))))))) - -(defun recover-session () - "Recover auto save files from a previous Emacs session. -This command first displays a Dired buffer showing you the -previous sessions that you could recover from. -To choose one, move point to the proper line and then type C-c C-c. -Then you'll be asked about a number of files to recover." - (interactive) - (unless (fboundp 'dired) - (error "recover-session requires dired")) - (if (null auto-save-list-file-prefix) - (error - "You set `auto-save-list-file-prefix' to disable making session files")) - (dired (concat auto-save-list-file-prefix "*")) - (goto-char (point-min)) - (or (looking-at "Move to the session you want to recover,") - (let ((inhibit-read-only t)) - (insert "Move to the session you want to recover,\n" - "then type C-c C-c to select it.\n\n" - "You can also delete some of these files;\n" - "type d on a line to mark that file for deletion.\n\n"))) - (use-local-map (let ((map (make-sparse-keymap))) - (set-keymap-parents map (list (current-local-map))) - map)) - (define-key (current-local-map) "\C-c\C-c" 'recover-session-finish)) - -(defun recover-session-finish () - "Choose one saved session to recover auto-save files from. -This command is used in the special Dired buffer created by -\\[recover-session]." - (interactive) - ;; Get the name of the session file to recover from. - (let ((file (dired-get-filename)) - files - (buffer (get-buffer-create " *recover*"))) - ;; #### dired-do-flagged-delete in FSF. - ;; This version is for ange-ftp - ;;(dired-do-deletions t) - ;; This version is for efs - (dired-expunge-deletions) - (unwind-protect - (save-excursion - ;; Read in the auto-save-list file. - (set-buffer buffer) - (erase-buffer) - (insert-file-contents file) - ;; Loop thru the text of that file - ;; and get out the names of the files to recover. - (while (not (eobp)) - (let (thisfile autofile) - (if (eolp) - ;; This is a pair of lines for a non-file-visiting buffer. - ;; Get the auto-save file name and manufacture - ;; a "visited file name" from that. - (progn - (forward-line 1) - (setq autofile - (buffer-substring-no-properties - (point) - (save-excursion - (end-of-line) - (point)))) - (setq thisfile - (expand-file-name - (substring - (file-name-nondirectory autofile) - 1 -1) - (file-name-directory autofile))) - (forward-line 1)) - ;; This pair of lines is a file-visiting - ;; buffer. Use the visited file name. - (progn - (setq thisfile - (buffer-substring-no-properties - (point) (progn (end-of-line) (point)))) - (forward-line 1) - (setq autofile - (buffer-substring-no-properties - (point) (progn (end-of-line) (point)))) - (forward-line 1))) - ;; Ignore a file if its auto-save file does not exist now. - (if (file-exists-p autofile) - (setq files (cons thisfile files))))) - (setq files (nreverse files)) - ;; The file contains a pair of line for each auto-saved buffer. - ;; The first line of the pair contains the visited file name - ;; or is empty if the buffer was not visiting a file. - ;; The second line is the auto-save file name. - (if files - (map-y-or-n-p "Recover %s? " - (lambda (file) - (condition-case nil - (save-excursion (recover-file file)) - (error - "Failed to recover `%s'" file))) - files - '("file" "files" "recover")) - (message "No files can be recovered from this session now"))) - (kill-buffer buffer)))) - -(defun kill-some-buffers (&optional list) - "For each buffer in LIST, ask whether to kill it. -LIST defaults to all existing live buffers." - (interactive) - (if (null list) - (setq list (buffer-list))) - (while list - (let* ((buffer (car list)) - (name (buffer-name buffer))) - (and (not (string-equal name "")) - (/= (aref name 0) ?\ ) - (yes-or-no-p - (format - (if (buffer-modified-p buffer) - (gettext "Buffer %s HAS BEEN EDITED. Kill? ") - (gettext "Buffer %s is unmodified. Kill? ")) - name)) - (kill-buffer buffer))) - (setq list (cdr list)))) - -(defun auto-save-mode (arg) - "Toggle auto-saving of contents of current buffer. -With prefix argument ARG, turn auto-saving on if positive, else off." - (interactive "P") - (setq buffer-auto-save-file-name - (and (if (null arg) - (or (not buffer-auto-save-file-name) - ;; If autosave is off because buffer has shrunk, - ;; then toggling should turn it on. - (< buffer-saved-size 0)) - (or (eq arg t) (listp arg) (and (integerp arg) (> arg 0)))) - (if (and buffer-file-name auto-save-visited-file-name - (not buffer-read-only)) - buffer-file-name - (make-auto-save-file-name)))) - ;; If -1 was stored here, to temporarily turn off saving, - ;; turn it back on. - (and (< buffer-saved-size 0) - (setq buffer-saved-size 0)) - (if (interactive-p) - (if buffer-auto-save-file-name ;; rewritten for I18N3 snarfing - (display-message 'command "Auto-save on (in this buffer)") - (display-message 'command "Auto-save off (in this buffer)"))) - buffer-auto-save-file-name) - -(defun rename-auto-save-file () - "Adjust current buffer's auto save file name for current conditions. -Also rename any existing auto save file, if it was made in this session." - (let ((osave buffer-auto-save-file-name)) - (setq buffer-auto-save-file-name - (make-auto-save-file-name)) - (if (and osave buffer-auto-save-file-name - (not (string= buffer-auto-save-file-name buffer-file-name)) - (not (string= buffer-auto-save-file-name osave)) - (file-exists-p osave) - (recent-auto-save-p)) - (rename-file osave buffer-auto-save-file-name t)))) - -;; see also ../packages/auto-save.el -(defun make-auto-save-file-name (&optional filename) - "Return file name to use for auto-saves of current buffer. -Does not consider `auto-save-visited-file-name' as that variable is checked -before calling this function. You can redefine this for customization. -See also `auto-save-file-name-p'." - (let ((fname (or filename buffer-file-name)) - name) - (setq name - (if fname - (concat (file-name-directory fname) - "#" - (file-name-nondirectory fname) - "#") - - ;; Deal with buffers that don't have any associated files. (Mail - ;; mode tends to create a good number of these.) - - (let ((buffer-name (buffer-name)) - (limit 0)) - ;; Use technique from Sebastian Kremer's auto-save - ;; package to turn slashes into \\!. This ensures that - ;; the auto-save buffer name is unique. - - ;; #### - yuck! yuck! yuck! move this functionality - ;; somewhere else and make the name translation customizable. - ;; Using "\!" as part of a filename on a UNIX filesystem is nearly - ;; IMPOSSIBLE to get past a shell parser. -stig - - (while (string-match "[/\\]" buffer-name limit) - (setq buffer-name - (concat (substring buffer-name 0 (match-beginning 0)) - (if (string= (substring buffer-name - (match-beginning 0) - (match-end 0)) - "/") - "\\!" - "\\\\") - (substring buffer-name (match-end 0)))) - (setq limit (1+ (match-end 0)))) - - ;; (expand-file-name (format "#%s#%s#" (buffer-name) (make-temp-name ""))) - - ;; jwz: putting the emacs PID in the auto-save file name - ;; is bad news, because that defeats auto-save-recovery of - ;; *mail* buffers -- the (sensible) code in sendmail.el - ;; calls (make-auto-save-file-name) to determine whether - ;; there is unsent, auto-saved mail to recover. If that - ;; mail came from a previous emacs process (far and away - ;; the most likely case) then this can never succeed as - ;; the pid differs. - - (expand-file-name (format "#%s#" buffer-name))) - )) - ;; don't try to write auto-save files in unwritable places. Unless - ;; there's already an autosave file here, put ours somewhere safe. --Stig - (if (or (file-writable-p name) - (file-exists-p name)) - name - (expand-file-name (concat "~/" (file-name-nondirectory name)))))) - -(defun auto-save-file-name-p (filename) - "Return non-nil if FILENAME can be yielded by `make-auto-save-file-name'. -FILENAME should lack slashes. -You can redefine this for customization." - (string-match "\\`#.*#\\'" filename)) - -(defun wildcard-to-regexp (wildcard) - "Given a shell file name pattern WILDCARD, return an equivalent regexp. -The generated regexp will match a filename iff the filename -matches that wildcard according to shell rules. Only wildcards known -by `sh' are supported." - (let* ((i (string-match "[[.*+\\^$?]" wildcard)) - ;; Copy the initial run of non-special characters. - (result (substring wildcard 0 i)) - (len (length wildcard))) - ;; If no special characters, we're almost done. - (if i - (while (< i len) - (let ((ch (aref wildcard i)) - j) - (setq - result - (concat result - (cond - ((eq ch ?\[) ; [...] maps to regexp char class - (progn - (setq i (1+ i)) - (concat - (cond - ((eq (aref wildcard i) ?!) ; [!...] -> [^...] - (progn - (setq i (1+ i)) - (if (eq (aref wildcard i) ?\]) - (progn - (setq i (1+ i)) - "[^]") - "[^"))) - ((eq (aref wildcard i) ?^) - ;; Found "[^". Insert a `\0' character - ;; (which cannot happen in a filename) - ;; into the character class, so that `^' - ;; is not the first character after `[', - ;; and thus non-special in a regexp. - (progn - (setq i (1+ i)) - "[\000^")) - ((eq (aref wildcard i) ?\]) - ;; I don't think `]' can appear in a - ;; character class in a wildcard, but - ;; let's be general here. - (progn - (setq i (1+ i)) - "[]")) - (t "[")) - (prog1 ; copy everything upto next `]'. - (substring wildcard - i - (setq j (string-match - "]" wildcard i))) - (setq i (if j (1- j) (1- len))))))) - ((eq ch ?.) "\\.") - ((eq ch ?*) "[^\000]*") - ((eq ch ?+) "\\+") - ((eq ch ?^) "\\^") - ((eq ch ?$) "\\$") - ((eq ch ?\\) "\\\\") ; probably cannot happen... - ((eq ch ??) "[^\000]") - (t (char-to-string ch))))) - (setq i (1+ i))))) - ;; Shell wildcards should match the entire filename, - ;; not its part. Make the regexp say so. - (concat "\\`" result "\\'"))) - -(defcustom list-directory-brief-switches - (if (eq system-type 'vax-vms) "" "-CF") - "*Switches for list-directory to pass to `ls' for brief listing." - :type 'string - :group 'dired) - -(defcustom list-directory-verbose-switches - (if (eq system-type 'vax-vms) - "/PROTECTION/SIZE/DATE/OWNER/WIDTH=(OWNER:10)" - "-l") - "*Switches for list-directory to pass to `ls' for verbose listing," - :type 'string - :group 'dired) - -(defun list-directory (dirname &optional verbose) - "Display a list of files in or matching DIRNAME, a la `ls'. -DIRNAME is globbed by the shell if necessary. -Prefix arg (second arg if noninteractive) means supply -l switch to `ls'. -Actions controlled by variables `list-directory-brief-switches' -and `list-directory-verbose-switches'." - (interactive (let ((pfx current-prefix-arg)) - (list (read-file-name (if pfx (gettext "List directory (verbose): ") - (gettext "List directory (brief): ")) - nil default-directory nil) - pfx))) - (let ((switches (if verbose list-directory-verbose-switches - list-directory-brief-switches))) - (or dirname (setq dirname default-directory)) - (setq dirname (expand-file-name dirname)) - (with-output-to-temp-buffer "*Directory*" - (buffer-disable-undo standard-output) - (princ "Directory ") - (princ dirname) - (terpri) - (save-excursion - (set-buffer "*Directory*") - (setq default-directory (file-name-directory dirname)) - (let ((wildcard (not (file-directory-p dirname)))) - (insert-directory dirname switches wildcard (not wildcard))))))) - -(defvar insert-directory-program "ls" - "Absolute or relative name of the `ls' program used by `insert-directory'.") - -;; insert-directory -;; - must insert _exactly_one_line_ describing FILE if WILDCARD and -;; FULL-DIRECTORY-P is nil. -;; The single line of output must display FILE's name as it was -;; given, namely, an absolute path name. -;; - must insert exactly one line for each file if WILDCARD or -;; FULL-DIRECTORY-P is t, plus one optional "total" line -;; before the file lines, plus optional text after the file lines. -;; Lines are delimited by "\n", so filenames containing "\n" are not -;; allowed. -;; File lines should display the basename. -;; - must be consistent with -;; - functions dired-move-to-filename, (these two define what a file line is) -;; dired-move-to-end-of-filename, -;; dired-between-files, (shortcut for (not (dired-move-to-filename))) -;; dired-insert-headerline -;; dired-after-subdir-garbage (defines what a "total" line is) -;; - variable dired-subdir-regexp -(defun insert-directory (file switches &optional wildcard full-directory-p) - "Insert directory listing for FILE, formatted according to SWITCHES. -Leaves point after the inserted text. -SWITCHES may be a string of options, or a list of strings. -Optional third arg WILDCARD means treat FILE as shell wildcard. -Optional fourth arg FULL-DIRECTORY-P means file is a directory and -switches do not contain `d', so that a full listing is expected. - -This works by running a directory listing program -whose name is in the variable `insert-directory-program'. -If WILDCARD, it also runs the shell specified by `shell-file-name'." - ;; We need the directory in order to find the right handler. - (let ((handler (find-file-name-handler (expand-file-name file) - 'insert-directory))) - (if handler - (funcall handler 'insert-directory file switches - wildcard full-directory-p) - (cond - ((eq system-type 'vax-vms) - (vms-read-directory file switches (current-buffer))) - ((and (fboundp 'mswindows-insert-directory) - (eq system-type 'windows-nt)) - (mswindows-insert-directory file switches wildcard full-directory-p)) - (t - (if wildcard - ;; Run ls in the directory of the file pattern we asked for. - (let ((default-directory - (if (file-name-absolute-p file) - (file-name-directory file) - (file-name-directory (expand-file-name file)))) - (pattern (file-name-nondirectory file)) - (beg 0)) - ;; Quote some characters that have special meanings in shells; - ;; but don't quote the wildcards--we want them to be special. - ;; We also currently don't quote the quoting characters - ;; in case people want to use them explicitly to quote - ;; wildcard characters. - ;;#### Unix-specific - (while (string-match "[ \t\n;<>&|()#$]" pattern beg) - (setq pattern - (concat (substring pattern 0 (match-beginning 0)) - "\\" - (substring pattern (match-beginning 0))) - beg (1+ (match-end 0)))) - (call-process shell-file-name nil t nil - "-c" (concat "\\" ;; Disregard shell aliases! - insert-directory-program - " -d " - (if (stringp switches) - switches - (mapconcat 'identity switches " ")) - " " - pattern))) - ;; SunOS 4.1.3, SVr4 and others need the "." to list the - ;; directory if FILE is a symbolic link. - (apply 'call-process - insert-directory-program nil t nil - (let (list) - (if (listp switches) - (setq list switches) - (if (not (equal switches "")) - (progn - ;; Split the switches at any spaces - ;; so we can pass separate options as separate args. - (while (string-match " " switches) - (setq list (cons (substring switches 0 (match-beginning 0)) - list) - switches (substring switches (match-end 0)))) - (setq list (cons switches list))))) - (append list - (list - (if full-directory-p - (concat (file-name-as-directory file) - ;;#### Unix-specific - ".") - file))))))))))) - -(defvar kill-emacs-query-functions nil - "Functions to call with no arguments to query about killing XEmacs. -If any of these functions returns nil, killing Emacs is cancelled. -`save-buffers-kill-emacs' (\\[save-buffers-kill-emacs]) calls these functions, -but `kill-emacs', the low level primitive, does not. -See also `kill-emacs-hook'.") - -(defun save-buffers-kill-emacs (&optional arg) - "Offer to save each buffer, then kill this XEmacs process. -With prefix arg, silently save all file-visiting buffers, then kill." - (interactive "P") - (save-some-buffers arg t) - (and (or (not (memq t (mapcar #'(lambda (buf) (and (buffer-file-name buf) - (buffer-modified-p buf))) - (buffer-list)))) - (yes-or-no-p "Modified buffers exist; exit anyway? ")) - (or (not (fboundp 'process-list)) - ;; process-list is not defined on VMS. - (let ((processes (process-list)) - active) - (while processes - (and (memq (process-status (car processes)) '(run stop open)) - (let ((val (process-kill-without-query (car processes)))) - (process-kill-without-query (car processes) val) - val) - (setq active t)) - (setq processes (cdr processes))) - (or - (not active) - (save-excursion - (save-window-excursion - (delete-other-windows) - (list-processes) - (yes-or-no-p - "Active processes exist; kill them and exit anyway? ")))))) - ;; Query the user for other things, perhaps. - (run-hook-with-args-until-failure 'kill-emacs-query-functions) - (kill-emacs))) - -(defun symlink-expand-file-name (filename) - "If FILENAME is a symlink, return its non-symlink equivalent. -Unlike `file-truename', this doesn't chase symlinks in directory -components of the file or expand a relative pathname into an -absolute one." - (let ((count 20)) - (while (and (> count 0) (file-symlink-p filename)) - (setq filename (file-symlink-p filename) - count (1- count))) - (if (> count 0) - filename - (error "Apparently circular symlink path")))) - -;; Suggested by Michael Kifer -(defun file-remote-p (file-name) - "Test whether FILE-NAME is looked for on a remote system." - (cond ((not allow-remote-paths) nil) - ((featurep 'ange-ftp) (ange-ftp-ftp-path file-name)) - ((fboundp 'efs-ftp-path) (efs-ftp-path file-name)) - (t nil))) - -;; #### FSF has file-name-non-special here. - -;;; files.el ends here diff --cc lisp/format.el index 7542247,2b4c609..0000000 deleted file mode 100644,100644 --- a/lisp/format.el +++ /dev/null @@@ -1,988 -1,987 +1,0 @@@ --;;; format.el --- read and save files in multiple formats -- --;; Copyright (c) 1994, 1995, 1997 Free Software Foundation -- --;; Author: Boris Goldowsky --;; Keywords: extensions, dumped -- --;; This file is part of XEmacs. -- --;; XEmacs 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 2, or (at your option) --;; any later version. -- --;; XEmacs 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 XEmacs; see the file COPYING. If not, write to the Free --;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA --;; 02111-1307, USA. -- --;;; Synched up with: Emacs 20.2. -- --;;; Commentary: -- --;; This file is dumped with XEmacs. -- --;; This file defines a unified mechanism for saving & loading files stored --;; in different formats. `format-alist' contains information that directs --;; Emacs to call an encoding or decoding function when reading or writing --;; files that match certain conditions. --;; --;; When a file is visited, its format is determined by matching the --;; beginning of the file against regular expressions stored in --;; `format-alist'. If this fails, you can manually translate the buffer --;; using `format-decode-buffer'. In either case, the formats used are --;; listed in the variable `buffer-file-format', and become the default --;; format for saving the buffer. To save a buffer in a different format, --;; change this variable, or use `format-write-file'. --;; --;; Auto-save files are normally created in the same format as the visited --;; file, but the variable `auto-save-file-format' can be set to a --;; particularly fast or otherwise preferred format to be used for --;; auto-saving (or nil to do no encoding on auto-save files, but then you --;; risk losing any text-properties in the buffer). --;; --;; You can manually translate a buffer into or out of a particular format --;; with the functions `format-encode-buffer' and `format-decode-buffer'. --;; To translate just the region use the functions `format-encode-region' --;; and `format-decode-region'. --;; --;; You can define a new format by writing the encoding and decoding --;; functions, and adding an entry to `format-alist'. See enriched.el for --;; an example of how to implement a file format. There are various --;; functions defined in this file that may be useful for writing the --;; encoding and decoding functions: --;; * `format-annotate-region' and `format-deannotate-region' allow a --;; single alist of information to be used for encoding and decoding. --;; The alist defines a correspondence between strings in the file --;; ("annotations") and text-properties in the buffer. --;; * `format-replace-strings' is similarly useful for doing simple --;; string->string translations in a reversible manner. -- --;;; Code: -- --(put 'buffer-file-format 'permanent-local t) -- --(defvar format-alist - '( - ; (image/jpeg "JPEG image" "\377\330\377\340\000\020JFIF" - ; image-decode-jpeg nil t image-mode) - ; (image/gif "GIF image" "GIF8[79]" - ; image-decode-gif nil t image-mode) - ; (image/png "Portable Network Graphics" "\211PNG" - ; image-decode-png nil t image-mode) - ; (image/x-xpm "XPM image" "/\\* XPM \\*/" - ; image-decode-xpm nil t image-mode) - - ; ;; TIFF files have lousy magic - ; (image/tiff "TIFF image" "II\\*\000" - ; image-decode-tiff nil t image-mode) ;; TIFF 6.0 big-endian - ; (image/tiff "TIFF image" "MM\000\\*" - ; image-decode-tiff nil t image-mode) ;; TIFF 6.0 little-endian - - (text/enriched "Extended MIME text/enriched format." - "Content-[Tt]ype:[ \t]*text/enriched" - enriched-decode enriched-encode t enriched-mode) - (text/richtext "Extended MIME obsolete text/richtext format." - "Content-[Tt]ype:[ \t]*text/richtext" - richtext-decode richtext-encode t enriched-mode) - (plain "ISO 8859-1 standard format, no text properties." - ;; Plain only exists so that there is an obvious neutral choice in - ;; the completion list. - nil nil nil nil nil) - ;; (ibm "IBM Code Page 850 (DOS)" - ;; "1\\(^\\)" - ;; "recode ibm-pc:latin1" "recode latin1:ibm-pc" t nil) - ;; (mac "Apple Macintosh" - ;; "1\\(^\\)" - ;; "recode mac:latin1" "recode latin1:mac" t nil) - ;; (hp "HP Roman8" - ;; "1\\(^\\)" - ;; "recode roman8:latin1" "recode latin1:roman8" t nil) - ;; (TeX "TeX (encoding)" - ;; "1\\(^\\)" - ;; iso-tex2iso iso-iso2tex t nil) - ;; (gtex "German TeX (encoding)" - ;; "1\\(^\\)" - ;; iso-gtex2iso iso-iso2gtex t nil) - ;; (html "HTML (encoding)" - ;; "1\\(^\\)" - ;; "recode html:latin1" "recode latin1:html" t nil) - ;; (rot13 "rot13" - ;; "1\\(^\\)" - ;; "tr a-mn-z n-za-m" "tr a-mn-z n-za-m" t nil) - ;; (duden "Duden Ersatzdarstellung" - ;; "1\\(^\\)" - ;; "diac" iso-iso2duden t nil) - ;; (de646 "German ASCII (ISO 646)" - ;; "1\\(^\\)" - ;; "recode iso646-ge:latin1" "recode latin1:iso646-ge" t nil) - ;; (denet "net German" - ;; "1\\(^\\)" - ;; iso-german iso-cvt-read-only t nil) - ;; (esnet "net Spanish" - ;; "1\\(^\\)" - ;; iso-spanish iso-cvt-read-only t nil) - ) - "List of information about understood file formats. - Elements are of the form \(NAME DOC-STR REGEXP FROM-FN TO-FN MODIFY MODE-FN). - - NAME is a symbol, which is stored in `buffer-file-format'. - - DOC-STR should be a single line providing more information about the - format. It is currently unused, but in the future will be shown to - the user if they ask for more information. - - REGEXP is a regular expression to match against the beginning of the file; - it should match only files in that format. - - FROM-FN is called to decode files in that format; it gets two args, BEGIN - and END, and can make any modifications it likes, returning the new - end. It must make sure that the beginning of the file no longer - matches REGEXP, or else it will get called again. - Alternatively, FROM-FN can be a string, which specifies a shell command - (including options) to be used as a filter to perform the conversion. - - TO-FN is called to encode a region into that format; it is passed three - arguments: BEGIN, END, and BUFFER. BUFFER is the original buffer that - the data being written came from, which the function could use, for - example, to find the values of local variables. TO-FN should either - return a list of annotations like `write-region-annotate-functions', - or modify the region and return the new end. - Alternatively, TO-FN can be a string, which specifies a shell command - (including options) to be used as a filter to perform the conversion. - - MODIFY, if non-nil, means the TO-FN wants to modify the region. If nil, - TO-FN will not make any changes but will instead return a list of - annotations. - - MODE-FN, if specified, is called when visiting a file with that format.") - - ;;; Basic Functions (called from Lisp) - - (defun format-encode-run-method (method from to &optional buffer) - "Translate using function or shell script METHOD the text from FROM to TO. - If METHOD is a string, it is a shell command; - otherwise, it should be a Lisp function. - BUFFER should be the buffer that the output originally came from." - (if (stringp method) - (save-current-buffer - (set-buffer buffer) - (with-output-to-temp-buffer "*Format Errors*" - (shell-command-on-region from to method t nil)) - (point)) - (funcall method from to buffer))) - - (defun format-decode-run-method (method from to &optional buffer) - "Decode using function or shell script METHOD the text from FROM to TO. - If METHOD is a string, it is a shell command; - otherwise, it should be a Lisp function." - (if (stringp method) - (progn - (with-output-to-temp-buffer "*Format Errors*" - (shell-command-on-region from to method t nil)) - (point)) - (funcall method from to))) - - (defun format-annotate-function (format from to orig-buf) - "Return annotations for writing region as FORMAT. - FORMAT is a symbol naming one of the formats defined in `format-alist', - it must be a single symbol, not a list like `buffer-file-format'. - FROM and TO delimit the region to be operated on in the current buffer. - ORIG-BUF is the original buffer that the data came from. - This function works like a function on `write-region-annotate-functions': - it either returns a list of annotations, or returns with a different buffer - current, which contains the modified text to write. - - For most purposes, consider using `format-encode-region' instead." - ;; This function is called by write-region (actually build-annotations) - ;; for each element of buffer-file-format. - (let* ((info (assq format format-alist)) - (to-fn (nth 4 info)) - (modify (nth 5 info))) - (if to-fn - (if modify - ;; To-function wants to modify region. Copy to safe place. - (let ((copy-buf (get-buffer-create " *Format Temp*"))) - (copy-to-buffer copy-buf from to) - (set-buffer copy-buf) - (format-insert-annotations write-region-annotations-so-far from) - (format-encode-run-method to-fn (point-min) (point-max) orig-buf) - nil) - ;; Otherwise just call function, it will return annotations. - (funcall to-fn from to orig-buf))))) - - (defun format-decode (format length &optional visit-flag) - "Decode text from any known FORMAT. - FORMAT is a symbol appearing in `format-alist' or a list of such symbols, - or nil, in which case this function tries to guess the format of the data by - matching against the regular expressions in `format-alist'. After a match is - found and the region decoded, the alist is searched again from the beginning - for another match. - - Second arg LENGTH is the number of characters following point to operate on. - If optional third arg VISIT-FLAG is true, set `buffer-file-format' - to the list of formats used, and call any mode functions defined for those - formats. - - Returns the new length of the decoded region. - - For most purposes, consider using `format-decode-region' instead. - - This function is called by insert-file-contents whenever a file is read." - (let ((mod (buffer-modified-p)) - (begin (point)) - (end (+ (point) length))) - (if (null format) - ;; Figure out which format it is in, remember list in `format'. - (let ((try format-alist)) - (while try - (let* ((f (car try)) - (regexp (nth 2 f)) - (p (point))) - (if (and regexp (looking-at regexp) - (< (match-end 0) (+ begin length))) - (progn - (setq format (cons (car f) format)) - ;; Decode it - (if (nth 3 f) - (setq end (format-decode-run-method (nth 3 f) begin end))) - ;; Call visit function if required - (if (and visit-flag (nth 6 f)) (funcall (nth 6 f) 1)) - ;; Safeguard against either of the functions changing pt. - (goto-char p) - ;; Rewind list to look for another format - (setq try format-alist)) - (setq try (cdr try)))))) - ;; Deal with given format(s) - (or (listp format) (setq format (list format))) - (let ((do format) f) - (while do - (or (setq f (assq (car do) format-alist)) - (error "Unknown format" (car do))) - ;; Decode: - (if (nth 3 f) - (setq end (format-decode-run-method (nth 3 f) begin end))) - ;; Call visit function if required - (if (and visit-flag (nth 6 f)) (funcall (nth 6 f) 1)) - (setq do (cdr do))))) - (if visit-flag - (setq buffer-file-format format)) - (set-buffer-modified-p mod) - ;; Return new length of region - (- end begin))) - - ;;; - ;;; Interactive functions & entry points - ;;; - - (defun format-decode-buffer (&optional format) - "Translate the buffer from some FORMAT. - If the format is not specified, this function attempts to guess. - `buffer-file-format' is set to the format used, and any mode-functions - for the format are called." - (interactive - (list (format-read "Translate buffer from format (default: guess): "))) - (save-excursion - (goto-char (point-min)) - (format-decode format (buffer-size) t))) - - (defun format-decode-region (from to &optional format) - "Decode the region from some format. - Arg FORMAT is optional; if omitted the format will be determined by looking - for identifying regular expressions at the beginning of the region." - (interactive - (list (region-beginning) (region-end) - (format-read "Translate region from format (default: guess): "))) - (save-excursion - (goto-char from) - (format-decode format (- to from) nil))) - - (defun format-encode-buffer (&optional format) - "Translate the buffer into FORMAT. - FORMAT defaults to `buffer-file-format'. It is a symbol naming one of the - formats defined in `format-alist', or a list of such symbols." - (interactive - (list (format-read (format "Translate buffer to format (default %s): " - buffer-file-format)))) - (format-encode-region (point-min) (point-max) format)) - - (defun format-encode-region (beg end &optional format) - "Translate the region into some FORMAT. - FORMAT defaults to `buffer-file-format', it is a symbol naming - one of the formats defined in `format-alist', or a list of such symbols." - (interactive - (list (region-beginning) (region-end) - (format-read (format "Translate region to format (default %s): " - buffer-file-format)))) - (if (null format) (setq format buffer-file-format)) - (if (symbolp format) (setq format (list format))) - (save-excursion - (goto-char end) - (let ( ; (cur-buf (current-buffer)) - (end (point-marker))) - (while format - (let* ((info (assq (car format) format-alist)) - (to-fn (nth 4 info)) - (modify (nth 5 info)) - ;; result - ) - (if to-fn - (if modify - (setq end (format-encode-run-method to-fn beg end - (current-buffer))) - (format-insert-annotations - (funcall to-fn beg end (current-buffer))))) - (setq format (cdr format))))))) - - (defun format-write-file (filename format) - "Write current buffer into a FILE using some FORMAT. - Makes buffer visit that file and sets the format as the default for future - saves. If the buffer is already visiting a file, you can specify a directory - name as FILE, to write a file of the same old name in that directory." - (interactive - ;; Same interactive spec as write-file, plus format question. - (let* ((file (if buffer-file-name - (read-file-name "Write file: " - nil nil nil nil) - (read-file-name "Write file: " - (cdr (assq 'default-directory - (buffer-local-variables))) - nil nil (buffer-name)))) - (fmt (format-read (format "Write file `%s' in format: " - (file-name-nondirectory file))))) - (list file fmt))) - (setq buffer-file-format format) - (write-file filename)) - - (defun format-find-file (filename format) - "Find the file FILE using data format FORMAT. - If FORMAT is nil then do not do any format conversion." - (interactive - ;; Same interactive spec as write-file, plus format question. - (let* ((file (read-file-name "Find file: ")) - (fmt (format-read (format "Read file `%s' in format: " - (file-name-nondirectory file))))) - (list file fmt))) - (let ((format-alist nil)) - (find-file filename)) - (if format - (format-decode-buffer format))) - - (defun format-insert-file (filename format &optional beg end) - "Insert the contents of file FILE using data format FORMAT. - If FORMAT is nil then do not do any format conversion. - The optional third and fourth arguments BEG and END specify - the part of the file to read. - - The return value is like the value of `insert-file-contents': - a list (ABSOLUTE-FILE-NAME . SIZE)." - (interactive - ;; Same interactive spec as write-file, plus format question. - (let* ((file (read-file-name "Find file: ")) - (fmt (format-read (format "Read file `%s' in format: " - (file-name-nondirectory file))))) - (list file fmt))) - (let (value size) - (let ((format-alist nil)) - (setq value (insert-file-contents filename nil beg end)) - (setq size (nth 1 value))) - (if format - (setq size (format-decode format size) - value (cons (car value) size))) - value)) - - (defun format-read (&optional prompt) - "Read and return the name of a format. - Return value is a list, like `buffer-file-format'; it may be nil. - Formats are defined in `format-alist'. Optional arg is the PROMPT to use." - (let* ((table (mapcar (lambda (x) (list (symbol-name (car x)))) - format-alist)) - (ans (completing-read (or prompt "Format: ") table nil t))) - (if (not (equal "" ans)) (list (intern ans))))) - - - ;;; - ;;; Below are some functions that may be useful in writing encoding and - ;;; decoding functions for use in format-alist. - ;;; - - (defun format-replace-strings (alist &optional reverse beg end) - "Do multiple replacements on the buffer. - ALIST is a list of (from . to) pairs, which should be proper arguments to - `search-forward' and `replace-match' respectively. - Optional 2nd arg REVERSE, if non-nil, means the pairs are (to . from), so that - you can use the same list in both directions if it contains only literal - strings. - Optional args BEGIN and END specify a region of the buffer to operate on." - (save-excursion - (save-restriction - (or beg (setq beg (point-min))) - (if end (narrow-to-region (point-min) end)) - (while alist - (let ((from (if reverse (cdr (car alist)) (car (car alist)))) - (to (if reverse (car (cdr alist)) (cdr (car alist))))) - (goto-char beg) - (while (search-forward from nil t) - (goto-char (match-beginning 0)) - (insert to) - (set-text-properties (- (point) (length to)) (point) - (text-properties-at (point))) - (delete-region (point) (+ (point) (- (match-end 0) - (match-beginning 0))))) - (setq alist (cdr alist))))))) - - ;;; Some list-manipulation functions that we need. - - (defun format-delq-cons (cons list) - "Remove the given CONS from LIST by side effect, - and return the new LIST. Since CONS could be the first element - of LIST, write `\(setq foo \(format-delq-cons element foo))' to be sure of - changing the value of `foo'." - (if (eq cons list) - (cdr list) - (let ((p list)) - (while (not (eq (cdr p) cons)) - (if (null p) (error "format-delq-cons: not an element.")) - (setq p (cdr p))) - ;; Now (cdr p) is the cons to delete - (setcdr p (cdr cons)) - list))) - - (defun format-make-relatively-unique (a b) - "Delete common elements of lists A and B, return as pair. - Compares using `equal'." - (let* ((acopy (copy-sequence a)) - (bcopy (copy-sequence b)) - (tail acopy)) - (while tail - (let ((dup (member (car tail) bcopy)) - (next (cdr tail))) - (if dup (setq acopy (format-delq-cons tail acopy) - bcopy (format-delq-cons dup bcopy))) - (setq tail next))) - (cons acopy bcopy))) - - (defun format-common-tail (a b) - "Given two lists that have a common tail, return it. - Compares with `equal', and returns the part of A that is equal to the - equivalent part of B. If even the last items of the two are not equal, - returns nil." - (let ((la (length a)) - (lb (length b))) - ;; Make sure they are the same length - (if (> la lb) - (setq a (nthcdr (- la lb) a)) - (setq b (nthcdr (- lb la) b)))) - (while (not (equal a b)) - (setq a (cdr a) - b (cdr b))) - a) - - (defun format-reorder (items order) - "Arrange ITEMS to following partial ORDER. - Elements of ITEMS equal to elements of ORDER will be rearranged to follow the - ORDER. Unmatched items will go last." - (if order - (let ((item (member (car order) items))) - (if item - (cons (car item) - (format-reorder (format-delq-cons item items) - (cdr order))) - (format-reorder items (cdr order)))) - items)) - - (put 'face 'format-list-valued t) ; These text-properties take values - (put 'unknown 'format-list-valued t) ; that are lists, the elements of which - ; should be considered separately. - ; See format-deannotate-region and - ; format-annotate-region. - - ;;; - ;;; Decoding - ;;; - - (defun format-deannotate-region (from to translations next-fn) - "Translate annotations in the region into text properties. - This sets text properties between FROM to TO as directed by the - TRANSLATIONS and NEXT-FN arguments. - - NEXT-FN is a function that searches forward from point for an annotation. - It should return a list of 4 elements: \(BEGIN END NAME POSITIVE). BEGIN and - END are buffer positions bounding the annotation, NAME is the name searched - for in TRANSLATIONS, and POSITIVE should be non-nil if this annotation marks - the beginning of a region with some property, or nil if it ends the region. - NEXT-FN should return nil if there are no annotations after point. - - The basic format of the TRANSLATIONS argument is described in the - documentation for the `format-annotate-region' function. There are some - additional things to keep in mind for decoding, though: - - When an annotation is found, the TRANSLATIONS list is searched for a - text-property name and value that corresponds to that annotation. If the - text-property has several annotations associated with it, it will be used only - if the other annotations are also in effect at that point. The first match - found whose annotations are all present is used. - - The text property thus determined is set to the value over the region between - the opening and closing annotations. However, if the text-property name has a - non-nil `format-list-valued' property, then the value will be consed onto the - surrounding value of the property, rather than replacing that value. - - There are some special symbols that can be used in the \"property\" slot of - the TRANSLATIONS list: PARAMETER and FUNCTION \(spelled in uppercase). - Annotations listed under the pseudo-property PARAMETER are considered to be - arguments of the immediately surrounding annotation; the text between the - opening and closing parameter annotations is deleted from the buffer but saved - as a string. The surrounding annotation should be listed under the - pseudo-property FUNCTION. Instead of inserting a text-property for this - annotation, the function listed in the VALUE slot is called to make whatever - changes are appropriate. The function's first two arguments are the START and - END locations, and the rest of the arguments are any PARAMETERs found in that - region. - - Any annotations that are found by NEXT-FN but not defined by TRANSLATIONS - are saved as values of the `unknown' text-property \(which is list-valued). - The TRANSLATIONS list should usually contain an entry of the form - \(unknown \(nil format-annotate-value)) - to write these unknown annotations back into the file." - (save-excursion - (save-restriction - (narrow-to-region (point-min) to) - (goto-char from) - (let (next open-ans todo - ;; loc - unknown-ans) - (while (setq next (funcall next-fn)) - (let* ((loc (nth 0 next)) - (end (nth 1 next)) - (name (nth 2 next)) - (positive (nth 3 next)) - (found nil)) - - ;; Delete the annotation - (delete-region loc end) - (cond - ;; Positive annotations are stacked, remembering location - (positive (setq open-ans (cons `(,name ((,loc . nil))) open-ans))) - ;; It is a negative annotation: - ;; Close the top annotation & add its text property. - ;; If the file's nesting is messed up, the close might not match - ;; the top thing on the open-annotations stack. - ;; If no matching annotation is open, just ignore the close. - ((not (assoc name open-ans)) - (message "Extra closing annotation (%s) in file" name)) - ;; If one is open, but not on the top of the stack, close - ;; the things in between as well. Set `found' when the real - ;; one is closed. - (t - (while (not found) - (let* ((top (car open-ans)) ; first on stack: should match. - (top-name (car top)) ; text property name - (top-extents (nth 1 top)) ; property regions - (params (cdr (cdr top))) ; parameters - (aalist translations) - (matched nil)) - (if (equal name top-name) - (setq found t) - (message "Improper nesting in file.")) - ;; Look through property names in TRANSLATIONS - (while aalist - (let ((prop (car (car aalist))) - (alist (cdr (car aalist)))) - ;; And look through values for each property - (while alist - (let ((value (car (car alist))) - (ans (cdr (car alist)))) - (if (member top-name ans) - ;; This annotation is listed, but still have to - ;; check if multiple annotations are satisfied - (if (member nil (mapcar (lambda (r) - (assoc r open-ans)) - ans)) - nil ; multiple ans not satisfied - ;; If there are multiple annotations going - ;; into one text property, split up the other - ;; annotations so they apply individually to - ;; the other regions. - (setcdr (car top-extents) loc) - (let ((to-split ans) this-one extents) - (while to-split - (setq this-one - (assoc (car to-split) open-ans) - extents (nth 1 this-one)) - (if (not (eq this-one top)) - (setcar (cdr this-one) - (format-subtract-regions - extents top-extents))) - (setq to-split (cdr to-split)))) - ;; Set loop variables to nil so loop - ;; will exit. - (setq alist nil aalist nil matched t - ;; pop annotation off stack. - open-ans (cdr open-ans)) - (let ((extents top-extents) - (start (car (car top-extents))) - (loc (cdr (car top-extents)))) - (while extents - (cond - ;; Check for pseudo-properties - ((eq prop 'PARAMETER) - ;; A parameter of the top open ann: - ;; delete text and use as arg. - (if open-ans - ;; (If nothing open, discard). - (setq open-ans - (cons - (append (car open-ans) - (list - (buffer-substring - start loc))) - (cdr open-ans)))) - (delete-region start loc)) - ((eq prop 'FUNCTION) - ;; Not a property, but a function. - (let ((rtn - (apply value start loc params))) - (if rtn (setq todo (cons rtn todo))))) - (t - ;; Normal property/value pair - (setq todo - (cons (list start loc prop value) - todo)))) - (setq extents (cdr extents) - start (car (car extents)) - loc (cdr (car extents)))))))) - (setq alist (cdr alist)))) - (setq aalist (cdr aalist))) - (unless matched - ;; Didn't find any match for the annotation: - ;; Store as value of text-property `unknown'. - (setcdr (car top-extents) loc) - (let ((extents top-extents) - (start (car (car top-extents))) - (loc (cdr (car top-extents)))) - (while extents - (setq open-ans (cdr open-ans) - todo (cons (list start loc 'unknown top-name) - todo) - unknown-ans (cons name unknown-ans) - extents (cdr extents) - start (car (car extents)) - loc (cdr (car extents)))))))))))) - - ;; Once entire file has been scanned, add the properties. - (while todo - (let* ((item (car todo)) - (from (nth 0 item)) - (to (nth 1 item)) - (prop (nth 2 item)) - (val (nth 3 item))) - - (if (numberp val) ; add to ambient value if numeric - (format-property-increment-region from to prop val 0) - (put-text-property - from to prop - (cond ((get prop 'format-list-valued) ; value gets consed onto - ; list-valued properties - (let ((prev (get-text-property from prop))) - (cons val (if (listp prev) prev (list prev))))) - (t val))))) ; normally, just set to val. - (setq todo (cdr todo))) - - (if unknown-ans - (message "Unknown annotations: %s" unknown-ans)))))) - - (defun format-subtract-regions (minu subtra) - "Remove the regions in SUBTRAHEND from the regions in MINUEND. A region - is a dotted pair (from . to). Both parameters are lists of regions. Each - list must contain nonoverlapping, noncontiguous regions, in descending - order. The result is also nonoverlapping, noncontiguous, and in descending - order. The first element of MINUEND can have a cdr of nil, indicating that - the end of that region is not yet known." - (let* ((minuend (copy-alist minu)) - (subtrahend (copy-alist subtra)) - (m (car minuend)) - (s (car subtrahend)) - results) - (while (and minuend subtrahend) - (cond - ;; The minuend starts after the subtrahend ends; keep it. - ((> (car m) (cdr s)) - (setq results (cons m results) - minuend (cdr minuend) - m (car minuend))) - ;; The minuend extends beyond the end of the subtrahend. Chop it off. - ((or (null (cdr m)) (> (cdr m) (cdr s))) - (setq results (cons (cons (1+ (cdr s)) (cdr m)) results)) - (setcdr m (cdr s))) - ;; The subtrahend starts after the minuend ends; throw it away. - ((< (cdr m) (car s)) - (setq subtrahend (cdr subtrahend) s (car subtrahend))) - ;; The subtrahend extends beyond the end of the minuend. Chop it off. - (t ;(<= (cdr m) (cdr s))) - (if (>= (car m) (car s)) - (setq minuend (cdr minuend) m (car minuend)) - (setcdr m (1- (car s))) - (setq subtrahend (cdr subtrahend) s (car subtrahend)))))) - (nconc (nreverse results) minuend))) - - ;; This should probably go somewhere other than format.el. Then again, - ;; indent.el has alter-text-property. NOTE: We can also use - ;; next-single-property-change instead of text-property-not-all, but then - ;; we have to see if we passed TO. - (defun format-property-increment-region (from to prop delta default) - "Increment property PROP over the region between FROM and TO by the - amount DELTA (which may be negative). If property PROP is nil anywhere - in the region, it is treated as though it were DEFAULT." - (let ((cur from) val newval next) - (while cur - (setq val (get-text-property cur prop) - newval (+ (or val default) delta) - next (text-property-not-all cur to prop val)) - (put-text-property cur (or next to) prop newval) - (setq cur next)))) - - ;;; - ;;; Encoding - ;;; - - (defun format-insert-annotations (list &optional offset) - "Apply list of annotations to buffer as `write-region' would. - Inserts each element of the given LIST of buffer annotations at its - appropriate place. Use second arg OFFSET if the annotations' locations are - not relative to the beginning of the buffer: annotations will be inserted - at their location-OFFSET+1 \(ie, the offset is treated as the character number - of the first character in the buffer)." - (if (not offset) - (setq offset 0) - (setq offset (1- offset))) - (let ((l (reverse list))) - (while l - (goto-char (- (car (car l)) offset)) - (insert (cdr (car l))) - (setq l (cdr l))))) - - (defun format-annotate-value (old new) - "Return OLD and NEW as a \(close . open) annotation pair. - Useful as a default function for TRANSLATIONS alist when the value of the text - property is the name of the annotation that you want to use, as it is for the - `unknown' text property." - (cons (if old (list old)) - (if new (list new)))) - - (defun format-annotate-region (from to trans format-fn ignore) - "Generate annotations for text properties in the region. - Searches for changes between FROM and TO, and describes them with a list of - annotations as defined by alist TRANSLATIONS and FORMAT-FN. IGNORE lists text - properties not to consider; any text properties that are neither ignored nor - listed in TRANSLATIONS are warned about. - If you actually want to modify the region, give the return value of this - function to `format-insert-annotations'. - - Format of the TRANSLATIONS argument: - - Each element is a list whose car is a PROPERTY, and the following - elements are VALUES of that property followed by the names of zero or more - ANNOTATIONS. Whenever the property takes on that value, the annotations - \(as formatted by FORMAT-FN) are inserted into the file. - When the property stops having that value, the matching negated annotation - will be inserted \(it may actually be closed earlier and reopened, if - necessary, to keep proper nesting). - - If the property's value is a list, then each element of the list is dealt with - separately. - - If a VALUE is numeric, then it is assumed that there is a single annotation - and each occurrence of it increments the value of the property by that number. - Thus, given the entry \(left-margin \(4 \"indent\")), if the left margin - changes from 4 to 12, two annotations will be generated. - - If the VALUE is nil, then instead of annotations, a function should be - specified. This function is used as a default: it is called for all - transitions not explicitly listed in the table. The function is called with - two arguments, the OLD and NEW values of the property. It should return - lists of annotations like `format-annotate-location' does. - - The same structure can be used in reverse for reading files." - (let ((all-ans nil) ; All annotations - becomes return value - (open-ans nil) ; Annotations not yet closed - (loc nil) ; Current location - (not-found nil)) ; Properties that couldn't be saved - (while (or (null loc) - (and (setq loc (next-property-change loc nil to)) - (< loc to))) - (or loc (setq loc from)) - (let* ((ans (format-annotate-location loc (= loc from) ignore trans)) - (neg-ans (format-reorder (aref ans 0) open-ans)) - (pos-ans (aref ans 1)) - (ignored (aref ans 2))) - (setq not-found (append ignored not-found) - ignore (append ignored ignore)) - ;; First do the negative (closing) annotations - (while neg-ans - ;; Check if it's missing. This can happen (eg, a numeric property - ;; going negative can generate closing annotations before there are - ;; any open). Warn user & ignore. - (if (not (member (car neg-ans) open-ans)) - (message "Can't close %s: not open." (car neg-ans)) - (while (not (equal (car neg-ans) (car open-ans))) - ;; To close anno. N, need to first close ans 1 to N-1, - ;; remembering to re-open them later. - (setq pos-ans (cons (car open-ans) pos-ans)) - (setq all-ans - (cons (cons loc (funcall format-fn (car open-ans) nil)) - all-ans)) - (setq open-ans (cdr open-ans))) - ;; Now remove the one we're really interested in from open list. - (setq open-ans (cdr open-ans)) - ;; And put the closing annotation here. - (setq all-ans - (cons (cons loc (funcall format-fn (car neg-ans) nil)) - all-ans))) - (setq neg-ans (cdr neg-ans))) - ;; Now deal with positive (opening) annotations - (let ( ; (p pos-ans) - ) - (while pos-ans - (setq open-ans (cons (car pos-ans) open-ans)) - (setq all-ans - (cons (cons loc (funcall format-fn (car pos-ans) t)) - all-ans)) - (setq pos-ans (cdr pos-ans)))))) - - ;; Close any annotations still open - (while open-ans - (setq all-ans - (cons (cons to (funcall format-fn (car open-ans) nil)) - all-ans)) - (setq open-ans (cdr open-ans))) - (if not-found - (message "These text properties could not be saved:\n %s" - not-found)) - (nreverse all-ans))) - - ;;; Internal functions for format-annotate-region. - - (defun format-annotate-location (loc all ignore trans) - "Return annotation(s) needed at LOCATION. - This includes any properties that change between LOC-1 and LOC. - If ALL is true, don't look at previous location, but generate annotations for - all non-nil properties. - Third argument IGNORE is a list of text-properties not to consider. - - Return value is a vector of 3 elements: - 1. List of names of the annotations to close - 2. List of the names of annotations to open. - 3. List of properties that were ignored or couldn't be annotated." - (let* ((prev-loc (1- loc)) - (before-plist (if all nil (text-properties-at prev-loc))) - (after-plist (text-properties-at loc)) - p negatives positives prop props not-found) - ;; make list of all property names involved - (setq p before-plist) - (while p - (if (not (memq (car p) props)) - (setq props (cons (car p) props))) - (setq p (cdr (cdr p)))) - (setq p after-plist) - (while p - (if (not (memq (car p) props)) - (setq props (cons (car p) props))) - (setq p (cdr (cdr p)))) - - (while props - (setq prop (car props) - props (cdr props)) - (if (memq prop ignore) - nil ; If it's been ignored before, ignore it now. - (let ((before (if all nil (car (cdr (memq prop before-plist))))) - (after (car (cdr (memq prop after-plist))))) - (if (equal before after) - nil ; no change; ignore - (let ((result (format-annotate-single-property-change - prop before after trans))) - (if (not result) - (setq not-found (cons prop not-found)) - (setq negatives (nconc negatives (car result)) - positives (nconc positives (cdr result))))))))) - (vector negatives positives not-found))) - - (defun format-annotate-single-property-change (prop old new trans) - "Return annotations for PROPERTY changing from OLD to NEW. - These are searched for in the TRANSLATIONS alist. - If NEW does not appear in the list, but there is a default function, then that - function is called. - Annotations to open and to close are returned as a dotted pair." - (let ((prop-alist (cdr (assoc prop trans))) - ;; default - ) - (if (not prop-alist) - nil - ;; If either old or new is a list, have to treat both that way. - (if (or (consp old) (consp new)) - (let* ((old (if (listp old) old (list old))) - (new (if (listp new) new (list new))) - ;; (tail (format-common-tail old new)) - close open) - (while old - (setq close - (append (car (format-annotate-atomic-property-change - prop-alist (car old) nil)) - close) - old (cdr old))) - (while new - (setq open - (append (cdr (format-annotate-atomic-property-change - prop-alist nil (car new))) - open) - new (cdr new))) - (format-make-relatively-unique close open)) - (format-annotate-atomic-property-change prop-alist old new))))) - - (defun format-annotate-atomic-property-change (prop-alist old new) - "Internal function annotate a single property change. - PROP-ALIST is the relevant segment of a TRANSLATIONS list. - OLD and NEW are the values." - (let (num-ann) - ;; If old and new values are numbers, - ;; look for a number in PROP-ALIST. - (if (and (or (null old) (numberp old)) - (or (null new) (numberp new))) - (progn - (setq num-ann prop-alist) - (while (and num-ann (not (numberp (car (car num-ann))))) - (setq num-ann (cdr num-ann))))) - (if num-ann - ;; Numerical annotation - use difference - (progn - ;; If property is numeric, nil means 0 - (cond ((and (numberp old) (null new)) - (setq new 0)) - ((and (numberp new) (null old)) - (setq old 0))) - - (let* ((entry (car num-ann)) - (increment (car entry)) - (n (ceiling (/ (float (- new old)) (float increment)))) - (anno (car (cdr entry)))) - (if (> n 0) - (cons nil (make-list n anno)) - (cons (make-list (- n) anno) nil)))) - - ;; Standard annotation - (let ((close (and old (cdr (assoc old prop-alist)))) - (open (and new (cdr (assoc new prop-alist))))) - (if (or close open) - (format-make-relatively-unique close open) - ;; Call "Default" function, if any - (let ((default (assq nil prop-alist))) - (if default - (funcall (car (cdr default)) old new)))))))) - - ;;; format.el ends here - '((image/jpeg "JPEG image" "\377\330\377\340\000\020JFIF" - image-decode-jpeg nil t image-mode) - (image/gif "GIF image" "GIF8[79]" - image-decode-gif nil t image-mode) - (image/png "Portable Network Graphics" "\211PNG" - image-decode-png nil t image-mode) - (image/x-xpm "XPM image" "/\\* XPM \\*/" - image-decode-xpm nil t image-mode) - - ;; TIFF files have lousy magic - (image/tiff "TIFF image" "II\\*\000" - image-decode-tiff nil t image-mode) ;; TIFF 6.0 big-endian - (image/tiff "TIFF image" "MM\000\\*" - image-decode-tiff nil t image-mode) ;; TIFF 6.0 little-endian - - (text/enriched "Extended MIME text/enriched format." - "Content-[Tt]ype:[ \t]*text/enriched" - enriched-decode enriched-encode t enriched-mode) - (text/richtext "Extended MIME obsolete text/richtext format." - "Content-[Tt]ype:[ \t]*text/richtext" - richtext-decode richtext-encode t enriched-mode) - (plain "ISO 8859-1 standard format, no text properties." - ;; Plain only exists so that there is an obvious neutral choice in - ;; the completion list. - nil nil nil nil nil) - ;; (ibm "IBM Code Page 850 (DOS)" - ;; "1\\(^\\)" - ;; "recode ibm-pc:latin1" "recode latin1:ibm-pc" t nil) - ;; (mac "Apple Macintosh" - ;; "1\\(^\\)" - ;; "recode mac:latin1" "recode latin1:mac" t nil) - ;; (hp "HP Roman8" - ;; "1\\(^\\)" - ;; "recode roman8:latin1" "recode latin1:roman8" t nil) - ;; (TeX "TeX (encoding)" - ;; "1\\(^\\)" - ;; iso-tex2iso iso-iso2tex t nil) - ;; (gtex "German TeX (encoding)" - ;; "1\\(^\\)" - ;; iso-gtex2iso iso-iso2gtex t nil) - ;; (html "HTML (encoding)" - ;; "1\\(^\\)" - ;; "recode html:latin1" "recode latin1:html" t nil) - ;; (rot13 "rot13" - ;; "1\\(^\\)" - ;; "tr a-mn-z n-za-m" "tr a-mn-z n-za-m" t nil) - ;; (duden "Duden Ersatzdarstellung" - ;; "1\\(^\\)" - ;; "diac" iso-iso2duden t nil) - ;; (de646 "German ASCII (ISO 646)" - ;; "1\\(^\\)" - ;; "recode iso646-ge:latin1" "recode latin1:iso646-ge" t nil) - ;; (denet "net German" - ;; "1\\(^\\)" - ;; iso-german iso-cvt-read-only t nil) - ;; (esnet "net Spanish" - ;; "1\\(^\\)" - ;; iso-spanish iso-cvt-read-only t nil) - ) - "List of information about understood file formats. -Elements are of the form \(NAME DOC-STR REGEXP FROM-FN TO-FN MODIFY MODE-FN). - -NAME is a symbol, which is stored in `buffer-file-format'. - -DOC-STR should be a single line providing more information about the - format. It is currently unused, but in the future will be shown to - the user if they ask for more information. - -REGEXP is a regular expression to match against the beginning of the file; - it should match only files in that format. - -FROM-FN is called to decode files in that format; it gets two args, BEGIN - and END, and can make any modifications it likes, returning the new - end. It must make sure that the beginning of the file no longer - matches REGEXP, or else it will get called again. - Alternatively, FROM-FN can be a string, which specifies a shell command - (including options) to be used as a filter to perform the conversion. - -TO-FN is called to encode a region into that format; it is passed three - arguments: BEGIN, END, and BUFFER. BUFFER is the original buffer that - the data being written came from, which the function could use, for - example, to find the values of local variables. TO-FN should either - return a list of annotations like `write-region-annotate-functions', - or modify the region and return the new end. - Alternatively, TO-FN can be a string, which specifies a shell command - (including options) to be used as a filter to perform the conversion. - -MODIFY, if non-nil, means the TO-FN wants to modify the region. If nil, - TO-FN will not make any changes but will instead return a list of - annotations. - -MODE-FN, if specified, is called when visiting a file with that format.") - -;;; Basic Functions (called from Lisp) - -(defun format-encode-run-method (method from to &optional buffer) - "Translate using function or shell script METHOD the text from FROM to TO. -If METHOD is a string, it is a shell command; -otherwise, it should be a Lisp function. -BUFFER should be the buffer that the output originally came from." - (if (stringp method) - (save-current-buffer - (set-buffer buffer) - (with-output-to-temp-buffer "*Format Errors*" - (shell-command-on-region from to method t nil)) - (point)) - (funcall method from to buffer))) - -(defun format-decode-run-method (method from to &optional buffer) - "Decode using function or shell script METHOD the text from FROM to TO. -If METHOD is a string, it is a shell command; -otherwise, it should be a Lisp function." - (if (stringp method) - (progn - (with-output-to-temp-buffer "*Format Errors*" - (shell-command-on-region from to method t nil)) - (point)) - (funcall method from to))) - -(defun format-annotate-function (format from to orig-buf) - "Return annotations for writing region as FORMAT. -FORMAT is a symbol naming one of the formats defined in `format-alist', -it must be a single symbol, not a list like `buffer-file-format'. -FROM and TO delimit the region to be operated on in the current buffer. -ORIG-BUF is the original buffer that the data came from. -This function works like a function on `write-region-annotate-functions': -it either returns a list of annotations, or returns with a different buffer -current, which contains the modified text to write. - -For most purposes, consider using `format-encode-region' instead." - ;; This function is called by write-region (actually build-annotations) - ;; for each element of buffer-file-format. - (let* ((info (assq format format-alist)) - (to-fn (nth 4 info)) - (modify (nth 5 info))) - (if to-fn - (if modify - ;; To-function wants to modify region. Copy to safe place. - (let ((copy-buf (get-buffer-create " *Format Temp*"))) - (copy-to-buffer copy-buf from to) - (set-buffer copy-buf) - (format-insert-annotations write-region-annotations-so-far from) - (format-encode-run-method to-fn (point-min) (point-max) orig-buf) - nil) - ;; Otherwise just call function, it will return annotations. - (funcall to-fn from to orig-buf))))) - -(defun format-decode (format length &optional visit-flag) - "Decode text from any known FORMAT. -FORMAT is a symbol appearing in `format-alist' or a list of such symbols, -or nil, in which case this function tries to guess the format of the data by -matching against the regular expressions in `format-alist'. After a match is -found and the region decoded, the alist is searched again from the beginning -for another match. - -Second arg LENGTH is the number of characters following point to operate on. -If optional third arg VISIT-FLAG is true, set `buffer-file-format' -to the list of formats used, and call any mode functions defined for those -formats. - -Returns the new length of the decoded region. - -For most purposes, consider using `format-decode-region' instead. - -This function is called by insert-file-contents whenever a file is read." - (let ((mod (buffer-modified-p)) - (begin (point)) - (end (+ (point) length))) - (if (null format) - ;; Figure out which format it is in, remember list in `format'. - (let ((try format-alist)) - (while try - (let* ((f (car try)) - (regexp (nth 2 f)) - (p (point))) - (if (and regexp (looking-at regexp) - (< (match-end 0) (+ begin length))) - (progn - (setq format (cons (car f) format)) - ;; Decode it - (if (nth 3 f) - (setq end (format-decode-run-method (nth 3 f) begin end))) - ;; Call visit function if required - (if (and visit-flag (nth 6 f)) (funcall (nth 6 f) 1)) - ;; Safeguard against either of the functions changing pt. - (goto-char p) - ;; Rewind list to look for another format - (setq try format-alist)) - (setq try (cdr try)))))) - ;; Deal with given format(s) - (or (listp format) (setq format (list format))) - (let ((do format) f) - (while do - (or (setq f (assq (car do) format-alist)) - (error "Unknown format" (car do))) - ;; Decode: - (if (nth 3 f) - (setq end (format-decode-run-method (nth 3 f) begin end))) - ;; Call visit function if required - (if (and visit-flag (nth 6 f)) (funcall (nth 6 f) 1)) - (setq do (cdr do))))) - (if visit-flag - (setq buffer-file-format format)) - (set-buffer-modified-p mod) - ;; Return new length of region - (- end begin))) - -;;; -;;; Interactive functions & entry points -;;; - -(defun format-decode-buffer (&optional format) - "Translate the buffer from some FORMAT. -If the format is not specified, this function attempts to guess. -`buffer-file-format' is set to the format used, and any mode-functions -for the format are called." - (interactive - (list (format-read "Translate buffer from format (default: guess): "))) - (save-excursion - (goto-char (point-min)) - (format-decode format (buffer-size) t))) - -(defun format-decode-region (from to &optional format) - "Decode the region from some format. -Arg FORMAT is optional; if omitted the format will be determined by looking -for identifying regular expressions at the beginning of the region." - (interactive - (list (region-beginning) (region-end) - (format-read "Translate region from format (default: guess): "))) - (save-excursion - (goto-char from) - (format-decode format (- to from) nil))) - -(defun format-encode-buffer (&optional format) - "Translate the buffer into FORMAT. -FORMAT defaults to `buffer-file-format'. It is a symbol naming one of the -formats defined in `format-alist', or a list of such symbols." - (interactive - (list (format-read (format "Translate buffer to format (default %s): " - buffer-file-format)))) - (format-encode-region (point-min) (point-max) format)) - -(defun format-encode-region (beg end &optional format) - "Translate the region into some FORMAT. -FORMAT defaults to `buffer-file-format', it is a symbol naming -one of the formats defined in `format-alist', or a list of such symbols." - (interactive - (list (region-beginning) (region-end) - (format-read (format "Translate region to format (default %s): " - buffer-file-format)))) - (if (null format) (setq format buffer-file-format)) - (if (symbolp format) (setq format (list format))) - (save-excursion - (goto-char end) - (let ( ; (cur-buf (current-buffer)) - (end (point-marker))) - (while format - (let* ((info (assq (car format) format-alist)) - (to-fn (nth 4 info)) - (modify (nth 5 info)) - ;; result - ) - (if to-fn - (if modify - (setq end (format-encode-run-method to-fn beg end - (current-buffer))) - (format-insert-annotations - (funcall to-fn beg end (current-buffer))))) - (setq format (cdr format))))))) - -(defun format-write-file (filename format) - "Write current buffer into a FILE using some FORMAT. -Makes buffer visit that file and sets the format as the default for future -saves. If the buffer is already visiting a file, you can specify a directory -name as FILE, to write a file of the same old name in that directory." - (interactive - ;; Same interactive spec as write-file, plus format question. - (let* ((file (if buffer-file-name - (read-file-name "Write file: " - nil nil nil nil) - (read-file-name "Write file: " - (cdr (assq 'default-directory - (buffer-local-variables))) - nil nil (buffer-name)))) - (fmt (format-read (format "Write file `%s' in format: " - (file-name-nondirectory file))))) - (list file fmt))) - (setq buffer-file-format format) - (write-file filename)) - -(defun format-find-file (filename format) - "Find the file FILE using data format FORMAT. -If FORMAT is nil then do not do any format conversion." - (interactive - ;; Same interactive spec as write-file, plus format question. - (let* ((file (read-file-name "Find file: ")) - (fmt (format-read (format "Read file `%s' in format: " - (file-name-nondirectory file))))) - (list file fmt))) - (let ((format-alist nil)) - (find-file filename)) - (if format - (format-decode-buffer format))) - -(defun format-insert-file (filename format &optional beg end) - "Insert the contents of file FILE using data format FORMAT. -If FORMAT is nil then do not do any format conversion. -The optional third and fourth arguments BEG and END specify -the part of the file to read. - -The return value is like the value of `insert-file-contents': -a list (ABSOLUTE-FILE-NAME . SIZE)." - (interactive - ;; Same interactive spec as write-file, plus format question. - (let* ((file (read-file-name "Find file: ")) - (fmt (format-read (format "Read file `%s' in format: " - (file-name-nondirectory file))))) - (list file fmt))) - (let (value size) - (let ((format-alist nil)) - (setq value (insert-file-contents filename nil beg end)) - (setq size (nth 1 value))) - (if format - (setq size (format-decode format size) - value (cons (car value) size))) - value)) - -(defun format-read (&optional prompt) - "Read and return the name of a format. -Return value is a list, like `buffer-file-format'; it may be nil. -Formats are defined in `format-alist'. Optional arg is the PROMPT to use." - (let* ((table (mapcar (lambda (x) (list (symbol-name (car x)))) - format-alist)) - (ans (completing-read (or prompt "Format: ") table nil t))) - (if (not (equal "" ans)) (list (intern ans))))) - - -;;; -;;; Below are some functions that may be useful in writing encoding and -;;; decoding functions for use in format-alist. -;;; - -(defun format-replace-strings (alist &optional reverse beg end) - "Do multiple replacements on the buffer. -ALIST is a list of (from . to) pairs, which should be proper arguments to -`search-forward' and `replace-match' respectively. -Optional 2nd arg REVERSE, if non-nil, means the pairs are (to . from), so that -you can use the same list in both directions if it contains only literal -strings. -Optional args BEGIN and END specify a region of the buffer to operate on." - (save-excursion - (save-restriction - (or beg (setq beg (point-min))) - (if end (narrow-to-region (point-min) end)) - (while alist - (let ((from (if reverse (cdr (car alist)) (car (car alist)))) - (to (if reverse (car (cdr alist)) (cdr (car alist))))) - (goto-char beg) - (while (search-forward from nil t) - (goto-char (match-beginning 0)) - (insert to) - (set-text-properties (- (point) (length to)) (point) - (text-properties-at (point))) - (delete-region (point) (+ (point) (- (match-end 0) - (match-beginning 0))))) - (setq alist (cdr alist))))))) - -;;; Some list-manipulation functions that we need. - -(defun format-delq-cons (cons list) - "Remove the given CONS from LIST by side effect, -and return the new LIST. Since CONS could be the first element -of LIST, write `\(setq foo \(format-delq-cons element foo))' to be sure of -changing the value of `foo'." - (if (eq cons list) - (cdr list) - (let ((p list)) - (while (not (eq (cdr p) cons)) - (if (null p) (error "format-delq-cons: not an element.")) - (setq p (cdr p))) - ;; Now (cdr p) is the cons to delete - (setcdr p (cdr cons)) - list))) - -(defun format-make-relatively-unique (a b) - "Delete common elements of lists A and B, return as pair. -Compares using `equal'." - (let* ((acopy (copy-sequence a)) - (bcopy (copy-sequence b)) - (tail acopy)) - (while tail - (let ((dup (member (car tail) bcopy)) - (next (cdr tail))) - (if dup (setq acopy (format-delq-cons tail acopy) - bcopy (format-delq-cons dup bcopy))) - (setq tail next))) - (cons acopy bcopy))) - -(defun format-common-tail (a b) - "Given two lists that have a common tail, return it. -Compares with `equal', and returns the part of A that is equal to the -equivalent part of B. If even the last items of the two are not equal, -returns nil." - (let ((la (length a)) - (lb (length b))) - ;; Make sure they are the same length - (if (> la lb) - (setq a (nthcdr (- la lb) a)) - (setq b (nthcdr (- lb la) b)))) - (while (not (equal a b)) - (setq a (cdr a) - b (cdr b))) - a) - -(defun format-reorder (items order) - "Arrange ITEMS to following partial ORDER. -Elements of ITEMS equal to elements of ORDER will be rearranged to follow the -ORDER. Unmatched items will go last." - (if order - (let ((item (member (car order) items))) - (if item - (cons (car item) - (format-reorder (format-delq-cons item items) - (cdr order))) - (format-reorder items (cdr order)))) - items)) - -(put 'face 'format-list-valued t) ; These text-properties take values -(put 'unknown 'format-list-valued t) ; that are lists, the elements of which - ; should be considered separately. - ; See format-deannotate-region and - ; format-annotate-region. - -;;; -;;; Decoding -;;; - -(defun format-deannotate-region (from to translations next-fn) - "Translate annotations in the region into text properties. -This sets text properties between FROM to TO as directed by the -TRANSLATIONS and NEXT-FN arguments. - -NEXT-FN is a function that searches forward from point for an annotation. -It should return a list of 4 elements: \(BEGIN END NAME POSITIVE). BEGIN and -END are buffer positions bounding the annotation, NAME is the name searched -for in TRANSLATIONS, and POSITIVE should be non-nil if this annotation marks -the beginning of a region with some property, or nil if it ends the region. -NEXT-FN should return nil if there are no annotations after point. - -The basic format of the TRANSLATIONS argument is described in the -documentation for the `format-annotate-region' function. There are some -additional things to keep in mind for decoding, though: - -When an annotation is found, the TRANSLATIONS list is searched for a -text-property name and value that corresponds to that annotation. If the -text-property has several annotations associated with it, it will be used only -if the other annotations are also in effect at that point. The first match -found whose annotations are all present is used. - -The text property thus determined is set to the value over the region between -the opening and closing annotations. However, if the text-property name has a -non-nil `format-list-valued' property, then the value will be consed onto the -surrounding value of the property, rather than replacing that value. - -There are some special symbols that can be used in the \"property\" slot of -the TRANSLATIONS list: PARAMETER and FUNCTION \(spelled in uppercase). -Annotations listed under the pseudo-property PARAMETER are considered to be -arguments of the immediately surrounding annotation; the text between the -opening and closing parameter annotations is deleted from the buffer but saved -as a string. The surrounding annotation should be listed under the -pseudo-property FUNCTION. Instead of inserting a text-property for this -annotation, the function listed in the VALUE slot is called to make whatever -changes are appropriate. The function's first two arguments are the START and -END locations, and the rest of the arguments are any PARAMETERs found in that -region. - -Any annotations that are found by NEXT-FN but not defined by TRANSLATIONS -are saved as values of the `unknown' text-property \(which is list-valued). -The TRANSLATIONS list should usually contain an entry of the form - \(unknown \(nil format-annotate-value)) -to write these unknown annotations back into the file." - (save-excursion - (save-restriction - (narrow-to-region (point-min) to) - (goto-char from) - (let (next open-ans todo - ;; loc - unknown-ans) - (while (setq next (funcall next-fn)) - (let* ((loc (nth 0 next)) - (end (nth 1 next)) - (name (nth 2 next)) - (positive (nth 3 next)) - (found nil)) - - ;; Delete the annotation - (delete-region loc end) - (cond - ;; Positive annotations are stacked, remembering location - (positive (setq open-ans (cons `(,name ((,loc . nil))) open-ans))) - ;; It is a negative annotation: - ;; Close the top annotation & add its text property. - ;; If the file's nesting is messed up, the close might not match - ;; the top thing on the open-annotations stack. - ;; If no matching annotation is open, just ignore the close. - ((not (assoc name open-ans)) - (message "Extra closing annotation (%s) in file" name)) - ;; If one is open, but not on the top of the stack, close - ;; the things in between as well. Set `found' when the real - ;; one is closed. - (t - (while (not found) - (let* ((top (car open-ans)) ; first on stack: should match. - (top-name (car top)) ; text property name - (top-extents (nth 1 top)) ; property regions - (params (cdr (cdr top))) ; parameters - (aalist translations) - (matched nil)) - (if (equal name top-name) - (setq found t) - (message "Improper nesting in file.")) - ;; Look through property names in TRANSLATIONS - (while aalist - (let ((prop (car (car aalist))) - (alist (cdr (car aalist)))) - ;; And look through values for each property - (while alist - (let ((value (car (car alist))) - (ans (cdr (car alist)))) - (if (member top-name ans) - ;; This annotation is listed, but still have to - ;; check if multiple annotations are satisfied - (if (member nil (mapcar (lambda (r) - (assoc r open-ans)) - ans)) - nil ; multiple ans not satisfied - ;; If there are multiple annotations going - ;; into one text property, split up the other - ;; annotations so they apply individually to - ;; the other regions. - (setcdr (car top-extents) loc) - (let ((to-split ans) this-one extents) - (while to-split - (setq this-one - (assoc (car to-split) open-ans) - extents (nth 1 this-one)) - (if (not (eq this-one top)) - (setcar (cdr this-one) - (format-subtract-regions - extents top-extents))) - (setq to-split (cdr to-split)))) - ;; Set loop variables to nil so loop - ;; will exit. - (setq alist nil aalist nil matched t - ;; pop annotation off stack. - open-ans (cdr open-ans)) - (let ((extents top-extents) - (start (car (car top-extents))) - (loc (cdr (car top-extents)))) - (while extents - (cond - ;; Check for pseudo-properties - ((eq prop 'PARAMETER) - ;; A parameter of the top open ann: - ;; delete text and use as arg. - (if open-ans - ;; (If nothing open, discard). - (setq open-ans - (cons - (append (car open-ans) - (list - (buffer-substring - start loc))) - (cdr open-ans)))) - (delete-region start loc)) - ((eq prop 'FUNCTION) - ;; Not a property, but a function. - (let ((rtn - (apply value start loc params))) - (if rtn (setq todo (cons rtn todo))))) - (t - ;; Normal property/value pair - (setq todo - (cons (list start loc prop value) - todo)))) - (setq extents (cdr extents) - start (car (car extents)) - loc (cdr (car extents)))))))) - (setq alist (cdr alist)))) - (setq aalist (cdr aalist))) - (unless matched - ;; Didn't find any match for the annotation: - ;; Store as value of text-property `unknown'. - (setcdr (car top-extents) loc) - (let ((extents top-extents) - (start (car (car top-extents))) - (loc (cdr (car top-extents)))) - (while extents - (setq open-ans (cdr open-ans) - todo (cons (list start loc 'unknown top-name) - todo) - unknown-ans (cons name unknown-ans) - extents (cdr extents) - start (car (car extents)) - loc (cdr (car extents)))))))))))) - - ;; Once entire file has been scanned, add the properties. - (while todo - (let* ((item (car todo)) - (from (nth 0 item)) - (to (nth 1 item)) - (prop (nth 2 item)) - (val (nth 3 item))) - - (if (numberp val) ; add to ambient value if numeric - (format-property-increment-region from to prop val 0) - (put-text-property - from to prop - (cond ((get prop 'format-list-valued) ; value gets consed onto - ; list-valued properties - (let ((prev (get-text-property from prop))) - (cons val (if (listp prev) prev (list prev))))) - (t val))))) ; normally, just set to val. - (setq todo (cdr todo))) - - (if unknown-ans - (message "Unknown annotations: %s" unknown-ans)))))) - -(defun format-subtract-regions (minu subtra) - "Remove the regions in SUBTRAHEND from the regions in MINUEND. A region -is a dotted pair (from . to). Both parameters are lists of regions. Each -list must contain nonoverlapping, noncontiguous regions, in descending -order. The result is also nonoverlapping, noncontiguous, and in descending -order. The first element of MINUEND can have a cdr of nil, indicating that -the end of that region is not yet known." - (let* ((minuend (copy-alist minu)) - (subtrahend (copy-alist subtra)) - (m (car minuend)) - (s (car subtrahend)) - results) - (while (and minuend subtrahend) - (cond - ;; The minuend starts after the subtrahend ends; keep it. - ((> (car m) (cdr s)) - (setq results (cons m results) - minuend (cdr minuend) - m (car minuend))) - ;; The minuend extends beyond the end of the subtrahend. Chop it off. - ((or (null (cdr m)) (> (cdr m) (cdr s))) - (setq results (cons (cons (1+ (cdr s)) (cdr m)) results)) - (setcdr m (cdr s))) - ;; The subtrahend starts after the minuend ends; throw it away. - ((< (cdr m) (car s)) - (setq subtrahend (cdr subtrahend) s (car subtrahend))) - ;; The subtrahend extends beyond the end of the minuend. Chop it off. - (t ;(<= (cdr m) (cdr s))) - (if (>= (car m) (car s)) - (setq minuend (cdr minuend) m (car minuend)) - (setcdr m (1- (car s))) - (setq subtrahend (cdr subtrahend) s (car subtrahend)))))) - (nconc (nreverse results) minuend))) - -;; This should probably go somewhere other than format.el. Then again, -;; indent.el has alter-text-property. NOTE: We can also use -;; next-single-property-change instead of text-property-not-all, but then -;; we have to see if we passed TO. -(defun format-property-increment-region (from to prop delta default) - "Increment property PROP over the region between FROM and TO by the -amount DELTA (which may be negative). If property PROP is nil anywhere -in the region, it is treated as though it were DEFAULT." - (let ((cur from) val newval next) - (while cur - (setq val (get-text-property cur prop) - newval (+ (or val default) delta) - next (text-property-not-all cur to prop val)) - (put-text-property cur (or next to) prop newval) - (setq cur next)))) - -;;; -;;; Encoding -;;; - -(defun format-insert-annotations (list &optional offset) - "Apply list of annotations to buffer as `write-region' would. -Inserts each element of the given LIST of buffer annotations at its -appropriate place. Use second arg OFFSET if the annotations' locations are -not relative to the beginning of the buffer: annotations will be inserted -at their location-OFFSET+1 \(ie, the offset is treated as the character number -of the first character in the buffer)." - (if (not offset) - (setq offset 0) - (setq offset (1- offset))) - (let ((l (reverse list))) - (while l - (goto-char (- (car (car l)) offset)) - (insert (cdr (car l))) - (setq l (cdr l))))) - -(defun format-annotate-value (old new) - "Return OLD and NEW as a \(close . open) annotation pair. -Useful as a default function for TRANSLATIONS alist when the value of the text -property is the name of the annotation that you want to use, as it is for the -`unknown' text property." - (cons (if old (list old)) - (if new (list new)))) - -(defun format-annotate-region (from to trans format-fn ignore) - "Generate annotations for text properties in the region. -Searches for changes between FROM and TO, and describes them with a list of -annotations as defined by alist TRANSLATIONS and FORMAT-FN. IGNORE lists text -properties not to consider; any text properties that are neither ignored nor -listed in TRANSLATIONS are warned about. -If you actually want to modify the region, give the return value of this -function to `format-insert-annotations'. - -Format of the TRANSLATIONS argument: - -Each element is a list whose car is a PROPERTY, and the following -elements are VALUES of that property followed by the names of zero or more -ANNOTATIONS. Whenever the property takes on that value, the annotations -\(as formatted by FORMAT-FN) are inserted into the file. -When the property stops having that value, the matching negated annotation -will be inserted \(it may actually be closed earlier and reopened, if -necessary, to keep proper nesting). - -If the property's value is a list, then each element of the list is dealt with -separately. - -If a VALUE is numeric, then it is assumed that there is a single annotation -and each occurrence of it increments the value of the property by that number. -Thus, given the entry \(left-margin \(4 \"indent\")), if the left margin -changes from 4 to 12, two annotations will be generated. - -If the VALUE is nil, then instead of annotations, a function should be -specified. This function is used as a default: it is called for all -transitions not explicitly listed in the table. The function is called with -two arguments, the OLD and NEW values of the property. It should return -lists of annotations like `format-annotate-location' does. - - The same structure can be used in reverse for reading files." - (let ((all-ans nil) ; All annotations - becomes return value - (open-ans nil) ; Annotations not yet closed - (loc nil) ; Current location - (not-found nil)) ; Properties that couldn't be saved - (while (or (null loc) - (and (setq loc (next-property-change loc nil to)) - (< loc to))) - (or loc (setq loc from)) - (let* ((ans (format-annotate-location loc (= loc from) ignore trans)) - (neg-ans (format-reorder (aref ans 0) open-ans)) - (pos-ans (aref ans 1)) - (ignored (aref ans 2))) - (setq not-found (append ignored not-found) - ignore (append ignored ignore)) - ;; First do the negative (closing) annotations - (while neg-ans - ;; Check if it's missing. This can happen (eg, a numeric property - ;; going negative can generate closing annotations before there are - ;; any open). Warn user & ignore. - (if (not (member (car neg-ans) open-ans)) - (message "Can't close %s: not open." (car neg-ans)) - (while (not (equal (car neg-ans) (car open-ans))) - ;; To close anno. N, need to first close ans 1 to N-1, - ;; remembering to re-open them later. - (setq pos-ans (cons (car open-ans) pos-ans)) - (setq all-ans - (cons (cons loc (funcall format-fn (car open-ans) nil)) - all-ans)) - (setq open-ans (cdr open-ans))) - ;; Now remove the one we're really interested in from open list. - (setq open-ans (cdr open-ans)) - ;; And put the closing annotation here. - (setq all-ans - (cons (cons loc (funcall format-fn (car neg-ans) nil)) - all-ans))) - (setq neg-ans (cdr neg-ans))) - ;; Now deal with positive (opening) annotations - (let ( ; (p pos-ans) - ) - (while pos-ans - (setq open-ans (cons (car pos-ans) open-ans)) - (setq all-ans - (cons (cons loc (funcall format-fn (car pos-ans) t)) - all-ans)) - (setq pos-ans (cdr pos-ans)))))) - - ;; Close any annotations still open - (while open-ans - (setq all-ans - (cons (cons to (funcall format-fn (car open-ans) nil)) - all-ans)) - (setq open-ans (cdr open-ans))) - (if not-found - (message "These text properties could not be saved:\n %s" - not-found)) - (nreverse all-ans))) - -;;; Internal functions for format-annotate-region. - -(defun format-annotate-location (loc all ignore trans) - "Return annotation(s) needed at LOCATION. -This includes any properties that change between LOC-1 and LOC. -If ALL is true, don't look at previous location, but generate annotations for -all non-nil properties. -Third argument IGNORE is a list of text-properties not to consider. - -Return value is a vector of 3 elements: -1. List of names of the annotations to close -2. List of the names of annotations to open. -3. List of properties that were ignored or couldn't be annotated." - (let* ((prev-loc (1- loc)) - (before-plist (if all nil (text-properties-at prev-loc))) - (after-plist (text-properties-at loc)) - p negatives positives prop props not-found) - ;; make list of all property names involved - (setq p before-plist) - (while p - (if (not (memq (car p) props)) - (setq props (cons (car p) props))) - (setq p (cdr (cdr p)))) - (setq p after-plist) - (while p - (if (not (memq (car p) props)) - (setq props (cons (car p) props))) - (setq p (cdr (cdr p)))) - - (while props - (setq prop (car props) - props (cdr props)) - (if (memq prop ignore) - nil ; If it's been ignored before, ignore it now. - (let ((before (if all nil (car (cdr (memq prop before-plist))))) - (after (car (cdr (memq prop after-plist))))) - (if (equal before after) - nil ; no change; ignore - (let ((result (format-annotate-single-property-change - prop before after trans))) - (if (not result) - (setq not-found (cons prop not-found)) - (setq negatives (nconc negatives (car result)) - positives (nconc positives (cdr result))))))))) - (vector negatives positives not-found))) - -(defun format-annotate-single-property-change (prop old new trans) - "Return annotations for PROPERTY changing from OLD to NEW. -These are searched for in the TRANSLATIONS alist. -If NEW does not appear in the list, but there is a default function, then that -function is called. -Annotations to open and to close are returned as a dotted pair." - (let ((prop-alist (cdr (assoc prop trans))) - ;; default - ) - (if (not prop-alist) - nil - ;; If either old or new is a list, have to treat both that way. - (if (or (consp old) (consp new)) - (let* ((old (if (listp old) old (list old))) - (new (if (listp new) new (list new))) - ;; (tail (format-common-tail old new)) - close open) - (while old - (setq close - (append (car (format-annotate-atomic-property-change - prop-alist (car old) nil)) - close) - old (cdr old))) - (while new - (setq open - (append (cdr (format-annotate-atomic-property-change - prop-alist nil (car new))) - open) - new (cdr new))) - (format-make-relatively-unique close open)) - (format-annotate-atomic-property-change prop-alist old new))))) - -(defun format-annotate-atomic-property-change (prop-alist old new) - "Internal function annotate a single property change. -PROP-ALIST is the relevant segment of a TRANSLATIONS list. -OLD and NEW are the values." - (let (num-ann) - ;; If old and new values are numbers, - ;; look for a number in PROP-ALIST. - (if (and (or (null old) (numberp old)) - (or (null new) (numberp new))) - (progn - (setq num-ann prop-alist) - (while (and num-ann (not (numberp (car (car num-ann))))) - (setq num-ann (cdr num-ann))))) - (if num-ann - ;; Numerical annotation - use difference - (progn - ;; If property is numeric, nil means 0 - (cond ((and (numberp old) (null new)) - (setq new 0)) - ((and (numberp new) (null old)) - (setq old 0))) - - (let* ((entry (car num-ann)) - (increment (car entry)) - (n (ceiling (/ (float (- new old)) (float increment)))) - (anno (car (cdr entry)))) - (if (> n 0) - (cons nil (make-list n anno)) - (cons (make-list (- n) anno) nil)))) - - ;; Standard annotation - (let ((close (and old (cdr (assoc old prop-alist)))) - (open (and new (cdr (assoc new prop-alist))))) - (if (or close open) - (format-make-relatively-unique close open) - ;; Call "Default" function, if any - (let ((default (assq nil prop-alist))) - (if default - (funcall (car (cdr default)) old new)))))))) - -;;; format.el ends here