diff -aruN groff-1.17/ChangeLog groff-1.17.1/ChangeLog --- groff-1.17/ChangeLog Tue Apr 17 13:16:22 2001 +++ groff-1.17.1/ChangeLog Thu Jun 21 14:07:54 2001 @@ -1,3 +1,347 @@ +2001-06-21 Golubev I. N. + + * aclocal.m4 (GROFF_NEED_DECLARATION): Fix inclusion of strings.h. + * configure: Updated. + +2001-06-20 Gaius Mulley + + * src/roff/preproc/html/pre-html.cc (make_message): Fix incorrect + image names. + * src/roff/troff/dic.cc (blank_line): Add html tag. + +2001-06-19 Gaius Mulley + + * src/roff/troff/input.cc (do_suppress): Fix typo. + +2001-06-18 Gaius Mulley + + Added two new options (-D and -I) to specify image names and a + subdirectory to place the images in. + + Change syntax from \\Ox to \\O[x]. + + * src/devices/grohtml/post-html.cc (main): Add options. + (usage): Updated. + * src/preproc/html/pre-html.cc: Include `stdarg.h'. + Use `NULL' instead of `0' for null string pointers. + (MAX_RETRIES): New macro. + (lengthOfintToStr, intToStr, make_message): New functions. + (makeFileName): Make function static. + Implement -D and -I options. + (checkImageDir): New function. + (write_end_image, write_start_image): Use new syntax of \O. + (createAllPages, removeAllPages): Implement -D and -I options. Use + make_message(). + (createImage): Use make_message(). + (addps4html): Add guard for malloc(). + (usage, scanArguments): Updated. + (makeTempFiles): Use mkstemp(). + (removeTempFiles): Use unlink(). + (findPrefix): Add guard for malloc(). + (main): Updated. + * src/roff/troff/input.cc (get_delim_file_name): New function to + parse \O. + (do_suppress): Updated to parse new syntax. + * src/devices/grohtml/grohtml.man: Updated. + * tmac/www.tmac: Updated to new syntax. + + * NEWS: Updated. + +2001-06-15 Werner LEMBERG + + * src/roff/grog/Makefile.sub: Remove NAMEPREFIX. + + * src/devices/grohtml/grohtml.man: Minor improvements. + +2001-06-14 Werner LEMBERG + + * src/preproc/html/Makefile.sub: Remove NAMEPREFIX. + +2001-06-11 Werner LEMBERG + + * man/roff.man, mann/groff.man: Use '\" instead of .\" in the first + line to specify preprocessor options -- mandb 2.3.1 only recognizes + the former. + * src/preproc/grn/grn.man: Add proper '\" string. + +2001-06-11 OKAZAKI Tetsurou + + * test-groff: Don't use PATH but GROFF_BIN_PATH. + +2001-06-08 Werner LEMBERG + + Updated to autoconf 2.50. + + * configure.in: Renamed to... + * configure.ac: This. + * aclocal.m4 (AC_OUTPUT_MAKE_DEFS): Removed. + (GROFF_OS390): Updated. + * configure: Regenerated. + +2001-05-18 Werner LEMBERG + + * src/roff/troff/env.c, src/roff/troff/env.h, + src/roff/troff/input.cc, src/roff/troff/troff.man: Undo `ss' change + from 2000-12-21. + +2001-05-17 Jeffrey Friedl + + * src/roff/troff/input.cc (read_size): Fix special case `\s0'. + +2001-05-16 Bruce Lilly + + * contrib/mm/m.tmac (TH): Fix incorrect error message. + +2001-05-16 Werner LEMBERG + + * src/roff/troff/input.cc (read_size): Emit warning if value becomes + less than or equal zero; set it to 1 then. + * src/roff/troff/node.h (node::node): Initialize `last'. + +2001-05-08 Werner LEMBERG + + * tmac/an-old.tmac: Make predefined strings work in compatibility + mode. + Add troff version guard. + * tmac/doc.tmac: Simplify version guard. + +2001-05-07 Werner LEMBERG + + The .ns and .rs requests are now honoured not only in the top-level + but in all diversions (similar to UNIX troff). + + This change is based on a patch from Tadziu Hoffmann + . + + * src/roff/troff/div.h (diversion): Add `no_space_mode' member. + (top_level_diversion): Remove `no_space_mode' member. + * src/roff/troff/div.cc (diversion::diversion, + top_level_diversion::top_level_diversion): Updated. + (macro_diversion::output): Reset `no_space_mode'. + (no_space, restore_spacing): Use `curdiv' unconditionally. + (space_request, blank_line): Check `curdiv->no_space_mode'. + (no_space_mode_reg::get_value, no_space_mode_reg::get_string): Use + `curdiv' unconditionally. + * NEWS, src/roff/troff/troff.man, man/groff.man, doc/groff.texinfo: + Updated. + +2001-05-06 Werner LEMBERG + + Added two new requests `de1' and `am1' which are similar to `de' and + `am' with the difference that compatibility mode is saved on entry, + switched off during macro execution, and restored on exit. + + * src/roff/troff/input.h: Added two new special characters + (COMPATIBLE_SAVE, COMPATIBLE_RESTORE). + * src/roff/troff/input.cc (input_iterator): Added two member + functions `save_compatible_flag' and `get_compatible_flag'. + (input_stack): Ditto. + (string_iterator): Ditto. Also add private member + `saved_compatible_flag'. + (token::next): Use COMPATIBLE_SAVE and COMPATIBLE_RESTORE. + (calling_mode): New enumeration. + (do_define_macro): Use it. Insert COMPATIBLE_SAVE and + COMPATIBLE_RESTORE at the beginning and end of macro, respectively. + (define_macro, define_indirect_macro, append_macro, ignore): Use + `calling_mode'. + (define_nocomp_macro, append_nocomp_macro): New functions. + (init_input_requests): Updated. + (do_request): Rename local variable `saved_compatible_flag' to + `old_compatible_flag'. + * NEWS, src/roff/troff/troff.man, man/groff.man: Document it. + + * tmac/an-old.tmac: Use `de1' instead of `de' request for all + public and trap-invoked macros. As a consequence, the man macros + work in compatibility mode also. + +2001-05-06 Solar Designer + + * Makefile.in: Use $(mandir). + +2001-05-06 Alexios Zavras + + * src/utils/afmtodit/afmtodit.pl: Fix serious typo. + +2001-05-05 Werner LEMBERG + + Added `.ns' number register: Returns 1 in no-space mode (if in + top-level diversion), 0 otherwise. + + * src/roff/troff/div.cc (no_space_mode_reg): New class. + (init_div_requests): Updated. + * NEWS, src/roff/troff/troff.man, man/groff.man, doc/groff.texinfo: + Document it. + +2001-05-04 Werner LEMBERG + + * src/roff/nroff/nroff.man: Improved documentation (especially + locales). + +2001-05-02 Werner LEMBERG + + Added `brp' request: This is \p as a request. + + * src/roff/troff/env.cc (environment::do_break): Add parameter + `spread'. + (do_break_request): New function (was `break_request'). + (break_request): Calls `do_break_request'. + (break_spread_request): New; calls `do_break_request'. + (init_env_requests): Updated. + * src/roff/troff/env.h: Updated. + * NEWS, src/roff/troff/troff.man, man/groff.man: Document it. + + * REVISION: Increased to 1. + * win32-diffs: Updated. + +2001-05-01 Werner LEMBERG + + * tmac/an-old.tmac: Fix minor compatibility mode issue. + * tmac/troffrc-end: Make it really work in compatibility mode. + +2001-04-27 Werner LEMBERG + + * src/utils/lkbib/lkbib.cc: Switch inclusion order of stdio.h and + stdlib.h. + +2001-04-22 Werner LEMBERG + + * src/libs/libgroff/getopt.c, src/include/getopt.h: Updating to + latest versions from glibc CVS archive. + + * MORE.STUFF: Updated, using a patch from Kees Zeelenberg + . + +2001-04-21 Werner LEMBERG + + * configure.in: Move check for mkstemp() to... + * aclocal.m4 (GROFF_MKSTEMP): This new function. + * configure: Regenerated. + + * src/include/groff-getopt.h: Don't use variable names in + declarations. + + * src/devices/grohtml/html-chars.h: Removed. It isn't used. + * src/devices/grohtml/Makefile.sub, + src/devices/grohtml/post-html.cc: Updated. + +2001-04-21 Albert Chin-A-Young + + * configure.in: Add special check for mkstemp(). + * src/libs/libgroff/tmpfile.cc: Use it. + * src/utils/indxbib/indxbib.cc: Ditto. + * src/utils/pfbtops/pfbtops.c (main): Don't use C++ comment style. + * src/devices/grolbp/lbp.h (lbpprintf, lbpputs, vdmprintf): Use + `const'. + +2001-04-20 Bruce Lilly + + `Version_string' as C++ object was not visible to linker from C + object files. + Add `const' to `Version_string'. + + * src/utils/pfbtops/pfbtops.c (main), src/roff/groff/groff.cc + (main), src/roff/troff/input.cc (main), src/preproc/tbl/main.cc + (main), src/preproc/pic/main.cc (main), src/preproc/eqn/main.cc + (main), src/preproc/grn/main.cc (main), src/preproc/html/pre-html.cc + (scanArguments), src/preproc/refer/refer.cc (main), + src/preproc/soelim/soelim.cc (main), src/devices/grotty/tty.cc + (main), src/devices/grodvi/dvi.cc (main), src/devices/grolj4/lj4.cc + (main), src/devices/grohtml/post-html.cc (main), + src/devices/grolbp/lbp.cc (main), src/utils/tfmtodit/tfmtodit.cc + (main), src/utils/hpftodit/hpftodit.cc (main), + src/utils/lookbib/lookbib.cc (main), src/utils/indxbib/indxbib.cc + (main), src/utils/lkbib/lkbib.cc (main), + src/utils/addftinfo/addftinfo.cc (main): Implement it. + + * src/roff/groff/pipeline.c: Add _UWIN. + * src/include/nonposix.h: Ditto. + +2001-04-20 Werner LEMBERG + + * src/include/lib.h: Use HAVE_STRERROR. + * src/roff/groff/pipeline.c: Ditto. + * src/preproc/html/pre-html.cc: Remove declaration of `strerror'. + * src/libs/libgroff/Makefile.sub (version.cc): Add `extern "C"'. + * src/utils/pfbtops/pfbtops.c: Add copyright notice. + * win32-diffs: Updated. + * src/utils/hpftodit/hpftodit.cc (read_map): Fix compiler warning. + +2001-04-19 Werner LEMBERG + + * src/preproc/html/pre-html.cc (scanArguments): Use `troff_command' + instead of hardwired `"troff"'. + (char_buffer::read_file): Remove unused variables. + (char_buffer::write_file_troff): Ditto. + (char_buffer::write_file_html): Ditto. + (generateImages): Ditto. + (abs): Removed. + * src/utils/addftinfo/addftinfo.cc (main): Fix compilation problem. + + * src/include/lib.h: Don't include `groff-getopt.h' for UWIN. + + * src/libs/libgroff/font.cc (font::load_desc): Fix compiler warning. + * src/libs/libbib/index.cc (index_search_item_iterator::get_tag, + index_search_item::search1): Ditto. + * src/roff/troff/node.h (width_list): Reorder members. + * src/roff/troff/input.cc (do_define_macro): Fix compiler warning. + (lookup_warning): Ditto. + (prepend_string): Commented out. + * src/roff/troff/dictionary.cc (is_good_size): Fix compiler warning. + * src/roff/troff/reg.cc (number_value_to_ascii): Ditto. + * src/preproc/tbl/main.cc (process_format): Ditto. + * src/preproc/pic/pic.y (define_variable, reset, reset_all): Fix + compiler warnings. + * src/preproc/pic/pic.cc: Updated. + * src/preproc/eqn/lex.cc (init_table): Fix compiler warnings. + * src/preproc/eqn/over.cc (over_box::compute_metrics): Ditto. + * src/preproc/refer/command.cc (execute_command): Ditto. + * src/preproc/refer/ref.cc (sortify_title, find_month): Ditto. + * src/preproc/refer/token.cc (lookup_token): Ditto. + * src/preproc/soelim/soelim.cc: Ditto. + * src/preproc/html/pushbackbuffer.cc (ERROR): Ditto. + (isHexDigit): Commented out. + (pushBackBuffer::isString): Remove unused variable. + * src/devices/grops/ps.cc (ps_printer::special): Fix compiler + warning. + * src/devices/grops/psrm.cc (resource_manager::lookup_font, + resource_manager::read_resource_arg, read_one_of, parse_extensions): + Ditto. + * src/devices/grodvi/dvi.cc (dvi_printer::draw): Ditto. + * src/devices/grolj4/lj4.cc (lj4_font::handle_unknown_font_command, + lookup_paper_size): Ditto. + * src/devices/grohtml/post-html.cc (is_subsection): Commented out. + (text_glob, element_list): Reorder members. + * src/devices/grohtml/html-text.cc (html_text::do_pre): Remove + compiler warning. + * src/devices/grohtml/html-text.h (html_text::emit_space): Change + return value to `void'. + * src/devices/grohtml/output.cc (word_list::word_list): Fix order + of initializers. + * src/devices/grohtml/html.h (simple_output::check_newline, + simple_output::space_or_newline, simple_output::enable_newlines): + Add return value. + * src/devices/grolbp/lbp.cc (wp54charset, set_papersize): Remove + compiler warnings. + * src/utils/tfmtodit/tfmtodit.cc (tfm::load, gf::load, main): Ditto. + * src/utils/hpftodit/hpftodit.cc (File::seek, read_symbol_sets, + output_ligatures, output_charset, read_map): Ditto. + * src/utils/lookbib/lookbib.cc (main): Ditto. + * src/utils/indxbib/indxbib.cc (main, fwrite_or_die): Ditto. + (do_file): Fix typo (`=' -> `=='). + * src/utils/lkbib/lkbib.cc (main): Remove compiler warning. + * src/utils/addftinfo/addftinfo.cc (main): Ditto. + +2001-04-18 Ruslan Ermilov + + * src/roff/nroff/nroff.sh: Adding -p (pic) and -t (tbl) options. + Fix usage of GROFF_BIN_PATH. + * src/roff/nroff/nroff.man: Updated. + +2001-04-18 Werner LEMBERG + + * NEWS: Fixing typos. + Updated. + Version 1.17 released ===================== @@ -245,7 +589,7 @@ * tmac/doc.tmac (Cd): Simplify code. * tmac/groff_mdoc.man: Document some behaviour of `Cd' request. -2001-04-06 Werner Lemberg +2001-04-06 Werner LEMBERG Implement continuous underlining for nroff mode. To do that, a new request in the ditroff language has been added: `x u N' (N is 0 diff -aruN groff-1.17/MORE.STUFF groff-1.17.1/MORE.STUFF --- groff-1.17/MORE.STUFF Fri Apr 13 19:11:31 2001 +++ groff-1.17.1/MORE.STUFF Sat Apr 28 00:13:01 2001 @@ -6,40 +6,54 @@ Here two ports using the gcc compiler and other GNU tools: - Thomer M. Gil : +. Cygwin: - http://www.cs.vu.nl/~tmgil/misc/wingroff.html + http://sources.redhat.com/cygwin/ - Kees Zeelenberg : + Look for a convenient mirror site in - http://gnuwin32.sourceforge.net/ + http://sources.redhat.com/cygwin/mirrors.html + + At any of this mirrors, groff can be found in the directory + latest/groff. + +. Kees Zeelenberg : + + http://gnuwin32.sourceforge.net/packages/groffl.htm + + This port includes grap-1.10 and deroff-1.7. dos --- -Binaries for Eli Zaretskii's port using the djgpp compiler -are available from +Binaries for Eli Zaretskii's port using the djgpp compiler are available +from ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/gro*b.zip and its mirrors; for installation details please read `arch/djgpp/README'. +This port also runs on win32 systems, except Win2K. grap ---- An implementation of Kernighan & Bentley's grap language for typesetting graphs. Written by Ted Faber . The actual version -can be found at +can be found at http://www.lunabase.org/~faber/Vault/software/grap/ -A djgpp port which runs on MS-DOS and all Win32 systems (Win95, Win98, +A djgpp port which runs on dos and most win32 systems (Win95, Win98, WinNT) done by Kees Zeelenberg is available from ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2apps/ It is intended to be used with the djgpp port of groff. +A win32 port is included in the groff package available from + + http://gnuwin32.sourceforge.net/ + plot2dev -------- @@ -67,7 +81,7 @@ http://www.primate.wisc.edu/software/troffcvt/ unroff -______ +------ From the README file: @@ -88,8 +102,8 @@ Deroff removes roff constructs from documents for the purpose of indexing, spell checking etc. -Michael Haardt's implementation is a little smarter than -traditional implementations, because it knows about certain -man and +Michael Haardt's implementation is a little smarter +than traditional implementations, because it knows about certain -man and -mm macros. It is able to generate a word list for spell checking tools or omit headers for sentence analysis tools. It can further generate cpp-style #line lines. @@ -103,6 +117,10 @@ and its mirrors. +A win32 port of version 1.7 is available from + + http://gnuwin32.sourceforge.net/ + miscellaneous ------------- @@ -125,9 +143,9 @@ things to ASCII text. Amongst other things, it breaks lines at new sentences, reduces upper-case acronyms by one point size, adds diacriticals, changes simple quotes into smart quotes, and makes a few - simple grammar checks. The best way to see what it does is to run it as - a sed script file (or files) on a text file and then compare the output - file with the original. + simple grammar checks. The best way to see what it does is to run it + as a sed script file (or files) on a text file and then compare the + output file with the original. o `DropCaps' is a troff script which replaces the initial letters of paragraphs immediately after H1 and H2 headings with drop-capitals of @@ -148,7 +166,8 @@ documentation ------------- -Many documents related to the original versions of troff, ditroff, pic, and -others can be accessed from the following web page: +Many documents related to the original versions of troff, ditroff, pic, +and others can be accessed from the following web pages: http://www.cs.bell-labs.com/cm/cs/cstr.html + http://www.cs.bell-labs.com/cm/cs/papers.html diff -aruN groff-1.17/Makefile.in groff-1.17.1/Makefile.in --- groff-1.17/Makefile.in Sat Apr 14 16:25:12 2001 +++ groff-1.17.1/Makefile.in Mon May 7 01:29:20 2001 @@ -158,7 +158,8 @@ common_words_file=$(datasubdir)/eign # manroot is the root of the man page directory tree. -manroot=@mandir@ +mandir=@mandir@ +manroot=$(mandir) # man1ext is the man section for user commands. man1ext=1 diff -aruN groff-1.17/NEWS groff-1.17.1/NEWS --- groff-1.17/NEWS Tue Apr 10 14:54:11 2001 +++ groff-1.17.1/NEWS Tue Jun 19 00:37:33 2001 @@ -1,21 +1,61 @@ -This file describes recent user-visible changes in groff. Bug fixes -are not described. There are more details in the man pages. +This file describes recent user-visible changes in groff. Bug fixes are not +described. There are more details in the man pages. + + +VERSION 1.17.1 +============== + +This is mainly a bug-fixing release. + +Troff +----- + +o Two new requests `de1' and `am1' which are similar to `de' and `am' but + with compatibility mode disabled during expansion of macros defined by + them. + +o Added request `brp'. This is the same as `\p'. + +o Similar to other versions of troff, `.ns' now works in all diversions, + not only in the top-level one. + +o New read-only number register `.ns'. Returns 1 if in no-space mode, + 0 otherwise. + +Nroff +----- + +o Options -p (pic) and -t (tbl) added. + +o The environment variable GROFF_BIN_PATH is now checked before PATH for + finding groff. + +Grohtml +------- + +o New option `-D dir' to specify a directory in which all images are placed. + +o New option `-I stem' to specify an image name stame. If not given, + `grohtml-XXX' is used (`XXX' is the process ID). + +VERSION 1.17 +============ Groff ----- -o `-mFOO' will now search first for `FOO.tmac' and then for `tmac.FOO'. The +o `-mFOO' now searches first for `FOO.tmac' and then for `tmac.FOO'. The old behaviour has been changed to overcome problems with platforms which have an 8+3 file name limit, and platforms which have other versions of troff installed also. Additionally, all macro files have been renamed using the latter scheme to avoid 8+3 name clashes. -o The new environment variable GROFF_BIN_PATH will be checked for programs - groff is calling (preprocessors, troff, and output devices) before PATH. - If not set, it defaults to the directory where the groff binary is - located. Previously, it was PATH only. The nroff script will only use - GROFF_BIN_PATH to find the groff binary but passes both the GROFF_BIN_PATH - and PATH environment variable to groff. +o The new environment variable GROFF_BIN_PATH is checked for programs groff + is calling (preprocessors, troff, and output devices) before PATH. If not + set, it defaults to the directory where the groff binary is located. + Previously, it was PATH only. The nroff script only uses GROFF_BIN_PATH + to find the groff binary but passes both the GROFF_BIN_PATH and PATH + environment variable to groff. Troff ----- @@ -47,9 +87,9 @@ encounter any abnormal results, please report them to bug-groff@gnu.org. o A new command line option for the `man' macros (similar to the `mdoc' - package has been implemented: `-rcR=1' (now the default in nroff mode) will - produce one single, very long page instead of multiple pages. `-rcR=0' - will deactivate it. + package has been implemented: `-rcR=1' (now the default in nroff mode) + produces one single, very long page instead of multiple pages. `-rcR=0' + deactivates it. o The `return' request has been added to return immediately from a macro. @@ -73,7 +113,7 @@ o The `asciify' request has been extended to `unformat' space characters and some other escape sequences also. - `\ ' will no longer be unformatted as a space but remains an unpaddable, + `\ ' is no longer unformatted as a space but remains an unpaddable, unbreakable space character. o The new `unformat' request is similar to `asciify' but only handles space @@ -164,7 +204,7 @@ previous font family. o The new read-only register `.int' is set to a positive value if the last - output line is interrupted (i.e., if it contains `\c'). + output line is interrupted (i.e., if the input line contains `\c'). o The `writem' request is not new, but hasn't been documented before. This is similar to `write' but instead of a string the contents of a given @@ -174,24 +214,17 @@ position relative to the input line isn't new but hasn't been documented properly before. -o `\X' and `\Y' are no transparent for end-of-sentence recognition. - -o The `cu' request in nroff mode now works as documented (i.e., it does - underline spaces also). - -Nroff ------ +o `\X' and `\Y' are now transparent for end-of-sentence recognition. -Option -v shows the version number. +o The `cu' request in nroff mode now works as documented (i.e., it + underlines spaces also). Grog ---- -o The grog script will now work in non-compatibility mode also (which is the +o The grog script now works in non-compatibility mode also (which is the default). As usual, use the `-C' option to activate compatibility mode. -o Option -v shows the version number. - Grops ----- @@ -227,16 +260,15 @@ Use the `-F' command line option or the GROFF_FONT_PATH environment variable if you really need the current directory. -o groff will now install its data files into - /usr/local/share/groff/ by default, following the GNU standard. - Additionally, a local tmac directory (by default - /usr/local/share/groff/site-tmac) will be scanned before the standard tmac - directory. Wrapper files for system-specific macro packages (if - necessary) are put into /usr/local/lib/groff/site-tmac; this directory - will be searched before the local tmac directory. +o groff now installs its data files into /usr/local/share/groff/ by + default, following the GNU standard. Additionally, a local tmac directory + (by default /usr/local/share/groff/site-tmac) is scanned before the + standard tmac directory. Wrapper files for system-specific macro packages + (if necessary) are put into /usr/local/lib/groff/site-tmac; this directory + is searched before the local tmac directory. -o All programs now have option `-v' to show the version number; they will - exit immediately afterwards, following the GNU standards. Additionally, +o All programs now have option `-v' to show the version number; they exit + immediately afterwards, following the GNU standards. Additionally, `--version' and `--help' have been added, doing the obvious actions. VERSION 1.16.1 diff -aruN groff-1.17/REVISION groff-1.17.1/REVISION --- groff-1.17/REVISION Tue Jan 30 15:54:55 2001 +++ groff-1.17.1/REVISION Wed May 2 09:28:45 2001 @@ -1 +1 @@ -0 +1 diff -aruN groff-1.17/aclocal.m4 groff-1.17.1/aclocal.m4 --- groff-1.17/aclocal.m4 Sat Apr 14 16:25:12 2001 +++ groff-1.17.1/aclocal.m4 Thu Jun 21 14:07:54 2001 @@ -437,13 +437,11 @@ dnl gcc) to OS/390 uses ASCII internally. dnl AC_DEFUN(GROFF_OS390, -[groff_cv_os390="no" -if test "$groff_cv_ebcdic" = "yes"; then +[if test "$groff_cv_ebcdic" = "yes"; then AC_MSG_CHECKING([for OS/390 Unix]) case `uname` in OS/390) CFLAGS="$CFLAGS -D_ALL_SOURCE" - groff_cv_os390="yes" AC_MSG_RESULT(yes) ;; *) AC_MSG_RESULT(no) ;; @@ -451,34 +449,6 @@ fi])dnl dnl dnl -dnl Finally, we must modify a base function of autoconf to replace the -dnl ASCII char `012' with its generic equivalent `\n' if we run under -dnl OS/390 Unix -- unfortunately, not all `tr' variants understand `\n', -dnl so this hack is necessary. -dnl -define([AC_OUTPUT_MAKE_DEFS], -[# Transform confdefs.h into DEFS. -dnl Using a here document instead of a string reduces the quoting nightmare. -# Protect against shell expansion while executing Makefile rules. -# Protect against Makefile macro expansion. -cat > conftest.defs <<\EOF -changequote(<<, >>)dnl -s%<<#define>> \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g -s%[ `~<<#>>$^&*(){}\\|;'"<>?]%\\&%g -s%\[%\\&%g -s%\]%\\&%g -s%\$%$$%g -changequote([, ])dnl -EOF -if test "$groff_cv_os390" = "yes"; then - DEFS=`sed -f conftest.defs confdefs.h | tr '\n' ' '` -else - DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '` -fi -rm -f conftest.defs -])dnl -dnl -dnl dnl Check whether we need a declaration for a function. dnl dnl Stolen from GNU bfd. @@ -492,11 +462,10 @@ #include #ifdef HAVE_STRING_H #include -#else +#endif #ifdef HAVE_STRINGS_H #include #endif -#endif #ifdef HAVE_STDLIB_H #include #endif @@ -514,3 +483,15 @@ AC_DEFINE([NEED_DECLARATION_]translit($1, [a-z], [A-Z])) fi AC_LANG_RESTORE])dnl +dnl +dnl +dnl Check for mkstemp() and its function prototype. +dnl +AC_DEFUN(GROFF_MKSTEMP, +[AC_CHECK_FUNC(mkstemp, +[AC_DEFINE(HAVE_MKSTEMP) +AC_MSG_CHECKING([for mkstemp prototype in ]) +AC_EGREP_CPP(mkstemp, +[#include ], +AC_MSG_RESULT(yes);AC_DEFINE(HAVE_MKSTEMP_PROTO), +AC_MSG_RESULT(no))])]) diff -aruN groff-1.17/configure groff-1.17.1/configure --- groff-1.17/configure Mon Nov 13 17:51:26 2000 +++ groff-1.17.1/configure Thu Jun 21 14:07:54 2001 @@ -1,26 +1,116 @@ #! /bin/sh - # Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.13 -# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. +# Generated by Autoconf 2.50. # +# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 +# Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. -# Defaults: -ac_help= +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix +fi + +# Name of the executable. +as_me=`echo "$0" |sed 's,.*[\\/],,'` + +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links + as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.file + +as_executable_p="test -f" + +# Support unset when possible. +if (FOO=FOO; unset FOO) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + +# NLS nuisances. +$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; } +$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; } +$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; } +$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; } +$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; } +$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; } +$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; } +$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; } + +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; } + +# Name of the host. +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +exec 6>&1 + +# +# Initializations. +# ac_default_prefix=/usr/local -# Any additions from configure.in: +cross_compiling=no +subdirs= +MFLAGS= MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} + +# Maximum number of lines to put in a shell here document. +# This variable seems obsolete. It should probably be removed, and +# only ac_max_sed_lines should be used. +: ${ac_max_here_lines=38} + +# Avoid depending upon Character Ranges. +ac_cr_az='abcdefghijklmnopqrstuvwxyz' +ac_cr_AZ='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +ac_cr_09='0123456789' +ac_cr_alnum=$ac_cr_az$ac_cr_AZ$ac_cr_09 + +# Sed expression to map a string onto a valid sh and CPP variable names. +ac_tr_sh="sed y%*+%pp%;s%[^_$ac_cr_alnum]%_%g" +ac_tr_cpp="sed y%*$ac_cr_az%P$ac_cr_AZ%;s%[^_$ac_cr_alnum]%_%g" + +ac_unique_file="src/roff/groff/groff.cc" # Initialize some variables set by options. +ac_init_help= +ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. -build=NONE -cache_file=./config.cache +cache_file=/dev/null exec_prefix=NONE -host=NONE no_create= -nonopt=NONE no_recursion= prefix=NONE program_prefix=NONE @@ -29,10 +119,15 @@ silent= site= srcdir= -target=NONE verbose= x_includes=NONE x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' @@ -46,17 +141,16 @@ infodir='${prefix}/info' mandir='${prefix}/man' -# Initialize some other variables. -subdirs= -MFLAGS= MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} -# Maximum number of lines to put in a shell here document. -ac_max_here_lines=12 +# Identity of this package. +PACKAGE_NAME= +PACKAGE_TARNAME= +PACKAGE_VERSION= +PACKAGE_STRING= +PACKAGE_BUGREPORT= ac_prev= for ac_option do - # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval "$ac_prev=\$ac_option" @@ -64,59 +158,59 @@ continue fi - case "$ac_option" in - -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; - *) ac_optarg= ;; - esac + ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. - case "$ac_option" in + case $ac_option in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir="$ac_optarg" ;; + bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) - ac_prev=build ;; + ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build="$ac_optarg" ;; + build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file="$ac_optarg" ;; + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) - datadir="$ac_optarg" ;; + datadir=$ac_optarg ;; -disable-* | --disable-*) - ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` + ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - eval "enable_${ac_feature}=no" ;; + expr "x$ac_feature" : ".*[^-_$ac_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) - ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` + ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; + expr "x$ac_feature" : ".*[^-_$ac_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac - eval "enable_${ac_feature}='$ac_optarg'" ;; + eval "enable_$ac_feature='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -125,95 +219,47 @@ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) - exec_prefix="$ac_optarg" ;; + exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; - -help | --help | --hel | --he) - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat << EOF -Usage: configure [options] [host] -Options: [defaults in brackets after descriptions] -Configuration: - --cache-file=FILE cache test results in FILE - --help print this message - --no-create do not create output files - --quiet, --silent do not print \`checking...' messages - --version print the version of autoconf that created configure -Directory and file names: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [same as prefix] - --bindir=DIR user executables in DIR [EPREFIX/bin] - --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] - --libexecdir=DIR program executables in DIR [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data in DIR - [PREFIX/share] - --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data in DIR - [PREFIX/com] - --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] - --libdir=DIR object code libraries in DIR [EPREFIX/lib] - --includedir=DIR C header files in DIR [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] - --infodir=DIR info documentation in DIR [PREFIX/info] - --mandir=DIR man documentation in DIR [PREFIX/man] - --srcdir=DIR find the sources in DIR [configure dir or ..] - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM - run sed PROGRAM on installed program names -EOF - cat << EOF -Host type: - --build=BUILD configure for building on BUILD [BUILD=HOST] - --host=HOST configure for HOST [guessed] - --target=TARGET configure for TARGET [TARGET=HOST] -Features and packages: - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --x-includes=DIR X include files are in DIR - --x-libraries=DIR X library files are in DIR -EOF - if test -n "$ac_help"; then - echo "--enable and --with options recognized:$ac_help" - fi - exit 0 ;; + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; -host | --host | --hos | --ho) - ac_prev=host ;; + ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) - host="$ac_optarg" ;; + host_alias=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir="$ac_optarg" ;; + includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir="$ac_optarg" ;; + infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir="$ac_optarg" ;; + libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) - libexecdir="$ac_optarg" ;; + libexecdir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ @@ -222,12 +268,12 @@ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) - localstatedir="$ac_optarg" ;; + localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir="$ac_optarg" ;; + mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. @@ -248,26 +294,26 @@ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir="$ac_optarg" ;; + oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix="$ac_optarg" ;; + prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix="$ac_optarg" ;; + program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix="$ac_optarg" ;; + program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ @@ -284,7 +330,7 @@ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name="$ac_optarg" ;; + program_transform_name=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) @@ -294,7 +340,7 @@ ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) - sbindir="$ac_optarg" ;; + sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ @@ -305,58 +351,57 @@ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) - sharedstatedir="$ac_optarg" ;; + sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) - site="$ac_optarg" ;; + site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir="$ac_optarg" ;; + srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir="$ac_optarg" ;; + sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target ;; + ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target="$ac_optarg" ;; + target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; - -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.13" - exit 0 ;; + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; -with-* | --with-*) - ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` + ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi + expr "x$ac_package" : ".*[^-_$ac_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } ac_package=`echo $ac_package| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac - eval "with_${ac_package}='$ac_optarg'" ;; + eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) - ac_package=`echo $ac_option|sed -e 's/-*without-//'` + ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - eval "with_${ac_package}=no" ;; + expr "x$ac_package" : ".*[^-_$ac_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package | sed 's/-/_/g'` + eval "with_$ac_package=no" ;; --x) # Obsolete; use --with-x. @@ -367,98 +412,89 @@ ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes="$ac_optarg" ;; + x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries="$ac_optarg" ;; + x_libraries=$ac_optarg ;; - -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } + -*) { echo "$as_me: error: unrecognized option: $ac_option +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } ;; + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + expr "x$ac_envvar" : ".*[^_$ac_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { (exit 1); exit 1; }; } + ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` + eval "$ac_envvar='$ac_optarg'" + export $ac_envvar ;; + *) - if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then - echo "configure: warning: $ac_option: invalid host type" 1>&2 - fi - if test "x$nonopt" != xNONE; then - { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } - fi - nonopt="$ac_option" + # FIXME: should be removed in autoconf 3.0. + echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$ac_cr_alnum]" >/dev/null && + echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then - { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } -fi - -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 + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + { echo "$as_me: error: missing argument to $ac_option" >&2 + { (exit 1); exit 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 +# Be sure to have absolute paths. +for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ + localstatedir libdir includedir oldincludedir infodir mandir \ + exec_prefix prefix 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" ;; + eval ac_val=$`echo $ac_var` + case $ac_val in + [\\/$]* | ?:[\\/]* ) ;; + NONE ) ;; + *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; 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 +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: should be removed in autoconf 3.0. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used." >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +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 +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- -# 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/roff/groff/groff.cc +test "$silent" = yes && exec 6>/dev/null # 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%/[^/][^/]*$%%'` + 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 @@ -469,13 +505,305 @@ 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; } + { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2 + { (exit 1); exit 1; }; } else - { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } + { echo "$as_me: error: cannot find sources in $srcdir" >&2 + { (exit 1); exit 1; }; } fi fi -srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` +srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` +ac_env_build_alias_set=${build_alias+set} +ac_env_build_alias_value=$build_alias +ac_cv_env_build_alias_set=${build_alias+set} +ac_cv_env_build_alias_value=$build_alias +ac_env_host_alias_set=${host_alias+set} +ac_env_host_alias_value=$host_alias +ac_cv_env_host_alias_set=${host_alias+set} +ac_cv_env_host_alias_value=$host_alias +ac_env_target_alias_set=${target_alias+set} +ac_env_target_alias_value=$target_alias +ac_cv_env_target_alias_set=${target_alias+set} +ac_cv_env_target_alias_value=$target_alias +ac_env_CC_set=${CC+set} +ac_env_CC_value=$CC +ac_cv_env_CC_set=${CC+set} +ac_cv_env_CC_value=$CC +ac_env_CFLAGS_set=${CFLAGS+set} +ac_env_CFLAGS_value=$CFLAGS +ac_cv_env_CFLAGS_set=${CFLAGS+set} +ac_cv_env_CFLAGS_value=$CFLAGS +ac_env_LDFLAGS_set=${LDFLAGS+set} +ac_env_LDFLAGS_value=$LDFLAGS +ac_cv_env_LDFLAGS_set=${LDFLAGS+set} +ac_cv_env_LDFLAGS_value=$LDFLAGS +ac_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_env_CPPFLAGS_value=$CPPFLAGS +ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_cv_env_CPPFLAGS_value=$CPPFLAGS +ac_env_CXX_set=${CXX+set} +ac_env_CXX_value=$CXX +ac_cv_env_CXX_set=${CXX+set} +ac_cv_env_CXX_value=$CXX +ac_env_CXXFLAGS_set=${CXXFLAGS+set} +ac_env_CXXFLAGS_value=$CXXFLAGS +ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set} +ac_cv_env_CXXFLAGS_value=$CXXFLAGS +ac_env_CPP_set=${CPP+set} +ac_env_CPP_value=$CPP +ac_cv_env_CPP_set=${CPP+set} +ac_cv_env_CPP_value=$CPP +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat < if you have libraries in a + nonstandard directory + CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have + headers in a nonstandard directory + CXX C++ compiler command + CXXFLAGS C++ compiler flags + CPP C preprocessor + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +EOF +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + ac_popdir=`pwd` + for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue + cd $ac_subdir + # A "../" for each directory in /$ac_subdir. + ac_dots=`echo $ac_subdir | + sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'` + + case $srcdir in + .) # No --srcdir option. We are building in place. + ac_sub_srcdir=$srcdir ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_sub_srcdir=$srcdir/$ac_subdir ;; + *) # Relative path. + ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;; + esac + + # Check for guested configure; otherwise get Cygnus style configure. + if test -f $ac_sub_srcdir/configure.gnu; then + echo + $SHELL $ac_sub_srcdir/configure.gnu --help=recursive + elif test -f $ac_sub_srcdir/configure; then + echo + $SHELL $ac_sub_srcdir/configure --help=recursive + elif test -f $ac_sub_srcdir/configure.ac || + test -f $ac_sub_srcdir/configure.in; then + echo + $ac_configure --help + else + echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2 + fi + cd $ac_popdir + done +fi + +test -n "$ac_init_help" && exit 0 +if $ac_init_version; then + cat <<\EOF + +Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 +Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +EOF + exit 0 +fi +exec 5>config.log +cat >&5 </dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +hostinfo = `(hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +PATH = $PATH + +_ASUNAME +} >&5 + +cat >&5 <\?\"\']*) + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` + ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" + ac_sep=" " ;; + *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg" + ac_sep=" " ;; + esac + # Get rid of the leading space. +done + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + echo >&5 + echo "## ----------------- ##" >&5 + echo "## Cache variables. ##" >&5 + echo "## ----------------- ##" >&5 + echo >&5 + # The following way of writing the cache mishandles newlines in values, +{ + (set) 2>&1 | + case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in + *ac_space=\ *) + sed -n \ + "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; + s/^\\([_$ac_cr_alnum]*_cv_[_$ac_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" + ;; + *) + sed -n \ + "s/^\\([_$ac_cr_alnum]*_cv_[_$ac_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + ;; + esac; +} >&5 + sed "/^$/d" confdefs.h >conftest.log + if test -s conftest.log; then + echo >&5 + echo "## ------------ ##" >&5 + echo "## confdefs.h. ##" >&5 + echo "## ------------ ##" >&5 + echo >&5 + cat conftest.log >&5 + fi + (echo; echo) >&5 + test "$ac_signal" != 0 && + echo "$as_me: caught signal $ac_signal" >&5 + echo "$as_me: exit $exit_status" >&5 + rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files && + exit $exit_status + ' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_status=$?; ac_signal='$ac_signal'; { (exit $ac_status); exit $ac_status; }' $ac_signal +done +ac_signal=0 + +# 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 + +# Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then @@ -486,253 +814,645 @@ fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then - echo "loading site script $ac_site_file" + { echo "$as_me:817: loading site script $ac_site_file" >&5 +echo "$as_me: loading site script $ac_site_file" >&6;} + cat "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then - echo "loading cache $cache_file" - . $cache_file + # Some versions of bash will fail to source /dev/null (special + # files actually), so we avoid doing that. + if test -f "$cache_file"; then + { echo "$as_me:828: loading cache $cache_file" >&5 +echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . $cache_file;; + *) . ./$cache_file;; + esac + fi else - echo "creating cache $cache_file" - > $cache_file + { echo "$as_me:836: creating cache $cache_file" >&5 +echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_suggest_removing_cache=false +for ac_var in `(set) 2>&1 | + sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val="\$ac_cv_env_${ac_var}_value" + eval ac_new_val="\$ac_env_${ac_var}_value" + case $ac_old_set,$ac_new_set in + set,) + { echo "$as_me:852: WARNING: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +echo "$as_me: WARNING: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_suggest_removing_cache=: ;; + ,set) + { echo "$as_me:856: WARNING: \`$ac_var' was not set in the previous run" >&5 +echo "$as_me: WARNING: \`$ac_var' was not set in the previous run" >&2;} + ac_suggest_removing_cache=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + { echo "$as_me:862: WARNING: \`$ac_var' has changed since the previous run:" >&5 +echo "$as_me: WARNING: \`$ac_var' has changed since the previous run:" >&2;} + { echo "$as_me:864: WARNING: former value: $ac_old_val" >&5 +echo "$as_me: WARNING: former value: $ac_old_val" >&2;} + { echo "$as_me:866: WARNING: current value: $ac_new_val" >&5 +echo "$as_me: WARNING: current value: $ac_new_val" >&2;} + ac_suggest_removing_cache=: + fi;; + esac +done +if $ac_suggest_removing_cache; then + { echo "$as_me:873: WARNING: changes in the environment can compromise the build" >&5 +echo "$as_me: WARNING: changes in the environment can compromise the build" >&2;} + { echo "$as_me:875: WARNING: consider removing $cache_file and starting over" >&5 +echo "$as_me: WARNING: consider removing $cache_file and starting over" >&2;} fi ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -ac_exeext= -ac_objext=o -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 +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac +echo "#! $SHELL" >conftest.sh +echo "exit 0" >>conftest.sh +chmod +x conftest.sh +if { (echo "$as_me:894: PATH=\".;.\"; conftest.sh") >&5 + (PATH=".;."; conftest.sh) 2>&5 + ac_status=$? + echo "$as_me:897: \$? = $ac_status" >&5 + (exit $ac_status); }; then + ac_path_separator=';' else - ac_n= ac_c='\c' ac_t= + ac_path_separator=: fi - +PATH_SEPARATOR="$ac_path_separator" +rm -f conftest.sh ac_srcdir_defaulted=no srcdir=`cd $srcdir; pwd` top_builddir=`pwd` -# Extract the first word of "gcc", so it can be a program name with args. +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +echo "$as_me:918: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + $as_executable_p "$ac_dir/$ac_word" || continue +ac_cv_prog_CC="${ac_tool_prefix}gcc" +echo "$as_me:933: found $ac_dir/$ac_word" >&5 +break +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:941: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:944: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_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:532: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:953: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + $as_executable_p "$ac_dir/$ac_word" || continue +ac_cv_prog_ac_ct_CC="gcc" +echo "$as_me:968: found $ac_dir/$ac_word" >&5 +break +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:976: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:979: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +echo "$as_me:992: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; 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" + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + $as_executable_p "$ac_dir/$ac_word" || continue +ac_cv_prog_CC="${ac_tool_prefix}cc" +echo "$as_me:1007: found $ac_dir/$ac_word" >&5 +break +done + fi fi -CC="$ac_cv_prog_CC" +CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 + echo "$as_me:1015: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:1018: result: no" >&5 +echo "${ECHO_T}no" >&6 fi +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo "$as_me:1027: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + $as_executable_p "$ac_dir/$ac_word" || continue +ac_cv_prog_ac_ct_CC="cc" +echo "$as_me:1042: found $ac_dir/$ac_word" >&5 +break +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:1050: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:1053: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" +fi + +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:562: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:1066: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_prog_rejected=no - ac_dummy="$PATH" - for ac_dir in $ac_dummy; 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" + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + $as_executable_p "$ac_dir/$ac_word" || continue +if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue +fi +ac_cv_prog_CC="cc" +echo "$as_me:1086: found $ac_dir/$ac_word" >&5 +break +done + 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 + if test $# != 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" "$@" + set dummy "$ac_dir/$ac_word" ${1+"$@"} shift ac_cv_prog_CC="$@" fi fi fi fi -CC="$ac_cv_prog_CC" +CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 + echo "$as_me:1108: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:1111: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - if test -z "$CC"; then - case "`uname -s`" in - *win32* | *WIN32*) - # Extract the first word of "cl", so it can be a program name with args. -set dummy cl; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:613: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +echo "$as_me:1122: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="cl" - break - fi - done - IFS="$ac_save_ifs" + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + $as_executable_p "$ac_dir/$ac_word" || continue +ac_cv_prog_CC="$ac_tool_prefix$ac_prog" +echo "$as_me:1137: found $ac_dir/$ac_word" >&5 +break +done + fi fi -CC="$ac_cv_prog_CC" +CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 + echo "$as_me:1145: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:1148: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - ;; - esac - fi - test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } + + test -n "$CC" && break + done fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl +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 "$as_me:1161: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + $as_executable_p "$ac_dir/$ac_word" || continue +ac_cv_prog_ac_ct_CC="$ac_prog" +echo "$as_me:1176: found $ac_dir/$ac_word" >&5 +break +done -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:645: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:1184: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:1187: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross + test -n "$ac_ct_CC" && break +done + + CC=$ac_ct_CC +fi + +fi -cat > conftest.$ac_ext << EOF +test -z "$CC" && { { echo "$as_me:1199: error: no acceptable cc found in \$PATH" >&5 +echo "$as_me: error: no acceptable cc found in \$PATH" >&2;} + { (exit 1); exit 1; }; } -#line 656 "configure" +cat >conftest.$ac_ext <<_ACEOF +#line 1204 "configure" #include "confdefs.h" -main(){return(0);} -EOF -if { (eval echo configure:661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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 +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.exe" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compiler, and finding out an intuition +# of exeext. +echo "$as_me:1220: checking for C compiler default output" >&5 +echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6 +ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +if { (eval echo "$as_me:1223: \"$ac_link_default\"") >&5 + (eval $ac_link_default) 2>&5 + ac_status=$? + echo "$as_me:1226: \$? = $ac_status" >&5 + (exit $ac_status); }; then + for ac_file in `ls a.exe conftest.exe a.* conftest conftest.* 2>/dev/null`; do + case $ac_file in + *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;; + a.out ) # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + export ac_cv_exeext + break;; + * ) break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +{ { echo "$as_me:1243: error: C compiler cannot create executables" >&5 +echo "$as_me: error: C compiler cannot create executables" >&2;} + { (exit 77); exit 77; }; } +fi + +ac_exeext=$ac_cv_exeext +echo "$as_me:1249: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6 + +# Check the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +echo "$as_me:1254: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 +# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 +# If not cross compiling, check that we can run a simple program. +if test "$cross_compiling" != yes; then + if { ac_try='./$ac_file' + { (eval echo "$as_me:1260: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:1263: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + cross_compiling=no else - ac_cv_prog_cc_cross=yes + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { echo "$as_me:1270: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'." >&5 +echo "$as_me: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'." >&2;} + { (exit 1); exit 1; }; } + fi fi -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_cv_prog_cc_works=no fi -rm -fr conftest* -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross +echo "$as_me:1278: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -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:687: 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:692: checking whether we are using GNU C" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +rm -f a.out a.exe conftest$ac_cv_exeext +ac_clean_files=$ac_clean_files_save +# Check the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +echo "$as_me:1285: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 +echo "$as_me:1287: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6 + +echo "$as_me:1290: checking for executable suffix" >&5 +echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6 +if { (eval echo "$as_me:1292: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:1295: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do + case $ac_file in + *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + export ac_cv_exeext + break;; + * ) break;; + esac +done else - cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - ac_cv_prog_gcc=yes + { { echo "$as_me:1311: error: cannot compute EXEEXT: cannot compile and link" >&5 +echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest$ac_cv_exeext +echo "$as_me:1317: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6 + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +echo "$as_me:1323: checking for object suffix" >&5 +echo $ECHO_N "checking for object suffix... $ECHO_C" >&6 +if test "${ac_cv_objext+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_prog_gcc=no -fi -fi + cat >conftest.$ac_ext <<_ACEOF +#line 1329 "configure" +#include "confdefs.h" -echo "$ac_t""$ac_cv_prog_gcc" 1>&6 +int +main () +{ -if test $ac_cv_prog_gcc = yes; then - GCC=yes + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { (eval echo "$as_me:1341: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:1344: \$? = $ac_status" >&5 + (exit $ac_status); }; then + for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done else - GCC= -fi + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +{ { echo "$as_me:1356: error: cannot compute OBJEXT: cannot compile" >&5 +echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +echo "$as_me:1363: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6 +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +echo "$as_me:1367: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 +if test "${ac_cv_c_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 1373 "configure" +#include "confdefs.h" -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:720: checking whether ${CC-cc} accepts -g" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:1388: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:1391: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:1394: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:1397: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_compiler_gnu=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +echo "$as_me:1409: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 +GCC=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +CFLAGS="-g" +echo "$as_me:1415: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - echo 'void f(){}' > conftest.c -if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then + cat >conftest.$ac_ext <<_ACEOF +#line 1421 "configure" +#include "confdefs.h" + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:1433: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:1436: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:1439: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:1442: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else - ac_cv_prog_cc_g=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_prog_cc_g=no fi -rm -f conftest* - +rm -f conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 +echo "$as_me:1452: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then - CFLAGS="$ac_save_CFLAGS" + CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" @@ -746,136 +1466,289 @@ CFLAGS= fi fi - -for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl +# Some people use a C++ compiler to compile C. Since we use `exit', +# in C++ we need to declare it. In case someone uses the same compiler +# for both compiling C and C++ we need to have the C++ compiler decide +# the declaration of exit, since it's the most demanding environment. +cat >conftest.$ac_ext <<_ACEOF +#ifndef __cplusplus + choke me +#endif +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:1479: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:1482: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:1485: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:1488: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + for ac_declaration in \ + ''\ + '#include ' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ + 'void exit (int);' 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:756: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + cat >conftest.$ac_ext <<_ACEOF +#line 1500 "configure" +#include "confdefs.h" +#include +$ac_declaration +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:1513: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:1516: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:1519: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:1522: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +continue +fi +rm -f conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +#line 1532 "configure" +#include "confdefs.h" +$ac_declaration +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:1544: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:1547: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:1550: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:1553: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest.$ac_ext +done +echo '#ifdef __cplusplus' >>confdefs.h +echo $ac_declaration >>confdefs.h +echo '#endif' >>confdefs.h + +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest.$ac_ext +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +if test -n "$ac_tool_prefix"; then + for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl KCC RCC xlC_r xlC + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +echo "$as_me:1587: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CXX="$ac_prog" - break - fi - done - IFS="$ac_save_ifs" + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + $as_executable_p "$ac_dir/$ac_word" || continue +ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" +echo "$as_me:1602: found $ac_dir/$ac_word" >&5 +break +done + fi fi -CXX="$ac_cv_prog_CXX" +CXX=$ac_cv_prog_CXX if test -n "$CXX"; then - echo "$ac_t""$CXX" 1>&6 + echo "$as_me:1610: result: $CXX" >&5 +echo "${ECHO_T}$CXX" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:1613: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -test -n "$CXX" && break + test -n "$CXX" && break + done +fi +if test -z "$CXX"; then + ac_ct_CXX=$CXX + for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl KCC RCC xlC_r xlC +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 "$as_me:1626: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CXX"; then + ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. +else + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + $as_executable_p "$ac_dir/$ac_word" || continue +ac_cv_prog_ac_ct_CXX="$ac_prog" +echo "$as_me:1641: found $ac_dir/$ac_word" >&5 +break done -test -n "$CXX" || CXX="gcc" - - -echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:788: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 -ac_ext=C -# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cxx_cross - -cat > conftest.$ac_ext << EOF - -#line 799 "configure" -#include "confdefs.h" - -int main(){return(0);} -EOF -if { (eval echo configure:804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - ac_cv_prog_cxx_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_cxx_cross=no - else - ac_cv_prog_cxx_cross=yes - fi +fi +fi +ac_ct_CXX=$ac_cv_prog_ac_ct_CXX +if test -n "$ac_ct_CXX"; then + echo "$as_me:1649: result: $ac_ct_CXX" >&5 +echo "${ECHO_T}$ac_ct_CXX" >&6 else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_cv_prog_cxx_works=no + echo "$as_me:1652: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -fr conftest* -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross -echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6 -if test $ac_cv_prog_cxx_works = no; then - { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; } + test -n "$ac_ct_CXX" && break +done +test -n "$ac_ct_CXX" || ac_ct_CXX="g++" + + CXX=$ac_ct_CXX fi -echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:830: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 -echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 -cross_compiling=$ac_cv_prog_cxx_cross -echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 -echo "configure:835: checking whether we are using GNU C++" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:1663: checking whether we are using the GNU C++ compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6 +if test "${ac_cv_cxx_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.C <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - ac_cv_prog_gxx=yes -else - ac_cv_prog_gxx=no -fi -fi + cat >conftest.$ac_ext <<_ACEOF +#line 1669 "configure" +#include "confdefs.h" -echo "$ac_t""$ac_cv_prog_gxx" 1>&6 +int +main () +{ +#ifndef __GNUC__ + choke me +#endif -if test $ac_cv_prog_gxx = yes; then - GXX=yes + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:1684: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:1687: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:1690: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:1693: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_compiler_gnu=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +ac_cv_cxx_compiler_gnu=$ac_compiler_gnu + +fi +echo "$as_me:1705: result: $ac_cv_cxx_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6 +GXX=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CXXFLAGS=${CXXFLAGS+set} +ac_save_CXXFLAGS=$CXXFLAGS +CXXFLAGS="-g" +echo "$as_me:1711: checking whether $CXX accepts -g" >&5 +echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6 +if test "${ac_cv_prog_cxx_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - GXX= -fi + cat >conftest.$ac_ext <<_ACEOF +#line 1717 "configure" +#include "confdefs.h" -ac_test_CXXFLAGS="${CXXFLAGS+set}" -ac_save_CXXFLAGS="$CXXFLAGS" -CXXFLAGS= -echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 -echo "configure:863: checking whether ${CXX-g++} accepts -g" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - echo 'void f(){}' > conftest.cc -if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:1729: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:1732: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:1735: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:1738: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_prog_cxx_g=yes else - ac_cv_prog_cxx_g=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_prog_cxx_g=no fi -rm -f conftest* - +rm -f conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6 +echo "$as_me:1748: result: $ac_cv_prog_cxx_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6 if test "$ac_test_CXXFLAGS" = set; then - CXXFLAGS="$ac_save_CXXFLAGS" + CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" @@ -889,56 +1762,140 @@ CXXFLAGS= fi fi +for ac_declaration in \ + ''\ + '#include ' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ + 'void exit (int);' +do + cat >conftest.$ac_ext <<_ACEOF +#line 1775 "configure" +#include "confdefs.h" +#include +$ac_declaration +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:1788: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:1791: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:1794: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:1797: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +continue +fi +rm -f conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +#line 1807 "configure" +#include "confdefs.h" +$ac_declaration +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:1819: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:1822: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:1825: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:1828: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest.$ac_ext +done +echo '#ifdef __cplusplus' >>confdefs.h +echo $ac_declaration >>confdefs.h +echo '#endif' >>confdefs.h +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu - -ac_ext=C -# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cxx_cross +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test "$cross_compiling" = no; then - echo $ac_n "checking that C++ compiler can compile simple program""... $ac_c" 1>&6 -echo "configure:905: checking that C++ compiler can compile simple program" >&5 + echo "$as_me:1854: checking that C++ compiler can compile simple program" >&5 +echo $ECHO_N "checking that C++ compiler can compile simple program... $ECHO_C" >&6 fi if test "$cross_compiling" = yes; then : else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 1861 "configure" #include "confdefs.h" -#ifdef __cplusplus -extern "C" void exit(int); -#endif int main() { return 0; } -EOF -if { (eval echo configure:918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - echo "$ac_t""yes" 1>&6 -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - echo "$ac_t""no" 1>&6;{ echo "configure: error: a working C++ compiler is required" 1>&2; exit 1; } +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:1866: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:1869: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:1871: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:1874: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + echo "$as_me:1876: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +echo "$as_me:1882: result: no" >&5 +echo "${ECHO_T}no" >&6;{ { echo "$as_me:1883: error: a working C++ compiler is required" >&5 +echo "$as_me: error: a working C++ compiler is required" >&2;} + { (exit 1); exit 1; }; } fi -rm -fr conftest* +rm -f core core.* *.core conftest$ac_exeext conftest.$ac_ext fi - if test "$cross_compiling" = no; then - echo $ac_n "checking that C++ static constructors and destructors are called""... $ac_c" 1>&6 -echo "configure:932: checking that C++ static constructors and destructors are called" >&5 + echo "$as_me:1890: checking that C++ static constructors and destructors are called" >&5 +echo $ECHO_N "checking that C++ static constructors and destructors are called... $ECHO_C" >&6 fi if test "$cross_compiling" = yes; then : else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 1897 "configure" #include "confdefs.h" -#ifdef __cplusplus -extern "C" void exit(int); -#endif extern "C" { void _exit(int); @@ -952,160 +1909,209 @@ A a; int main() { return 1; } -EOF -if { (eval echo configure:957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - echo "$ac_t""yes" 1>&6 -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - echo "$ac_t""no" 1>&6;{ echo "configure: error: a working C++ compiler is required" 1>&2; exit 1; } -fi -rm -fr conftest* -fi - -echo $ac_n "checking that header files support C++""... $ac_c" 1>&6 -echo "configure:970: checking that header files support C++" >&5 -cat > conftest.$ac_ext <&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:1917: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:1919: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:1922: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + echo "$as_me:1924: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +echo "$as_me:1930: result: no" >&5 +echo "${ECHO_T}no" >&6;{ { echo "$as_me:1931: error: a working C++ compiler is required" >&5 +echo "$as_me: error: a working C++ compiler is required" >&2;} + { (exit 1); exit 1; }; } +fi +rm -f core core.* *.core conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:1937: checking that header files support C++" >&5 +echo $ECHO_N "checking that header files support C++... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line 1940 "configure" #include "confdefs.h" #include -int main() { +int +main () +{ fopen(0, 0); -; return 0; } -EOF -if { (eval echo configure:979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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;{ echo "configure: error: header files do not support C++ (if you are using a version of gcc/g++ earlier than 2.5, you should install libg++)" 1>&2; exit 1; } + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:1952: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:1955: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:1958: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:1961: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + echo "$as_me:1963: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +echo "$as_me:1968: result: no" >&5 +echo "${ECHO_T}no" >&6;{ { echo "$as_me:1969: error: header files do not support C++ (if you are using a version of gcc/g++ earlier than 2.5, you should install libg++)" >&5 +echo "$as_me: error: header files do not support C++ (if you are using a version of gcc/g++ earlier than 2.5, you should install libg++)" >&2;} + { (exit 1); exit 1; }; } fi -rm -f conftest* +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -echo $ac_n "checking whether character set is EBCDIC""... $ac_c" 1>&6 -echo "configure:997: checking whether character set is EBCDIC" >&5 -cat > conftest.$ac_ext <&5 +echo $ECHO_N "checking whether character set is EBCDIC... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line 1983 "configure" #include "confdefs.h" -int main() { +int +main () +{ /* Treat any failure as ASCII for compatibility with existing art. Use compile-time rather than run-time tests for cross-compiler tolerance. */ #if '0' != 240 make an error "Character set is not EBCDIC" #endif -; return 0; } -EOF -if { (eval echo configure:1011: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:2000: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:2003: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:2006: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:2009: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then groff_cv_ebcdic="yes" TTYDEVDIRS="font/devcp1047" - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF + echo "$as_me:2013: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + cat >>confdefs.h <<\EOF #define IS_EBCDIC_HOST 1 EOF else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - groff_cv_ebcdic="no" + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +groff_cv_ebcdic="no" TTYDEVDIRS="font/devascii font/devlatin1 font/devutf8" - echo "$ac_t""no" 1>&6 + echo "$as_me:2024: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext -groff_cv_os390="no" if test "$groff_cv_ebcdic" = "yes"; then - echo $ac_n "checking for OS/390 Unix""... $ac_c" 1>&6 -echo "configure:1033: checking for OS/390 Unix" >&5 + echo "$as_me:2030: checking for OS/390 Unix" >&5 +echo $ECHO_N "checking for OS/390 Unix... $ECHO_C" >&6 case `uname` in OS/390) CFLAGS="$CFLAGS -D_ALL_SOURCE" - groff_cv_os390="yes" - echo "$ac_t""yes" 1>&6 ;; + echo "$as_me:2035: result: yes" >&5 +echo "${ECHO_T}yes" >&6 ;; *) - echo "$ac_t""no" 1>&6 ;; + echo "$as_me:2038: result: no" >&5 +echo "${ECHO_T}no" >&6 ;; esac fi if test -z "$PSPRINT"; then for ac_prog in lpr do -# Extract the first word of "$ac_prog", so it can be a program name with args. + # 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:1049: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_LPR'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:2047: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_LPR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$LPR"; then ac_cv_prog_LPR="$LPR" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_LPR="$ac_prog" - break - fi - done - IFS="$ac_save_ifs" + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + $as_executable_p "$ac_dir/$ac_word" || continue +ac_cv_prog_LPR="$ac_prog" +echo "$as_me:2062: found $ac_dir/$ac_word" >&5 +break +done + fi fi -LPR="$ac_cv_prog_LPR" +LPR=$ac_cv_prog_LPR if test -n "$LPR"; then - echo "$ac_t""$LPR" 1>&6 + echo "$as_me:2070: result: $LPR" >&5 +echo "${ECHO_T}$LPR" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:2073: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -test -n "$LPR" && break + test -n "$LPR" && break done for ac_prog in lp do -# Extract the first word of "$ac_prog", so it can be a program name with args. + # 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:1083: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_LP'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:2084: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_LP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$LP"; then ac_cv_prog_LP="$LP" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_LP="$ac_prog" - break - fi - done - IFS="$ac_save_ifs" + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + $as_executable_p "$ac_dir/$ac_word" || continue +ac_cv_prog_LP="$ac_prog" +echo "$as_me:2099: found $ac_dir/$ac_word" >&5 +break +done + fi fi -LP="$ac_cv_prog_LP" +LP=$ac_cv_prog_LP if test -n "$LP"; then - echo "$ac_t""$LP" 1>&6 + echo "$as_me:2107: result: $LP" >&5 +echo "${ECHO_T}$LP" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:2110: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -test -n "$LP" && break + test -n "$LP" && break done if test -n "$LPR" && test -n "$LP"; then @@ -1114,36 +2120,39 @@ # rather than lpr. for ac_prog in lpq do -# Extract the first word of "$ac_prog", so it can be a program name with args. + # 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:1121: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_LPQ'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:2125: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_LPQ+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$LPQ"; then ac_cv_prog_LPQ="$LPQ" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_LPQ="$ac_prog" - break - fi - done - IFS="$ac_save_ifs" + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + $as_executable_p "$ac_dir/$ac_word" || continue +ac_cv_prog_LPQ="$ac_prog" +echo "$as_me:2140: found $ac_dir/$ac_word" >&5 +break +done + fi fi -LPQ="$ac_cv_prog_LPQ" +LPQ=$ac_cv_prog_LPQ if test -n "$LPQ"; then - echo "$ac_t""$LPQ" 1>&6 + echo "$as_me:2148: result: $LPQ" >&5 +echo "${ECHO_T}$LPQ" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:2151: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -test -n "$LPQ" && break + test -n "$LPQ" && break done test -n "$LPQ" || LPR= @@ -1155,12 +2164,13 @@ fi fi -echo $ac_n "checking for command to use for printing PostScript files""... $ac_c" 1>&6 -echo "configure:1160: checking for command to use for printing PostScript files" >&5 -echo "$ac_t""$PSPRINT" 1>&6 +echo "$as_me:2167: checking for command to use for printing PostScript files" >&5 +echo $ECHO_N "checking for command to use for printing PostScript files... $ECHO_C" >&6 +echo "$as_me:2169: result: $PSPRINT" >&5 +echo "${ECHO_T}$PSPRINT" >&6 # Figure out DVIPRINT from PSPRINT. -echo $ac_n "checking for command to use for printing dvi files""... $ac_c" 1>&6 -echo "configure:1164: checking for command to use for printing dvi files" >&5 +echo "$as_me:2172: checking for command to use for printing dvi files" >&5 +echo $ECHO_N "checking for command to use for printing dvi files... $ECHO_C" >&6 if test -n "$PSPRINT" && test -z "$DVIPRINT"; then if test "X$PSPRINT" = "Xlpr"; then DVIPRINT="lpr -d" @@ -1169,106 +2179,156 @@ fi fi -echo "$ac_t""$DVIPRINT" 1>&6 +echo "$as_me:2182: result: $DVIPRINT" >&5 +echo "${ECHO_T}$DVIPRINT" >&6 # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1177: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_PERLPATH'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:2186: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_PERLPATH+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - case "$PERLPATH" in - /*) + case $PERLPATH in + [\\/]* | ?:[\\/]*) ac_cv_path_PERLPATH="$PERLPATH" # Let the user override the test with a path. ;; - ?:/*) - ac_cv_path_PERLPATH="$PERLPATH" # Let the user override the test with a dos path. - ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_PERLPATH="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + if $as_executable_p "$ac_dir/$ac_word"; then + ac_cv_path_PERLPATH="$ac_dir/$ac_word" + echo "$as_me:2203: found $ac_dir/$ac_word" >&5 + break +fi +done + test -z "$ac_cv_path_PERLPATH" && ac_cv_path_PERLPATH="/usr/bin/perl" ;; esac fi -PERLPATH="$ac_cv_path_PERLPATH" +PERLPATH=$ac_cv_path_PERLPATH + if test -n "$PERLPATH"; then - echo "$ac_t""$PERLPATH" 1>&6 + echo "$as_me:2215: result: $PERLPATH" >&5 +echo "${ECHO_T}$PERLPATH" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:2218: result: no" >&5 +echo "${ECHO_T}no" >&6 fi for ac_prog in byacc 'bison -y' do -# Extract the first word of "$ac_prog", so it can be a program name with args. + # 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:1215: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:2226: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_YACC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$YACC"; then ac_cv_prog_YACC="$YACC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; 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" + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + $as_executable_p "$ac_dir/$ac_word" || continue +ac_cv_prog_YACC="$ac_prog" +echo "$as_me:2241: found $ac_dir/$ac_word" >&5 +break +done + fi fi -YACC="$ac_cv_prog_YACC" +YACC=$ac_cv_prog_YACC if test -n "$YACC"; then - echo "$ac_t""$YACC" 1>&6 + echo "$as_me:2249: result: $YACC" >&5 +echo "${ECHO_T}$YACC" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:2252: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -test -n "$YACC" && break + test -n "$YACC" && break done test -n "$YACC" || YACC="yacc" -# 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:1248: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +echo "$as_me:2263: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; 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=":" + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + $as_executable_p "$ac_dir/$ac_word" || continue +ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" +echo "$as_me:2278: found $ac_dir/$ac_word" >&5 +break +done + fi fi -RANLIB="$ac_cv_prog_RANLIB" +RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - echo "$ac_t""$RANLIB" 1>&6 + echo "$as_me:2286: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6 +else + echo "$as_me:2289: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +echo "$as_me:2298: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + $as_executable_p "$ac_dir/$ac_word" || continue +ac_cv_prog_ac_ct_RANLIB="ranlib" +echo "$as_me:2313: found $ac_dir/$ac_word" >&5 +break +done + + test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + echo "$as_me:2322: result: $ac_ct_RANLIB" >&5 +echo "${ECHO_T}$ac_ct_RANLIB" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:2325: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + RANLIB=$ac_ct_RANLIB +else + RANLIB="$ac_cv_prog_RANLIB" fi ac_aux_dir= @@ -1281,14 +2341,20 @@ ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break + elif test -f $ac_dir/shtool; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -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. + { { echo "$as_me:2351: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 +echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} + { (exit 1); exit 1; }; } +fi +ac_config_guess="$SHELL $ac_aux_dir/config.guess" +ac_config_sub="$SHELL $ac_aux_dir/config.sub" +ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. ac_dir=`cd $ac_aux_dir; pwd` ac_install_sh="$ac_dir/install-sh -c" @@ -1299,31 +2365,39 @@ # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # 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:1308: checking for a BSD compatible install" >&5 +echo "$as_me:2373: checking for a BSD compatible install" >&5 +echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then -if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +if test "${ac_cv_path_install+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" + ac_save_IFS=$IFS; IFS=$ac_path_separator for ac_dir in $PATH; do + IFS=$ac_save_IFS # 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/*) ;; + case $ac_dir/ in + / | ./ | .// | /cC/* \ + | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \ + | /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do - if test -f $ac_dir/$ac_prog; then + if $as_executable_p "$ac_dir/$ac_prog"; then if test $ac_prog = install && - grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then + grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : + elif test $ac_prog = install && + grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : else ac_cv_path_install="$ac_dir/$ac_prog -c" break 2 @@ -1333,52 +2407,42 @@ ;; esac done - IFS="$ac_save_IFS" fi if test "${ac_cv_path_install+set}" = set; then - INSTALL="$ac_cv_path_install" + 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" + INSTALL=$ac_install_sh fi fi -echo "$ac_t""$INSTALL" 1>&6 +echo "$as_me:2422: result: $INSTALL" >&5 +echo "${ECHO_T}$INSTALL" >&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_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1361: checking whether ln -s works" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - 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 -fi -LN_S="$ac_cv_prog_LN_S" -if test "$ac_cv_prog_LN_S" = "ln -s"; then - echo "$ac_t""yes" 1>&6 +echo "$as_me:2433: checking whether ln -s works" >&5 +echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + echo "$as_me:2437: result: yes" >&5 +echo "${ECHO_T}yes" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:2440: result: no, using $LN_S" >&5 +echo "${ECHO_T}no, using $LN_S" >&6 fi -echo $ac_n "checking for csh hash hack""... $ac_c" 1>&6 -echo "configure:1382: checking for csh hash hack" >&5 +echo "$as_me:2444: checking for csh hash hack" >&5 +echo $ECHO_N "checking for csh hash hack... $ECHO_C" >&6 cat <conftest.sh #!/bin/sh true || exit 0 @@ -1387,248 +2451,404 @@ EOF chmod +x conftest.sh if echo ./conftest.sh | (csh >/dev/null 2>&1) >/dev/null 2>&1; then - echo "$ac_t""yes" 1>&6; SH_SCRIPT_SED_CMD='1s/.*/:/' + echo "$as_me:2454: result: yes" >&5 +echo "${ECHO_T}yes" >&6; SH_SCRIPT_SED_CMD='1s/.*/:/' else - echo "$ac_t""no" 1>&6; SH_SCRIPT_SED_CMD='1s/a/a/' + echo "$as_me:2457: result: no" >&5 +echo "${ECHO_T}no" >&6; SH_SCRIPT_SED_CMD='1s/a/a/' fi rm -f conftest.sh -echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1398: checking how to run the C preprocessor" >&5 +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +echo "$as_me:2467: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then -if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + if test "${ac_cv_prog_CPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - # 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" + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + # break 2 since there is a loop in there. + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 2489 "configure" #include "confdefs.h" #include -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1419: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then + Syntax error +_ACEOF +if { (eval echo "$as_me:2494: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:2500: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then : else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP="${CC-cc} -E -traditional-cpp" - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 2523 "configure" #include "confdefs.h" -#include -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1436: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : +#include +_ACEOF +if { (eval echo "$as_me:2527: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:2533: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP="${CC-cc} -nologo -E" - cat > conftest.$ac_ext <&5 +echo "${ECHO_T}$CPP" >&6 +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +#line 2580 "configure" #include "confdefs.h" #include -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1453: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then + Syntax error +_ACEOF +if { (eval echo "$as_me:2585: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:2591: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then : else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP=/lib/cpp -fi -rm -f conftest* + # Broken: fails on valid input. +continue fi -rm -f conftest* +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +#line 2614 "configure" +#include "confdefs.h" +#include +_ACEOF +if { (eval echo "$as_me:2618: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:2624: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes fi -rm -f conftest* - ac_cv_prog_CPP="$CPP" +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + # Passes both tests. +ac_preproc_ok=: +break fi - CPP="$ac_cv_prog_CPP" +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : else - ac_cv_prog_CPP="$CPP" + { { echo "$as_me:2652: error: C preprocessor \"$CPP\" fails sanity check" >&5 +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;} + { (exit 1); exit 1; }; } fi -echo "$ac_t""$CPP" 1>&6 -for ac_hdr in stdlib.h unistd.h dirent.h limits.h sys/dir.h \ +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +for ac_header in stdlib.h unistd.h dirent.h limits.h sys/dir.h \ string.h strings.h math.h do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1482: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1492: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" +ac_ac_Header=`echo "ac_cv_header_$ac_header" | $ac_tr_sh` +echo "$as_me:2667: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$ac_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 2673 "configure" +#include "confdefs.h" +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:2677: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:2683: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + eval "$ac_ac_Header=yes" else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" + eval "$ac_ac_Header=no" fi -rm -f conftest* +rm -f conftest.err conftest.$ac_ext fi -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___%'` - cat >> confdefs.h <&5 +echo "${ECHO_T}`eval echo '${'$ac_ac_Header'}'`" >&6 +if test `eval echo '${'$ac_ac_Header'}'` = yes; then + cat >>confdefs.h <&6 + fi done -echo $ac_n "checking for ISC 3.x or 4.x""... $ac_c" 1>&6 -echo "configure:1519: checking for ISC 3.x or 4.x" >&5 +echo "$as_me:2712: checking for ISC 3.x or 4.x" >&5 +echo $ECHO_N "checking for ISC 3.x or 4.x... $ECHO_C" >&6 if grep '[34]\.' /usr/options/cb.name >/dev/null 2>&1 then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF + echo "$as_me:2716: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + cat >>confdefs.h <<\EOF #define _SYSV3 1 EOF else - echo "$ac_t""no" 1>&6 + echo "$as_me:2723: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -echo $ac_n "checking whether -D_POSIX_SOURCE is necessary""... $ac_c" 1>&6 -echo "configure:1531: checking whether -D_POSIX_SOURCE is necessary" >&5 +echo "$as_me:2726: checking whether -D_POSIX_SOURCE is necessary" >&5 +echo $ECHO_N "checking whether -D_POSIX_SOURCE is necessary... $ECHO_C" >&6 -ac_ext=C -# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cxx_cross +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 2736 "configure" #include "confdefs.h" #include extern "C" { void fileno(int); } -int main() { +int +main () +{ -; return 0; } -EOF -if { (eval echo configure:1549: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6;cat >> confdefs.h <<\EOF + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:2749: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:2752: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:2755: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:2758: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + echo "$as_me:2760: result: yes" >&5 +echo "${ECHO_T}yes" >&6;cat >>confdefs.h <<\EOF #define _POSIX_SOURCE 1 EOF else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "$ac_t""no" 1>&6 + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +echo "$as_me:2768: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu -ac_ext=C -# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cxx_cross - -echo $ac_n "checking for return type of srand""... $ac_c" 1>&6 -echo "configure:1578: checking for return type of srand" >&5 -cat > conftest.$ac_ext <&5 +echo $ECHO_N "checking for return type of srand... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line 2787 "configure" #include "confdefs.h" #include extern "C" { void srand(unsigned int); } -int main() { +int +main () +{ -; return 0; } -EOF -if { (eval echo configure:1588: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""void" 1>&6;cat >> confdefs.h <<\EOF + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:2800: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:2803: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:2806: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:2809: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + echo "$as_me:2811: result: void" >&5 +echo "${ECHO_T}void" >&6;cat >>confdefs.h <<\EOF #define RET_TYPE_SRAND_IS_VOID 1 EOF else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "$ac_t""int" 1>&6 + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +echo "$as_me:2819: result: int" >&5 +echo "${ECHO_T}int" >&6 fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo $ac_n "checking whether hypot must be declared""... $ac_c" 1>&6 -echo "configure:1609: checking whether hypot must be declared" >&5 +echo "$as_me:2829: checking whether hypot must be declared" >&5 +echo $ECHO_N "checking whether hypot must be declared... $ECHO_C" >&6 -ac_ext=C -# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cxx_cross +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if eval "test \"`echo '$''{'groff_cv_decl_needed_hypot'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +if test "${groff_cv_decl_needed_hypot+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 2842 "configure" #include "confdefs.h" #include #ifdef HAVE_STRING_H #include -#else +#endif #ifdef HAVE_STRINGS_H #include #endif -#endif #ifdef HAVE_STDLIB_H #include #endif @@ -1638,61 +2858,72 @@ #ifdef HAVE_MATH_H #include #endif -int main() { +int +main () +{ char *(*pfn) = (char *(*)) hypot -; return 0; } -EOF -if { (eval echo configure:1646: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:2870: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:2873: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:2876: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:2879: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then groff_cv_decl_needed_hypot=no else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - groff_cv_decl_needed_hypot=yes + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +groff_cv_decl_needed_hypot=yes fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$ac_t""$groff_cv_decl_needed_hypot" 1>&6 +echo "$as_me:2890: result: $groff_cv_decl_needed_hypot" >&5 +echo "${ECHO_T}$groff_cv_decl_needed_hypot" >&6 if test $groff_cv_decl_needed_hypot = yes; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\EOF #define NEED_DECLARATION_HYPOT 1 EOF fi ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo $ac_n "checking whether popen must be declared""... $ac_c" 1>&6 -echo "configure:1673: checking whether popen must be declared" >&5 +echo "$as_me:2904: checking whether popen must be declared" >&5 +echo $ECHO_N "checking whether popen must be declared... $ECHO_C" >&6 -ac_ext=C -# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cxx_cross +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if eval "test \"`echo '$''{'groff_cv_decl_needed_popen'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +if test "${groff_cv_decl_needed_popen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 2917 "configure" #include "confdefs.h" #include #ifdef HAVE_STRING_H #include -#else +#endif #ifdef HAVE_STRINGS_H #include #endif -#endif #ifdef HAVE_STDLIB_H #include #endif @@ -1702,61 +2933,72 @@ #ifdef HAVE_MATH_H #include #endif -int main() { +int +main () +{ char *(*pfn) = (char *(*)) popen -; return 0; } -EOF -if { (eval echo configure:1710: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:2945: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:2948: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:2951: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:2954: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then groff_cv_decl_needed_popen=no else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - groff_cv_decl_needed_popen=yes + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +groff_cv_decl_needed_popen=yes fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$ac_t""$groff_cv_decl_needed_popen" 1>&6 +echo "$as_me:2965: result: $groff_cv_decl_needed_popen" >&5 +echo "${ECHO_T}$groff_cv_decl_needed_popen" >&6 if test $groff_cv_decl_needed_popen = yes; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\EOF #define NEED_DECLARATION_POPEN 1 EOF fi ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo $ac_n "checking whether pclose must be declared""... $ac_c" 1>&6 -echo "configure:1737: checking whether pclose must be declared" >&5 +echo "$as_me:2979: checking whether pclose must be declared" >&5 +echo $ECHO_N "checking whether pclose must be declared... $ECHO_C" >&6 -ac_ext=C -# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cxx_cross +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if eval "test \"`echo '$''{'groff_cv_decl_needed_pclose'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +if test "${groff_cv_decl_needed_pclose+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 2992 "configure" #include "confdefs.h" #include #ifdef HAVE_STRING_H #include -#else +#endif #ifdef HAVE_STRINGS_H #include #endif -#endif #ifdef HAVE_STDLIB_H #include #endif @@ -1766,61 +3008,72 @@ #ifdef HAVE_MATH_H #include #endif -int main() { +int +main () +{ char *(*pfn) = (char *(*)) pclose -; return 0; } -EOF -if { (eval echo configure:1774: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:3020: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:3023: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:3026: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:3029: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then groff_cv_decl_needed_pclose=no else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - groff_cv_decl_needed_pclose=yes + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +groff_cv_decl_needed_pclose=yes fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$ac_t""$groff_cv_decl_needed_pclose" 1>&6 +echo "$as_me:3040: result: $groff_cv_decl_needed_pclose" >&5 +echo "${ECHO_T}$groff_cv_decl_needed_pclose" >&6 if test $groff_cv_decl_needed_pclose = yes; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\EOF #define NEED_DECLARATION_PCLOSE 1 EOF fi ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo $ac_n "checking whether putenv must be declared""... $ac_c" 1>&6 -echo "configure:1801: checking whether putenv must be declared" >&5 +echo "$as_me:3054: checking whether putenv must be declared" >&5 +echo $ECHO_N "checking whether putenv must be declared... $ECHO_C" >&6 -ac_ext=C -# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cxx_cross +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if eval "test \"`echo '$''{'groff_cv_decl_needed_putenv'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +if test "${groff_cv_decl_needed_putenv+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 3067 "configure" #include "confdefs.h" #include #ifdef HAVE_STRING_H #include -#else +#endif #ifdef HAVE_STRINGS_H #include #endif -#endif #ifdef HAVE_STDLIB_H #include #endif @@ -1830,61 +3083,72 @@ #ifdef HAVE_MATH_H #include #endif -int main() { +int +main () +{ char *(*pfn) = (char *(*)) putenv -; return 0; } -EOF -if { (eval echo configure:1838: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:3095: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:3098: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:3101: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:3104: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then groff_cv_decl_needed_putenv=no else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - groff_cv_decl_needed_putenv=yes + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +groff_cv_decl_needed_putenv=yes fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$ac_t""$groff_cv_decl_needed_putenv" 1>&6 +echo "$as_me:3115: result: $groff_cv_decl_needed_putenv" >&5 +echo "${ECHO_T}$groff_cv_decl_needed_putenv" >&6 if test $groff_cv_decl_needed_putenv = yes; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\EOF #define NEED_DECLARATION_PUTENV 1 EOF fi ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo $ac_n "checking whether strncasecmp must be declared""... $ac_c" 1>&6 -echo "configure:1865: checking whether strncasecmp must be declared" >&5 +echo "$as_me:3129: checking whether strncasecmp must be declared" >&5 +echo $ECHO_N "checking whether strncasecmp must be declared... $ECHO_C" >&6 -ac_ext=C -# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cxx_cross +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if eval "test \"`echo '$''{'groff_cv_decl_needed_strncasecmp'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +if test "${groff_cv_decl_needed_strncasecmp+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 3142 "configure" #include "confdefs.h" #include #ifdef HAVE_STRING_H #include -#else +#endif #ifdef HAVE_STRINGS_H #include #endif -#endif #ifdef HAVE_STDLIB_H #include #endif @@ -1894,225 +3158,302 @@ #ifdef HAVE_MATH_H #include #endif -int main() { +int +main () +{ char *(*pfn) = (char *(*)) strncasecmp -; return 0; } -EOF -if { (eval echo configure:1902: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:3170: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:3173: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:3176: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:3179: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then groff_cv_decl_needed_strncasecmp=no else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - groff_cv_decl_needed_strncasecmp=yes + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +groff_cv_decl_needed_strncasecmp=yes fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$ac_t""$groff_cv_decl_needed_strncasecmp" 1>&6 +echo "$as_me:3190: result: $groff_cv_decl_needed_strncasecmp" >&5 +echo "${ECHO_T}$groff_cv_decl_needed_strncasecmp" >&6 if test $groff_cv_decl_needed_strncasecmp = yes; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\EOF #define NEED_DECLARATION_STRNCASECMP 1 EOF fi ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu -ac_ext=C -# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cxx_cross - -echo $ac_n "checking for sys_nerr in or ""... $ac_c" 1>&6 -echo "configure:1937: checking for sys_nerr in or " >&5 -cat > conftest.$ac_ext < or " >&5 +echo $ECHO_N "checking for sys_nerr in or ... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line 3213 "configure" #include "confdefs.h" #include #include -int main() { +int +main () +{ int k; k = sys_nerr; -; return 0; } -EOF -if { (eval echo configure:1947: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6;cat >> confdefs.h <<\EOF + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:3226: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:3229: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:3232: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:3235: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + echo "$as_me:3237: result: yes" >&5 +echo "${ECHO_T}yes" >&6;cat >>confdefs.h <<\EOF #define HAVE_SYS_NERR 1 EOF else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "$ac_t""no" 1>&6 + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +echo "$as_me:3245: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -echo $ac_n "checking for sys_errlist in or ""... $ac_c" 1>&6 -echo "configure:1968: checking for sys_errlist in or " >&5 -cat > conftest.$ac_ext < or " >&5 +echo $ECHO_N "checking for sys_errlist in or ... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line 3258 "configure" #include "confdefs.h" #include #include -int main() { +int +main () +{ int k; k = (int)sys_errlist[0]; -; return 0; } -EOF -if { (eval echo configure:1978: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6;cat >> confdefs.h <<\EOF + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:3271: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:3274: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:3277: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:3280: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + echo "$as_me:3282: result: yes" >&5 +echo "${ECHO_T}yes" >&6;cat >>confdefs.h <<\EOF #define HAVE_SYS_ERRLIST 1 EOF else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "$ac_t""no" 1>&6 + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +echo "$as_me:3290: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext -ac_ext=C -# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cxx_cross - -echo $ac_n "checking C++ ""... $ac_c" 1>&6 -echo "configure:2000: checking C++ " >&5 -cat > conftest.$ac_ext <" >&5 +echo $ECHO_N "checking C++ ... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line 3304 "configure" #include "confdefs.h" #include -int main() { +int +main () +{ read(0, 0, 0); open(0, 0); -; return 0; } -EOF -if { (eval echo configure:2009: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6;cat >> confdefs.h <<\EOF + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:3316: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:3319: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:3322: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:3325: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + echo "$as_me:3327: result: yes" >&5 +echo "${ECHO_T}yes" >&6;cat >>confdefs.h <<\EOF #define HAVE_CC_OSFCN_H 1 EOF else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "$ac_t""no" 1>&6 + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +echo "$as_me:3335: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu - -ac_ext=C -# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cxx_cross - -echo $ac_n "checking C++ ""... $ac_c" 1>&6 -echo "configure:2038: checking C++ " >&5 -cat > conftest.$ac_ext <" >&5 +echo $ECHO_N "checking C++ ... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line 3354 "configure" #include "confdefs.h" #include -int main() { +int +main () +{ int x = INT_MIN; int y = INT_MAX; int z = UCHAR_MAX; -; return 0; } -EOF -if { (eval echo configure:2047: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6;cat >> confdefs.h <<\EOF + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:3366: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:3369: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:3372: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:3375: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + echo "$as_me:3377: result: yes" >&5 +echo "${ECHO_T}yes" >&6;cat >>confdefs.h <<\EOF #define HAVE_CC_LIMITS_H 1 EOF else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "$ac_t""no" 1>&6 + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +echo "$as_me:3385: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu -ac_ext=C -# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cxx_cross - -echo $ac_n "checking for declaration of time_t""... $ac_c" 1>&6 -echo "configure:2076: checking for declaration of time_t" >&5 -cat > conftest.$ac_ext <&5 +echo $ECHO_N "checking for declaration of time_t... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line 3404 "configure" #include "confdefs.h" #include -int main() { +int +main () +{ time_t t = time(0); struct tm *p = localtime(&t); -; return 0; } -EOF -if { (eval echo configure:2085: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; 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;cat >> confdefs.h <<\EOF + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:3416: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:3419: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:3422: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:3425: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + echo "$as_me:3427: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +echo "$as_me:3432: result: no" >&5 +echo "${ECHO_T}no" >&6;cat >>confdefs.h <<\EOF #define LONG_FOR_TIME_T 1 EOF fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:2106: checking return type of signal handlers" >&5 -if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +echo "$as_me:3445: checking return type of signal handlers" >&5 +echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6 +if test "${ac_cv_type_signal+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 3451 "configure" #include "confdefs.h" #include #include #ifdef signal -#undef signal +# undef signal #endif #ifdef __cplusplus extern "C" void (*signal (int, void (*)(int)))(int); @@ -2120,199 +3461,260 @@ void (*signal ()) (); #endif -int main() { +int +main () +{ int i; -; return 0; } -EOF -if { (eval echo configure:2128: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:3473: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:3476: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:3479: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:3482: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then 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 + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_type_signal=int fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi +echo "$as_me:3492: result: $ac_cv_type_signal" >&5 +echo "${ECHO_T}$ac_cv_type_signal" >&6 -echo "$ac_t""$ac_cv_type_signal" 1>&6 -cat >> confdefs.h <>confdefs.h <&6 -echo "configure:2147: checking struct exception" >&5 -cat > conftest.$ac_ext <&5 +echo $ECHO_N "checking struct exception... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line 3502 "configure" #include "confdefs.h" #include -int main() { +int +main () +{ struct exception e; -; return 0; } -EOF -if { (eval echo configure:2156: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6;cat >> confdefs.h <<\EOF + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:3514: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:3517: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:3520: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:3523: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + echo "$as_me:3525: result: yes" >&5 +echo "${ECHO_T}yes" >&6;cat >>confdefs.h <<\EOF #define HAVE_STRUCT_EXCEPTION 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 sin in -lm""... $ac_c" 1>&6 -echo "configure:2170: checking for sin in -lm" >&5 -ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +echo "$as_me:3533: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:3537: checking for sin in -lm" >&5 +echo $ECHO_N "checking for sin in -lm... $ECHO_C" >&6 +if test "${ac_cv_lib_m_sin+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 3545 "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* 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() { -sin() -; return 0; } -EOF -if { (eval echo configure:2189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 + builtin and then its argument prototype would still apply. */ +char sin (); +int +main () +{ +sin (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:3564: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:3567: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:3570: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:3573: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_m_sin=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_m_sin=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:3584: result: $ac_cv_lib_m_sin" >&5 +echo "${ECHO_T}$ac_cv_lib_m_sin" >&6 +if test $ac_cv_lib_m_sin = yes; then LIBM=-lm -else - echo "$ac_t""no" 1>&6 fi - -for ac_hdr in unistd.h +for ac_header in stdlib.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:2214: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2224: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" +ac_ac_Header=`echo "ac_cv_header_$ac_header" | $ac_tr_sh` +echo "$as_me:3593: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$ac_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 3599 "configure" +#include "confdefs.h" +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:3603: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:3609: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + eval "$ac_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" + eval "$ac_ac_Header=no" fi -rm -f conftest* +rm -f conftest.err conftest.$ac_ext fi -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___%'` - cat >> confdefs.h <&5 +echo "${ECHO_T}`eval echo '${'$ac_ac_Header'}'`" >&6 +if test `eval echo '${'$ac_ac_Header'}'` = yes; then + 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:2253: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh` +echo "$as_me:3641: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$ac_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 3647 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* 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() { + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); +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(); +f = $ac_func; #endif -; return 0; } + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:3678: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:3681: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:3684: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:3687: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$ac_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$ac_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:3697: result: `eval echo '${'$ac_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$ac_ac_var'}'`" >&6 +if test `eval echo '${'$ac_ac_var'}'` = yes; then + cat >>confdefs.h <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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* -fi -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'` - cat >> confdefs.h <&6 fi done -echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:2306: checking for working mmap" >&5 -if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:3707: checking for working mmap" >&5 +echo $ECHO_N "checking for working mmap... $ECHO_C" >&6 +if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_func_mmap_fixed_mapped=no else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 3716 "configure" #include "confdefs.h" - /* Thanks to Mike Haertel and Jim Avera for this test. Here is a matrix of mmap possibilities: mmap private not fixed @@ -2325,7 +3727,7 @@ back from the file, nor mmap's back from the file at a different address. (There have been systems where private was not correctly implemented like the infamous i386 svr4.0, and systems where the - VM page cache was not coherent with the filesystem buffer cache + VM page cache was not coherent with the file system buffer cache like early versions of FreeBSD and possibly contemporary NetBSD.) For shared mappings, we should conversely verify that changes get propogated back to all the places they're supposed to be. @@ -2338,21 +3740,27 @@ #include #include -/* This mess was copied from the GNU getpagesize.h. */ -#ifndef HAVE_GETPAGESIZE -# ifdef HAVE_UNISTD_H -# include -# endif +#if STDC_HEADERS || HAVE_STDLIB_H +# include +#else +char *malloc (); +#endif +#if HAVE_UNISTD_H +# include +#endif +#include +/* This mess was copied from the GNU getpagesize.h. */ +#if !HAVE_GETPAGESIZE /* Assume that all systems that can run configure have sys/param.h. */ -# ifndef HAVE_SYS_PARAM_H +# if !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 +# if HAVE_SYS_PARAM_H # include # ifdef EXEC_PAGESIZE # define getpagesize() EXEC_PAGESIZE @@ -2379,335 +3787,486 @@ #endif /* no HAVE_GETPAGESIZE */ -#ifdef __cplusplus -extern "C" { void *malloc(unsigned); } -#else -char *malloc(); -#endif - int -main() +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); + char *data, *data2, *data3; + int i, pagesize; + int fd; + + pagesize = getpagesize (); + + /* First, make a file with some known garbage in it. */ + data = (char *) malloc (pagesize); + if (!data) + exit (1); + for (i = 0; i < pagesize; ++i) + *(data + i) = rand (); + umask (0); + fd = creat ("conftest.mmap", 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 ("conftest.mmap", O_RDWR); + if (fd < 0) + exit (1); + data2 = (char *) 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 = (char *) 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); + exit (0); } - -EOF -if { (eval echo configure:2454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:3848: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:3851: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:3853: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:3856: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_mmap_fixed_mapped=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_func_mmap_fixed_mapped=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_func_mmap_fixed_mapped=no fi -rm -fr conftest* +rm -f core core.* *.core conftest$ac_exeext conftest.$ac_ext fi - fi - -echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 +echo "$as_me:3868: result: $ac_cv_func_mmap_fixed_mapped" >&5 +echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6 if test $ac_cv_func_mmap_fixed_mapped = yes; then - cat >> confdefs.h <<\EOF + +cat >>confdefs.h <<\EOF #define HAVE_MMAP 1 EOF fi +rm -f conftest.mmap saved_libs="$LIBS" LIBS="$LIBS -lc $LIBM" + for ac_func in fmod strtol getcwd strerror putenv do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2481: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh` +echo "$as_me:3885: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$ac_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 3891 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* 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() { + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); +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(); +f = $ac_func; #endif -; return 0; } + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:3922: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:3925: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:3928: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:3931: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$ac_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$ac_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:3941: result: `eval echo '${'$ac_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$ac_ac_var'}'`" >&6 +if test `eval echo '${'$ac_ac_var'}'` = yes; then + cat >>confdefs.h <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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* -fi -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'` - cat >> confdefs.h <&6 -LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" + LIBOBJS="$LIBOBJS $ac_func.$ac_objext" fi done - LIBS="$saved_libs" -for ac_func in rename mkstemp strcasecmp strncasecmp strsep strdup + +for ac_func in rename strcasecmp strncasecmp strsep strdup do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2539: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh` +echo "$as_me:3958: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$ac_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 3964 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* 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() { + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); +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(); +f = $ac_func; #endif -; return 0; } + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:3995: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:3998: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:4001: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:4004: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$ac_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$ac_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:4014: result: `eval echo '${'$ac_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$ac_ac_var'}'`" >&6 +if test `eval echo '${'$ac_ac_var'}'` = yes; then + cat >>confdefs.h <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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* + fi +done + +echo "$as_me:4024: checking for mkstemp" >&5 +echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6 +if test "${ac_cv_func_mkstemp+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 4030 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char mkstemp (); below. */ +#include +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char mkstemp (); +char (*f) (); + +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_mkstemp) || defined (__stub___mkstemp) +choke me +#else +f = mkstemp; +#endif -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'` - cat >> confdefs.h <&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:4064: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:4067: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:4070: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_mkstemp=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_func_mkstemp=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:4080: result: $ac_cv_func_mkstemp" >&5 +echo "${ECHO_T}$ac_cv_func_mkstemp" >&6 +if test $ac_cv_func_mkstemp = yes; then + cat >>confdefs.h <<\EOF +#define HAVE_MKSTEMP 1 +EOF + +echo "$as_me:4087: checking for mkstemp prototype in " >&5 +echo $ECHO_N "checking for mkstemp prototype in ... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line 4090 "configure" +#include "confdefs.h" +#include +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "mkstemp" >/dev/null 2>&1; then + echo "$as_me:4096: result: yes" >&5 +echo "${ECHO_T}yes" >&6;cat >>confdefs.h <<\EOF +#define HAVE_MKSTEMP_PROTO 1 EOF - + else - echo "$ac_t""no" 1>&6 + echo "$as_me:4102: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi +rm -f conftest* + fi -done -echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6 -echo "configure:2592: checking for sys_siglist declaration in signal.h or unistd.h" >&5 -if eval "test \"`echo '$''{'ac_cv_decl_sys_siglist'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:4109: checking for sys_siglist declaration in signal.h or unistd.h" >&5 +echo $ECHO_N "checking for sys_siglist declaration in signal.h or unistd.h... $ECHO_C" >&6 +if test "${ac_cv_decl_sys_siglist+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 4115 "configure" #include "confdefs.h" #include #include /* NetBSD declares sys_siglist in unistd.h. */ -#ifdef HAVE_UNISTD_H -#include +#if HAVE_UNISTD_H +# include #endif -int main() { + +int +main () +{ char *msg = *(sys_siglist + 1); -; return 0; } -EOF -if { (eval echo configure:2609: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:4133: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:4136: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:4139: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:4142: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then 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 + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_decl_sys_siglist=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6 +echo "$as_me:4152: result: $ac_cv_decl_sys_siglist" >&5 +echo "${ECHO_T}$ac_cv_decl_sys_siglist" >&6 if test $ac_cv_decl_sys_siglist = yes; then - cat >> confdefs.h <<\EOF + +cat >>confdefs.h <<\EOF #define SYS_SIGLIST_DECLARED 1 EOF fi - -ac_ext=C -# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cxx_cross - -echo $ac_n "checking whether ANSI array delete syntax supported""... $ac_c" 1>&6 -echo "configure:2638: checking whether ANSI array delete syntax supported" >&5 -cat > conftest.$ac_ext <&5 +echo $ECHO_N "checking whether ANSI array delete syntax supported... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line 4171 "configure" #include "confdefs.h" -int main() { +int +main () +{ char *p = new char[5]; delete [] p; -; return 0; } -EOF -if { (eval echo configure:2647: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; 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;cat >> confdefs.h <<\EOF + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:4183: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:4186: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:4189: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:4192: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + echo "$as_me:4194: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +echo "$as_me:4199: result: no" >&5 +echo "${ECHO_T}no" >&6;cat >>confdefs.h <<\EOF #define ARRAY_DELETE_NEEDS_SIZE 1 EOF fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu -ac_ext=C -# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cxx_cross - -echo $ac_n "checking traditional preprocessor""... $ac_c" 1>&6 -echo "configure:2676: checking traditional preprocessor" >&5 -cat > conftest.$ac_ext <&5 +echo $ECHO_N "checking traditional preprocessor... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line 4221 "configure" #include "confdefs.h" #define name2(a,b) a/**/b -int main() { +int +main () +{ int name2(foo,bar); -; return 0; } -EOF -if { (eval echo configure:2685: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6;cat >> confdefs.h <<\EOF + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:4233: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:4236: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:4239: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:4242: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + echo "$as_me:4244: result: yes" >&5 +echo "${ECHO_T}yes" >&6;cat >>confdefs.h <<\EOF #define TRADITIONAL_CPP 1 EOF else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "$ac_t""no" 1>&6 + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +echo "$as_me:4252: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo $ac_n "checking w_coredump""... $ac_c" 1>&6 -echo "configure:2706: checking w_coredump" >&5 +echo "$as_me:4262: checking w_coredump" >&5 +echo $ECHO_N "checking w_coredump... $ECHO_C" >&6 if test "$cross_compiling" = yes; then - echo "$ac_t""no" 1>&6 + echo "$as_me:4265: result: no" >&5 +echo "${ECHO_T}no" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 4269 "configure" #include "confdefs.h" #include #include @@ -2721,29 +4280,40 @@ exit(i != 0200); #endif } -EOF -if { (eval echo configure:2726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - echo "$ac_t""yes" 1>&6;cat >> confdefs.h <<\EOF +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:4285: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:4288: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:4290: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:4293: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + echo "$as_me:4295: result: yes" >&5 +echo "${ECHO_T}yes" >&6;cat >>confdefs.h <<\EOF #define WCOREFLAG 0200 EOF else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - echo "$ac_t""no" 1>&6 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +echo "$as_me:4304: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -fr conftest* +rm -f core core.* *.core conftest$ac_exeext conftest.$ac_ext fi - -echo $ac_n "checking default value for grops -b option""... $ac_c" 1>&6 -echo "configure:2742: checking default value for grops -b option" >&5 +echo "$as_me:4309: checking default value for grops -b option" >&5 +echo $ECHO_N "checking default value for grops -b option... $ECHO_C" >&6 test -n "${BROKEN_SPOOLER_FLAGS}" || BROKEN_SPOOLER_FLAGS=7 -echo "$ac_t""$BROKEN_SPOOLER_FLAGS" 1>&6 +echo "$as_me:4312: result: $BROKEN_SPOOLER_FLAGS" >&5 +echo "${ECHO_T}$BROKEN_SPOOLER_FLAGS" >&6 -echo $ac_n "checking default paper size""... $ac_c" 1>&6 -echo "configure:2747: checking default paper size" >&5 +echo "$as_me:4315: checking default paper size" >&5 +echo $ECHO_N "checking default paper size... $ECHO_C" >&6 if test -z "$PAGE"; then descfile= if test -r $prefix/share/groff/font/devps/DESC; then @@ -2782,20 +4352,23 @@ esac fi test -n "$PAGE" || PAGE=letter -echo "$ac_t""$PAGE" 1>&6 +echo "$as_me:4355: result: $PAGE" >&5 +echo "${ECHO_T}$PAGE" >&6 -echo $ac_n "checking for existing troff installation""... $ac_c" 1>&6 -echo "configure:2789: checking for existing troff installation" >&5 +echo "$as_me:4358: checking for existing troff installation" >&5 +echo $ECHO_N "checking for existing troff installation... $ECHO_C" >&6 if test "x`(echo .tm '|n(.g' | tr '|' '\\\\' | troff -z -i 2>&1) 2>/dev/null`" = x0; then - echo "$ac_t""yes" 1>&6 + echo "$as_me:4361: result: yes" >&5 +echo "${ECHO_T}yes" >&6 g=g else - echo "$ac_t""no" 1>&6 + echo "$as_me:4365: result: no" >&5 +echo "${ECHO_T}no" >&6 g= fi -echo $ac_n "checking for prefix of system macro packages""... $ac_c" 1>&6 -echo "configure:2799: checking for prefix of system macro packages" >&5 +echo "$as_me:4370: checking for prefix of system macro packages" >&5 +echo $ECHO_N "checking for prefix of system macro packages... $ECHO_C" >&6 sys_tmac_prefix= sys_tmac_file_prefix= for d in /usr/share/lib/tmac /usr/lib/tmac; do @@ -2811,11 +4384,12 @@ done done done -echo "$ac_t""$sys_tmac_prefix" 1>&6 +echo "$as_me:4387: result: $sys_tmac_prefix" >&5 +echo "${ECHO_T}$sys_tmac_prefix" >&6 tmac_wrap= -echo $ac_n "checking which system macro packages should be made available""... $ac_c" 1>&6 -echo "configure:2819: checking which system macro packages should be made available" >&5 +echo "$as_me:4391: checking which system macro packages should be made available" >&5 +echo $ECHO_N "checking which system macro packages should be made available... $ECHO_C" >&6 if test "x$sys_tmac_file_prefix" = "xtmac."; then for f in $sys_tmac_prefix*; do suff=`echo $f | sed -e "s;$sys_tmac_prefix;;"` @@ -2824,7 +4398,7 @@ *) grep "Copyright.*Free Software Foundation" $f >/dev/null \ || tmac_wrap="$tmac_wrap $suff" ;; - esac + esac done elif test -n "$sys_tmac_prefix"; then files=`echo $sys_tmac_prefix*` @@ -2850,292 +4424,641 @@ done rm -f conftest.sol fi -echo "$ac_t""$tmac_wrap" 1>&6 +echo "$as_me:4427: result: $tmac_wrap" >&5 +echo "${ECHO_T}$tmac_wrap" >&6 $srcdir/mkinstalldirs src/xditview -trap '' 1 2 15 -cat > confcache <<\EOF +ac_config_files="$ac_config_files Makefile src/xditview/Imakefile" + +cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure -# scripts and configure runs. It is not useful on other systems. -# If it contains results you don't want to keep, you may remove or edit it. +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. # -# By default, configure uses ./config.cache as the cache file, -# creating it if it does not exist already. You can give configure -# the --cache-file=FILE option to use a different cache file; that is -# what configure does when it calls configure scripts in -# subdirectories, so they share the cache. -# Giving --cache-file=/dev/null disables caching, for debugging configure. -# config.status only pays attention to the cache file if you give it the -# --recheck option to rerun configure. +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. # -EOF +# `ac_cv_env_foo' variables (set or unset) will be overriden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. -(set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote substitution - # turns \\\\ into \\, and sed turns \\ into \). - sed -n \ - -e "s/'/'\\\\''/g" \ - -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" - ;; - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' - ;; - esac >> confcache -if cmp -s $cache_file confcache; then - : -else +{ + (set) 2>&1 | + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$ac_cr_alnum]*_cv_[_$ac_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n \ + "s/^\\([_$ac_cr_alnum]*_cv_[_$ac_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + ;; + esac; +} | + sed ' + t clear + : clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + : end' >>confcache +if cmp -s $cache_file confcache; then :; else if test -w $cache_file; then - echo "updating cache $cache_file" - cat confcache > $cache_file + test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" + cat confcache >$cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache -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. +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/; +s/:*\${srcdir}:*/:/; +s/:*@srcdir@:*/:/; +s/^\([^=]*=[ ]*\):*/\1/; +s/:*$//; +s/^[^=]*=[ ]*$//; +}' fi -trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 - # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. -cat > conftest.defs <<\EOF -s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g -s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g -s%\[%\\&%g -s%\]%\\&%g -s%\$%$$%g -EOF -if test "$groff_cv_os390" = "yes"; then - DEFS=`sed -f conftest.defs confdefs.h | tr '\n' ' '` -else - DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '` -fi -rm -f conftest.defs - +# +# If the first sed substitution is executed (which looks for macros that +# take arguments), then we branch to the quote section. Otherwise, +# look for a macro that doesn't take arguments. +cat >confdef2opt.sed <<\EOF +t clear +: clear +s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g +t quote +s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g +t quote +d +: quote +s,[ `~#$^&*(){}\\|;'"<>?],\\&,g +s,\[,\\&,g +s,\],\\&,g +s,\$,$$,g +p +EOF +# We use echo to avoid assuming a particular line-breaking character. +# The extra dot is to prevent the shell from consuming trailing +# line-breaks from the sub-command output. A line-break within +# single-quotes doesn't work because, if this script is created in a +# platform that uses two characters for line-breaks (e.g., DOS), tr +# would break. +ac_LF_and_DOT=`echo; echo .` +DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` +rm -f confdef2opt.sed -# 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 <&5 +echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF +#! $SHELL # Generated automatically by configure. # Run this file to recreate the current configuration. -# This directory was configured as follows, -# on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# -# $0 $ac_configure_args -# # Compiler output produced by configure, useful for debugging -# configure, is in ./config.log if it exists. +# configure, is in config.log if it exists. -ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" -for ac_option +debug=false +SHELL=\${CONFIG_SHELL-$SHELL} +ac_cs_invocation="\$0 \$@" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix +fi + +# Name of the executable. +as_me=`echo "$0" |sed 's,.*[\\/],,'` + +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links + as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.file + +as_executable_p="test -f" + +# Support unset when possible. +if (FOO=FOO; unset FOO) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + +# NLS nuisances. +$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; } +$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; } +$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; } +$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; } +$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; } +$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; } +$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; } +$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; } + +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; } + +exec 6>&1 + +_ACEOF + +# Files that config.status was made for. +if test -n "$ac_config_files"; then + echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_headers"; then + echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_links"; then + echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_commands"; then + echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS +fi + +cat >>$CONFIG_STATUS <<\EOF + +ac_cs_usage="\ +\`$as_me' instantiates files from templates according to the +current configuration. + +Usage: $0 [OPTIONS] [FILE]... + + -h, --help print this help, then exit + -V, --version print version number, then exit + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + +Configuration files: +$config_files + +Report bugs to ." +EOF + +cat >>$CONFIG_STATUS <>$CONFIG_STATUS <<\EOF +# If no file are specified by the user, then we need to provide default +# value. By we need to know if files were specified by the user. +ac_need_defaults=: +while test $# != 0 do - case "\$ac_option" in + case $1 in + --*=*) + ac_option=`expr "x$1" : 'x\([^=]*\)='` + ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` + shift + set dummy "$ac_option" "$ac_optarg" ${1+"$@"} + shift + ;; + -*);; + *) # This is not an option, so the user has probably given explicit + # arguments. + ac_need_defaults=false;; + esac + + case $1 in + # Handling of the options. +EOF +cat >>$CONFIG_STATUS <>$CONFIG_STATUS <<\EOF + --version | --vers* | -V ) + echo "$ac_cs_version"; exit 0 ;; + --he | --h) + # Conflict between --help and --header + { { echo "$as_me:4710: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit 0 ;; + --debug | --d* | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + shift + CONFIG_FILES="$CONFIG_FILES $1" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + shift + CONFIG_HEADERS="$CONFIG_HEADERS $1" + ac_need_defaults=false;; + + # Handling of arguments. + 'Makefile' ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; + 'src/xditview/Imakefile' ) CONFIG_FILES="$CONFIG_FILES src/xditview/Imakefile" ;; + + # This is an error. + -*) { { echo "$as_me:4733: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; } ;; + *) { { echo "$as_me:4738: error: invalid argument: $1" >&5 +echo "$as_me: error: invalid argument: $1" >&2;} + { (exit 1); exit 1; }; };; esac + shift done -ac_given_srcdir=$srcdir -ac_given_INSTALL="$INSTALL" +exec 5>>config.log +cat >&5 << _ACEOF + +## ----------------------- ## +## Running config.status. ## +## ----------------------- ## -trap 'rm -fr `echo "Makefile src/xditview/Imakefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 +This file was extended by $as_me 2.50, executed with + > $ac_cs_invocation +on `(hostname || uname -n) 2>/dev/null | sed 1q` + +_ACEOF EOF -cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF -$ac_vpsub -$extrasub -s%@SHELL@%$SHELL%g -s%@CFLAGS@%$CFLAGS%g -s%@CPPFLAGS@%$CPPFLAGS%g -s%@CXXFLAGS@%$CXXFLAGS%g -s%@FFLAGS@%$FFLAGS%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%@top_builddir@%$top_builddir%g -s%@CC@%$CC%g -s%@CXX@%$CXX%g -s%@TTYDEVDIRS@%$TTYDEVDIRS%g -s%@LPR@%$LPR%g -s%@LP@%$LP%g -s%@LPQ@%$LPQ%g -s%@PSPRINT@%$PSPRINT%g -s%@DVIPRINT@%$DVIPRINT%g -s%@PERLPATH@%$PERLPATH%g -s%@YACC@%$YACC%g -s%@RANLIB@%$RANLIB%g -s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g -s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g -s%@INSTALL_DATA@%$INSTALL_DATA%g -s%@LN_S@%$LN_S%g -s%@SH_SCRIPT_SED_CMD@%$SH_SCRIPT_SED_CMD%g -s%@CPP@%$CPP%g -s%@LIBM@%$LIBM%g -s%@LIBOBJS@%$LIBOBJS%g -s%@BROKEN_SPOOLER_FLAGS@%$BROKEN_SPOOLER_FLAGS%g -s%@PAGE@%$PAGE%g -s%@g@%$g%g -s%@sys_tmac_prefix@%$sys_tmac_prefix%g -s%@tmac_wrap@%$tmac_wrap%g +cat >>$CONFIG_STATUS <<\EOF +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files +fi + +# Create a temporary directory, and hook for its removal unless debugging. +$debug || +{ + trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 + trap '{ (exit $?); exit $?; }' 1 2 13 15 +} + +# Create a (secure) tmp directory for tmp files. +: ${TMPDIR=/tmp} +{ + tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=$TMPDIR/cs$$-$RANDOM + (umask 077 && mkdir $tmp) +} || +{ + echo "$me: cannot create a temporary directory in $TMPDIR" >&2 + { (exit 1); exit 1; } +} -CEOF EOF -cat >> $CONFIG_STATUS <<\EOF +cat >>$CONFIG_STATUS < 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" +# +# CONFIG_FILES section. +# + +# No need to generate the scripts if there are no CONFIG_FILES. +# This happens for instance when ./config.status config.h +if test -n "\$CONFIG_FILES"; then + # Protect against being on the right side of a sed subst in config.status. + sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; + s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF +s,@SHELL@,$SHELL,;t t +s,@exec_prefix@,$exec_prefix,;t t +s,@prefix@,$prefix,;t t +s,@program_transform_name@,$program_transform_name,;t t +s,@bindir@,$bindir,;t t +s,@sbindir@,$sbindir,;t t +s,@libexecdir@,$libexecdir,;t t +s,@datadir@,$datadir,;t t +s,@sysconfdir@,$sysconfdir,;t t +s,@sharedstatedir@,$sharedstatedir,;t t +s,@localstatedir@,$localstatedir,;t t +s,@libdir@,$libdir,;t t +s,@includedir@,$includedir,;t t +s,@oldincludedir@,$oldincludedir,;t t +s,@infodir@,$infodir,;t t +s,@mandir@,$mandir,;t t +s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t +s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t +s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t +s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t +s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t +s,@ECHO_C@,$ECHO_C,;t t +s,@ECHO_N@,$ECHO_N,;t t +s,@ECHO_T@,$ECHO_T,;t t +s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t +s,@DEFS@,$DEFS,;t t +s,@LIBS@,$LIBS,;t t +s,@top_builddir@,$top_builddir,;t t +s,@CC@,$CC,;t t +s,@CFLAGS@,$CFLAGS,;t t +s,@LDFLAGS@,$LDFLAGS,;t t +s,@CPPFLAGS@,$CPPFLAGS,;t t +s,@ac_ct_CC@,$ac_ct_CC,;t t +s,@EXEEXT@,$EXEEXT,;t t +s,@OBJEXT@,$OBJEXT,;t t +s,@CXX@,$CXX,;t t +s,@CXXFLAGS@,$CXXFLAGS,;t t +s,@ac_ct_CXX@,$ac_ct_CXX,;t t +s,@TTYDEVDIRS@,$TTYDEVDIRS,;t t +s,@LPR@,$LPR,;t t +s,@LP@,$LP,;t t +s,@LPQ@,$LPQ,;t t +s,@PSPRINT@,$PSPRINT,;t t +s,@DVIPRINT@,$DVIPRINT,;t t +s,@PERLPATH@,$PERLPATH,;t t +s,@YACC@,$YACC,;t t +s,@RANLIB@,$RANLIB,;t t +s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t +s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t +s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t +s,@INSTALL_DATA@,$INSTALL_DATA,;t t +s,@LN_S@,$LN_S,;t t +s,@SH_SCRIPT_SED_CMD@,$SH_SCRIPT_SED_CMD,;t t +s,@CPP@,$CPP,;t t +s,@LIBM@,$LIBM,;t t +s,@LIBOBJS@,$LIBOBJS,;t t +s,@BROKEN_SPOOLER_FLAGS@,$BROKEN_SPOOLER_FLAGS,;t t +s,@PAGE@,$PAGE,;t t +s,@g@,$g,;t t +s,@sys_tmac_prefix@,$sys_tmac_prefix,;t t +s,@tmac_wrap@,$tmac_wrap,;t t +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_lines=48 + ac_sed_frag=1 # Number of current file. + ac_beg=1 # First line for current file. + ac_end=$ac_max_sed_lines # 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" $tmp/subs.sed >$tmp/subs.frag + else + sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + fi + if test ! -s $tmp/subs.frag; then + ac_more_lines=false else - ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" + # The purpose of the label and of the branching condition is to + # speed up the sed processing (if there are no `@' at all, there + # is no need to browse any of the substitutions). + # These are the two extra sed commands mentioned above. + (echo ':t + /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" + else + ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" + fi + ac_sed_frag=`expr $ac_sed_frag + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_lines` fi - ac_file=`expr $ac_file + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_cmds` + done + if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat 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 +cat >>$CONFIG_STATUS <<\EOF +for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue # 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" ;; + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) 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%/[^/][^/]*$%%'` + # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. + ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` 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%^\./%%'`" + { case "$ac_dir" in + [\\/]* | ?:[\\/]* ) as_incr_dir=;; + *) as_incr_dir=.;; +esac +as_dummy="$ac_dir" +for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do + case $as_mkdir_dir in + # Skip DOS drivespec + ?:) as_incr_dir=$as_mkdir_dir ;; + *) + as_incr_dir=$as_incr_dir/$as_mkdir_dir + test -d "$as_incr_dir" || mkdir "$as_incr_dir" + ;; + esac +done; } + + 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'` + 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" ;; + case $srcdir in + .) ac_srcdir=. + if test -z "$ac_dots"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; *) # Relative path. - srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" - top_srcdir="$ac_dots$ac_given_srcdir" ;; + ac_srcdir=$ac_dots$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_dots$srcdir ;; esac - case "$ac_given_INSTALL" in - [/$]*) INSTALL="$ac_given_INSTALL" ;; - *) INSTALL="$ac_dots$ac_given_INSTALL" ;; + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_dots$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* - + if test x"$ac_file" != x-; then + { echo "$as_me:4979: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + rm -f "$ac_file" + fi + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated automatically by config.status. */ + configure_input="Generated automatically from `echo $ac_file_in | + sed 's,.*/,,'` by configure." + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:4997: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + echo $f;; + *) # Relative + if test -f "$f"; then + # Build tree + echo $f + elif test -f "$srcdir/$f"; then + # Source tree + echo $srcdir/$f + else + # /dev/null tree + { { echo "$as_me:5010: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } EOF -cat >> $CONFIG_STATUS <>$CONFIG_STATUS <>$CONFIG_STATUS <<\EOF +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s,@configure_input@,$configure_input,;t t +s,@srcdir@,$ac_srcdir,;t t +s,@top_srcdir@,$ac_top_srcdir,;t t +s,@INSTALL@,$ac_INSTALL,;t t +" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out + rm -f $tmp/stdin + if test x"$ac_file" != x-; then + mv $tmp/out $ac_file + else + cat $tmp/out + rm -f $tmp/out + fi +done EOF -cat >> $CONFIG_STATUS <<\EOF -exit 0 +cat >>$CONFIG_STATUS <<\EOF + +{ (exit 0); 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 +ac_clean_files=$ac_clean_files_save + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + exec 5>/dev/null + $SHELL $CONFIG_STATUS || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || { (exit 1); exit 1; } +fi diff -aruN groff-1.17/configure.ac groff-1.17.1/configure.ac --- groff-1.17/configure.ac Thu Jan 1 01:00:00 1970 +++ groff-1.17.1/configure.ac Fri Jun 8 14:43:45 2001 @@ -0,0 +1,65 @@ +dnl Process this file with autoconf to produce a configure script. +AC_INIT +AC_CONFIG_SRCDIR([src/roff/groff/groff.cc]) +dnl checks for programs +GROFF_SRCDIR +GROFF_BUILDDIR +AC_PROG_CC +AC_PROG_CXX +GROFF_CXX_CHECK +GROFF_EBCDIC +GROFF_OS390 +GROFF_PRINT +AC_PATH_PROG(PERLPATH, perl, /usr/bin/perl) +GROFF_PROG_YACC +AC_PROG_RANLIB +GROFF_INSTALL_SH +AC_PROG_INSTALL +AC_PROG_LN_S +dnl use a dummy substitution if no csh hack is necessary to avoid errors +dnl with non-GNU sed programs +GROFF_CSH_HACK(SH_SCRIPT_SED_CMD='1s/.*/:/', SH_SCRIPT_SED_CMD='1s/a/a/') +AC_SUBST(SH_SCRIPT_SED_CMD) +dnl checks for headers +AC_CHECK_HEADERS(stdlib.h unistd.h dirent.h limits.h sys/dir.h \ + string.h strings.h math.h) +GROFF_ISC_SYSV3 +GROFF_POSIX +GROFF_SRAND +GROFF_NEED_DECLARATION(hypot) +GROFF_NEED_DECLARATION(popen) +GROFF_NEED_DECLARATION(pclose) +GROFF_NEED_DECLARATION(putenv) +GROFF_NEED_DECLARATION(strncasecmp) +GROFF_SYS_NERR +GROFF_SYS_ERRLIST +GROFF_OSFCN_H +GROFF_LIMITS_H +dnl checks for typedefs +GROFF_TIME_T +AC_TYPE_SIGNAL +GROFF_STRUCT_EXCEPTION +dnl checks for libraries +GROFF_LIBM +dnl checks for functions +AC_FUNC_MMAP +saved_libs="$LIBS" +LIBS="$LIBS -lc $LIBM" +AC_REPLACE_FUNCS(fmod strtol getcwd strerror putenv) +LIBS="$saved_libs" +AC_CHECK_FUNCS(rename strcasecmp strncasecmp strsep strdup) +GROFF_MKSTEMP +AC_DECL_SYS_SIGLIST +dnl checks for compiler characteristics +GROFF_ARRAY_DELETE +GROFF_TRADITIONAL_CPP +dnl checks for operating system services +GROFF_WCOREFLAG +dnl other random stuff +GROFF_BROKEN_SPOOLER_FLAGS +GROFF_PAGE +GROFF_G +GROFF_TMAC +$srcdir/mkinstalldirs src/xditview +AC_CONFIG_FILES([Makefile src/xditview/Imakefile]) +AC_OUTPUT diff -aruN groff-1.17/configure.in groff-1.17.1/configure.in --- groff-1.17/configure.in Mon Nov 13 17:51:26 2000 +++ groff-1.17.1/configure.in Thu Jan 1 01:00:00 1970 @@ -1,62 +0,0 @@ -dnl Process this file with autoconf to produce a configure script. -AC_INIT(src/roff/groff/groff.cc) -dnl checks for programs -GROFF_SRCDIR -GROFF_BUILDDIR -AC_PROG_CC -AC_PROG_CXX -GROFF_CXX_CHECK -GROFF_EBCDIC -GROFF_OS390 -GROFF_PRINT -AC_PATH_PROG(PERLPATH, perl, /usr/bin/perl) -GROFF_PROG_YACC -AC_PROG_RANLIB -GROFF_INSTALL_SH -AC_PROG_INSTALL -AC_PROG_LN_S -dnl use a dummy substitution if no csh hack is necessary to avoid errors -dnl with non-GNU sed programs -GROFF_CSH_HACK(SH_SCRIPT_SED_CMD='1s/.*/:/', SH_SCRIPT_SED_CMD='1s/a/a/') -AC_SUBST(SH_SCRIPT_SED_CMD) -dnl checks for headers -AC_CHECK_HEADERS(stdlib.h unistd.h dirent.h limits.h sys/dir.h \ - string.h strings.h math.h) -GROFF_ISC_SYSV3 -GROFF_POSIX -GROFF_SRAND -GROFF_NEED_DECLARATION(hypot) -GROFF_NEED_DECLARATION(popen) -GROFF_NEED_DECLARATION(pclose) -GROFF_NEED_DECLARATION(putenv) -GROFF_NEED_DECLARATION(strncasecmp) -GROFF_SYS_NERR -GROFF_SYS_ERRLIST -GROFF_OSFCN_H -GROFF_LIMITS_H -dnl checks for typedefs -GROFF_TIME_T -AC_TYPE_SIGNAL -GROFF_STRUCT_EXCEPTION -dnl checks for libraries -GROFF_LIBM -dnl checks for functions -AC_FUNC_MMAP -saved_libs="$LIBS" -LIBS="$LIBS -lc $LIBM" -AC_REPLACE_FUNCS(fmod strtol getcwd strerror putenv) -LIBS="$saved_libs" -AC_CHECK_FUNCS(rename mkstemp strcasecmp strncasecmp strsep strdup) -AC_DECL_SYS_SIGLIST -dnl checks for compiler characteristics -GROFF_ARRAY_DELETE -GROFF_TRADITIONAL_CPP -dnl checks for operating system services -GROFF_WCOREFLAG -dnl other random stuff -GROFF_BROKEN_SPOOLER_FLAGS -GROFF_PAGE -GROFF_G -GROFF_TMAC -$srcdir/mkinstalldirs src/xditview -AC_OUTPUT(Makefile src/xditview/Imakefile) diff -aruN groff-1.17/contrib/mm/m.tmac groff-1.17.1/contrib/mm/m.tmac --- groff-1.17/contrib/mm/m.tmac Mon Mar 5 10:56:29 2001 +++ groff-1.17.1/contrib/mm/m.tmac Wed May 16 13:07:52 2001 @@ -3,8 +3,8 @@ .ds RE \\$2 .. .\" -.\" $Id: m.tmac,v 2.3 2001/03/05 09:56:29 jhaegg Exp $ -.@revision $Revision: 2.3 $ +.\" $Id: m.tmac,v 2.4 2001/05/16 11:07:52 wlemb Exp $ +.@revision $Revision: 2.4 $ .ig Copyright (C) 1991-2000 Free Software Foundation, Inc. @@ -2258,7 +2258,6 @@ .nr tbl*header-written 1 .. .de TH -.if '\\$1'N' @error TH: N not implemented yet. Sorry. .ie '\\n[.z]'tbl*header-div' \{\ . nr T. 0 . T# diff -aruN groff-1.17/doc/groff.texinfo groff-1.17.1/doc/groff.texinfo --- groff-1.17/doc/groff.texinfo Mon Apr 16 16:47:18 2001 +++ groff-1.17.1/doc/groff.texinfo Mon May 7 15:36:24 2001 @@ -4655,29 +4655,23 @@ @cindex blank lines, disabling @cindex lines, blank, disabling @Defreq {ns, } +@Defregx {.ns} Enable @dfn{no-space mode}. In this mode, spacing (either via @code{sp} or via blank lines) is disabled. The @code{bp} request to advance to the next page is also disabled, except if it is accompanied by a page number (see @ref{Page Control}, for more information). This mode ends when actual text is output or the @code{rs} request is -encountered. +encountered. The read-only number register @code{.ns} is set to@w{ }1. -@cindex top-level diversion -@cindex diversion, top-level This request is useful for macros which want to avoid that subsequent macros inadvertently insert some vertical space before the text starts -(for example, to set up the first paragraph after a section header). It -has no effect if not called within the top-level diversion -(@pxref{Diversions}). +(for example, to set up the first paragraph after a section header). @c XXX xref @endDefreq -@cindex top-level diversion -@cindex diversion, top-level @Defreq {rs, } -Disable no-space mode. It has no effect if not called within the -top-level diversion (@pxref{Diversions}). +Disable no-space mode. @c XXX xref @endDefreq @@ -7409,7 +7403,7 @@ This would be called as @Example -.vl $Id: groff.texinfo,v 1.74 2001/04/16 14:47:18 wlemb Exp $ +.vl $Id: groff.texinfo,v 1.77 2001/05/07 13:36:24 wlemb Exp $ @endExample @endDefesc diff -aruN groff-1.17/man/groff.man groff-1.17.1/man/groff.man --- groff-1.17/man/groff.man Sat Mar 24 00:07:49 2001 +++ groff-1.17.1/man/groff.man Mon Jun 11 21:59:20 2001 @@ -1,10 +1,10 @@ -.\" st -*- nroff -*- +'\" st -*- nroff -*- .ig groff.7 This file is part of groff, the GNU roff type-setting system. -Copyright (C) 2000 Free Software Foundation, Inc. +Copyright (C) 2000, 2001 Free Software Foundation, Inc. written by Bernd Warken Last update: 17 May 2000 @@ -866,6 +866,16 @@ .request .end is called. . +.REQ .am1 macro +Same as +.request .am +but with compatibility mode switched off during macro expansion. +. +.REQ .am1 macro end +Same as +.request .am +but with compatibility mode switched off during macro expansion. +. .REQ .as stringvar anything Append .argument anything @@ -892,6 +902,13 @@ when current font is .argument font . . +.REQ .blm +Unset the blank line macro. +. +.REQ .blm macro +Set the blank line macro to +.argument macro . +. .REQ .box End current diversion. . @@ -907,6 +924,7 @@ Divert and append to .argument macro , omitting a partially filled line. +. .REQ .bp Eject current page and begin new page. . @@ -914,13 +932,14 @@ Eject current page; next page number .argument \(+-N . . -.REQ .blm macro -Set the blank line macro to -.argument macro . -. .REQ .br Line break. . +.REQ .brp +Break and spread output line. +Same as +.esc p . +. .REQ .break Break out of a while loop. . @@ -1028,6 +1047,16 @@ .request .end is called. . +.REQ .de1 macro +Same as +.request .de +but with compatibility mode switched off during macro expansion. +. +.REQ .de1 macro end +Same as +.request .de +but with compatibility mode switched off during macro expansion. +. .REQ .dei macro Define or redefine a macro whose name is contained in the string register .argument macro @@ -1053,7 +1082,7 @@ .REQ .do name Interpret .request .name -with compatibility mode enabled. +with compatibility mode disabled. . .REQ .ds stringvar anything Set @@ -2414,6 +2443,11 @@ request that caused a trap to be sprung. Useful in conjunction with .register .trunc . +.REG .ns +.number 1 +if in no-space mode, +.number 0 +otherwise. .REG .o Current page offset. .REG .p Current page length. .REG .pn diff -aruN groff-1.17/man/roff.man groff-1.17.1/man/roff.man --- groff-1.17/man/roff.man Wed Nov 22 23:11:16 2000 +++ groff-1.17.1/man/roff.man Mon Jun 11 21:59:20 2001 @@ -1,4 +1,4 @@ -.\" t -*- nroff -*- +'\" t -*- nroff -*- .ig roff.7 diff -aruN groff-1.17/src/devices/grodvi/dvi.cc groff-1.17.1/src/devices/grodvi/dvi.cc --- groff-1.17/src/devices/grodvi/dvi.cc Tue Apr 10 14:54:12 2001 +++ groff-1.17.1/src/devices/grodvi/dvi.cc Fri Apr 20 15:34:57 2001 @@ -22,6 +22,8 @@ #include "driver.h" #include "nonposix.h" +extern "C" const char *Version_string; + #define DEFAULT_LINEWIDTH 40 static int linewidth = DEFAULT_LINEWIDTH; @@ -521,8 +523,8 @@ void dvi_printer::draw(int code, int *p, int np, const environment *env) { if (code == 'l') { - int x, y; - int height = 0, width; + int x = 0, y = 0; + int height = 0, width = 0; int thickness; if (line_thickness < 0) thickness = env->size*RES_7227*linewidth/1000; @@ -863,7 +865,6 @@ switch(c) { case 'v': { - extern const char *Version_string; printf("GNU grodvi (groff) version %s\n", Version_string); exit(0); break; diff -aruN groff-1.17/src/devices/grohtml/Makefile.sub groff-1.17.1/src/devices/grohtml/Makefile.sub --- groff-1.17/src/devices/grohtml/Makefile.sub Wed Jan 17 15:17:22 2001 +++ groff-1.17.1/src/devices/grohtml/Makefile.sub Sun Apr 22 00:17:42 2001 @@ -12,5 +12,4 @@ $(srcdir)/output.cc HDRS=\ $(srcdir)/html.h \ - $(srcdir)/html-chars.h \ $(srcdir)/html-text.h diff -aruN groff-1.17/src/devices/grohtml/grohtml.man groff-1.17.1/src/devices/grohtml/grohtml.man --- groff-1.17/src/devices/grohtml/grohtml.man Fri Apr 13 11:03:53 2001 +++ groff-1.17.1/src/devices/grohtml/grohtml.man Tue Jun 19 00:37:33 2001 @@ -37,8 +37,10 @@ .el .RB "[\ " "\\$1" "\ ]" .. .OP \-v?lrn +.OP \-D dir .OP \-F dir .OP \-i resolution +.OP \-I image stem .OP \-o image vertical offset .RI "[\ " files\|.\|.\|. "\ ]" .br @@ -88,8 +90,9 @@ .TP .B -n Generate simple heading anchors whenever a section/number heading is found. -Without the option the anchor value is the textual heading. This can cause problems -when a heading contains a `?' on some brousers (netscape). +Without the option the anchor value is the textual heading. +This can cause problems when a heading contains a `?' on some brousers +(netscape). This flag is automatically turned on if a heading contains an image. .TP .BI \-F dir @@ -101,10 +104,23 @@ .BR html . .TP .BI \-i resolution -select the resolution for all images. +Select the resolution for all images. By default this is 80 pixels per inch. Example: -i100 indicates 100 pixels per inch. .TP +.BI \-I stem +Determine the image stem name. +If omitted grohtml uses +.BI grohtml- XXX +.RI ( XXX +is the process ID). +.TP +.BI \-D dir +Inform +.B grohtml +to place all image files into directory +.IR dir . +.TP .B \-v Print the version number. .TP @@ -120,7 +136,10 @@ mounted at font positions 1 to 4. .SH DEPENDENCIES .B grohtml -is dependent upon the png utilities and gs. +is dependent upon the png utilities +.RB ( \&\%pnmcut ,\ \%pnmtopng ) +and GhostScript +.RB ( gs ). Images are generated whenever a table, picture, equation or line is encountered. .SH BUGS diff -aruN groff-1.17/src/devices/grohtml/html-chars.h groff-1.17.1/src/devices/grohtml/html-chars.h --- groff-1.17/src/devices/grohtml/html-chars.h Wed Jan 17 15:17:22 2001 +++ groff-1.17.1/src/devices/grohtml/html-chars.h Thu Jan 1 01:00:00 1970 @@ -1,27 +0,0 @@ -// -*- C++ -*- -/* Copyright (C) 2000, 2001 Free Software Foundation, Inc. - * - * Gaius Mulley (gaius@glam.ac.uk) wrote output.cc - * but it owes a huge amount of ideas and raw code from - * James Clark (jjc@jclark.com) grops/ps.cc. - * - * html-chars.h - * - * provides a diacritical character combination table for html - */ - - - -struct diacritical_desc { - char *mark; - char *second_troff_char; - char translation; -}; - - -static struct diacritical_desc diacritical_table[] = { - { "ad" , "aeiouyAEIOU" , ':' , }, /* */ - { "ac" , "cC" , ',' , }, /* cedilla */ - { "aa" , "aeiouyAEIOU" , '\'' , }, /* acute */ - { NULL , NULL , (char)0, }, -}; diff -aruN groff-1.17/src/devices/grohtml/html-text.cc groff-1.17.1/src/devices/grohtml/html-text.cc --- groff-1.17/src/devices/grohtml/html-text.cc Fri Apr 13 11:03:53 2001 +++ groff-1.17.1/src/devices/grohtml/html-text.cc Thu Apr 19 16:01:51 2001 @@ -350,7 +350,7 @@ done_bold(); done_italic(); done_tt(); - char *type = done_para(); + (void)done_para(); if (! is_present(PRE_TAG)) { push_para(PRE_TAG, ""); } @@ -661,7 +661,7 @@ * emit_space - writes a space providing that text was written beforehand. */ -int html_text::emit_space (void) +void html_text::emit_space (void) { if (space_emitted) { if (is_present(PRE_TAG)) { diff -aruN groff-1.17/src/devices/grohtml/html-text.h groff-1.17.1/src/devices/grohtml/html-text.h --- groff-1.17/src/devices/grohtml/html-text.h Mon Mar 19 16:33:03 2001 +++ groff-1.17.1/src/devices/grohtml/html-text.h Thu Apr 19 16:01:51 2001 @@ -78,7 +78,7 @@ void done_big (void); void do_indent (char *arg, int indent, int pageoff, int linelen); int emitted_text (void); - int emit_space (void); + void emit_space (void); int is_in_pre (void); void remove_tag (HTML_TAG tag); void remove_sub_sup (void); diff -aruN groff-1.17/src/devices/grohtml/output.cc groff-1.17.1/src/devices/grohtml/output.cc --- groff-1.17/src/devices/grohtml/output.cc Fri Mar 16 16:48:31 2001 +++ groff-1.17.1/src/devices/grohtml/output.cc Thu Apr 19 16:01:51 2001 @@ -71,7 +71,7 @@ */ word_list::word_list () - : head(0), tail(0), length(0) + : length(0), head(0), tail(0) { } @@ -208,6 +208,7 @@ fputc('\n', fp); col = last_word.flush(fp); } + return *this; } /* @@ -236,6 +237,7 @@ col += last_word.flush(fp); } } + return *this; } /* @@ -303,6 +305,7 @@ check_newline(0); newlines = auto_newlines; check_newline(0); + return *this; } /* diff -aruN groff-1.17/src/devices/grohtml/post-html.cc groff-1.17.1/src/devices/grohtml/post-html.cc --- groff-1.17/src/devices/grohtml/post-html.cc Fri Apr 13 11:03:53 2001 +++ groff-1.17.1/src/devices/grohtml/post-html.cc Tue Jun 19 00:37:33 2001 @@ -27,7 +27,6 @@ #include "stringclass.h" #include "cset.h" #include "html.h" -#include "html-chars.h" #include "html-text.h" #include @@ -39,6 +38,8 @@ #include #include +extern "C" const char *Version_string; + #if !defined(TRUE) # define TRUE (1==1) #endif @@ -102,11 +103,13 @@ * is_subsection - returns TRUE if a1..a2 is within b1..b2 */ +#if 0 static int is_subsection (int a1, int a2, int b1, int b2) { // easier to see whether this is not the case return( !((a1 < b1) || (a1 > b2) || (a2 < b1) || (a2 > b2)) ); } +#endif /* * is_intersection - returns TRUE if range a1..a2 intersects with b1..b2 @@ -357,11 +360,11 @@ style text_style; char *text_string; unsigned int text_length; - int minv, maxv, minh, maxh; + int minv, minh, maxv, maxh; int is_raw_command; // should the text be sent directly to the device? int is_tag; // is this a .br, .sp, .tl etc - int is_line; // is the command a ? int is_img_auto; // image created by eqn delim + int is_line; // is the command a ? int thickness; // the thickness of a line }; @@ -379,7 +382,7 @@ } text_glob::text_glob () - : text_string(0), text_length(0), minv(-1), maxv(-1), minh(-1), maxh(-1), + : text_string(0), text_length(0), minv(-1), minh(-1), maxv(-1), maxh(-1), is_raw_command(FALSE), is_tag(FALSE), is_line(FALSE), thickness(0) { } @@ -455,7 +458,7 @@ element_list *left; text_glob *datum; int lineno; - int minv, maxv, minh, maxh; + int minv, minh, maxv, maxh; element_list (text_glob *d, int line_number, @@ -465,7 +468,7 @@ }; element_list::element_list () - : right(0), left(0), datum(0), lineno(0), minv(-1), maxv(-1), minh(-1), maxh(-1) + : right(0), left(0), datum(0), lineno(0), minv(-1), minh(-1), maxv(-1), maxh(-1) { } @@ -2283,10 +2286,10 @@ end_tempindent(0), next_tag(INLINE), fill_on(TRUE), + linelength(0), pageoffset(0), indentation(0), prev_indent(0), - linelength(0), line_number(0) { #if defined(DEBUGGING) @@ -2769,7 +2772,6 @@ header.write_headings(stdout, FALSE); write_rule(); { - extern const char *Version_string; html.begin_comment("Creator : ") .put_string("groff ") .put_string("version ") @@ -2877,12 +2879,11 @@ { "version", no_argument, 0, 'v' }, { NULL, 0, 0, 0 } }; - while ((c = getopt_long(argc, argv, "o:i:F:vd?lrn", long_options, NULL)) + while ((c = getopt_long(argc, argv, "o:i:I:D:F:vd?lrn", long_options, NULL)) != EOF) switch(c) { case 'v': { - extern const char *Version_string; printf("GNU post-grohtml (groff) version %s\n", Version_string); exit(0); break; @@ -2902,6 +2903,12 @@ case 'i': /* handled by pre-html */ break; + case 'I': + /* handled by pre-html */ + break; + case 'D': + /* handled by pre-html */ + break; case 'n': simple_anchors = TRUE; break; @@ -2928,6 +2935,6 @@ static void usage(FILE *stream) { - fprintf(stream, "usage: %s [-vld?n] [-F dir] [files ...]\n", + fprintf(stream, "usage: %s [-vld?n] [-D dir] [-I image_stem] [-F dir] [files ...]\n", program_name); } diff -aruN groff-1.17/src/devices/grolbp/lbp.cc groff-1.17.1/src/devices/grolbp/lbp.cc --- groff-1.17/src/devices/grolbp/lbp.cc Tue Apr 10 14:54:14 2001 +++ groff-1.17.1/src/devices/grolbp/lbp.cc Fri Apr 20 15:34:58 2001 @@ -33,6 +33,8 @@ #include "nonposix.h" +extern "C" const char *Version_string; + static short int papersize = -1, // papersize orientation = -1 , // orientation paperlength = 0, // Custom Paper size @@ -151,7 +153,7 @@ static void wp54charset() { - int i; + unsigned int i; lbpputs("\033[714;100;29;0;32;120.}"); for (i = 0; i < sizeof(symset) ; i++) lbpputc(symset[i]); @@ -561,7 +563,7 @@ static int set_papersize(const char *papersize) { - int i; + unsigned int i; // First test for a standard (i.e. supported directly by the printer) // papersize @@ -715,7 +717,6 @@ case 'l' : orientation = 1; break; case 'v' : { - extern const char *Version_string; printf("GNU grolbp (groff) version %s\n", Version_string); exit(0); diff -aruN groff-1.17/src/devices/grolbp/lbp.h groff-1.17.1/src/devices/grolbp/lbp.h --- groff-1.17/src/devices/grolbp/lbp.h Thu Nov 16 22:10:35 2000 +++ groff-1.17.1/src/devices/grolbp/lbp.h Sat Apr 21 01:53:48 2001 @@ -36,7 +36,7 @@ static inline void -lbpprintf(char *format, ... ) +lbpprintf(const char *format, ... ) { /* Taken from cjet */ va_list stuff; @@ -46,7 +46,7 @@ }; static inline void -lbpputs(char *data) +lbpputs(const char *data) { fputs(data,lbpoutput); }; @@ -123,7 +123,7 @@ fprintf(lbpoutput,"\033[9r"); }; -static inline void vdmprintf(char *format, ... ); +static inline void vdmprintf(const char *format, ... ); static inline char * vdmnum(int num,char *result) @@ -179,7 +179,7 @@ }; static inline void -vdmprintf(char *format, ... ) +vdmprintf(const char *format, ... ) { /* Taken from cjet */ va_list stuff; diff -aruN groff-1.17/src/devices/grolj4/lj4.cc groff-1.17.1/src/devices/grolj4/lj4.cc --- groff-1.17/src/devices/grolj4/lj4.cc Tue Apr 10 14:54:14 2001 +++ groff-1.17.1/src/devices/grolj4/lj4.cc Fri Apr 20 15:34:58 2001 @@ -35,6 +35,8 @@ #include "driver.h" #include "nonposix.h" +extern "C" const char *Version_string; + static struct { const char *name; int code; @@ -123,7 +125,8 @@ const char *arg, const char *filename, int lineno) { - for (int i = 0; i < sizeof(command_table)/sizeof(command_table[0]); i++) { + for (unsigned int i = 0; + i < sizeof(command_table)/sizeof(command_table[0]); i++) { if (strcmp(command, command_table[i].s) == 0) { if (arg == 0) fatal_with_file_and_line(filename, lineno, @@ -568,7 +571,8 @@ static int lookup_paper_size(const char *s) { - for (int i = 0; i < sizeof(paper_table)/sizeof(paper_table[0]); i++) { + for (unsigned int i = 0; + i < sizeof(paper_table)/sizeof(paper_table[0]); i++) { // FIXME Perhaps allow unique prefix. if (strcasecmp(s, paper_table[i].name) == 0) return i; @@ -645,7 +649,6 @@ } case 'v': { - extern const char *Version_string; printf("GNU grolj4 (groff) version %s\n", Version_string); exit(0); break; diff -aruN groff-1.17/src/devices/grops/ps.cc groff-1.17.1/src/devices/grops/ps.cc --- groff-1.17/src/devices/grops/ps.cc Tue Apr 10 14:54:15 2001 +++ groff-1.17.1/src/devices/grops/ps.cc Fri Apr 20 15:34:58 2001 @@ -33,6 +33,8 @@ } #endif /* NEED_DECLARATION_PUTENV */ +extern "C" const char *Version_string; + static int landscape_flag = 0; static int manual_feed_flag = 0; static int ncopies = 1; @@ -1119,7 +1121,6 @@ putchar('\n'); out.set_file(stdout); { - extern const char *Version_string; out.begin_comment("Creator:") .comment_arg("groff") .comment_arg("version") @@ -1248,7 +1249,7 @@ error("X command without `ps:' tag ignored"); return; } - for (int i = 0; i < sizeof(proc_table)/sizeof(proc_table[0]); i++) + for (unsigned int i = 0; i < sizeof(proc_table)/sizeof(proc_table[0]); i++) if (strncmp(command, proc_table[i].name, p - command) == 0) { (this->*(proc_table[i].proc))(p, env); return; @@ -1495,7 +1496,6 @@ switch(c) { case 'v': { - extern const char *Version_string; printf("GNU grops (groff) version %s\n", Version_string); exit(0); break; diff -aruN groff-1.17/src/devices/grops/psrm.cc groff-1.17.1/src/devices/grops/psrm.cc --- groff-1.17/src/devices/grops/psrm.cc Thu Nov 16 22:10:36 2000 +++ groff-1.17.1/src/devices/grops/psrm.cc Thu Apr 19 16:01:52 2001 @@ -1,5 +1,6 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001 + Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. @@ -174,7 +175,7 @@ resource *r; for (r = resource_list; r; r = r->next) if (r->type == RESOURCE_FONT - && strlen(name) == r->name.length() + && strlen(name) == (size_t)r->name.length() && memcmp(name, r->name.contents(), r->name.length()) == 0) return r; string s(name); @@ -535,7 +536,7 @@ } int ri; for (ri = 0; ri < NRESOURCES; ri++) - if (strlen(resource_table[ri]) == *ptr - name + if (strlen(resource_table[ri]) == size_t(*ptr - name) && memcmp(resource_table[ri], name, *ptr - name) == 0) break; if (ri >= NRESOURCES) { @@ -717,7 +718,7 @@ ++(*ptr); } while (**ptr != '\0' && !white_space(**ptr)); for (int i = 0; i < n; i++) - if (strlen(s[i]) == *ptr - start + if (strlen(s[i]) == size_t(*ptr - start) && memcmp(s[i], start, *ptr - start) == 0) return i; return -1; @@ -859,7 +860,7 @@ } while (*ptr != '\0' && !white_space(*ptr)); int i; for (i = 0; i < NEXTENSIONS; i++) - if (strlen(extension_table[i]) == ptr - name + if (strlen(extension_table[i]) == size_t(ptr - name) && memcmp(extension_table[i], name, ptr - name) == 0) { flags |= (1 << i); break; diff -aruN groff-1.17/src/devices/grotty/tty.cc groff-1.17.1/src/devices/grotty/tty.cc --- groff-1.17/src/devices/grotty/tty.cc Tue Apr 10 14:54:15 2001 +++ groff-1.17.1/src/devices/grotty/tty.cc Fri Apr 20 15:34:59 2001 @@ -21,6 +21,8 @@ #include "driver.h" #include "device.h" +extern "C" const char *Version_string; + #ifndef SHRT_MIN #define SHRT_MIN (-32768) #endif @@ -442,7 +444,6 @@ switch(c) { case 'v': { - extern const char *Version_string; printf("GNU grotty (groff) version %s\n", Version_string); exit(0); break; diff -aruN groff-1.17/src/include/getopt.h groff-1.17.1/src/include/getopt.h --- groff-1.17/src/include/getopt.h Mon Apr 10 12:50:58 2000 +++ groff-1.17.1/src/include/getopt.h Sun Apr 22 11:23:01 2001 @@ -1,5 +1,5 @@ /* Declarations for getopt. - Copyright (C) 1989,90,91,92,93,94,96,97,98 Free Software Foundation, Inc. + Copyright (C) 1989-1994, 1996-1999, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -23,6 +23,17 @@ # define _GETOPT_H 1 #endif +/* If __GNU_LIBRARY__ is not already defined, either we are being used + standalone, or this is the first header included in the source file. + If we are being used with glibc, we need to include , but + that does not exist if we are standalone. So: if __GNU_LIBRARY__ is + not defined, include , which will pull in for us + if it's from glibc. (Why ctype.h? It's guaranteed to exist and it + doesn't flood the namespace with stuff the way some other headers do.) */ +#if !defined __GNU_LIBRARY__ +# include +#endif + #ifdef __cplusplus extern "C" { #endif @@ -82,7 +93,7 @@ struct option { -# if defined __STDC__ && __STDC__ +# if (defined __STDC__ && __STDC__) || defined __cplusplus const char *name; # else char *name; @@ -126,7 +137,7 @@ arguments to the option '\0'. This behavior is specific to the GNU `getopt'. */ -#if defined __STDC__ && __STDC__ +#if (defined __STDC__ && __STDC__) || defined __cplusplus # ifdef __GNU_LIBRARY__ /* Many other libraries have conflicting prototypes for getopt, with differences in the consts, in stdlib.h. To avoid compilation diff -aruN groff-1.17/src/include/groff-getopt.h groff-1.17.1/src/include/groff-getopt.h --- groff-1.17/src/include/groff-getopt.h Sat Apr 29 08:12:23 2000 +++ groff-1.17.1/src/include/groff-getopt.h Sat Apr 21 01:53:48 2001 @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2001 Free Software Foundation, Inc. Written by Werner Lemberg (wl@gnu.org) This file is part of groff. @@ -47,19 +47,19 @@ #define required_argument 1 #define optional_argument 2 -extern int getopt(int __argc, - char *const *__argv, - const char *__shortopts); -extern int getopt_long(int __argc, - char *const *__argv, - const char *__shortopts, - const struct option *__longopts, - int *__longind); -extern int getopt_long_only(int __argc, - char *const *__argv, - const char *__shortopts, - const struct option *__longopts, - int *__longind); +extern int getopt(int, // __argc + char *const *, // __argv + const char *); // __shortopts +extern int getopt_long(int, // __argc + char *const *, // __argv + const char *, // __shortopts + const struct option *, // __longopts + int *); // __longind +extern int getopt_long_only(int, // __argc + char *const *, // __argv + const char *, // __shortopts + const struct option *, // __longopts + int *); // __longind #ifdef __cplusplus } diff -aruN groff-1.17/src/include/lib.h groff-1.17.1/src/include/lib.h --- groff-1.17/src/include/lib.h Thu Dec 7 16:05:09 2000 +++ groff-1.17.1/src/include/lib.h Fri Apr 20 15:34:59 2001 @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989-2000 Free Software Foundation, Inc. +/* Copyright (C) 1989-2000, 2001 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. @@ -19,16 +19,18 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ extern "C" { -#ifndef strerror +#ifndef HAVE_STRERROR char *strerror(int); #endif const char *i_to_a(int); const char *if_to_a(int, int); } -/* stdio.h on IRIX and OSF/1 include getopt.h */ +/* stdio.h on IRIX, OSF/1, and UWIN includes getopt.h */ -#if !(defined(__sgi) || (defined(__osf__) && defined(__alpha))) +#if !(defined(__sgi) \ + || (defined(__osf__) && defined(__alpha)) \ + || defined(_UWIN)) #include #endif diff -aruN groff-1.17/src/include/nonposix.h groff-1.17.1/src/include/nonposix.h --- groff-1.17/src/include/nonposix.h Wed Apr 11 19:42:00 2001 +++ groff-1.17.1/src/include/nonposix.h Fri Apr 20 15:34:59 2001 @@ -27,7 +27,8 @@ # define setmode(f,m) _setmode(f,m) #endif -#if defined(__MSDOS__) || (defined(_WIN32) && !defined(__CYGWIN32__)) +#if defined(__MSDOS__) \ + || (defined(_WIN32) && !defined(_UWIN) && !defined(__CYGWIN32__)) /* Binary I/O nuisances. Note: "setmode" is right for DJGPP and Borland; Windows compilers might need _setmode or some such. */ diff -aruN groff-1.17/src/libs/libbib/index.cc groff-1.17.1/src/libs/libbib/index.cc --- groff-1.17/src/libs/libbib/index.cc Sun Jun 18 12:13:59 2000 +++ groff-1.17.1/src/libs/libbib/index.cc Thu Apr 19 16:01:53 2001 @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1989, 1990, 1991, 1992, 2001 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. @@ -408,7 +408,7 @@ buflen = length + 2; buf = new char[buflen]; } - if (fread(buf + 1, 1, length, fp) != length) + if (fread(buf + 1, 1, length, fp) != (size_t)length) error("fread on `%1' failed: %2", filename, strerror(errno)); else { buf[0] = '\n'; @@ -487,7 +487,7 @@ for (int h = hc % common_words_table_size; common_words_table[h]; --h) { - if (strlen(common_words_table[h]) == len + if (strlen(common_words_table[h]) == (size_t)len && memcmp(common_words_table[h], key_buffer, len) == 0) return 0; if (h == 0) diff -aruN groff-1.17/src/libs/libgroff/Makefile.sub groff-1.17.1/src/libs/libgroff/Makefile.sub --- groff-1.17/src/libs/libgroff/Makefile.sub Fri Mar 10 01:35:32 2000 +++ groff-1.17.1/src/libs/libgroff/Makefile.sub Fri Apr 20 15:35:00 2001 @@ -80,5 +80,5 @@ @echo Making version.cc @echo const char \*version_string = \"$(version)\"\; >$@ @echo const char \*revision_string = \"$(revision)\"\; >>$@ - @echo const char \*Version_string = \"$(version).$(revision)\"\; | \ + @echo extern \"C\" const char \*Version_string = \"$(version).$(revision)\"\; | \ sed -e 's/\.0\"/\"/' >>$@ diff -aruN groff-1.17/src/libs/libgroff/font.cc groff-1.17.1/src/libs/libgroff/font.cc --- groff-1.17/src/libs/libgroff/font.cc Wed Feb 28 10:28:54 2001 +++ groff-1.17.1/src/libs/libgroff/font.cc Thu Apr 19 16:01:53 2001 @@ -1,5 +1,6 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001 + Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. @@ -751,7 +752,7 @@ while (t.next()) { char *p = strtok(t.buf, WS); int found = 0; - int idx; + unsigned int idx; for (idx = 0; !found && idx < sizeof(table)/sizeof(table[0]); idx++) if (strcmp(table[idx].command, p) == 0) found = 1; diff -aruN groff-1.17/src/libs/libgroff/getopt.c groff-1.17.1/src/libs/libgroff/getopt.c --- groff-1.17/src/libs/libgroff/getopt.c Mon Apr 10 12:50:58 2000 +++ groff-1.17.1/src/libs/libgroff/getopt.c Sun Apr 22 11:23:02 2001 @@ -77,11 +77,12 @@ #endif #ifndef _ -/* This is for other GNU distributions with internationalized messages. - When compiling libc, the _ macro is predefined. */ -# ifdef HAVE_LIBINTL_H +/* This is for other GNU distributions with internationalized messages. */ +# if defined HAVE_LIBINTL_H || defined _LIBC # include -# define _(msgid) gettext (msgid) +# ifndef _ +# define _(msgid) gettext (msgid) +# endif # else # define _(msgid) (msgid) # endif @@ -521,6 +522,9 @@ if (optstring[0] == ':') print_errors = 0; + if (argc < 1) + return -1; + optarg = NULL; if (optind == 0 || !__getopt_initialized) @@ -670,7 +674,10 @@ pfound = p; indfound = option_index; } - else + else if (long_only + || pfound->has_arg != p->has_arg + || pfound->flag != p->flag + || pfound->val != p->val) /* Second or later nonexact match found. */ ambig = 1; } diff -aruN groff-1.17/src/libs/libgroff/tmpfile.cc groff-1.17.1/src/libs/libgroff/tmpfile.cc --- groff-1.17/src/libs/libgroff/tmpfile.cc Sat Apr 14 16:25:14 2001 +++ groff-1.17.1/src/libs/libgroff/tmpfile.cc Sat Apr 21 01:53:49 2001 @@ -29,12 +29,11 @@ #include "error.h" #include "nonposix.h" +#ifndef HAVE_MKSTEMP_PROTO extern "C" { - // Solaris 2.5.1 has these functions, - // but its stdlib.h fails to declare them. - char *mktemp(char *); - int mkstemp(char *); + extern int mkstemp (char *); } +#endif // If this is set, create temporary files there #define GROFF_TMPDIR_ENVVAR "GROFF_TMPDIR" diff -aruN groff-1.17/src/preproc/eqn/lex.cc groff-1.17.1/src/preproc/eqn/lex.cc --- groff-1.17/src/preproc/eqn/lex.cc Thu Nov 16 22:10:37 2000 +++ groff-1.17.1/src/preproc/eqn/lex.cc Thu Apr 19 16:01:54 2001 @@ -1,5 +1,6 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001 + Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. @@ -251,7 +252,7 @@ void init_table(const char *device) { - int i; + unsigned int i; for (i = 0; i < sizeof(token_table)/sizeof(token_table[0]); i++) { definition *def = new definition; def->is_macro = 0; diff -aruN groff-1.17/src/preproc/eqn/main.cc groff-1.17.1/src/preproc/eqn/main.cc --- groff-1.17/src/preproc/eqn/main.cc Fri Apr 13 11:03:56 2001 +++ groff-1.17.1/src/preproc/eqn/main.cc Fri Apr 20 15:35:00 2001 @@ -30,6 +30,7 @@ #define STARTUP_FILE "eqnrc" extern int yyparse(); +extern "C" const char *Version_string; static char *delim_search (char *, int); static int inline_equation (FILE *, string &, string &); @@ -303,7 +304,6 @@ break; case 'v': { - extern const char *Version_string; printf("GNU eqn (groff) version %s\n", Version_string); exit(0); break; diff -aruN groff-1.17/src/preproc/eqn/over.cc groff-1.17.1/src/preproc/eqn/over.cc --- groff-1.17/src/preproc/eqn/over.cc Sun Feb 6 10:38:04 2000 +++ groff-1.17.1/src/preproc/eqn/over.cc Thu Apr 19 16:01:54 2001 @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1989, 1990, 1991, 1992, 2001 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. @@ -65,7 +65,7 @@ set_script_size(); printf(".nr " SMALL_SIZE_FORMAT " \\n[.s]\n", uid); } - int mark_uid; + int mark_uid = 0; int res = num->compute_metrics(style); if (res) mark_uid = num->uid; diff -aruN groff-1.17/src/preproc/grn/grn.man groff-1.17.1/src/preproc/grn/grn.man --- groff-1.17/src/preproc/grn/grn.man Wed Nov 22 23:11:23 2000 +++ groff-1.17.1/src/preproc/grn/grn.man Mon Jun 11 21:59:20 2001 @@ -1,5 +1,6 @@ -.ig \"-*- nroff -*- -Copyright (C) 2000 Free Software Foundation, Inc. +'\" t -*- nroff -*- +.ig +Copyright (C) 2000, 2001 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice diff -aruN groff-1.17/src/preproc/grn/main.cc groff-1.17.1/src/preproc/grn/main.cc --- groff-1.17/src/preproc/grn/main.cc Sat Apr 14 16:25:14 2001 +++ groff-1.17.1/src/preproc/grn/main.cc Fri Apr 20 15:35:01 2001 @@ -82,6 +82,8 @@ #include "error.h" #include "defs.h" +extern "C" const char *Version_string; + /* database imports */ extern void HGPrintElt(ELT *element, int baseline); @@ -282,7 +284,6 @@ case '-': if (strcmp(*argv,"--version")==0) { case 'v': - extern const char *Version_string; printf("GNU grn (groff) version %s\n", Version_string); exit(0); break; diff -aruN groff-1.17/src/preproc/html/Makefile.sub groff-1.17.1/src/preproc/html/Makefile.sub --- groff-1.17/src/preproc/html/Makefile.sub Wed Jan 17 15:58:04 2001 +++ groff-1.17.1/src/preproc/html/Makefile.sub Fri Jun 15 00:07:55 2001 @@ -4,4 +4,3 @@ XLIBS=$(LIBGROFF) OBJS=pre-html.o pushbackbuffer.o CCSRCS=$(srcdir)/pre-html.cc $(srcdir)/pushbackbuffer.cc -NAMEPREFIX=$(g) diff -aruN groff-1.17/src/preproc/html/pre-html.cc groff-1.17.1/src/preproc/html/pre-html.cc --- groff-1.17/src/preproc/html/pre-html.cc Fri Apr 13 11:03:57 2001 +++ groff-1.17.1/src/preproc/html/pre-html.cc Thu Jun 21 09:56:00 2001 @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include @@ -47,7 +46,9 @@ #define PID_T int #endif /* not _POSIX_VERSION */ -extern char *strerror(); +#include + +extern "C" const char *Version_string; #include "pre-html.h" #include "pushbackbuffer.h" @@ -59,6 +60,7 @@ #define IMAGE_BOARDER_PIXELS 0 #define MAX_WIDTH 8 // inches #define INLINE_LEADER_CHAR '\\' +#define MAX_RETRIES 4096 // number of different page directory names to try before giving up #define TRANSPARENT "-background \"#FFF\" -transparent \"#FFF\"" @@ -82,20 +84,21 @@ // -1 means closed static int copyofstdoutfd =-1; // a copy of stdout, so we can restore stdout when // writing to post-html -static char *psFileName = 0; // name of postscript file -static char *regionFileName = 0; // name of file containing all image regions -static char *imagePageStem = 0; // stem of all files containing page images +static char *psFileName = NULL; // name of postscript file +static char *regionFileName = NULL; // name of file containing all image regions +static char *imagePageStem = NULL; // stem of all files containing page images static char *image_device = "pnmraw"; static int image_res = DEFAULT_IMAGE_RES; static int vertical_offset= DEFAULT_VERTICAL_OFFSET; -static char *image_template = 0; // image template filename +static char *image_template = NULL; // image template filename static int troff_arg = 0; // troff arg index -static char *command_prefix = 0; // optional prefix for some installations. -static char *troff_command = 0; +static char *command_prefix = NULL; // optional prefix for some installations. +static char *troff_command = NULL; +static char *image_dir = NULL; // user specified image directory #if defined(DEBUGGING) static int debug = FALSE; -static char *troffFileName = 0; // output of pre-html output which is sent to troff -Tps -static char *htmlFileName = 0; // output of pre-html output which is sent to troff -Thtml +static char *troffFileName = NULL; // output of pre-html output which is sent to troff -Tps +static char *htmlFileName = NULL; // output of pre-html output which is sent to troff -Thtml #endif @@ -119,6 +122,196 @@ fprintf(stderr, "%s: %s: %s", program_name, s, strerror(errno)); } + +#if 0 + +/* + * if/when vsnprintf becomes available on all *NIX machines we can use this function, + * until then we must use the more complex function below which performs hand built + * %d, %s and %%. + */ + +/* + * make_message - taken from man printf(3), creates a string via malloc + * and places the result of the va args into string. + * Finally the new string is returned. + */ + +char * +make_message (const char *fmt, ...) +{ + /* Guess we need no more than 100 bytes. */ + int n, size = 100; + char *p; + char *np; + va_list ap; + if ((p = (char *)malloc (size)) == NULL) + return NULL; + while (1) { + /* Try to print in the allocated space. */ + va_start(ap, fmt); + n = vsnprintf (p, size, fmt, ap); + va_end(ap); + /* If that worked, return the string. */ + if (n > -1 && n < size) { + if (size > n+1) { + np = strdup(p); + if (np == NULL) + sys_fatal("strdup"); + free(p); + return np; + } + return p; + } + /* Else try again with more space. */ + if (n > -1) /* glibc 2.1 */ + size = n+1; /* precisely what is needed */ + else /* glibc 2.0 */ + size *= 2; /* twice the old size */ + if ((np = (char *)realloc (p, size)) == NULL) { + free(p); /* realloc failed, free old, p. */ + return NULL; + } + p = np; /* use realloc'ed, p */ + } +} +#else + +/* + * lengthOfintToStr - returns the length of the proposed string value of i. + * Hand built log10. + */ + +int +lengthOfintToStr (int i) +{ + int n=0; + + if (i < 0) + sys_fatal("expecting positive integer value"); + + do { + i /= 10; + n++; + } while (i > 0); + return n; +} + +/* + * intToStr - returns a string containing the positive value of i. + * (int i is assumed to be positive). + */ + +char * +intToStr (int i) +{ + int n=lengthOfintToStr(i)+1; + char *p = (char *)malloc(n); + + if (p == NULL) + sys_fatal("malloc"); + + if (i < 0) + sys_fatal("expecting positive integer value"); + + n--; + p[n] = (char)0; + do { + n--; + p[n] = (char)((i % 10) + (int)'0'); + i /= 10; + } while (i > 0); + return( p ); +} + +/* + * make_message - returns a string built from a format specifier. + * This function does not use vsnprintf; it only + * understands primitive %%, %s, and %d specifiers. + */ + +char * +make_message (const char *fmt, ...) +{ + char *p = strdup(fmt); /* so we can splat a nul anywhere in the string */ + char *np; + char *l; + char *s; + char *num; + int search=0; + va_list ap; + + if (p == NULL) + sys_fatal("strdup"); + + va_start(ap, fmt); + while (p) { + int lenp=strlen(p); + char *f = strchr(p+search, '%'); + + search = f-p; + np = p; + + if (f == NULL) { + va_end(ap); + return p; + } + switch (*(f+1)) { + + case 'd': + l = strdup(f+2); + if (l == NULL) + sys_fatal("strdup"); + *f = (char)0; + num = intToStr(va_arg(ap, int)); + np = (char *)malloc(strlen(p)+strlen(num)+strlen(l)+1); + if (np == NULL) + sys_fatal("malloc"); + strcpy(np, p); + strcat(np, num); + strcat(np, l); + search += strlen(np)-lenp; + free(num); + free(l); + break; + case 's': + /* concat */ + l = f+2; + if (l == NULL) + sys_fatal("strdup"); + s = va_arg(ap, char *); + *f = (char)0; + np = (char *)malloc(strlen(l)+1+strlen(p)+strlen(s)); + if (np == NULL) + sys_fatal("malloc"); + strcpy(np, p); + strcat(np, s); + strcat(np, l); + search += strlen(s); + break; + case '%': + /* remove one of the two % that we have seen */ + *f = (char)0; + l = f+1; + np = (char *)malloc(strlen(l)+1+strlen(p)); + if (np == NULL) + sys_fatal("malloc"); + strcpy(np, p); + strcat(np, l); + search++; + break; + default: + sys_fatal("unexpected format specifier"); + return NULL; + } + free(p); + p = np; + } + va_end(ap); + return NULL; +} +#endif + /* * the class and methods for retaining ascii text */ @@ -174,7 +367,7 @@ char_buffer::~char_buffer() { - while (head != 0) { + while (head != NULL) { char_block *temp = head; head = head->next; delete temp; @@ -187,12 +380,10 @@ int char_buffer::read_file (FILE *fp) { - int i=0; - unsigned int old_used; int n; while (! feof(fp)) { - if (tail == 0) { + if (tail == NULL) { tail = new char_block; head = tail; } else { @@ -246,14 +437,55 @@ * makeFileName - creates the image filename template. */ -void makeFileName () +static void makeFileName (void) { - char buffer[8192]; + char *s; + + if ((image_dir != NULL) && (strchr(image_dir, '%') != NULL)) { + error("cannot use a `%%' within the image directory name"); + exit(1); + } + + if ((image_template != NULL) && (strchr(image_template, '%') != NULL)) { + error("cannot use a `%%' within the image template"); + exit(1); + } + + if (image_dir == NULL) { + image_dir = ""; + } else if ((strlen(image_dir)>0) && (image_dir[strlen(image_dir)-1] != '/')) { + image_dir = make_message("%s/", image_dir); + if (image_dir == NULL) + sys_fatal("make_message"); + } + + if (image_template == NULL) + s = make_message("%sgrohtml-%d", image_dir, (int)getpid()); + else { + s = make_message("%s%s", image_dir, image_template); + } + if (s == NULL) + sys_fatal("make_message"); - sprintf(buffer, "grohtml-%d", (int)getpid()); - strcat(buffer, "-%d"); - image_template = (char *)malloc(strlen(buffer)+1); - strcpy(image_template, buffer); + image_template = (char *)malloc(strlen("-%d")+strlen(s)+1); + if (image_template == NULL) + sys_fatal("malloc"); + strcpy(image_template, s); + strcat(image_template, "-%d"); + free(s); +} + +/* + * checkImageDir - checks to see whether the image directory is available. + */ + +static void checkImageDir (void) +{ + if ((image_dir != NULL) && (strcmp(image_dir, "") != 0)) + if (! ((mkdir(image_dir, 0700) == 0) || (errno == EEXIST))) { + error("cannot create directory `%1'", image_dir); + exit(1); + } } /* @@ -266,12 +498,12 @@ /* * emit image name and enable output */ - writeString("\\O2\\O1\\O4\n"); + writeString("\\O[2]\\O[1]\\O[4]\n"); } else { /* * postscript, therefore emit image boundaries */ - writeString("\\O2\\O4\n"); + writeString("\\O[2]\\O[4]\n"); } } @@ -286,8 +518,8 @@ static void write_start_image (IMAGE_ALIGNMENT pos, int is_html) { if (pos == INLINE) { - writeString("\\O3\\O5'"); - writeString(image_template); writeString(".png'"); + writeString("\\O[3]\\O[5 "); + writeString(image_template); writeString(".png]"); } else { writeString(".begin \\{\\\n"); switch (pos) { @@ -310,10 +542,10 @@ writeString("\\}\n"); } if (is_html) { - writeString("\\O0\n"); + writeString("\\O[0]\n"); } else { // reset min/max registers - writeString("\\O0\\O1\n"); + writeString("\\O[0]\\O[1]\n"); } } @@ -456,10 +688,9 @@ void char_buffer::write_file_troff (void) { char_block *t=head; - int r; int i=0; - if (t != 0) { + if (t != NULL) { do { /* * remember to check the shortest string last @@ -479,7 +710,7 @@ } else { write_upto_newline(&t, &i, FALSE); } - } while (t != 0); + } while (t != NULL); } if (close(stdoutfd) < 0) sys_fatal("close"); @@ -526,7 +757,7 @@ resolution = res; maxx = max_width; imageName = name; - next = 0; + next = NULL; } /* @@ -567,7 +798,7 @@ imageList::~imageList () { - while (head != 0) { + while (head != NULL) { imageItem *i = head; head = head->next; delete i; @@ -578,21 +809,51 @@ * createAllPages - creates a set of images, one per page. */ -static void createAllPages (void) +static int createAllPages (void) { char buffer[4096]; + char *s; + int retries = MAX_RETRIES; + + imagePageStem = xtmptemplate("-page-"); + strcpy(buffer, imagePageStem); - sprintf(buffer, - "echo showpage | gs -q -dSAFER -sDEVICE=%s -r%d -sOutputFile=%s%%d %s - > /dev/null 2>&1 \n", - image_device, - image_res, - imagePageStem, - psFileName); + do { + if (mktemp(imagePageStem) == NULL) { + sys_fatal("mktemp"); + return -1; + } + if (mkdir(imagePageStem, 0700) == 0) break; + if (errno == EEXIST) { + // directory already exists, try another name + retries--; + if (retries == 0) { + // time to give up + sys_fatal("mkdir"); + return -1; + } + } else { + // another error, quit + sys_fatal("mkdir"); + return -1; + } + strcpy(imagePageStem, buffer); + } while (1); + + s = make_message("echo showpage | gs -q -dSAFER -sDEVICE=%s -r%d -sOutputFile=%s/%%d %s - > /dev/null 2>&1 \n", + image_device, + image_res, + imagePageStem, + psFileName); + if (s == NULL) + sys_fatal("make_message"); #if defined(DEBUGGING) - fwrite(buffer, sizeof(char), strlen(buffer), stderr); + fwrite(s, sizeof(char), strlen(s), stderr); fflush(stderr); #endif - system(buffer); + system(s); + free(s); + return 0; } /* @@ -602,30 +863,22 @@ static void removeAllPages (void) { #if !defined(DEBUGGING) - char buffer[4096]; + char *s=NULL; int i=1; do { - sprintf(buffer, "%s%d", imagePageStem, i); + if (s) + free(s); + s = make_message("%s/%d", imagePageStem, i); + if (s == NULL) + sys_fatal("make_message"); i++; - } while (remove(buffer) == 0); + } while (unlink(s) == 0); + rmdir(imagePageStem); #endif } /* - * abs - returns the absolute value. - */ - -int abs (int x) -{ - if (x < 0) { - return( -x ); - } else { - return( x ); - } -} - -/* * min - returns the minimum of two numbers. */ @@ -658,23 +911,26 @@ static void createImage (imageItem *i) { if (i->X1 != -1) { - char buffer[4096]; + char *s; int x1 = max(min(i->X1, i->X2)*image_res/POSTSCRIPTRES-1*IMAGE_BOARDER_PIXELS, 0); int y1 = max((image_res*vertical_offset/72)+min(i->Y1, i->Y2)*image_res/POSTSCRIPTRES-IMAGE_BOARDER_PIXELS, 0); int x2 = max(i->X1, i->X2)*image_res/POSTSCRIPTRES+1*IMAGE_BOARDER_PIXELS; int y2 = (image_res*vertical_offset/72)+max(i->Y1, i->Y2)*image_res/POSTSCRIPTRES+1*IMAGE_BOARDER_PIXELS; - sprintf(buffer, - "pnmcut %d %d %d %d < %s%d | pnmtopng %s > %s \n", - x1, y1, x2-x1+1, y2-y1+1, - imagePageStem, - i->pageNo, - TRANSPARENT, - i->imageName); + s = make_message("pnmcut %d %d %d %d < %s/%d | pnmtopng %s > %s \n", + x1, y1, x2-x1+1, y2-y1+1, + imagePageStem, + i->pageNo, + TRANSPARENT, + i->imageName); + if (s == NULL) + sys_fatal("make_message"); + #if defined(DEBUGGING) - fprintf(stderr, buffer); + fprintf(stderr, s); #endif - system(buffer); + system(s); + free(s); #if defined(DEBUGGING) } else { fprintf(stderr, "ignoring image as x1 coord is -1\n"); @@ -691,7 +947,7 @@ { imageItem *i = new imageItem(x1, y1, x2, y2, page, res, maxx, name); - if (head == 0) { + if (head == NULL) { head = i; tail = i; } else { @@ -712,10 +968,9 @@ void char_buffer::write_file_html (void) { char_block *t =head; - char *name; int i=0; - if (t != 0) { + if (t != NULL) { stop(); do { /* @@ -737,7 +992,7 @@ } else { write_upto_newline(&t, &i, TRUE); } - } while (t != 0); + } while (t != NULL); } if (close(stdoutfd) < 0) sys_fatal("close"); @@ -760,7 +1015,6 @@ static void generateImages (char *regionFileName) { pushBackBuffer *f=new pushBackBuffer(regionFileName); - char ch; while (f->putPB(f->getPB()) != eof) { if (f->isString("grohtml-info:page")) { @@ -775,10 +1029,10 @@ listOfImages.add(x1, y1, x2, y2, page, res, maxx, name); while ((f->putPB(f->getPB()) != '\n') && (f->putPB(f->getPB()) != eof)) { - ch = f->getPB(); + (void)f->getPB(); } if (f->putPB(f->getPB()) == '\n') { - ch = f->getPB(); + (void)f->getPB(); } } else { /* @@ -931,6 +1185,9 @@ char **new_argv = (char **)malloc((argc+2)*sizeof(char *)); int i=0; + if (new_argv == NULL) + sys_fatal("malloc"); + while (i)\n"); + fprintf(stream, " place all png files into image_directory\n"); } /* - * scanArguments - scans for -P-i and -P-o arguments. + * scanArguments - scans for -P-i, -P-o, -P-D and -P-I arguments. */ int scanArguments (int argc, char **argv) @@ -1020,13 +1279,16 @@ int i=1; while (i='a') && (ch<='f')) ); } +#endif /* * readInt - returns an integer from the input stream. diff -aruN groff-1.17/src/preproc/pic/main.cc groff-1.17.1/src/preproc/pic/main.cc --- groff-1.17/src/preproc/pic/main.cc Tue Apr 10 14:54:17 2001 +++ groff-1.17.1/src/preproc/pic/main.cc Fri Apr 20 15:35:03 2001 @@ -21,6 +21,7 @@ #include "pic.h" extern int yyparse(); +extern "C" const char *Version_string; output *out; @@ -568,7 +569,6 @@ break; case 'v': { - extern const char *Version_string; printf("GNU pic (groff) version %s\n", Version_string); exit(0); break; diff -aruN groff-1.17/src/preproc/pic/pic.cc groff-1.17.1/src/preproc/pic/pic.cc --- groff-1.17/src/preproc/pic/pic.cc Tue Nov 14 21:40:28 2000 +++ groff-1.17.1/src/preproc/pic/pic.cc Thu Apr 19 16:01:55 2001 @@ -1,6 +1,6 @@ #ifndef lint /*static char yysccsid[] = "from: @(#)yaccpar 1.9 (Berkeley) 02/21/93";*/ -static char yyrcsid[] = "$Id: pic.cc,v 1.3 2000/11/14 20:40:28 wlemb Exp $"; +static char yyrcsid[] = "$Id: pic.cc,v 1.4 2001/04/19 14:01:55 wlemb Exp $"; #endif #define YYBYACC 1 #define YYMAJOR 1 @@ -3217,7 +3217,8 @@ if (strcmp(name, "scale") == 0) { // When the scale changes, reset all scaled pre-defined variables to // their default values. - for (int i = 0; i < sizeof(defaults_table)/sizeof(defaults_table[0]); i++) + for (unsigned int i = 0; + i < sizeof(defaults_table)/sizeof(defaults_table[0]); i++) if (defaults_table[i].scaled) define_variable(defaults_table[i].name, val*defaults_table[i].val); } @@ -3236,7 +3237,8 @@ void reset(const char *nm) { - for (int i = 0; i < sizeof(defaults_table)/sizeof(defaults_table[0]); i++) + for (unsigned int i = 0; + i < sizeof(defaults_table)/sizeof(defaults_table[0]); i++) if (strcmp(nm, defaults_table[i].name) == 0) { double val = defaults_table[i].val; if (defaults_table[i].scaled) { @@ -3256,7 +3258,8 @@ // aren't scaled because `scale' is not scaled, and changing the // value of `scale' will reset all the pre-defined variables that // are scaled. - for (int i = 0; i < sizeof(defaults_table)/sizeof(defaults_table[0]); i++) + for (unsigned int i = 0; + i < sizeof(defaults_table)/sizeof(defaults_table[0]); i++) if (!defaults_table[i].scaled) define_variable(defaults_table[i].name, defaults_table[i].val); } diff -aruN groff-1.17/src/preproc/pic/pic.y groff-1.17.1/src/preproc/pic/pic.y --- groff-1.17/src/preproc/pic/pic.y Thu Nov 16 22:10:40 2000 +++ groff-1.17.1/src/preproc/pic/pic.y Thu Apr 19 16:01:55 2001 @@ -1,4 +1,5 @@ -/* Copyright (C) 1989, 1990, 1991, 1992, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001 + Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. @@ -1622,7 +1623,8 @@ if (strcmp(name, "scale") == 0) { // When the scale changes, reset all scaled pre-defined variables to // their default values. - for (int i = 0; i < sizeof(defaults_table)/sizeof(defaults_table[0]); i++) + for (unsigned int i = 0; + i < sizeof(defaults_table)/sizeof(defaults_table[0]); i++) if (defaults_table[i].scaled) define_variable(defaults_table[i].name, val*defaults_table[i].val); } @@ -1641,7 +1643,8 @@ void reset(const char *nm) { - for (int i = 0; i < sizeof(defaults_table)/sizeof(defaults_table[0]); i++) + for (unsigned int i = 0; + i < sizeof(defaults_table)/sizeof(defaults_table[0]); i++) if (strcmp(nm, defaults_table[i].name) == 0) { double val = defaults_table[i].val; if (defaults_table[i].scaled) { @@ -1661,7 +1664,8 @@ // aren't scaled because `scale' is not scaled, and changing the // value of `scale' will reset all the pre-defined variables that // are scaled. - for (int i = 0; i < sizeof(defaults_table)/sizeof(defaults_table[0]); i++) + for (unsigned int i = 0; + i < sizeof(defaults_table)/sizeof(defaults_table[0]); i++) if (!defaults_table[i].scaled) define_variable(defaults_table[i].name, defaults_table[i].val); } diff -aruN groff-1.17/src/preproc/refer/command.cc groff-1.17.1/src/preproc/refer/command.cc --- groff-1.17/src/preproc/refer/command.cc Sun Feb 6 10:38:31 2000 +++ groff-1.17.1/src/preproc/refer/command.cc Thu Apr 19 16:01:56 2001 @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1989, 1990, 1991, 1992, 2001 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. @@ -755,7 +755,8 @@ static void execute_command(const char *name, int argc, argument *argv) { - for (int i = 0; i < sizeof(command_table)/sizeof(command_table[0]); i++) + for (unsigned int i = 0; + i < sizeof(command_table)/sizeof(command_table[0]); i++) if (strcmp(name, command_table[i].name) == 0) { if (check_args(command_table[i].arg_types, name, argc, argv)) (*command_table[i].func)(argc, argv); diff -aruN groff-1.17/src/preproc/refer/ref.cc groff-1.17.1/src/preproc/refer/ref.cc --- groff-1.17/src/preproc/refer/ref.cc Sun Feb 6 10:38:37 2000 +++ groff-1.17.1/src/preproc/refer/ref.cc Thu Apr 19 16:01:56 2001 @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1989, 1990, 1991, 1992, 2001 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. @@ -327,13 +327,13 @@ break; } if (ptr < end) { - int first_word_len = ptr - s - 1; + unsigned int first_word_len = ptr - s - 1; const char *ae = articles.contents() + articles.length(); for (const char *a = articles.contents(); a < ae; a = strchr(a, '\0') + 1) if (first_word_len == strlen(a)) { - int j; + unsigned int j; for (j = 0; j < first_word_len; j++) if (a[j] != cmlower(s[j])) break; @@ -951,7 +951,7 @@ while (ptr < end && csalpha(*ptr)) ptr++; if (ptr - start >= 3) { - for (int i = 0; i < sizeof(months)/sizeof(months[0]); i++) { + for (unsigned int i = 0; i < sizeof(months)/sizeof(months[0]); i++) { const char *q = months[i]; const char *p = start; for (; p < ptr; p++, q++) diff -aruN groff-1.17/src/preproc/refer/refer.cc groff-1.17.1/src/preproc/refer/refer.cc --- groff-1.17/src/preproc/refer/refer.cc Tue Apr 10 14:54:17 2001 +++ groff-1.17.1/src/preproc/refer/refer.cc Fri Apr 20 15:35:04 2001 @@ -25,6 +25,8 @@ #include "search.h" #include "command.h" +extern "C" const char *Version_string; + const char PRE_LABEL_MARKER = '\013'; const char POST_LABEL_MARKER = '\014'; const char LABEL_MARKER = '\015'; // label_type is added on @@ -344,7 +346,6 @@ } if (strcmp(opt,"-version")==0) { case 'v': - extern const char *Version_string; printf("GNU refer (groff) version %s\n", Version_string); exit(0); break; diff -aruN groff-1.17/src/preproc/refer/token.cc groff-1.17.1/src/preproc/refer/token.cc --- groff-1.17/src/preproc/refer/token.cc Sun Feb 6 10:38:43 2000 +++ groff-1.17.1/src/preproc/refer/token.cc Thu Apr 19 16:01:56 2001 @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1989, 1990, 1991, 1992, 2001 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. @@ -181,7 +181,7 @@ for (;;) { if (token_table[n].tok == 0) break; - if (strlen(token_table[n].tok) == end - start + if (strlen(token_table[n].tok) == size_t(end - start) && memcmp(token_table[n].tok, start, end - start) == 0) return &(token_table[n].ti); if (n == 0) diff -aruN groff-1.17/src/preproc/soelim/soelim.cc groff-1.17.1/src/preproc/soelim/soelim.cc --- groff-1.17/src/preproc/soelim/soelim.cc Tue Apr 10 14:54:18 2001 +++ groff-1.17.1/src/preproc/soelim/soelim.cc Fri Apr 20 15:35:04 2001 @@ -30,12 +30,13 @@ #include "stringclass.h" #include "nonposix.h" -static int include_list_length; +static size_t include_list_length; static char **include_list; int compatible_flag = 0; extern int interpret_lf_args(const char *); +extern "C" const char *Version_string; int do_file(const char *filename); @@ -77,7 +78,6 @@ switch (opt) { case 'v': { - extern const char *Version_string; printf("GNU soelim (groff) version %s\n", Version_string); exit(0); break; @@ -183,18 +183,18 @@ { char *path = include_list[j]; if (0 == strcmp(path, ".")) - whole_filename = filename; + whole_filename = filename; else - whole_filename = string(path) + "/" + filename; + whole_filename = string(path) + "/" + filename; whole_filename += '\0'; errno = 0; fp = fopen(whole_filename.contents(), "r"); if (fp != 0) - break; + break; if (errno != ENOENT) { - error("can't open `%1': %2", + error("can't open `%1': %2", whole_filename.contents(), strerror(errno)); - return 0; + return 0; } } if (j >= include_list_length) diff -aruN groff-1.17/src/preproc/tbl/main.cc groff-1.17.1/src/preproc/tbl/main.cc --- groff-1.17/src/preproc/tbl/main.cc Fri Apr 13 11:03:58 2001 +++ groff-1.17.1/src/preproc/tbl/main.cc Fri Apr 20 15:35:05 2001 @@ -25,6 +25,8 @@ #define MAX_POINT_SIZE 99 #define MAX_VERTICAL_SPACING 72 +extern "C" const char *Version_string; + static int compatible_flag = 0; class table_input { @@ -731,7 +733,7 @@ int pre_vline = 0; int got_format = 0; int got_period = 0; - format_type t; + format_type t = FORMAT_LEFT; for (;;) { if (c == EOF) { error("end of input while processing format"); @@ -1470,7 +1472,6 @@ break; case 'v': { - extern const char *Version_string; printf("GNU tbl (groff) version %s\n", Version_string); exit(0); break; diff -aruN groff-1.17/src/roff/groff/groff.cc groff-1.17.1/src/roff/groff/groff.cc --- groff-1.17/src/roff/groff/groff.cc Fri Apr 13 11:03:58 2001 +++ groff-1.17.1/src/roff/groff/groff.cc Fri Apr 20 15:35:05 2001 @@ -82,6 +82,8 @@ void print(int is_last, FILE *fp); }; +extern "C" const char *Version_string; + int lflag = 0; char *spooler = 0; char *postdriver = 0; @@ -175,7 +177,6 @@ case 'v': vflag = 1; { - extern const char *Version_string; printf("GNU groff version %s\n", Version_string); printf("Copyright (C) 1989-2001 Free Software Foundation, Inc.\n" "GNU groff comes with ABSOLUTELY NO WARRANTY.\n" diff -aruN groff-1.17/src/roff/groff/pipeline.c groff-1.17.1/src/roff/groff/pipeline.c --- groff-1.17/src/roff/groff/pipeline.c Thu Nov 16 22:10:43 2000 +++ groff-1.17.1/src/roff/groff/pipeline.c Fri Apr 20 15:35:06 2001 @@ -1,4 +1,5 @@ -/* Copyright (C) 1989, 1990, 1991, 1992, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001 + Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. @@ -34,7 +35,11 @@ #include #endif +#ifdef HAVE_STRERROR +#include +#else extern char *strerror(); +#endif #ifdef _POSIX_VERSION @@ -98,7 +103,8 @@ have a workable groff by using the good-ole DOS pipe simulation via temporary files... */ -#if defined(__MSDOS__) || (defined(_WIN32) && !defined(__CYGWIN32__)) +#if defined(__MSDOS__) \ + || (defined(_WIN32) && !defined(_UWIN) && !defined(__CYGWIN32__)) #include #include diff -aruN groff-1.17/src/roff/grog/Makefile.sub groff-1.17.1/src/roff/grog/Makefile.sub --- groff-1.17/src/roff/grog/Makefile.sub Wed Nov 15 23:29:52 2000 +++ groff-1.17.1/src/roff/grog/Makefile.sub Fri Jun 15 12:55:08 2001 @@ -1,6 +1,5 @@ MAN1=grog.n CLEANADD=grog -NAMEPREFIX=$(g) all: grog diff -aruN groff-1.17/src/roff/nroff/nroff.man groff-1.17.1/src/roff/nroff/nroff.man --- groff-1.17/src/roff/nroff/nroff.man Wed Nov 15 23:29:53 2000 +++ groff-1.17.1/src/roff/nroff/nroff.man Fri May 4 22:20:44 2001 @@ -1,5 +1,5 @@ .ig \"-*- nroff -*- -Copyright (C) 1989-2000 Free Software Foundation, Inc. +Copyright (C) 1989-2001 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -30,14 +30,18 @@ .ie \\n(.$-1 .RI "[\ \fB\\$1\fP" "\\$2" "\ ]" .el .RB "[\ " "\\$1" "\ ]" .. -.OP \-v .OP \-h .OP \-i .OP \-m name .OP \-n num .OP \-o list +.OP \-p .OP \-r cn +.OP \-t +.OP \-S .OP \-T name +.OP \-U +.OP \-v .RI "[\ " file\|.\|.\|. "\ ]" .br .ad \na @@ -47,24 +51,38 @@ script emulates the .B nroff command using groff. -The -.B \-T -option with an argument other than +Only .BR ascii , .BR latin1 , .BR utf8 , -or +and .B cp1047 -will be ignored (and -.B \-Tascii -will be used). +are valid arguments for the +.B -T +option. +If an invalid or no +.BR \-T +option is given, +.B @g@nroff +checks the current locale to select a default output device. +It first tries the +.B locale +program, then the environment variables +.BR LC_ALL , +.BR LC_CTYPE , +and +.BR LANG , +and finally the +.B LESSCHARSET +environment variable. +.PP The .B \-h option is equivalent to the -.B grotty +.BR grotty 's .B \-h -option. +option (i.e., using tabs in the output). The .BR \-i , .BR \-n , @@ -74,16 +92,22 @@ .B \-r options have the effect described in .BR @g@troff (@MAN1EXT@). -In addition +In addition, .B @g@nroff -silently ignores options of +silently ignores the options .BR \-e , -.B \-q -or -.BR \-s . +.BR \-q , +and +.BR \-s +(which are not implemented in +.BR @g@troff ). Options +.B \-p +(pic), +.B \-t +(tbl), .B \-S -(safer) and +(safer), and .B \-U (unsafe) are passed to .BR groff . @@ -97,7 +121,7 @@ .B GROFF_BIN_PATH A colon separated list of directories in which to search for the .B groff -executable. If unset, `@BINDIR@' is used. +executable before searching in PATH. If unset, `@BINDIR@' is used. .SH NOTES This shell script is basically intended for use with .BR man (1), diff -aruN groff-1.17/src/roff/nroff/nroff.sh groff-1.17.1/src/roff/nroff/nroff.sh --- groff-1.17/src/roff/nroff/nroff.sh Tue Apr 10 14:54:20 2001 +++ groff-1.17.1/src/roff/nroff/nroff.sh Wed Apr 18 22:22:37 2001 @@ -49,7 +49,7 @@ -[mrnoT]) echo "$prog: option $1 requires an argument" >&2 exit 1 ;; - -i | -[mrno]*) + -[ipt] | -[mrno]*) opts="$opts $1" ;; -Tascii | -Tlatin1 | -Tutf8 | -Tcp1047) T=$1 ;; @@ -70,7 +70,7 @@ echo "GNU nroff (groff) version @VERSION@" exit 0 ;; --help) - echo "usage: nroff [-h] [-i] [-mNAME] [-nNUM] [-oLIST] [-rCN] [-Tname] [FILE...]" + echo "usage: nroff [-h] [-i] [-mNAME] [-nNUM] [-oLIST] [-p] [-rCN] [-t] [-Tname] [FILE...]" exit 0 ;; --) shift @@ -89,10 +89,8 @@ # This shell script is intended for use with man, so warnings are # probably not wanted. Also load nroff-style character definitions. -OLD_PATH=$PATH : ${GROFF_BIN_PATH=@BINDIR@} export GROFF_BIN_PATH -PATH=$GROFF_BIN_PATH -PATH=$OLD_PATH groff $safer -Wall -mtty-char $T $opts ${1+"$@"} +PATH=$GROFF_BIN_PATH:$PATH groff $safer -Wall -mtty-char $T $opts ${1+"$@"} # eof diff -aruN groff-1.17/src/roff/troff/dictionary.cc groff-1.17.1/src/roff/troff/dictionary.cc --- groff-1.17/src/roff/troff/dictionary.cc Sun Feb 6 10:36:31 2000 +++ groff-1.17.1/src/roff/troff/dictionary.cc Thu Apr 19 16:01:58 2001 @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1989, 1990, 1991, 1992, 2001 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. @@ -25,10 +25,10 @@ // is `p' a good size for a hash table -static int is_good_size(int p) +static int is_good_size(unsigned int p) { - const int SMALL = 10; - unsigned i; + const unsigned int SMALL = 10; + unsigned int i; for (i = 2; i <= p/2; i++) if (p % i == 0) return 0; diff -aruN groff-1.17/src/roff/troff/div.cc groff-1.17.1/src/roff/troff/div.cc --- groff-1.17/src/roff/troff/div.cc Sat Mar 24 00:07:51 2001 +++ groff-1.17.1/src/roff/troff/div.cc Thu Jun 21 09:56:01 2001 @@ -49,7 +49,8 @@ static vunits needed_space; diversion::diversion(symbol s) -: prev(0), nm(s), vertical_position(V0), high_water_mark(V0), marked_place(V0) +: prev(0), nm(s), vertical_position(V0), high_water_mark(V0), + no_space_mode(0), marked_place(V0) { } @@ -249,6 +250,7 @@ void macro_diversion::output(node *nd, int retain_size, vunits vs, vunits post_vs, hunits width) { + no_space_mode = 0; vertical_size v(vs, post_vs); while (nd != 0) { nd->set_vertical_size(&v); @@ -316,7 +318,7 @@ page_length(units_per_inch*11), prev_page_offset(units_per_inch), page_offset(units_per_inch), page_trap_list(0), have_next_page_number(0), - ejecting_page(0), before_first_page(1), no_space_mode(0) + ejecting_page(0), before_first_page(1) { } @@ -722,15 +724,13 @@ void no_space() { - if (curdiv == topdiv) - topdiv->no_space_mode = 1; + curdiv->no_space_mode = 1; skip_line(); } void restore_spacing() { - if (curdiv == topdiv) - topdiv->no_space_mode = 0; + curdiv->no_space_mode = 0; skip_line(); } @@ -755,8 +755,8 @@ n = curenv->get_vertical_spacing(); while (!tok.newline() && !tok.eof()) tok.next(); - if (!unpostpone_traps()) - curdiv->space(n); + if (!unpostpone_traps() && !curdiv->no_space_mode) + curdiv->space(n); else // The line might have had line spacing that was truncated. truncated_space += n; @@ -767,9 +767,10 @@ void blank_line() { curenv->do_break(); - if (!trap_sprung_flag) + if (!trap_sprung_flag && !curdiv->no_space_mode) { curdiv->space(curenv->get_vertical_spacing()); - else + curenv->add_html_tag(".sp", 1); + } else truncated_space += curenv->get_vertical_spacing(); } @@ -1114,6 +1115,23 @@ topdiv->before_first_page = 2; } +class no_space_mode_reg : public reg { +public: + int get_value(units *); + const char *get_string(); +}; + +int no_space_mode_reg::get_value(units *val) +{ + *val = curdiv->no_space_mode; + return 1; +} + +const char *no_space_mode_reg::get_string() +{ + return curdiv->no_space_mode ? "1" : "0"; +} + void init_div_requests() { init_request("wh", when_request); @@ -1143,6 +1161,7 @@ number_reg_dictionary.define(".z", new diversion_name_reg); number_reg_dictionary.define(".o", new page_offset_reg); number_reg_dictionary.define(".p", new page_length_reg); + number_reg_dictionary.define(".ns", new no_space_mode_reg); number_reg_dictionary.define(".d", new vertical_position_reg); number_reg_dictionary.define(".h", new high_water_mark_reg); number_reg_dictionary.define(".t", new distance_to_next_trap_reg); diff -aruN groff-1.17/src/roff/troff/div.h groff-1.17.1/src/roff/troff/div.h --- groff-1.17/src/roff/troff/div.h Sun Jan 28 10:22:23 2001 +++ groff-1.17.1/src/roff/troff/div.h Mon May 7 15:36:25 2001 @@ -33,6 +33,7 @@ vunits vertical_position; vunits high_water_mark; public: + int no_space_mode; vunits marked_place; diversion(symbol s = NULL_SYMBOL); virtual ~diversion(); @@ -101,7 +102,6 @@ int ejecting_page; // Is the current page being ejected? public: int before_first_page; - int no_space_mode; top_level_diversion(); void output(node *nd, int retain_size, vunits vs, vunits post_vs, hunits width); diff -aruN groff-1.17/src/roff/troff/env.cc groff-1.17.1/src/roff/troff/env.cc --- groff-1.17/src/roff/troff/env.cc Sat Apr 14 16:25:14 2001 +++ groff-1.17.1/src/roff/troff/env.cc Fri May 18 08:04:18 2001 @@ -1117,7 +1117,7 @@ void space_size() { int n; - if (get_integer(&n) && !compatible_flag) { + if (get_integer(&n)) { curenv->space_size = n; if (has_arg() && get_integer(&n)) curenv->sentence_space_size = n; @@ -2135,7 +2135,7 @@ } } -void environment::do_break() +void environment::do_break(int spread) { if (curdiv == topdiv && topdiv->before_first_page) { topdiv->begin_page(); @@ -2146,7 +2146,7 @@ if (line) { line = new space_node(H0, line); // this is so that hyphenation works space_total++; - possibly_break_line(); + possibly_break_line(0, spread); } while (line != 0 && line->discardable()) { width_total -= line->width(); @@ -2185,17 +2185,27 @@ return !current_tab && line == 0 && pending_lines == 0; } -void break_request() +void do_break_request(int spread) { while (!tok.newline() && !tok.eof()) tok.next(); if (break_flag) { - curenv->do_break(); + curenv->do_break(spread); curenv->add_html_tag(".br"); } tok.next(); } +void break_request() +{ + do_break_request(0); +} + +void break_spread_request() +{ + do_break_request(1); +} + void title() { if (curdiv == topdiv && topdiv->before_first_page) { @@ -3014,6 +3024,7 @@ init_request("cc", control_char); init_request("c2", no_break_control_char); init_request("br", break_request); + init_request("brp", break_spread_request); init_request("tl", title); init_request("ta", set_tabs); init_request("linetabs", line_tabs_request); diff -aruN groff-1.17/src/roff/troff/env.h groff-1.17.1/src/roff/troff/env.h --- groff-1.17/src/roff/troff/env.h Sat Apr 14 16:25:15 2001 +++ groff-1.17.1/src/roff/troff/env.h Fri May 18 08:04:18 2001 @@ -275,7 +275,7 @@ void interrupt(); void spread() { spread_flag = 1; } void possibly_break_line(int start_here = 0, int forced = 0); - void do_break(); // .br + void do_break(int spread = 0); // .br void final_break(); void add_html_tag_eol(); void add_html_tag(const char *); @@ -345,6 +345,5 @@ void read_hyphen_file(const char *name); extern int break_flag; -extern int compatible_flag; extern symbol default_family; extern int translate_space_to_dummy; diff -aruN groff-1.17/src/roff/troff/input.cc groff-1.17.1/src/roff/troff/input.cc --- groff-1.17/src/roff/troff/input.cc Fri Apr 13 11:03:59 2001 +++ groff-1.17.1/src/roff/troff/input.cc Wed Jun 20 01:05:44 2001 @@ -73,6 +73,8 @@ // initial size of buffer for reading names; expanded as necessary #define ABUF_SIZE 16 +extern "C" const char *Version_string; + #ifdef COLUMN void init_column_requests(); #endif /* COLUMN */ @@ -106,7 +108,7 @@ static int escape_char = '\\'; static symbol end_macro_name; static symbol blank_line_macro_name; -int compatible_flag = 0; +static int compatible_flag = 0; int ascii_output_flag = 0; int suppress_output_flag = 0; int is_html = 0; @@ -133,6 +135,7 @@ static request_or_macro *lookup_request(symbol); static int get_delim_number(units *, int); static int get_delim_number(units *, int, units); +static symbol get_delim_file_name(); static int get_line_arg(units *res, int si, charinfo **cp); static int read_size(int *); static symbol get_delim_name(); @@ -206,6 +209,8 @@ virtual int internal_level() { return 0; } virtual int is_file() { return 0; } virtual int is_macro() { return 0; } + virtual void save_compatible_flag(int) {} + virtual int get_compatible_flag() { return 0; } }; input_iterator::input_iterator() @@ -406,6 +411,8 @@ static int get_level(); static void clear(); static void pop_macro(); + static void save_compatible_flag(int); + static int get_compatible_flag(); static int limit; private: @@ -626,6 +633,16 @@ add_return_boundary(); } +inline void input_stack::save_compatible_flag(int f) +{ + top->save_compatible_flag(f); +} + +inline int input_stack::get_compatible_flag() +{ + return top->get_compatible_flag(); +} + void backtrace_request() { input_stack::backtrace_all(); @@ -1272,6 +1289,13 @@ if (cc != escape_char || escape_char == 0) { handle_normal_char: switch(cc) { + case COMPATIBLE_SAVE: + input_stack::save_compatible_flag(compatible_flag); + compatible_flag = 0; + continue; + case COMPATIBLE_RESTORE: + compatible_flag = input_stack::get_compatible_flag(); + continue; case EOF: type = TOKEN_EOF; return; @@ -2049,14 +2073,14 @@ void do_request() { - int saved_compatible_flag = compatible_flag; + int old_compatible_flag = compatible_flag; compatible_flag = 0; symbol nm = get_name(); if (nm.is_null()) skip_line(); else interpolate_macro(nm); - compatible_flag = saved_compatible_flag; + compatible_flag = old_compatible_flag; } inline int possibly_handle_first_page_transition() @@ -2701,6 +2725,7 @@ char_block *bp; int count; // of characters remaining node *nd; + int saved_compatible_flag; protected: symbol nm; string_iterator(); @@ -2710,6 +2735,8 @@ int peek(); int get_location(int, const char **, int *); void backtrace(); + void save_compatible_flag(int f) { saved_compatible_flag = f; } + int get_compatible_flag() { return saved_compatible_flag; } }; string_iterator::string_iterator(const macro &m, const char *p, symbol s) @@ -3447,11 +3474,12 @@ static symbol dot_symbol("."); enum define_mode { DEFINE_NORMAL, DEFINE_APPEND, DEFINE_IGNORE }; +enum calling_mode { CALLING_NORMAL, CALLING_INDIRECT, CALLING_DISABLE_COMP }; -void do_define_macro(define_mode mode, int indirect) +void do_define_macro(define_mode mode, calling_mode calling) { symbol nm, term; - if (indirect) { + if (calling == CALLING_INDIRECT) { symbol temp1 = get_name(1); if (temp1.is_null()) { skip_line(); @@ -3497,6 +3525,8 @@ mac = *mm; } int bol = 1; + if (calling == CALLING_DISABLE_COMP) + mac.append(COMPATIBLE_SAVE); for (;;) { while (c == ESCAPE_NEWLINE) { if (mode == DEFINE_NORMAL || mode == DEFINE_APPEND) @@ -3505,7 +3535,7 @@ } if (bol && c == '.') { const char *s = term.contents(); - int d; + int d = 0; // see if it matches term int i; for (i = 0; s[i] != 0; i++) { @@ -3517,25 +3547,27 @@ && ((i == 2 && compatible_flag) || (d = get_copy(&n)) == ' ' || d == '\n')) { // we found it - if (d == '\n') - tok.make_newline(); - else - tok.make_space(); - if (mode == DEFINE_APPEND || mode == DEFINE_NORMAL) { - if (!mm) { - mm = new macro; - request_dictionary.define(nm, mm); - } - *mm = mac; - } - if (term != dot_symbol) { - ignoring = 0; - interpolate_macro(term); - } - else - skip_line(); - return; - } + if (d == '\n') + tok.make_newline(); + else + tok.make_space(); + if (mode == DEFINE_APPEND || mode == DEFINE_NORMAL) { + if (!mm) { + mm = new macro; + request_dictionary.define(nm, mm); + } + if (calling == CALLING_DISABLE_COMP) + mac.append(COMPATIBLE_RESTORE); + *mm = mac; + } + if (term != dot_symbol) { + ignoring = 0; + interpolate_macro(term); + } + else + skip_line(); + return; + } if (mode == DEFINE_APPEND || mode == DEFINE_NORMAL) { mac.append(c); for (int j = 0; j < i; j++) @@ -3575,23 +3607,33 @@ void define_macro() { - do_define_macro(DEFINE_NORMAL, 0); + do_define_macro(DEFINE_NORMAL, CALLING_NORMAL); +} + +void define_nocomp_macro() +{ + do_define_macro(DEFINE_NORMAL, CALLING_DISABLE_COMP); } void define_indirect_macro() { - do_define_macro(DEFINE_NORMAL, 1); + do_define_macro(DEFINE_NORMAL, CALLING_INDIRECT); } void append_macro() { - do_define_macro(DEFINE_APPEND, 0); + do_define_macro(DEFINE_APPEND, CALLING_NORMAL); +} + +void append_nocomp_macro() +{ + do_define_macro(DEFINE_APPEND, CALLING_DISABLE_COMP); } void ignore() { ignoring = 1; - do_define_macro(DEFINE_IGNORE, 0); + do_define_macro(DEFINE_IGNORE, CALLING_NORMAL); ignoring = 0; } @@ -3923,6 +3965,11 @@ } } else if (csdigit(c)) { + if (!inc && c == '0') { + // special case -- \s0 means to revert to previous size. + *x = 0; + return 1; + } val = c - '0'; if (!inc && c != '0' && c < '4') { tok.next(); @@ -3965,6 +4012,11 @@ default: assert(0); } + if (*x <= 0) { + warning(WARN_RANGE, + "\\s request results in non-positive point size; set to 1"); + *x = 1; + } return 1; } else { @@ -4033,6 +4085,65 @@ } } +static symbol get_delim_file_name() +{ + token start; + start.next(); + if (start.eof()) { + error("end of input at start of delimited file name"); + return NULL_SYMBOL; + } + if (start.newline()) { + error("can't delimit file name with a newline"); + return NULL_SYMBOL; + } + int start_level = input_stack::get_level(); + char abuf[ABUF_SIZE]; + char *buf = abuf; + int buf_size = ABUF_SIZE; + int i = 0; + for (;;) { + if (i + 1 > buf_size) { + if (buf == abuf) { + buf = new char[ABUF_SIZE*2]; + memcpy(buf, abuf, buf_size); + buf_size = ABUF_SIZE*2; + } + else { + char *old_buf = buf; + buf = new char[buf_size*2]; + memcpy(buf, old_buf, buf_size); + buf_size *= 2; + a_delete old_buf; + } + } + tok.next(); + if (tok.ch() == ']' && input_stack::get_level() == start_level) + break; + if ((buf[i] = tok.ch()) == 0) { + error("missing delimiter (got %1)", tok.description()); + if (buf != abuf) + a_delete buf; + return NULL_SYMBOL; + } + i++; + } + buf[i] = '\0'; + if (buf == abuf) { + if (i == 0) { + error("empty delimited file name"); + return NULL_SYMBOL; + } + else + return symbol(buf); + } + else { + symbol s(buf); + a_delete buf; + return s; + } +} + // Implement \R static void do_register() @@ -4273,6 +4384,14 @@ { tok.next(); int c = tok.ch(); + if (c != '[') { + error("argument(s) of \\O must be enclosed in brackets (got %1)", + char(c)); + return 0; + } + tok.next(); + c = tok.ch(); + tok.next(); switch (c) { case '0': if (begin_level == 1) @@ -4293,7 +4412,12 @@ begin_level--; break; case '5': { - symbol filename = get_delim_name(); + symbol filename = get_delim_file_name(); + tok.next(); + if (filename.is_null()) { + error("missing filename as second argument to \\O"); + return 0; + } if (begin_level == 1) return new suppress_node(filename, 'i'); return 0; @@ -6034,12 +6158,14 @@ string_list(const char *ss) : s(ss), next(0) {} }; +#if 0 static void prepend_string(const char *s, string_list **p) { string_list *l = new string_list(s); l->next = *p; *p = l; } +#endif static void add_string(const char *s, string_list **p) { @@ -6095,7 +6221,6 @@ switch(c) { case 'v': { - extern const char *Version_string; printf("GNU troff (groff) version %s\n", Version_string); exit(0); break; @@ -6346,7 +6471,9 @@ init_request("as", append_string); init_request("de", define_macro); init_request("dei", define_indirect_macro); + init_request("de1", define_nocomp_macro); init_request("am", append_macro); + init_request("am1", append_nocomp_macro); init_request("ig", ignore); init_request("rm", remove_macro); init_request("rn", rename_macro); @@ -6638,7 +6765,7 @@ static int lookup_warning(const char *name) { - for (int i = 0; + for (unsigned int i = 0; i < sizeof(warning_table)/sizeof(warning_table[0]); i++) if (strcmp(name, warning_table[i].name) == 0) diff -aruN groff-1.17/src/roff/troff/input.h groff-1.17.1/src/roff/troff/input.h --- groff-1.17/src/roff/troff/input.h Sun Feb 4 21:54:01 2001 +++ groff-1.17.1/src/roff/troff/input.h Mon May 7 01:29:21 2001 @@ -54,6 +54,8 @@ const int ESCAPE_RIGHT_PARENTHESIS = 0206; const int ESCAPE_TILDE = 0207; const int ESCAPE_COLON = 0210; +const int COMPATIBLE_SAVE = 0211; +const int COMPATIBLE_RESTORE = 0212; #else /* IS_EBCDIC_HOST */ @@ -88,5 +90,7 @@ const int ESCAPE_RIGHT_PARENTHESIS = 066; const int ESCAPE_TILDE = 067; const int ESCAPE_COLON = 070; +const int COMPATIBLE_SAVE = 071; +const int COMPATIBLE_RESTORE = 072; #endif /* IS_EBCDIC_HOST */ diff -aruN groff-1.17/src/roff/troff/node.h groff-1.17.1/src/roff/troff/node.h --- groff-1.17/src/roff/troff/node.h Fri Apr 6 15:03:18 2001 +++ groff-1.17.1/src/roff/troff/node.h Wed May 16 13:07:53 2001 @@ -106,11 +106,11 @@ virtual const char *type() = 0; }; -inline node::node() : next(0) +inline node::node() : next(0), last(0) { } -inline node::node(node *n) : next(n) +inline node::node(node *n) : next(n), last(0) { } @@ -181,9 +181,9 @@ }; struct width_list { - width_list *next; hunits width; hunits sentence_width; + width_list *next; width_list(hunits, hunits); width_list(width_list *); }; diff -aruN groff-1.17/src/roff/troff/reg.cc groff-1.17.1/src/roff/troff/reg.cc --- groff-1.17/src/roff/troff/reg.cc Mon Nov 13 17:51:31 2000 +++ groff-1.17.1/src/roff/troff/reg.cc Thu Apr 19 16:01:58 2001 @@ -1,5 +1,6 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001 + Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. @@ -87,7 +88,7 @@ case '1': if (width <= 0) return i_to_a(value); - else if (width > sizeof(buf) - 2) + else if (width > int(sizeof(buf) - 2)) sprintf(buf, "%.*d", int(sizeof(buf) - 2), int(value)); else sprintf(buf, "%.*d", width, int(value)); diff -aruN groff-1.17/src/roff/troff/token.h groff-1.17.1/src/roff/troff/token.h --- groff-1.17/src/roff/troff/token.h Wed Mar 7 21:48:41 2001 +++ groff-1.17.1/src/roff/troff/token.h Wed May 16 13:07:53 2001 @@ -72,7 +72,7 @@ int space(); // is the current token a space? int stretchable_space(); // is the current token a stretchable space? int white_space(); // is the current token space or tab? - int special(); // is the current token a special character? + int special(); // is the current token a special character? int newline(); // is the current token a newline? int tab(); // is the current token a tab? int leader(); diff -aruN groff-1.17/src/roff/troff/troff.man groff-1.17.1/src/roff/troff/troff.man --- groff-1.17/src/roff/troff/troff.man Sat Apr 14 16:25:15 2001 +++ groff-1.17.1/src/roff/troff/troff.man Fri May 18 08:04:18 2001 @@ -739,6 +739,12 @@ or string diversion is currently undefined or if it is defined to be a request; normally they modify the value of an existing object. .TP +.BI .am1\ xx\ yy +Similar to +.BR .am , +but compatibility mode is switched off during execution. +On entry, the current compatibility mode is saved and restored at exit. +.TP .BI .asciify\ xx This request `unformats' the diversion .I xx @@ -810,6 +816,10 @@ .B br request. .TP +.B .brp +This is the same as +.BR \ep . +.TP .BI .cflags\ n\ c1\ c2\|.\|.\|. Characters .IR c1 , @@ -966,6 +976,12 @@ \&.de aa bb .RE .TP +.BI .de1\ xx\ yy +Similar to +.BR .de , +but compatibility mode is switched off during execution. +On entry, the current compatibility mode is saved and restored at exit. +.TP .BI .do\ xxx Interpret .I .xxx @@ -1709,8 +1725,7 @@ Initially both the word space size and the sentence space size are 12. Contrary to UNIX troff, GNU troff handles this request in nroff mode -also (if not in compatibility mode); a given value is then rounded down -to the nearest multiple of\~12. +also; a given value is then rounded down to the nearest multiple of\~12. The sentence space size is used in two circumstances: if the end of a sentence occurs at the end of a line in fill mode, then both an inter-word space and a sentence space will be added; @@ -1857,6 +1872,12 @@ .B \en[.trunc] register. .TP +.B \en[.ns] +.B 1 +if no-space mode is active, +.B 0 +otherwise. +.TP .B \en[.pn] The number of the next page: either the value set by a @@ -2445,6 +2466,10 @@ .SH "SEE ALSO" . . +.BR groff (@MAN7EXT@) +-- This is a short but complete reference of all requests, registers, and +escapes. +.PP .BR groff (@MAN1EXT@), .BR @g@tbl (@MAN1EXT@), .BR @g@pic (@MAN1EXT@), diff -aruN groff-1.17/src/utils/addftinfo/addftinfo.cc groff-1.17.1/src/utils/addftinfo/addftinfo.cc --- groff-1.17/src/utils/addftinfo/addftinfo.cc Tue Apr 10 14:54:21 2001 +++ groff-1.17.1/src/utils/addftinfo/addftinfo.cc Fri Apr 20 15:35:07 2001 @@ -31,6 +31,8 @@ #include "cset.h" #include "guess.h" +extern "C" const char *Version_string; + static void usage(FILE *stream); static void usage(); static void version(); @@ -67,7 +69,8 @@ int main(int argc, char **argv) { program_name = argv[0]; - for (int i = 1; i < argc; i++) { + int i; + for (i = 1; i < argc; i++) { if (!strcmp(argv[i], "-v") || !strcmp(argv[i],"--version")) version(); if (!strcmp(argv[i],"--help")) { @@ -99,7 +102,6 @@ param.comma_depth = DEFAULT_COMMA_DEPTH; param.desc_depth = DEFAULT_DESC_DEPTH; param.body_depth = DEFAULT_BODY_DEPTH; - int i; for (i = 1; i < argc && argv[i][0] == '-'; i++) { if (argv[i][1] == '-' && argv[i][2] == '\0') { i++; @@ -107,7 +109,7 @@ } if (i + 1 >= argc) usage(); - int j; + size_t j; for (j = 0;; j++) { if (j >= sizeof(param_table)/sizeof(param_table[0])) fatal("parameter `%1' not recognized", argv[i] + 1); @@ -142,7 +144,6 @@ static void version() { - extern const char *Version_string; printf("GNU addftinfo (groff) version %s\n", Version_string); exit(0); } diff -aruN groff-1.17/src/utils/afmtodit/afmtodit.pl groff-1.17.1/src/utils/afmtodit/afmtodit.pl --- groff-1.17/src/utils/afmtodit/afmtodit.pl Thu Nov 16 22:10:46 2000 +++ groff-1.17.1/src/utils/afmtodit/afmtodit.pl Sun May 6 01:18:05 2001 @@ -25,7 +25,7 @@ do 'getopts.pl'; do Getopts('ve:sd:i:a:n'); -if (opt_v) { +if ($opt_v) { print "GNU afmtodit (groff) version @VERSION@\n"; exit 0; } diff -aruN groff-1.17/src/utils/hpftodit/hpftodit.cc groff-1.17.1/src/utils/hpftodit/hpftodit.cc --- groff-1.17/src/utils/hpftodit/hpftodit.cc Tue Apr 10 14:54:22 2001 +++ groff-1.17.1/src/utils/hpftodit/hpftodit.cc Fri Apr 20 15:35:08 2001 @@ -41,6 +41,8 @@ #include "cset.h" #include "nonposix.h" +extern "C" const char *Version_string; + #define SIZEOF(v) (sizeof(v)/sizeof(v[0])) const int MULTIPLIER = 3; @@ -163,10 +165,10 @@ char_info *char_table; uint32 nchars; -int msl_name_table_size = 0; +unsigned int msl_name_table_size = 0; name_list **msl_name_table = 0; -int n_symbol_sets; +unsigned int n_symbol_sets; symbol_set *symbol_set_table; static int special_flag = 0; @@ -226,7 +228,6 @@ break; case 'v': { - extern const char *Version_string; printf("GNU hpftodit (groff) version %s\n", Version_string); exit(0); } @@ -337,7 +338,7 @@ void File::seek(uint32 n) { - if (end_ - buf_ < n) + if ((uint32)(end_ - buf_) < n) fatal("unexpected end of file"); ptr_ = buf_ + n; } @@ -437,7 +438,7 @@ uint32 symbol_set_dir_length = tag_info(symbol_set_tag).count; n_symbol_sets = symbol_set_dir_length/14; symbol_set_table = new symbol_set[n_symbol_sets]; - int i; + unsigned int i; for (i = 0; i < n_symbol_sets; i++) { f.seek(tag_info(symbol_set_tag).value + i*14); (void)f.get_uint32(); @@ -445,7 +446,7 @@ uint32 off2 = f.get_uint32(); (void)f.get_uint16(); // what's this for? f.seek(off1); - int j; + unsigned int j; uint16 kind = 0; for (j = 0; j < off2 - off1; j++) { unsigned char c = f.get_byte(); @@ -465,7 +466,7 @@ ? special_symbol_sets : text_symbol_sets); for (i = 0; symbol_set_selectors[i] != 0; i++) { - int j; + unsigned int j; for (j = 0; j < n_symbol_sets; j++) if (symbol_set_table[j].select == symbol_set_selectors[i]) break; @@ -610,13 +611,13 @@ }; unsigned ligature_mask = 0; - int i; + unsigned int i; for (i = 0; i < nchars; i++) { uint16 msl = char_table[i].msl; if (msl < msl_name_table_size && char_table[i].symbol_set != NO_SYMBOL_SET) { for (name_list *p = msl_name_table[msl]; p; p = p->next) - for (int j = 0; j < SIZEOF(ligature_chars); j++) + for (unsigned int j = 0; j < SIZEOF(ligature_chars); j++) if (strcmp(p->name, ligature_chars[j]) == 0) { ligature_mask |= 1 << j; break; @@ -671,7 +672,7 @@ require_tag(lower_descent_tag); printf("charset\n"); - int i; + unsigned int i; for (i = 0; i < nchars; i++) { uint16 msl = char_table[i].msl; if (msl < msl_name_table_size @@ -782,7 +783,7 @@ fclose(fp); return 0; } - if (n >= msl_name_table_size) { + if ((size_t)n >= msl_name_table_size) { size_t old_size = msl_name_table_size; name_list **old_table = msl_name_table; msl_name_table_size = n + 256; diff -aruN groff-1.17/src/utils/indxbib/indxbib.cc groff-1.17.1/src/utils/indxbib/indxbib.cc --- groff-1.17/src/utils/indxbib/indxbib.cc Tue Apr 10 14:54:22 2001 +++ groff-1.17.1/src/utils/indxbib/indxbib.cc Sat Apr 21 01:53:49 2001 @@ -37,12 +37,13 @@ #include "nonposix.h" +extern "C" const char *Version_string; + +#ifndef HAVE_MKSTEMP_PROTO extern "C" { - // Solaris 2.5.1 has these functions, - // but its stdlib.h fails to declare them. - char *mktemp(char *); - int mkstemp(char *); + extern int mkstemp(char *); } +#endif #define DEFAULT_HASH_TABLE_SIZE 997 #define TEMP_INDEX_TEMPLATE "indxbibXXXXXX" @@ -180,7 +181,6 @@ break; case 'v': { - extern const char *Version_string; printf("GNU indxbib (groff) version %s\n", Version_string); exit(0); break; @@ -232,7 +232,8 @@ else name_max = dir_name_max("."); const char *filename = p ? p + 1 : basename; - if (name_max >= 0 && strlen(filename) + sizeof(INDEX_SUFFIX) - 1 > name_max) + if (name_max >= 0 && + long(strlen(filename) + sizeof(INDEX_SUFFIX) - 1) > name_max) fatal("`%1.%2' is too long for a filename", filename, INDEX_SUFFIX); if (p) { p++; @@ -502,7 +503,7 @@ // every CR character before a Newline. if (c == '\r') { int peek = getc(fp); - if (peek = '\n') { + if (peek == '\n') { byte_count++; c = peek; } @@ -784,7 +785,7 @@ static void fwrite_or_die(const void *ptr, int size, int nitems, FILE *fp) { - if (fwrite(ptr, size, nitems, fp) != nitems) + if (fwrite(ptr, size, nitems, fp) != (size_t)nitems) fatal("fwrite failed: %1", strerror(errno)); } diff -aruN groff-1.17/src/utils/lkbib/lkbib.cc groff-1.17.1/src/utils/lkbib/lkbib.cc --- groff-1.17/src/utils/lkbib/lkbib.cc Tue Apr 10 14:54:23 2001 +++ groff-1.17.1/src/utils/lkbib/lkbib.cc Sat Apr 28 00:13:03 2001 @@ -18,8 +18,8 @@ with groff; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include #include +#include #include #include #include @@ -32,6 +32,8 @@ #include "refid.h" #include "search.h" +extern "C" const char *Version_string; + static void usage(FILE *stream) { fprintf(stream, "usage: %s [-nv] [-p database] [-i XYZ] [-t N] keys ...\n", @@ -78,7 +80,6 @@ } case 'v': { - extern const char *Version_string; printf("GNU lkbib (groff) version %s\n", Version_string); exit(0); break; @@ -126,7 +127,7 @@ int len; int count; for (count = 0; iter.next(&start, &len); count++) { - if (fwrite(start, 1, len, stdout) != len) + if (fwrite(start, 1, len, stdout) != (size_t)len) fatal("write error on stdout: %1", strerror(errno)); // Can happen for last reference in file. if (start[len - 1] != '\n') diff -aruN groff-1.17/src/utils/lookbib/lookbib.cc groff-1.17.1/src/utils/lookbib/lookbib.cc --- groff-1.17/src/utils/lookbib/lookbib.cc Tue Apr 10 14:54:23 2001 +++ groff-1.17.1/src/utils/lookbib/lookbib.cc Fri Apr 20 15:35:10 2001 @@ -34,6 +34,7 @@ extern "C" { int isatty(int); + const char *Version_string; } static void usage(FILE *stream) @@ -76,7 +77,6 @@ } case 'v': { - extern const char *Version_string; printf("GNU lookbib (groff) version %s\n", Version_string); exit(0); break; @@ -120,7 +120,7 @@ int len; int count; for (count = 0; iter.next(&start, &len); count++) { - if (fwrite(start, 1, len, stdout) != len) + if (fwrite(start, 1, len, stdout) != (size_t)len) fatal("write error on stdout: %1", strerror(errno)); // Can happen for last reference in file. if (start[len - 1] != '\n') diff -aruN groff-1.17/src/utils/pfbtops/pfbtops.c groff-1.17.1/src/utils/pfbtops/pfbtops.c --- groff-1.17/src/utils/pfbtops/pfbtops.c Tue Apr 10 14:54:24 2001 +++ groff-1.17.1/src/utils/pfbtops/pfbtops.c Sat Apr 21 01:53:50 2001 @@ -1,3 +1,22 @@ +/* Copyright (C) 1992, 2001 Free Software Foundation, Inc. + Written by James Clark (jjc@jclark.com) + +This file is part of groff. + +groff 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. + +groff 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 groff; see the file COPYING. If not, write to the Free Software +Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + /* This translates ps fonts in .pfb format to ASCII ps files. */ #include @@ -42,12 +61,12 @@ switch (opt) { case 'v': { - extern char *Version_string; + extern const char *Version_string; printf("GNU pfbtops (groff) version %s\n", Version_string); exit(0); break; } - case CHAR_MAX + 1: // --help + case CHAR_MAX + 1: /* --help */ usage(stdout); exit(0); break; diff -aruN groff-1.17/src/utils/tfmtodit/tfmtodit.cc groff-1.17.1/src/utils/tfmtodit/tfmtodit.cc --- groff-1.17/src/utils/tfmtodit/tfmtodit.cc Tue Apr 10 14:54:24 2001 +++ groff-1.17.1/src/utils/tfmtodit/tfmtodit.cc Fri Apr 20 15:35:11 2001 @@ -59,6 +59,8 @@ #include "cset.h" #include "nonposix.h" +extern "C" const char *Version_string; + /* Values in the tfm file should be multiplied by this. */ #define MULTIPLIER 1 @@ -289,7 +291,7 @@ int lf = (c1 << 8) + c2; int toread = lf*4 - 2; unsigned char *buf = new unsigned char[toread]; - if (fread(buf, 1, toread, fp) != toread) { + if (fread(buf, 1, toread, fp) != (size_t)toread) { if (feof(fp)) error("unexpected end of file on `%1'", file); else @@ -491,7 +493,7 @@ if (len == EOF) goto eof; char buf[256]; - if (fread(buf, 1, len, fp) != len) + if (fread(buf, 1, len, fp) != (size_t)len) goto eof; if (len == 10 /* strlen("adjustment") */ && memcmp(buf, "adjustment", len) == 0) { @@ -717,7 +719,6 @@ } case 'v': { - extern const char *Version_string; printf("GNU tfmtodit (groff) version %s\n", Version_string); exit(0); break; @@ -786,12 +787,12 @@ int xheight; if (!t.get_param(5, &xheight)) xheight = 0; - int i; + unsigned int i; // Print the list of ligatures. // First find the indices of each character that can participate in // a ligature. for (i = 0; i < 256; i++) - for (int j = 0; j < sizeof(lig_chars)/sizeof(lig_chars[0]); j++) + for (unsigned int j = 0; j < sizeof(lig_chars)/sizeof(lig_chars[0]); j++) for (char_list *p = table[i]; p; p = p->next) if (strcmp(lig_chars[j].ch, p->ch) == 0) lig_chars[j].i = i; diff -aruN groff-1.17/src/xditview/ChangeLog groff-1.17.1/src/xditview/ChangeLog --- groff-1.17/src/xditview/ChangeLog Tue Feb 13 17:14:29 2001 +++ groff-1.17.1/src/xditview/ChangeLog Sat Apr 21 01:55:36 2001 @@ -1,3 +1,7 @@ +2001-04-21 Albert Chin-A-Young + + * Imakefile.in: Add support for recent HP architectures. + 2001-01-04 Rob Daasch * parse.c (ParseInput): Added 'F' to command switch to swallow diff -aruN groff-1.17/src/xditview/Imakefile.in groff-1.17.1/src/xditview/Imakefile.in --- groff-1.17/src/xditview/Imakefile.in Tue Nov 14 08:10:35 2000 +++ groff-1.17.1/src/xditview/Imakefile.in Sat Apr 21 01:53:50 2001 @@ -19,7 +19,11 @@ gxditview \ xtotroff DEPLIBS = XawClientDepLibs +#if defined(HPArchitecture) && (OSMajorVersion > 9) +LOCAL_LIBRARIES = -L/usr/contrib/X11R6/lib XawClientLibs +#else LOCAL_LIBRARIES = XawClientLibs +#endif SRCS1 = \ $(srcdir)/xditview.c \ $(srcdir)/Dvi.c \ @@ -50,9 +54,16 @@ xtotroff.o \ XFontName.o \ DviChar.o +#if defined(HPArchitecture) && (OSMajorVersion > 9) INCLUDES = \ + -I/usr/contrib/X11R6/include \ -I$(TOOLKITSRC) \ -I$(TOP) +#else +INCLUDES = \ + -I$(TOOLKITSRC) \ + -I$(TOP) +#endif MATHLIB = -lm DEFINES = \ $(SIGNAL_DEFINES) \ diff -aruN groff-1.17/test-groff groff-1.17.1/test-groff --- groff-1.17/test-groff Sat Apr 14 16:25:12 2001 +++ groff-1.17.1/test-groff Mon Jun 11 15:57:39 2001 @@ -11,7 +11,7 @@ exit 1 fi -PATH=\ +GROFF_BIN_PATH=\ $builddir/roff/troff:\ $builddir/preproc/pic:\ $builddir/preproc/eqn:\ @@ -26,8 +26,7 @@ $builddir/devices/grolj4:\ $builddir/devices/grolbp:\ $builddir/devices/grohtml:\ -$srcdir/$builddir/xditview:\ -$PATH +$srcdir/$builddir/xditview test -n "$srcdir" || srcdir=. @@ -37,6 +36,6 @@ GROFF_COMMAND_PREFIX= GROFF_FONT_PATH=$builddir:$srcdir/font GROFF_TMAC_PATH=$srcdir/tmac -export PATH GROFF_COMMAND_PREFIX GROFF_FONT_PATH GROFF_TMAC_PATH +export GROFF_BIN_PATH GROFF_COMMAND_PREFIX GROFF_FONT_PATH GROFF_TMAC_PATH exec $builddir/roff/groff/groff ${1+"$@"} diff -aruN groff-1.17/tmac/an-old.tmac groff-1.17.1/tmac/an-old.tmac --- groff-1.17/tmac/an-old.tmac Sat Apr 14 16:25:15 2001 +++ groff-1.17.1/tmac/an-old.tmac Tue May 8 09:44:56 2001 @@ -35,9 +35,12 @@ . .if !\n(.g .ab These man macros work only with groff. . -.nr _C \n[.C] +.nr _C \n(.C .cp 0 . +.if (\n[.x]\n[.y]\n[.Y] < 1171) \ +. ab You need GNU troff version 1.17.1 or higher to run this version of man! +. .if !r D .nr D 0 .if !r C .nr C 0 .if !r S .nr S 10 @@ -53,7 +56,7 @@ .\} . .nr an-html 0 -.if '\*(.T'html' .nr an-html 1 +.if '\*[.T]'html' .nr an-html 1 .if \n[an-html] .nr C 1 .if r ps4html .nr C 1 . @@ -62,12 +65,11 @@ .. . .\" .TH title section extra1 extra2 extra3 -.de TH +.de1 TH . if \\n[an-html] \{\ . HTML-TAG ".tl" \\$1 . \} -. cp 0 . . de an-init \" We have to do it like this to get multiple man pages right. . ds an-title "\\$1 @@ -134,16 +136,16 @@ . \} .. . -.de DT +.de1 DT . ta T .5i \" This sets tabs every .5 inches .. . -.de PD +.de1 PD . ie \\n[.$] .nr PD (v;\\$1) . el .nr PD (.4v >? \n[.V]) .. . -.de an-header +.de1 an-header . an-init . ev 1 . ps \\n[PS]u @@ -163,13 +165,13 @@ . ns .. . -.de an-footer +.de1 an-footer ' bp .. . .af an-page-letter a . -.de an-p-footer +.de1 an-p-footer . ev 1 . ps \\n[PS]u . vs \\n[VS]u @@ -201,7 +203,7 @@ . ev .. . -.de an-end +.de1 an-end . nr % 1 . pl +3v . fl @@ -212,7 +214,7 @@ . .if \n[cR] .em an-end . -.de SH +.de1 SH . sp \\n[PD]u . nr an-level 1 . set-an-margin @@ -230,7 +232,7 @@ . if \\n[.$] \&\\$* .. . -.de SS +.de1 SS . sp \\n[PD]u . nr an-level 1 . set-an-margin @@ -247,32 +249,32 @@ . if \\n[.$] \&\\$* .. . -.de B +.de1 B . it 1 an-trap . ft B . if \\n[.$] \&\\$* .. . -.de I +.de1 I . it 1 an-trap . ft I . if \\n[.$] \&\\$* .. . -.de SM +.de1 SM . it 1 an-trap . ps -1 . if \\n[.$] \&\\$* .. . -.de SB +.de1 SB . it 1 an-trap . ps -1 . ft B . if \\n[.$] \&\\$* .. . -.de TP +.de1 TP . sp \\n[PD]u . if \\n[.$] .nr an-prevailing-indent (n;\\$1) . it 1 an-trap @@ -285,7 +287,7 @@ . nr an-div? 1 .. . -.de an-trap +.de1 an-trap . ft R . ps \\n[PS]u . vs \\n[VS]u @@ -321,7 +323,7 @@ . \} .. . -.de LP +.de1 LP . br . sp \\n[PD]u . ps \\n[PS]u @@ -334,7 +336,7 @@ .als PP LP .als P LP . -.de IP +.de1 IP . ie !\\n[.$] \{\ . ps \\n[PS]u . vs \\n[VS]u @@ -350,7 +352,7 @@ . \} .. . -.de HP +.de1 HP . ps \\n[PS]u . vs \\n[VS]u . ft R @@ -363,7 +365,7 @@ . .ds an-empty \" this is referenced to avoid looping on eg .RB ( \\ ) . -.de RI +.de1 RI . if \\n[.$] \{\ . ds an-result \&\\$1 . shift @@ -376,7 +378,7 @@ . \} .. . -.de IR +.de1 IR . if \\n[.$] \{\ . ds an-result \&\f[I]\\$1\f[R] . shift @@ -389,7 +391,7 @@ . \} .. . -.de IB +.de1 IB . if \\n[.$] \{\ . ds an-result \&\f[I]\\$1 . shift @@ -403,7 +405,7 @@ . \} .. . -.de BI +.de1 BI . if \\n[.$] \{\ . ds an-result \&\f[B]\\$1 . shift @@ -417,7 +419,7 @@ . \} .. . -.de RB +.de1 RB . ds an-result \& . while (\\n[.$] >= 2) \{\ . as an-result \f[R]\\$1\f[B]\\$2\\*[an-empty] @@ -428,7 +430,7 @@ . ft R .. . -.de BR +.de1 BR . ds an-result \& . while (\\n[.$] >= 2) \{\ . as an-result \f[B]\\$1\f[R]\\$2\\*[an-empty] @@ -439,7 +441,7 @@ . ft R .. . -.de RS +.de1 RS . br . nr an-saved-margin\\n[an-level] \\n[an-margin] . nr an-saved-prevailing-indent\\n[an-level] \\n[an-prevailing-indent] @@ -450,7 +452,7 @@ . nr an-level +1 .. . -.de RE +.de1 RE . br . ie \\n[.$] .nr an-level ((;\\$1)