diff --git Makefile.inc1 Makefile.inc1 index f721c1460217..d308d2ed1f6a 100644 --- Makefile.inc1 +++ Makefile.inc1 @@ -550,17 +550,23 @@ MAJOR_REVISION= ${_REVISION:R} _PKG_REVISION= ${_REVISION} _STRTIMENOW= %Y%m%d%H%M%S _TIMENOW= ${_STRTIMENOW:gmtime} +BRANCH_EXT= .if ${_BRANCH:MCURRENT*} || ${_BRANCH:MSTABLE*} || ${_BRANCH:MPRERELEASE*} _PKG_REVISION= ${MAJOR_REVISION} -EXTRA_REVISION= .snap${_TIMENOW} +BRANCH_EXT= snap +EXTRA_REVISION= .${BRANCH_EXT}${_TIMENOW} .elif ${_BRANCH:MALPHA*} -EXTRA_REVISION= .a${_BRANCH:C/ALPHA([0-9]+).*/\1/}.${_TIMENOW} +BRANCH_EXT= a${_BRANCH:C/ALPHA([0-9]+).*/\1/} +EXTRA_REVISION= .${BRANCH_EXT}.${_TIMENOW} .elif ${_BRANCH:MBETA*} -EXTRA_REVISION= .b${_BRANCH:C/BETA([0-9]+).*/\1/}.${_TIMENOW} +BRANCH_EXT= b${_BRANCH:C/BETA([0-9]+).*/\1/} +EXTRA_REVISION= .${BRANCH_EXT}.${_TIMENOW} .elif ${_BRANCH:MRC*} -EXTRA_REVISION= .rc${_BRANCH:C/RC([0-9]+).*/\1/}.${_TIMENOW} +BRANCH_EXT= rc${_BRANCH:C/RC([0-9]+).*/\1/} +EXTRA_REVISION= .${BRANCH_EXT}.${_TIMENOW} .elif ${_BRANCH:M*-p*} -EXTRA_REVISION= p${_BRANCH:C/.*-p([0-9]+$)/\1/} +BRANCH_EXT= p${_BRANCH:C/.*-p([0-9]+$)/\1/} +EXTRA_REVISION= ${BRANCH_EXT} .endif PKG_VERSION:= ${_PKG_REVISION}${EXTRA_REVISION:C/[[:space:]]//g} .endif @@ -2003,9 +2009,11 @@ PKG_EXT= pkg .if exists(${REPODIR}/${PKG_ABI}) PKG_VERSION_FROM!=/usr/bin/readlink ${REPODIR}/${PKG_ABI}/latest PKG_VERSION_FROM_DIR= ${REPODIR}/${PKG_ABI}/${PKG_VERSION_FROM} +BRANCH_EXT_FROM= ${PKG_VERSION_FROM:C/.*([[:alpha:]][^\.]*).*/\1/} .else PKG_VERSION_FROM= PKG_VERSION_FROM_DIR= +BRANCH_EXT_FROM= .endif .endif .endif @@ -2043,7 +2051,7 @@ real-update-packages: stage-packages .PHONY continue; \ fi ; \ newsum=$$(pkg query -F ${REPODIR}/${PKG_ABI}/${PKG_VERSION}/$${newpkgname} '%X') ; \ - if [ "$${oldsum}" == "$${newsum}" ]; then \ + if [ "${BRANCH_EXT_FROM}" == "${BRANCH_EXT}" -a "$${oldsum}" == "$${newsum}" ]; then \ echo "==> Keeping old ${PKG_NAME_PREFIX}-$${pkgname}-${PKG_VERSION_FROM}.${PKG_EXT}" ; \ rm ${REPODIR}/${PKG_ABI}/${PKG_VERSION}/$${newpkgname} ; \ cp $${pkg} ${REPODIR}/${PKG_ABI}/${PKG_VERSION} ; \ diff --git RELNOTES RELNOTES index 1ec11c872d77..1ff7364f0ed5 100644 --- RELNOTES +++ RELNOTES @@ -10,6 +10,10 @@ newline. Entries should be separated by a newline. Changes to this file should not be MFCed. +c333758fca3e: + new MAC/do policy and mdo(1) utility which enables a user to + become another user without the requirement of setuid root. + eeb04a736cb9: date(1) now supports nanoseconds. For example: `date -Ins` prints "2024-04-22T12:20:28,763742224+02:00" and diff --git contrib/ee/ee.c contrib/ee/ee.c index 072d26519f4c..2f122981dbe7 100644 --- contrib/ee/ee.c +++ contrib/ee/ee.c @@ -591,11 +591,11 @@ main(int argc, char *argv[]) { wmove(com_win, 0, 0); werase(com_win); - wprintw(com_win, ree_no_file_msg); + wprintw(com_win, "%s", ree_no_file_msg); wrefresh(com_win); edit_abort(0); } - wprintw(com_win, no_file_string); + wprintw(com_win, "%s", no_file_string); wrefresh(com_win); } else @@ -615,7 +615,7 @@ main(int argc, char *argv[]) if (!nohighlight) wstandout(info_win); wmove(info_win, 5, 0); - wprintw(info_win, separator); + wprintw(info_win, "%s", separator); wmove(info_win, 5, 5); wprintw(info_win, "line %d col %d lines from top %d ", curr_line->line_number, scr_horz, absolute_lin); @@ -1668,7 +1668,7 @@ command_prompt(void) if (result == 0) wprintw(com_win, unkn_cmd_str, cmd_str); else - wprintw(com_win, non_unique_cmd_msg); + wprintw(com_win, "%s", non_unique_cmd_msg); wrefresh(com_win); @@ -1744,7 +1744,7 @@ command(char *cmd_str1) wmove(com_win, 0, 0); wclrtoeol(com_win); if (in_file_name == NULL) - wprintw(com_win, no_file_string); + wprintw(com_win, "%s", no_file_string); else wprintw(com_win, current_file_str, in_file_name); } @@ -2245,7 +2245,7 @@ get_file(char *file_name) { if ((errno == ENOTDIR) || (errno == EACCES) || (errno == EROFS) || (errno == ETXTBSY) || (errno == EFAULT)) { - wprintw(com_win, read_only_msg); + wprintw(com_win, "%s", read_only_msg); ro_flag = TRUE; } } @@ -2282,7 +2282,7 @@ get_file(char *file_name) wclrtoeol(com_win); wprintw(com_win, file_read_lines_msg, in_file_name, curr_line->line_number); if (ro_flag) - wprintw(com_win, read_only_msg); + wprintw(com_win, "%s", read_only_msg); wrefresh(com_win); } else if (can_read) /* not input_file and file is non-zero size */ @@ -2400,7 +2400,7 @@ finish(void) if ((file_name == NULL) || (*file_name == '\0')) { wmove(com_win, 0, 0); - wprintw(com_win, file_not_saved_msg); + wprintw(com_win, "%s", file_not_saved_msg); wclrtoeol(com_win); wrefresh(com_win); clear_com_win = TRUE; @@ -2577,7 +2577,7 @@ search(int display_message) { wmove(com_win, 0, 0); wclrtoeol(com_win); - wprintw(com_win, searching_msg); + wprintw(com_win, "%s", searching_msg); wrefresh(com_win); clear_com_win = TRUE; } @@ -3378,7 +3378,7 @@ menu_op(struct menu_entries menu_list[]) { wmove(com_win, 0, 0); werase(com_win); - wprintw(com_win, menu_too_lrg_msg); + wprintw(com_win, "%s", menu_too_lrg_msg); wrefresh(com_win); clear_com_win = TRUE; return(0); @@ -3630,10 +3630,10 @@ paint_menu(struct menu_entries menu_list[], int max_width, int max_height, { if (list_size > 1) wprintw(menu_win, "%c) ", item_alpha[min((counter - 1), max_alpha_char)]); - wprintw(menu_win, menu_list[counter].item_string); + wprintw(menu_win, "%s", menu_list[counter].item_string); } else - wprintw(menu_win, more_below_str); + wprintw(menu_win, "%s", more_below_str); } else { @@ -3663,7 +3663,7 @@ help(void) wrefresh(help_win); werase(com_win); wmove(com_win, 0, 0); - wprintw(com_win, press_any_key_msg); + wprintw(com_win, "%s", press_any_key_msg); wrefresh(com_win); counter = wgetch(com_win); if (counter == -1) @@ -3790,7 +3790,7 @@ file_op(int arg) if ((string == NULL) || (*string == '\0')) { wmove(com_win, 0, 0); - wprintw(com_win, file_not_saved_msg); + wprintw(com_win, "%s", file_not_saved_msg); wclrtoeol(com_win); wrefresh(com_win); clear_com_win = TRUE; @@ -3925,7 +3925,7 @@ Format(void) wmove(com_win, 0, 0); wclrtoeol(com_win); - wprintw(com_win, formatting_msg); + wprintw(com_win, "%s", formatting_msg); wrefresh(com_win); /* @@ -3971,7 +3971,7 @@ Format(void) wmove(com_win, 0, 0); wclrtoeol(com_win); - wprintw(com_win, formatting_msg); + wprintw(com_win, "%s", formatting_msg); wrefresh(com_win); /* @@ -4046,7 +4046,7 @@ Format(void) wmove(com_win, 0, 0); wclrtoeol(com_win); - wprintw(com_win, formatting_msg); + wprintw(com_win, "%s", formatting_msg); wrefresh(com_win); /* @@ -4270,7 +4270,7 @@ dump_ee_conf(void) if (option == 0) { - wprintw(com_win, conf_not_saved_msg); + wprintw(com_win, "%s", conf_not_saved_msg); wrefresh(com_win); return; } @@ -4293,7 +4293,7 @@ dump_ee_conf(void) init_file = fopen(file_name, "w"); if (init_file == NULL) { - wprintw(com_win, conf_dump_err_msg); + wprintw(com_win, "%s", conf_dump_err_msg); wrefresh(com_win); return; } @@ -4412,7 +4412,7 @@ spell_op(void) command(shell_echo_msg); adv_line(); wmove(com_win, 0, 0); - wprintw(com_win, spell_in_prog_msg); + wprintw(com_win, "%s", spell_in_prog_msg); wrefresh(com_win); command("<>!spell"); /* send contents of buffer to command 'spell' and read the results back into the editor */ @@ -5000,7 +5000,7 @@ restrict_mode(void) return(FALSE); wmove(com_win, 0, 0); - wprintw(com_win, restricted_msg); + wprintw(com_win, "%s", restricted_msg); wclrtoeol(com_win); wrefresh(com_win); clear_com_win = TRUE; diff --git contrib/ncurses/ANNOUNCE contrib/ncurses/ANNOUNCE index e0603d622394..6abf551c684d 100644 --- contrib/ncurses/ANNOUNCE +++ contrib/ncurses/ANNOUNCE @@ -1,4 +1,4 @@ - Announcing ncurses 6.2 + Announcing ncurses 6.5 Overview @@ -40,19 +40,19 @@ Overview The ncurses distribution is available at ncurses' homepage: - ftp://ftp.invisible-island.net/ncurses/ or + https://invisible-island.net/archives/ncurses/ or https://invisible-mirror.net/archives/ncurses/ . - It is also available via anonymous FTP at the GNU distribution site + It is also available at the GNU distribution site - ftp://ftp.gnu.org/gnu/ncurses/ . + https://ftp.gnu.org/gnu/ncurses/ . Release Notes - These notes are for ncurses 6.2, released February 12, 2020. + These notes are for ncurses 6.5, released April 27, 2024. This release is designed to be source-compatible with ncurses 5.0 - through 6.1; providing extensions to the application binary interface + through 6.4; providing extensions to the application binary interface (ABI). Although the source can still be configured to support the ncurses 5 ABI, the reason for the release is to reflect improvements to the ncurses 6 ABI and the supporting utility programs. @@ -60,340 +60,192 @@ Release Notes There are, of course, numerous other improvements, listed in this announcement. - The most important bug-fixes/improvements dealt with user-defined - capabilities in terminal descriptions. The release notes also mention - some other bug-fixes, but are focused on new features and improvements - to existing features since ncurses 6.1 release. + The most important bug-fixes/improvements dealt with robustness + issues. The release notes also mention some other bug-fixes, but are + focused on new features and improvements to existing features since + ncurses 6.4 release. Library improvements New features - There are several new features: - * O_EDGE_INSERT_STAY tells the form library to optionally delay - cursor movement on a field edge/boundary - * O_INPUT_FIELD extension to form library allows a dynamic field to - shrink if the new limit is smaller than the current field size. - * added exit_curses and exit_terminfo to replace internal symbols - for leak-checking. - * added curses_trace, to replace trace(). - - Additionally, to improve performance other changes (and extensions) - are provided in this release: - * mouse decoding now handles shift/control/alt logic when decoding - xterm's 1006 mode - * ncurses now defines a limit for wgetnstr, wgetn_wstr when length - is negative or "too large". - * reordered loop-limit checks in winsnstr in case the string has no - terminating null and only the number of characters is used. - * there is now no buffer-size limit when reading the $TERMCAP - variable. - * the $TERMCAP variable may be interpreted as a fallback to a - terminfo entry - * mvcur now decides whether to use hard-tabs, using xt, tbc and hts - as clues. - * extended colors are improved by modifying an internal call to - vid_puts to pass extended color pairs e.g., from tty_update.c and - lib_mvcur.c - * the initialization functions now avoid relying upon persistent - data for the result from getenv - * scrolling is improved: - + a limit check in newline_forces_scroll handles the case where - the row is inside scroll-margins, but not at the end. - + improved loop limits in _nc_scroll_window handle a case where - the scrolled data is a pad which is taller than the window. + These are new features: + * The low-level terminfo and termcap interfaces are used both by the + higher-level curses library, as well as by many applications. + The functions which convert parameterized terminal capability + strings for output to the terminal (tiparm and tparm) analyze the + capability string to determine which parameters are strings (i.e., + addresses), versus numbers (not addresses). + The library's analysis of a capability string may differ from the + calling application's design if environment variables are used to + point to an invalid terminal database. This is a longstanding + problem with all implementations of terminfo, dating from the + early 1980s. + Two new functions address this problem: by providing a function + which allows the calling application to tell ncurses how many + string-parameters to expect: + + tiscan_s helps applications check formatting capabilities + that would be passed to tiparm_s. + + tiparm_s provides applications a way to tell ncurses what the + expected parameters are for a capability. + * The ncurses library supports a compile-time feature (enabled with + the configure --enable-check-size option) which simplifies + initialization with terminals which do not negotiate window + (screen) size. This is done in setupterm, by providing for using + ANSI cursor-position report (in user6/user7 terminfo capabilities) + to obtain the screen size if neither environment variables or + ioctl is used. + The ncurses test-program with options "-E -T" demonstrates this + feature. + * add functions to query tty-flags in SCREEN + + This release drops compatibility with obsolete versions of tack, e.g., + pre-1.08 Other improvements - These are revised features: - * used "const" in some prototypes rather than NCURSES_CONST where - X/Open Curses was updated to do this, e.g., wscanw, newterm, the - terminfo interface. Also use "const" for consistency in the - termcap interface, which was withdrawn by X/Open Curses in Issue 5 - (2007). As of Issue 7, X/Open Curses still lacks "const" for - certain return values, e.g., keyname. - * modified wbkgd and wbkgrnd to improve compatibility with SVr4 - curses, changing the way the window rendition is updated when the - background character is modified - * improved terminfo write/read by modifying the fourth item of the - extended header to denote the number of valid strings in the - extended string table (see term(5)). - * modified the initialization checks for mouse so that the - xterm+sm+1006 block will work with terminal descriptions not - mentioning xterm. - - These were done to limit or ultimately deprecate features: - * deprecated safe-sprintf, since the vsnprintf function, which does - what was needed, was standardized long ago. - * marked vwprintw and vwscanw as deprecated; recommend using - vw_printw and vw_scanw, respectively. - * added deprecation warnings for internal functions called by older - versions of tack. - * removed unused _nc_import_termtype2 function. - These are improvements to existing features: - * check parameter of set_escdelay, return ERR if negative. - * check parameter of set_tabsize, return ERR if not greater than - zero - * correct a status-check in _nc_read_tic_entry() so that if reading - a hex/b64 $TERMINFO, and the $TERM does not match, fall-through to - the compiled-in search list. - * amend check for repeat_char to handle a case where setlocale() was - called after initscr - * move macro for is_linetouched inside NCURSES_NOMACROS ifndef. - * use _nc_copy_termtype2 rather than direct assignment in setupterm, - in case it is called repeatedly using fallback terminfo - descriptions - * improve workaround for Solaris wcwidth versus line-drawing - characters - * add checks in repair_subwindows to keep the current position and - scroll-margins inside the resized subwindow. - * correct a buffer-limit in write_entry.c for systems that use - caseless filenames. - * improved build-time utility report_offsets: - + add categories, e.g., "w" for wide-character, "t" for threads - to make the report more readable. Reorganized the structures - reported to make the categories more apparent. - + add NCURSES_GLOBALS and NCURSES_PRESCREEN to report to show - how similar the different libtinfo configurations are. - * modified some header files to ensure that those include necessary - files except for the previously-documented cases - * added some traces in initialization to show whether a fallback - entry is used. - * made minor optimization to reduce calls to _nc_reserve_pairs + * In addition to the new, safer function tiparm_s, ncurses adds + checks to make the older tiparm, tparm and tgoto functions safer: + + the terminfo functions tiparm and tparm ensure that the + capability string comes from the terminal description which + ncurses loads, rather than from random data which the + application happens to have. + + the tgoto function disallows capabilities which its analysis + shows will attempt to use string parameters. + + ncurses uses internal functions which correspond to tiparm, + and tgoto which ensure that the capability strings which are + passed to these functions come from the loaded terminal + description. + * improve check in lib_tparm.c, ensuring that a char* fits into a + TPARM_ARG + * modify _nc_syserr_abort to use _nc_env_access, rather than only + checking root uid + * improve thread lock in lib_trace.c + * modify flushinp to use file descriptors in SCREEN, rather than + from TERMINAL, and check if they are for a terminal, like SVr4 + * modify mcprint to use file descriptor in SCREEN, for consistency + * modify internal function _nc_read_file_entry to show relevant + filename in warnings + * improve checks in internal function convert_string for corrupt + terminfo entry + * review/improve handling of out-of-memory conditions + * limit delays to 30 seconds, i.e., padding delays in terminfo, as + well as napms and delay_output functions + * fix reallocation loop for vsnprintf in _nc_sprintf_string by + copying the va_list variable + * modify delscreen to limit the windows which it creates to just + those associated with the screen + * modify endwin to return an error if it is called again without an + intervening screen update + * modify wenclose to handle pads + * eliminate use of PATH_MAX in lib_trace.c + * provide for any CCHARW_MAX greater than 1 These are corrections to existing features: - * fix a special case in PutAttrChar where a cell is marked as - alternate-character set, but the terminal does not actually - support the given graphic character. This would happen in an older - terminal such as vt52, which lacks most line-drawing capability. - * corrected flag for "seq" method of db 1.8.5 interface, needed by - toe on some of the BSDs. - * modify comparison in make_hash.c to correct a special case in - collision handling for Caps-hpux11 - * add extended_slk_color{,_sp} symbols to the appropriate - package/*.{map,sym} files - * modify lib_setup to avoid calling pthread_self() without first - verifying that the address is valid, i.e., for weak symbols - * add a couple of broken-linker symbols to the list of versioned - symbols to help with link-time optimization versus weak symbols. + * correct loop termination condition in waddnstr and waddnwstr + * improve parsing in internal function _nc_msec_cost, allowing a + single decimal point + * amend parameter check for entire string versus specific length in + winsnstr and wins_nwstr to match Solaris; make similar correction + to wins_nwstr + * correct internal function wadd_wch_literal when adding a + non-spacing character to a double-width character + * correct definition of Charable macro for non-wide ncurses library + . Program improvements - Several improvements were made to the utility programs: - - clear - - + improved logic for clearing with the E3 extension, in case - the terminal scrolls content onto its saved-lines before - actually clearing the display, by clearing the saved-lines - after clearing the display + Several improvements were made to the utility programs. Some were done + to make the infocmp option "-u" option help refactor the terminal + database. infocmp - + omit filtering of "OTxx" names which are used for obsolete - capabilities, when the output is sorted by long-names. This - change helps when making a table of the short/long capability - names. + + add limit checks for processing extended capabilities with + the "-u" option + + correct initial alignment of extended capabilities, so that + the "-u" option can be used for more than two terminal types + + modify "-u" option to not report cancels for strings which + were already cancelled in a use'd chunk. + + correct an assignment "-u" for detecting if a boolean is + unset in a base entry and set in a use'd chunk, i.e., if it + was cancelled. tic - + added check for consistent alternate character set - capabilities. - + added check for paired indn/rin. - + added check for terminals with parm_dch vs parm_ich. - + added check for the case where setf/setb are given using - different strings, but provide identical results to - setaf/setab. - + corrected check for ich1. - + changed a too-large terminal entry from a fatal error to a - warning. - - toe - - + ignores any hex/b64 $TERMINFO value in the list of terminfo - databases. - - tset - - + replace check in reset command for obsolete "pt" capability - using tbc and hts capabilities as clues - + modify reset to allow for tabstops at intervals other than 8. - + change reset's behavior for margins to simply clear - soft-margins if possible, rather than clearing and then - setting them according to the terminal's width. - - tput - - + add "x" to getopt string so that "tput -x clear" works. - - Several changes were made to the generated ncurses*config scripts and - the analogous ".pc" files to reduce differences between the - configurations they report: - * modified the ncurse*-config and pc-files to more closely match for - the -I and -l options. - * filtered out linker-specs from the --libs report. - * amended the ncurses*-config and pc-files to take into account the - rpath hack which differed between those files. - * modified generated ncurses*config and ncurses.pc, ncursesw.pc, - etc., to list helper libraries such as gpm for static linking. + + correct limit-check when dumping tc/use clause via "-I" + + check return value of _nc_save_str, in special case where + extended capabilities are processed but the terminal + description was not initialized + + modify check for multiply defined aliases to report problems + within the current runtime rather than for conflicts with + pre-existing terminal descriptions. + + disallow using $TERMINFO or $HOME/.terminfo when "-o" option + is used + + tput and tset + + + add "-v" option to tput, to show warnings + + modify reset command to avoid altering clocal if the terminal + uses a modem + + modify reset feature to avoid 1-second sleep if running in a + pseudo-terminal Examples Along with the library and utilities, improvements were made to the - ncurses-examples. Most of this activity aimed at improving the - test-packages. A few changes are more generally useful, e.g., for the - main ncurses test-program, and for analyzing traces using the - tracemunch script: - * improve recovery from error when reading command-character in - test/ncurses.c, showing the relevant error message and not exiting - on EINTR. - * improve tracemunch, by keeping track of TERMINAL* values, and if - tracing was first turned on after initialization, attempt to show - distinct screen, window and terminal names anyway. - * modify tracemunch to accept filename parameters in addition to use - as a pipe/filter. - * update tracemunch to work with perl 5.26.2, which changed the - rules for escaping regular expressions. - * add some checks in tracemunch for undefined variables. - * modify TurnOn/TurnOff macros (in lib_vidattr.c and lib_vid_attr.c) - to avoid expansion of "CUR" in trace. - - There are other new demo/test programs and reusable examples: - - color_content - Demonstrate the color_content and extended_color_content - functions. - - demo_tabs - A simple demo of tabs in curses. - - dump_window - A portable curses screen-dump, used to compare ncurses screen - contents with Solaris. - - pair_content - Demonstrate the pair_content and extended_pair_content - functions. - - report_hashing - Check hash-tables used for terminfo and termcap names. - - parse_rgb - Sample implementation of the ncurses RGB extension from - user_caps.5, used in picsmap and savescreen programs. - - A variety of improvements were made to existing programs, both new - features as well as options added to make the set of programs more - consistent. - * add "-l" option to test/background, to dump screen contents in a - form that lets different curses implementations be compared. - * add "@" command to test/ncurses F-test, to allow rapid jump to - different character pages. - * added enum, regex examples to test/demo_forms - * amend Scaled256() macro in test/picsmap.c to cover the full range - 0..1000 - * corrected pathname used in Ada95 sample programs for explain.txt, - to work with test-packages, and used an awk script to split the - resulting pathname when it would be too long for a single line. - * ignore interrupted system-call in test/ncurses's command-line, - e.g., if the terminal were resized. - * improved ifdef's for TABSIZE variable, to help with AIX/HPUX - ports. + ncurses-examples: + * modify test_tparm to account for extended capabilities + * corrected mouse mask in test/testcurs.c + * modify test/clip_printw.c to optionally test non-wrapped updates + * modify test/test_mouse.c to use curses api for raw/noraw + * modify test/clip_printw.c to optionally test non-wrapped updates + + There is one new demo/test programs: + + test/test_endwin.c + This program shows the return-status from endwin with different + combinations of endwin (repeated), initscr, newterm. Terminal database There are several new terminal descriptions: - - alacritty, domterm, kitty, mintty, mintty-direct, ms-terminal, - n7900, nsterm-build309, nsterm-direct, screen5, ti703, ti707, - ti703-w, ti707-w vscode, vscode-direct, xterm-mono, xterm.js + * ansi+apparrows + * contour + * linux+kbs for terminals which imitate xterm's behavior with Linux + * rio, rio-direct + * mostlike + * ms-vt100-16color, winconsole + * vt100+noapp, vt100+noapp+pc, xterm+app+pc, xterm+decedit from + xterm #389 + * putty+cursor to reflect amending of modified cursor-keys in 2021 + * wezterm There are many changes to existing terminal descriptions. Some were - updates to several descriptions: - * use ansi+rep in a dozen places - * add rs1 to konsole, mlterm - * improve several flash capabilities with trailing mandatory delays - * drop ich1 from rxvt-basic, Eterm and mlterm to improve - compatibility with old non-curses programs - * add/use xterm+keypad in xterm-new - * use xterm+sl-twm for consistency, nine places - * improve xm example in xterm+x11mouse and xterm+sm_1006. - - while others affected specific descriptions. These were retested, to - take into account changes by their developers: - - terminator, st - - while these are specific fixes based on reviewing documentation, user - reports, or warnings from tic: - - adds200: - - + fix typo - - gnome-256color - - + base entry on "gnome", not "vte", for consistency - - interix - - + trim unnecessary setf/setb - - linux-16color - - + accommodate Linux console driver incompatibility introduced - in early 2018 - - nsterm-256color: - - + add nsterm-build309 to replace nsterm-256color, assigning the - latter as an alias of nsterm, to make mouse work with - nsterm-256color - - regent40: - - + renumber function-keys to match manual - - regent60: - - + add cd (clr_eos) - + corrected acsc - + add shifted function-keys - - tvi950: - - + added function-key definitions to agree with Televideo 950 - manual - + corrected acsc - + remove bogus kf0 - + add bel - - tvi955: - - + fix typo - - vi200: - - + add acsc string, including right/down-arrow - - wy50: - - + corrected acsc - - wy50 and wy60: - - + add shifted function-keys as kF1 to kF16 - - xterm+x11hilite: - - + eliminate unused p5 parameter. - - A few entries use extensions (user-defined terminal capabilities): - * use xterm+sm+1006 (aka "SGR 1006 mouse") for konsole-base and - putty - * add Smol/Rmol user-defined capability to tmux and vte-2018 - * add Smulx user-defined capability to tmux, vte-2018 + updates to several descriptions, using the infocmp "-u" option in a + script to determine which building-block entries could be used to + replace multiple capability settings (and trim redundant information). + + Other changes include: + * document XF, kxIN and kxOUT + * add note on sun regarding wscons/cmdtool/shelltool + * remove DECCOLM+DECSCLM from foot + * add xterm+focus to foot+base + * add ecma+strikeout to putty + * use CSI 3J in vte-2017 + * use oldxterm+sm+1006 in vte-2014 + * modify xgterm to work around line-drawing bug + * add xterm focus mode 1004 to xterm+focus as fe/fd capabilities, + like vim. + * add xterm+focus to alacritty+common + * add XR/xr, to work with vim, and use RV/rv to denote DA2 and its + response + * add XF flag to xterm+focus so that termcap applications can be + aware of terminals which may support focus in/out + * use xterm+focus in xterm-p370 and tmux + * remove xterm+sm+1006 from tmux + * NetBSD-related fixes for x68k and wsvt25 Documentation @@ -408,273 +260,157 @@ Release Notes features and show how they evolved, there are corrections, clarifications, etc.: * Corrections: - + correct error-returns listed in manual pages for a few form - functions - + corrected prototypes in several manpages using script to - extract those in compilable form. - + fix typo in term.5, improve explanation of format - * Clarify in manual pages that vwprintw and vwscanw are obsolete. - They have not been part of X/Open Curses since 2007. + + add assignment in CF_MAN_PAGES to fill in value for + TERMINFO_DIRS in ncurses, terminfo and tic manpages. + + clarify interaction of -R option versus -C, -I and -r in + infocmp manpage. + + correct manpage description of panel_hidden. + + improve manpage description for addch versus unctrl format + used for non-printable characters. + + improve manpages discussing file descriptors in low-level + functions. + + improve description of search rules for terminal descriptions + in terminfo manpage. + + modify dist.mk to avoid passing developer's comments in + manpages into the generated html documentation. + + modify test-package "ncurses6-doc" to use manpage-aliases, + which in turn required a change to the configure script to + factor in the extra-suffix option when deriving alias names. * New/improved history and portability sections: - + curs_addch.3x gives some background for ACS symbols. - + curs_getcchar.3x explains a difference between ncurses and - X/Open Curses. - + curs_getstr.3x gives historical/portability background for - the length parameter of wgetnstr. - + curs_slk.3x lists a few differences between SVr4 curses and - X/Open Curses for soft-keys. - + curs_terminfo.3x explains that the initial implementation of - terminfo in SVr2 was mostly replaced by other developers in - SVr3. - + infocmp.1 explains that the initial version of terminfo had - no tool for decompiling descriptions. That came later, with - SVr3, with a different developer. - + tabs.1 tells more than you wanted to know about the tool. - + tic.1 explains that the initial version of terminfo had a - rudimentary tool (based on termcap) for compiling entries. - The tool used with Unix was developed by others for SVr3. - + toe.1 explains the origin of this tool. - * Improvements for user_caps.5: - + mention meml, memu and box1 - + expanded description of XM - + add a clarification regarding the RGB capability. - + mention user_caps.5 in the tic and infocmp manual pages. + + add information about "ttycap", termcap's forerunner, to + tset.1 + + document limitations of tparm, and error-returns in + curs_terminfo.3x + + document limitations of tgoto, and error-returns in + curs_termcap.3x * Other improvements: - + curs_add_wch.3x adds note about Unicode terminology for the - line-drawing characters. - + curs_color.3x improves discussion of error returns and - extensions. - + curs_mouse.3x explains how the kmous and XM capabilities are - used for xterm-mouse input. - + curs_refresh.3x improves documentation regarding the virtual - and physical screens. - + curs_util.3x mentions a difference between SVr4 and X/Open - Curses for unctrl.h - + curs_variables.3x improves description of the init_tabs - capability and TABSIZE variable. - + ncurses.3x improves documentation regarding feature-test - macros in curses.h - + resizeterm.3x about top-level windows which touch the - screen's borders. - + tput.1 clarifies how tput determines the terminal size. + + This release has many changes to improve the formatting and + style of the manpages. + + Manpages now use consistent section-naming, page headers and + footers (including the modification date for each page). + + Table layout has been revised. There are no new manual pages (all of the manual page updates are to existing pages). - Some of the improvements are more subtle, relating to the way the - information is presented. For instance, the generated terminfo.5 file - uses a different table layout, allowing it to use space on wide - terminals more effectively. - Interesting bug-fixes - While there were many bugs fixed during development of ncurses 6.2, - only a few (the reason for this release) were both important and - interesting. Most of the bug-fixes were for local issues which did not - affect compatibility across releases. Since those are detailed in the - NEWS file no elaboration is needed here. - - The interesting bugs were in tic/infocmp's handling of user-defined - capabilities. These were not recent bugs. Initially it was a simple - problem: - * The user-defined capabilities can be any type (boolean, number or - string), but once given a type all uses of the name must conform - to that type--unless some special support for a particular - multi-typed name is built into ncurses. - * One of simpleterm's contributors copied some definitions for using - tmux's user-defined capabilities in late in 2016. - -diff --git a/st.info b/st.info -@@ -185,7 +185,10 @@ st| simpleterm, - tsl=\E]0;, - xenl, - vpa=\E[%i%p1%dd, -- -+# Tmux unofficial extensions, see TERMINFO EXTENSIONS in tmux(1) -+ Se, -+ Ss, -+ Tc, - - st-256color| simpleterm with 256 colors, - use=st, - - * Later, in (referring to a version from mid-2017), a user asked to - have it updated in ncurses. - * However, it had an error from the change in late 2016. The - terminal description made what tmux expected to be string actually - a boolean. - Over the years, there were problems with each of simpleterm's - terminal descriptions. I repaired those, and usually dealt with - the problem. - * The difference in this case was that when compiling the terminal - database, tic may have in memory the definitions for more than one - terminal description (so that it can resolve "use=" clauses). - Seeing two different types for the same name, in certain - situations it would incorrectly merge the symbol tables for the - two terminal descriptions. - * On simpleterm's side, their bug was finally fixed in late 2019, - three years after the bug was created. - - For ncurses, the elapsed time to fix this bug was less than three - years. Someone reported a problem with the terminal description a few - weeks after releasing ncurses 6.1 (in tmux #1264), and the terminal - description was updated that week (ncurses patch 20180224): - -20180224 - + modify _nc_resolve_uses2() to detect incompatible types when merging - a "use=" clause of extended capabilities. The problem was seen in a - defective terminfo integrated from simpleterm sources in 20171111, - compounded by repair in 20180121. - + correct Ss/Ms interchange in st-0.7 entry (tmux #1264) -TD - - The larger part of that change added a check to prevent a simple merge - of terminal descriptions where the same user-defined name was used - with different types. But it raised some questions: - * Was there a reliable way to manage terminal descriptions which - used the same extended name in different ways? - * Should ncurses provide a registry of well-known extended names, - with their types? - - Since the correction to terminfo.src could have been readily adopted - by packagers, there was nothing more to be done from ncurses' - standpoint on that part. But improving ncurses to prevent issues like - that is the reason for making a release. - - Nothing more (constructive) was mentioned with regard to simpleterm. - But a few problems were found in the handling of user-defined - capabilities: - * Forward-references to user-defined capabilities in a "use=" clause - did not allocate new data for each use. In tic, successive - compilation of terminal entries could add user-defined - capabilities to the wrong terminal entry. - This was not noticed before, since xterm's terminal descriptions - were the main users of the feature, and almost all of the uses of - the building-blocks which contained user-defined capabilities were - backward-references. - * There is one (documented) case where ncurses 6.1 supports a - user-defined capability that could be any type (i.e., "RGB"). The - check added in February 2018 to guard against mismatches did not - handle all of the combinations needed. - - Both of these issues dated from the original implementation of - user-defined capabilities. Fixing them does not change the terminal - database, but a older tic without the fixes will not be able to handle - terminfo sources which rely upon those fixes. Starting in June 2019, - the download link for the terminfo source file was capped at that - date. The development sources have an up-to-date copy of the file, for - people with a legitimate need for it. - - The "-c" (check) option of tic is not very useful if it cannot offer - advice on parameters needed for user-defined capabilities. The various - Caps files were reorganized to reduce redundancy, and in the common - portion (Caps-ncurses), a registry of user-defined capabilities is - provided for use by tic. While users can still define their own custom - capabilities, tic will not offer any advice when their parameters do - not match. - - In ncurses 6.2, tic makes a special check to allow any type for RGB, - but its being able to do this relies upon fixes made in the ncurses - library in mid-2019. + The changes to tparm, tgoto which improve the design of the low-level + interfaces are interesting, but are not bug-fixes per se. Configuration changes Major changes - There are no major changes. Several new options were added to ease - integration of packages with systems using different versions of GNAT - and ncurses. Also, improvements were made to configure checks. + These are the major changes (aside from introducing tiparm_s): + * use wide-character (ncursesw) by default + * use opaque typedefs by default + + However, most of the work on configure scripts was done to reduce + warnings within the configure script: + * intrusive warnings from GNU grep regarding fgrep and egrep + * fatal errors in compile-checks, arising from recent "Modern C" + efforts by some developers which caused longstanding configure + checks to fail. + After repairing the configure script, none of that activity + affected ncurses because stricter warnings are used routinely in + development. + + Other improvements made to configure checks include + * use string-hacks in alloc_entry.c, alloc_type.c and hardscroll.c, + overlooked due to compiler changes in recent OpenBSD releases + * revise progs.priv.h to provide for NC_ISATTY reuse + * configure check for MB_LEN_MAX provides warning as needed + * trim a space after some "-R" options, fixing builds for + applications built using clang and ncurses on Solaris + * work around misconfiguration of MacPorts gcc13, which exposes + invalid definition of MB_LEN_MAX in gcc's fallback copy of + limits.h + * modified experimental Windows driver works with xterm mouse + protocol Configuration options - There are a few new/modified configure options: + There are a few new configure options: + + --disable-setuid-environ + Compile with environment restriction, so certain environment + variables are not available when running via a setuid/setgid + application. These are (for example $TERMINFO) those that allow + the search path for the terminfo or termcap entry to be + customized. + + A setuid/setgid application inherits its environment variables + from the current user, in contrast to sudo which may limit the + environment variables that ncurses uses. - --with-config-suffix - helps work around a filename conflict with Debian packages - versus test-packages. + --enable-check-size + Compile-in feature to detect screensize for terminals which do + not advertise their screensize, e.g., serial terminals. - --with-ada-libname - allows one to rename the "AdaCurses" library (at least one - packager prefers a lowercase name). + --with-abi-altered=NUM + Override the displayed (rather than compiled-in) ABI. Only + packagers who have created configurations where the ABI differs + from ncurses should be interested in this option. - --with-fallbacks - now ensures there is a value, and adds the fallback information - to top-level Makefile summary. + --with-strip-program=XXX + When stripping executables during install, use the specified + program rather than "strip" overriding program chosen by the + install program for stripping executables. - --with-pcre2 - check for pcre-posix library to help with MinGW port. + These configure options are modified: - --with-tic-path and + --with-pkg-config-libdir[=DIR] + The optional DIR parameter can now be "auto" to automatically + use pkg-config's library directory. - --with-infocmp-path - help work around problems building fallback source using - pre-6.0 tic/infocmp. + The default is $(libdir). - --with-versioned-syms - option value can now be a relative pathname. + --with-xterm-kbs[=XXX] + The default is "auto" which tells the configure script to + choose BS or DEL according to platform defaults. Portability Many of the portability changes are implemented via the configure script: - * ignore $TERMINFO as a default value in configure script if it came - from the infocmp -Q option. - * distinguish gcc from icc and clang when the --enable-warnings - option is not used, to avoid unnecessary warnings about - unrecognized inline options - * consistently prepend new libraries as they are found during - configuration, rather than relying upon the linker to resolve - order dependencies of libraries. - * modified configure scripts to reduce relinking/ranlib during - library install : - + use "install -p" when available, to avoid need for ranlib of - static libraries. - + scripts which use "--disable-relink;" add a 1-second sleep to - work around tools which use whole-second timestamps, e.g., in - utime rather than the actual file system resolution. - * add configure check for getenv to work around implementation shown - in Emscripten which overwrites the previous return value on each - call. - Use that to optionally suppress START_TRACE macro, whose call to - getenv may not work properly - * change target configure level for _XOPEN_SOURCE to 600 to address - use of vsscanf and setenv. - * reduce use of _GNU_SOURCE for current glibc where _DEFAULT_SOURCE - combines with _XOPEN_SOURCE - Allow for Cygwin's newlib when checking for the _DEFAULT_SOURCE - symbol. - MidnightBSD is now checked for the _XOPEN_SOURCE-related - definitions. - * If the check for va_copy or __va_copy fails, - + configure now tries copying the pointers for va_list, or as - an array. - + alternatively, it checks for __builtin_va_copy(), which could - be used with AIX xlc in c89 mode. - * several changes to support a port to Ultrix 3.1: - + check if "b" binary feature of fopen works - + check for missing feature of locale.h - + add fallback for strstr() in test-programs - + add fallback for STDOUT_FILENO in test-programs - * The test/configure script (used for ncurses-examples) is improved: - + work around non-ncurses termcap.h file, e.g., in Slackware. - + check for TABSIZE variable. - + checks for the X11/Intrinsic.h header, accommodate recent - MacOS changes which largely emptied /usr/include. + * add/use configure check for clock_gettime, to supersede + gettimeofday. + * modify configure script check for pkg-config library directory to + take into account an older version 0.15.0 which used + PKG_CONFIG_PATH but not PKG_CONFIG_LIBDIR + * allow for MinGW32-/64-bit configurations to use _DEFAULT_SOURCE + * modify CF_XOPEN_SOURCE macro's amend default case to avoid + undefining _XOPEN_SOURCE if _POSIX_C_SOURCE is defined + * updated configure script macro CF_XOPEN_SOURCE, for uClibc-ng + * modify version-check for gcc/g++, now works for msys2 + * build-fixes related to configure-options and/or platform: + + fix for --enable-fvisibility + + fix for unusual values of --with-rel-version + + fix for unusual values of --with-abi-version + + fix for --disable-tcap-names + + fix for termcap in nc_access.h + * other configure-script improvements: + + recent msys2 headers work with _DEFAULT_SOURCE; amend check + + use $ac_includes_default in most cases where stdlib.h should + work + + use #error consistently vs "make an error" + + add configure macro for gettimeofday vs inline check Here are some of the other portability fixes: - * added dummy "check" rule in top-level and test-Makefile to - simplify building test-packages for ArchLinux. - * dropped library-dependency on psapi for MinGW port, since - win_driver.c defines PSAPI_VERSION to 2, making it use - GetProcessImageFileName from kernel32.dll - * made build-fixes for configuration using --program-suffix with - Ada95, noticed with MacOS but applicable to other platforms - without libpanelw, etc. - * modified ncurses/Makefile.in to fix a case where Debian/testing - changes to the ld --as-needed configuration broke ncurses-examples - test packages. - * used _WIN32/_WIN64 in preference to __MINGW32__/__MINGW64__ - symbols to simplify building with Microsoft Visual C++, since the - former are defined in both compiler configurations. + * modify configure scripts/makefiles to omit KEY_RESIZE if the + corresponding SIGWINCH feature is disabled + * increase MB_CUR_MAX to 16, matching glibc's MB_LEN_MAX + * add BSD erase2 to characters handled by tset/reset + * use getauxval when available, to improve setuid/setgid checks + * set dwShareMode in calls to CreateConsoleScreenBuffer + * use CreateFile with "CONIN$", "CONOUT$" rather than GetStdHandle + to obtain a handle on the actual console, avoiding redirection in + the MinGW/Win32 configurations + * modify MinGW driver to return KEY_BACKSPACE when an unmodified + VK_BACK virtual key is entered + * modify MinGW configuration to provide for running in MSYS/MSYS2 + shells, assuming ConPTY support _________________________________________________________________ Features of ncurses @@ -682,20 +418,21 @@ Features of ncurses The ncurses package is fully upward-compatible with SVr4 (System V Release 4) curses: * All of the SVr4 calls have been implemented (and are documented). - * ncurses supports all of the for SVr4 curses features including - keyboard mapping, color, forms-drawing with ACS characters, and - automatic recognition of keypad and function keys. - * ncurses provides these SVr4 add-on libraries (not part of X/Open - Curses): - + the panels library, supporting a stack of windows with - backing store. - + the menus library, supporting a uniform but flexible - interface for menu programming. + * ncurses supports the features of SVr4 curses including keyboard + mapping, color, form drawing with ACS characters, and automatic + recognition of keypad and function keys. + * ncurses provides work-alike replacements of SVr4 supplemental + libraries based on curses, but which were not specified by X/Open + Curses: + + the panel library, supporting a stack of windows with backing + store + + the menu library, supporting a uniform but flexible interface + for menu programming + the form library, supporting data collection through - on-screen forms. + on-screen forms * ncurses's terminal database is fully compatible with that used by SVr4 curses. - + ncurses supports user-defined capabilities which it can see, + + ncurses supports user-defined capabilities that it can see, but which are hidden from SVr4 curses applications using the same terminal database. + It can be optionally configured to match the format used in @@ -705,14 +442,15 @@ Features of ncurses curses. * The ncurses utilities have options to allow you to filter terminfo entries for use with less capable curses/terminfo versions such as - the HP/UX and AIX ports. + the HP-UX and AIX ports. The ncurses package also has many useful extensions over SVr4: - * The API is 8-bit clean and base-level conformant with the X/OPEN - curses specification, XSI curses (that is, it implements all BASE - level features, and most EXTENDED features). It includes many - function calls not supported under SVr4 curses (but portability of - all calls is documented so you can use the SVr4 subset only). + * The API is 8-bit clean and base-level conformant with the X/Open + Curses specification, XSI curses (that is, it implements all BASE + level features, and almost all EXTENDED features). It includes + many function calls not supported under SVr4 curses (but + portability of all calls is documented so you can use the SVr4 + subset only). * Unlike SVr3 curses, ncurses can write to the rightmost-bottommost corner of the screen if your terminal has an insert-character capability. @@ -729,6 +467,7 @@ Features of ncurses use of function keys, e.g., disabling the ncurses KEY_MOUSE, or by defining more than one control sequence to map to a given key code. + * Support for direct-color terminals, such as modern xterm. * Support for 256-color terminals, such as modern xterm. * Support for 16-color terminals, such as aixterm and modern xterm. * Better cursor-movement optimization. The package now features a @@ -771,10 +510,19 @@ Features of ncurses user's $HOME/.terminfo directory. * The table-of-entries utility toe makes it easy for users to see exactly what terminal types are available on the system. - * The library meets the XSI requirement that every macro entry point - have a corresponding function which may be linked (and will be - prototype-checked) if the macro definition is disabled with - #undef. + * X/Open Curses permits most functions it specifies to be made + available as macros as well. ncurses does this + + to improve performance, e.g., for operations composed of + simpler functions such as cursor movement following by adding + text to the screen, + + to simplify the implementation by reusing functions which use + common parameters, e.g., the standard screen stdscr, and + + to provide functions that return values via their parameters + Except for the last case, ncurses provides a non-macro + implementation of the function. If the macro definition is + disabled with #undef, or by defining NCURSES_NOMACROS the function + may be linked (and its calls will be checked against the + prototype). * Extensive documentation is provided (see the Additional Reading section of the ncurses FAQ for online documentation). @@ -827,7 +575,8 @@ Applications using ncurses nvi New vi uses ncurses. - https://sites.google.com/a/bostic.com/keithbostic/vi + https://sites.google.com/a/bostic.com/keithbostic/the-berkeley- + vi-editor-home-page ranger A console file manager with VI key bindings in Python. @@ -849,12 +598,12 @@ Applications using ncurses minicom terminal emulator for serial modem connections - https://alioth.debian.org/projects/minicom/ + https://salsa.debian.org/minicom-team/minicom mosh a replacement for ssh. - https://mosh.mit.edu/ + https://mosh.org/ tack terminfo action checker @@ -903,7 +652,7 @@ Development activities Ongoing development work is done by Thomas E. Dickey. Thomas E. Dickey has acted as the maintainer for the Free Software Foundation, which - holds a copyright on ncurses for releases 4.2 through 6.1. Following + held a copyright on ncurses for releases 4.2 through 6.1. Following the release of ncurses 6.1, effective as of release 6.2, copyright for ncurses reverted to Thomas E. Dickey (see the ncurses FAQ for additional information). @@ -925,17 +674,17 @@ Development activities Beta versions of ncurses are made available at - ftp://ftp.invisible-island.net/ncurses/current/ and + https://invisible-island.net/archives/ncurses/current/ and https://invisible-mirror.net/archives/ncurses/current/ . Patches to the current release are made available at - ftp://ftp.invisible-island.net/ncurses/6.1/ and - https://invisible-mirror.net/archives/ncurses/6.1/ . + https://invisible-island.net/archives/ncurses/6.4/ and + https://invisible-mirror.net/archives/ncurses/6.4/ . There is an archive of the mailing list here: - http://lists.gnu.org/archive/html/bug-ncurses (also https) + https://lists.gnu.org/archive/html/bug-ncurses . Related resources @@ -944,6 +693,7 @@ Related resources * ncurses licensing * Symbol versioning in ncurses * Comments on ncurses versus slang (S-Lang) + * Comments on OpenBSD * tack - terminfo action checker * tctest - termcap library checker * Terminal Database @@ -954,11 +704,12 @@ Other resources terminal description file once maintained by Eric Raymond . Unlike the older version, the termcap and terminfo data are provided in the same file, which also provides several user-definable extensions beyond the - X/Open specification. + X/Open Curses specification. You can find lots of information on terminal-related topics not - covered in the terminfo file at Richard Shuford's archive . The - collection of computer manuals at bitsavers.org has also been useful. + covered in the terminfo file in Richard Shuford's archive (original). + The collection of computer manuals at bitsavers.org has also been + useful. * Overview * Release Notes diff --git contrib/ncurses/AUTHORS contrib/ncurses/AUTHORS index 0018842ca099..09dfc9a9efa6 100644 --- contrib/ncurses/AUTHORS +++ contrib/ncurses/AUTHORS @@ -1,5 +1,5 @@ ------------------------------------------------------------------------------- --- Copyright 2020 Thomas E. Dickey -- +-- Copyright 2020,2021 Thomas E. Dickey -- -- Copyright 2006,2017 Free Software Foundation, Inc. -- -- -- -- Permission is hereby granted, free of charge, to any person obtaining a -- @@ -26,13 +26,13 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------- --- $Id: AUTHORS,v 1.4 2020/02/02 23:34:34 tom Exp $ +-- $Id: AUTHORS,v 1.5 2021/06/17 21:20:30 tom Exp $ ------------------------------------------------------------------------------- These are the principal authors/contributors of ncurses since 1.9.9e, in decreasing order of their contribution: TD Thomas E. Dickey -JPF Juergen Pfeifer +JPF Juergen Pfeifer ESR Eric S Raymond AVL Alexander V Lukyanov PB Philippe Blain diff --git contrib/ncurses/COPYING contrib/ncurses/COPYING index 3a2297536813..540047f121f1 100644 --- contrib/ncurses/COPYING +++ contrib/ncurses/COPYING @@ -1,4 +1,4 @@ -Copyright 2018-2020,2021 Thomas E. Dickey +Copyright 2018-2023,2024 Thomas E. Dickey Copyright 1998-2017,2018 Free Software Foundation, Inc. Permission is hereby granted, free of charge, to any person obtaining a @@ -26,4 +26,4 @@ sale, use or other dealings in this Software without prior written authorization. -- vile:txtmode fc=72 --- $Id: COPYING,v 1.10 2021/01/01 09:54:30 tom Exp $ +-- $Id: COPYING,v 1.13 2024/01/05 21:13:17 tom Exp $ diff --git contrib/ncurses/INSTALL contrib/ncurses/INSTALL index 95f5a3931683..a2076eeec261 100644 --- contrib/ncurses/INSTALL +++ contrib/ncurses/INSTALL @@ -1,5 +1,5 @@ ------------------------------------------------------------------------------- --- Copyright 2018-2019,2020 Thomas E. Dickey -- +-- Copyright 2018-2023,2024 Thomas E. Dickey -- -- Copyright 1998-2017,2018 Free Software Foundation, Inc. -- -- -- -- Permission is hereby granted, free of charge, to any person obtaining a -- @@ -26,7 +26,7 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------- --- $Id: INSTALL,v 1.226 2020/09/06 23:41:16 tom Exp $ +-- $Id: INSTALL,v 1.254 2024/04/27 14:21:05 tom Exp $ --------------------------------------------------------------------- How to install Ncurses/Terminfo on your system --------------------------------------------------------------------- @@ -35,10 +35,10 @@ * READ ALL OF THIS FILE BEFORE YOU TRY TO INSTALL NCURSES. * ************************************************************ -You should be reading the file INSTALL in a directory called ncurses-d.d, where -d.d is the current version number. There should be several subdirectories, -including `c++', `form', `man', `menu', 'misc', `ncurses', `panel', `progs', -and `test'. See the README file for a roadmap to the package. +You should be reading the file INSTALL in a directory called ncurses-d.d, +where d.d is the current version number. There should be several +subdirectories, including 'c++', 'form', 'man', 'menu', 'misc', 'ncurses', +'panel', 'progs', and 'test'. See 'README' for a roadmap to the package. If you are a distribution integrator or packager, please read and act on the section titled FOR SYSTEM INTEGRATORS below. @@ -47,9 +47,10 @@ If you are converting from BSD curses and do not have root access, be sure to read the BSD CONVERSION NOTES section below. If you are trying to build applications using gpm with ncurses, -read the USING NCURSES WITH GPM section below. +read the USING GPM section below. -If you are cross-compiling, see the note below on BUILDING WITH A CROSS-COMPILER. +If you are cross-compiling, see the note below on +BUILDING WITH A CROSS-COMPILER. If you want to build the Ada95 binding, go to the Ada95 directory and follow the instructions there. The Ada95 binding is not covered below. @@ -72,14 +73,14 @@ Ncurses has been also built in the OS/2 EMX environment. INSTALLATION PROCEDURE: ---------------------- -1. First, decide whether you want ncurses to replace your existing library (in - which case you'll need super-user privileges) or be installed in parallel - with it. +1. First, decide whether you want ncurses to replace your existing library + (in which case you'll need super-user privileges) or be installed in + parallel with it. The --prefix option to configure changes the root directory for installing ncurses. The default is normally in subdirectories of /usr/local, except for systems where ncurses is normally installed as a system library (see - "IF YOU ARE A SYSTEM INTEGRATOR"). Use --prefix=/usr to replace your + "FOR SYSTEM INTEGRATORS"). Use --prefix=/usr to replace your default curses distribution. The package gets installed beneath the --prefix directory as follows: @@ -106,16 +107,16 @@ INSTALLATION PROCEDURE: See also the discussion of --with-install-prefix. -2. Type `./configure' in the top-level directory of the distribution to +2. Type './configure' in the top-level directory of the distribution to configure ncurses for your operating system and create the Makefiles. Besides --prefix, various configuration options are available to customize - the installation; use `./configure --help' to list the available options. + the installation; use './configure --help' to list the available options. If your operating system is not supported, read the PORTABILITY section in the file ncurses/README for information on how to create a configuration file for your system. - The `configure' script generates makefile rules for one or more object + The 'configure' script generates makefile rules for one or more object models and their associated libraries: libncurses.a (normal) @@ -145,7 +146,7 @@ INSTALLATION PROCEDURE: the library names (e.g., libncursest.a, libncursestw.a). If you do not specify any models, the normal and debug libraries will be - configured. Typing `configure' with no arguments is equivalent to: + configured. Typing 'configure' with no arguments is equivalent to: ./configure --with-normal --with-debug --enable-overwrite @@ -176,10 +177,10 @@ INSTALLATION PROCEDURE: You can make curses and terminfo fall back to an existing file of termcap definitions by configuring with --enable-termcap. If you do this, the library will search /etc/termcap before the terminfo database, and will - also interpret the contents of the TERM environment variable. See the + also interpret the contents of the $TERM environment variable. See the section BSD CONVERSION NOTES below. -3. Type `make'. Ignore any warnings, no error messages should be produced. +3. Type 'make'. Ignore any warnings; no error messages should be produced. This should compile the ncurses library, the terminfo compiler tic(1), captoinfo(1), infocmp(1), toe(1), clear(1) tset(1), reset(1), and tput(1) programs (see the manual pages for explanation of what they do), some test @@ -195,8 +196,9 @@ INSTALLATION PROCEDURE: database before running the test programs. Not all vendors' terminfo databases are SVr4-compatible, but most seem to be. - It is possible to configure ncurses to use other terminfo database formats. - A few are provided as examples in the include-directory (see --with-caps). + It is possible to configure ncurses to use other terminfo database + formats. A few are provided as examples in the include-directory (see + --with-caps). If you run the test programs WITHOUT installing terminfo, ncurses may read the termcap file and cache that in $HOME/.terminfo, which will @@ -207,21 +209,21 @@ INSTALLATION PROCEDURE: You can use it to verify that the screen highlights work correctly, that cursor addressing and window scrolling works OK, etc. -5. Once you've tested, you can type `make install' to install libraries, - the programs, the terminfo database and the manual pages. Alternately, you - can type `make install' in each directory you want to install. In the +5. Once you've tested, you can type 'make install' to install libraries, + the programs, the terminfo database and the manual pages. Alternately, + you can type 'make install' in each directory you want to install. In the top-level directory, you can do a partial install using these commands: 'make install.progs' installs tic, infocmp, etc... 'make install.includes' installs the headers. 'make install.libs' installs the libraries (and the headers). - 'make install.data' installs the terminfo data. (Note: `tic' must + 'make install.data' installs the terminfo data. (Note: 'tic' must be installed before the terminfo data can be compiled). 'make install.man' installs the manual pages. ############################################################################ - # CAVEAT EMPTOR: `install.data' run as root will NUKE any existing # + # CAVEAT EMPTOR: 'install.data' run as root will NUKE any existing # # terminfo database. If you have any custom or unusual entries SAVE them # # before you install ncurses. # ############################################################################ @@ -242,8 +244,8 @@ INSTALLATION PROCEDURE: compile using its curses.h you'll end up with a large number of undefined symbols at link time. - IF YOU DO NOT HAVE ROOT: Change directory to the `progs' subdirectory - and run the `capconvert' script. This script will deduce various things + IF YOU DO NOT HAVE ROOT: Change directory to the 'progs' subdirectory + and run the 'capconvert' script. This script will deduce various things about your environment and use them to build you a private terminfo tree, so you can use ncurses applications. @@ -273,13 +275,13 @@ CONFIGURE OPTIONS: ./configure --help - The --help and several options are common to all configure scripts that are - generated with autoconf. Those are all listed before the line + The --help and several options are common to all configure scripts that + are generated with autoconf. Those are all listed before the line --enable and --with options recognized: - The other options are specific to this package. We list them in alphabetic - order. + The other options are specific to this package. We list them in + alphabetic order. --disable-assumed-color With ncurses 5.1, we introduced a new function, assume_default_colors() @@ -444,7 +446,7 @@ CONFIGURE OPTIONS: --with-menu-libname=XXX --with-panel-libname=XXX - Rather than renaming them abitrarily, a prefix or suffix is + Rather than renaming them arbitrarily, a prefix or suffix is recommended. An "n" prefix provides consistency with ncurses versus curses, i.e., @@ -453,8 +455,8 @@ CONFIGURE OPTIONS: --with-panel-libname=npanel --disable-pkg-ldflags - Omit options in $EXTRA_LDFLAGS from the pkg-config ".pc" and - corresponding ncurses*-config script which normally are listed via + Omit options in $LDFLAGS and $EXTRA_LDFLAGS from the pkg-config ".pc" + and corresponding ncurses*-config script which normally are listed via the "--libs" option. These options are normally used to facilitate linking to ncurses when it was configured to use the rpath feature. @@ -475,11 +477,19 @@ CONFIGURE OPTIONS: filesystems. This option adds a 1-second sleep to help those tools avoid unnecessary relinking during the install process. + --disable-root-access + Compile with environment restriction, so most file-access is limited + when running as root, or via a setuid/setgid application. + --disable-root-environ Compile with environment restriction, so certain environment variables - are not available when running as root, or via a setuid/setgid - application. These are (for example $TERMINFO) those that allow the - search path for the terminfo or termcap entry to be customized. + are not available when running as root. These are (for example + $TERMINFO) those that allow the search path for the terminfo or termcap + entry to be customized. + + Disabling the root environment variables also disables the setuid + environment variables by default. Use the --disable-setuid-environ + option to modify this behavior. --disable-rpath-hack Normally the configure script helps link libraries found in unusual @@ -494,6 +504,16 @@ CONFIGURE OPTIONS: --disable-stripping Do not strip installed executables. + --disable-setuid-environ + Compile with environment restriction, so certain environment variables + are not available when running via a setuid/setgid application. These + are (for example $TERMINFO) those that allow the search path for the + terminfo or termcap entry to be customized. + + A setuid/setgid application inherits its environment variables from + the current user, in contrast to sudo which may limit the environment + variables that ncurses uses. + --disable-tic-depends When building shared libraries, normally the tic library is linked to depend upon the ncurses library (or equivalently, on the tinfo-library @@ -512,26 +532,6 @@ CONFIGURE OPTIONS: list documented in X/Open. ncurses provides varargs support for this function. Use --disable-tparm-varargs to disable this support. - --disable-wattr-macros - The 6.0 ABI adds support for extended colors and for extended mouse. - The former is a noticeable problem when developers inadvertently - compile using the ncurses6 header files and link with an ncurses5 - library, because the wattr* macros use a new field in the WINDOW - structure. These macros are used in several applications. - - Since ncurses provides an actual function for each of these macros, - suppressing them from the curses.h header allows the ncurses5 libraries - to be used in most applications. - - NOTE: The extended colors also are used in the cchar_t structure, but - fewer applications use that. - - NOTE: This workaround does not help with mismatches in the ncurses - mouse version. The extended mouse feature uses one less fewer bit for - each button, so that only the first button will work as expected with - a mismatch between header and library. Again, most applications will - work, since most use only the first button. - --enable-assertions For testing, compile-in assertion code. This is used only for a few places where ncurses cannot easily recover by returning an error code. @@ -553,6 +553,10 @@ CONFIGURE OPTIONS: Recognize BSD-style prefix padding. Some ancient BSD programs (such as nethack) call tputs("50") to implement delays. + --enable-check-size + Compile-in feature to detect screensize for terminals which do not + advertise their screensize, e.g., serial terminals. + --enable-colorfgbg Compile with experimental $COLORFGBG code. That environment variable is set by some terminal emulators as a hint to applications, by @@ -666,9 +670,17 @@ CONFIGURE OPTIONS: --enable-opaque-form --enable-opaque-menu --enable-opaque-panel - Define symbol in curses.h which controls whether some library - structures are treated as "opaque". The --enable-opaque-curses option - is overridden by the --enable-reentrant option. + Define symbol in curses.h controlling whether some library structures + are opaque, meaning that their members are accessible only via the + documented API. The --enable-opaque-curses option may be overridden + by the --enable-reentrant option. + + Enabling opaque-curses enables opaque for the form, menu, and panel + libraries. Use their corresponding options to disable the feature + individually. + + NOTE: beginning with ncurses 6.5 this option is enabled by default; + older versions disable it by default. --enable-pc-files If pkg-config is found (see --with-pkg-config), generate ".pc" files @@ -728,6 +740,14 @@ CONFIGURE OPTIONS: reducing the need for juggling the global SP value with set_term() and delscreen(). + --enable-stdnoreturn + When enabled, check if the <stdnoreturn.h> header exists, and if found + define GCC_NORETURN to _Noreturn rather than either the gcc-specific + __attribute__((noreturn)) or an empty token. Doing this may require + calling programs which use GCC_NORETURN in their own function + definitions to be modified, because _Noreturn is only accepted as + the first token in a declaration. + --enable-string-hacks Controls whether strlcat and strlcpy may be used. The same issue applies to OpenBSD's warnings about snprintf, noting that this function @@ -766,6 +786,26 @@ CONFIGURE OPTIONS: --enable-warnings Turn on GCC compiler warnings. There should be only a few. + --enable-wattr-macros + The 6.0 ABI adds support for extended colors and for extended mouse. + The former is a noticeable problem when developers inadvertently + compile using the ncurses6 header files and link with an ncurses5 + library, because the wattr* macros use a new field in the WINDOW + structure. These macros are used in several applications. + + Since ncurses provides an actual function for each of these macros, + suppressing them from the curses.h header allows the ncurses5 libraries + to be used in most applications. + + NOTE: The extended colors also are used in the cchar_t structure, but + fewer applications use that. + + NOTE: This workaround does not help with mismatches in the ncurses + mouse version. The extended mouse feature uses one less fewer bit for + each button, so that only the first button will work as expected with + a mismatch between header and library. Again, most applications will + work, since most use only the first button. + --enable-weak-symbols If the --with-pthread option is set, check if the compiler supports weak-symbols. If it does, then name the thread-capable library without @@ -786,14 +826,22 @@ CONFIGURE OPTIONS: symbolic link to equate libncurses.so with libncursesw.so NOTE: the Ada95 binding may be built against either version of the the - ncurses library, but you must decide which: the binding installs the - same set of files for either version. Currently (2002/6/22) it does + ncurses library, but you must decide which: the binding installs the + same set of files for either version. Currently (2023/10/21) it does not use the extended features from the wide-character code, so it is probably better to not install the binding for that configuration. + NOTE: beginning with ncurses 6.5 this option is enabled by default; + older versions disable it by default. + --enable-xmc-glitch Compile-in support experimental xmc (magic cookie) code. + --with-abi-altered=NUM + Override the displayed (rather than compiled-in) ABI. Only packagers + who have created configurations where the ABI differs from ncurses + should be interested in this option. + --with-abi-version=NUM Override the ABI version, which is used in shared library filenames. Normally this is the same as the release version; some ports have @@ -891,8 +939,9 @@ CONFIGURE OPTIONS: script supplies "unsigned"). --with-config-suffix=XXX - Specify a suffix for the ncursesw6-config file, etc., used to work - around conflicts with packages. + Specify an suffix for "ncurses*" in the ncurses*-config filename to + work around conflicts with packages. The suffix is placed before the + dash. --with-cxx-libname=NAME Override the basename of the ncurses++ library (default: "ncurses++") @@ -997,7 +1046,7 @@ CONFIGURE OPTIONS: See also the --enable-getcap option. --with-infocmp-path[=XXX] - Use this option to override the automatic detection of tic in your + Use this option to override the automatic detection of infocmp in your $PATH when building fallbacks (see "--with-fallbacks"). --with-install-prefix=XXX @@ -1113,9 +1162,10 @@ CONFIGURE OPTIONS: Override the basename of the panel library (default: "panel") --with-pc-suffix=SUFFIX - If ".pc" files are installed, optionally add a suffix to the files - and corresponding package names to separate unusual configurations. - If no option value is given (or if it is "none"), no suffix is added. + If ".pc" files are installed (see --enable-pc-files), optionally add a + suffix to the files and corresponding package names to separate + unusual configurations. If no option value is given (or if it is + "none"), no suffix is added. --with-pcre2 Add PCRE2 (Perl-compatible regular expressions v2) to the build if it @@ -1126,12 +1176,28 @@ CONFIGURE OPTIONS: not supplied by the development environment, while ncurses' form library uses a regular expression feature for one of the field types. - --with-pkg-config=[DIR] - Check for pkg-config, optionally specifying its path. + --with-pkg-config[=CMD] + Check for pkg-config, optionally specifying its pathname. - --with-pkg-config-libdir=[DIR] + --with-pkg-config-libdir[=DIR] If pkg-config was found, override the automatic check for its library - path. + path. The optional DIR value can be + + "auto", automatically use pkg-config's library directory, or + + "libdir", use a ${libdir}/pkgconfig (based on the configuration), or + + a directory path, i.e., beginning with "/". + + The configure script allows only a single directory, because + that is used as the directory in which to install ".pc" files. + + The automatic check for the library path prefers the first directory + which currently exists. If none of the directories listed by + pkg-config exist, the check prefers a pkgconfig directory under the + "libdir" set by the configure script (which may not be the system + default), or if pkg-config lists nothing suitable, the first one which + is listed by pkg-config is used. --with-profile Generate profile-libraries These are named by adding "_p" to the root, @@ -1191,6 +1257,10 @@ CONFIGURE OPTIONS: This is normally chosen automatically based on the type of system which you are building on. We use it for testing the configure script. + --with-strip-program=XXX + When stripping executables during install, use the specified program + rather than "strip". + --with-sysmouse use FreeBSD sysmouse interface provide mouse support on the console. @@ -1205,7 +1275,7 @@ CONFIGURE OPTIONS: Specify a search-list of terminfo directories which will be compiled into the ncurses library (default: DATADIR/terminfo) - This is a colon-separated list, like the TERMINFO_DIRS environment + This is a colon-separated list, like the $TERMINFO_DIRS environment variable. --with-termlib[=XXX] @@ -1311,7 +1381,8 @@ CONFIGURE OPTIONS: --with-xterm-kbs=XXX Configure xterm's terminfo entries to use either BS (^H, i.e., ASCII backspace) or DEL (^?, or 127). XXX can be BS (or bs, 8) or DEL - (or del, 127). + (or del, 127). If XXX is "auto", the configure script chooses BS or + DEL according to platform defaults. During installation, the makefile and scripts modifies the "xterm+kbs" terminfo entry to use this setting. @@ -1355,11 +1426,6 @@ CONFIGURE OPTIONS: programs (e.g., tic). The test applications will still be built if you type "make", though not if you simply do "make install". - --without-tack - Suppress build/install with tack program, if it happens to be - in the same build-tree (tack was moved out of the ncurses source-tree - in 20070203). - --without-tests Tell the configure script to suppress the build of ncurses' test programs. @@ -1385,6 +1451,88 @@ COMPATIBILITY WITH OLDER RELEASES: you may encounter when building a system with different versions of ncurses: + 6.5 (Apt 27, 2024) + Interface changes: + + + the WINDOW structure and some related internal data types declared + in <curses.h> have been made opaque by default; + + the FORM, MENU, and PANEL structures and related internal data types + from their corresponding header files have been made opqaue by + default; and + + support for wide characters is now enabled by default. + + Added extensions: + + + is_cbreak, is_echo, is_nl, and is_raw, as well as "_sp" variants + + + tiparm_s and tiscan_s + + Added internal functions (other than "_sp" variants): + + + _nc_env_access + + Removed internal functions: + + + none + + Modified internal functions: + + + These now pass a const parameter: _nc_delink_entry, _nc_str_copy, + and _nc_trans_string + + 6.4 (Dec 31, 2022) + Interface changes: + + + none + + Added extensions: + + + none + + Added internal functions (other than "_sp" variants): + + + add _nc_free_termtype1 and _nc_free_tparm, for memory-leaks + + Removed internal functions: + + + none + + Modified internal functions: + + + none + + 6.3 (Oct 21, 2021) + Interface changes: + + + the definition of TERMTYPE2 is now internal, not visible in the ABI, + like the enclosing TERMINAL which was previously made opaque. This + was done to provide SCREEN-specific "static" variables in terminfo. + + Added extensions: + + + add sp-funcs for erasewchar, killwchar. + + Added internal functions (other than "_sp" variants): + + + _nc_safe_fopen and _nc_safe_open3 limit privileges if possible when + opening a file; otherwise disallow access for updating files. + + + _nc_tiparm is a variant of tiparm which is used when all of the + parameters are known to be numbers rather than possibly strings. + + + _nc_reset_tparm improves tic's checks by resetting the terminfo + "static variables" before calling functions which may update them. + + Removed internal functions: + + + none + + Modified internal functions: + + + _nc_trace_ttymode passes pointer to const data + + + _nc_tparm_analyze passes pointer to int*, not int[] + 6.2 (Feb 12, 2020) Interface changes: @@ -2147,15 +2295,15 @@ FOR SYSTEM INTEGRATORS: Naming the Console Terminal In various systems there has been a practice of designating the system - console driver type as `console'. Please do not do this! It + console driver type as 'console'. Please do not do this! It complicates peoples' lives, because it can mean that several different terminfo entries from different operating systems all logically want to - be called `console'. + be called 'console'. Please pick a name unique to your console driver and set that up in the /etc/inittab table or local equivalent. Send the entry to the terminfo maintainer (listed in the misc/terminfo file) to be included - in the terminfo file, if it's not already there. See the + in the terminfo file, if it is not already there. See the term(7) manual page included with this distribution for more on conventions for choosing type names. @@ -2189,7 +2337,7 @@ CONFIGURING FALLBACK ENTRIES: tree is accessible (that is, in single-user mode or at OS installation time) the ncurses library can be compiled to include an array of pre-fetched fallback entries. - + NOTE: This must be done on a machine which has ncurses' infocmp and terminfo database installed (as well as ncurses' tic and infocmp programs). That is because the fallback sources are generated and @@ -2388,4 +2536,4 @@ BUG REPORTS: The Hacker's Guide in the doc directory includes some guidelines on how to report bugs in ways that will get them fixed most quickly. --- vile:txtmode +-- vile:txtmode fc=78 diff --git contrib/ncurses/MANIFEST contrib/ncurses/MANIFEST index 1dbfb96b7a1c..a9395d2f8a09 100644 --- contrib/ncurses/MANIFEST +++ contrib/ncurses/MANIFEST @@ -33,6 +33,7 @@ ./Ada95/include/ncurses_defs ./Ada95/make-tar.sh ./Ada95/mk-1st.awk +./Ada95/mk-pkg.awk ./Ada95/package/AdaCurses-doc.spec ./Ada95/package/AdaCurses.spec ./Ada95/package/debian/compat @@ -342,7 +343,7 @@ ./doc/html/announce.html ./doc/html/hackguide.html ./doc/html/index.html -./doc/html/man/adacurses6-config.1.html +./doc/html/man/adacursesw6-config.1.html ./doc/html/man/captoinfo.1m.html ./doc/html/man/clear.1.html ./doc/html/man/curs_add_wch.3x.html @@ -463,7 +464,7 @@ ./doc/html/man/mitem_value.3x.html ./doc/html/man/mitem_visible.3x.html ./doc/html/man/ncurses.3x.html -./doc/html/man/ncurses6-config.1.html +./doc/html/man/ncursesw6-config.1.html ./doc/html/man/new_pair.3x.html ./doc/html/man/panel.3x.html ./doc/html/man/resizeterm.3x.html @@ -553,6 +554,7 @@ ./include/edit_cfg.sh ./include/hashed_db.h ./include/headers +./include/nc_access.h ./include/nc_alloc.h ./include/nc_mingw.h ./include/nc_panel.h @@ -670,7 +672,7 @@ ./man/keyok.3x ./man/legacy_coding.3x ./man/make_sed.sh -./man/man_db.renames +./man/man_db.renames.in ./man/manhtml.aliases ./man/manhtml.externs ./man/manlinks.sed @@ -768,6 +770,7 @@ ./misc/makellib ./misc/menu.def ./misc/menu.ref +./misc/ncu2openbsd ./misc/ncurses-config.in ./misc/ncurses.def ./misc/ncurses.ref @@ -899,6 +902,7 @@ ./ncurses/new_pair.h ./ncurses/report_hashing.c ./ncurses/report_offsets.c +./ncurses/term.priv.h ./ncurses/tinfo/MKcaptab.awk ./ncurses/tinfo/MKcaptab.sh ./ncurses/tinfo/MKcodes.awk @@ -1108,6 +1112,7 @@ ./test/color_content.c ./test/color_name.h ./test/color_set.c +./test/combine.c ./test/configure ./test/configure.in ./test/demo_altkeys.c @@ -1212,15 +1217,19 @@ ./test/test_addstr.c ./test/test_addwstr.c ./test/test_arrays.c +./test/test_delwin.c +./test/test_endwin.c ./test/test_get_wstr.c ./test/test_getstr.c ./test/test_instr.c ./test/test_inwstr.c +./test/test_mouse.c ./test/test_opaque.c ./test/test_setupterm.c ./test/test_sgr.c ./test/test_termattrs.c ./test/test_tparm.c +./test/test_unget_wch.c ./test/test_vid_puts.c ./test/test_vidputs.c ./test/testaddch.c diff --git contrib/ncurses/Makefile.in contrib/ncurses/Makefile.in index 7be6e7677637..1303e171cfa1 100644 --- contrib/ncurses/Makefile.in +++ contrib/ncurses/Makefile.in @@ -1,6 +1,6 @@ -# $Id: Makefile.in,v 1.43 2020/02/02 23:34:34 tom Exp $ +# $Id: Makefile.in,v 1.46 2022/10/01 22:53:36 tom Exp $ ############################################################################## -# Copyright 2018-2019,2020 Thomas E. Dickey # +# Copyright 2018-2021,2022 Thomas E. Dickey # # Copyright 1998-2014,2015 Free Software Foundation, Inc. # # # # Permission is hereby granted, free of charge, to any person obtaining a # @@ -62,11 +62,26 @@ pkgdir = @PKG_CONFIG_LIBDIR@ include_dir = ${includedir}${includesubdir} +FGREP = @FGREP@ + INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ DIRS_TO_MAKE = @DIRS_TO_MAKE@ +@MAKE_PHONY@.PHONY : all +@MAKE_PHONY@.PHONY : check +@MAKE_PHONY@.PHONY : clean +@MAKE_PHONY@.PHONY : depend +@MAKE_PHONY@.PHONY : distclean +@MAKE_PHONY@.PHONY : install +@MAKE_PHONY@.PHONY : mostlyclean +@MAKE_PHONY@.PHONY : preinstall +@MAKE_PHONY@.PHONY : realclean +@MAKE_PHONY@.PHONY : sources +@MAKE_PHONY@.PHONY : tags +@MAKE_PHONY@.PHONY : uninstall + all :: $(DIRS_TO_MAKE) $(DIRS_TO_MAKE) : @@ -90,16 +105,16 @@ preinstall : @ test "$(include_dir)" = "$(prefix)/include" || \ echo '** Include-directory is not in a standard location' @ test ! -f $(include_dir)/termcap.h || \ - fgrep NCURSES_VERSION $(include_dir)/termcap.h >/dev/null || \ + $(FGREP) NCURSES_VERSION $(include_dir)/termcap.h >/dev/null || \ echo '** Will overwrite non-ncurses termcap.h' @ test ! -f $(include_dir)/curses.h || \ - fgrep NCURSES_VERSION $(include_dir)/curses.h >/dev/null || \ + $(FGREP) NCURSES_VERSION $(include_dir)/curses.h >/dev/null || \ echo '** Will overwrite non-ncurses curses.h' distclean \ realclean :: -check: +check : @ echo The test-programs are interactive diff --git contrib/ncurses/Makefile.os2 contrib/ncurses/Makefile.os2 index 960c2bdb8bad..bc3407d65750 100644 --- contrib/ncurses/Makefile.os2 +++ contrib/ncurses/Makefile.os2 @@ -1,5 +1,5 @@ ############################################################################## -# Copyright 2020 Thomas E. Dickey # +# Copyright 2020,2021 Thomas E. Dickey # # Copyright 1998-2000,2006 Free Software Foundation, Inc. # # # # Permission is hereby granted, free of charge, to any person obtaining a # @@ -26,7 +26,7 @@ # use or other dealings in this Software without prior written # # authorization. # ################################################################################ -# $Id: Makefile.os2,v 1.12 2020/02/02 23:34:34 tom Exp $ +# $Id: Makefile.os2,v 1.13 2021/06/17 21:20:30 tom Exp $ # # Wrapper Makefile for ncurses library under OS/2. # Author: Juan Jose Garcia Ripoll <worm@arrakis.es>. @@ -70,7 +70,7 @@ # disappear are not essential. # # I first thought about killing '_nc_*' symbols, but it seems that some of -# them --_nc_panel_hook, _nc_ada*, etc-- are needed outside ncurses.dll. +# them --_nc_panel_hook, _nc_ada*, etc-- are needed outside ncurses.dll. # However, the whole size of the export table will not be larger than 1k or # so. # diff --git contrib/ncurses/NEWS contrib/ncurses/NEWS index 4203d188f7f4..8bedbc8264e1 100644 --- contrib/ncurses/NEWS +++ contrib/ncurses/NEWS @@ -1,5 +1,5 @@ ------------------------------------------------------------------------------- --- Copyright 2018-2020,2021 Thomas E. Dickey -- +-- Copyright 2018-2023,2024 Thomas E. Dickey -- -- Copyright 1998-2017,2018 Free Software Foundation, Inc. -- -- -- -- Permission is hereby granted, free of charge, to any person obtaining a -- @@ -26,7 +26,7 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------- --- $Id: NEWS,v 1.3634 2021/02/21 00:18:55 tom Exp $ +-- $Id: NEWS,v 1.4114 2024/04/27 18:00:35 tom Exp $ ------------------------------------------------------------------------------- This is a log of changes that ncurses has gone through since Zeyd started @@ -46,6 +46,1171 @@ See the AUTHORS file for the corresponding full names. Changes through 1.9.9e did not credit all contributions; it is not possible to add this information. +20240427 6.5 release for upload to ftp.gnu.org + + update announcement + + fixes/corrections for manpages (patches by Branden Robinson). + + fix redefinition of CASTxPTR, for legacy Unix. + +20240420 + + improve formatting/style of manpages (patches by Branden Robinson). + + compiler warning/portability fixes. + +20240414 + + build/bug-fix for check-size feature (reports by Sam James, Gabriele + Balducci). + +20240413 + + improve formatting/style of manpages (patches by Branden Robinson). + + provide for padding in check-size feature, using new_prescr() to + pass interim SCREEN pointer. + + complete change for opaque options (Gentoo #928973, cf: 20231021). + + update package /debian/rules and related lintian overrides + + revise progs.priv.h to provide for NC_ISATTY reuse + +20240330 + + remove masking of ISIG in cbreak() (report by Benno Schulenberg). + + modify test/test_mouse.c to use curses api for raw/noraw. + > improved configure macros from other program development: + + build-fix for clang on Solaris + + suppress filename/timestamp in gzip'd manpages (suggested for + byacc by Andrin Geiger) + +20240323 + + modify tput/tset reset feature to avoid 1-second sleep if running in + a pseudo-terminal. + + modify check-size feature to avoid using it in a pseudoterminal + (cf: 20231016) + + improve formatting/style of manpages (patches by Branden Robinson). + + trim a space after some "-R" options, fixing builds for applications + built using clang and ncurses on Solaris. + +20240309 + + modify xgterm to work around line-drawing bug -TD + + use CSI 3J in vte-2017 (report by Sven Joachim) + +20240302 + + add configure check for MB_LEN_MAX, to provide warning as needed. + + improve formatting/style of manpages (patches by Branden Robinson). + + fix regression in tput which disallowed hex/octal parameters (report + by Werner Fink, cf: 20230408) + + update config.guess, config.sub + +20240224 + + improve man/curs_mouse.3x style (Branden Robinson, Sven Joachim). + + provide for CCHARW_MAX greater than 1 + + eliminate use of PATH_MAX in lib_trace.c + + work around misconfiguration of MacPorts gcc13, which exposes invalid + definition of MB_LEN_MAX in gcc's fallback copy of limits.h (MacPorts + #69374). + +20240217 + + add vt100+noapp, vt100+noapp+pc, xterm+app+pc, xterm+decedit from + xterm #389 -TD + + fix inconsistent description of wmouse_trafo() (Debian #1059778). + + modify wenclose() to handle pads (Debian #1059783). + + improve manpage discussion of mouseinterval() (Debian #1058560). + +20240210 + + compiler-warning fixes, while investigating an optimizer bug in + "gcc (MacPorts gcc13 13.2.0_4+stdlib_flag) 13.2.0" + which results in only the first byte of a multibyte character being + printed to the screen. + +20240203 + + minor changes to tracing and locale-checks. + +20240127 + + amend change to z39-a (report by Sven Joachim). + + use xterm+nopcfkeys, vt52-basic, dec+pp, dec+sl, vt52+arrows, + hp+pfk+cr, klone+acs, klone+color, klone+sgr, ncr160wy50+pp + to trim -TD + + NetBSD-related fixes for x68k and wsvt25 (patch by Thomas Klausner) + +20240120 + + improve formatting/style of manpages (patches by Branden Robinson). + + amend discussion of aliases in tput.1 + + use ansi+sgrbold, ansi+sgrdim, ansi+sgrso, ansi+sgrul, ansi+tabs + ecma+color, ecma+sgr, vt100+4bsd, vt100+pfkeys, vt220+pcedit + xterm+256color, xterm+acs, xterm+nopcfkeys, xterm+pcf2 to trim -TD + + modify configure scripts/makefiles to omit KEY_RESIZE if the + corresponding SIGWINCH feature is disabled. + +20240113 + + improve formatting/style of manpages (patches by Branden Robinson). + + modify dist.mk to avoid passing developer's comments in manpages into + the generated html documentation. + + use ansi+local, ansi+local1, ansi+pp, ansi+rca, ansi+rca2, ansi+sgr + to trim -TD + + restore padding for wy520* and vt320-k311 (report by Sven Joachim). + +20240106 + + use ansi+arrows, ansi+apparrows, ansi+csr, ansi+erase, ansi+idc, + ansi+idc1, ansi+idl, ansi+idl1, ansi+inittabs to trim -TD + + minor manpage formatting changes for consistency. + + modify doc-html test package's install-directory, per lintian. + + add attr_get.3x to man_db.renames.in (patch by Sven Joachim). + +20231230 + + improve formatting/style of manpages (patches by Branden Robinson). + + add ms-vt100-16color, winconsole -TD + + add rio, rio-direct -TD + + add mostlike -TD + + add wezterm, contour -TD + +20231223 + + improve formatting/style of manpages (patches by Branden Robinson). + +20231217 + + improve formatting/style of manpages (patches by Branden Robinson). + + correct an assignment in infocmp "-u" for detecting if a boolean + is unset in a base entry and set in a use'd chunk, i.e., if it was + cancelled. + + modify infocmp "-u" option to not report cancels for strings which + were already cancelled in a use'd chunk. + + join two lines in infotocap.3x to eliminate a spurious "description" + link in installed manpages (report by Sven Joachim). + + fix typo in NEWS (report by Sven Joachim). + +20231209 + + modify infocmp "-u" option to not report cancels in use'd chunks + which are not mentioned in the top-level terminal description. + + remove xterm+sm+1006 from tmux (Debian #1057688). + + used "infocmp -u" to help trim redundant capabilities -TD + + updated man/edit_man.sh to allow for "\%" markers embedded after + bold font escapes in manpage cross-references (Debian #1057651). + + reduce compiler-warnings in configure checks + +20231202 + + correct initial alignment of extended capabilities in infocmp, so + that the "-u" option can be used for more than two terminal types. + + improve formatting/style of manpages, changing environment variables + to italics (patches by Branden Robinson). + +20231125 + + add information about "ttycap", termcap's forerunner, to tset.1 + (patch by Branden Robinson). + + improve formatting/style of manpages, including section reordering + (patches by Branden Robinson). + + modify usage messages in configure script, bracketing optional values + (report by Branden Robinson). + +20231121 + + amend fix for Debian #1055882, correcting nul terminator check in + waddnstr (Debian #1056340). + +20231118 + + improve description of length-parameter and error-returns in several + manpages: curs_addchstr.3x, curs_addstr.3x, curs_addwstr.3x, + curs_in_wch.3x, curs_in_wchstr.3x, curs_inchstr.3x, curs_ins_wstr.3x, + curs_insstr.3x, curs_instr.3x, curs_inwstr.3x + + amend parameter check for entire string versus specific length in + winsnstr() and wins_nwstr() to match Solaris. + + make similar correction to wins_nwstr(). + + correct loop termination condition in waddnstr() and waddnwstr() + (Debian #1055882, cf: 20201205). + +20231111 + + used "infocmp -u" to help trim redundant capabilities -TD + + add limit checks in infocmp needed when processing extended + capabilities with the "-u" option. + + fix inconsistent sort-order in see-also sections of manpages. + + fix a few compiler warnings for Solaris 10. + + modify endwin() to return an error if it is called again without an + intervening screen update (report by Rajeev Pillai, NetBSD #57592). + +20231104 + + modify reset command to avoid altering clocal if the terminal uses a + modem (prompted by discussion with Werner Fink, Michal Suchanek, + OpenSUSE #1201384, Debian #60377). + + build-fixes for --with-caps variations. + + correct a couple of section-references in INSTALL. + +20231028 + + move xterm focus mode 1004 from xterm+sm+1006 into xterm+focus as + fe/fd capabilities, like vim (vim-pr #13440). + + modify --with-pkg-config-libdir option to make "libdir" the default, + as documented, rather than "auto" (report by Branden Robinson). + + improve messages from configure script (patches by Branden Robinson). + +20231021 + + use oldxterm+sm+1006 in vte-2014 (report by Benno Schulenberg) -TD + + add ansi+apparrows -TD + + change defaults for configure opaque and widec options (prompted by + discussion with Branden Robinson). + + minor cleanup of compiler- and manpage-warnings. + +20231016 + + make the recent change to setupterm optional "--enable-check-size" + (Debian #1054022). + +20231014 + + improve formatting/style of manpages (patches by Branden Robinson). + + updated configure script macro CF_XOPEN_SOURCE, for uClibc-ng + + update config.guess, config.sub + +20231007 + + improve loop-limit for get_position(). + + improve manual description of immedok (Debian #1053603). + + fix a few formatting issues with manpages (Debian #1053123). + + improve formatting/style of manpages (patches by Branden Robinson). + +20231001 + + modify setupterm to provide for using ANSI cursor-position report (in + user6/user7 terminfo capabilities) to obtain screensize if neither + environment variables or ioctl is used. The ncurses test-program + with options "-E -T" demonstrates this feature. + + improve error messages in tic (patch by Branden Robinson). + + improve formatting/style of manpages (patches by Branden Robinson). + + modify test/clip_printw.c to optionally test non-wrapped updates. + + fix reallocation loop for vsnprintf() in _nc_sprintf_string() by + copying the va_list variable (patch by Ian Abbott). + +20230923 + + improve formatting of manpages (patches by Branden Robinson). + + amend change to delscreen() to limit the windows which it creates to + just those associated with the screen (report by Frederic Boiteux, + cf: 20220813). + +20230918 + + new tarball/errata (report by Sven Joachim). + +20230917 + + improve formatting of manpages (integrated patches by Branden + Robinson). + + correct limit for name-length in write_entry.c (report/testcase by + Luna Saphie Mittelbach). + + limit delays to 30 seconds, i.e., padding delays in terminfo, as well + as napms() and delay_output() functions. + + improve a few pointer-checks. + + improve parsing in _nc_msec_cost, allowing a single decimal point. + +20230909 + + improve formatting of manpages (patches by Branden Robinson), for + captoinfo.1m and terminfo.5 + > patches by Nicholas Marriott: + + use string-hacks in alloc_entry.c, alloc_type.c and hardscroll.c, + overlooked due to compiler changes in recent OpenBSD releases. + + add "-6" option to ncu2openbsd script. + +20230902 + + improve description of search rules for terminal descriptions in + terminfo manpage (report by Sven Joachim). + +20230826 + + fixes for compiler-warnings. + + update config.guess, config.sub + +20230819 + + various manpage-formatting fixes. + + correct formatting of table header in curs_inopts.3x (Branden + Robinson). + + correct manpage description of panel_hidden (report by Benjamin + Mordaunt). + +20230812 + + add/use putty+cursor to reflect amending of modified cursor-keys in + 2021 -TD + + add ecma+strikeout to putty -TD + + add functions to query tty-flags in SCREEN (request by Bill Gray). + +20230805 + + fix a few manpages needing tbl marker, seen by lintian warning. + + fixes for compiler-warnings. + + minor grammatical fix for manpages (Branden Robinson). + +20230729 + + improve manpages for wgetnstr() and wget_wnstr(). + + modify MinGW configuration to provide for running in MSYS/MSYS2 + shells, assuming ConPTY support (patch by Pavel Fedin). + + add assignment in CF_MAN_PAGES to fill in value for TERMINFO_DIRS in + ncurses, terminfo and tic manpages (patch by Sven Joachim). + +20230722 + + add "auto" default for --with-xterm-kbs configure option. + +20230715 + + correct wadd_wch_literal() when adding a non-spacing character to a + double-width character. + + improve manual page for curs_util. + + improve manual page for wadd_wch(). + +20230708 + + add linux+kbs for terminals which imitate xterm's behavior with + Linux -TD + + modify MinGW driver to return KEY_BACKSPACE when an unmodified + VK_BACK virtual key is entered (prompted by patch by Pavel Fedin, + Savannah #64292). + + disallow using $TERMINFO or $HOME/.terminfo when tic "-o" option is + used (report by Sven Joachim, Debian #1040048). + +20230701 + + fix mandoc warnings about unnecessary markup. + + improve parameter check in tparm_setup() + +20230625 + + adjust man/make_sed.sh to work with dates as the third field of TH. + + fixes for out-of-memory condition (report by "eaglegai"). + +20230624 + + fixes for out-of-memory condition (report by "eaglegai"). + +20230617 + + markup manpages with revision information (prompted by discussion + with Bjarni Ingi Gislason). + +20230615 + + modify _nc_read_file_entry() to show relevant filename in warnings. + + improve checks in convert_string() for corrupt terminfo entry (report + and test-case by Gregory James Duck). + +20230610 + + improve manpages discussing file descriptors in low-level functions. + + modify flushinp to use file descriptors in SCREEN, rather than from + TERMINAL, and check if they are for a terminal, like SVr4. + + modify mcprint to use file descriptor in SCREEN, for consistency. + + add xterm+focus to foot+base (patch by Daniel Ekloef). + + correct definition of Charable() for non-wide ncurses library (report + and test-case by Zbigniew Baniewski). + +20230603 + + add configure option --with-strip-program, to override program + chosen by the install program for stripping executables (prompted + by discussion with Aapo Rantalainen). + + fix typo in INSTALL (report/patch by Aapo Rantalainen). + + improve error-checks for isEILSEQ() + + increase MB_CUR_MAX to 16, matching glibc's MB_LEN_MAX. + + corrected mouse mask in test/testcurs.c + + improve thread lock in lib_trace.c + +20230527 + + fixes for compiler warnings/cppcheck. + +20230520 + + fixes for compiler warnings in MinGW environments. + +20230514 + + modify test-package "ncurses6-doc" to use manpage-aliases, which in + turn required a change to the configure script to factor in the + extra-suffix option when deriving alias names. + + add mode 1004 to xterm+sm+1006 from xterm #380 -TD + +20230506 + > build-fixes related to configure-options and/or platform: + + fix for --enable-fvisibility + + fix for unusual values of --with-rel-version + + fix for unusual values of --with-abi-version + + fix for --disable-tcap-names + + fix for termcap in nc_access.h (report by Werner Fink). + +20230429 + + revise recent change to _nc_write_entry to isolate it to a Cygwin bug + (cf: 20230311) + + amend fix for wgetnstr, wgetn_wstr to use cbreak mode unless raw + mode was set (cf: 20210522). + + fix a few warnings from cppcheck, etc. + + correct copy/paste error in nc_access.h (report by Werner Fink). + +20230424 + + check return value of _nc_save_str(), in special case for tic where + extended capabilities are processed but the terminal description was + not initialized (report by Ziqiao Kong). + + regenerate llib-* files. + +20230423 + + add tiscan_s() to help applications check formatting capabilities + that would be passed to tiparm_s, etc. + + add tiparm_s() to provide applications a way to tell ncurses what + the expected parameters are for a capability (tmux #3531). + + improve check in lib_tparm.c, ensuring that a char* fits into a + TPARM_ARG. + + add --disable-setuid-environ configure option (request by Sven + Joachim). + + drop compatibility with obsolete versions of tack, e.g., pre-1.08 + (Debian #1034549, cf: 20170722). + +20230418 + + improve checks for limits on privileged execution: + + modify _nc_syserr_abort() to use _nc_env_access(), rather than + only checking root uid. + + use getauxval() when available, to improve setuid/setgid checks. + + modify test packages to disable root access/environ options. + + modify tgoto() to accept no-parameter capabilities, for joe editor + (OpenSUSE #1210485, Gentoo #904263). + +20230415 + + configure script fixes: + + fix copy/paste error in configure option --disable-root-access + (report/patch by Sven Joachim). + + modify CF_XOPEN_SOURCE macro's amend default case to avoid + undefining _XOPEN_SOURCE if _POSIX_C_SOURCE is defined. + + modify test_tparm to account for extended capabilities. + + add checks in tparm() and tiparm() for misuse of numeric parameters, + overlooked in 20230408. + + fix errata in clear.1 and curs_terminfo.3x + +20230408 + + document limitations of tparm, and error-returns in curs_terminfo.3x + + document limitations of tgoto, and error-returns in curs_termcap.3x + + add xterm+focus to alacritty+common (patch by Christian Duerr). + + add "-v" option to tput, to show warnings. + > improve checks for malformed terminfo data (report/analysis by + Jonathan Bar Or, Michael Pearse, Emanuele Cozzi). + + make the parameter type/count checks in _nc_tiparm() more stringent + + update tgoto() to account for _nc_tiparm() changes + + add checks in tparm() and tiparm() for misuse of string parameters + + add special cases in tput to handle extensions Cs/Ms parameters + + ignore compiled-terminfo where the array sizes exceed the standard + +20230401 + + modify experimental Windows driver to work with xterm mouse protocol. + + remove DECCOLM+DECSCLM from foot (patch by Daniel Ekloef). + +20230311 + + improve manpage description for addch versus unctrl format used for + non-printable characters. + + modify version-check for gcc/g++, now works for msys2. + + modify check in _nc_write_entry() for multiply defined aliases to + report problems within the current runtime of tic rather than for + conflicts with pre-existing terminal descriptions. + + allow for MinGW32-/64-bit configurations to use _DEFAULT_SOURCE + + clarify interaction of -R option versus -C, -I and -r in infocmp + manpage. + + build-fix in lib_win32con.c (cf: 20230211). + +20230225 + + build-fixes for rpm test-packages. + + add/use configure check for clock_gettime(), to supersede + gettimeofday(). + +20230218 + + configure-script improvements: + + recent msys2 headers work with _DEFAULT_SOURCE; amend check + + use $ac_includes_default in most cases where stdlib.h should work + + use #error consistently vs "make an error" + + add configure macro for gettimeofday vs inline check + +20230211 + + set dwShareMode in calls to CreateConsoleScreenBuffer() (patch by + Hannes Domani). + + use CreateFile with "CONIN$", "CONOUT$" rather than GetStdHandle to + obtain a handle on the actual console, avoiding redirection in the + MinGW/Win32 configurations (adapted from patch by LIU Hao). + +20230128 + + document XF, kxIN and kxOUT -TD + + add note on sun/wscons/cmdtool/shelltool -TD + + modify configure script check for pkg-config library directory to + take into account an older version 0.15.0 which used PKG_CONFIG_PATH + but not PKG_CONFIG_LIBDIR + +20230121 + + correct limit-check when dumping tc/use clause via tic -I (report by + Gabriel Ravier). + + correct a check for manpage-alias in edit_man.sh, to work with out of + tree builds (report by Sven Joachim). + +20230114 + + change RV to XR/xr, to avoid conflict with pre-existing usage in vim, + to use RV/rv to denote DA2 and its response (discussion with Bram + Moolenaar) -TD + + add XF flag to xterm+focus so that termcap applications can be aware + of terminals which may support focus in/out -TD + + use xterm+focus in xterm-p370 and tmux -TD + + improve configure-script macros vs compiler warnings. + +20230107 + + add --with-abi-altered configure option (prompted by discussion with + Brian Inglis). + + add BSD erase2 to characters handled by tset/reset. + + improve configure-script macros vs compiler warnings. + + regenerate configure scripts with autoconf 2.52.20221202 + + add RV report+version (suggested by Bram Moolenaar). + + add comment to bracketed+paste explaining that vim patch 9.0.1117 is + needed for use with the updated xterm descriptions (suggested by Bram + Moolenaar). + +20221231 6.4 release for upload to ftp.gnu.org + + update release notes + + regenerate llib-* files. + + correct PS vs PE names in bracketed+paste (report by Bram Moolenaar) + -TD + +20221224 + + add mutex lock/unlock in a few places reported by thread-sanitizer + + add/use bracketed+paste to help identify terminals supporting this + xterm feature (prompted by discussion with Bram Moolenaar) -TD + +20221217 + + install Ada95 sample programs in libexecdir, adding a wrapper + script to invoke those. + +20221210 + + add minimal -h/-V getopt logic to the remaining test-programs. + + free new_pair() data in delscreen (report by "magiblot"). + + add clarification of the scope of dynamic variables in terminfo(5). + + remove a stray '/' from description of %g in terminfo(5). + +20221203 + + add -h usage and -V version options to the test-programs which use + getopt. + + use "command -v" rather than "type" in Ada95/gen/Makefile.in to fix + a portability issue (patch by Nicolas Boulenguez). + + update ncurses-howto, more documentation fixes along with corrections + to example programs. + +20221126 + + fix an error in pathname of explain.txt (cf: 20200201). + + fix an error in "@" command in test/ncurses.c F-menu (cf: 20190121). + + improve formatting of ncurses-intro.html and hackguide.html + + improve man/curs_clear.3x links to other pages + +20221119 + + use static libraries for AdaCurses test-package for Mageia, since no + gprbuild package is available. + + updated test packages for Debian. + +20221112 + + build-fixes for AdaCurses RPM test-package. + +20221105 + + regenerate configure scripts with autoconf 2.52.20221009 + + modify "--with-manpage-format" to support bzip2 and xz compression + (prompted by discussion with Sam James). + + modify make-tar.sh scripts to make timestamps more predictable. + +20221029 + + improve curs_slk.3x discussion of extensions and portability (report + by Bill Gray). + +20221023 + + change man_db.renames to template, to handle ncurses*-config script + with the extra-suffix configure option. + +20221015 + + fix another memory-leak in tic. + + update install-sh script from autoconf, to fix install problem for + Ada95 with Arch; as noted in + https://lists.gnu.org/archive/html/automake/2018-09/msg00005.html + there are unaddressed issues. + + update CF_XOPEN_SOURCE, adding GNU libc suffixes for abi64, abin32, + x32 (report by Sven Joachim): + + correct ifdef's for _nc_set_read_thread() (patch by Mikhail Korolev, + cf: 20220813). + +20221008 + + correct a switch-statement case in configure script to allow for test + builds with ABI=7. + + modify misc/gen-pkgconfig.in to allow for the case where the library + directory does not yet exist, since this is processed before doing an + install (report by Michal Liszcz). + +20221001 + + modify configure/scripts to work around interference by GNU grep 3.8 + (report by Sam James). + + update CF_XOPEN_SOURCE, adding variants "gnueabi" and "gnueabihf" to + get _DEFAULT_SOURCE special case (report by Adam Sampson) + +20220924 + + modify configure macro CF_BUILD_CC to check if the build-compiler + works, rather than that it is different from the cross-compiler, e.g., + to accommodate a compiler which can be used for either purpose with + different flags (report by Mikhail Korolev). + + fix another memory-leak in tic. + + correct change for cppcheck in menu library (report/analysis by + "tuxway", cf: 20220903). + + update config.guess, config.sub + +20220917 + + reduce memory-leak in tic by separating allocations for struct entry + from TERMTYPE2 (cf: 20220430). + + improve interaction between tic -v option and NCURSES_TRACE, by + processing the latter only when -v option does not set _nc_tracing. + + modify curses_trace() to show the trace-mask as symbols, e.g., + TRACE_ORDINARY, DEBUG_LEVEL(3). + +20220910 + + amend verbose-option change to make this affect level 3, e.g., using + "tic -cv3 terminfo". + + work around musl's nonstandard use of feature test macros by adding + a definition for NCURSES_WIDECHAR to the generated ".pc" and *-config + files (report by Sam James). + +20220903 + + modify verbose-option of infocmp, tic, toe to enable debug-tracing + if that is configured. + +20220827 + + modify configure scripts to use overlooked cases for LD and + PKG_CONFIG variables (report by Alan Webb, Gentoo #866398). + + modify nsterm to use xterm+alt1049 (report by Paul Handly) -TD + + modify putty to use xterm+alt1049 -TD + +20220820 + + fix some cppcheck warnings, mostly style, in ncurses and c++ + libraries and progs directory. + + add curses_trace to ifdef's for START_TRACE in test/test.priv.h + + update config.guess + +20220813 + + modify delscreen to more effectively delete all windows on the given + screen. + + amend portability note for delwin in manual page. + + adapt test/test_delwin.c from example by Bill Gray. + + account for prescreen data if freeing leaks in pthread-configuration + + split-out _nc_set_read_thread(), to reduce compiler warnings about + pthread_self(), which may/may not be a weak symbol. + + improve pthread-configuration for test/worm.c + +20220806 + + amend end_of_stream() to allow for input files without a final + newline. + + check for non-textfiles to tic. + +20220729 + + fixes to build with dietlibc: + + add configure check for fpathconf (report by Georg Lehner). + + add configure check for math sine/cosine, needed in test/tclock, + and eliminate pow() from test/hanoi (report by Georg Lehner). + + use wcsnlen as an alternative to wmemchr if it is not found + (adapted from patch by Georg Lehner). + + trim out some unwanted linker options from ncurses*config and .pc + files seen in Fedora 36+. + +20220724 + + add portability notes for delscreen and delwin in manual. + + improve pthread-configuration for test/worm.c, test/rain.c + + improve pointer/limit checks associated with deleting a screen + (Debian #1015756). + +20220716 + + build-fix for test_mouse.c, for non-standard cfmakeraw. + + improve shell-scripts with shellcheck + + fix typo in run_tic.in (report/patch by Jan Starke). + +20220709 + + lock the prescreen data consistently in newterm, etc., for the + pthreads configuration (report by Tom de Vries). + +20220703 + + add consistency check in tic for u6/u7/u8/u9 and NQ capabilities. + + use NQ to flag entries where the terminal does not support query and + response -TD + + use ansi+enq and decid+cpr in cases where the terminal probably + supported the u6-u9 extension -TD + + add/use apollo+vt132, xterm+alt47 -TD + +20220625 + + improve man/curs_bkgd.3x, explaining that bkgdset can affect results + for bkgd (report by Anton Vidovic). + + correct dsl in dec+sl (report by Rajeev Pillai) -TD + + add/use ansi+cpr, decid+cpr -TD + +20220618 + + add a null-pointer check for term_names field in copy_termtype(), + needed for MinGW port (report by Peiyuan Song, cf: 20220521). + + revise kon/kon2/jfbterm to undo "linux2.6" change to + smacs/rmacs/enacs (Debian #1012800) -TD + + amended note for att610+cvis0, as per documentation for att610, + att620, att730 -TD + +20220612 + + modify waddch_literal() to allow for double-width base character when + merging a combining character (report by Gavin Troy). + + improve _tracecchar_t2() formatting of base+combining character. + +20220604 + + add note on portable memory-leak checking in man/curs_memleaks.3x + + remove u6-u9 from teken-2018 -TD + + set "xterm-new" to "xterm-p370", add "xterm-p371" -TD + +20220529 + + expanded notes for teken/syscons -TD + + fix overlooked copying of extended string-heap in copy_termtype + (cf: 20220430). + + update config.guess + +20220521 + + improve memory-leak checking in several test-programs. + + set trailing null on string passed from winsnstr() to wins_nwstr(). + + modify del_curterm() to fix memory-leak introduced by change to + copy_termtype(). + +20220514 + + further improvements to test/test_mouse.c; compare with ncurses test + program menu A/a. + +20220507 + + add test/test_mouse.c (patch by Leonid S Usov). + + add a few debug-traces for tic, fix a couple of memory-leaks. + +20220501 + + build-fix for debug-traces (report/patch by Chris Clayton). + +20220430 + + modify samples for xterm mouse 1002/1003 modes to use 1006 mode, and + also provide for focus in/out responses -TD + + modify default case in handle_wheel() to always report button-release + events, e.g., for xterm mouse mode 1003 (patch by Leonid S Usov). + + improve valid_entryname() to disallow characters used in terminfo + syntax: '#', '=', '|', '\'. + + alter copy_termtype() to allocate new str_table and ext_str_table + data rather than relying upon its callers. + + use calloc in _nc_init_entry() when allocating stringbuf, to ensure + it is initialized. + + add library-level TYPE_CALLOC for consistency with TYPE_MALLOC. + + add some debug-traces for tic/infocmp. + +20220423 + + in-progress work on invalid_merge(), disable it (cf: 20220402). + + fix memory leak in _nc_tic_dir() when called from _nc_set_writedir(). + + fix memory leak in tic when "-c" option is used. + +20220416 + + add a limit-check to guard against corrupt terminfo data + (report/testcase by NCNIPC of China). + + add check/warning in configure script if option --with-xterm-kbs is + missing or inconsistent (Arch #74379). + + add setlocale call to several test-programs. + + allow extended-color number in opts parameter of wattr_on. + +20220409 + + add test/test_unget_wch.c + +20220402 + + amend extended_captype(), returning CANCEL if a string is explicitly + cancelled. + + make description-fields distinct -TD + +20220326 + + update teken -TD + + add teken-16color, teken-vt and teken-sc -TD + + add a few missing details for vte-2018 (report by Robert Lange) -TD + +20220319 + + add xgterm -TD + + correct setal in mintty/tmux entries, add to vte-2018 (report by + Robert Lange) + + add blink to vte-2018 (report by Robert Lange) + + improve tic warning about XT versus redundant tsl, etc. + +20220312 + + add xterm+acs building-block -TD + + add xterm-p370, for use in older terminals -TD + + add dec+sl to xterm-new, per xterm patch #371 -TD + + add mosh and mosh-256color -TD + +20220305 + + replace obsolescent "-gnatg" option with "-gnatwa" and "-gnatyg", to + work around build problems with gnat 12. + + update external links in Ada95.html + + trim unused return-value from canonical_name(). + +20220226 + + fix issues found with coverity: + + rewrite canonical_name() function of infocmp to ensure buffer size + + corrected use of original tty-modes in tput init/reset subcommands + + modify tabs program to limit tab-stop values to max-columns + + add limit-checks for palette rgb values in test/ncurses.c + + add a few null-pointer checks to help with static-analysis. + + enforce limit on number of soft-keys used in c++ binding. + + adjust a buffer-limit in write_entry.c to quiet a bogus warning from + gcc 12.0.1 + +20220219 + + expanded description in man/resizeterm.3x + + additional workaround for ImageMagick in test/picsmap.c + +20220212 + + improve font-formatting in other manpages, for consistency. + + correct/improve font-formatting in curs_wgetch.3x (patch by Benno + Schulenberg). + +20220205 + + workaround in test/picsmap.c for use of floating point for rgb values + by ImageMagick 6.9.11, which appears to use the wrong upper limit. + + improve use of "trap" in shell scripts, using "fixup-trap". + +20220129 + + minor updates for test-packages + + improve handling of --with-pkg-config-libdir option, allowing for the + case where either $PKG_CONFIG_LIBDIR or the option value has a + colon-separated list of directories (report by Rudi Heitbaum, + cf: 20211113). + + update kitty -TD + +20220122 + + add ABI 7 defaults to configure script. + + add warning in configure script if file specified for "--with-caps" + does not exist. + + use fix for CF_FIX_WARNINGS from cdk-perl, ignoring error-exit on + format-warnings. + + improve readability of long parameterized expressions with the + infocmp "-f" option by allowing split before a "%p" marker. + +20220115 + + improve checks for valid mouse events when an intermediate mouse + state is not part of the mousemask specified by the caller (report by + Anton Vidovic, cf: 20111022). + + use newer version 1.36 of gnathtml for generating Ada html files. + +20220101 + + add section on releasing memory to curs_termcap.3x and + curs_terminfo.3x manpages. + +20211225 + + improve markup, e.g., for external manpage links in the manpages + (prompted by report by Helge Kreutzmann). + +20211219 + + install ncurses-examples programs in libexecdir, adding a wrapper + script to invoke those. + + add help-screen and screen-dump to test/combine.c + +20211211 + + add test/combine.c, to demo/test combining characters. + +20211204 + + improve configure check for getttynam (report by Werner Fink). + +20211127 + + fix errata in description fields (report by Eric Lindblad) -TD + + add x10term+sl, aixterm+sl, ncr260vp+sl, ncr260vp+vt, wyse+sl -TD + +20211120 + + add dim, ecma+strikeout to st-0.6 -TD + + deallocate the tparm cache when del_curterm is called for the last + allocated TERMINAL structure (report/testcase by Bram Moolenaar, + cf: 20200531). + + modify test-package to more closely conform to Debian multi-arch. + + if the --with-pkg-config-libdir option is not given, use + ${libdir}/pkgconfig as a default (prompted by discussion with Ross + Burton). + +20211115 + + fix memory-leak in delwin for pads (report by Werner Fink, OpenSUSE + #1192668, cf: 20211106), + +20211113 + + minor clarification to clear.1 (Debian #999437). + + add xterm+sl-alt, use that in foot+base (report by Jonas Grosse + Sundrup) -TD + + improve search-path check for pkg-config, for Debian testing which + installs pkg-config with architecture-prefixes. + +20211106 + + improve check in misc/Makefile.in for empty $PKG_CONFIG_LIBDIR + + modify wnoutrefresh to call pnoutrefresh if its parameter is a pad, + rather than treating it as an error, and modify new_panel to permit + its window-parameter to be a pad (report by Giorgos Xou). + + fix a memory-leak in del_curterm (prompted by discussion with Bram + Moolenaar, cf: 20210821). + +20211030 + + simplify some references to WINDOWS._flags using macros. + + add a "check" rule in Ada95 makefile, to help with test-packages. + + build-fix for cross-compiling to MingW, conditionally add -lssp + +20211026 + + corrected regex needed for older pkg-config used in Solaris 10. + + amend configure option's auto-search to account for systems where + none of the directories known to pkg-config exist, adapted from + mailing-list comment (report by Milan P. Stanic). + +20211021 6.3 release for upload to ftp.gnu.org + + update release notes + + add "ncu2openbsd" script, to illustrate how to update an OpenBSD + system to use a current ncurses release. + +20211018 + + check for screen size-change in scr_init() and scr_restore(), in case + a screen dump does not match the current screen dimensions (report by + Frank Tkalcevic). + +20211017 + + amend change for pkg-config to account for "none" being returned in + the libdir-path result rather than "no" (report by Gabriele Balducci). + +20211016 + + build-fix for pmake with libtool. + + improve make-tar.sh scripts, adding COPYING to tar file, and clean up + shellcheck warnings. + + add link for "reset6" manpage in test-package ncurses6-doc + + revise configure option --with-pkg-config-libdir, using the actual + search path from pkg-config or pkgconf using the output from --debug + (report by Pascal Pignard). + + freeze ABI in ".map" files. + +20211009 + + implement "+m" option in tabs program. + + fill in some details for infoton -TD + + fix spelling/consistency in several descriptions -TD + + use vt420+lrmm in vt420 -TD + + modify save_tty_settings() to avoid opening /dev/tty for cases other + than reset/init, e.g., for clear. + + modify output of "toe -as" to show first description found rather + than the last. + + improve tic checks for number of parameters of smglp, smgrp, smgtp, + and smgbp (cf: 20020525). + + correct off-by-one comparison in last_char(), which did not allow + special case of ":" in a terminfo description field (cf: 20120407). + + remove check in tic that assumes that none or both parameterized and + non-parameterized margin-setting capabilities are present + (cf: 20101002). + +20211002 + + use return-value from vsnprintf to reallocate as needed to allow for + buffers larger than the screen size (report by "_RuRo_"). + + modify tset "-q" option to refrain from modifying terminal modes, to + match the documentation. + + add section on margins to terminfo.5, adapted from X/Open Curses. + + make tput/tset warning messages consistently using alias names when + those are used, rather than the underlying program's name. + + improve tput usage message for aliases such as clear, by eliminating + tput-specific portions. + + add a check in toe to ensure that a "termcap file" is text rather + than binary. + + further build-fixes for OpenBSD 6.9, whose header files differ from + the other BSDs. + +20210925 + + add kbeg to xterm+keypad to accommodate termcap applications -TD + + add smglp and smgrp to vt420+lrmm, to provide useful data for the + "tabs" +m option -TD + + build-fix for gcc 3.4.3 with Solaris10, which does not allow forward + reference of anonymous struct typedef. + + modify tput to allow multiple commands per line. + + minor fixes for tset manpage. + +20210911 + + adjust ifdef in test_opaque.c to fix build with ncurses 5.7 + + add testing note for xterm-{hp|sco|sun} -TD + + corrected description for ansi.sys-old -TD + + add xterm+nopcfkeys, to fill in keys for xterm-hp, xterm-sun -TD + + use hp+arrows in a few places -TD + + use hp+pfk-cr in a few places -TD + +20210905 + + correct logic in filtering of redefinitions (report by Sven Joachim, + cf: 20210828). + +20210904 + + modify linux3.0 entry to reflect default mapping of shift-tab by + kbd 1.14 (report by Jan Engelhardt) -TD + + add historical note to tput, curses-terminfo and curses-color + manpages based on source-code for SVr2, SVr3 and SVr4. + + minor grammatical fixes for "it's" vs "its" (report by Nick Black). + + amend fix for --disable-root-environ (report by Arnav Singh). + + build-fix for compiling link_test + + drop symbols GCC_PRINTF and GCC_SCANF from curses.h.in, to simplify + use (Debian #993179). + +20210828 + + correct reversed check for --disable-root-environ (report/analysis + by Arnav Singh, cf: 20210626). + + apply gcc format attribute to prototypes which use a va_list + parameter rather than a "..." variable-length parameter list + (prompted by discussion in a tmux pull-request). + + modify configure scripts to filter out redefinitions of _XOPEN_SOURCE, + e.g., for NetBSD which generally supports 500, but 600 is needed for + ncursesw. + + improve documentation for tparm and static/dynamic variables. + + improve typography in terminfo.5 (patch by Branden Robinson). + +20210821 + + improve tparm implementation of %P and %g, more closely matching + SVr4 terminfo. + + move internals of TERMINAL structure to new header term.priv.h + + add "check" rule for ncurses/Makefile + + corrected tsl capability for terminator -TD + + add check in tic to report instances where tparm would detect an + error in an expression (cf: 20201010). + + correct a few places where SP->_pair_limit was used rather than + SP->_pair_alloc (cf: 20170812). + + fix missing "%d" for setaf/setab code 8-15 in xterm+direct16 (report + by Florian Weimer) -TD + + fix some documentation errata from OpenBSD changes. + + update config.sub + +20210814 + + add workaround for broken pcre2 package in Debian 10, from xterm #369. + +20210807 + + ignore "--dynamic-linker" option in generated pkg/config files, + adapted from "distr1" patch. + + add CF_SHARED_OPTS case for Haiku, from patch in haikuports. + +20210731 + + add extensions in xterm+tmux and ecma+strikeout to ms-terminal, + but cancel the non-working Cr and Ms capabilities -TD + + add foot and foot-direct -TD + +20210724 + + add workaround for Windows Terminal's problems with CR/LF mapping to + ms-terminal (patch by Juergen Pfeifer). + + review/update current Windows Terminal vs ms-terminal -TD + +20210718 + + correct typo in "vip" comments (report by Nick Black), reviewed this + against Glink manual -TD + + fill in some missing pieces for pccons, to make it comparable to the + vt220 entry -TD + + modify mk-1st.awk to account for extra-suffix configure option + (report by Juergen Pfeifer). + + change default for --disable-wattr-macros option to help packagers + who reuse wide ncursesw header file with non-wide ncurses library. + + build-fix for test/test_opaque.c, for configurations without opaque + curses structs. + +20210710 + + improve history section for tset manpage based on the 1BSD tarball, + which preceded BSD's SCCS checkins by more than three years. + + improve CF_XOPEN_CURSES macro used in test/configure (report by Urs + Jansen). + + further improvement of libtool configuration, adding a dependency of + the install.tic rule, etc., on the library in the build-tree. + + update config.sub + +20210703 + + amend libtool configuration to add dependency for install.tic, etc., + in ncurses/Makefile on the lower-level libraries. + + modify configure script to support ".PHONY" make program feature. + +20210626 + + add configure option --disable-root-access, which tells ncurses to + disallow most file-opens by setuid processes. + + use default colors in pccon "op" -TD + + correct rmacs/smacs in aaa+dec, aaa+rv -TD + + add hpterm-color2 and hp98550-color (Martin Trusler) + + regenerate man-html documentation. + +20210619 + + improve configure-macro used for dependencies of --disable-leaks such + as --with-valgrind + + trim trailing blanks from files + +20210612 + + fixes for scan-build, valgrind build/testing. + + update config.guess + +20210605 + + add a summary of ncurses-specific preprocessor symbols to curses.h + (prompted by discussion with Peter Farley, Bill Gray). + +20210522 + + regenerate configure scripts with autoconf 2.52.20210509 to eliminate + an unnecessary warning in config.log (report by Miroslav Lichvar). + + add a note in manual page to explain ungetch vs unget_wch (prompted + by discussion with Peter Farley). + + add sp-funcs for erasewchar, killwchar. + + modify wgetnstr, wgetn_wstr to improve compatibility with SVr4 curses + in its treatment of interrupt and quit characters (prompted by + report/testcase by Bill Gray) + + update config.guess, config.sub + +20210515 + + improve manual pages for wgetnstr, newwin (prompted by + report/testcase by Bill Gray). + +20210508 + + modify tputs' error check to allow it to be used without first + calling tgetent or setupterm, noting that terminfo initialization + is required for supporting the terminfo delay feature (report by + Sebastiano Vigna). + + fix several warnings from clang --analyze + + add null-pointer check in comp_parse.c, when a "use=" clause refers + to a nonexisting terminal description (report/patch by Miroslav + Lichvar, cf: 20210227). + +20210501 + + add a special case in the configure script to work around one of the + build-time breakages reported for OpenBSD 6 here: + https://www.mail-archive.com/bugs@openbsd.org/msg13200.html + There is no workaround for the other issue, a broken linker spec. + + modify configure check for libtool to prevent accidental use of an + OpenBSD program which uses the same name. + + update config.guess, config.sub + +20210424 + + avoid using broken system macros for snprintf which interfere with + _nc_SLIMIT's conditionally adding a parameter when the string-hacks + configure option is enabled. + + add a "all::" rule before the new "check" rule in test/Makefile.in + +20210418 + + improve CF_LINK_FUNCS by ensuring that the source-file is closed + before linking to the target. + + add "check" rules for headers in c++, progs and test-directories. + + build-fix for termsort module when configured with termcap (reports + by Rajeev V Pillai, Rudi Heitbaum). + +20210417 + + extend --disable-pkg-ldflags option to also control whether $LDFLAGS + from the build is provided in -config and .pc files (Debian #986764). + + fix some cppcheck warnings, mostly style, in ncurses and c++ + libraries and progs directory. + + fix off-by-one limit for tput's processing command-line arguments + (patch by Hadrien Lacour). + +20210403 + + fix some cppcheck warnings, mostly style, in ncurses library and + progs directory. + + improve description of BSD-style padding in curs_termcap.3x + + improved CF_C11_NORETURN macro, from byacc changes. + + fix "--enable-leak" in CF_DISABLE_LEAKS to allow turning + leak-checking off later in a set of options. + + relax modification-time comparison in CF_LINK_FUNCS to allow it to + accept link() function with NFS filesystems which change the mtime + on the link target, e.g., several BSD systems. + + call delay_output_sp to handle BSD-style padding when tputs_sp is + called, whether directly or internally, to ensure that the SCREEN + pointer is passed correctly (reports by Henric Jungheim, Juraj + Lutter). + +20210327 + + build-fixes for Solaris10 /bin/sh + + fix some cppcheck warnings, mostly style, in ncurses test-programs, + form and menu libraries. + +20210323 + + add configure option --enable-stdnoreturn, making the _Noreturn + keyword optional to ease transition (prompted by report by + Rajeev V Pillai). + +20210320 + + improve parameter-checking in tput by forcing it to analyze any + extended string capability, e.g., as used in the Cs and Ms + capabilities of the tmux description (report by Brad Town, + cf: 20200531). + + remove an incorrect free in the fallback (non-checking) version of + _nc_free_and_exit (report by Miroslav Lichvar). + + correct use-ordering in some xterm-direct flavors -TD + + add hterm, hterm-256color (Mike Frysinger) + + if the build-time compiler accepts c11's _Noreturn keyword, use that + rather than gcc's attribute. + + change configure-check for gcc's noreturn attribute to assume it is + a prefix rather than suffix, matching c11's _Noreturn convention. + + add "lint" rule to c++/Makefile, e.g., with cppcheck. + +20210313 + + improve configure CF_LD_SEARCHPATH macro used for ncurses*-config and + ".pc" files, from dialog changes. + + reduce dependency of math-library in test programs. + + minor fixes for test_tparm.c (cf: 20210306) + + mention "ncurses" prefix in curses_version() manpage (report by + Michal Bielinski). + +20210306 + + improved test/test_tparm.c, by limiting the tests to capabilities + that might have parameters or padding, and combined with tputs test. + + improve discussion of padding versus tparm and tputs in + man/curs_terminfo.3x + + update portability note for FreeBSD in man/tput.1 + +20210227 + + modify tic/infocmp to eliminate unnecessary "\" to escape ":" in + terminfo format. + + add check in tic for duplicate "use=" clauses. + 20210220 + improve tic warning when oc/op do not mention SGR 39/49 for xterm compatible XT flag. @@ -380,7 +1545,7 @@ it is not possible to add this information. + re-enable "bel" in konsole-base (report by Nia Huang) + add linux-s entry (patch by Alexandre Montaron). + drop long-obsolete convert_configure.pl - + add test/test_parm.c, for checking tparm changes. + + add test/test_tparm.c, for checking tparm changes. + improve parameter-checking for tparm, adding function _nc_tiparm() to handle the most-used case, which accepts only numeric parameters (report/testcase by "puppet-meteor"). @@ -4598,7 +5763,7 @@ it is not possible to add this information. function pointer passed to tputs(). + modify init_pair() to accept -1's for color value after assume_default_colors() has been called (Debian #337095). - + modify test/background.c, adding commmand-line options to demonstrate + + modify test/background.c, adding command-line options to demonstrate assume_default_colors() and use_default_colors(). 20110416 @@ -10333,7 +11498,7 @@ it is not possible to add this information. + add mgterm terminfo entry from NetBSD, minor adjustments to sun-ss5, aixterm entries -TD + modify tack/ansi.c to make it more tolerant of bad ANSI replies. An - example of an illegal ANSI resonse can be found using Microsoft's + example of an illegal ANSI response can be found using Microsoft's Telnet client. A correct display can be found using a VT-4xx terminal or XFree86 xterm with: XTerm*VT100*decTerminalID: 450 @@ -11227,7 +12392,7 @@ it is not possible to add this information. + correct a typo in term.7 (Todd C Miller). + add configure --with-shlib-version option to allow installing shared libraries named according to release or ABI versions. This - parameterizes some existing logic in the configure script, and is + parametrizes some existing logic in the configure script, and is intended for compatibility upgrades on Digital Unix, which used versioned libraries in ncurses 4.2, but no longer does (cf: 980425). + resync configure script against autoconf 2.13 + patches diff --git contrib/ncurses/README contrib/ncurses/README index a48e3f6155d9..5587f5b70bce 100644 --- contrib/ncurses/README +++ contrib/ncurses/README @@ -1,5 +1,5 @@ ------------------------------------------------------------------------------- --- Copyright 2020 Thomas E. Dickey -- +-- Copyright 2020-2021,2023 Thomas E. Dickey -- -- Copyright 1998-2012,2018 Free Software Foundation, Inc. -- -- -- -- Permission is hereby granted, free of charge, to any person obtaining a -- @@ -26,7 +26,7 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------- --- $Id: README,v 1.28 2020/02/02 23:34:34 tom Exp $ +-- $Id: README,v 1.31 2023/10/28 14:49:04 tom Exp $ ------------------------------------------------------------------------------- README file for the ncurses package @@ -35,18 +35,19 @@ See the file INSTALL for instructions on how to build and install ncurses. See the file NEWS for a release history and bug-fix notes. See the file TO-DO for things that still need doing, including known bugs. -Browse the file misc/ncurses-intro.html for narrative descriptions of how +Browse the file doc/html/ncurses-intro.html for narrative descriptions of how to use ncurses and the panel, menu, and form libraries. - + Browse the file doc/html/hackguide.html for a tour of the package internals. +Find plain text versions of both of these documents in doc/. + ROADMAP AND PACKAGE OVERVIEW: You should be reading this file in a directory called: ncurses-d.d, where d.d is the current version number (see the dist.mk file in this directory for that). There should be a number of subdirectories, including `c++', `form', -`man', `menu', `misc', `ncurses', `panel', `progs', `test', 'tack' and `Ada95'. -(The 'tack' program may be distributed separately). +`man', `menu', `misc', `ncurses', `panel', `progs', `test', and `Ada95'. A full build/install of this package typically installs several libraries, a handful of utilities, and a database hierarchy. Here is an inventory of the @@ -81,7 +82,7 @@ version. If you configure using the --enable-reentrant option, a "t" is appended to the library names (e.g., libncursest.a) and the resulting libraries have a -different binary interface which makes the ncurses interface more "opaque". +different binary interface, making the ncurses interface more opaque. The ncurses libraries implement the curses API. The panel, menu and forms libraries implement clones of the SVr4 panel, menu and forms APIs. The source @@ -89,9 +90,9 @@ code for these lives in the `ncurses', `panel', `menu', and `form' directories respectively. In the `c++' directory, you'll find code that defines an interface to the -curses, forms, menus and panels library packaged as C++ classes, and a demo program in C++ -to test it. These class definition modules are not installed by the 'make -install.libs' rule as libncurses++. +curses, forms, menus and panels library packaged as C++ classes, and a demo +program in C++ to test it. These class definition modules are not installed +by the 'make install.libs' rule as libncurses++. In the `Ada95' directory, you'll find code and documentation for an Ada95 binding of the curses API, to be used with the GNAT compiler. @@ -102,8 +103,8 @@ for documentation of the binding. To do its job, the ncurses code needs your terminal type to be set in the environment variable TERM (normally set by your OS; under UNIX, getty(1) -typically does this, but you can override it in your .profile); and, it needs a -database of terminal descriptions in which to look up your terminal type's +typically does this, but you can override it in your .profile); and, it needs +a database of terminal descriptions in which to look up your terminal type's capabilities. In older (V7/BSD) versions of curses, the database was a flat text file, @@ -117,10 +118,10 @@ second form. In the `misc' directory, there is a text file terminfo.src, in editable terminfo format, which can be used to generate the terminfo binaries (that's what make install.data does). If the package was built with the ---enable-termcap option enabled, and the ncurses library cannot find a terminfo -description for your terminal, it will fall back to the termcap file supplied -with your system (which the ncurses package installation leaves strictly -alone). +--enable-termcap option enabled, and the ncurses library cannot find a +terminfo description for your terminal, it will fall back to the termcap file +supplied with your system (which the ncurses package installation leaves +strictly alone). The utilities are as follows: @@ -149,7 +150,7 @@ help you systematically exercise the library functions. AUTHORS: -Pavel Curtis: +Pavel Curtis: wrote the original ncurses Zeyd M. Ben-Halim: @@ -176,8 +177,8 @@ Eric S. Raymond: xterm mouse support, and the ncurses test program. Juergen Pfeifer - The menu and form libraries, C++ bindings for ncurses, menus, forms and - panels, as well as the Ada95 binding. Ongoing support for panel. + The menu and form libraries, C++ bindings for ncurses, menus, forms + and panels, as well as the Ada95 binding. Ongoing support for panel. CONTRIBUTORS: @@ -216,3 +217,5 @@ BUGS: See the INSTALL file for bug and developer-list addresses. The Hacker's Guide in the doc directory includes some guidelines on how to report bugs in ways that will get them fixed most quickly. + +-- vile:txtmode fc=78 diff --git contrib/ncurses/README.emx contrib/ncurses/README.emx index c48b312c1979..666eaec73647 100644 --- contrib/ncurses/README.emx +++ contrib/ncurses/README.emx @@ -1,5 +1,5 @@ ------------------------------------------------------------------------------- --- Copyright 2020 Thomas E. Dickey -- +-- Copyright 2020,2021 Thomas E. Dickey -- -- Copyright 1998-2006,2018 Free Software Foundation, Inc. -- -- -- -- Permission is hereby granted, free of charge, to any person obtaining a -- @@ -26,7 +26,7 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------- --- $Id: README.emx,v 1.11 2020/02/02 23:34:34 tom Exp $ +-- $Id: README.emx,v 1.12 2021/06/17 21:20:30 tom Exp $ -- Author: Thomas Dickey ------------------------------------------------------------------------------- @@ -34,7 +34,7 @@ You can build ncurses on OS/2 in the EMX environment. But you must build and acquire tools. Not all of the tools distributed with EMX work properly, and some additional ones are required. -First, the configure script distributed with ncurses will not run as-is in EMX. +First, the configure script distributed with ncurses will not run as-is in EMX. You can generate a new one if you have autoconf built for EMX. You will need the EMX development tools, of course. Get these programs to start: @@ -65,7 +65,7 @@ may fix these problems: + I also built from sources (because the distributed binaries did not work) the cmp, diff programs. - + Other required utilities such as ar, cat, chmod, cp, gawk, grep, mv, ls, rm, mkdir, sed, sort and tr worked. diff --git contrib/ncurses/VERSION contrib/ncurses/VERSION index f8f03afcea5f..8ebef8fe8eb8 100644 --- contrib/ncurses/VERSION +++ contrib/ncurses/VERSION @@ -1 +1 @@ -5:0:10 6.2 20210220 +5:0:10 6.5 20240427 diff --git contrib/ncurses/aclocal.m4 contrib/ncurses/aclocal.m4 index d498939330c1..1c2b788bf1ff 100644 --- contrib/ncurses/aclocal.m4 +++ contrib/ncurses/aclocal.m4 @@ -1,5 +1,5 @@ dnl*************************************************************************** -dnl Copyright 2018-2020,2021 Thomas E. Dickey * +dnl Copyright 2018-2023,2024 Thomas E. Dickey * dnl Copyright 1998-2017,2018 Free Software Foundation, Inc. * dnl * dnl Permission is hereby granted, free of charge, to any person obtaining a * @@ -29,7 +29,7 @@ dnl*************************************************************************** dnl dnl Author: Thomas E. Dickey 1995-on dnl -dnl $Id: aclocal.m4,v 1.950 2021/01/26 23:45:12 tom Exp $ +dnl $Id: aclocal.m4,v 1.1069 2024/03/30 22:15:45 tom Exp $ dnl Macros used in NCURSES auto-configuration script. dnl dnl These macros are maintained separately from NCURSES. The copyright on @@ -42,7 +42,7 @@ dnl https://invisible-island.net/autoconf/my-autoconf.html dnl dnl --------------------------------------------------------------------------- dnl --------------------------------------------------------------------------- -dnl AM_LANGINFO_CODESET version: 6 updated: 2021/01/01 16:53:59 +dnl AM_LANGINFO_CODESET version: 7 updated: 2023/01/11 04:05:23 dnl ------------------- dnl Inserted as requested by gettext 0.10.40 dnl File from /usr/share/aclocal @@ -54,7 +54,9 @@ dnl From Bruno Haible. AC_DEFUN([AM_LANGINFO_CODESET], [ AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset, - [AC_TRY_LINK([#include <langinfo.h>], + [AC_TRY_LINK([ +$ac_includes_default +#include <langinfo.h>], [char* cs = nl_langinfo(CODESET); (void)cs], am_cv_langinfo_codeset=yes, am_cv_langinfo_codeset=no) @@ -65,37 +67,57 @@ AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset, fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_ABI_DEFAULTS version: 2 updated: 2015/06/06 13:49:58 +dnl CF_ABI_DEFAULTS version: 5 updated: 2023/10/21 08:54:23 dnl --------------- dnl Provide configure-script defaults for different ncurses ABIs. AC_DEFUN([CF_ABI_DEFAULTS],[ AC_REQUIRE([CF_NCURSES_WITH_ABI_VERSION]) -case x$cf_cv_abi_version in + +# ABI 5 defaults: +cf_dft_ccharw_max=5 +cf_dft_chtype=auto +cf_dft_ext_colors=no +cf_dft_ext_const=no +cf_dft_ext_mouse=no +cf_dft_ext_putwin=no +cf_dft_ext_spfuncs=no +cf_dft_filter_syms=no +cf_dft_interop=no +cf_dft_mmask_t=auto +cf_dft_opaque_curses=no +cf_dft_ordinate_type=short +cf_dft_signed_char=no +cf_dft_tparm_arg=long +cf_dft_widec=no +cf_dft_with_lp64=no + +# ABI 6 default differences from ABI 5: +case x$cf_cv_abi_default in (x[[6789]]) + cf_dft_chtype=uint32_t cf_dft_ext_colors=yes cf_dft_ext_const=yes cf_dft_ext_mouse=yes cf_dft_ext_putwin=yes cf_dft_ext_spfuncs=yes cf_dft_filter_syms=yes - cf_dft_chtype=uint32_t - cf_dft_mmask_t=uint32_t cf_dft_interop=yes + cf_dft_mmask_t=uint32_t + cf_dft_opaque_curses=yes cf_dft_tparm_arg=intptr_t + cf_dft_widec=yes cf_dft_with_lp64=yes ;; -(*) - cf_dft_ext_colors=no - cf_dft_ext_const=no - cf_dft_ext_mouse=no - cf_dft_ext_putwin=no - cf_dft_ext_spfuncs=no - cf_dft_filter_syms=no - cf_dft_chtype=auto - cf_dft_mmask_t=auto - cf_dft_interop=no - cf_dft_tparm_arg=long - cf_dft_with_lp64=no +esac + +# ABI 7 default differences from ABI 6: +case x$cf_cv_abi_default in +(x[[789]]) + cf_dft_ccharw_max=6 + cf_dft_mmask_t=uint64_t + cf_dft_ordinate_type=int + cf_dft_signed_char=yes + # also: remove the wgetch-events feature in ABI 7 ;; esac ])dnl @@ -264,9 +286,9 @@ CXXFLAGS="$CFLAGS" CFLAGS="$cf_save_CXXFLAGS" ])dnl dnl --------------------------------------------------------------------------- -dnl CF_ADD_INCDIR version: 16 updated: 2020/12/31 20:19:42 +dnl CF_ADD_INCDIR version: 17 updated: 2021/09/04 06:35:04 dnl ------------- -dnl Add an include-directory to $CPPFLAGS. Don't add /usr/include, since it's +dnl Add an include-directory to $CPPFLAGS. Don't add /usr/include, since it is dnl redundant. We don't normally need to add -I/usr/local/include for gcc, dnl but old versions (and some misinstalled ones) need that. To make things dnl worse, gcc 3.x may give error messages if -I/usr/local/include is added to @@ -415,6 +437,25 @@ ifelse([$5],NONE,,[{ test -z "$5" || test "x$5" = xNONE || test "x$4" != "x$5"; } ])dnl dnl --------------------------------------------------------------------------- +dnl CF_APPEND_CFLAGS version: 3 updated: 2021/09/05 17:25:40 +dnl ---------------- +dnl Use CF_ADD_CFLAGS after first checking for potential redefinitions. +dnl $1 = flags to add +dnl $2 = if given makes this macro verbose. +define([CF_APPEND_CFLAGS], +[ +for cf_add_cflags in $1 +do + case "x$cf_add_cflags" in + (x-[[DU]]*) + CF_REMOVE_CFLAGS($cf_add_cflags,CFLAGS,[$2]) + CF_REMOVE_CFLAGS($cf_add_cflags,CPPFLAGS,[$2]) + ;; + esac + CF_ADD_CFLAGS([$cf_add_cflags],[$2]) +done +])dnl +dnl --------------------------------------------------------------------------- dnl CF_APPEND_TEXT version: 1 updated: 2017/02/25 18:58:55 dnl -------------- dnl use this macro for appending text without introducing an extra blank at @@ -557,7 +598,7 @@ AC_DEFUN([CF_AWK_BIG_PRINTF], esac ])dnl dnl --------------------------------------------------------------------------- -dnl CF_BOOL_DECL version: 8 updated: 2004/01/30 15:51:18 +dnl CF_BOOL_DECL version: 9 updated: 2023/12/03 09:21:34 dnl ------------ dnl Test if 'bool' is a builtin type in the configured C++ compiler. Some dnl older compilers (e.g., gcc 2.5.8) don't support 'bool' directly; gcc @@ -572,13 +613,13 @@ AC_DEFUN([CF_BOOL_DECL], AC_MSG_CHECKING(if we should include stdbool.h) AC_CACHE_VAL(cf_cv_header_stdbool_h,[ - AC_TRY_COMPILE([],[bool foo = false], + AC_TRY_COMPILE([],[bool foo = false; (void)foo], [cf_cv_header_stdbool_h=0], [AC_TRY_COMPILE([ #ifndef __BEOS__ #include <stdbool.h> #endif -],[bool foo = false], +],[bool foo = false; (void)foo], [cf_cv_header_stdbool_h=1], [cf_cv_header_stdbool_h=0])])]) @@ -593,7 +634,7 @@ AC_CACHE_VAL(ifelse($1,,cf_cv_builtin_bool,[$1]),[ AC_TRY_COMPILE([ #include <stdio.h> #include <sys/types.h> -],[bool x = false], +],[bool x = false; (void)x], [ifelse($1,,cf_cv_builtin_bool,[$1])=1], [ifelse($1,,cf_cv_builtin_bool,[$1])=0]) ]) @@ -604,18 +645,17 @@ else AC_MSG_RESULT(no) fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_BOOL_SIZE version: 17 updated: 2020/10/24 19:48:55 +dnl CF_BOOL_SIZE version: 20 updated: 2023/02/18 17:41:25 dnl ------------ dnl Test for the size of 'bool' in the configured C++ compiler (e.g., a type). -dnl Don't bother looking for bool.h, since it's been deprecated. +dnl Don't bother looking for bool.h, since it has been deprecated. dnl dnl If the current compiler is C rather than C++, we get the bool definition dnl from <stdbool.h>. AC_DEFUN([CF_BOOL_SIZE], [ AC_CHECK_SIZEOF(bool,,[ -#include <stdlib.h> -#include <stdio.h> +$ac_includes_default #if defined(__cplusplus) @@ -639,8 +679,7 @@ AC_CHECK_SIZEOF(bool,,[ AC_CACHE_CHECK(for type of bool, cf_cv_type_of_bool,[ rm -f cf_test.out AC_TRY_RUN([ -#include <stdlib.h> -#include <stdio.h> +$ac_includes_default #if defined(__cplusplus) @@ -702,7 +741,7 @@ if test "$cf_cv_type_of_bool" = unknown ; then fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_BUILD_CC version: 9 updated: 2021/01/02 09:31:20 +dnl CF_BUILD_CC version: 11 updated: 2022/12/04 15:40:08 dnl ----------- dnl If we're cross-compiling, allow the user to override the tools and their dnl options. The configure script is oriented toward identifying the host @@ -768,7 +807,32 @@ if test "$cross_compiling" = yes ; then : ${BUILD_CC:='${CC}'} - if { test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}'; } ; then + AC_MSG_CHECKING(if the build-compiler "$BUILD_CC" works) + + cf_save_crossed=$cross_compiling + cf_save_ac_link=$ac_link + cross_compiling=no + cf_build_cppflags=$BUILD_CPPFLAGS + test "$cf_build_cppflags" = "#" && cf_build_cppflags= + ac_link='$BUILD_CC -o "conftest$ac_exeext" $BUILD_CFLAGS $cf_build_cppflags $BUILD_LDFLAGS "conftest.$ac_ext" $BUILD_LIBS >&AS_MESSAGE_LOG_FD' + + AC_TRY_RUN([#include <stdio.h> + int main(int argc, char *argv[]) + { + ${cf_cv_main_return:-return}(argc < 0 || argv == 0 || argv[0] == 0); + } + ], + cf_ok_build_cc=yes, + cf_ok_build_cc=no, + cf_ok_build_cc=unknown) + + cross_compiling=$cf_save_crossed + ac_link=$cf_save_ac_link + + AC_MSG_RESULT($cf_ok_build_cc) + + if test "$cf_ok_build_cc" != yes + then AC_MSG_ERROR([Cross-build requires two compilers. Use --with-build-cc to specify the native compiler.]) fi @@ -794,7 +858,45 @@ AC_SUBST(BUILD_EXEEXT) AC_SUBST(BUILD_OBJEXT) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CC_ENV_FLAGS version: 10 updated: 2020/12/31 18:40:20 +dnl CF_C11_NORETURN version: 4 updated: 2023/02/18 17:41:25 +dnl --------------- +AC_DEFUN([CF_C11_NORETURN], +[ +AC_MSG_CHECKING(if you want to use C11 _Noreturn feature) +CF_ARG_ENABLE(stdnoreturn, + [ --enable-stdnoreturn enable C11 _Noreturn feature for diagnostics], + [enable_stdnoreturn=yes], + [enable_stdnoreturn=no]) +AC_MSG_RESULT($enable_stdnoreturn) + +if test $enable_stdnoreturn = yes; then +AC_CACHE_CHECK([for C11 _Noreturn feature], cf_cv_c11_noreturn, + [AC_TRY_COMPILE([ +$ac_includes_default +#include <stdnoreturn.h> +static _Noreturn void giveup(void) { exit(0); } + ], + [if (feof(stdin)) giveup()], + cf_cv_c11_noreturn=yes, + cf_cv_c11_noreturn=no) + ]) +else + cf_cv_c11_noreturn=no, +fi + +if test "$cf_cv_c11_noreturn" = yes; then + AC_DEFINE(HAVE_STDNORETURN_H, 1,[Define if <stdnoreturn.h> header is available and working]) + AC_DEFINE_UNQUOTED(STDC_NORETURN,_Noreturn,[Define if C11 _Noreturn keyword is supported]) + HAVE_STDNORETURN_H=1 +else + HAVE_STDNORETURN_H=0 +fi + +AC_SUBST(HAVE_STDNORETURN_H) +AC_SUBST(STDC_NORETURN) +])dnl +dnl --------------------------------------------------------------------------- +dnl CF_CC_ENV_FLAGS version: 11 updated: 2023/02/20 11:15:46 dnl --------------- dnl Check for user's environment-breakage by stuffing CFLAGS/CPPFLAGS content dnl into CC. This will not help with broken scripts that wrap the compiler @@ -835,7 +937,7 @@ case "$CC" in AC_MSG_WARN(your environment uses the CC variable to hold CFLAGS/CPPFLAGS options) # humor him... cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[[ ]]* / /g' -e 's/[[ ]]*[[ ]]-[[^ ]].*//'` - cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", [substr]([$]0,1+length(prog))); }'` + cf_flags=`echo "$CC" | sed -e "s%^$cf_prog%%"` CC="$cf_prog" for cf_arg in $cf_flags do @@ -913,14 +1015,14 @@ AC_MSG_RESULT($includedir) fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CGETENT version: 6 updated: 2017/01/21 11:06:25 +dnl CF_CGETENT version: 7 updated: 2023/02/18 17:41:25 dnl ---------- dnl Check if the terminal-capability database functions are available. If not, dnl ncurses has a much-reduced version. AC_DEFUN([CF_CGETENT],[ AC_CACHE_CHECK(for terminal-capability database functions,cf_cv_cgetent,[ AC_TRY_LINK([ -#include <stdlib.h>],[ +$ac_includes_default],[ char temp[128]; char *buf = temp; char *db_array = temp; @@ -938,7 +1040,7 @@ then AC_CACHE_CHECK(if cgetent uses const parameter,cf_cv_cgetent_const,[ AC_TRY_LINK([ #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers" -#include <stdlib.h>],[ +$ac_includes_default],[ char temp[128]; char *buf = temp; #ifndef _NETBSD_SOURCE /* given, since April 2004 in stdlib.h */ @@ -993,7 +1095,7 @@ if test ".$system_name" != ".$cf_cv_system_name" ; then fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CHECK_ENVIRON version: 3 updated: 2010/05/26 16:44:57 +dnl CF_CHECK_ENVIRON version: 5 updated: 2023/02/18 17:41:25 dnl ---------------- dnl Check for data that is usually declared in <unistd.h>, e.g., the 'environ' dnl variable. Define a DECL_xxx symbol if we must declare it ourselves. @@ -1004,11 +1106,8 @@ AC_DEFUN([CF_CHECK_ENVIRON], [ AC_CACHE_CHECK(if external $1 is declared, cf_cv_dcl_$1,[ AC_TRY_COMPILE([ -#ifdef HAVE_STDLIB_H -#include <stdlib.h> -#endif -#include <unistd.h> ], - ifelse([$2],,int,[$2]) x = (ifelse([$2],,int,[$2])) $1, +$ac_includes_default], + ifelse([$2],,void*,[$2]) x = (ifelse([$2],,void*,[$2])) $1; (void)x, [cf_cv_dcl_$1=yes], [cf_cv_dcl_$1=no]) ]) @@ -1022,7 +1121,7 @@ fi CF_CHECK_EXTERN_DATA($1,ifelse([$2],,int,[$2])) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CHECK_ERRNO version: 13 updated: 2020/03/10 18:53:47 +dnl CF_CHECK_ERRNO version: 14 updated: 2023/02/18 17:41:25 dnl -------------- dnl Check for data that is usually declared in <stdio.h> or <errno.h>, e.g., dnl the 'errno' variable. Define a DECL_xxx symbol if we must declare it @@ -1034,11 +1133,7 @@ AC_DEFUN([CF_CHECK_ERRNO], [ AC_CACHE_CHECK(if external $1 is declared, cf_cv_dcl_$1,[ AC_TRY_COMPILE([ -#ifdef HAVE_STDLIB_H -#include <stdlib.h> -#endif -#include <stdio.h> -#include <sys/types.h> +$ac_includes_default #include <errno.h> ], ifelse([$2],,int,[$2]) x = (ifelse([$2],,int,[$2])) $1; (void)x, [cf_cv_dcl_$1=yes], @@ -1054,10 +1149,10 @@ fi CF_CHECK_EXTERN_DATA($1,ifelse([$2],,int,[$2])) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CHECK_EXTERN_DATA version: 4 updated: 2015/04/18 08:56:57 +dnl CF_CHECK_EXTERN_DATA version: 5 updated: 2021/09/04 06:35:04 dnl -------------------- dnl Check for existence of external data in the current set of libraries. If -dnl we can modify it, it's real enough. +dnl we can modify it, it is real enough. dnl $1 = the name to check dnl $2 = its type AC_DEFUN([CF_CHECK_EXTERN_DATA], @@ -1101,7 +1196,7 @@ __attribute__ ((visibility("default"))) int somefunc() {return 42;} ]) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CHECK_GETENV version: 2 updated: 2021/01/02 17:09:14 +dnl CF_CHECK_GETENV version: 4 updated: 2023/12/03 10:18:09 dnl --------------- dnl Check if repeated getenv calls return the same pointer, e.g., it does not dnl discard the previous pointer when returning a new one. @@ -1112,11 +1207,7 @@ AC_CHECK_FUNC( getenv, ,, AC_MSG_ERROR(getenv not found) ) AC_CHECK_FUNCS( putenv setenv strdup ) AC_CACHE_CHECK(if getenv returns consistent values,cf_cv_consistent_getenv,[ AC_TRY_RUN([ -#include <stdlib.h> -#include <unistd.h> -#include <stdio.h> -#include <string.h> -#include <sys/types.h> +$ac_includes_default #if defined(HAVE_ENVIRON) && defined(DECL_ENVIRON) && !defined(environ) extern char **environ; /* POSIX, but some systems are not... */ @@ -1182,7 +1273,7 @@ int main(void) } } } while (found); - sprintf(value, "%lu:%p", (unsigned long) k, &mynames[j]); + sprintf(value, "%lu:%p", (unsigned long) k, (void*)&mynames[j]); set_value(name, value); mynames[j] = str_alloc(name); myvalues[j] = str_alloc(value); @@ -1289,28 +1380,72 @@ if test "$cf_cv_check_gpm_wgetch" != yes ; then fi ])])dnl dnl --------------------------------------------------------------------------- -dnl CF_CHECK_LIBTOOL_VERSION version: 1 updated: 2013/04/06 18:03:09 +dnl CF_CHECK_LIBSSP version: 1 updated: 2021/10/30 10:40:19 +dnl --------------- +dnl Check if libssp is needed, e.g., to work around misconfigured libraries +dnl used in cross-compiling to MinGW. +AC_DEFUN([CF_CHECK_LIBSSP],[ +AC_CACHE_CHECK(if ssp library is needed,cf_cv_need_libssp,[ +AC_TRY_LINK([ +#include <sys/types.h> +#include <dirent.h> +],[ + DIR *dp = opendir("."); +],cf_cv_need_libssp=no,[ + cf_save_LIBS="$LIBS" + LIBS="$LIBS -lssp" + AC_TRY_LINK([ +#include <sys/types.h> +#include <dirent.h> + ],[ + DIR *dp = opendir("."); + ],cf_cv_need_libssp=yes, + cf_cv_need_libssp=maybe) + LIBS="$cf_save_LIBS" +])dnl +]) + +if test "x$cf_cv_need_libssp" = xyes +then + CF_ADD_LIB(ssp) +fi +])dnl +dnl --------------------------------------------------------------------------- +dnl CF_CHECK_LIBTOOL_VERSION version: 2 updated: 2021/05/01 16:24:34 dnl ------------------------ dnl Show the version of libtool dnl dnl Save the version in a cache variable - this is not entirely a good thing, dnl but the version string from libtool is very ugly, and for bug reports it dnl might be useful to have the original string. +dnl +dnl There is an imitation in OpenBSD, which has no apparent use other than to +dnl deny that it is GNU libtool. Just ignore it. AC_DEFUN([CF_CHECK_LIBTOOL_VERSION],[ if test -n "$LIBTOOL" && test "$LIBTOOL" != none then AC_MSG_CHECKING(version of $LIBTOOL) CF_LIBTOOL_VERSION AC_MSG_RESULT($cf_cv_libtool_version) - if test -z "$cf_cv_libtool_version" ; then - AC_MSG_ERROR(This is not GNU libtool) + if test -n "$cf_cv_libtool_version" + then + cf_check_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' -e 's,[[()]],...,g' -e 's,[[ ]],-,g' -e '2,$d'` + case "x$cf_check_libtool_version" in + (*...GNU-libtool...*) + ;; + (*) + AC_MSG_ERROR(This is not GNU libtool) + ;; + esac + else + AC_MSG_ERROR(No version found for $LIBTOOL) fi else AC_MSG_ERROR(GNU libtool has not been found) fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CHECK_WCHAR_H version: 3 updated: 2021/01/01 13:31:04 +dnl CF_CHECK_WCHAR_H version: 5 updated: 2023/12/03 09:21:34 dnl ---------------- dnl Check if wchar.h can be used, i.e., without defining _XOPEN_SOURCE_EXTENDED AC_DEFUN([CF_CHECK_WCHAR_H],[ @@ -1321,7 +1456,7 @@ wctype.h \ AC_CACHE_CHECK(if wchar.h can be used as is,cf_cv_wchar_h_okay,[ AC_TRY_COMPILE( [ -#include <stdlib.h> +$ac_includes_default #ifdef HAVE_WCHAR_H #include <wchar.h> #endif @@ -1330,7 +1465,7 @@ AC_TRY_COMPILE( #endif ],[ wint_t foo = 0; - int bar = iswpunct(foo)], + int bar = iswpunct(foo); (void) bar], [cf_cv_wchar_h_okay=yes], [cf_cv_wchar_h_okay=no])]) @@ -1340,7 +1475,7 @@ then fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CHECK_WCWIDTH_GRAPHICS version: 2 updated: 2021/01/02 17:09:14 +dnl CF_CHECK_WCWIDTH_GRAPHICS version: 4 updated: 2023/12/03 10:17:07 dnl ------------------------- dnl Most "modern" terminal emulators are based to some degree on VT100, and dnl should support line-drawing. Even with Unicode. There is a problem. @@ -1438,8 +1573,9 @@ cat >conftest.in <<CF_EOF 0x256c large plus or crossover CF_EOF AC_TRY_RUN([ +$ac_includes_default + #include <locale.h> -#include <stdio.h> #include <wchar.h> #define MY_LEN 80 @@ -1448,7 +1584,7 @@ int main(void) { FILE *fp; - int value; + unsigned value; char buffer[MY_LEN + 1]; char notes[MY_LEN + 1]; int totals = 0; @@ -1464,9 +1600,9 @@ main(void) fprintf(stderr, "\\t%s", buffer); } else if (sscanf(buffer, "%x %s", &value, notes) == 2) { ++totals; - if (wcwidth(value) == 1) + if (wcwidth((int)value) == 1) ++passed; - fprintf(stderr, "%d\\t%s", wcwidth(value), buffer); + fprintf(stderr, "%d\\t%s", wcwidth((int)value), buffer); } else { fprintf(stderr, "?\\t%s", buffer); } @@ -1483,7 +1619,7 @@ main(void) ]) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CLANG_COMPILER version: 8 updated: 2021/01/01 13:31:04 +dnl CF_CLANG_COMPILER version: 9 updated: 2023/02/18 17:41:25 dnl ----------------- dnl Check if the given compiler is really clang. clang's C driver defines dnl __GNUC__ (fooling the configure script into setting $GCC to yes) but does @@ -1505,7 +1641,7 @@ if test "$ifelse([$1],,[$1],GCC)" = yes ; then AC_TRY_COMPILE([],[ #ifdef __clang__ #else -make an error +#error __clang__ is not defined #endif ],[ifelse([$2],,CLANG_COMPILER,[$2])=yes ],[]) @@ -1551,7 +1687,7 @@ if test "x$ifelse([$2],,CLANG_COMPILER,[$2])" = "xyes" ; then fi ]) dnl --------------------------------------------------------------------------- -dnl CF_CONST_X_STRING version: 6 updated: 2021/01/01 13:31:04 +dnl CF_CONST_X_STRING version: 8 updated: 2023/12/01 17:22:50 dnl ----------------- dnl The X11R4-X11R6 Xt specification uses an ambiguous String type for most dnl character-strings. @@ -1581,11 +1717,12 @@ AC_TRY_COMPILE( #include <stdlib.h> #include <X11/Intrinsic.h> ], -[String foo = malloc(1); (void)foo],[ +[String foo = malloc(1); free((void*)foo)],[ AC_CACHE_CHECK(for X11/Xt const-feature,cf_cv_const_x_string,[ AC_TRY_COMPILE( [ +#undef _CONST_X_STRING #define _CONST_X_STRING /* X11R7.8 (perhaps) */ #undef XTSTRINGDEFINES /* X11R5 and later */ #include <stdlib.h> @@ -1611,6 +1748,42 @@ esac ]) ])dnl dnl --------------------------------------------------------------------------- +dnl CF_CPP_OVERRIDE version: 1 updated: 2022/08/20 16:07:10 +dnl --------------- +dnl Check if the C++ compiler accepts the override keyword. This is a C++-11 +dnl feature. +AC_DEFUN([CF_CPP_OVERRIDE], +[ +if test -n "$CXX"; then +AC_CACHE_CHECK(if $CXX accepts override keyword,cf_cv_cpp_override,[ + AC_LANG_SAVE + AC_LANG_CPLUSPLUS + AC_TRY_RUN([ + +class base +{ +public: + virtual int foo(float x) = 0; +}; + + +class derived: public base +{ +public: + int foo(float x) override { return x != 0.0 ? 1 : 0; } +}; + +int main(void) { } +], + [cf_cv_cpp_override=yes], + [cf_cv_cpp_override=no], + [cf_cv_cpp_override=unknown]) + AC_LANG_RESTORE +]) +fi +test "$cf_cv_cpp_override" = yes && AC_DEFINE(CPP_HAS_OVERRIDE,1,[Define to 1 if C++ has override keyword]) +])dnl +dnl --------------------------------------------------------------------------- dnl CF_CPP_PARAM_INIT version: 7 updated: 2017/01/21 11:06:25 dnl ----------------- dnl Check if the C++ compiler accepts duplicate parameter initialization. This @@ -1812,9 +1985,9 @@ done AC_SUBST(DIRS_TO_MAKE) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_DISABLE_ECHO version: 13 updated: 2015/04/18 08:56:57 +dnl CF_DISABLE_ECHO version: 14 updated: 2021/09/04 06:35:04 dnl --------------- -dnl You can always use "make -n" to see the actual options, but it's hard to +dnl You can always use "make -n" to see the actual options, but it is hard to dnl pick out/analyze warning messages when the compile-line is long. dnl dnl Sets: @@ -1860,7 +2033,7 @@ CF_ARG_DISABLE(gnat-projects, AC_MSG_RESULT($enable_gnat_projects) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_DISABLE_LEAKS version: 8 updated: 2021/01/05 20:05:09 +dnl CF_DISABLE_LEAKS version: 9 updated: 2021/04/03 16:41:50 dnl ---------------- dnl Combine no-leak checks with the libraries or tools that are used for the dnl checks. @@ -1873,9 +2046,9 @@ AC_REQUIRE([CF_WITH_VALGRIND]) AC_MSG_CHECKING(if you want to perform memory-leak testing) AC_ARG_ENABLE(leaks, [ --disable-leaks test: free permanent memory, analyze leaks], - [enable_leaks=no], + [enable_leaks=$enableval], [enable_leaks=yes]) -dnl TODO - drop with_no_leaks +dnl with_no_leaks is more readable... if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi AC_MSG_RESULT($with_no_leaks) @@ -1970,7 +2143,7 @@ fi AC_SUBST(BROKEN_LINKER) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_ENABLE_PC_FILES version: 13 updated: 2015/11/01 05:27:39 +dnl CF_ENABLE_PC_FILES version: 16 updated: 2021/11/20 12:48:37 dnl ------------------ dnl This is the "--enable-pc-files" option, which is available if there is a dnl pkg-config configuration on the local machine. @@ -1995,11 +2168,12 @@ if test "x$enable_pc_files" != xno then MAKE_PC_FILES= case "x$PKG_CONFIG_LIBDIR" in - (xno|xyes) + (xno|xnone|xyes|x) AC_MSG_WARN(no PKG_CONFIG_LIBDIR was found) ;; (*) - CF_PATH_SYNTAX(PKG_CONFIG_LIBDIR) + cf_pkg_config_libdir="$PKG_CONFIG_LIBDIR" + CF_PATH_SYNTAX(cf_pkg_config_libdir) ;; esac else @@ -2100,7 +2274,7 @@ AC_DEFUN([CF_ERRNO], CF_CHECK_ERRNO(errno) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_ETIP_DEFINES version: 6 updated: 2021/01/02 17:09:14 +dnl CF_ETIP_DEFINES version: 7 updated: 2023/10/28 11:59:01 dnl --------------- dnl Test for conflicting definitions of exception in gcc 2.8.0, etc., between dnl math.h and builtin.h, only for ncurses @@ -2132,7 +2306,7 @@ AC_TRY_COMPILE([ ],[]) done done -AC_MSG_RESULT($cf_result) +AC_MSG_RESULT([${cf_result:-(none)}]) CXXFLAGS="$cf_save_CXXFLAGS" ]) dnl --------------------------------------------------------------------------- @@ -2320,7 +2494,7 @@ AC_DEFUN([CF_FIXUP_ADAFLAGS],[ AC_MSG_RESULT($ADAFLAGS) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_FIX_WARNINGS version: 3 updated: 2020/12/31 18:40:20 +dnl CF_FIX_WARNINGS version: 4 updated: 2021/12/16 18:22:31 dnl --------------- dnl Warning flags do not belong in CFLAGS, CPPFLAGS, etc. Any of gcc's dnl "-Werror" flags can interfere with configure-checks. Those go into @@ -2332,11 +2506,13 @@ if test "$GCC" = yes || test "$GXX" = yes then case [$]$1 in (*-Werror=*) - CF_VERBOSE(repairing $1: [$]$1) cf_temp_flags= for cf_temp_scan in [$]$1 do case "x$cf_temp_scan" in + (x-Werror=format*) + CF_APPEND_TEXT(cf_temp_flags,$cf_temp_scan) + ;; (x-Werror=*) CF_APPEND_TEXT(EXTRA_CFLAGS,$cf_temp_scan) ;; @@ -2345,16 +2521,20 @@ then ;; esac done - $1="$cf_temp_flags" - CF_VERBOSE(... fixed [$]$1) - CF_VERBOSE(... extra $EXTRA_CFLAGS) + if test "x[$]$1" != "x$cf_temp_flags" + then + CF_VERBOSE(repairing $1: [$]$1) + $1="$cf_temp_flags" + CF_VERBOSE(... fixed [$]$1) + CF_VERBOSE(... extra $EXTRA_CFLAGS) + fi ;; esac fi AC_SUBST(EXTRA_CFLAGS) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_FOPEN_BIN_R version: 2 updated: 2019/12/31 08:53:54 +dnl CF_FOPEN_BIN_R version: 3 updated: 2023/01/05 18:05:46 dnl -------------- dnl Check if fopen works when the "b" (binary) flag is added to the mode dnl parameter. POSIX ignores the "b", which c89 specified. Some very old @@ -2362,8 +2542,10 @@ dnl systems do not accept it. AC_DEFUN([CF_FOPEN_BIN_R],[ AC_CACHE_CHECK(if fopen accepts explicit binary mode,cf_cv_fopen_bin_r,[ AC_TRY_RUN([ -#include <stdio.h> -int main(void) { +$ac_includes_default + +int main(void) +{ FILE *fp = fopen("conftest.tmp", "wb"); int rc = 0; if (fp != 0) { @@ -2441,7 +2623,91 @@ else fi ]) dnl --------------------------------------------------------------------------- -dnl CF_FUNC_MEMMOVE version: 9 updated: 2017/01/21 11:06:25 +dnl CF_FUNC_GETTIME version: 2 updated: 2023/02/25 08:45:56 +dnl --------------- +dnl Check for gettimeofday or clock_gettime. In 2023, the former is still more +dnl widely supported, but "deprecated" (2008), so we will use the latter if it +dnl is available, to reduce compiler warnings. +AC_DEFUN([CF_FUNC_GETTIME],[ +AC_CACHE_CHECK(for clock_gettime,cf_cv_func_clock_gettime,[ + AC_TRY_LINK([#include <time.h>], + [struct timespec ts; + int rc = clock_gettime(CLOCK_REALTIME, &ts); (void) rc; (void)ts], + [cf_cv_func_clock_gettime=yes], + [cf_cv_func_clock_gettime=no]) +]) + +if test "$cf_cv_func_clock_gettime" = yes +then + AC_DEFINE(HAVE_CLOCK_GETTIME,1,[Define to 1 if we have clock_gettime function]) +else +AC_CHECK_FUNC(gettimeofday, + AC_DEFINE(HAVE_GETTIMEOFDAY,1,[Define to 1 if we have gettimeofday function]),[ + +AC_CHECK_LIB(bsd, gettimeofday, + AC_DEFINE(HAVE_GETTIMEOFDAY,1,[Define to 1 if we have gettimeofday function]) + CF_ADD_LIB(bsd))])dnl CLIX: bzero, select, gettimeofday +fi +])dnl +dnl --------------------------------------------------------------------------- +dnl CF_FUNC_GETTTYNAM version: 2 updated: 2023/01/05 18:06:28 +dnl ----------------- +dnl Check if the 4.3BSD function getttyname exists, as well as if <ttyent.h> +dnl defines the _PATH_TTYS symbol. If the corresponding file exists, but the +dnl other checks fail, just define HAVE_PATH_TTYS. +AC_DEFUN([CF_FUNC_GETTTYNAM],[ +AC_CACHE_CHECK(if _PATH_TTYS is defined in ttyent.h,cf_cv_PATH_TTYS,[ +AC_TRY_COMPILE([ +#include <stdio.h> +#include <ttyent.h>],[ +FILE *fp = fopen(_PATH_TTYS, "r"); (void)fp], + [cf_cv_PATH_TTYS=yes], + [cf_cv_PATH_TTYS=no])]) + +if test $cf_cv_PATH_TTYS = no +then + for cf_ttys in /etc/ttytype /etc/ttys + do + if test -f $cf_ttys + then + cf_cv_PATH_TTYS=maybe + AC_DEFINE(_PATH_TTYS,$cf_ttys,[define to pathname of file containing mapping from tty name to terminal type]) + break + fi + done +fi + +if test $cf_cv_PATH_TTYS != no +then + AC_CACHE_CHECK(if _PATH_TTYS file exists,cf_cv_have_PATH_TTYS,[ + AC_TRY_RUN([ +$ac_includes_default + +#include <ttyent.h> + +int main(void) { + FILE *fp = fopen(_PATH_TTYS, "r"); + ${cf_cv_main_return:-return} (fp == 0); +}], + [cf_cv_have_PATH_TTYS=yes], + [cf_cv_have_PATH_TTYS=no], + [cf_cv_have_PATH_TTYS=unknown])]) + test "$cf_cv_have_PATH_TTYS" = no && cf_cv_PATH_TTYS=no +fi + +if test $cf_cv_PATH_TTYS != no +then + AC_DEFINE(HAVE_PATH_TTYS,1,[define to 1 if system can map tty name to terminal type]) + AC_CACHE_CHECK(for getttynam,cf_cv_func_getttynam,[ + AC_TRY_LINK([#include <ttyent.h>], + [struct ttyent *fp = getttynam("/dev/tty"); (void)fp], + [cf_cv_func_getttynam=yes], + [cf_cv_func_getttynam=no])]) + test "$cf_cv_func_getttynam" = yes && AC_DEFINE(HAVE_GETTTYNAM) +fi +])dnl +dnl --------------------------------------------------------------------------- +dnl CF_FUNC_MEMMOVE version: 10 updated: 2023/01/05 18:51:28 dnl --------------- dnl Check for memmove, or a bcopy that can handle overlapping copy. If neither dnl is found, add our own version of memmove to the list of objects. @@ -2451,6 +2717,8 @@ AC_CHECK_FUNC(memmove,,[ AC_CHECK_FUNC(bcopy,[ AC_CACHE_CHECK(if bcopy does overlapping moves,cf_cv_good_bcopy,[ AC_TRY_RUN([ +$ac_includes_default + int main(void) { static char data[] = "abcdefghijklmnopqrstuwwxyz"; char temp[40]; @@ -2472,14 +2740,15 @@ int main(void) { fi ])])dnl dnl --------------------------------------------------------------------------- -dnl CF_FUNC_NANOSLEEP version: 5 updated: 2017/01/21 11:06:25 +dnl CF_FUNC_NANOSLEEP version: 6 updated: 2023/01/05 18:51:33 dnl ----------------- dnl Check for existence of workable nanosleep() function. Some systems, e.g., dnl AIX 4.x, provide a non-working version. AC_DEFUN([CF_FUNC_NANOSLEEP],[ AC_CACHE_CHECK(if nanosleep really works,cf_cv_func_nanosleep,[ AC_TRY_RUN([ -#include <stdio.h> +$ac_includes_default + #include <errno.h> #include <time.h> @@ -2506,7 +2775,7 @@ int main(void) { test "$cf_cv_func_nanosleep" = "yes" && AC_DEFINE(HAVE_NANOSLEEP,1,[Define to 1 if we have nanosleep()]) ]) dnl --------------------------------------------------------------------------- -dnl CF_FUNC_OPENPTY version: 6 updated: 2021/01/01 13:31:04 +dnl CF_FUNC_OPENPTY version: 7 updated: 2023/12/03 09:21:34 dnl --------------- dnl Check for openpty() function, along with <pty.h> header. It may need the dnl "util" library as well. @@ -2523,6 +2792,7 @@ AC_CACHE_CHECK(for openpty header,cf_cv_func_openpty,[ ],[ int x = openpty((int *)0, (int *)0, (char *)0, (struct termios *)0, (struct winsize *)0); + (void)x; ],[ cf_cv_func_openpty=$cf_header break @@ -2534,7 +2804,7 @@ AC_CACHE_CHECK(for openpty header,cf_cv_func_openpty,[ ]) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_FUNC_POLL version: 10 updated: 2021/01/04 19:13:57 +dnl CF_FUNC_POLL version: 11 updated: 2023/01/05 18:51:40 dnl ------------ dnl See if the poll function really works. Some platforms have poll(), but dnl it does not work for terminals or files. @@ -2542,15 +2812,16 @@ AC_DEFUN([CF_FUNC_POLL],[ tty >/dev/null 2>&1 || { AC_CHECK_FUNCS(posix_openpt) } AC_CACHE_CHECK(if poll really works,cf_cv_working_poll,[ AC_TRY_RUN([ -#include <stdlib.h> -#include <stdio.h> -#include <unistd.h> +$ac_includes_default + #include <fcntl.h> + #ifdef HAVE_POLL_H #include <poll.h> #else #include <sys/poll.h> #endif + int main(void) { struct pollfd myfds; int ret; @@ -2624,19 +2895,29 @@ tcgetattr(1, &foo);], test "$cf_cv_have_tcgetattr" = yes && AC_DEFINE(HAVE_TCGETATTR,1,[Define to 1 if we have tcgetattr]) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_FUNC_VSSCANF version: 7 updated: 2021/01/01 13:31:04 +dnl CF_FUNC_VSSCANF version: 8 updated: 2023/12/03 19:09:59 dnl --------------- dnl Check for vsscanf() function, which is in c9x but generally not in earlier -dnl versions of C. It is in the GNU C library, and can often be simulated by -dnl other functions. +dnl versions of C. It can often be simulated by other functions on older +dnl systems (where FILE is not opaque). AC_DEFUN([CF_FUNC_VSSCANF], [ AC_CACHE_CHECK(for vsscanf function or workaround,cf_cv_func_vsscanf,[ AC_TRY_LINK([ #include <stdarg.h> -#include <stdio.h>],[ +#include <stdio.h> + +static void +myfunc(const char *str, const char *fmt, ...) +{ va_list ap; - vsscanf("from", "%d", ap)],[cf_cv_func_vsscanf=vsscanf],[ + va_start(ap, fmt); + vsscanf(str, fmt, ap); + va_end(ap); +} +],[ + myfunc("55", "%d"); +],[cf_cv_func_vsscanf=vsscanf],[ AC_TRY_LINK([ #include <stdarg.h> #include <stdio.h>],[ @@ -2669,13 +2950,14 @@ esac ])dnl dnl --------------------------------------------------------------------------- -dnl CF_GCC_ATTRIBUTES version: 23 updated: 2021/01/03 18:30:50 +dnl CF_GCC_ATTRIBUTES version: 24 updated: 2021/03/20 12:00:25 dnl ----------------- dnl Test for availability of useful gcc __attribute__ directives to quiet dnl compiler warnings. Though useful, not all are supported -- and contrary dnl to documentation, unrecognized directives cause older compilers to barf. AC_DEFUN([CF_GCC_ATTRIBUTES], [AC_REQUIRE([AC_PROG_FGREP])dnl +AC_REQUIRE([CF_C11_NORETURN])dnl if test "$GCC" = yes || test "$GXX" = yes then @@ -2698,6 +2980,7 @@ then AC_CHECKING([for $CC __attribute__ directives]) cat > "conftest.$ac_ext" <<EOF #line __oline__ "${as_me:-configure}" +#include <stdio.h> #include "confdefs.h" #include "conftest.h" #include "conftest.i" @@ -2712,8 +2995,8 @@ cat > "conftest.$ac_ext" <<EOF #define GCC_SCANFLIKE(fmt,var) /*nothing*/ #endif extern void wow(char *,...) GCC_SCANFLIKE(1,2); -extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN; -extern void foo(void) GCC_NORETURN; +extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2); +extern GCC_NORETURN void foo(void); int main(int argc GCC_UNUSED, char *argv[[]] GCC_UNUSED) { (void)argc; (void)argv; return 0; } EOF cf_printf_attribute=no @@ -2780,7 +3063,7 @@ rm -rf ./conftest* fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_GCC_VERSION version: 8 updated: 2019/09/07 13:38:36 +dnl CF_GCC_VERSION version: 9 updated: 2023/03/05 14:30:13 dnl -------------- dnl Find version of gcc, and (because icc/clang pretend to be gcc without being dnl compatible), attempt to determine if icc/clang is actually used. @@ -2789,7 +3072,7 @@ AC_REQUIRE([AC_PROG_CC]) GCC_VERSION=none if test "$GCC" = yes ; then AC_MSG_CHECKING(version of $CC) - GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[[^)]]*) //' -e 's/^.*(Debian[[^)]]*) //' -e 's/^[[^0-9.]]*//' -e 's/[[^0-9.]].*//'`" + GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^[[^(]]*([[^)]][[^)]]*) //' -e 's/^[[^0-9.]]*//' -e 's/[[^0-9.]].*//'`" test -z "$GCC_VERSION" && GCC_VERSION=unknown AC_MSG_RESULT($GCC_VERSION) fi @@ -2911,7 +3194,7 @@ rm -rf ./conftest* AC_SUBST(EXTRA_CFLAGS) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_GETOPT_HEADER version: 7 updated: 2021/01/01 13:31:04 +dnl CF_GETOPT_HEADER version: 8 updated: 2021/06/19 19:16:16 dnl ---------------- dnl Check for getopt's variables which are commonly defined in stdlib.h, dnl unistd.h or (nonstandard) in getopt.h @@ -2924,7 +3207,7 @@ for cf_header in stdio.h stdlib.h unistd.h getopt.h do AC_TRY_COMPILE([ #include <$cf_header>], -[int x = optind; char *y = optarg], +[int x = optind; char *y = optarg; (void)x; (void)y], [cf_cv_getopt_header=$cf_header break]) done @@ -3372,7 +3655,7 @@ if test "$GXX" = yes; then fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_GXX_VERSION version: 8 updated: 2017/02/11 14:48:57 +dnl CF_GXX_VERSION version: 9 updated: 2023/03/05 14:30:13 dnl -------------- dnl Check for version of g++ AC_DEFUN([CF_GXX_VERSION],[ @@ -3380,7 +3663,7 @@ AC_REQUIRE([AC_PROG_CPP]) GXX_VERSION=none if test "$GXX" = yes; then AC_MSG_CHECKING(version of ${CXX:-g++}) - GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[[^0-9.]]*//' -e 's/[[^0-9.]].*//'`" + GXX_VERSION="`${CXX:-g++} --version 2>/dev/null | sed -e '2,$d' -e 's/^[[^(]]*([[^)]][[^)]]*) //' -e 's/^[[^0-9.]]*//' -e 's/[[^0-9.]].*//'`" if test -z "$GXX_VERSION" then GXX_VERSION=unknown @@ -3625,7 +3908,7 @@ done ]) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_HASHED_DB_VERSION version: 4 updated: 2014/04/12 16:47:01 +dnl CF_HASHED_DB_VERSION version: 5 updated: 2023/02/18 17:41:25 dnl -------------------- dnl Given that we have the header file for hashed database, find the version dnl information. @@ -3646,13 +3929,13 @@ $ac_includes_default #if $cf_db_version == DB_VERSION_MAJOR /* ok */ #else - make an error + #error $cf_db_version is not DB_VERSION_MAJOR #endif #else #if $cf_db_version == 1 /* ok: assuming this is DB 1.8.5 */ #else - make an error + #error $cf_db_version is not 1 #endif #endif ],[DBT *foo = 0],[ @@ -3734,7 +4017,7 @@ CPPFLAGS="-I. $CPPFLAGS" AC_SUBST(CPPFLAGS) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_INSTALL_OPTS version: 2 updated: 2018/08/18 12:19:21 +dnl CF_INSTALL_OPTS version: 3 updated: 2023/06/03 15:17:30 dnl --------------- dnl prompt for/fill-in useful install-program options AC_DEFUN([CF_INSTALL_OPTS], @@ -3742,6 +4025,7 @@ AC_DEFUN([CF_INSTALL_OPTS], CF_INSTALL_OPT_S CF_INSTALL_OPT_P CF_INSTALL_OPT_O +CF_INSTALL_OPT_STRIP_PROG ])dnl dnl --------------------------------------------------------------------------- dnl CF_INSTALL_OPT_O version: 3 updated: 2020/12/31 20:19:42 @@ -3828,7 +4112,73 @@ fi AC_SUBST(INSTALL_OPT_S) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_INTEL_COMPILER version: 8 updated: 2021/01/01 16:53:59 +dnl CF_INSTALL_OPT_STRIP_PROG version: 1 updated: 2023/06/03 15:17:30 +dnl ------------------------- +dnl Provide an option for overriding the strip program used in install "-s" +dnl +dnl coreutils install provides a --strip-program option +dnl FreeBSD uses STRIPBIN environment variable, while NetBSD and OpenBSD use +dnl STRIP environment variable. Other versions of install do not support this. +AC_DEFUN([CF_INSTALL_OPT_STRIP_PROG], +[ +AC_REQUIRE([CF_INSTALL_OPT_S]) +if test -n "$INSTALL_OPT_S" +then + AC_MSG_CHECKING(if you want to specify strip-program) + AC_ARG_WITH(strip-program, + [ --with-strip-program=XX specify program to use when stripping in install], + [with_strip_program=$withval], + [with_strip_program=no]) + AC_MSG_RESULT($with_strip_program) + if test "$with_strip_program" != no + then + AC_MSG_CHECKING(if strip-program is supported with this installer) + cf_install_program=`echo "$INSTALL" | sed -e 's%[[ ]]*[[ ]]-.%%'` + check_install_strip=no + if test -f "$cf_install_program" + then + check_install_version=`"$cf_install_program" --version 2>/dev/null | head -n 1 | grep coreutils` + if test -n "$check_install_version" + then + check_install_strip="option" + else + for check_strip_variable in STRIPBIN STRIP + do + if strings "$cf_install_program" | grep "^$check_strip_variable[$]" >/dev/null + then + check_install_strip="environ" + break + fi + done + fi + fi + AC_MSG_RESULT($check_install_strip) + case "$check_install_strip" in + (no) + AC_MSG_WARN($cf_install_program does not support strip program option) + with_strip_program=no + ;; + (environ) + cat >install.tmp <<-CF_EOF + #! $SHELL + STRIPBIN="$with_strip_program" \\ + STRIP="$with_strip_program" \\ + $INSTALL "[$]@" + CF_EOF + INSTALL="`pwd`/install.tmp" + chmod +x "$INSTALL" + CF_VERBOSE(created $INSTALL) + ;; + (option) + INSTALL_OPT_S="$INSTALL_OPT_S --strip-program=\"$with_strip_program\"" + ;; + esac + fi +fi +AC_SUBST(INSTALL_OPT_S) +])dnl +dnl --------------------------------------------------------------------------- +dnl CF_INTEL_COMPILER version: 9 updated: 2023/02/18 17:41:25 dnl ----------------- dnl Check if the given compiler is really the Intel compiler for Linux. It dnl tries to imitate gcc, but does not return an error when it finds a mismatch @@ -3854,7 +4204,7 @@ if test "$ifelse([$1],,[$1],GCC)" = yes ; then AC_TRY_COMPILE([],[ #ifdef __INTEL_COMPILER #else -make an error +#error __INTEL_COMPILER is not defined #endif ],[ifelse([$2],,INTEL_COMPILER,[$2])=yes cf_save_CFLAGS="$cf_save_CFLAGS -we147" @@ -3866,14 +4216,14 @@ cf_save_CFLAGS="$cf_save_CFLAGS -we147" fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_ISASCII version: 4 updated: 2012/10/06 17:56:13 +dnl CF_ISASCII version: 5 updated: 2023/12/03 09:21:34 dnl ---------- dnl Check if we have either a function or macro for 'isascii()'. AC_DEFUN([CF_ISASCII], [ AC_MSG_CHECKING(for isascii) AC_CACHE_VAL(cf_cv_have_isascii,[ - AC_TRY_LINK([#include <ctype.h>],[int x = isascii(' ')], + AC_TRY_LINK([#include <ctype.h>],[int x = isascii(' '); (void)x], [cf_cv_have_isascii=yes], [cf_cv_have_isascii=no]) ])dnl @@ -3881,7 +4231,7 @@ AC_MSG_RESULT($cf_cv_have_isascii) test "$cf_cv_have_isascii" = yes && AC_DEFINE(HAVE_ISASCII,1,[Define to 1 if we have isascii()]) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_LARGEFILE version: 12 updated: 2020/03/19 20:23:48 +dnl CF_LARGEFILE version: 13 updated: 2023/12/03 19:09:59 dnl ------------ dnl Add checks for large file support. AC_DEFUN([CF_LARGEFILE],[ @@ -3915,11 +4265,15 @@ ifdef([AC_FUNC_FSEEKO],[ #pragma GCC diagnostic error "-Wincompatible-pointer-types" #include <sys/types.h> #include <dirent.h> + +#ifndef __REDIRECT +/* if transitional largefile support is setup, this is true */ +extern struct dirent64 * readdir(DIR *); +#endif ],[ - /* if transitional largefile support is setup, this is true */ - extern struct dirent64 * readdir(DIR *); - struct dirent64 *x = readdir((DIR *)0); - struct dirent *y = readdir((DIR *)0); + DIR *dp = opendir("."); + struct dirent64 *x = readdir(dp); + struct dirent *y = readdir(dp); int z = x - y; (void)z; ], @@ -4090,7 +4444,7 @@ then fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_LD_SEARCHPATH version: 2 updated: 2019/09/26 20:34:14 +dnl CF_LD_SEARCHPATH version: 4 updated: 2022/08/27 15:43:08 dnl ---------------- dnl Try to obtain the linker's search-path, for use in scripts. dnl @@ -4101,19 +4455,19 @@ AC_CACHE_CHECK(for linker search path,cf_cv_ld_searchpath,[ if test "$cross_compiling" != yes ; then # GNU binutils' ld does not involve permissions which may stop ldconfig. -cf_pathlist=`ld --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[[("=]][[("=]]*,,g' -e 's/"[[)]];//gp' | sort -u` +cf_pathlist=`${LD:-ld} --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[[("=]][[("=]]*,,g' -e 's/"[[)]];//gp' | sort -u` # The -NX options tell newer versions of Linux ldconfig to not attempt to # update the cache, which makes it run faster. test -z "$cf_pathlist" && \ - cf_pathlist=`ldconfig -NX -v 2>/dev/null | sed -e '/^[[ ]]/d' -e 's/:$//' | sort -u` + cf_pathlist=`(ldconfig -NX -v) 2>/dev/null | sed -e '/^[[ ]]/d' -e 's/:$//' | sort -u` test -z "$cf_pathlist" && - cf_pathlist=`ldconfig -v 2>/dev/null | sed -n -e '/^[[ ]]/d' -e 's/:$//p' | sort -u` + cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e '/^[[ ]]/d' -e 's/:$//p' | sort -u` # This works with OpenBSD 6.5, which lists only filenames test -z "$cf_pathlist" && - cf_pathlist=`ldconfig -v 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*[$],\1,p' | sort -u` + cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*[$],\1,p' | sort -u` if test -z "$cf_pathlist" then @@ -4128,13 +4482,37 @@ fi if test -z "$cf_pathlist" then - # Solaris is hardcoded - if test -d /opt/SUNWspro/lib + # Solaris is "SunOS" + if test -f /usr/bin/isainfo && test "x`uname -s`" = xSunOS then - cf_pathlist="/opt/SUNWspro/lib /usr/ccs/lib /usr/lib" - elif test -d /usr/ccs/lib + case x`(isainfo -b)` in + (x64) + cf_pathlist="$cf_pathlist /lib/64 /usr/lib/64" + ;; + (x32) + test -d /usr/ccs/lib && cf_pathlist="$cf_pathlist /usr/ccs/lib" + cf_pathlist="$cf_pathlist /lib /usr/lib" + ;; + (*) + AC_MSG_WARN(problem with Solaris architecture) + ;; + esac + fi +fi + +if test -z "$cf_pathlist" +then + # HP-UX + if test x"`uname -s`" = xHP-UX then - cf_pathlist="/usr/ccs/lib /usr/lib" + case x`getconf LONG_BIT` in + (x64) + cf_pathlist="/usr/lib/hpux64" + ;; + (x*) + cf_pathlist="/usr/lib/hpux32" + ;; + esac fi fi @@ -4225,7 +4603,7 @@ ifelse($1,,,[$1=$LIB_PREFIX]) AC_SUBST(LIB_PREFIX) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_LIB_RULES version: 94 updated: 2021/01/23 15:37:41 +dnl CF_LIB_RULES version: 100 updated: 2023/06/03 15:17:30 dnl ------------ dnl Append definitions and rules for the given models to the subdirectory dnl Makefiles, and the recursion rule for the top-level Makefile. If the @@ -4242,6 +4620,7 @@ dnl dnl Note: Libs_To_Make is mixed case, since it is not a pure autoconf variable. AC_DEFUN([CF_LIB_RULES], [AC_REQUIRE([AC_PROG_FGREP])dnl +AC_REQUIRE([CF_MAKE_PHONY])dnl cf_prefix=$LIB_PREFIX AC_REQUIRE([CF_SUBST_NCURSES_VERSION]) @@ -4279,11 +4658,11 @@ do SHARED_LIB= Libs_To_Make= cf_awk_program= - if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5" + if test -n "${cf_cv_abi_default}" && test "x${cf_cv_abi_default}" != "x5" then cf_awk_program="$cf_awk_program\ -/deprecated in ABI${cf_cv_abi_version}/ { next; }\ -{ sub(\"NCURSES([[WT]]+)?\", \"&${cf_cv_abi_version}\"); }\ +/deprecated in ABI${cf_cv_abi_default}/ { next; }\ +{ sub(\"NCURSES([[WT]]+)?\", \"&${cf_cv_abi_default}\"); }\ " fi @@ -4562,6 +4941,9 @@ CF_EOF traces=$LIB_TRACING \ MODEL=$cf_ITEM \ CXX_MODEL=$CXX_MODEL \ + LIB_SUFFIX=$LIB_SUFFIX \ + USE_LIB_SUFFIX=$USE_LIB_SUFFIX \ + make_phony="${cf_cv_make_PHONY:-no}" \ model=$cf_subdir \ prefix=$cf_prefix \ suffix=$cf_suffix \ @@ -4609,6 +4991,21 @@ CF_EOF echo ' ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} [$]@ )' >>Makefile done +echo >> Makefile +echo '# generated by CF_LIB_RULES' >> Makefile + +if test "x$cf_cv_make_PHONY" = xyes ; then + cat >> Makefile <<-CF_EOF + + .PHONY : libs + .PHONY : lintlib + .PHONY : install.includes + .PHONY : uninstall.includes + .PHONY : install.libs + .PHONY : uninstall.libs +CF_EOF +fi + for cf_dir in $SRC_SUBDIRS do if test ! -d "$srcdir/$cf_dir" ; then @@ -4627,6 +5024,15 @@ do fi if test -f "$srcdir/$cf_dir/modules" ; then + + if test "x$cf_cv_make_PHONY" = xyes ; then + cat >> Makefile <<-CF_EOF + + .PHONY : install.$cf_dir + .PHONY : uninstall.$cf_dir +CF_EOF + fi + echo >> Makefile if test -f "$srcdir/$cf_dir/headers" ; then cat >> Makefile <<CF_EOF @@ -4634,10 +5040,9 @@ install.includes \\ uninstall.includes \\ CF_EOF fi -if test "$cf_dir" != "c++" ; then -echo 'lint \' >> Makefile -fi + cat >> Makefile <<CF_EOF +lint \\ libs \\ lintlib \\ install.libs \\ @@ -4659,6 +5064,14 @@ CF_EOF fi done +if test "x$cf_cv_make_PHONY" = xyes ; then + cat >> Makefile <<-CF_EOF + + .PHONY : install.data + .PHONY : uninstall.data +CF_EOF +fi + if test "x$cf_with_db_install" = xyes; then cat >> Makefile <<CF_EOF @@ -4675,6 +5088,15 @@ CF_EOF fi if test "x$cf_with_manpages" = xyes; then + +if test "x$cf_cv_make_PHONY" = xyes ; then + cat >> Makefile <<-CF_EOF + + .PHONY : install.man + .PHONY : uninstall.man +CF_EOF +fi + cat >> Makefile <<CF_EOF install.man \\ @@ -4688,22 +5110,10 @@ cat >> Makefile <<CF_EOF distclean :: rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h rm -f headers.sh headers.sed mk_shared_lib.sh - rm -f edit_man.* man_alias.* + rm -f edit_man.* man_alias.* *.tmp rm -rf \${DIRS_TO_MAKE} CF_EOF -# Special case: tack's manpage lives in its own directory. -if test "x$cf_with_manpages" = xyes; then -if test "x$cf_with_tack" = "xyes"; then -cat >> Makefile <<CF_EOF - -install.man \\ -uninstall.man :: - ( cd tack && \${MAKE} \${TOP_MFLAGS} \[$]@ ) -CF_EOF -fi -fi - dnl If we're installing into a subdirectory of /usr/include, etc., we should dnl prepend the subdirectory's name to the "#include" paths. It won't hurt dnl anything, and will make it more standardized. It's awkward to decide this @@ -4807,6 +5217,13 @@ do if test -f "$srcdir/$cf_dir/modules" ; then if test "$cf_dir" != "c++" ; then + if test "x$cf_cv_make_PHONY" = xyes ; then + cat >> $cf_dir/Makefile <<-CF_EOF + + .PHONY : depend +CF_EOF + fi + cat >>$cf_dir/Makefile <<"CF_EOF" depend : ${AUTO_SRC} makedepend -- ${CPPFLAGS} -- ${C_SRC} @@ -4966,7 +5383,7 @@ AC_DEFUN([CF_LIB_TYPE], test -n "$LIB_SUFFIX" && $2="${LIB_SUFFIX}[$]{$2}" ])dnl dnl --------------------------------------------------------------------------- -dnl CF_LINK_DATAONLY version: 13 updated: 2020/02/08 15:59:30 +dnl CF_LINK_DATAONLY version: 15 updated: 2023/12/03 10:03:10 dnl ---------------- dnl Some systems have a non-ANSI linker that doesn't pull in modules that have dnl only data (i.e., no functions), for example NeXT. On those systems we'll @@ -4988,17 +5405,21 @@ EOF rm -f conftest.$ac_ext data.o cat >conftest.$ac_ext <<EOF #line __oline__ "configure" +extern int testfunc(void); +#if defined(NeXT) int testfunc(void) { -#if defined(NeXT) ${cf_cv_main_return:-return}(1); /* I'm told this linker is broken */ +} #else - extern int testdata[[3]]; +extern int testdata[[3]]; +int testfunc(void) +{ return testdata[[0]] == 123 && testdata[[1]] == 456 && testdata[[2]] == 789; -#endif } +#endif EOF if AC_TRY_EVAL(ac_compile); then mv conftest.o func.o && \ @@ -5009,9 +5430,9 @@ EOF cf_saveLIBS="$LIBS" LIBS="conftest.a $LIBS" AC_TRY_RUN([ + extern int testfunc(void); int main(void) { - extern int testfunc(); ${cf_cv_main_return:-return} (!testfunc()); } ], @@ -5030,11 +5451,14 @@ AC_SUBST(BROKEN_LINKER) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_LINK_FUNCS version: 9 updated: 2017/01/21 11:11:02 +dnl CF_LINK_FUNCS version: 13 updated: 2023/12/03 09:24:04 dnl ------------- dnl Most Unix systems have both link and symlink, a few don't have symlink. dnl A few non-Unix systems implement symlink, but not link. dnl A few non-systems implement neither (or have nonfunctional versions). +dnl +dnl This allows for a 2-second difference in modification times to allow for +dnl some marginal NFS implementations. AC_DEFUN([CF_LINK_FUNCS], [ AC_CHECK_HEADERS( \ @@ -5053,27 +5477,31 @@ else cf_cv_link_funcs= for cf_func in link symlink ; do AC_TRY_RUN([ -#include <sys/types.h> -#include <sys/stat.h> -#ifdef HAVE_UNISTD_H -#include <unistd.h> -#endif +$ac_includes_default + int main(void) { int fail = 0; - char *src = "config.log"; - char *dst = "conftest.chk"; - struct stat src_sb; - struct stat dst_sb; - - stat(src, &src_sb); - fail = ($cf_func("config.log", "conftest.chk") < 0) - || (stat(dst, &dst_sb) < 0) - || (dst_sb.st_mtime != src_sb.st_mtime); + char src[] = "conftest.tmp"; + char dst[] = "conftest.chk"; + struct stat src_sb, dst_sb; + FILE *fp = fopen(src, "w"); + if (fp == 0) { fail = 3; } else { + fclose(fp); stat(src, &src_sb); + if ($cf_func(src, dst) < 0) { + fail = 1; + } else if (stat(dst, &dst_sb) < 0) { + fail = 2; + } else { + long diff = (dst_sb.st_mtime - src_sb.st_mtime); + if (diff < 0) diff = -diff; + if (diff > 2) fail = 3; + } + } #ifdef HAVE_UNLINK - unlink(dst); + unlink(dst); unlink(src); #else - remove(dst); + remove(dst); remove(src); #endif ${cf_cv_main_return:-return} (fail); } @@ -5090,10 +5518,10 @@ int main(void) fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_MAKEFLAGS version: 20 updated: 2021/01/03 19:29:49 +dnl CF_MAKEFLAGS version: 21 updated: 2021/09/04 06:47:34 dnl ------------ dnl Some 'make' programs support ${MAKEFLAGS}, some ${MFLAGS}, to pass 'make' -dnl options to lower-levels. It's very useful for "make -n" -- if we have it. +dnl options to lower-levels. It is very useful for "make -n" -- if we have it. dnl (GNU 'make' does both, something POSIX 'make', which happens to make the dnl ${MAKEFLAGS} variable incompatible because it adds the assignments :-) AC_DEFUN([CF_MAKEFLAGS], @@ -5133,6 +5561,89 @@ CF_EOF AC_SUBST(cf_cv_makeflags) ])dnl dnl --------------------------------------------------------------------------- +dnl CF_MAKE_PHONY version: 3 updated: 2021/01/08 16:08:21 +dnl ------------- +dnl Check if the make-program handles a ".PHONY" target, e.g,. a target which +dnl acts as a placeholder. +dnl +dnl The ".PHONY" feature was proposed in 2011 here +dnl https://www.austingroupbugs.net/view.php?id=523 +dnl and is scheduled for release in P1003.1 Issue 8 (late 2022). +dnl +dnl This is not supported by SVr4 make (or SunOS 4, 4.3SD, etc), but works with +dnl a few others (i.e., GNU make and the non-POSIX "BSD" make): +dnl +dnl + This is a GNU make feature (since April 1988, but in turn from binutils, +dnl date unspecified). +dnl +dnl + It was adopted in NetBSD make in June 1995. +dnl +dnl + The other BSD make programs are derived from the NetBSD make (and for +dnl that reason are not actually different "implementations"). +dnl +dnl + Some features of NetBSD make were actually adapted from pmake, which +dnl began as a modified GNU make starting in 1993. +dnl +dnl + Version 3.8 of the dmake program in January 1992 also implemented this +dnl GNU make extension, but is less well known than the BSD make. +AC_DEFUN([CF_MAKE_PHONY],[ +AC_CACHE_CHECK(for \".PHONY\" make-support, cf_cv_make_PHONY,[ + rm -rf conftest* + ( + mkdir conftest || exit 1 + cd conftest + cat >makefile <<'CF_EOF' +.PHONY: always +DATA=0 +always: always.out + @echo "** making [$]@ [$](DATA)" +once: once.out + @echo "** making [$]@ [$](DATA)" +always.out: + @echo "** making [$]@ [$](DATA)" + echo [$](DATA) > [$]@ +once.out: + @echo "** making [$]@ [$](DATA)" + echo [$](DATA) > [$]@ +CF_EOF + for cf_data in 1 2 3 + do + ${MAKE:-make} always DATA=$cf_data + ${MAKE:-make} once DATA=$cf_data + ${MAKE:-make} -t always once + if test -f always ; then + echo "no (case 1)" > ../conftest.tmp + elif test ! -f always.out ; then + echo "no (case 2)" > ../conftest.tmp + elif test ! -f once.out ; then + echo "no (case 3)" > ../conftest.tmp + elif ! cmp -s always.out once.out ; then + echo "no (case 4)" > ../conftest.tmp + diff always.out once.out + else + cf_check="`cat always.out`" + if test "x$cf_check" != "x$cf_data" ; then + echo "no (case 5)" > ../conftest.tmp + else + echo yes > ../conftest.tmp + rm -f ./*.out + continue + fi + fi + break + done + ) >&AC_FD_CC 2>&1 + cf_cv_make_PHONY="`cat conftest.tmp`" + rm -rf conftest* +]) +MAKE_NO_PHONY="#" +MAKE_PHONY="#" +test "x$cf_cv_make_PHONY" = xyes && MAKE_PHONY= +test "x$cf_cv_make_PHONY" != xyes && MAKE_NO_PHONY= +AC_SUBST(MAKE_NO_PHONY) +AC_SUBST(MAKE_PHONY) +])dnl +dnl --------------------------------------------------------------------------- dnl CF_MAKE_TAGS version: 6 updated: 2010/10/23 15:52:32 dnl ------------ dnl Generate tags/TAGS targets for makefiles. Do not generate TAGS if we have @@ -5170,13 +5681,16 @@ AC_SUBST(MAKE_UPPER_TAGS) AC_SUBST(MAKE_LOWER_TAGS) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_MANPAGE_FORMAT version: 14 updated: 2021/01/02 17:09:14 +dnl CF_MANPAGE_FORMAT version: 19 updated: 2024/03/30 08:27:40 dnl ----------------- dnl Option to allow user to override automatic configuration of manpage format. dnl There are several special cases: dnl -dnl gzip - man checks for, can display gzip'd files dnl compress - man checks for, can display compressed files +dnl bzip2 - man checks for, can display bzip2'd files +dnl gzip - man checks for, can display gzip'd files +dnl xz - man checks for, can display xz'd files +dnl dnl BSDI - files in the cat-directories are suffixed ".0" dnl formatted - installer should format (put files in cat-directory) dnl catonly - installer should only format, e.g., for a turnkey system. @@ -5190,8 +5704,9 @@ AC_REQUIRE([CF_PATHSEP]) AC_MSG_CHECKING(format of man-pages) AC_ARG_WITH(manpage-format, - [ --with-manpage-format specify manpage-format: gzip/compress/BSDI/normal and - optionally formatted/catonly, e.g., gzip,formatted], + [ --with-manpage-format specify manpage-format: gzip/compress/bzip2/xz, + BSDI/normal and optionally formatted/catonly, + e.g., gzip,formatted], [MANPAGE_FORMAT=$withval], [MANPAGE_FORMAT=unknown]) @@ -5206,7 +5721,7 @@ case "$MANPAGE_FORMAT" in MANPATH="/usr/man:/usr/share/man" fi - # look for the 'date' man-page (it's most likely to be installed!) + # look for the 'date' man-page (it is most likely to be installed!) MANPAGE_FORMAT= cf_preform="no" cf_catonly="yes" @@ -5221,10 +5736,12 @@ case "$MANPAGE_FORMAT" in if test "x$cf_test" = "x$cf_name" ; then case "$cf_name" in - (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";; - (*.Z) MANPAGE_FORMAT="$MANPAGE_FORMAT compress";; - (*.0) MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";; - (*) MANPAGE_FORMAT="$MANPAGE_FORMAT normal";; + (*.bz2) MANPAGE_FORMAT="$MANPAGE_FORMAT bzip2";; + (*.xz) MANPAGE_FORMAT="$MANPAGE_FORMAT xz";; + (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";; + (*.Z) MANPAGE_FORMAT="$MANPAGE_FORMAT compress";; + (*.0) MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";; + (*) MANPAGE_FORMAT="$MANPAGE_FORMAT normal";; esac case "$cf_name" in @@ -5263,7 +5780,7 @@ case "$MANPAGE_FORMAT" in (*) for cf_option in $MANPAGE_FORMAT; do case "$cf_option" in - (gzip|compress|BSDI|normal|formatted|catonly) + (xz|bzip2|gzip|compress|BSDI|normal|formatted|catonly) ;; (*) cf_unknown="$cf_unknown $cf_option" @@ -5277,9 +5794,53 @@ AC_MSG_RESULT($MANPAGE_FORMAT) if test -n "$cf_unknown" ; then AC_MSG_WARN(Unexpected manpage-format $cf_unknown) fi + +cf_manpage_format=no +cf_manpage_inboth=no +cf_manpage_so_strip= +cf_manpage_compress= +cf_manpage_coptions= + +for cf_item in $MANPAGE_FORMAT +do +case "$cf_item" in +(catonly) + cf_manpage_format=yes + cf_manpage_inboth=no + ;; +(formatted) + cf_manpage_format=yes + cf_manpage_inboth=yes + ;; +(compress) + cf_manpage_so_strip="Z" + cf_manpage_compress=compress + ;; +(gzip) + cf_manpage_so_strip="gz" + cf_manpage_compress=gzip + cf_manpage_coptions=-n + ;; +(bzip2) + cf_manpage_so_strip="bz2" + cf_manpage_compress=bzip2 + ;; +(xz) + cf_manpage_so_strip="xz" + cf_manpage_compress=xz + ;; +esac +done + +AC_SUBST(cf_manpage_format) +AC_SUBST(cf_manpage_inboth) +AC_SUBST(cf_manpage_so_strip) +AC_SUBST(cf_manpage_compress) +AC_SUBST(cf_manpage_coptions) + ])dnl dnl --------------------------------------------------------------------------- -dnl CF_MANPAGE_RENAMES version: 12 updated: 2021/01/01 16:53:59 +dnl CF_MANPAGE_RENAMES version: 17 updated: 2022/10/23 07:46:29 dnl ------------------ dnl The Debian people have their own naming convention for manpages. This dnl option lets us override the name of the file containing renaming, or @@ -5299,34 +5860,26 @@ case ".$MANPAGE_RENAMES" in (.|.yes) # Debian 'man' program? if test -f /etc/debian_version ; then - MANPAGE_RENAMES=`cd "$srcdir" && pwd`/man/man_db.renames + MANPAGE_RENAMES=man/man_db.renames else MANPAGE_RENAMES=no fi ;; esac -if test "$MANPAGE_RENAMES" != no ; then - if test -f "$srcdir/man/$MANPAGE_RENAMES" ; then - MANPAGE_RENAMES=`cd "$srcdir/man" && pwd`/$MANPAGE_RENAMES - elif test ! -f "$MANPAGE_RENAMES" ; then - AC_MSG_ERROR(not a filename: $MANPAGE_RENAMES) - fi - - test ! -d man && mkdir man - - # Construct a sed-script to perform renaming within man-pages - if test -n "$MANPAGE_RENAMES" ; then - test ! -d man && mkdir man - $SHELL "$srcdir/man/make_sed.sh" "$MANPAGE_RENAMES" >./edit_man.sed - fi +if test "$MANPAGE_RENAMES" = man/man_db.renames ; then + MANPAGE_RENAMES=`pwd`/$MANPAGE_RENAMES +elif test "$MANPAGE_RENAMES" = no ; then + : +elif test ! -f "$MANPAGE_RENAMES" ; then + AC_MSG_ERROR(not a filename: $MANPAGE_RENAMES) fi AC_MSG_RESULT($MANPAGE_RENAMES) AC_SUBST(MANPAGE_RENAMES) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_MANPAGE_SYMLINKS version: 6 updated: 2015/04/17 21:13:04 +dnl CF_MANPAGE_SYMLINKS version: 7 updated: 2023/01/21 16:37:17 dnl ------------------- dnl Some people expect each tool to make all aliases for manpages in the dnl man-directory. This accommodates the older, less-capable implementations @@ -5360,7 +5913,7 @@ AC_ARG_WITH(manpage-symlinks, [MANPAGE_SYMLINKS=$withval], [MANPAGE_SYMLINKS=$cf_use_symlinks]) -if test "$$cf_use_symlinks" = no; then +if test "$cf_use_symlinks" = no; then if test "$MANPAGE_SYMLINKS" = yes ; then AC_MSG_WARN(cannot make symlinks, will use .so files) MANPAGE_SYMLINKS=no @@ -5388,7 +5941,32 @@ AC_ARG_WITH(manpage-tbl, AC_MSG_RESULT($MANPAGE_TBL) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_MAN_PAGES version: 51 updated: 2021/01/05 16:29:19 +dnl CF_MB_LEN_MAX version: 1 updated: 2024/03/02 15:45:10 +dnl ------------- +dnl Check if <limits.h> defines a usable MB_LEN_MAX. That may be because it is +dnl not defined, or it may be a bogus value. +AC_DEFUN([CF_MB_LEN_MAX],[ +AC_CACHE_CHECK(if MB_LEN_MAX is usable,cf_cv_mb_len_max,[ +AC_TRY_COMPILE([ +$ac_includes_default +#include <limits.h>], +[ +#if defined(MB_LEN_MAX) && MB_LEN_MAX >= 6 + ${cf_cv_main_return:-return}(0); +#else +#error MB_LEN_MAX is not usable +#endif +], [cf_cv_mb_len_max=yes], + [cf_cv_mb_len_max=no])]) +if test "$cf_cv_mb_len_max" = yes +then + AC_DEFINE(HAVE_CONSISTENT_MB_LEN_MAX,1,[Define to 1 if MB_LEN_MAX is usable]) +else + AC_MSG_WARN(MB_LEN_MAX is missing/inconsistent in system headers) +fi +])dnl +dnl --------------------------------------------------------------------------- +dnl CF_MAN_PAGES version: 59 updated: 2024/03/30 08:27:40 dnl ------------ dnl Try to determine if the man-pages on the system are compressed, and if dnl so, what format is used. Use this information to construct a script that @@ -5407,36 +5985,8 @@ else cf_prefix="$prefix" fi -case "$MANPAGE_FORMAT" in -(*catonly*) - cf_format=yes - cf_inboth=no - ;; -(*formatted*) - cf_format=yes - cf_inboth=yes - ;; -(*) - cf_format=no - cf_inboth=no - ;; -esac - test ! -d man && mkdir man -cf_so_strip= -cf_compress= -case "$MANPAGE_FORMAT" in -(*compress*) - cf_so_strip="Z" - cf_compress=compress - ;; -(*gzip*) - cf_so_strip="gz" - cf_compress=gzip - ;; -esac - cf_edit_man=./edit_man.sh cf_man_alias=`pwd`/man_alias.sed @@ -5454,6 +6004,7 @@ NCURSES_PATCH="$NCURSES_PATCH" NCURSES_OSPEED="$NCURSES_OSPEED" TERMINFO="$TERMINFO" +TERMINFO_DIRS="$TERMINFO_DIRS" INSTALL="$INSTALL" INSTALL_DATA="$INSTALL_DATA" @@ -5461,7 +6012,8 @@ INSTALL_DATA="$INSTALL_DATA" transform="$program_transform_name" TMP=\${TMPDIR:=/tmp}/man\$\$ -trap "rm -f \$TMP" 0 1 2 3 15 +trap "rm -f \$TMP; exit 1" 1 2 3 15 +trap "rm -f \$TMP" 0 form=\[$]1 shift || exit 1 @@ -5477,8 +6029,8 @@ top_srcdir=\[$]srcdir/.. shift || exit 1 if test "\$form" = normal ; then - if test "$cf_format" = yes ; then - if test "$cf_inboth" = no ; then + if test "$cf_manpage_format" = yes ; then + if test "$cf_manpage_inboth" = no ; then $SHELL "\[$]0" format "\$verb" "\$mandir" "\$srcdir" "\[$]@" exit $? fi @@ -5530,9 +6082,9 @@ CF_EOF2 aliases= cf_source=\`basename "\$i"\` - inalias=\$cf_source - test ! -f "\$inalias" && inalias="\$srcdir/\$inalias" - if test ! -f "\$inalias" ; then + cf_full_alias=\$cf_source + test ! -f "\$cf_full_alias" && cf_full_alias="\$srcdir/\$cf_full_alias" + if test ! -f "\$cf_full_alias" ; then echo ".. skipped \$cf_source" continue fi @@ -5541,8 +6093,9 @@ CF_EOF if test "$MANPAGE_ALIASES" != no ; then cat >>$cf_edit_man <<CF_EOF nCurses=ignore.3x + cf_part_alias=\`echo \$cf_full_alias| sed -e 's,^.*/,,'\` test "$with_curses_h" = yes && nCurses=ncurses.3x - aliases=\`sed -f "\$top_srcdir/man/manlinks.sed" "\$inalias" |sed -f "$cf_man_alias" | sort -u; test "\$inalias" = "\$nCurses" && echo curses\` + aliases=\`sed -f "\$top_srcdir/man/manlinks.sed" "\$cf_full_alias" |sed -f "$cf_man_alias" | sort -u; test "\$cf_part_alias" = "\$nCurses" && echo curses\` CF_EOF fi @@ -5571,7 +6124,7 @@ cat >>$cf_edit_man <<CF_EOF sed -f "$cf_man_alias" \\ CF_EOF -if test -f "$MANPAGE_RENAMES" ; then +if test "$MANPAGE_RENAMES" != no ; then cat >>$cf_edit_man <<CF_EOF < "\$i" | sed -f `pwd`/edit_man.sed >\$TMP CF_EOF @@ -5609,15 +6162,15 @@ cat >>$cf_edit_man <<CF_EOF fi CF_EOF -if test -n "$cf_compress" ; then +if test -n "$cf_manpage_compress" ; then cat >>$cf_edit_man <<CF_EOF if test "\$verb" = installing ; then - if ( "$cf_compress" -f \$TMP ) + if ( "$cf_manpage_compress" -f \$TMP ) then - mv \$TMP.$cf_so_strip \$TMP + mv \$TMP.$cf_manpage_so_strip \$TMP fi fi - cf_target="\$cf_target.$cf_so_strip" + cf_target="\$cf_target.$cf_manpage_so_strip" CF_EOF fi @@ -5634,6 +6187,14 @@ esac cat >>$cf_edit_man <<CF_EOF suffix=\`basename "\$cf_target" | sed -e 's%^[[^.]]*%%'\` + extra_suffix= + if test -n "$EXTRA_SUFFIX" ; then + case \$cf_target in + (*${EXTRA_SUFFIX}\$suffix) + extra_suffix="$EXTRA_SUFFIX" + ;; + esac + fi if test "\$verb" = installing ; then echo "\$verb \$cf_target" \$INSTALL_DATA \$TMP "\$cf_target" @@ -5641,13 +6202,14 @@ cat >>$cf_edit_man <<CF_EOF test -n "\$aliases" && ( cd "\$cf_subdir\${section}" && ( cf_source=\`echo "\$cf_target" |sed -e 's%^.*/\\([[^/]][[^/]]*/[[^/]][[^/]]*$\\)%\\1%'\` - test -n "$cf_so_strip" && cf_source=\`echo "\$cf_source" |sed -e 's%\\.$cf_so_strip\$%%'\` + test -n "$cf_manpage_so_strip" && cf_source=\`echo "\$cf_source" |sed -e 's%\\.$cf_manpage_so_strip\$%%'\` cf_target=\`basename "\$cf_target"\` for cf_alias in \$aliases do if test "\$section" = 1 ; then cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\` fi + cf_alias="\${cf_alias}\${extra_suffix}" if test "$MANPAGE_SYMLINKS" = yes ; then if test -f "\$cf_alias\${suffix}" ; then @@ -5675,11 +6237,11 @@ cat >>$cf_edit_man <<CF_EOF elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then echo ".so \$cf_source" >\$TMP CF_EOF -if test -n "$cf_compress" ; then +if test -n "$cf_manpage_compress" ; then cat >>$cf_edit_man <<CF_EOF - if test -n "$cf_so_strip" ; then - "$cf_compress" -f \$TMP - mv \$TMP.$cf_so_strip \$TMP + if test -n "$cf_manpage_so_strip" ; then + "$cf_manpage_compress" $cf_manpage_coptions -f \$TMP + mv \$TMP.$cf_manpage_so_strip \$TMP fi CF_EOF fi @@ -5704,6 +6266,7 @@ cat >>$cf_edit_man <<CF_EOF if test "\$section" = 1 ; then cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\` fi + cf_alias="\${cf_alias}\${extra_suffix}" echo ".. \$verb alias \$cf_alias\${suffix}" rm -f "\$cf_alias\${suffix}" @@ -5718,7 +6281,7 @@ cat >>$cf_edit_man <<CF_EOF esac done -if test "$cf_inboth" = yes ; then +if test "$cf_manpage_inboth" = yes ; then if test "\$form" != format ; then $SHELL "\[$]0" format "\$verb" "\$mandir" "\$srcdir" "\[$]@" fi @@ -5741,7 +6304,7 @@ CF_UPPER(cf_map_lib_basename,$2) eval $1="\$${cf_map_lib_basename}_NAME" ])dnl dnl --------------------------------------------------------------------------- -dnl CF_MATH_LIB version: 10 updated: 2020/12/31 18:40:20 +dnl CF_MATH_LIB version: 11 updated: 2022/07/27 19:01:48 dnl ----------- dnl Checks for libraries. At least one UNIX system, Apple Macintosh dnl Rhapsody 5.5, does not have -lm. We cannot use the simpler @@ -5751,18 +6314,42 @@ AC_DEFUN([CF_MATH_LIB], AC_CACHE_CHECK(if -lm needed for math functions, cf_cv_need_libm,[ AC_TRY_LINK([ - #include <stdio.h> - #include <stdlib.h> - #include <math.h> + #include <stdio.h> + #include <stdlib.h> + #include <math.h> ], [double x = rand(); printf("result = %g\\n", ]ifelse([$2],,sin(x),$2)[)], [cf_cv_need_libm=no], [cf_cv_need_libm=yes])]) + if test "$cf_cv_need_libm" = yes then -ifelse($1,,[ - CF_ADD_LIB(m) -],[$1=-lm]) + + cf_save_LIBS="$LIBS" + LIBS="$LIBS -lm" + AC_CACHE_CHECK(if -lm is available for math functions, + cf_cv_have_libm,[ + AC_TRY_LINK([ + #include <stdio.h> + #include <stdlib.h> + #include <math.h> + ], + [double x = rand(); printf("result = %g\\n", ]ifelse([$2],,sin(x),$2)[)], + [cf_cv_have_libm=yes], + [cf_cv_have_libm=no])]) + LIBS="$cf_save_LIBS" + + if test "$cf_cv_have_libm" = yes + then + ifelse($1,,[CF_ADD_LIB(m)],[$1=-lm]) + fi +else + cf_cv_have_libm=yes +fi + +if test "$cf_cv_have_libm" = yes +then + AC_DEFINE(HAVE_MATH_FUNCS,1,[Define to 1 if math functions are available]) fi ]) dnl --------------------------------------------------------------------------- @@ -5796,7 +6383,7 @@ fi test "$cf_cv_mixedcase" = yes && AC_DEFINE(MIXEDCASE_FILENAMES,1,[Define to 1 if filesystem supports mixed-case filenames.]) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_MKSTEMP version: 11 updated: 2021/01/01 13:31:04 +dnl CF_MKSTEMP version: 13 updated: 2023/12/01 17:22:50 dnl ---------- dnl Check for a working mkstemp. This creates two files, checks that they are dnl successfully created and distinct (AmigaOS apparently fails on the last). @@ -5807,17 +6394,11 @@ unistd.h \ AC_CACHE_CHECK(for working mkstemp, cf_cv_func_mkstemp,[ rm -rf ./conftest* AC_TRY_RUN([ -#include <sys/types.h> -#ifdef HAVE_UNISTD_H -#include <unistd.h> -#endif -#include <stdlib.h> -#include <stdio.h> -#include <string.h> -#include <sys/stat.h> +$ac_includes_default + int main(void) { - char *tmpl = "conftestXXXXXX"; + static char tmpl[] = "conftestXXXXXX"; char name[2][80]; int n; int result = 0; @@ -5862,7 +6443,7 @@ AC_DEFUN([CF_MSG_LOG],[ echo "${as_me:-configure}:__oline__: testing $* ..." 1>&AC_FD_CC ])dnl dnl --------------------------------------------------------------------------- -dnl CF_NCURSES_ABI_6 version: 4 updated: 2021/01/01 13:31:04 +dnl CF_NCURSES_ABI_6 version: 5 updated: 2023/01/07 16:32:06 dnl ---------------- dnl Set ncurses' ABI to 6 unless overridden by explicit configure option, and dnl warn about this. @@ -5872,7 +6453,8 @@ if test "${with_abi_version+set}" != set; then (5.*) cf_cv_rel_version=6.0 cf_cv_abi_version=6 - AC_MSG_WARN(overriding ABI version to $cf_cv_abi_version) + cf_cv_abi_default=6 + AC_MSG_WARN(overriding ABI version to $cf_cv_abi_default) ;; esac fi @@ -5898,19 +6480,29 @@ then fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_NO_LEAKS_OPTION version: 8 updated: 2021/01/05 20:05:09 +dnl CF_NO_LEAKS_OPTION version: 9 updated: 2021/06/13 19:45:41 dnl ------------------ dnl see CF_WITH_NO_LEAKS +dnl +dnl $1 = option/name +dnl $2 = help-text +dnl $3 = symbol to define if the option is set +dnl $4 = additional actions to take if the option is set AC_DEFUN([CF_NO_LEAKS_OPTION],[ AC_MSG_CHECKING(if you want to use $1 for testing) AC_ARG_WITH($1, [$2], - [AC_DEFINE_UNQUOTED($3,1,"Define to 1 if you want to use $1 for testing.")ifelse([$4],,[ + [case "x$withval" in + (x|xno) ;; + (*) + : "${with_cflags:=-g}" + : "${enable_leaks:=no}" + with_$1=yes + AC_DEFINE_UNQUOTED($3,1,"Define to 1 if you want to use $1 for testing.")ifelse([$4],,[ $4 ]) - : "${with_cflags:=-g}" - : "${enable_leaks:=no}" - with_$1=yes], + ;; + esac], [with_$1=]) AC_MSG_RESULT(${with_$1:-no}) @@ -5927,15 +6519,15 @@ case ".$with_cflags" in esac ])dnl dnl --------------------------------------------------------------------------- -dnl CF_NUMBER_SYNTAX version: 2 updated: 2015/04/17 21:13:04 +dnl CF_NUMBER_SYNTAX version: 3 updated: 2023/05/06 16:14:29 dnl ---------------- -dnl Check if the given variable is a number. If not, report an error. +dnl Check if the given variable is a positive integer. Report an error if not. dnl $1 is the variable dnl $2 is the message AC_DEFUN([CF_NUMBER_SYNTAX],[ if test -n "$1" ; then - case $1 in - ([[0-9]]*) + case `echo "$1" | sed -e 's/^[[0-9]]*$/0/g'` in + (0) ;; (*) AC_MSG_ERROR($2 is not a number: $1) @@ -5966,6 +6558,21 @@ AC_DEFUN([CF_OBJ_SUBDIR], esac ])dnl dnl --------------------------------------------------------------------------- +dnl CF_OUTPUT_MANPAGE_RENAMES version: 2 updated: 2022/10/22 19:12:31 +dnl ------------------------- +dnl This runs in the output step to config.status, after man_db.renames has +dnl been generated. +AC_DEFUN([CF_OUTPUT_MANPAGE_RENAMES], +[ +AC_REQUIRE([CF_MANPAGE_RENAMES]) +if test "$MANPAGE_RENAMES" != no ; then + # Construct a sed-script to perform renaming within man-pages + test -n "$verbose" && echo "creating edit_man.sed" + test ! -d man && mkdir man + FGREP="${FGREP-grep -F}" $SHELL "$srcdir/man/make_sed.sh" "$MANPAGE_RENAMES" >./edit_man.sed +fi +])dnl +dnl --------------------------------------------------------------------------- dnl CF_PATHSEP version: 8 updated: 2021/01/01 13:31:04 dnl ---------- dnl Provide a value for the $PATH and similar separator (or amend the value @@ -6064,14 +6671,16 @@ case ".[$]$1" in esac ])dnl dnl --------------------------------------------------------------------------- -dnl CF_PKG_CONFIG version: 11 updated: 2021/01/01 13:31:04 +dnl CF_PKG_CONFIG version: 13 updated: 2023/10/28 11:59:01 dnl ------------- dnl Check for the package-config program, unless disabled by command-line. +dnl +dnl Sets $PKG_CONFIG to the pathname of the pkg-config program. AC_DEFUN([CF_PKG_CONFIG], [ AC_MSG_CHECKING(if you want to use pkg-config) AC_ARG_WITH(pkg-config, - [ --with-pkg-config{=path} enable/disable use of pkg-config], + [[ --with-pkg-config[=CMD] enable/disable use of pkg-config and its name CMD]], [cf_pkg_config=$withval], [cf_pkg_config=yes]) AC_MSG_RESULT($cf_pkg_config) @@ -6100,7 +6709,7 @@ fi AC_SUBST(PKG_CONFIG) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_POSIX_C_SOURCE version: 11 updated: 2018/12/31 20:46:17 +dnl CF_POSIX_C_SOURCE version: 12 updated: 2023/02/18 17:41:25 dnl ----------------- dnl Define _POSIX_C_SOURCE to the given level, and _POSIX_SOURCE if needed. dnl @@ -6131,7 +6740,7 @@ AC_CACHE_CHECK(if we should define _POSIX_C_SOURCE,cf_cv_posix_c_source,[ CF_MSG_LOG(if the symbol is already defined go no further) AC_TRY_COMPILE([#include <sys/types.h>],[ #ifndef _POSIX_C_SOURCE -make an error +#error _POSIX_C_SOURCE is not defined #endif], [cf_cv_posix_c_source=no], [cf_want_posix_source=no @@ -6150,7 +6759,7 @@ make an error if test "$cf_want_posix_source" = yes ; then AC_TRY_COMPILE([#include <sys/types.h>],[ #ifdef _POSIX_SOURCE -make an error +#error _POSIX_SOURCE is defined #endif],[], cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE") fi @@ -6161,7 +6770,7 @@ make an error CF_MSG_LOG(if the second compile does not leave our definition intact error) AC_TRY_COMPILE([#include <sys/types.h>],[ #ifndef _POSIX_C_SOURCE -make an error +#error _POSIX_C_SOURCE is not defined #endif],, [cf_cv_posix_c_source=no]) CFLAGS="$cf_save_CFLAGS" @@ -6206,7 +6815,7 @@ AC_TRY_COMPILE([#include <stdio.h>],[ ]) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_PREDEFINE version: 2 updated: 2010/05/26 16:44:57 +dnl CF_PREDEFINE version: 3 updated: 2023/02/18 17:41:25 dnl ------------ dnl Add definitions to CPPFLAGS to ensure they're predefined for all compiles. dnl @@ -6218,7 +6827,7 @@ AC_MSG_CHECKING(if we must define $1) AC_TRY_COMPILE([#include <sys/types.h> ],[ #ifndef $1 -make an error +#error $1 is not defined #endif],[cf_result=no],[cf_result=yes]) AC_MSG_RESULT($cf_result) @@ -6229,7 +6838,7 @@ elif test "x$2" != "x" ; then AC_TRY_COMPILE([#include <sys/types.h> ],[ #if $1-$2 < 0 -make an error +#error $1-$2 is negative #endif],[cf_result=yes],[cf_result=no]) AC_MSG_RESULT($cf_result) if test "$cf_result" = no ; then @@ -6480,7 +7089,7 @@ fi AC_SUBST(LDCONFIG) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_PROG_LINT version: 4 updated: 2019/11/20 18:55:37 +dnl CF_PROG_LINT version: 5 updated: 2022/08/20 15:44:13 dnl ------------ AC_DEFUN([CF_PROG_LINT], [ @@ -6491,6 +7100,7 @@ case "x$LINT" in ;; esac AC_SUBST(LINT_OPTS) +AC_SUBST(LINT_LIBS) ])dnl dnl --------------------------------------------------------------------------- dnl CF_PROG_LN_S version: 2 updated: 2010/08/14 18:25:37 @@ -6611,6 +7221,24 @@ case "$cf_cv_regex_hdrs" in esac ])dnl dnl --------------------------------------------------------------------------- +dnl CF_REMOVE_CFLAGS version: 3 updated: 2021/09/05 17:25:40 +dnl ---------------- +dnl Remove a given option from CFLAGS/CPPFLAGS +dnl $1 = option to remove +dnl $2 = variable to update +dnl $3 = nonempty to allow verbose message +define([CF_REMOVE_CFLAGS], +[ +cf_tmp_cflag=`echo "x$1" | sed -e 's/^.//' -e 's/=.*//'` +while true +do + cf_old_cflag=`echo "x[$]$2" | sed -e 's/^.//' -e 's/[[ ]][[ ]]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[[^ ]][[^ ]]*\\)\?%%" -e 's/^[[ ]]*//' -e 's%[[ ]][[ ]]*-D% -D%g' -e 's%[[ ]][[ ]]*-I% -I%g'` + test "[$]$2" != "$cf_old_cflag" || break + ifelse([$3],,,[CF_VERBOSE(removing old option $1 from $2)]) + $2="$cf_old_cflag" +done +])dnl +dnl --------------------------------------------------------------------------- dnl CF_REMOVE_DEFINE version: 3 updated: 2010/01/09 11:05:50 dnl ---------------- dnl Remove all -U and -D options that refer to the given symbol from a list @@ -6795,7 +7423,7 @@ do done ])dnl dnl --------------------------------------------------------------------------- -dnl CF_SHARED_OPTS version: 105 updated: 2021/01/02 17:09:14 +dnl CF_SHARED_OPTS version: 111 updated: 2024/03/29 20:08:49 dnl -------------- dnl -------------- dnl Attempt to determine the appropriate CC/LD options for creating a shared @@ -6819,7 +7447,7 @@ dnl The variable 'cf_cv_shlib_version_infix' controls whether shared library dnl version numbers are infix (ex: libncurses.<ver>.dylib) or postfix dnl (ex: libncurses.so.<ver>). dnl -dnl Some loaders leave 'so_locations' lying around. It's nice to clean up. +dnl Some loaders leave 'so_locations' lying around. It is nice to clean up. AC_DEFUN([CF_SHARED_OPTS], [ AC_REQUIRE([CF_LD_RPATH_OPT]) @@ -6841,9 +7469,9 @@ AC_DEFUN([CF_SHARED_OPTS], cf_ld_rpath_opt= test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT" - AC_MSG_CHECKING(if release/abi version should be used for shared libs) + AC_MSG_CHECKING(whether to use release or ABI version in shared library file names) AC_ARG_WITH(shlib-version, - [ --with-shlib-version=X Specify rel or abi version for shared libs], + [[ --with-shlib-version[={rel|abi}] use release or ABI version in shared library file names]], [test -z "$withval" && withval=auto case "$withval" in (yes) @@ -6885,7 +7513,7 @@ AC_DEFUN([CF_SHARED_OPTS], for CC_SHARED_OPTS in -fPIC -fpic '' do CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS" - AC_TRY_COMPILE([#include <stdio.h>],[int x = 1],[break],[]) + AC_TRY_COMPILE([#include <stdio.h>],[int x = 1; (void)x],[break],[]) done AC_MSG_RESULT($CC_SHARED_OPTS) CFLAGS="$cf_save_CFLAGS" @@ -6966,6 +7594,10 @@ CF_EOF LDFLAGS="$LDFLAGS -Wl,-search_paths_first" fi ;; + (haiku*) + CF_SHARED_SONAME + MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $[@]' + ;; (hpux[[7-8]]*) # HP-UX 8.07 ld lacks "+b" option used for libdir search-list if test "$GCC" != yes; then @@ -7251,11 +7883,11 @@ CF_EOF # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3 if test "$DFT_LWR_MODEL" = "shared" ; then - LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}" + LOCAL_LDFLAGS="-R\$(LOCAL_LIBDIR):\${libdir}" LOCAL_LDFLAGS2="$LOCAL_LDFLAGS" fi if test "$cf_cv_enable_rpath" = yes ; then - EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS" + EXTRA_LDFLAGS="-R\${libdir} $EXTRA_LDFLAGS" fi CF_SHARED_SONAME if test "$GCC" != yes; then @@ -7267,9 +7899,9 @@ CF_EOF done CFLAGS="$cf_save_CFLAGS" CC_SHARED_OPTS=$cf_shared_opts - MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $[@]' + MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -Wl,-h,'$cf_cv_shared_soname' -o $[@]' else - MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $[@]' + MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -Wl,-h,'$cf_cv_shared_soname' -o $[@]' fi ;; (sysv5uw7*|unix_sv*) @@ -7370,7 +8002,7 @@ define([CF_SHARED_SONAME], fi ]) dnl --------------------------------------------------------------------------- -dnl CF_SIGWINCH version: 6 updated: 2021/01/01 13:31:04 +dnl CF_SIGWINCH version: 7 updated: 2023/02/18 17:41:25 dnl ----------- dnl Use this macro after CF_XOPEN_SOURCE, but do not require it (not all dnl programs need this test). @@ -7413,7 +8045,7 @@ do #include <sys/signal.h> ],[ #if SIGWINCH != $cf_sigwinch -make an error +#error SIGWINCH is not $cf_sigwinch #endif int x = SIGWINCH; (void)x], [cf_cv_fixup_sigwinch=$cf_sigwinch @@ -7465,7 +8097,7 @@ AC_MSG_RESULT($cf_cv_sig_atomic_t) test "$cf_cv_sig_atomic_t" != no && AC_DEFINE_UNQUOTED(SIG_ATOMIC_T, $cf_cv_sig_atomic_t,[Define to signal global datatype]) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_SIZECHANGE version: 17 updated: 2021/01/01 13:31:04 +dnl CF_SIZECHANGE version: 18 updated: 2021/09/04 06:35:04 dnl ------------- dnl Check for definitions & structures needed for window size-changing dnl @@ -7496,7 +8128,7 @@ do #ifdef NEED_PTEM_H /* This is a workaround for SCO: they neglected to define struct winsize in - * termios.h -- it's only in termio.h and ptem.h + * termios.h -- it is only in termio.h and ptem.h */ #include <sys/stream.h> #include <sys/ptem.h> @@ -7545,7 +8177,7 @@ if test "$cf_cv_sizechange" != no ; then fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_SRC_MODULES version: 33 updated: 2021/01/01 13:31:04 +dnl CF_SRC_MODULES version: 34 updated: 2023/04/22 11:51:06 dnl -------------- dnl For each parameter, test if the source-directory exists, and if it contains dnl a 'modules' file. If so, add to the list $cf_cv_src_modules which we'll @@ -7575,14 +8207,6 @@ for cf_dir in $1 do if test -f "$srcdir/$cf_dir/modules" ; then - # We may/may not have tack in the distribution, though the - # makefile is. - if test "$cf_dir" = tack ; then - if test "x$cf_with_tack" != "xyes"; then - continue - fi - fi - if test -z "$cf_cv_src_modules"; then cf_cv_src_modules=$cf_dir else @@ -7593,9 +8217,7 @@ do # well. These are header files that are the same name as their # directory. Ncurses is the only library that does not follow # that pattern. - if test "$cf_dir" = tack ; then - continue - elif test -f "$srcdir/${cf_dir}/${cf_dir}.h" ; then + if test -f "$srcdir/${cf_dir}/${cf_dir}.h" ; then CF_UPPER(cf_have_include,$cf_dir) AC_DEFINE_UNQUOTED(HAVE_${cf_have_include}_H) AC_DEFINE_UNQUOTED(HAVE_LIB${cf_have_include}) @@ -7730,7 +8352,7 @@ dnl Remove "-g" option from the compiler options AC_DEFUN([CF_STRIP_G_OPT], [$1=`echo "${$1}" | CF__SED_TRIMBLANKS(-e 's%-g %%' -e 's%-g$%%')`])dnl dnl --------------------------------------------------------------------------- -dnl CF_STRUCT_SIGACTION version: 5 updated: 2012/10/06 17:56:13 +dnl CF_STRUCT_SIGACTION version: 6 updated: 2023/12/03 09:21:34 dnl ------------------- dnl Check if we need _POSIX_SOURCE defined to use struct sigaction. We'll only dnl do this if we've found the sigaction function. @@ -7742,14 +8364,14 @@ AC_MSG_CHECKING(whether sigaction needs _POSIX_SOURCE) AC_TRY_COMPILE([ #include <sys/types.h> #include <signal.h>], - [struct sigaction act], + [struct sigaction act; (void)act], [sigact_bad=no], [ AC_TRY_COMPILE([ #define _POSIX_SOURCE #include <sys/types.h> #include <signal.h>], - [struct sigaction act], + [struct sigaction act; (void)act], [sigact_bad=yes AC_DEFINE(_POSIX_SOURCE,1,[Define to 1 if we must define _POSIX_SOURCE])], [sigact_bad=unknown])]) @@ -7757,7 +8379,7 @@ AC_MSG_RESULT($sigact_bad) fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_STRUCT_TERMIOS version: 11 updated: 2020/03/19 20:46:13 +dnl CF_STRUCT_TERMIOS version: 13 updated: 2023/12/03 19:38:54 dnl ----------------- dnl Some machines require _POSIX_SOURCE to completely define struct termios. AC_DEFUN([CF_STRUCT_TERMIOS],[ @@ -7780,12 +8402,12 @@ if test "$ac_cv_header_termios_h" = yes ; then if test "$termios_bad" = maybe ; then AC_MSG_CHECKING(whether termios.h needs _POSIX_SOURCE) AC_TRY_COMPILE([#include <termios.h>], - [struct termios foo; int x = foo.c_iflag = 1; (void)x], + [struct termios foo; int x = (int)(foo.c_iflag = 1); (void)x], termios_bad=no, [ AC_TRY_COMPILE([ #define _POSIX_SOURCE #include <termios.h>], - [struct termios foo; int x = foo.c_iflag = 2; (void)x], + [struct termios foo; int x = (int)(foo.c_iflag = 2); (void)x], termios_bad=unknown, termios_bad=yes AC_DEFINE(_POSIX_SOURCE,1,[Define to 1 if we must define _POSIX_SOURCE])) ]) @@ -7837,7 +8459,7 @@ fi AC_SUBST($2) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_SUBST_NCURSES_VERSION version: 10 updated: 2021/01/04 18:48:01 +dnl CF_SUBST_NCURSES_VERSION version: 11 updated: 2023/01/07 16:32:06 dnl ------------------------ dnl Get the version-number for use in shared-library naming, etc. AC_DEFUN([CF_SUBST_NCURSES_VERSION], @@ -7847,10 +8469,11 @@ NCURSES_MAJOR="`${EGREP-egrep} '^NCURSES_MAJOR[[ ]]*=' "$srcdir/dist.mk" | sed NCURSES_MINOR="`${EGREP-egrep} '^NCURSES_MINOR[[ ]]*=' "$srcdir/dist.mk" | sed -e 's/^[[^0-9]]*//'`" NCURSES_PATCH="`${EGREP-egrep} '^NCURSES_PATCH[[ ]]*=' "$srcdir/dist.mk" | sed -e 's/^[[^0-9]]*//'`" cf_cv_abi_version=${NCURSES_MAJOR} +cf_cv_abi_default=${NCURSES_MAJOR} cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR} dnl Show the computed version, for logging cf_cv_timestamp=`date` -AC_MSG_RESULT(Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)) +AC_MSG_RESULT(Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_default ($cf_cv_timestamp)) dnl We need these values in the generated headers AC_SUBST(NCURSES_MAJOR) AC_SUBST(NCURSES_MINOR) @@ -7858,6 +8481,7 @@ AC_SUBST(NCURSES_PATCH) dnl We need these values in the generated makefiles AC_SUBST(cf_cv_rel_version) AC_SUBST(cf_cv_abi_version) +AC_SUBST(cf_cv_abi_default) AC_SUBST(cf_cv_builtin_bool) AC_SUBST(cf_cv_header_stdbool_h) AC_SUBST(cf_cv_type_of_bool)dnl @@ -7922,34 +8546,20 @@ else fi ]) dnl --------------------------------------------------------------------------- -dnl CF_TRY_XOPEN_SOURCE version: 2 updated: 2018/06/20 20:23:13 +dnl CF_TRY_XOPEN_SOURCE version: 4 updated: 2022/09/10 15:16:16 dnl ------------------- dnl If _XOPEN_SOURCE is not defined in the compile environment, check if we dnl can define it successfully. AC_DEFUN([CF_TRY_XOPEN_SOURCE],[ AC_CACHE_CHECK(if we should define _XOPEN_SOURCE,cf_cv_xopen_source,[ - AC_TRY_COMPILE([ -#include <stdlib.h> -#include <string.h> -#include <sys/types.h> -],[ -#ifndef _XOPEN_SOURCE -make an error -#endif], + AC_TRY_COMPILE(CF__XOPEN_SOURCE_HEAD,CF__XOPEN_SOURCE_BODY, [cf_cv_xopen_source=no], [cf_save="$CPPFLAGS" CF_APPEND_TEXT(CPPFLAGS,-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE) - AC_TRY_COMPILE([ -#include <stdlib.h> -#include <string.h> -#include <sys/types.h> -],[ -#ifdef _XOPEN_SOURCE -make an error -#endif], - [cf_cv_xopen_source=no], - [cf_cv_xopen_source=$cf_XOPEN_SOURCE]) - CPPFLAGS="$cf_save" + AC_TRY_COMPILE(CF__XOPEN_SOURCE_HEAD,CF__XOPEN_SOURCE_BODY, + [cf_cv_xopen_source=no], + [cf_cv_xopen_source=$cf_XOPEN_SOURCE]) + CPPFLAGS="$cf_save" ]) ]) @@ -7957,11 +8567,11 @@ if test "$cf_cv_xopen_source" != no ; then CF_REMOVE_DEFINE(CFLAGS,$CFLAGS,_XOPEN_SOURCE) CF_REMOVE_DEFINE(CPPFLAGS,$CPPFLAGS,_XOPEN_SOURCE) cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source" - CF_ADD_CFLAGS($cf_temp_xopen_source) + CF_APPEND_CFLAGS($cf_temp_xopen_source) fi ]) dnl --------------------------------------------------------------------------- -dnl CF_TYPEOF_CHTYPE version: 10 updated: 2017/01/21 11:06:25 +dnl CF_TYPEOF_CHTYPE version: 11 updated: 2023/01/05 17:57:59 dnl ---------------- dnl Determine the type we should use for chtype (and attr_t, which is treated dnl as the same thing). We want around 32 bits, so on most machines want a @@ -7972,8 +8582,8 @@ AC_DEFUN([CF_TYPEOF_CHTYPE], AC_MSG_CHECKING([for type of chtype]) AC_CACHE_VAL(cf_cv_typeof_chtype,[ AC_TRY_RUN([ +$ac_includes_default #define WANT_BITS 31 -#include <stdio.h> int main(void) { FILE *fp = fopen("cf_test.out", "w"); @@ -8013,7 +8623,7 @@ AC_SUBST(cf_cv_typeof_chtype) AC_DEFINE_UNQUOTED(TYPEOF_CHTYPE,$cf_cv_typeof_chtype,[Define to actual type if needed for chtype]) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_TYPE_SIGACTION version: 4 updated: 2012/10/06 17:56:13 +dnl CF_TYPE_SIGACTION version: 5 updated: 2023/12/03 09:21:34 dnl ----------------- dnl AC_DEFUN([CF_TYPE_SIGACTION], @@ -8022,14 +8632,14 @@ AC_MSG_CHECKING([for type sigaction_t]) AC_CACHE_VAL(cf_cv_type_sigaction,[ AC_TRY_COMPILE([ #include <signal.h>], - [sigaction_t x], + [sigaction_t x; (void)x], [cf_cv_type_sigaction=yes], [cf_cv_type_sigaction=no])]) AC_MSG_RESULT($cf_cv_type_sigaction) test "$cf_cv_type_sigaction" = yes && AC_DEFINE(HAVE_TYPE_SIGACTION,1,[Define to 1 if we have the sigaction_t type]) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_UNSIGNED_LITERALS version: 2 updated: 1998/02/07 22:10:16 +dnl CF_UNSIGNED_LITERALS version: 3 updated: 2023/12/03 10:02:17 dnl -------------------- dnl Test if the compiler supports 'U' and 'L' suffixes. Only old compilers dnl won't, but they're still there. @@ -8037,7 +8647,7 @@ AC_DEFUN([CF_UNSIGNED_LITERALS], [ AC_MSG_CHECKING([if unsigned literals are legal]) AC_CACHE_VAL(cf_cv_unsigned_literals,[ - AC_TRY_COMPILE([],[long x = 1L + 1UL + 1U + 1], + AC_TRY_COMPILE([],[long x = 1L + 1UL + 1U + 1; (void)x], [cf_cv_unsigned_literals=yes], [cf_cv_unsigned_literals=no]) ]) @@ -8053,15 +8663,20 @@ AC_DEFUN([CF_UPPER], $1=`echo "$2" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%` ])dnl dnl --------------------------------------------------------------------------- -dnl CF_UTF8_LIB version: 8 updated: 2012/10/06 08:57:51 +dnl CF_UTF8_LIB version: 10 updated: 2023/01/11 04:05:23 dnl ----------- dnl Check for multibyte support, and if not found, utf8 compatibility library AC_DEFUN([CF_UTF8_LIB], [ +AC_HAVE_HEADERS(wchar.h) AC_CACHE_CHECK(for multibyte character support,cf_cv_utf8_lib,[ cf_save_LIBS="$LIBS" AC_TRY_LINK([ -#include <stdlib.h>],[putwc(0,0);], +$ac_includes_default +#ifdef HAVE_WCHAR_H +#include <wchar.h> +#endif +],[putwc(0,0);], [cf_cv_utf8_lib=yes], [CF_FIND_LINKAGE([ #include <libutf8.h>],[putwc(0,0);],utf8, @@ -8260,7 +8875,7 @@ ifelse($1,,,[ ]) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_WCHAR_TYPE version: 4 updated: 2012/10/06 16:39:58 +dnl CF_WCHAR_TYPE version: 5 updated: 2023/12/03 09:21:34 dnl ------------- dnl Check if type wide-character type $1 is declared, and if so, which header dnl file is needed. The second parameter is used to set a shell variable when @@ -8277,7 +8892,7 @@ AC_TRY_COMPILE([ #ifdef HAVE_LIBUTF8_H #include <libutf8.h> #endif], - [$1 state], + [$1 state; (void)state], [cf_cv_$1=no], [AC_TRY_COMPILE([ #include <stdlib.h> @@ -8287,7 +8902,7 @@ AC_TRY_COMPILE([ #ifdef HAVE_LIBUTF8_H #include <libutf8.h> #endif], - [$1 value], + [$1 value; (void) value], [cf_cv_$1=yes], [cf_cv_$1=unknown])])]) @@ -8336,7 +8951,25 @@ weak_symbol(fopen); ]) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_WITH_ABI_VERSION version: 4 updated: 2021/01/01 13:31:04 +dnl CF_WITH_ABI_ALTERED version: 1 updated: 2023/01/07 16:32:06 +dnl ------------------- +dnl Provide a way to override the displayed ABI version, e.g., in filenames. +dnl Check this option after using the ABI version in configuration decisions. +AC_DEFUN([CF_WITH_ABI_ALTERED],[ +AC_REQUIRE([CF_WITH_ABI_VERSION]) +AC_REQUIRE([CF_ABI_DEFAULTS]) +AC_ARG_WITH(abi-altered, +[ --with-abi-altered=XXX override visible ABI version, for packaging],[ + CF_NUMBER_SYNTAX($withval,ABI altered) + if test "$cf_cv_abi_version" != "$withval" + then + AC_MSG_WARN(altering visible ABI from $cf_cv_abi_version to $withval) + cf_cv_abi_version=$withval + fi +])dnl +])dnl +dnl --------------------------------------------------------------------------- +dnl CF_WITH_ABI_VERSION version: 5 updated: 2023/01/07 16:32:06 dnl ------------------- dnl Allow library's ABI to be overridden. Generally this happens when a dnl packager has incremented the ABI past that used in the original package, @@ -8365,28 +8998,29 @@ AC_ARG_WITH(abi-version, ifelse($1,,,[ $1_ABI=$cf_cv_abi_version ]) +cf_cv_abi_default=$cf_cv_abi_version ])dnl dnl --------------------------------------------------------------------------- -dnl CF_WITH_ADA_COMPILER version: 2 updated: 2010/06/26 17:35:58 +dnl CF_WITH_ADA_COMPILER version: 3 updated: 2023/10/28 11:59:01 dnl -------------------- dnl Command-line option to specify the Ada95 compiler. AC_DEFUN([CF_WITH_ADA_COMPILER],[ -AC_MSG_CHECKING(for ada-compiler) +AC_MSG_CHECKING(for Ada95 compiler) AC_ARG_WITH(ada-compiler, - [ --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)], + [[ --with-ada-compiler[=CMD] use CMD as Ada95 compiler (default: gnatmake)]], [cf_ada_compiler=$withval], [cf_ada_compiler=gnatmake]) AC_SUBST(cf_ada_compiler) AC_MSG_RESULT($cf_ada_compiler) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_WITH_ADA_INCLUDE version: 2 updated: 2010/06/26 17:35:58 +dnl CF_WITH_ADA_INCLUDE version: 3 updated: 2023/10/28 11:59:01 dnl ------------------- dnl Command-line option to specify where Ada includes will install. AC_DEFUN([CF_WITH_ADA_INCLUDE],[ -AC_MSG_CHECKING(for ada-include) +AC_MSG_CHECKING(for Ada95 include directory) CF_WITH_PATH(ada-include, - [ --with-ada-include=DIR Ada includes are in DIR], + [ --with-ada-include=DIR find Ada95 includes in DIR], ADA_INCLUDE, PREFIX/share/ada/adainclude, [$]prefix/share/ada/adainclude) @@ -8394,16 +9028,16 @@ AC_SUBST(ADA_INCLUDE) AC_MSG_RESULT($ADA_INCLUDE) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_WITH_ADA_LIBNAME version: 1 updated: 2019/09/07 18:59:41 +dnl CF_WITH_ADA_LIBNAME version: 3 updated: 2023/11/22 20:48:30 dnl ------------------- dnl CF_WITH_ADA_LIBNAME dnl ------------------- dnl Command-line option to specify how to name the resulting Ada library. dnl $1 = default value AC_DEFUN([CF_WITH_ADA_LIBNAME],[ -AC_MSG_CHECKING(for ada-libname) +AC_MSG_CHECKING(for Ada95 curses library name) AC_ARG_WITH(ada-libname, - [ --with-ada-libname=XXX override default Ada library-name], + [[ --with-ada-libname[=XXX] use XXX as Ada95 library name]], ADA_LIBNAME=[$]withval, ADA_LIBNAME=$1) case "x$ADA_LIBNAME" in @@ -8415,13 +9049,13 @@ AC_SUBST(ADA_LIBNAME) AC_MSG_RESULT($ADA_LIBNAME) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_WITH_ADA_OBJECTS version: 2 updated: 2010/06/26 17:35:58 +dnl CF_WITH_ADA_OBJECTS version: 3 updated: 2023/10/28 11:59:01 dnl ------------------- dnl Command-line option to specify where Ada objects will install. AC_DEFUN([CF_WITH_ADA_OBJECTS],[ -AC_MSG_CHECKING(for ada-objects) +AC_MSG_CHECKING(for Ada95 object directory) CF_WITH_PATH(ada-objects, - [ --with-ada-objects=DIR Ada objects are in DIR], + [ --with-ada-objects=DIR find Ada95 objects in DIR], ADA_OBJECTS, PREFIX/lib/ada/adalib, [$]prefix/lib/ada/adalib) @@ -8429,28 +9063,34 @@ AC_SUBST(ADA_OBJECTS) AC_MSG_RESULT($ADA_OBJECTS) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_WITH_ADA_SHAREDLIB version: 5 updated: 2018/07/21 19:10:35 +dnl CF_WITH_ADA_SHAREDLIB version: 6 updated: 2023/10/28 11:59:01 dnl --------------------- -dnl Command-line option to specify if an Ada95 shared-library should be built, +dnl Command-line option to specify if an Ada95 shared library should be built, dnl and optionally what its soname should be. AC_DEFUN([CF_WITH_ADA_SHAREDLIB],[ AC_REQUIRE([CF_GNAT_PROJECTS]) -AC_MSG_CHECKING(if an Ada95 shared-library should be built) +AC_MSG_CHECKING(whether to build an Ada95 shared library) AC_ARG_WITH(ada-sharedlib, - [ --with-ada-sharedlib=soname build shared-library (requires GNAT projects)], + [ --with-ada-sharedlib build Ada95 shared library; requires GNAT project support], [with_ada_sharedlib=$withval], [with_ada_sharedlib=no]) -AC_MSG_RESULT($with_ada_sharedlib) +cf_ada_sharedlib_warn=no if test "x$with_ada_sharedlib" != xno then if test "x$cf_gnat_projects" != xyes then - AC_MSG_WARN(disabling shared-library since GNAT projects are not supported) with_ada_sharedlib=no + cf_ada_sharedlib_warn=yes fi fi +AC_MSG_RESULT($with_ada_sharedlib) +if test "x$cf_ada_sharedlib_warn" != xno +then + AC_MSG_WARN(disabling Ada95 shared library since GNAT projects are not supported) +fi + ADA_SHAREDLIB='lib$(LIB_NAME).so.1' MAKE_ADA_SHAREDLIB="#" @@ -8497,7 +9137,7 @@ if test "$with_dmalloc" = yes ; then fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_WITH_EXPORT_SYMS version: 3 updated: 2014/12/20 19:16:08 +dnl CF_WITH_EXPORT_SYMS version: 5 updated: 2023/11/22 20:48:30 dnl ------------------- dnl Use this with libtool to specify the list of symbols that may be exported. dnl The input file contains one symbol per line; comments work with "#". @@ -8507,7 +9147,7 @@ AC_DEFUN([CF_WITH_EXPORT_SYMS], [ AC_MSG_CHECKING(if exported-symbols file should be used) AC_ARG_WITH(export-syms, - [ --with-export-syms=XXX limit exported symbols using libtool], + [[ --with-export-syms[=SYM-FILE] limit symbols exported by libtool to those listed in SYM-FILE]], [with_export_syms=$withval], [with_export_syms=no]) if test "x$with_export_syms" = xyes @@ -8699,7 +9339,7 @@ AC_SUBST(LIB_UNINSTALL) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_WITH_LIBTOOL_OPTS version: 4 updated: 2015/04/17 21:13:04 +dnl CF_WITH_LIBTOOL_OPTS version: 6 updated: 2023/11/22 20:48:30 dnl -------------------- dnl Allow user to pass additional libtool options into the library creation dnl and link steps. The main use for this is to do something like @@ -8709,7 +9349,7 @@ dnl ./configure --enable-static AC_DEFUN([CF_WITH_LIBTOOL_OPTS],[ AC_MSG_CHECKING(for additional libtool options) AC_ARG_WITH(libtool-opts, - [ --with-libtool-opts=XXX specify additional libtool options], + [[ --with-libtool-opts[=XXX] give libtool additional options XXX]], [with_libtool_opts=$withval], [with_libtool_opts=no]) AC_MSG_RESULT($with_libtool_opts) @@ -8725,7 +9365,7 @@ esac AC_SUBST(LIBTOOL_OPTS) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_WITH_LIB_BASENAME version: 1 updated: 2020/03/07 20:05:14 +dnl CF_WITH_LIB_BASENAME version: 2 updated: 2023/11/22 20:48:30 dnl -------------------- dnl Allow for overriding the basename of a library, i.e., the part to which dnl prefixes/suffixes are attached. @@ -8737,7 +9377,7 @@ AC_DEFUN([CF_WITH_LIB_BASENAME], [ AC_MSG_CHECKING(for desired basename for $2 library) AC_ARG_WITH($2-libname, - [ --with-$2-libname=XXX override ifelse($3,,$2,$3) basename of library], + [[ --with-$2-libname[=XXX] override ifelse($3,,$2,$3) basename of library]], [with_lib_basename=$withval], [with_lib_basename=ifelse($3,,$2,$3)]) $1="$with_lib_basename" @@ -8780,7 +9420,7 @@ else fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_WITH_PATH version: 11 updated: 2012/09/29 15:04:19 +dnl CF_WITH_PATH version: 12 updated: 2021/09/04 06:35:04 dnl ------------ dnl Wrapper for AC_ARG_WITH to ensure that user supplies a pathname, not just dnl defaulting to yes/no. @@ -8789,7 +9429,7 @@ dnl $1 = option name dnl $2 = help-text dnl $3 = environment variable to set dnl $4 = default value, shown in the help-message, must be a constant -dnl $5 = default value, if it's an expression & cannot be in the help-message +dnl $5 = default value, if it is an expression & cannot be in the help-message dnl AC_DEFUN([CF_WITH_PATH], [AC_ARG_WITH($1,[$2 ](default: ifelse([$4],,empty,[$4])),, @@ -8801,7 +9441,7 @@ eval $3="$withval" AC_SUBST($3)dnl ])dnl dnl --------------------------------------------------------------------------- -dnl CF_WITH_PATHLIST version: 12 updated: 2021/01/01 13:31:04 +dnl CF_WITH_PATHLIST version: 13 updated: 2021/09/04 06:35:04 dnl ---------------- dnl Process an option specifying a list of colon-separated paths. dnl @@ -8809,7 +9449,7 @@ dnl $1 = option name dnl $2 = help-text dnl $3 = environment variable to set dnl $4 = default value, shown in the help-message, must be a constant -dnl $5 = default value, if it's an expression & cannot be in the help-message +dnl $5 = default value, if it is an expression & cannot be in the help-message dnl $6 = flag to tell if we want to define or substitute dnl AC_DEFUN([CF_WITH_PATHLIST],[ @@ -8879,7 +9519,7 @@ AC_ARG_WITH($2-path, ]) ]) dnl --------------------------------------------------------------------------- -dnl CF_WITH_PCRE2 version: 5 updated: 2021/01/26 18:45:12 +dnl CF_WITH_PCRE2 version: 6 updated: 2021/08/11 20:35:34 dnl ------------- dnl Add PCRE2 (Perl-compatible regular expressions v2) to the build if it is dnl available and the user requests it. Assume the application will otherwise @@ -8921,12 +9561,23 @@ if test "x$with_pcre2" != xno ; then # either way, check for the library header files AC_CHECK_HEADERS(pcre2posix.h pcreposix.h) + AC_CHECK_FUNCS(PCRE2regcomp) fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_WITH_PKG_CONFIG_LIBDIR version: 11 updated: 2021/01/01 16:16:30 +dnl CF_WITH_PKG_CONFIG_LIBDIR version: 23 updated: 2023/11/22 20:48:30 dnl ------------------------- dnl Allow the choice of the pkg-config library directory to be overridden. +dnl +dnl pkg-config uses a search-list built from these colon-separated lists of +dnl directories: +dnl a) $PKG_CONFIG_PATH (tested first, added if set) +dnl b) $PKG_CONFIG_LIBDIR (tested second, added if set) +dnl c) builtin-list (added if $PKG_CONFIG_LIBDIR is not set) +dnl +dnl pkgconf (used with some systems such as FreeBSD in place of pkg-config) +dnl optionally ignores $PKG_CONFIG_LIBDIR. Very old versions of pkg-config, +dnl e.g., Solaris 10 also do not recognize $PKG_CONFIG_LIBDIR. AC_DEFUN([CF_WITH_PKG_CONFIG_LIBDIR],[ case "$PKG_CONFIG" in @@ -8938,68 +9589,119 @@ case "$PKG_CONFIG" in ;; esac -PKG_CONFIG_LIBDIR=no +# if $PKG_CONFIG_LIBDIR is set, try to use that +if test -n "$PKG_CONFIG_PATH"; then + cf_search_path=`echo "$PKG_CONFIG_PATH" | sed -e 's/:/ /g' -e 's,^[[ ]]*,,' -e 's,[[ ]]*$,,'` +elif test -n "$PKG_CONFIG_LIBDIR"; then + cf_search_path=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/:/ /g' -e 's,^[[ ]]*,,' -e 's,[[ ]]*$,,'` +else + cf_search_path=auto +fi + +# if the option is used, let that override. otherwise default to "libdir" AC_ARG_WITH(pkg-config-libdir, - [ --with-pkg-config-libdir=XXX use given directory for installing pc-files], - [PKG_CONFIG_LIBDIR=$withval], - [test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes]) + [[ --with-pkg-config-libdir[=XXX] use given directory for installing pc-files]], + [cf_search_path=$withval], + [test "x$PKG_CONFIG" != xnone && test -z "$cf_search_path" && cf_search_path=libdir]) -case x$PKG_CONFIG_LIBDIR in +case "x$cf_search_path" in +(xlibdir) + PKG_CONFIG_LIBDIR='${libdir}/pkgconfig' + AC_MSG_RESULT($PKG_CONFIG_LIBDIR) + cf_search_path= + ;; +(x) + ;; +(x/*\ *) + PKG_CONFIG_LIBDIR= + ;; (x/*) + PKG_CONFIG_LIBDIR="$cf_search_path" + AC_MSG_RESULT($PKG_CONFIG_LIBDIR) + cf_search_path= ;; -(xyes) +(xyes|xauto) + AC_MSG_RESULT(auto) + cf_search_path= # Look for the library directory using the same prefix as the executable - if test "x$PKG_CONFIG" = xnone + AC_MSG_CHECKING(for search-list) + if test "x$PKG_CONFIG" != xnone then - cf_path=$prefix - else - cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[[^/]]*/[[^/]]*$,,'` + # works for pkg-config since version 0.24 (2009) + # works for pkgconf since version 0.8.3 (2012) + for cf_pkg_program in \ + `echo "$PKG_CONFIG" | sed -e 's,^.*/,,'` \ + pkg-config \ + pkgconf + do + cf_search_path=`"$PKG_CONFIG" --variable=pc_path "$cf_pkg_program" 2>/dev/null | tr : ' '` + test -n "$cf_search_path" && break + done + + # works for pkg-config since import in 2005 of original 2001 HP code. + test -z "$cf_search_path" && \ + cf_search_path=` + "$PKG_CONFIG" --debug --exists no-such-package 2>&1 | $AWK "\ +/^Scanning directory (#[1-9][0-9]* )?'.*'$/{ \ + sub(\"^[[^']]*'\",\"\"); \ + sub(\"'.*\",\"\"); \ + printf \" %s\", \\[$]0; } \ +{ next; } \ +"` fi - # If you don't like using the default architecture, you have to specify the - # intended library directory and corresponding compiler/linker options. - # - # This case allows for Debian's 2014-flavor of multiarch, along with the - # most common variations before that point. Some other variants spell the - # directory differently, e.g., "pkg-config", and put it in unusual places. - # pkg-config has always been poorly standardized, which is ironic... - case x`(arch) 2>/dev/null` in - (*64) - cf_search_path="\ - $cf_path/lib/*64-linux-gnu \ - $cf_path/share \ - $cf_path/lib64 \ - $cf_path/lib32 \ - $cf_path/lib" - ;; - (*) - cf_search_path="\ - $cf_path/lib/*-linux-gnu \ - $cf_path/share \ - $cf_path/lib32 \ - $cf_path/lib \ - $cf_path/libdata" - ;; - esac + AC_MSG_RESULT($cf_search_path) + ;; +(*) + AC_MSG_ERROR(Unexpected option value: $cf_search_path) + ;; +esac - CF_VERBOSE(list...) +if test -n "$cf_search_path" +then + AC_MSG_CHECKING(for first directory) + cf_pkg_config_path=none for cf_config in $cf_search_path do - CF_VERBOSE(checking $cf_config/pkgconfig) - if test -d "$cf_config/pkgconfig" + if test -d "$cf_config" then - PKG_CONFIG_LIBDIR=$cf_config/pkgconfig - AC_MSG_CHECKING(done) + cf_pkg_config_path=$cf_config break fi done - ;; -(*) - ;; -esac + AC_MSG_RESULT($cf_pkg_config_path) -if test "x$PKG_CONFIG_LIBDIR" != xno ; then - AC_MSG_RESULT($PKG_CONFIG_LIBDIR) + if test "x$cf_pkg_config_path" != xnone ; then + # limit this to the first directory found + PKG_CONFIG_LIBDIR="$cf_pkg_config_path" + fi + + if test -z "$PKG_CONFIG_LIBDIR" && test -n "$cf_search_path" + then + AC_MSG_CHECKING(for workaround) + if test "$prefix" = "NONE" ; then + cf_prefix="$ac_default_prefix" + else + cf_prefix="$prefix" + fi + eval cf_libdir=$libdir + cf_libdir=`echo "$cf_libdir" | sed -e "s,^NONE,$cf_prefix,"` + cf_backup= + for cf_config in $cf_search_path + do + case $cf_config in + $cf_libdir/pkgconfig) + PKG_CONFIG_LIBDIR=$cf_libdir/pkgconfig + break + ;; + *) + test -z "$cf_backup" && cf_backup=$cf_config + ;; + esac + done + test -z "$PKG_CONFIG_LIBDIR" && PKG_CONFIG_LIBDIR=$cf_backup + AC_MSG_RESULT($PKG_CONFIG_LIBDIR) + fi fi AC_SUBST(PKG_CONFIG_LIBDIR) @@ -9047,7 +9749,7 @@ if test "$with_pthread" != no ; then fi ]) dnl --------------------------------------------------------------------------- -dnl CF_WITH_REL_VERSION version: 1 updated: 2003/09/20 18:12:49 +dnl CF_WITH_REL_VERSION version: 2 updated: 2023/05/06 18:18:18 dnl ------------------- dnl Allow library's release-version to be overridden. Generally this happens when a dnl packager has incremented the release-version past that used in the original package, @@ -9067,6 +9769,7 @@ ifelse($1,,[ ],[ $1_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'` $1_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[[^.]]*//' -e 's/^\.//' -e 's/\..*//'` + test -n "$1_MINOR" || $1_MINOR=0 CF_NUMBER_SYNTAX([$]$1_MAJOR,Release major-version) CF_NUMBER_SYNTAX([$]$1_MINOR,Release minor-version) ]) @@ -9122,6 +9825,27 @@ AC_ARG_WITH(system-type, ]) ])dnl dnl --------------------------------------------------------------------------- +dnl CF_WITH_TYPE version: 2 updated: 2023/11/25 16:11:47 +dnl ------------ +dnl Accept a TYPE for substitution: +dnl $1 = name of type +dnl $2 = help/usage message +dnl $3 = symbol to set +dnl $4 = default value +AC_DEFUN([CF_WITH_TYPE],[ +AC_MSG_CHECKING(for type of $1) +AC_ARG_WITH([$1], [$2], + [$3="$withval"], + [$3=$4]) +AC_MSG_RESULT([$]$3) +case x[$]$3 in +(x|xyes|xno) + AC_MSG_ERROR(expected a type name for $1) + ;; +esac +AC_SUBST($3) +])dnl +dnl --------------------------------------------------------------------------- dnl CF_WITH_VALGRIND version: 1 updated: 2006/12/14 18:00:21 dnl ---------------- AC_DEFUN([CF_WITH_VALGRIND],[ @@ -9130,7 +9854,7 @@ CF_NO_LEAKS_OPTION(valgrind, [USE_VALGRIND]) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_WITH_VERSIONED_SYMS version: 10 updated: 2021/01/04 18:48:01 +dnl CF_WITH_VERSIONED_SYMS version: 13 updated: 2023/12/03 09:24:04 dnl ---------------------- dnl Use this when building shared library with ELF, to markup symbols with the dnl version identifier from the given input file. Generally that identifier is @@ -9143,7 +9867,7 @@ AC_REQUIRE([AC_PROG_EGREP])dnl AC_MSG_CHECKING(if versioned-symbols file should be used) AC_ARG_WITH(versioned-syms, - [ --with-versioned-syms=X markup versioned symbols using ld], + [[ --with-versioned-syms[=MAP-FILE] version ELF shared library symbols per MAP-FILE]], [with_versioned_syms=$withval], [with_versioned_syms=no]) case "x$with_versioned_syms" in @@ -9230,15 +9954,15 @@ local: EOF cat >conftest.$ac_ext <<EOF #line __oline__ "configure" -int _ismissing(void) { return 1; } -int _localf1(void) { return 1; } -int _localf2(void) { return 2; } -int globalf1(void) { return 1; } -int globalf2(void) { return 2; } -int _sublocalf1(void) { return 1; } -int _sublocalf2(void) { return 2; } -int subglobalf1(void) { return 1; } -int subglobalf2(void) { return 2; } +extern int _ismissing(void); int _ismissing(void) { return 1; } +extern int _localf1(void); int _localf1(void) { return 1; } +extern int _localf2(void); int _localf2(void) { return 2; } +extern int globalf1(void); int globalf1(void) { return 1; } +extern int globalf2(void); int globalf2(void) { return 2; } +extern int _sublocalf1(void); int _sublocalf1(void) { return 1; } +extern int _sublocalf2(void); int _sublocalf2(void) { return 2; } +extern int subglobalf1(void); int subglobalf1(void) { return 1; } +extern int subglobalf2(void); int subglobalf2(void) { return 2; } EOF cat >conftest.mk <<EOF CC=${CC} @@ -9269,7 +9993,7 @@ AC_SUBST(VERSIONED_SYMS) AC_SUBST(WILDCARD_SYMS) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_WITH_X11_RGB version: 2 updated: 2019/12/31 08:53:54 +dnl CF_WITH_X11_RGB version: 3 updated: 2023/10/28 11:59:01 dnl --------------- dnl Handle configure option "--with-x11-rgb", setting these shell dnl variables: @@ -9309,7 +10033,7 @@ dnl /usr/X11/lib/X11/rgb.txt AC_DEFUN([CF_WITH_X11_RGB],[ AC_MSG_CHECKING(for X11 rgb file) AC_ARG_WITH(x11-rgb, - [ --with-x11-rgb=FILE file containing X11 rgb information (EPREFIX/lib/X11/rgb.txt)], + [ --with-x11-rgb=FILE obtain X11 color definitions from FILE (default: EPREFIX/lib/X11/rgb.txt)], [RGB_PATH=$withval], [RGB_PATH=auto]) @@ -9355,7 +10079,7 @@ fi AC_SUBST(no_x11_rgb) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_XOPEN_SOURCE version: 57 updated: 2021/01/01 16:53:59 +dnl CF_XOPEN_SOURCE version: 67 updated: 2023/09/06 18:55:27 dnl --------------- dnl Try to get _XOPEN_SOURCE defined properly that we can use POSIX functions, dnl or adapt to the vendor's definitions to get equivalent functionality, @@ -9364,6 +10088,18 @@ dnl dnl Parameters: dnl $1 is the nominal value for _XOPEN_SOURCE dnl $2 is the nominal value for _POSIX_C_SOURCE +dnl +dnl The default case prefers _XOPEN_SOURCE over _POSIX_C_SOURCE if the +dnl implementation predefines it, because X/Open and most implementations agree +dnl that the latter is a legacy or "aligned" value. +dnl +dnl Because _XOPEN_SOURCE is preferred, if defining _POSIX_C_SOURCE turns +dnl that off, then refrain from setting _POSIX_C_SOURCE explicitly. +dnl +dnl References: +dnl https://pubs.opengroup.org/onlinepubs/007904975/functions/xsh_chap02_02.html +dnl https://docs.oracle.com/cd/E19253-01/816-5175/standards-5/index.html +dnl https://www.gnu.org/software/libc/manual/html_node/Feature-Test-Macros.html AC_DEFUN([CF_XOPEN_SOURCE],[ AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([CF_POSIX_VISIBLE]) @@ -9378,9 +10114,6 @@ case "$host_os" in (aix[[4-7]]*) cf_xopen_source="-D_ALL_SOURCE" ;; -(msys) - cf_XOPEN_SOURCE=600 - ;; (darwin[[0-8]].*) cf_xopen_source="-D_APPLE_C_SOURCE" ;; @@ -9406,7 +10139,7 @@ case "$host_os" in cf_xopen_source="-D_SGI_SOURCE" cf_XOPEN_SOURCE= ;; -(linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin) +(linux*gnu|linux*gnuabi64|linux*gnuabin32|linux*gnueabi|linux*gnueabihf|linux*gnux32|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin|msys|mingw*|linux*uclibc) CF_GNU_SOURCE($cf_XOPEN_SOURCE) ;; (minix*) @@ -9420,7 +10153,15 @@ case "$host_os" in (netbsd*) cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw ;; -(openbsd[[4-9]]*) +(openbsd[[6-9]]*) + # OpenBSD 6.x has broken locale support, both compile-time and runtime. + # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html + # Abusing the conformance level is a workaround. + AC_MSG_WARN(this system does not provide usable locale support) + cf_xopen_source="-D_BSD_SOURCE" + cf_XOPEN_SOURCE=700 + ;; +(openbsd[[4-5]]*) # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw cf_xopen_source="-D_BSD_SOURCE" cf_XOPEN_SOURCE=600 @@ -9447,12 +10188,20 @@ case "$host_os" in ;; (*) CF_TRY_XOPEN_SOURCE + cf_save_xopen_cppflags="$CPPFLAGS" CF_POSIX_C_SOURCE($cf_POSIX_C_SOURCE) + # Some of these niche implementations use copy/paste, double-check... + if test "$cf_cv_xopen_source" = no ; then + CF_VERBOSE(checking if _POSIX_C_SOURCE interferes with _XOPEN_SOURCE) + AC_TRY_COMPILE(CF__XOPEN_SOURCE_HEAD,CF__XOPEN_SOURCE_BODY,,[ + AC_MSG_WARN(_POSIX_C_SOURCE definition is not usable) + CPPFLAGS="$cf_save_xopen_cppflags"]) + fi ;; esac if test -n "$cf_xopen_source" ; then - CF_ADD_CFLAGS($cf_xopen_source,true) + CF_APPEND_CFLAGS($cf_xopen_source,true) fi dnl In anything but the default case, we may have system-specific setting @@ -9462,7 +10211,7 @@ if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then AC_MSG_CHECKING(if _XOPEN_SOURCE really is set) AC_TRY_COMPILE([#include <stdlib.h>],[ #ifndef _XOPEN_SOURCE -make an error +#error _XOPEN_SOURCE is not defined #endif], [cf_XOPEN_SOURCE_set=yes], [cf_XOPEN_SOURCE_set=no]) @@ -9471,7 +10220,7 @@ make an error then AC_TRY_COMPILE([#include <stdlib.h>],[ #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE -make an error +#error (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE #endif], [cf_XOPEN_SOURCE_set_ok=yes], [cf_XOPEN_SOURCE_set_ok=no]) @@ -9491,3 +10240,21 @@ dnl ------------------ dnl Trim something using sed, then trim extra whitespace dnl $1 = extra parameters, e.g., in CF_STRIP_G_OPT define([CF__SED_TRIMBLANKS],[sed ifelse($1,,,[$1] )-e 's%[[ ]]% %g' -e 's% [[ ]]*% %g' -e 's%^ %%' -e 's% [$]%%'])dnl +dnl --------------------------------------------------------------------------- +dnl CF__XOPEN_SOURCE_BODY version: 2 updated: 2023/02/18 17:41:25 +dnl --------------------- +dnl body of test when test-compiling for _XOPEN_SOURCE check +define([CF__XOPEN_SOURCE_BODY], +[ +#ifndef _XOPEN_SOURCE +#error _XOPEN_SOURCE is not defined +#endif +]) +dnl --------------------------------------------------------------------------- +dnl CF__XOPEN_SOURCE_HEAD version: 2 updated: 2023/02/18 17:41:25 +dnl --------------------- +dnl headers to include when test-compiling for _XOPEN_SOURCE check +define([CF__XOPEN_SOURCE_HEAD], +[ +$ac_includes_default +]) diff --git contrib/ncurses/announce.html.in contrib/ncurses/announce.html.in index 84b9d4297de5..9889ef1bfb6c 100644 --- contrib/ncurses/announce.html.in +++ contrib/ncurses/announce.html.in @@ -1,7 +1,7 @@ <!-- - $Id: announce.html.in,v 1.99 2020/10/19 08:18:12 tom Exp $ + $Id: announce.html.in,v 1.107 2024/04/27 16:45:27 tom Exp $ **************************************************************************** - * Copyright 2018-2019,2020 Thomas E. Dickey * + * Copyright 2018-2023,2024 Thomas E. Dickey * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -29,12 +29,10 @@ **************************************************************************** --> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> - <html> <head> <meta name="generator" content= - "HTML Tidy for HTML5 for Linux version 5.2.0"> - + "HTML Tidy for HTML5 for Linux version 5.6.0"> <title>Announcing ncurses @VERSION@</title> <link rel="author" href="mailto:bug-ncurses@gnu.org"> <meta http-equiv="Content-Type" content= @@ -57,7 +55,6 @@ } </style> </head> - <body> <h1 class="no-header">Announcing ncurses @VERSION@</h1> @@ -140,28 +137,27 @@ <blockquote> <p><a href= - "ftp://ftp.invisible-island.net/ncurses/">ftp://ftp.invisible-island.net/ncurses/</a> + "https://invisible-island.net/archives/ncurses/">https://invisible-island.net/archives/ncurses/</a> or<br> <a href= "https://invisible-mirror.net/archives/ncurses/">https://invisible-mirror.net/archives/ncurses/</a> .</p> </blockquote> - <p>It is also available via anonymous FTP at the GNU distribution - site</p> + <p>It is also available at the GNU distribution site</p> <blockquote> <p><a href= - "ftp://ftp.gnu.org/gnu/ncurses/">ftp://ftp.gnu.org/gnu/ncurses/</a> .</p> + "https://ftp.gnu.org/gnu/ncurses/">https://ftp.gnu.org/gnu/ncurses/</a> .</p> </blockquote> <h2><a name="h2-release-notes" id="h2-release-notes">Release Notes</a></h2> <p>These notes are for <span class="main-name">ncurses</span> - @VERSION@, released <strong>February 12, 2020</strong>.</p> + @VERSION@, released <strong>April 27, 2024</strong>.</p> <p>This release is designed to be source-compatible with - <span class="main-name">ncurses</span> 5.0 through 6.1; providing + <span class="main-name">ncurses</span> 5.0 through 6.4; providing extensions to the application binary interface (ABI). Although the source can still be configured to support the <span class= "main-name">ncurses</span> 5 ABI, the reason for the release is @@ -173,292 +169,181 @@ this announcement.</p> <p>The most <a href="#h3-bug-fixes">important - bug-fixes/improvements</a> dealt with user-defined capabilities - in terminal descriptions. The release notes also mention some - other bug-fixes, but are focused on new features and improvements - to existing features since <span class="main-name">ncurses</span> - 6.1 release.</p> + bug-fixes/improvements</a> dealt with robustness issues. The + release notes also mention some other bug-fixes, but are focused + on new features and improvements to existing features since + <span class="main-name">ncurses</span> 6.4 release.</p> <h3><a name="h3-library" id="h3-library">Library improvements</a></h3> <h4><a name="h4-new-library" id="h4-new-library">New features</a></h4> - <p>There are several new features:</p> + <p>These are new features:</p> <ul> <li> - <p><a href= - "@HOMEPAGE@/man/form_field_opts.3x.html">O_EDGE_INSERT_STAY</a> - tells the form library to optionally delay cursor movement on - a field edge/boundary</p> - </li> + <p>The low-level terminfo and termcap interfaces are used + both by the higher-level curses library, as well as by many + applications.</p> - <li> - <p><a href= - "@HOMEPAGE@/man/form_field_opts.3x.html">O_INPUT_FIELD</a> - extension to form library allows a dynamic field to shrink if - the new limit is smaller than the current field size.</p> - </li> + <p>The functions which convert parameterized terminal + capability strings for output to the terminal + (<code>tiparm</code> and <code>tparm</code>) analyze the + capability string to determine which parameters are strings + (i.e., addresses), versus numbers (not addresses).</p> - <li> - <p>added <a href= - "@HOMEPAGE@/man/curs_memleaks.3x.html">exit_curses</a> and - <a href= - "@HOMEPAGE@/man/curs_memleaks.3x.html">exit_terminfo</a> to - replace internal symbols for leak-checking.</p> - </li> - - <li> - <p>added <a href= - "@HOMEPAGE@/man/curs_trace.3x.html#h3-Functions">curses_trace</a>, - to replace trace().</p> - </li> - </ul> + <p>The library's analysis of a capability string may differ + from the calling application's design if environment + variables are used to point to an invalid terminal database. + This is a longstanding problem with <em>all</em> + implementations of terminfo, dating from the early 1980s.</p> - <p>Additionally, to improve performance other changes (and - extensions) are provided in this release:</p> + <p>Two new functions address this problem: by providing a + function which allows the calling application to tell ncurses + how many string-parameters to expect:</p> - <ul> - <li> - <p>mouse decoding now handles shift/control/alt logic when - decoding xterm's 1006 mode</p> - </li> - - <li> - <p>ncurses now defines a limit for <a href= - "@HOMEPAGE@/man/curs_getstr.3x.html">wgetnstr</a>, <a href= - "@HOMEPAGE@/man/curs_get_wstr.3x.html">wgetn_wstr</a> when - length is negative or “too large”.</p> - </li> - - <li>reordered loop-limit checks in <a href= - "@HOMEPAGE@/man/curs_insstr.3x.html">winsnstr</a> in case the - string has no terminating null and only the number of - characters is used.</li> - - <li> - <p>there is now no buffer-size limit when reading the - <a href="@HOMEPAGE@/man/ncurses.3x.html#h3-TERMCAP"><tt>$TERMCAP</tt></a> - variable.</p> - </li> - - <li> - <p>the <a href= - "@HOMEPAGE@/man/ncurses.3x.html#h3-TERMCAP"><tt>$TERMCAP</tt></a> - variable may be interpreted as a fallback to a terminfo - entry</p> - </li> + <ul> + <li><code>tiscan_s</code> helps applications check + formatting capabilities that would be passed to + <code>tiparm_s</code>.</li> - <li> - <p><a href= - "@HOMEPAGE@/man/curs_terminfo.3x.html#h3-Output-Functions"><tt> - mvcur</tt></a> now decides whether to use hard-tabs, using - <strong><tt>xt</tt></strong>, <strong><tt>tbc</tt></strong> - and <strong><tt>hts</tt></strong> as clues.</p> + <li><code>tiparm_s</code> provides applications a way to + tell ncurses what the expected parameters are for a + capability.</li> + </ul> </li> <li> - <p>extended colors are improved by modifying an internal call - to <a href= - "@HOMEPAGE@/man/curs_terminfo.3x.html#h3-Output-Functions"><tt> - vid_puts</tt></a> to pass extended color pairs e.g., from - <tt>tty_update.c</tt> and <tt>lib_mvcur.c</tt></p> - </li> + <p>The ncurses library supports a compile-time feature + (enabled with the configure <code>--enable-check-size</code> + option) which simplifies initialization with terminals which + do not negotiate window (screen) size. This is done in + <code>setupterm</code>, by providing for using ANSI + cursor-position report (in user6/user7 terminfo capabilities) + to obtain the screen size if neither environment variables or + ioctl is used.</p> - <li> - <p id="getenv-fixes">the initialization functions now avoid - relying upon persistent data for the result from <a href= - "#getenv-check"><tt>getenv</tt></a></p> + <p>The ncurses test-program with options + “<code>-E -T</code>” demonstrates this + feature.</p> </li> - <li> - <p>scrolling is improved:</p> - - <ul> - <li>a limit check in <tt>newline_forces_scroll</tt> handles - the case where the row is inside scroll-margins, but not at - the end.</li> - - <li> - <p>improved loop limits in <tt>_nc_scroll_window</tt> - handle a case where the scrolled data is a pad which is - taller than the window.</p> - </li> - </ul> - </li> + <li>add functions to query tty-flags in + <code>SCREEN</code></li> </ul> + <p>This release drops compatibility with obsolete versions of + <a href="@HOMEPAGE@/tack/">tack</a>, e.g., pre-1.08</p> + <h4><a name="h4-fixes-library" id="h4-fixes-library">Other improvements</a></h4> - <p>These are revised features:</p> + <p>These are improvements to existing features:</p> <ul> <li> - <p>used “<tt>const</tt>” in some prototypes - rather than <tt>NCURSES_CONST</tt> where X/Open Curses was - updated to do this, e.g., <tt>wscanw</tt>, <tt>newterm</tt>, - the terminfo interface. Also use “<tt>const</tt>” - for consistency in the termcap interface, which was withdrawn - by X/Open Curses in Issue 5 (2007). As of Issue 7, X/Open - Curses still lacks “<tt>const</tt>” for certain - return values, e.g., <a href= - "@HOMEPAGE@/man/curs_util.3x.html#h3-keyname_key_name">keyname</a>.</p> - </li> - - <li> - <p>modified <a href= - "@HOMEPAGE@/man/curs_bkgd.3x.html#h3-bkgd"><tt>wbkgd</tt></a> - and <a href= - "@HOMEPAGE@/man/curs_bkgrnd.3x.html#h3-bkgrnd"><tt>wbkgrnd</tt></a> - to improve compatibility with SVr4 curses, changing the way - the window rendition is updated when the background character - is modified</p> - </li> - - <li> - <p>improved terminfo write/read by modifying the fourth item - of the extended header to denote the number of valid strings - in the extended string table (see <a href= - "@HOMEPAGE@/man/term.5.html#h3-EXTENDED-STORAGE-FORMAT">term(5)</a>).</p> - </li> - - <li> - <p>modified the initialization checks for mouse so that the - <a href= - "/ncurses/terminfo.src.html#tic-xterm_sm_1006"><tt>xterm+sm+1006</tt></a> - block will work with terminal descriptions not mentioning - <em>xterm</em>.</p> - </li> - </ul> + <p>In addition to the new, safer function + <code>tiparm_s</code>, ncurses adds checks to make the older + <code>tiparm</code>, <code>tparm</code> and + <code>tgoto</code> functions safer:</p> - <p>These were done to limit or ultimately deprecate features:</p> + <ul> + <li> + <p>the terminfo functions <code>tiparm</code> and + <code>tparm</code> ensure that the capability string + comes from the terminal description which ncurses loads, + rather than from random data which the application + happens to have.</p> + </li> - <ul> - <li> - <p>deprecated <a href= - "@HOMEPAGE@/NEWS.html#t970831">safe-sprintf</a>, since the - <tt>vsnprintf</tt> function, which does what was needed, was - standardized long ago.</p> - </li> + <li> + <p>the <code>tgoto</code> function disallows capabilities + which its analysis shows will attempt to use string + parameters.</p> + </li> - <li> - <p>marked <a href= - "@HOMEPAGE@/man/curs_printw.3x.html#h2-PORTABILITY"><tt>vwprintw</tt></a> - and <tt>vwscanw</tt> as deprecated; recommend using <a href= - "@HOMEPAGE@/man/curs_printw.3x.html"><tt>vw_printw</tt></a> - and <tt>vw_scanw</tt>, respectively.</p> + <li> + <p>ncurses uses internal functions which correspond to + <code>tiparm</code>, and <code>tgoto</code> which ensure + that the capability strings which are passed to these + functions come from the loaded terminal description.</p> + </li> + </ul> </li> <li> - <p>added deprecation warnings for internal functions called - by older versions of <a href= - "@HOMEPAGE@/tack.html">tack</a>.</p> + <p>improve check in <code>lib_tparm.c</code>, ensuring that a + char* fits into a <code>TPARM_ARG</code></p> </li> <li> - <p>removed unused <tt>_nc_import_termtype2</tt> function.</p> + <p>modify <code>_nc_syserr_abort</code> to use + <code>_nc_env_access</code>, rather than only checking root + uid</p> </li> - </ul> - <p>These are improvements to existing features:</p> - - <ul> <li> - <p>check parameter of <a href= - "@HOMEPAGE@/man/curs_threads.3x.html">set_escdelay</a>, - return ERR if negative.</p> + <p>improve thread lock in <code>lib_trace.c</code></p> </li> <li> - <p>check parameter of <a href= - "@HOMEPAGE@/man/curs_threads.3x.html">set_tabsize</a>, return - ERR if not greater than zero</p> + <p>modify <code>flushinp</code> to use file descriptors in + <code>SCREEN</code>, rather than from <code>TERMINAL</code>, + and check if they are for a terminal, like SVr4</p> </li> <li> - <p>correct a status-check in _nc_read_tic_entry() so that if - reading a hex/b64 <a href= - "@HOMEPAGE@/man/ncurses.3x.html#h3-TERMINFO"><tt>$TERMINFO</tt></a>, - and the <a href= - "@HOMEPAGE@/man/ncurses.3x.html#h3-TERM"><tt>$TERM</tt></a> - does not match, fall-through to the compiled-in search - list.</p> + <p>modify <code>mcprint</code> to use file descriptor in + <code>SCREEN</code>, for consistency</p> </li> <li> - <p>amend check for <a href= - "@HOMEPAGE@/man/terminfo.5.html#h3-Predefined-Capabilities"><tt> - repeat_char</tt></a> to handle a case where setlocale() was - called after <a href= - "@HOMEPAGE@/man/curs_initscr.3x.html"><tt>initscr</tt></a></p> + <p>modify internal function <code>_nc_read_file_entry</code> + to show relevant filename in warnings</p> </li> <li> - <p>move macro for <a href= - "@HOMEPAGE@/man/curs_touch.3x.html"><tt>is_linetouched</tt></a> - inside <strong><tt>NCURSES_NOMACROS</tt></strong> - <em><tt>ifndef</tt></em>.</p> + <p>improve checks in internal function + <code>convert_string</code> for corrupt terminfo entry</p> </li> <li> - <p>use <tt>_nc_copy_termtype2</tt> rather than direct - assignment in <a href= - "@HOMEPAGE@/man/curs_terminfo.3x.html#h3-Initialization">setupterm</a>, - in case it is called repeatedly using fallback terminfo - descriptions</p> + <p>review/improve handling of out-of-memory conditions</p> </li> <li> - <p>improve workaround for Solaris wcwidth versus line-drawing - characters</p> + <p>limit delays to 30 seconds, i.e., padding delays in + terminfo, as well as <code>napms</code> and + <code>delay_output</code> functions</p> </li> <li> - <p>add checks in <a href= - "@HOMEPAGE@/man/resizeterm.3x.html"><tt>repair_subwindows</tt></a> - to keep the current position and scroll-margins inside the - resized subwindow.</p> + <p>fix reallocation loop for <code>vsnprintf</code> in + <code>_nc_sprintf_string</code> by copying the va_list + variable</p> </li> <li> - <p>correct a buffer-limit in <tt>write_entry.c</tt> for - systems that use caseless filenames.</p> + <p>modify <code>delscreen</code> to limit the windows which + it creates to just those associated with the screen</p> </li> <li> - <p>improved build-time utility <em>report_offsets</em>:</p> - - <ul> - <li> - <p>add categories, e.g., "w" for wide-character, "t" for - threads to make the report more readable. Reorganized the - structures reported to make the categories more - apparent.</p> - </li> - - <li> - <p>add <tt>NCURSES_GLOBALS</tt> and - <tt>NCURSES_PRESCREEN</tt> to report to show how similar - the different <em>libtinfo</em> configurations are.</p> - </li> - </ul> + <p>modify <code>endwin</code> to return an error if it is + called again without an intervening screen update</p> </li> <li> - <p>modified some header files to ensure that those include - necessary files except for the previously-documented - cases</p> + <p>modify <code>wenclose</code> to handle pads</p> </li> <li> - <p>added some traces in initialization to show whether a - fallback entry is used.</p> + <p>eliminate use of <code>PATH_MAX</code> in + <code>lib_trace.c</code></p> </li> <li> - <p>made minor optimization to reduce calls to - _nc_reserve_pairs</p> + <p>provide for any <code>CCHARW_MAX</code> greater than 1</p> </li> </ul> @@ -466,504 +351,336 @@ <ul> <li> - <p>fix a special case in <tt>PutAttrChar</tt> where a cell is - marked as alternate-character set, but the terminal does not - actually support the given graphic character. This would - happen in an older terminal such as <em>vt52</em>, which - lacks most line-drawing capability.</p> + <p>correct loop termination condition in + <code>waddnstr</code> and <code>waddnwstr</code></p> </li> <li> - <p>corrected flag for "seq" method of db 1.8.5 interface, - needed by toe on some of the BSDs.</p> + <p>improve parsing in internal function + <code>_nc_msec_cost</code>, allowing a single decimal + point</p> </li> <li> - <p>modify comparison in make_hash.c to correct a special case - in collision handling for Caps-hpux11</p> + <p>amend parameter check for entire string versus specific + length in <code>winsnstr</code> and <code>wins_nwstr</code> + to match Solaris; make similar correction to + <code>wins_nwstr</code></p> </li> <li> - <p>add extended_slk_color{,_sp} symbols to the appropriate - package/*.{map,sym} files</p> + <p>correct internal function <code>wadd_wch_literal</code> + when adding a non-spacing character to a double-width + character</p> </li> <li> - <p>modify lib_setup to avoid calling pthread_self() without - first verifying that the address is valid, i.e., for weak - symbols</p> - </li> - - <li> - <p>add a couple of broken-linker symbols to the list of - versioned symbols to help with link-time optimization versus - weak symbols.</p> + <p>correct definition of <code>Charable</code> macro for + non-wide ncurses library .</p> </li> </ul> <h3><a name="h3-programs" id="h3-programs">Program improvements</a></h3> - <p id="h4-utilities">Several improvements were made to the utility programs:</p> + <p id="h4-utilities">Several improvements were made to the + utility programs. Some were done to make the <code>infocmp</code> + option “<tt>-u</tt>” option help refactor the + terminal database.</p> <dl> - <dt><span class="part-name">clear</span> + <dt><span class="part-name"><a href= + "@HOMEPAGE@/man/infocmp.1m.html">infocmp</a></span> </dt> <dd> <ul> - <li>improved logic for clearing with the <em>E3</em> - extension, in case the terminal scrolls content onto its - saved-lines before actually clearing the display, by - clearing the saved-lines after clearing the display</li> - </ul> - </dd> + <li> + <p>add limit checks for processing extended capabilities + with the “<code>-u</code>” option</p> + </li> - <dt><span class="part-name">infocmp</span> - </dt> + <li> + <p>correct initial alignment of extended capabilities, so + that the “<code>-u</code>” option can be used + for more than two terminal types</p> + </li> - <dd> - <ul> - <li>omit filtering of “<tt>OTxx</tt>” names - which are used for obsolete capabilities, when the output - is sorted by long-names. This change helps when making a - table of the short/long capability names.</li> + <li> + <p>modify “<code>-u</code>” option to not + report cancels for strings which were already cancelled + in a use'd chunk.</p> + </li> + + <li> + <p>correct an assignment “<code>-u</code>” + for detecting if a boolean is unset in a base entry and + set in a use'd chunk, i.e., if it was cancelled.</p> + </li> </ul> </dd> - <dt><span class="part-name">tic</span> + <dt><span class="part-name"><a href= + "@HOMEPAGE@/man/tic.1m.html">tic</a></span> </dt> <dd> <ul> - <li>added check for consistent alternate character set - capabilities.</li> - - <li>added check for paired <tt>indn</tt>/<tt>rin</tt>.</li> - - <li>added check for terminals with <tt>parm_dch</tt> vs - <tt>parm_ich</tt>.</li> - - <li>added check for the case where - <tt>setf</tt>/<tt>setb</tt> are given using different - strings, but provide identical results to - <tt>setaf</tt>/<tt>setab</tt>.</li> - - <li>corrected check for <tt>ich1</tt>.</li> + <li> + <p>correct limit-check when dumping tc/use clause via + “<code>-I</code>”</p> + </li> - <li>changed a too-large terminal entry from a fatal error - to a warning.</li> - </ul> - </dd> + <li> + <p>check return value of <code>_nc_save_str</code>, in + special case where extended capabilities are processed + but the terminal description was not initialized</p> + </li> - <dt><span class="part-name">toe</span> - </dt> + <li> + <p>modify check for multiply defined aliases to report + problems within the current runtime rather than for + conflicts with pre-existing terminal descriptions.</p> + </li> - <dd> - <ul> - <li>ignores any hex/b64 <tt>$TERMINFO</tt> value in the - list of terminfo databases.</li> + <li> + <p>disallow using <code>$TERMINFO</code> or + <code>$HOME/.terminfo</code> when + “<code>-o</code>” option is used</p> + </li> </ul> </dd> - <dt><span class="part-name">tset</span> - </dt> + <dt><span class="part-name"><a href= + "@HOMEPAGE@/man/tput.1.html">tput</a></span> and <span class= + "part-name"><a href= + "@HOMEPAGE@/man/tset.1.html">tset</a></span></dt> <dd> <ul> - <li>replace check in <span class="part-name">reset</span> - command for obsolete “<tt>pt</tt>” capability - using <tt>tbc</tt> and <tt>hts</tt> capabilities as - clues</li> - - <li>modify <span class="part-name">reset</span> to allow - for tabstops at intervals other than 8.</li> - - <li>change <span class="part-name">reset</span>'s behavior - for margins to simply clear soft-margins if possible, - rather than clearing and then setting them according to the - terminal's width.</li> - </ul> - </dd> + <li> + <p>add “<code>-v</code>” option to tput, to + show warnings</p> + </li> - <dt><span class="part-name">tput</span> - </dt> + <li> + <p>modify <em>reset</em> command to avoid altering clocal + if the terminal uses a modem</p> + </li> - <dd> - <ul> - <li>add “<tt>x</tt>” to <tt>getopt</tt> string - so that “<tt>tput -x clear</tt>” - works.</li> + <li> + <p>modify <em>reset</em> feature to avoid 1-second sleep + if running in a pseudo-terminal</p> + </li> </ul> </dd> </dl> - <p>Several changes were made to the generated ncurses*config - scripts and the analogous “<tt>.pc</tt>” files to - reduce differences between the configurations they report:</p> - - <ul> - <li> - <p>modified the ncurse*-config and pc-files to more closely - match for the <tt>-I</tt> and <tt>-l</tt> options.</p> - </li> - - <li> - <p>filtered out linker-specs from the <tt>--libs</tt> - report.</p> - </li> - - <li> - <p>amended the ncurses*-config and pc-files to take into - account the rpath hack which differed between those - files.</p> - </li> - - <li> - <p>modified generated ncurses*config and ncurses.pc, - ncursesw.pc, etc., to list helper libraries such as gpm for - static linking.</p> - </li> - </ul> - <h4><a name="h4-examples" id="h4-examples">Examples</a></h4> <p>Along with the library and utilities, improvements were made to the <a href= - "@HOMEPAGE@/ncurses-examples.html">ncurses-examples</a>. Most of - this activity aimed at improving the test-packages. A few changes - are more generally useful, e.g., for the main ncurses - test-program, and for analyzing traces using the - <em>tracemunch</em> script:</p> + "@HOMEPAGE@/ncurses-examples.html">ncurses-examples</a>:</p> <ul> <li> - <p>improve recovery from error when reading command-character - in <tt>test/ncurses.c</tt>, showing the relevant error - message and not exiting on EINTR.</p> + <p>modify <code>test_tparm</code> to account for extended + capabilities</p> </li> <li> - <p>improve <em>tracemunch</em>, by keeping track of - <tt>TERMINAL*</tt> values, and if tracing was first turned on - after initialization, attempt to show distinct screen, window - and terminal names anyway.</p> + <p>corrected mouse mask in <code>test/testcurs.c</code></p> </li> <li> - <p>modify <em>tracemunch</em> to accept filename parameters - in addition to use as a pipe/filter.</p> + <p>modify <code>test/clip_printw.c</code> to optionally test + non-wrapped updates</p> </li> <li> - <p>update <em>tracemunch</em> to work with <em>perl - 5.26.2</em>, which changed the rules for escaping regular - expressions.</p> + <p>modify <code>test/test_mouse.c</code> to use curses api + for raw/noraw</p> </li> <li> - <p>add some checks in <em>tracemunch</em> for undefined - variables.</p> - </li> - - <li> - <p>modify <tt>TurnOn</tt>/<tt>TurnOff</tt> macros (in - lib_vidattr.c and lib_vid_attr.c) to avoid expansion of - “<tt>CUR</tt>” in trace.</p> + <p>modify <code>test/clip_printw.c</code> to optionally test + non-wrapped updates</p> </li> </ul> - <p>There are other new demo/test programs and reusable - examples:</p> + <p>There is one new demo/test programs:</p> <dl> - <dt><span class="part-name">color_content</span> - </dt> - - <dd>Demonstrate the <tt>color_content</tt> and - <tt>extended_color_content</tt> functions.</dd> - - <dt><span class="part-name">demo_tabs</span> - </dt> - - <dd>A simple demo of tabs in curses.</dd> - - <dt><span class="part-name">dump_window</span> - </dt> - - <dd>A portable curses screen-dump, used to compare ncurses - screen contents with Solaris.</dd> - - <dt><span class="part-name">pair_content</span> - </dt> - - <dd>Demonstrate the <tt>pair_content</tt> and - <tt>extended_pair_content</tt> functions.</dd> - - <dt><span class="part-name">report_hashing</span> - </dt> - - <dd>Check hash-tables used for terminfo and termcap names.</dd> - - <dt><span class="part-name">parse_rgb</span> + <dt><span class="part-name"><em>test/test_endwin.c</em></span> </dt> - <dd>Sample implementation of the ncurses RGB extension from - <a href="@HOMEPAGE@/man/user_caps.5.html">user_caps.5</a>, used - in <em>picsmap</em> and <em>savescreen</em> programs.</dd> + <dd> + <p>This program shows the return-status from + <code>endwin</code> with different combinations of + <code>endwin</code> (repeated), <code>initscr</code>, + <code>newterm</code>.</p> + </dd> </dl> - <p>A variety of improvements were made to existing programs, both - new features as well as options added to make the set of programs - more consistent.</p> + <h3><a name="h3-database" id="h3-database">Terminal database</a></h3> + + <p>There are several new terminal descriptions:</p> <ul> <li> - <p>add “<tt>-l</tt>” option to test/background, - to dump screen contents in a form that lets different curses - implementations be compared.</p> + <p><a href= + "@HOMEPAGE@/terminfo.src.html#tic-ansi_apparrows"><tt>ansi+apparrows</tt></a></p> </li> <li> - <p>add “<tt>@</tt>” command to test/ncurses - F-test, to allow rapid jump to different character pages.</p> + <p><a href= + "@HOMEPAGE@/terminfo.src.html#tic-contour"><tt>contour</tt></a></p> </li> <li> - <p>added enum, regex examples to test/demo_forms</p> + <p><a href= + "@HOMEPAGE@/terminfo.src.html#tic-linux_kbs"><tt>linux+kbs</tt></a> + for terminals which imitate xterm's behavior with Linux</p> </li> <li> - <p>amend Scaled256() macro in test/picsmap.c to cover the - full range 0..1000</p> + <p><a href= + "@HOMEPAGE@/terminfo.src.html#tic-rio"><tt>rio</tt></a>, + <a href= + "@HOMEPAGE@/terminfo.src.html#tic-rio-direct"><tt>rio-direct</tt></a></p> </li> <li> - <p>corrected pathname used in Ada95 sample programs for - <tt>explain.txt</tt>, to work with test-packages, and used an - awk script to split the resulting pathname when it would be - too long for a single line.</p> + <p><a href= + "@HOMEPAGE@/terminfo.src.html#tic-mostlike"><tt>mostlike</tt></a></p> </li> <li> - <p>ignore interrupted system-call in test/ncurses's - command-line, e.g., if the terminal were resized.</p> + <p><a href= + "@HOMEPAGE@/terminfo.src.html#tic-ms-vt100-16color"><tt>ms-vt100-16color</tt></a>, + <a href= + "@HOMEPAGE@/terminfo.src.html#tic-winconsole"><tt>winconsole</tt></a></p> </li> <li> - <p>improved ifdef's for <tt>TABSIZE</tt> variable, to help - with AIX/HPUX ports.</p> + <p><a href= + "@HOMEPAGE@/terminfo.src.html#tic-vt100_noapp"><tt>vt100+noapp</tt></a>, + <a href= + "@HOMEPAGE@/terminfo.src.html#tic-vt100_noapp_pc"><tt>vt100+noapp+pc</tt></a>, + <a href= + "@HOMEPAGE@/terminfo.src.html#tic-xterm_app_pc"><tt>xterm+app+pc</tt></a>, + <a href= + "@HOMEPAGE@/terminfo.src.html#tic-xterm_decedit"><tt>xterm+decedit</tt></a> + from <a href="@WEBSITE@/xterm/xterm.log.html#xterm_389">xterm + #389</a></p> </li> - </ul> - - <h3><a name="h3-database" id="h3-database">Terminal database</a></h3> - - <p>There are several new terminal descriptions:</p> - - <blockquote style="word-break:keep-all"> - <p><tt>alacritty</tt>, <tt>domterm</tt>, <tt>kitty</tt>, - <tt>mintty</tt>, <tt>mintty-direct</tt>, <tt>ms-terminal</tt>, - <tt>n7900</tt>, <tt>nsterm-build309</tt>, - <tt>nsterm-direct</tt>, <tt>screen5</tt>, <tt>ti703</tt>, - <tt>ti707</tt>, <tt>ti703-w</tt>, <tt>ti707-w</tt> - <tt>vscode</tt>, <tt>vscode-direct</tt>, <tt>xterm-mono</tt>, - <tt>xterm.js</tt></p> - </blockquote> - <p>There are many changes to existing terminal descriptions. Some - were updates to several descriptions:</p> - - <ul> - <li>use <a href= - "/ncurses/terminfo.src.html#tic-ansi_rep"><tt>ansi+rep</tt></a> - in a dozen places</li> - - <li>add rs1 to konsole, mlterm</li> - - <li>improve several flash capabilities with trailing mandatory - delays</li> - - <li>drop <tt>ich1</tt> from <tt>rxvt-basic</tt>, <tt>Eterm</tt> - and <tt>mlterm</tt> to improve compatibility with old - non-curses programs</li> - - <li>add/use <a href= - "/ncurses/terminfo.src.html#tic-xterm_keypad"><tt>xterm+keypad</tt></a> - in <tt>xterm-new</tt></li> - - <li>use <a href= - "/ncurses/terminfo.src.html#tic-xterm_sl-twm"><tt>xterm+sl-twm</tt></a> - for consistency, nine places</li> + <li> + <p><a href= + "@HOMEPAGE@/terminfo.src.html#tic-putty_cursor"><tt>putty+cursor</tt></a> + to reflect amending of modified cursor-keys in 2021</p> + </li> - <li>improve <em>xm</em> example in <a href= - "/ncurses/terminfo.src.html#tic-xterm_x11mouse">xterm+x11mouse</a> - and <a href= - "/ncurses/terminfo.src.html#tic-xterm_sm_1006">xterm+sm_1006</a>.</li> + <li> + <p><a href= + "@HOMEPAGE@/terminfo.src.html#tic-wezterm"><tt>wezterm</tt></a></p> + </li> </ul> - <p>while others affected specific descriptions. These were - retested, to take into account changes by their developers:</p> - - <blockquote> - <p><tt>terminator</tt>, <tt>st</tt></p> - </blockquote> - - <p>while these are specific fixes based on reviewing - documentation, user reports, or warnings from <span class= - "part-name">tic</span>:</p> - - <dl> - <dt><a href= - "/ncurses/terminfo.src.html#tic-adds200">adds200</a>:</dt> - - <dd> - <ul> - <li>fix typo</li> - </ul> - </dd> - - <dt><a href= - "/ncurses/terminfo.src.html#tic-gnome-256color">gnome-256color</a> - </dt> - - <dd> - <ul> - <li>base entry on "gnome", not "vte", for consistency</li> - </ul> - </dd> - - <dt><a href= - "/ncurses/terminfo.src.html#tic-interix">interix</a> - </dt> - - <dd> - <ul> - <li>trim unnecessary setf/setb</li> - </ul> - </dd> - - <dt><a href= - "/ncurses/terminfo.src.html#tic-linux-16color">linux-16color</a> - </dt> - - <dd> - <ul> - <li>accommodate <a href= - "https://lists.gnu.org/archive/html/bug-ncurses/2019-10/msg00061.html"> - Linux console driver</a> incompatibility introduced in - early 2018</li> - </ul> - </dd> - - <dt><a href= - "/ncurses/terminfo.src.html#tic-nsterm-256color">nsterm-256color</a>:</dt> - - <dd> - <ul> - <li>add nsterm-build309 to replace nsterm-256color, - assigning the latter as an alias of nsterm, to make mouse - work with nsterm-256color</li> - </ul> - </dd> - - <dt><a href= - "/ncurses/terminfo.src.html#tic-regent40">regent40</a>:</dt> - - <dd> - <ul> - <li>renumber function-keys to match manual</li> - </ul> - </dd> - - <dt><a href= - "/ncurses/terminfo.src.html#tic-regent60">regent60</a>:</dt> - - <dd> - <ul> - <li>add cd (clr_eos)</li> - - <li>corrected acsc</li> - - <li>add shifted function-keys</li> - </ul> - </dd> - - <dt><a href= - "/ncurses/terminfo.src.html#tic-tvi950">tvi950</a>:</dt> - - <dd> - <ul> - <li>added function-key definitions to agree with Televideo - 950 manual</li> - - <li>corrected acsc</li> + <p>There are many changes to existing terminal descriptions. Some + were updates to several descriptions, using the + <code>infocmp</code> “<code>-u</code>” option in a + script to determine which <em>building-block</em> entries could + be used to replace multiple capability settings (and trim + redundant information).</p> - <li>remove bogus kf0</li> + <p>Other changes include:</p> - <li>add bel</li> - </ul> - </dd> + <ul> + <li> + <p><a href= + "@HOMEPAGE@/terminfo.src.html#toc-_X_T_E_R_M__Extensions_">document</a> + XF, kxIN and kxOUT</p> + </li> - <dt><a href= - "/ncurses/terminfo.src.html#tic-tvi955">tvi955</a>:</dt> + <li> + <p>add note on <a href= + "@HOMEPAGE@/terminfo.src.html#tic-sun"><tt>sun</tt></a> + regarding wscons/cmdtool/shelltool</p> + </li> - <dd> - <ul> - <li>fix typo</li> - </ul> - </dd> + <li> + <p>remove DECCOLM+DECSCLM from <a href= + "@HOMEPAGE@/terminfo.src.html#tic-foot"><tt>foot</tt></a></p> + </li> - <dt><a href= - "/ncurses/terminfo.src.html#tic-vi200">vi200</a>:</dt> + <li> + <p>add xterm+focus to <a href= + "@HOMEPAGE@/terminfo.src.html#tic-foot_base"><tt>foot+base</tt></a></p> + </li> - <dd> - <ul> - <li>add acsc string, including right/down-arrow</li> - </ul> - </dd> + <li> + <p>add ecma+strikeout to <a href= + "@HOMEPAGE@/terminfo.src.html#tic-putty"><tt>putty</tt></a></p> + </li> - <dt><a href= - "/ncurses/terminfo.src.html#tic-wy50">wy50</a>:</dt> + <li> + <p>use CSI 3J in <a href= + "@HOMEPAGE@/terminfo.src.html#tic-vte-2017"><tt>vte-2017</tt></a></p> + </li> - <dd> - <ul> - <li>corrected acsc</li> - </ul> - </dd> + <li> + <p>use oldxterm+sm+1006 in <a href= + "@HOMEPAGE@/terminfo.src.html#tic-vte-2014"><tt>vte-2014</tt></a></p> + </li> - <dt><a href="/ncurses/terminfo.src.html#tic-wy50">wy50</a> and - <a href="/ncurses/terminfo.src.html#tic-wy60">wy60</a>:</dt> + <li> + <p>modify <a href= + "@HOMEPAGE@/terminfo.src.html#tic-xgterm"><tt>xgterm</tt></a> + to work around line-drawing bug</p> + </li> - <dd> - <ul> - <li>add shifted function-keys as kF1 to kF16</li> - </ul> - </dd> + <li> + <p>add xterm focus mode 1004 to <a href= + "@HOMEPAGE@/terminfo.src.html#tic-xterm_focus"><tt>xterm+focus</tt></a> + as fe/fd capabilities, like vim.</p> + </li> - <dt><a href= - "/ncurses/terminfo.src.html#tic-xterm_x11hilite">xterm+x11hilite</a>:</dt> + <li> + <p>add xterm+focus to <a href= + "@HOMEPAGE@/terminfo.src.html#tic-alacritty_common"><tt>alacritty+common</tt></a></p> + </li> - <dd> - <ul> - <li>eliminate unused <em>p5</em> parameter.</li> - </ul> - </dd> - </dl> + <li> + <p>add XR/xr, to work with vim, and use RV/rv to denote DA2 + and its response</p> + </li> - <p>A few entries use extensions (user-defined terminal - capabilities):</p> + <li> + <p>add XF flag to <a href= + "@HOMEPAGE@/terminfo.src.html#tic-xterm_focus"><tt>xterm+focus</tt></a> + so that termcap applications can be aware of terminals which + may support focus in/out</p> + </li> - <ul> - <li>use <a href= - "/ncurses/terminfo.src.html#tic-xterm_sm_1006"><tt>xterm+sm+1006</tt></a> - (aka “SGR 1006 mouse”) for konsole-base and - putty</li> + <li> + <p>use xterm+focus in <a href= + "@HOMEPAGE@/terminfo.src.html#tic-xterm-p370"><tt>xterm-p370</tt></a> + and <a href= + "@HOMEPAGE@/terminfo.src.html#tic-tmux"><tt>tmux</tt></a></p> + </li> - <li>add <em><tt>Smol/Rmol</tt></em> user-defined capability to - <tt>tmux</tt> and <tt>vte-2018</tt></li> + <li> + <p>remove xterm+sm+1006 from <a href= + "@HOMEPAGE@/terminfo.src.html#tic-tmux"><tt>tmux</tt></a></p> + </li> - <li>add <em><tt>Smulx</tt></em> user-defined capability to - <tt>tmux</tt>, <tt>vte-2018</tt></li> + <li> + <p>NetBSD-related fixes for <a href= + "@HOMEPAGE@/terminfo.src.html#tic-x68k"><tt>x68k</tt></a> and + <a href= + "@HOMEPAGE@/terminfo.src.html#tic-wsvt25"><tt>wsvt25</tt></a></p> + </li> </ul> <h3><a name="h3-documentation" id= @@ -997,88 +714,69 @@ <p>Corrections:</p> <ul> - <li>correct error-returns listed in manual pages for a few - form functions</li> + <li> + <p>add assignment in <code>CF_MAN_PAGES</code> to fill in + value for <code>TERMINFO_DIRS</code> in ncurses, terminfo + and tic manpages.</p> + </li> - <li>corrected prototypes in several manpages using script - to extract those in compilable form.</li> + <li> + <p>clarify interaction of <code>-R</code> option versus + <code>-C</code>, <code>-I</code> and <code>-r</code> in + <code>infocmp</code> manpage.</p> + </li> - <li>fix typo in <a href= - "@HOMEPAGE@/man/term.5.html#h3-EXTENDED-NUMBER-FORMAT">term.5</a>, - improve explanation of format</li> - </ul> - </li> + <li> + <p>correct manpage description of panel_hidden.</p> + </li> - <li> - <p>Clarify in manual pages that <a href= - "@HOMEPAGE@/man/curs_printw.3x.html#h2-PORTABILITY">vwprintw</a> - and <a href= - "@HOMEPAGE@/man/curs_scanw.3x.html#h2-PORTABILITY">vwscanw</a> - are obsolete.<br> - They have not been part of X/Open Curses since 2007.</p> - </li> + <li> + <p>improve manpage description for addch versus unctrl + format used for non-printable characters.</p> + </li> - <li> - <p>New/improved history and portability sections:</p> + <li> + <p>improve manpages discussing file descriptors in + low-level functions.</p> + </li> - <ul> - <li><a href= - "@HOMEPAGE@/man/curs_addch.3x.html#h3-ACS-Symbols">curs_addch.3x</a> - gives some background for ACS symbols.</li> - - <li><a href= - "@HOMEPAGE@/man/curs_getcchar.3x.html#h2-PORTABILITY">curs_getcchar.3x</a> - explains a difference between ncurses and X/Open - Curses.</li> - - <li><a href= - "@HOMEPAGE@/man/curs_getstr.3x.html#h2-PORTABILITY">curs_getstr.3x</a> - gives historical/portability background for the length - parameter of <tt>wgetnstr</tt>.</li> - - <li><a href= - "@HOMEPAGE@/man/curs_slk.3x.html">curs_slk.3x</a> lists a - few differences between SVr4 curses and X/Open Curses for - soft-keys.</li> - - <li><a href= - "@HOMEPAGE@/man/curs_terminfo.3x.html">curs_terminfo.3x</a> - explains that the initial implementation of terminfo in - SVr2 was mostly replaced by other developers in SVr3.</li> - - <li><a href="@HOMEPAGE@/man/infocmp.1m.html">infocmp.1</a> - explains that the initial version of terminfo had no tool - for decompiling descriptions. That came later, with SVr3, - with a different developer.</li> - - <li><a href="@HOMEPAGE@/man/tabs.1.html">tabs.1</a> tells more - than you wanted to know about the tool.</li> - - <li><a href="@HOMEPAGE@/man/tic.1m.html">tic.1</a> explains - that the initial version of terminfo had a rudimentary tool - (based on termcap) for compiling entries. The tool used - with Unix was developed by others for SVr3.</li> - - <li><a href="@HOMEPAGE@/man/toe.1m.html">toe.1</a> explains - the origin of this tool.</li> + <li> + <p>improve description of search rules for terminal + descriptions in terminfo manpage.</p> + </li> + + <li> + <p>modify dist.mk to avoid passing developer's comments + in manpages into the generated html documentation.</p> + </li> + + <li> + <p>modify test-package "ncurses6-doc" to use + manpage-aliases, which in turn required a change to the + configure script to factor in the extra-suffix option + when deriving alias names.</p> + </li> </ul> </li> <li> - <p>Improvements for <a href= - "@HOMEPAGE@/man/user_caps.5.html">user_caps.5</a>:</p> + <p>New/improved history and portability sections:</p> <ul> - <li>mention <tt>meml</tt>, <tt>memu</tt> and - <tt>box1</tt></li> - - <li>expanded description of <tt>XM</tt></li> + <li> + <p>add information about "ttycap", termcap's forerunner, + to tset.1</p> + </li> - <li>add a clarification regarding the <tt>RGB</tt> - capability.</li> + <li> + <p>document limitations of tparm, and error-returns in + curs_terminfo.3x</p> + </li> - <li>mention user_caps.5 in the tic and infocmp manual - pages.</li> + <li> + <p>document limitations of tgoto, and error-returns in + curs_termcap.3x</p> + </li> </ul> </li> @@ -1086,49 +784,20 @@ <p>Other improvements:</p> <ul> - <li><a href= - "@HOMEPAGE@/man/curs_add_wch.3x.html#h3-Line-Graphics">curs_add_wch.3x</a> - adds note about Unicode terminology for the line-drawing - characters.</li> - - <li><a href= - "@HOMEPAGE@/man/curs_color.3x.html#h2-RETURN-VALUE">curs_color.3x</a> - improves discussion of error returns and extensions.</li> - - <li><a href= - "@HOMEPAGE@/man/curs_mouse.3x.html">curs_mouse.3x</a> - explains how the <tt>kmous</tt> and <tt>XM</tt> - capabilities are used for xterm-mouse input.</li> - - <li><a href= - "@HOMEPAGE@/man/curs_refresh.3x.html#h3-wnoutrefresh_doupdate"> - curs_refresh.3x</a> improves documentation regarding the - virtual and physical screens.</li> - - <li><a href= - "@HOMEPAGE@/man/curs_util.3x.html">curs_util.3x</a> - mentions a difference between SVr4 and X/Open Curses for - <tt>unctrl.h</tt></li> - - <li><a href= - "@HOMEPAGE@/man/curs_variables.3x.html#h2-PORTABILITY">curs_variables.3x</a> - improves description of the <em>init_tabs</em> capability - and <tt>TABSIZE</tt> variable.</li> - - <li><a href= - "@HOMEPAGE@/man/ncurses.3x.html#h2-ALTERNATE-CONFIGURATIONS"> - ncurses.3x</a> improves documentation regarding - feature-test macros in curses.h</li> - - <li><a href= - "@HOMEPAGE@/man/resizeterm.3x.html#h3-resize_term">resizeterm.3x</a> - about top-level windows which touch the screen's - borders.</li> - - <li><a href= - "@HOMEPAGE@/man/tput.1.html#h3-Terminal-Size">tput.1</a> - clarifies how <em>tput</em> determines the terminal - size.</li> + <li> + <p>This release has many changes to improve the + formatting and style of the manpages.</p> + </li> + + <li> + <p>Manpages now use consistent section-naming, page + headers and footers (including the modification date for + each page).</p> + </li> + + <li> + <p>Table layout has been revised.</p> + </li> </ul> </li> </ul> @@ -1136,248 +805,165 @@ <p>There are no new manual pages (all of the manual page updates are to existing pages).</p> - <p>Some of the improvements are more subtle, relating to the way - the information is presented. For instance, the generated - terminfo.5 file uses a different table layout, allowing it to use - space on wide terminals more effectively.</p> - <h3><a name="h3-bug-fixes" id="h3-bug-fixes">Interesting bug-fixes</a></h3> - <p>While there were many bugs fixed during development of ncurses - 6.2, only a few (the reason for this release) were both important - and interesting. Most of the bug-fixes were for local issues - which did not affect compatibility across releases. Since those - are detailed in the NEWS file no elaboration is needed here.</p> - - <p>The interesting bugs were in tic/infocmp's handling of - user-defined capabilities. These were not recent bugs. Initially - it was a simple problem:</p> + <p>The changes to <tt>tparm</tt>, <tt>tgoto</tt> which improve + the design of the low-level interfaces are <em>interesting</em>, + but are not bug-fixes <em>per se</em>.</p> - <ul> - <li>The user-defined capabilities can be any type (boolean, - number or string), but once given a type all uses of the name - must conform to that type—unless some special support for - a particular multi-typed name is built into ncurses.</li> + <h3><a name="h3-config-config" id= + "h3-config-config">Configuration changes</a></h3> - <li> - <p>One of simpleterm's contributors copied some definitions - for using <em>tmux</em>'s user-defined capabilities in - <a href= - "https://git.suckless.org/st/commit/06f8cf8ca87a81db15816658c40b2afcd1ad5332.html"> - late in 2016</a>.</p> + <h4><a name="h4-config-major" id="h4-config-major">Major + changes</a></h4> - <blockquote> - <pre class="demo-name"> -diff --git a/st.info b/st.info -@@ -185,7 +185,10 @@ st| simpleterm, - tsl=\E]0;, - xenl, - vpa=\E[%i%p1%dd, -- -+# Tmux unofficial extensions, see TERMINFO EXTENSIONS in tmux(1) -+ Se, -+ Ss, -+ Tc, - - st-256color| simpleterm with 256 colors, - use=st, -</pre> - </blockquote> - </li> + <p>These are the major changes (aside from introducing <a href= + "#h4-new-library"><tt>tiparm_s</tt></a>):</p> + <ul> <li> - <p>Later, in (referring to a version from <a href= - "https://git.suckless.org/st/commit/c0882f2ed1d7a2dd0fa2efa52157e6fc6fde3652.html"> - mid-2017</a>), a user asked to have it updated in - ncurses.</p> + <p>use wide-character (ncursesw) by default</p> </li> <li> - <p>However, it had an error from the change in late 2016. The - terminal description made what <em>tmux</em> expected to be - <strong>string</strong> actually a - <strong>boolean</strong>.</p> - - <p>Over the years, there were problems with each of - simpleterm's terminal descriptions. I repaired those, and - usually dealt with the problem.</p> + <p>use opaque typedefs by default</p> </li> + </ul> + + <p>However, most of the work on configure scripts was done to + reduce warnings within the configure script:</p> + <ul> <li> - <p>The difference in this case was that when compiling the - terminal database, <em>tic</em> may have in memory the - definitions for more than one terminal description (so that - it can resolve “<tt>use=</tt>” clauses). Seeing - two different types for the same name, in certain situations - it would incorrectly merge the symbol tables for the two - terminal descriptions.</p> + <p>intrusive warnings from GNU grep regarding fgrep and + egrep</p> </li> <li> - <p>On simpleterm's side, their bug was finally fixed in - <a href= - "https://git.suckless.org/st/commit/83866428de031300eab03fbb116bcf7d2b1d4f60.html"> - late 2019</a>, three years after the bug was created.</p> + <p>fatal errors in compile-checks, arising from recent + “Modern C” efforts by some developers which + caused longstanding configure checks to fail.</p> + + <p>After repairing the configure script, none of that + activity affected ncurses because stricter warnings are used + routinely in development.</p> </li> </ul> - <p>For ncurses, the elapsed time to fix this bug was less than - three years. Someone reported a problem with the terminal - description a few weeks after releasing ncurses 6.1 (in <a href= - "https://github.com/tmux/tmux/issues/1264">tmux #1264</a>), and - the terminal description was updated that week (ncurses patch - <a href="@HOMEPAGE@/NEWS.html#t20180224">20180224</a>):</p> - - <blockquote> - <pre class="demo-name"> -20180224 - + modify _nc_resolve_uses2() to detect incompatible types when merging - a "use=" clause of extended capabilities. The problem was seen in a - defective terminfo integrated from simpleterm sources in 20171111, - compounded by repair in 20180121. - + correct Ss/Ms interchange in st-0.7 entry (tmux #1264) -TD -</pre> - </blockquote> - - <p>The larger part of that change added a check to prevent a - simple merge of terminal descriptions where the same user-defined - name was used with different types. But it raised some - questions:</p> + <p>Other improvements made to configure checks include</p> <ul> <li> - <p>Was there a reliable way to manage terminal descriptions - which used the same extended name in different ways?</p> + <p>use <a href= + "@HOMEPAGE@/INSTALL.html#option:enable-string-hacks">string-hacks</a> + in alloc_entry.c, alloc_type.c and hardscroll.c, overlooked + due to compiler changes in recent OpenBSD releases</p> </li> <li> - <p>Should ncurses provide a registry of well-known extended - names, with their types?</p> + <p>revise progs.priv.h to provide for NC_ISATTY reuse</p> </li> - </ul> - - <p>Since the correction to <a href= - "@HOMEPAGE@/ncurses.html#download_database"><tt>terminfo.src</tt></a> - could have been readily adopted by packagers, there was nothing - more to be done from ncurses' standpoint on that part. But - improving ncurses to prevent issues like that is the reason for - making a release.</p> - <p>Nothing more (constructive) was mentioned with regard to - simpleterm. But a few problems were found in the handling of - user-defined capabilities:</p> + <li> + <p>configure check for MB_LEN_MAX provides warning as + needed</p> + </li> - <ul> <li> - <p>Forward-references to user-defined capabilities in a - “<tt>use=</tt>” clause did not allocate new data - for each use. In <em>tic</em>, successive compilation of - terminal entries could add user-defined capabilities to the - wrong terminal entry.</p> + <p>trim a space after some "-R" options, fixing builds for + applications built using clang and ncurses on Solaris</p> + </li> - <p>This was not noticed before, since xterm's terminal - descriptions were the main users of the feature, and almost - all of the uses of the building-blocks which contained - user-defined capabilities were backward-references.</p> + <li> + <p>work around misconfiguration of MacPorts gcc13, which + exposes invalid definition of <tt>MB_LEN_MAX</tt> in gcc's + fallback copy of <tt>limits.h</tt></p> </li> <li> - <p>There is one (documented) case where ncurses 6.1 supports - a user-defined capability that could be any type (i.e., - “RGB”). The check added in February 2018 to guard - against mismatches did not handle all of the combinations - needed.</p> + <p>modified experimental Windows driver works with xterm + mouse protocol</p> </li> </ul> - <p>Both of these issues dated from the original implementation of - user-defined capabilities. Fixing them does not change the - terminal database, but a older <em>tic</em> without the fixes - will not be able to handle terminfo sources which rely upon those - fixes. Starting in June 2019, the download link for the terminfo - source file was capped at that date. The development sources have - an up-to-date copy of the file, for people with a legitimate need - for it.</p> - - <p>The “<tt>-c</tt>” (check) option of <em>tic</em> - is not very useful if it cannot offer advice on parameters needed - for user-defined capabilities. The various <em>Caps</em> files - were reorganized to reduce redundancy, and in the common portion - (<a href= - "https://github.com/ThomasDickey/ncurses-snapshots/blob/master/include/Caps-ncurses">Caps-ncurses</a>), - a registry of user-defined capabilities is provided for use by - <em>tic</em>. While users can still define their own custom - capabilities, <em>tic</em> will not offer any advice when their - parameters do not match.</p> - - <p>In ncurses 6.2, <em>tic</em> makes a special check to allow - any type for <em>RGB</em>, but its being able to do this relies - upon fixes made in the ncurses library in mid-2019.</p> - - <h3><a name="h3-config-config" id= - "h3-config-config">Configuration changes</a></h3> - - <h4><a name="h4-config-major" id="h4-config-major">Major - changes</a></h4> - - <p>There are no major changes. Several new options were added to - ease integration of packages with systems using different - versions of <em>GNAT</em> and <em>ncurses</em>. Also, - improvements were made to configure checks.</p> - <h4><a name="h4-config-options" id= "h4-config-options">Configuration options</a></h4> - <p>There are a few new/modified configure options:</p> + <p>There are a few new configure options:</p> <dl> - <dt><tt>--with-config-suffix</tt> + <dt><a href= + "@HOMEPAGE@/INSTALL.html#option:disable-setuid-environ"><tt>--disable-setuid-environ</tt></a> </dt> <dd> - <p>helps work around a filename conflict with Debian packages - versus test-packages.</p> + <p>Compile with environment restriction, so certain + environment variables are not available when running via a + setuid/setgid application. These are (for example + <tt>$TERMINFO</tt>) those that allow the search path for the + terminfo or termcap entry to be customized.</p> + + <p>A setuid/setgid application inherits its environment + variables from the current user, in contrast to sudo which + may limit the environment variables that ncurses uses.</p> </dd> - <dt><tt>--with-ada-libname</tt> + <dt><a href= + "@HOMEPAGE@/INSTALL.html#option:enable-check-size"><tt>--enable-check-size</tt></a> </dt> <dd> - <p>allows one to rename the “AdaCurses” library - (at least one packager prefers a lowercase name).</p> + <p>Compile-in feature to detect screensize for terminals + which do not advertise their screensize, e.g., serial + terminals.</p> </dd> - <dt><tt>--with-fallbacks</tt> + <dt><a href= + "@HOMEPAGE@/INSTALL.html#option:with-abi-altered"><tt>--with-abi-altered=<em>NUM</em></tt></a> </dt> <dd> - <p>now ensures there is a value, and adds the fallback - information to top-level Makefile summary.</p> + <p>Override the displayed (rather than compiled-in) ABI. Only + packagers who have created configurations where the ABI + differs from ncurses should be interested in this option.</p> </dd> - <dt><tt>--with-pcre2</tt> + <dt><a href= + "@HOMEPAGE@/INSTALL.html#option:with-strip-program"><tt>--with-strip-program=<em>XXX</em></tt></a> </dt> <dd> - <p>check for pcre-posix library to help with MinGW port.</p> + <p>When stripping executables during install, use the + specified program rather than “strip” overriding + program chosen by the install program for stripping + executables.</p> </dd> + </dl> - <dt><tt>--with-tic-path</tt> and<br></dt> + <p>These configure options are modified:</p> - <dt><tt>--with-infocmp-path</tt> + <dl> + <dt><a href= + "@HOMEPAGE@/INSTALL.html#option:with-pkg-config-libdir"><tt>--with-pkg-config-libdir[=<em>DIR</em>]</tt></a> </dt> <dd> - <p>help work around problems building fallback source using - pre-6.0 tic/infocmp.</p> + <p>The optional <em>DIR</em> parameter can now be + “auto” to automatically use pkg-config's library + directory.</p> + + <p>The default is <tt>$(libdir)</tt>.</p> </dd> - <dt><tt>--with-versioned-syms</tt> + <dt><a href= + "@HOMEPAGE@/INSTALL.html#option:with-xterm-kbs"><tt>--with-xterm-kbs[=<em>XXX</em>]</tt></a> </dt> <dd> - <p>option value can now be a relative pathname.</p> + <p>The default is “auto” which tells the + configure script to choose BS or DEL according to platform + defaults.</p> </dd> </dl> @@ -1388,148 +974,117 @@ diff --git a/st.info b/st.info <ul> <li> - <p>ignore <a href= - "/ncurses/man/ncurses.3x.html#h3-TERMINFO"><tt>$TERMINFO</tt></a> - as a default value in configure script if it came from the - <tt>infocmp</tt> <strong><tt>-Q</tt></strong> option.</p> + <p>add/use configure check for <code>clock_gettime</code>, to + supersede <code>gettimeofday</code>.</p> </li> <li> - <p>distinguish gcc from icc and clang when the - <tt>--enable-warnings</tt> option is not used, to avoid - unnecessary warnings about unrecognized inline options</p> + <p>modify configure script check for pkg-config library + directory to take into account an older version 0.15.0 which + used PKG_CONFIG_PATH but not PKG_CONFIG_LIBDIR</p> </li> <li> - <p>consistently prepend new libraries as they are found - during configuration, rather than relying upon the linker to - resolve order dependencies of libraries.</p> + <p>allow for MinGW32-/64-bit configurations to use + _DEFAULT_SOURCE</p> </li> <li> - <p>modified configure scripts to reduce relinking/ranlib - during library install :</p> - - <ul> - <li>use “<tt>install -p</tt>” when available, - to avoid need for ranlib of static libraries.</li> - - <li>scripts which use - “<tt>--disable-relink</tt>;” add a 1-second - sleep to work around tools which use whole-second - timestamps, e.g., in <tt>utime</tt> rather than the actual - file system resolution.</li> - </ul> + <p>modify CF_XOPEN_SOURCE macro's amend default case to avoid + undefining _XOPEN_SOURCE if _POSIX_C_SOURCE is defined</p> </li> <li> - <p id="getenv-check">add configure check for <a href= - "#getenv-fixes"><tt>getenv</tt></a> to work around - implementation shown in Emscripten which overwrites the - previous return value on each call.</p> - - <p>Use that to optionally suppress <tt>START_TRACE</tt> - macro, whose call to <tt>getenv</tt> may not work - properly</p> + <p>updated configure script macro CF_XOPEN_SOURCE, for + uClibc-ng</p> </li> <li> - <p>change target configure level for <tt>_XOPEN_SOURCE</tt> - to 600 to address use of <tt>vsscanf</tt> and - <tt>setenv</tt>.</p> + <p>modify version-check for gcc/g++, now works for msys2</p> </li> <li> - <p>reduce use of <tt>_GNU_SOURCE</tt> for current glibc where - <tt>_DEFAULT_SOURCE</tt> combines with - <tt>_XOPEN_SOURCE</tt></p> + <p>build-fixes related to configure-options and/or + platform:</p> - <p>Allow for Cygwin's newlib when checking for the - _DEFAULT_SOURCE symbol.</p> + <ul> + <li>fix for <tt>--enable-fvisibility</tt></li> - <p>MidnightBSD is now checked for the - <tt>_XOPEN_SOURCE</tt>-related definitions.</p> - </li> + <li>fix for unusual values of + <tt>--with-rel-version</tt></li> - <li> - <p>If the check for <tt>va_copy</tt> or <tt>__va_copy</tt> - fails,</p> + <li>fix for unusual values of + <tt>--with-abi-version</tt></li> - <ul> - <li>configure now tries copying the pointers for - <tt>va_list</tt>, or as an array.</li> + <li>fix for <tt>--disable-tcap-names</tt></li> - <li>alternatively, it checks for - <tt>__builtin_va_copy</tt>(), which could be used with AIX - <tt>xlc</tt> in <em>c89</em> mode.</li> + <li>fix for termcap in <tt>nc_access.h</tt></li> </ul> </li> <li> - <p>several changes to support a port to Ultrix 3.1:</p> + <p>other configure-script improvements:</p> <ul> - <li>check if "b" binary feature of fopen works</li> + <li>recent msys2 headers work with + <tt>_DEFAULT_SOURCE</tt>; amend check</li> - <li>check for missing feature of locale.h</li> + <li>use <tt>$ac_includes_default</tt> in most cases where + stdlib.h should work</li> - <li>add fallback for strstr() in test-programs</li> + <li>use <tt>#error</tt> consistently vs "make an + error"</li> - <li>add fallback for STDOUT_FILENO in test-programs</li> + <li>add configure macro for <tt>gettimeofday</tt> vs inline + check</li> </ul> </li> + </ul> - <li> - <p>The <em>test/configure</em> script (used for <a href= - "/ncurses/ncurses-examples.html"><em>ncurses-examples</em></a>) - is improved:</p> - - <ul> - <li>work around non-ncurses termcap.h file, e.g., in - Slackware.</li> + <p>Here are some of the other portability fixes:</p> - <li>check for <a href= - "/ncurses/man/curs_variables.3x.html#h3-TABSIZE"><tt>TABSIZE</tt></a> - variable.</li> + <ul> + <li> + <p>modify configure scripts/makefiles to omit + <tt>KEY_RESIZE</tt> if the corresponding <tt>SIGWINCH</tt> + feature is disabled</p> + </li> - <li>checks for the X11/Intrinsic.h header, accommodate - recent MacOS changes which largely emptied - <tt>/usr/include</tt>.</li> - </ul> + <li> + <p>increase <tt>MB_CUR_MAX</tt> to 16, matching glibc's + <tt>MB_LEN_MAX</tt></p> </li> - </ul> - <p>Here are some of the other portability fixes:</p> + <li> + <p>add BSD <tt>erase2</tt> to characters handled by + tset/reset</p> + </li> - <ul> <li> - <p>added dummy "check" rule in top-level and test-Makefile to - simplify building test-packages for ArchLinux.</p> + <p>use <tt>getauxval</tt> when available, to improve + <tt>setuid</tt>/<tt>setgid</tt> checks</p> </li> <li> - <p>dropped library-dependency on psapi for MinGW port, since - win_driver.c defines <tt>PSAPI_VERSION</tt> to 2, making it - use <tt>GetProcessImageFileName</tt> from kernel32.dll</p> + <p>set <tt>dwShareMode</tt> in calls to + <tt>CreateConsoleScreenBuffer</tt></p> </li> <li> - <p>made build-fixes for configuration using --program-suffix - with Ada95, noticed with MacOS but applicable to other - platforms without libpanelw, etc.</p> + <p>use <tt>CreateFile</tt> with "<tt>CONIN$</tt>", + "<tt>CONOUT$</tt>" rather than <tt>GetStdHandle</tt> to + obtain a handle on the actual console, avoiding redirection + in the MinGW/Win32 configurations</p> </li> <li> - <p>modified ncurses/Makefile.in to fix a case where - Debian/testing changes to the ld --as-needed configuration - broke ncurses-examples test packages.</p> + <p>modify MinGW driver to return <tt>KEY_BACKSPACE</tt> when + an unmodified <tt>VK_BACK</tt> virtual key is entered</p> </li> <li> - <p>used <tt>_WIN32</tt>/<tt>_WIN64</tt> in preference to - <tt>__MINGW32__</tt>/<tt>__MINGW64__</tt> symbols to simplify - building with Microsoft Visual C++, since the former are - defined in both compiler configurations.</p> + <p>modify MinGW configuration to provide for running in + MSYS/MSYS2 shells, assuming ConPTY support</p> </li> </ul> @@ -1548,30 +1103,31 @@ diff --git a/st.info b/st.info </li> <li> - <p><span class="main-name">ncurses</span> supports all of the - for SVr4 curses features including keyboard mapping, color, - forms-drawing with ACS characters, and automatic recognition + <p><span class="main-name">ncurses</span> supports the + features of SVr4 curses including keyboard mapping, color, + form drawing with ACS characters, and automatic recognition of keypad and function keys.</p> </li> <li> - <p><span class="main-name">ncurses</span> provides these SVr4 - add-on libraries (not part of X/Open Curses):</p> + <p><span class="main-name">ncurses</span> provides work-alike + replacements of SVr4 supplemental libraries based on curses, + but which were not specified by X/Open Curses:</p> <ul> <li> - <p>the panels library, supporting a stack of windows with - backing store.</p> + <p>the panel library, supporting a stack of windows with + backing store</p> </li> <li> - <p>the menus library, supporting a uniform but flexible - interface for menu programming.</p> + <p>the menu library, supporting a uniform but flexible + interface for menu programming</p> </li> <li> <p>the form library, supporting data collection through - on-screen forms.</p> + on-screen forms</p> </li> </ul> </li> @@ -1583,7 +1139,7 @@ diff --git a/st.info b/st.info <ul> <li> <p><span class="main-name">ncurses</span> supports - user-defined capabilities which it can see, but which are + user-defined capabilities that it can see, but which are hidden from SVr4 curses applications using the <em>same</em> terminal database.</p> </li> @@ -1605,7 +1161,7 @@ diff --git a/st.info b/st.info <p>The <span class="main-name">ncurses</span> utilities have options to allow you to filter terminfo entries for use with less capable <em>curses</em>/<em>terminfo</em> versions such - as the HP/UX and AIX ports.</p> + as the HP-UX and AIX ports.</p> </li> </ul> @@ -1615,11 +1171,11 @@ diff --git a/st.info b/st.info <ul> <li> <p>The API is 8-bit clean and base-level conformant with the - X/OPEN curses specification, XSI curses (that is, it - implements all BASE level features, and most EXTENDED - features). It includes many function calls not supported - under SVr4 curses (but portability of all calls is documented - so you can use the SVr4 subset only).</p> + X/Open Curses specification, XSI curses (that is, it + implements all <em>BASE</em> level features, and almost all + <em>EXTENDED</em> features). It includes many function calls + not supported under SVr4 curses (but portability of all calls + is documented so you can use the SVr4 subset only).</p> </li> <li> @@ -1661,6 +1217,11 @@ diff --git a/st.info b/st.info than one control sequence to map to a given key code.</p> </li> + <li> + <p>Support for direct-color terminals, such as modern + xterm.</p> + </li> + <li> <p>Support for 256-color terminals, such as modern xterm.</p> </li> @@ -1751,10 +1312,27 @@ diff --git a/st.info b/st.info </li> <li> - <p>The library meets the XSI requirement that every macro - entry point have a corresponding function which may be linked - (and will be prototype-checked) if the macro definition is - disabled with <code>#undef</code>.</p> + <p>X/Open Curses permits most functions it specifies to be + made available as macros as well. ncurses does this</p> + + <ul> + <li>to improve performance, e.g., for operations composed + of simpler functions such as cursor movement following by + adding text to the screen,</li> + + <li>to simplify the implementation by reusing functions + which use common parameters, e.g., the standard screen + <code>stdscr</code>, and</li> + + <li>to provide functions that return values via their + parameters</li> + </ul> + + <p>Except for the last case, ncurses provides a non-macro + implementation of the function. If the macro definition is + disabled with <code>#undef</code>, or by defining + <code>NCURSES_NOMACROS</code> the function may be linked (and + its calls will be checked against the prototype).</p> </li> <li> @@ -1856,7 +1434,8 @@ diff --git a/st.info b/st.info <p>New vi uses ncurses.</p> <p><a href= - "https://sites.google.com/a/bostic.com/keithbostic/vi">https://sites.google.com/a/bostic.com/keithbostic/vi</a><br> + "https://sites.google.com/a/bostic.com/keithbostic/the-berkeley-vi-editor-home-page"> + https://sites.google.com/a/bostic.com/keithbostic/the-berkeley-vi-editor-home-page</a><br> </p> </dd> @@ -1904,7 +1483,7 @@ diff --git a/st.info b/st.info <p>terminal emulator for serial modem connections</p> <p><a href= - "https://alioth.debian.org/projects/minicom/">https://alioth.debian.org/projects/minicom/</a></p> + "https://salsa.debian.org/minicom-team/minicom">https://salsa.debian.org/minicom-team/minicom</a></p> </dd> <dt><span class="part-name">mosh</span> @@ -1913,8 +1492,7 @@ diff --git a/st.info b/st.info <dd> <p>a replacement for <code>ssh</code>.</p> - <p><a href= - "https://mosh.mit.edu/">https://mosh.mit.edu/</a></p> + <p><a href="https://mosh.org/">https://mosh.org/</a></p> </dd> <dt><span class="part-name">tack</span> @@ -2005,7 +1583,7 @@ diff --git a/st.info b/st.info <p>Ongoing development work is done by <a href= "mailto:dickey@invisible-island.net">Thomas E. Dickey</a>. Thomas E. Dickey has acted as the maintainer for the Free Software - Foundation, which holds a <a href= + Foundation, which held a <a href= "@HOMEPAGE@/ncurses-license.html">copyright on ncurses</a> for releases 4.2 through 6.1. Following the release of ncurses 6.1, effective as of release 6.2, copyright for ncurses reverted to @@ -2026,7 +1604,6 @@ diff --git a/st.info b/st.info "mailto:bug-ncurses-request@gnu.org">bug-ncurses-request@gnu.org</a> </blockquote> containing the line: - <blockquote> <p><code>subscribe</code> <em><name>@<host.domain></em></p> @@ -2040,7 +1617,7 @@ diff --git a/st.info b/st.info <blockquote> <p><a href= - "ftp://ftp.invisible-island.net/ncurses/current/">ftp://ftp.invisible-island.net/ncurses/current/</a> + "https://invisible-island.net/archives/ncurses/current/">https://invisible-island.net/archives/ncurses/current/</a> and<br> <a href= "https://invisible-mirror.net/archives/ncurses/current/">https://invisible-mirror.net/archives/ncurses/current/</a> .</p> @@ -2050,19 +1627,17 @@ diff --git a/st.info b/st.info <blockquote> <p><a href= - "ftp://ftp.invisible-island.net/ncurses/6.1/">ftp://ftp.invisible-island.net/ncurses/6.1/</a> + "https://invisible-island.net/archives/ncurses/6.4/">https://invisible-island.net/archives/ncurses/6.4/</a> and<br> <a href= - "https://invisible-mirror.net/archives/ncurses/6.1/">https://invisible-mirror.net/archives/ncurses/6.1/</a> .</p> + "https://invisible-mirror.net/archives/ncurses/6.4/">https://invisible-mirror.net/archives/ncurses/6.4/</a> .</p> </blockquote> <p>There is an archive of the mailing list here:</p> <blockquote> <p><a href= - "http://lists.gnu.org/archive/html/bug-ncurses">http://lists.gnu.org/archive/html/bug-ncurses</a> - (also <a href= - "https://lists.gnu.org/archive/html/bug-ncurses">https</a>)</p> + "https://lists.gnu.org/archive/html/bug-ncurses">https://lists.gnu.org/archive/html/bug-ncurses</a> .</p> </blockquote> <h2><a name="h2-this-stuff" id="h2-this-stuff">Related @@ -2082,6 +1657,9 @@ diff --git a/st.info b/st.info <span class="main-name">ncurses</span> versus <span class= "main-name">slang</span> (S-Lang)</a></li> + <li><a href="@HOMEPAGE@/ncurses-openbsd.html">Comments on + <span class="main-name">OpenBSD</span></a></li> + <li><a href="@HOMEPAGE@/tack.html">tack – terminfo action checker</a></li> @@ -2101,14 +1679,15 @@ diff --git a/st.info b/st.info <a href="http://www.catb.org/~esr/terminfo/">Eric Raymond</a> . Unlike the older version, the termcap and terminfo data are provided in the same file, which also provides - several user-definable extensions beyond the X/Open + several user-definable extensions beyond the X/Open Curses specification.</p> <p>You can find lots of information on terminal-related topics - not covered in the terminfo file at <a href= - "http://web.archive.org/web/*/http://www.cs.utk.edu/~shuford/terminal"> - Richard Shuford's archive</a> . The collection of computer - manuals at <a href= + not covered in the terminfo file in <a href= + "https://shuford.invisible-island.net/">Richard Shuford's + archive</a> (<a href= + "http://web.archive.org/web/*/http://www.cs.utk.edu/~shuford/terminal">original</a>). + The collection of computer manuals at <a href= "http://www.bitsavers.org/pdf/">bitsavers.org</a> has also been useful.</p> @@ -2118,11 +1697,9 @@ diff --git a/st.info b/st.info <li> <a href="#h2-release-notes">Release Notes</a> - <ul> <li> <a href="#h3-library">Library improvements</a> - <ul> <li><a href="#h4-new-library">New features</a></li> @@ -2133,7 +1710,6 @@ diff --git a/st.info b/st.info <li> <a href="#h3-programs">Program improvements</a> - <ul> <li><a href="#h4-utilities">Utilities</a></li> @@ -2149,7 +1725,6 @@ diff --git a/st.info b/st.info <li> <a href="#h3-config-config">Configuration changes</a> - <ul> <li><a href="#h4-config-major">Major changes</a></li> diff --git contrib/ncurses/config.guess contrib/ncurses/config.guess index 95b16c7747a1..f47d666d340b 100755 --- contrib/ncurses/config.guess +++ contrib/ncurses/config.guess @@ -1,12 +1,14 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2019 Free Software Foundation, Inc. +# Copyright 1992-2023 Free Software Foundation, Inc. -timestamp='2019-12-21' +# shellcheck disable=SC2006,SC2268 # see below for rationale + +timestamp='2023-10-19' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or +# the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but @@ -27,17 +29,25 @@ timestamp='2019-12-21' # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: -# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess +# https://git.savannah.gnu.org/cgit/config.git/plain/config.guess # # Please send patches to <config-patches@gnu.org>. +# The "shellcheck disable" line above the timestamp inhibits complaints +# about features and limitations of the classic Bourne shell that were +# superseded or lifted in POSIX. However, this script identifies a wide +# variety of pre-POSIX systems that do not have POSIX shells at all, and +# even some reasonably current systems (Solaris 10 as case-in-point) still +# have a pre-POSIX /bin/sh. + + me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] -Output the configuration name of the system \`$me' is run on. +Output the configuration name of the system '$me' is run on. Options: -h, --help print this help, then exit @@ -50,13 +60,13 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2019 Free Software Foundation, Inc. +Copyright 1992-2023 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" -Try \`$me --help' for more information." +Try '$me --help' for more information." # Parse command line while test $# -gt 0 ; do @@ -84,13 +94,16 @@ if test $# != 0; then exit 1 fi +# Just in case it came from the environment. +GUESS= + # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. +# Historically, 'CC_FOR_BUILD' used to be named 'HOST_CC'. We still +# use 'HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. @@ -102,7 +115,7 @@ set_cc_for_build() { # prevent multiple calls if $tmp is already set test "$tmp" && return 0 : "${TMPDIR=/tmp}" - # shellcheck disable=SC2039 + # shellcheck disable=SC2039,SC3028 { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || @@ -112,7 +125,7 @@ set_cc_for_build() { ,,) echo "int x;" > "$dummy.c" for driver in cc gcc c89 c99 ; do if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then - CC_FOR_BUILD="$driver" + CC_FOR_BUILD=$driver break fi done @@ -133,40 +146,57 @@ fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown -case "$UNAME_SYSTEM" in +case $UNAME_SYSTEM in Linux|GNU|GNU/*) - # If the system lacks a compiler, then just pick glibc. - # We could probably try harder. - LIBC=gnu + LIBC=unknown set_cc_for_build cat <<-EOF > "$dummy.c" + #if defined(__ANDROID__) + LIBC=android + #else #include <features.h> #if defined(__UCLIBC__) LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc - #else + #elif defined(__GLIBC__) LIBC=gnu + #elif defined(__LLVM_LIBC__) + LIBC=llvm + #else + #include <stdarg.h> + /* First heuristic to detect musl libc. */ + #ifdef __DEFINED_va_list + LIBC=musl + #endif + #endif #endif EOF - eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`" + cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` + eval "$cc_set_libc" - # If ldd exists, use it to detect musl libc. - if command -v ldd >/dev/null && \ - ldd --version 2>&1 | grep -q ^musl - then - LIBC=musl + # Second heuristic to detect musl libc. + if [ "$LIBC" = unknown ] && + command -v ldd >/dev/null && + ldd --version 2>&1 | grep -q ^musl; then + LIBC=musl + fi + + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + if [ "$LIBC" = unknown ]; then + LIBC=gnu fi ;; esac # Note: order is significant - the case branches are not exclusive. -case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in +case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, @@ -178,12 +208,12 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ - "/sbin/$sysctl" 2>/dev/null || \ - "/usr/sbin/$sysctl" 2>/dev/null || \ + /sbin/sysctl -n hw.machine_arch 2>/dev/null || \ + /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \ echo unknown)` - case "$UNAME_MACHINE_ARCH" in + case $UNAME_MACHINE_ARCH in + aarch64eb) machine=aarch64_be-unknown ;; armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; @@ -192,13 +222,13 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in earmv*) arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` - machine="${arch}${endian}"-unknown + machine=${arch}${endian}-unknown ;; - *) machine="$UNAME_MACHINE_ARCH"-unknown ;; + *) machine=$UNAME_MACHINE_ARCH-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently (or will in the future) and ABI. - case "$UNAME_MACHINE_ARCH" in + case $UNAME_MACHINE_ARCH in earm*) os=netbsdelf ;; @@ -219,7 +249,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in ;; esac # Determine ABI tags. - case "$UNAME_MACHINE_ARCH" in + case $UNAME_MACHINE_ARCH in earm*) expr='s/^earmv[0-9]/-eabi/;s/eb$//' abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` @@ -230,7 +260,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. - case "$UNAME_VERSION" in + case $UNAME_VERSION in Debian*) release='-gnu' ;; @@ -241,51 +271,57 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "$machine-${os}${release}${abi-}" - exit ;; + GUESS=$machine-${os}${release}${abi-} + ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` - echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE + ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE + ;; + *:SecBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/SecBSD.//'` + GUESS=$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE + ;; *:LibertyBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` - echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE + ;; *:MidnightBSD:*:*) - echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE + ;; *:ekkoBSD:*:*) - echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE + ;; *:SolidBSD:*:*) - echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE + ;; *:OS108:*:*) - echo "$UNAME_MACHINE"-unknown-os108_"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE + ;; macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd"$UNAME_RELEASE" - exit ;; + GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE + ;; *:MirBSD:*:*) - echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE + ;; *:Sortix:*:*) - echo "$UNAME_MACHINE"-unknown-sortix - exit ;; + GUESS=$UNAME_MACHINE-unknown-sortix + ;; *:Twizzler:*:*) - echo "$UNAME_MACHINE"-unknown-twizzler - exit ;; + GUESS=$UNAME_MACHINE-unknown-twizzler + ;; *:Redox:*:*) - echo "$UNAME_MACHINE"-unknown-redox - exit ;; + GUESS=$UNAME_MACHINE-unknown-redox + ;; mips:OSF1:*.*) - echo mips-dec-osf1 - exit ;; + GUESS=mips-dec-osf1 + ;; alpha:OSF1:*:*) + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + trap '' 0 case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` @@ -299,7 +335,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in + case $ALPHA_CPU_TYPE in "EV4 (21064)") UNAME_MACHINE=alpha ;; "EV4.5 (21064)") @@ -336,117 +372,121 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. - echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`" - # Reset EXIT trap before exiting to avoid spurious non-zero exit code. - exitcode=$? - trap '' 0 - exit $exitcode ;; + OSF_REL=`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` + GUESS=$UNAME_MACHINE-dec-osf$OSF_REL + ;; Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit ;; + GUESS=m68k-unknown-sysv4 + ;; *:[Aa]miga[Oo][Ss]:*:*) - echo "$UNAME_MACHINE"-unknown-amigaos - exit ;; + GUESS=$UNAME_MACHINE-unknown-amigaos + ;; *:[Mm]orph[Oo][Ss]:*:*) - echo "$UNAME_MACHINE"-unknown-morphos - exit ;; + GUESS=$UNAME_MACHINE-unknown-morphos + ;; *:OS/390:*:*) - echo i370-ibm-openedition - exit ;; + GUESS=i370-ibm-openedition + ;; *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; + GUESS=s390-ibm-zvmoe + ;; *:OS400:*:*) - echo powerpc-ibm-os400 - exit ;; + GUESS=powerpc-ibm-os400 + ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix"$UNAME_RELEASE" - exit ;; + GUESS=arm-acorn-riscix$UNAME_RELEASE + ;; arm*:riscos:*:*|arm*:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; + GUESS=arm-unknown-riscos + ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit ;; + GUESS=hppa1.1-hitachi-hiuxmpp + ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit ;; + case `(/bin/universe) 2>/dev/null` in + att) GUESS=pyramid-pyramid-sysv3 ;; + *) GUESS=pyramid-pyramid-bsd ;; + esac + ;; NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit ;; + GUESS=pyramid-pyramid-svr4 + ;; DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit ;; + GUESS=sparc-icl-nx6 + ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7; exit ;; - esac ;; + sparc) GUESS=sparc-icl-nx7 ;; + esac + ;; s390x:SunOS:*:*) - echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=$UNAME_MACHINE-ibm-solaris2$SUN_REL + ;; sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=sparc-hal-solaris2$SUN_REL + ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=sparc-sun-solaris2$SUN_REL + ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) - echo i386-pc-auroraux"$UNAME_RELEASE" - exit ;; + GUESS=i386-pc-auroraux$UNAME_RELEASE + ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) set_cc_for_build SUN_ARCH=i386 # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. - if [ "$CC_FOR_BUILD" != no_compiler_found ]; then + if test "$CC_FOR_BUILD" != no_compiler_found; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + (CCOPTS="" $CC_FOR_BUILD -m64 -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH=x86_64 fi fi - echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=$SUN_ARCH-pc-solaris2$SUN_REL + ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=sparc-sun-solaris3$SUN_REL + ;; sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in + case `/usr/bin/arch -k` in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`" - exit ;; + # Japanese Language versions have a version number like '4.1.3-JL'. + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'` + GUESS=sparc-sun-sunos$SUN_REL + ;; sun3*:SunOS:*:*) - echo m68k-sun-sunos"$UNAME_RELEASE" - exit ;; + GUESS=m68k-sun-sunos$UNAME_RELEASE + ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 - case "`/bin/arch`" in + case `/bin/arch` in sun3) - echo m68k-sun-sunos"$UNAME_RELEASE" + GUESS=m68k-sun-sunos$UNAME_RELEASE ;; sun4) - echo sparc-sun-sunos"$UNAME_RELEASE" + GUESS=sparc-sun-sunos$UNAME_RELEASE ;; esac - exit ;; + ;; aushp:SunOS:*:*) - echo sparc-auspex-sunos"$UNAME_RELEASE" - exit ;; + GUESS=sparc-auspex-sunos$UNAME_RELEASE + ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor @@ -456,41 +496,41 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-atari-mint$UNAME_RELEASE + ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-atari-mint$UNAME_RELEASE + ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-atari-mint$UNAME_RELEASE + ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-milan-mint$UNAME_RELEASE + ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-hades-mint$UNAME_RELEASE + ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-unknown-mint$UNAME_RELEASE + ;; m68k:machten:*:*) - echo m68k-apple-machten"$UNAME_RELEASE" - exit ;; + GUESS=m68k-apple-machten$UNAME_RELEASE + ;; powerpc:machten:*:*) - echo powerpc-apple-machten"$UNAME_RELEASE" - exit ;; + GUESS=powerpc-apple-machten$UNAME_RELEASE + ;; RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit ;; + GUESS=mips-dec-mach_bsd4.3 + ;; RISC*:ULTRIX:*:*) - echo mips-dec-ultrix"$UNAME_RELEASE" - exit ;; + GUESS=mips-dec-ultrix$UNAME_RELEASE + ;; VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix"$UNAME_RELEASE" - exit ;; + GUESS=vax-dec-ultrix$UNAME_RELEASE + ;; 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix"$UNAME_RELEASE" - exit ;; + GUESS=clipper-intergraph-clix$UNAME_RELEASE + ;; mips:*:*:UMIPS | mips:*:*:RISCos) set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" @@ -518,75 +558,76 @@ EOF dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`"$dummy" "$dummyarg"` && { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos"$UNAME_RELEASE" - exit ;; + GUESS=mips-mips-riscos$UNAME_RELEASE + ;; Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit ;; + GUESS=powerpc-motorola-powermax + ;; Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax - exit ;; + GUESS=powerpc-harris-powermax + ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax - exit ;; + GUESS=powerpc-harris-powermax + ;; Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit ;; + GUESS=powerpc-harris-powerunix + ;; m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit ;; + GUESS=m88k-harris-cxux7 + ;; m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit ;; + GUESS=m88k-motorola-sysv4 + ;; m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit ;; + GUESS=m88k-motorola-sysv3 + ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ] + if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110 then - if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \ - [ "$TARGET_BINARY_INTERFACE"x = x ] + if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \ + test "$TARGET_BINARY_INTERFACE"x = x then - echo m88k-dg-dgux"$UNAME_RELEASE" + GUESS=m88k-dg-dgux$UNAME_RELEASE else - echo m88k-dg-dguxbcs"$UNAME_RELEASE" + GUESS=m88k-dg-dguxbcs$UNAME_RELEASE fi else - echo i586-dg-dgux"$UNAME_RELEASE" + GUESS=i586-dg-dgux$UNAME_RELEASE fi - exit ;; + ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit ;; + GUESS=m88k-dolphin-sysv3 + ;; M88*:*:R3*:*) # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit ;; + GUESS=m88k-motorola-sysv3 + ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit ;; + GUESS=m88k-tektronix-sysv3 + ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit ;; + GUESS=m68k-tektronix-bsd + ;; *:IRIX*:*:*) - echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`" - exit ;; + IRIX_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/g'` + GUESS=mips-sgi-irix$IRIX_REL + ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + GUESS=romp-ibm-aix # uname -m gives an 8 hex-code CPU id + ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) - echo i386-ibm-aix - exit ;; + GUESS=i386-ibm-aix + ;; ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then + if test -x /usr/bin/oslevel ; then IBM_REV=`/usr/bin/oslevel` else - IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" + IBM_REV=$UNAME_VERSION.$UNAME_RELEASE fi - echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV" - exit ;; + GUESS=$UNAME_MACHINE-ibm-aix$IBM_REV + ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then set_cc_for_build @@ -603,16 +644,16 @@ EOF EOF if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` then - echo "$SYSTEM_NAME" + GUESS=$SYSTEM_NAME else - echo rs6000-ibm-aix3.2.5 + GUESS=rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 + GUESS=rs6000-ibm-aix3.2.4 else - echo rs6000-ibm-aix3.2 + GUESS=rs6000-ibm-aix3.2 fi - exit ;; + ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then @@ -620,56 +661,56 @@ EOF else IBM_ARCH=powerpc fi - if [ -x /usr/bin/lslpp ] ; then - IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | + if test -x /usr/bin/lslpp ; then + IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | \ awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else - IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" + IBM_REV=$UNAME_VERSION.$UNAME_RELEASE fi - echo "$IBM_ARCH"-ibm-aix"$IBM_REV" - exit ;; + GUESS=$IBM_ARCH-ibm-aix$IBM_REV + ;; *:AIX:*:*) - echo rs6000-ibm-aix - exit ;; + GUESS=rs6000-ibm-aix + ;; ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) - echo romp-ibm-bsd4.4 - exit ;; + GUESS=romp-ibm-bsd4.4 + ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to - exit ;; # report: romp-ibm BSD 4.3 + GUESS=romp-ibm-bsd$UNAME_RELEASE # 4.3 with uname added to + ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) - echo rs6000-bull-bosx - exit ;; + GUESS=rs6000-bull-bosx + ;; DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit ;; + GUESS=m68k-bull-sysv3 + ;; 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit ;; + GUESS=m68k-hp-bsd + ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit ;; + GUESS=m68k-hp-bsd4.4 + ;; 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` - case "$UNAME_MACHINE" in + HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` + case $UNAME_MACHINE in 9000/31?) HP_ARCH=m68000 ;; 9000/[34]??) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then + if test -x /usr/bin/getconf; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "$sc_cpu_version" in + case $sc_cpu_version in 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 - case "$sc_kernel_bits" in + case $sc_kernel_bits in 32) HP_ARCH=hppa2.0n ;; 64) HP_ARCH=hppa2.0w ;; '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 esac ;; esac fi - if [ "$HP_ARCH" = "" ]; then + if test "$HP_ARCH" = ""; then set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" @@ -708,7 +749,7 @@ EOF test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac - if [ "$HP_ARCH" = hppa2.0w ] + if test "$HP_ARCH" = hppa2.0w then set_cc_for_build @@ -729,12 +770,12 @@ EOF HP_ARCH=hppa64 fi fi - echo "$HP_ARCH"-hp-hpux"$HPUX_REV" - exit ;; + GUESS=$HP_ARCH-hp-hpux$HPUX_REV + ;; ia64:HP-UX:*:*) - HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux"$HPUX_REV" - exit ;; + HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` + GUESS=ia64-hp-hpux$HPUX_REV + ;; 3050*:HI-UX:*:*) set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" @@ -764,36 +805,36 @@ EOF EOF $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 - exit ;; + GUESS=unknown-hitachi-hiuxwe2 + ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) - echo hppa1.1-hp-bsd - exit ;; + GUESS=hppa1.1-hp-bsd + ;; 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit ;; + GUESS=hppa1.0-hp-bsd + ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit ;; + GUESS=hppa1.0-hp-mpeix + ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) - echo hppa1.1-hp-osf - exit ;; + GUESS=hppa1.1-hp-osf + ;; hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit ;; + GUESS=hppa1.0-hp-osf + ;; i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo "$UNAME_MACHINE"-unknown-osf1mk + if test -x /usr/sbin/sysversion ; then + GUESS=$UNAME_MACHINE-unknown-osf1mk else - echo "$UNAME_MACHINE"-unknown-osf1 + GUESS=$UNAME_MACHINE-unknown-osf1 fi - exit ;; + ;; parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit ;; + GUESS=hppa1.1-hp-lites + ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit ;; + GUESS=c1-convex-bsd + ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd @@ -801,17 +842,18 @@ EOF fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit ;; + GUESS=c34-convex-bsd + ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit ;; + GUESS=c38-convex-bsd + ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit ;; + GUESS=c4-convex-bsd + ;; CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=ymp-cray-unicos$CRAY_REL + ;; CRAY*[A-Z]90:*:*:*) echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ @@ -819,112 +861,153 @@ EOF -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) - echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=t90-cray-unicos$CRAY_REL + ;; CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=alphaev5-cray-unicosmk$CRAY_REL + ;; CRAY*SV1:*:*:*) - echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=sv1-cray-unicos$CRAY_REL + ;; *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=craynv-cray-unicosmp$CRAY_REL + ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; + GUESS=${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} + ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; + GUESS=sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} + ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE + ;; sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi"$UNAME_RELEASE" - exit ;; + GUESS=sparc-unknown-bsdi$UNAME_RELEASE + ;; *:BSD/OS:*:*) - echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE + ;; arm:FreeBSD:*:*) UNAME_PROCESSOR=`uname -p` set_cc_for_build if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then - echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabi + FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi else - echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabihf + FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf fi - exit ;; + ;; *:FreeBSD:*:*) - UNAME_PROCESSOR=`/usr/bin/uname -p` - case "$UNAME_PROCESSOR" in + UNAME_PROCESSOR=`uname -p` + case $UNAME_PROCESSOR in amd64) UNAME_PROCESSOR=x86_64 ;; i386) UNAME_PROCESSOR=i586 ;; esac - echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" - exit ;; + FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL + ;; i*:CYGWIN*:*) - echo "$UNAME_MACHINE"-pc-cygwin - exit ;; + GUESS=$UNAME_MACHINE-pc-cygwin + ;; *:MINGW64*:*) - echo "$UNAME_MACHINE"-pc-mingw64 - exit ;; + GUESS=$UNAME_MACHINE-pc-mingw64 + ;; *:MINGW*:*) - echo "$UNAME_MACHINE"-pc-mingw32 - exit ;; + GUESS=$UNAME_MACHINE-pc-mingw32 + ;; *:MSYS*:*) - echo "$UNAME_MACHINE"-pc-msys - exit ;; + GUESS=$UNAME_MACHINE-pc-msys + ;; i*:PW*:*) - echo "$UNAME_MACHINE"-pc-pw32 - exit ;; + GUESS=$UNAME_MACHINE-pc-pw32 + ;; + *:SerenityOS:*:*) + GUESS=$UNAME_MACHINE-pc-serenity + ;; *:Interix*:*) - case "$UNAME_MACHINE" in + case $UNAME_MACHINE in x86) - echo i586-pc-interix"$UNAME_RELEASE" - exit ;; + GUESS=i586-pc-interix$UNAME_RELEASE + ;; authenticamd | genuineintel | EM64T) - echo x86_64-unknown-interix"$UNAME_RELEASE" - exit ;; + GUESS=x86_64-unknown-interix$UNAME_RELEASE + ;; IA64) - echo ia64-unknown-interix"$UNAME_RELEASE" - exit ;; + GUESS=ia64-unknown-interix$UNAME_RELEASE + ;; esac ;; i*:UWIN*:*) - echo "$UNAME_MACHINE"-pc-uwin - exit ;; + GUESS=$UNAME_MACHINE-pc-uwin + ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-pc-cygwin - exit ;; + GUESS=x86_64-pc-cygwin + ;; prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=powerpcle-unknown-solaris2$SUN_REL + ;; *:GNU:*:*) # the GNU system - echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`" - exit ;; + GNU_ARCH=`echo "$UNAME_MACHINE" | sed -e 's,[-/].*$,,'` + GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's,/.*$,,'` + GUESS=$GNU_ARCH-unknown-$LIBC$GNU_REL + ;; *:GNU/*:*:*) # other systems with GNU libc and userland - echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC" - exit ;; + GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"` + GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC + ;; + x86_64:[Mm]anagarm:*:*|i?86:[Mm]anagarm:*:*) + GUESS="$UNAME_MACHINE-pc-managarm-mlibc" + ;; + *:[Mm]anagarm:*:*) + GUESS="$UNAME_MACHINE-unknown-managarm-mlibc" + ;; *:Minix:*:*) - echo "$UNAME_MACHINE"-unknown-minix - exit ;; + GUESS=$UNAME_MACHINE-unknown-minix + ;; aarch64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + set_cc_for_build + CPU=$UNAME_MACHINE + LIBCABI=$LIBC + if test "$CC_FOR_BUILD" != no_compiler_found; then + ABI=64 + sed 's/^ //' << EOF > "$dummy.c" + #ifdef __ARM_EABI__ + #ifdef __ARM_PCS_VFP + ABI=eabihf + #else + ABI=eabi + #endif + #endif +EOF + cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'` + eval "$cc_set_abi" + case $ABI in + eabi | eabihf) CPU=armv8l; LIBCABI=$LIBC$ABI ;; + esac + fi + GUESS=$CPU-unknown-linux-$LIBCABI + ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in EV5) UNAME_MACHINE=alphaev5 ;; @@ -937,60 +1020,72 @@ EOF esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC=gnulibc1 ; fi - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - arc:Linux:*:* | arceb:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; arm*:Linux:*:*) set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi + GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi else - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf + GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf fi fi - exit ;; + ;; avr32*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; cris:Linux:*:*) - echo "$UNAME_MACHINE"-axis-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-axis-linux-$LIBC + ;; crisv32:Linux:*:*) - echo "$UNAME_MACHINE"-axis-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-axis-linux-$LIBC + ;; e2k:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; frv:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; hexagon:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; i*86:Linux:*:*) - echo "$UNAME_MACHINE"-pc-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-pc-linux-$LIBC + ;; ia64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; k1om:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + kvx:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + kvx:cos:*:*) + GUESS=$UNAME_MACHINE-unknown-cos + ;; + kvx:mbr:*:*) + GUESS=$UNAME_MACHINE-unknown-mbr + ;; + loongarch32:Linux:*:* | loongarch64:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; m32r*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; m68*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; mips:Linux:*:* | mips64:Linux:*:*) set_cc_for_build IS_GLIBC=0 @@ -1035,113 +1130,135 @@ EOF #endif #endif EOF - eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'`" + cc_set_vars=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'` + eval "$cc_set_vars" test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; } ;; mips64el:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; openrisc*:Linux:*:*) - echo or1k-unknown-linux-"$LIBC" - exit ;; + GUESS=or1k-unknown-linux-$LIBC + ;; or32:Linux:*:* | or1k*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; padre:Linux:*:*) - echo sparc-unknown-linux-"$LIBC" - exit ;; + GUESS=sparc-unknown-linux-$LIBC + ;; parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-"$LIBC" - exit ;; + GUESS=hppa64-unknown-linux-$LIBC + ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;; - PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; - *) echo hppa-unknown-linux-"$LIBC" ;; + PA7*) GUESS=hppa1.1-unknown-linux-$LIBC ;; + PA8*) GUESS=hppa2.0-unknown-linux-$LIBC ;; + *) GUESS=hppa-unknown-linux-$LIBC ;; esac - exit ;; + ;; ppc64:Linux:*:*) - echo powerpc64-unknown-linux-"$LIBC" - exit ;; + GUESS=powerpc64-unknown-linux-$LIBC + ;; ppc:Linux:*:*) - echo powerpc-unknown-linux-"$LIBC" - exit ;; + GUESS=powerpc-unknown-linux-$LIBC + ;; ppc64le:Linux:*:*) - echo powerpc64le-unknown-linux-"$LIBC" - exit ;; + GUESS=powerpc64le-unknown-linux-$LIBC + ;; ppcle:Linux:*:*) - echo powerpcle-unknown-linux-"$LIBC" - exit ;; - riscv32:Linux:*:* | riscv64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=powerpcle-unknown-linux-$LIBC + ;; + riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; s390:Linux:*:* | s390x:Linux:*:*) - echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-ibm-linux-$LIBC + ;; sh64*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; sh*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; sparc:Linux:*:* | sparc64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; tile*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; vax:Linux:*:*) - echo "$UNAME_MACHINE"-dec-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-dec-linux-$LIBC + ;; x86_64:Linux:*:*) - echo "$UNAME_MACHINE"-pc-linux-"$LIBC" - exit ;; + set_cc_for_build + CPU=$UNAME_MACHINE + LIBCABI=$LIBC + if test "$CC_FOR_BUILD" != no_compiler_found; then + ABI=64 + sed 's/^ //' << EOF > "$dummy.c" + #ifdef __i386__ + ABI=x86 + #else + #ifdef __ILP32__ + ABI=x32 + #endif + #endif +EOF + cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'` + eval "$cc_set_abi" + case $ABI in + x86) CPU=i686 ;; + x32) LIBCABI=${LIBC}x32 ;; + esac + fi + GUESS=$CPU-pc-linux-$LIBCABI + ;; xtensa*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. - echo i386-sequent-sysv4 - exit ;; + GUESS=i386-sequent-sysv4 + ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. - echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION" - exit ;; + GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION + ;; i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility + # If we were able to find 'uname', then EMX Unix compatibility # is probably installed. - echo "$UNAME_MACHINE"-pc-os2-emx - exit ;; + GUESS=$UNAME_MACHINE-pc-os2-emx + ;; i*86:XTS-300:*:STOP) - echo "$UNAME_MACHINE"-unknown-stop - exit ;; + GUESS=$UNAME_MACHINE-unknown-stop + ;; i*86:atheos:*:*) - echo "$UNAME_MACHINE"-unknown-atheos - exit ;; + GUESS=$UNAME_MACHINE-unknown-atheos + ;; i*86:syllable:*:*) - echo "$UNAME_MACHINE"-pc-syllable - exit ;; + GUESS=$UNAME_MACHINE-pc-syllable + ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - echo i386-unknown-lynxos"$UNAME_RELEASE" - exit ;; + GUESS=i386-unknown-lynxos$UNAME_RELEASE + ;; i*86:*DOS:*:*) - echo "$UNAME_MACHINE"-pc-msdosdjgpp - exit ;; + GUESS=$UNAME_MACHINE-pc-msdosdjgpp + ;; i*86:*:4.*:*) UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" + GUESS=$UNAME_MACHINE-univel-sysv$UNAME_REL else - echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL" + GUESS=$UNAME_MACHINE-pc-sysv$UNAME_REL fi - exit ;; + ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in @@ -1149,12 +1266,12 @@ EOF *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac - echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}" - exit ;; + GUESS=$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` - echo "$UNAME_MACHINE"-pc-isc"$UNAME_REL" + GUESS=$UNAME_MACHINE-pc-isc$UNAME_REL elif /bin/uname -X 2>/dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 @@ -1164,11 +1281,11 @@ EOF && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 - echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL" + GUESS=$UNAME_MACHINE-pc-sco$UNAME_REL else - echo "$UNAME_MACHINE"-pc-sysv32 + GUESS=$UNAME_MACHINE-pc-sysv32 fi - exit ;; + ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about @@ -1176,31 +1293,31 @@ EOF # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configure will decide that # this is a cross-build. - echo i586-pc-msdosdjgpp - exit ;; + GUESS=i586-pc-msdosdjgpp + ;; Intel:Mach:3*:*) - echo i386-pc-mach3 - exit ;; + GUESS=i386-pc-mach3 + ;; paragon:*:*:*) - echo i860-intel-osf1 - exit ;; + GUESS=i860-intel-osf1 + ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4 + GUESS=i860-stardent-sysv$UNAME_RELEASE # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4 + GUESS=i860-unknown-sysv$UNAME_RELEASE # Unknown i860-SVR4 fi - exit ;; + ;; mini*:CTIX:SYS*5:*) # "miniframe" - echo m68010-convergent-sysv - exit ;; + GUESS=m68010-convergent-sysv + ;; mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv - exit ;; + GUESS=m68k-convergent-sysv + ;; M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - exit ;; + GUESS=m68k-diab-dnix + ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) @@ -1225,113 +1342,119 @@ EOF /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos"$UNAME_RELEASE" - exit ;; + GUESS=m68k-unknown-lynxos$UNAME_RELEASE + ;; mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit ;; + GUESS=m68k-atari-sysv4 + ;; TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos"$UNAME_RELEASE" - exit ;; + GUESS=sparc-unknown-lynxos$UNAME_RELEASE + ;; rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos"$UNAME_RELEASE" - exit ;; + GUESS=rs6000-unknown-lynxos$UNAME_RELEASE + ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - echo powerpc-unknown-lynxos"$UNAME_RELEASE" - exit ;; + GUESS=powerpc-unknown-lynxos$UNAME_RELEASE + ;; SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv"$UNAME_RELEASE" - exit ;; + GUESS=mips-dde-sysv$UNAME_RELEASE + ;; RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit ;; + GUESS=mips-sni-sysv4 + ;; RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit ;; + GUESS=mips-sni-sysv4 + ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo "$UNAME_MACHINE"-sni-sysv4 + GUESS=$UNAME_MACHINE-sni-sysv4 else - echo ns32k-sni-sysv + GUESS=ns32k-sni-sysv fi - exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + ;; + PENTIUM:*:4.0*:*) # Unisys 'ClearPath HMP IX 4000' SVR4/MP effort # says <Richard.M.Bartel@ccMail.Census.GOV> - echo i586-unisys-sysv4 - exit ;; + GUESS=i586-unisys-sysv4 + ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes <hewes@openmarket.com>. # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit ;; + GUESS=hppa1.1-stratus-sysv4 + ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit ;; + GUESS=i860-stratus-sysv4 + ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. - echo "$UNAME_MACHINE"-stratus-vos - exit ;; + GUESS=$UNAME_MACHINE-stratus-vos + ;; *:VOS:*:*) # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit ;; + GUESS=hppa1.1-stratus-vos + ;; mc68*:A/UX:*:*) - echo m68k-apple-aux"$UNAME_RELEASE" - exit ;; + GUESS=m68k-apple-aux$UNAME_RELEASE + ;; news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit ;; + GUESS=mips-sony-newsos6 + ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv"$UNAME_RELEASE" + if test -d /usr/nec; then + GUESS=mips-nec-sysv$UNAME_RELEASE else - echo mips-unknown-sysv"$UNAME_RELEASE" + GUESS=mips-unknown-sysv$UNAME_RELEASE fi - exit ;; + ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit ;; + GUESS=powerpc-be-beos + ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit ;; + GUESS=powerpc-apple-beos + ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit ;; + GUESS=i586-pc-beos + ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. - echo i586-pc-haiku - exit ;; - x86_64:Haiku:*:*) - echo x86_64-unknown-haiku - exit ;; + GUESS=i586-pc-haiku + ;; + ppc:Haiku:*:*) # Haiku running on Apple PowerPC + GUESS=powerpc-apple-haiku + ;; + *:Haiku:*:*) # Haiku modern gcc (not bound by BeOS compat) + GUESS=$UNAME_MACHINE-unknown-haiku + ;; SX-4:SUPER-UX:*:*) - echo sx4-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx4-nec-superux$UNAME_RELEASE + ;; SX-5:SUPER-UX:*:*) - echo sx5-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx5-nec-superux$UNAME_RELEASE + ;; SX-6:SUPER-UX:*:*) - echo sx6-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx6-nec-superux$UNAME_RELEASE + ;; SX-7:SUPER-UX:*:*) - echo sx7-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx7-nec-superux$UNAME_RELEASE + ;; SX-8:SUPER-UX:*:*) - echo sx8-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx8-nec-superux$UNAME_RELEASE + ;; SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx8r-nec-superux$UNAME_RELEASE + ;; SX-ACE:SUPER-UX:*:*) - echo sxace-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sxace-nec-superux$UNAME_RELEASE + ;; Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody"$UNAME_RELEASE" - exit ;; + GUESS=powerpc-apple-rhapsody$UNAME_RELEASE + ;; *:Rhapsody:*:*) - echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-apple-rhapsody$UNAME_RELEASE + ;; + arm64:Darwin:*:*) + GUESS=aarch64-apple-darwin$UNAME_RELEASE + ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` case $UNAME_PROCESSOR in @@ -1346,7 +1469,7 @@ EOF else set_cc_for_build fi - if [ "$CC_FOR_BUILD" != no_compiler_found ]; then + if test "$CC_FOR_BUILD" != no_compiler_found; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null @@ -1367,109 +1490,122 @@ EOF # uname -m returns i386 or x86_64 UNAME_PROCESSOR=$UNAME_MACHINE fi - echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_PROCESSOR-apple-darwin$UNAME_RELEASE + ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = x86; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi - echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_PROCESSOR-$UNAME_MACHINE-nto-qnx$UNAME_RELEASE + ;; *:QNX:*:4*) - echo i386-pc-qnx - exit ;; + GUESS=i386-pc-qnx + ;; NEO-*:NONSTOP_KERNEL:*:*) - echo neo-tandem-nsk"$UNAME_RELEASE" - exit ;; + GUESS=neo-tandem-nsk$UNAME_RELEASE + ;; NSE-*:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk"$UNAME_RELEASE" - exit ;; + GUESS=nse-tandem-nsk$UNAME_RELEASE + ;; NSR-*:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk"$UNAME_RELEASE" - exit ;; + GUESS=nsr-tandem-nsk$UNAME_RELEASE + ;; NSV-*:NONSTOP_KERNEL:*:*) - echo nsv-tandem-nsk"$UNAME_RELEASE" - exit ;; + GUESS=nsv-tandem-nsk$UNAME_RELEASE + ;; NSX-*:NONSTOP_KERNEL:*:*) - echo nsx-tandem-nsk"$UNAME_RELEASE" - exit ;; + GUESS=nsx-tandem-nsk$UNAME_RELEASE + ;; *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit ;; + GUESS=mips-compaq-nonstopux + ;; BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit ;; + GUESS=bs2000-siemens-sysv + ;; DS/*:UNIX_System_V:*:*) - echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE + ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. - # shellcheck disable=SC2154 - if test "$cputype" = 386; then + if test "${cputype-}" = 386; then UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" + elif test "x${cputype-}" != x; then + UNAME_MACHINE=$cputype fi - echo "$UNAME_MACHINE"-unknown-plan9 - exit ;; + GUESS=$UNAME_MACHINE-unknown-plan9 + ;; *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit ;; + GUESS=pdp10-unknown-tops10 + ;; *:TENEX:*:*) - echo pdp10-unknown-tenex - exit ;; + GUESS=pdp10-unknown-tenex + ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit ;; + GUESS=pdp10-dec-tops20 + ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit ;; + GUESS=pdp10-xkl-tops20 + ;; *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit ;; + GUESS=pdp10-unknown-tops20 + ;; *:ITS:*:*) - echo pdp10-unknown-its - exit ;; + GUESS=pdp10-unknown-its + ;; SEI:*:*:SEIUX) - echo mips-sei-seiux"$UNAME_RELEASE" - exit ;; + GUESS=mips-sei-seiux$UNAME_RELEASE + ;; *:DragonFly:*:*) - echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" - exit ;; + DRAGONFLY_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL + ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "$UNAME_MACHINE" in - A*) echo alpha-dec-vms ; exit ;; - I*) echo ia64-dec-vms ; exit ;; - V*) echo vax-dec-vms ; exit ;; + case $UNAME_MACHINE in + A*) GUESS=alpha-dec-vms ;; + I*) GUESS=ia64-dec-vms ;; + V*) GUESS=vax-dec-vms ;; esac ;; *:XENIX:*:SysV) - echo i386-pc-xenix - exit ;; + GUESS=i386-pc-xenix + ;; i*86:skyos:*:*) - echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`" - exit ;; + SKYOS_REL=`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'` + GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL + ;; i*86:rdos:*:*) - echo "$UNAME_MACHINE"-pc-rdos - exit ;; - i*86:AROS:*:*) - echo "$UNAME_MACHINE"-pc-aros - exit ;; + GUESS=$UNAME_MACHINE-pc-rdos + ;; + i*86:Fiwix:*:*) + GUESS=$UNAME_MACHINE-pc-fiwix + ;; + *:AROS:*:*) + GUESS=$UNAME_MACHINE-unknown-aros + ;; x86_64:VMkernel:*:*) - echo "$UNAME_MACHINE"-unknown-esx - exit ;; + GUESS=$UNAME_MACHINE-unknown-esx + ;; amd64:Isilon\ OneFS:*:*) - echo x86_64-unknown-onefs - exit ;; + GUESS=x86_64-unknown-onefs + ;; *:Unleashed:*:*) - echo "$UNAME_MACHINE"-unknown-unleashed"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE + ;; + *:Ironclad:*:*) + GUESS=$UNAME_MACHINE-unknown-ironclad + ;; esac +# Do we have a guess based on uname results? +if test "x$GUESS" != x; then + echo "$GUESS" + exit +fi + # No uname command or uname output not recognized. set_cc_for_build cat > "$dummy.c" <<EOF @@ -1601,7 +1737,7 @@ main () } EOF -$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`$dummy` && +$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`"$dummy"` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. @@ -1609,7 +1745,7 @@ test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; } echo "$0: unable to guess system type" >&2 -case "$UNAME_MACHINE:$UNAME_SYSTEM" in +case $UNAME_MACHINE:$UNAME_SYSTEM in mips:Linux | mips64:Linux) # If we got here on MIPS GNU/Linux, output extra information. cat >&2 <<EOF @@ -1626,9 +1762,17 @@ This script (version $timestamp), has failed to recognize the operating system you are using. If your script is old, overwrite *all* copies of config.guess and config.sub with the latest versions from: - https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess + https://git.savannah.gnu.org/cgit/config.git/plain/config.guess and - https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub + https://git.savannah.gnu.org/cgit/config.git/plain/config.sub +EOF + +our_year=`echo $timestamp | sed 's,-.*,,'` +thisyear=`date +%Y` +# shellcheck disable=SC2003 +script_age=`expr "$thisyear" - "$our_year"` +if test "$script_age" -lt 3 ; then + cat >&2 <<EOF If $0 has already been updated, send the following data and any information you think might be pertinent to config-patches@gnu.org to @@ -1656,6 +1800,7 @@ UNAME_RELEASE = "$UNAME_RELEASE" UNAME_SYSTEM = "$UNAME_SYSTEM" UNAME_VERSION = "$UNAME_VERSION" EOF +fi exit 1 diff --git contrib/ncurses/config.sub contrib/ncurses/config.sub index 0f2234c174d4..e4c4e09b6540 100755 --- contrib/ncurses/config.sub +++ contrib/ncurses/config.sub @@ -1,12 +1,14 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright 1992-2019 Free Software Foundation, Inc. +# Copyright 1992-2023 Free Software Foundation, Inc. -timestamp='2019-06-30' +# shellcheck disable=SC2006,SC2268 # see below for rationale + +timestamp='2023-12-02' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or +# the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but @@ -33,7 +35,7 @@ timestamp='2019-06-30' # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: -# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub +# https://git.savannah.gnu.org/cgit/config.git/plain/config.sub # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases @@ -50,6 +52,13 @@ timestamp='2019-06-30' # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. +# The "shellcheck disable" line above the timestamp inhibits complaints +# about features and limitations of the classic Bourne shell that were +# superseded or lifted in POSIX. However, this script identifies a wide +# variety of pre-POSIX systems that do not have POSIX shells at all, and +# even some reasonably current systems (Solaris 10 as case-in-point) still +# have a pre-POSIX /bin/sh. + me=`echo "$0" | sed -e 's,.*/,,'` usage="\ @@ -67,13 +76,13 @@ Report bugs and patches to <config-patches@gnu.org>." version="\ GNU config.sub ($timestamp) -Copyright 1992-2019 Free Software Foundation, Inc. +Copyright 1992-2023 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" -Try \`$me --help' for more information." +Try '$me --help' for more information." # Parse command line while test $# -gt 0 ; do @@ -112,40 +121,42 @@ esac # Split fields of configuration type # shellcheck disable=SC2162 +saved_IFS=$IFS IFS="-" read field1 field2 field3 field4 <<EOF $1 EOF +IFS=$saved_IFS # Separate into logical components for further validation case $1 in *-*-*-*-*) - echo Invalid configuration \`"$1"\': more than four components >&2 + echo "Invalid configuration '$1': more than four components" >&2 exit 1 ;; *-*-*-*) basic_machine=$field1-$field2 - os=$field3-$field4 + basic_os=$field3-$field4 ;; *-*-*) # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two # parts maybe_os=$field2-$field3 case $maybe_os in - nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc \ - | linux-newlib* | linux-musl* | linux-uclibc* | uclinux-uclibc* \ + nto-qnx* | linux-* | uclinux-uclibc* \ | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ - | storm-chaos* | os2-emx* | rtmk-nova*) + | storm-chaos* | os2-emx* | rtmk-nova* | managarm-* \ + | windows-* ) basic_machine=$field1 - os=$maybe_os + basic_os=$maybe_os ;; android-linux) basic_machine=$field1-unknown - os=linux-android + basic_os=linux-android ;; *) basic_machine=$field1-$field2 - os=$field3 + basic_os=$field3 ;; esac ;; @@ -154,7 +165,7 @@ case $1 in case $field1-$field2 in decstation-3100) basic_machine=mips-dec - os= + basic_os= ;; *-*) # Second component is usually, but not always the OS @@ -162,7 +173,11 @@ case $1 in # Prevent following clause from handling this valid os sun*os*) basic_machine=$field1 - os=$field2 + basic_os=$field2 + ;; + zephyr*) + basic_machine=$field1-unknown + basic_os=$field2 ;; # Manufacturers dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \ @@ -175,11 +190,11 @@ case $1 in | microblaze* | sim | cisco \ | oki | wec | wrs | winbond) basic_machine=$field1-$field2 - os= + basic_os= ;; *) basic_machine=$field1 - os=$field2 + basic_os=$field2 ;; esac ;; @@ -191,447 +206,451 @@ case $1 in case $field1 in 386bsd) basic_machine=i386-pc - os=bsd + basic_os=bsd ;; a29khif) basic_machine=a29k-amd - os=udi + basic_os=udi ;; adobe68k) basic_machine=m68010-adobe - os=scout + basic_os=scout ;; alliant) basic_machine=fx80-alliant - os= + basic_os= ;; altos | altos3068) basic_machine=m68k-altos - os= + basic_os= ;; am29k) basic_machine=a29k-none - os=bsd + basic_os=bsd ;; amdahl) basic_machine=580-amdahl - os=sysv + basic_os=sysv ;; amiga) basic_machine=m68k-unknown - os= + basic_os= ;; amigaos | amigados) basic_machine=m68k-unknown - os=amigaos + basic_os=amigaos ;; amigaunix | amix) basic_machine=m68k-unknown - os=sysv4 + basic_os=sysv4 ;; apollo68) basic_machine=m68k-apollo - os=sysv + basic_os=sysv ;; apollo68bsd) basic_machine=m68k-apollo - os=bsd + basic_os=bsd ;; aros) basic_machine=i386-pc - os=aros + basic_os=aros ;; aux) basic_machine=m68k-apple - os=aux + basic_os=aux ;; balance) basic_machine=ns32k-sequent - os=dynix + basic_os=dynix ;; blackfin) basic_machine=bfin-unknown - os=linux + basic_os=linux ;; cegcc) basic_machine=arm-unknown - os=cegcc + basic_os=cegcc ;; convex-c1) basic_machine=c1-convex - os=bsd + basic_os=bsd ;; convex-c2) basic_machine=c2-convex - os=bsd + basic_os=bsd ;; convex-c32) basic_machine=c32-convex - os=bsd + basic_os=bsd ;; convex-c34) basic_machine=c34-convex - os=bsd + basic_os=bsd ;; convex-c38) basic_machine=c38-convex - os=bsd + basic_os=bsd ;; cray) basic_machine=j90-cray - os=unicos + basic_os=unicos ;; crds | unos) basic_machine=m68k-crds - os= + basic_os= ;; da30) basic_machine=m68k-da30 - os= + basic_os= ;; decstation | pmax | pmin | dec3100 | decstatn) basic_machine=mips-dec - os= + basic_os= ;; delta88) basic_machine=m88k-motorola - os=sysv3 + basic_os=sysv3 ;; dicos) basic_machine=i686-pc - os=dicos + basic_os=dicos ;; djgpp) basic_machine=i586-pc - os=msdosdjgpp + basic_os=msdosdjgpp ;; ebmon29k) basic_machine=a29k-amd - os=ebmon + basic_os=ebmon ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson - os=ose + basic_os=ose ;; gmicro) basic_machine=tron-gmicro - os=sysv + basic_os=sysv ;; go32) basic_machine=i386-pc - os=go32 + basic_os=go32 ;; h8300hms) basic_machine=h8300-hitachi - os=hms + basic_os=hms ;; h8300xray) basic_machine=h8300-hitachi - os=xray + basic_os=xray ;; h8500hms) basic_machine=h8500-hitachi - os=hms + basic_os=hms ;; harris) basic_machine=m88k-harris - os=sysv3 + basic_os=sysv3 ;; hp300 | hp300hpux) basic_machine=m68k-hp - os=hpux + basic_os=hpux ;; hp300bsd) basic_machine=m68k-hp - os=bsd + basic_os=bsd ;; hppaosf) basic_machine=hppa1.1-hp - os=osf + basic_os=osf ;; hppro) basic_machine=hppa1.1-hp - os=proelf + basic_os=proelf ;; i386mach) basic_machine=i386-mach - os=mach + basic_os=mach ;; isi68 | isi) basic_machine=m68k-isi - os=sysv + basic_os=sysv ;; m68knommu) basic_machine=m68k-unknown - os=linux + basic_os=linux ;; magnum | m3230) basic_machine=mips-mips - os=sysv + basic_os=sysv ;; merlin) basic_machine=ns32k-utek - os=sysv + basic_os=sysv ;; mingw64) basic_machine=x86_64-pc - os=mingw64 + basic_os=mingw64 ;; mingw32) basic_machine=i686-pc - os=mingw32 + basic_os=mingw32 ;; mingw32ce) basic_machine=arm-unknown - os=mingw32ce + basic_os=mingw32ce ;; monitor) basic_machine=m68k-rom68k - os=coff + basic_os=coff ;; morphos) basic_machine=powerpc-unknown - os=morphos + basic_os=morphos ;; moxiebox) basic_machine=moxie-unknown - os=moxiebox + basic_os=moxiebox ;; msdos) basic_machine=i386-pc - os=msdos + basic_os=msdos ;; msys) basic_machine=i686-pc - os=msys + basic_os=msys ;; mvs) basic_machine=i370-ibm - os=mvs + basic_os=mvs ;; nacl) basic_machine=le32-unknown - os=nacl + basic_os=nacl ;; ncr3000) basic_machine=i486-ncr - os=sysv4 + basic_os=sysv4 ;; netbsd386) basic_machine=i386-pc - os=netbsd + basic_os=netbsd ;; netwinder) basic_machine=armv4l-rebel - os=linux + basic_os=linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony - os=newsos + basic_os=newsos ;; news1000) basic_machine=m68030-sony - os=newsos + basic_os=newsos ;; necv70) basic_machine=v70-nec - os=sysv + basic_os=sysv ;; nh3000) basic_machine=m68k-harris - os=cxux + basic_os=cxux ;; nh[45]000) basic_machine=m88k-harris - os=cxux + basic_os=cxux ;; nindy960) basic_machine=i960-intel - os=nindy + basic_os=nindy ;; mon960) basic_machine=i960-intel - os=mon960 + basic_os=mon960 ;; nonstopux) basic_machine=mips-compaq - os=nonstopux + basic_os=nonstopux ;; os400) basic_machine=powerpc-ibm - os=os400 + basic_os=os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson - os=ose + basic_os=ose ;; os68k) basic_machine=m68k-none - os=os68k + basic_os=os68k ;; paragon) basic_machine=i860-intel - os=osf + basic_os=osf ;; parisc) basic_machine=hppa-unknown - os=linux + basic_os=linux + ;; + psp) + basic_machine=mipsallegrexel-sony + basic_os=psp ;; pw32) basic_machine=i586-unknown - os=pw32 + basic_os=pw32 ;; rdos | rdos64) basic_machine=x86_64-pc - os=rdos + basic_os=rdos ;; rdos32) basic_machine=i386-pc - os=rdos + basic_os=rdos ;; rom68k) basic_machine=m68k-rom68k - os=coff + basic_os=coff ;; sa29200) basic_machine=a29k-amd - os=udi + basic_os=udi ;; sei) basic_machine=mips-sei - os=seiux + basic_os=seiux ;; sequent) basic_machine=i386-sequent - os= + basic_os= ;; sps7) basic_machine=m68k-bull - os=sysv2 + basic_os=sysv2 ;; st2000) basic_machine=m68k-tandem - os= + basic_os= ;; stratus) basic_machine=i860-stratus - os=sysv4 + basic_os=sysv4 ;; sun2) basic_machine=m68000-sun - os= + basic_os= ;; sun2os3) basic_machine=m68000-sun - os=sunos3 + basic_os=sunos3 ;; sun2os4) basic_machine=m68000-sun - os=sunos4 + basic_os=sunos4 ;; sun3) basic_machine=m68k-sun - os= + basic_os= ;; sun3os3) basic_machine=m68k-sun - os=sunos3 + basic_os=sunos3 ;; sun3os4) basic_machine=m68k-sun - os=sunos4 + basic_os=sunos4 ;; sun4) basic_machine=sparc-sun - os= + basic_os= ;; sun4os3) basic_machine=sparc-sun - os=sunos3 + basic_os=sunos3 ;; sun4os4) basic_machine=sparc-sun - os=sunos4 + basic_os=sunos4 ;; sun4sol2) basic_machine=sparc-sun - os=solaris2 + basic_os=solaris2 ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun - os= + basic_os= ;; sv1) basic_machine=sv1-cray - os=unicos + basic_os=unicos ;; symmetry) basic_machine=i386-sequent - os=dynix + basic_os=dynix ;; t3e) basic_machine=alphaev5-cray - os=unicos + basic_os=unicos ;; t90) basic_machine=t90-cray - os=unicos + basic_os=unicos ;; toad1) basic_machine=pdp10-xkl - os=tops20 + basic_os=tops20 ;; tpf) basic_machine=s390x-ibm - os=tpf + basic_os=tpf ;; udi29k) basic_machine=a29k-amd - os=udi + basic_os=udi ;; ultra3) basic_machine=a29k-nyu - os=sym1 + basic_os=sym1 ;; v810 | necv810) basic_machine=v810-nec - os=none + basic_os=none ;; vaxv) basic_machine=vax-dec - os=sysv + basic_os=sysv ;; vms) basic_machine=vax-dec - os=vms + basic_os=vms ;; vsta) basic_machine=i386-pc - os=vsta + basic_os=vsta ;; vxworks960) basic_machine=i960-wrs - os=vxworks + basic_os=vxworks ;; vxworks68) basic_machine=m68k-wrs - os=vxworks + basic_os=vxworks ;; vxworks29k) basic_machine=a29k-wrs - os=vxworks + basic_os=vxworks ;; xbox) basic_machine=i686-pc - os=mingw32 + basic_os=mingw32 ;; ymp) basic_machine=ymp-cray - os=unicos + basic_os=unicos ;; *) basic_machine=$1 - os= + basic_os= ;; esac ;; @@ -683,17 +702,17 @@ case $basic_machine in bluegene*) cpu=powerpc vendor=ibm - os=cnk + basic_os=cnk ;; decsystem10* | dec10*) cpu=pdp10 vendor=dec - os=tops10 + basic_os=tops10 ;; decsystem20* | dec20*) cpu=pdp10 vendor=dec - os=tops20 + basic_os=tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) @@ -703,7 +722,7 @@ case $basic_machine in dpx2*) cpu=m68k vendor=bull - os=sysv3 + basic_os=sysv3 ;; encore | umax | mmax) cpu=ns32k @@ -712,7 +731,7 @@ case $basic_machine in elxsi) cpu=elxsi vendor=elxsi - os=${os:-bsd} + basic_os=${basic_os:-bsd} ;; fx2800) cpu=i860 @@ -725,7 +744,7 @@ case $basic_machine in h3050r* | hiux*) cpu=hppa1.1 vendor=hitachi - os=hiuxwe2 + basic_os=hiuxwe2 ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) cpu=hppa1.0 @@ -768,36 +787,36 @@ case $basic_machine in i*86v32) cpu=`echo "$1" | sed -e 's/86.*/86/'` vendor=pc - os=sysv32 + basic_os=sysv32 ;; i*86v4*) cpu=`echo "$1" | sed -e 's/86.*/86/'` vendor=pc - os=sysv4 + basic_os=sysv4 ;; i*86v) cpu=`echo "$1" | sed -e 's/86.*/86/'` vendor=pc - os=sysv + basic_os=sysv ;; i*86sol2) cpu=`echo "$1" | sed -e 's/86.*/86/'` vendor=pc - os=solaris2 + basic_os=solaris2 ;; j90 | j90-cray) cpu=j90 vendor=cray - os=${os:-unicos} + basic_os=${basic_os:-unicos} ;; iris | iris4d) cpu=mips vendor=sgi - case $os in + case $basic_os in irix*) ;; *) - os=irix4 + basic_os=irix4 ;; esac ;; @@ -808,26 +827,26 @@ case $basic_machine in *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*) cpu=m68k vendor=atari - os=mint + basic_os=mint ;; news-3600 | risc-news) cpu=mips vendor=sony - os=newsos + basic_os=newsos ;; next | m*-next) cpu=m68k vendor=next - case $os in + case $basic_os in openstep*) ;; nextstep*) ;; ns2*) - os=nextstep2 + basic_os=nextstep2 ;; *) - os=nextstep3 + basic_os=nextstep3 ;; esac ;; @@ -838,12 +857,12 @@ case $basic_machine in op50n-* | op60c-*) cpu=hppa1.1 vendor=oki - os=proelf + basic_os=proelf ;; pa-hitachi) cpu=hppa1.1 vendor=hitachi - os=hiuxwe2 + basic_os=hiuxwe2 ;; pbd) cpu=sparc @@ -880,12 +899,12 @@ case $basic_machine in sde) cpu=mipsisa32 vendor=sde - os=${os:-elf} + basic_os=${basic_os:-elf} ;; simso-wrs) cpu=sparclite vendor=wrs - os=vxworks + basic_os=vxworks ;; tower | tower-32) cpu=m68k @@ -902,7 +921,7 @@ case $basic_machine in w89k-*) cpu=hppa1.1 vendor=winbond - os=proelf + basic_os=proelf ;; none) cpu=none @@ -919,11 +938,13 @@ case $basic_machine in *-*) # shellcheck disable=SC2162 + saved_IFS=$IFS IFS="-" read cpu vendor <<EOF $basic_machine EOF + IFS=$saved_IFS ;; - # We use `pc' rather than `unknown' + # We use 'pc' rather than 'unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) @@ -955,11 +976,11 @@ case $cpu-$vendor in # some cases the only manufacturer, in others, it is the most popular. craynv-unknown) vendor=cray - os=${os:-unicosmp} + basic_os=${basic_os:-unicosmp} ;; c90-unknown | c90-cray) vendor=cray - os=${os:-unicos} + basic_os=${Basic_os:-unicos} ;; fx80-unknown) vendor=alliant @@ -1000,10 +1021,15 @@ case $cpu-$vendor in ;; # Here we normalize CPU types with a missing or matching vendor + armh-unknown | armh-alt) + cpu=armv7l + vendor=alt + basic_os=${basic_os:-linux-gnueabihf} + ;; dpx20-unknown | dpx20-bull) cpu=rs6000 vendor=bull - os=${os:-bosx} + basic_os=${basic_os:-bosx} ;; # Here we normalize CPU types irrespective of the vendor @@ -1012,7 +1038,7 @@ case $cpu-$vendor in ;; blackfin-*) cpu=bfin - os=linux + basic_os=linux ;; c54x-*) cpu=tic54x @@ -1025,7 +1051,7 @@ case $cpu-$vendor in ;; e500v[12]-*) cpu=powerpc - os=$os"spe" + basic_os=${basic_os}"spe" ;; mips3*-*) cpu=mips64 @@ -1035,7 +1061,7 @@ case $cpu-$vendor in ;; m68knommu-*) cpu=m68k - os=linux + basic_os=linux ;; m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*) cpu=s12z @@ -1045,12 +1071,12 @@ case $cpu-$vendor in ;; parisc-*) cpu=hppa - os=linux + basic_os=linux ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) cpu=i586 ;; - pentiumpro-* | p6-* | 6x86-* | athlon-* | athalon_*-*) + pentiumpro-* | p6-* | 6x86-* | athlon-* | athlon_*-*) cpu=i686 ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) @@ -1101,11 +1127,14 @@ case $cpu-$vendor in xscale-* | xscalee[bl]-*) cpu=`echo "$cpu" | sed 's/^xscale/arm/'` ;; + arm64-* | aarch64le-*) + cpu=aarch64 + ;; # Recognize the canonical CPU Types that limit and/or modify the # company names they are paired with. cr16-*) - os=${os:-elf} + basic_os=${basic_os:-elf} ;; crisv32-* | etraxfs*-*) cpu=crisv32 @@ -1116,7 +1145,7 @@ case $cpu-$vendor in vendor=axis ;; crx-*) - os=${os:-elf} + basic_os=${basic_os:-elf} ;; neo-tandem) cpu=neo @@ -1138,16 +1167,12 @@ case $cpu-$vendor in cpu=nsx vendor=tandem ;; - s390-*) - cpu=s390 - vendor=ibm - ;; - s390x-*) - cpu=s390x - vendor=ibm + mipsallegrexel-sony) + cpu=mipsallegrexel + vendor=sony ;; tile*-*) - os=${os:-linux-gnu} + basic_os=${basic_os:-linux-gnu} ;; *) @@ -1156,15 +1181,15 @@ case $cpu-$vendor in case $cpu in 1750a | 580 \ | a29k \ - | aarch64 | aarch64_be \ + | aarch64 | aarch64_be | aarch64c | arm64ec \ | abacus \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \ | alphapca5[67] | alpha64pca5[67] \ | am33_2.0 \ | amdgcn \ - | arc | arceb \ - | arm | arm[lb]e | arme[lb] | armv* \ + | arc | arceb | arc32 | arc64 \ + | arm | arm[lb]e | arme[lb] | armv* \ | avr | avr32 \ | asmjs \ | ba \ @@ -1175,45 +1200,29 @@ case $cpu-$vendor in | d10v | d30v | dlx | dsp16xx \ | e2k | elxsi | epiphany \ | f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \ + | javascript \ | h8300 | h8500 \ | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ | i370 | i*86 | i860 | i960 | ia16 | ia64 \ | ip2k | iq2000 \ | k1om \ + | kvx \ | le32 | le64 \ | lm32 \ + | loongarch32 | loongarch64 \ | m32c | m32r | m32rle \ | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \ | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \ | m88110 | m88k | maxq | mb | mcore | mep | metag \ | microblaze | microblazeel \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64eb | mips64el \ - | mips64octeon | mips64octeonel \ - | mips64orion | mips64orionel \ - | mips64r5900 | mips64r5900el \ - | mips64vr | mips64vrel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa32r6 | mipsisa32r6el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64r6 | mipsisa64r6el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipsr5900 | mipsr5900el \ - | mipstx39 | mipstx39el \ + | mips* \ | mmix \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ + | nanomips* \ | nds32 | nds32le | nds32be \ | nfp \ | nios | nios2 | nios2eb | nios2el \ @@ -1227,8 +1236,9 @@ case $cpu-$vendor in | powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \ | pru \ | pyramid \ - | riscv | riscv32 | riscv64 \ + | riscv | riscv32 | riscv32be | riscv64 | riscv64be \ | rl78 | romp | rs6000 | rx \ + | s390 | s390x \ | score \ | sh | shl \ | sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \ @@ -1238,11 +1248,13 @@ case $cpu-$vendor in | sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \ | spu \ | tahoe \ + | thumbv7* \ | tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \ | tron \ | ubicom32 \ | v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \ | vax \ + | vc4 \ | visium \ | w65 \ | wasm32 | wasm64 \ @@ -1254,7 +1266,7 @@ case $cpu-$vendor in ;; *) - echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2 + echo "Invalid configuration '$1': machine '$cpu-$vendor' not recognized" 1>&2 exit 1 ;; esac @@ -1275,8 +1287,54 @@ esac # Decode manufacturer-specific aliases for certain operating systems. -if [ x$os != x ] +if test x"$basic_os" != x then + +# First recognize some ad-hoc cases, or perhaps split kernel-os, or else just +# set os. +obj= +case $basic_os in + gnu/linux*) + kernel=linux + os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'` + ;; + os2-emx) + kernel=os2 + os=`echo "$basic_os" | sed -e 's|os2-emx|emx|'` + ;; + nto-qnx*) + kernel=nto + os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'` + ;; + *-*) + # shellcheck disable=SC2162 + saved_IFS=$IFS + IFS="-" read kernel os <<EOF +$basic_os +EOF + IFS=$saved_IFS + ;; + # Default OS when just kernel was specified + nto*) + kernel=nto + os=`echo "$basic_os" | sed -e 's|nto|qnx|'` + ;; + linux*) + kernel=linux + os=`echo "$basic_os" | sed -e 's|linux|gnu|'` + ;; + managarm*) + kernel=managarm + os=`echo "$basic_os" | sed -e 's|managarm|mlibc|'` + ;; + *) + kernel= + os=$basic_os + ;; +esac + +# Now, normalize the OS (knowing we just have one component, it's not a kernel, +# etc.) case $os in # First match some system type aliases that might get confused # with valid system types. @@ -1288,7 +1346,7 @@ case $os in os=cnk ;; solaris1 | solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` + os=`echo "$os" | sed -e 's|solaris1|sunos4|'` ;; solaris) os=solaris2 @@ -1296,9 +1354,6 @@ case $os in unixware*) os=sysv4.2uw ;; - gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; # es1800 is here to avoid being matched by es* (a different OS) es1800*) os=ose @@ -1320,12 +1375,9 @@ case $os in os=sco3.2v4 ;; sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - ;; - sco3.2v[4-9]* | sco5v6*) - # Don't forget version if it is 3.2v4 or newer. + os=`echo "$os" | sed -e 's/sco3.2./sco3.2v/'` ;; - scout) + sco*v* | scout) # Don't match below ;; sco*) @@ -1334,78 +1386,25 @@ case $os in psos*) os=psos ;; - # Now accept the basic system types. - # The portable systems comes first. - # Each alternative MUST end in a * to match a version number. - # sysv* is not here because it comes later, after sysvr4. - gnu* | bsd* | mach* | minix* | genix* | ultrix* | irix* \ - | *vms* | esix* | aix* | cnk* | sunos | sunos[34]*\ - | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \ - | sym* | kopensolaris* | plan9* \ - | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \ - | aos* | aros* | cloudabi* | sortix* | twizzler* \ - | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \ - | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \ - | knetbsd* | mirbsd* | netbsd* \ - | bitrig* | openbsd* | solidbsd* | libertybsd* | os108* \ - | ekkobsd* | kfreebsd* | freebsd* | riscix* | lynxos* \ - | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \ - | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \ - | udi* | eabi* | lites* | ieee* | go32* | aux* | hcos* \ - | chorusrdb* | cegcc* | glidix* \ - | cygwin* | msys* | pe* | moss* | proelf* | rtems* \ - | midipix* | mingw32* | mingw64* | linux-gnu* | linux-android* \ - | linux-newlib* | linux-musl* | linux-uclibc* \ - | uxpv* | beos* | mpeix* | udk* | moxiebox* \ - | interix* | uwin* | mks* | rhapsody* | darwin* \ - | openstep* | oskit* | conix* | pw32* | nonstopux* \ - | storm-chaos* | tops10* | tenex* | tops20* | its* \ - | os2* | vos* | palmos* | uclinux* | nucleus* \ - | morphos* | superux* | rtmk* | windiss* \ - | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \ - | skyos* | haiku* | rdos* | toppers* | drops* | es* \ - | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ - | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \ - | nsk* | powerunix) - # Remember, each alternative MUST END IN *, to match a version number. - ;; qnx*) - case $cpu in - x86 | i*86) - ;; - *) - os=nto-$os - ;; - esac + os=qnx ;; hiux*) os=hiuxwe2 ;; - nto-qnx*) - ;; - nto*) - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - sim | xray | os68k* | v88r* \ - | windows* | osx | abug | netware* | os9* \ - | macos* | mpw* | magic* | mmixware* | mon960* | lnews*) - ;; - linux-dietlibc) - os=linux-dietlibc - ;; - linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; lynx*178) os=lynxos178 ;; lynx*5) os=lynxos5 ;; + lynxos*) + # don't get caught up in next wildcard + ;; lynx*) os=lynxos ;; - mac*) + mac[0-9]*) os=`echo "$os" | sed -e 's|mac|macos|'` ;; opened*) @@ -1452,7 +1451,7 @@ case $os in ;; # Preserve the version number of sinix5. sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` + os=`echo "$os" | sed -e 's|sinix|sysv|'` ;; sinix*) os=sysv4 @@ -1475,18 +1474,12 @@ case $os in sysvr4) os=sysv4 ;; - # This must come after sysvr4. - sysv*) - ;; ose*) os=ose ;; *mint | mint[0-9]* | *MiNT | MiNT[0-9]*) os=mint ;; - zvmoe) - os=zvmoe - ;; dicos*) os=dicos ;; @@ -1499,23 +1492,21 @@ case $os in os=eabi ;; *) - os=elf + os= + obj=elf ;; esac ;; - nacl*) - ;; - ios) - ;; - none) - ;; - *-eabi) + aout* | coff* | elf* | pe*) + # These are machine code file formats, not OSes + obj=$os + os= ;; *) - echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2 - exit 1 + # No normalization, but not necessarily accepted, that comes below. ;; esac + else # Here we handle the default operating systems that come with various machines. @@ -1528,42 +1519,54 @@ else # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. +kernel= +obj= case $cpu-$vendor in score-*) - os=elf + os= + obj=elf ;; spu-*) - os=elf + os= + obj=elf ;; *-acorn) os=riscix1.2 ;; arm*-rebel) - os=linux + kernel=linux + os=gnu ;; arm*-semi) - os=aout + os= + obj=aout ;; c4x-* | tic4x-*) - os=coff + os= + obj=coff ;; c8051-*) - os=elf + os= + obj=elf ;; clipper-intergraph) os=clix ;; hexagon-*) - os=elf + os= + obj=elf ;; tic54x-*) - os=coff + os= + obj=coff ;; tic55x-*) - os=coff + os= + obj=coff ;; tic6x-*) - os=coff + os= + obj=coff ;; # This must come before the *-dec entry. pdp10-*) @@ -1585,19 +1588,24 @@ case $cpu-$vendor in os=sunos3 ;; m68*-cisco) - os=aout + os= + obj=aout ;; mep-*) - os=elf + os= + obj=elf ;; mips*-cisco) - os=elf + os= + obj=elf ;; - mips*-*) - os=elf + mips*-*|nanomips*-*) + os= + obj=elf ;; or32-*) - os=coff + os= + obj=coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=sysv3 @@ -1606,7 +1614,8 @@ case $cpu-$vendor in os=sunos4.1.1 ;; pru-*) - os=elf + os= + obj=elf ;; *-be) os=beos @@ -1687,10 +1696,12 @@ case $cpu-$vendor in os=uxpv ;; *-rom68k) - os=coff + os= + obj=coff ;; *-*bug) - os=coff + os= + obj=coff ;; *-apple) os=macos @@ -1705,84 +1716,251 @@ case $cpu-$vendor in os=none ;; esac + fi +# Now, validate our (potentially fixed-up) individual pieces (OS, OBJ). + +case $os in + # Sometimes we do "kernel-libc", so those need to count as OSes. + llvm* | musl* | newlib* | relibc* | uclibc*) + ;; + # Likewise for "kernel-abi" + eabi* | gnueabi*) + ;; + # VxWorks passes extra cpu info in the 4th filed. + simlinux | simwindows | spe) + ;; + # See `case $cpu-$os` validation below + ghcjs) + ;; + # Now accept the basic system types. + # The portable systems comes first. + # Each alternative MUST end in a * to match a version number. + gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \ + | *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \ + | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \ + | sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \ + | hiux* | abug | nacl* | netware* | windows* \ + | os9* | macos* | osx* | ios* | tvos* | watchos* \ + | mpw* | magic* | mmixware* | mon960* | lnews* \ + | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \ + | aos* | aros* | cloudabi* | sortix* | twizzler* \ + | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \ + | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \ + | mirbsd* | netbsd* | dicos* | openedition* | ose* \ + | bitrig* | openbsd* | secbsd* | solidbsd* | libertybsd* | os108* \ + | ekkobsd* | freebsd* | riscix* | lynxos* | os400* \ + | bosx* | nextstep* | cxux* | oabi* \ + | ptx* | ecoff* | winnt* | domain* | vsta* \ + | udi* | lites* | ieee* | go32* | aux* | hcos* \ + | chorusrdb* | cegcc* | glidix* | serenity* \ + | cygwin* | msys* | moss* | proelf* | rtems* \ + | midipix* | mingw32* | mingw64* | mint* \ + | uxpv* | beos* | mpeix* | udk* | moxiebox* \ + | interix* | uwin* | mks* | rhapsody* | darwin* \ + | openstep* | oskit* | conix* | pw32* | nonstopux* \ + | storm-chaos* | tops10* | tenex* | tops20* | its* \ + | os2* | vos* | palmos* | uclinux* | nucleus* | morphos* \ + | scout* | superux* | sysv* | rtmk* | tpf* | windiss* \ + | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \ + | skyos* | haiku* | rdos* | toppers* | drops* | es* \ + | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ + | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \ + | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \ + | fiwix* | mlibc* | cos* | mbr* | ironclad* ) + ;; + # This one is extra strict with allowed versions + sco3.2v2 | sco3.2v[4-9]* | sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + ;; + # This refers to builds using the UEFI calling convention + # (which depends on the architecture) and PE file format. + # Note that this is both a different calling convention and + # different file format than that of GNU-EFI + # (x86_64-w64-mingw32). + uefi) + ;; + none) + ;; + kernel* | msvc* ) + # Restricted further below + ;; + '') + if test x"$obj" = x + then + echo "Invalid configuration '$1': Blank OS only allowed with explicit machine code file format" 1>&2 + fi + ;; + *) + echo "Invalid configuration '$1': OS '$os' not recognized" 1>&2 + exit 1 + ;; +esac + +case $obj in + aout* | coff* | elf* | pe*) + ;; + '') + # empty is fine + ;; + *) + echo "Invalid configuration '$1': Machine code format '$obj' not recognized" 1>&2 + exit 1 + ;; +esac + +# Here we handle the constraint that a (synthetic) cpu and os are +# valid only in combination with each other and nowhere else. +case $cpu-$os in + # The "javascript-unknown-ghcjs" triple is used by GHC; we + # accept it here in order to tolerate that, but reject any + # variations. + javascript-ghcjs) + ;; + javascript-* | *-ghcjs) + echo "Invalid configuration '$1': cpu '$cpu' is not valid with os '$os$obj'" 1>&2 + exit 1 + ;; +esac + +# As a final step for OS-related things, validate the OS-kernel combination +# (given a valid OS), if there is a kernel. +case $kernel-$os-$obj in + linux-gnu*- | linux-android*- | linux-dietlibc*- | linux-llvm*- \ + | linux-mlibc*- | linux-musl*- | linux-newlib*- \ + | linux-relibc*- | linux-uclibc*- ) + ;; + uclinux-uclibc*- ) + ;; + managarm-mlibc*- | managarm-kernel*- ) + ;; + windows*-msvc*-) + ;; + -dietlibc*- | -llvm*- | -mlibc*- | -musl*- | -newlib*- | -relibc*- \ + | -uclibc*- ) + # These are just libc implementations, not actual OSes, and thus + # require a kernel. + echo "Invalid configuration '$1': libc '$os' needs explicit kernel." 1>&2 + exit 1 + ;; + -kernel*- ) + echo "Invalid configuration '$1': '$os' needs explicit kernel." 1>&2 + exit 1 + ;; + *-kernel*- ) + echo "Invalid configuration '$1': '$kernel' does not support '$os'." 1>&2 + exit 1 + ;; + *-msvc*- ) + echo "Invalid configuration '$1': '$os' needs 'windows'." 1>&2 + exit 1 + ;; + kfreebsd*-gnu*- | kopensolaris*-gnu*-) + ;; + vxworks-simlinux- | vxworks-simwindows- | vxworks-spe-) + ;; + nto-qnx*-) + ;; + os2-emx-) + ;; + *-eabi*- | *-gnueabi*-) + ;; + none--*) + # None (no kernel, i.e. freestanding / bare metal), + # can be paired with an machine code file format + ;; + -*-) + # Blank kernel with real OS is always fine. + ;; + --*) + # Blank kernel and OS with real machine code file format is always fine. + ;; + *-*-*) + echo "Invalid configuration '$1': Kernel '$kernel' not known to work with OS '$os'." 1>&2 + exit 1 + ;; +esac + # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. case $vendor in unknown) - case $os in - riscix*) + case $cpu-$os in + *-riscix*) vendor=acorn ;; - sunos*) + *-sunos*) vendor=sun ;; - cnk*|-aix*) + *-cnk* | *-aix*) vendor=ibm ;; - beos*) + *-beos*) vendor=be ;; - hpux*) + *-hpux*) vendor=hp ;; - mpeix*) + *-mpeix*) vendor=hp ;; - hiux*) + *-hiux*) vendor=hitachi ;; - unos*) + *-unos*) vendor=crds ;; - dgux*) + *-dgux*) vendor=dg ;; - luna*) + *-luna*) vendor=omron ;; - genix*) + *-genix*) vendor=ns ;; - clix*) + *-clix*) vendor=intergraph ;; - mvs* | opened*) + *-mvs* | *-opened*) + vendor=ibm + ;; + *-os400*) vendor=ibm ;; - os400*) + s390-* | s390x-*) vendor=ibm ;; - ptx*) + *-ptx*) vendor=sequent ;; - tpf*) + *-tpf*) vendor=ibm ;; - vxsim* | vxworks* | windiss*) + *-vxsim* | *-vxworks* | *-windiss*) vendor=wrs ;; - aux*) + *-aux*) vendor=apple ;; - hms*) + *-hms*) vendor=hitachi ;; - mpw* | macos*) + *-mpw* | *-macos*) vendor=apple ;; - *mint | mint[0-9]* | *MiNT | MiNT[0-9]*) + *-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*) vendor=atari ;; - vos*) + *-vos*) vendor=stratus ;; esac ;; esac -echo "$cpu-$vendor-$os" +echo "$cpu-$vendor${kernel:+-$kernel}${os:+-$os}${obj:+-$obj}" exit # Local variables: diff --git contrib/ncurses/configure contrib/ncurses/configure index af702ddda06e..488d93fc1c02 100755 --- contrib/ncurses/configure +++ contrib/ncurses/configure @@ -1,9 +1,9 @@ #! /bin/sh -# From configure.in Revision: 1.729 . +# From configure.in Revision: 1.779 . # Guess values for system-dependent variables and create Makefiles. -# Generated by Autoconf 2.52.20210105. +# Generated by Autoconf 2.52.20231210. # -# Copyright 2003-2020,2021 Thomas E. Dickey +# Copyright 2003-2022,2023 Thomas E. Dickey # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation @@ -34,9 +34,9 @@ fi as_me=`echo "$0" |sed 's,.*[\\/],,'` if expr a : '\(a\)' >/dev/null 2>&1; then - as_expr=expr + as_expr="expr" else - as_expr=false + as_expr="false" fi rm -f conf$$ conf$$.exe conf$$.file @@ -51,7 +51,7 @@ if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln + as_ln_s='ln' else as_ln_s='cp -p' fi @@ -716,22 +716,22 @@ Optional Features: --with-rel-version=XXX override derived release version --with-abi-version=XXX override derived ABI version --with-system-type=XXX test: override derived host system-type + --with-abi-altered=XXX override visible ABI version, for packaging --without-ada suppress check for Ada compiler, don't build demo --without-cxx do not adjust ncurses bool to match C++ --without-cxx-binding do not build C++ binding and demo --disable-db-install suppress install of terminal database --without-manpages suppress install of manpages --without-progs suppress build/install with programs (e.g., tic) - --without-tack suppress build/install with tack program --without-tests suppress build/install with test-programs --without-curses-h install curses.h as ncurses.h only - --with-config-suffix=X suffixes ncursesXX-config file - --with-pkg-config{=path} enable/disable use of pkg-config - --with-pkg-config-libdir=XXX use given directory for installing pc-files + --with-config-suffix=X name ncurses*X-config file with X + --with-pkg-config[=CMD] enable/disable use of pkg-config and its name CMD + --with-pkg-config-libdir[=XXX] use given directory for installing pc-files --enable-pc-files generate and install .pc files for pkg-config - --with-pc-suffix suffixes pc-files + --with-pc-suffix[=XXX] suffix pkg-config files with XXX --enable-mixed-case tic should assume mixed-case filenames - --with-install-prefix prefixes actual install-location ($DESTDIR) + --with-install-prefix=DESTDIR use DESTDIR as installation directory prefix Build-Tools Needed to Compile Temporary Applications for Cross-compiling: --with-build-cc=XXX the build C compiler ($BUILD_CC) --with-build-cpp=XXX the build C preprocessor ($BUILD_CPP) @@ -752,10 +752,10 @@ Options to Specify the Libraries Built/Used: --with-ticlib generate separate tic library --enable-rpath use rpath option when generating shared libraries --disable-relink relink shared libraries during install - --with-shlib-version=X Specify rel or abi version for shared libs - --with-libtool-opts=XXX specify additional libtool options - --with-export-syms=XXX limit exported symbols using libtool - --with-versioned-syms=X markup versioned symbols using ld + --with-shlib-version[={rel|abi}] use release or ABI version in shared library file names + --with-libtool-opts[=XXX] give libtool additional options XXX + --with-export-syms[=SYM-FILE] limit symbols exported by libtool to those listed in SYM-FILE + --with-versioned-syms[=MAP-FILE] version ELF shared library symbols per MAP-FILE --with-gpm use Alessandro Rubini's GPM library --without-dlsym do not use dlsym() to load GPM dynamically --with-pcre2 use PCRE2 for regular-expressions @@ -764,7 +764,7 @@ Options to Specify the Libraries Built/Used: --disable-rpath-hack don't add rpath options for additional libraries --disable-pkg-ldflags disable extra LDFLAGS for package-scripts Fine-Tuning Your Configuration: - --with-extra-suffix=X append extra suffix to header/library paths + --with-extra-suffix[=X] append extra suffix X to header/library paths --disable-overwrite put headers in subdir, omit link to -lcurses --disable-database do not use terminfo, only fallbacks/termcap --with-database=XXX specify terminfo source to install @@ -773,7 +773,7 @@ Fine-Tuning Your Configuration: --with-tic-path=XXX specify path of tic for fallbacks --with-infocmp-path=XXX specify path of infocmp for fallbacks --without-xterm-new specify if xterm terminfo should be old version - --with-xterm-kbs=XXX specify if xterm backspace sends BS or DEL + --with-xterm-kbs[=XXX] specify if xterm backspace sends BS or DEL --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo) --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo) --disable-big-core assume machine has little memory @@ -783,29 +783,32 @@ Fine-Tuning Your Configuration: --enable-getcap fast termcap load, no xrefs to terminfo --enable-getcap-cache cache translated termcaps in ~/.terminfo --disable-home-terminfo drop ~/.terminfo from terminfo search-path - --disable-root-environ restrict environment when running as root + --disable-root-environ restrict root use of ncurses environment variables + --disable-root-access restrict file-access when running setuid + --disable-setuid-environ restrict setuid use of ncurses environment variables --enable-symlinks make tic use symbolic links not hard links --enable-broken_linker compile with broken-linker support code --enable-bsdpad recognize BSD-style prefix padding - --enable-widec compile with wide-char/UTF-8 code + --disable-widec compile without wide character and UTF-8 support --disable-lp64 allow chtype to be long (ignore _LP64) --disable-largefile omit support for large files --disable-tparm-varargs compile tparm() without varargs interface --disable-tic-depends link tic library without explicit dependency on ncurses library - --disable-wattr-macros suppress wattr* macros to help with ncurses5/ncurses6 transition - --with-x11-rgb=FILE file containing X11 rgb information (EPREFIX/lib/X11/rgb.txt) - --with-bool=TYPE override fallback type of bool variable + --enable-wattr-macros enable wattr* macros + --with-x11-rgb=FILE obtain X11 color definitions from FILE (default: EPREFIX/lib/X11/rgb.txt) + --with-bool=TYPE fall back to TYPE for curses 'bool' typedef --with-caps=alt compile with alternate Caps file --with-chtype=TYPE override type of chtype --with-ospeed=TYPE override type of ospeed variable --with-mmask-t=TYPE override type of mmask_t --with-ccharw-max=XXX override size CCHARW_MAX - --enable-signed-char compile using signed Boolean's in term.h + --enable-signed-char use signed chars for Boolean array in term.h --with-tparm-arg=TYPE override parameter type of tparm --with-rcs-ids compile-in RCS identifiers Options to Specify How Manpages are Installed: - --with-manpage-format specify manpage-format: gzip/compress/BSDI/normal and - optionally formatted/catonly, e.g., gzip,formatted + --with-manpage-format specify manpage-format: gzip/compress/bzip2/xz, + BSDI/normal and optionally formatted/catonly, + e.g., gzip,formatted --with-manpage-renames specify manpage-renaming --with-manpage-aliases specify manpage-aliases using .so --with-manpage-symlinks specify manpage-aliases using symlinks @@ -826,13 +829,14 @@ Reentrant Code: --enable-pthreads-eintr enable EINTR in wgetch with pthreads --enable-weak-symbols enable weak-symbols for pthreads --enable-reentrant compile with reentrant code - --enable-opaque-curses make curses WINDOW, etc., "opaque" - --enable-opaque-form make form-library structures "opaque" - --enable-opaque-menu make menu-library structures "opaque" - --enable-opaque-panel make panel-library structures "opaque" + --disable-opaque-curses do not make WINDOW, etc., structures opaque + --disable-opaque-form do not make form library structures opaque + --disable-opaque-menu do not make menu library structures opaque + --disable-opaque-panel do not make panel library structures opaque --with-wrap-prefix=XXX override prefix used for public variables Development Code: --without-develop disable development options + --enable-check-size compile-in code to detect screensize of serial terminals --enable-hard-tabs compile with hard-tabs code --enable-xmc-glitch compile with support for xmc (magic-cookie) Experimental Code: @@ -848,7 +852,9 @@ Experimental Code: Testing/development Options: --disable-echo do not display "compiling" commands --disable-stripping do not strip (debug info) installed executables + --with-strip-program=XX specify program to use when stripping in install --enable-warnings test: turn on gcc compiler warnings + --enable-stdnoreturn enable C11 _Noreturn feature for diagnostics --enable-string-hacks work around bogus compiler/loader warnings --enable-assertions test: turn on generation of assertion code --with-dmalloc test: use Gray Watson's dmalloc library @@ -860,15 +866,16 @@ Testing/development Options: --with-trace test: add trace() function to all models of ncurses --disable-gnat-projects test: disable GNAT projects even if usable Ada Binding Options: - --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake) - --with-ada-include=DIR Ada includes are in DIR (default: PREFIX/share/ada/adainclude) - --with-ada-objects=DIR Ada objects are in DIR (default: PREFIX/lib/ada/adalib) - --with-ada-sharedlib=soname build shared-library (requires GNAT projects) - --with-ada-libname=XXX override default Ada library-name - --with-form-libname=XXX override form basename of library - --with-menu-libname=XXX override menu basename of library - --with-panel-libname=XXX override panel basename of library - --with-cxx-libname=XXX override ncurses++ basename of library + --with-ada-compiler[=CMD] use CMD as Ada95 compiler (default: gnatmake) + --with-ada-include=DIR find Ada95 includes in DIR (default: PREFIX/share/ada/adainclude) + --with-ada-objects=DIR find Ada95 objects in DIR (default: PREFIX/lib/ada/adalib) + --with-ada-sharedlib build Ada95 shared library; requires GNAT project support + --with-ada-libname[=XXX] use XXX as Ada95 library name +Library basenames for pkgsrc: + --with-form-libname[=XXX] override ifelse(,,form,) basename of library + --with-menu-libname[=XXX] override ifelse(,,menu,) basename of library + --with-panel-libname[=XXX] override ifelse(,,panel,) basename of library + --with-cxx-libname[=XXX] override ifelse(ncurses++,,cxx,ncurses++) basename of library Some influential environment variables: CC C compiler command @@ -928,7 +935,7 @@ test -n "$ac_init_help" && exit 0 if "$ac_init_version"; then cat <<\EOF -Copyright 2003-2020,2021 Thomas E. Dickey +Copyright 2003-2022,2023 Thomas E. Dickey Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation @@ -942,7 +949,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was -generated by GNU Autoconf 2.52.20210105. Invocation command line was +generated by GNU Autoconf 2.52.20231210. Invocation command line was $ $0 $@ @@ -1066,7 +1073,7 @@ if test -z "$CONFIG_SITE"; then fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then - { echo "$as_me:1069: loading site script $ac_site_file" >&5 + { echo "$as_me:1076: 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" @@ -1077,7 +1084,7 @@ if test -r "$cache_file"; then # 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:1080: loading cache $cache_file" >&5 + { echo "$as_me:1087: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . $cache_file;; @@ -1085,7 +1092,7 @@ echo "$as_me: loading cache $cache_file" >&6;} esac fi else - { echo "$as_me:1088: creating cache $cache_file" >&5 + { echo "$as_me:1095: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi @@ -1101,21 +1108,21 @@ for ac_var in `(set) 2>&1 | eval ac_new_val="\$ac_env_${ac_var}_value" case "$ac_old_set,$ac_new_set" in set,) - { echo "$as_me:1104: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 + { echo "$as_me:1111: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { echo "$as_me:1108: error: \`$ac_var' was not set in the previous run" >&5 + { echo "$as_me:1115: error: \`$ac_var' was not set in the previous run" >&5 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then - { echo "$as_me:1114: error: \`$ac_var' has changed since the previous run:" >&5 + { echo "$as_me:1121: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - { echo "$as_me:1116: former value: $ac_old_val" >&5 + { echo "$as_me:1123: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} - { echo "$as_me:1118: current value: $ac_new_val" >&5 + { echo "$as_me:1125: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; @@ -1134,9 +1141,9 @@ echo "$as_me: current value: $ac_new_val" >&2;} fi done if "$ac_cache_corrupted"; then - { echo "$as_me:1137: error: changes in the environment can compromise the build" >&5 + { echo "$as_me:1144: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { echo "$as_me:1139: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 + { { echo "$as_me:1146: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi @@ -1165,10 +1172,10 @@ esac echo "#! $SHELL" >conftest.sh echo "exit 0" >>conftest.sh chmod +x conftest.sh -if { (echo "$as_me:1168: PATH=\".;.\"; conftest.sh") >&5 +if { (echo "$as_me:1175: PATH=\".;.\"; conftest.sh") >&5 (PATH=".;."; conftest.sh) 2>&5 ac_status=$? - echo "$as_me:1171: \$? = $ac_status" >&5 + echo "$as_me:1178: \$? = $ac_status" >&5 (exit "$ac_status"); }; then ac_path_separator=';' else @@ -1185,7 +1192,7 @@ for ac_prog in ggrep grep 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:1188: checking for $ac_word" >&5 +echo "$as_me:1195: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_GREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1200,7 +1207,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_GREP="$ac_prog" -echo "$as_me:1203: found $ac_dir/$ac_word" >&5 +echo "$as_me:1210: found $ac_dir/$ac_word" >&5 break done @@ -1208,10 +1215,10 @@ fi fi GREP=$ac_cv_prog_GREP if test -n "$GREP"; then - echo "$as_me:1211: result: $GREP" >&5 + echo "$as_me:1218: result: $GREP" >&5 echo "${ECHO_T}$GREP" >&6 else - echo "$as_me:1214: result: no" >&5 + echo "$as_me:1221: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1219,7 +1226,7 @@ fi done test -n "$GREP" || GREP=": " -echo "$as_me:1222: checking for egrep" >&5 +echo "$as_me:1229: checking for egrep" >&5 echo $ECHO_N "checking for egrep... $ECHO_C" >&6 if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1231,7 +1238,7 @@ else 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:1234: checking for $ac_word" >&5 +echo "$as_me:1241: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1248,7 +1255,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if $as_executable_p "$ac_dir/$ac_word"; then ac_cv_path_EGREP="$ac_dir/$ac_word" - echo "$as_me:1251: found $ac_dir/$ac_word" >&5 + echo "$as_me:1258: found $ac_dir/$ac_word" >&5 break fi done @@ -1259,10 +1266,10 @@ fi EGREP=$ac_cv_path_EGREP if test -n "$EGREP"; then - echo "$as_me:1262: result: $EGREP" >&5 + echo "$as_me:1269: result: $EGREP" >&5 echo "${ECHO_T}$EGREP" >&6 else - echo "$as_me:1265: result: no" >&5 + echo "$as_me:1272: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1270,12 +1277,12 @@ fi done test -n "$EGREP" || EGREP=": " - test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:1273: error: cannot find workable egrep" >&5 + test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:1280: error: cannot find workable egrep" >&5 echo "$as_me: error: cannot find workable egrep" >&2;} { (exit 1); exit 1; }; } fi fi -echo "$as_me:1278: result: $ac_cv_path_EGREP" >&5 +echo "$as_me:1285: result: $ac_cv_path_EGREP" >&5 echo "${ECHO_T}$ac_cv_path_EGREP" >&6 EGREP="$ac_cv_path_EGREP" @@ -1283,13 +1290,14 @@ NCURSES_MAJOR="`${EGREP-egrep} '^NCURSES_MAJOR[ ]*=' "$srcdir/dist.mk" | sed -e NCURSES_MINOR="`${EGREP-egrep} '^NCURSES_MINOR[ ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`" NCURSES_PATCH="`${EGREP-egrep} '^NCURSES_PATCH[ ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`" cf_cv_abi_version=${NCURSES_MAJOR} +cf_cv_abi_default=${NCURSES_MAJOR} cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR} cf_cv_timestamp=`date` -echo "$as_me:1288: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5 -echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6 +echo "$as_me:1296: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_default ($cf_cv_timestamp)" >&5 +echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_default ($cf_cv_timestamp)" >&6 if test -f "$srcdir/VERSION" ; then - echo "$as_me:1292: checking for package version" >&5 + echo "$as_me:1300: checking for package version" >&5 echo $ECHO_N "checking for package version... $ECHO_C" >&6 # if there are not enough fields, cut returns the last one... @@ -1301,39 +1309,39 @@ echo $ECHO_N "checking for package version... $ECHO_C" >&6 VERSION="$cf_field1" VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'` - test -z "$VERSION_MAJOR" && { { echo "$as_me:1304: error: missing major-version" >&5 + test -z "$VERSION_MAJOR" && { { echo "$as_me:1312: error: missing major-version" >&5 echo "$as_me: error: missing major-version" >&2;} { (exit 1); exit 1; }; } VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'` - test -z "$VERSION_MINOR" && { { echo "$as_me:1309: error: missing minor-version" >&5 + test -z "$VERSION_MINOR" && { { echo "$as_me:1317: error: missing minor-version" >&5 echo "$as_me: error: missing minor-version" >&2;} { (exit 1); exit 1; }; } - echo "$as_me:1313: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5 + echo "$as_me:1321: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6 - echo "$as_me:1316: checking for package patch date" >&5 + echo "$as_me:1324: checking for package patch date" >&5 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6 VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'` case .$VERSION_PATCH in (.) - { { echo "$as_me:1321: error: missing patch-date $VERSION_PATCH" >&5 + { { echo "$as_me:1329: error: missing patch-date $VERSION_PATCH" >&5 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;} { (exit 1); exit 1; }; } ;; (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]) ;; (*) - { { echo "$as_me:1328: error: illegal patch-date $VERSION_PATCH" >&5 + { { echo "$as_me:1336: error: illegal patch-date $VERSION_PATCH" >&5 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;} { (exit 1); exit 1; }; } ;; esac - echo "$as_me:1333: result: $VERSION_PATCH" >&5 + echo "$as_me:1341: result: $VERSION_PATCH" >&5 echo "${ECHO_T}$VERSION_PATCH" >&6 else - { { echo "$as_me:1336: error: did not find $srcdir/VERSION" >&5 + { { echo "$as_me:1344: error: did not find $srcdir/VERSION" >&5 echo "$as_me: error: did not find $srcdir/VERSION" >&2;} { (exit 1); exit 1; }; } fi @@ -1341,19 +1349,19 @@ fi # show the actual data that we have for versions: test -n "$verbose" && echo " ABI VERSION $VERSION" 1>&6 -echo "${as_me:-configure}:1344: testing ABI VERSION $VERSION ..." 1>&5 +echo "${as_me:-configure}:1352: testing ABI VERSION $VERSION ..." 1>&5 test -n "$verbose" && echo " VERSION_MAJOR $VERSION_MAJOR" 1>&6 -echo "${as_me:-configure}:1348: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5 +echo "${as_me:-configure}:1356: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5 test -n "$verbose" && echo " VERSION_MINOR $VERSION_MINOR" 1>&6 -echo "${as_me:-configure}:1352: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5 +echo "${as_me:-configure}:1360: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5 test -n "$verbose" && echo " VERSION_PATCH $VERSION_PATCH" 1>&6 -echo "${as_me:-configure}:1356: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5 +echo "${as_me:-configure}:1364: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5 cf_PACKAGE=NCURSES PACKAGE=ncurses @@ -1377,42 +1385,43 @@ test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0 # Check whether --with-rel-version or --without-rel-version was given. if test "${with_rel_version+set}" = set; then withval="$with_rel_version" - { echo "$as_me:1380: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5 + { echo "$as_me:1388: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;} cf_cv_rel_version=$withval fi; NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'` NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'` + test -n "NCURSES_MINOR" || NCURSES_MINOR=0 if test -n "$NCURSES_MAJOR" ; then - case $NCURSES_MAJOR in - ([0-9]*) + case `echo "$NCURSES_MAJOR" | sed -e 's/^[0-9]*$/0/g'` in + (0) ;; (*) - { { echo "$as_me:1393: error: Release major-version is not a number: $NCURSES_MAJOR" >&5 + { { echo "$as_me:1402: error: Release major-version is not a number: $NCURSES_MAJOR" >&5 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;} { (exit 1); exit 1; }; } ;; esac else - { { echo "$as_me:1399: error: Release major-version value is empty" >&5 + { { echo "$as_me:1408: error: Release major-version value is empty" >&5 echo "$as_me: error: Release major-version value is empty" >&2;} { (exit 1); exit 1; }; } fi if test -n "$NCURSES_MINOR" ; then - case $NCURSES_MINOR in - ([0-9]*) + case `echo "$NCURSES_MINOR" | sed -e 's/^[0-9]*$/0/g'` in + (0) ;; (*) - { { echo "$as_me:1409: error: Release minor-version is not a number: $NCURSES_MINOR" >&5 + { { echo "$as_me:1418: error: Release minor-version is not a number: $NCURSES_MINOR" >&5 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;} { (exit 1); exit 1; }; } ;; esac else - { { echo "$as_me:1415: error: Release minor-version value is empty" >&5 + { { echo "$as_me:1424: error: Release minor-version value is empty" >&5 echo "$as_me: error: Release minor-version value is empty" >&2;} { (exit 1); exit 1; }; } fi @@ -1425,7 +1434,7 @@ if test "${with_abi_version+set}" = set; then if test "x$cf_cv_abi_version" != "x$withval" then - { echo "$as_me:1428: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5 + { echo "$as_me:1437: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;} case "$cf_cv_rel_version" in (5.*) @@ -1440,21 +1449,23 @@ echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >& fi; if test -n "$cf_cv_abi_version" ; then - case $cf_cv_abi_version in - ([0-9]*) + case `echo "$cf_cv_abi_version" | sed -e 's/^[0-9]*$/0/g'` in + (0) ;; (*) - { { echo "$as_me:1447: error: ABI version is not a number: $cf_cv_abi_version" >&5 + { { echo "$as_me:1456: error: ABI version is not a number: $cf_cv_abi_version" >&5 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;} { (exit 1); exit 1; }; } ;; esac else - { { echo "$as_me:1453: error: ABI version value is empty" >&5 + { { echo "$as_me:1462: error: ABI version value is empty" >&5 echo "$as_me: error: ABI version value is empty" >&2;} { (exit 1); exit 1; }; } fi +cf_cv_abi_default=$cf_cv_abi_version + if test "x$cf_cv_abi_version" != "x$with_abi_version" then case "$cf_cv_rel_version" in @@ -1481,7 +1492,7 @@ for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do fi done if test -z "$ac_aux_dir"; then - { { echo "$as_me:1484: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 + { { echo "$as_me:1495: 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 @@ -1491,11 +1502,11 @@ ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. # Make sure we can run config.sub. $ac_config_sub sun4 >/dev/null 2>&1 || - { { echo "$as_me:1494: error: cannot run $ac_config_sub" >&5 + { { echo "$as_me:1505: error: cannot run $ac_config_sub" >&5 echo "$as_me: error: cannot run $ac_config_sub" >&2;} { (exit 1); exit 1; }; } -echo "$as_me:1498: checking build system type" >&5 +echo "$as_me:1509: checking build system type" >&5 echo $ECHO_N "checking build system type... $ECHO_C" >&6 if test "${ac_cv_build+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1504,23 +1515,23 @@ else test -z "$ac_cv_build_alias" && ac_cv_build_alias=`$ac_config_guess` test -z "$ac_cv_build_alias" && - { { echo "$as_me:1507: error: cannot guess build type; you must specify one" >&5 + { { echo "$as_me:1518: error: cannot guess build type; you must specify one" >&5 echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` || - { { echo "$as_me:1511: error: $ac_config_sub $ac_cv_build_alias failed." >&5 + { { echo "$as_me:1522: error: $ac_config_sub $ac_cv_build_alias failed." >&5 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;} { (exit 1); exit 1; }; } fi -echo "$as_me:1516: result: $ac_cv_build" >&5 +echo "$as_me:1527: result: $ac_cv_build" >&5 echo "${ECHO_T}$ac_cv_build" >&6 build=$ac_cv_build build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$as_me:1523: checking host system type" >&5 +echo "$as_me:1534: checking host system type" >&5 echo $ECHO_N "checking host system type... $ECHO_C" >&6 if test "${ac_cv_host+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1529,12 +1540,12 @@ else test -z "$ac_cv_host_alias" && ac_cv_host_alias=$ac_cv_build_alias ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` || - { { echo "$as_me:1532: error: $ac_config_sub $ac_cv_host_alias failed" >&5 + { { echo "$as_me:1543: error: $ac_config_sub $ac_cv_host_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} { (exit 1); exit 1; }; } fi -echo "$as_me:1537: result: $ac_cv_host" >&5 +echo "$as_me:1548: result: $ac_cv_host" >&5 echo "${ECHO_T}$ac_cv_host" >&6 host=$ac_cv_host host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` @@ -1542,7 +1553,7 @@ host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then - echo "$as_me:1545: checking target system type" >&5 + echo "$as_me:1556: checking target system type" >&5 echo $ECHO_N "checking target system type... $ECHO_C" >&6 if test "${ac_cv_target+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1551,12 +1562,12 @@ else test "x$ac_cv_target_alias" = "x" && ac_cv_target_alias=$ac_cv_host_alias ac_cv_target=`$ac_config_sub "$ac_cv_target_alias"` || - { { echo "$as_me:1554: error: $ac_config_sub $ac_cv_target_alias failed" >&5 + { { echo "$as_me:1565: error: $ac_config_sub $ac_cv_target_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;} { (exit 1); exit 1; }; } fi -echo "$as_me:1559: result: $ac_cv_target" >&5 +echo "$as_me:1570: result: $ac_cv_target" >&5 echo "${ECHO_T}$ac_cv_target" >&6 target=$ac_cv_target target_cpu=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` @@ -1588,13 +1599,13 @@ else fi test -z "$system_name" && system_name="$cf_cv_system_name" -test -n "$cf_cv_system_name" && echo "$as_me:1591: result: Configuring for $cf_cv_system_name" >&5 +test -n "$cf_cv_system_name" && echo "$as_me:1602: result: Configuring for $cf_cv_system_name" >&5 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6 if test ".$system_name" != ".$cf_cv_system_name" ; then - echo "$as_me:1595: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5 + echo "$as_me:1606: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6 - { { echo "$as_me:1597: error: \"Please remove config.cache and try again.\"" >&5 + { { echo "$as_me:1608: error: \"Please remove config.cache and try again.\"" >&5 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;} { (exit 1); exit 1; }; } fi @@ -1602,7 +1613,7 @@ fi # Check whether --with-system-type or --without-system-type was given. if test "${with_system_type+set}" = set; then withval="$with_system_type" - { echo "$as_me:1605: WARNING: overriding system type to $withval" >&5 + { echo "$as_me:1616: WARNING: overriding system type to $withval" >&5 echo "$as_me: WARNING: overriding system type to $withval" >&2;} cf_cv_system_name=$withval host_os=$withval @@ -1613,7 +1624,7 @@ fi; cf_user_CFLAGS="$CFLAGS" ### Default install-location -echo "$as_me:1616: checking for fgrep" >&5 +echo "$as_me:1627: checking for fgrep" >&5 echo $ECHO_N "checking for fgrep... $ECHO_C" >&6 if test "${ac_cv_path_FGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1625,7 +1636,7 @@ else 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:1628: checking for $ac_word" >&5 +echo "$as_me:1639: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_FGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1642,7 +1653,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if $as_executable_p "$ac_dir/$ac_word"; then ac_cv_path_FGREP="$ac_dir/$ac_word" - echo "$as_me:1645: found $ac_dir/$ac_word" >&5 + echo "$as_me:1656: found $ac_dir/$ac_word" >&5 break fi done @@ -1653,10 +1664,10 @@ fi FGREP=$ac_cv_path_FGREP if test -n "$FGREP"; then - echo "$as_me:1656: result: $FGREP" >&5 + echo "$as_me:1667: result: $FGREP" >&5 echo "${ECHO_T}$FGREP" >&6 else - echo "$as_me:1659: result: no" >&5 + echo "$as_me:1670: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1664,16 +1675,16 @@ fi done test -n "$FGREP" || FGREP=": " - test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:1667: error: cannot find workable fgrep" >&5 + test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:1678: error: cannot find workable fgrep" >&5 echo "$as_me: error: cannot find workable fgrep" >&2;} { (exit 1); exit 1; }; } fi fi -echo "$as_me:1672: result: $ac_cv_path_FGREP" >&5 +echo "$as_me:1683: result: $ac_cv_path_FGREP" >&5 echo "${ECHO_T}$ac_cv_path_FGREP" >&6 FGREP="$ac_cv_path_FGREP" -echo "$as_me:1676: checking for prefix" >&5 +echo "$as_me:1687: checking for prefix" >&5 echo $ECHO_N "checking for prefix... $ECHO_C" >&6 if test "x$prefix" = "xNONE" ; then case "$cf_cv_system_name" in @@ -1685,11 +1696,11 @@ if test "x$prefix" = "xNONE" ; then ;; esac fi -echo "$as_me:1688: result: $prefix" >&5 +echo "$as_me:1699: result: $prefix" >&5 echo "${ECHO_T}$prefix" >&6 if test "x$prefix" = "xNONE" ; then -echo "$as_me:1692: checking for default include-directory" >&5 +echo "$as_me:1703: checking for default include-directory" >&5 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6 test -n "$verbose" && echo 1>&6 for cf_symbol in \ @@ -1712,41 +1723,91 @@ do fi test -n "$verbose" && echo " tested $cf_dir" 1>&6 done -echo "$as_me:1715: result: $includedir" >&5 +echo "$as_me:1726: result: $includedir" >&5 echo "${ECHO_T}$includedir" >&6 fi ### Defaults for ncurses ABI -case x$cf_cv_abi_version in +# ABI 5 defaults: +cf_dft_ccharw_max=5 +cf_dft_chtype=auto +cf_dft_ext_colors=no +cf_dft_ext_const=no +cf_dft_ext_mouse=no +cf_dft_ext_putwin=no +cf_dft_ext_spfuncs=no +cf_dft_filter_syms=no +cf_dft_interop=no +cf_dft_mmask_t=auto +cf_dft_opaque_curses=no +cf_dft_ordinate_type=short +cf_dft_signed_char=no +cf_dft_tparm_arg=long +cf_dft_widec=no +cf_dft_with_lp64=no + +# ABI 6 default differences from ABI 5: +case x$cf_cv_abi_default in (x[6789]) + cf_dft_chtype=uint32_t cf_dft_ext_colors=yes cf_dft_ext_const=yes cf_dft_ext_mouse=yes cf_dft_ext_putwin=yes cf_dft_ext_spfuncs=yes cf_dft_filter_syms=yes - cf_dft_chtype=uint32_t - cf_dft_mmask_t=uint32_t cf_dft_interop=yes + cf_dft_mmask_t=uint32_t + cf_dft_opaque_curses=yes cf_dft_tparm_arg=intptr_t + cf_dft_widec=yes cf_dft_with_lp64=yes ;; -(*) - cf_dft_ext_colors=no - cf_dft_ext_const=no - cf_dft_ext_mouse=no - cf_dft_ext_putwin=no - cf_dft_ext_spfuncs=no - cf_dft_filter_syms=no - cf_dft_chtype=auto - cf_dft_mmask_t=auto - cf_dft_interop=no - cf_dft_tparm_arg=long - cf_dft_with_lp64=no +esac + +# ABI 7 default differences from ABI 6: +case x$cf_cv_abi_default in +(x[789]) + cf_dft_ccharw_max=6 + cf_dft_mmask_t=uint64_t + cf_dft_ordinate_type=int + cf_dft_signed_char=yes + # also: remove the wgetch-events feature in ABI 7 ;; esac +### override ABI version, e.g., packagers + +# Check whether --with-abi-altered or --without-abi-altered was given. +if test "${with_abi_altered+set}" = set; then + withval="$with_abi_altered" + +if test -n "$withval" ; then + case `echo "$withval" | sed -e 's/^[0-9]*$/0/g'` in + (0) + ;; + (*) + { { echo "$as_me:1791: error: ABI altered is not a number: $withval" >&5 +echo "$as_me: error: ABI altered is not a number: $withval" >&2;} + { (exit 1); exit 1; }; } + ;; + esac +else + { { echo "$as_me:1797: error: ABI altered value is empty" >&5 +echo "$as_me: error: ABI altered value is empty" >&2;} + { (exit 1); exit 1; }; } +fi + + if test "$cf_cv_abi_version" != "$withval" + then + { echo "$as_me:1804: WARNING: altering visible ABI from $cf_cv_abi_version to $withval" >&5 +echo "$as_me: WARNING: altering visible ABI from $cf_cv_abi_version to $withval" >&2;} + cf_cv_abi_version=$withval + fi + +fi; + ### Checks for programs. # Check whether --with-ada or --without-ada was given. @@ -1775,7 +1836,7 @@ if test -n "$ac_tool_prefix"; then 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:1778: checking for $ac_word" >&5 +echo "$as_me:1839: 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 @@ -1790,7 +1851,7 @@ for ac_dir in $ac_dummy; do 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:1793: found $ac_dir/$ac_word" >&5 +echo "$as_me:1854: found $ac_dir/$ac_word" >&5 break done @@ -1798,10 +1859,10 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:1801: result: $CC" >&5 + echo "$as_me:1862: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else - echo "$as_me:1804: result: no" >&5 + echo "$as_me:1865: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1814,7 +1875,7 @@ if test -z "$CC"; then 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:1817: checking for $ac_word" >&5 +echo "$as_me:1878: 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 @@ -1829,7 +1890,7 @@ for ac_dir in $ac_dummy; do 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:1832: found $ac_dir/$ac_word" >&5 +echo "$as_me:1893: found $ac_dir/$ac_word" >&5 break done @@ -1837,10 +1898,10 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:1840: result: $ac_ct_CC" >&5 + echo "$as_me:1901: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else - echo "$as_me:1843: result: no" >&5 + echo "$as_me:1904: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1850,32 +1911,32 @@ done CC=$ac_ct_CC fi -test -z "$CC" && { { echo "$as_me:1853: error: no acceptable cc found in \$PATH" >&5 +test -z "$CC" && { { echo "$as_me:1914: error: no acceptable cc found in \$PATH" >&5 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. -echo "$as_me:1858:" \ +echo "$as_me:1919:" \ "checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo "$2"` -{ (eval echo "$as_me:1861: \"$ac_compiler --version </dev/null >&5\"") >&5 +{ (eval echo "$as_me:1922: \"$ac_compiler --version </dev/null >&5\"") >&5 (eval $ac_compiler --version </dev/null >&5) 2>&5 ac_status=$? - echo "$as_me:1864: \$? = $ac_status" >&5 + echo "$as_me:1925: \$? = $ac_status" >&5 (exit "$ac_status"); } -{ (eval echo "$as_me:1866: \"$ac_compiler -v </dev/null >&5\"") >&5 +{ (eval echo "$as_me:1927: \"$ac_compiler -v </dev/null >&5\"") >&5 (eval $ac_compiler -v </dev/null >&5) 2>&5 ac_status=$? - echo "$as_me:1869: \$? = $ac_status" >&5 + echo "$as_me:1930: \$? = $ac_status" >&5 (exit "$ac_status"); } -{ (eval echo "$as_me:1871: \"$ac_compiler -V </dev/null >&5\"") >&5 +{ (eval echo "$as_me:1932: \"$ac_compiler -V </dev/null >&5\"") >&5 (eval $ac_compiler -V </dev/null >&5) 2>&5 ac_status=$? - echo "$as_me:1874: \$? = $ac_status" >&5 + echo "$as_me:1935: \$? = $ac_status" >&5 (exit "$ac_status"); } cat >"conftest.$ac_ext" <<_ACEOF -#line 1878 "configure" +#line 1939 "configure" #include "confdefs.h" int @@ -1891,13 +1952,13 @@ 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 compilers, and finding out an intuition # of exeext. -echo "$as_me:1894: checking for C compiler default output" >&5 +echo "$as_me:1955: 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:1897: \"$ac_link_default\"") >&5 +if { (eval echo "$as_me:1958: \"$ac_link_default\"") >&5 (eval $ac_link_default) 2>&5 ac_status=$? - echo "$as_me:1900: \$? = $ac_status" >&5 + echo "$as_me:1961: \$? = $ac_status" >&5 (exit "$ac_status"); }; then # Find the output, starting from the most likely. This scheme is # not robust to junk in `.', hence go to wildcards (a.*) only as a last @@ -1920,34 +1981,34 @@ done else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 -{ { echo "$as_me:1923: error: C compiler cannot create executables" >&5 +{ { echo "$as_me:1984: 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:1929: result: $ac_file" >&5 +echo "$as_me:1990: 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:1934: checking whether the C compiler works" >&5 +echo "$as_me:1995: 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:1940: \"$ac_try\"") >&5 + { (eval echo "$as_me:2001: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1943: \$? = $ac_status" >&5 + echo "$as_me:2004: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else - { { echo "$as_me:1950: error: cannot run C compiled programs. + { { echo "$as_me:2011: 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;} @@ -1955,24 +2016,24 @@ If you meant to cross compile, use \`--host'." >&2;} fi fi fi -echo "$as_me:1958: result: yes" >&5 +echo "$as_me:2019: result: yes" >&5 echo "${ECHO_T}yes" >&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:1965: checking whether we are cross compiling" >&5 +echo "$as_me:2026: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 -echo "$as_me:1967: result: $cross_compiling" >&5 +echo "$as_me:2028: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6 -echo "$as_me:1970: checking for executable suffix" >&5 +echo "$as_me:2031: checking for executable suffix" >&5 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6 -if { (eval echo "$as_me:1972: \"$ac_link\"") >&5 +if { (eval echo "$as_me:2033: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:1975: \$? = $ac_status" >&5 + echo "$as_me:2036: \$? = $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 @@ -1988,25 +2049,25 @@ for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do esac done else - { { echo "$as_me:1991: error: cannot compute EXEEXT: cannot compile and link" >&5 + { { echo "$as_me:2052: 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:1997: result: $ac_cv_exeext" >&5 +echo "$as_me:2058: 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:2003: checking for object suffix" >&5 +echo "$as_me:2064: 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 cat >"conftest.$ac_ext" <<_ACEOF -#line 2009 "configure" +#line 2070 "configure" #include "confdefs.h" int @@ -2018,10 +2079,10 @@ main (void) } _ACEOF rm -f conftest.o conftest.obj -if { (eval echo "$as_me:2021: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:2082: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:2024: \$? = $ac_status" >&5 + echo "$as_me:2085: \$? = $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 @@ -2033,24 +2094,24 @@ done else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 -{ { echo "$as_me:2036: error: cannot compute OBJEXT: cannot compile" >&5 +{ { echo "$as_me:2097: 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:2043: result: $ac_cv_objext" >&5 +echo "$as_me:2104: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -echo "$as_me:2047: checking whether we are using the GNU C compiler" >&5 +echo "$as_me:2108: 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 2053 "configure" +#line 2114 "configure" #include "confdefs.h" int @@ -2065,16 +2126,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:2068: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:2129: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:2071: \$? = $ac_status" >&5 + echo "$as_me:2132: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:2074: \"$ac_try\"") >&5 + { (eval echo "$as_me:2135: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2077: \$? = $ac_status" >&5 + echo "$as_me:2138: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_compiler_gnu=yes else @@ -2086,19 +2147,19 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -echo "$as_me:2089: result: $ac_cv_c_compiler_gnu" >&5 +echo "$as_me:2150: 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:2095: checking whether $CC accepts -g" >&5 +echo "$as_me:2156: 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 cat >"conftest.$ac_ext" <<_ACEOF -#line 2101 "configure" +#line 2162 "configure" #include "confdefs.h" int @@ -2110,16 +2171,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:2113: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:2174: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:2116: \$? = $ac_status" >&5 + echo "$as_me:2177: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:2119: \"$ac_try\"") >&5 + { (eval echo "$as_me:2180: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2122: \$? = $ac_status" >&5 + echo "$as_me:2183: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_prog_cc_g=yes else @@ -2129,7 +2190,7 @@ ac_cv_prog_cc_g=no fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:2132: result: $ac_cv_prog_cc_g" >&5 +echo "$as_me:2193: 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 @@ -2156,16 +2217,16 @@ cat >"conftest.$ac_ext" <<_ACEOF #endif _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:2159: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:2220: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:2162: \$? = $ac_status" >&5 + echo "$as_me:2223: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:2165: \"$ac_try\"") >&5 + { (eval echo "$as_me:2226: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2168: \$? = $ac_status" >&5 + echo "$as_me:2229: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then for ac_declaration in \ ''\ @@ -2177,7 +2238,7 @@ if { (eval echo "$as_me:2159: \"$ac_compile\"") >&5 'void exit (int);' do cat >"conftest.$ac_ext" <<_ACEOF -#line 2180 "configure" +#line 2241 "configure" #include "confdefs.h" #include <stdlib.h> $ac_declaration @@ -2190,16 +2251,16 @@ exit (42); } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:2193: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:2254: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:2196: \$? = $ac_status" >&5 + echo "$as_me:2257: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:2199: \"$ac_try\"") >&5 + { (eval echo "$as_me:2260: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2202: \$? = $ac_status" >&5 + echo "$as_me:2263: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then : else @@ -2209,7 +2270,7 @@ continue fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" cat >"conftest.$ac_ext" <<_ACEOF -#line 2212 "configure" +#line 2273 "configure" #include "confdefs.h" $ac_declaration int @@ -2221,16 +2282,16 @@ exit (42); } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:2224: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:2285: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:2227: \$? = $ac_status" >&5 + echo "$as_me:2288: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:2230: \"$ac_try\"") >&5 + { (eval echo "$as_me:2291: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2233: \$? = $ac_status" >&5 + echo "$as_me:2294: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then break else @@ -2260,11 +2321,11 @@ ac_main_return="return" GCC_VERSION=none if test "$GCC" = yes ; then - echo "$as_me:2263: checking version of $CC" >&5 + echo "$as_me:2324: checking version of $CC" >&5 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6 - GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`" + GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^[^(]*([^)][^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`" test -z "$GCC_VERSION" && GCC_VERSION=unknown - echo "$as_me:2267: result: $GCC_VERSION" >&5 + echo "$as_me:2328: result: $GCC_VERSION" >&5 echo "${ECHO_T}$GCC_VERSION" >&6 fi @@ -2273,12 +2334,12 @@ INTEL_COMPILER=no if test "$GCC" = yes ; then case "$host_os" in (linux*|gnu*) - echo "$as_me:2276: checking if this is really Intel C compiler" >&5 + echo "$as_me:2337: checking if this is really Intel C compiler" >&5 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6 cf_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -no-gcc" cat >"conftest.$ac_ext" <<_ACEOF -#line 2281 "configure" +#line 2342 "configure" #include "confdefs.h" int @@ -2287,7 +2348,7 @@ main (void) #ifdef __INTEL_COMPILER #else -make an error +#error __INTEL_COMPILER is not defined #endif ; @@ -2295,16 +2356,16 @@ make an error } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:2298: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:2359: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:2301: \$? = $ac_status" >&5 + echo "$as_me:2362: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:2304: \"$ac_try\"") >&5 + { (eval echo "$as_me:2365: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2307: \$? = $ac_status" >&5 + echo "$as_me:2368: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then INTEL_COMPILER=yes cf_save_CFLAGS="$cf_save_CFLAGS -we147" @@ -2315,7 +2376,7 @@ cat "conftest.$ac_ext" >&5 fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" CFLAGS="$cf_save_CFLAGS" - echo "$as_me:2318: result: $INTEL_COMPILER" >&5 + echo "$as_me:2379: result: $INTEL_COMPILER" >&5 echo "${ECHO_T}$INTEL_COMPILER" >&6 ;; esac @@ -2324,11 +2385,11 @@ fi CLANG_COMPILER=no if test "$GCC" = yes ; then - echo "$as_me:2327: checking if this is really Clang C compiler" >&5 + echo "$as_me:2388: checking if this is really Clang C compiler" >&5 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6 cf_save_CFLAGS="$CFLAGS" cat >"conftest.$ac_ext" <<_ACEOF -#line 2331 "configure" +#line 2392 "configure" #include "confdefs.h" int @@ -2337,7 +2398,7 @@ main (void) #ifdef __clang__ #else -make an error +#error __clang__ is not defined #endif ; @@ -2345,16 +2406,16 @@ make an error } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:2348: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:2409: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:2351: \$? = $ac_status" >&5 + echo "$as_me:2412: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:2354: \"$ac_try\"") >&5 + { (eval echo "$as_me:2415: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2357: \$? = $ac_status" >&5 + echo "$as_me:2418: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then CLANG_COMPILER=yes @@ -2364,7 +2425,7 @@ cat "conftest.$ac_ext" >&5 fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" CFLAGS="$cf_save_CFLAGS" - echo "$as_me:2367: result: $CLANG_COMPILER" >&5 + echo "$as_me:2428: result: $CLANG_COMPILER" >&5 echo "${ECHO_T}$CLANG_COMPILER" >&6 fi @@ -2373,30 +2434,30 @@ CLANG_VERSION=none if test "x$CLANG_COMPILER" = "xyes" ; then case "$CC" in (c[1-9][0-9]|*/c[1-9][0-9]) - { echo "$as_me:2376: WARNING: replacing broken compiler alias $CC" >&5 + { echo "$as_me:2437: WARNING: replacing broken compiler alias $CC" >&5 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;} CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`" CC=clang ;; esac - echo "$as_me:2383: checking version of $CC" >&5 + echo "$as_me:2444: checking version of $CC" >&5 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6 CLANG_VERSION="`$CC --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(CLANG[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`" test -z "$CLANG_VERSION" && CLANG_VERSION=unknown - echo "$as_me:2387: result: $CLANG_VERSION" >&5 + echo "$as_me:2448: result: $CLANG_VERSION" >&5 echo "${ECHO_T}$CLANG_VERSION" >&6 for cf_clang_opt in \ -Qunused-arguments \ -Wno-error=implicit-function-declaration do - echo "$as_me:2394: checking if option $cf_clang_opt works" >&5 + echo "$as_me:2455: checking if option $cf_clang_opt works" >&5 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6 cf_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $cf_clang_opt" cat >"conftest.$ac_ext" <<_ACEOF -#line 2399 "configure" +#line 2460 "configure" #include "confdefs.h" #include <stdio.h> @@ -2410,16 +2471,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:2413: \"$ac_link\"") >&5 +if { (eval echo "$as_me:2474: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:2416: \$? = $ac_status" >&5 + echo "$as_me:2477: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:2419: \"$ac_try\"") >&5 + { (eval echo "$as_me:2480: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2422: \$? = $ac_status" >&5 + echo "$as_me:2483: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_clang_optok=yes @@ -2430,13 +2491,13 @@ cat "conftest.$ac_ext" >&5 cf_clang_optok=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" - echo "$as_me:2433: result: $cf_clang_optok" >&5 + echo "$as_me:2494: result: $cf_clang_optok" >&5 echo "${ECHO_T}$cf_clang_optok" >&6 CFLAGS="$cf_save_CFLAGS" if test "$cf_clang_optok" = yes; then test -n "$verbose" && echo " adding option $cf_clang_opt" 1>&6 -echo "${as_me:-configure}:2439: testing adding option $cf_clang_opt ..." 1>&5 +echo "${as_me:-configure}:2500: testing adding option $cf_clang_opt ..." 1>&5 test -n "$CFLAGS" && CFLAGS="$CFLAGS " CFLAGS="${CFLAGS}$cf_clang_opt" @@ -2445,7 +2506,7 @@ echo "${as_me:-configure}:2439: testing adding option $cf_clang_opt ..." 1>&5 done fi -echo "$as_me:2448: checking for $CC option to accept ANSI C" >&5 +echo "$as_me:2509: checking for $CC option to accept ANSI C" >&5 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 if test "${ac_cv_prog_cc_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2453,7 +2514,7 @@ else ac_cv_prog_cc_stdc=no ac_save_CC=$CC cat >"conftest.$ac_ext" <<_ACEOF -#line 2456 "configure" +#line 2517 "configure" #include "confdefs.h" #include <stdarg.h> #include <stdio.h> @@ -2462,9 +2523,7 @@ cat >"conftest.$ac_ext" <<_ACEOF /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; +static char *e (char **p, int i) { return p[i]; } @@ -2502,16 +2561,16 @@ for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIO do CC="$ac_save_CC $ac_arg" rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:2505: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:2564: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:2508: \$? = $ac_status" >&5 + echo "$as_me:2567: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:2511: \"$ac_try\"") >&5 + { (eval echo "$as_me:2570: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2514: \$? = $ac_status" >&5 + echo "$as_me:2573: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_prog_cc_stdc=$ac_arg break @@ -2528,10 +2587,10 @@ fi case "x$ac_cv_prog_cc_stdc" in x|xno) - echo "$as_me:2531: result: none needed" >&5 + echo "$as_me:2590: result: none needed" >&5 echo "${ECHO_T}none needed" >&6 ;; *) - echo "$as_me:2534: result: $ac_cv_prog_cc_stdc" >&5 + echo "$as_me:2593: result: $ac_cv_prog_cc_stdc" >&5 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 CC="$CC $ac_cv_prog_cc_stdc" ;; esac @@ -2539,13 +2598,13 @@ esac # This should have been defined by AC_PROG_CC : "${CC:=cc}" -echo "$as_me:2542: checking \$CFLAGS variable" >&5 +echo "$as_me:2601: checking \$CFLAGS variable" >&5 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6 case "x$CFLAGS" in (*-[IUD]*) - echo "$as_me:2546: result: broken" >&5 + echo "$as_me:2605: result: broken" >&5 echo "${ECHO_T}broken" >&6 - { echo "$as_me:2548: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5 + { echo "$as_me:2607: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;} cf_flags="$CFLAGS" CFLAGS= @@ -2653,22 +2712,22 @@ fi done ;; (*) - echo "$as_me:2656: result: ok" >&5 + echo "$as_me:2715: result: ok" >&5 echo "${ECHO_T}ok" >&6 ;; esac -echo "$as_me:2661: checking \$CC variable" >&5 +echo "$as_me:2720: checking \$CC variable" >&5 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6 case "$CC" in (*[\ \ ]-*) - echo "$as_me:2665: result: broken" >&5 + echo "$as_me:2724: result: broken" >&5 echo "${ECHO_T}broken" >&6 - { echo "$as_me:2667: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5 + { echo "$as_me:2726: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;} # humor him... cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'` - cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'` + cf_flags=`echo "$CC" | sed -e "s%^$cf_prog%%"` CC="$cf_prog" for cf_arg in $cf_flags do @@ -2781,19 +2840,19 @@ fi done test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6 -echo "${as_me:-configure}:2784: testing resulting CC: '$CC' ..." 1>&5 +echo "${as_me:-configure}:2843: testing resulting CC: '$CC' ..." 1>&5 test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6 -echo "${as_me:-configure}:2788: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5 +echo "${as_me:-configure}:2847: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5 test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6 -echo "${as_me:-configure}:2792: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5 +echo "${as_me:-configure}:2851: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5 ;; (*) - echo "$as_me:2796: result: ok" >&5 + echo "$as_me:2855: result: ok" >&5 echo "${ECHO_T}ok" >&6 ;; esac @@ -2804,7 +2863,7 @@ 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_main_return="return" -echo "$as_me:2807: checking how to run the C preprocessor" >&5 +echo "$as_me:2866: 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 @@ -2825,18 +2884,18 @@ do # 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 2828 "configure" +#line 2887 "configure" #include "confdefs.h" #include <assert.h> Syntax error _ACEOF -if { (eval echo "$as_me:2833: \"$ac_cpp "conftest.$ac_ext"\"") >&5 +if { (eval echo "$as_me:2892: \"$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:2839: \$? = $ac_status" >&5 + echo "$as_me:2898: \$? = $ac_status" >&5 (exit "$ac_status"); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -2859,17 +2918,17 @@ 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 2862 "configure" +#line 2921 "configure" #include "confdefs.h" #include <ac_nonexistent.h> _ACEOF -if { (eval echo "$as_me:2866: \"$ac_cpp "conftest.$ac_ext"\"") >&5 +if { (eval echo "$as_me:2925: \"$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:2872: \$? = $ac_status" >&5 + echo "$as_me:2931: \$? = $ac_status" >&5 (exit "$ac_status"); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -2906,7 +2965,7 @@ fi else ac_cv_prog_CPP=$CPP fi -echo "$as_me:2909: result: $CPP" >&5 +echo "$as_me:2968: result: $CPP" >&5 echo "${ECHO_T}$CPP" >&6 ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes @@ -2916,18 +2975,18 @@ do # 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 2919 "configure" +#line 2978 "configure" #include "confdefs.h" #include <assert.h> Syntax error _ACEOF -if { (eval echo "$as_me:2924: \"$ac_cpp "conftest.$ac_ext"\"") >&5 +if { (eval echo "$as_me:2983: \"$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:2930: \$? = $ac_status" >&5 + echo "$as_me:2989: \$? = $ac_status" >&5 (exit "$ac_status"); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -2950,17 +3009,17 @@ 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 2953 "configure" +#line 3012 "configure" #include "confdefs.h" #include <ac_nonexistent.h> _ACEOF -if { (eval echo "$as_me:2957: \"$ac_cpp "conftest.$ac_ext"\"") >&5 +if { (eval echo "$as_me:3016: \"$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:2963: \$? = $ac_status" >&5 + echo "$as_me:3022: \$? = $ac_status" >&5 (exit "$ac_status"); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -2988,7 +3047,7 @@ rm -f conftest.err "conftest.$ac_ext" if $ac_preproc_ok; then : else - { { echo "$as_me:2991: error: C preprocessor \"$CPP\" fails sanity check" >&5 + { { echo "$as_me:3050: error: C preprocessor \"$CPP\" fails sanity check" >&5 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;} { (exit 1); exit 1; }; } fi @@ -3001,14 +3060,14 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_main_return="return" if test $ac_cv_c_compiler_gnu = yes; then - echo "$as_me:3004: checking whether $CC needs -traditional" >&5 + echo "$as_me:3063: checking whether $CC needs -traditional" >&5 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6 if test "${ac_cv_prog_gcc_traditional+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_pattern="Autoconf.*'x'" cat >"conftest.$ac_ext" <<_ACEOF -#line 3011 "configure" +#line 3070 "configure" #include "confdefs.h" #include <sgtty.h> int Autoconf = TIOCGETP; @@ -3023,7 +3082,7 @@ rm -rf conftest* if test $ac_cv_prog_gcc_traditional = no; then cat >"conftest.$ac_ext" <<_ACEOF -#line 3026 "configure" +#line 3085 "configure" #include "confdefs.h" #include <termio.h> int Autoconf = TCGETA; @@ -3036,14 +3095,14 @@ rm -rf conftest* fi fi -echo "$as_me:3039: result: $ac_cv_prog_gcc_traditional" >&5 +echo "$as_me:3098: result: $ac_cv_prog_gcc_traditional" >&5 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6 if test $ac_cv_prog_gcc_traditional = yes; then CC="$CC -traditional" fi fi -echo "$as_me:3046: checking whether $CC understands -c and -o together" >&5 +echo "$as_me:3105: checking whether $CC understands -c and -o together" >&5 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6 if test "${cf_cv_prog_CC_c_o+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -3058,15 +3117,15 @@ CF_EOF # We do the test twice because some compilers refuse to overwrite an # existing .o file with -o, though they will create one. ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5' -if { (eval echo "$as_me:3061: \"$ac_try\"") >&5 +if { (eval echo "$as_me:3120: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3064: \$? = $ac_status" >&5 + echo "$as_me:3123: \$? = $ac_status" >&5 (exit "$ac_status"); } && - test -f conftest2.$ac_objext && { (eval echo "$as_me:3066: \"$ac_try\"") >&5 + test -f conftest2.$ac_objext && { (eval echo "$as_me:3125: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3069: \$? = $ac_status" >&5 + echo "$as_me:3128: \$? = $ac_status" >&5 (exit "$ac_status"); }; then eval cf_cv_prog_CC_c_o=yes @@ -3077,10 +3136,10 @@ rm -rf ./conftest* fi if test "$cf_cv_prog_CC_c_o" = yes; then - echo "$as_me:3080: result: yes" >&5 + echo "$as_me:3139: result: yes" >&5 echo "${ECHO_T}yes" >&6 else - echo "$as_me:3083: result: no" >&5 + echo "$as_me:3142: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -3094,7 +3153,7 @@ else (*) LDPATH=$PATH:/sbin:/usr/sbin # Extract the first word of "ldconfig", so it can be a program name with args. set dummy ldconfig; ac_word=$2 -echo "$as_me:3097: checking for $ac_word" >&5 +echo "$as_me:3156: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_LDCONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -3111,7 +3170,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if $as_executable_p "$ac_dir/$ac_word"; then ac_cv_path_LDCONFIG="$ac_dir/$ac_word" - echo "$as_me:3114: found $ac_dir/$ac_word" >&5 + echo "$as_me:3173: found $ac_dir/$ac_word" >&5 break fi done @@ -3122,10 +3181,10 @@ fi LDCONFIG=$ac_cv_path_LDCONFIG if test -n "$LDCONFIG"; then - echo "$as_me:3125: result: $LDCONFIG" >&5 + echo "$as_me:3184: result: $LDCONFIG" >&5 echo "${ECHO_T}$LDCONFIG" >&6 else - echo "$as_me:3128: result: no" >&5 + echo "$as_me:3187: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -3133,7 +3192,7 @@ fi esac fi -echo "$as_me:3136: checking if you want to ensure bool is consistent with C++" >&5 +echo "$as_me:3195: checking if you want to ensure bool is consistent with C++" >&5 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6 # Check whether --with-cxx or --without-cxx was given. @@ -3143,7 +3202,7 @@ if test "${with_cxx+set}" = set; then else cf_with_cxx=yes fi; -echo "$as_me:3146: result: $cf_with_cxx" >&5 +echo "$as_me:3205: result: $cf_with_cxx" >&5 echo "${ECHO_T}$cf_with_cxx" >&6 if test "X$cf_with_cxx" = Xno ; then CXX="" @@ -3161,7 +3220,7 @@ if test -n "$ac_tool_prefix"; then 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:3164: checking for $ac_word" >&5 +echo "$as_me:3223: 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 @@ -3176,7 +3235,7 @@ for ac_dir in $ac_dummy; do 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:3179: found $ac_dir/$ac_word" >&5 +echo "$as_me:3238: found $ac_dir/$ac_word" >&5 break done @@ -3184,10 +3243,10 @@ fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then - echo "$as_me:3187: result: $CXX" >&5 + echo "$as_me:3246: result: $CXX" >&5 echo "${ECHO_T}$CXX" >&6 else - echo "$as_me:3190: result: no" >&5 + echo "$as_me:3249: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -3200,7 +3259,7 @@ if test -z "$CXX"; then 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:3203: checking for $ac_word" >&5 +echo "$as_me:3262: 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 @@ -3215,7 +3274,7 @@ for ac_dir in $ac_dummy; do 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:3218: found $ac_dir/$ac_word" >&5 +echo "$as_me:3277: found $ac_dir/$ac_word" >&5 break done @@ -3223,10 +3282,10 @@ fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then - echo "$as_me:3226: result: $ac_ct_CXX" >&5 + echo "$as_me:3285: result: $ac_ct_CXX" >&5 echo "${ECHO_T}$ac_ct_CXX" >&6 else - echo "$as_me:3229: result: no" >&5 + echo "$as_me:3288: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -3238,32 +3297,32 @@ test -n "$ac_ct_CXX" || ac_ct_CXX="g++" fi # Provide some information about the compiler. -echo "$as_me:3241:" \ +echo "$as_me:3300:" \ "checking for C++ compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:3244: \"$ac_compiler --version </dev/null >&5\"") >&5 +{ (eval echo "$as_me:3303: \"$ac_compiler --version </dev/null >&5\"") >&5 (eval $ac_compiler --version </dev/null >&5) 2>&5 ac_status=$? - echo "$as_me:3247: \$? = $ac_status" >&5 + echo "$as_me:3306: \$? = $ac_status" >&5 (exit "$ac_status"); } -{ (eval echo "$as_me:3249: \"$ac_compiler -v </dev/null >&5\"") >&5 +{ (eval echo "$as_me:3308: \"$ac_compiler -v </dev/null >&5\"") >&5 (eval $ac_compiler -v </dev/null >&5) 2>&5 ac_status=$? - echo "$as_me:3252: \$? = $ac_status" >&5 + echo "$as_me:3311: \$? = $ac_status" >&5 (exit "$ac_status"); } -{ (eval echo "$as_me:3254: \"$ac_compiler -V </dev/null >&5\"") >&5 +{ (eval echo "$as_me:3313: \"$ac_compiler -V </dev/null >&5\"") >&5 (eval $ac_compiler -V </dev/null >&5) 2>&5 ac_status=$? - echo "$as_me:3257: \$? = $ac_status" >&5 + echo "$as_me:3316: \$? = $ac_status" >&5 (exit "$ac_status"); } -echo "$as_me:3260: checking whether we are using the GNU C++ compiler" >&5 +echo "$as_me:3319: 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.$ac_ext" <<_ACEOF -#line 3266 "configure" +#line 3325 "configure" #include "confdefs.h" int @@ -3278,16 +3337,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:3281: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:3340: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:3284: \$? = $ac_status" >&5 + echo "$as_me:3343: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:3287: \"$ac_try\"") >&5 + { (eval echo "$as_me:3346: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3290: \$? = $ac_status" >&5 + echo "$as_me:3349: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_compiler_gnu=yes else @@ -3299,19 +3358,19 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi -echo "$as_me:3302: result: $ac_cv_cxx_compiler_gnu" >&5 +echo "$as_me:3361: 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:3308: checking whether $CXX accepts -g" >&5 +echo "$as_me:3367: 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 cat >"conftest.$ac_ext" <<_ACEOF -#line 3314 "configure" +#line 3373 "configure" #include "confdefs.h" int @@ -3323,16 +3382,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:3326: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:3385: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:3329: \$? = $ac_status" >&5 + echo "$as_me:3388: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:3332: \"$ac_try\"") >&5 + { (eval echo "$as_me:3391: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3335: \$? = $ac_status" >&5 + echo "$as_me:3394: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_prog_cxx_g=yes else @@ -3342,7 +3401,7 @@ ac_cv_prog_cxx_g=no fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:3345: result: $ac_cv_prog_cxx_g" >&5 +echo "$as_me:3404: 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 @@ -3369,7 +3428,7 @@ for ac_declaration in \ 'void exit (int);' do cat >"conftest.$ac_ext" <<_ACEOF -#line 3372 "configure" +#line 3431 "configure" #include "confdefs.h" #include <stdlib.h> $ac_declaration @@ -3382,16 +3441,16 @@ exit (42); } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:3385: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:3444: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:3388: \$? = $ac_status" >&5 + echo "$as_me:3447: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:3391: \"$ac_try\"") >&5 + { (eval echo "$as_me:3450: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3394: \$? = $ac_status" >&5 + echo "$as_me:3453: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then : else @@ -3401,7 +3460,7 @@ continue fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" cat >"conftest.$ac_ext" <<_ACEOF -#line 3404 "configure" +#line 3463 "configure" #include "confdefs.h" $ac_declaration int @@ -3413,16 +3472,16 @@ exit (42); } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:3416: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:3475: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:3419: \$? = $ac_status" >&5 + echo "$as_me:3478: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:3422: \"$ac_try\"") >&5 + { (eval echo "$as_me:3481: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3425: \$? = $ac_status" >&5 + echo "$as_me:3484: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then break else @@ -3456,7 +3515,7 @@ ac_main_return="return" then # Several of the C++ configurations do not work, particularly when # cross-compiling (20140913 -TD) - echo "$as_me:3459: checking if $CXX works" >&5 + echo "$as_me:3518: checking if $CXX works" >&5 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6 save_CPPFLAGS="$CPPFLAGS" @@ -3464,7 +3523,7 @@ echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6 CPPFLAGS="$CPPFLAGS -I${cf_includedir}" cat >"conftest.$ac_ext" <<_ACEOF -#line 3467 "configure" +#line 3526 "configure" #include "confdefs.h" #include <stdlib.h> @@ -3481,16 +3540,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:3484: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:3543: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:3487: \$? = $ac_status" >&5 + echo "$as_me:3546: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:3490: \"$ac_try\"") >&5 + { (eval echo "$as_me:3549: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3493: \$? = $ac_status" >&5 + echo "$as_me:3552: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cxx_works=yes else @@ -3501,11 +3560,11 @@ fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" CPPFLAGS="$save_CPPFLAGS" - echo "$as_me:3504: result: $cf_cxx_works" >&5 + echo "$as_me:3563: result: $cf_cxx_works" >&5 echo "${ECHO_T}$cf_cxx_works" >&6 if test "x$cf_cxx_works" = xno then - { echo "$as_me:3508: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5 + { echo "$as_me:3567: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;} cf_with_cxx=no; CXX=""; GXX=""; fi @@ -3521,7 +3580,7 @@ ac_main_return="return" if test "$CXX" = "g++" ; then # Extract the first word of "g++", so it can be a program name with args. set dummy g++; ac_word=$2 -echo "$as_me:3524: checking for $ac_word" >&5 +echo "$as_me:3583: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -3538,7 +3597,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if $as_executable_p "$ac_dir/$ac_word"; then ac_cv_path_CXX="$ac_dir/$ac_word" - echo "$as_me:3541: found $ac_dir/$ac_word" >&5 + echo "$as_me:3600: found $ac_dir/$ac_word" >&5 break fi done @@ -3549,17 +3608,17 @@ fi CXX=$ac_cv_path_CXX if test -n "$CXX"; then - echo "$as_me:3552: result: $CXX" >&5 + echo "$as_me:3611: result: $CXX" >&5 echo "${ECHO_T}$CXX" >&6 else - echo "$as_me:3555: result: no" >&5 + echo "$as_me:3614: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi case "x$CXX" in (x|xg++) - { echo "$as_me:3562: WARNING: You don't have any C++ compiler, too bad" >&5 + { echo "$as_me:3621: WARNING: You don't have any C++ compiler, too bad" >&5 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;} cf_with_cxx=no; CXX=""; GXX=""; ;; @@ -3568,15 +3627,15 @@ fi GXX_VERSION=none if test "$GXX" = yes; then - echo "$as_me:3571: checking version of ${CXX:-g++}" >&5 + echo "$as_me:3630: checking version of ${CXX:-g++}" >&5 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6 - GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`" + GXX_VERSION="`${CXX:-g++} --version 2>/dev/null | sed -e '2,$d' -e 's/^[^(]*([^)][^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`" if test -z "$GXX_VERSION" then GXX_VERSION=unknown GXX=no fi - echo "$as_me:3579: result: $GXX_VERSION" >&5 + echo "$as_me:3638: result: $GXX_VERSION" >&5 echo "${ECHO_T}$GXX_VERSION" >&6 fi @@ -3584,12 +3643,12 @@ case "$GXX_VERSION" in ([1-9][0-9].*) ;; (1.*|2.[0-6]*) - { echo "$as_me:3587: WARNING: templates do not work" >&5 + { echo "$as_me:3646: WARNING: templates do not work" >&5 echo "$as_me: WARNING: templates do not work" >&2;} ;; esac -echo "$as_me:3592: checking if you want to build C++ binding and demo" >&5 +echo "$as_me:3651: checking if you want to build C++ binding and demo" >&5 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6 # Check whether --with-cxx-binding or --without-cxx-binding was given. @@ -3599,15 +3658,15 @@ if test "${with_cxx_binding+set}" = set; then else cf_with_cxx_binding=$cf_with_cxx fi; -echo "$as_me:3602: result: $cf_with_cxx_binding" >&5 +echo "$as_me:3661: result: $cf_with_cxx_binding" >&5 echo "${ECHO_T}$cf_with_cxx_binding" >&6 -echo "$as_me:3605: checking if you want to build with Ada" >&5 +echo "$as_me:3664: checking if you want to build with Ada" >&5 echo $ECHO_N "checking if you want to build with Ada... $ECHO_C" >&6 -echo "$as_me:3607: result: $cf_with_ada" >&5 +echo "$as_me:3666: result: $cf_with_ada" >&5 echo "${ECHO_T}$cf_with_ada" >&6 -echo "$as_me:3610: checking if you want to install terminal database" >&5 +echo "$as_me:3669: checking if you want to install terminal database" >&5 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6 # Check whether --enable-db-install or --disable-db-install was given. @@ -3617,10 +3676,10 @@ if test "${enable_db_install+set}" = set; then else cf_with_db_install=yes fi; -echo "$as_me:3620: result: $cf_with_db_install" >&5 +echo "$as_me:3679: result: $cf_with_db_install" >&5 echo "${ECHO_T}$cf_with_db_install" >&6 -echo "$as_me:3623: checking if you want to install manpages" >&5 +echo "$as_me:3682: checking if you want to install manpages" >&5 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6 # Check whether --with-manpages or --without-manpages was given. @@ -3630,10 +3689,10 @@ if test "${with_manpages+set}" = set; then else cf_with_manpages=yes fi; -echo "$as_me:3633: result: $cf_with_manpages" >&5 +echo "$as_me:3692: result: $cf_with_manpages" >&5 echo "${ECHO_T}$cf_with_manpages" >&6 -echo "$as_me:3636: checking if you want to build programs such as tic" >&5 +echo "$as_me:3695: checking if you want to build programs such as tic" >&5 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6 # Check whether --with-progs or --without-progs was given. @@ -3643,35 +3702,10 @@ if test "${with_progs+set}" = set; then else cf_with_progs=yes fi; -echo "$as_me:3646: result: $cf_with_progs" >&5 +echo "$as_me:3705: result: $cf_with_progs" >&5 echo "${ECHO_T}$cf_with_progs" >&6 -if test -f "$srcdir/tack/tack.h" ; then - if test "x$cross_compiling" = xyes ; then - test -n "$verbose" && echo " ignoring tack because we are cross-compiling" 1>&6 - -echo "${as_me:-configure}:3653: testing ignoring tack because we are cross-compiling ..." 1>&5 - - cf_with_tack=no - else - echo "$as_me:3657: checking if you want to build the tack program" >&5 -echo $ECHO_N "checking if you want to build the tack program... $ECHO_C" >&6 - -# Check whether --with-tack or --without-tack was given. -if test "${with_tack+set}" = set; then - withval="$with_tack" - cf_with_tack=$withval -else - cf_with_tack=$cf_with_progs -fi; - echo "$as_me:3667: result: $cf_with_tack" >&5 -echo "${ECHO_T}$cf_with_tack" >&6 - fi -else - cf_with_tack=no -fi - -echo "$as_me:3674: checking if you want to build test-programs" >&5 +echo "$as_me:3708: checking if you want to build test-programs" >&5 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6 # Check whether --with-tests or --without-tests was given. @@ -3681,10 +3715,10 @@ if test "${with_tests+set}" = set; then else cf_with_tests=yes fi; -echo "$as_me:3684: result: $cf_with_tests" >&5 +echo "$as_me:3718: result: $cf_with_tests" >&5 echo "${ECHO_T}$cf_with_tests" >&6 -echo "$as_me:3687: checking if you wish to install curses.h" >&5 +echo "$as_me:3721: checking if you wish to install curses.h" >&5 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6 # Check whether --with-curses-h or --without-curses-h was given. @@ -3694,12 +3728,11 @@ if test "${with_curses_h+set}" = set; then else with_curses_h=yes fi; -echo "$as_me:3697: result: $with_curses_h" >&5 +echo "$as_me:3731: result: $with_curses_h" >&5 echo "${ECHO_T}$with_curses_h" >&6 modules_to_build="ncurses" test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs" -test "X$cf_with_tack" != Xno && modules_to_build="$modules_to_build tack" modules_to_build="$modules_to_build panel menu form" test "$program_prefix" != NONE && @@ -3719,7 +3752,7 @@ for ac_prog in mawk gawk nawk awk 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:3722: checking for $ac_word" >&5 +echo "$as_me:3755: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -3734,7 +3767,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_AWK="$ac_prog" -echo "$as_me:3737: found $ac_dir/$ac_word" >&5 +echo "$as_me:3770: found $ac_dir/$ac_word" >&5 break done @@ -3742,17 +3775,17 @@ fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then - echo "$as_me:3745: result: $AWK" >&5 + echo "$as_me:3778: result: $AWK" >&5 echo "${ECHO_T}$AWK" >&6 else - echo "$as_me:3748: result: no" >&5 + echo "$as_me:3781: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$AWK" && break done -test -z "$AWK" && { { echo "$as_me:3755: error: No awk program found" >&5 +test -z "$AWK" && { { echo "$as_me:3788: error: No awk program found" >&5 echo "$as_me: error: No awk program found" >&2;} { (exit 1); exit 1; }; } @@ -3768,7 +3801,7 @@ echo "$as_me: error: No awk program found" >&2;} # 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 "$as_me:3771: checking for a BSD compatible install" >&5 +echo "$as_me:3804: 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 test "${ac_cv_path_install+set}" = set; then @@ -3817,7 +3850,7 @@ fi INSTALL=$ac_install_sh fi fi -echo "$as_me:3820: result: $INSTALL" >&5 +echo "$as_me:3853: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. @@ -3842,7 +3875,7 @@ for ac_prog in lint cppcheck splint 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:3845: checking for $ac_word" >&5 +echo "$as_me:3878: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_LINT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -3857,7 +3890,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_LINT="$ac_prog" -echo "$as_me:3860: found $ac_dir/$ac_word" >&5 +echo "$as_me:3893: found $ac_dir/$ac_word" >&5 break done @@ -3865,10 +3898,10 @@ fi fi LINT=$ac_cv_prog_LINT if test -n "$LINT"; then - echo "$as_me:3868: result: $LINT" >&5 + echo "$as_me:3901: result: $LINT" >&5 echo "${ECHO_T}$LINT" >&6 else - echo "$as_me:3871: result: no" >&5 + echo "$as_me:3904: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -3881,18 +3914,18 @@ case "x$LINT" in ;; esac -echo "$as_me:3884: checking whether ln -s works" >&5 +echo "$as_me:3917: 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:3888: result: yes" >&5 + echo "$as_me:3921: result: yes" >&5 echo "${ECHO_T}yes" >&6 else - echo "$as_me:3891: result: no, using $LN_S" >&5 + echo "$as_me:3924: result: no, using $LN_S" >&5 echo "${ECHO_T}no, using $LN_S" >&6 fi -echo "$as_me:3895: checking if $LN_S -f options work" >&5 +echo "$as_me:3928: checking if $LN_S -f options work" >&5 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6 rm -f conf$$.src conf$$dst @@ -3904,12 +3937,12 @@ else cf_prog_ln_sf=no fi rm -f conf$$.dst conf$$src -echo "$as_me:3907: result: $cf_prog_ln_sf" >&5 +echo "$as_me:3940: result: $cf_prog_ln_sf" >&5 echo "${ECHO_T}$cf_prog_ln_sf" >&6 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f" -echo "$as_me:3912: checking for long file names" >&5 +echo "$as_me:3945: checking for long file names" >&5 echo $ECHO_N "checking for long file names... $ECHO_C" >&6 if test "${ac_cv_sys_long_file_names+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -3948,7 +3981,7 @@ for ac_dir in . $ac_tmpdirs `eval echo "$prefix/lib" "$exec_prefix/lib"` ; do rm -rf "$ac_xdir" 2>/dev/null done fi -echo "$as_me:3951: result: $ac_cv_sys_long_file_names" >&5 +echo "$as_me:3984: result: $ac_cv_sys_long_file_names" >&5 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6 if test "$ac_cv_sys_long_file_names" = yes; then @@ -3967,7 +4000,7 @@ if test "${with_config_suffix+set}" = set; then withval="$with_config_suffix" case "x$withval" in (xyes|xno) - { echo "$as_me:3970: WARNING: expected a value for config-suffix option" >&5 + { echo "$as_me:4003: WARNING: expected a value for config-suffix option" >&5 echo "$as_me: WARNING: expected a value for config-suffix option" >&2;} ;; (*) cf_config_suffix="$withval" @@ -3977,7 +4010,7 @@ fi; # If we find pkg-config, check if we should install the ".pc" files. -echo "$as_me:3980: checking if you want to use pkg-config" >&5 +echo "$as_me:4013: checking if you want to use pkg-config" >&5 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6 # Check whether --with-pkg-config or --without-pkg-config was given. @@ -3987,7 +4020,7 @@ if test "${with_pkg_config+set}" = set; then else cf_pkg_config=yes fi; -echo "$as_me:3990: result: $cf_pkg_config" >&5 +echo "$as_me:4023: result: $cf_pkg_config" >&5 echo "${ECHO_T}$cf_pkg_config" >&6 case "$cf_pkg_config" in @@ -3999,7 +4032,7 @@ case "$cf_pkg_config" in if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 -echo "$as_me:4002: checking for $ac_word" >&5 +echo "$as_me:4035: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -4016,7 +4049,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if $as_executable_p "$ac_dir/$ac_word"; then ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word" - echo "$as_me:4019: found $ac_dir/$ac_word" >&5 + echo "$as_me:4052: found $ac_dir/$ac_word" >&5 break fi done @@ -4027,10 +4060,10 @@ fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - echo "$as_me:4030: result: $PKG_CONFIG" >&5 + echo "$as_me:4063: result: $PKG_CONFIG" >&5 echo "${ECHO_T}$PKG_CONFIG" >&6 else - echo "$as_me:4033: result: no" >&5 + echo "$as_me:4066: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -4039,7 +4072,7 @@ if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -echo "$as_me:4042: checking for $ac_word" >&5 +echo "$as_me:4075: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -4056,7 +4089,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if $as_executable_p "$ac_dir/$ac_word"; then ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word" - echo "$as_me:4059: found $ac_dir/$ac_word" >&5 + echo "$as_me:4092: found $ac_dir/$ac_word" >&5 break fi done @@ -4068,10 +4101,10 @@ fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then - echo "$as_me:4071: result: $ac_pt_PKG_CONFIG" >&5 + echo "$as_me:4104: result: $ac_pt_PKG_CONFIG" >&5 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6 else - echo "$as_me:4074: result: no" >&5 + echo "$as_me:4107: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -4114,110 +4147,164 @@ case ".$PKG_CONFIG" in PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%` ;; (*) - { { echo "$as_me:4117: error: expected a pathname, not \"$PKG_CONFIG\"" >&5 + { { echo "$as_me:4150: error: expected a pathname, not \"$PKG_CONFIG\"" >&5 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;} { (exit 1); exit 1; }; } ;; esac elif test "x$cf_pkg_config" != xno ; then - { echo "$as_me:4124: WARNING: pkg-config is not installed" >&5 + { echo "$as_me:4157: WARNING: pkg-config is not installed" >&5 echo "$as_me: WARNING: pkg-config is not installed" >&2;} fi case "$PKG_CONFIG" in (no|none|yes) - echo "$as_me:4130: checking for pkg-config library directory" >&5 + echo "$as_me:4163: checking for pkg-config library directory" >&5 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6 ;; (*) - echo "$as_me:4134: checking for $PKG_CONFIG library directory" >&5 + echo "$as_me:4167: checking for $PKG_CONFIG library directory" >&5 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6 ;; esac -PKG_CONFIG_LIBDIR=no +# if $PKG_CONFIG_LIBDIR is set, try to use that +if test -n "$PKG_CONFIG_PATH"; then + cf_search_path=`echo "$PKG_CONFIG_PATH" | sed -e 's/:/ /g' -e 's,^[ ]*,,' -e 's,[ ]*$,,'` +elif test -n "$PKG_CONFIG_LIBDIR"; then + cf_search_path=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/:/ /g' -e 's,^[ ]*,,' -e 's,[ ]*$,,'` +else + cf_search_path=auto +fi + +# if the option is used, let that override. otherwise default to "libdir" # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given. if test "${with_pkg_config_libdir+set}" = set; then withval="$with_pkg_config_libdir" - PKG_CONFIG_LIBDIR=$withval + cf_search_path=$withval else - test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes + test "x$PKG_CONFIG" != xnone && test -z "$cf_search_path" && cf_search_path=libdir fi; -case x$PKG_CONFIG_LIBDIR in +case "x$cf_search_path" in +(xlibdir) + PKG_CONFIG_LIBDIR='${libdir}/pkgconfig' + echo "$as_me:4194: result: $PKG_CONFIG_LIBDIR" >&5 +echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6 + cf_search_path= + ;; +(x) + ;; +(x/*\ *) + PKG_CONFIG_LIBDIR= + ;; (x/*) + PKG_CONFIG_LIBDIR="$cf_search_path" + echo "$as_me:4205: result: $PKG_CONFIG_LIBDIR" >&5 +echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6 + cf_search_path= ;; -(xyes) +(xyes|xauto) + echo "$as_me:4210: result: auto" >&5 +echo "${ECHO_T}auto" >&6 + cf_search_path= # Look for the library directory using the same prefix as the executable - if test "x$PKG_CONFIG" = xnone + echo "$as_me:4214: checking for search-list" >&5 +echo $ECHO_N "checking for search-list... $ECHO_C" >&6 + if test "x$PKG_CONFIG" != xnone then - cf_path=$prefix - else - cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'` - fi - - # If you don't like using the default architecture, you have to specify the - # intended library directory and corresponding compiler/linker options. - # - # This case allows for Debian's 2014-flavor of multiarch, along with the - # most common variations before that point. Some other variants spell the - # directory differently, e.g., "pkg-config", and put it in unusual places. - # pkg-config has always been poorly standardized, which is ironic... - case x`(arch) 2>/dev/null` in - (*64) - cf_search_path="\ - $cf_path/lib/*64-linux-gnu \ - $cf_path/share \ - $cf_path/lib64 \ - $cf_path/lib32 \ - $cf_path/lib" - ;; - (*) - cf_search_path="\ - $cf_path/lib/*-linux-gnu \ - $cf_path/share \ - $cf_path/lib32 \ - $cf_path/lib \ - $cf_path/libdata" - ;; - esac + # works for pkg-config since version 0.24 (2009) + # works for pkgconf since version 0.8.3 (2012) + for cf_pkg_program in \ + `echo "$PKG_CONFIG" | sed -e 's,^.*/,,'` \ + pkg-config \ + pkgconf + do + cf_search_path=`"$PKG_CONFIG" --variable=pc_path "$cf_pkg_program" 2>/dev/null | tr : ' '` + test -n "$cf_search_path" && break + done - test -n "$verbose" && echo " list..." 1>&6 + # works for pkg-config since import in 2005 of original 2001 HP code. + test -z "$cf_search_path" && \ + cf_search_path=` + "$PKG_CONFIG" --debug --exists no-such-package 2>&1 | $AWK "\ +/^Scanning directory (#[1-9][0-9]* )?'.*'$/{ \ + sub(\"^[^']*'\",\"\"); \ + sub(\"'.*\",\"\"); \ + printf \" %s\", \\$0; } \ +{ next; } \ +"` + fi -echo "${as_me:-configure}:4189: testing list... ..." 1>&5 + echo "$as_me:4241: result: $cf_search_path" >&5 +echo "${ECHO_T}$cf_search_path" >&6 + ;; +(*) + { { echo "$as_me:4245: error: Unexpected option value: $cf_search_path" >&5 +echo "$as_me: error: Unexpected option value: $cf_search_path" >&2;} + { (exit 1); exit 1; }; } + ;; +esac +if test -n "$cf_search_path" +then + echo "$as_me:4253: checking for first directory" >&5 +echo $ECHO_N "checking for first directory... $ECHO_C" >&6 + cf_pkg_config_path=none for cf_config in $cf_search_path do - test -n "$verbose" && echo " checking $cf_config/pkgconfig" 1>&6 - -echo "${as_me:-configure}:4195: testing checking $cf_config/pkgconfig ..." 1>&5 - - if test -d "$cf_config/pkgconfig" + if test -d "$cf_config" then - PKG_CONFIG_LIBDIR=$cf_config/pkgconfig - echo "$as_me:4200: checking done" >&5 -echo $ECHO_N "checking done... $ECHO_C" >&6 + cf_pkg_config_path=$cf_config break fi done - ;; -(*) - ;; -esac + echo "$as_me:4264: result: $cf_pkg_config_path" >&5 +echo "${ECHO_T}$cf_pkg_config_path" >&6 + + if test "x$cf_pkg_config_path" != xnone ; then + # limit this to the first directory found + PKG_CONFIG_LIBDIR="$cf_pkg_config_path" + fi -if test "x$PKG_CONFIG_LIBDIR" != xno ; then - echo "$as_me:4211: result: $PKG_CONFIG_LIBDIR" >&5 + if test -z "$PKG_CONFIG_LIBDIR" && test -n "$cf_search_path" + then + echo "$as_me:4274: checking for workaround" >&5 +echo $ECHO_N "checking for workaround... $ECHO_C" >&6 + if test "$prefix" = "NONE" ; then + cf_prefix="$ac_default_prefix" + else + cf_prefix="$prefix" + fi + eval cf_libdir=$libdir + cf_libdir=`echo "$cf_libdir" | sed -e "s,^NONE,$cf_prefix,"` + cf_backup= + for cf_config in $cf_search_path + do + case $cf_config in + $cf_libdir/pkgconfig) + PKG_CONFIG_LIBDIR=$cf_libdir/pkgconfig + break + ;; + *) + test -z "$cf_backup" && cf_backup=$cf_config + ;; + esac + done + test -z "$PKG_CONFIG_LIBDIR" && PKG_CONFIG_LIBDIR=$cf_backup + echo "$as_me:4297: result: $PKG_CONFIG_LIBDIR" >&5 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6 + fi fi if test "x$PKG_CONFIG" != xnone then - echo "$as_me:4217: checking if we should install .pc files for $PKG_CONFIG" >&5 + echo "$as_me:4304: checking if we should install .pc files for $PKG_CONFIG" >&5 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6 else - echo "$as_me:4220: checking if we should install .pc files" >&5 + echo "$as_me:4307: checking if we should install .pc files" >&5 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6 fi @@ -4228,18 +4315,19 @@ if test "${enable_pc_files+set}" = set; then else enable_pc_files=no fi; -echo "$as_me:4231: result: $enable_pc_files" >&5 +echo "$as_me:4318: result: $enable_pc_files" >&5 echo "${ECHO_T}$enable_pc_files" >&6 if test "x$enable_pc_files" != xno then MAKE_PC_FILES= case "x$PKG_CONFIG_LIBDIR" in - (xno|xyes) - { echo "$as_me:4239: WARNING: no PKG_CONFIG_LIBDIR was found" >&5 + (xno|xnone|xyes|x) + { echo "$as_me:4326: WARNING: no PKG_CONFIG_LIBDIR was found" >&5 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;} ;; (*) + cf_pkg_config_libdir="$PKG_CONFIG_LIBDIR" if test "x$prefix" != xNONE; then cf_path_syntax="$prefix" @@ -4247,7 +4335,7 @@ else cf_path_syntax="$ac_default_prefix" fi -case ".$PKG_CONFIG_LIBDIR" in +case ".$cf_pkg_config_libdir" in (.\$\(*\)*|.\'*\'*) ;; (..|./*|.\\*) @@ -4255,19 +4343,19 @@ case ".$PKG_CONFIG_LIBDIR" in (.[a-zA-Z]:[\\/]*) # OS/2 EMX ;; (.\$\{*prefix\}*|.\$\{*dir\}*) - eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR" - case ".$PKG_CONFIG_LIBDIR" in + eval cf_pkg_config_libdir="$cf_pkg_config_libdir" + case ".$cf_pkg_config_libdir" in (.NONE/*) - PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e s%NONE%$cf_path_syntax%` + cf_pkg_config_libdir=`echo "$cf_pkg_config_libdir" | sed -e s%NONE%$cf_path_syntax%` ;; esac ;; (.no|.NONE/*) - PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e s%NONE%$cf_path_syntax%` + cf_pkg_config_libdir=`echo "$cf_pkg_config_libdir" | sed -e s%NONE%$cf_path_syntax%` ;; (*) - { { echo "$as_me:4269: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5 -echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;} + { { echo "$as_me:4357: error: expected a pathname, not \"$cf_pkg_config_libdir\"" >&5 +echo "$as_me: error: expected a pathname, not \"$cf_pkg_config_libdir\"" >&2;} { (exit 1); exit 1; }; } ;; esac @@ -4280,8 +4368,8 @@ fi if test -z "$MAKE_PC_FILES" then - echo "$as_me:4283: checking for suffix to add to pc-files" >&5 -echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6 + echo "$as_me:4371: checking for suffix to add to pkg-config files" >&5 +echo $ECHO_N "checking for suffix to add to pkg-config files... $ECHO_C" >&6 # Check whether --with-pc-suffix or --without-pc-suffix was given. if test "${with_pc_suffix+set}" = set; then @@ -4295,13 +4383,13 @@ if test "${with_pc_suffix+set}" = set; then esac fi; test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none - echo "$as_me:4298: result: $PC_MODULE_SUFFIX" >&5 + echo "$as_me:4386: result: $PC_MODULE_SUFFIX" >&5 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6 test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX= fi -echo "$as_me:4304: checking if we should assume mixed-case filenames" >&5 +echo "$as_me:4392: checking if we should assume mixed-case filenames" >&5 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6 # Check whether --enable-mixed-case or --disable-mixed-case was given. @@ -4311,11 +4399,11 @@ if test "${enable_mixed_case+set}" = set; then else enable_mixedcase=auto fi; -echo "$as_me:4314: result: $enable_mixedcase" >&5 +echo "$as_me:4402: result: $enable_mixedcase" >&5 echo "${ECHO_T}$enable_mixedcase" >&6 if test "$enable_mixedcase" = "auto" ; then -echo "$as_me:4318: checking if filesystem supports mixed-case filenames" >&5 +echo "$as_me:4406: checking if filesystem supports mixed-case filenames" >&5 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6 if test "${cf_cv_mixedcase+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -4342,7 +4430,7 @@ else fi fi -echo "$as_me:4345: result: $cf_cv_mixedcase" >&5 +echo "$as_me:4433: result: $cf_cv_mixedcase" >&5 echo "${ECHO_T}$cf_cv_mixedcase" >&6 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF @@ -4361,7 +4449,7 @@ EOF fi # do this after mixed-case option (tags/TAGS is not as important as tic). -echo "$as_me:4364: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "$as_me:4452: checking whether ${MAKE-make} sets \${MAKE}" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then @@ -4381,20 +4469,82 @@ fi rm -f conftest.make fi if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then - echo "$as_me:4384: result: yes" >&5 + echo "$as_me:4472: result: yes" >&5 echo "${ECHO_T}yes" >&6 SET_MAKE= else - echo "$as_me:4388: result: no" >&5 + echo "$as_me:4476: result: no" >&5 echo "${ECHO_T}no" >&6 SET_MAKE="MAKE=${MAKE-make}" fi +echo "$as_me:4481: checking for \".PHONY\" make-support" >&5 +echo $ECHO_N "checking for \".PHONY\" make-support... $ECHO_C" >&6 +if test "${cf_cv_make_PHONY+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + rm -rf conftest* + ( + mkdir conftest || exit 1 + cd conftest + cat >makefile <<'CF_EOF' +.PHONY: always +DATA=0 +always: always.out + @echo "** making $@ $(DATA)" +once: once.out + @echo "** making $@ $(DATA)" +always.out: + @echo "** making $@ $(DATA)" + echo $(DATA) > $@ +once.out: + @echo "** making $@ $(DATA)" + echo $(DATA) > $@ +CF_EOF + for cf_data in 1 2 3 + do + ${MAKE:-make} always DATA=$cf_data + ${MAKE:-make} once DATA=$cf_data + ${MAKE:-make} -t always once + if test -f always ; then + echo "no (case 1)" > ../conftest.tmp + elif test ! -f always.out ; then + echo "no (case 2)" > ../conftest.tmp + elif test ! -f once.out ; then + echo "no (case 3)" > ../conftest.tmp + elif ! cmp -s always.out once.out ; then + echo "no (case 4)" > ../conftest.tmp + diff always.out once.out + else + cf_check="`cat always.out`" + if test "x$cf_check" != "x$cf_data" ; then + echo "no (case 5)" > ../conftest.tmp + else + echo yes > ../conftest.tmp + rm -f ./*.out + continue + fi + fi + break + done + ) >&5 2>&1 + cf_cv_make_PHONY="`cat conftest.tmp`" + rm -rf conftest* + +fi +echo "$as_me:4536: result: $cf_cv_make_PHONY" >&5 +echo "${ECHO_T}$cf_cv_make_PHONY" >&6 +MAKE_NO_PHONY="#" +MAKE_PHONY="#" +test "x$cf_cv_make_PHONY" = xyes && MAKE_PHONY= +test "x$cf_cv_make_PHONY" != xyes && MAKE_NO_PHONY= + for ac_prog in exctags ctags 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:4397: checking for $ac_word" >&5 +echo "$as_me:4547: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CTAGS+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -4409,7 +4559,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_CTAGS="$ac_prog" -echo "$as_me:4412: found $ac_dir/$ac_word" >&5 +echo "$as_me:4562: found $ac_dir/$ac_word" >&5 break done @@ -4417,10 +4567,10 @@ fi fi CTAGS=$ac_cv_prog_CTAGS if test -n "$CTAGS"; then - echo "$as_me:4420: result: $CTAGS" >&5 + echo "$as_me:4570: result: $CTAGS" >&5 echo "${ECHO_T}$CTAGS" >&6 else - echo "$as_me:4423: result: no" >&5 + echo "$as_me:4573: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -4431,7 +4581,7 @@ for ac_prog in exetags etags 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:4434: checking for $ac_word" >&5 +echo "$as_me:4584: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ETAGS+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -4446,7 +4596,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_ETAGS="$ac_prog" -echo "$as_me:4449: found $ac_dir/$ac_word" >&5 +echo "$as_me:4599: found $ac_dir/$ac_word" >&5 break done @@ -4454,10 +4604,10 @@ fi fi ETAGS=$ac_cv_prog_ETAGS if test -n "$ETAGS"; then - echo "$as_me:4457: result: $ETAGS" >&5 + echo "$as_me:4607: result: $ETAGS" >&5 echo "${ECHO_T}$ETAGS" >&6 else - echo "$as_me:4460: result: no" >&5 + echo "$as_me:4610: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -4466,7 +4616,7 @@ done # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args. set dummy ${CTAGS:-ctags}; ac_word=$2 -echo "$as_me:4469: checking for $ac_word" >&5 +echo "$as_me:4619: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -4481,7 +4631,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_MAKE_LOWER_TAGS="yes" -echo "$as_me:4484: found $ac_dir/$ac_word" >&5 +echo "$as_me:4634: found $ac_dir/$ac_word" >&5 break done @@ -4490,17 +4640,17 @@ fi fi MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS if test -n "$MAKE_LOWER_TAGS"; then - echo "$as_me:4493: result: $MAKE_LOWER_TAGS" >&5 + echo "$as_me:4643: result: $MAKE_LOWER_TAGS" >&5 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6 else - echo "$as_me:4496: result: no" >&5 + echo "$as_me:4646: result: no" >&5 echo "${ECHO_T}no" >&6 fi if test "$cf_cv_mixedcase" = yes ; then # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args. set dummy ${ETAGS:-etags}; ac_word=$2 -echo "$as_me:4503: checking for $ac_word" >&5 +echo "$as_me:4653: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -4515,7 +4665,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_MAKE_UPPER_TAGS="yes" -echo "$as_me:4518: found $ac_dir/$ac_word" >&5 +echo "$as_me:4668: found $ac_dir/$ac_word" >&5 break done @@ -4524,10 +4674,10 @@ fi fi MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS if test -n "$MAKE_UPPER_TAGS"; then - echo "$as_me:4527: result: $MAKE_UPPER_TAGS" >&5 + echo "$as_me:4677: result: $MAKE_UPPER_TAGS" >&5 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6 else - echo "$as_me:4530: result: no" >&5 + echo "$as_me:4680: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -4547,7 +4697,7 @@ else MAKE_LOWER_TAGS="#" fi -echo "$as_me:4550: checking for makeflags variable" >&5 +echo "$as_me:4700: checking for makeflags variable" >&5 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6 if test "${cf_cv_makeflags+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -4577,7 +4727,7 @@ CF_EOF ;; (*) -echo "${as_me:-configure}:4580: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5 +echo "${as_me:-configure}:4730: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5 ;; esac @@ -4585,13 +4735,13 @@ echo "${as_me:-configure}:4580: testing given option \"$cf_option\",no match \"$ rm -f cf_makeflags.tmp fi -echo "$as_me:4588: result: $cf_cv_makeflags" >&5 +echo "$as_me:4738: result: $cf_cv_makeflags" >&5 echo "${ECHO_T}$cf_cv_makeflags" >&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:4594: checking for $ac_word" >&5 +echo "$as_me:4744: 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 @@ -4606,7 +4756,7 @@ for ac_dir in $ac_dummy; do 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:4609: found $ac_dir/$ac_word" >&5 +echo "$as_me:4759: found $ac_dir/$ac_word" >&5 break done @@ -4614,10 +4764,10 @@ fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - echo "$as_me:4617: result: $RANLIB" >&5 + echo "$as_me:4767: result: $RANLIB" >&5 echo "${ECHO_T}$RANLIB" >&6 else - echo "$as_me:4620: result: no" >&5 + echo "$as_me:4770: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -4626,7 +4776,7 @@ 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:4629: checking for $ac_word" >&5 +echo "$as_me:4779: 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 @@ -4641,7 +4791,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_ac_ct_RANLIB="ranlib" -echo "$as_me:4644: found $ac_dir/$ac_word" >&5 +echo "$as_me:4794: found $ac_dir/$ac_word" >&5 break done @@ -4650,10 +4800,10 @@ fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then - echo "$as_me:4653: result: $ac_ct_RANLIB" >&5 + echo "$as_me:4803: result: $ac_ct_RANLIB" >&5 echo "${ECHO_T}$ac_ct_RANLIB" >&6 else - echo "$as_me:4656: result: no" >&5 + echo "$as_me:4806: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -4665,7 +4815,7 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args. set dummy ${ac_tool_prefix}ld; ac_word=$2 -echo "$as_me:4668: checking for $ac_word" >&5 +echo "$as_me:4818: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_LD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -4680,7 +4830,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_LD="${ac_tool_prefix}ld" -echo "$as_me:4683: found $ac_dir/$ac_word" >&5 +echo "$as_me:4833: found $ac_dir/$ac_word" >&5 break done @@ -4688,10 +4838,10 @@ fi fi LD=$ac_cv_prog_LD if test -n "$LD"; then - echo "$as_me:4691: result: $LD" >&5 + echo "$as_me:4841: result: $LD" >&5 echo "${ECHO_T}$LD" >&6 else - echo "$as_me:4694: result: no" >&5 + echo "$as_me:4844: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -4700,7 +4850,7 @@ if test -z "$ac_cv_prog_LD"; then ac_ct_LD=$LD # Extract the first word of "ld", so it can be a program name with args. set dummy ld; ac_word=$2 -echo "$as_me:4703: checking for $ac_word" >&5 +echo "$as_me:4853: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -4715,7 +4865,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_ac_ct_LD="ld" -echo "$as_me:4718: found $ac_dir/$ac_word" >&5 +echo "$as_me:4868: found $ac_dir/$ac_word" >&5 break done @@ -4724,10 +4874,10 @@ fi fi ac_ct_LD=$ac_cv_prog_ac_ct_LD if test -n "$ac_ct_LD"; then - echo "$as_me:4727: result: $ac_ct_LD" >&5 + echo "$as_me:4877: result: $ac_ct_LD" >&5 echo "${ECHO_T}$ac_ct_LD" >&6 else - echo "$as_me:4730: result: no" >&5 + echo "$as_me:4880: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -4739,7 +4889,7 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 -echo "$as_me:4742: checking for $ac_word" >&5 +echo "$as_me:4892: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -4754,7 +4904,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_AR="${ac_tool_prefix}ar" -echo "$as_me:4757: found $ac_dir/$ac_word" >&5 +echo "$as_me:4907: found $ac_dir/$ac_word" >&5 break done @@ -4762,10 +4912,10 @@ fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then - echo "$as_me:4765: result: $AR" >&5 + echo "$as_me:4915: result: $AR" >&5 echo "${ECHO_T}$AR" >&6 else - echo "$as_me:4768: result: no" >&5 + echo "$as_me:4918: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -4774,7 +4924,7 @@ if test -z "$ac_cv_prog_AR"; then ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 -echo "$as_me:4777: checking for $ac_word" >&5 +echo "$as_me:4927: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -4789,7 +4939,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_ac_ct_AR="ar" -echo "$as_me:4792: found $ac_dir/$ac_word" >&5 +echo "$as_me:4942: found $ac_dir/$ac_word" >&5 break done @@ -4798,10 +4948,10 @@ fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then - echo "$as_me:4801: result: $ac_ct_AR" >&5 + echo "$as_me:4951: result: $ac_ct_AR" >&5 echo "${ECHO_T}$ac_ct_AR" >&6 else - echo "$as_me:4804: result: no" >&5 + echo "$as_me:4954: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -4813,7 +4963,7 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args. set dummy ${ac_tool_prefix}nm; ac_word=$2 -echo "$as_me:4816: checking for $ac_word" >&5 +echo "$as_me:4966: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_NM+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -4828,7 +4978,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_NM="${ac_tool_prefix}nm" -echo "$as_me:4831: found $ac_dir/$ac_word" >&5 +echo "$as_me:4981: found $ac_dir/$ac_word" >&5 break done @@ -4836,10 +4986,10 @@ fi fi NM=$ac_cv_prog_NM if test -n "$NM"; then - echo "$as_me:4839: result: $NM" >&5 + echo "$as_me:4989: result: $NM" >&5 echo "${ECHO_T}$NM" >&6 else - echo "$as_me:4842: result: no" >&5 + echo "$as_me:4992: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -4848,7 +4998,7 @@ if test -z "$ac_cv_prog_NM"; then ac_ct_NM=$NM # Extract the first word of "nm", so it can be a program name with args. set dummy nm; ac_word=$2 -echo "$as_me:4851: checking for $ac_word" >&5 +echo "$as_me:5001: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -4863,7 +5013,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_ac_ct_NM="nm" -echo "$as_me:4866: found $ac_dir/$ac_word" >&5 +echo "$as_me:5016: found $ac_dir/$ac_word" >&5 break done @@ -4872,10 +5022,10 @@ fi fi ac_ct_NM=$ac_cv_prog_ac_ct_NM if test -n "$ac_ct_NM"; then - echo "$as_me:4875: result: $ac_ct_NM" >&5 + echo "$as_me:5025: result: $ac_ct_NM" >&5 echo "${ECHO_T}$ac_ct_NM" >&6 else - echo "$as_me:4878: result: no" >&5 + echo "$as_me:5028: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -4887,7 +5037,7 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 -echo "$as_me:4890: checking for $ac_word" >&5 +echo "$as_me:5040: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -4902,7 +5052,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_AR="${ac_tool_prefix}ar" -echo "$as_me:4905: found $ac_dir/$ac_word" >&5 +echo "$as_me:5055: found $ac_dir/$ac_word" >&5 break done @@ -4910,10 +5060,10 @@ fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then - echo "$as_me:4913: result: $AR" >&5 + echo "$as_me:5063: result: $AR" >&5 echo "${ECHO_T}$AR" >&6 else - echo "$as_me:4916: result: no" >&5 + echo "$as_me:5066: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -4922,7 +5072,7 @@ if test -z "$ac_cv_prog_AR"; then ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 -echo "$as_me:4925: checking for $ac_word" >&5 +echo "$as_me:5075: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -4937,7 +5087,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_ac_ct_AR="ar" -echo "$as_me:4940: found $ac_dir/$ac_word" >&5 +echo "$as_me:5090: found $ac_dir/$ac_word" >&5 break done @@ -4946,10 +5096,10 @@ fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then - echo "$as_me:4949: result: $ac_ct_AR" >&5 + echo "$as_me:5099: result: $ac_ct_AR" >&5 echo "${ECHO_T}$ac_ct_AR" >&6 else - echo "$as_me:4952: result: no" >&5 + echo "$as_me:5102: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -4958,7 +5108,7 @@ else AR="$ac_cv_prog_AR" fi -echo "$as_me:4961: checking for options to update archives" >&5 +echo "$as_me:5111: checking for options to update archives" >&5 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6 if test "${cf_cv_ar_flags+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -4995,13 +5145,13 @@ else rm -f conftest.a cat >"conftest.$ac_ext" <<EOF -#line 4998 "configure" +#line 5148 "configure" int testdata[3] = { 123, 456, 789 }; EOF - if { (eval echo "$as_me:5001: \"$ac_compile\"") >&5 + if { (eval echo "$as_me:5151: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:5004: \$? = $ac_status" >&5 + echo "$as_me:5154: \$? = $ac_status" >&5 (exit "$ac_status"); } ; then echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5 $AR $ARFLAGS "$cf_ar_flags" conftest.a "conftest.$ac_cv_objext" 2>&5 1>/dev/null @@ -5012,7 +5162,7 @@ EOF else test -n "$verbose" && echo " cannot compile test-program" 1>&6 -echo "${as_me:-configure}:5015: testing cannot compile test-program ..." 1>&5 +echo "${as_me:-configure}:5165: testing cannot compile test-program ..." 1>&5 break fi @@ -5022,7 +5172,7 @@ echo "${as_me:-configure}:5015: testing cannot compile test-program ..." 1>&5 esac fi -echo "$as_me:5025: result: $cf_cv_ar_flags" >&5 +echo "$as_me:5175: result: $cf_cv_ar_flags" >&5 echo "${ECHO_T}$cf_cv_ar_flags" >&6 if test -n "$ARFLAGS" ; then @@ -5033,8 +5183,8 @@ else ARFLAGS=$cf_cv_ar_flags fi -echo "$as_me:5036: checking if you have specified an install-prefix" >&5 -echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6 +echo "$as_me:5186: checking for an installation directory prefix" >&5 +echo $ECHO_N "checking for an installation directory prefix... $ECHO_C" >&6 # Check whether --with-install-prefix or --without-install-prefix was given. if test "${with_install_prefix+set}" = set; then @@ -5046,8 +5196,8 @@ if test "${with_install_prefix+set}" = set; then ;; esac fi; -echo "$as_me:5049: result: $DESTDIR" >&5 -echo "${ECHO_T}$DESTDIR" >&6 +echo "$as_me:5199: result: ${DESTDIR:-(none)}" >&5 +echo "${ECHO_T}${DESTDIR:-(none)}" >&6 ############################################################################### @@ -5081,7 +5231,7 @@ else 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:5084: checking for $ac_word" >&5 +echo "$as_me:5234: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_BUILD_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -5096,7 +5246,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_BUILD_CC="$ac_prog" -echo "$as_me:5099: found $ac_dir/$ac_word" >&5 +echo "$as_me:5249: found $ac_dir/$ac_word" >&5 break done @@ -5104,10 +5254,10 @@ fi fi BUILD_CC=$ac_cv_prog_BUILD_CC if test -n "$BUILD_CC"; then - echo "$as_me:5107: result: $BUILD_CC" >&5 + echo "$as_me:5257: result: $BUILD_CC" >&5 echo "${ECHO_T}$BUILD_CC" >&6 else - echo "$as_me:5110: result: no" >&5 + echo "$as_me:5260: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -5116,12 +5266,12 @@ done test -n "$BUILD_CC" || BUILD_CC="none" fi; - echo "$as_me:5119: checking for native build C compiler" >&5 + echo "$as_me:5269: checking for native build C compiler" >&5 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6 - echo "$as_me:5121: result: $BUILD_CC" >&5 + echo "$as_me:5271: result: $BUILD_CC" >&5 echo "${ECHO_T}$BUILD_CC" >&6 - echo "$as_me:5124: checking for native build C preprocessor" >&5 + echo "$as_me:5274: checking for native build C preprocessor" >&5 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6 # Check whether --with-build-cpp or --without-build-cpp was given. @@ -5131,10 +5281,10 @@ if test "${with_build_cpp+set}" = set; then else BUILD_CPP='${BUILD_CC} -E' fi; - echo "$as_me:5134: result: $BUILD_CPP" >&5 + echo "$as_me:5284: result: $BUILD_CPP" >&5 echo "${ECHO_T}$BUILD_CPP" >&6 - echo "$as_me:5137: checking for native build C flags" >&5 + echo "$as_me:5287: checking for native build C flags" >&5 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6 # Check whether --with-build-cflags or --without-build-cflags was given. @@ -5142,10 +5292,10 @@ if test "${with_build_cflags+set}" = set; then withval="$with_build_cflags" BUILD_CFLAGS="$withval" fi; - echo "$as_me:5145: result: $BUILD_CFLAGS" >&5 + echo "$as_me:5295: result: $BUILD_CFLAGS" >&5 echo "${ECHO_T}$BUILD_CFLAGS" >&6 - echo "$as_me:5148: checking for native build C preprocessor-flags" >&5 + echo "$as_me:5298: checking for native build C preprocessor-flags" >&5 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6 # Check whether --with-build-cppflags or --without-build-cppflags was given. @@ -5153,10 +5303,10 @@ if test "${with_build_cppflags+set}" = set; then withval="$with_build_cppflags" BUILD_CPPFLAGS="$withval" fi; - echo "$as_me:5156: result: $BUILD_CPPFLAGS" >&5 + echo "$as_me:5306: result: $BUILD_CPPFLAGS" >&5 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6 - echo "$as_me:5159: checking for native build linker-flags" >&5 + echo "$as_me:5309: checking for native build linker-flags" >&5 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6 # Check whether --with-build-ldflags or --without-build-ldflags was given. @@ -5164,10 +5314,10 @@ if test "${with_build_ldflags+set}" = set; then withval="$with_build_ldflags" BUILD_LDFLAGS="$withval" fi; - echo "$as_me:5167: result: $BUILD_LDFLAGS" >&5 + echo "$as_me:5317: result: $BUILD_LDFLAGS" >&5 echo "${ECHO_T}$BUILD_LDFLAGS" >&6 - echo "$as_me:5170: checking for native build linker-libraries" >&5 + echo "$as_me:5320: checking for native build linker-libraries" >&5 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6 # Check whether --with-build-libs or --without-build-libs was given. @@ -5175,7 +5325,7 @@ if test "${with_build_libs+set}" = set; then withval="$with_build_libs" BUILD_LIBS="$withval" fi; - echo "$as_me:5178: result: $BUILD_LIBS" >&5 + echo "$as_me:5328: result: $BUILD_LIBS" >&5 echo "${ECHO_T}$BUILD_LIBS" >&6 # this assumes we're on Unix. @@ -5184,8 +5334,59 @@ echo "${ECHO_T}$BUILD_LIBS" >&6 : ${BUILD_CC:='${CC}'} - if { test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}'; } ; then - { { echo "$as_me:5188: error: Cross-build requires two compilers. + echo "$as_me:5337: checking if the build-compiler \"$BUILD_CC\" works" >&5 +echo $ECHO_N "checking if the build-compiler \"$BUILD_CC\" works... $ECHO_C" >&6 + + cf_save_crossed=$cross_compiling + cf_save_ac_link=$ac_link + cross_compiling=no + cf_build_cppflags=$BUILD_CPPFLAGS + test "$cf_build_cppflags" = "#" && cf_build_cppflags= + ac_link='$BUILD_CC -o "conftest$ac_exeext" $BUILD_CFLAGS $cf_build_cppflags $BUILD_LDFLAGS "conftest.$ac_ext" $BUILD_LIBS >&5' + + if test "$cross_compiling" = yes; then + cf_ok_build_cc=unknown +else + cat >"conftest.$ac_ext" <<_ACEOF +#line 5351 "configure" +#include "confdefs.h" +#include <stdio.h> + int main(int argc, char *argv[]) + { + ${cf_cv_main_return:-return}(argc < 0 || argv == 0 || argv[0] == 0); + } + +_ACEOF +rm -f "conftest$ac_exeext" +if { (eval echo "$as_me:5361: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:5364: \$? = $ac_status" >&5 + (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"' + { (eval echo "$as_me:5366: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:5369: \$? = $ac_status" >&5 + (exit "$ac_status"); }; }; then + cf_ok_build_cc=yes +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat "conftest.$ac_ext" >&5 +cf_ok_build_cc=no +fi +rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext" +fi + + cross_compiling=$cf_save_crossed + ac_link=$cf_save_ac_link + + echo "$as_me:5384: result: $cf_ok_build_cc" >&5 +echo "${ECHO_T}$cf_ok_build_cc" >&6 + + if test "$cf_ok_build_cc" != yes + then + { { echo "$as_me:5389: error: Cross-build requires two compilers. Use --with-build-cc to specify the native compiler." >&5 echo "$as_me: error: Cross-build requires two compilers. Use --with-build-cc to specify the native compiler." >&2;} @@ -5210,7 +5411,7 @@ fi ### shared, for example. cf_list_models="" -echo "$as_me:5213: checking if libtool -version-number should be used" >&5 +echo "$as_me:5414: checking if libtool -version-number should be used" >&5 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6 # Check whether --enable-libtool-version or --disable-libtool-version was given. @@ -5227,7 +5428,7 @@ else cf_libtool_version=yes fi; -echo "$as_me:5230: result: $cf_libtool_version" >&5 +echo "$as_me:5431: result: $cf_libtool_version" >&5 echo "${ECHO_T}$cf_libtool_version" >&6 if test "$cf_libtool_version" = yes ; then @@ -5236,25 +5437,25 @@ else LIBTOOL_VERSION="-version-info" case "x$VERSION" in (x) - { echo "$as_me:5239: WARNING: VERSION was not set" >&5 + { echo "$as_me:5440: WARNING: VERSION was not set" >&5 echo "$as_me: WARNING: VERSION was not set" >&2;} ;; (x*.*.*) ABI_VERSION="$VERSION" test -n "$verbose" && echo " ABI_VERSION: $ABI_VERSION" 1>&6 -echo "${as_me:-configure}:5246: testing ABI_VERSION: $ABI_VERSION ..." 1>&5 +echo "${as_me:-configure}:5447: testing ABI_VERSION: $ABI_VERSION ..." 1>&5 ;; (x*:*:*) ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'` test -n "$verbose" && echo " ABI_VERSION: $ABI_VERSION" 1>&6 -echo "${as_me:-configure}:5253: testing ABI_VERSION: $ABI_VERSION ..." 1>&5 +echo "${as_me:-configure}:5454: testing ABI_VERSION: $ABI_VERSION ..." 1>&5 ;; (*) - { echo "$as_me:5257: WARNING: unexpected VERSION value: $VERSION" >&5 + { echo "$as_me:5458: WARNING: unexpected VERSION value: $VERSION" >&5 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;} ;; esac @@ -5276,7 +5477,7 @@ LIB_LINK='${CC}' LIB_INSTALL= LIB_UNINSTALL= -echo "$as_me:5279: checking if you want to build libraries with libtool" >&5 +echo "$as_me:5480: checking if you want to build libraries with libtool" >&5 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6 # Check whether --with-libtool or --without-libtool was given. @@ -5286,7 +5487,7 @@ if test "${with_libtool+set}" = set; then else with_libtool=no fi; -echo "$as_me:5289: result: $with_libtool" >&5 +echo "$as_me:5490: result: $with_libtool" >&5 echo "${ECHO_T}$with_libtool" >&6 if test "$with_libtool" != "no"; then @@ -5317,7 +5518,7 @@ case ".$with_libtool" in with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%` ;; (*) - { { echo "$as_me:5320: error: expected a pathname, not \"$with_libtool\"" >&5 + { { echo "$as_me:5521: error: expected a pathname, not \"$with_libtool\"" >&5 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;} { (exit 1); exit 1; }; } ;; @@ -5330,7 +5531,7 @@ esac 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:5333: checking for $ac_word" >&5 +echo "$as_me:5534: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_LIBTOOL+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -5345,7 +5546,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog" -echo "$as_me:5348: found $ac_dir/$ac_word" >&5 +echo "$as_me:5549: found $ac_dir/$ac_word" >&5 break done @@ -5353,10 +5554,10 @@ fi fi LIBTOOL=$ac_cv_prog_LIBTOOL if test -n "$LIBTOOL"; then - echo "$as_me:5356: result: $LIBTOOL" >&5 + echo "$as_me:5557: result: $LIBTOOL" >&5 echo "${ECHO_T}$LIBTOOL" >&6 else - echo "$as_me:5359: result: no" >&5 + echo "$as_me:5560: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -5369,7 +5570,7 @@ if test -z "$LIBTOOL"; then 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:5372: checking for $ac_word" >&5 +echo "$as_me:5573: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -5384,7 +5585,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_ac_ct_LIBTOOL="$ac_prog" -echo "$as_me:5387: found $ac_dir/$ac_word" >&5 +echo "$as_me:5588: found $ac_dir/$ac_word" >&5 break done @@ -5392,10 +5593,10 @@ fi fi ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL if test -n "$ac_ct_LIBTOOL"; then - echo "$as_me:5395: result: $ac_ct_LIBTOOL" >&5 + echo "$as_me:5596: result: $ac_ct_LIBTOOL" >&5 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6 else - echo "$as_me:5398: result: no" >&5 + echo "$as_me:5599: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -5426,7 +5627,7 @@ unset LIBTOOL 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:5429: checking for $ac_word" >&5 +echo "$as_me:5630: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_LIBTOOL+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -5441,7 +5642,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog" -echo "$as_me:5444: found $ac_dir/$ac_word" >&5 +echo "$as_me:5645: found $ac_dir/$ac_word" >&5 break done @@ -5449,10 +5650,10 @@ fi fi LIBTOOL=$ac_cv_prog_LIBTOOL if test -n "$LIBTOOL"; then - echo "$as_me:5452: result: $LIBTOOL" >&5 + echo "$as_me:5653: result: $LIBTOOL" >&5 echo "${ECHO_T}$LIBTOOL" >&6 else - echo "$as_me:5455: result: no" >&5 + echo "$as_me:5656: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -5465,7 +5666,7 @@ if test -z "$LIBTOOL"; then 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:5468: checking for $ac_word" >&5 +echo "$as_me:5669: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -5480,7 +5681,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_ac_ct_LIBTOOL="$ac_prog" -echo "$as_me:5483: found $ac_dir/$ac_word" >&5 +echo "$as_me:5684: found $ac_dir/$ac_word" >&5 break done @@ -5488,10 +5689,10 @@ fi fi ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL if test -n "$ac_ct_LIBTOOL"; then - echo "$as_me:5491: result: $ac_ct_LIBTOOL" >&5 + echo "$as_me:5692: result: $ac_ct_LIBTOOL" >&5 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6 else - echo "$as_me:5494: result: no" >&5 + echo "$as_me:5695: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -5513,7 +5714,7 @@ test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version fi fi if test -z "$LIBTOOL" ; then - { { echo "$as_me:5516: error: Cannot find libtool" >&5 + { { echo "$as_me:5717: error: Cannot find libtool" >&5 echo "$as_me: error: Cannot find libtool" >&2;} { (exit 1); exit 1; }; } fi @@ -5529,7 +5730,7 @@ echo "$as_me: error: Cannot find libtool" >&2;} if test -n "$LIBTOOL" && test "$LIBTOOL" != none then - echo "$as_me:5532: checking version of $LIBTOOL" >&5 + echo "$as_me:5733: checking version of $LIBTOOL" >&5 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6 if test -n "$LIBTOOL" && test "$LIBTOOL" != none @@ -5540,15 +5741,27 @@ else fi test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version - echo "$as_me:5543: result: $cf_cv_libtool_version" >&5 + echo "$as_me:5744: result: $cf_cv_libtool_version" >&5 echo "${ECHO_T}$cf_cv_libtool_version" >&6 - if test -z "$cf_cv_libtool_version" ; then - { { echo "$as_me:5546: error: This is not GNU libtool" >&5 + if test -n "$cf_cv_libtool_version" + then + cf_check_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' -e 's,[()],...,g' -e 's,[ ],-,g' -e '2,$d'` + case "x$cf_check_libtool_version" in + (*...GNU-libtool...*) + ;; + (*) + { { echo "$as_me:5753: error: This is not GNU libtool" >&5 echo "$as_me: error: This is not GNU libtool" >&2;} + { (exit 1); exit 1; }; } + ;; + esac + else + { { echo "$as_me:5759: error: No version found for $LIBTOOL" >&5 +echo "$as_me: error: No version found for $LIBTOOL" >&2;} { (exit 1); exit 1; }; } fi else - { { echo "$as_me:5551: error: GNU libtool has not been found" >&5 + { { echo "$as_me:5764: error: GNU libtool has not been found" >&5 echo "$as_me: error: GNU libtool has not been found" >&2;} { (exit 1); exit 1; }; } fi @@ -5584,7 +5797,7 @@ cf_list_models="$cf_list_models libtool" else -echo "$as_me:5587: checking if you want to build shared libraries" >&5 +echo "$as_me:5800: checking if you want to build shared libraries" >&5 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6 # Check whether --with-shared or --without-shared was given. @@ -5594,11 +5807,11 @@ if test "${with_shared+set}" = set; then else with_shared=no fi; -echo "$as_me:5597: result: $with_shared" >&5 +echo "$as_me:5810: result: $with_shared" >&5 echo "${ECHO_T}$with_shared" >&6 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared" -echo "$as_me:5601: checking if you want to build static libraries" >&5 +echo "$as_me:5814: checking if you want to build static libraries" >&5 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6 # Check whether --with-normal or --without-normal was given. @@ -5608,11 +5821,11 @@ if test "${with_normal+set}" = set; then else with_normal=yes fi; -echo "$as_me:5611: result: $with_normal" >&5 +echo "$as_me:5824: result: $with_normal" >&5 echo "${ECHO_T}$with_normal" >&6 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal" -echo "$as_me:5615: checking if you want to build debug libraries" >&5 +echo "$as_me:5828: checking if you want to build debug libraries" >&5 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6 # Check whether --with-debug or --without-debug was given. @@ -5622,11 +5835,11 @@ if test "${with_debug+set}" = set; then else with_debug=yes fi; -echo "$as_me:5625: result: $with_debug" >&5 +echo "$as_me:5838: result: $with_debug" >&5 echo "${ECHO_T}$with_debug" >&6 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug" -echo "$as_me:5629: checking if you want to build profiling libraries" >&5 +echo "$as_me:5842: checking if you want to build profiling libraries" >&5 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6 # Check whether --with-profile or --without-profile was given. @@ -5636,7 +5849,7 @@ if test "${with_profile+set}" = set; then else with_profile=no fi; -echo "$as_me:5639: result: $with_profile" >&5 +echo "$as_me:5852: result: $with_profile" >&5 echo "${ECHO_T}$with_profile" >&6 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile" @@ -5644,7 +5857,7 @@ fi if test "X$cf_with_cxx_binding" != Xno; then if test "x$with_shared" = "xyes"; then -echo "$as_me:5647: checking if you want to build C++ shared libraries" >&5 +echo "$as_me:5860: checking if you want to build C++ shared libraries" >&5 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6 # Check whether --with-cxx-shared or --without-cxx-shared was given. @@ -5654,26 +5867,26 @@ if test "${with_cxx_shared+set}" = set; then else with_shared_cxx=no fi; -echo "$as_me:5657: result: $with_shared_cxx" >&5 +echo "$as_me:5870: result: $with_shared_cxx" >&5 echo "${ECHO_T}$with_shared_cxx" >&6 fi fi ############################################################################### -echo "$as_me:5664: checking for specified models" >&5 +echo "$as_me:5877: checking for specified models" >&5 echo $ECHO_N "checking for specified models... $ECHO_C" >&6 test -z "$cf_list_models" && cf_list_models=normal test "$with_libtool" != "no" && cf_list_models=libtool -echo "$as_me:5668: result: $cf_list_models" >&5 +echo "$as_me:5881: result: $cf_list_models" >&5 echo "${ECHO_T}$cf_list_models" >&6 ### Use the first model as the default, and save its suffix for use in building ### up test-applications. -echo "$as_me:5673: checking for default model" >&5 +echo "$as_me:5886: checking for default model" >&5 echo $ECHO_N "checking for default model... $ECHO_C" >&6 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'` -echo "$as_me:5676: result: $DFT_LWR_MODEL" >&5 +echo "$as_me:5889: result: $DFT_LWR_MODEL" >&5 echo "${ECHO_T}$DFT_LWR_MODEL" >&6 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%` @@ -5687,7 +5900,7 @@ LIB_NAME=ncurses LIB_DIR=../lib LIB_2ND=../../lib -echo "$as_me:5690: checking if you want to have a library-prefix" >&5 +echo "$as_me:5903: checking if you want to have a library-prefix" >&5 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6 # Check whether --with-lib-prefix or --without-lib-prefix was given. @@ -5697,7 +5910,7 @@ if test "${with_lib_prefix+set}" = set; then else with_lib_prefix=auto fi; -echo "$as_me:5700: result: $with_lib_prefix" >&5 +echo "$as_me:5913: result: $with_lib_prefix" >&5 echo "${ECHO_T}$with_lib_prefix" >&6 if test "$with_lib_prefix" = auto @@ -5728,104 +5941,498 @@ fi LIB_SUFFIX= - echo "$as_me:5731: checking for PATH separator" >&5 + echo "$as_me:5944: checking for PATH separator" >&5 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6 case "$cf_cv_system_name" in (os2*) PATH_SEPARATOR=';' ;; (*) ${PATH_SEPARATOR:=':'} ;; esac - echo "$as_me:5738: result: $PATH_SEPARATOR" >&5 + echo "$as_me:5951: result: $PATH_SEPARATOR" >&5 echo "${ECHO_T}$PATH_SEPARATOR" >&6 -############################################################################### - -echo "$as_me:5743: checking if you want to build a separate terminfo library" >&5 -echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6 +# headers needed for checks... +echo "$as_me:5955: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 +if test "${ac_cv_header_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >"conftest.$ac_ext" <<_ACEOF +#line 5961 "configure" +#include "confdefs.h" +#include <stdlib.h> +#include <stdarg.h> +#include <string.h> +#include <float.h> -# Check whether --with-termlib or --without-termlib was given. -if test "${with_termlib+set}" = set; then - withval="$with_termlib" - with_termlib=$withval +_ACEOF +if { (eval echo "$as_me:5969: \"$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:5975: \$? = $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 - with_termlib=no -fi; -echo "$as_me:5753: result: $with_termlib" >&5 -echo "${ECHO_T}$with_termlib" >&6 + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_cv_header_stdc=yes +else + echo "$as_me: failed program was:" >&5 + cat "conftest.$ac_ext" >&5 + ac_cv_header_stdc=no +fi +rm -f conftest.err "conftest.$ac_ext" -echo "$as_me:5756: checking if you want to build a separate tic library" >&5 -echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6 +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat >"conftest.$ac_ext" <<_ACEOF +#line 5997 "configure" +#include "confdefs.h" +#include <string.h> -# Check whether --with-ticlib or --without-ticlib was given. -if test "${with_ticlib+set}" = set; then - withval="$with_ticlib" - with_ticlib=$withval +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then + : else - with_ticlib=no -fi; -echo "$as_me:5766: result: $with_ticlib" >&5 -echo "${ECHO_T}$with_ticlib" >&6 - -if test X"$CC_G_OPT" = X"" ; then - CC_G_OPT='-g' - test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT='' + ac_cv_header_stdc=no fi +rm -rf conftest* -if test X"$CXX_G_OPT" = X"" ; then - CXX_G_OPT='-g' - test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT='' fi -echo "$as_me:5779: checking for default loader flags" >&5 -echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6 -case "$DFT_LWR_MODEL" in -(libtool) LD_MODEL='' ;; -(normal) LD_MODEL='' ;; -(debug) LD_MODEL=$CC_G_OPT ;; -(profile) LD_MODEL='-pg';; -(shared) LD_MODEL='' ;; -esac -echo "$as_me:5788: result: $LD_MODEL" >&5 -echo "${ECHO_T}$LD_MODEL" >&6 - -case "$DFT_LWR_MODEL" in -(shared) - -echo "$as_me:5794: checking if rpath option should be used" >&5 -echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6 +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat >"conftest.$ac_ext" <<_ACEOF +#line 6015 "configure" +#include "confdefs.h" +#include <stdlib.h> -# Check whether --enable-rpath or --disable-rpath was given. -if test "${enable_rpath+set}" = set; then - enableval="$enable_rpath" - cf_cv_enable_rpath=$enableval +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then + : else - cf_cv_enable_rpath=no -fi; -echo "$as_me:5804: result: $cf_cv_enable_rpath" >&5 -echo "${ECHO_T}$cf_cv_enable_rpath" >&6 + ac_cv_header_stdc=no +fi +rm -rf conftest* -echo "$as_me:5807: checking if shared libraries should be relinked during install" >&5 -echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6 +fi -# Check whether --enable-relink or --disable-relink was given. -if test "${enable_relink+set}" = set; then - enableval="$enable_relink" - cf_cv_do_relink=$enableval +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then + : else - cf_cv_do_relink=yes -fi; -echo "$as_me:5817: result: $cf_cv_do_relink" >&5 -echo "${ECHO_T}$cf_cv_do_relink" >&6 - ;; -esac - -# we will build libraries one-level down. -rel_builddir=.. - -LD_RPATH_OPT= + cat >"conftest.$ac_ext" <<_ACEOF +#line 6036 "configure" +#include "confdefs.h" +#include <ctype.h> +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main (void) +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + $ac_main_return(2); + $ac_main_return (0); +} +_ACEOF +rm -f "conftest$ac_exeext" +if { (eval echo "$as_me:6062: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:6065: \$? = $ac_status" >&5 + (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"' + { (eval echo "$as_me:6067: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:6070: \$? = $ac_status" >&5 + (exit "$ac_status"); }; }; then + : +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat "conftest.$ac_ext" >&5 +ac_cv_header_stdc=no +fi +rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext" +fi +fi +fi +echo "$as_me:6083: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6 +if test $ac_cv_header_stdc = yes; then + +cat >>confdefs.h <<\EOF +#define STDC_HEADERS 1 +EOF + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. + +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +echo "$as_me:6099: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >"conftest.$ac_ext" <<_ACEOF +#line 6105 "configure" +#include "confdefs.h" +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f "conftest.$ac_objext" +if { (eval echo "$as_me:6111: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:6114: \$? = $ac_status" >&5 + (exit "$ac_status"); } && + { ac_try='test -s "conftest.$ac_objext"' + { (eval echo "$as_me:6117: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:6120: \$? = $ac_status" >&5 + (exit "$ac_status"); }; }; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +cat "conftest.$ac_ext" >&5 +eval "$as_ac_Header=no" +fi +rm -f "conftest.$ac_objext" "conftest.$ac_ext" +fi +echo "$as_me:6130: result: `eval echo '${'"$as_ac_Header"'}'`" >&5 +echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6 +if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then + cat >>confdefs.h <<EOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +EOF + +fi +done + +echo "$as_me:6140: checking whether exit is declared" >&5 +echo $ECHO_N "checking whether exit is declared... $ECHO_C" >&6 +if test "${ac_cv_have_decl_exit+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >"conftest.$ac_ext" <<_ACEOF +#line 6146 "configure" +#include "confdefs.h" +$ac_includes_default +int +main (void) +{ +#ifndef exit + (void) exit; +#endif + + ; + return 0; +} +_ACEOF +rm -f "conftest.$ac_objext" +if { (eval echo "$as_me:6161: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:6164: \$? = $ac_status" >&5 + (exit "$ac_status"); } && + { ac_try='test -s "conftest.$ac_objext"' + { (eval echo "$as_me:6167: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:6170: \$? = $ac_status" >&5 + (exit "$ac_status"); }; }; then + ac_cv_have_decl_exit=yes +else + echo "$as_me: failed program was:" >&5 +cat "conftest.$ac_ext" >&5 +ac_cv_have_decl_exit=no +fi +rm -f "conftest.$ac_objext" "conftest.$ac_ext" +fi +echo "$as_me:6180: result: $ac_cv_have_decl_exit" >&5 +echo "${ECHO_T}$ac_cv_have_decl_exit" >&6 + +ac_header_dirent=no +for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do + as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` +echo "$as_me:6186: checking for $ac_hdr that defines DIR" >&5 +echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >"conftest.$ac_ext" <<_ACEOF +#line 6192 "configure" +#include "confdefs.h" +#include <sys/types.h> +#include <$ac_hdr> + +int +main (void) +{ +if ((DIR *) 0) +return 0; + ; + return 0; +} +_ACEOF +rm -f "conftest.$ac_objext" +if { (eval echo "$as_me:6207: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:6210: \$? = $ac_status" >&5 + (exit "$ac_status"); } && + { ac_try='test -s "conftest.$ac_objext"' + { (eval echo "$as_me:6213: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:6216: \$? = $ac_status" >&5 + (exit "$ac_status"); }; }; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +cat "conftest.$ac_ext" >&5 +eval "$as_ac_Header=no" +fi +rm -f "conftest.$ac_objext" "conftest.$ac_ext" +fi +echo "$as_me:6226: result: `eval echo '${'"$as_ac_Header"'}'`" >&5 +echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6 +if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then + cat >>confdefs.h <<EOF +#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 +EOF + +ac_header_dirent=$ac_hdr; break +fi + +done +# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. +if test $ac_header_dirent = dirent.h; then + echo "$as_me:6239: checking for opendir in -ldir" >&5 +echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6 +if test "${ac_cv_lib_dir_opendir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldir $LIBS" +cat >"conftest.$ac_ext" <<_ACEOF +#line 6247 "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 opendir (void); +int +main (void) +{ +opendir (); + ; + return 0; +} +_ACEOF +rm -f "conftest.$ac_objext" "conftest$ac_exeext" +if { (eval echo "$as_me:6266: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:6269: \$? = $ac_status" >&5 + (exit "$ac_status"); } && + { ac_try='test -s "conftest$ac_exeext"' + { (eval echo "$as_me:6272: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:6275: \$? = $ac_status" >&5 + (exit "$ac_status"); }; }; then + ac_cv_lib_dir_opendir=yes +else + echo "$as_me: failed program was:" >&5 +cat "conftest.$ac_ext" >&5 +ac_cv_lib_dir_opendir=no +fi +rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:6286: result: $ac_cv_lib_dir_opendir" >&5 +echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6 +if test "$ac_cv_lib_dir_opendir" = yes; then + LIBS="$LIBS -ldir" +fi + +else + echo "$as_me:6293: checking for opendir in -lx" >&5 +echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6 +if test "${ac_cv_lib_x_opendir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lx $LIBS" +cat >"conftest.$ac_ext" <<_ACEOF +#line 6301 "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 opendir (void); +int +main (void) +{ +opendir (); + ; + return 0; +} +_ACEOF +rm -f "conftest.$ac_objext" "conftest$ac_exeext" +if { (eval echo "$as_me:6320: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:6323: \$? = $ac_status" >&5 + (exit "$ac_status"); } && + { ac_try='test -s "conftest$ac_exeext"' + { (eval echo "$as_me:6326: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:6329: \$? = $ac_status" >&5 + (exit "$ac_status"); }; }; then + ac_cv_lib_x_opendir=yes +else + echo "$as_me: failed program was:" >&5 +cat "conftest.$ac_ext" >&5 +ac_cv_lib_x_opendir=no +fi +rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:6340: result: $ac_cv_lib_x_opendir" >&5 +echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6 +if test "$ac_cv_lib_x_opendir" = yes; then + LIBS="$LIBS -lx" +fi + +fi + +############################################################################### + +echo "$as_me:6350: checking if you want to build a separate terminfo library" >&5 +echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6 + +# Check whether --with-termlib or --without-termlib was given. +if test "${with_termlib+set}" = set; then + withval="$with_termlib" + with_termlib=$withval +else + with_termlib=no +fi; +echo "$as_me:6360: result: $with_termlib" >&5 +echo "${ECHO_T}$with_termlib" >&6 + +echo "$as_me:6363: checking if you want to build a separate tic library" >&5 +echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6 + +# Check whether --with-ticlib or --without-ticlib was given. +if test "${with_ticlib+set}" = set; then + withval="$with_ticlib" + with_ticlib=$withval +else + with_ticlib=no +fi; +echo "$as_me:6373: result: $with_ticlib" >&5 +echo "${ECHO_T}$with_ticlib" >&6 + +if test X"$CC_G_OPT" = X"" ; then + CC_G_OPT='-g' + test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT='' +fi + +if test X"$CXX_G_OPT" = X"" ; then + CXX_G_OPT='-g' + test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT='' +fi + +echo "$as_me:6386: checking for default loader flags" >&5 +echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6 +case "$DFT_LWR_MODEL" in +(libtool) LD_MODEL='' ;; +(normal) LD_MODEL='' ;; +(debug) LD_MODEL=$CC_G_OPT ;; +(profile) LD_MODEL='-pg';; +(shared) LD_MODEL='' ;; +esac +echo "$as_me:6395: result: ${LD_MODEL:-(none)}" >&5 +echo "${ECHO_T}${LD_MODEL:-(none)}" >&6 + +case "$DFT_LWR_MODEL" in +(shared) + +echo "$as_me:6401: checking if rpath option should be used" >&5 +echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6 + +# Check whether --enable-rpath or --disable-rpath was given. +if test "${enable_rpath+set}" = set; then + enableval="$enable_rpath" + cf_cv_enable_rpath=$enableval +else + cf_cv_enable_rpath=no +fi; +echo "$as_me:6411: result: $cf_cv_enable_rpath" >&5 +echo "${ECHO_T}$cf_cv_enable_rpath" >&6 + +echo "$as_me:6414: checking if shared libraries should be relinked during install" >&5 +echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6 + +# Check whether --enable-relink or --disable-relink was given. +if test "${enable_relink+set}" = set; then + enableval="$enable_relink" + cf_cv_do_relink=$enableval +else + cf_cv_do_relink=yes +fi; +echo "$as_me:6424: result: $cf_cv_do_relink" >&5 +echo "${ECHO_T}$cf_cv_do_relink" >&6 + ;; +esac + +# we will build libraries one-level down. +rel_builddir=.. + +LD_RPATH_OPT= if test "x$cf_cv_enable_rpath" != xno then - echo "$as_me:5828: checking for an rpath option" >&5 + echo "$as_me:6435: checking for an rpath option" >&5 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6 case "$cf_cv_system_name" in (irix*) @@ -5856,12 +6463,12 @@ echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6 (*) ;; esac - echo "$as_me:5859: result: $LD_RPATH_OPT" >&5 + echo "$as_me:6466: result: $LD_RPATH_OPT" >&5 echo "${ECHO_T}$LD_RPATH_OPT" >&6 case "x$LD_RPATH_OPT" in (x-R*) - echo "$as_me:5864: checking if we need a space after rpath option" >&5 + echo "$as_me:6471: checking if we need a space after rpath option" >&5 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6 cf_save_LIBS="$LIBS" @@ -5882,7 +6489,7 @@ done LIBS="$cf_add_libs" cat >"conftest.$ac_ext" <<_ACEOF -#line 5885 "configure" +#line 6492 "configure" #include "confdefs.h" int @@ -5894,16 +6501,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:5897: \"$ac_link\"") >&5 +if { (eval echo "$as_me:6504: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:5900: \$? = $ac_status" >&5 + echo "$as_me:6507: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:5903: \"$ac_try\"") >&5 + { (eval echo "$as_me:6510: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5906: \$? = $ac_status" >&5 + echo "$as_me:6513: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_rpath_space=no else @@ -5913,7 +6520,7 @@ cf_rpath_space=yes fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS="$cf_save_LIBS" - echo "$as_me:5916: result: $cf_rpath_space" >&5 + echo "$as_me:6523: result: $cf_rpath_space" >&5 echo "${ECHO_T}$cf_rpath_space" >&6 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT " ;; @@ -5935,8 +6542,8 @@ fi cf_ld_rpath_opt= test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT" - echo "$as_me:5938: checking if release/abi version should be used for shared libs" >&5 -echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6 + echo "$as_me:6545: checking whether to use release or ABI version in shared library file names" >&5 +echo $ECHO_N "checking whether to use release or ABI version in shared library file names... $ECHO_C" >&6 # Check whether --with-shlib-version or --without-shlib-version was given. if test "${with_shlib_version+set}" = set; then @@ -5950,9 +6557,9 @@ if test "${with_shlib_version+set}" = set; then cf_cv_shlib_version=$withval ;; (*) - echo "$as_me:5953: result: $withval" >&5 + echo "$as_me:6560: result: $withval" >&5 echo "${ECHO_T}$withval" >&6 - { { echo "$as_me:5955: error: option value must be one of: rel, abi, or auto" >&5 + { { echo "$as_me:6562: error: option value must be one of: rel, abi, or auto" >&5 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;} { (exit 1); exit 1; }; } ;; @@ -5961,7 +6568,7 @@ echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;} else cf_cv_shlib_version=auto fi; - echo "$as_me:5964: result: $cf_cv_shlib_version" >&5 + echo "$as_me:6571: result: $cf_cv_shlib_version" >&5 echo "${ECHO_T}$cf_cv_shlib_version" >&6 cf_cv_rm_so_locs=no @@ -5984,35 +6591,35 @@ echo "${ECHO_T}$cf_cv_shlib_version" >&6 if test "$cf_try_fPIC" = yes then - echo "$as_me:5987: checking which $CC option to use" >&5 + echo "$as_me:6594: checking which $CC option to use" >&5 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6 cf_save_CFLAGS="$CFLAGS" for CC_SHARED_OPTS in -fPIC -fpic '' do CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS" cat >"conftest.$ac_ext" <<_ACEOF -#line 5994 "configure" +#line 6601 "configure" #include "confdefs.h" #include <stdio.h> int main (void) { -int x = 1 +int x = 1; (void)x ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:6006: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:6613: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:6009: \$? = $ac_status" >&5 + echo "$as_me:6616: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:6012: \"$ac_try\"") >&5 + { (eval echo "$as_me:6619: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6015: \$? = $ac_status" >&5 + echo "$as_me:6622: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then break else @@ -6021,7 +6628,7 @@ cat "conftest.$ac_ext" >&5 fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" done - echo "$as_me:6024: result: $CC_SHARED_OPTS" >&5 + echo "$as_me:6631: result: $CC_SHARED_OPTS" >&5 echo "${ECHO_T}$CC_SHARED_OPTS" >&6 CFLAGS="$cf_save_CFLAGS" fi @@ -6092,7 +6699,7 @@ CF_EOF MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@' test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi cf_cv_shlib_version_infix=yes - echo "$as_me:6095: checking if ld -search_paths_first works" >&5 + echo "$as_me:6702: checking if ld -search_paths_first works" >&5 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -6101,7 +6708,7 @@ else cf_save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -Wl,-search_paths_first" cat >"conftest.$ac_ext" <<_ACEOF -#line 6104 "configure" +#line 6711 "configure" #include "confdefs.h" int @@ -6113,16 +6720,16 @@ int i; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:6116: \"$ac_link\"") >&5 +if { (eval echo "$as_me:6723: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:6119: \$? = $ac_status" >&5 + echo "$as_me:6726: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:6122: \"$ac_try\"") >&5 + { (eval echo "$as_me:6729: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6125: \$? = $ac_status" >&5 + echo "$as_me:6732: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_ldflags_search_paths_first=yes else @@ -6133,12 +6740,23 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LDFLAGS=$cf_save_LDFLAGS fi -echo "$as_me:6136: result: $cf_cv_ldflags_search_paths_first" >&5 +echo "$as_me:6743: result: $cf_cv_ldflags_search_paths_first" >&5 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6 if test "$cf_cv_ldflags_search_paths_first" = yes; then LDFLAGS="$LDFLAGS -Wl,-search_paths_first" fi ;; + (haiku*) + + test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel + if test "$cf_cv_shlib_version" = rel; then + cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}' + else + cf_cv_shared_soname='`basename $@`' + fi + + MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@' + ;; (hpux[7-8]*) # HP-UX 8.07 ld lacks "+b" option used for libdir search-list if test "$GCC" != yes; then @@ -6452,11 +7070,11 @@ CF_EOF # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3 if test "$DFT_LWR_MODEL" = "shared" ; then - LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}" + LOCAL_LDFLAGS="-R\$(LOCAL_LIBDIR):\${libdir}" LOCAL_LDFLAGS2="$LOCAL_LDFLAGS" fi if test "$cf_cv_enable_rpath" = yes ; then - EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS" + EXTRA_LDFLAGS="-R\${libdir} $EXTRA_LDFLAGS" fi test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel @@ -6472,7 +7090,7 @@ CF_EOF do CFLAGS="$cf_shared_opts $cf_save_CFLAGS" cat >"conftest.$ac_ext" <<_ACEOF -#line 6475 "configure" +#line 7093 "configure" #include "confdefs.h" #include <stdio.h> int @@ -6484,16 +7102,16 @@ printf("Hello\\n"); } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:6487: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:7105: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:6490: \$? = $ac_status" >&5 + echo "$as_me:7108: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:6493: \"$ac_try\"") >&5 + { (eval echo "$as_me:7111: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6496: \$? = $ac_status" >&5 + echo "$as_me:7114: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then break else @@ -6504,9 +7122,9 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" done CFLAGS="$cf_save_CFLAGS" CC_SHARED_OPTS=$cf_shared_opts - MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@' + MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -Wl,-h,'$cf_cv_shared_soname' -o $@' else - MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@' + MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -Wl,-h,'$cf_cv_shared_soname' -o $@' fi ;; (sysv5uw7*|unix_sv*) @@ -6530,7 +7148,7 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes ;; (*) - { echo "$as_me:6533: WARNING: ignored --with-shlib-version" >&5 + { echo "$as_me:7151: WARNING: ignored --with-shlib-version" >&5 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;} ;; esac @@ -6540,7 +7158,7 @@ echo "$as_me: WARNING: ignored --with-shlib-version" >&2;} if test -n "$cf_try_cflags" then cat > conftest.$ac_ext <<EOF -#line 6543 "${as_me:-configure}" +#line 7161 "${as_me:-configure}" #include <stdio.h> int main(int argc, char *argv[]) { @@ -6552,18 +7170,18 @@ EOF for cf_opt in $cf_try_cflags do CFLAGS="$cf_save_CFLAGS -$cf_opt" - echo "$as_me:6555: checking if CFLAGS option -$cf_opt works" >&5 + echo "$as_me:7173: checking if CFLAGS option -$cf_opt works" >&5 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6 - if { (eval echo "$as_me:6557: \"$ac_compile\"") >&5 + if { (eval echo "$as_me:7175: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:6560: \$? = $ac_status" >&5 + echo "$as_me:7178: \$? = $ac_status" >&5 (exit "$ac_status"); }; then - echo "$as_me:6562: result: yes" >&5 + echo "$as_me:7180: result: yes" >&5 echo "${ECHO_T}yes" >&6 cf_save_CFLAGS="$CFLAGS" else - echo "$as_me:6566: result: no" >&5 + echo "$as_me:7184: result: no" >&5 echo "${ECHO_T}no" >&6 fi done @@ -6578,17 +7196,17 @@ echo "${ECHO_T}no" >&6 test -n "$verbose" && echo " CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6 -echo "${as_me:-configure}:6581: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5 +echo "${as_me:-configure}:7199: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5 test -n "$verbose" && echo " MK_SHARED_LIB: $MK_SHARED_LIB" 1>&6 -echo "${as_me:-configure}:6585: testing MK_SHARED_LIB: $MK_SHARED_LIB ..." 1>&5 +echo "${as_me:-configure}:7203: testing MK_SHARED_LIB: $MK_SHARED_LIB ..." 1>&5 for model in $cf_list_models ; do case "$model" in (libtool) -echo "$as_me:6591: checking for additional libtool options" >&5 +echo "$as_me:7209: checking for additional libtool options" >&5 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6 # Check whether --with-libtool-opts or --without-libtool-opts was given. @@ -6598,7 +7216,7 @@ if test "${with_libtool_opts+set}" = set; then else with_libtool_opts=no fi; -echo "$as_me:6601: result: $with_libtool_opts" >&5 +echo "$as_me:7219: result: $with_libtool_opts" >&5 echo "${ECHO_T}$with_libtool_opts" >&6 case .$with_libtool_opts in @@ -6609,7 +7227,7 @@ case .$with_libtool_opts in ;; esac -echo "$as_me:6612: checking if exported-symbols file should be used" >&5 +echo "$as_me:7230: checking if exported-symbols file should be used" >&5 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6 # Check whether --with-export-syms or --without-export-syms was given. @@ -6624,7 +7242,7 @@ then with_export_syms='${top_srcdir}/package/${PACKAGE}.sym' fi -echo "$as_me:6627: result: $with_export_syms" >&5 +echo "$as_me:7245: result: $with_export_syms" >&5 echo "${ECHO_T}$with_export_syms" >&6 if test "x$with_export_syms" != xno then @@ -6635,15 +7253,15 @@ fi ;; (shared) if test "$CC_SHARED_OPTS" = "unknown"; then - { { echo "$as_me:6638: error: Shared libraries are not supported in this version" >&5 + { { echo "$as_me:7256: error: Shared libraries are not supported in this version" >&5 echo "$as_me: error: Shared libraries are not supported in this version" >&2;} { (exit 1); exit 1; }; } fi # workaround for inept transition to PIE vs PIC... - echo "$as_me:6643: checking if current CFLAGS link properly" >&5 + echo "$as_me:7261: checking if current CFLAGS link properly" >&5 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6 cat >"conftest.$ac_ext" <<_ACEOF -#line 6646 "configure" +#line 7264 "configure" #include "confdefs.h" #include <stdio.h> int @@ -6655,16 +7273,16 @@ printf("Hello work\\n"); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:6658: \"$ac_link\"") >&5 +if { (eval echo "$as_me:7276: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:6661: \$? = $ac_status" >&5 + echo "$as_me:7279: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:6664: \"$ac_try\"") >&5 + { (eval echo "$as_me:7282: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6667: \$? = $ac_status" >&5 + echo "$as_me:7285: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cflags_work=yes else @@ -6673,18 +7291,18 @@ cat "conftest.$ac_ext" >&5 cf_cflags_work=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" - echo "$as_me:6676: result: $cf_cflags_work" >&5 + echo "$as_me:7294: result: $cf_cflags_work" >&5 echo "${ECHO_T}$cf_cflags_work" >&6 if test "$cf_cflags_work" = no then test -n "$verbose" && echo " try to work around by appending shared-options" 1>&6 -echo "${as_me:-configure}:6682: testing try to work around by appending shared-options ..." 1>&5 +echo "${as_me:-configure}:7300: testing try to work around by appending shared-options ..." 1>&5 CFLAGS="$CFLAGS $CC_SHARED_OPTS" fi -echo "$as_me:6687: checking if versioned-symbols file should be used" >&5 +echo "$as_me:7305: checking if versioned-symbols file should be used" >&5 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6 # Check whether --with-versioned-syms or --without-versioned-syms was given. @@ -6702,18 +7320,18 @@ case "x$with_versioned_syms" in (xno) ;; (x/*) - test -f "$with_versioned_syms" || { { echo "$as_me:6705: error: expected a filename: $with_versioned_syms" >&5 + test -f "$with_versioned_syms" || { { echo "$as_me:7323: error: expected a filename: $with_versioned_syms" >&5 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;} { (exit 1); exit 1; }; } ;; (*) - test -f "$with_versioned_syms" || { { echo "$as_me:6710: error: expected a filename: $with_versioned_syms" >&5 + test -f "$with_versioned_syms" || { { echo "$as_me:7328: error: expected a filename: $with_versioned_syms" >&5 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;} { (exit 1); exit 1; }; } with_versioned_syms=`pwd`/"$with_versioned_syms" ;; esac -echo "$as_me:6716: result: $with_versioned_syms" >&5 +echo "$as_me:7334: result: $with_versioned_syms" >&5 echo "${ECHO_T}$with_versioned_syms" >&6 RESULTING_SYMS= @@ -6729,7 +7347,7 @@ then MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"` test -n "$verbose" && echo " MK_SHARED_LIB: $MK_SHARED_LIB" 1>&6 -echo "${as_me:-configure}:6732: testing MK_SHARED_LIB: $MK_SHARED_LIB ..." 1>&5 +echo "${as_me:-configure}:7350: testing MK_SHARED_LIB: $MK_SHARED_LIB ..." 1>&5 ;; (*-dy\ *) @@ -6737,11 +7355,11 @@ echo "${as_me:-configure}:6732: testing MK_SHARED_LIB: $MK_SHARED_LIB ..." 1>&5 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"` test -n "$verbose" && echo " MK_SHARED_LIB: $MK_SHARED_LIB" 1>&6 -echo "${as_me:-configure}:6740: testing MK_SHARED_LIB: $MK_SHARED_LIB ..." 1>&5 +echo "${as_me:-configure}:7358: testing MK_SHARED_LIB: $MK_SHARED_LIB ..." 1>&5 ;; (*) - { echo "$as_me:6744: WARNING: this system does not support versioned-symbols" >&5 + { echo "$as_me:7362: WARNING: this system does not support versioned-symbols" >&5 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;} ;; esac @@ -6753,7 +7371,7 @@ echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;} # symbols. if test "x$VERSIONED_SYMS" != "x" then - echo "$as_me:6756: checking if wildcards can be used to selectively omit symbols" >&5 + echo "$as_me:7374: checking if wildcards can be used to selectively omit symbols" >&5 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6 WILDCARD_SYMS=no @@ -6790,16 +7408,16 @@ local: } submodule_1.0; EOF cat >conftest.$ac_ext <<EOF -#line 6793 "configure" -int _ismissing(void) { return 1; } -int _localf1(void) { return 1; } -int _localf2(void) { return 2; } -int globalf1(void) { return 1; } -int globalf2(void) { return 2; } -int _sublocalf1(void) { return 1; } -int _sublocalf2(void) { return 2; } -int subglobalf1(void) { return 1; } -int subglobalf2(void) { return 2; } +#line 7411 "configure" +extern int _ismissing(void); int _ismissing(void) { return 1; } +extern int _localf1(void); int _localf1(void) { return 1; } +extern int _localf2(void); int _localf2(void) { return 2; } +extern int globalf1(void); int globalf1(void) { return 1; } +extern int globalf2(void); int globalf2(void) { return 2; } +extern int _sublocalf1(void); int _sublocalf1(void) { return 1; } +extern int _sublocalf2(void); int _sublocalf2(void) { return 2; } +extern int subglobalf1(void); int subglobalf1(void) { return 1; } +extern int subglobalf2(void); int subglobalf2(void) { return 2; } EOF cat >conftest.mk <<EOF CC=${CC} @@ -6821,7 +7439,7 @@ EOF cf_missing="`nm -P conftest.so 2>&5 |${FGREP-fgrep} _ismissing | ${EGREP-egrep} '[ ][DT][ ]'`" test -n "$cf_missing" && WILDCARD_SYMS=yes fi - echo "$as_me:6824: result: $WILDCARD_SYMS" >&5 + echo "$as_me:7442: result: $WILDCARD_SYMS" >&5 echo "${ECHO_T}$WILDCARD_SYMS" >&6 rm -f conftest.* fi @@ -6834,7 +7452,7 @@ done ### Checks for special libraries, must be done up-front. SHLIB_LIST="" -echo "$as_me:6837: checking if you want to link with the GPM mouse library" >&5 +echo "$as_me:7455: checking if you want to link with the GPM mouse library" >&5 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6 # Check whether --with-gpm or --without-gpm was given. @@ -6844,27 +7462,27 @@ if test "${with_gpm+set}" = set; then else with_gpm=maybe fi; -echo "$as_me:6847: result: $with_gpm" >&5 +echo "$as_me:7465: result: $with_gpm" >&5 echo "${ECHO_T}$with_gpm" >&6 if test "$with_gpm" != no ; then - echo "$as_me:6851: checking for gpm.h" >&5 + echo "$as_me:7469: checking for gpm.h" >&5 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6 if test "${ac_cv_header_gpm_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 6857 "configure" +#line 7475 "configure" #include "confdefs.h" #include <gpm.h> _ACEOF -if { (eval echo "$as_me:6861: \"$ac_cpp "conftest.$ac_ext"\"") >&5 +if { (eval echo "$as_me:7479: \"$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:6867: \$? = $ac_status" >&5 + echo "$as_me:7485: \$? = $ac_status" >&5 (exit "$ac_status"); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -6883,7 +7501,7 @@ else fi rm -f conftest.err "conftest.$ac_ext" fi -echo "$as_me:6886: result: $ac_cv_header_gpm_h" >&5 +echo "$as_me:7504: result: $ac_cv_header_gpm_h" >&5 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6 if test "$ac_cv_header_gpm_h" = yes; then @@ -6894,7 +7512,7 @@ EOF if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then test -n "$verbose" && echo " assuming we really have GPM library" 1>&6 -echo "${as_me:-configure}:6897: testing assuming we really have GPM library ..." 1>&5 +echo "${as_me:-configure}:7515: testing assuming we really have GPM library ..." 1>&5 cat >>confdefs.h <<\EOF #define HAVE_LIBGPM 1 @@ -6902,7 +7520,7 @@ EOF with_gpm=yes else - echo "$as_me:6905: checking for Gpm_Open in -lgpm" >&5 + echo "$as_me:7523: checking for Gpm_Open in -lgpm" >&5 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -6910,7 +7528,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lgpm $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 6913 "configure" +#line 7531 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -6919,7 +7537,7 @@ 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 Gpm_Open (); +char Gpm_Open (void); int main (void) { @@ -6929,16 +7547,16 @@ Gpm_Open (); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:6932: \"$ac_link\"") >&5 +if { (eval echo "$as_me:7550: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:6935: \$? = $ac_status" >&5 + echo "$as_me:7553: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:6938: \"$ac_try\"") >&5 + { (eval echo "$as_me:7556: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6941: \$? = $ac_status" >&5 + echo "$as_me:7559: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_gpm_Gpm_Open=yes else @@ -6949,18 +7567,18 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:6952: result: $ac_cv_lib_gpm_Gpm_Open" >&5 +echo "$as_me:7570: result: $ac_cv_lib_gpm_Gpm_Open" >&5 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then with_gpm=yes else if test "$with_gpm" = maybe; then - { echo "$as_me:6959: WARNING: Cannot link with GPM library" >&5 + { echo "$as_me:7577: WARNING: Cannot link with GPM library" >&5 echo "$as_me: WARNING: Cannot link with GPM library" >&2;} with_gpm=no else - { { echo "$as_me:6963: error: Cannot link with GPM library" >&5 + { { echo "$as_me:7581: error: Cannot link with GPM library" >&5 echo "$as_me: error: Cannot link with GPM library" >&2;} { (exit 1); exit 1; }; } fi @@ -6971,7 +7589,7 @@ fi else - test "$with_gpm" != maybe && { echo "$as_me:6974: WARNING: Cannot find GPM header" >&5 + test "$with_gpm" != maybe && { echo "$as_me:7592: WARNING: Cannot find GPM header" >&5 echo "$as_me: WARNING: Cannot find GPM header" >&2;} with_gpm=no @@ -6980,7 +7598,7 @@ fi fi if test "$with_gpm" != no ; then - echo "$as_me:6983: checking if you want to load GPM dynamically" >&5 + echo "$as_me:7601: checking if you want to load GPM dynamically" >&5 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6 # Check whether --with-dlsym or --without-dlsym was given. @@ -6990,18 +7608,18 @@ if test "${with_dlsym+set}" = set; then else with_dlsym=yes fi; - echo "$as_me:6993: result: $with_dlsym" >&5 + echo "$as_me:7611: result: $with_dlsym" >&5 echo "${ECHO_T}$with_dlsym" >&6 if test "x$with_dlsym" = xyes ; then cf_have_dlsym=no -echo "$as_me:6998: checking for dlsym" >&5 +echo "$as_me:7616: checking for dlsym" >&5 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6 if test "${ac_cv_func_dlsym+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 7004 "configure" +#line 7622 "configure" #include "confdefs.h" #define dlsym autoconf_temporary #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */ @@ -7032,16 +7650,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:7035: \"$ac_link\"") >&5 +if { (eval echo "$as_me:7653: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:7038: \$? = $ac_status" >&5 + echo "$as_me:7656: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:7041: \"$ac_try\"") >&5 + { (eval echo "$as_me:7659: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7044: \$? = $ac_status" >&5 + echo "$as_me:7662: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_func_dlsym=yes else @@ -7051,14 +7669,14 @@ ac_cv_func_dlsym=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi -echo "$as_me:7054: result: $ac_cv_func_dlsym" >&5 +echo "$as_me:7672: result: $ac_cv_func_dlsym" >&5 echo "${ECHO_T}$ac_cv_func_dlsym" >&6 if test "$ac_cv_func_dlsym" = yes; then cf_have_dlsym=yes else cf_have_libdl=no -echo "$as_me:7061: checking for dlsym in -ldl" >&5 +echo "$as_me:7679: checking for dlsym in -ldl" >&5 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6 if test "${ac_cv_lib_dl_dlsym+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -7066,7 +7684,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 7069 "configure" +#line 7687 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -7075,7 +7693,7 @@ 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 dlsym (); +char dlsym (void); int main (void) { @@ -7085,16 +7703,16 @@ dlsym (); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:7088: \"$ac_link\"") >&5 +if { (eval echo "$as_me:7706: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:7091: \$? = $ac_status" >&5 + echo "$as_me:7709: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:7094: \"$ac_try\"") >&5 + { (eval echo "$as_me:7712: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7097: \$? = $ac_status" >&5 + echo "$as_me:7715: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_dl_dlsym=yes else @@ -7105,7 +7723,7 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:7108: result: $ac_cv_lib_dl_dlsym" >&5 +echo "$as_me:7726: result: $ac_cv_lib_dl_dlsym" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6 if test "$ac_cv_lib_dl_dlsym" = yes; then @@ -7134,10 +7752,10 @@ done LIBS="$cf_add_libs" } - echo "$as_me:7137: checking whether able to link to dl*() functions" >&5 + echo "$as_me:7755: checking whether able to link to dl*() functions" >&5 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6 cat >"conftest.$ac_ext" <<_ACEOF -#line 7140 "configure" +#line 7758 "configure" #include "confdefs.h" #include <dlfcn.h> int @@ -7155,16 +7773,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:7158: \"$ac_link\"") >&5 +if { (eval echo "$as_me:7776: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:7161: \$? = $ac_status" >&5 + echo "$as_me:7779: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:7164: \"$ac_try\"") >&5 + { (eval echo "$as_me:7782: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7167: \$? = $ac_status" >&5 + echo "$as_me:7785: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cat >>confdefs.h <<\EOF @@ -7175,15 +7793,15 @@ else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 - { { echo "$as_me:7178: error: Cannot link test program for libdl" >&5 + { { echo "$as_me:7796: error: Cannot link test program for libdl" >&5 echo "$as_me: error: Cannot link test program for libdl" >&2;} { (exit 1); exit 1; }; } fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" - echo "$as_me:7183: result: ok" >&5 + echo "$as_me:7801: result: ok" >&5 echo "${ECHO_T}ok" >&6 else - { { echo "$as_me:7186: error: Cannot find dlsym function" >&5 + { { echo "$as_me:7804: error: Cannot find dlsym function" >&5 echo "$as_me: error: Cannot find dlsym function" >&2;} { (exit 1); exit 1; }; } fi @@ -7191,12 +7809,12 @@ fi if test "x$with_gpm" != xyes ; then test -n "$verbose" && echo " assuming soname for gpm is $with_gpm" 1>&6 -echo "${as_me:-configure}:7194: testing assuming soname for gpm is $with_gpm ..." 1>&5 +echo "${as_me:-configure}:7812: testing assuming soname for gpm is $with_gpm ..." 1>&5 cf_cv_gpm_soname="$with_gpm" else -echo "$as_me:7199: checking for soname of gpm library" >&5 +echo "$as_me:7817: checking for soname of gpm library" >&5 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6 if test "${cf_cv_gpm_soname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -7230,15 +7848,15 @@ for cf_add_1lib in $cf_add_0lib; do done LIBS="$cf_add_libs" - if { (eval echo "$as_me:7233: \"$ac_compile\"") >&5 + if { (eval echo "$as_me:7851: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:7236: \$? = $ac_status" >&5 + echo "$as_me:7854: \$? = $ac_status" >&5 (exit "$ac_status"); } ; then - if { (eval echo "$as_me:7238: \"$ac_link\"") >&5 + if { (eval echo "$as_me:7856: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:7241: \$? = $ac_status" >&5 + echo "$as_me:7859: \$? = $ac_status" >&5 (exit "$ac_status"); } ; then cf_cv_gpm_soname="`ldd \"conftest$ac_exeext\" 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | ${FGREP-fgrep} libgpm.`" test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown @@ -7249,7 +7867,7 @@ LIBS="$cf_save_LIBS" fi fi -echo "$as_me:7252: result: $cf_cv_gpm_soname" >&5 +echo "$as_me:7870: result: $cf_cv_gpm_soname" >&5 echo "${ECHO_T}$cf_cv_gpm_soname" >&6 fi @@ -7317,7 +7935,7 @@ cat >>confdefs.h <<\EOF #define HAVE_LIBGPM 1 EOF -echo "$as_me:7320: checking for Gpm_Wgetch in -lgpm" >&5 +echo "$as_me:7938: checking for Gpm_Wgetch in -lgpm" >&5 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -7325,7 +7943,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lgpm $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 7328 "configure" +#line 7946 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -7334,7 +7952,7 @@ 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 Gpm_Wgetch (); +char Gpm_Wgetch (void); int main (void) { @@ -7344,16 +7962,16 @@ Gpm_Wgetch (); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:7347: \"$ac_link\"") >&5 +if { (eval echo "$as_me:7965: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:7350: \$? = $ac_status" >&5 + echo "$as_me:7968: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:7353: \"$ac_try\"") >&5 + { (eval echo "$as_me:7971: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7356: \$? = $ac_status" >&5 + echo "$as_me:7974: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_gpm_Gpm_Wgetch=yes else @@ -7364,11 +7982,11 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:7367: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5 +echo "$as_me:7985: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6 if test "$ac_cv_lib_gpm_Gpm_Wgetch" = yes; then -echo "$as_me:7371: checking if GPM is weakly bound to curses library" >&5 +echo "$as_me:7989: checking if GPM is weakly bound to curses library" >&5 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6 if test "${cf_cv_check_gpm_wgetch+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -7392,15 +8010,15 @@ CF_EOF # to rely on the static library, noting that some packagers may not # include it. LIBS="-static -lgpm -dynamic $LIBS" - if { (eval echo "$as_me:7395: \"$ac_compile\"") >&5 + if { (eval echo "$as_me:8013: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:7398: \$? = $ac_status" >&5 + echo "$as_me:8016: \$? = $ac_status" >&5 (exit "$ac_status"); } ; then - if { (eval echo "$as_me:7400: \"$ac_link\"") >&5 + if { (eval echo "$as_me:8018: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:7403: \$? = $ac_status" >&5 + echo "$as_me:8021: \$? = $ac_status" >&5 (exit "$ac_status"); } ; then cf_cv_check_gpm_wgetch="`nm \"conftest$ac_exeext\" | ${EGREP-egrep} '\<wgetch\>' | ${EGREP-egrep} '\<[vVwW]\>'`" test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes @@ -7412,11 +8030,11 @@ CF_EOF fi fi -echo "$as_me:7415: result: $cf_cv_check_gpm_wgetch" >&5 +echo "$as_me:8033: result: $cf_cv_check_gpm_wgetch" >&5 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6 if test "$cf_cv_check_gpm_wgetch" != yes ; then - { echo "$as_me:7419: WARNING: GPM library is already linked with curses - read the FAQ" >&5 + { echo "$as_me:8037: WARNING: GPM library is already linked with curses - read the FAQ" >&5 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;} fi @@ -7424,7 +8042,7 @@ fi fi -echo "$as_me:7427: checking if you want to use PCRE2 for regular-expressions" >&5 +echo "$as_me:8045: checking if you want to use PCRE2 for regular-expressions" >&5 echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6 # Check whether --with-pcre2 or --without-pcre2 was given. @@ -7433,7 +8051,7 @@ if test "${with_pcre2+set}" = set; then fi; test -z "$with_pcre2" && with_pcre2=no -echo "$as_me:7436: result: $with_pcre2" >&5 +echo "$as_me:8054: result: $with_pcre2" >&5 echo "${ECHO_T}$with_pcre2" >&6 if test "x$with_pcre2" != xno ; then @@ -7444,17 +8062,17 @@ if test "x$with_pcre2" != xno ; then if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_with_pcre2"; then test -n "$verbose" && echo " found package $cf_with_pcre2" 1>&6 -echo "${as_me:-configure}:7447: testing found package $cf_with_pcre2 ..." 1>&5 +echo "${as_me:-configure}:8065: testing found package $cf_with_pcre2 ..." 1>&5 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_with_pcre2" 2>/dev/null`" cf_pkgconfig_libs="`$PKG_CONFIG --libs "$cf_with_pcre2" 2>/dev/null`" test -n "$verbose" && echo " package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6 -echo "${as_me:-configure}:7453: testing package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5 +echo "${as_me:-configure}:8071: testing package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5 test -n "$verbose" && echo " package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs" 1>&6 -echo "${as_me:-configure}:7457: testing package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5 +echo "${as_me:-configure}:8075: testing package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5 cf_fix_cppflags=no cf_new_cflags= @@ -7578,7 +8196,7 @@ else fi done - cf_with_pcre2_ok=yes || { { echo "$as_me:7581: error: Cannot find PCRE2 library" >&5 + cf_with_pcre2_ok=yes || { { echo "$as_me:8199: error: Cannot find PCRE2 library" >&5 echo "$as_me: error: Cannot find PCRE2 library" >&2;} { (exit 1); exit 1; }; } @@ -7591,7 +8209,7 @@ EOF (*pcre2-posix*|*pcreposix*) ;; (*) - echo "$as_me:7594: checking for regcomp in -lpcre2-posix" >&5 + echo "$as_me:8212: checking for regcomp in -lpcre2-posix" >&5 echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6 if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -7599,7 +8217,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lpcre2-posix $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 7602 "configure" +#line 8220 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -7608,7 +8226,7 @@ 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 regcomp (); +char regcomp (void); int main (void) { @@ -7618,16 +8236,16 @@ regcomp (); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:7621: \"$ac_link\"") >&5 +if { (eval echo "$as_me:8239: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:7624: \$? = $ac_status" >&5 + echo "$as_me:8242: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:7627: \"$ac_try\"") >&5 + { (eval echo "$as_me:8245: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7630: \$? = $ac_status" >&5 + echo "$as_me:8248: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_pcre2_posix_regcomp=yes else @@ -7638,7 +8256,7 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:7641: result: $ac_cv_lib_pcre2_posix_regcomp" >&5 +echo "$as_me:8259: result: $ac_cv_lib_pcre2_posix_regcomp" >&5 echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6 if test "$ac_cv_lib_pcre2_posix_regcomp" = yes; then @@ -7659,7 +8277,7 @@ done LIBS="$cf_add_libs" else - echo "$as_me:7662: checking for regcomp in -lpcreposix" >&5 + echo "$as_me:8280: checking for regcomp in -lpcreposix" >&5 echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6 if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -7667,7 +8285,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lpcreposix $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 7670 "configure" +#line 8288 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -7676,7 +8294,7 @@ 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 regcomp (); +char regcomp (void); int main (void) { @@ -7686,16 +8304,16 @@ regcomp (); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:7689: \"$ac_link\"") >&5 +if { (eval echo "$as_me:8307: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:7692: \$? = $ac_status" >&5 + echo "$as_me:8310: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:7695: \"$ac_try\"") >&5 + { (eval echo "$as_me:8313: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7698: \$? = $ac_status" >&5 + echo "$as_me:8316: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_pcreposix_regcomp=yes else @@ -7706,7 +8324,7 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:7709: result: $ac_cv_lib_pcreposix_regcomp" >&5 +echo "$as_me:8327: result: $ac_cv_lib_pcreposix_regcomp" >&5 echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6 if test "$ac_cv_lib_pcreposix_regcomp" = yes; then @@ -7727,7 +8345,7 @@ done LIBS="$cf_add_libs" else - { { echo "$as_me:7730: error: Cannot find PCRE2 POSIX library" >&5 + { { echo "$as_me:8348: error: Cannot find PCRE2 POSIX library" >&5 echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;} { (exit 1); exit 1; }; } fi @@ -7742,23 +8360,23 @@ fi for ac_header in pcre2posix.h pcreposix.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:7745: checking for $ac_header" >&5 +echo "$as_me:8363: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 7751 "configure" +#line 8369 "configure" #include "confdefs.h" #include <$ac_header> _ACEOF -if { (eval echo "$as_me:7755: \"$ac_cpp "conftest.$ac_ext"\"") >&5 +if { (eval echo "$as_me:8373: \"$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:7761: \$? = $ac_status" >&5 + echo "$as_me:8379: \$? = $ac_status" >&5 (exit "$ac_status"); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -7777,7 +8395,7 @@ else fi rm -f conftest.err "conftest.$ac_ext" fi -echo "$as_me:7780: result: `eval echo '${'"$as_ac_Header"'}'`" >&5 +echo "$as_me:8398: result: `eval echo '${'"$as_ac_Header"'}'`" >&5 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then cat >>confdefs.h <<EOF @@ -7787,11 +8405,80 @@ EOF fi done +for ac_func in PCRE2regcomp +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:8411: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >"conftest.$ac_ext" <<_ACEOF +#line 8417 "configure" +#include "confdefs.h" +#define $ac_func autoconf_temporary +#include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */ +#undef $ac_func + +#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 (void); + +int +main (void) +{ + +/* The GNU C library defines stubs 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) +#error found stub for $ac_func +#endif + + return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f "conftest.$ac_objext" "conftest$ac_exeext" +if { (eval echo "$as_me:8448: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:8451: \$? = $ac_status" >&5 + (exit "$ac_status"); } && + { ac_try='test -s "conftest$ac_exeext"' + { (eval echo "$as_me:8454: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:8457: \$? = $ac_status" >&5 + (exit "$ac_status"); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat "conftest.$ac_ext" >&5 +eval "$as_ac_var=no" +fi +rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" +fi +echo "$as_me:8467: result: `eval echo '${'"$as_ac_var"'}'`" >&5 +echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6 +if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then + cat >>confdefs.h <<EOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +EOF + +fi +done + fi # not everyone has "test -c" if test -c /dev/sysmouse 2>/dev/null ; then -echo "$as_me:7794: checking if you want to use sysmouse" >&5 +echo "$as_me:8481: checking if you want to use sysmouse" >&5 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6 # Check whether --with-sysmouse or --without-sysmouse was given. @@ -7803,7 +8490,7 @@ else fi; if test "$cf_with_sysmouse" != no ; then cat >"conftest.$ac_ext" <<_ACEOF -#line 7806 "configure" +#line 8493 "configure" #include "confdefs.h" #include <osreldate.h> @@ -7826,16 +8513,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:7829: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:8516: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:7832: \$? = $ac_status" >&5 + echo "$as_me:8519: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:7835: \"$ac_try\"") >&5 + { (eval echo "$as_me:8522: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7838: \$? = $ac_status" >&5 + echo "$as_me:8525: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_with_sysmouse=yes else @@ -7845,7 +8532,7 @@ cf_with_sysmouse=no fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:7848: result: $cf_with_sysmouse" >&5 +echo "$as_me:8535: result: $cf_with_sysmouse" >&5 echo "${ECHO_T}$cf_with_sysmouse" >&6 test "$cf_with_sysmouse" = yes && cat >>confdefs.h <<\EOF @@ -7855,7 +8542,7 @@ EOF fi # pretend that ncurses==ncursesw==ncursest -echo "$as_me:7858: checking if you want to disable library suffixes" >&5 +echo "$as_me:8545: checking if you want to disable library suffixes" >&5 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given. @@ -7872,13 +8559,13 @@ else disable_lib_suffixes=no fi; -echo "$as_me:7875: result: $disable_lib_suffixes" >&5 +echo "$as_me:8562: result: $disable_lib_suffixes" >&5 echo "${ECHO_T}$disable_lib_suffixes" >&6 ### If we're building with rpath, try to link non-standard libs that way too. if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then -echo "$as_me:7881: checking if rpath-hack should be disabled" >&5 +echo "$as_me:8568: checking if rpath-hack should be disabled" >&5 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6 # Check whether --enable-rpath-hack or --disable-rpath-hack was given. @@ -7896,22 +8583,22 @@ else fi; if test "x$enable_rpath_hack" = xno; then cf_disable_rpath_hack=yes; else cf_disable_rpath_hack=no; fi -echo "$as_me:7899: result: $cf_disable_rpath_hack" >&5 +echo "$as_me:8586: result: $cf_disable_rpath_hack" >&5 echo "${ECHO_T}$cf_disable_rpath_hack" >&6 if test "$enable_rpath_hack" = yes ; then -echo "$as_me:7904: checking for updated LDFLAGS" >&5 +echo "$as_me:8591: checking for updated LDFLAGS" >&5 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6 if test -n "$LD_RPATH_OPT" ; then - echo "$as_me:7907: result: maybe" >&5 + echo "$as_me:8594: result: maybe" >&5 echo "${ECHO_T}maybe" >&6 for ac_prog in ldd 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:7914: checking for $ac_word" >&5 +echo "$as_me:8601: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -7926,7 +8613,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_cf_ldd_prog="$ac_prog" -echo "$as_me:7929: found $ac_dir/$ac_word" >&5 +echo "$as_me:8616: found $ac_dir/$ac_word" >&5 break done @@ -7934,10 +8621,10 @@ fi fi cf_ldd_prog=$ac_cv_prog_cf_ldd_prog if test -n "$cf_ldd_prog"; then - echo "$as_me:7937: result: $cf_ldd_prog" >&5 + echo "$as_me:8624: result: $cf_ldd_prog" >&5 echo "${ECHO_T}$cf_ldd_prog" >&6 else - echo "$as_me:7940: result: no" >&5 + echo "$as_me:8627: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -7951,7 +8638,7 @@ test -n "$cf_ldd_prog" || cf_ldd_prog="no" cf_rpath_oops= cat >"conftest.$ac_ext" <<_ACEOF -#line 7954 "configure" +#line 8641 "configure" #include "confdefs.h" #include <stdio.h> int @@ -7963,16 +8650,16 @@ printf("Hello"); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:7966: \"$ac_link\"") >&5 +if { (eval echo "$as_me:8653: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:7969: \$? = $ac_status" >&5 + echo "$as_me:8656: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:7972: \"$ac_try\"") >&5 + { (eval echo "$as_me:8659: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7975: \$? = $ac_status" >&5 + echo "$as_me:8662: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.*$%%' |sort | uniq` cf_rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[ ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq` @@ -8000,7 +8687,7 @@ rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" then test -n "$verbose" && echo " ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6 -echo "${as_me:-configure}:8003: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5 +echo "${as_me:-configure}:8690: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib" break @@ -8012,11 +8699,11 @@ echo "${as_me:-configure}:8003: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS test -n "$verbose" && echo " ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6 -echo "${as_me:-configure}:8015: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5 +echo "${as_me:-configure}:8702: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5 test -n "$verbose" && echo " ...checking LDFLAGS $LDFLAGS" 1>&6 -echo "${as_me:-configure}:8019: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5 +echo "${as_me:-configure}:8706: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5 cf_rpath_dst= for cf_rpath_src in $LDFLAGS @@ -8053,7 +8740,7 @@ do then test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6 -echo "${as_me:-configure}:8056: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5 +echo "${as_me:-configure}:8743: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS" fi @@ -8066,11 +8753,11 @@ LDFLAGS=$cf_rpath_dst test -n "$verbose" && echo " ...checked LDFLAGS $LDFLAGS" 1>&6 -echo "${as_me:-configure}:8069: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5 +echo "${as_me:-configure}:8756: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5 test -n "$verbose" && echo " ...checking LIBS $LIBS" 1>&6 -echo "${as_me:-configure}:8073: testing ...checking LIBS $LIBS ..." 1>&5 +echo "${as_me:-configure}:8760: testing ...checking LIBS $LIBS ..." 1>&5 cf_rpath_dst= for cf_rpath_src in $LIBS @@ -8107,7 +8794,7 @@ do then test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6 -echo "${as_me:-configure}:8110: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5 +echo "${as_me:-configure}:8797: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS" fi @@ -8120,14 +8807,14 @@ LIBS=$cf_rpath_dst test -n "$verbose" && echo " ...checked LIBS $LIBS" 1>&6 -echo "${as_me:-configure}:8123: testing ...checked LIBS $LIBS ..." 1>&5 +echo "${as_me:-configure}:8810: testing ...checked LIBS $LIBS ..." 1>&5 test -n "$verbose" && echo " ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6 -echo "${as_me:-configure}:8127: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5 +echo "${as_me:-configure}:8814: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5 else - echo "$as_me:8130: result: no" >&5 + echo "$as_me:8817: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -8138,10 +8825,10 @@ fi ### Depending on the system, someone may use rpath to build ncurses but not # want users of the package to rely upon that feature. Give those people an # option to suppress that detail from EXTRA_LDFLAGS. -EXTRA_PKG_LDFLAGS="$EXTRA_LDFLAGS" +EXTRA_PKG_LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS" if test -n "$EXTRA_PKG_LDFLAGS" then - echo "$as_me:8144: checking if you want to disable extra LDFLAGS for package-scripts" >&5 + echo "$as_me:8831: checking if you want to disable extra LDFLAGS for package-scripts" >&5 echo $ECHO_N "checking if you want to disable extra LDFLAGS for package-scripts... $ECHO_C" >&6 # Check whether --enable-pkg-ldflags or --disable-pkg-ldflags was given. @@ -8158,7 +8845,7 @@ else disable_pkg_ldflags=no fi; - echo "$as_me:8161: result: $disable_pkg_ldflags" >&5 + echo "$as_me:8848: result: $disable_pkg_ldflags" >&5 echo "${ECHO_T}$disable_pkg_ldflags" >&6 test "$disable_pkg_ldflags" = yes && EXTRA_PKG_LDFLAGS= fi @@ -8166,8 +8853,8 @@ fi ############################################################################### ### use option --with-extra-suffix to append suffix to headers and libraries -echo "$as_me:8169: checking if you wish to append extra suffix to header/library paths" >&5 -echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6 +echo "$as_me:8856: checking for extra suffix to append to header/library paths" >&5 +echo $ECHO_N "checking for extra suffix to append to header/library paths... $ECHO_C" >&6 EXTRA_SUFFIX= # Check whether --with-extra-suffix or --without-extra-suffix was given. @@ -8185,11 +8872,11 @@ if test "${with_extra_suffix+set}" = set; then esac fi; -echo "$as_me:8188: result: $EXTRA_SUFFIX" >&5 -echo "${ECHO_T}$EXTRA_SUFFIX" >&6 +echo "$as_me:8875: result: ${EXTRA_SUFFIX:-(none)}" >&5 +echo "${ECHO_T}${EXTRA_SUFFIX:-(none)}" >&6 ### use option --disable-overwrite to leave out the link to -lcurses -echo "$as_me:8192: checking if you wish to install ncurses overwriting curses" >&5 +echo "$as_me:8879: checking if you wish to install ncurses overwriting curses" >&5 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6 # Check whether --enable-overwrite or --disable-overwrite was given. @@ -8199,10 +8886,10 @@ if test "${enable_overwrite+set}" = set; then else if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi fi; -echo "$as_me:8202: result: $with_overwrite" >&5 +echo "$as_me:8889: result: $with_overwrite" >&5 echo "${ECHO_T}$with_overwrite" >&6 -echo "$as_me:8205: checking if external terminfo-database is used" >&5 +echo "$as_me:8892: checking if external terminfo-database is used" >&5 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6 # Check whether --enable-database or --disable-database was given. @@ -8212,7 +8899,7 @@ if test "${enable_database+set}" = set; then else use_database=yes fi; -echo "$as_me:8215: result: $use_database" >&5 +echo "$as_me:8902: result: $use_database" >&5 echo "${ECHO_T}$use_database" >&6 case "$host_os" in @@ -8228,7 +8915,7 @@ NCURSES_USE_DATABASE=0 if test "$use_database" != no ; then NCURSES_USE_DATABASE=1 - echo "$as_me:8231: checking which terminfo source-file will be installed" >&5 + echo "$as_me:8918: checking which terminfo source-file will be installed" >&5 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6 # Check whether --with-database or --without-database was given. @@ -8236,10 +8923,10 @@ if test "${with_database+set}" = set; then withval="$with_database" TERMINFO_SRC=$withval fi; - echo "$as_me:8239: result: $TERMINFO_SRC" >&5 + echo "$as_me:8926: result: $TERMINFO_SRC" >&5 echo "${ECHO_T}$TERMINFO_SRC" >&6 - echo "$as_me:8242: checking whether to use hashed database instead of directory/tree" >&5 + echo "$as_me:8929: checking whether to use hashed database instead of directory/tree" >&5 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6 # Check whether --with-hashed-db or --without-hashed-db was given. @@ -8249,14 +8936,14 @@ if test "${with_hashed_db+set}" = set; then else with_hashed_db=no fi; - echo "$as_me:8252: result: $with_hashed_db" >&5 + echo "$as_me:8939: result: $with_hashed_db" >&5 echo "${ECHO_T}$with_hashed_db" >&6 else with_hashed_db=no fi -echo "$as_me:8258: checking for list of fallback descriptions" >&5 -echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6 +echo "$as_me:8945: checking for list of fallback terminal descriptions" >&5 +echo $ECHO_N "checking for list of fallback terminal descriptions... $ECHO_C" >&6 # Check whether --with-fallbacks or --without-fallbacks was given. if test "${with_fallbacks+set}" = set; then @@ -8265,15 +8952,15 @@ if test "${with_fallbacks+set}" = set; then else with_fallback= fi; -echo "$as_me:8268: result: $with_fallback" >&5 -echo "${ECHO_T}$with_fallback" >&6 +echo "$as_me:8955: result: ${with_fallback:-(none)}" >&5 +echo "${ECHO_T}${with_fallback:-(none)}" >&6 case ".$with_fallback" in (.|.no) FALLBACK_LIST= ;; (.yes) - { echo "$as_me:8276: WARNING: expected a list of terminal descriptions" >&5 + { echo "$as_me:8963: WARNING: expected a list of terminal descriptions" >&5 echo "$as_me: WARNING: expected a list of terminal descriptions" >&2;} ;; (*) @@ -8289,7 +8976,7 @@ esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}tic", so it can be a program name with args. set dummy ${ac_tool_prefix}tic; ac_word=$2 -echo "$as_me:8292: checking for $ac_word" >&5 +echo "$as_me:8979: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_TIC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -8304,7 +8991,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_TIC="${ac_tool_prefix}tic" -echo "$as_me:8307: found $ac_dir/$ac_word" >&5 +echo "$as_me:8994: found $ac_dir/$ac_word" >&5 break done @@ -8312,10 +8999,10 @@ fi fi TIC=$ac_cv_prog_TIC if test -n "$TIC"; then - echo "$as_me:8315: result: $TIC" >&5 + echo "$as_me:9002: result: $TIC" >&5 echo "${ECHO_T}$TIC" >&6 else - echo "$as_me:8318: result: no" >&5 + echo "$as_me:9005: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -8324,7 +9011,7 @@ if test -z "$ac_cv_prog_TIC"; then ac_ct_TIC=$TIC # Extract the first word of "tic", so it can be a program name with args. set dummy tic; ac_word=$2 -echo "$as_me:8327: checking for $ac_word" >&5 +echo "$as_me:9014: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_TIC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -8339,7 +9026,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_ac_ct_TIC="tic" -echo "$as_me:8342: found $ac_dir/$ac_word" >&5 +echo "$as_me:9029: found $ac_dir/$ac_word" >&5 break done @@ -8347,10 +9034,10 @@ fi fi ac_ct_TIC=$ac_cv_prog_ac_ct_TIC if test -n "$ac_ct_TIC"; then - echo "$as_me:8350: result: $ac_ct_TIC" >&5 + echo "$as_me:9037: result: $ac_ct_TIC" >&5 echo "${ECHO_T}$ac_ct_TIC" >&6 else - echo "$as_me:8353: result: no" >&5 + echo "$as_me:9040: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -8362,7 +9049,7 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}infocmp", so it can be a program name with args. set dummy ${ac_tool_prefix}infocmp; ac_word=$2 -echo "$as_me:8365: checking for $ac_word" >&5 +echo "$as_me:9052: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_INFOCMP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -8377,7 +9064,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_INFOCMP="${ac_tool_prefix}infocmp" -echo "$as_me:8380: found $ac_dir/$ac_word" >&5 +echo "$as_me:9067: found $ac_dir/$ac_word" >&5 break done @@ -8385,10 +9072,10 @@ fi fi INFOCMP=$ac_cv_prog_INFOCMP if test -n "$INFOCMP"; then - echo "$as_me:8388: result: $INFOCMP" >&5 + echo "$as_me:9075: result: $INFOCMP" >&5 echo "${ECHO_T}$INFOCMP" >&6 else - echo "$as_me:8391: result: no" >&5 + echo "$as_me:9078: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -8397,7 +9084,7 @@ if test -z "$ac_cv_prog_INFOCMP"; then ac_ct_INFOCMP=$INFOCMP # Extract the first word of "infocmp", so it can be a program name with args. set dummy infocmp; ac_word=$2 -echo "$as_me:8400: checking for $ac_word" >&5 +echo "$as_me:9087: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_INFOCMP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -8412,7 +9099,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_ac_ct_INFOCMP="infocmp" -echo "$as_me:8415: found $ac_dir/$ac_word" >&5 +echo "$as_me:9102: found $ac_dir/$ac_word" >&5 break done @@ -8420,10 +9107,10 @@ fi fi ac_ct_INFOCMP=$ac_cv_prog_ac_ct_INFOCMP if test -n "$ac_ct_INFOCMP"; then - echo "$as_me:8423: result: $ac_ct_INFOCMP" >&5 + echo "$as_me:9110: result: $ac_ct_INFOCMP" >&5 echo "${ECHO_T}$ac_ct_INFOCMP" >&6 else - echo "$as_me:8426: result: no" >&5 + echo "$as_me:9113: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -8438,10 +9125,10 @@ then # Check whether --with-tic-path or --without-tic-path was given. if test "${with_tic_path+set}" = set; then withval="$with_tic_path" - echo "$as_me:8441: checking for tic program for fallbacks" >&5 + echo "$as_me:9128: checking for tic program for fallbacks" >&5 echo $ECHO_N "checking for tic program for fallbacks... $ECHO_C" >&6 TIC=$withval - echo "$as_me:8444: result: $TIC" >&5 + echo "$as_me:9131: result: $TIC" >&5 echo "${ECHO_T}$TIC" >&6 if test "x$prefix" != xNONE; then @@ -8469,7 +9156,7 @@ case ".$TIC" in TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%` ;; (*) - { { echo "$as_me:8472: error: expected a pathname, not \"$TIC\"" >&5 + { { echo "$as_me:9159: error: expected a pathname, not \"$TIC\"" >&5 echo "$as_me: error: expected a pathname, not \"$TIC\"" >&2;} { (exit 1); exit 1; }; } ;; @@ -8482,7 +9169,7 @@ for ac_prog in $TIC tic 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:8485: checking for $ac_word" >&5 +echo "$as_me:9172: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_TIC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -8499,7 +9186,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if $as_executable_p "$ac_dir/$ac_word"; then ac_cv_path_TIC="$ac_dir/$ac_word" - echo "$as_me:8502: found $ac_dir/$ac_word" >&5 + echo "$as_me:9189: found $ac_dir/$ac_word" >&5 break fi done @@ -8510,10 +9197,10 @@ fi TIC=$ac_cv_path_TIC if test -n "$TIC"; then - echo "$as_me:8513: result: $TIC" >&5 + echo "$as_me:9200: result: $TIC" >&5 echo "${ECHO_T}$TIC" >&6 else - echo "$as_me:8516: result: no" >&5 + echo "$as_me:9203: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -8572,7 +9259,7 @@ IFS="$cf_save_ifs" if test -n "$cf_path_prog" ; then -echo "${as_me:-configure}:8575: testing defining path for ${cf_path_prog} ..." 1>&5 +echo "${as_me:-configure}:9262: testing defining path for ${cf_path_prog} ..." 1>&5 cat >>confdefs.h <<EOF #define TIC_PATH "$cf_path_prog" @@ -8587,7 +9274,7 @@ fi if test -z "$TIC" then - { echo "$as_me:8590: WARNING: no tic program found for fallbacks" >&5 + { echo "$as_me:9277: WARNING: no tic program found for fallbacks" >&5 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;} fi @@ -8596,10 +9283,10 @@ fi; # Check whether --with-infocmp-path or --without-infocmp-path was given. if test "${with_infocmp_path+set}" = set; then withval="$with_infocmp_path" - echo "$as_me:8599: checking for infocmp program for fallbacks" >&5 + echo "$as_me:9286: checking for infocmp program for fallbacks" >&5 echo $ECHO_N "checking for infocmp program for fallbacks... $ECHO_C" >&6 INFOCMP=$withval - echo "$as_me:8602: result: $INFOCMP" >&5 + echo "$as_me:9289: result: $INFOCMP" >&5 echo "${ECHO_T}$INFOCMP" >&6 if test "x$prefix" != xNONE; then @@ -8627,7 +9314,7 @@ case ".$INFOCMP" in INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%` ;; (*) - { { echo "$as_me:8630: error: expected a pathname, not \"$INFOCMP\"" >&5 + { { echo "$as_me:9317: error: expected a pathname, not \"$INFOCMP\"" >&5 echo "$as_me: error: expected a pathname, not \"$INFOCMP\"" >&2;} { (exit 1); exit 1; }; } ;; @@ -8640,7 +9327,7 @@ for ac_prog in $INFOCMP infocmp 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:8643: checking for $ac_word" >&5 +echo "$as_me:9330: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_INFOCMP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -8657,7 +9344,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if $as_executable_p "$ac_dir/$ac_word"; then ac_cv_path_INFOCMP="$ac_dir/$ac_word" - echo "$as_me:8660: found $ac_dir/$ac_word" >&5 + echo "$as_me:9347: found $ac_dir/$ac_word" >&5 break fi done @@ -8668,10 +9355,10 @@ fi INFOCMP=$ac_cv_path_INFOCMP if test -n "$INFOCMP"; then - echo "$as_me:8671: result: $INFOCMP" >&5 + echo "$as_me:9358: result: $INFOCMP" >&5 echo "${ECHO_T}$INFOCMP" >&6 else - echo "$as_me:8674: result: no" >&5 + echo "$as_me:9361: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -8730,7 +9417,7 @@ IFS="$cf_save_ifs" if test -n "$cf_path_prog" ; then -echo "${as_me:-configure}:8733: testing defining path for ${cf_path_prog} ..." 1>&5 +echo "${as_me:-configure}:9420: testing defining path for ${cf_path_prog} ..." 1>&5 cat >>confdefs.h <<EOF #define INFOCMP_PATH "$cf_path_prog" @@ -8745,7 +9432,7 @@ fi if test -z "$INFOCMP" then - { echo "$as_me:8748: WARNING: no infocmp program found for fallbacks" >&5 + { echo "$as_me:9435: WARNING: no infocmp program found for fallbacks" >&5 echo "$as_me: WARNING: no infocmp program found for fallbacks" >&2;} fi @@ -8755,7 +9442,7 @@ fi; test -z "$INFOCMP" && FALLBACK_LIST= if test -z "$FALLBACK_LIST" then - { echo "$as_me:8758: WARNING: ignoring fallback option because tic/infocmp are not available" >&5 + { echo "$as_me:9445: WARNING: ignoring fallback option because tic/infocmp are not available" >&5 echo "$as_me: WARNING: ignoring fallback option because tic/infocmp are not available" >&2;} fi fi @@ -8763,7 +9450,7 @@ fi USE_FALLBACKS= test -z "$FALLBACK_LIST" && USE_FALLBACKS="#" -echo "$as_me:8766: checking if you want modern xterm or antique" >&5 +echo "$as_me:9453: checking if you want modern xterm or antique" >&5 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6 # Check whether --with-xterm-new or --without-xterm-new was given. @@ -8777,11 +9464,20 @@ case "$with_xterm_new" in (no) with_xterm_new=xterm-old;; (*) with_xterm_new=xterm-new;; esac -echo "$as_me:8780: result: $with_xterm_new" >&5 +echo "$as_me:9467: result: $with_xterm_new" >&5 echo "${ECHO_T}$with_xterm_new" >&6 WHICH_XTERM=$with_xterm_new -echo "$as_me:8784: checking if xterm backspace sends BS or DEL" >&5 +case $host_os in +(*linux-gnu|*cygwin|*mingw32|*msys) + want_xterm_kbs=DEL + ;; +(*) + want_xterm_kbs=BS + ;; +esac + +echo "$as_me:9480: checking if xterm backspace sends BS or DEL" >&5 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6 # Check whether --with-xterm-kbs or --without-xterm-kbs was given. @@ -8789,7 +9485,7 @@ if test "${with_xterm_kbs+set}" = set; then withval="$with_xterm_kbs" with_xterm_kbs=$withval else - with_xterm_kbs=BS + with_xterm_kbs=auto fi; case x$with_xterm_kbs in (xyes|xno|xBS|xbs|x8) @@ -8798,21 +9494,30 @@ case x$with_xterm_kbs in (xDEL|xdel|x127) with_xterm_kbs=DEL ;; +(xauto) + with_xterm_kbs=$want_xterm_kbs + ;; (*) with_xterm_kbs=$withval ;; esac -echo "$as_me:8805: result: $with_xterm_kbs" >&5 +echo "$as_me:9504: result: $with_xterm_kbs" >&5 echo "${ECHO_T}$with_xterm_kbs" >&6 XTERM_KBS=$with_xterm_kbs +if test "x$with_xterm_kbs" != "x$want_xterm_kbs" +then + { echo "$as_me:9510: WARNING: expected --with-xterm-kbs=$want_xterm_kbs for $host_os, have $with_xterm_kbs" >&5 +echo "$as_me: WARNING: expected --with-xterm-kbs=$want_xterm_kbs for $host_os, have $with_xterm_kbs" >&2;} +fi + MAKE_TERMINFO= if test "$use_database" = no ; then TERMINFO="${datadir}/terminfo" MAKE_TERMINFO="#" else -echo "$as_me:8815: checking for list of terminfo directories" >&5 +echo "$as_me:9520: checking for list of terminfo directories" >&5 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given. @@ -8852,7 +9557,7 @@ case ".$cf_src_path" in cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%` ;; (*) - { { echo "$as_me:8855: error: expected a pathname, not \"$cf_src_path\"" >&5 + { { echo "$as_me:9560: error: expected a pathname, not \"$cf_src_path\"" >&5 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;} { (exit 1); exit 1; }; } ;; @@ -8875,7 +9580,7 @@ case "x$cf_dst_eval" in ;; esac -echo "$as_me:8878: result: $TERMINFO_DIRS" >&5 +echo "$as_me:9583: result: $TERMINFO_DIRS" >&5 echo "${ECHO_T}$TERMINFO_DIRS" >&6 test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF @@ -8884,13 +9589,13 @@ EOF case "x$TERMINFO" in x???:*) - { echo "$as_me:8887: WARNING: ignoring non-directory/file TERMINFO value" >&5 + { echo "$as_me:9592: WARNING: ignoring non-directory/file TERMINFO value" >&5 echo "$as_me: WARNING: ignoring non-directory/file TERMINFO value" >&2;} unset TERMINFO ;; esac -echo "$as_me:8893: checking for default terminfo directory" >&5 +echo "$as_me:9598: checking for default terminfo directory" >&5 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given. @@ -8926,7 +9631,7 @@ case ".$withval" in withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%` ;; (*) - { { echo "$as_me:8929: error: expected a pathname, not \"$withval\"" >&5 + { { echo "$as_me:9634: error: expected a pathname, not \"$withval\"" >&5 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;} { (exit 1); exit 1; }; } ;; @@ -8935,7 +9640,7 @@ esac fi eval TERMINFO="$withval" -echo "$as_me:8938: result: $TERMINFO" >&5 +echo "$as_me:9643: result: $TERMINFO" >&5 echo "${ECHO_T}$TERMINFO" >&6 cat >>confdefs.h <<EOF @@ -8946,7 +9651,7 @@ fi ### use option --disable-big-core to make tic run on small machines ### We need 4Mb, check if we can allocate 50% more than that. -echo "$as_me:8949: checking if big-core option selected" >&5 +echo "$as_me:9654: checking if big-core option selected" >&5 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6 # Check whether --enable-big-core or --disable-big-core was given. @@ -8958,12 +9663,12 @@ else with_big_core=no else cat >"conftest.$ac_ext" <<_ACEOF -#line 8961 "configure" +#line 9666 "configure" #include "confdefs.h" #include <stdlib.h> #include <string.h> -int main() { +int main(void) { unsigned long n = 6000000L; char *s = malloc(n); if (s != 0) @@ -8972,15 +9677,15 @@ int main() { } _ACEOF rm -f "conftest$ac_exeext" -if { (eval echo "$as_me:8975: \"$ac_link\"") >&5 +if { (eval echo "$as_me:9680: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:8978: \$? = $ac_status" >&5 + echo "$as_me:9683: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"' - { (eval echo "$as_me:8980: \"$ac_try\"") >&5 + { (eval echo "$as_me:9685: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:8983: \$? = $ac_status" >&5 + echo "$as_me:9688: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then with_big_core=yes else @@ -8992,7 +9697,7 @@ fi rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext" fi fi; -echo "$as_me:8995: result: $with_big_core" >&5 +echo "$as_me:9700: result: $with_big_core" >&5 echo "${ECHO_T}$with_big_core" >&6 test "x$with_big_core" = "xyes" && cat >>confdefs.h <<\EOF @@ -9002,7 +9707,7 @@ EOF ### ISO C only guarantees 512-char strings, we have tables which load faster ### when constructed using "big" strings. More than the C compiler, the awk ### program is a limit on most vendor UNIX systems. Check that we can build. -echo "$as_me:9005: checking if big-strings option selected" >&5 +echo "$as_me:9710: checking if big-strings option selected" >&5 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6 # Check whether --enable-big-strings or --disable-big-strings was given. @@ -9026,14 +9731,14 @@ else esac fi; -echo "$as_me:9029: result: $with_big_strings" >&5 +echo "$as_me:9734: result: $with_big_strings" >&5 echo "${ECHO_T}$with_big_strings" >&6 USE_BIG_STRINGS=0 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1 ### use option --enable-termcap to compile in the termcap fallback support -echo "$as_me:9036: checking if you want termcap-fallback support" >&5 +echo "$as_me:9741: checking if you want termcap-fallback support" >&5 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6 # Check whether --enable-termcap or --disable-termcap was given. @@ -9043,14 +9748,14 @@ if test "${enable_termcap+set}" = set; then else with_termcap=no fi; -echo "$as_me:9046: result: $with_termcap" >&5 +echo "$as_me:9751: result: $with_termcap" >&5 echo "${ECHO_T}$with_termcap" >&6 NCURSES_USE_TERMCAP=0 if test "x$with_termcap" != "xyes" ; then if test "$use_database" = no ; then if test -z "$with_fallback" ; then - { { echo "$as_me:9053: error: You have disabled the database w/o specifying fallbacks" >&5 + { { echo "$as_me:9758: error: You have disabled the database w/o specifying fallbacks" >&5 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;} { (exit 1); exit 1; }; } fi @@ -9063,13 +9768,13 @@ EOF else if test "$with_ticlib" != no ; then - { { echo "$as_me:9066: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5 + { { echo "$as_me:9771: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;} { (exit 1); exit 1; }; } fi NCURSES_USE_TERMCAP=1 - echo "$as_me:9072: checking for list of termcap files" >&5 + echo "$as_me:9777: checking for list of termcap files" >&5 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6 # Check whether --with-termpath or --without-termpath was given. @@ -9109,7 +9814,7 @@ case ".$cf_src_path" in cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%` ;; (*) - { { echo "$as_me:9112: error: expected a pathname, not \"$cf_src_path\"" >&5 + { { echo "$as_me:9817: error: expected a pathname, not \"$cf_src_path\"" >&5 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;} { (exit 1); exit 1; }; } ;; @@ -9132,7 +9837,7 @@ case "x$cf_dst_eval" in ;; esac - echo "$as_me:9135: result: $TERMPATH" >&5 + echo "$as_me:9840: result: $TERMPATH" >&5 echo "${ECHO_T}$TERMPATH" >&6 test -n "$TERMPATH" && cat >>confdefs.h <<EOF @@ -9140,7 +9845,7 @@ cat >>confdefs.h <<EOF EOF ### use option --enable-getcap to use a hacked getcap for reading termcaps - echo "$as_me:9143: checking if fast termcap-loader is needed" >&5 + echo "$as_me:9848: checking if fast termcap-loader is needed" >&5 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6 # Check whether --enable-getcap or --disable-getcap was given. @@ -9150,14 +9855,14 @@ if test "${enable_getcap+set}" = set; then else with_getcap=no fi; - echo "$as_me:9153: result: $with_getcap" >&5 + echo "$as_me:9858: result: $with_getcap" >&5 echo "${ECHO_T}$with_getcap" >&6 test "x$with_getcap" = "xyes" && cat >>confdefs.h <<\EOF #define USE_GETCAP 1 EOF - echo "$as_me:9160: checking if translated termcaps will be cached in ~/.terminfo" >&5 + echo "$as_me:9865: checking if translated termcaps will be cached in ~/.terminfo" >&5 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6 # Check whether --enable-getcap-cache or --disable-getcap-cache was given. @@ -9167,7 +9872,7 @@ if test "${enable_getcap_cache+set}" = set; then else with_getcap_cache=no fi; - echo "$as_me:9170: result: $with_getcap_cache" >&5 + echo "$as_me:9875: result: $with_getcap_cache" >&5 echo "${ECHO_T}$with_getcap_cache" >&6 test "x$with_getcap_cache" = "xyes" && cat >>confdefs.h <<\EOF @@ -9177,7 +9882,7 @@ EOF fi ### Use option --disable-home-terminfo to completely remove ~/.terminfo -echo "$as_me:9180: checking if ~/.terminfo is wanted" >&5 +echo "$as_me:9885: checking if ~/.terminfo is wanted" >&5 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6 # Check whether --enable-home-terminfo or --disable-home-terminfo was given. @@ -9187,15 +9892,15 @@ if test "${enable_home_terminfo+set}" = set; then else with_home_terminfo=yes fi; -echo "$as_me:9190: result: $with_home_terminfo" >&5 +echo "$as_me:9895: result: $with_home_terminfo" >&5 echo "${ECHO_T}$with_home_terminfo" >&6 test "x$with_home_terminfo" = "xyes" && cat >>confdefs.h <<\EOF #define USE_HOME_TERMINFO 1 EOF -echo "$as_me:9197: checking if you want to use restricted environment when running as root" >&5 -echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6 +echo "$as_me:9902: checking if you want to permit root to use ncurses environment variables" >&5 +echo $ECHO_N "checking if you want to permit root to use ncurses environment variables... $ECHO_C" >&6 # Check whether --enable-root-environ or --disable-root-environ was given. if test "${enable_root_environ+set}" = set; then @@ -9204,13 +9909,47 @@ if test "${enable_root_environ+set}" = set; then else with_root_environ=yes fi; -echo "$as_me:9207: result: $with_root_environ" >&5 +echo "$as_me:9912: result: $with_root_environ" >&5 echo "${ECHO_T}$with_root_environ" >&6 test "x$with_root_environ" = xyes && cat >>confdefs.h <<\EOF #define USE_ROOT_ENVIRON 1 EOF +echo "$as_me:9919: checking if you want to permit setuid programs to access all files" >&5 +echo $ECHO_N "checking if you want to permit setuid programs to access all files... $ECHO_C" >&6 + +# Check whether --enable-root-access or --disable-root-access was given. +if test "${enable_root_access+set}" = set; then + enableval="$enable_root_access" + with_root_access=$enableval +else + with_root_access=yes +fi; +echo "$as_me:9929: result: $with_root_access" >&5 +echo "${ECHO_T}$with_root_access" >&6 +test "x$with_root_access" = xyes && +cat >>confdefs.h <<\EOF +#define USE_ROOT_ACCESS 1 +EOF + +echo "$as_me:9936: checking if you want to permit setuid use of ncurses environment variables" >&5 +echo $ECHO_N "checking if you want to permit setuid use of ncurses environment variables... $ECHO_C" >&6 + +# Check whether --enable-setuid-environ or --disable-setuid-environ was given. +if test "${enable_setuid_environ+set}" = set; then + enableval="$enable_setuid_environ" + with_setuid_environ=$enableval +else + with_setuid_environ=$with_root_environ +fi; +echo "$as_me:9946: result: $with_setuid_environ" >&5 +echo "${ECHO_T}$with_setuid_environ" >&6 +test "x$with_setuid_environ" = xyes && +cat >>confdefs.h <<\EOF +#define USE_SETUID_ENVIRON 1 +EOF + ### Use option --enable-symlinks to make tic use symlinks, not hard links ### to reduce storage requirements for the terminfo database. @@ -9219,23 +9958,23 @@ unistd.h \ do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:9222: checking for $ac_header" >&5 +echo "$as_me:9961: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 9228 "configure" +#line 9967 "configure" #include "confdefs.h" #include <$ac_header> _ACEOF -if { (eval echo "$as_me:9232: \"$ac_cpp "conftest.$ac_ext"\"") >&5 +if { (eval echo "$as_me:9971: \"$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:9238: \$? = $ac_status" >&5 + echo "$as_me:9977: \$? = $ac_status" >&5 (exit "$ac_status"); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -9254,7 +9993,7 @@ else fi rm -f conftest.err "conftest.$ac_ext" fi -echo "$as_me:9257: result: `eval echo '${'"$as_ac_Header"'}'`" >&5 +echo "$as_me:9996: result: `eval echo '${'"$as_ac_Header"'}'`" >&5 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then cat >>confdefs.h <<EOF @@ -9269,13 +10008,13 @@ for ac_func in \ unlink do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:9272: checking for $ac_func" >&5 +echo "$as_me:10011: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 9278 "configure" +#line 10017 "configure" #include "confdefs.h" #define $ac_func autoconf_temporary #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */ @@ -9306,16 +10045,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:9309: \"$ac_link\"") >&5 +if { (eval echo "$as_me:10048: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:9312: \$? = $ac_status" >&5 + echo "$as_me:10051: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:9315: \"$ac_try\"") >&5 + { (eval echo "$as_me:10054: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:9318: \$? = $ac_status" >&5 + echo "$as_me:10057: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then eval "$as_ac_var=yes" else @@ -9325,7 +10064,7 @@ eval "$as_ac_var=no" fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi -echo "$as_me:9328: result: `eval echo '${'"$as_ac_var"'}'`" >&5 +echo "$as_me:10067: result: `eval echo '${'"$as_ac_var"'}'`" >&5 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then cat >>confdefs.h <<EOF @@ -9342,13 +10081,13 @@ for ac_func in \ symlink do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:9345: checking for $ac_func" >&5 +echo "$as_me:10084: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 9351 "configure" +#line 10090 "configure" #include "confdefs.h" #define $ac_func autoconf_temporary #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */ @@ -9379,16 +10118,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:9382: \"$ac_link\"") >&5 +if { (eval echo "$as_me:10121: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:9385: \$? = $ac_status" >&5 + echo "$as_me:10124: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:9388: \"$ac_try\"") >&5 + { (eval echo "$as_me:10127: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:9391: \$? = $ac_status" >&5 + echo "$as_me:10130: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then eval "$as_ac_var=yes" else @@ -9398,7 +10137,7 @@ eval "$as_ac_var=no" fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi -echo "$as_me:9401: result: `eval echo '${'"$as_ac_var"'}'`" >&5 +echo "$as_me:10140: result: `eval echo '${'"$as_ac_var"'}'`" >&5 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then cat >>confdefs.h <<EOF @@ -9409,7 +10148,7 @@ fi done else - echo "$as_me:9412: checking if link/symlink functions work" >&5 + echo "$as_me:10151: checking if link/symlink functions work" >&5 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6 if test "${cf_cv_link_funcs+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -9422,45 +10161,49 @@ else eval 'ac_cv_func_'$cf_func'=error' else cat >"conftest.$ac_ext" <<_ACEOF -#line 9425 "configure" +#line 10164 "configure" #include "confdefs.h" -#include <sys/types.h> -#include <sys/stat.h> -#ifdef HAVE_UNISTD_H -#include <unistd.h> -#endif +$ac_includes_default + int main(void) { int fail = 0; - char *src = "config.log"; - char *dst = "conftest.chk"; - struct stat src_sb; - struct stat dst_sb; - - stat(src, &src_sb); - fail = ($cf_func("config.log", "conftest.chk") < 0) - || (stat(dst, &dst_sb) < 0) - || (dst_sb.st_mtime != src_sb.st_mtime); + char src[] = "conftest.tmp"; + char dst[] = "conftest.chk"; + struct stat src_sb, dst_sb; + FILE *fp = fopen(src, "w"); + if (fp == 0) { fail = 3; } else { + fclose(fp); stat(src, &src_sb); + if ($cf_func(src, dst) < 0) { + fail = 1; + } else if (stat(dst, &dst_sb) < 0) { + fail = 2; + } else { + long diff = (dst_sb.st_mtime - src_sb.st_mtime); + if (diff < 0) diff = -diff; + if (diff > 2) fail = 3; + } + } #ifdef HAVE_UNLINK - unlink(dst); + unlink(dst); unlink(src); #else - remove(dst); + remove(dst); remove(src); #endif ${cf_cv_main_return:-return} (fail); } _ACEOF rm -f "conftest$ac_exeext" -if { (eval echo "$as_me:9455: \"$ac_link\"") >&5 +if { (eval echo "$as_me:10198: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:9458: \$? = $ac_status" >&5 + echo "$as_me:10201: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"' - { (eval echo "$as_me:9460: \"$ac_try\"") >&5 + { (eval echo "$as_me:10203: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:9463: \$? = $ac_status" >&5 + echo "$as_me:10206: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_link_funcs="$cf_cv_link_funcs $cf_func" @@ -9478,7 +10221,7 @@ fi test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no fi -echo "$as_me:9481: result: $cf_cv_link_funcs" >&5 +echo "$as_me:10224: result: $cf_cv_link_funcs" >&5 echo "${ECHO_T}$cf_cv_link_funcs" >&6 test "$ac_cv_func_link" = yes && cat >>confdefs.h <<\EOF @@ -9498,7 +10241,7 @@ with_symlinks=no # soft links (symbolic links) are useful for some systems where hard links do # not work, or to make it simpler to copy terminfo trees around. if test "x$ac_cv_func_symlink" = xyes ; then - echo "$as_me:9501: checking if tic should use symbolic links" >&5 + echo "$as_me:10244: checking if tic should use symbolic links" >&5 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6 # Check whether --enable-symlinks or --disable-symlinks was given. @@ -9508,21 +10251,21 @@ if test "${enable_symlinks+set}" = set; then else with_symlinks=no fi; - echo "$as_me:9511: result: $with_symlinks" >&5 + echo "$as_me:10254: result: $with_symlinks" >&5 echo "${ECHO_T}$with_symlinks" >&6 fi # If we have hard links and did not choose to use soft links instead, there is # no reason to make this choice optional - use the hard links. if test "$with_symlinks" = no ; then - echo "$as_me:9518: checking if tic should use hard links" >&5 + echo "$as_me:10261: checking if tic should use hard links" >&5 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6 if test "x$ac_cv_func_link" = xyes ; then with_links=yes else with_links=no fi - echo "$as_me:9525: result: $with_links" >&5 + echo "$as_me:10268: result: $with_links" >&5 echo "${ECHO_T}$with_links" >&6 fi @@ -9538,7 +10281,7 @@ EOF ### use option --enable-broken-linker to force on use of broken-linker support -echo "$as_me:9541: checking if you want broken-linker support code" >&5 +echo "$as_me:10284: checking if you want broken-linker support code" >&5 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6 # Check whether --enable-broken_linker or --disable-broken_linker was given. @@ -9548,7 +10291,7 @@ if test "${enable_broken_linker+set}" = set; then else with_broken_linker=no fi; -echo "$as_me:9551: result: $with_broken_linker" >&5 +echo "$as_me:10294: result: $with_broken_linker" >&5 echo "${ECHO_T}$with_broken_linker" >&6 : "${BROKEN_LINKER:=0}" @@ -9562,7 +10305,7 @@ EOF fi ### use option --enable-bsdpad to have tputs process BSD-style prefix padding -echo "$as_me:9565: checking if tputs should process BSD-style prefix padding" >&5 +echo "$as_me:10308: checking if tputs should process BSD-style prefix padding" >&5 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6 # Check whether --enable-bsdpad or --disable-bsdpad was given. @@ -9572,7 +10315,7 @@ if test "${enable_bsdpad+set}" = set; then else with_bsdpad=no fi; -echo "$as_me:9575: result: $with_bsdpad" >&5 +echo "$as_me:10318: result: $with_bsdpad" >&5 echo "${ECHO_T}$with_bsdpad" >&6 test "x$with_bsdpad" = xyes && cat >>confdefs.h <<\EOF @@ -9591,14 +10334,14 @@ NCURSES_WINT_T=0 # Check to define _XOPEN_SOURCE "automatically" CPPFLAGS_before_XOPEN="$CPPFLAGS" -echo "$as_me:9594: checking if the POSIX test-macros are already defined" >&5 +echo "$as_me:10337: checking if the POSIX test-macros are already defined" >&5 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6 if test "${cf_cv_posix_visible+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 9601 "configure" +#line 10344 "configure" #include "confdefs.h" #include <stdio.h> int @@ -9617,16 +10360,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:9620: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:10363: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:9623: \$? = $ac_status" >&5 + echo "$as_me:10366: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:9626: \"$ac_try\"") >&5 + { (eval echo "$as_me:10369: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:9629: \$? = $ac_status" >&5 + echo "$as_me:10372: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_posix_visible=no else @@ -9637,7 +10380,7 @@ fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:9640: result: $cf_cv_posix_visible" >&5 +echo "$as_me:10383: result: $cf_cv_posix_visible" >&5 echo "${ECHO_T}$cf_cv_posix_visible" >&6 if test "$cf_cv_posix_visible" = no; then @@ -9650,9 +10393,6 @@ case "$host_os" in (aix[4-7]*) cf_xopen_source="-D_ALL_SOURCE" ;; -(msys) - cf_XOPEN_SOURCE=600 - ;; (darwin[0-8].*) cf_xopen_source="-D_APPLE_C_SOURCE" ;; @@ -9678,18 +10418,18 @@ case "$host_os" in cf_xopen_source="-D_SGI_SOURCE" cf_XOPEN_SOURCE= ;; -(linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin) +(linux*gnu|linux*gnuabi64|linux*gnuabin32|linux*gnueabi|linux*gnueabihf|linux*gnux32|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin|msys|mingw*|linux*uclibc) cf_gnu_xopen_source=$cf_XOPEN_SOURCE -echo "$as_me:9685: checking if this is the GNU C library" >&5 +echo "$as_me:10425: checking if this is the GNU C library" >&5 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6 if test "${cf_cv_gnu_library+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 9692 "configure" +#line 10432 "configure" #include "confdefs.h" #include <sys/types.h> int @@ -9708,16 +10448,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:9711: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:10451: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:9714: \$? = $ac_status" >&5 + echo "$as_me:10454: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:9717: \"$ac_try\"") >&5 + { (eval echo "$as_me:10457: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:9720: \$? = $ac_status" >&5 + echo "$as_me:10460: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_gnu_library=yes else @@ -9728,7 +10468,7 @@ fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:9731: result: $cf_cv_gnu_library" >&5 +echo "$as_me:10471: result: $cf_cv_gnu_library" >&5 echo "${ECHO_T}$cf_cv_gnu_library" >&6 if test x$cf_cv_gnu_library = xyes; then @@ -9736,7 +10476,7 @@ if test x$cf_cv_gnu_library = xyes; then # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE # was changed to help a little. newlib incorporated the change about 4 # years later. - echo "$as_me:9739: checking if _DEFAULT_SOURCE can be used as a basis" >&5 + echo "$as_me:10479: checking if _DEFAULT_SOURCE can be used as a basis" >&5 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6 if test "${cf_cv_gnu_library_219+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -9748,7 +10488,7 @@ else CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE" cat >"conftest.$ac_ext" <<_ACEOF -#line 9751 "configure" +#line 10491 "configure" #include "confdefs.h" #include <sys/types.h> int @@ -9767,16 +10507,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:9770: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:10510: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:9773: \$? = $ac_status" >&5 + echo "$as_me:10513: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:9776: \"$ac_try\"") >&5 + { (eval echo "$as_me:10516: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:9779: \$? = $ac_status" >&5 + echo "$as_me:10519: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_gnu_library_219=yes else @@ -9788,12 +10528,12 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" CPPFLAGS="$cf_save" fi -echo "$as_me:9791: result: $cf_cv_gnu_library_219" >&5 +echo "$as_me:10531: result: $cf_cv_gnu_library_219" >&5 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6 if test "x$cf_cv_gnu_library_219" = xyes; then cf_save="$CPPFLAGS" - echo "$as_me:9796: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5 + echo "$as_me:10536: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -9898,7 +10638,7 @@ if test -n "$cf_new_extra_cppflags" ; then fi cat >"conftest.$ac_ext" <<_ACEOF -#line 9901 "configure" +#line 10641 "configure" #include "confdefs.h" #include <limits.h> @@ -9918,16 +10658,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:9921: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:10661: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:9924: \$? = $ac_status" >&5 + echo "$as_me:10664: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:9927: \"$ac_try\"") >&5 + { (eval echo "$as_me:10667: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:9930: \$? = $ac_status" >&5 + echo "$as_me:10670: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_gnu_dftsrc_219=yes else @@ -9938,7 +10678,7 @@ fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:9941: result: $cf_cv_gnu_dftsrc_219" >&5 +echo "$as_me:10681: result: $cf_cv_gnu_dftsrc_219" >&5 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save" else @@ -9947,14 +10687,14 @@ echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6 if test "x$cf_cv_gnu_dftsrc_219" != xyes; then - echo "$as_me:9950: checking if we must define _GNU_SOURCE" >&5 + echo "$as_me:10690: checking if we must define _GNU_SOURCE" >&5 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6 if test "${cf_cv_gnu_source+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 9957 "configure" +#line 10697 "configure" #include "confdefs.h" #include <sys/types.h> int @@ -9969,16 +10709,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:9972: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:10712: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:9975: \$? = $ac_status" >&5 + echo "$as_me:10715: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:9978: \"$ac_try\"") >&5 + { (eval echo "$as_me:10718: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:9981: \$? = $ac_status" >&5 + echo "$as_me:10721: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_gnu_source=no else @@ -10085,7 +10825,7 @@ if test -n "$cf_new_extra_cppflags" ; then fi cat >"conftest.$ac_ext" <<_ACEOF -#line 10088 "configure" +#line 10828 "configure" #include "confdefs.h" #include <sys/types.h> int @@ -10100,16 +10840,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:10103: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:10843: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:10106: \$? = $ac_status" >&5 + echo "$as_me:10846: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:10109: \"$ac_try\"") >&5 + { (eval echo "$as_me:10849: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:10112: \$? = $ac_status" >&5 + echo "$as_me:10852: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_gnu_source=no else @@ -10124,12 +10864,12 @@ fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:10127: result: $cf_cv_gnu_source" >&5 +echo "$as_me:10867: result: $cf_cv_gnu_source" >&5 echo "${ECHO_T}$cf_cv_gnu_source" >&6 if test "$cf_cv_gnu_source" = yes then - echo "$as_me:10132: checking if we should also define _DEFAULT_SOURCE" >&5 + echo "$as_me:10872: checking if we should also define _DEFAULT_SOURCE" >&5 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6 if test "${cf_cv_default_source+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -10139,7 +10879,7 @@ else CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE" cat >"conftest.$ac_ext" <<_ACEOF -#line 10142 "configure" +#line 10882 "configure" #include "confdefs.h" #include <sys/types.h> int @@ -10154,16 +10894,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:10157: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:10897: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:10160: \$? = $ac_status" >&5 + echo "$as_me:10900: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:10163: \"$ac_try\"") >&5 + { (eval echo "$as_me:10903: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:10166: \$? = $ac_status" >&5 + echo "$as_me:10906: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_default_source=no else @@ -10174,7 +10914,7 @@ fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:10177: result: $cf_cv_default_source" >&5 +echo "$as_me:10917: result: $cf_cv_default_source" >&5 echo "${ECHO_T}$cf_cv_default_source" >&6 if test "$cf_cv_default_source" = yes then @@ -10211,16 +10951,16 @@ cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \ sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \ -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'` -echo "$as_me:10214: checking if we should define _POSIX_C_SOURCE" >&5 +echo "$as_me:10954: checking if we should define _POSIX_C_SOURCE" >&5 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6 if test "${cf_cv_posix_c_source+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else -echo "${as_me:-configure}:10220: testing if the symbol is already defined go no further ..." 1>&5 +echo "${as_me:-configure}:10960: testing if the symbol is already defined go no further ..." 1>&5 cat >"conftest.$ac_ext" <<_ACEOF -#line 10223 "configure" +#line 10963 "configure" #include "confdefs.h" #include <sys/types.h> int @@ -10228,23 +10968,23 @@ main (void) { #ifndef _POSIX_C_SOURCE -make an error +#error _POSIX_C_SOURCE is not defined #endif ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:10238: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:10978: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:10241: \$? = $ac_status" >&5 + echo "$as_me:10981: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:10244: \"$ac_try\"") >&5 + { (eval echo "$as_me:10984: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:10247: \$? = $ac_status" >&5 + echo "$as_me:10987: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_posix_c_source=no else @@ -10265,7 +11005,7 @@ cf_want_posix_source=no esac if test "$cf_want_posix_source" = yes ; then cat >"conftest.$ac_ext" <<_ACEOF -#line 10268 "configure" +#line 11008 "configure" #include "confdefs.h" #include <sys/types.h> int @@ -10273,23 +11013,23 @@ main (void) { #ifdef _POSIX_SOURCE -make an error +#error _POSIX_SOURCE is defined #endif ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:10283: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:11023: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:10286: \$? = $ac_status" >&5 + echo "$as_me:11026: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:10289: \"$ac_try\"") >&5 + { (eval echo "$as_me:11029: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:10292: \$? = $ac_status" >&5 + echo "$as_me:11032: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then : else @@ -10300,7 +11040,7 @@ fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "${as_me:-configure}:10303: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5 +echo "${as_me:-configure}:11043: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5 CFLAGS="$cf_trim_CFLAGS" CPPFLAGS="$cf_trim_CPPFLAGS" @@ -10308,10 +11048,10 @@ echo "${as_me:-configure}:10303: testing ifdef from value $cf_POSIX_C_SOURCE ... test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source" -echo "${as_me:-configure}:10311: testing if the second compile does not leave our definition intact error ..." 1>&5 +echo "${as_me:-configure}:11051: testing if the second compile does not leave our definition intact error ..." 1>&5 cat >"conftest.$ac_ext" <<_ACEOF -#line 10314 "configure" +#line 11054 "configure" #include "confdefs.h" #include <sys/types.h> int @@ -10319,23 +11059,23 @@ main (void) { #ifndef _POSIX_C_SOURCE -make an error +#error _POSIX_C_SOURCE is not defined #endif ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:10329: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:11069: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:10332: \$? = $ac_status" >&5 + echo "$as_me:11072: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:10335: \"$ac_try\"") >&5 + { (eval echo "$as_me:11075: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:10338: \$? = $ac_status" >&5 + echo "$as_me:11078: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then : else @@ -10351,7 +11091,7 @@ fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:10354: result: $cf_cv_posix_c_source" >&5 +echo "$as_me:11094: result: $cf_cv_posix_c_source" >&5 echo "${ECHO_T}$cf_cv_posix_c_source" >&6 if test "$cf_cv_posix_c_source" != no ; then @@ -10464,7 +11204,16 @@ fi # cf_cv_posix_visible (netbsd*) cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw ;; -(openbsd[4-9]*) +(openbsd[6-9]*) + # OpenBSD 6.x has broken locale support, both compile-time and runtime. + # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html + # Abusing the conformance level is a workaround. + { echo "$as_me:11211: WARNING: this system does not provide usable locale support" >&5 +echo "$as_me: WARNING: this system does not provide usable locale support" >&2;} + cf_xopen_source="-D_BSD_SOURCE" + cf_XOPEN_SOURCE=700 + ;; +(openbsd[4-5]*) # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw cf_xopen_source="-D_BSD_SOURCE" cf_XOPEN_SOURCE=600 @@ -10491,42 +11240,41 @@ fi # cf_cv_posix_visible ;; (*) -echo "$as_me:10494: checking if we should define _XOPEN_SOURCE" >&5 +echo "$as_me:11243: checking if we should define _XOPEN_SOURCE" >&5 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6 if test "${cf_cv_xopen_source+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 10501 "configure" +#line 11250 "configure" #include "confdefs.h" -#include <stdlib.h> -#include <string.h> -#include <sys/types.h> +$ac_includes_default int main (void) { #ifndef _XOPEN_SOURCE -make an error +#error _XOPEN_SOURCE is not defined #endif + ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:10520: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:11268: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:10523: \$? = $ac_status" >&5 + echo "$as_me:11271: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:10526: \"$ac_try\"") >&5 + { (eval echo "$as_me:11274: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:10529: \$? = $ac_status" >&5 + echo "$as_me:11277: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_xopen_source=no else @@ -10538,35 +11286,34 @@ cf_save="$CPPFLAGS" CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE" cat >"conftest.$ac_ext" <<_ACEOF -#line 10541 "configure" +#line 11289 "configure" #include "confdefs.h" -#include <stdlib.h> -#include <string.h> -#include <sys/types.h> +$ac_includes_default int main (void) { -#ifdef _XOPEN_SOURCE -make an error +#ifndef _XOPEN_SOURCE +#error _XOPEN_SOURCE is not defined #endif + ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:10560: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:11307: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:10563: \$? = $ac_status" >&5 + echo "$as_me:11310: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:10566: \"$ac_try\"") >&5 + { (eval echo "$as_me:11313: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:10569: \$? = $ac_status" >&5 + echo "$as_me:11316: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_xopen_source=no else @@ -10575,13 +11322,13 @@ cat "conftest.$ac_ext" >&5 cf_cv_xopen_source=$cf_XOPEN_SOURCE fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" - CPPFLAGS="$cf_save" + CPPFLAGS="$cf_save" fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:10584: result: $cf_cv_xopen_source" >&5 +echo "$as_me:11331: result: $cf_cv_xopen_source" >&5 echo "${ECHO_T}$cf_cv_xopen_source" >&6 if test "$cf_cv_xopen_source" != no ; then @@ -10596,12 +11343,38 @@ CPPFLAGS=`echo "$CPPFLAGS" | \ cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source" +for cf_add_cflags in $cf_temp_xopen_source +do + case "x$cf_add_cflags" in + (x-[DU]*) + +cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'` +while true +do + cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'` + test "$CFLAGS" != "$cf_old_cflag" || break + + CFLAGS="$cf_old_cflag" +done + +cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'` +while true +do + cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'` + test "$CPPFLAGS" != "$cf_old_cflag" || break + + CPPFLAGS="$cf_old_cflag" +done + + ;; + esac + cf_fix_cppflags=no cf_new_cflags= cf_new_cppflags= cf_new_extra_cppflags= -for cf_add_cflags in $cf_temp_xopen_source +for cf_add_cflags in $cf_add_cflags do case "$cf_fix_cppflags" in (no) @@ -10694,8 +11467,12 @@ if test -n "$cf_new_extra_cppflags" ; then fi +done + fi + cf_save_xopen_cppflags="$CPPFLAGS" + if test "$cf_cv_posix_visible" = no; then cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE @@ -10711,16 +11488,16 @@ cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \ sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \ -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'` -echo "$as_me:10714: checking if we should define _POSIX_C_SOURCE" >&5 +echo "$as_me:11491: checking if we should define _POSIX_C_SOURCE" >&5 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6 if test "${cf_cv_posix_c_source+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else -echo "${as_me:-configure}:10720: testing if the symbol is already defined go no further ..." 1>&5 +echo "${as_me:-configure}:11497: testing if the symbol is already defined go no further ..." 1>&5 cat >"conftest.$ac_ext" <<_ACEOF -#line 10723 "configure" +#line 11500 "configure" #include "confdefs.h" #include <sys/types.h> int @@ -10728,23 +11505,23 @@ main (void) { #ifndef _POSIX_C_SOURCE -make an error +#error _POSIX_C_SOURCE is not defined #endif ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:10738: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:11515: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:10741: \$? = $ac_status" >&5 + echo "$as_me:11518: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:10744: \"$ac_try\"") >&5 + { (eval echo "$as_me:11521: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:10747: \$? = $ac_status" >&5 + echo "$as_me:11524: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_posix_c_source=no else @@ -10765,7 +11542,7 @@ cf_want_posix_source=no esac if test "$cf_want_posix_source" = yes ; then cat >"conftest.$ac_ext" <<_ACEOF -#line 10768 "configure" +#line 11545 "configure" #include "confdefs.h" #include <sys/types.h> int @@ -10773,23 +11550,23 @@ main (void) { #ifdef _POSIX_SOURCE -make an error +#error _POSIX_SOURCE is defined #endif ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:10783: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:11560: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:10786: \$? = $ac_status" >&5 + echo "$as_me:11563: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:10789: \"$ac_try\"") >&5 + { (eval echo "$as_me:11566: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:10792: \$? = $ac_status" >&5 + echo "$as_me:11569: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then : else @@ -10800,7 +11577,7 @@ fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "${as_me:-configure}:10803: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5 +echo "${as_me:-configure}:11580: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5 CFLAGS="$cf_trim_CFLAGS" CPPFLAGS="$cf_trim_CPPFLAGS" @@ -10808,10 +11585,10 @@ echo "${as_me:-configure}:10803: testing ifdef from value $cf_POSIX_C_SOURCE ... test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source" -echo "${as_me:-configure}:10811: testing if the second compile does not leave our definition intact error ..." 1>&5 +echo "${as_me:-configure}:11588: testing if the second compile does not leave our definition intact error ..." 1>&5 cat >"conftest.$ac_ext" <<_ACEOF -#line 10814 "configure" +#line 11591 "configure" #include "confdefs.h" #include <sys/types.h> int @@ -10819,23 +11596,23 @@ main (void) { #ifndef _POSIX_C_SOURCE -make an error +#error _POSIX_C_SOURCE is not defined #endif ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:10829: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:11606: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:10832: \$? = $ac_status" >&5 + echo "$as_me:11609: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:10835: \"$ac_try\"") >&5 + { (eval echo "$as_me:11612: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:10838: \$? = $ac_status" >&5 + echo "$as_me:11615: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then : else @@ -10851,7 +11628,7 @@ fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:10854: result: $cf_cv_posix_c_source" >&5 +echo "$as_me:11631: result: $cf_cv_posix_c_source" >&5 echo "${ECHO_T}$cf_cv_posix_c_source" >&6 if test "$cf_cv_posix_c_source" != no ; then @@ -10960,17 +11737,96 @@ fi fi # cf_cv_posix_visible + # Some of these niche implementations use copy/paste, double-check... + if test "$cf_cv_xopen_source" = no ; then + test -n "$verbose" && echo " checking if _POSIX_C_SOURCE interferes with _XOPEN_SOURCE" 1>&6 + +echo "${as_me:-configure}:11744: testing checking if _POSIX_C_SOURCE interferes with _XOPEN_SOURCE ..." 1>&5 + + cat >"conftest.$ac_ext" <<_ACEOF +#line 11747 "configure" +#include "confdefs.h" + +$ac_includes_default + +int +main (void) +{ + +#ifndef _XOPEN_SOURCE +#error _XOPEN_SOURCE is not defined +#endif + + ; + return 0; +} +_ACEOF +rm -f "conftest.$ac_objext" +if { (eval echo "$as_me:11765: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:11768: \$? = $ac_status" >&5 + (exit "$ac_status"); } && + { ac_try='test -s "conftest.$ac_objext"' + { (eval echo "$as_me:11771: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:11774: \$? = $ac_status" >&5 + (exit "$ac_status"); }; }; then + : +else + echo "$as_me: failed program was:" >&5 +cat "conftest.$ac_ext" >&5 + + { echo "$as_me:11781: WARNING: _POSIX_C_SOURCE definition is not usable" >&5 +echo "$as_me: WARNING: _POSIX_C_SOURCE definition is not usable" >&2;} + CPPFLAGS="$cf_save_xopen_cppflags" +fi +rm -f "conftest.$ac_objext" "conftest.$ac_ext" + fi ;; esac if test -n "$cf_xopen_source" ; then +for cf_add_cflags in $cf_xopen_source +do + case "x$cf_add_cflags" in + (x-[DU]*) + +cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'` +while true +do + cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'` + test "$CFLAGS" != "$cf_old_cflag" || break + test -n "$verbose" && echo " removing old option $cf_add_cflags from CFLAGS" 1>&6 + +echo "${as_me:-configure}:11804: testing removing old option $cf_add_cflags from CFLAGS ..." 1>&5 + + CFLAGS="$cf_old_cflag" +done + +cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'` +while true +do + cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'` + test "$CPPFLAGS" != "$cf_old_cflag" || break + test -n "$verbose" && echo " removing old option $cf_add_cflags from CPPFLAGS" 1>&6 + +echo "${as_me:-configure}:11816: testing removing old option $cf_add_cflags from CPPFLAGS ..." 1>&5 + + CPPFLAGS="$cf_old_cflag" +done + + ;; + esac + cf_fix_cppflags=no cf_new_cflags= cf_new_cppflags= cf_new_extra_cppflags= -for cf_add_cflags in $cf_xopen_source +for cf_add_cflags in $cf_add_cflags do case "$cf_fix_cppflags" in (no) @@ -11045,7 +11901,7 @@ done if test -n "$cf_new_cflags" ; then test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6 -echo "${as_me:-configure}:11048: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5 +echo "${as_me:-configure}:11904: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5 test -n "$CFLAGS" && CFLAGS="$CFLAGS " CFLAGS="${CFLAGS}$cf_new_cflags" @@ -11055,7 +11911,7 @@ fi if test -n "$cf_new_cppflags" ; then test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6 -echo "${as_me:-configure}:11058: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5 +echo "${as_me:-configure}:11914: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " CPPFLAGS="${CPPFLAGS}$cf_new_cppflags" @@ -11065,20 +11921,22 @@ fi if test -n "$cf_new_extra_cppflags" ; then test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6 -echo "${as_me:-configure}:11068: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5 +echo "${as_me:-configure}:11924: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS " EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags" fi +done + fi if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then - echo "$as_me:11078: checking if _XOPEN_SOURCE really is set" >&5 + echo "$as_me:11936: checking if _XOPEN_SOURCE really is set" >&5 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6 cat >"conftest.$ac_ext" <<_ACEOF -#line 11081 "configure" +#line 11939 "configure" #include "confdefs.h" #include <stdlib.h> int @@ -11086,23 +11944,23 @@ main (void) { #ifndef _XOPEN_SOURCE -make an error +#error _XOPEN_SOURCE is not defined #endif ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:11096: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:11954: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:11099: \$? = $ac_status" >&5 + echo "$as_me:11957: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:11102: \"$ac_try\"") >&5 + { (eval echo "$as_me:11960: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:11105: \$? = $ac_status" >&5 + echo "$as_me:11963: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_XOPEN_SOURCE_set=yes else @@ -11111,12 +11969,12 @@ cat "conftest.$ac_ext" >&5 cf_XOPEN_SOURCE_set=no fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" - echo "$as_me:11114: result: $cf_XOPEN_SOURCE_set" >&5 + echo "$as_me:11972: result: $cf_XOPEN_SOURCE_set" >&5 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6 if test "$cf_XOPEN_SOURCE_set" = yes then cat >"conftest.$ac_ext" <<_ACEOF -#line 11119 "configure" +#line 11977 "configure" #include "confdefs.h" #include <stdlib.h> int @@ -11124,23 +11982,23 @@ main (void) { #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE -make an error +#error (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE #endif ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:11134: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:11992: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:11137: \$? = $ac_status" >&5 + echo "$as_me:11995: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:11140: \"$ac_try\"") >&5 + { (eval echo "$as_me:11998: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:11143: \$? = $ac_status" >&5 + echo "$as_me:12001: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_XOPEN_SOURCE_set_ok=yes else @@ -11151,47 +12009,46 @@ fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" if test "$cf_XOPEN_SOURCE_set_ok" = no then - { echo "$as_me:11154: WARNING: _XOPEN_SOURCE is lower than requested" >&5 + { echo "$as_me:12012: WARNING: _XOPEN_SOURCE is lower than requested" >&5 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;} fi else -echo "$as_me:11159: checking if we should define _XOPEN_SOURCE" >&5 +echo "$as_me:12017: checking if we should define _XOPEN_SOURCE" >&5 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6 if test "${cf_cv_xopen_source+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 11166 "configure" +#line 12024 "configure" #include "confdefs.h" -#include <stdlib.h> -#include <string.h> -#include <sys/types.h> +$ac_includes_default int main (void) { #ifndef _XOPEN_SOURCE -make an error +#error _XOPEN_SOURCE is not defined #endif + ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:11185: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:12042: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:11188: \$? = $ac_status" >&5 + echo "$as_me:12045: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:11191: \"$ac_try\"") >&5 + { (eval echo "$as_me:12048: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:11194: \$? = $ac_status" >&5 + echo "$as_me:12051: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_xopen_source=no else @@ -11203,35 +12060,34 @@ cf_save="$CPPFLAGS" CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE" cat >"conftest.$ac_ext" <<_ACEOF -#line 11206 "configure" +#line 12063 "configure" #include "confdefs.h" -#include <stdlib.h> -#include <string.h> -#include <sys/types.h> +$ac_includes_default int main (void) { -#ifdef _XOPEN_SOURCE -make an error +#ifndef _XOPEN_SOURCE +#error _XOPEN_SOURCE is not defined #endif + ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:11225: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:12081: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:11228: \$? = $ac_status" >&5 + echo "$as_me:12084: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:11231: \"$ac_try\"") >&5 + { (eval echo "$as_me:12087: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:11234: \$? = $ac_status" >&5 + echo "$as_me:12090: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_xopen_source=no else @@ -11240,33 +12096,59 @@ cat "conftest.$ac_ext" >&5 cf_cv_xopen_source=$cf_XOPEN_SOURCE fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" - CPPFLAGS="$cf_save" + CPPFLAGS="$cf_save" fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:11249: result: $cf_cv_xopen_source" >&5 +echo "$as_me:12105: result: $cf_cv_xopen_source" >&5 echo "${ECHO_T}$cf_cv_xopen_source" >&6 if test "$cf_cv_xopen_source" != no ; then -CFLAGS=`echo "$CFLAGS" | \ - sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \ - -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'` +CFLAGS=`echo "$CFLAGS" | \ + sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \ + -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'` + +CPPFLAGS=`echo "$CPPFLAGS" | \ + sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \ + -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'` + + cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source" + +for cf_add_cflags in $cf_temp_xopen_source +do + case "x$cf_add_cflags" in + (x-[DU]*) + +cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'` +while true +do + cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'` + test "$CFLAGS" != "$cf_old_cflag" || break + + CFLAGS="$cf_old_cflag" +done + +cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'` +while true +do + cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'` + test "$CPPFLAGS" != "$cf_old_cflag" || break -CPPFLAGS=`echo "$CPPFLAGS" | \ - sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \ - -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'` + CPPFLAGS="$cf_old_cflag" +done - cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source" + ;; + esac cf_fix_cppflags=no cf_new_cflags= cf_new_cppflags= cf_new_extra_cppflags= -for cf_add_cflags in $cf_temp_xopen_source +for cf_add_cflags in $cf_add_cflags do case "$cf_fix_cppflags" in (no) @@ -11359,6 +12241,8 @@ if test -n "$cf_new_extra_cppflags" ; then fi +done + fi fi @@ -11369,14 +12253,14 @@ CPPFLAGS_after_XOPEN="$CPPFLAGS" # Work around breakage on OS X -echo "$as_me:11372: checking if SIGWINCH is defined" >&5 +echo "$as_me:12256: checking if SIGWINCH is defined" >&5 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6 if test "${cf_cv_define_sigwinch+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 11379 "configure" +#line 12263 "configure" #include "confdefs.h" #include <sys/types.h> @@ -11391,23 +12275,23 @@ int x = SIGWINCH; (void)x } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:11394: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:12278: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:11397: \$? = $ac_status" >&5 + echo "$as_me:12281: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:11400: \"$ac_try\"") >&5 + { (eval echo "$as_me:12284: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:11403: \$? = $ac_status" >&5 + echo "$as_me:12287: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_define_sigwinch=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cat >"conftest.$ac_ext" <<_ACEOF -#line 11410 "configure" +#line 12294 "configure" #include "confdefs.h" #undef _XOPEN_SOURCE @@ -11425,16 +12309,16 @@ int x = SIGWINCH; (void)x } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:11428: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:12312: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:11431: \$? = $ac_status" >&5 + echo "$as_me:12315: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:11434: \"$ac_try\"") >&5 + { (eval echo "$as_me:12318: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:11437: \$? = $ac_status" >&5 + echo "$as_me:12321: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_define_sigwinch=maybe else @@ -11448,11 +12332,11 @@ fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:11451: result: $cf_cv_define_sigwinch" >&5 +echo "$as_me:12335: result: $cf_cv_define_sigwinch" >&5 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6 if test "$cf_cv_define_sigwinch" = maybe ; then -echo "$as_me:11455: checking for actual SIGWINCH definition" >&5 +echo "$as_me:12339: checking for actual SIGWINCH definition" >&5 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6 if test "${cf_cv_fixup_sigwinch+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -11463,7 +12347,7 @@ cf_sigwinch=32 while test "$cf_sigwinch" != 1 do cat >"conftest.$ac_ext" <<_ACEOF -#line 11466 "configure" +#line 12350 "configure" #include "confdefs.h" #undef _XOPEN_SOURCE @@ -11477,7 +12361,7 @@ main (void) { #if SIGWINCH != $cf_sigwinch -make an error +#error SIGWINCH is not $cf_sigwinch #endif int x = SIGWINCH; (void)x ; @@ -11485,16 +12369,16 @@ int x = SIGWINCH; (void)x } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:11488: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:12372: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:11491: \$? = $ac_status" >&5 + echo "$as_me:12375: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:11494: \"$ac_try\"") >&5 + { (eval echo "$as_me:12378: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:11497: \$? = $ac_status" >&5 + echo "$as_me:12381: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_fixup_sigwinch=$cf_sigwinch break @@ -11508,7 +12392,7 @@ cf_sigwinch="`expr "$cf_sigwinch" - 1`" done fi -echo "$as_me:11511: result: $cf_cv_fixup_sigwinch" >&5 +echo "$as_me:12395: result: $cf_cv_fixup_sigwinch" >&5 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6 if test "$cf_cv_fixup_sigwinch" != unknown ; then @@ -11518,14 +12402,16 @@ fi # Checks for CODESET support. -echo "$as_me:11521: checking for nl_langinfo and CODESET" >&5 +echo "$as_me:12405: checking for nl_langinfo and CODESET" >&5 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6 if test "${am_cv_langinfo_codeset+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 11527 "configure" +#line 12411 "configure" #include "confdefs.h" + +$ac_includes_default #include <langinfo.h> int main (void) @@ -11536,16 +12422,16 @@ char* cs = nl_langinfo(CODESET); (void)cs } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:11539: \"$ac_link\"") >&5 +if { (eval echo "$as_me:12425: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:11542: \$? = $ac_status" >&5 + echo "$as_me:12428: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:11545: \"$ac_try\"") >&5 + { (eval echo "$as_me:12431: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:11548: \$? = $ac_status" >&5 + echo "$as_me:12434: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then am_cv_langinfo_codeset=yes else @@ -11556,7 +12442,7 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi -echo "$as_me:11559: result: $am_cv_langinfo_codeset" >&5 +echo "$as_me:12445: result: $am_cv_langinfo_codeset" >&5 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6 if test "$am_cv_langinfo_codeset" = yes; then @@ -11570,7 +12456,7 @@ EOF NCURSES_OK_WCHAR_T= NCURSES_OK_WINT_T= -echo "$as_me:11573: checking if you want wide-character code" >&5 +echo "$as_me:12459: checking if you want wide-character code" >&5 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6 # Check whether --enable-widec or --disable-widec was given. @@ -11578,9 +12464,9 @@ if test "${enable_widec+set}" = set; then enableval="$enable_widec" with_widec=$enableval else - with_widec=no + with_widec=$cf_dft_widec fi; -echo "$as_me:11583: result: $with_widec" >&5 +echo "$as_me:12469: result: $with_widec" >&5 echo "${ECHO_T}$with_widec" >&6 NCURSES_WCWIDTH_GRAPHICS=1 @@ -11598,29 +12484,40 @@ cat >>confdefs.h <<\EOF #define NCURSES_WIDECHAR 1 EOF + case "$CPPFLAGS" in + (*_XOPEN_SOURCE=*) + ;; + (*) + { echo "$as_me:12491: WARNING: _XOPEN_SOURCE feature test macro appears to be predefined" >&5 +echo "$as_me: WARNING: _XOPEN_SOURCE feature test macro appears to be predefined" >&2;} + # CPPFLAGS="$CPPFLAGS -DNCURSES_WIDECHAR" + CPPFLAGS_after_XOPEN="$CPPFLAGS_after_XOPEN -DNCURSES_WIDECHAR" + ;; + esac + for ac_header in \ wchar.h \ wctype.h \ do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:11607: checking for $ac_header" >&5 +echo "$as_me:12504: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 11613 "configure" +#line 12510 "configure" #include "confdefs.h" #include <$ac_header> _ACEOF -if { (eval echo "$as_me:11617: \"$ac_cpp "conftest.$ac_ext"\"") >&5 +if { (eval echo "$as_me:12514: \"$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:11623: \$? = $ac_status" >&5 + echo "$as_me:12520: \$? = $ac_status" >&5 (exit "$ac_status"); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -11639,7 +12536,7 @@ else fi rm -f conftest.err "conftest.$ac_ext" fi -echo "$as_me:11642: result: `eval echo '${'"$as_ac_Header"'}'`" >&5 +echo "$as_me:12539: result: `eval echo '${'"$as_ac_Header"'}'`" >&5 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then cat >>confdefs.h <<EOF @@ -11649,17 +12546,17 @@ EOF fi done -echo "$as_me:11652: checking if wchar.h can be used as is" >&5 +echo "$as_me:12549: checking if wchar.h can be used as is" >&5 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6 if test "${cf_cv_wchar_h_okay+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 11659 "configure" +#line 12556 "configure" #include "confdefs.h" -#include <stdlib.h> +$ac_includes_default #ifdef HAVE_WCHAR_H #include <wchar.h> #endif @@ -11672,22 +12569,22 @@ main (void) { wint_t foo = 0; - int bar = iswpunct(foo) + int bar = iswpunct(foo); (void) bar ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:11681: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:12578: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:11684: \$? = $ac_status" >&5 + echo "$as_me:12581: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:11687: \"$ac_try\"") >&5 + { (eval echo "$as_me:12584: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:11690: \$? = $ac_status" >&5 + echo "$as_me:12587: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_wchar_h_okay=yes else @@ -11697,16 +12594,16 @@ cf_cv_wchar_h_okay=no fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:11700: result: $cf_cv_wchar_h_okay" >&5 +echo "$as_me:12597: result: $cf_cv_wchar_h_okay" >&5 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6 if test "$cf_cv_wchar_h_okay" = no then -echo "$as_me:11706: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5 +echo "$as_me:12603: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6 cat >"conftest.$ac_ext" <<_ACEOF -#line 11709 "configure" +#line 12606 "configure" #include "confdefs.h" #include <sys/types.h> @@ -11715,23 +12612,23 @@ main (void) { #ifndef _XOPEN_SOURCE_EXTENDED -make an error +#error _XOPEN_SOURCE_EXTENDED is not defined #endif ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:11725: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:12622: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:11728: \$? = $ac_status" >&5 + echo "$as_me:12625: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:11731: \"$ac_try\"") >&5 + { (eval echo "$as_me:12628: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:11734: \$? = $ac_status" >&5 + echo "$as_me:12631: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_result=no else @@ -11740,16 +12637,16 @@ cat "conftest.$ac_ext" >&5 cf_result=yes fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" -echo "$as_me:11743: result: $cf_result" >&5 +echo "$as_me:12640: result: $cf_result" >&5 echo "${ECHO_T}$cf_result" >&6 if test "$cf_result" = yes ; then CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED" elif test "x" != "x" ; then - echo "$as_me:11749: checking checking for compatible value versus " >&5 + echo "$as_me:12646: checking checking for compatible value versus " >&5 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6 cat >"conftest.$ac_ext" <<_ACEOF -#line 11752 "configure" +#line 12649 "configure" #include "confdefs.h" #include <sys/types.h> @@ -11758,23 +12655,23 @@ main (void) { #if _XOPEN_SOURCE_EXTENDED- < 0 -make an error +#error _XOPEN_SOURCE_EXTENDED- is negative #endif ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:11768: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:12665: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:11771: \$? = $ac_status" >&5 + echo "$as_me:12668: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:11774: \"$ac_try\"") >&5 + { (eval echo "$as_me:12671: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:11777: \$? = $ac_status" >&5 + echo "$as_me:12674: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_result=yes else @@ -11783,7 +12680,7 @@ cat "conftest.$ac_ext" >&5 cf_result=no fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" - echo "$as_me:11786: result: $cf_result" >&5 + echo "$as_me:12683: result: $cf_result" >&5 echo "${ECHO_T}$cf_result" >&6 if test "$cf_result" = no ; then # perhaps we can override it - try... @@ -11793,7 +12690,7 @@ fi fi -echo "$as_me:11796: checking if wcwidth agrees graphics are single-width" >&5 +echo "$as_me:12693: checking if wcwidth agrees graphics are single-width" >&5 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6 if test "${cf_cv_wcwidth_graphics+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -11864,11 +12761,12 @@ if test "$cross_compiling" = yes; then cf_cv_wcwidth_graphics=unknown else cat >"conftest.$ac_ext" <<_ACEOF -#line 11867 "configure" +#line 12764 "configure" #include "confdefs.h" +$ac_includes_default + #include <locale.h> -#include <stdio.h> #include <wchar.h> #define MY_LEN 80 @@ -11877,7 +12775,7 @@ int main(void) { FILE *fp; - int value; + unsigned value; char buffer[MY_LEN + 1]; char notes[MY_LEN + 1]; int totals = 0; @@ -11893,9 +12791,9 @@ main(void) fprintf(stderr, "\\t%s", buffer); } else if (sscanf(buffer, "%x %s", &value, notes) == 2) { ++totals; - if (wcwidth(value) == 1) + if (wcwidth((int)value) == 1) ++passed; - fprintf(stderr, "%d\\t%s", wcwidth(value), buffer); + fprintf(stderr, "%d\\t%s", wcwidth((int)value), buffer); } else { fprintf(stderr, "?\\t%s", buffer); } @@ -11908,15 +12806,15 @@ main(void) _ACEOF rm -f "conftest$ac_exeext" -if { (eval echo "$as_me:11911: \"$ac_link\"") >&5 +if { (eval echo "$as_me:12809: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:11914: \$? = $ac_status" >&5 + echo "$as_me:12812: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"' - { (eval echo "$as_me:11916: \"$ac_try\"") >&5 + { (eval echo "$as_me:12814: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:11919: \$? = $ac_status" >&5 + echo "$as_me:12817: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_wcwidth_graphics=yes else @@ -11929,7 +12827,7 @@ rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftes fi fi -echo "$as_me:11932: result: $cf_cv_wcwidth_graphics" >&5 +echo "$as_me:12830: result: $cf_cv_wcwidth_graphics" >&5 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6 test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0 @@ -11937,16 +12835,16 @@ echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6 # with_overwrite=no NCURSES_CH_T=cchar_t -for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs +for ac_func in putwc btowc wctob wmemchr mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:11943: checking for $ac_func" >&5 +echo "$as_me:12841: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 11949 "configure" +#line 12847 "configure" #include "confdefs.h" #define $ac_func autoconf_temporary #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */ @@ -11977,16 +12875,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:11980: \"$ac_link\"") >&5 +if { (eval echo "$as_me:12878: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:11983: \$? = $ac_status" >&5 + echo "$as_me:12881: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:11986: \"$ac_try\"") >&5 + { (eval echo "$as_me:12884: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:11989: \$? = $ac_status" >&5 + echo "$as_me:12887: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then eval "$as_ac_var=yes" else @@ -11996,7 +12894,7 @@ eval "$as_ac_var=no" fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi -echo "$as_me:11999: result: `eval echo '${'"$as_ac_var"'}'`" >&5 +echo "$as_me:12897: result: `eval echo '${'"$as_ac_var"'}'`" >&5 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then cat >>confdefs.h <<EOF @@ -12008,7 +12906,55 @@ done if test "x$ac_cv_func_putwc" != xyes ; then -echo "$as_me:12011: checking for multibyte character support" >&5 +for ac_header in wchar.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +echo "$as_me:12912: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >"conftest.$ac_ext" <<_ACEOF +#line 12918 "configure" +#include "confdefs.h" +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:12922: \"$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:12928: \$? = $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 "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 + cat "conftest.$ac_ext" >&5 + eval "$as_ac_Header=no" +fi +rm -f conftest.err "conftest.$ac_ext" +fi +echo "$as_me:12947: result: `eval echo '${'"$as_ac_Header"'}'`" >&5 +echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6 +if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then + cat >>confdefs.h <<EOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +EOF + +fi +done + +echo "$as_me:12957: checking for multibyte character support" >&5 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6 if test "${cf_cv_utf8_lib+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -12016,10 +12962,14 @@ else cf_save_LIBS="$LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 12019 "configure" +#line 12965 "configure" #include "confdefs.h" -#include <stdlib.h> +$ac_includes_default +#ifdef HAVE_WCHAR_H +#include <wchar.h> +#endif + int main (void) { @@ -12029,16 +12979,16 @@ putwc(0,0); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:12032: \"$ac_link\"") >&5 +if { (eval echo "$as_me:12982: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:12035: \$? = $ac_status" >&5 + echo "$as_me:12985: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:12038: \"$ac_try\"") >&5 + { (eval echo "$as_me:12988: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:12041: \$? = $ac_status" >&5 + echo "$as_me:12991: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_utf8_lib=yes else @@ -12050,12 +13000,12 @@ cat "conftest.$ac_ext" >&5 cf_cv_header_path_utf8= cf_cv_library_path_utf8= -echo "${as_me:-configure}:12053: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5 +echo "${as_me:-configure}:13003: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5 cf_save_LIBS="$LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 12058 "configure" +#line 13008 "configure" #include "confdefs.h" #include <libutf8.h> @@ -12068,16 +13018,16 @@ putwc(0,0); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:12071: \"$ac_link\"") >&5 +if { (eval echo "$as_me:13021: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:12074: \$? = $ac_status" >&5 + echo "$as_me:13024: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:12077: \"$ac_try\"") >&5 + { (eval echo "$as_me:13027: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:12080: \$? = $ac_status" >&5 + echo "$as_me:13030: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_find_linkage_utf8=yes @@ -12091,7 +13041,7 @@ cat "conftest.$ac_ext" >&5 LIBS="-lutf8 $cf_save_LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 12094 "configure" +#line 13044 "configure" #include "confdefs.h" #include <libutf8.h> @@ -12104,16 +13054,16 @@ putwc(0,0); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:12107: \"$ac_link\"") >&5 +if { (eval echo "$as_me:13057: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:12110: \$? = $ac_status" >&5 + echo "$as_me:13060: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:12113: \"$ac_try\"") >&5 + { (eval echo "$as_me:13063: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:12116: \$? = $ac_status" >&5 + echo "$as_me:13066: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_find_linkage_utf8=yes @@ -12130,9 +13080,9 @@ cat "conftest.$ac_ext" >&5 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6 -echo "${as_me:-configure}:12133: testing find linkage for utf8 library ..." 1>&5 +echo "${as_me:-configure}:13083: testing find linkage for utf8 library ..." 1>&5 -echo "${as_me:-configure}:12135: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5 +echo "${as_me:-configure}:13085: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5 cf_save_CPPFLAGS="$CPPFLAGS" cf_test_CPPFLAGS="$CPPFLAGS" @@ -12223,7 +13173,7 @@ cf_search="$cf_search $cf_header_path_list" if test -d "$cf_cv_header_path_utf8" ; then test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6 -echo "${as_me:-configure}:12226: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5 +echo "${as_me:-configure}:13176: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5 CPPFLAGS="$cf_save_CPPFLAGS" @@ -12231,7 +13181,7 @@ echo "${as_me:-configure}:12226: testing ... testing $cf_cv_header_path_utf8 ... CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8" cat >"conftest.$ac_ext" <<_ACEOF -#line 12234 "configure" +#line 13184 "configure" #include "confdefs.h" #include <libutf8.h> @@ -12244,21 +13194,21 @@ putwc(0,0); } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:12247: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:13197: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:12250: \$? = $ac_status" >&5 + echo "$as_me:13200: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:12253: \"$ac_try\"") >&5 + { (eval echo "$as_me:13203: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:12256: \$? = $ac_status" >&5 + echo "$as_me:13206: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6 -echo "${as_me:-configure}:12261: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5 +echo "${as_me:-configure}:13211: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5 cf_cv_find_linkage_utf8=maybe cf_test_CPPFLAGS="$CPPFLAGS" @@ -12276,7 +13226,7 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" if test "$cf_cv_find_linkage_utf8" = maybe ; then -echo "${as_me:-configure}:12279: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5 +echo "${as_me:-configure}:13229: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5 cf_save_LIBS="$LIBS" cf_save_LDFLAGS="$LDFLAGS" @@ -12351,13 +13301,13 @@ cf_search="$cf_library_path_list $cf_search" if test -d "$cf_cv_library_path_utf8" ; then test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6 -echo "${as_me:-configure}:12354: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5 +echo "${as_me:-configure}:13304: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5 CPPFLAGS="$cf_test_CPPFLAGS" LIBS="-lutf8 $cf_save_LIBS" LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8" cat >"conftest.$ac_ext" <<_ACEOF -#line 12360 "configure" +#line 13310 "configure" #include "confdefs.h" #include <libutf8.h> @@ -12370,21 +13320,21 @@ putwc(0,0); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:12373: \"$ac_link\"") >&5 +if { (eval echo "$as_me:13323: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:12376: \$? = $ac_status" >&5 + echo "$as_me:13326: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:12379: \"$ac_try\"") >&5 + { (eval echo "$as_me:13329: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:12382: \$? = $ac_status" >&5 + echo "$as_me:13332: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6 -echo "${as_me:-configure}:12387: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5 +echo "${as_me:-configure}:13337: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5 cf_cv_find_linkage_utf8=yes cf_cv_library_file_utf8="-lutf8" @@ -12426,7 +13376,7 @@ fi fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi -echo "$as_me:12429: result: $cf_cv_utf8_lib" >&5 +echo "$as_me:13379: result: $cf_cv_utf8_lib" >&5 echo "${ECHO_T}$cf_cv_utf8_lib" >&6 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between @@ -12464,7 +13414,7 @@ if test -n "$cf_cv_header_path_utf8" ; then CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir" cat >"conftest.$ac_ext" <<_ACEOF -#line 12467 "configure" +#line 13417 "configure" #include "confdefs.h" #include <stdio.h> int @@ -12476,16 +13426,16 @@ printf("Hello") } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:12479: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:13429: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:12482: \$? = $ac_status" >&5 + echo "$as_me:13432: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:12485: \"$ac_try\"") >&5 + { (eval echo "$as_me:13435: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:12488: \$? = $ac_status" >&5 + echo "$as_me:13438: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then : else @@ -12502,7 +13452,7 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" if test "$cf_have_incdir" = no ; then test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6 -echo "${as_me:-configure}:12505: testing adding $cf_add_incdir to include-path ..." 1>&5 +echo "${as_me:-configure}:13455: testing adding $cf_add_incdir to include-path ..." 1>&5 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" @@ -12538,7 +13488,7 @@ if test -n "$cf_cv_library_path_utf8" ; then if test "$cf_have_libdir" = no ; then test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6 -echo "${as_me:-configure}:12541: testing adding $cf_add_libdir to library-path ..." 1>&5 +echo "${as_me:-configure}:13491: testing adding $cf_add_libdir to library-path ..." 1>&5 LDFLAGS="-L$cf_add_libdir $LDFLAGS" fi @@ -12570,14 +13520,14 @@ fi fi # This is needed on Tru64 5.0 to declare mbstate_t -echo "$as_me:12573: checking if we must include wchar.h to declare mbstate_t" >&5 +echo "$as_me:13523: checking if we must include wchar.h to declare mbstate_t" >&5 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6 if test "${cf_cv_mbstate_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 12580 "configure" +#line 13530 "configure" #include "confdefs.h" #include <stdlib.h> @@ -12589,29 +13539,29 @@ cat >"conftest.$ac_ext" <<_ACEOF int main (void) { -mbstate_t state +mbstate_t state; (void)state ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:12598: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:13548: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:12601: \$? = $ac_status" >&5 + echo "$as_me:13551: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:12604: \"$ac_try\"") >&5 + { (eval echo "$as_me:13554: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:12607: \$? = $ac_status" >&5 + echo "$as_me:13557: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_mbstate_t=no else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cat >"conftest.$ac_ext" <<_ACEOF -#line 12614 "configure" +#line 13564 "configure" #include "confdefs.h" #include <stdlib.h> @@ -12624,22 +13574,22 @@ cat >"conftest.$ac_ext" <<_ACEOF int main (void) { -mbstate_t value +mbstate_t value; (void) value ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:12633: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:13583: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:12636: \$? = $ac_status" >&5 + echo "$as_me:13586: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:12639: \"$ac_try\"") >&5 + { (eval echo "$as_me:13589: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:12642: \$? = $ac_status" >&5 + echo "$as_me:13592: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_mbstate_t=yes else @@ -12651,7 +13601,7 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:12654: result: $cf_cv_mbstate_t" >&5 +echo "$as_me:13604: result: $cf_cv_mbstate_t" >&5 echo "${ECHO_T}$cf_cv_mbstate_t" >&6 if test "$cf_cv_mbstate_t" = yes ; then @@ -12669,14 +13619,14 @@ if test "$cf_cv_mbstate_t" = unknown ; then fi # This is needed on Tru64 5.0 to declare wchar_t -echo "$as_me:12672: checking if we must include wchar.h to declare wchar_t" >&5 +echo "$as_me:13622: checking if we must include wchar.h to declare wchar_t" >&5 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6 if test "${cf_cv_wchar_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 12679 "configure" +#line 13629 "configure" #include "confdefs.h" #include <stdlib.h> @@ -12688,29 +13638,29 @@ cat >"conftest.$ac_ext" <<_ACEOF int main (void) { -wchar_t state +wchar_t state; (void)state ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:12697: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:13647: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:12700: \$? = $ac_status" >&5 + echo "$as_me:13650: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:12703: \"$ac_try\"") >&5 + { (eval echo "$as_me:13653: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:12706: \$? = $ac_status" >&5 + echo "$as_me:13656: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_wchar_t=no else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cat >"conftest.$ac_ext" <<_ACEOF -#line 12713 "configure" +#line 13663 "configure" #include "confdefs.h" #include <stdlib.h> @@ -12723,22 +13673,22 @@ cat >"conftest.$ac_ext" <<_ACEOF int main (void) { -wchar_t value +wchar_t value; (void) value ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:12732: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:13682: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:12735: \$? = $ac_status" >&5 + echo "$as_me:13685: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:12738: \"$ac_try\"") >&5 + { (eval echo "$as_me:13688: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:12741: \$? = $ac_status" >&5 + echo "$as_me:13691: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_wchar_t=yes else @@ -12750,7 +13700,7 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:12753: result: $cf_cv_wchar_t" >&5 +echo "$as_me:13703: result: $cf_cv_wchar_t" >&5 echo "${ECHO_T}$cf_cv_wchar_t" >&6 if test "$cf_cv_wchar_t" = yes ; then @@ -12773,14 +13723,14 @@ if test "$cf_cv_wchar_t" != unknown ; then fi # This is needed on Tru64 5.0 to declare wint_t -echo "$as_me:12776: checking if we must include wchar.h to declare wint_t" >&5 +echo "$as_me:13726: checking if we must include wchar.h to declare wint_t" >&5 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6 if test "${cf_cv_wint_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 12783 "configure" +#line 13733 "configure" #include "confdefs.h" #include <stdlib.h> @@ -12792,29 +13742,29 @@ cat >"conftest.$ac_ext" <<_ACEOF int main (void) { -wint_t state +wint_t state; (void)state ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:12801: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:13751: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:12804: \$? = $ac_status" >&5 + echo "$as_me:13754: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:12807: \"$ac_try\"") >&5 + { (eval echo "$as_me:13757: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:12810: \$? = $ac_status" >&5 + echo "$as_me:13760: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_wint_t=no else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cat >"conftest.$ac_ext" <<_ACEOF -#line 12817 "configure" +#line 13767 "configure" #include "confdefs.h" #include <stdlib.h> @@ -12827,22 +13777,22 @@ cat >"conftest.$ac_ext" <<_ACEOF int main (void) { -wint_t value +wint_t value; (void) value ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:12836: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:13786: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:12839: \$? = $ac_status" >&5 + echo "$as_me:13789: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:12842: \"$ac_try\"") >&5 + { (eval echo "$as_me:13792: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:12845: \$? = $ac_status" >&5 + echo "$as_me:13795: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_wint_t=yes else @@ -12854,7 +13804,7 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:12857: result: $cf_cv_wint_t" >&5 +echo "$as_me:13807: result: $cf_cv_wint_t" >&5 echo "${ECHO_T}$cf_cv_wint_t" >&6 if test "$cf_cv_wint_t" = yes ; then @@ -12886,7 +13836,7 @@ EOF fi ### use option --disable-lp64 to allow long chtype -echo "$as_me:12889: checking whether to enable _LP64 definition in curses.h" >&5 +echo "$as_me:13839: checking whether to enable _LP64 definition in curses.h" >&5 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6 # Check whether --enable-lp64 or --disable-lp64 was given. @@ -12896,7 +13846,7 @@ if test "${enable_lp64+set}" = set; then else with_lp64=$cf_dft_with_lp64 fi; -echo "$as_me:12899: result: $with_lp64" >&5 +echo "$as_me:13849: result: $with_lp64" >&5 echo "${ECHO_T}$with_lp64" >&6 if test "x$with_lp64" = xyes ; then @@ -12912,7 +13862,7 @@ if test "${enable_largefile+set}" = set; then fi; if test "$enable_largefile" != no; then - echo "$as_me:12915: checking for special C compiler options needed for large files" >&5 + echo "$as_me:13865: checking for special C compiler options needed for large files" >&5 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6 if test "${ac_cv_sys_largefile_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -12924,7 +13874,7 @@ else # IRIX 6.2 and later do not support large files by default, # so use the C compiler's -n32 option if that helps. cat >"conftest.$ac_ext" <<_ACEOF -#line 12927 "configure" +#line 13877 "configure" #include "confdefs.h" #include <sys/types.h> /* Check that off_t can represent 2**63 - 1 correctly. @@ -12944,16 +13894,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:12947: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:13897: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:12950: \$? = $ac_status" >&5 + echo "$as_me:13900: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:12953: \"$ac_try\"") >&5 + { (eval echo "$as_me:13903: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:12956: \$? = $ac_status" >&5 + echo "$as_me:13906: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then break else @@ -12963,16 +13913,16 @@ fi rm -f "conftest.$ac_objext" CC="$CC -n32" rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:12966: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:13916: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:12969: \$? = $ac_status" >&5 + echo "$as_me:13919: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:12972: \"$ac_try\"") >&5 + { (eval echo "$as_me:13922: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:12975: \$? = $ac_status" >&5 + echo "$as_me:13925: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_sys_largefile_CC=' -n32'; break else @@ -12986,13 +13936,13 @@ rm -f "conftest.$ac_objext" rm -f "conftest.$ac_ext" fi fi -echo "$as_me:12989: result: $ac_cv_sys_largefile_CC" >&5 +echo "$as_me:13939: result: $ac_cv_sys_largefile_CC" >&5 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6 if test "$ac_cv_sys_largefile_CC" != no; then CC=$CC$ac_cv_sys_largefile_CC fi - echo "$as_me:12995: checking for _FILE_OFFSET_BITS value needed for large files" >&5 + echo "$as_me:13945: checking for _FILE_OFFSET_BITS value needed for large files" >&5 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6 if test "${ac_cv_sys_file_offset_bits+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -13000,7 +13950,7 @@ else while :; do ac_cv_sys_file_offset_bits=no cat >"conftest.$ac_ext" <<_ACEOF -#line 13003 "configure" +#line 13953 "configure" #include "confdefs.h" #include <sys/types.h> /* Check that off_t can represent 2**63 - 1 correctly. @@ -13020,16 +13970,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:13023: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:13973: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:13026: \$? = $ac_status" >&5 + echo "$as_me:13976: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:13029: \"$ac_try\"") >&5 + { (eval echo "$as_me:13979: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:13032: \$? = $ac_status" >&5 + echo "$as_me:13982: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then break else @@ -13038,7 +13988,7 @@ cat "conftest.$ac_ext" >&5 fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" cat >"conftest.$ac_ext" <<_ACEOF -#line 13041 "configure" +#line 13991 "configure" #include "confdefs.h" #define _FILE_OFFSET_BITS 64 #include <sys/types.h> @@ -13059,16 +14009,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:13062: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:14012: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:13065: \$? = $ac_status" >&5 + echo "$as_me:14015: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:13068: \"$ac_try\"") >&5 + { (eval echo "$as_me:14018: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:13071: \$? = $ac_status" >&5 + echo "$as_me:14021: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_sys_file_offset_bits=64; break else @@ -13079,7 +14029,7 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" break done fi -echo "$as_me:13082: result: $ac_cv_sys_file_offset_bits" >&5 +echo "$as_me:14032: result: $ac_cv_sys_file_offset_bits" >&5 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6 if test "$ac_cv_sys_file_offset_bits" != no; then @@ -13089,7 +14039,7 @@ EOF fi rm -rf conftest* - echo "$as_me:13092: checking for _LARGE_FILES value needed for large files" >&5 + echo "$as_me:14042: checking for _LARGE_FILES value needed for large files" >&5 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6 if test "${ac_cv_sys_large_files+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -13097,7 +14047,7 @@ else while :; do ac_cv_sys_large_files=no cat >"conftest.$ac_ext" <<_ACEOF -#line 13100 "configure" +#line 14050 "configure" #include "confdefs.h" #include <sys/types.h> /* Check that off_t can represent 2**63 - 1 correctly. @@ -13117,16 +14067,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:13120: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:14070: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:13123: \$? = $ac_status" >&5 + echo "$as_me:14073: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:13126: \"$ac_try\"") >&5 + { (eval echo "$as_me:14076: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:13129: \$? = $ac_status" >&5 + echo "$as_me:14079: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then break else @@ -13135,7 +14085,7 @@ cat "conftest.$ac_ext" >&5 fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" cat >"conftest.$ac_ext" <<_ACEOF -#line 13138 "configure" +#line 14088 "configure" #include "confdefs.h" #define _LARGE_FILES 1 #include <sys/types.h> @@ -13156,16 +14106,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:13159: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:14109: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:13162: \$? = $ac_status" >&5 + echo "$as_me:14112: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:13165: \"$ac_try\"") >&5 + { (eval echo "$as_me:14115: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:13168: \$? = $ac_status" >&5 + echo "$as_me:14118: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_sys_large_files=1; break else @@ -13176,7 +14126,7 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" break done fi -echo "$as_me:13179: result: $ac_cv_sys_large_files" >&5 +echo "$as_me:14129: result: $ac_cv_sys_large_files" >&5 echo "${ECHO_T}$ac_cv_sys_large_files" >&6 if test "$ac_cv_sys_large_files" != no; then @@ -13189,7 +14139,7 @@ rm -rf conftest* fi if test "$enable_largefile" != no ; then - echo "$as_me:13192: checking for _LARGEFILE_SOURCE value needed for large files" >&5 + echo "$as_me:14142: checking for _LARGEFILE_SOURCE value needed for large files" >&5 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6 if test "${ac_cv_sys_largefile_source+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -13197,28 +14147,31 @@ else while :; do ac_cv_sys_largefile_source=no cat >"conftest.$ac_ext" <<_ACEOF -#line 13200 "configure" +#line 14150 "configure" #include "confdefs.h" #include <stdio.h> + #include <sys/types.h> int main (void) { -return !fseeko; + + int (*my_fseeko)(FILE *, off_t, int) = fseeko; + return my_fseeko(stdin, 0, 0); ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:13212: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:14165: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:13215: \$? = $ac_status" >&5 + echo "$as_me:14168: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:13218: \"$ac_try\"") >&5 + { (eval echo "$as_me:14171: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:13221: \$? = $ac_status" >&5 + echo "$as_me:14174: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then break else @@ -13227,29 +14180,32 @@ cat "conftest.$ac_ext" >&5 fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" cat >"conftest.$ac_ext" <<_ACEOF -#line 13230 "configure" +#line 14183 "configure" #include "confdefs.h" #define _LARGEFILE_SOURCE 1 #include <stdio.h> + #include <sys/types.h> int main (void) { -return !fseeko; + + int (*my_fseeko)(FILE *, off_t, int) = fseeko; + return my_fseeko(stdin, 0, 0); ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:13243: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:14199: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:13246: \$? = $ac_status" >&5 + echo "$as_me:14202: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:13249: \"$ac_try\"") >&5 + { (eval echo "$as_me:14205: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:13252: \$? = $ac_status" >&5 + echo "$as_me:14208: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_sys_largefile_source=1; break else @@ -13260,7 +14216,7 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" break done fi -echo "$as_me:13263: result: $ac_cv_sys_largefile_source" >&5 +echo "$as_me:14219: result: $ac_cv_sys_largefile_source" >&5 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6 if test "$ac_cv_sys_largefile_source" != no; then @@ -13274,34 +14230,36 @@ rm -rf conftest* # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug # in glibc 2.1.3, but that breaks too many other things. # If you want fseeko and ftello with glibc, upgrade to a fixed glibc. -echo "$as_me:13277: checking for fseeko" >&5 +echo "$as_me:14233: checking for fseeko" >&5 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6 if test "${ac_cv_func_fseeko+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 13283 "configure" +#line 14239 "configure" #include "confdefs.h" #include <stdio.h> + #include <sys/types.h> int main (void) { -return fseeko && fseeko (stdin, 0, 0); +int (*my_fseeko)(FILE *, off_t, int) = fseeko; + return my_fseeko && my_fseeko (stdin, 0, 0); ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:13295: \"$ac_link\"") >&5 +if { (eval echo "$as_me:14253: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:13298: \$? = $ac_status" >&5 + echo "$as_me:14256: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:13301: \"$ac_try\"") >&5 + { (eval echo "$as_me:14259: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:13304: \$? = $ac_status" >&5 + echo "$as_me:14262: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_func_fseeko=yes else @@ -13311,7 +14269,7 @@ ac_cv_func_fseeko=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi -echo "$as_me:13314: result: $ac_cv_func_fseeko" >&5 +echo "$as_me:14272: result: $ac_cv_func_fseeko" >&5 echo "${ECHO_T}$ac_cv_func_fseeko" >&6 if test $ac_cv_func_fseeko = yes; then @@ -13350,28 +14308,32 @@ fi fi - echo "$as_me:13353: checking whether to use struct dirent64" >&5 + echo "$as_me:14311: checking whether to use struct dirent64" >&5 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6 if test "${cf_cv_struct_dirent64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 13360 "configure" +#line 14318 "configure" #include "confdefs.h" #pragma GCC diagnostic error "-Wincompatible-pointer-types" #include <sys/types.h> #include <dirent.h> +#ifndef __REDIRECT +/* if transitional largefile support is setup, this is true */ +extern struct dirent64 * readdir(DIR *); +#endif + int main (void) { - /* if transitional largefile support is setup, this is true */ - extern struct dirent64 * readdir(DIR *); - struct dirent64 *x = readdir((DIR *)0); - struct dirent *y = readdir((DIR *)0); + DIR *dp = opendir("."); + struct dirent64 *x = readdir(dp); + struct dirent *y = readdir(dp); int z = x - y; (void)z; @@ -13380,16 +14342,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:13383: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:14345: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:13386: \$? = $ac_status" >&5 + echo "$as_me:14348: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:13389: \"$ac_try\"") >&5 + { (eval echo "$as_me:14351: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:13392: \$? = $ac_status" >&5 + echo "$as_me:14354: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_struct_dirent64=yes else @@ -13400,7 +14362,7 @@ fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:13403: result: $cf_cv_struct_dirent64" >&5 +echo "$as_me:14365: result: $cf_cv_struct_dirent64" >&5 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6 test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF @@ -13410,7 +14372,7 @@ EOF fi ### use option --disable-tparm-varargs to make tparm() conform to X/Open -echo "$as_me:13413: checking if you want tparm not to use X/Open fixed-parameter list" >&5 +echo "$as_me:14375: checking if you want tparm not to use X/Open fixed-parameter list" >&5 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given. @@ -13420,14 +14382,14 @@ if test "${enable_tparm_varargs+set}" = set; then else with_tparm_varargs=yes fi; -echo "$as_me:13423: result: $with_tparm_varargs" >&5 +echo "$as_me:14385: result: $with_tparm_varargs" >&5 echo "${ECHO_T}$with_tparm_varargs" >&6 NCURSES_TPARM_VARARGS=0 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1 ### use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw if test "$with_ticlib" != no ; then -echo "$as_me:13430: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5 +echo "$as_me:14392: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6 # Check whether --enable-tic-depends or --disable-tic-depends was given. @@ -13437,34 +14399,34 @@ if test "${enable_tic_depends+set}" = set; then else with_tic_depends=yes fi; -echo "$as_me:13440: result: $with_tic_depends" >&5 +echo "$as_me:14402: result: $with_tic_depends" >&5 echo "${ECHO_T}$with_tic_depends" >&6 else with_tic_depends=no fi -### use option --disable-wattr-macros to suppress wattr* macros from curses.h -echo "$as_me:13447: checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition" >&5 -echo $ECHO_N "checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition... $ECHO_C" >&6 +### use option --enable-wattr-macros to enable wattr* macros in curses.h +echo "$as_me:14409: checking if you want to enable wattr* macros" >&5 +echo $ECHO_N "checking if you want to enable wattr* macros... $ECHO_C" >&6 # Check whether --enable-wattr-macros or --disable-wattr-macros was given. if test "${enable_wattr_macros+set}" = set; then enableval="$enable_wattr_macros" with_wattr_macros=$enableval else - with_wattr_macros=yes + with_wattr_macros=no fi; if [ "x$with_wattr_macros" != xyes ]; then NCURSES_WATTR_MACROS=0 - echo "$as_me:13459: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + echo "$as_me:14421: result: no" >&5 +echo "${ECHO_T}no" >&6 else NCURSES_WATTR_MACROS=1 - echo "$as_me:13463: result: no" >&5 -echo "${ECHO_T}no" >&6 + echo "$as_me:14425: result: yes" >&5 +echo "${ECHO_T}yes" >&6 fi -echo "$as_me:13467: checking for X11 rgb file" >&5 +echo "$as_me:14429: checking for X11 rgb file" >&5 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6 # Check whether --with-x11-rgb or --without-x11-rgb was given. @@ -13528,7 +14490,7 @@ case ".$cf_path" in cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%` ;; (*) - { { echo "$as_me:13531: error: expected a pathname, not \"$cf_path\"" >&5 + { { echo "$as_me:14493: error: expected a pathname, not \"$cf_path\"" >&5 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;} { (exit 1); exit 1; }; } ;; @@ -13536,7 +14498,7 @@ esac fi -echo "$as_me:13539: result: $RGB_PATH" >&5 +echo "$as_me:14501: result: $RGB_PATH" >&5 echo "${ECHO_T}$RGB_PATH" >&6 cat >>confdefs.h <<EOF @@ -13550,7 +14512,8 @@ then fi ### use option --with-bool to override bool's type -echo "$as_me:13553: checking for type of bool" >&5 + +echo "$as_me:14516: checking for type of bool" >&5 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6 # Check whether --with-bool or --without-bool was given. @@ -13560,10 +14523,17 @@ if test "${with_bool+set}" = set; then else NCURSES_BOOL=auto fi; -echo "$as_me:13563: result: $NCURSES_BOOL" >&5 +echo "$as_me:14526: result: $NCURSES_BOOL" >&5 echo "${ECHO_T}$NCURSES_BOOL" >&6 +case x$NCURSES_BOOL in +(x|xyes|xno) + { { echo "$as_me:14530: error: expected a type name for bool" >&5 +echo "$as_me: error: expected a type name for bool" >&2;} + { (exit 1); exit 1; }; } + ;; +esac -echo "$as_me:13566: checking for alternate terminal capabilities file" >&5 +echo "$as_me:14536: checking for alternate terminal capabilities file" >&5 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6 # Check whether --with-caps or --without-caps was given. @@ -13573,258 +14543,102 @@ if test "${with_caps+set}" = set; then else TERMINFO_CAPS=Caps fi; -test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps -echo "$as_me:13577: result: $TERMINFO_CAPS" >&5 -echo "${ECHO_T}$TERMINFO_CAPS" >&6 - -### use option --with-chtype to override chtype's type -echo "$as_me:13581: checking for type of chtype" >&5 -echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6 - -# Check whether --with-chtype or --without-chtype was given. -if test "${with_chtype+set}" = set; then - withval="$with_chtype" - NCURSES_CHTYPE="$withval" -else - NCURSES_CHTYPE=$cf_dft_chtype -fi; -echo "$as_me:13591: result: $NCURSES_CHTYPE" >&5 -echo "${ECHO_T}$NCURSES_CHTYPE" >&6 - -### use option --with-ospeed to override ospeed's type -echo "$as_me:13595: checking for type of ospeed" >&5 -echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6 - -# Check whether --with-ospeed or --without-ospeed was given. -if test "${with_ospeed+set}" = set; then - withval="$with_ospeed" - NCURSES_OSPEED="$withval" -else - NCURSES_OSPEED=short -fi; -echo "$as_me:13605: result: $NCURSES_OSPEED" >&5 -echo "${ECHO_T}$NCURSES_OSPEED" >&6 - -### use option --with-mmask-t to override mmask_t's type -echo "$as_me:13609: checking for type of mmask_t" >&5 -echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6 - -# Check whether --with-mmask-t or --without-mmask-t was given. -if test "${with_mmask_t+set}" = set; then - withval="$with_mmask_t" - NCURSES_MMASK_T="$withval" -else - NCURSES_MMASK_T=$cf_dft_mmask_t -fi; -echo "$as_me:13619: result: $NCURSES_MMASK_T" >&5 -echo "${ECHO_T}$NCURSES_MMASK_T" >&6 - -### use option --with-ccharw-max to override CCHARW_MAX size -echo "$as_me:13623: checking for size CCHARW_MAX" >&5 -echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6 - -# Check whether --with-ccharw-max or --without-ccharw-max was given. -if test "${with_ccharw_max+set}" = set; then - withval="$with_ccharw_max" - NCURSES_CCHARW_MAX="$withval" -else - NCURSES_CCHARW_MAX=5 -fi; -echo "$as_me:13633: result: $NCURSES_CCHARW_MAX" >&5 -echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6 - -echo "$as_me:13636: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 -if test "${ac_cv_header_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >"conftest.$ac_ext" <<_ACEOF -#line 13642 "configure" -#include "confdefs.h" -#include <stdlib.h> -#include <stdarg.h> -#include <string.h> -#include <float.h> - -_ACEOF -if { (eval echo "$as_me:13650: \"$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:13656: \$? = $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 - ac_cv_header_stdc=yes -else - echo "$as_me: failed program was:" >&5 - cat "conftest.$ac_ext" >&5 - ac_cv_header_stdc=no -fi -rm -f conftest.err "conftest.$ac_ext" - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat >"conftest.$ac_ext" <<_ACEOF -#line 13678 "configure" -#include "confdefs.h" -#include <string.h> - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -rf conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat >"conftest.$ac_ext" <<_ACEOF -#line 13696 "configure" -#include "confdefs.h" -#include <stdlib.h> - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -rf conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then - : -else - cat >"conftest.$ac_ext" <<_ACEOF -#line 13717 "configure" -#include "confdefs.h" -#include <ctype.h> -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main (void) -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - $ac_main_return(2); - $ac_main_return (0); -} -_ACEOF -rm -f "conftest$ac_exeext" -if { (eval echo "$as_me:13743: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:13746: \$? = $ac_status" >&5 - (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"' - { (eval echo "$as_me:13748: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:13751: \$? = $ac_status" >&5 - (exit "$ac_status"); }; }; then - : -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -cat "conftest.$ac_ext" >&5 -ac_cv_header_stdc=no -fi -rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext" -fi -fi +if test ! -f "${srcdir}/include/${TERMINFO_CAPS}" +then + { echo "$as_me:14548: WARNING: file not found: \"${srcdir}/include/${TERMINFO_CAPS}\"" >&5 +echo "$as_me: WARNING: file not found: \"${srcdir}/include/${TERMINFO_CAPS}\"" >&2;} + TERMINFO_CAPS=Caps fi -echo "$as_me:13764: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6 -if test $ac_cv_header_stdc = yes; then +echo "$as_me:14552: result: $TERMINFO_CAPS" >&5 +echo "${ECHO_T}$TERMINFO_CAPS" >&6 -cat >>confdefs.h <<\EOF -#define STDC_HEADERS 1 -EOF +### use option --with-chtype to override chtype's type -fi +echo "$as_me:14557: checking for type of chtype" >&5 +echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6 -# On IRIX 5.3, sys/types and inttypes.h are conflicting. +# Check whether --with-chtype or --without-chtype was given. +if test "${with_chtype+set}" = set; then + withval="$with_chtype" + NCURSES_CHTYPE="$withval" +else + NCURSES_CHTYPE=$cf_dft_chtype +fi; +echo "$as_me:14567: result: $NCURSES_CHTYPE" >&5 +echo "${ECHO_T}$NCURSES_CHTYPE" >&6 +case x$NCURSES_CHTYPE in +(x|xyes|xno) + { { echo "$as_me:14571: error: expected a type name for chtype" >&5 +echo "$as_me: error: expected a type name for chtype" >&2;} + { (exit 1); exit 1; }; } + ;; +esac -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:13780: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +### use option --with-ospeed to override ospeed's type + +echo "$as_me:14579: checking for type of ospeed" >&5 +echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6 + +# Check whether --with-ospeed or --without-ospeed was given. +if test "${with_ospeed+set}" = set; then + withval="$with_ospeed" + NCURSES_OSPEED="$withval" else - cat >"conftest.$ac_ext" <<_ACEOF -#line 13786 "configure" -#include "confdefs.h" -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:13792: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:13795: \$? = $ac_status" >&5 - (exit "$ac_status"); } && - { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:13798: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:13801: \$? = $ac_status" >&5 - (exit "$ac_status"); }; }; then - eval "$as_ac_Header=yes" + NCURSES_OSPEED=short +fi; +echo "$as_me:14589: result: $NCURSES_OSPEED" >&5 +echo "${ECHO_T}$NCURSES_OSPEED" >&6 +case x$NCURSES_OSPEED in +(x|xyes|xno) + { { echo "$as_me:14593: error: expected a type name for ospeed" >&5 +echo "$as_me: error: expected a type name for ospeed" >&2;} + { (exit 1); exit 1; }; } + ;; +esac + +### use option --with-mmask-t to override mmask_t's type + +echo "$as_me:14601: checking for type of mmask-t" >&5 +echo $ECHO_N "checking for type of mmask-t... $ECHO_C" >&6 + +# Check whether --with-mmask-t or --without-mmask-t was given. +if test "${with_mmask_t+set}" = set; then + withval="$with_mmask_t" + NCURSES_MMASK_T="$withval" else - echo "$as_me: failed program was:" >&5 -cat "conftest.$ac_ext" >&5 -eval "$as_ac_Header=no" -fi -rm -f "conftest.$ac_objext" "conftest.$ac_ext" -fi -echo "$as_me:13811: result: `eval echo '${'"$as_ac_Header"'}'`" >&5 -echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6 -if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then - cat >>confdefs.h <<EOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -EOF + NCURSES_MMASK_T=$cf_dft_mmask_t +fi; +echo "$as_me:14611: result: $NCURSES_MMASK_T" >&5 +echo "${ECHO_T}$NCURSES_MMASK_T" >&6 +case x$NCURSES_MMASK_T in +(x|xyes|xno) + { { echo "$as_me:14615: error: expected a type name for mmask-t" >&5 +echo "$as_me: error: expected a type name for mmask-t" >&2;} + { (exit 1); exit 1; }; } + ;; +esac -fi -done +### use option --with-ccharw-max to override CCHARW_MAX size +echo "$as_me:14622: checking for size CCHARW_MAX" >&5 +echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6 + +# Check whether --with-ccharw-max or --without-ccharw-max was given. +if test "${with_ccharw_max+set}" = set; then + withval="$with_ccharw_max" + NCURSES_CCHARW_MAX="$withval" +else + NCURSES_CCHARW_MAX=$cf_dft_ccharw_max +fi; +echo "$as_me:14632: result: $NCURSES_CCHARW_MAX" >&5 +echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6 -echo "$as_me:13821: checking for signed char" >&5 +echo "$as_me:14635: checking for signed char" >&5 echo $ECHO_N "checking for signed char... $ECHO_C" >&6 if test "${ac_cv_type_signed_char+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 13827 "configure" +#line 14641 "configure" #include "confdefs.h" $ac_includes_default int @@ -13839,16 +14653,16 @@ if (sizeof (signed char)) } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:13842: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:14656: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:13845: \$? = $ac_status" >&5 + echo "$as_me:14659: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:13848: \"$ac_try\"") >&5 + { (eval echo "$as_me:14662: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:13851: \$? = $ac_status" >&5 + echo "$as_me:14665: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_type_signed_char=yes else @@ -13858,10 +14672,10 @@ ac_cv_type_signed_char=no fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:13861: result: $ac_cv_type_signed_char" >&5 +echo "$as_me:14675: result: $ac_cv_type_signed_char" >&5 echo "${ECHO_T}$ac_cv_type_signed_char" >&6 -echo "$as_me:13864: checking size of signed char" >&5 +echo "$as_me:14678: checking size of signed char" >&5 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6 if test "${ac_cv_sizeof_signed_char+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -13870,7 +14684,7 @@ else if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >"conftest.$ac_ext" <<_ACEOF -#line 13873 "configure" +#line 14687 "configure" #include "confdefs.h" $ac_includes_default int @@ -13882,21 +14696,21 @@ int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)] } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:13885: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:14699: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:13888: \$? = $ac_status" >&5 + echo "$as_me:14702: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:13891: \"$ac_try\"") >&5 + { (eval echo "$as_me:14705: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:13894: \$? = $ac_status" >&5 + echo "$as_me:14708: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_lo=0 ac_mid=0 while :; do cat >"conftest.$ac_ext" <<_ACEOF -#line 13899 "configure" +#line 14713 "configure" #include "confdefs.h" $ac_includes_default int @@ -13908,16 +14722,16 @@ int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)] } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:13911: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:14725: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:13914: \$? = $ac_status" >&5 + echo "$as_me:14728: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:13917: \"$ac_try\"") >&5 + { (eval echo "$as_me:14731: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:13920: \$? = $ac_status" >&5 + echo "$as_me:14734: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_hi=$ac_mid; break else @@ -13933,7 +14747,7 @@ cat "conftest.$ac_ext" >&5 ac_hi=-1 ac_mid=-1 while :; do cat >"conftest.$ac_ext" <<_ACEOF -#line 13936 "configure" +#line 14750 "configure" #include "confdefs.h" $ac_includes_default int @@ -13945,16 +14759,16 @@ int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)] } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:13948: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:14762: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:13951: \$? = $ac_status" >&5 + echo "$as_me:14765: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:13954: \"$ac_try\"") >&5 + { (eval echo "$as_me:14768: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:13957: \$? = $ac_status" >&5 + echo "$as_me:14771: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_lo=$ac_mid; break else @@ -13970,7 +14784,7 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"` cat >"conftest.$ac_ext" <<_ACEOF -#line 13973 "configure" +#line 14787 "configure" #include "confdefs.h" $ac_includes_default int @@ -13982,16 +14796,16 @@ int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)] } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:13985: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:14799: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:13988: \$? = $ac_status" >&5 + echo "$as_me:14802: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:13991: \"$ac_try\"") >&5 + { (eval echo "$as_me:14805: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:13994: \$? = $ac_status" >&5 + echo "$as_me:14808: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_hi=$ac_mid else @@ -14004,12 +14818,12 @@ done ac_cv_sizeof_signed_char=$ac_lo else if test "$cross_compiling" = yes; then - { { echo "$as_me:14007: error: cannot run test program while cross compiling" >&5 + { { echo "$as_me:14821: error: cannot run test program while cross compiling" >&5 echo "$as_me: error: cannot run test program while cross compiling" >&2;} { (exit 1); exit 1; }; } else cat >"conftest.$ac_ext" <<_ACEOF -#line 14012 "configure" +#line 14826 "configure" #include "confdefs.h" $ac_includes_default int @@ -14018,22 +14832,22 @@ main (void) FILE *f = fopen ("conftest.val", "w"); if (!f) $ac_main_return (1); -fprintf (f, "%d", (sizeof (signed char))); +fprintf (f, "%ld", (long)(sizeof (signed char))); fclose (f); ; return 0; } _ACEOF rm -f "conftest$ac_exeext" -if { (eval echo "$as_me:14028: \"$ac_link\"") >&5 +if { (eval echo "$as_me:14842: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:14031: \$? = $ac_status" >&5 + echo "$as_me:14845: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"' - { (eval echo "$as_me:14033: \"$ac_try\"") >&5 + { (eval echo "$as_me:14847: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:14036: \$? = $ac_status" >&5 + echo "$as_me:14850: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_sizeof_signed_char=`cat conftest.val` else @@ -14049,7 +14863,7 @@ else ac_cv_sizeof_signed_char=0 fi fi -echo "$as_me:14052: result: $ac_cv_sizeof_signed_char" >&5 +echo "$as_me:14866: result: $ac_cv_sizeof_signed_char" >&5 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6 cat >>confdefs.h <<EOF #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char @@ -14060,23 +14874,24 @@ if test "$ac_cv_sizeof_signed_char" = 1 ; then else NCURSES_SBOOL="char" fi -echo "$as_me:14063: checking if you want to use signed Boolean array in term.h" >&5 -echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6 +echo "$as_me:14877: checking whether to use signed chars for Boolean array in term.h" >&5 +echo $ECHO_N "checking whether to use signed chars for Boolean array in term.h... $ECHO_C" >&6 # Check whether --enable-signed-char or --disable-signed-char was given. if test "${enable_signed_char+set}" = set; then enableval="$enable_signed_char" with_signed_char=$enableval else - with_signed_char=no + with_signed_char=$cf_dft_signed_char fi; -echo "$as_me:14073: result: $with_signed_char" >&5 +echo "$as_me:14887: result: $with_signed_char" >&5 echo "${ECHO_T}$with_signed_char" >&6 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char" ### use option --with-tparm-arg to override tparm's argument type -echo "$as_me:14078: checking for type of tparm args" >&5 -echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6 + +echo "$as_me:14893: checking for type of tparm-arg" >&5 +echo $ECHO_N "checking for type of tparm-arg... $ECHO_C" >&6 # Check whether --with-tparm-arg or --without-tparm-arg was given. if test "${with_tparm_arg+set}" = set; then @@ -14085,11 +14900,18 @@ if test "${with_tparm_arg+set}" = set; then else NCURSES_TPARM_ARG=$cf_dft_tparm_arg fi; -echo "$as_me:14088: result: $NCURSES_TPARM_ARG" >&5 +echo "$as_me:14903: result: $NCURSES_TPARM_ARG" >&5 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6 +case x$NCURSES_TPARM_ARG in +(x|xyes|xno) + { { echo "$as_me:14907: error: expected a type name for tparm-arg" >&5 +echo "$as_me: error: expected a type name for tparm-arg" >&2;} + { (exit 1); exit 1; }; } + ;; +esac ### Enable compiling-in rcs id's -echo "$as_me:14092: checking if RCS identifiers should be compiled-in" >&5 +echo "$as_me:14914: checking if RCS identifiers should be compiled-in" >&5 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6 # Check whether --with-rcs-ids or --without-rcs-ids was given. @@ -14099,7 +14921,7 @@ if test "${with_rcs_ids+set}" = set; then else with_rcs_ids=no fi; -echo "$as_me:14102: result: $with_rcs_ids" >&5 +echo "$as_me:14924: result: $with_rcs_ids" >&5 echo "${ECHO_T}$with_rcs_ids" >&6 test "x$with_rcs_ids" = xyes && cat >>confdefs.h <<\EOF @@ -14108,7 +14930,7 @@ EOF ############################################################################### -echo "$as_me:14111: checking format of man-pages" >&5 +echo "$as_me:14933: checking format of man-pages" >&5 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6 # Check whether --with-manpage-format or --without-manpage-format was given. @@ -14130,7 +14952,7 @@ case "$MANPAGE_FORMAT" in MANPATH="/usr/man:/usr/share/man" fi - # look for the 'date' man-page (it's most likely to be installed!) + # look for the 'date' man-page (it is most likely to be installed!) MANPAGE_FORMAT= cf_preform="no" cf_catonly="yes" @@ -14145,10 +14967,12 @@ case "$MANPAGE_FORMAT" in if test "x$cf_test" = "x$cf_name" ; then case "$cf_name" in - (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";; - (*.Z) MANPAGE_FORMAT="$MANPAGE_FORMAT compress";; - (*.0) MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";; - (*) MANPAGE_FORMAT="$MANPAGE_FORMAT normal";; + (*.bz2) MANPAGE_FORMAT="$MANPAGE_FORMAT bzip2";; + (*.xz) MANPAGE_FORMAT="$MANPAGE_FORMAT xz";; + (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";; + (*.Z) MANPAGE_FORMAT="$MANPAGE_FORMAT compress";; + (*.0) MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";; + (*) MANPAGE_FORMAT="$MANPAGE_FORMAT normal";; esac case "$cf_name" in @@ -14187,7 +15011,7 @@ case "$MANPAGE_FORMAT" in (*) for cf_option in $MANPAGE_FORMAT; do case "$cf_option" in - (gzip|compress|BSDI|normal|formatted|catonly) + (xz|bzip2|gzip|compress|BSDI|normal|formatted|catonly) ;; (*) cf_unknown="$cf_unknown $cf_option" @@ -14197,14 +15021,51 @@ case "$MANPAGE_FORMAT" in ;; esac -echo "$as_me:14200: result: $MANPAGE_FORMAT" >&5 +echo "$as_me:15024: result: $MANPAGE_FORMAT" >&5 echo "${ECHO_T}$MANPAGE_FORMAT" >&6 if test -n "$cf_unknown" ; then - { echo "$as_me:14203: WARNING: Unexpected manpage-format $cf_unknown" >&5 + { echo "$as_me:15027: WARNING: Unexpected manpage-format $cf_unknown" >&5 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;} fi -echo "$as_me:14207: checking for manpage renaming" >&5 +cf_manpage_format=no +cf_manpage_inboth=no +cf_manpage_so_strip= +cf_manpage_compress= +cf_manpage_coptions= + +for cf_item in $MANPAGE_FORMAT +do +case "$cf_item" in +(catonly) + cf_manpage_format=yes + cf_manpage_inboth=no + ;; +(formatted) + cf_manpage_format=yes + cf_manpage_inboth=yes + ;; +(compress) + cf_manpage_so_strip="Z" + cf_manpage_compress=compress + ;; +(gzip) + cf_manpage_so_strip="gz" + cf_manpage_compress=gzip + cf_manpage_coptions=-n + ;; +(bzip2) + cf_manpage_so_strip="bz2" + cf_manpage_compress=bzip2 + ;; +(xz) + cf_manpage_so_strip="xz" + cf_manpage_compress=xz + ;; +esac +done + +echo "$as_me:15068: checking for manpage renaming" >&5 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6 # Check whether --with-manpage-renames or --without-manpage-renames was given. @@ -14221,35 +15082,27 @@ case ".$MANPAGE_RENAMES" in (.|.yes) # Debian 'man' program? if test -f /etc/debian_version ; then - MANPAGE_RENAMES=`cd "$srcdir" && pwd`/man/man_db.renames + MANPAGE_RENAMES=man/man_db.renames else MANPAGE_RENAMES=no fi ;; esac -if test "$MANPAGE_RENAMES" != no ; then - if test -f "$srcdir/man/$MANPAGE_RENAMES" ; then - MANPAGE_RENAMES=`cd "$srcdir/man" && pwd`/$MANPAGE_RENAMES - elif test ! -f "$MANPAGE_RENAMES" ; then - { { echo "$as_me:14235: error: not a filename: $MANPAGE_RENAMES" >&5 +if test "$MANPAGE_RENAMES" = man/man_db.renames ; then + MANPAGE_RENAMES=`pwd`/$MANPAGE_RENAMES +elif test "$MANPAGE_RENAMES" = no ; then + : +elif test ! -f "$MANPAGE_RENAMES" ; then + { { echo "$as_me:15097: error: not a filename: $MANPAGE_RENAMES" >&5 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;} { (exit 1); exit 1; }; } - fi - - test ! -d man && mkdir man - - # Construct a sed-script to perform renaming within man-pages - if test -n "$MANPAGE_RENAMES" ; then - test ! -d man && mkdir man - $SHELL "$srcdir/man/make_sed.sh" "$MANPAGE_RENAMES" >./edit_man.sed - fi fi -echo "$as_me:14249: result: $MANPAGE_RENAMES" >&5 +echo "$as_me:15102: result: $MANPAGE_RENAMES" >&5 echo "${ECHO_T}$MANPAGE_RENAMES" >&6 -echo "$as_me:14252: checking if manpage aliases will be installed" >&5 +echo "$as_me:15105: checking if manpage aliases will be installed" >&5 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6 # Check whether --with-manpage-aliases or --without-manpage-aliases was given. @@ -14260,7 +15113,7 @@ else MANPAGE_ALIASES=yes fi; -echo "$as_me:14263: result: $MANPAGE_ALIASES" >&5 +echo "$as_me:15116: result: $MANPAGE_ALIASES" >&5 echo "${ECHO_T}$MANPAGE_ALIASES" >&6 case "x$LN_S" in @@ -14274,7 +15127,7 @@ esac MANPAGE_SYMLINKS=no if test "$MANPAGE_ALIASES" = yes ; then -echo "$as_me:14277: checking if manpage symlinks should be used" >&5 +echo "$as_me:15130: checking if manpage symlinks should be used" >&5 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given. @@ -14285,19 +15138,19 @@ else MANPAGE_SYMLINKS=$cf_use_symlinks fi; -if test "$$cf_use_symlinks" = no; then +if test "$cf_use_symlinks" = no; then if test "$MANPAGE_SYMLINKS" = yes ; then - { echo "$as_me:14290: WARNING: cannot make symlinks" >&5 + { echo "$as_me:15143: WARNING: cannot make symlinks" >&5 echo "$as_me: WARNING: cannot make symlinks" >&2;} MANPAGE_SYMLINKS=no fi fi -echo "$as_me:14296: result: $MANPAGE_SYMLINKS" >&5 +echo "$as_me:15149: result: $MANPAGE_SYMLINKS" >&5 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6 fi -echo "$as_me:14300: checking for manpage tbl" >&5 +echo "$as_me:15153: checking for manpage tbl" >&5 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6 # Check whether --with-manpage-tbl or --without-manpage-tbl was given. @@ -14308,7 +15161,7 @@ else MANPAGE_TBL=no fi; -echo "$as_me:14311: result: $MANPAGE_TBL" >&5 +echo "$as_me:15164: result: $MANPAGE_TBL" >&5 echo "${ECHO_T}$MANPAGE_TBL" >&6 if test "$prefix" = "NONE" ; then @@ -14317,36 +15170,8 @@ else cf_prefix="$prefix" fi -case "$MANPAGE_FORMAT" in -(*catonly*) - cf_format=yes - cf_inboth=no - ;; -(*formatted*) - cf_format=yes - cf_inboth=yes - ;; -(*) - cf_format=no - cf_inboth=no - ;; -esac - test ! -d man && mkdir man -cf_so_strip= -cf_compress= -case "$MANPAGE_FORMAT" in -(*compress*) - cf_so_strip="Z" - cf_compress=compress - ;; -(*gzip*) - cf_so_strip="gz" - cf_compress=gzip - ;; -esac - cf_edit_man=./edit_man.sh cf_man_alias=`pwd`/man_alias.sed @@ -14364,6 +15189,7 @@ NCURSES_PATCH="$NCURSES_PATCH" NCURSES_OSPEED="$NCURSES_OSPEED" TERMINFO="$TERMINFO" +TERMINFO_DIRS="$TERMINFO_DIRS" INSTALL="$INSTALL" INSTALL_DATA="$INSTALL_DATA" @@ -14371,7 +15197,8 @@ INSTALL_DATA="$INSTALL_DATA" transform="$program_transform_name" TMP=\${TMPDIR:=/tmp}/man\$\$ -trap "rm -f \$TMP" 0 1 2 3 15 +trap "rm -f \$TMP; exit 1" 1 2 3 15 +trap "rm -f \$TMP" 0 form=\$1 shift || exit 1 @@ -14387,8 +15214,8 @@ top_srcdir=\$srcdir/.. shift || exit 1 if test "\$form" = normal ; then - if test "$cf_format" = yes ; then - if test "$cf_inboth" = no ; then + if test "$cf_manpage_format" = yes ; then + if test "$cf_manpage_inboth" = no ; then $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@" exit $? fi @@ -14440,9 +15267,9 @@ CF_EOF2 aliases= cf_source=\`basename "\$i"\` - inalias=\$cf_source - test ! -f "\$inalias" && inalias="\$srcdir/\$inalias" - if test ! -f "\$inalias" ; then + cf_full_alias=\$cf_source + test ! -f "\$cf_full_alias" && cf_full_alias="\$srcdir/\$cf_full_alias" + if test ! -f "\$cf_full_alias" ; then echo ".. skipped \$cf_source" continue fi @@ -14451,8 +15278,9 @@ CF_EOF if test "$MANPAGE_ALIASES" != no ; then cat >>$cf_edit_man <<CF_EOF nCurses=ignore.3x + cf_part_alias=\`echo \$cf_full_alias| sed -e 's,^.*/,,'\` test "$with_curses_h" = yes && nCurses=ncurses.3x - aliases=\`sed -f "\$top_srcdir/man/manlinks.sed" "\$inalias" |sed -f "$cf_man_alias" | sort -u; test "\$inalias" = "\$nCurses" && echo curses\` + aliases=\`sed -f "\$top_srcdir/man/manlinks.sed" "\$cf_full_alias" |sed -f "$cf_man_alias" | sort -u; test "\$cf_part_alias" = "\$nCurses" && echo curses\` CF_EOF fi @@ -14481,7 +15309,7 @@ cat >>$cf_edit_man <<CF_EOF sed -f "$cf_man_alias" \\ CF_EOF -if test -f "$MANPAGE_RENAMES" ; then +if test "$MANPAGE_RENAMES" != no ; then cat >>$cf_edit_man <<CF_EOF < "\$i" | sed -f `pwd`/edit_man.sed >\$TMP CF_EOF @@ -14519,15 +15347,15 @@ cat >>$cf_edit_man <<CF_EOF fi CF_EOF -if test -n "$cf_compress" ; then +if test -n "$cf_manpage_compress" ; then cat >>$cf_edit_man <<CF_EOF if test "\$verb" = installing ; then - if ( "$cf_compress" -f \$TMP ) + if ( "$cf_manpage_compress" -f \$TMP ) then - mv \$TMP.$cf_so_strip \$TMP + mv \$TMP.$cf_manpage_so_strip \$TMP fi fi - cf_target="\$cf_target.$cf_so_strip" + cf_target="\$cf_target.$cf_manpage_so_strip" CF_EOF fi @@ -14544,6 +15372,14 @@ esac cat >>$cf_edit_man <<CF_EOF suffix=\`basename "\$cf_target" | sed -e 's%^[^.]*%%'\` + extra_suffix= + if test -n "$EXTRA_SUFFIX" ; then + case \$cf_target in + (*${EXTRA_SUFFIX}\$suffix) + extra_suffix="$EXTRA_SUFFIX" + ;; + esac + fi if test "\$verb" = installing ; then echo "\$verb \$cf_target" \$INSTALL_DATA \$TMP "\$cf_target" @@ -14551,13 +15387,14 @@ cat >>$cf_edit_man <<CF_EOF test -n "\$aliases" && ( cd "\$cf_subdir\${section}" && ( cf_source=\`echo "\$cf_target" |sed -e 's%^.*/\\([^/][^/]*/[^/][^/]*$\\)%\\1%'\` - test -n "$cf_so_strip" && cf_source=\`echo "\$cf_source" |sed -e 's%\\.$cf_so_strip\$%%'\` + test -n "$cf_manpage_so_strip" && cf_source=\`echo "\$cf_source" |sed -e 's%\\.$cf_manpage_so_strip\$%%'\` cf_target=\`basename "\$cf_target"\` for cf_alias in \$aliases do if test "\$section" = 1 ; then cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\` fi + cf_alias="\${cf_alias}\${extra_suffix}" if test "$MANPAGE_SYMLINKS" = yes ; then if test -f "\$cf_alias\${suffix}" ; then @@ -14585,11 +15422,11 @@ cat >>$cf_edit_man <<CF_EOF elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then echo ".so \$cf_source" >\$TMP CF_EOF -if test -n "$cf_compress" ; then +if test -n "$cf_manpage_compress" ; then cat >>$cf_edit_man <<CF_EOF - if test -n "$cf_so_strip" ; then - "$cf_compress" -f \$TMP - mv \$TMP.$cf_so_strip \$TMP + if test -n "$cf_manpage_so_strip" ; then + "$cf_manpage_compress" $cf_manpage_coptions -f \$TMP + mv \$TMP.$cf_manpage_so_strip \$TMP fi CF_EOF fi @@ -14614,6 +15451,7 @@ cat >>$cf_edit_man <<CF_EOF if test "\$section" = 1 ; then cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\` fi + cf_alias="\${cf_alias}\${extra_suffix}" echo ".. \$verb alias \$cf_alias\${suffix}" rm -f "\$cf_alias\${suffix}" @@ -14628,7 +15466,7 @@ cat >>$cf_edit_man <<CF_EOF esac done -if test "$cf_inboth" = yes ; then +if test "$cf_manpage_inboth" = yes ; then if test "\$form" != format ; then $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@" fi @@ -14641,7 +15479,7 @@ chmod 755 "$cf_edit_man" ############################################################################### ### Note that some functions (such as const) are normally disabled anyway. -echo "$as_me:14644: checking if you want to build with function extensions" >&5 +echo "$as_me:15482: checking if you want to build with function extensions" >&5 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6 # Check whether --enable-ext-funcs or --disable-ext-funcs was given. @@ -14651,7 +15489,7 @@ if test "${enable_ext_funcs+set}" = set; then else with_ext_funcs=yes fi; -echo "$as_me:14654: result: $with_ext_funcs" >&5 +echo "$as_me:15492: result: $with_ext_funcs" >&5 echo "${ECHO_T}$with_ext_funcs" >&6 if test "x$with_ext_funcs" = xyes ; then NCURSES_EXT_FUNCS=1 @@ -14688,10 +15526,6 @@ cat >>confdefs.h <<\EOF #define HAVE_USE_DEFAULT_COLORS 1 EOF -cat >>confdefs.h <<\EOF -#define HAVE_USE_EXTENDED_NAMES 1 -EOF - cat >>confdefs.h <<\EOF #define HAVE_USE_SCREEN 1 EOF @@ -14711,7 +15545,7 @@ else GENERATED_EXT_FUNCS= fi -echo "$as_me:14714: checking if you want to build with SCREEN extensions" >&5 +echo "$as_me:15548: checking if you want to build with SCREEN extensions" >&5 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6 # Check whether --enable-sp-funcs or --disable-sp-funcs was given. @@ -14721,7 +15555,7 @@ if test "${enable_sp_funcs+set}" = set; then else with_sp_funcs=$cf_dft_ext_spfuncs fi; -echo "$as_me:14724: result: $with_sp_funcs" >&5 +echo "$as_me:15558: result: $with_sp_funcs" >&5 echo "${ECHO_T}$with_sp_funcs" >&6 if test "x$with_sp_funcs" = xyes ; then NCURSES_SP_FUNCS=1 @@ -14740,7 +15574,7 @@ else GENERATED_SP_FUNCS= fi -echo "$as_me:14743: checking if you want to build with terminal-driver" >&5 +echo "$as_me:15577: checking if you want to build with terminal-driver" >&5 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6 # Check whether --enable-term-driver or --disable-term-driver was given. @@ -14750,7 +15584,7 @@ if test "${enable_term_driver+set}" = set; then else with_term_driver=no fi; -echo "$as_me:14753: result: $with_term_driver" >&5 +echo "$as_me:15587: result: $with_term_driver" >&5 echo "${ECHO_T}$with_term_driver" >&6 if test "x$with_term_driver" = xyes ; then @@ -14759,19 +15593,19 @@ cat >>confdefs.h <<\EOF EOF if test "x$with_termlib" != xno ; then - { { echo "$as_me:14762: error: The term-driver option conflicts with the termlib option" >&5 + { { echo "$as_me:15596: error: The term-driver option conflicts with the termlib option" >&5 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;} { (exit 1); exit 1; }; } fi if test "x$with_sp_funcs" != xyes ; then - { { echo "$as_me:14767: error: The term-driver option relies upon sp-funcs" >&5 + { { echo "$as_me:15601: error: The term-driver option relies upon sp-funcs" >&5 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;} { (exit 1); exit 1; }; } fi fi ### use option --enable-const to turn on use of const beyond that in XSI. -echo "$as_me:14774: checking for extended use of const keyword" >&5 +echo "$as_me:15608: checking for extended use of const keyword" >&5 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6 # Check whether --enable-const or --disable-const was given. @@ -14781,7 +15615,7 @@ if test "${enable_const+set}" = set; then else with_ext_const=$cf_dft_ext_const fi; -echo "$as_me:14784: result: $with_ext_const" >&5 +echo "$as_me:15618: result: $with_ext_const" >&5 echo "${ECHO_T}$with_ext_const" >&6 NCURSES_CONST='/*nothing*/' if test "x$with_ext_const" = xyes ; then @@ -14789,7 +15623,7 @@ if test "x$with_ext_const" = xyes ; then fi ### use option --enable-ext-colors to turn on use of colors beyond 16. -echo "$as_me:14792: checking if you want to use extended colors" >&5 +echo "$as_me:15626: checking if you want to use extended colors" >&5 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6 # Check whether --enable-ext-colors or --disable-ext-colors was given. @@ -14799,12 +15633,12 @@ if test "${enable_ext_colors+set}" = set; then else with_ext_colors=$cf_dft_ext_colors fi; -echo "$as_me:14802: result: $with_ext_colors" >&5 +echo "$as_me:15636: result: $with_ext_colors" >&5 echo "${ECHO_T}$with_ext_colors" >&6 NCURSES_EXT_COLORS=0 if test "x$with_ext_colors" = xyes ; then if test "x$with_widec" != xyes ; then - { echo "$as_me:14807: WARNING: This option applies only to wide-character library" >&5 + { echo "$as_me:15641: WARNING: This option applies only to wide-character library" >&5 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;} else # cannot be ABI 5 since it changes sizeof(cchar_t) @@ -14814,8 +15648,9 @@ if test "${with_abi_version+set}" != set; then (5.*) cf_cv_rel_version=6.0 cf_cv_abi_version=6 - { echo "$as_me:14817: WARNING: overriding ABI version to $cf_cv_abi_version" >&5 -echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;} + cf_cv_abi_default=6 + { echo "$as_me:15652: WARNING: overriding ABI version to $cf_cv_abi_default" >&5 +echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_default" >&2;} ;; esac fi @@ -14842,7 +15677,7 @@ EOF fi ### use option --enable-ext-mouse to modify coding to support 5-button mice -echo "$as_me:14845: checking if you want to use extended mouse encoding" >&5 +echo "$as_me:15680: checking if you want to use extended mouse encoding" >&5 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6 # Check whether --enable-ext-mouse or --disable-ext-mouse was given. @@ -14852,27 +15687,34 @@ if test "${enable_ext_mouse+set}" = set; then else with_ext_mouse=$cf_dft_ext_mouse fi; -echo "$as_me:14855: result: $with_ext_mouse" >&5 +echo "$as_me:15690: result: $with_ext_mouse" >&5 echo "${ECHO_T}$with_ext_mouse" >&6 -NCURSES_MOUSE_VERSION=1 if test "x$with_ext_mouse" = xyes ; then - NCURSES_MOUSE_VERSION=2 if test "${with_abi_version+set}" != set; then case "$cf_cv_rel_version" in (5.*) cf_cv_rel_version=6.0 cf_cv_abi_version=6 - { echo "$as_me:14866: WARNING: overriding ABI version to $cf_cv_abi_version" >&5 -echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;} + cf_cv_abi_default=6 + { echo "$as_me:15700: WARNING: overriding ABI version to $cf_cv_abi_default" >&5 +echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_default" >&2;} ;; esac fi fi +if test $cf_cv_abi_default -le 5 ; then + NCURSES_MOUSE_VERSION=1 +elif test $cf_cv_abi_default -le 6 ; then + NCURSES_MOUSE_VERSION=2 +else + NCURSES_MOUSE_VERSION=3 +fi + ### use option --enable-ext-putwin to turn on extended screendumps -echo "$as_me:14875: checking if you want to use extended putwin/screendump" >&5 +echo "$as_me:15717: checking if you want to use extended putwin/screendump" >&5 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6 # Check whether --enable-ext-putwin or --disable-ext-putwin was given. @@ -14882,7 +15724,7 @@ if test "${enable_ext_putwin+set}" = set; then else with_ext_putwin=$cf_dft_ext_putwin fi; -echo "$as_me:14885: result: $with_ext_putwin" >&5 +echo "$as_me:15727: result: $with_ext_putwin" >&5 echo "${ECHO_T}$with_ext_putwin" >&6 if test "x$with_ext_putwin" = xyes ; then @@ -14892,7 +15734,7 @@ EOF fi -echo "$as_me:14895: checking if you want \$NCURSES_NO_PADDING code" >&5 +echo "$as_me:15737: checking if you want \$NCURSES_NO_PADDING code" >&5 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6 # Check whether --enable-no-padding or --disable-no-padding was given. @@ -14902,7 +15744,7 @@ if test "${enable_no_padding+set}" = set; then else with_no_padding=$with_ext_funcs fi; -echo "$as_me:14905: result: $with_no_padding" >&5 +echo "$as_me:15747: result: $with_no_padding" >&5 echo "${ECHO_T}$with_no_padding" >&6 test "x$with_no_padding" = xyes && cat >>confdefs.h <<\EOF @@ -14910,7 +15752,7 @@ cat >>confdefs.h <<\EOF EOF ### use option --enable-sigwinch to turn on use of SIGWINCH logic -echo "$as_me:14913: checking if you want SIGWINCH handler" >&5 +echo "$as_me:15755: checking if you want SIGWINCH handler" >&5 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6 # Check whether --enable-sigwinch or --disable-sigwinch was given. @@ -14920,15 +15762,22 @@ if test "${enable_sigwinch+set}" = set; then else with_sigwinch=$with_ext_funcs fi; -echo "$as_me:14923: result: $with_sigwinch" >&5 +echo "$as_me:15765: result: $with_sigwinch" >&5 echo "${ECHO_T}$with_sigwinch" >&6 -test "x$with_sigwinch" = xyes && +if test "x$with_sigwinch" = xyes +then + cat >>confdefs.h <<\EOF #define USE_SIGWINCH 1 EOF + cf_cv_enable_sigwinch=1 +else + cf_cv_enable_sigwinch=0 +fi + ### use option --enable-tcap-names to allow user to define new capabilities -echo "$as_me:14931: checking if you want user-definable terminal capabilities like termcap" >&5 +echo "$as_me:15780: checking if you want user-definable terminal capabilities like termcap" >&5 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6 # Check whether --enable-tcap-names or --disable-tcap-names was given. @@ -14938,14 +15787,21 @@ if test "${enable_tcap_names+set}" = set; then else with_tcap_names=$with_ext_funcs fi; -echo "$as_me:14941: result: $with_tcap_names" >&5 +echo "$as_me:15790: result: $with_tcap_names" >&5 echo "${ECHO_T}$with_tcap_names" >&6 NCURSES_XNAMES=0 -test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1 +if test "x$with_tcap_names" = xyes; then + NCURSES_XNAMES=1 + +cat >>confdefs.h <<\EOF +#define NCURSES_XNAMES 1 +EOF + +fi ############################################################################## -echo "$as_me:14948: checking if you want to link with the pthread library" >&5 +echo "$as_me:15804: checking if you want to link with the pthread library" >&5 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6 # Check whether --with-pthread or --without-pthread was given. @@ -14955,27 +15811,27 @@ if test "${with_pthread+set}" = set; then else with_pthread=no fi; -echo "$as_me:14958: result: $with_pthread" >&5 +echo "$as_me:15814: result: $with_pthread" >&5 echo "${ECHO_T}$with_pthread" >&6 if test "$with_pthread" != no ; then - echo "$as_me:14962: checking for pthread.h" >&5 + echo "$as_me:15818: checking for pthread.h" >&5 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6 if test "${ac_cv_header_pthread_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 14968 "configure" +#line 15824 "configure" #include "confdefs.h" #include <pthread.h> _ACEOF -if { (eval echo "$as_me:14972: \"$ac_cpp "conftest.$ac_ext"\"") >&5 +if { (eval echo "$as_me:15828: \"$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:14978: \$? = $ac_status" >&5 + echo "$as_me:15834: \$? = $ac_status" >&5 (exit "$ac_status"); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -14994,7 +15850,7 @@ else fi rm -f conftest.err "conftest.$ac_ext" fi -echo "$as_me:14997: result: $ac_cv_header_pthread_h" >&5 +echo "$as_me:15853: result: $ac_cv_header_pthread_h" >&5 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6 if test "$ac_cv_header_pthread_h" = yes; then @@ -15004,7 +15860,7 @@ EOF for cf_lib_pthread in pthread c_r do - echo "$as_me:15007: checking if we can link with the $cf_lib_pthread library" >&5 + echo "$as_me:15863: checking if we can link with the $cf_lib_pthread library" >&5 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6 cf_save_LIBS="$LIBS" @@ -15025,7 +15881,7 @@ done LIBS="$cf_add_libs" cat >"conftest.$ac_ext" <<_ACEOF -#line 15028 "configure" +#line 15884 "configure" #include "confdefs.h" #include <pthread.h> @@ -15042,16 +15898,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:15045: \"$ac_link\"") >&5 +if { (eval echo "$as_me:15901: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:15048: \$? = $ac_status" >&5 + echo "$as_me:15904: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:15051: \"$ac_try\"") >&5 + { (eval echo "$as_me:15907: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:15054: \$? = $ac_status" >&5 + echo "$as_me:15910: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then with_pthread=yes else @@ -15061,7 +15917,7 @@ with_pthread=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS="$cf_save_LIBS" - echo "$as_me:15064: result: $with_pthread" >&5 + echo "$as_me:15920: result: $with_pthread" >&5 echo "${ECHO_T}$with_pthread" >&6 test "$with_pthread" = yes && break done @@ -15089,7 +15945,7 @@ cat >>confdefs.h <<\EOF EOF else - { { echo "$as_me:15092: error: Cannot link with pthread library" >&5 + { { echo "$as_me:15948: error: Cannot link with pthread library" >&5 echo "$as_me: error: Cannot link with pthread library" >&2;} { (exit 1); exit 1; }; } fi @@ -15099,13 +15955,13 @@ fi fi if test "x$with_pthread" != xno; then - echo "$as_me:15102: checking for pthread_kill" >&5 + echo "$as_me:15958: checking for pthread_kill" >&5 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6 if test "${ac_cv_func_pthread_kill+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 15108 "configure" +#line 15964 "configure" #include "confdefs.h" #define pthread_kill autoconf_temporary #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */ @@ -15136,16 +15992,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:15139: \"$ac_link\"") >&5 +if { (eval echo "$as_me:15995: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:15142: \$? = $ac_status" >&5 + echo "$as_me:15998: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:15145: \"$ac_try\"") >&5 + { (eval echo "$as_me:16001: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:15148: \$? = $ac_status" >&5 + echo "$as_me:16004: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_func_pthread_kill=yes else @@ -15155,11 +16011,11 @@ ac_cv_func_pthread_kill=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi -echo "$as_me:15158: result: $ac_cv_func_pthread_kill" >&5 +echo "$as_me:16014: result: $ac_cv_func_pthread_kill" >&5 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6 if test "$ac_cv_func_pthread_kill" = yes; then - echo "$as_me:15162: checking if you want to allow EINTR in wgetch with pthreads" >&5 + echo "$as_me:16018: checking if you want to allow EINTR in wgetch with pthreads" >&5 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given. @@ -15169,7 +16025,7 @@ if test "${enable_pthreads_eintr+set}" = set; then else use_pthreads_eintr=no fi; - echo "$as_me:15172: result: $use_pthreads_eintr" >&5 + echo "$as_me:16028: result: $use_pthreads_eintr" >&5 echo "${ECHO_T}$use_pthreads_eintr" >&6 if test "x$use_pthreads_eintr" = xyes ; then @@ -15180,7 +16036,7 @@ EOF fi fi - echo "$as_me:15183: checking if you want to use weak-symbols for pthreads" >&5 + echo "$as_me:16039: checking if you want to use weak-symbols for pthreads" >&5 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6 # Check whether --enable-weak-symbols or --disable-weak-symbols was given. @@ -15190,18 +16046,18 @@ if test "${enable_weak_symbols+set}" = set; then else use_weak_symbols=no fi; - echo "$as_me:15193: result: $use_weak_symbols" >&5 + echo "$as_me:16049: result: $use_weak_symbols" >&5 echo "${ECHO_T}$use_weak_symbols" >&6 if test "x$use_weak_symbols" = xyes ; then -echo "$as_me:15197: checking if $CC supports weak symbols" >&5 +echo "$as_me:16053: checking if $CC supports weak symbols" >&5 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6 if test "${cf_cv_weak_symbols+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 15204 "configure" +#line 16060 "configure" #include "confdefs.h" #include <stdio.h> @@ -15227,16 +16083,16 @@ weak_symbol(fopen); } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:15230: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:16086: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:15233: \$? = $ac_status" >&5 + echo "$as_me:16089: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:15236: \"$ac_try\"") >&5 + { (eval echo "$as_me:16092: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:15239: \$? = $ac_status" >&5 + echo "$as_me:16095: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_weak_symbols=yes else @@ -15247,7 +16103,7 @@ fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:15250: result: $cf_cv_weak_symbols" >&5 +echo "$as_me:16106: result: $cf_cv_weak_symbols" >&5 echo "${ECHO_T}$cf_cv_weak_symbols" >&6 else @@ -15297,7 +16153,7 @@ fi # opaque outside of that, so there is no --enable-opaque option. We can use # this option without --with-pthreads, but this will be always set for # pthreads. -echo "$as_me:15300: checking if you want reentrant code" >&5 +echo "$as_me:16156: checking if you want reentrant code" >&5 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6 # Check whether --enable-reentrant or --disable-reentrant was given. @@ -15307,7 +16163,7 @@ if test "${enable_reentrant+set}" = set; then else with_reentrant=no fi; -echo "$as_me:15310: result: $with_reentrant" >&5 +echo "$as_me:16166: result: $with_reentrant" >&5 echo "${ECHO_T}$with_reentrant" >&6 if test "x$with_reentrant" = xyes ; then cf_cv_enable_reentrant=1 @@ -15395,8 +16251,9 @@ if test "${with_abi_version+set}" != set; then (5.*) cf_cv_rel_version=6.0 cf_cv_abi_version=6 - { echo "$as_me:15398: WARNING: overriding ABI version to $cf_cv_abi_version" >&5 -echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;} + cf_cv_abi_default=6 + { echo "$as_me:16255: WARNING: overriding ABI version to $cf_cv_abi_default" >&5 +echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_default" >&2;} ;; esac fi @@ -15404,77 +16261,98 @@ fi else cf_cv_enable_reentrant=0 cf_cv_enable_opaque="NCURSES_OPAQUE" - NCURSES_SIZE_T=short + NCURSES_SIZE_T=$cf_dft_ordinate_type fi -echo "$as_me:15410: checking if you want opaque curses-library structures" >&5 -echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6 +echo "$as_me:16267: checking whether curses library structures should be opaque" >&5 +echo $ECHO_N "checking whether curses library structures should be opaque... $ECHO_C" >&6 # Check whether --enable-opaque-curses or --disable-opaque-curses was given. if test "${enable_opaque_curses+set}" = set; then enableval="$enable_opaque_curses" - test "$enableval" != yes && enableval=no - if test "$enableval" != "no" ; then - enable_opaque_curses=yes + test "$enableval" != no && enableval=yes + if test "$enableval" != "yes" ; then + enable_opaque_curses=no else test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes - test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no + test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=$cf_dft_opaque_curses fi else - enableval=no + enableval=yes test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes - test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no + test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=$cf_dft_opaque_curses fi; -echo "$as_me:15432: result: $enable_opaque_curses" >&5 +echo "$as_me:16289: result: $enable_opaque_curses" >&5 echo "${ECHO_T}$enable_opaque_curses" >&6 test "$cf_cv_enable_reentrant" = 1 && \ test "$enable_opaque_curses" = no && \ -{ { echo "$as_me:15437: error: reentrant configuration requires opaque library" >&5 +{ { echo "$as_me:16294: error: reentrant configuration requires opaque library" >&5 echo "$as_me: error: reentrant configuration requires opaque library" >&2;} { (exit 1); exit 1; }; } -echo "$as_me:15441: checking if you want opaque form-library structures" >&5 -echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6 +echo "$as_me:16298: checking whether form library structures should be opaque" >&5 +echo $ECHO_N "checking whether form library structures should be opaque... $ECHO_C" >&6 # Check whether --enable-opaque-form or --disable-opaque-form was given. if test "${enable_opaque_form+set}" = set; then enableval="$enable_opaque_form" - enable_opaque_form=yes + test "$enableval" != no && enableval=yes + if test "$enableval" != "yes" ; then + enable_opaque_form=no + else + enable_opaque_form=$cf_dft_opaque_curses + fi else - enable_opaque_form=no + enableval=yes + enable_opaque_form=$cf_dft_opaque_curses + fi; -echo "$as_me:15451: result: $enable_opaque_form" >&5 +echo "$as_me:16315: result: $enable_opaque_form" >&5 echo "${ECHO_T}$enable_opaque_form" >&6 -echo "$as_me:15454: checking if you want opaque menu-library structures" >&5 -echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6 +echo "$as_me:16318: checking whether menu library structures should be opaque" >&5 +echo $ECHO_N "checking whether menu library structures should be opaque... $ECHO_C" >&6 # Check whether --enable-opaque-menu or --disable-opaque-menu was given. if test "${enable_opaque_menu+set}" = set; then enableval="$enable_opaque_menu" - enable_opaque_menu=yes + test "$enableval" != no && enableval=yes + if test "$enableval" != "yes" ; then + enable_opaque_menu=no + else + enable_opaque_menu=$cf_dft_opaque_curses + fi else - enable_opaque_menu=no + enableval=yes + enable_opaque_menu=$cf_dft_opaque_curses + fi; -echo "$as_me:15464: result: $enable_opaque_menu" >&5 +echo "$as_me:16335: result: $enable_opaque_menu" >&5 echo "${ECHO_T}$enable_opaque_menu" >&6 -echo "$as_me:15467: checking if you want opaque panel-library structures" >&5 -echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6 +echo "$as_me:16338: checking whether panel library structures should be opaque" >&5 +echo $ECHO_N "checking whether panel library structures should be opaque... $ECHO_C" >&6 # Check whether --enable-opaque-panel or --disable-opaque-panel was given. if test "${enable_opaque_panel+set}" = set; then enableval="$enable_opaque_panel" - enable_opaque_panel=yes + test "$enableval" != no && enableval=yes + if test "$enableval" != "yes" ; then + enable_opaque_panel=no + else + enable_opaque_panel=$cf_dft_opaque_curses + fi else - enable_opaque_panel=no + enableval=yes + enable_opaque_panel=$cf_dft_opaque_curses + fi; -echo "$as_me:15477: result: $enable_opaque_panel" >&5 +echo "$as_me:16355: result: $enable_opaque_panel" >&5 echo "${ECHO_T}$enable_opaque_panel" >&6 NCURSES_OPAQUE=0; test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1 @@ -15484,7 +16362,7 @@ NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel" = yes && NCURSES_OPAQUE_PAN ### Allow using a different wrap-prefix if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then - echo "$as_me:15487: checking for prefix used to wrap public variables" >&5 + echo "$as_me:16365: checking for prefix used to wrap public variables" >&5 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6 # Check whether --with-wrap-prefix or --without-wrap-prefix was given. @@ -15494,7 +16372,7 @@ if test "${with_wrap_prefix+set}" = set; then else NCURSES_WRAP_PREFIX=_nc_ fi; - echo "$as_me:15497: result: $NCURSES_WRAP_PREFIX" >&5 + echo "$as_me:16375: result: $NCURSES_WRAP_PREFIX" >&5 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6 else NCURSES_WRAP_PREFIX=_nc_ @@ -15507,7 +16385,7 @@ EOF ############################################################################### # These options are relatively safe to experiment with. -echo "$as_me:15510: checking if you want all development code" >&5 +echo "$as_me:16388: checking if you want all development code" >&5 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6 # Check whether --with-develop or --without-develop was given. @@ -15517,11 +16395,29 @@ if test "${with_develop+set}" = set; then else with_develop=no fi; -echo "$as_me:15520: result: $with_develop" >&5 +echo "$as_me:16398: result: $with_develop" >&5 echo "${ECHO_T}$with_develop" >&6 +### use option --enable-check-size to detect screensize with CPR +echo "$as_me:16402: checking if you want to check screensize of serial terminals" >&5 +echo $ECHO_N "checking if you want to check screensize of serial terminals... $ECHO_C" >&6 + +# Check whether --enable-check-size or --disable-check-size was given. +if test "${enable_check_size+set}" = set; then + enableval="$enable_check_size" + +else + enable_check_size=$with_develop +fi; +echo "$as_me:16412: result: $enable_check_size" >&5 +echo "${ECHO_T}$enable_check_size" >&6 +test "x$enable_check_size" = xyes && +cat >>confdefs.h <<\EOF +#define USE_CHECK_SIZE 1 +EOF + ### use option --enable-hard-tabs to turn on use of hard-tabs optimize -echo "$as_me:15524: checking if you want hard-tabs code" >&5 +echo "$as_me:16420: checking if you want hard-tabs code" >&5 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6 # Check whether --enable-hard-tabs or --disable-hard-tabs was given. @@ -15531,7 +16427,7 @@ if test "${enable_hard_tabs+set}" = set; then else enable_hard_tabs=$with_develop fi; -echo "$as_me:15534: result: $enable_hard_tabs" >&5 +echo "$as_me:16430: result: $enable_hard_tabs" >&5 echo "${ECHO_T}$enable_hard_tabs" >&6 test "x$enable_hard_tabs" = xyes && cat >>confdefs.h <<\EOF @@ -15539,7 +16435,7 @@ cat >>confdefs.h <<\EOF EOF ### use option --enable-xmc-glitch to turn on use of magic-cookie optimize -echo "$as_me:15542: checking if you want limited support for xmc" >&5 +echo "$as_me:16438: checking if you want limited support for xmc" >&5 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given. @@ -15549,7 +16445,7 @@ if test "${enable_xmc_glitch+set}" = set; then else enable_xmc_glitch=$with_develop fi; -echo "$as_me:15552: result: $enable_xmc_glitch" >&5 +echo "$as_me:16448: result: $enable_xmc_glitch" >&5 echo "${ECHO_T}$enable_xmc_glitch" >&6 test "x$enable_xmc_glitch" = xyes && cat >>confdefs.h <<\EOF @@ -15559,7 +16455,7 @@ EOF ############################################################################### # These are just experimental, probably should not be in a package: -echo "$as_me:15562: checking if you do not want to assume colors are white-on-black" >&5 +echo "$as_me:16458: checking if you do not want to assume colors are white-on-black" >&5 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6 # Check whether --enable-assumed-color or --disable-assumed-color was given. @@ -15569,7 +16465,7 @@ if test "${enable_assumed_color+set}" = set; then else with_assumed_color=yes fi; -echo "$as_me:15572: result: $with_assumed_color" >&5 +echo "$as_me:16468: result: $with_assumed_color" >&5 echo "${ECHO_T}$with_assumed_color" >&6 test "x$with_assumed_color" = xyes && cat >>confdefs.h <<\EOF @@ -15577,7 +16473,7 @@ cat >>confdefs.h <<\EOF EOF ### use option --enable-hashmap to turn on use of hashmap scrolling logic -echo "$as_me:15580: checking if you want hashmap scrolling-optimization code" >&5 +echo "$as_me:16476: checking if you want hashmap scrolling-optimization code" >&5 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6 # Check whether --enable-hashmap or --disable-hashmap was given. @@ -15587,7 +16483,7 @@ if test "${enable_hashmap+set}" = set; then else with_hashmap=yes fi; -echo "$as_me:15590: result: $with_hashmap" >&5 +echo "$as_me:16486: result: $with_hashmap" >&5 echo "${ECHO_T}$with_hashmap" >&6 test "x$with_hashmap" = xyes && cat >>confdefs.h <<\EOF @@ -15595,7 +16491,7 @@ cat >>confdefs.h <<\EOF EOF ### use option --enable-colorfgbg to turn on use of $COLORFGBG environment -echo "$as_me:15598: checking if you want colorfgbg code" >&5 +echo "$as_me:16494: checking if you want colorfgbg code" >&5 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6 # Check whether --enable-colorfgbg or --disable-colorfgbg was given. @@ -15605,7 +16501,7 @@ if test "${enable_colorfgbg+set}" = set; then else with_colorfgbg=no fi; -echo "$as_me:15608: result: $with_colorfgbg" >&5 +echo "$as_me:16504: result: $with_colorfgbg" >&5 echo "${ECHO_T}$with_colorfgbg" >&6 test "x$with_colorfgbg" = xyes && cat >>confdefs.h <<\EOF @@ -15613,7 +16509,7 @@ cat >>confdefs.h <<\EOF EOF ### use option --enable-fvisibility to turn on use of gcc-specific feature -echo "$as_me:15616: checking if you want to use gcc -fvisibility option" >&5 +echo "$as_me:16512: checking if you want to use gcc -fvisibility option" >&5 echo $ECHO_N "checking if you want to use gcc -fvisibility option... $ECHO_C" >&6 # Check whether --enable-fvisibility or --disable-fvisibility was given. @@ -15623,14 +16519,14 @@ if test "${enable_fvisibility+set}" = set; then else cf_with_fvisibility=no fi; -echo "$as_me:15626: result: $cf_with_fvisibility" >&5 +echo "$as_me:16522: result: $cf_with_fvisibility" >&5 echo "${ECHO_T}$cf_with_fvisibility" >&6 NCURSES_IMPEXP= NCURSES_CXX_IMPEXP= if test "x$cf_with_fvisibility" = xyes; then -echo "$as_me:15633: checking if $CC -fvisibility=hidden option works" >&5 +echo "$as_me:16529: checking if $CC -fvisibility=hidden option works" >&5 echo $ECHO_N "checking if $CC -fvisibility=hidden option works... $ECHO_C" >&6 if test "${cf_cv_fvisibility_hidden+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -15639,7 +16535,7 @@ else cf_save_cflags="$CFLAGS" CFLAGS="$CFLAGS -fvisibility=hidden" cat >"conftest.$ac_ext" <<_ACEOF -#line 15642 "configure" +#line 16538 "configure" #include "confdefs.h" __attribute__ ((visibility("default"))) int somefunc() {return 42;} @@ -15655,16 +16551,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:15658: \"$ac_link\"") >&5 +if { (eval echo "$as_me:16554: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:15661: \$? = $ac_status" >&5 + echo "$as_me:16557: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:15664: \"$ac_try\"") >&5 + { (eval echo "$as_me:16560: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:15667: \$? = $ac_status" >&5 + echo "$as_me:16563: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_fvisibility_hidden=yes else @@ -15676,7 +16572,7 @@ rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" CFLAGS=$cf_save_cflags fi -echo "$as_me:15679: result: $cf_cv_fvisibility_hidden" >&5 +echo "$as_me:16575: result: $cf_cv_fvisibility_hidden" >&5 echo "${ECHO_T}$cf_cv_fvisibility_hidden" >&6 if test "x$cf_cv_fvisibility_hidden" = xyes @@ -15791,7 +16687,7 @@ ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_main_return="return" -echo "$as_me:15794: checking if $CXX -fvisibility=hidden option works" >&5 +echo "$as_me:16690: checking if $CXX -fvisibility=hidden option works" >&5 echo $ECHO_N "checking if $CXX -fvisibility=hidden option works... $ECHO_C" >&6 if test "${cf_cv_fvisibility_hidden2+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -15800,7 +16696,7 @@ else cf_save_cflags="$CXXFLAGS" CXXFLAGS="$CXXFLAGS -fvisibility=hidden" cat >"conftest.$ac_ext" <<_ACEOF -#line 15803 "configure" +#line 16699 "configure" #include "confdefs.h" __attribute__ ((visibility("default"))) int somefunc() {return 42;} @@ -15816,16 +16712,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:15819: \"$ac_link\"") >&5 +if { (eval echo "$as_me:16715: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:15822: \$? = $ac_status" >&5 + echo "$as_me:16718: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:15825: \"$ac_try\"") >&5 + { (eval echo "$as_me:16721: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:15828: \$? = $ac_status" >&5 + echo "$as_me:16724: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_fvisibility_hidden2=yes else @@ -15837,7 +16733,7 @@ rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" CXXFLAGS=$cf_save_cflags fi -echo "$as_me:15840: result: $cf_cv_fvisibility_hidden2" >&5 +echo "$as_me:16736: result: $cf_cv_fvisibility_hidden2" >&5 echo "${ECHO_T}$cf_cv_fvisibility_hidden2" >&6 if test "x$cf_cv_fvisibility_hidden2" = xyes @@ -15960,7 +16856,7 @@ ac_main_return="return" fi ### use option --enable-interop to turn on use of bindings used for interop -echo "$as_me:15963: checking if you want interop bindings" >&5 +echo "$as_me:16859: checking if you want interop bindings" >&5 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6 # Check whether --enable-interop or --disable-interop was given. @@ -15970,13 +16866,13 @@ if test "${enable_interop+set}" = set; then else with_exp_interop=$cf_dft_interop fi; -echo "$as_me:15973: result: $with_exp_interop" >&5 +echo "$as_me:16869: result: $with_exp_interop" >&5 echo "${ECHO_T}$with_exp_interop" >&6 NCURSES_INTEROP_FUNCS=0 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1 -echo "$as_me:15979: checking if you want experimental safe-sprintf code" >&5 +echo "$as_me:16875: checking if you want experimental safe-sprintf code" >&5 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given. @@ -15986,13 +16882,13 @@ if test "${enable_safe_sprintf+set}" = set; then else with_safe_sprintf=no fi; -echo "$as_me:15989: result: $with_safe_sprintf" >&5 +echo "$as_me:16885: result: $with_safe_sprintf" >&5 echo "${ECHO_T}$with_safe_sprintf" >&6 ### use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic # when hashmap is used scroll hints are useless if test "$with_hashmap" = no ; then -echo "$as_me:15995: checking if you want to experiment without scrolling-hints code" >&5 +echo "$as_me:16891: checking if you want to experiment without scrolling-hints code" >&5 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6 # Check whether --enable-scroll-hints or --disable-scroll-hints was given. @@ -16002,7 +16898,7 @@ if test "${enable_scroll_hints+set}" = set; then else with_scroll_hints=yes fi; -echo "$as_me:16005: result: $with_scroll_hints" >&5 +echo "$as_me:16901: result: $with_scroll_hints" >&5 echo "${ECHO_T}$with_scroll_hints" >&6 test "x$with_scroll_hints" = xyes && cat >>confdefs.h <<\EOF @@ -16011,7 +16907,7 @@ EOF fi -echo "$as_me:16014: checking if you want wgetch-events code" >&5 +echo "$as_me:16910: checking if you want wgetch-events code" >&5 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6 # Check whether --enable-wgetch-events or --disable-wgetch-events was given. @@ -16021,7 +16917,7 @@ if test "${enable_wgetch_events+set}" = set; then else with_wgetch_events=no fi; -echo "$as_me:16024: result: $with_wgetch_events" >&5 +echo "$as_me:16920: result: $with_wgetch_events" >&5 echo "${ECHO_T}$with_wgetch_events" >&6 if test "x$with_wgetch_events" = xyes ; then @@ -16036,7 +16932,7 @@ fi case "$cf_cv_system_name" in (*mingw32*|*mingw64*|*-msvc*) - echo "$as_me:16039: checking if you want experimental-Windows driver" >&5 + echo "$as_me:16935: checking if you want experimental-Windows driver" >&5 echo $ECHO_N "checking if you want experimental-Windows driver... $ECHO_C" >&6 # Check whether --enable-exp-win32 or --disable-exp-win32 was given. @@ -16046,7 +16942,7 @@ if test "${enable_exp_win32+set}" = set; then else with_exp_win32=no fi; - echo "$as_me:16049: result: $with_exp_win32" >&5 + echo "$as_me:16945: result: $with_exp_win32" >&5 echo "${ECHO_T}$with_exp_win32" >&6 if test "x$with_exp_win32" = xyes then @@ -16072,7 +16968,7 @@ esac ### use option --disable-echo to suppress full display compiling commands -echo "$as_me:16075: checking if you want to see long compiling messages" >&5 +echo "$as_me:16971: checking if you want to see long compiling messages" >&5 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6 # Check whether --enable-echo or --disable-echo was given. @@ -16106,7 +17002,7 @@ else ECHO_CC='' fi; -echo "$as_me:16109: result: $enableval" >&5 +echo "$as_me:17005: result: $enableval" >&5 echo "${ECHO_T}$enableval" >&6 if test "x$enable_echo" = xyes; then @@ -16119,7 +17015,7 @@ fi # --disable-stripping is used for debugging -echo "$as_me:16122: checking if you want to install stripped executables" >&5 +echo "$as_me:17018: checking if you want to install stripped executables" >&5 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6 # Check whether --enable-stripping or --disable-stripping was given. @@ -16136,7 +17032,7 @@ else enable_stripping=yes fi; -echo "$as_me:16139: result: $enable_stripping" >&5 +echo "$as_me:17035: result: $enable_stripping" >&5 echo "${ECHO_T}$enable_stripping" >&6 if test "$enable_stripping" = yes @@ -16147,7 +17043,7 @@ else fi : "${INSTALL:=install}" -echo "$as_me:16150: checking if install accepts -p option" >&5 +echo "$as_me:17046: checking if install accepts -p option" >&5 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6 if test "${cf_cv_install_p+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -16178,10 +17074,10 @@ else rm -rf ./conftest* fi -echo "$as_me:16181: result: $cf_cv_install_p" >&5 +echo "$as_me:17077: result: $cf_cv_install_p" >&5 echo "${ECHO_T}$cf_cv_install_p" >&6 -echo "$as_me:16184: checking if install needs to be told about ownership" >&5 +echo "$as_me:17080: checking if install needs to be told about ownership" >&5 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6 case `$ac_config_guess` in (*minix) @@ -16192,30 +17088,180 @@ case `$ac_config_guess` in ;; esac -echo "$as_me:16195: result: $with_install_o" >&5 +echo "$as_me:17091: result: $with_install_o" >&5 echo "${ECHO_T}$with_install_o" >&6 if test "x$with_install_o" = xyes then INSTALL_OPT_O="`id root|sed -e 's/uid=[0-9]*(/ -o /' -e 's/gid=[0-9]*(/ -g /' -e 's/ [^=[:space:]][^=[:space:]]*=.*/ /' -e 's/)//g'`" else - INSTALL_OPT_O= + INSTALL_OPT_O= +fi + +if test -n "$INSTALL_OPT_S" +then + echo "$as_me:17102: checking if you want to specify strip-program" >&5 +echo $ECHO_N "checking if you want to specify strip-program... $ECHO_C" >&6 + +# Check whether --with-strip-program or --without-strip-program was given. +if test "${with_strip_program+set}" = set; then + withval="$with_strip_program" + with_strip_program=$withval +else + with_strip_program=no +fi; + echo "$as_me:17112: result: $with_strip_program" >&5 +echo "${ECHO_T}$with_strip_program" >&6 + if test "$with_strip_program" != no + then + echo "$as_me:17116: checking if strip-program is supported with this installer" >&5 +echo $ECHO_N "checking if strip-program is supported with this installer... $ECHO_C" >&6 + cf_install_program=`echo "$INSTALL" | sed -e 's%[ ]*[ ]-.%%'` + check_install_strip=no + if test -f "$cf_install_program" + then + check_install_version=`"$cf_install_program" --version 2>/dev/null | head -n 1 | grep coreutils` + if test -n "$check_install_version" + then + check_install_strip="option" + else + for check_strip_variable in STRIPBIN STRIP + do + if strings "$cf_install_program" | grep "^$check_strip_variable$" >/dev/null + then + check_install_strip="environ" + break + fi + done + fi + fi + echo "$as_me:17137: result: $check_install_strip" >&5 +echo "${ECHO_T}$check_install_strip" >&6 + case "$check_install_strip" in + (no) + { echo "$as_me:17141: WARNING: $cf_install_program does not support strip program option" >&5 +echo "$as_me: WARNING: $cf_install_program does not support strip program option" >&2;} + with_strip_program=no + ;; + (environ) + cat >install.tmp <<-CF_EOF + #! $SHELL + STRIPBIN="$with_strip_program" \\ + STRIP="$with_strip_program" \\ + $INSTALL "$@" + CF_EOF + INSTALL="`pwd`/install.tmp" + chmod +x "$INSTALL" + test -n "$verbose" && echo " created $INSTALL" 1>&6 + +echo "${as_me:-configure}:17156: testing created $INSTALL ..." 1>&5 + + ;; + (option) + INSTALL_OPT_S="$INSTALL_OPT_S --strip-program=\"$with_strip_program\"" + ;; + esac + fi +fi + +# If we're avoiding relinking of shared libraries during install, that is to +# avoid modifying the build-tree. For the same reason, avoid doing ranlib if +# the install program has "-p" (for preserving timestamps). +cf_cv_do_reranlib=yes +if test "x$cf_cv_install_p" = xyes +then + if test "x$cf_cv_do_relink" != xyes + then + cf_cv_do_reranlib=no + INSTALL_OPT_P="-p" + INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P" + fi +fi + +### use option --enable-warnings to turn on all gcc warnings + +echo "$as_me:17182: checking if you want to use C11 _Noreturn feature" >&5 +echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6 + +# Check whether --enable-stdnoreturn or --disable-stdnoreturn was given. +if test "${enable_stdnoreturn+set}" = set; then + enableval="$enable_stdnoreturn" + test "$enableval" != yes && enableval=no + if test "$enableval" != "no" ; then + enable_stdnoreturn=yes + else + enable_stdnoreturn=no + fi +else + enableval=no + enable_stdnoreturn=no + +fi; +echo "$as_me:17199: result: $enable_stdnoreturn" >&5 +echo "${ECHO_T}$enable_stdnoreturn" >&6 + +if test $enable_stdnoreturn = yes; then +echo "$as_me:17203: checking for C11 _Noreturn feature" >&5 +echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6 +if test "${cf_cv_c11_noreturn+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >"conftest.$ac_ext" <<_ACEOF +#line 17209 "configure" +#include "confdefs.h" + +$ac_includes_default +#include <stdnoreturn.h> +static _Noreturn void giveup(void) { exit(0); } + +int +main (void) +{ +if (feof(stdin)) giveup() + ; + return 0; +} +_ACEOF +rm -f "conftest.$ac_objext" +if { (eval echo "$as_me:17225: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:17228: \$? = $ac_status" >&5 + (exit "$ac_status"); } && + { ac_try='test -s "conftest.$ac_objext"' + { (eval echo "$as_me:17231: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:17234: \$? = $ac_status" >&5 + (exit "$ac_status"); }; }; then + cf_cv_c11_noreturn=yes +else + echo "$as_me: failed program was:" >&5 +cat "conftest.$ac_ext" >&5 +cf_cv_c11_noreturn=no fi +rm -f "conftest.$ac_objext" "conftest.$ac_ext" -# If we're avoiding relinking of shared libraries during install, that is to -# avoid modifying the build-tree. For the same reason, avoid doing ranlib if -# the install program has "-p" (for preserving timestamps). -cf_cv_do_reranlib=yes -if test "x$cf_cv_install_p" = xyes -then - if test "x$cf_cv_do_relink" != xyes - then - cf_cv_do_reranlib=no - INSTALL_OPT_P="-p" - INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P" - fi +fi +echo "$as_me:17245: result: $cf_cv_c11_noreturn" >&5 +echo "${ECHO_T}$cf_cv_c11_noreturn" >&6 +else + cf_cv_c11_noreturn=no, fi -### use option --enable-warnings to turn on all gcc warnings +if test "$cf_cv_c11_noreturn" = yes; then + +cat >>confdefs.h <<\EOF +#define HAVE_STDNORETURN_H 1 +EOF + +cat >>confdefs.h <<EOF +#define STDC_NORETURN _Noreturn +EOF + + HAVE_STDNORETURN_H=1 +else + HAVE_STDNORETURN_H=0 +fi if test "$GCC" = yes || test "$GXX" = yes then @@ -16224,14 +17270,16 @@ if test "$GCC" = yes || test "$GXX" = yes then case $CFLAGS in (*-Werror=*) - test -n "$verbose" && echo " repairing CFLAGS: $CFLAGS" 1>&6 - -echo "${as_me:-configure}:16229: testing repairing CFLAGS: $CFLAGS ..." 1>&5 - cf_temp_flags= for cf_temp_scan in $CFLAGS do case "x$cf_temp_scan" in + (x-Werror=format*) + + test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags " + cf_temp_flags="${cf_temp_flags}$cf_temp_scan" + + ;; (x-Werror=*) test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS " @@ -16246,15 +17294,22 @@ echo "${as_me:-configure}:16229: testing repairing CFLAGS: $CFLAGS ..." 1>&5 ;; esac done - CFLAGS="$cf_temp_flags" - test -n "$verbose" && echo " ... fixed $CFLAGS" 1>&6 + if test "x$CFLAGS" != "x$cf_temp_flags" + then + test -n "$verbose" && echo " repairing CFLAGS: $CFLAGS" 1>&6 + +echo "${as_me:-configure}:17301: testing repairing CFLAGS: $CFLAGS ..." 1>&5 + + CFLAGS="$cf_temp_flags" + test -n "$verbose" && echo " ... fixed $CFLAGS" 1>&6 -echo "${as_me:-configure}:16252: testing ... fixed $CFLAGS ..." 1>&5 +echo "${as_me:-configure}:17306: testing ... fixed $CFLAGS ..." 1>&5 - test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6 + test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6 -echo "${as_me:-configure}:16256: testing ... extra $EXTRA_CFLAGS ..." 1>&5 +echo "${as_me:-configure}:17310: testing ... extra $EXTRA_CFLAGS ..." 1>&5 + fi ;; esac fi @@ -16263,14 +17318,16 @@ if test "$GCC" = yes || test "$GXX" = yes then case $CPPFLAGS in (*-Werror=*) - test -n "$verbose" && echo " repairing CPPFLAGS: $CPPFLAGS" 1>&6 - -echo "${as_me:-configure}:16268: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5 - cf_temp_flags= for cf_temp_scan in $CPPFLAGS do case "x$cf_temp_scan" in + (x-Werror=format*) + + test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags " + cf_temp_flags="${cf_temp_flags}$cf_temp_scan" + + ;; (x-Werror=*) test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS " @@ -16285,15 +17342,22 @@ echo "${as_me:-configure}:16268: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5 ;; esac done - CPPFLAGS="$cf_temp_flags" - test -n "$verbose" && echo " ... fixed $CPPFLAGS" 1>&6 + if test "x$CPPFLAGS" != "x$cf_temp_flags" + then + test -n "$verbose" && echo " repairing CPPFLAGS: $CPPFLAGS" 1>&6 + +echo "${as_me:-configure}:17349: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5 -echo "${as_me:-configure}:16291: testing ... fixed $CPPFLAGS ..." 1>&5 + CPPFLAGS="$cf_temp_flags" + test -n "$verbose" && echo " ... fixed $CPPFLAGS" 1>&6 - test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6 +echo "${as_me:-configure}:17354: testing ... fixed $CPPFLAGS ..." 1>&5 -echo "${as_me:-configure}:16295: testing ... extra $EXTRA_CFLAGS ..." 1>&5 + test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6 +echo "${as_me:-configure}:17358: testing ... extra $EXTRA_CFLAGS ..." 1>&5 + + fi ;; esac fi @@ -16302,14 +17366,16 @@ if test "$GCC" = yes || test "$GXX" = yes then case $LDFLAGS in (*-Werror=*) - test -n "$verbose" && echo " repairing LDFLAGS: $LDFLAGS" 1>&6 - -echo "${as_me:-configure}:16307: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5 - cf_temp_flags= for cf_temp_scan in $LDFLAGS do case "x$cf_temp_scan" in + (x-Werror=format*) + + test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags " + cf_temp_flags="${cf_temp_flags}$cf_temp_scan" + + ;; (x-Werror=*) test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS " @@ -16324,20 +17390,27 @@ echo "${as_me:-configure}:16307: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5 ;; esac done - LDFLAGS="$cf_temp_flags" - test -n "$verbose" && echo " ... fixed $LDFLAGS" 1>&6 + if test "x$LDFLAGS" != "x$cf_temp_flags" + then + test -n "$verbose" && echo " repairing LDFLAGS: $LDFLAGS" 1>&6 -echo "${as_me:-configure}:16330: testing ... fixed $LDFLAGS ..." 1>&5 +echo "${as_me:-configure}:17397: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5 - test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6 + LDFLAGS="$cf_temp_flags" + test -n "$verbose" && echo " ... fixed $LDFLAGS" 1>&6 -echo "${as_me:-configure}:16334: testing ... extra $EXTRA_CFLAGS ..." 1>&5 +echo "${as_me:-configure}:17402: testing ... fixed $LDFLAGS ..." 1>&5 + test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6 + +echo "${as_me:-configure}:17406: testing ... extra $EXTRA_CFLAGS ..." 1>&5 + + fi ;; esac fi -echo "$as_me:16340: checking if you want to turn on gcc warnings" >&5 +echo "$as_me:17413: checking if you want to turn on gcc warnings" >&5 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6 # Check whether --enable-warnings or --disable-warnings was given. @@ -16354,7 +17427,7 @@ else enable_warnings=no fi; -echo "$as_me:16357: result: $enable_warnings" >&5 +echo "$as_me:17430: result: $enable_warnings" >&5 echo "${ECHO_T}$enable_warnings" >&6 if test "$enable_warnings" = "yes" then @@ -16378,7 +17451,7 @@ do done cat >"conftest.$ac_ext" <<_ACEOF -#line 16381 "configure" +#line 17454 "configure" #include "confdefs.h" #include <stdlib.h> @@ -16387,34 +17460,35 @@ cat >"conftest.$ac_ext" <<_ACEOF int main (void) { -String foo = malloc(1); (void)foo +String foo = malloc(1); free((void*)foo) ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:16396: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:17469: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:16399: \$? = $ac_status" >&5 + echo "$as_me:17472: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:16402: \"$ac_try\"") >&5 + { (eval echo "$as_me:17475: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:16405: \$? = $ac_status" >&5 + echo "$as_me:17478: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then -echo "$as_me:16408: checking for X11/Xt const-feature" >&5 +echo "$as_me:17481: checking for X11/Xt const-feature" >&5 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6 if test "${cf_cv_const_x_string+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 16415 "configure" +#line 17488 "configure" #include "confdefs.h" +#undef _CONST_X_STRING #define _CONST_X_STRING /* X11R7.8 (perhaps) */ #undef XTSTRINGDEFINES /* X11R5 and later */ #include <stdlib.h> @@ -16429,16 +17503,16 @@ String foo = malloc(1); *foo = 0 } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:16432: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:17506: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:16435: \$? = $ac_status" >&5 + echo "$as_me:17509: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:16438: \"$ac_try\"") >&5 + { (eval echo "$as_me:17512: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:16441: \$? = $ac_status" >&5 + echo "$as_me:17515: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_const_x_string=no @@ -16453,7 +17527,7 @@ fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:16456: result: $cf_cv_const_x_string" >&5 +echo "$as_me:17530: result: $cf_cv_const_x_string" >&5 echo "${ECHO_T}$cf_cv_const_x_string" >&6 LIBS="$cf_save_LIBS_CF_CONST_X_STRING" @@ -16482,7 +17556,7 @@ fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi cat > "conftest.$ac_ext" <<EOF -#line 16485 "${as_me:-configure}" +#line 17559 "${as_me:-configure}" int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; } EOF if test "$INTEL_COMPILER" = yes @@ -16498,7 +17572,7 @@ then # remark #981: operands are evaluated in unspecified order # warning #279: controlling expression is constant - { echo "$as_me:16501: checking for $CC warning options..." >&5 + { echo "$as_me:17575: checking for $CC warning options..." >&5 echo "$as_me: checking for $CC warning options..." >&6;} cf_save_CFLAGS="$CFLAGS" EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall" @@ -16514,12 +17588,12 @@ echo "$as_me: checking for $CC warning options..." >&6;} wd981 do CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt" - if { (eval echo "$as_me:16517: \"$ac_compile\"") >&5 + if { (eval echo "$as_me:17591: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:16520: \$? = $ac_status" >&5 + echo "$as_me:17594: \$? = $ac_status" >&5 (exit "$ac_status"); }; then - test -n "$verbose" && echo "$as_me:16522: result: ... -$cf_opt" >&5 + test -n "$verbose" && echo "$as_me:17596: result: ... -$cf_opt" >&5 echo "${ECHO_T}... -$cf_opt" >&6 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt" fi @@ -16527,7 +17601,7 @@ echo "${ECHO_T}... -$cf_opt" >&6 CFLAGS="$cf_save_CFLAGS" elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown" then - { echo "$as_me:16530: checking for $CC warning options..." >&5 + { echo "$as_me:17604: checking for $CC warning options..." >&5 echo "$as_me: checking for $CC warning options..." >&6;} cf_save_CFLAGS="$CFLAGS" cf_warn_CONST="" @@ -16550,12 +17624,12 @@ echo "$as_me: checking for $CC warning options..." >&6;} Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum do CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt" - if { (eval echo "$as_me:16553: \"$ac_compile\"") >&5 + if { (eval echo "$as_me:17627: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:16556: \$? = $ac_status" >&5 + echo "$as_me:17630: \$? = $ac_status" >&5 (exit "$ac_status"); }; then - test -n "$verbose" && echo "$as_me:16558: result: ... -$cf_opt" >&5 + test -n "$verbose" && echo "$as_me:17632: result: ... -$cf_opt" >&5 echo "${ECHO_T}... -$cf_opt" >&6 case "$cf_opt" in (Winline) @@ -16563,7 +17637,7 @@ echo "${ECHO_T}... -$cf_opt" >&6 ([34].*) test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6 -echo "${as_me:-configure}:16566: testing feature is broken in gcc $GCC_VERSION ..." 1>&5 +echo "${as_me:-configure}:17640: testing feature is broken in gcc $GCC_VERSION ..." 1>&5 continue;; esac @@ -16573,7 +17647,7 @@ echo "${as_me:-configure}:16566: testing feature is broken in gcc $GCC_VERSION . ([12].*) test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6 -echo "${as_me:-configure}:16576: testing feature is broken in gcc $GCC_VERSION ..." 1>&5 +echo "${as_me:-configure}:17650: testing feature is broken in gcc $GCC_VERSION ..." 1>&5 continue;; esac @@ -16606,10 +17680,11 @@ cat > conftest.i <<EOF EOF if test "$GCC" = yes then - { echo "$as_me:16609: checking for $CC __attribute__ directives..." >&5 + { echo "$as_me:17683: checking for $CC __attribute__ directives..." >&5 echo "$as_me: checking for $CC __attribute__ directives..." >&6;} cat > "conftest.$ac_ext" <<EOF -#line 16612 "${as_me:-configure}" +#line 17686 "${as_me:-configure}" +#include <stdio.h> #include "confdefs.h" #include "conftest.h" #include "conftest.i" @@ -16624,8 +17699,8 @@ cat > "conftest.$ac_ext" <<EOF #define GCC_SCANFLIKE(fmt,var) /*nothing*/ #endif extern void wow(char *,...) GCC_SCANFLIKE(1,2); -extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN; -extern void foo(void) GCC_NORETURN; +extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2); +extern GCC_NORETURN void foo(void); int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; } EOF cf_printf_attribute=no @@ -16658,12 +17733,12 @@ EOF ;; esac - if { (eval echo "$as_me:16661: \"$ac_compile\"") >&5 + if { (eval echo "$as_me:17736: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:16664: \$? = $ac_status" >&5 + echo "$as_me:17739: \$? = $ac_status" >&5 (exit "$ac_status"); }; then - test -n "$verbose" && echo "$as_me:16666: result: ... $cf_attribute" >&5 + test -n "$verbose" && echo "$as_me:17741: result: ... $cf_attribute" >&5 echo "${ECHO_T}... $cf_attribute" >&6 cat conftest.h >>confdefs.h case "$cf_attribute" in @@ -16726,7 +17801,7 @@ fi if test "x$enable_warnings" = "xyes"; then - ADAFLAGS="$ADAFLAGS -gnatg" + ADAFLAGS="$ADAFLAGS -gnatwa -gnatyg" if test "x$cf_with_cxx" = xyes ; then @@ -16735,12 +17810,12 @@ INTEL_CPLUSPLUS=no if test "$GCC" = yes ; then case "$host_os" in (linux*|gnu*) - echo "$as_me:16738: checking if this is really Intel C++ compiler" >&5 + echo "$as_me:17813: checking if this is really Intel C++ compiler" >&5 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6 cf_save_CFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS -no-gcc" cat >"conftest.$ac_ext" <<_ACEOF -#line 16743 "configure" +#line 17818 "configure" #include "confdefs.h" int @@ -16749,7 +17824,7 @@ main (void) #ifdef __INTEL_COMPILER #else -make an error +#error __INTEL_COMPILER is not defined #endif ; @@ -16757,16 +17832,16 @@ make an error } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:16760: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:17835: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:16763: \$? = $ac_status" >&5 + echo "$as_me:17838: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:16766: \"$ac_try\"") >&5 + { (eval echo "$as_me:17841: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:16769: \$? = $ac_status" >&5 + echo "$as_me:17844: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then INTEL_CPLUSPLUS=yes cf_save_CFLAGS="$cf_save_CFLAGS -we147" @@ -16777,7 +17852,7 @@ cat "conftest.$ac_ext" >&5 fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" CXXFLAGS="$cf_save_CFLAGS" - echo "$as_me:16780: result: $INTEL_CPLUSPLUS" >&5 + echo "$as_me:17855: result: $INTEL_CPLUSPLUS" >&5 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6 ;; esac @@ -16786,11 +17861,11 @@ fi CLANG_CPLUSPLUS=no if test "$GCC" = yes ; then - echo "$as_me:16789: checking if this is really Clang C++ compiler" >&5 + echo "$as_me:17864: checking if this is really Clang C++ compiler" >&5 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6 cf_save_CFLAGS="$CXXFLAGS" cat >"conftest.$ac_ext" <<_ACEOF -#line 16793 "configure" +#line 17868 "configure" #include "confdefs.h" int @@ -16799,7 +17874,7 @@ main (void) #ifdef __clang__ #else -make an error +#error __clang__ is not defined #endif ; @@ -16807,16 +17882,16 @@ make an error } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:16810: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:17885: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:16813: \$? = $ac_status" >&5 + echo "$as_me:17888: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:16816: \"$ac_try\"") >&5 + { (eval echo "$as_me:17891: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:16819: \$? = $ac_status" >&5 + echo "$as_me:17894: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then CLANG_CPLUSPLUS=yes @@ -16826,7 +17901,7 @@ cat "conftest.$ac_ext" >&5 fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" CXXFLAGS="$cf_save_CFLAGS" - echo "$as_me:16829: result: $CLANG_CPLUSPLUS" >&5 + echo "$as_me:17904: result: $CLANG_CPLUSPLUS" >&5 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6 fi @@ -16835,30 +17910,30 @@ CLANG_VERSION=none if test "x$CLANG_CPLUSPLUS" = "xyes" ; then case "$CC" in (c[1-9][0-9]|*/c[1-9][0-9]) - { echo "$as_me:16838: WARNING: replacing broken compiler alias $CC" >&5 + { echo "$as_me:17913: WARNING: replacing broken compiler alias $CC" >&5 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;} CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`" CC=clang ;; esac - echo "$as_me:16845: checking version of $CC" >&5 + echo "$as_me:17920: checking version of $CC" >&5 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6 CLANG_VERSION="`$CC --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(CLANG[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`" test -z "$CLANG_VERSION" && CLANG_VERSION=unknown - echo "$as_me:16849: result: $CLANG_VERSION" >&5 + echo "$as_me:17924: result: $CLANG_VERSION" >&5 echo "${ECHO_T}$CLANG_VERSION" >&6 for cf_clang_opt in \ -Qunused-arguments \ -Wno-error=implicit-function-declaration do - echo "$as_me:16856: checking if option $cf_clang_opt works" >&5 + echo "$as_me:17931: checking if option $cf_clang_opt works" >&5 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6 cf_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $cf_clang_opt" cat >"conftest.$ac_ext" <<_ACEOF -#line 16861 "configure" +#line 17936 "configure" #include "confdefs.h" #include <stdio.h> @@ -16872,16 +17947,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:16875: \"$ac_link\"") >&5 +if { (eval echo "$as_me:17950: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:16878: \$? = $ac_status" >&5 + echo "$as_me:17953: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:16881: \"$ac_try\"") >&5 + { (eval echo "$as_me:17956: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:16884: \$? = $ac_status" >&5 + echo "$as_me:17959: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_clang_optok=yes @@ -16892,13 +17967,13 @@ cat "conftest.$ac_ext" >&5 cf_clang_optok=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" - echo "$as_me:16895: result: $cf_clang_optok" >&5 + echo "$as_me:17970: result: $cf_clang_optok" >&5 echo "${ECHO_T}$cf_clang_optok" >&6 CFLAGS="$cf_save_CFLAGS" if test "$cf_clang_optok" = yes; then test -n "$verbose" && echo " adding option $cf_clang_opt" 1>&6 -echo "${as_me:-configure}:16901: testing adding option $cf_clang_opt ..." 1>&5 +echo "${as_me:-configure}:17976: testing adding option $cf_clang_opt ..." 1>&5 test -n "$CFLAGS" && CFLAGS="$CFLAGS " CFLAGS="${CFLAGS}$cf_clang_opt" @@ -16915,7 +17990,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_main_return="return" cat > conftest.$ac_ext <<EOF -#line 16918 "configure" +#line 17993 "configure" int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; } EOF @@ -16933,7 +18008,7 @@ then # remark #981: operands are evaluated in unspecified order # warning #269: invalid format string conversion - { echo "$as_me:16936: checking for $CC warning options..." >&5 + { echo "$as_me:18011: checking for $CC warning options..." >&5 echo "$as_me: checking for $CC warning options..." >&6;} cf_save_CXXFLAGS="$CXXFLAGS" EXTRA_CXXFLAGS="-Wall" @@ -16950,12 +18025,12 @@ echo "$as_me: checking for $CC warning options..." >&6;} wd981 do CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt" - if { (eval echo "$as_me:16953: \"$ac_compile\"") >&5 + if { (eval echo "$as_me:18028: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:16956: \$? = $ac_status" >&5 + echo "$as_me:18031: \$? = $ac_status" >&5 (exit "$ac_status"); }; then - test -n "$verbose" && echo "$as_me:16958: result: ... -$cf_opt" >&5 + test -n "$verbose" && echo "$as_me:18033: result: ... -$cf_opt" >&5 echo "${ECHO_T}... -$cf_opt" >&6 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt" fi @@ -16964,7 +18039,7 @@ echo "${ECHO_T}... -$cf_opt" >&6 elif test "$GXX" = yes then - { echo "$as_me:16967: checking for $CXX warning options..." >&5 + { echo "$as_me:18042: checking for $CXX warning options..." >&5 echo "$as_me: checking for $CXX warning options..." >&6;} cf_save_CXXFLAGS="$CXXFLAGS" EXTRA_CXXFLAGS="-W -Wall" @@ -16994,16 +18069,16 @@ echo "$as_me: checking for $CXX warning options..." >&6;} Wundef $cf_gxx_extra_warnings Wno-unused do CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt" - if { (eval echo "$as_me:16997: \"$ac_compile\"") >&5 + if { (eval echo "$as_me:18072: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:17000: \$? = $ac_status" >&5 + echo "$as_me:18075: \$? = $ac_status" >&5 (exit "$ac_status"); }; then - test -n "$verbose" && echo "$as_me:17002: result: ... -$cf_opt" >&5 + test -n "$verbose" && echo "$as_me:18077: result: ... -$cf_opt" >&5 echo "${ECHO_T}... -$cf_opt" >&6 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt" else - test -n "$verbose" && echo "$as_me:17006: result: ... no -$cf_opt" >&5 + test -n "$verbose" && echo "$as_me:18081: result: ... no -$cf_opt" >&5 echo "${ECHO_T}... no -$cf_opt" >&6 fi done @@ -17021,7 +18096,7 @@ ac_main_return="return" fi fi -echo "$as_me:17024: checking if you want to work around bogus compiler/loader warnings" >&5 +echo "$as_me:18099: checking if you want to work around bogus compiler/loader warnings" >&5 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6 # Check whether --enable-string-hacks or --disable-string-hacks was given. @@ -17031,7 +18106,7 @@ if test "${enable_string_hacks+set}" = set; then else enable_string_hacks=no fi; -echo "$as_me:17034: result: $enable_string_hacks" >&5 +echo "$as_me:18109: result: $enable_string_hacks" >&5 echo "${ECHO_T}$enable_string_hacks" >&6 if test "x$enable_string_hacks" = "xyes"; then @@ -17040,15 +18115,15 @@ cat >>confdefs.h <<\EOF #define USE_STRING_HACKS 1 EOF - { echo "$as_me:17043: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5 + { echo "$as_me:18118: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;} - echo "$as_me:17045: checking for strlcat" >&5 + echo "$as_me:18120: checking for strlcat" >&5 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6 if test "${ac_cv_func_strlcat+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 17051 "configure" +#line 18126 "configure" #include "confdefs.h" #define strlcat autoconf_temporary #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */ @@ -17079,16 +18154,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:17082: \"$ac_link\"") >&5 +if { (eval echo "$as_me:18157: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:17085: \$? = $ac_status" >&5 + echo "$as_me:18160: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:17088: \"$ac_try\"") >&5 + { (eval echo "$as_me:18163: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:17091: \$? = $ac_status" >&5 + echo "$as_me:18166: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_func_strlcat=yes else @@ -17098,7 +18173,7 @@ ac_cv_func_strlcat=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi -echo "$as_me:17101: result: $ac_cv_func_strlcat" >&5 +echo "$as_me:18176: result: $ac_cv_func_strlcat" >&5 echo "${ECHO_T}$ac_cv_func_strlcat" >&6 if test "$ac_cv_func_strlcat" = yes; then @@ -17108,7 +18183,7 @@ EOF else - echo "$as_me:17111: checking for strlcat in -lbsd" >&5 + echo "$as_me:18186: checking for strlcat in -lbsd" >&5 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -17116,7 +18191,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lbsd $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 17119 "configure" +#line 18194 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -17125,7 +18200,7 @@ 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 strlcat (); +char strlcat (void); int main (void) { @@ -17135,16 +18210,16 @@ strlcat (); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:17138: \"$ac_link\"") >&5 +if { (eval echo "$as_me:18213: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:17141: \$? = $ac_status" >&5 + echo "$as_me:18216: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:17144: \"$ac_try\"") >&5 + { (eval echo "$as_me:18219: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:17147: \$? = $ac_status" >&5 + echo "$as_me:18222: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_bsd_strlcat=yes else @@ -17155,7 +18230,7 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:17158: result: $ac_cv_lib_bsd_strlcat" >&5 +echo "$as_me:18233: result: $ac_cv_lib_bsd_strlcat" >&5 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6 if test "$ac_cv_lib_bsd_strlcat" = yes; then @@ -17178,23 +18253,23 @@ LIBS="$cf_add_libs" for ac_header in bsd/string.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:17181: checking for $ac_header" >&5 +echo "$as_me:18256: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 17187 "configure" +#line 18262 "configure" #include "confdefs.h" #include <$ac_header> _ACEOF -if { (eval echo "$as_me:17191: \"$ac_cpp "conftest.$ac_ext"\"") >&5 +if { (eval echo "$as_me:18266: \"$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:17197: \$? = $ac_status" >&5 + echo "$as_me:18272: \$? = $ac_status" >&5 (exit "$ac_status"); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -17213,7 +18288,7 @@ else fi rm -f conftest.err "conftest.$ac_ext" fi -echo "$as_me:17216: result: `eval echo '${'"$as_ac_Header"'}'`" >&5 +echo "$as_me:18291: result: `eval echo '${'"$as_ac_Header"'}'`" >&5 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then cat >>confdefs.h <<EOF @@ -17234,13 +18309,13 @@ fi for ac_func in strlcpy snprintf do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:17237: checking for $ac_func" >&5 +echo "$as_me:18312: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 17243 "configure" +#line 18318 "configure" #include "confdefs.h" #define $ac_func autoconf_temporary #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */ @@ -17271,16 +18346,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:17274: \"$ac_link\"") >&5 +if { (eval echo "$as_me:18349: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:17277: \$? = $ac_status" >&5 + echo "$as_me:18352: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:17280: \"$ac_try\"") >&5 + { (eval echo "$as_me:18355: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:17283: \$? = $ac_status" >&5 + echo "$as_me:18358: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then eval "$as_ac_var=yes" else @@ -17290,7 +18365,7 @@ eval "$as_ac_var=no" fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi -echo "$as_me:17293: result: `eval echo '${'"$as_ac_var"'}'`" >&5 +echo "$as_me:18368: result: `eval echo '${'"$as_ac_var"'}'`" >&5 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then cat >>confdefs.h <<EOF @@ -17303,7 +18378,7 @@ done fi ### use option --enable-assertions to turn on generation of assertion code -echo "$as_me:17306: checking if you want to enable runtime assertions" >&5 +echo "$as_me:18381: checking if you want to enable runtime assertions" >&5 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6 # Check whether --enable-assertions or --disable-assertions was given. @@ -17313,7 +18388,7 @@ if test "${enable_assertions+set}" = set; then else with_assertions=no fi; -echo "$as_me:17316: result: $with_assertions" >&5 +echo "$as_me:18391: result: $with_assertions" >&5 echo "${ECHO_T}$with_assertions" >&6 if test -n "$GCC" then @@ -17329,24 +18404,29 @@ fi ### use option --disable-leaks to suppress "permanent" leaks, for testing -echo "$as_me:17332: checking if you want to use dmalloc for testing" >&5 +echo "$as_me:18407: checking if you want to use dmalloc for testing" >&5 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6 # Check whether --with-dmalloc or --without-dmalloc was given. if test "${with_dmalloc+set}" = set; then withval="$with_dmalloc" + case "x$withval" in + (x|xno) ;; + (*) + : "${with_cflags:=-g}" + : "${enable_leaks:=no}" + with_dmalloc=yes cat >>confdefs.h <<EOF #define USE_DMALLOC 1 EOF - : "${with_cflags:=-g}" - : "${enable_leaks:=no}" - with_dmalloc=yes + ;; + esac else with_dmalloc= fi; -echo "$as_me:17349: result: ${with_dmalloc:-no}" >&5 +echo "$as_me:18429: result: ${with_dmalloc:-no}" >&5 echo "${ECHO_T}${with_dmalloc:-no}" >&6 case ".$with_cflags" in @@ -17460,23 +18540,23 @@ fi esac if test "$with_dmalloc" = yes ; then - echo "$as_me:17463: checking for dmalloc.h" >&5 + echo "$as_me:18543: checking for dmalloc.h" >&5 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6 if test "${ac_cv_header_dmalloc_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 17469 "configure" +#line 18549 "configure" #include "confdefs.h" #include <dmalloc.h> _ACEOF -if { (eval echo "$as_me:17473: \"$ac_cpp "conftest.$ac_ext"\"") >&5 +if { (eval echo "$as_me:18553: \"$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:17479: \$? = $ac_status" >&5 + echo "$as_me:18559: \$? = $ac_status" >&5 (exit "$ac_status"); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -17495,11 +18575,11 @@ else fi rm -f conftest.err "conftest.$ac_ext" fi -echo "$as_me:17498: result: $ac_cv_header_dmalloc_h" >&5 +echo "$as_me:18578: result: $ac_cv_header_dmalloc_h" >&5 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6 if test "$ac_cv_header_dmalloc_h" = yes; then -echo "$as_me:17502: checking for dmalloc_debug in -ldmalloc" >&5 +echo "$as_me:18582: checking for dmalloc_debug in -ldmalloc" >&5 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -17507,7 +18587,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-ldmalloc $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 17510 "configure" +#line 18590 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -17516,7 +18596,7 @@ 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 dmalloc_debug (); +char dmalloc_debug (void); int main (void) { @@ -17526,16 +18606,16 @@ dmalloc_debug (); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:17529: \"$ac_link\"") >&5 +if { (eval echo "$as_me:18609: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:17532: \$? = $ac_status" >&5 + echo "$as_me:18612: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:17535: \"$ac_try\"") >&5 + { (eval echo "$as_me:18615: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:17538: \$? = $ac_status" >&5 + echo "$as_me:18618: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_dmalloc_dmalloc_debug=yes else @@ -17546,7 +18626,7 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:17549: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5 +echo "$as_me:18629: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6 if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then cat >>confdefs.h <<EOF @@ -17561,24 +18641,29 @@ fi fi -echo "$as_me:17564: checking if you want to use dbmalloc for testing" >&5 +echo "$as_me:18644: checking if you want to use dbmalloc for testing" >&5 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6 # Check whether --with-dbmalloc or --without-dbmalloc was given. if test "${with_dbmalloc+set}" = set; then withval="$with_dbmalloc" + case "x$withval" in + (x|xno) ;; + (*) + : "${with_cflags:=-g}" + : "${enable_leaks:=no}" + with_dbmalloc=yes cat >>confdefs.h <<EOF #define USE_DBMALLOC 1 EOF - : "${with_cflags:=-g}" - : "${enable_leaks:=no}" - with_dbmalloc=yes + ;; + esac else with_dbmalloc= fi; -echo "$as_me:17581: result: ${with_dbmalloc:-no}" >&5 +echo "$as_me:18666: result: ${with_dbmalloc:-no}" >&5 echo "${ECHO_T}${with_dbmalloc:-no}" >&6 case ".$with_cflags" in @@ -17692,23 +18777,23 @@ fi esac if test "$with_dbmalloc" = yes ; then - echo "$as_me:17695: checking for dbmalloc.h" >&5 + echo "$as_me:18780: checking for dbmalloc.h" >&5 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6 if test "${ac_cv_header_dbmalloc_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 17701 "configure" +#line 18786 "configure" #include "confdefs.h" #include <dbmalloc.h> _ACEOF -if { (eval echo "$as_me:17705: \"$ac_cpp "conftest.$ac_ext"\"") >&5 +if { (eval echo "$as_me:18790: \"$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:17711: \$? = $ac_status" >&5 + echo "$as_me:18796: \$? = $ac_status" >&5 (exit "$ac_status"); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -17727,11 +18812,11 @@ else fi rm -f conftest.err "conftest.$ac_ext" fi -echo "$as_me:17730: result: $ac_cv_header_dbmalloc_h" >&5 +echo "$as_me:18815: result: $ac_cv_header_dbmalloc_h" >&5 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6 if test "$ac_cv_header_dbmalloc_h" = yes; then -echo "$as_me:17734: checking for debug_malloc in -ldbmalloc" >&5 +echo "$as_me:18819: checking for debug_malloc in -ldbmalloc" >&5 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -17739,7 +18824,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-ldbmalloc $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 17742 "configure" +#line 18827 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -17748,7 +18833,7 @@ 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 debug_malloc (); +char debug_malloc (void); int main (void) { @@ -17758,16 +18843,16 @@ debug_malloc (); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:17761: \"$ac_link\"") >&5 +if { (eval echo "$as_me:18846: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:17764: \$? = $ac_status" >&5 + echo "$as_me:18849: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:17767: \"$ac_try\"") >&5 + { (eval echo "$as_me:18852: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:17770: \$? = $ac_status" >&5 + echo "$as_me:18855: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_dbmalloc_debug_malloc=yes else @@ -17778,7 +18863,7 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:17781: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5 +echo "$as_me:18866: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6 if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then cat >>confdefs.h <<EOF @@ -17793,24 +18878,29 @@ fi fi -echo "$as_me:17796: checking if you want to use valgrind for testing" >&5 +echo "$as_me:18881: checking if you want to use valgrind for testing" >&5 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6 # Check whether --with-valgrind or --without-valgrind was given. if test "${with_valgrind+set}" = set; then withval="$with_valgrind" + case "x$withval" in + (x|xno) ;; + (*) + : "${with_cflags:=-g}" + : "${enable_leaks:=no}" + with_valgrind=yes cat >>confdefs.h <<EOF #define USE_VALGRIND 1 EOF - : "${with_cflags:=-g}" - : "${enable_leaks:=no}" - with_valgrind=yes + ;; + esac else with_valgrind= fi; -echo "$as_me:17813: result: ${with_valgrind:-no}" >&5 +echo "$as_me:18903: result: ${with_valgrind:-no}" >&5 echo "${ECHO_T}${with_valgrind:-no}" >&6 case ".$with_cflags" in @@ -17923,18 +19013,18 @@ fi ;; esac -echo "$as_me:17926: checking if you want to perform memory-leak testing" >&5 +echo "$as_me:19016: checking if you want to perform memory-leak testing" >&5 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6 # Check whether --enable-leaks or --disable-leaks was given. if test "${enable_leaks+set}" = set; then enableval="$enable_leaks" - enable_leaks=no + enable_leaks=$enableval else enable_leaks=yes fi; if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi -echo "$as_me:17937: result: $with_no_leaks" >&5 +echo "$as_me:19027: result: $with_no_leaks" >&5 echo "${ECHO_T}$with_no_leaks" >&6 if test "$enable_leaks" = no ; then @@ -17986,7 +19076,7 @@ case "$CFLAGS $CPPFLAGS" in ;; esac -echo "$as_me:17989: checking whether to add trace feature to all models" >&5 +echo "$as_me:19079: checking whether to add trace feature to all models" >&5 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6 # Check whether --with-trace or --without-trace was given. @@ -17996,7 +19086,7 @@ if test "${with_trace+set}" = set; then else cf_with_trace=$cf_all_traces fi; -echo "$as_me:17999: result: $cf_with_trace" >&5 +echo "$as_me:19089: result: $cf_with_trace" >&5 echo "${ECHO_T}$cf_with_trace" >&6 if test "x$cf_with_trace" = xyes ; then @@ -18083,567 +19173,296 @@ done if test -n "$cf_new_cflags" ; then test -n "$CFLAGS" && CFLAGS="$CFLAGS " - CFLAGS="${CFLAGS}$cf_new_cflags" - -fi - -if test -n "$cf_new_cppflags" ; then - - test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " - CPPFLAGS="${CPPFLAGS}$cf_new_cppflags" - -fi - -if test -n "$cf_new_extra_cppflags" ; then - - test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS " - EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags" - -fi - -cat >>confdefs.h <<\EOF -#define HAVE__TRACEF 1 -EOF - -else - LIB_TRACING=DEBUG - ADA_TRACE=FALSE -fi - -echo "$as_me:18113: checking if we want to use GNAT projects" >&5 -echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6 - -# Check whether --enable-gnat-projects or --disable-gnat-projects was given. -if test "${enable_gnat_projects+set}" = set; then - enableval="$enable_gnat_projects" - test "$enableval" != no && enableval=yes - if test "$enableval" != "yes" ; then - enable_gnat_projects=no - else - enable_gnat_projects=yes - fi -else - enableval=yes - enable_gnat_projects=yes - -fi; -echo "$as_me:18130: result: $enable_gnat_projects" >&5 -echo "${ECHO_T}$enable_gnat_projects" >&6 - -### Checks for libraries. -case "$cf_cv_system_name" in -(*mingw32*|*mingw64*) - if test "x$with_exp_win32" = xyes ; then - CPPFLAGS="$CPPFLAGS -DWINVER=0x0600 -DWIN32_LEAN_AND_MEAN" - else - CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN" - fi - # Note: WINVER may be a problem with Windows 10 - ;; -(*) -echo "$as_me:18144: checking for gettimeofday" >&5 -echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6 -if test "${ac_cv_func_gettimeofday+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >"conftest.$ac_ext" <<_ACEOF -#line 18150 "configure" -#include "confdefs.h" -#define gettimeofday autoconf_temporary -#include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */ -#undef gettimeofday - -#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 gettimeofday (void); - -int -main (void) -{ - -/* The GNU C library defines stubs 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_gettimeofday) || defined (__stub___gettimeofday) -#error found stub for gettimeofday -#endif - - return gettimeofday (); - ; - return 0; -} -_ACEOF -rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:18181: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:18184: \$? = $ac_status" >&5 - (exit "$ac_status"); } && - { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:18187: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:18190: \$? = $ac_status" >&5 - (exit "$ac_status"); }; }; then - ac_cv_func_gettimeofday=yes -else - echo "$as_me: failed program was:" >&5 -cat "conftest.$ac_ext" >&5 -ac_cv_func_gettimeofday=no -fi -rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" -fi -echo "$as_me:18200: result: $ac_cv_func_gettimeofday" >&5 -echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6 -if test "$ac_cv_func_gettimeofday" = yes; then - -cat >>confdefs.h <<\EOF -#define HAVE_GETTIMEOFDAY 1 -EOF - -else - -echo "$as_me:18210: checking for gettimeofday in -lbsd" >&5 -echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6 -if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lbsd $LIBS" -cat >"conftest.$ac_ext" <<_ACEOF -#line 18218 "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 gettimeofday (); -int -main (void) -{ -gettimeofday (); - ; - return 0; -} -_ACEOF -rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:18237: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:18240: \$? = $ac_status" >&5 - (exit "$ac_status"); } && - { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:18243: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:18246: \$? = $ac_status" >&5 - (exit "$ac_status"); }; }; then - ac_cv_lib_bsd_gettimeofday=yes -else - echo "$as_me: failed program was:" >&5 -cat "conftest.$ac_ext" >&5 -ac_cv_lib_bsd_gettimeofday=no -fi -rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:18257: result: $ac_cv_lib_bsd_gettimeofday" >&5 -echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6 -if test "$ac_cv_lib_bsd_gettimeofday" = yes; then - -cat >>confdefs.h <<\EOF -#define HAVE_GETTIMEOFDAY 1 -EOF - -cf_add_libs="$LIBS" -# reverse order -cf_add_0lib= -for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done -# filter duplicates -for cf_add_1lib in $cf_add_0lib; do - for cf_add_2lib in $cf_add_libs; do - if test "x$cf_add_1lib" = "x$cf_add_2lib"; then - cf_add_1lib= - break - fi - done - test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs" -done -LIBS="$cf_add_libs" + CFLAGS="${CFLAGS}$cf_new_cflags" fi -fi - ;; -esac +if test -n "$cf_new_cppflags" ; then -echo "$as_me:18287: checking if -lm needed for math functions" >&5 -echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6 -if test "${cf_cv_need_libm+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else + test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " + CPPFLAGS="${CPPFLAGS}$cf_new_cppflags" - cat >"conftest.$ac_ext" <<_ACEOF -#line 18294 "configure" -#include "confdefs.h" +fi - #include <stdio.h> - #include <stdlib.h> - #include <math.h> +if test -n "$cf_new_extra_cppflags" ; then + + test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS " + EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags" -int -main (void) -{ -double x = rand(); printf("result = %g\\n", pow(sin(x),x)) - ; - return 0; -} -_ACEOF -rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:18310: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:18313: \$? = $ac_status" >&5 - (exit "$ac_status"); } && - { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:18316: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:18319: \$? = $ac_status" >&5 - (exit "$ac_status"); }; }; then - cf_cv_need_libm=no -else - echo "$as_me: failed program was:" >&5 -cat "conftest.$ac_ext" >&5 -cf_cv_need_libm=yes -fi -rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" -fi -echo "$as_me:18329: result: $cf_cv_need_libm" >&5 -echo "${ECHO_T}$cf_cv_need_libm" >&6 -if test "$cf_cv_need_libm" = yes -then -MATH_LIB=-lm fi -### Checks for header files. -echo "$as_me:18337: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 -if test "${ac_cv_header_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >"conftest.$ac_ext" <<_ACEOF -#line 18343 "configure" -#include "confdefs.h" -#include <stdlib.h> -#include <stdarg.h> -#include <string.h> -#include <float.h> +cat >>confdefs.h <<\EOF +#define HAVE__TRACEF 1 +EOF -_ACEOF -if { (eval echo "$as_me:18351: \"$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:18357: \$? = $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 - ac_cv_header_stdc=yes else - echo "$as_me: failed program was:" >&5 - cat "conftest.$ac_ext" >&5 - ac_cv_header_stdc=no + LIB_TRACING=DEBUG + ADA_TRACE=FALSE fi -rm -f conftest.err "conftest.$ac_ext" -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat >"conftest.$ac_ext" <<_ACEOF -#line 18379 "configure" -#include "confdefs.h" -#include <string.h> +echo "$as_me:19203: checking if we want to use GNAT projects" >&5 +echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6 -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then - : +# Check whether --enable-gnat-projects or --disable-gnat-projects was given. +if test "${enable_gnat_projects+set}" = set; then + enableval="$enable_gnat_projects" + test "$enableval" != no && enableval=yes + if test "$enableval" != "yes" ; then + enable_gnat_projects=no + else + enable_gnat_projects=yes + fi else - ac_cv_header_stdc=no -fi -rm -rf conftest* + enableval=yes + enable_gnat_projects=yes -fi +fi; +echo "$as_me:19220: result: $enable_gnat_projects" >&5 +echo "${ECHO_T}$enable_gnat_projects" >&6 -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat >"conftest.$ac_ext" <<_ACEOF -#line 18397 "configure" -#include "confdefs.h" -#include <stdlib.h> +### Checks for libraries. +case "$cf_cv_system_name" in +(*mingw32*|*mingw64*) + # Note: WINVER may be a problem with Windows 10 + if test "x$with_exp_win32" = xyes ; then + CPPFLAGS="$CPPFLAGS -DWINVER=0x0600 -DWIN32_LEAN_AND_MEAN" + else + CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN" + fi -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then - : +echo "$as_me:19233: checking if ssp library is needed" >&5 +echo $ECHO_N "checking if ssp library is needed... $ECHO_C" >&6 +if test "${cf_cv_need_libssp+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_header_stdc=no -fi -rm -rf conftest* - -fi -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then - : -else - cat >"conftest.$ac_ext" <<_ACEOF -#line 18418 "configure" +cat >"conftest.$ac_ext" <<_ACEOF +#line 19240 "configure" #include "confdefs.h" -#include <ctype.h> -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +#include <sys/types.h> +#include <dirent.h> + int main (void) { - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - $ac_main_return(2); - $ac_main_return (0); + + DIR *dp = opendir("."); + + ; + return 0; } _ACEOF -rm -f "conftest$ac_exeext" -if { (eval echo "$as_me:18444: \"$ac_link\"") >&5 +rm -f "conftest.$ac_objext" "conftest$ac_exeext" +if { (eval echo "$as_me:19257: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:18447: \$? = $ac_status" >&5 - (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"' - { (eval echo "$as_me:18449: \"$ac_try\"") >&5 + echo "$as_me:19260: \$? = $ac_status" >&5 + (exit "$ac_status"); } && + { ac_try='test -s "conftest$ac_exeext"' + { (eval echo "$as_me:19263: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:18452: \$? = $ac_status" >&5 + echo "$as_me:19266: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then - : + cf_cv_need_libssp=no else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 -ac_cv_header_stdc=no -fi -rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext" -fi -fi -fi -echo "$as_me:18465: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6 -if test $ac_cv_header_stdc = yes; then - -cat >>confdefs.h <<\EOF -#define STDC_HEADERS 1 -EOF - -fi -ac_header_dirent=no -for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do - as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` -echo "$as_me:18478: checking for $ac_hdr that defines DIR" >&5 -echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >"conftest.$ac_ext" <<_ACEOF -#line 18484 "configure" + cf_save_LIBS="$LIBS" + LIBS="$LIBS -lssp" + cat >"conftest.$ac_ext" <<_ACEOF +#line 19276 "configure" #include "confdefs.h" + #include <sys/types.h> -#include <$ac_hdr> +#include <dirent.h> int main (void) { -if ((DIR *) 0) -return 0; + + DIR *dp = opendir("."); + ; return 0; } _ACEOF -rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:18499: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 +rm -f "conftest.$ac_objext" "conftest$ac_exeext" +if { (eval echo "$as_me:19293: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:18502: \$? = $ac_status" >&5 + echo "$as_me:19296: \$? = $ac_status" >&5 (exit "$ac_status"); } && - { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:18505: \"$ac_try\"") >&5 + { ac_try='test -s "conftest$ac_exeext"' + { (eval echo "$as_me:19299: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:18508: \$? = $ac_status" >&5 + echo "$as_me:19302: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then - eval "$as_ac_Header=yes" + cf_cv_need_libssp=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 -eval "$as_ac_Header=no" -fi -rm -f "conftest.$ac_objext" "conftest.$ac_ext" +cf_cv_need_libssp=maybe fi -echo "$as_me:18518: result: `eval echo '${'"$as_ac_Header"'}'`" >&5 -echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6 -if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then - cat >>confdefs.h <<EOF -#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 -EOF +rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" + LIBS="$cf_save_LIBS" -ac_header_dirent=$ac_hdr; break fi +rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" +fi +echo "$as_me:19316: result: $cf_cv_need_libssp" >&5 +echo "${ECHO_T}$cf_cv_need_libssp" >&6 + +if test "x$cf_cv_need_libssp" = xyes +then +cf_add_libs="$LIBS" +# reverse order +cf_add_0lib= +for cf_add_1lib in -lssp; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done +# filter duplicates +for cf_add_1lib in $cf_add_0lib; do + for cf_add_2lib in $cf_add_libs; do + if test "x$cf_add_1lib" = "x$cf_add_2lib"; then + cf_add_1lib= + break + fi + done + test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs" done -# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. -if test $ac_header_dirent = dirent.h; then - echo "$as_me:18531: checking for opendir in -ldir" >&5 -echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6 -if test "${ac_cv_lib_dir_opendir+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldir $LIBS" -cat >"conftest.$ac_ext" <<_ACEOF -#line 18539 "configure" +LIBS="$cf_add_libs" + +fi + + ;; +(*) + ;; +esac + +echo "$as_me:19345: checking if -lm needed for math functions" >&5 +echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6 +if test "${cf_cv_need_libm+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + cat >"conftest.$ac_ext" <<_ACEOF +#line 19352 "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 opendir (); + #include <stdio.h> + #include <stdlib.h> + #include <math.h> + int main (void) { -opendir (); +double x = rand(); printf("result = %g\\n", pow(sin(x),x)) ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:18558: \"$ac_link\"") >&5 +if { (eval echo "$as_me:19368: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:18561: \$? = $ac_status" >&5 + echo "$as_me:19371: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:18564: \"$ac_try\"") >&5 + { (eval echo "$as_me:19374: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:18567: \$? = $ac_status" >&5 + echo "$as_me:19377: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then - ac_cv_lib_dir_opendir=yes + cf_cv_need_libm=no else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 -ac_cv_lib_dir_opendir=no +cf_cv_need_libm=yes fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:18578: result: $ac_cv_lib_dir_opendir" >&5 -echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6 -if test "$ac_cv_lib_dir_opendir" = yes; then - LIBS="$LIBS -ldir" fi +echo "$as_me:19387: result: $cf_cv_need_libm" >&5 +echo "${ECHO_T}$cf_cv_need_libm" >&6 -else - echo "$as_me:18585: checking for opendir in -lx" >&5 -echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6 -if test "${ac_cv_lib_x_opendir+set}" = set; then +if test "$cf_cv_need_libm" = yes +then + + cf_save_LIBS="$LIBS" + LIBS="$LIBS -lm" + echo "$as_me:19395: checking if -lm is available for math functions" >&5 +echo $ECHO_N "checking if -lm is available for math functions... $ECHO_C" >&6 +if test "${cf_cv_have_libm+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lx $LIBS" -cat >"conftest.$ac_ext" <<_ACEOF -#line 18593 "configure" + + cat >"conftest.$ac_ext" <<_ACEOF +#line 19402 "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 opendir (); + #include <stdio.h> + #include <stdlib.h> + #include <math.h> + int main (void) { -opendir (); +double x = rand(); printf("result = %g\\n", pow(sin(x),x)) ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:18612: \"$ac_link\"") >&5 +if { (eval echo "$as_me:19418: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:18615: \$? = $ac_status" >&5 + echo "$as_me:19421: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:18618: \"$ac_try\"") >&5 + { (eval echo "$as_me:19424: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:18621: \$? = $ac_status" >&5 + echo "$as_me:19427: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then - ac_cv_lib_x_opendir=yes + cf_cv_have_libm=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 -ac_cv_lib_x_opendir=no +cf_cv_have_libm=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" -LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:18632: result: $ac_cv_lib_x_opendir" >&5 -echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6 -if test "$ac_cv_lib_x_opendir" = yes; then - LIBS="$LIBS -lx" +echo "$as_me:19437: result: $cf_cv_have_libm" >&5 +echo "${ECHO_T}$cf_cv_have_libm" >&6 + LIBS="$cf_save_LIBS" + + if test "$cf_cv_have_libm" = yes + then + MATH_LIB=-lm + fi +else + cf_cv_have_libm=yes fi +if test "$cf_cv_have_libm" = yes +then + +cat >>confdefs.h <<\EOF +#define HAVE_MATH_FUNCS 1 +EOF + fi -echo "$as_me:18640: checking whether time.h and sys/time.h may both be included" >&5 +### Checks for header files. +echo "$as_me:19459: checking whether time.h and sys/time.h may both be included" >&5 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 if test "${ac_cv_header_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 18646 "configure" +#line 19465 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/time.h> @@ -18659,16 +19478,16 @@ return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:18662: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:19481: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:18665: \$? = $ac_status" >&5 + echo "$as_me:19484: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:18668: \"$ac_try\"") >&5 + { (eval echo "$as_me:19487: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:18671: \$? = $ac_status" >&5 + echo "$as_me:19490: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_header_time=yes else @@ -18678,7 +19497,7 @@ ac_cv_header_time=no fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:18681: result: $ac_cv_header_time" >&5 +echo "$as_me:19500: result: $ac_cv_header_time" >&5 echo "${ECHO_T}$ac_cv_header_time" >&6 if test $ac_cv_header_time = yes; then @@ -18693,7 +19512,7 @@ cf_regex_libs= case "$host_os" in (mingw*) # -lsystre -ltre -lintl -liconv - echo "$as_me:18696: checking for regcomp in -lsystre" >&5 + echo "$as_me:19515: checking for regcomp in -lsystre" >&5 echo $ECHO_N "checking for regcomp in -lsystre... $ECHO_C" >&6 if test "${ac_cv_lib_systre_regcomp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -18701,7 +19520,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lsystre $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 18704 "configure" +#line 19523 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -18710,7 +19529,7 @@ 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 regcomp (); +char regcomp (void); int main (void) { @@ -18720,16 +19539,16 @@ regcomp (); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:18723: \"$ac_link\"") >&5 +if { (eval echo "$as_me:19542: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:18726: \$? = $ac_status" >&5 + echo "$as_me:19545: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:18729: \"$ac_try\"") >&5 + { (eval echo "$as_me:19548: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:18732: \$? = $ac_status" >&5 + echo "$as_me:19551: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_systre_regcomp=yes else @@ -18740,11 +19559,11 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:18743: result: $ac_cv_lib_systre_regcomp" >&5 +echo "$as_me:19562: result: $ac_cv_lib_systre_regcomp" >&5 echo "${ECHO_T}$ac_cv_lib_systre_regcomp" >&6 if test "$ac_cv_lib_systre_regcomp" = yes; then - echo "$as_me:18747: checking for libiconv_open in -liconv" >&5 + echo "$as_me:19566: checking for libiconv_open in -liconv" >&5 echo $ECHO_N "checking for libiconv_open in -liconv... $ECHO_C" >&6 if test "${ac_cv_lib_iconv_libiconv_open+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -18752,7 +19571,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-liconv $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 18755 "configure" +#line 19574 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -18761,7 +19580,7 @@ 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 libiconv_open (); +char libiconv_open (void); int main (void) { @@ -18771,16 +19590,16 @@ libiconv_open (); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:18774: \"$ac_link\"") >&5 +if { (eval echo "$as_me:19593: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:18777: \$? = $ac_status" >&5 + echo "$as_me:19596: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:18780: \"$ac_try\"") >&5 + { (eval echo "$as_me:19599: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:18783: \$? = $ac_status" >&5 + echo "$as_me:19602: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_iconv_libiconv_open=yes else @@ -18791,7 +19610,7 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:18794: result: $ac_cv_lib_iconv_libiconv_open" >&5 +echo "$as_me:19613: result: $ac_cv_lib_iconv_libiconv_open" >&5 echo "${ECHO_T}$ac_cv_lib_iconv_libiconv_open" >&6 if test "$ac_cv_lib_iconv_libiconv_open" = yes; then @@ -18813,7 +19632,7 @@ LIBS="$cf_add_libs" fi - echo "$as_me:18816: checking for libintl_gettext in -lintl" >&5 + echo "$as_me:19635: checking for libintl_gettext in -lintl" >&5 echo $ECHO_N "checking for libintl_gettext in -lintl... $ECHO_C" >&6 if test "${ac_cv_lib_intl_libintl_gettext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -18821,7 +19640,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 18824 "configure" +#line 19643 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -18830,7 +19649,7 @@ 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 libintl_gettext (); +char libintl_gettext (void); int main (void) { @@ -18840,16 +19659,16 @@ libintl_gettext (); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:18843: \"$ac_link\"") >&5 +if { (eval echo "$as_me:19662: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:18846: \$? = $ac_status" >&5 + echo "$as_me:19665: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:18849: \"$ac_try\"") >&5 + { (eval echo "$as_me:19668: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:18852: \$? = $ac_status" >&5 + echo "$as_me:19671: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_intl_libintl_gettext=yes else @@ -18860,7 +19679,7 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:18863: result: $ac_cv_lib_intl_libintl_gettext" >&5 +echo "$as_me:19682: result: $ac_cv_lib_intl_libintl_gettext" >&5 echo "${ECHO_T}$ac_cv_lib_intl_libintl_gettext" >&6 if test "$ac_cv_lib_intl_libintl_gettext" = yes; then @@ -18882,7 +19701,7 @@ LIBS="$cf_add_libs" fi - echo "$as_me:18885: checking for tre_regcomp in -ltre" >&5 + echo "$as_me:19704: checking for tre_regcomp in -ltre" >&5 echo $ECHO_N "checking for tre_regcomp in -ltre... $ECHO_C" >&6 if test "${ac_cv_lib_tre_tre_regcomp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -18890,7 +19709,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-ltre $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 18893 "configure" +#line 19712 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -18899,7 +19718,7 @@ 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 tre_regcomp (); +char tre_regcomp (void); int main (void) { @@ -18909,16 +19728,16 @@ tre_regcomp (); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:18912: \"$ac_link\"") >&5 +if { (eval echo "$as_me:19731: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:18915: \$? = $ac_status" >&5 + echo "$as_me:19734: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:18918: \"$ac_try\"") >&5 + { (eval echo "$as_me:19737: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:18921: \$? = $ac_status" >&5 + echo "$as_me:19740: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_tre_tre_regcomp=yes else @@ -18929,7 +19748,7 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:18932: result: $ac_cv_lib_tre_tre_regcomp" >&5 +echo "$as_me:19751: result: $ac_cv_lib_tre_tre_regcomp" >&5 echo "${ECHO_T}$ac_cv_lib_tre_tre_regcomp" >&6 if test "$ac_cv_lib_tre_tre_regcomp" = yes; then @@ -18971,7 +19790,7 @@ LIBS="$cf_add_libs" else - echo "$as_me:18974: checking for regcomp in -lgnurx" >&5 + echo "$as_me:19793: checking for regcomp in -lgnurx" >&5 echo $ECHO_N "checking for regcomp in -lgnurx... $ECHO_C" >&6 if test "${ac_cv_lib_gnurx_regcomp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -18979,7 +19798,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lgnurx $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 18982 "configure" +#line 19801 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -18988,7 +19807,7 @@ 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 regcomp (); +char regcomp (void); int main (void) { @@ -18998,16 +19817,16 @@ regcomp (); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:19001: \"$ac_link\"") >&5 +if { (eval echo "$as_me:19820: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:19004: \$? = $ac_status" >&5 + echo "$as_me:19823: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:19007: \"$ac_try\"") >&5 + { (eval echo "$as_me:19826: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:19010: \$? = $ac_status" >&5 + echo "$as_me:19829: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_gnurx_regcomp=yes else @@ -19018,7 +19837,7 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:19021: result: $ac_cv_lib_gnurx_regcomp" >&5 +echo "$as_me:19840: result: $ac_cv_lib_gnurx_regcomp" >&5 echo "${ECHO_T}$ac_cv_lib_gnurx_regcomp" >&6 if test "$ac_cv_lib_gnurx_regcomp" = yes; then @@ -19046,13 +19865,13 @@ fi ;; (*) cf_regex_libs="regex re" - echo "$as_me:19049: checking for regcomp" >&5 + echo "$as_me:19868: checking for regcomp" >&5 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6 if test "${ac_cv_func_regcomp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 19055 "configure" +#line 19874 "configure" #include "confdefs.h" #define regcomp autoconf_temporary #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */ @@ -19083,16 +19902,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:19086: \"$ac_link\"") >&5 +if { (eval echo "$as_me:19905: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:19089: \$? = $ac_status" >&5 + echo "$as_me:19908: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:19092: \"$ac_try\"") >&5 + { (eval echo "$as_me:19911: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:19095: \$? = $ac_status" >&5 + echo "$as_me:19914: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_func_regcomp=yes else @@ -19102,7 +19921,7 @@ ac_cv_func_regcomp=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi -echo "$as_me:19105: result: $ac_cv_func_regcomp" >&5 +echo "$as_me:19924: result: $ac_cv_func_regcomp" >&5 echo "${ECHO_T}$ac_cv_func_regcomp" >&6 if test "$ac_cv_func_regcomp" = yes; then cf_regex_func=regcomp @@ -19111,7 +19930,7 @@ else for cf_regex_lib in $cf_regex_libs do as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh` -echo "$as_me:19114: checking for regcomp in -l$cf_regex_lib" >&5 +echo "$as_me:19933: checking for regcomp in -l$cf_regex_lib" >&5 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6 if eval "test \"\${$as_ac_Lib+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -19119,7 +19938,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-l$cf_regex_lib $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 19122 "configure" +#line 19941 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -19128,7 +19947,7 @@ 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 regcomp (); +char regcomp (void); int main (void) { @@ -19138,16 +19957,16 @@ regcomp (); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:19141: \"$ac_link\"") >&5 +if { (eval echo "$as_me:19960: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:19144: \$? = $ac_status" >&5 + echo "$as_me:19963: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:19147: \"$ac_try\"") >&5 + { (eval echo "$as_me:19966: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:19150: \$? = $ac_status" >&5 + echo "$as_me:19969: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then eval "$as_ac_Lib=yes" else @@ -19158,7 +19977,7 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:19161: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5 +echo "$as_me:19980: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then @@ -19190,13 +20009,13 @@ fi esac if test "$cf_regex_func" = no ; then - echo "$as_me:19193: checking for compile" >&5 + echo "$as_me:20012: checking for compile" >&5 echo $ECHO_N "checking for compile... $ECHO_C" >&6 if test "${ac_cv_func_compile+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 19199 "configure" +#line 20018 "configure" #include "confdefs.h" #define compile autoconf_temporary #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */ @@ -19227,16 +20046,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:19230: \"$ac_link\"") >&5 +if { (eval echo "$as_me:20049: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:19233: \$? = $ac_status" >&5 + echo "$as_me:20052: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:19236: \"$ac_try\"") >&5 + { (eval echo "$as_me:20055: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:19239: \$? = $ac_status" >&5 + echo "$as_me:20058: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_func_compile=yes else @@ -19246,13 +20065,13 @@ ac_cv_func_compile=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi -echo "$as_me:19249: result: $ac_cv_func_compile" >&5 +echo "$as_me:20068: result: $ac_cv_func_compile" >&5 echo "${ECHO_T}$ac_cv_func_compile" >&6 if test "$ac_cv_func_compile" = yes; then cf_regex_func=compile else - echo "$as_me:19255: checking for compile in -lgen" >&5 + echo "$as_me:20074: checking for compile in -lgen" >&5 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6 if test "${ac_cv_lib_gen_compile+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -19260,7 +20079,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lgen $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 19263 "configure" +#line 20082 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -19269,7 +20088,7 @@ 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 compile (); +char compile (void); int main (void) { @@ -19279,16 +20098,16 @@ compile (); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:19282: \"$ac_link\"") >&5 +if { (eval echo "$as_me:20101: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:19285: \$? = $ac_status" >&5 + echo "$as_me:20104: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:19288: \"$ac_try\"") >&5 + { (eval echo "$as_me:20107: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:19291: \$? = $ac_status" >&5 + echo "$as_me:20110: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_gen_compile=yes else @@ -19299,7 +20118,7 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:19302: result: $ac_cv_lib_gen_compile" >&5 +echo "$as_me:20121: result: $ac_cv_lib_gen_compile" >&5 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6 if test "$ac_cv_lib_gen_compile" = yes; then @@ -19327,11 +20146,11 @@ fi fi if test "$cf_regex_func" = no ; then - { echo "$as_me:19330: WARNING: cannot find regular expression library" >&5 + { echo "$as_me:20149: WARNING: cannot find regular expression library" >&5 echo "$as_me: WARNING: cannot find regular expression library" >&2;} fi -echo "$as_me:19334: checking for regular-expression headers" >&5 +echo "$as_me:20153: checking for regular-expression headers" >&5 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6 if test "${cf_cv_regex_hdrs+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -19343,7 +20162,7 @@ case "$cf_regex_func" in for cf_regex_hdr in regexp.h regexpr.h do cat >"conftest.$ac_ext" <<_ACEOF -#line 19346 "configure" +#line 20165 "configure" #include "confdefs.h" #include <$cf_regex_hdr> int @@ -19360,16 +20179,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:19363: \"$ac_link\"") >&5 +if { (eval echo "$as_me:20182: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:19366: \$? = $ac_status" >&5 + echo "$as_me:20185: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:19369: \"$ac_try\"") >&5 + { (eval echo "$as_me:20188: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:19372: \$? = $ac_status" >&5 + echo "$as_me:20191: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_regex_hdrs=$cf_regex_hdr @@ -19386,7 +20205,7 @@ rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" for cf_regex_hdr in regex.h do cat >"conftest.$ac_ext" <<_ACEOF -#line 19389 "configure" +#line 20208 "configure" #include "confdefs.h" #include <sys/types.h> #include <$cf_regex_hdr> @@ -19406,16 +20225,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:19409: \"$ac_link\"") >&5 +if { (eval echo "$as_me:20228: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:19412: \$? = $ac_status" >&5 + echo "$as_me:20231: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:19415: \"$ac_try\"") >&5 + { (eval echo "$as_me:20234: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:19418: \$? = $ac_status" >&5 + echo "$as_me:20237: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_regex_hdrs=$cf_regex_hdr @@ -19431,11 +20250,11 @@ rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" esac fi -echo "$as_me:19434: result: $cf_cv_regex_hdrs" >&5 +echo "$as_me:20253: result: $cf_cv_regex_hdrs" >&5 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6 case "$cf_cv_regex_hdrs" in - (no) { echo "$as_me:19438: WARNING: no regular expression header found" >&5 + (no) { echo "$as_me:20257: WARNING: no regular expression header found" >&5 echo "$as_me: WARNING: no regular expression header found" >&2;} ;; (regex.h) cat >>confdefs.h <<\EOF @@ -19461,35 +20280,35 @@ limits.h \ locale.h \ math.h \ poll.h \ +sys/auxv.h \ sys/ioctl.h \ sys/param.h \ sys/poll.h \ sys/select.h \ sys/time.h \ sys/times.h \ -ttyent.h \ unistd.h \ wctype.h \ do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:19476: checking for $ac_header" >&5 +echo "$as_me:20295: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 19482 "configure" +#line 20301 "configure" #include "confdefs.h" #include <$ac_header> _ACEOF -if { (eval echo "$as_me:19486: \"$ac_cpp "conftest.$ac_ext"\"") >&5 +if { (eval echo "$as_me:20305: \"$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:19492: \$? = $ac_status" >&5 + echo "$as_me:20311: \$? = $ac_status" >&5 (exit "$ac_status"); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -19508,7 +20327,7 @@ else fi rm -f conftest.err "conftest.$ac_ext" fi -echo "$as_me:19511: result: `eval echo '${'"$as_ac_Header"'}'`" >&5 +echo "$as_me:20330: result: `eval echo '${'"$as_ac_Header"'}'`" >&5 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then cat >>confdefs.h <<EOF @@ -19521,23 +20340,23 @@ done for ac_header in unistd.h getopt.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:19524: checking for $ac_header" >&5 +echo "$as_me:20343: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 19530 "configure" +#line 20349 "configure" #include "confdefs.h" #include <$ac_header> _ACEOF -if { (eval echo "$as_me:19534: \"$ac_cpp "conftest.$ac_ext"\"") >&5 +if { (eval echo "$as_me:20353: \"$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:19540: \$? = $ac_status" >&5 + echo "$as_me:20359: \$? = $ac_status" >&5 (exit "$ac_status"); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -19556,7 +20375,7 @@ else fi rm -f conftest.err "conftest.$ac_ext" fi -echo "$as_me:19559: result: `eval echo '${'"$as_ac_Header"'}'`" >&5 +echo "$as_me:20378: result: `eval echo '${'"$as_ac_Header"'}'`" >&5 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then cat >>confdefs.h <<EOF @@ -19566,7 +20385,7 @@ EOF fi done -echo "$as_me:19569: checking for header declaring getopt variables" >&5 +echo "$as_me:20388: checking for header declaring getopt variables" >&5 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6 if test "${cf_cv_getopt_header+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -19576,29 +20395,29 @@ cf_cv_getopt_header=none for cf_header in stdio.h stdlib.h unistd.h getopt.h do cat >"conftest.$ac_ext" <<_ACEOF -#line 19579 "configure" +#line 20398 "configure" #include "confdefs.h" #include <$cf_header> int main (void) { -int x = optind; char *y = optarg +int x = optind; char *y = optarg; (void)x; (void)y ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:19592: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:20411: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:19595: \$? = $ac_status" >&5 + echo "$as_me:20414: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:19598: \"$ac_try\"") >&5 + { (eval echo "$as_me:20417: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:19601: \$? = $ac_status" >&5 + echo "$as_me:20420: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_getopt_header=$cf_header break @@ -19610,7 +20429,7 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" done fi -echo "$as_me:19613: result: $cf_cv_getopt_header" >&5 +echo "$as_me:20432: result: $cf_cv_getopt_header" >&5 echo "${ECHO_T}$cf_cv_getopt_header" >&6 if test "$cf_cv_getopt_header" != none ; then @@ -19627,39 +20446,36 @@ EOF fi -echo "$as_me:19630: checking if external environ is declared" >&5 +echo "$as_me:20449: checking if external environ is declared" >&5 echo $ECHO_N "checking if external environ is declared... $ECHO_C" >&6 if test "${cf_cv_dcl_environ+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 19637 "configure" +#line 20456 "configure" #include "confdefs.h" -#ifdef HAVE_STDLIB_H -#include <stdlib.h> -#endif -#include <unistd.h> +$ac_includes_default int main (void) { -int x = (int) environ +void* x = (void*) environ; (void)x ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:19653: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:20469: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:19656: \$? = $ac_status" >&5 + echo "$as_me:20472: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:19659: \"$ac_try\"") >&5 + { (eval echo "$as_me:20475: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:19662: \$? = $ac_status" >&5 + echo "$as_me:20478: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_dcl_environ=yes else @@ -19670,7 +20486,7 @@ fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:19673: result: $cf_cv_dcl_environ" >&5 +echo "$as_me:20489: result: $cf_cv_dcl_environ" >&5 echo "${ECHO_T}$cf_cv_dcl_environ" >&6 if test "$cf_cv_dcl_environ" = no ; then @@ -19685,14 +20501,14 @@ fi # It's possible (for near-UNIX clones) that the data doesn't exist -echo "$as_me:19688: checking if external environ exists" >&5 +echo "$as_me:20504: checking if external environ exists" >&5 echo $ECHO_N "checking if external environ exists... $ECHO_C" >&6 if test "${cf_cv_have_environ+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 19695 "configure" +#line 20511 "configure" #include "confdefs.h" #undef environ @@ -19707,16 +20523,16 @@ environ = 2 } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:19710: \"$ac_link\"") >&5 +if { (eval echo "$as_me:20526: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:19713: \$? = $ac_status" >&5 + echo "$as_me:20529: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:19716: \"$ac_try\"") >&5 + { (eval echo "$as_me:20532: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:19719: \$? = $ac_status" >&5 + echo "$as_me:20535: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_have_environ=yes else @@ -19727,7 +20543,7 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi -echo "$as_me:19730: result: $cf_cv_have_environ" >&5 +echo "$as_me:20546: result: $cf_cv_have_environ" >&5 echo "${ECHO_T}$cf_cv_have_environ" >&6 if test "$cf_cv_have_environ" = yes ; then @@ -19740,13 +20556,13 @@ EOF fi -echo "$as_me:19743: checking for getenv" >&5 +echo "$as_me:20559: checking for getenv" >&5 echo $ECHO_N "checking for getenv... $ECHO_C" >&6 if test "${ac_cv_func_getenv+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 19749 "configure" +#line 20565 "configure" #include "confdefs.h" #define getenv autoconf_temporary #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */ @@ -19777,16 +20593,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:19780: \"$ac_link\"") >&5 +if { (eval echo "$as_me:20596: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:19783: \$? = $ac_status" >&5 + echo "$as_me:20599: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:19786: \"$ac_try\"") >&5 + { (eval echo "$as_me:20602: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:19789: \$? = $ac_status" >&5 + echo "$as_me:20605: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_func_getenv=yes else @@ -19796,19 +20612,19 @@ ac_cv_func_getenv=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi -echo "$as_me:19799: result: $ac_cv_func_getenv" >&5 +echo "$as_me:20615: result: $ac_cv_func_getenv" >&5 echo "${ECHO_T}$ac_cv_func_getenv" >&6 for ac_func in putenv setenv strdup do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:19805: checking for $ac_func" >&5 +echo "$as_me:20621: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 19811 "configure" +#line 20627 "configure" #include "confdefs.h" #define $ac_func autoconf_temporary #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */ @@ -19839,16 +20655,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:19842: \"$ac_link\"") >&5 +if { (eval echo "$as_me:20658: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:19845: \$? = $ac_status" >&5 + echo "$as_me:20661: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:19848: \"$ac_try\"") >&5 + { (eval echo "$as_me:20664: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:19851: \$? = $ac_status" >&5 + echo "$as_me:20667: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then eval "$as_ac_var=yes" else @@ -19858,7 +20674,7 @@ eval "$as_ac_var=no" fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi -echo "$as_me:19861: result: `eval echo '${'"$as_ac_var"'}'`" >&5 +echo "$as_me:20677: result: `eval echo '${'"$as_ac_var"'}'`" >&5 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then cat >>confdefs.h <<EOF @@ -19868,7 +20684,7 @@ EOF fi done -echo "$as_me:19871: checking if getenv returns consistent values" >&5 +echo "$as_me:20687: checking if getenv returns consistent values" >&5 echo $ECHO_N "checking if getenv returns consistent values... $ECHO_C" >&6 if test "${cf_cv_consistent_getenv+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -19878,14 +20694,10 @@ if test "$cross_compiling" = yes; then cf_cv_consistent_getenv=unknown else cat >"conftest.$ac_ext" <<_ACEOF -#line 19881 "configure" +#line 20697 "configure" #include "confdefs.h" -#include <stdlib.h> -#include <unistd.h> -#include <stdio.h> -#include <string.h> -#include <sys/types.h> +$ac_includes_default #if defined(HAVE_ENVIRON) && defined(DECL_ENVIRON) && !defined(environ) extern char **environ; /* POSIX, but some systems are not... */ @@ -19951,7 +20763,7 @@ int main(void) } } } while (found); - sprintf(value, "%lu:%p", (unsigned long) k, &mynames[j]); + sprintf(value, "%lu:%p", (unsigned long) k, (void*)&mynames[j]); set_value(name, value); mynames[j] = str_alloc(name); myvalues[j] = str_alloc(value); @@ -19987,15 +20799,15 @@ int main(void) _ACEOF rm -f "conftest$ac_exeext" -if { (eval echo "$as_me:19990: \"$ac_link\"") >&5 +if { (eval echo "$as_me:20802: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:19993: \$? = $ac_status" >&5 + echo "$as_me:20805: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"' - { (eval echo "$as_me:19995: \"$ac_try\"") >&5 + { (eval echo "$as_me:20807: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:19998: \$? = $ac_status" >&5 + echo "$as_me:20810: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_consistent_getenv=yes else @@ -20008,7 +20820,7 @@ rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftes fi fi -echo "$as_me:20011: result: $cf_cv_consistent_getenv" >&5 +echo "$as_me:20823: result: $cf_cv_consistent_getenv" >&5 echo "${ECHO_T}$cf_cv_consistent_getenv" >&6 if test "x$cf_cv_consistent_getenv" = xno @@ -20023,18 +20835,18 @@ fi if test "x$cf_cv_consistent_getenv" = xno && \ test "x$cf_with_trace" = xyes then - { echo "$as_me:20026: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&5 + { echo "$as_me:20838: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&5 echo "$as_me: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&2;} fi -echo "$as_me:20030: checking if sys/time.h works with sys/select.h" >&5 +echo "$as_me:20842: checking if sys/time.h works with sys/select.h" >&5 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6 if test "${cf_cv_sys_time_select+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 20037 "configure" +#line 20849 "configure" #include "confdefs.h" #include <sys/types.h> @@ -20054,16 +20866,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:20057: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:20869: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:20060: \$? = $ac_status" >&5 + echo "$as_me:20872: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:20063: \"$ac_try\"") >&5 + { (eval echo "$as_me:20875: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:20066: \$? = $ac_status" >&5 + echo "$as_me:20878: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_sys_time_select=yes else @@ -20075,7 +20887,7 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:20078: result: $cf_cv_sys_time_select" >&5 +echo "$as_me:20890: result: $cf_cv_sys_time_select" >&5 echo "${ECHO_T}$cf_cv_sys_time_select" >&6 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF @@ -20090,13 +20902,13 @@ ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ex ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_main_return="return" -echo "$as_me:20093: checking for an ANSI C-conforming const" >&5 +echo "$as_me:20905: checking for an ANSI C-conforming const" >&5 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6 if test "${ac_cv_c_const+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 20099 "configure" +#line 20911 "configure" #include "confdefs.h" int @@ -20106,13 +20918,13 @@ main (void) #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; - const charset x; + const charset x; (void)x; /* SunOS 4.1.1 cc rejects this. */ char const *const *ccp; char **p; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; - static struct point const zero = {0,0}; + static struct point const zero = {0,0}; (void)zero; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant @@ -20128,16 +20940,19 @@ main (void) char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; + (void)s; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; + (void)foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; + (void)p; } { /* AIX XL C 1.02.0.0 rejects this saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ @@ -20146,6 +20961,7 @@ main (void) } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; + (void)foo; } #endif @@ -20154,16 +20970,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:20157: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:20973: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:20160: \$? = $ac_status" >&5 + echo "$as_me:20976: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:20163: \"$ac_try\"") >&5 + { (eval echo "$as_me:20979: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:20166: \$? = $ac_status" >&5 + echo "$as_me:20982: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_c_const=yes else @@ -20173,7 +20989,7 @@ ac_cv_c_const=no fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:20176: result: $ac_cv_c_const" >&5 +echo "$as_me:20992: result: $ac_cv_c_const" >&5 echo "${ECHO_T}$ac_cv_c_const" >&6 if test $ac_cv_c_const = no; then @@ -20183,7 +20999,7 @@ EOF fi -echo "$as_me:20186: checking for inline" >&5 +echo "$as_me:21002: checking for inline" >&5 echo $ECHO_N "checking for inline... $ECHO_C" >&6 if test "${ac_cv_c_inline+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -20191,25 +21007,25 @@ else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat >"conftest.$ac_ext" <<_ACEOF -#line 20194 "configure" +#line 21010 "configure" #include "confdefs.h" #ifndef __cplusplus -static $ac_kw int static_foo () {return 0; } -$ac_kw int foo () {return 0; } +static $ac_kw int static_foo (void) {return 0; } +$ac_kw int foo (void) {return 0; } #endif _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:20203: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:21019: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:20206: \$? = $ac_status" >&5 + echo "$as_me:21022: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:20209: \"$ac_try\"") >&5 + { (eval echo "$as_me:21025: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:20212: \$? = $ac_status" >&5 + echo "$as_me:21028: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_c_inline=$ac_kw; break else @@ -20220,7 +21036,7 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" done fi -echo "$as_me:20223: result: $ac_cv_c_inline" >&5 +echo "$as_me:21039: result: $ac_cv_c_inline" >&5 echo "${ECHO_T}$ac_cv_c_inline" >&6 case $ac_cv_c_inline in inline | yes) ;; @@ -20246,7 +21062,7 @@ if test "$ac_cv_c_inline" != no ; then : elif test "$GCC" = yes then - echo "$as_me:20249: checking if $CC supports options to tune inlining" >&5 + echo "$as_me:21065: checking if $CC supports options to tune inlining" >&5 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6 if test "${cf_cv_gcc_inline+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -20255,7 +21071,7 @@ else cf_save_CFLAGS=$CFLAGS CFLAGS="$CFLAGS --param max-inline-insns-single=1200" cat >"conftest.$ac_ext" <<_ACEOF -#line 20258 "configure" +#line 21074 "configure" #include "confdefs.h" inline int foo(void) { return 1; } int @@ -20267,16 +21083,16 @@ ${cf_cv_main_return:-return} foo() } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:20270: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:21086: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:20273: \$? = $ac_status" >&5 + echo "$as_me:21089: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:20276: \"$ac_try\"") >&5 + { (eval echo "$as_me:21092: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:20279: \$? = $ac_status" >&5 + echo "$as_me:21095: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_gcc_inline=yes else @@ -20288,7 +21104,7 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" CFLAGS=$cf_save_CFLAGS fi -echo "$as_me:20291: result: $cf_cv_gcc_inline" >&5 +echo "$as_me:21107: result: $cf_cv_gcc_inline" >&5 echo "${ECHO_T}$cf_cv_gcc_inline" >&6 if test "$cf_cv_gcc_inline" = yes ; then @@ -20394,7 +21210,7 @@ fi fi fi -echo "$as_me:20397: checking for signal global datatype" >&5 +echo "$as_me:21213: checking for signal global datatype" >&5 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6 if test "${cf_cv_sig_atomic_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -20406,7 +21222,7 @@ else "int" do cat >"conftest.$ac_ext" <<_ACEOF -#line 20409 "configure" +#line 21225 "configure" #include "confdefs.h" #include <sys/types.h> @@ -20430,16 +21246,16 @@ signal(SIGINT, handler); } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:20433: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:21249: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:20436: \$? = $ac_status" >&5 + echo "$as_me:21252: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:20439: \"$ac_try\"") >&5 + { (eval echo "$as_me:21255: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:20442: \$? = $ac_status" >&5 + echo "$as_me:21258: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_sig_atomic_t=$cf_type else @@ -20453,7 +21269,7 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:20456: result: $cf_cv_sig_atomic_t" >&5 +echo "$as_me:21272: result: $cf_cv_sig_atomic_t" >&5 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF @@ -20462,7 +21278,7 @@ EOF if test "$NCURSES_CHTYPE" = auto ; then -echo "$as_me:20465: checking for type of chtype" >&5 +echo "$as_me:21281: checking for type of chtype" >&5 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6 if test "${cf_cv_typeof_chtype+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -20472,11 +21288,11 @@ else cf_cv_typeof_chtype=long else cat >"conftest.$ac_ext" <<_ACEOF -#line 20475 "configure" +#line 21291 "configure" #include "confdefs.h" +$ac_includes_default #define WANT_BITS 31 -#include <stdio.h> int main(void) { FILE *fp = fopen("cf_test.out", "w"); @@ -20507,15 +21323,15 @@ int main(void) _ACEOF rm -f "conftest$ac_exeext" -if { (eval echo "$as_me:20510: \"$ac_link\"") >&5 +if { (eval echo "$as_me:21326: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:20513: \$? = $ac_status" >&5 + echo "$as_me:21329: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"' - { (eval echo "$as_me:20515: \"$ac_try\"") >&5 + { (eval echo "$as_me:21331: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:20518: \$? = $ac_status" >&5 + echo "$as_me:21334: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_typeof_chtype=`cat cf_test.out` else @@ -20530,7 +21346,7 @@ fi fi -echo "$as_me:20533: result: $cf_cv_typeof_chtype" >&5 +echo "$as_me:21349: result: $cf_cv_typeof_chtype" >&5 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6 cat >>confdefs.h <<EOF @@ -20542,35 +21358,35 @@ else fi test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype="" -echo "$as_me:20545: checking if unsigned literals are legal" >&5 +echo "$as_me:21361: checking if unsigned literals are legal" >&5 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6 if test "${cf_cv_unsigned_literals+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 20552 "configure" +#line 21368 "configure" #include "confdefs.h" int main (void) { -long x = 1L + 1UL + 1U + 1 +long x = 1L + 1UL + 1U + 1; (void)x ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:20564: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:21380: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:20567: \$? = $ac_status" >&5 + echo "$as_me:21383: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:20570: \"$ac_try\"") >&5 + { (eval echo "$as_me:21386: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:20573: \$? = $ac_status" >&5 + echo "$as_me:21389: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_unsigned_literals=yes else @@ -20582,7 +21398,7 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:20585: result: $cf_cv_unsigned_literals" >&5 +echo "$as_me:21401: result: $cf_cv_unsigned_literals" >&5 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6 cf_cv_1UL="1" @@ -20598,21 +21414,17 @@ test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t="" ### Checks for external-data -echo "$as_me:20601: checking if external errno is declared" >&5 +echo "$as_me:21417: checking if external errno is declared" >&5 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6 if test "${cf_cv_dcl_errno+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 20608 "configure" +#line 21424 "configure" #include "confdefs.h" -#ifdef HAVE_STDLIB_H -#include <stdlib.h> -#endif -#include <stdio.h> -#include <sys/types.h> +$ac_includes_default #include <errno.h> int main (void) @@ -20623,16 +21435,16 @@ int x = (int) errno; (void)x } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:20626: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:21438: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:20629: \$? = $ac_status" >&5 + echo "$as_me:21441: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:20632: \"$ac_try\"") >&5 + { (eval echo "$as_me:21444: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:20635: \$? = $ac_status" >&5 + echo "$as_me:21447: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_dcl_errno=yes else @@ -20643,7 +21455,7 @@ fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:20646: result: $cf_cv_dcl_errno" >&5 +echo "$as_me:21458: result: $cf_cv_dcl_errno" >&5 echo "${ECHO_T}$cf_cv_dcl_errno" >&6 if test "$cf_cv_dcl_errno" = no ; then @@ -20658,14 +21470,14 @@ fi # It's possible (for near-UNIX clones) that the data doesn't exist -echo "$as_me:20661: checking if external errno exists" >&5 +echo "$as_me:21473: checking if external errno exists" >&5 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6 if test "${cf_cv_have_errno+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 20668 "configure" +#line 21480 "configure" #include "confdefs.h" #undef errno @@ -20674,158 +21486,356 @@ extern int errno; int main (void) { -errno = 2 +errno = 2 + ; + return 0; +} +_ACEOF +rm -f "conftest.$ac_objext" "conftest$ac_exeext" +if { (eval echo "$as_me:21495: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:21498: \$? = $ac_status" >&5 + (exit "$ac_status"); } && + { ac_try='test -s "conftest$ac_exeext"' + { (eval echo "$as_me:21501: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:21504: \$? = $ac_status" >&5 + (exit "$ac_status"); }; }; then + cf_cv_have_errno=yes +else + echo "$as_me: failed program was:" >&5 +cat "conftest.$ac_ext" >&5 +cf_cv_have_errno=no +fi +rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" + +fi +echo "$as_me:21515: result: $cf_cv_have_errno" >&5 +echo "${ECHO_T}$cf_cv_have_errno" >&6 + +if test "$cf_cv_have_errno" = yes ; then + +cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%` + + cat >>confdefs.h <<EOF +#define $cf_result 1 +EOF + +fi + +echo "$as_me:21528: checking if data-only library module links" >&5 +echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6 +if test "${cf_cv_link_dataonly+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + rm -f conftest.a + cat >conftest.$ac_ext <<EOF +#line 21536 "configure" +int testdata[3] = { 123, 456, 789 }; +EOF + if { (eval echo "$as_me:21539: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:21542: \$? = $ac_status" >&5 + (exit "$ac_status"); } ; then + mv conftest.o data.o && \ + ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null + fi + rm -f conftest.$ac_ext data.o + cat >conftest.$ac_ext <<EOF +#line 21549 "configure" +extern int testfunc(void); +#if defined(NeXT) +int testfunc(void) +{ + ${cf_cv_main_return:-return}(1); /* I'm told this linker is broken */ +} +#else +extern int testdata[3]; +int testfunc(void) +{ + return testdata[0] == 123 + && testdata[1] == 456 + && testdata[2] == 789; +} +#endif +EOF + if { (eval echo "$as_me:21566: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:21569: \$? = $ac_status" >&5 + (exit "$ac_status"); }; then + mv conftest.o func.o && \ + ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null + fi + rm -f conftest.$ac_ext func.o + ( eval $RANLIB conftest.a ) 2>&5 >/dev/null + cf_saveLIBS="$LIBS" + LIBS="conftest.a $LIBS" + if test "$cross_compiling" = yes; then + cf_cv_link_dataonly=unknown +else + cat >"conftest.$ac_ext" <<_ACEOF +#line 21582 "configure" +#include "confdefs.h" + + extern int testfunc(void); + int main(void) + { + ${cf_cv_main_return:-return} (!testfunc()); + } + +_ACEOF +rm -f "conftest$ac_exeext" +if { (eval echo "$as_me:21593: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:21596: \$? = $ac_status" >&5 + (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"' + { (eval echo "$as_me:21598: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:21601: \$? = $ac_status" >&5 + (exit "$ac_status"); }; }; then + cf_cv_link_dataonly=yes +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat "conftest.$ac_ext" >&5 +cf_cv_link_dataonly=no +fi +rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext" +fi + LIBS="$cf_saveLIBS" + +fi + +echo "$as_me:21616: result: $cf_cv_link_dataonly" >&5 +echo "${ECHO_T}$cf_cv_link_dataonly" >&6 + +if test "$cf_cv_link_dataonly" = no ; then + +cat >>confdefs.h <<\EOF +#define BROKEN_LINKER 1 +EOF + + BROKEN_LINKER=1 +fi + +### Checks for library functions. + +echo "$as_me:21630: checking for clock_gettime" >&5 +echo $ECHO_N "checking for clock_gettime... $ECHO_C" >&6 +if test "${cf_cv_func_clock_gettime+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + cat >"conftest.$ac_ext" <<_ACEOF +#line 21637 "configure" +#include "confdefs.h" +#include <time.h> +int +main (void) +{ +struct timespec ts; + int rc = clock_gettime(CLOCK_REALTIME, &ts); (void) rc; (void)ts + ; + return 0; +} +_ACEOF +rm -f "conftest.$ac_objext" "conftest$ac_exeext" +if { (eval echo "$as_me:21650: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:21653: \$? = $ac_status" >&5 + (exit "$ac_status"); } && + { ac_try='test -s "conftest$ac_exeext"' + { (eval echo "$as_me:21656: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:21659: \$? = $ac_status" >&5 + (exit "$ac_status"); }; }; then + cf_cv_func_clock_gettime=yes +else + echo "$as_me: failed program was:" >&5 +cat "conftest.$ac_ext" >&5 +cf_cv_func_clock_gettime=no +fi +rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" + +fi +echo "$as_me:21670: result: $cf_cv_func_clock_gettime" >&5 +echo "${ECHO_T}$cf_cv_func_clock_gettime" >&6 + +if test "$cf_cv_func_clock_gettime" = yes +then + +cat >>confdefs.h <<\EOF +#define HAVE_CLOCK_GETTIME 1 +EOF + +else +echo "$as_me:21681: checking for gettimeofday" >&5 +echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6 +if test "${ac_cv_func_gettimeofday+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >"conftest.$ac_ext" <<_ACEOF +#line 21687 "configure" +#include "confdefs.h" +#define gettimeofday autoconf_temporary +#include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */ +#undef gettimeofday + +#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 gettimeofday (void); + +int +main (void) +{ + +/* The GNU C library defines stubs 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_gettimeofday) || defined (__stub___gettimeofday) +#error found stub for gettimeofday +#endif + + return gettimeofday (); ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:20683: \"$ac_link\"") >&5 +if { (eval echo "$as_me:21718: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:20686: \$? = $ac_status" >&5 + echo "$as_me:21721: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:20689: \"$ac_try\"") >&5 + { (eval echo "$as_me:21724: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:20692: \$? = $ac_status" >&5 + echo "$as_me:21727: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then - cf_cv_have_errno=yes + ac_cv_func_gettimeofday=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 -cf_cv_have_errno=no +ac_cv_func_gettimeofday=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" - fi -echo "$as_me:20703: result: $cf_cv_have_errno" >&5 -echo "${ECHO_T}$cf_cv_have_errno" >&6 - -if test "$cf_cv_have_errno" = yes ; then - -cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%` +echo "$as_me:21737: result: $ac_cv_func_gettimeofday" >&5 +echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6 +if test "$ac_cv_func_gettimeofday" = yes; then - cat >>confdefs.h <<EOF -#define $cf_result 1 +cat >>confdefs.h <<\EOF +#define HAVE_GETTIMEOFDAY 1 EOF -fi +else -echo "$as_me:20716: checking if data-only library module links" >&5 -echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6 -if test "${cf_cv_link_dataonly+set}" = set; then +echo "$as_me:21747: checking for gettimeofday in -lbsd" >&5 +echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6 +if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lbsd $LIBS" +cat >"conftest.$ac_ext" <<_ACEOF +#line 21755 "configure" +#include "confdefs.h" - rm -f conftest.a - cat >conftest.$ac_ext <<EOF -#line 20724 "configure" -int testdata[3] = { 123, 456, 789 }; -EOF - if { (eval echo "$as_me:20727: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:20730: \$? = $ac_status" >&5 - (exit "$ac_status"); } ; then - mv conftest.o data.o && \ - ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null - fi - rm -f conftest.$ac_ext data.o - cat >conftest.$ac_ext <<EOF -#line 20737 "configure" -int testfunc(void) -{ -#if defined(NeXT) - ${cf_cv_main_return:-return}(1); /* I'm told this linker is broken */ -#else - extern int testdata[3]; - return testdata[0] == 123 - && testdata[1] == 456 - && testdata[2] == 789; +/* 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 gettimeofday (void); +int +main (void) +{ +gettimeofday (); + ; + return 0; } -EOF - if { (eval echo "$as_me:20750: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:20753: \$? = $ac_status" >&5 - (exit "$ac_status"); }; then - mv conftest.o func.o && \ - ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null - fi - rm -f conftest.$ac_ext func.o - ( eval $RANLIB conftest.a ) 2>&5 >/dev/null - cf_saveLIBS="$LIBS" - LIBS="conftest.a $LIBS" - if test "$cross_compiling" = yes; then - cf_cv_link_dataonly=unknown -else - cat >"conftest.$ac_ext" <<_ACEOF -#line 20766 "configure" -#include "confdefs.h" - - int main(void) - { - extern int testfunc(); - ${cf_cv_main_return:-return} (!testfunc()); - } - _ACEOF -rm -f "conftest$ac_exeext" -if { (eval echo "$as_me:20777: \"$ac_link\"") >&5 +rm -f "conftest.$ac_objext" "conftest$ac_exeext" +if { (eval echo "$as_me:21774: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:20780: \$? = $ac_status" >&5 - (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"' - { (eval echo "$as_me:20782: \"$ac_try\"") >&5 + echo "$as_me:21777: \$? = $ac_status" >&5 + (exit "$ac_status"); } && + { ac_try='test -s "conftest$ac_exeext"' + { (eval echo "$as_me:21780: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:20785: \$? = $ac_status" >&5 + echo "$as_me:21783: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then - cf_cv_link_dataonly=yes + ac_cv_lib_bsd_gettimeofday=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 -cf_cv_link_dataonly=no -fi -rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext" +ac_cv_lib_bsd_gettimeofday=no fi - LIBS="$cf_saveLIBS" - +rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" +LIBS=$ac_check_lib_save_LIBS fi - -echo "$as_me:20800: result: $cf_cv_link_dataonly" >&5 -echo "${ECHO_T}$cf_cv_link_dataonly" >&6 - -if test "$cf_cv_link_dataonly" = no ; then +echo "$as_me:21794: result: $ac_cv_lib_bsd_gettimeofday" >&5 +echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6 +if test "$ac_cv_lib_bsd_gettimeofday" = yes; then cat >>confdefs.h <<\EOF -#define BROKEN_LINKER 1 +#define HAVE_GETTIMEOFDAY 1 EOF - BROKEN_LINKER=1 +cf_add_libs="$LIBS" +# reverse order +cf_add_0lib= +for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done +# filter duplicates +for cf_add_1lib in $cf_add_0lib; do + for cf_add_2lib in $cf_add_libs; do + if test "x$cf_add_1lib" = "x$cf_add_2lib"; then + cf_add_1lib= + break + fi + done + test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs" +done +LIBS="$cf_add_libs" + fi -### Checks for library functions. +fi +fi for ac_func in \ +fpathconf \ getcwd \ +getauxval \ getegid \ geteuid \ getopt \ -getttynam \ +getuid \ issetugid \ localeconv \ poll \ -putenv \ remove \ select \ setbuf \ setbuffer \ -setenv \ +setfsuid \ setvbuf \ sigaction \ sigvec \ @@ -20840,13 +21850,13 @@ vsnprintf \ do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:20843: checking for $ac_func" >&5 +echo "$as_me:21853: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 20849 "configure" +#line 21859 "configure" #include "confdefs.h" #define $ac_func autoconf_temporary #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */ @@ -20877,16 +21887,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:20880: \"$ac_link\"") >&5 +if { (eval echo "$as_me:21890: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:20883: \$? = $ac_status" >&5 + echo "$as_me:21893: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:20886: \"$ac_try\"") >&5 + { (eval echo "$as_me:21896: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:20889: \$? = $ac_status" >&5 + echo "$as_me:21899: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then eval "$as_ac_var=yes" else @@ -20896,7 +21906,7 @@ eval "$as_ac_var=no" fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi -echo "$as_me:20899: result: `eval echo '${'"$as_ac_var"'}'`" >&5 +echo "$as_me:21909: result: `eval echo '${'"$as_ac_var"'}'`" >&5 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then cat >>confdefs.h <<EOF @@ -20906,9 +21916,173 @@ EOF fi done +echo "$as_me:21919: checking if _PATH_TTYS is defined in ttyent.h" >&5 +echo $ECHO_N "checking if _PATH_TTYS is defined in ttyent.h... $ECHO_C" >&6 +if test "${cf_cv_PATH_TTYS+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + +cat >"conftest.$ac_ext" <<_ACEOF +#line 21926 "configure" +#include "confdefs.h" + +#include <stdio.h> +#include <ttyent.h> +int +main (void) +{ + +FILE *fp = fopen(_PATH_TTYS, "r"); (void)fp + ; + return 0; +} +_ACEOF +rm -f "conftest.$ac_objext" +if { (eval echo "$as_me:21941: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:21944: \$? = $ac_status" >&5 + (exit "$ac_status"); } && + { ac_try='test -s "conftest.$ac_objext"' + { (eval echo "$as_me:21947: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:21950: \$? = $ac_status" >&5 + (exit "$ac_status"); }; }; then + cf_cv_PATH_TTYS=yes +else + echo "$as_me: failed program was:" >&5 +cat "conftest.$ac_ext" >&5 +cf_cv_PATH_TTYS=no +fi +rm -f "conftest.$ac_objext" "conftest.$ac_ext" +fi +echo "$as_me:21960: result: $cf_cv_PATH_TTYS" >&5 +echo "${ECHO_T}$cf_cv_PATH_TTYS" >&6 + +if test $cf_cv_PATH_TTYS = no +then + for cf_ttys in /etc/ttytype /etc/ttys + do + if test -f $cf_ttys + then + cf_cv_PATH_TTYS=maybe + +cat >>confdefs.h <<\EOF +#define _PATH_TTYS $cf_ttys +EOF + + break + fi + done +fi + +if test $cf_cv_PATH_TTYS != no +then + echo "$as_me:21982: checking if _PATH_TTYS file exists" >&5 +echo $ECHO_N "checking if _PATH_TTYS file exists... $ECHO_C" >&6 +if test "${cf_cv_have_PATH_TTYS+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + if test "$cross_compiling" = yes; then + cf_cv_have_PATH_TTYS=unknown +else + cat >"conftest.$ac_ext" <<_ACEOF +#line 21992 "configure" +#include "confdefs.h" + +$ac_includes_default + +#include <ttyent.h> + +int main(void) { + FILE *fp = fopen(_PATH_TTYS, "r"); + ${cf_cv_main_return:-return} (fp == 0); +} +_ACEOF +rm -f "conftest$ac_exeext" +if { (eval echo "$as_me:22005: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:22008: \$? = $ac_status" >&5 + (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"' + { (eval echo "$as_me:22010: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:22013: \$? = $ac_status" >&5 + (exit "$ac_status"); }; }; then + cf_cv_have_PATH_TTYS=yes +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat "conftest.$ac_ext" >&5 +cf_cv_have_PATH_TTYS=no +fi +rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext" +fi +fi +echo "$as_me:22025: result: $cf_cv_have_PATH_TTYS" >&5 +echo "${ECHO_T}$cf_cv_have_PATH_TTYS" >&6 + test "$cf_cv_have_PATH_TTYS" = no && cf_cv_PATH_TTYS=no +fi + +if test $cf_cv_PATH_TTYS != no +then + +cat >>confdefs.h <<\EOF +#define HAVE_PATH_TTYS 1 +EOF + + echo "$as_me:22037: checking for getttynam" >&5 +echo $ECHO_N "checking for getttynam... $ECHO_C" >&6 +if test "${cf_cv_func_getttynam+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + cat >"conftest.$ac_ext" <<_ACEOF +#line 22044 "configure" +#include "confdefs.h" +#include <ttyent.h> +int +main (void) +{ +struct ttyent *fp = getttynam("/dev/tty"); (void)fp + ; + return 0; +} +_ACEOF +rm -f "conftest.$ac_objext" "conftest$ac_exeext" +if { (eval echo "$as_me:22056: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:22059: \$? = $ac_status" >&5 + (exit "$ac_status"); } && + { ac_try='test -s "conftest$ac_exeext"' + { (eval echo "$as_me:22062: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:22065: \$? = $ac_status" >&5 + (exit "$ac_status"); }; }; then + cf_cv_func_getttynam=yes +else + echo "$as_me: failed program was:" >&5 +cat "conftest.$ac_ext" >&5 +cf_cv_func_getttynam=no +fi +rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" +fi +echo "$as_me:22075: result: $cf_cv_func_getttynam" >&5 +echo "${ECHO_T}$cf_cv_func_getttynam" >&6 + test "$cf_cv_func_getttynam" = yes && cat >>confdefs.h <<\EOF +#define HAVE_GETTTYNAM 1 +EOF + +fi + if test "x$ac_cv_func_getopt" = xno && \ test "x$cf_with_progs$cf_with_tests" != xnono; then - { { echo "$as_me:20911: error: getopt is required for building programs" >&5 + { { echo "$as_me:22085: error: getopt is required for building programs" >&5 echo "$as_me: error: getopt is required for building programs" >&2;} { (exit 1); exit 1; }; } fi @@ -20917,7 +22091,7 @@ if test "x$with_safe_sprintf" = xyes then if test "x$ac_cv_func_vsnprintf" = xyes then - { echo "$as_me:20920: WARNING: will use vsnprintf instead of safe-sprintf option" >&5 + { echo "$as_me:22094: WARNING: will use vsnprintf instead of safe-sprintf option" >&5 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;} else @@ -20930,17 +22104,17 @@ fi if test "x$with_getcap" = "xyes" ; then -echo "$as_me:20933: checking for terminal-capability database functions" >&5 +echo "$as_me:22107: checking for terminal-capability database functions" >&5 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6 if test "${cf_cv_cgetent+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 20940 "configure" +#line 22114 "configure" #include "confdefs.h" -#include <stdlib.h> +$ac_includes_default int main (void) { @@ -20957,16 +22131,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:20960: \"$ac_link\"") >&5 +if { (eval echo "$as_me:22134: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:20963: \$? = $ac_status" >&5 + echo "$as_me:22137: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:20966: \"$ac_try\"") >&5 + { (eval echo "$as_me:22140: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:20969: \$? = $ac_status" >&5 + echo "$as_me:22143: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_cgetent=yes else @@ -20977,7 +22151,7 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi -echo "$as_me:20980: result: $cf_cv_cgetent" >&5 +echo "$as_me:22154: result: $cf_cv_cgetent" >&5 echo "${ECHO_T}$cf_cv_cgetent" >&6 if test "$cf_cv_cgetent" = yes @@ -20987,18 +22161,18 @@ cat >>confdefs.h <<\EOF #define HAVE_BSD_CGETENT 1 EOF -echo "$as_me:20990: checking if cgetent uses const parameter" >&5 +echo "$as_me:22164: checking if cgetent uses const parameter" >&5 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6 if test "${cf_cv_cgetent_const+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 20997 "configure" +#line 22171 "configure" #include "confdefs.h" #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers" -#include <stdlib.h> +$ac_includes_default int main (void) { @@ -21017,16 +22191,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:21020: \"$ac_link\"") >&5 +if { (eval echo "$as_me:22194: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:21023: \$? = $ac_status" >&5 + echo "$as_me:22197: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:21026: \"$ac_try\"") >&5 + { (eval echo "$as_me:22200: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:21029: \$? = $ac_status" >&5 + echo "$as_me:22203: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_cgetent_const=yes else @@ -21037,7 +22211,7 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi -echo "$as_me:21040: result: $cf_cv_cgetent_const" >&5 +echo "$as_me:22214: result: $cf_cv_cgetent_const" >&5 echo "${ECHO_T}$cf_cv_cgetent_const" >&6 if test "$cf_cv_cgetent_const" = yes then @@ -21051,35 +22225,35 @@ fi fi -echo "$as_me:21054: checking for isascii" >&5 +echo "$as_me:22228: checking for isascii" >&5 echo $ECHO_N "checking for isascii... $ECHO_C" >&6 if test "${cf_cv_have_isascii+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 21061 "configure" +#line 22235 "configure" #include "confdefs.h" #include <ctype.h> int main (void) { -int x = isascii(' ') +int x = isascii(' '); (void)x ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:21073: \"$ac_link\"") >&5 +if { (eval echo "$as_me:22247: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:21076: \$? = $ac_status" >&5 + echo "$as_me:22250: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:21079: \"$ac_try\"") >&5 + { (eval echo "$as_me:22253: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:21082: \$? = $ac_status" >&5 + echo "$as_me:22256: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_have_isascii=yes else @@ -21090,7 +22264,7 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi -echo "$as_me:21093: result: $cf_cv_have_isascii" >&5 +echo "$as_me:22267: result: $cf_cv_have_isascii" >&5 echo "${ECHO_T}$cf_cv_have_isascii" >&6 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF @@ -21098,10 +22272,10 @@ cat >>confdefs.h <<\EOF EOF if test "$ac_cv_func_sigaction" = yes; then -echo "$as_me:21101: checking whether sigaction needs _POSIX_SOURCE" >&5 +echo "$as_me:22275: checking whether sigaction needs _POSIX_SOURCE" >&5 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6 cat >"conftest.$ac_ext" <<_ACEOF -#line 21104 "configure" +#line 22278 "configure" #include "confdefs.h" #include <sys/types.h> @@ -21109,22 +22283,22 @@ cat >"conftest.$ac_ext" <<_ACEOF int main (void) { -struct sigaction act +struct sigaction act; (void)act ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:21118: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:22292: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:21121: \$? = $ac_status" >&5 + echo "$as_me:22295: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:21124: \"$ac_try\"") >&5 + { (eval echo "$as_me:22298: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:21127: \$? = $ac_status" >&5 + echo "$as_me:22301: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then sigact_bad=no else @@ -21132,7 +22306,7 @@ else cat "conftest.$ac_ext" >&5 cat >"conftest.$ac_ext" <<_ACEOF -#line 21135 "configure" +#line 22309 "configure" #include "confdefs.h" #define _POSIX_SOURCE @@ -21141,22 +22315,22 @@ cat >"conftest.$ac_ext" <<_ACEOF int main (void) { -struct sigaction act +struct sigaction act; (void)act ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:21150: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:22324: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:21153: \$? = $ac_status" >&5 + echo "$as_me:22327: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:21156: \"$ac_try\"") >&5 + { (eval echo "$as_me:22330: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:21159: \$? = $ac_status" >&5 + echo "$as_me:22333: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then sigact_bad=yes @@ -21172,11 +22346,11 @@ fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" -echo "$as_me:21175: result: $sigact_bad" >&5 +echo "$as_me:22349: result: $sigact_bad" >&5 echo "${ECHO_T}$sigact_bad" >&6 fi -echo "$as_me:21179: checking if nanosleep really works" >&5 +echo "$as_me:22353: checking if nanosleep really works" >&5 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6 if test "${cf_cv_func_nanosleep+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -21186,10 +22360,11 @@ if test "$cross_compiling" = yes; then cf_cv_func_nanosleep=unknown else cat >"conftest.$ac_ext" <<_ACEOF -#line 21189 "configure" +#line 22363 "configure" #include "confdefs.h" -#include <stdio.h> +$ac_includes_default + #include <errno.h> #include <time.h> @@ -21211,15 +22386,15 @@ int main(void) { _ACEOF rm -f "conftest$ac_exeext" -if { (eval echo "$as_me:21214: \"$ac_link\"") >&5 +if { (eval echo "$as_me:22389: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:21217: \$? = $ac_status" >&5 + echo "$as_me:22392: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"' - { (eval echo "$as_me:21219: \"$ac_try\"") >&5 + { (eval echo "$as_me:22394: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:21222: \$? = $ac_status" >&5 + echo "$as_me:22397: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_func_nanosleep=yes else @@ -21231,7 +22406,7 @@ fi rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext" fi fi -echo "$as_me:21234: result: $cf_cv_func_nanosleep" >&5 +echo "$as_me:22409: result: $cf_cv_func_nanosleep" >&5 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6 test "$cf_cv_func_nanosleep" = "yes" && @@ -21248,23 +22423,23 @@ sys/termio.h \ do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:21251: checking for $ac_header" >&5 +echo "$as_me:22426: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 21257 "configure" +#line 22432 "configure" #include "confdefs.h" #include <$ac_header> _ACEOF -if { (eval echo "$as_me:21261: \"$ac_cpp "conftest.$ac_ext"\"") >&5 +if { (eval echo "$as_me:22436: \"$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:21267: \$? = $ac_status" >&5 + echo "$as_me:22442: \$? = $ac_status" >&5 (exit "$ac_status"); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -21283,7 +22458,7 @@ else fi rm -f conftest.err "conftest.$ac_ext" fi -echo "$as_me:21286: result: `eval echo '${'"$as_ac_Header"'}'`" >&5 +echo "$as_me:22461: result: `eval echo '${'"$as_ac_Header"'}'`" >&5 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then cat >>confdefs.h <<EOF @@ -21300,31 +22475,31 @@ if test "$ac_cv_header_termios_h" = yes ; then (*) termios_bad=maybe ;; esac if test "$termios_bad" = maybe ; then - echo "$as_me:21303: checking whether termios.h needs _POSIX_SOURCE" >&5 + echo "$as_me:22478: checking whether termios.h needs _POSIX_SOURCE" >&5 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6 cat >"conftest.$ac_ext" <<_ACEOF -#line 21306 "configure" +#line 22481 "configure" #include "confdefs.h" #include <termios.h> int main (void) { -struct termios foo; int x = foo.c_iflag = 1; (void)x +struct termios foo; int x = (int)(foo.c_iflag = 1); (void)x ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:21318: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:22493: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:21321: \$? = $ac_status" >&5 + echo "$as_me:22496: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:21324: \"$ac_try\"") >&5 + { (eval echo "$as_me:22499: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:21327: \$? = $ac_status" >&5 + echo "$as_me:22502: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then termios_bad=no else @@ -21332,7 +22507,7 @@ else cat "conftest.$ac_ext" >&5 cat >"conftest.$ac_ext" <<_ACEOF -#line 21335 "configure" +#line 22510 "configure" #include "confdefs.h" #define _POSIX_SOURCE @@ -21340,22 +22515,22 @@ cat "conftest.$ac_ext" >&5 int main (void) { -struct termios foo; int x = foo.c_iflag = 2; (void)x +struct termios foo; int x = (int)(foo.c_iflag = 2); (void)x ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:21349: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:22524: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:21352: \$? = $ac_status" >&5 + echo "$as_me:22527: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:21355: \"$ac_try\"") >&5 + { (eval echo "$as_me:22530: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:21358: \$? = $ac_status" >&5 + echo "$as_me:22533: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then termios_bad=unknown else @@ -21371,19 +22546,19 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" - echo "$as_me:21374: result: $termios_bad" >&5 + echo "$as_me:22549: result: $termios_bad" >&5 echo "${ECHO_T}$termios_bad" >&6 fi fi -echo "$as_me:21379: checking for tcgetattr" >&5 +echo "$as_me:22554: checking for tcgetattr" >&5 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6 if test "${cf_cv_have_tcgetattr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 21386 "configure" +#line 22561 "configure" #include "confdefs.h" #include <sys/types.h> @@ -21411,16 +22586,16 @@ tcgetattr(1, &foo); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:21414: \"$ac_link\"") >&5 +if { (eval echo "$as_me:22589: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:21417: \$? = $ac_status" >&5 + echo "$as_me:22592: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:21420: \"$ac_try\"") >&5 + { (eval echo "$as_me:22595: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:21423: \$? = $ac_status" >&5 + echo "$as_me:22598: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_have_tcgetattr=yes else @@ -21430,46 +22605,56 @@ cf_cv_have_tcgetattr=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi -echo "$as_me:21433: result: $cf_cv_have_tcgetattr" >&5 +echo "$as_me:22608: result: $cf_cv_have_tcgetattr" >&5 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF #define HAVE_TCGETATTR 1 EOF -echo "$as_me:21440: checking for vsscanf function or workaround" >&5 +echo "$as_me:22615: checking for vsscanf function or workaround" >&5 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6 if test "${cf_cv_func_vsscanf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 21447 "configure" +#line 22622 "configure" #include "confdefs.h" #include <stdarg.h> #include <stdio.h> + +static void +myfunc(const char *str, const char *fmt, ...) +{ + va_list ap; + va_start(ap, fmt); + vsscanf(str, fmt, ap); + va_end(ap); +} + int main (void) { - va_list ap; - vsscanf("from", "%d", ap) + myfunc("55", "%d"); + ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:21463: \"$ac_link\"") >&5 +if { (eval echo "$as_me:22648: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:21466: \$? = $ac_status" >&5 + echo "$as_me:22651: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:21469: \"$ac_try\"") >&5 + { (eval echo "$as_me:22654: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:21472: \$? = $ac_status" >&5 + echo "$as_me:22657: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_func_vsscanf=vsscanf else @@ -21477,7 +22662,7 @@ else cat "conftest.$ac_ext" >&5 cat >"conftest.$ac_ext" <<_ACEOF -#line 21480 "configure" +#line 22665 "configure" #include "confdefs.h" #include <stdarg.h> @@ -21499,16 +22684,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:21502: \"$ac_link\"") >&5 +if { (eval echo "$as_me:22687: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:21505: \$? = $ac_status" >&5 + echo "$as_me:22690: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:21508: \"$ac_try\"") >&5 + { (eval echo "$as_me:22693: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:21511: \$? = $ac_status" >&5 + echo "$as_me:22696: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_func_vsscanf=vfscanf else @@ -21516,7 +22701,7 @@ else cat "conftest.$ac_ext" >&5 cat >"conftest.$ac_ext" <<_ACEOF -#line 21519 "configure" +#line 22704 "configure" #include "confdefs.h" #include <stdarg.h> @@ -21538,16 +22723,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:21541: \"$ac_link\"") >&5 +if { (eval echo "$as_me:22726: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:21544: \$? = $ac_status" >&5 + echo "$as_me:22729: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:21547: \"$ac_try\"") >&5 + { (eval echo "$as_me:22732: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:21550: \$? = $ac_status" >&5 + echo "$as_me:22735: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_func_vsscanf=_doscan else @@ -21562,7 +22747,7 @@ rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi -echo "$as_me:21565: result: $cf_cv_func_vsscanf" >&5 +echo "$as_me:22750: result: $cf_cv_func_vsscanf" >&5 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6 case "$cf_cv_func_vsscanf" in @@ -21588,23 +22773,23 @@ unistd.h \ do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:21591: checking for $ac_header" >&5 +echo "$as_me:22776: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 21597 "configure" +#line 22782 "configure" #include "confdefs.h" #include <$ac_header> _ACEOF -if { (eval echo "$as_me:21601: \"$ac_cpp "conftest.$ac_ext"\"") >&5 +if { (eval echo "$as_me:22786: \"$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:21607: \$? = $ac_status" >&5 + echo "$as_me:22792: \$? = $ac_status" >&5 (exit "$ac_status"); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -21623,7 +22808,7 @@ else fi rm -f conftest.err "conftest.$ac_ext" fi -echo "$as_me:21626: result: `eval echo '${'"$as_ac_Header"'}'`" >&5 +echo "$as_me:22811: result: `eval echo '${'"$as_ac_Header"'}'`" >&5 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then cat >>confdefs.h <<EOF @@ -21633,7 +22818,7 @@ EOF fi done -echo "$as_me:21636: checking for working mkstemp" >&5 +echo "$as_me:22821: checking for working mkstemp" >&5 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6 if test "${cf_cv_func_mkstemp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -21644,20 +22829,14 @@ if test "$cross_compiling" = yes; then cf_cv_func_mkstemp=maybe else cat >"conftest.$ac_ext" <<_ACEOF -#line 21647 "configure" +#line 22832 "configure" #include "confdefs.h" -#include <sys/types.h> -#ifdef HAVE_UNISTD_H -#include <unistd.h> -#endif -#include <stdlib.h> -#include <stdio.h> -#include <string.h> -#include <sys/stat.h> +$ac_includes_default + int main(void) { - char *tmpl = "conftestXXXXXX"; + static char tmpl[] = "conftestXXXXXX"; char name[2][80]; int n; int result = 0; @@ -21685,15 +22864,15 @@ int main(void) _ACEOF rm -f "conftest$ac_exeext" -if { (eval echo "$as_me:21688: \"$ac_link\"") >&5 +if { (eval echo "$as_me:22867: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:21691: \$? = $ac_status" >&5 + echo "$as_me:22870: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"' - { (eval echo "$as_me:21693: \"$ac_try\"") >&5 + { (eval echo "$as_me:22872: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:21696: \$? = $ac_status" >&5 + echo "$as_me:22875: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_func_mkstemp=yes @@ -21708,16 +22887,16 @@ rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftes fi fi -echo "$as_me:21711: result: $cf_cv_func_mkstemp" >&5 +echo "$as_me:22890: result: $cf_cv_func_mkstemp" >&5 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6 if test "x$cf_cv_func_mkstemp" = xmaybe ; then - echo "$as_me:21714: checking for mkstemp" >&5 + echo "$as_me:22893: 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 21720 "configure" +#line 22899 "configure" #include "confdefs.h" #define mkstemp autoconf_temporary #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */ @@ -21748,16 +22927,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:21751: \"$ac_link\"") >&5 +if { (eval echo "$as_me:22930: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:21754: \$? = $ac_status" >&5 + echo "$as_me:22933: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:21757: \"$ac_try\"") >&5 + { (eval echo "$as_me:22936: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:21760: \$? = $ac_status" >&5 + echo "$as_me:22939: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_func_mkstemp=yes else @@ -21767,7 +22946,7 @@ ac_cv_func_mkstemp=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi -echo "$as_me:21770: result: $ac_cv_func_mkstemp" >&5 +echo "$as_me:22949: result: $ac_cv_func_mkstemp" >&5 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6 fi @@ -21788,21 +22967,21 @@ else fi if test "x$cross_compiling" = xyes ; then - { echo "$as_me:21791: WARNING: cross compiling: assume setvbuf params not reversed" >&5 + { echo "$as_me:22970: WARNING: cross compiling: assume setvbuf params not reversed" >&5 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;} else - echo "$as_me:21794: checking whether setvbuf arguments are reversed" >&5 + echo "$as_me:22973: checking whether setvbuf arguments are reversed" >&5 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then - { { echo "$as_me:21800: error: cannot run test program while cross compiling" >&5 + { { echo "$as_me:22979: error: cannot run test program while cross compiling" >&5 echo "$as_me: error: cannot run test program while cross compiling" >&2;} { (exit 1); exit 1; }; } else cat >"conftest.$ac_ext" <<_ACEOF -#line 21805 "configure" +#line 22984 "configure" #include "confdefs.h" #include <stdio.h> /* If setvbuf has the reversed format, exit 0. */ @@ -21815,19 +22994,19 @@ main (void) if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0) $ac_main_return(1); putc('\r', stdout); - $ac_main_return(0); /* Non-reversed systems segv here. */ + $ac_main_return(0); /* Non-reversed systems segv here. */ } _ACEOF rm -f "conftest$ac_exeext" -if { (eval echo "$as_me:21822: \"$ac_link\"") >&5 +if { (eval echo "$as_me:23001: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:21825: \$? = $ac_status" >&5 + echo "$as_me:23004: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"' - { (eval echo "$as_me:21827: \"$ac_try\"") >&5 + { (eval echo "$as_me:23006: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:21830: \$? = $ac_status" >&5 + echo "$as_me:23009: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_func_setvbuf_reversed=yes else @@ -21840,7 +23019,7 @@ rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftes fi rm -f core ./core.* ./*.core fi -echo "$as_me:21843: result: $ac_cv_func_setvbuf_reversed" >&5 +echo "$as_me:23022: result: $ac_cv_func_setvbuf_reversed" >&5 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6 if test $ac_cv_func_setvbuf_reversed = yes; then @@ -21851,13 +23030,13 @@ EOF fi fi -echo "$as_me:21854: checking for intptr_t" >&5 +echo "$as_me:23033: checking for intptr_t" >&5 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6 if test "${ac_cv_type_intptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 21860 "configure" +#line 23039 "configure" #include "confdefs.h" $ac_includes_default int @@ -21872,16 +23051,16 @@ if (sizeof (intptr_t)) } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:21875: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:23054: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:21878: \$? = $ac_status" >&5 + echo "$as_me:23057: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:21881: \"$ac_try\"") >&5 + { (eval echo "$as_me:23060: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:21884: \$? = $ac_status" >&5 + echo "$as_me:23063: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_type_intptr_t=yes else @@ -21891,7 +23070,7 @@ ac_cv_type_intptr_t=no fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:21894: result: $ac_cv_type_intptr_t" >&5 +echo "$as_me:23073: result: $ac_cv_type_intptr_t" >&5 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6 if test "$ac_cv_type_intptr_t" = yes; then : @@ -21903,13 +23082,13 @@ EOF fi -echo "$as_me:21906: checking for ssize_t" >&5 +echo "$as_me:23085: checking for ssize_t" >&5 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6 if test "${ac_cv_type_ssize_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 21912 "configure" +#line 23091 "configure" #include "confdefs.h" $ac_includes_default int @@ -21924,16 +23103,16 @@ if (sizeof (ssize_t)) } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:21927: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:23106: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:21930: \$? = $ac_status" >&5 + echo "$as_me:23109: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:21933: \"$ac_try\"") >&5 + { (eval echo "$as_me:23112: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:21936: \$? = $ac_status" >&5 + echo "$as_me:23115: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_type_ssize_t=yes else @@ -21943,7 +23122,7 @@ ac_cv_type_ssize_t=no fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:21946: result: $ac_cv_type_ssize_t" >&5 +echo "$as_me:23125: result: $ac_cv_type_ssize_t" >&5 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6 if test "$ac_cv_type_ssize_t" = yes; then : @@ -21955,36 +23134,36 @@ EOF fi -echo "$as_me:21958: checking for type sigaction_t" >&5 +echo "$as_me:23137: checking for type sigaction_t" >&5 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6 if test "${cf_cv_type_sigaction+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 21965 "configure" +#line 23144 "configure" #include "confdefs.h" #include <signal.h> int main (void) { -sigaction_t x +sigaction_t x; (void)x ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:21978: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:23157: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:21981: \$? = $ac_status" >&5 + echo "$as_me:23160: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:21984: \"$ac_try\"") >&5 + { (eval echo "$as_me:23163: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:21987: \$? = $ac_status" >&5 + echo "$as_me:23166: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_type_sigaction=yes else @@ -21995,14 +23174,14 @@ fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:21998: result: $cf_cv_type_sigaction" >&5 +echo "$as_me:23177: result: $cf_cv_type_sigaction" >&5 echo "${ECHO_T}$cf_cv_type_sigaction" >&6 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF #define HAVE_TYPE_SIGACTION 1 EOF -echo "$as_me:22005: checking declaration of size-change" >&5 +echo "$as_me:23184: checking declaration of size-change" >&5 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6 if test "${cf_cv_sizechange+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -22023,7 +23202,7 @@ do fi cat >"conftest.$ac_ext" <<_ACEOF -#line 22026 "configure" +#line 23205 "configure" #include "confdefs.h" #include <sys/types.h> #ifdef HAVE_TERMIOS_H @@ -22036,7 +23215,7 @@ do #ifdef NEED_PTEM_H /* This is a workaround for SCO: they neglected to define struct winsize in - * termios.h -- it's only in termio.h and ptem.h + * termios.h -- it is only in termio.h and ptem.h */ #include <sys/stream.h> #include <sys/ptem.h> @@ -22073,16 +23252,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:22076: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:23255: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:22079: \$? = $ac_status" >&5 + echo "$as_me:23258: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:22082: \"$ac_try\"") >&5 + { (eval echo "$as_me:23261: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:22085: \$? = $ac_status" >&5 + echo "$as_me:23264: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_sizechange=yes else @@ -22101,7 +23280,7 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" done fi -echo "$as_me:22104: result: $cf_cv_sizechange" >&5 +echo "$as_me:23283: result: $cf_cv_sizechange" >&5 echo "${ECHO_T}$cf_cv_sizechange" >&6 if test "$cf_cv_sizechange" != no ; then @@ -22119,13 +23298,13 @@ EOF esac fi -echo "$as_me:22122: checking for memmove" >&5 +echo "$as_me:23301: checking for memmove" >&5 echo $ECHO_N "checking for memmove... $ECHO_C" >&6 if test "${ac_cv_func_memmove+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 22128 "configure" +#line 23307 "configure" #include "confdefs.h" #define memmove autoconf_temporary #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */ @@ -22156,16 +23335,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:22159: \"$ac_link\"") >&5 +if { (eval echo "$as_me:23338: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:22162: \$? = $ac_status" >&5 + echo "$as_me:23341: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:22165: \"$ac_try\"") >&5 + { (eval echo "$as_me:23344: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:22168: \$? = $ac_status" >&5 + echo "$as_me:23347: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_func_memmove=yes else @@ -22175,19 +23354,19 @@ ac_cv_func_memmove=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi -echo "$as_me:22178: result: $ac_cv_func_memmove" >&5 +echo "$as_me:23357: result: $ac_cv_func_memmove" >&5 echo "${ECHO_T}$ac_cv_func_memmove" >&6 if test "$ac_cv_func_memmove" = yes; then : else -echo "$as_me:22184: checking for bcopy" >&5 +echo "$as_me:23363: checking for bcopy" >&5 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6 if test "${ac_cv_func_bcopy+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 22190 "configure" +#line 23369 "configure" #include "confdefs.h" #define bcopy autoconf_temporary #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */ @@ -22218,16 +23397,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:22221: \"$ac_link\"") >&5 +if { (eval echo "$as_me:23400: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:22224: \$? = $ac_status" >&5 + echo "$as_me:23403: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:22227: \"$ac_try\"") >&5 + { (eval echo "$as_me:23406: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:22230: \$? = $ac_status" >&5 + echo "$as_me:23409: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_func_bcopy=yes else @@ -22237,11 +23416,11 @@ ac_cv_func_bcopy=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi -echo "$as_me:22240: result: $ac_cv_func_bcopy" >&5 +echo "$as_me:23419: result: $ac_cv_func_bcopy" >&5 echo "${ECHO_T}$ac_cv_func_bcopy" >&6 if test "$ac_cv_func_bcopy" = yes; then - echo "$as_me:22244: checking if bcopy does overlapping moves" >&5 + echo "$as_me:23423: checking if bcopy does overlapping moves" >&5 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6 if test "${cf_cv_good_bcopy+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -22251,9 +23430,11 @@ else cf_cv_good_bcopy=unknown else cat >"conftest.$ac_ext" <<_ACEOF -#line 22254 "configure" +#line 23433 "configure" #include "confdefs.h" +$ac_includes_default + int main(void) { static char data[] = "abcdefghijklmnopqrstuwwxyz"; char temp[40]; @@ -22265,15 +23446,15 @@ int main(void) { _ACEOF rm -f "conftest$ac_exeext" -if { (eval echo "$as_me:22268: \"$ac_link\"") >&5 +if { (eval echo "$as_me:23449: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:22271: \$? = $ac_status" >&5 + echo "$as_me:23452: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"' - { (eval echo "$as_me:22273: \"$ac_try\"") >&5 + { (eval echo "$as_me:23454: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:22276: \$? = $ac_status" >&5 + echo "$as_me:23457: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_good_bcopy=yes else @@ -22286,7 +23467,7 @@ rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftes fi fi -echo "$as_me:22289: result: $cf_cv_good_bcopy" >&5 +echo "$as_me:23470: result: $cf_cv_good_bcopy" >&5 echo "${ECHO_T}$cf_cv_good_bcopy" >&6 else @@ -22313,13 +23494,13 @@ tty >/dev/null 2>&1 || { for ac_func in posix_openpt do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:22316: checking for $ac_func" >&5 +echo "$as_me:23497: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 22322 "configure" +#line 23503 "configure" #include "confdefs.h" #define $ac_func autoconf_temporary #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */ @@ -22350,16 +23531,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:22353: \"$ac_link\"") >&5 +if { (eval echo "$as_me:23534: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:22356: \$? = $ac_status" >&5 + echo "$as_me:23537: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:22359: \"$ac_try\"") >&5 + { (eval echo "$as_me:23540: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:22362: \$? = $ac_status" >&5 + echo "$as_me:23543: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then eval "$as_ac_var=yes" else @@ -22369,7 +23550,7 @@ eval "$as_ac_var=no" fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi -echo "$as_me:22372: result: `eval echo '${'"$as_ac_var"'}'`" >&5 +echo "$as_me:23553: result: `eval echo '${'"$as_ac_var"'}'`" >&5 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then cat >>confdefs.h <<EOF @@ -22379,7 +23560,7 @@ EOF fi done } -echo "$as_me:22382: checking if poll really works" >&5 +echo "$as_me:23563: checking if poll really works" >&5 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6 if test "${cf_cv_working_poll+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -22389,18 +23570,19 @@ if test "$cross_compiling" = yes; then cf_cv_working_poll=unknown else cat >"conftest.$ac_ext" <<_ACEOF -#line 22392 "configure" +#line 23573 "configure" #include "confdefs.h" -#include <stdlib.h> -#include <stdio.h> -#include <unistd.h> +$ac_includes_default + #include <fcntl.h> + #ifdef HAVE_POLL_H #include <poll.h> #else #include <sys/poll.h> #endif + int main(void) { struct pollfd myfds; int ret; @@ -22441,15 +23623,15 @@ int main(void) { } _ACEOF rm -f "conftest$ac_exeext" -if { (eval echo "$as_me:22444: \"$ac_link\"") >&5 +if { (eval echo "$as_me:23626: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:22447: \$? = $ac_status" >&5 + echo "$as_me:23629: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"' - { (eval echo "$as_me:22449: \"$ac_try\"") >&5 + { (eval echo "$as_me:23631: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:22452: \$? = $ac_status" >&5 + echo "$as_me:23634: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_working_poll=yes else @@ -22461,21 +23643,81 @@ fi rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext" fi fi -echo "$as_me:22464: result: $cf_cv_working_poll" >&5 +echo "$as_me:23646: result: $cf_cv_working_poll" >&5 echo "${ECHO_T}$cf_cv_working_poll" >&6 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF #define HAVE_WORKING_POLL 1 EOF -echo "$as_me:22471: checking for va_copy" >&5 +echo "$as_me:23653: checking if MB_LEN_MAX is usable" >&5 +echo $ECHO_N "checking if MB_LEN_MAX is usable... $ECHO_C" >&6 +if test "${cf_cv_mb_len_max+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + +cat >"conftest.$ac_ext" <<_ACEOF +#line 23660 "configure" +#include "confdefs.h" + +$ac_includes_default +#include <limits.h> +int +main (void) +{ + +#if defined(MB_LEN_MAX) && MB_LEN_MAX >= 6 + ${cf_cv_main_return:-return}(0); +#else +#error MB_LEN_MAX is not usable +#endif + + ; + return 0; +} +_ACEOF +rm -f "conftest.$ac_objext" +if { (eval echo "$as_me:23680: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:23683: \$? = $ac_status" >&5 + (exit "$ac_status"); } && + { ac_try='test -s "conftest.$ac_objext"' + { (eval echo "$as_me:23686: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:23689: \$? = $ac_status" >&5 + (exit "$ac_status"); }; }; then + cf_cv_mb_len_max=yes +else + echo "$as_me: failed program was:" >&5 +cat "conftest.$ac_ext" >&5 +cf_cv_mb_len_max=no +fi +rm -f "conftest.$ac_objext" "conftest.$ac_ext" +fi +echo "$as_me:23699: result: $cf_cv_mb_len_max" >&5 +echo "${ECHO_T}$cf_cv_mb_len_max" >&6 +if test "$cf_cv_mb_len_max" = yes +then + +cat >>confdefs.h <<\EOF +#define HAVE_CONSISTENT_MB_LEN_MAX 1 +EOF + +else + { echo "$as_me:23709: WARNING: MB_LEN_MAX is missing/inconsistent in system headers" >&5 +echo "$as_me: WARNING: MB_LEN_MAX is missing/inconsistent in system headers" >&2;} +fi + +echo "$as_me:23713: checking for va_copy" >&5 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6 if test "${cf_cv_have_va_copy+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 22478 "configure" +#line 23720 "configure" #include "confdefs.h" #include <stdarg.h> @@ -22492,16 +23734,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:22495: \"$ac_link\"") >&5 +if { (eval echo "$as_me:23737: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:22498: \$? = $ac_status" >&5 + echo "$as_me:23740: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:22501: \"$ac_try\"") >&5 + { (eval echo "$as_me:23743: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:22504: \$? = $ac_status" >&5 + echo "$as_me:23746: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_have_va_copy=yes else @@ -22511,7 +23753,7 @@ cf_cv_have_va_copy=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi -echo "$as_me:22514: result: $cf_cv_have_va_copy" >&5 +echo "$as_me:23756: result: $cf_cv_have_va_copy" >&5 echo "${ECHO_T}$cf_cv_have_va_copy" >&6 if test "$cf_cv_have_va_copy" = yes; @@ -22523,14 +23765,14 @@ EOF else # !cf_cv_have_va_copy -echo "$as_me:22526: checking for __va_copy" >&5 +echo "$as_me:23768: checking for __va_copy" >&5 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6 if test "${cf_cv_have___va_copy+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 22533 "configure" +#line 23775 "configure" #include "confdefs.h" #include <stdarg.h> @@ -22547,16 +23789,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:22550: \"$ac_link\"") >&5 +if { (eval echo "$as_me:23792: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:22553: \$? = $ac_status" >&5 + echo "$as_me:23795: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:22556: \"$ac_try\"") >&5 + { (eval echo "$as_me:23798: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:22559: \$? = $ac_status" >&5 + echo "$as_me:23801: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_have___va_copy=yes else @@ -22566,7 +23808,7 @@ cf_cv_have___va_copy=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi -echo "$as_me:22569: result: $cf_cv_have___va_copy" >&5 +echo "$as_me:23811: result: $cf_cv_have___va_copy" >&5 echo "${ECHO_T}$cf_cv_have___va_copy" >&6 if test "$cf_cv_have___va_copy" = yes @@ -22578,14 +23820,14 @@ EOF else # !cf_cv_have___va_copy -echo "$as_me:22581: checking for __builtin_va_copy" >&5 +echo "$as_me:23823: checking for __builtin_va_copy" >&5 echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6 if test "${cf_cv_have___builtin_va_copy+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 22588 "configure" +#line 23830 "configure" #include "confdefs.h" #include <stdarg.h> @@ -22602,16 +23844,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:22605: \"$ac_link\"") >&5 +if { (eval echo "$as_me:23847: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:22608: \$? = $ac_status" >&5 + echo "$as_me:23850: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:22611: \"$ac_try\"") >&5 + { (eval echo "$as_me:23853: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:22614: \$? = $ac_status" >&5 + echo "$as_me:23856: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_have___builtin_va_copy=yes else @@ -22621,7 +23863,7 @@ cf_cv_have___builtin_va_copy=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi -echo "$as_me:22624: result: $cf_cv_have___builtin_va_copy" >&5 +echo "$as_me:23866: result: $cf_cv_have___builtin_va_copy" >&5 echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6 test "$cf_cv_have___builtin_va_copy" = yes && @@ -22639,14 +23881,14 @@ case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy ;; (*) - echo "$as_me:22642: checking if we can simply copy va_list" >&5 + echo "$as_me:23884: checking if we can simply copy va_list" >&5 echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6 if test "${cf_cv_pointer_va_list+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 22649 "configure" +#line 23891 "configure" #include "confdefs.h" #include <stdarg.h> @@ -22663,16 +23905,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:22666: \"$ac_link\"") >&5 +if { (eval echo "$as_me:23908: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:22669: \$? = $ac_status" >&5 + echo "$as_me:23911: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:22672: \"$ac_try\"") >&5 + { (eval echo "$as_me:23914: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:22675: \$? = $ac_status" >&5 + echo "$as_me:23917: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_pointer_va_list=yes else @@ -22682,19 +23924,19 @@ cf_cv_pointer_va_list=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi -echo "$as_me:22685: result: $cf_cv_pointer_va_list" >&5 +echo "$as_me:23927: result: $cf_cv_pointer_va_list" >&5 echo "${ECHO_T}$cf_cv_pointer_va_list" >&6 if test "$cf_cv_pointer_va_list" = no then - echo "$as_me:22690: checking if we can copy va_list indirectly" >&5 + echo "$as_me:23932: checking if we can copy va_list indirectly" >&5 echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6 if test "${cf_cv_array_va_list+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 22697 "configure" +#line 23939 "configure" #include "confdefs.h" #include <stdarg.h> @@ -22711,16 +23953,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:22714: \"$ac_link\"") >&5 +if { (eval echo "$as_me:23956: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:22717: \$? = $ac_status" >&5 + echo "$as_me:23959: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:22720: \"$ac_try\"") >&5 + { (eval echo "$as_me:23962: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:22723: \$? = $ac_status" >&5 + echo "$as_me:23965: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_array_va_list=yes else @@ -22730,7 +23972,7 @@ cf_cv_array_va_list=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi -echo "$as_me:22733: result: $cf_cv_array_va_list" >&5 +echo "$as_me:23975: result: $cf_cv_array_va_list" >&5 echo "${ECHO_T}$cf_cv_array_va_list" >&6 test "$cf_cv_array_va_list" = yes && cat >>confdefs.h <<\EOF @@ -22741,13 +23983,13 @@ EOF ;; esac -echo "$as_me:22744: checking for pid_t" >&5 +echo "$as_me:23986: checking for pid_t" >&5 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6 if test "${ac_cv_type_pid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 22750 "configure" +#line 23992 "configure" #include "confdefs.h" $ac_includes_default int @@ -22762,16 +24004,16 @@ if (sizeof (pid_t)) } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:22765: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:24007: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:22768: \$? = $ac_status" >&5 + echo "$as_me:24010: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:22771: \"$ac_try\"") >&5 + { (eval echo "$as_me:24013: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:22774: \$? = $ac_status" >&5 + echo "$as_me:24016: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_type_pid_t=yes else @@ -22781,7 +24023,7 @@ ac_cv_type_pid_t=no fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:22784: result: $ac_cv_type_pid_t" >&5 +echo "$as_me:24026: result: $ac_cv_type_pid_t" >&5 echo "${ECHO_T}$ac_cv_type_pid_t" >&6 if test "$ac_cv_type_pid_t" = yes; then : @@ -22796,23 +24038,23 @@ fi for ac_header in unistd.h vfork.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:22799: checking for $ac_header" >&5 +echo "$as_me:24041: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 22805 "configure" +#line 24047 "configure" #include "confdefs.h" #include <$ac_header> _ACEOF -if { (eval echo "$as_me:22809: \"$ac_cpp "conftest.$ac_ext"\"") >&5 +if { (eval echo "$as_me:24051: \"$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:22815: \$? = $ac_status" >&5 + echo "$as_me:24057: \$? = $ac_status" >&5 (exit "$ac_status"); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -22831,7 +24073,7 @@ else fi rm -f conftest.err "conftest.$ac_ext" fi -echo "$as_me:22834: result: `eval echo '${'"$as_ac_Header"'}'`" >&5 +echo "$as_me:24076: result: `eval echo '${'"$as_ac_Header"'}'`" >&5 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then cat >>confdefs.h <<EOF @@ -22844,13 +24086,13 @@ done for ac_func in fork vfork do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:22847: checking for $ac_func" >&5 +echo "$as_me:24089: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 22853 "configure" +#line 24095 "configure" #include "confdefs.h" #define $ac_func autoconf_temporary #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */ @@ -22881,16 +24123,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:22884: \"$ac_link\"") >&5 +if { (eval echo "$as_me:24126: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:22887: \$? = $ac_status" >&5 + echo "$as_me:24129: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:22890: \"$ac_try\"") >&5 + { (eval echo "$as_me:24132: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:22893: \$? = $ac_status" >&5 + echo "$as_me:24135: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then eval "$as_ac_var=yes" else @@ -22900,7 +24142,7 @@ eval "$as_ac_var=no" fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi -echo "$as_me:22903: result: `eval echo '${'"$as_ac_var"'}'`" >&5 +echo "$as_me:24145: result: `eval echo '${'"$as_ac_var"'}'`" >&5 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then cat >>confdefs.h <<EOF @@ -22912,7 +24154,7 @@ done ac_cv_func_fork_works=$ac_cv_func_fork if test "x$ac_cv_func_fork" = xyes; then - echo "$as_me:22915: checking for working fork" >&5 + echo "$as_me:24157: checking for working fork" >&5 echo $ECHO_N "checking for working fork... $ECHO_C" >&6 if test "${ac_cv_func_fork_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -22935,15 +24177,15 @@ else } _ACEOF rm -f "conftest$ac_exeext" -if { (eval echo "$as_me:22938: \"$ac_link\"") >&5 +if { (eval echo "$as_me:24180: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:22941: \$? = $ac_status" >&5 + echo "$as_me:24183: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"' - { (eval echo "$as_me:22943: \"$ac_try\"") >&5 + { (eval echo "$as_me:24185: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:22946: \$? = $ac_status" >&5 + echo "$as_me:24188: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_func_fork_works=yes else @@ -22955,7 +24197,7 @@ fi rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext" fi fi -echo "$as_me:22958: result: $ac_cv_func_fork_works" >&5 +echo "$as_me:24200: result: $ac_cv_func_fork_works" >&5 echo "${ECHO_T}$ac_cv_func_fork_works" >&6 fi @@ -22969,12 +24211,12 @@ if test "x$ac_cv_func_fork_works" = xcross; then ac_cv_func_fork_works=yes ;; esac - { echo "$as_me:22972: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5 + { echo "$as_me:24214: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;} fi ac_cv_func_vfork_works=$ac_cv_func_vfork if test "x$ac_cv_func_vfork" = xyes; then - echo "$as_me:22977: checking for working vfork" >&5 + echo "$as_me:24219: checking for working vfork" >&5 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6 if test "${ac_cv_func_vfork_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -22983,7 +24225,7 @@ else ac_cv_func_vfork_works=cross else cat >"conftest.$ac_ext" <<_ACEOF -#line 22986 "configure" +#line 24228 "configure" #include "confdefs.h" /* Thanks to Paul Eggert for this test. */ #include <stdio.h> @@ -23002,11 +24244,7 @@ else static variable whose address is put into a register that is clobbered by the vfork. */ static -#ifdef __cplusplus sparc_address_test (int arg) -# else -sparc_address_test (arg) int arg; -#endif { static pid_t child; if (!child) { @@ -23049,7 +24287,7 @@ main (void) /* Convince the compiler that p..p7 are live; otherwise, it might use the same hardware register for all 8 local variables. */ if (p != p1 || p != p2 || p != p3 || p != p4 - || p != p5 || p != p6 || p != p7) + || p != p5 || p != p6 || p != p7) _exit(1); /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent @@ -23064,31 +24302,31 @@ main (void) while (wait(&status) != child) ; $ac_main_return( - /* Was there some problem with vforking? */ - child < 0 + /* Was there some problem with vforking? */ + child < 0 - /* Did the child fail? (This shouldn't happen.) */ - || status + /* Did the child fail? (This shouldn't happen.) */ + || status - /* Did the vfork/compiler bug occur? */ - || parent != getpid() + /* Did the vfork/compiler bug occur? */ + || parent != getpid() - /* Did the file descriptor bug occur? */ - || fstat(fileno(stdout), &st) != 0 - ); + /* Did the file descriptor bug occur? */ + || fstat(fileno(stdout), &st) != 0 + ); } } _ACEOF rm -f "conftest$ac_exeext" -if { (eval echo "$as_me:23083: \"$ac_link\"") >&5 +if { (eval echo "$as_me:24321: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:23086: \$? = $ac_status" >&5 + echo "$as_me:24324: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"' - { (eval echo "$as_me:23088: \"$ac_try\"") >&5 + { (eval echo "$as_me:24326: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:23091: \$? = $ac_status" >&5 + echo "$as_me:24329: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_func_vfork_works=yes else @@ -23100,13 +24338,13 @@ fi rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext" fi fi -echo "$as_me:23103: result: $ac_cv_func_vfork_works" >&5 +echo "$as_me:24341: result: $ac_cv_func_vfork_works" >&5 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6 fi; if test "x$ac_cv_func_fork_works" = xcross; then ac_cv_func_vfork_works=ac_cv_func_vfork - { echo "$as_me:23109: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5 + { echo "$as_me:24347: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;} fi @@ -23131,7 +24369,7 @@ EOF fi -echo "$as_me:23134: checking if fopen accepts explicit binary mode" >&5 +echo "$as_me:24372: checking if fopen accepts explicit binary mode" >&5 echo $ECHO_N "checking if fopen accepts explicit binary mode... $ECHO_C" >&6 if test "${cf_cv_fopen_bin_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -23141,11 +24379,13 @@ else cf_cv_fopen_bin_r=unknown else cat >"conftest.$ac_ext" <<_ACEOF -#line 23144 "configure" +#line 24382 "configure" #include "confdefs.h" -#include <stdio.h> -int main(void) { +$ac_includes_default + +int main(void) +{ FILE *fp = fopen("conftest.tmp", "wb"); int rc = 0; if (fp != 0) { @@ -23174,15 +24414,15 @@ int main(void) { _ACEOF rm -f "conftest$ac_exeext" -if { (eval echo "$as_me:23177: \"$ac_link\"") >&5 +if { (eval echo "$as_me:24417: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:23180: \$? = $ac_status" >&5 + echo "$as_me:24420: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"' - { (eval echo "$as_me:23182: \"$ac_try\"") >&5 + { (eval echo "$as_me:24422: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:23185: \$? = $ac_status" >&5 + echo "$as_me:24425: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_fopen_bin_r=yes else @@ -23195,7 +24435,7 @@ rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftes fi fi -echo "$as_me:23198: result: $cf_cv_fopen_bin_r" >&5 +echo "$as_me:24438: result: $cf_cv_fopen_bin_r" >&5 echo "${ECHO_T}$cf_cv_fopen_bin_r" >&6 test "x$cf_cv_fopen_bin_r" != xno && cat >>confdefs.h <<\EOF @@ -23204,7 +24444,7 @@ EOF # special check for test/ditto.c -echo "$as_me:23207: checking for openpty in -lutil" >&5 +echo "$as_me:24447: checking for openpty in -lutil" >&5 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6 if test "${ac_cv_lib_util_openpty+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -23212,7 +24452,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lutil $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 23215 "configure" +#line 24455 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -23221,7 +24461,7 @@ 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 openpty (); +char openpty (void); int main (void) { @@ -23231,16 +24471,16 @@ openpty (); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:23234: \"$ac_link\"") >&5 +if { (eval echo "$as_me:24474: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:23237: \$? = $ac_status" >&5 + echo "$as_me:24477: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:23240: \"$ac_try\"") >&5 + { (eval echo "$as_me:24480: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:23243: \$? = $ac_status" >&5 + echo "$as_me:24483: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_util_openpty=yes else @@ -23251,7 +24491,7 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:23254: result: $ac_cv_lib_util_openpty" >&5 +echo "$as_me:24494: result: $ac_cv_lib_util_openpty" >&5 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6 if test "$ac_cv_lib_util_openpty" = yes; then cf_cv_lib_util=yes @@ -23259,7 +24499,7 @@ else cf_cv_lib_util=no fi -echo "$as_me:23262: checking for openpty header" >&5 +echo "$as_me:24502: checking for openpty header" >&5 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6 if test "${cf_cv_func_openpty+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -23286,7 +24526,7 @@ LIBS="$cf_add_libs" for cf_header in pty.h libutil.h util.h do cat >"conftest.$ac_ext" <<_ACEOF -#line 23289 "configure" +#line 24529 "configure" #include "confdefs.h" #include <$cf_header> @@ -23297,22 +24537,23 @@ main (void) int x = openpty((int *)0, (int *)0, (char *)0, (struct termios *)0, (struct winsize *)0); + (void)x; ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:23306: \"$ac_link\"") >&5 +if { (eval echo "$as_me:24547: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:23309: \$? = $ac_status" >&5 + echo "$as_me:24550: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:23312: \"$ac_try\"") >&5 + { (eval echo "$as_me:24553: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:23315: \$? = $ac_status" >&5 + echo "$as_me:24556: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_func_openpty=$cf_header @@ -23330,7 +24571,7 @@ rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS="$cf_save_LIBS" fi -echo "$as_me:23333: result: $cf_cv_func_openpty" >&5 +echo "$as_me:24574: result: $cf_cv_func_openpty" >&5 echo "${ECHO_T}$cf_cv_func_openpty" >&6 if test "$cf_cv_func_openpty" != no ; then @@ -23403,7 +24644,7 @@ if test -n "$with_hashed_db/include" ; then CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir" cat >"conftest.$ac_ext" <<_ACEOF -#line 23406 "configure" +#line 24647 "configure" #include "confdefs.h" #include <stdio.h> int @@ -23415,16 +24656,16 @@ printf("Hello") } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:23418: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:24659: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:23421: \$? = $ac_status" >&5 + echo "$as_me:24662: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:23424: \"$ac_try\"") >&5 + { (eval echo "$as_me:24665: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:23427: \$? = $ac_status" >&5 + echo "$as_me:24668: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then : else @@ -23441,7 +24682,7 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" if test "$cf_have_incdir" = no ; then test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6 -echo "${as_me:-configure}:23444: testing adding $cf_add_incdir to include-path ..." 1>&5 +echo "${as_me:-configure}:24685: testing adding $cf_add_incdir to include-path ..." 1>&5 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" @@ -23477,7 +24718,7 @@ if test -n "$with_hashed_db/lib" ; then if test "$cf_have_libdir" = no ; then test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6 -echo "${as_me:-configure}:23480: testing adding $cf_add_libdir to library-path ..." 1>&5 +echo "${as_me:-configure}:24721: testing adding $cf_add_libdir to library-path ..." 1>&5 LDFLAGS="-L$cf_add_libdir $LDFLAGS" fi @@ -23488,7 +24729,7 @@ fi else case "$with_hashed_db" in (./*|../*|/*) - { echo "$as_me:23491: WARNING: no such directory $with_hashed_db" >&5 + { echo "$as_me:24732: WARNING: no such directory $with_hashed_db" >&5 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;} ;; (*) @@ -23560,7 +24801,7 @@ if test -n "$cf_item" ; then CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir" cat >"conftest.$ac_ext" <<_ACEOF -#line 23563 "configure" +#line 24804 "configure" #include "confdefs.h" #include <stdio.h> int @@ -23572,16 +24813,16 @@ printf("Hello") } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:23575: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:24816: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:23578: \$? = $ac_status" >&5 + echo "$as_me:24819: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:23581: \"$ac_try\"") >&5 + { (eval echo "$as_me:24822: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:23584: \$? = $ac_status" >&5 + echo "$as_me:24825: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then : else @@ -23598,7 +24839,7 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" if test "$cf_have_incdir" = no ; then test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6 -echo "${as_me:-configure}:23601: testing adding $cf_add_incdir to include-path ..." 1>&5 +echo "${as_me:-configure}:24842: testing adding $cf_add_incdir to include-path ..." 1>&5 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" @@ -23678,7 +24919,7 @@ if test -n "$cf_item" ; then if test "$cf_have_libdir" = no ; then test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6 -echo "${as_me:-configure}:23681: testing adding $cf_add_libdir to library-path ..." 1>&5 +echo "${as_me:-configure}:24922: testing adding $cf_add_libdir to library-path ..." 1>&5 LDFLAGS="-L$cf_add_libdir $LDFLAGS" fi @@ -23695,23 +24936,23 @@ fi fi esac -echo "$as_me:23698: checking for db.h" >&5 +echo "$as_me:24939: checking for db.h" >&5 echo $ECHO_N "checking for db.h... $ECHO_C" >&6 if test "${ac_cv_header_db_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 23704 "configure" +#line 24945 "configure" #include "confdefs.h" #include <db.h> _ACEOF -if { (eval echo "$as_me:23708: \"$ac_cpp "conftest.$ac_ext"\"") >&5 +if { (eval echo "$as_me:24949: \"$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:23714: \$? = $ac_status" >&5 + echo "$as_me:24955: \$? = $ac_status" >&5 (exit "$ac_status"); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -23730,11 +24971,11 @@ else fi rm -f conftest.err "conftest.$ac_ext" fi -echo "$as_me:23733: result: $ac_cv_header_db_h" >&5 +echo "$as_me:24974: result: $ac_cv_header_db_h" >&5 echo "${ECHO_T}$ac_cv_header_db_h" >&6 if test "$ac_cv_header_db_h" = yes; then -echo "$as_me:23737: checking for version of db" >&5 +echo "$as_me:24978: checking for version of db" >&5 echo $ECHO_N "checking for version of db... $ECHO_C" >&6 if test "${cf_cv_hashed_db_version+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -23745,10 +24986,10 @@ cf_cv_hashed_db_version=unknown for cf_db_version in 1 2 3 4 5 6 do -echo "${as_me:-configure}:23748: testing checking for db version $cf_db_version ..." 1>&5 +echo "${as_me:-configure}:24989: testing checking for db version $cf_db_version ..." 1>&5 cat >"conftest.$ac_ext" <<_ACEOF -#line 23751 "configure" +#line 24992 "configure" #include "confdefs.h" $ac_includes_default @@ -23759,13 +25000,13 @@ $ac_includes_default #if $cf_db_version == DB_VERSION_MAJOR /* ok */ #else - make an error + #error $cf_db_version is not DB_VERSION_MAJOR #endif #else #if $cf_db_version == 1 /* ok: assuming this is DB 1.8.5 */ #else - make an error + #error $cf_db_version is not 1 #endif #endif @@ -23778,16 +25019,16 @@ DBT *foo = 0 } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:23781: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:25022: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:23784: \$? = $ac_status" >&5 + echo "$as_me:25025: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:23787: \"$ac_try\"") >&5 + { (eval echo "$as_me:25028: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:23790: \$? = $ac_status" >&5 + echo "$as_me:25031: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_hashed_db_version=$cf_db_version @@ -23801,16 +25042,16 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" done fi -echo "$as_me:23804: result: $cf_cv_hashed_db_version" >&5 +echo "$as_me:25045: result: $cf_cv_hashed_db_version" >&5 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6 if test "$cf_cv_hashed_db_version" = unknown ; then - { { echo "$as_me:23808: error: Cannot determine version of db" >&5 + { { echo "$as_me:25049: error: Cannot determine version of db" >&5 echo "$as_me: error: Cannot determine version of db" >&2;} { (exit 1); exit 1; }; } else -echo "$as_me:23813: checking for db libraries" >&5 +echo "$as_me:25054: checking for db libraries" >&5 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6 if test "${cf_cv_hashed_db_libs+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -23840,10 +25081,10 @@ LIBS="$cf_add_libs" fi -echo "${as_me:-configure}:23843: testing checking for library $cf_db_libs ..." 1>&5 +echo "${as_me:-configure}:25084: testing checking for library $cf_db_libs ..." 1>&5 cat >"conftest.$ac_ext" <<_ACEOF -#line 23846 "configure" +#line 25087 "configure" #include "confdefs.h" $ac_includes_default @@ -23898,16 +25139,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:23901: \"$ac_link\"") >&5 +if { (eval echo "$as_me:25142: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:23904: \$? = $ac_status" >&5 + echo "$as_me:25145: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:23907: \"$ac_try\"") >&5 + { (eval echo "$as_me:25148: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:23910: \$? = $ac_status" >&5 + echo "$as_me:25151: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then if test -n "$cf_db_libs" ; then @@ -23927,11 +25168,11 @@ rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" done fi -echo "$as_me:23930: result: $cf_cv_hashed_db_libs" >&5 +echo "$as_me:25171: result: $cf_cv_hashed_db_libs" >&5 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6 if test "$cf_cv_hashed_db_libs" = unknown ; then - { { echo "$as_me:23934: error: Cannot determine library for db" >&5 + { { echo "$as_me:25175: error: Cannot determine library for db" >&5 echo "$as_me: error: Cannot determine library for db" >&2;} { (exit 1); exit 1; }; } elif test "$cf_cv_hashed_db_libs" != default ; then @@ -23957,7 +25198,7 @@ fi else - { { echo "$as_me:23960: error: Cannot find db.h" >&5 + { { echo "$as_me:25201: error: Cannot find db.h" >&5 echo "$as_me: error: Cannot find db.h" >&2;} { (exit 1); exit 1; }; } @@ -23972,7 +25213,7 @@ fi # Just in case, check if the C compiler has a bool type. -echo "$as_me:23975: checking if we should include stdbool.h" >&5 +echo "$as_me:25216: checking if we should include stdbool.h" >&5 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6 if test "${cf_cv_header_stdbool_h+set}" = set; then @@ -23980,35 +25221,35 @@ if test "${cf_cv_header_stdbool_h+set}" = set; then else cat >"conftest.$ac_ext" <<_ACEOF -#line 23983 "configure" +#line 25224 "configure" #include "confdefs.h" int main (void) { -bool foo = false +bool foo = false; (void)foo ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:23995: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:25236: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:23998: \$? = $ac_status" >&5 + echo "$as_me:25239: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:24001: \"$ac_try\"") >&5 + { (eval echo "$as_me:25242: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:24004: \$? = $ac_status" >&5 + echo "$as_me:25245: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_header_stdbool_h=0 else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cat >"conftest.$ac_ext" <<_ACEOF -#line 24011 "configure" +#line 25252 "configure" #include "confdefs.h" #ifndef __BEOS__ @@ -24018,22 +25259,22 @@ cat >"conftest.$ac_ext" <<_ACEOF int main (void) { -bool foo = false +bool foo = false; (void)foo ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:24027: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:25268: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:24030: \$? = $ac_status" >&5 + echo "$as_me:25271: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:24033: \"$ac_try\"") >&5 + { (eval echo "$as_me:25274: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:24036: \$? = $ac_status" >&5 + echo "$as_me:25277: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_header_stdbool_h=1 else @@ -24047,13 +25288,13 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi if test "$cf_cv_header_stdbool_h" = 1 -then echo "$as_me:24050: result: yes" >&5 +then echo "$as_me:25291: result: yes" >&5 echo "${ECHO_T}yes" >&6 -else echo "$as_me:24052: result: no" >&5 +else echo "$as_me:25293: result: no" >&5 echo "${ECHO_T}no" >&6 fi -echo "$as_me:24056: checking for builtin bool type" >&5 +echo "$as_me:25297: checking for builtin bool type" >&5 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6 if test "${cf_cv_cc_bool_type+set}" = set; then @@ -24061,7 +25302,7 @@ if test "${cf_cv_cc_bool_type+set}" = set; then else cat >"conftest.$ac_ext" <<_ACEOF -#line 24064 "configure" +#line 25305 "configure" #include "confdefs.h" #include <stdio.h> @@ -24070,22 +25311,22 @@ else int main (void) { -bool x = false +bool x = false; (void)x ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:24079: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:25320: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:24082: \$? = $ac_status" >&5 + echo "$as_me:25323: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:24085: \"$ac_try\"") >&5 + { (eval echo "$as_me:25326: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:24088: \$? = $ac_status" >&5 + echo "$as_me:25329: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_cc_bool_type=1 else @@ -24098,9 +25339,9 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi if test "$cf_cv_cc_bool_type" = 1 -then echo "$as_me:24101: result: yes" >&5 +then echo "$as_me:25342: result: yes" >&5 echo "${ECHO_T}yes" >&6 -else echo "$as_me:24103: result: no" >&5 +else echo "$as_me:25344: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -24117,10 +25358,10 @@ if test -n "$GXX" ; then cf_save="$LIBS" LIBS="$LIBS $CXXLIBS" - echo "$as_me:24120: checking if we already have C++ library" >&5 + echo "$as_me:25361: checking if we already have C++ library" >&5 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6 cat >"conftest.$ac_ext" <<_ACEOF -#line 24123 "configure" +#line 25364 "configure" #include "confdefs.h" #include <iostream> @@ -24134,16 +25375,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:24137: \"$ac_link\"") >&5 +if { (eval echo "$as_me:25378: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:24140: \$? = $ac_status" >&5 + echo "$as_me:25381: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:24143: \"$ac_try\"") >&5 + { (eval echo "$as_me:25384: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:24146: \$? = $ac_status" >&5 + echo "$as_me:25387: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_have_libstdcpp=yes else @@ -24152,7 +25393,7 @@ cat "conftest.$ac_ext" >&5 cf_have_libstdcpp=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" - echo "$as_me:24155: result: $cf_have_libstdcpp" >&5 + echo "$as_me:25396: result: $cf_have_libstdcpp" >&5 echo "${ECHO_T}$cf_have_libstdcpp" >&6 LIBS="$cf_save" @@ -24171,7 +25412,7 @@ echo "${ECHO_T}$cf_have_libstdcpp" >&6 ;; esac - echo "$as_me:24174: checking for library $cf_stdcpp_libname" >&5 + echo "$as_me:25415: checking for library $cf_stdcpp_libname" >&5 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6 if test "${cf_cv_libstdcpp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -24197,7 +25438,7 @@ done LIBS="$cf_add_libs" cat >"conftest.$ac_ext" <<_ACEOF -#line 24200 "configure" +#line 25441 "configure" #include "confdefs.h" #include <iostream> @@ -24211,16 +25452,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:24214: \"$ac_link\"") >&5 +if { (eval echo "$as_me:25455: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:24217: \$? = $ac_status" >&5 + echo "$as_me:25458: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:24220: \"$ac_try\"") >&5 + { (eval echo "$as_me:25461: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:24223: \$? = $ac_status" >&5 + echo "$as_me:25464: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_libstdcpp=yes else @@ -24232,7 +25473,7 @@ rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS="$cf_save" fi -echo "$as_me:24235: result: $cf_cv_libstdcpp" >&5 +echo "$as_me:25476: result: $cf_cv_libstdcpp" >&5 echo "${ECHO_T}$cf_cv_libstdcpp" >&6 test "$cf_cv_libstdcpp" = yes && { cf_add_libs="$CXXLIBS" @@ -24254,7 +25495,7 @@ CXXLIBS="$cf_add_libs" fi fi - echo "$as_me:24257: checking whether $CXX understands -c and -o together" >&5 + echo "$as_me:25498: checking whether $CXX understands -c and -o together" >&5 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6 if test "${cf_cv_prog_CXX_c_o+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -24269,15 +25510,15 @@ CF_EOF # We do the test twice because some compilers refuse to overwrite an # existing .o file with -o, though they will create one. ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5' -if { (eval echo "$as_me:24272: \"$ac_try\"") >&5 +if { (eval echo "$as_me:25513: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:24275: \$? = $ac_status" >&5 + echo "$as_me:25516: \$? = $ac_status" >&5 (exit "$ac_status"); } && - test -f conftest2.$ac_objext && { (eval echo "$as_me:24277: \"$ac_try\"") >&5 + test -f conftest2.$ac_objext && { (eval echo "$as_me:25518: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:24280: \$? = $ac_status" >&5 + echo "$as_me:25521: \$? = $ac_status" >&5 (exit "$ac_status"); }; then eval cf_cv_prog_CXX_c_o=yes @@ -24288,10 +25529,10 @@ rm -rf ./conftest* fi if test "$cf_cv_prog_CXX_c_o" = yes; then - echo "$as_me:24291: result: yes" >&5 + echo "$as_me:25532: result: yes" >&5 echo "${ECHO_T}yes" >&6 else - echo "$as_me:24294: result: no" >&5 + echo "$as_me:25535: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -24311,7 +25552,7 @@ case "$cf_cv_system_name" in ;; esac if test "$GXX" = yes; then - echo "$as_me:24314: checking for lib$cf_gpp_libname" >&5 + echo "$as_me:25555: checking for lib$cf_gpp_libname" >&5 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6 cf_save="$LIBS" @@ -24332,7 +25573,7 @@ done LIBS="$cf_add_libs" cat >"conftest.$ac_ext" <<_ACEOF -#line 24335 "configure" +#line 25576 "configure" #include "confdefs.h" #include <$cf_gpp_libname/builtin.h> @@ -24346,16 +25587,16 @@ two_arg_error_handler_t foo2 = lib_error_handler } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:24349: \"$ac_link\"") >&5 +if { (eval echo "$as_me:25590: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:24352: \$? = $ac_status" >&5 + echo "$as_me:25593: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:24355: \"$ac_try\"") >&5 + { (eval echo "$as_me:25596: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:24358: \$? = $ac_status" >&5 + echo "$as_me:25599: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cxx_library=yes @@ -24392,7 +25633,7 @@ else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cat >"conftest.$ac_ext" <<_ACEOF -#line 24395 "configure" +#line 25636 "configure" #include "confdefs.h" #include <builtin.h> @@ -24406,16 +25647,16 @@ two_arg_error_handler_t foo2 = lib_error_handler } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:24409: \"$ac_link\"") >&5 +if { (eval echo "$as_me:25650: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:24412: \$? = $ac_status" >&5 + echo "$as_me:25653: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:24415: \"$ac_try\"") >&5 + { (eval echo "$as_me:25656: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:24418: \$? = $ac_status" >&5 + echo "$as_me:25659: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cxx_library=yes @@ -24448,7 +25689,7 @@ rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS="$cf_save" - echo "$as_me:24451: result: $cf_cxx_library" >&5 + echo "$as_me:25692: result: $cf_cxx_library" >&5 echo "${ECHO_T}$cf_cxx_library" >&6 fi @@ -24464,7 +25705,7 @@ 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 ac_main_return="return" -echo "$as_me:24467: checking how to run the C++ preprocessor" >&5 +echo "$as_me:25708: checking how to run the C++ preprocessor" >&5 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6 if test -z "$CXXCPP"; then if test "${ac_cv_prog_CXXCPP+set}" = set; then @@ -24481,18 +25722,18 @@ do # 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 24484 "configure" +#line 25725 "configure" #include "confdefs.h" #include <assert.h> Syntax error _ACEOF -if { (eval echo "$as_me:24489: \"$ac_cpp "conftest.$ac_ext"\"") >&5 +if { (eval echo "$as_me:25730: \"$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:24495: \$? = $ac_status" >&5 + echo "$as_me:25736: \$? = $ac_status" >&5 (exit "$ac_status"); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag @@ -24515,17 +25756,17 @@ 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 24518 "configure" +#line 25759 "configure" #include "confdefs.h" #include <ac_nonexistent.h> _ACEOF -if { (eval echo "$as_me:24522: \"$ac_cpp "conftest.$ac_ext"\"") >&5 +if { (eval echo "$as_me:25763: \"$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:24528: \$? = $ac_status" >&5 + echo "$as_me:25769: \$? = $ac_status" >&5 (exit "$ac_status"); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag @@ -24562,7 +25803,7 @@ fi else ac_cv_prog_CXXCPP=$CXXCPP fi -echo "$as_me:24565: result: $CXXCPP" >&5 +echo "$as_me:25806: result: $CXXCPP" >&5 echo "${ECHO_T}$CXXCPP" >&6 ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes @@ -24572,18 +25813,18 @@ do # 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 24575 "configure" +#line 25816 "configure" #include "confdefs.h" #include <assert.h> Syntax error _ACEOF -if { (eval echo "$as_me:24580: \"$ac_cpp "conftest.$ac_ext"\"") >&5 +if { (eval echo "$as_me:25821: \"$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:24586: \$? = $ac_status" >&5 + echo "$as_me:25827: \$? = $ac_status" >&5 (exit "$ac_status"); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag @@ -24606,17 +25847,17 @@ 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 24609 "configure" +#line 25850 "configure" #include "confdefs.h" #include <ac_nonexistent.h> _ACEOF -if { (eval echo "$as_me:24613: \"$ac_cpp "conftest.$ac_ext"\"") >&5 +if { (eval echo "$as_me:25854: \"$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:24619: \$? = $ac_status" >&5 + echo "$as_me:25860: \$? = $ac_status" >&5 (exit "$ac_status"); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag @@ -24644,7 +25885,7 @@ rm -f conftest.err "conftest.$ac_ext" if $ac_preproc_ok; then : else - { { echo "$as_me:24647: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5 + { { echo "$as_me:25888: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;} { (exit 1); exit 1; }; } fi @@ -24659,23 +25900,23 @@ ac_main_return="return" for ac_header in typeinfo do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:24662: checking for $ac_header" >&5 +echo "$as_me:25903: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 24668 "configure" +#line 25909 "configure" #include "confdefs.h" #include <$ac_header> _ACEOF -if { (eval echo "$as_me:24672: \"$ac_cpp "conftest.$ac_ext"\"") >&5 +if { (eval echo "$as_me:25913: \"$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:24678: \$? = $ac_status" >&5 + echo "$as_me:25919: \$? = $ac_status" >&5 (exit "$ac_status"); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag @@ -24694,7 +25935,7 @@ else fi rm -f conftest.err "conftest.$ac_ext" fi -echo "$as_me:24697: result: `eval echo '${'"$as_ac_Header"'}'`" >&5 +echo "$as_me:25938: result: `eval echo '${'"$as_ac_Header"'}'`" >&5 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then cat >>confdefs.h <<EOF @@ -24707,23 +25948,23 @@ done for ac_header in iostream do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:24710: checking for $ac_header" >&5 +echo "$as_me:25951: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 24716 "configure" +#line 25957 "configure" #include "confdefs.h" #include <$ac_header> _ACEOF -if { (eval echo "$as_me:24720: \"$ac_cpp "conftest.$ac_ext"\"") >&5 +if { (eval echo "$as_me:25961: \"$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:24726: \$? = $ac_status" >&5 + echo "$as_me:25967: \$? = $ac_status" >&5 (exit "$ac_status"); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag @@ -24742,7 +25983,7 @@ else fi rm -f conftest.err "conftest.$ac_ext" fi -echo "$as_me:24745: result: `eval echo '${'"$as_ac_Header"'}'`" >&5 +echo "$as_me:25986: result: `eval echo '${'"$as_ac_Header"'}'`" >&5 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then cat >>confdefs.h <<EOF @@ -24753,10 +25994,10 @@ fi done if test x"$ac_cv_header_iostream" = xyes ; then - echo "$as_me:24756: checking if iostream uses std-namespace" >&5 + echo "$as_me:25997: checking if iostream uses std-namespace" >&5 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6 cat >"conftest.$ac_ext" <<_ACEOF -#line 24759 "configure" +#line 26000 "configure" #include "confdefs.h" #include <iostream> @@ -24773,16 +26014,16 @@ cerr << "testing" << endl; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:24776: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:26017: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:24779: \$? = $ac_status" >&5 + echo "$as_me:26020: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:24782: \"$ac_try\"") >&5 + { (eval echo "$as_me:26023: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:24785: \$? = $ac_status" >&5 + echo "$as_me:26026: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_iostream_namespace=yes else @@ -24791,7 +26032,7 @@ cat "conftest.$ac_ext" >&5 cf_iostream_namespace=no fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" - echo "$as_me:24794: result: $cf_iostream_namespace" >&5 + echo "$as_me:26035: result: $cf_iostream_namespace" >&5 echo "${ECHO_T}$cf_iostream_namespace" >&6 if test "$cf_iostream_namespace" = yes ; then @@ -24802,7 +26043,7 @@ EOF fi fi -echo "$as_me:24805: checking if we should include stdbool.h" >&5 +echo "$as_me:26046: checking if we should include stdbool.h" >&5 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6 if test "${cf_cv_header_stdbool_h+set}" = set; then @@ -24810,35 +26051,35 @@ if test "${cf_cv_header_stdbool_h+set}" = set; then else cat >"conftest.$ac_ext" <<_ACEOF -#line 24813 "configure" +#line 26054 "configure" #include "confdefs.h" int main (void) { -bool foo = false +bool foo = false; (void)foo ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:24825: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:26066: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:24828: \$? = $ac_status" >&5 + echo "$as_me:26069: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:24831: \"$ac_try\"") >&5 + { (eval echo "$as_me:26072: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:24834: \$? = $ac_status" >&5 + echo "$as_me:26075: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_header_stdbool_h=0 else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cat >"conftest.$ac_ext" <<_ACEOF -#line 24841 "configure" +#line 26082 "configure" #include "confdefs.h" #ifndef __BEOS__ @@ -24848,22 +26089,22 @@ cat >"conftest.$ac_ext" <<_ACEOF int main (void) { -bool foo = false +bool foo = false; (void)foo ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:24857: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:26098: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:24860: \$? = $ac_status" >&5 + echo "$as_me:26101: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:24863: \"$ac_try\"") >&5 + { (eval echo "$as_me:26104: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:24866: \$? = $ac_status" >&5 + echo "$as_me:26107: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_header_stdbool_h=1 else @@ -24877,13 +26118,13 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi if test "$cf_cv_header_stdbool_h" = 1 -then echo "$as_me:24880: result: yes" >&5 +then echo "$as_me:26121: result: yes" >&5 echo "${ECHO_T}yes" >&6 -else echo "$as_me:24882: result: no" >&5 +else echo "$as_me:26123: result: no" >&5 echo "${ECHO_T}no" >&6 fi -echo "$as_me:24886: checking for builtin bool type" >&5 +echo "$as_me:26127: checking for builtin bool type" >&5 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6 if test "${cf_cv_builtin_bool+set}" = set; then @@ -24891,7 +26132,7 @@ if test "${cf_cv_builtin_bool+set}" = set; then else cat >"conftest.$ac_ext" <<_ACEOF -#line 24894 "configure" +#line 26135 "configure" #include "confdefs.h" #include <stdio.h> @@ -24900,22 +26141,22 @@ else int main (void) { -bool x = false +bool x = false; (void)x ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:24909: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:26150: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:24912: \$? = $ac_status" >&5 + echo "$as_me:26153: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:24915: \"$ac_try\"") >&5 + { (eval echo "$as_me:26156: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:24918: \$? = $ac_status" >&5 + echo "$as_me:26159: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_builtin_bool=1 else @@ -24928,23 +26169,22 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi if test "$cf_cv_builtin_bool" = 1 -then echo "$as_me:24931: result: yes" >&5 +then echo "$as_me:26172: result: yes" >&5 echo "${ECHO_T}yes" >&6 -else echo "$as_me:24933: result: no" >&5 +else echo "$as_me:26174: result: no" >&5 echo "${ECHO_T}no" >&6 fi -echo "$as_me:24937: checking for bool" >&5 +echo "$as_me:26178: checking for bool" >&5 echo $ECHO_N "checking for bool... $ECHO_C" >&6 if test "${ac_cv_type_bool+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 24943 "configure" +#line 26184 "configure" #include "confdefs.h" -#include <stdlib.h> -#include <stdio.h> +$ac_includes_default #if defined(__cplusplus) @@ -24976,16 +26216,16 @@ if (sizeof (bool)) } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:24979: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:26219: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:24982: \$? = $ac_status" >&5 + echo "$as_me:26222: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:24985: \"$ac_try\"") >&5 + { (eval echo "$as_me:26225: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:24988: \$? = $ac_status" >&5 + echo "$as_me:26228: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_type_bool=yes else @@ -24995,10 +26235,10 @@ ac_cv_type_bool=no fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:24998: result: $ac_cv_type_bool" >&5 +echo "$as_me:26238: result: $ac_cv_type_bool" >&5 echo "${ECHO_T}$ac_cv_type_bool" >&6 -echo "$as_me:25001: checking size of bool" >&5 +echo "$as_me:26241: checking size of bool" >&5 echo $ECHO_N "checking size of bool... $ECHO_C" >&6 if test "${ac_cv_sizeof_bool+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -25007,11 +26247,10 @@ else if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >"conftest.$ac_ext" <<_ACEOF -#line 25010 "configure" +#line 26250 "configure" #include "confdefs.h" -#include <stdlib.h> -#include <stdio.h> +$ac_includes_default #if defined(__cplusplus) @@ -25040,25 +26279,24 @@ int _array_ [1 - 2 * !((sizeof (bool)) >= 0)] } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:25043: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:26282: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:25046: \$? = $ac_status" >&5 + echo "$as_me:26285: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:25049: \"$ac_try\"") >&5 + { (eval echo "$as_me:26288: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:25052: \$? = $ac_status" >&5 + echo "$as_me:26291: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_lo=0 ac_mid=0 while :; do cat >"conftest.$ac_ext" <<_ACEOF -#line 25057 "configure" +#line 26296 "configure" #include "confdefs.h" -#include <stdlib.h> -#include <stdio.h> +$ac_includes_default #if defined(__cplusplus) @@ -25087,16 +26325,16 @@ int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)] } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:25090: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:26328: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:25093: \$? = $ac_status" >&5 + echo "$as_me:26331: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:25096: \"$ac_try\"") >&5 + { (eval echo "$as_me:26334: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:25099: \$? = $ac_status" >&5 + echo "$as_me:26337: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_hi=$ac_mid; break else @@ -25112,11 +26350,10 @@ cat "conftest.$ac_ext" >&5 ac_hi=-1 ac_mid=-1 while :; do cat >"conftest.$ac_ext" <<_ACEOF -#line 25115 "configure" +#line 26353 "configure" #include "confdefs.h" -#include <stdlib.h> -#include <stdio.h> +$ac_includes_default #if defined(__cplusplus) @@ -25145,16 +26382,16 @@ int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)] } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:25148: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:26385: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:25151: \$? = $ac_status" >&5 + echo "$as_me:26388: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:25154: \"$ac_try\"") >&5 + { (eval echo "$as_me:26391: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:25157: \$? = $ac_status" >&5 + echo "$as_me:26394: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_lo=$ac_mid; break else @@ -25170,11 +26407,10 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"` cat >"conftest.$ac_ext" <<_ACEOF -#line 25173 "configure" +#line 26410 "configure" #include "confdefs.h" -#include <stdlib.h> -#include <stdio.h> +$ac_includes_default #if defined(__cplusplus) @@ -25203,16 +26439,16 @@ int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)] } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:25206: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:26442: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:25209: \$? = $ac_status" >&5 + echo "$as_me:26445: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:25212: \"$ac_try\"") >&5 + { (eval echo "$as_me:26448: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:25215: \$? = $ac_status" >&5 + echo "$as_me:26451: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_hi=$ac_mid else @@ -25225,16 +26461,15 @@ done ac_cv_sizeof_bool=$ac_lo else if test "$cross_compiling" = yes; then - { { echo "$as_me:25228: error: cannot run test program while cross compiling" >&5 + { { echo "$as_me:26464: error: cannot run test program while cross compiling" >&5 echo "$as_me: error: cannot run test program while cross compiling" >&2;} { (exit 1); exit 1; }; } else cat >"conftest.$ac_ext" <<_ACEOF -#line 25233 "configure" +#line 26469 "configure" #include "confdefs.h" -#include <stdlib.h> -#include <stdio.h> +$ac_includes_default #if defined(__cplusplus) @@ -25260,22 +26495,22 @@ main (void) FILE *f = fopen ("conftest.val", "w"); if (!f) $ac_main_return (1); -fprintf (f, "%d", (sizeof (bool))); +fprintf (f, "%ld", (long)(sizeof (bool))); fclose (f); ; return 0; } _ACEOF rm -f "conftest$ac_exeext" -if { (eval echo "$as_me:25270: \"$ac_link\"") >&5 +if { (eval echo "$as_me:26505: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:25273: \$? = $ac_status" >&5 + echo "$as_me:26508: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"' - { (eval echo "$as_me:25275: \"$ac_try\"") >&5 + { (eval echo "$as_me:26510: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:25278: \$? = $ac_status" >&5 + echo "$as_me:26513: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_sizeof_bool=`cat conftest.val` else @@ -25291,13 +26526,13 @@ else ac_cv_sizeof_bool=0 fi fi -echo "$as_me:25294: result: $ac_cv_sizeof_bool" >&5 +echo "$as_me:26529: result: $ac_cv_sizeof_bool" >&5 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6 cat >>confdefs.h <<EOF #define SIZEOF_BOOL $ac_cv_sizeof_bool EOF -echo "$as_me:25300: checking for type of bool" >&5 +echo "$as_me:26535: checking for type of bool" >&5 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6 if test "${cf_cv_type_of_bool+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -25316,11 +26551,10 @@ else else cat >"conftest.$ac_ext" <<_ACEOF -#line 25319 "configure" +#line 26554 "configure" #include "confdefs.h" -#include <stdlib.h> -#include <stdio.h> +$ac_includes_default #if defined(__cplusplus) @@ -25358,15 +26592,15 @@ int main(void) _ACEOF rm -f "conftest$ac_exeext" -if { (eval echo "$as_me:25361: \"$ac_link\"") >&5 +if { (eval echo "$as_me:26595: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:25364: \$? = $ac_status" >&5 + echo "$as_me:26598: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"' - { (eval echo "$as_me:25366: \"$ac_try\"") >&5 + { (eval echo "$as_me:26600: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:25369: \$? = $ac_status" >&5 + echo "$as_me:26603: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_type_of_bool=`cat cf_test.out` if test -z "$cf_cv_type_of_bool"; then @@ -25383,19 +26617,19 @@ fi rm -f cf_test.out fi -echo "$as_me:25386: result: $cf_cv_type_of_bool" >&5 +echo "$as_me:26620: result: $cf_cv_type_of_bool" >&5 echo "${ECHO_T}$cf_cv_type_of_bool" >&6 if test "$cf_cv_type_of_bool" = unknown ; then case .$NCURSES_BOOL in (.auto|.) NCURSES_BOOL=unsigned;; esac - { echo "$as_me:25393: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5 + { echo "$as_me:26627: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;} cf_cv_type_of_bool=$NCURSES_BOOL fi -echo "$as_me:25398: checking for special defines needed for etip.h" >&5 +echo "$as_me:26632: checking for special defines needed for etip.h" >&5 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6 cf_save_CXXFLAGS="$CXXFLAGS" cf_result="none" @@ -25413,7 +26647,7 @@ do test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}" test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}" cat >"conftest.$ac_ext" <<_ACEOF -#line 25416 "configure" +#line 26650 "configure" #include "confdefs.h" #include <etip.h.in> @@ -25427,16 +26661,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:25430: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:26664: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:25433: \$? = $ac_status" >&5 + echo "$as_me:26667: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:25436: \"$ac_try\"") >&5 + { (eval echo "$as_me:26670: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:25439: \$? = $ac_status" >&5 + echo "$as_me:26673: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then test -n "$cf_math" && cat >>confdefs.h <<EOF @@ -25457,12 +26691,84 @@ fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" done done -echo "$as_me:25460: result: $cf_result" >&5 -echo "${ECHO_T}$cf_result" >&6 +echo "$as_me:26694: result: ${cf_result:-(none)}" >&5 +echo "${ECHO_T}${cf_result:-(none)}" >&6 CXXFLAGS="$cf_save_CXXFLAGS" if test -n "$CXX"; then -echo "$as_me:25465: checking if $CXX accepts parameter initialization" >&5 +echo "$as_me:26699: checking if $CXX accepts override keyword" >&5 +echo $ECHO_N "checking if $CXX accepts override keyword... $ECHO_C" >&6 +if test "${cf_cv_cpp_override+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + 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 +ac_main_return="return" + + if test "$cross_compiling" = yes; then + cf_cv_cpp_override=unknown +else + cat >"conftest.$ac_ext" <<_ACEOF +#line 26716 "configure" +#include "confdefs.h" + +class base +{ +public: + virtual int foo(float x) = 0; +}; + +class derived: public base +{ +public: + int foo(float x) override { return x != 0.0 ? 1 : 0; } +}; + +int main(void) { } + +_ACEOF +rm -f "conftest$ac_exeext" +if { (eval echo "$as_me:26735: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:26738: \$? = $ac_status" >&5 + (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"' + { (eval echo "$as_me:26740: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:26743: \$? = $ac_status" >&5 + (exit "$ac_status"); }; }; then + cf_cv_cpp_override=yes +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat "conftest.$ac_ext" >&5 +cf_cv_cpp_override=no +fi +rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext" +fi + 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 +ac_main_return="return" + +fi +echo "$as_me:26762: result: $cf_cv_cpp_override" >&5 +echo "${ECHO_T}$cf_cv_cpp_override" >&6 +fi +test "$cf_cv_cpp_override" = yes && +cat >>confdefs.h <<\EOF +#define CPP_HAS_OVERRIDE 1 +EOF + +if test -n "$CXX"; then +echo "$as_me:26771: checking if $CXX accepts parameter initialization" >&5 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6 if test "${cf_cv_cpp_param_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -25479,7 +26785,7 @@ ac_main_return="return" cf_cv_cpp_param_init=unknown else cat >"conftest.$ac_ext" <<_ACEOF -#line 25482 "configure" +#line 26788 "configure" #include "confdefs.h" class TEST { @@ -25498,15 +26804,15 @@ int main(void) { } _ACEOF rm -f "conftest$ac_exeext" -if { (eval echo "$as_me:25501: \"$ac_link\"") >&5 +if { (eval echo "$as_me:26807: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:25504: \$? = $ac_status" >&5 + echo "$as_me:26810: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"' - { (eval echo "$as_me:25506: \"$ac_try\"") >&5 + { (eval echo "$as_me:26812: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:25509: \$? = $ac_status" >&5 + echo "$as_me:26815: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_cpp_param_init=yes else @@ -25525,7 +26831,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_main_return="return" fi -echo "$as_me:25528: result: $cf_cv_cpp_param_init" >&5 +echo "$as_me:26834: result: $cf_cv_cpp_param_init" >&5 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6 fi test "$cf_cv_cpp_param_init" = yes && @@ -25535,7 +26841,7 @@ EOF if test -n "$CXX"; then -echo "$as_me:25538: checking if $CXX accepts static_cast" >&5 +echo "$as_me:26844: checking if $CXX accepts static_cast" >&5 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6 if test "${cf_cv_cpp_static_cast+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -25549,7 +26855,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_main_return="return" cat >"conftest.$ac_ext" <<_ACEOF -#line 25552 "configure" +#line 26858 "configure" #include "confdefs.h" class NCursesPanel @@ -25593,16 +26899,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:25596: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:26902: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:25599: \$? = $ac_status" >&5 + echo "$as_me:26905: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:25602: \"$ac_try\"") >&5 + { (eval echo "$as_me:26908: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:25605: \$? = $ac_status" >&5 + echo "$as_me:26911: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_cpp_static_cast=yes else @@ -25620,7 +26926,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_main_return="return" fi -echo "$as_me:25623: result: $cf_cv_cpp_static_cast" >&5 +echo "$as_me:26929: result: $cf_cv_cpp_static_cast" >&5 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6 fi @@ -25669,17 +26975,16 @@ else else if test "$cf_cv_header_stdbool_h" = 1 ; then -echo "$as_me:25672: checking for bool" >&5 +echo "$as_me:26978: checking for bool" >&5 echo $ECHO_N "checking for bool... $ECHO_C" >&6 if test "${ac_cv_type_bool+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 25678 "configure" +#line 26984 "configure" #include "confdefs.h" -#include <stdlib.h> -#include <stdio.h> +$ac_includes_default #if defined(__cplusplus) @@ -25711,16 +27016,16 @@ if (sizeof (bool)) } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:25714: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:27019: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:25717: \$? = $ac_status" >&5 + echo "$as_me:27022: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:25720: \"$ac_try\"") >&5 + { (eval echo "$as_me:27025: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:25723: \$? = $ac_status" >&5 + echo "$as_me:27028: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_type_bool=yes else @@ -25730,10 +27035,10 @@ ac_cv_type_bool=no fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:25733: result: $ac_cv_type_bool" >&5 +echo "$as_me:27038: result: $ac_cv_type_bool" >&5 echo "${ECHO_T}$ac_cv_type_bool" >&6 -echo "$as_me:25736: checking size of bool" >&5 +echo "$as_me:27041: checking size of bool" >&5 echo $ECHO_N "checking size of bool... $ECHO_C" >&6 if test "${ac_cv_sizeof_bool+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -25742,11 +27047,10 @@ else if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >"conftest.$ac_ext" <<_ACEOF -#line 25745 "configure" +#line 27050 "configure" #include "confdefs.h" -#include <stdlib.h> -#include <stdio.h> +$ac_includes_default #if defined(__cplusplus) @@ -25775,25 +27079,24 @@ int _array_ [1 - 2 * !((sizeof (bool)) >= 0)] } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:25778: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:27082: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:25781: \$? = $ac_status" >&5 + echo "$as_me:27085: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:25784: \"$ac_try\"") >&5 + { (eval echo "$as_me:27088: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:25787: \$? = $ac_status" >&5 + echo "$as_me:27091: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_lo=0 ac_mid=0 while :; do cat >"conftest.$ac_ext" <<_ACEOF -#line 25792 "configure" +#line 27096 "configure" #include "confdefs.h" -#include <stdlib.h> -#include <stdio.h> +$ac_includes_default #if defined(__cplusplus) @@ -25822,16 +27125,16 @@ int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)] } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:25825: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:27128: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:25828: \$? = $ac_status" >&5 + echo "$as_me:27131: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:25831: \"$ac_try\"") >&5 + { (eval echo "$as_me:27134: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:25834: \$? = $ac_status" >&5 + echo "$as_me:27137: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_hi=$ac_mid; break else @@ -25847,11 +27150,10 @@ cat "conftest.$ac_ext" >&5 ac_hi=-1 ac_mid=-1 while :; do cat >"conftest.$ac_ext" <<_ACEOF -#line 25850 "configure" +#line 27153 "configure" #include "confdefs.h" -#include <stdlib.h> -#include <stdio.h> +$ac_includes_default #if defined(__cplusplus) @@ -25880,16 +27182,16 @@ int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)] } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:25883: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:27185: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:25886: \$? = $ac_status" >&5 + echo "$as_me:27188: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:25889: \"$ac_try\"") >&5 + { (eval echo "$as_me:27191: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:25892: \$? = $ac_status" >&5 + echo "$as_me:27194: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_lo=$ac_mid; break else @@ -25905,11 +27207,10 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"` cat >"conftest.$ac_ext" <<_ACEOF -#line 25908 "configure" +#line 27210 "configure" #include "confdefs.h" -#include <stdlib.h> -#include <stdio.h> +$ac_includes_default #if defined(__cplusplus) @@ -25938,16 +27239,16 @@ int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)] } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:25941: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:27242: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:25944: \$? = $ac_status" >&5 + echo "$as_me:27245: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:25947: \"$ac_try\"") >&5 + { (eval echo "$as_me:27248: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:25950: \$? = $ac_status" >&5 + echo "$as_me:27251: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_hi=$ac_mid else @@ -25960,16 +27261,15 @@ done ac_cv_sizeof_bool=$ac_lo else if test "$cross_compiling" = yes; then - { { echo "$as_me:25963: error: cannot run test program while cross compiling" >&5 + { { echo "$as_me:27264: error: cannot run test program while cross compiling" >&5 echo "$as_me: error: cannot run test program while cross compiling" >&2;} { (exit 1); exit 1; }; } else cat >"conftest.$ac_ext" <<_ACEOF -#line 25968 "configure" +#line 27269 "configure" #include "confdefs.h" -#include <stdlib.h> -#include <stdio.h> +$ac_includes_default #if defined(__cplusplus) @@ -25995,22 +27295,22 @@ main (void) FILE *f = fopen ("conftest.val", "w"); if (!f) $ac_main_return (1); -fprintf (f, "%d", (sizeof (bool))); +fprintf (f, "%ld", (long)(sizeof (bool))); fclose (f); ; return 0; } _ACEOF rm -f "conftest$ac_exeext" -if { (eval echo "$as_me:26005: \"$ac_link\"") >&5 +if { (eval echo "$as_me:27305: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:26008: \$? = $ac_status" >&5 + echo "$as_me:27308: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"' - { (eval echo "$as_me:26010: \"$ac_try\"") >&5 + { (eval echo "$as_me:27310: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:26013: \$? = $ac_status" >&5 + echo "$as_me:27313: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_sizeof_bool=`cat conftest.val` else @@ -26026,13 +27326,13 @@ else ac_cv_sizeof_bool=0 fi fi -echo "$as_me:26029: result: $ac_cv_sizeof_bool" >&5 +echo "$as_me:27329: result: $ac_cv_sizeof_bool" >&5 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6 cat >>confdefs.h <<EOF #define SIZEOF_BOOL $ac_cv_sizeof_bool EOF -echo "$as_me:26035: checking for type of bool" >&5 +echo "$as_me:27335: checking for type of bool" >&5 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6 if test "${cf_cv_type_of_bool+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -26051,11 +27351,10 @@ else else cat >"conftest.$ac_ext" <<_ACEOF -#line 26054 "configure" +#line 27354 "configure" #include "confdefs.h" -#include <stdlib.h> -#include <stdio.h> +$ac_includes_default #if defined(__cplusplus) @@ -26093,15 +27392,15 @@ int main(void) _ACEOF rm -f "conftest$ac_exeext" -if { (eval echo "$as_me:26096: \"$ac_link\"") >&5 +if { (eval echo "$as_me:27395: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:26099: \$? = $ac_status" >&5 + echo "$as_me:27398: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"' - { (eval echo "$as_me:26101: \"$ac_try\"") >&5 + { (eval echo "$as_me:27400: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:26104: \$? = $ac_status" >&5 + echo "$as_me:27403: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_type_of_bool=`cat cf_test.out` if test -z "$cf_cv_type_of_bool"; then @@ -26118,26 +27417,26 @@ fi rm -f cf_test.out fi -echo "$as_me:26121: result: $cf_cv_type_of_bool" >&5 +echo "$as_me:27420: result: $cf_cv_type_of_bool" >&5 echo "${ECHO_T}$cf_cv_type_of_bool" >&6 if test "$cf_cv_type_of_bool" = unknown ; then case .$NCURSES_BOOL in (.auto|.) NCURSES_BOOL=unsigned;; esac - { echo "$as_me:26128: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5 + { echo "$as_me:27427: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;} cf_cv_type_of_bool=$NCURSES_BOOL fi else - echo "$as_me:26134: checking for fallback type of bool" >&5 + echo "$as_me:27433: checking for fallback type of bool" >&5 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6 case "$host_cpu" in (i?86) cf_cv_type_of_bool=char ;; (*) cf_cv_type_of_bool=int ;; esac - echo "$as_me:26140: result: $cf_cv_type_of_bool" >&5 + echo "$as_me:27439: result: $cf_cv_type_of_bool" >&5 echo "${ECHO_T}$cf_cv_type_of_bool" >&6 fi fi @@ -26166,7 +27465,7 @@ if test -f "${srcdir}/Ada95/Makefile.in" ; then if test "$cf_with_ada" != "no" ; then if test "$with_libtool" != "no"; then - { echo "$as_me:26169: WARNING: libtool does not support Ada - disabling feature" >&5 + { echo "$as_me:27468: WARNING: libtool does not support Ada - disabling feature" >&5 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;} cf_with_ada=no fi @@ -26183,7 +27482,7 @@ cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./- unset cf_TEMP_gnat # Extract the first word of "$cf_prog_gnat", so it can be a program name with args. set dummy $cf_prog_gnat; ac_word=$2 -echo "$as_me:26186: checking for $ac_word" >&5 +echo "$as_me:27485: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -26200,7 +27499,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if $as_executable_p "$ac_dir/$ac_word"; then ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word" - echo "$as_me:26203: found $ac_dir/$ac_word" >&5 + echo "$as_me:27502: found $ac_dir/$ac_word" >&5 break fi done @@ -26212,10 +27511,10 @@ fi cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat if test -n "$cf_TEMP_gnat"; then - echo "$as_me:26215: result: $cf_TEMP_gnat" >&5 + echo "$as_me:27514: result: $cf_TEMP_gnat" >&5 echo "${ECHO_T}$cf_TEMP_gnat" >&6 else - echo "$as_me:26218: result: no" >&5 + echo "$as_me:27517: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -26225,7 +27524,7 @@ fi unset cf_cv_gnat_version unset cf_TEMP_gnat -echo "$as_me:26228: checking for $cf_prog_gnat version" >&5 +echo "$as_me:27527: checking for $cf_prog_gnat version" >&5 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6 if test "${cf_cv_gnat_version+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -26236,7 +27535,7 @@ cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \ sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'` fi -echo "$as_me:26239: result: $cf_cv_gnat_version" >&5 +echo "$as_me:27538: result: $cf_cv_gnat_version" >&5 echo "${ECHO_T}$cf_cv_gnat_version" >&6 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version @@ -26265,7 +27564,7 @@ else cd conftest.src for cf_gprconfig in Ada C do - echo "$as_me:26268: checking for gprconfig name for $cf_gprconfig" >&5 + echo "$as_me:27567: checking for gprconfig name for $cf_gprconfig" >&5 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6 if test "$cf_gprconfig" = C then @@ -26284,10 +27583,10 @@ echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6 if test -n "$cf_gprconfig_value" then eval "cf_ada_config_$cf_gprconfig=$cf_gprconfig_value" - echo "$as_me:26287: result: $cf_gprconfig_value" >&5 + echo "$as_me:27586: result: $cf_gprconfig_value" >&5 echo "${ECHO_T}$cf_gprconfig_value" >&6 else - echo "$as_me:26290: result: missing" >&5 + echo "$as_me:27589: result: missing" >&5 echo "${ECHO_T}missing" >&6 cf_ada_config="#" break @@ -26300,7 +27599,7 @@ echo "${ECHO_T}missing" >&6 if test "x$cf_ada_config" != "x#" then -echo "$as_me:26303: checking for gnat version" >&5 +echo "$as_me:27602: checking for gnat version" >&5 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6 if test "${cf_cv_gnat_version+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -26311,7 +27610,7 @@ cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \ sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'` fi -echo "$as_me:26314: result: $cf_cv_gnat_version" >&5 +echo "$as_me:27613: result: $cf_cv_gnat_version" >&5 echo "${ECHO_T}$cf_cv_gnat_version" >&6 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no @@ -26320,7 +27619,7 @@ case "$cf_cv_gnat_version" in cf_cv_prog_gnat_correct=yes ;; (*) - { echo "$as_me:26323: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5 + { echo "$as_me:27622: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;} cf_cv_prog_gnat_correct=no ;; @@ -26328,7 +27627,7 @@ esac # Extract the first word of "m4", so it can be a program name with args. set dummy m4; ac_word=$2 -echo "$as_me:26331: checking for $ac_word" >&5 +echo "$as_me:27630: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_M4_exists+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -26343,7 +27642,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_M4_exists="yes" -echo "$as_me:26346: found $ac_dir/$ac_word" >&5 +echo "$as_me:27645: found $ac_dir/$ac_word" >&5 break done @@ -26352,20 +27651,20 @@ fi fi M4_exists=$ac_cv_prog_M4_exists if test -n "$M4_exists"; then - echo "$as_me:26355: result: $M4_exists" >&5 + echo "$as_me:27654: result: $M4_exists" >&5 echo "${ECHO_T}$M4_exists" >&6 else - echo "$as_me:26358: result: no" >&5 + echo "$as_me:27657: result: no" >&5 echo "${ECHO_T}no" >&6 fi if test "$ac_cv_prog_M4_exists" = no; then cf_cv_prog_gnat_correct=no - { echo "$as_me:26364: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5 + { echo "$as_me:27663: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;} fi if test "$cf_cv_prog_gnat_correct" = yes; then - echo "$as_me:26368: checking if GNAT works" >&5 + echo "$as_me:27667: checking if GNAT works" >&5 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6 rm -rf ./conftest* ./*~conftest* @@ -26393,7 +27692,7 @@ else fi rm -rf ./conftest* ./*~conftest* - echo "$as_me:26396: result: $cf_cv_prog_gnat_correct" >&5 + echo "$as_me:27695: result: $cf_cv_prog_gnat_correct" >&5 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6 fi else @@ -26405,7 +27704,7 @@ fi ADAFLAGS="$ADAFLAGS -gnatpn" - echo "$as_me:26408: checking optimization options for ADAFLAGS" >&5 + echo "$as_me:27707: checking optimization options for ADAFLAGS" >&5 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6 case "$CFLAGS" in (*-g*) @@ -26422,10 +27721,10 @@ echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6 ;; esac - echo "$as_me:26425: result: $ADAFLAGS" >&5 + echo "$as_me:27724: result: $ADAFLAGS" >&5 echo "${ECHO_T}$ADAFLAGS" >&6 -echo "$as_me:26428: checking if GNATPREP supports -T option" >&5 +echo "$as_me:27727: checking if GNATPREP supports -T option" >&5 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6 if test "${cf_cv_gnatprep_opt_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -26435,11 +27734,11 @@ cf_cv_gnatprep_opt_t=no gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes fi -echo "$as_me:26438: result: $cf_cv_gnatprep_opt_t" >&5 +echo "$as_me:27737: result: $cf_cv_gnatprep_opt_t" >&5 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS" -echo "$as_me:26442: checking if GNAT supports generics" >&5 +echo "$as_me:27741: checking if GNAT supports generics" >&5 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6 case "$cf_cv_gnat_version" in (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9]) @@ -26449,7 +27748,7 @@ case "$cf_cv_gnat_version" in cf_gnat_generics=no ;; esac -echo "$as_me:26452: result: $cf_gnat_generics" >&5 +echo "$as_me:27751: result: $cf_gnat_generics" >&5 echo "${ECHO_T}$cf_gnat_generics" >&6 if test "$cf_gnat_generics" = yes @@ -26461,7 +27760,7 @@ else cf_generic_objects= fi -echo "$as_me:26464: checking if GNAT supports SIGINT" >&5 +echo "$as_me:27763: checking if GNAT supports SIGINT" >&5 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6 if test "${cf_cv_gnat_sigint+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -26509,7 +27808,7 @@ fi rm -rf ./conftest* ./*~conftest* fi -echo "$as_me:26512: result: $cf_cv_gnat_sigint" >&5 +echo "$as_me:27811: result: $cf_cv_gnat_sigint" >&5 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6 if test "$cf_cv_gnat_sigint" = yes ; then @@ -26522,7 +27821,7 @@ cf_gnat_libraries=no cf_gnat_projects=no if test "$enable_gnat_projects" != no ; then -echo "$as_me:26525: checking if GNAT supports project files" >&5 +echo "$as_me:27824: checking if GNAT supports project files" >&5 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6 case "$cf_cv_gnat_version" in (3.[0-9]*) @@ -26585,15 +27884,15 @@ CF_EOF esac ;; esac -echo "$as_me:26588: result: $cf_gnat_projects" >&5 +echo "$as_me:27887: result: $cf_gnat_projects" >&5 echo "${ECHO_T}$cf_gnat_projects" >&6 fi # enable_gnat_projects if test "$cf_gnat_projects" = yes then - echo "$as_me:26594: checking if GNAT supports libraries" >&5 + echo "$as_me:27893: checking if GNAT supports libraries" >&5 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6 - echo "$as_me:26596: result: $cf_gnat_libraries" >&5 + echo "$as_me:27895: result: $cf_gnat_libraries" >&5 echo "${ECHO_T}$cf_gnat_libraries" >&6 fi @@ -26613,7 +27912,7 @@ then then USE_GNAT_MAKE_GPR="" else - { echo "$as_me:26616: WARNING: use old makefile rules since tools are missing" >&5 + { echo "$as_me:27915: WARNING: use old makefile rules since tools are missing" >&5 echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;} fi fi @@ -26625,8 +27924,8 @@ else USE_GNAT_LIBRARIES="#" fi -echo "$as_me:26628: checking for ada-compiler" >&5 -echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6 +echo "$as_me:27927: checking for Ada95 compiler" >&5 +echo $ECHO_N "checking for Ada95 compiler... $ECHO_C" >&6 # Check whether --with-ada-compiler or --without-ada-compiler was given. if test "${with_ada_compiler+set}" = set; then @@ -26636,13 +27935,13 @@ else cf_ada_compiler=gnatmake fi; -echo "$as_me:26639: result: $cf_ada_compiler" >&5 +echo "$as_me:27938: result: $cf_ada_compiler" >&5 echo "${ECHO_T}$cf_ada_compiler" >&6 cf_ada_package=terminal_interface -echo "$as_me:26644: checking for ada-include" >&5 -echo $ECHO_N "checking for ada-include... $ECHO_C" >&6 +echo "$as_me:27943: checking for Ada95 include directory" >&5 +echo $ECHO_N "checking for Ada95 include directory... $ECHO_C" >&6 # Check whether --with-ada-include or --without-ada-include was given. if test "${with_ada_include+set}" = set; then @@ -26677,7 +27976,7 @@ case ".$withval" in withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%` ;; (*) - { { echo "$as_me:26680: error: expected a pathname, not \"$withval\"" >&5 + { { echo "$as_me:27979: error: expected a pathname, not \"$withval\"" >&5 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;} { (exit 1); exit 1; }; } ;; @@ -26686,11 +27985,11 @@ esac fi eval ADA_INCLUDE="$withval" -echo "$as_me:26689: result: $ADA_INCLUDE" >&5 +echo "$as_me:27988: result: $ADA_INCLUDE" >&5 echo "${ECHO_T}$ADA_INCLUDE" >&6 -echo "$as_me:26692: checking for ada-objects" >&5 -echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6 +echo "$as_me:27991: checking for Ada95 object directory" >&5 +echo $ECHO_N "checking for Ada95 object directory... $ECHO_C" >&6 # Check whether --with-ada-objects or --without-ada-objects was given. if test "${with_ada_objects+set}" = set; then @@ -26725,7 +28024,7 @@ case ".$withval" in withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%` ;; (*) - { { echo "$as_me:26728: error: expected a pathname, not \"$withval\"" >&5 + { { echo "$as_me:28027: error: expected a pathname, not \"$withval\"" >&5 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;} { (exit 1); exit 1; }; } ;; @@ -26734,11 +28033,11 @@ esac fi eval ADA_OBJECTS="$withval" -echo "$as_me:26737: result: $ADA_OBJECTS" >&5 +echo "$as_me:28036: result: $ADA_OBJECTS" >&5 echo "${ECHO_T}$ADA_OBJECTS" >&6 -echo "$as_me:26740: checking if an Ada95 shared-library should be built" >&5 -echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6 +echo "$as_me:28039: checking whether to build an Ada95 shared library" >&5 +echo $ECHO_N "checking whether to build an Ada95 shared library... $ECHO_C" >&6 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given. if test "${with_ada_sharedlib+set}" = set; then @@ -26747,19 +28046,25 @@ if test "${with_ada_sharedlib+set}" = set; then else with_ada_sharedlib=no fi; -echo "$as_me:26750: result: $with_ada_sharedlib" >&5 -echo "${ECHO_T}$with_ada_sharedlib" >&6 +cf_ada_sharedlib_warn=no if test "x$with_ada_sharedlib" != xno then if test "x$cf_gnat_projects" != xyes then - { echo "$as_me:26757: WARNING: disabling shared-library since GNAT projects are not supported" >&5 -echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;} with_ada_sharedlib=no + cf_ada_sharedlib_warn=yes fi fi +echo "$as_me:28060: result: $with_ada_sharedlib" >&5 +echo "${ECHO_T}$with_ada_sharedlib" >&6 +if test "x$cf_ada_sharedlib_warn" != xno +then + { echo "$as_me:28064: WARNING: disabling Ada95 shared library since GNAT projects are not supported" >&5 +echo "$as_me: WARNING: disabling Ada95 shared library since GNAT projects are not supported" >&2;} +fi + ADA_SHAREDLIB='lib$(LIB_NAME).so.1' MAKE_ADA_SHAREDLIB="#" @@ -26774,8 +28079,8 @@ fi # allow the Ada binding to be renamed -echo "$as_me:26777: checking for ada-libname" >&5 -echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6 +echo "$as_me:28082: checking for Ada95 curses library name" >&5 +echo $ECHO_N "checking for Ada95 curses library name... $ECHO_C" >&6 # Check whether --with-ada-libname or --without-ada-libname was given. if test "${with_ada_libname+set}" = set; then @@ -26790,7 +28095,7 @@ case "x$ADA_LIBNAME" in ;; esac -echo "$as_me:26793: result: $ADA_LIBNAME" >&5 +echo "$as_me:28098: result: $ADA_LIBNAME" >&5 echo "${ECHO_T}$ADA_LIBNAME" >&6 fi @@ -26801,13 +28106,13 @@ fi # do this "late" to avoid conflict with header-checks if test "x$with_widec" = xyes ; then - echo "$as_me:26804: checking for wchar_t" >&5 + echo "$as_me:28109: checking for wchar_t" >&5 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6 if test "${ac_cv_type_wchar_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 26810 "configure" +#line 28115 "configure" #include "confdefs.h" $ac_includes_default int @@ -26822,16 +28127,16 @@ if (sizeof (wchar_t)) } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:26825: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:28130: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:26828: \$? = $ac_status" >&5 + echo "$as_me:28133: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:26831: \"$ac_try\"") >&5 + { (eval echo "$as_me:28136: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:26834: \$? = $ac_status" >&5 + echo "$as_me:28139: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_type_wchar_t=yes else @@ -26841,10 +28146,10 @@ ac_cv_type_wchar_t=no fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:26844: result: $ac_cv_type_wchar_t" >&5 +echo "$as_me:28149: result: $ac_cv_type_wchar_t" >&5 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6 -echo "$as_me:26847: checking size of wchar_t" >&5 +echo "$as_me:28152: checking size of wchar_t" >&5 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6 if test "${ac_cv_sizeof_wchar_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -26853,7 +28158,7 @@ else if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >"conftest.$ac_ext" <<_ACEOF -#line 26856 "configure" +#line 28161 "configure" #include "confdefs.h" $ac_includes_default int @@ -26865,21 +28170,21 @@ int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)] } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:26868: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:28173: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:26871: \$? = $ac_status" >&5 + echo "$as_me:28176: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:26874: \"$ac_try\"") >&5 + { (eval echo "$as_me:28179: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:26877: \$? = $ac_status" >&5 + echo "$as_me:28182: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_lo=0 ac_mid=0 while :; do cat >"conftest.$ac_ext" <<_ACEOF -#line 26882 "configure" +#line 28187 "configure" #include "confdefs.h" $ac_includes_default int @@ -26891,16 +28196,16 @@ int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)] } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:26894: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:28199: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:26897: \$? = $ac_status" >&5 + echo "$as_me:28202: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:26900: \"$ac_try\"") >&5 + { (eval echo "$as_me:28205: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:26903: \$? = $ac_status" >&5 + echo "$as_me:28208: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_hi=$ac_mid; break else @@ -26916,7 +28221,7 @@ cat "conftest.$ac_ext" >&5 ac_hi=-1 ac_mid=-1 while :; do cat >"conftest.$ac_ext" <<_ACEOF -#line 26919 "configure" +#line 28224 "configure" #include "confdefs.h" $ac_includes_default int @@ -26928,16 +28233,16 @@ int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)] } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:26931: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:28236: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:26934: \$? = $ac_status" >&5 + echo "$as_me:28239: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:26937: \"$ac_try\"") >&5 + { (eval echo "$as_me:28242: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:26940: \$? = $ac_status" >&5 + echo "$as_me:28245: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_lo=$ac_mid; break else @@ -26953,7 +28258,7 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"` cat >"conftest.$ac_ext" <<_ACEOF -#line 26956 "configure" +#line 28261 "configure" #include "confdefs.h" $ac_includes_default int @@ -26965,16 +28270,16 @@ int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)] } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:26968: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:28273: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:26971: \$? = $ac_status" >&5 + echo "$as_me:28276: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:26974: \"$ac_try\"") >&5 + { (eval echo "$as_me:28279: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:26977: \$? = $ac_status" >&5 + echo "$as_me:28282: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_hi=$ac_mid else @@ -26987,12 +28292,12 @@ done ac_cv_sizeof_wchar_t=$ac_lo else if test "$cross_compiling" = yes; then - { { echo "$as_me:26990: error: cannot run test program while cross compiling" >&5 + { { echo "$as_me:28295: error: cannot run test program while cross compiling" >&5 echo "$as_me: error: cannot run test program while cross compiling" >&2;} { (exit 1); exit 1; }; } else cat >"conftest.$ac_ext" <<_ACEOF -#line 26995 "configure" +#line 28300 "configure" #include "confdefs.h" $ac_includes_default int @@ -27001,22 +28306,22 @@ main (void) FILE *f = fopen ("conftest.val", "w"); if (!f) $ac_main_return (1); -fprintf (f, "%d", (sizeof (wchar_t))); +fprintf (f, "%ld", (long)(sizeof (wchar_t))); fclose (f); ; return 0; } _ACEOF rm -f "conftest$ac_exeext" -if { (eval echo "$as_me:27011: \"$ac_link\"") >&5 +if { (eval echo "$as_me:28316: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:27014: \$? = $ac_status" >&5 + echo "$as_me:28319: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"' - { (eval echo "$as_me:27016: \"$ac_try\"") >&5 + { (eval echo "$as_me:28321: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:27019: \$? = $ac_status" >&5 + echo "$as_me:28324: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_sizeof_wchar_t=`cat conftest.val` else @@ -27032,7 +28337,7 @@ else ac_cv_sizeof_wchar_t=0 fi fi -echo "$as_me:27035: result: $ac_cv_sizeof_wchar_t" >&5 +echo "$as_me:28340: result: $ac_cv_sizeof_wchar_t" >&5 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6 cat >>confdefs.h <<EOF #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t @@ -27045,7 +28350,7 @@ EOF then test -n "$verbose" && echo " test failed (assume 2)" 1>&6 -echo "${as_me:-configure}:27048: testing test failed (assume 2) ..." 1>&5 +echo "${as_me:-configure}:28353: testing test failed (assume 2) ..." 1>&5 sed /SIZEOF_WCHAR_T/d confdefs.h >confdefs.tmp mv confdefs.tmp confdefs.h @@ -27063,7 +28368,7 @@ fi ### chooses to split module lists into libraries. ### ### (see CF_LIB_RULES). -echo "$as_me:27066: checking for library subsets" >&5 +echo "$as_me:28371: checking for library subsets" >&5 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6 LIB_SUBSETS= @@ -27117,7 +28422,7 @@ fi test "x$with_widec" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar" test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs" -echo "$as_me:27120: result: $LIB_SUBSETS" >&5 +echo "$as_me:28425: result: $LIB_SUBSETS" >&5 echo "${ECHO_T}$LIB_SUBSETS" >&6 ### Construct the list of include-directories to be generated @@ -27148,7 +28453,7 @@ elif test "$includedir" != "/usr/include"; then fi ### Build up pieces for makefile rules -echo "$as_me:27151: checking default library suffix" >&5 +echo "$as_me:28456: checking default library suffix" >&5 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6 case $DFT_LWR_MODEL in @@ -27159,10 +28464,10 @@ echo $ECHO_N "checking default library suffix... $ECHO_C" >&6 (shared) DFT_ARG_SUFFIX='' ;; esac test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}" -echo "$as_me:27162: result: $DFT_ARG_SUFFIX" >&5 +echo "$as_me:28467: result: $DFT_ARG_SUFFIX" >&5 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6 -echo "$as_me:27165: checking default library-dependency suffix" >&5 +echo "$as_me:28470: checking default library-dependency suffix" >&5 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6 case X$DFT_LWR_MODEL in @@ -27245,10 +28550,10 @@ echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}" DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}" fi -echo "$as_me:27248: result: $DFT_DEP_SUFFIX" >&5 +echo "$as_me:28553: result: $DFT_DEP_SUFFIX" >&5 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6 -echo "$as_me:27251: checking default object directory" >&5 +echo "$as_me:28556: checking default object directory" >&5 echo $ECHO_N "checking default object directory... $ECHO_C" >&6 case $DFT_LWR_MODEL in @@ -27264,11 +28569,11 @@ echo $ECHO_N "checking default object directory... $ECHO_C" >&6 DFT_OBJ_SUBDIR='obj_s' ;; esac esac -echo "$as_me:27267: result: $DFT_OBJ_SUBDIR" >&5 +echo "$as_me:28572: result: $DFT_OBJ_SUBDIR" >&5 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6 if test "x$cf_with_cxx" = xyes ; then -echo "$as_me:27271: checking c++ library-dependency suffix" >&5 +echo "$as_me:28576: checking c++ library-dependency suffix" >&5 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6 if test "$with_libtool" != "no"; then # libtool thinks it can make c++ shared libraries (perhaps only g++) @@ -27361,7 +28666,7 @@ else fi fi -echo "$as_me:27364: result: $CXX_LIB_SUFFIX" >&5 +echo "$as_me:28669: result: $CXX_LIB_SUFFIX" >&5 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6 fi @@ -27537,19 +28842,19 @@ fi if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED" then - echo "$as_me:27540: checking if linker supports switching between static/dynamic" >&5 + echo "$as_me:28845: checking if linker supports switching between static/dynamic" >&5 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6 rm -f libconftest.a cat >conftest.$ac_ext <<EOF -#line 27545 "configure" +#line 28850 "configure" #include <stdio.h> int cf_ldflags_static(FILE *fp) { return fflush(fp); } EOF - if { (eval echo "$as_me:27549: \"$ac_compile\"") >&5 + if { (eval echo "$as_me:28854: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:27552: \$? = $ac_status" >&5 + echo "$as_me:28857: \$? = $ac_status" >&5 (exit "$ac_status"); } ; then ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null @@ -27560,10 +28865,10 @@ EOF LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 27563 "configure" +#line 28868 "configure" #include "confdefs.h" -#line 27566 "configure" +#line 28871 "configure" #include <stdio.h> int cf_ldflags_static(FILE *fp); @@ -27578,16 +28883,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:27581: \"$ac_link\"") >&5 +if { (eval echo "$as_me:28886: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:27584: \$? = $ac_status" >&5 + echo "$as_me:28889: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:27587: \"$ac_try\"") >&5 + { (eval echo "$as_me:28892: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:27590: \$? = $ac_status" >&5 + echo "$as_me:28895: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then # some linkers simply ignore the -dynamic @@ -27610,7 +28915,7 @@ rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" rm -f libconftest.* LIBS="$cf_save_LIBS" - echo "$as_me:27613: result: $cf_ldflags_static" >&5 + echo "$as_me:28918: result: $cf_ldflags_static" >&5 echo "${ECHO_T}$cf_ldflags_static" >&6 if test "$cf_ldflags_static" != yes @@ -27626,7 +28931,7 @@ fi ;; esac -echo "$as_me:27629: checking where we will install curses.h" >&5 +echo "$as_me:28934: checking where we will install curses.h" >&5 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6 includesubdir= @@ -27636,7 +28941,7 @@ if test "$with_overwrite" = no && \ then includesubdir="/ncurses${USE_LIB_SUFFIX}" fi -echo "$as_me:27639: result: ${includedir}${includesubdir}" >&5 +echo "$as_me:28944: result: ${includedir}${includesubdir}" >&5 echo "${ECHO_T}${includedir}${includesubdir}" >&6 ### Resolve a conflict between normal and wide-curses by forcing applications @@ -27644,7 +28949,7 @@ echo "${ECHO_T}${includedir}${includesubdir}" >&6 if test "$with_overwrite" != no ; then if test "$NCURSES_LIBUTF8" = 1 ; then NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)' - { echo "$as_me:27647: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5 + { echo "$as_me:28952: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;} fi fi @@ -27661,9 +28966,6 @@ case "$cf_cv_system_name" in *) ;; esac -# used to separate tack out of the tree -NCURSES_TREE= - ### predefined stuff for the test programs cat >>confdefs.h <<\EOF @@ -27672,7 +28974,7 @@ EOF # pkgsrc uses these -echo "$as_me:27675: checking for desired basename for form library" >&5 +echo "$as_me:28977: checking for desired basename for form library" >&5 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6 # Check whether --with-form-libname or --without-form-libname was given. @@ -27692,10 +28994,10 @@ case "x$FORM_NAME" in ;; esac -echo "$as_me:27695: result: $FORM_NAME" >&5 +echo "$as_me:28997: result: $FORM_NAME" >&5 echo "${ECHO_T}$FORM_NAME" >&6 -echo "$as_me:27698: checking for desired basename for menu library" >&5 +echo "$as_me:29000: checking for desired basename for menu library" >&5 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6 # Check whether --with-menu-libname or --without-menu-libname was given. @@ -27715,10 +29017,10 @@ case "x$MENU_NAME" in ;; esac -echo "$as_me:27718: result: $MENU_NAME" >&5 +echo "$as_me:29020: result: $MENU_NAME" >&5 echo "${ECHO_T}$MENU_NAME" >&6 -echo "$as_me:27721: checking for desired basename for panel library" >&5 +echo "$as_me:29023: checking for desired basename for panel library" >&5 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6 # Check whether --with-panel-libname or --without-panel-libname was given. @@ -27738,10 +29040,10 @@ case "x$PANEL_NAME" in ;; esac -echo "$as_me:27741: result: $PANEL_NAME" >&5 +echo "$as_me:29043: result: $PANEL_NAME" >&5 echo "${ECHO_T}$PANEL_NAME" >&6 -echo "$as_me:27744: checking for desired basename for cxx library" >&5 +echo "$as_me:29046: checking for desired basename for cxx library" >&5 echo $ECHO_N "checking for desired basename for cxx library... $ECHO_C" >&6 # Check whether --with-cxx-libname or --without-cxx-libname was given. @@ -27761,13 +29063,13 @@ case "x$CXX_NAME" in ;; esac -echo "$as_me:27764: result: $CXX_NAME" >&5 +echo "$as_me:29066: result: $CXX_NAME" >&5 echo "${ECHO_T}$CXX_NAME" >&6 ### Construct the list of subdirectories for which we'll customize makefiles ### with the appropriate compile-rules. -echo "$as_me:27770: checking for src modules" >&5 +echo "$as_me:29072: checking for src modules" >&5 echo $ECHO_N "checking for src modules... $ECHO_C" >&6 # dependencies and linker-arguments for test-programs @@ -27787,14 +29089,6 @@ for cf_dir in $modules_to_build do if test -f "$srcdir/$cf_dir/modules" ; then - # We may/may not have tack in the distribution, though the - # makefile is. - if test "$cf_dir" = tack ; then - if test "x$cf_with_tack" != "xyes"; then - continue - fi - fi - if test -z "$cf_cv_src_modules"; then cf_cv_src_modules=$cf_dir else @@ -27805,9 +29099,7 @@ do # well. These are header files that are the same name as their # directory. Ncurses is the only library that does not follow # that pattern. - if test "$cf_dir" = tack ; then - continue - elif test -f "$srcdir/${cf_dir}/${cf_dir}.h" ; then + if test -f "$srcdir/${cf_dir}/${cf_dir}.h" ; then cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%` @@ -27836,7 +29128,7 @@ eval TEST_ROOT="\$${cf_map_lib_basename}_NAME" fi fi done -echo "$as_me:27839: result: $cf_cv_src_modules" >&5 +echo "$as_me:29131: result: $cf_cv_src_modules" >&5 echo "${ECHO_T}$cf_cv_src_modules" >&6 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS" @@ -27997,7 +29289,7 @@ case "$cf_cv_system_name" in (*-D_XOPEN_SOURCE_EXTENDED*) test -n "$verbose" && echo " moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6 -echo "${as_me:-configure}:28000: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5 +echo "${as_me:-configure}:29292: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED" CPPFLAGS=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'` @@ -28008,8 +29300,8 @@ esac # Help to automatically enable the extended curses features when using either # the *-config or the ".pc" files by adding defines. -echo "$as_me:28011: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5 -echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6 +echo "$as_me:29303: checking for defines to add to ncurses${USE_CFG_SUFFIX}${cf_config_suffix}-config script" >&5 +echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}${cf_config_suffix}-config script... $ECHO_C" >&6 PKG_CFLAGS= for cf_loop1 in $CPPFLAGS_after_XOPEN do @@ -28024,7 +29316,7 @@ do done test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1" done -echo "$as_me:28027: result: $PKG_CFLAGS" >&5 +echo "$as_me:29319: result: $PKG_CFLAGS" >&5 echo "${ECHO_T}$PKG_CFLAGS" >&6 # AC_CHECK_SIZEOF demands a literal parameter, no variables. So we do this. @@ -28083,9 +29375,9 @@ cf_filter_syms=no if test -n "$RESULTING_SYMS" then cf_filter_syms=$cf_dft_filter_syms - test -n "$verbose" && echo " will map symbols to ABI=$cf_cv_abi_version" 1>&6 + test -n "$verbose" && echo " will map symbols to ABI=$cf_cv_abi_default" 1>&6 -echo "${as_me:-configure}:28088: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5 +echo "${as_me:-configure}:29380: testing will map symbols to ABI=$cf_cv_abi_default ..." 1>&5 fi @@ -28112,7 +29404,7 @@ fi # This is used for the *-config script and *.pc data files. -echo "$as_me:28115: checking for linker search path" >&5 +echo "$as_me:29407: checking for linker search path" >&5 echo $ECHO_N "checking for linker search path... $ECHO_C" >&6 if test "${cf_cv_ld_searchpath+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -28121,19 +29413,19 @@ else if test "$cross_compiling" != yes ; then # GNU binutils' ld does not involve permissions which may stop ldconfig. -cf_pathlist=`ld --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[("=][("=]*,,g' -e 's/"[)];//gp' | sort -u` +cf_pathlist=`${LD:-ld} --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[("=][("=]*,,g' -e 's/"[)];//gp' | sort -u` # The -NX options tell newer versions of Linux ldconfig to not attempt to # update the cache, which makes it run faster. test -z "$cf_pathlist" && \ - cf_pathlist=`ldconfig -NX -v 2>/dev/null | sed -e '/^[ ]/d' -e 's/:$//' | sort -u` + cf_pathlist=`(ldconfig -NX -v) 2>/dev/null | sed -e '/^[ ]/d' -e 's/:$//' | sort -u` test -z "$cf_pathlist" && - cf_pathlist=`ldconfig -v 2>/dev/null | sed -n -e '/^[ ]/d' -e 's/:$//p' | sort -u` + cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e '/^[ ]/d' -e 's/:$//p' | sort -u` # This works with OpenBSD 6.5, which lists only filenames test -z "$cf_pathlist" && - cf_pathlist=`ldconfig -v 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*$,\1,p' | sort -u` + cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*$,\1,p' | sort -u` if test -z "$cf_pathlist" then @@ -28148,13 +29440,38 @@ fi if test -z "$cf_pathlist" then - # Solaris is hardcoded - if test -d /opt/SUNWspro/lib + # Solaris is "SunOS" + if test -f /usr/bin/isainfo && test "x`uname -s`" = xSunOS then - cf_pathlist="/opt/SUNWspro/lib /usr/ccs/lib /usr/lib" - elif test -d /usr/ccs/lib + case x`(isainfo -b)` in + (x64) + cf_pathlist="$cf_pathlist /lib/64 /usr/lib/64" + ;; + (x32) + test -d /usr/ccs/lib && cf_pathlist="$cf_pathlist /usr/ccs/lib" + cf_pathlist="$cf_pathlist /lib /usr/lib" + ;; + (*) + { echo "$as_me:29455: WARNING: problem with Solaris architecture" >&5 +echo "$as_me: WARNING: problem with Solaris architecture" >&2;} + ;; + esac + fi +fi + +if test -z "$cf_pathlist" +then + # HP-UX + if test x"`uname -s`" = xHP-UX then - cf_pathlist="/usr/ccs/lib /usr/lib" + case x`getconf LONG_BIT` in + (x64) + cf_pathlist="/usr/lib/hpux64" + ;; + (x*) + cf_pathlist="/usr/lib/hpux32" + ;; + esac fi fi @@ -28176,16 +29493,12 @@ done test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib fi -echo "$as_me:28179: result: $cf_cv_ld_searchpath" >&5 +echo "$as_me:29496: result: $cf_cv_ld_searchpath" >&5 echo "${ECHO_T}$cf_cv_ld_searchpath" >&6 LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'` -cat >>confdefs.h <<\EOF -#define HAVE_CURSES_DATA_BOOLNAMES 1 -EOF - -ac_config_files="$ac_config_files include/MKterm.h.awk include/curses.head:include/curses.h.in include/ncurses_dll.h include/termcap.h include/unctrl.h $SUB_MAKEFILES Makefile" +ac_config_files="$ac_config_files include/MKterm.h.awk include/curses.head:include/curses.h.in include/ncurses_dll.h include/termcap.h include/unctrl.h man/man_db.renames $SUB_MAKEFILES Makefile" ac_config_commands="$ac_config_commands default" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -28197,7 +29510,7 @@ cat >confcache <<\_ACEOF # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # -# `ac_cv_env_foo' variables (set or unset) will be overriden when +# `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. @@ -28266,7 +29579,7 @@ DEFS=-DHAVE_CONFIG_H : "${CONFIG_STATUS=./config.status}" ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ echo "$as_me:28269: creating $CONFIG_STATUS" >&5 +{ echo "$as_me:29582: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >"$CONFIG_STATUS" <<_ACEOF #! $SHELL @@ -28275,6 +29588,8 @@ cat >"$CONFIG_STATUS" <<_ACEOF # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. +me=\`echo "\$0" | sed -e 's,.*\\/,,'\` + debug=false SHELL=\${CONFIG_SHELL-$SHELL} ac_cs_invocation="\$0 \$@" @@ -28296,9 +29611,9 @@ fi as_me=`echo "$0" |sed 's,.*[\\/],,'` if expr a : '\(a\)' >/dev/null 2>&1; then - as_expr=expr + as_expr="expr" else - as_expr=false + as_expr="false" fi rm -f conf$$ conf$$.exe conf$$.file @@ -28313,7 +29628,7 @@ if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln + as_ln_s='ln' else as_ln_s='cp -p' fi @@ -28400,10 +29715,10 @@ EOF cat >>"$CONFIG_STATUS" <<EOF ac_cs_version="\\ config.status -configured by $0, generated by GNU Autoconf 2.52.20210105, +configured by $0, generated by GNU Autoconf 2.52.20231210, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" -Copyright 2003-2020,2021 Thomas E. Dickey +Copyright 2003-2022,2023 Thomas E. Dickey Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation @@ -28445,7 +29760,7 @@ cat >>"$CONFIG_STATUS" <<\EOF echo "$ac_cs_version"; exit 0 ;; --he | --h) # Conflict between --help and --header - { { echo "$as_me:28448: error: ambiguous option: $1 + { { echo "$as_me:29763: 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;} @@ -28464,7 +29779,7 @@ Try \`$0 --help' for more information." >&2;} ac_need_defaults=false;; # This is an error. - -*) { { echo "$as_me:28467: error: unrecognized option: $1 + -*) { { echo "$as_me:29782: 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;} @@ -28483,7 +29798,7 @@ cat >&5 << _ACEOF ## Running config.status. ## ## ----------------------- ## -This file was extended by $as_me 2.52.20210105, executed with +This file was extended by $as_me 2.52.20231210, executed with CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS @@ -28519,6 +29834,7 @@ LIB_SUFFIX="$LIB_SUFFIX" LIB_TRACING="$LIB_TRACING" LN_S="$LN_S" MAKE_TERMINFO="$MAKE_TERMINFO" +MANPAGE_RENAMES="$MANPAGE_RENAMES" MENU_NAME="$MENU_NAME" NCURSES_MAJOR="$NCURSES_MAJOR" NCURSES_MINOR="$NCURSES_MINOR" @@ -28548,12 +29864,14 @@ WITH_OVERWRITE="$with_overwrite" cf_LIST_MODELS="$cf_list_models" cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD +cf_cv_abi_default="$cf_cv_abi_default" cf_cv_abi_version="$cf_cv_abi_version" cf_cv_do_relink="$cf_cv_do_relink" cf_cv_do_reranlib="$cf_cv_do_reranlib" cf_cv_do_symlinks="$cf_cv_do_symlinks" cf_cv_enable_lp64="$cf_cv_enable_lp64" cf_cv_enable_opaque="$cf_cv_enable_opaque" +cf_cv_make_PHONY="$cf_cv_make_PHONY" cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct @@ -28571,6 +29889,7 @@ cf_with_manpages="$cf_with_manpages" cf_with_tests="$cf_with_tests" host="$host" target="$target" +verbose="$verbose" with_shared_cxx="$with_shared_cxx" EOF @@ -28585,11 +29904,12 @@ do "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;; "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;; "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;; + "man/man_db.renames" ) CONFIG_FILES="$CONFIG_FILES man/man_db.renames" ;; "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;; "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;; - *) { { echo "$as_me:28592: error: invalid argument: $ac_config_target" >&5 + *) { { echo "$as_me:29912: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac @@ -28613,14 +29933,14 @@ $debug || } # Create a (secure) tmp directory for tmp files. -: ${TMPDIR=/tmp} +: "${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) + (umask 077 && mkdir "$tmp") } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 @@ -28640,7 +29960,7 @@ cat >>"$CONFIG_STATUS" <<EOF 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/@@/,@/; 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 @@ -28681,6 +30001,7 @@ s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t +s,@cf_cv_abi_default@,$cf_cv_abi_default,;t t s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t @@ -28721,6 +30042,7 @@ s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t s,@INSTALL_DATA@,$INSTALL_DATA,;t t s,@LINT@,$LINT,;t t s,@LINT_OPTS@,$LINT_OPTS,;t t +s,@LINT_LIBS@,$LINT_LIBS,;t t s,@LN_S@,$LN_S,;t t s,@cf_config_suffix@,$cf_config_suffix,;t t s,@PKG_CONFIG@,$PKG_CONFIG,;t t @@ -28729,6 +30051,8 @@ s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t s,@SET_MAKE@,$SET_MAKE,;t t +s,@MAKE_NO_PHONY@,$MAKE_NO_PHONY,;t t +s,@MAKE_PHONY@,$MAKE_PHONY,;t t s,@CTAGS@,$CTAGS,;t t s,@ETAGS@,$ETAGS,;t t s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t @@ -28832,10 +30156,17 @@ s,@RGB_PATH@,$RGB_PATH,;t t s,@no_x11_rgb@,$no_x11_rgb,;t t s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t +s,@NCURSES_CHTYPE@,$NCURSES_CHTYPE,;t t s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t +s,@NCURSES_MMASK_T@,$NCURSES_MMASK_T,;t t s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t +s,@cf_manpage_format@,$cf_manpage_format,;t t +s,@cf_manpage_inboth@,$cf_manpage_inboth,;t t +s,@cf_manpage_so_strip@,$cf_manpage_so_strip,;t t +s,@cf_manpage_compress@,$cf_manpage_compress,;t t +s,@cf_manpage_coptions@,$cf_manpage_coptions,;t t s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t @@ -28844,6 +30175,7 @@ s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t s,@NCURSES_CONST@,$NCURSES_CONST,;t t s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t +s,@cf_cv_enable_sigwinch@,$cf_cv_enable_sigwinch,;t t s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t s,@PTHREAD@,$PTHREAD,;t t s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t @@ -28870,6 +30202,8 @@ s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t +s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t +s,@STDC_NORETURN@,$STDC_NORETURN,;t t s,@ADAFLAGS@,$ADAFLAGS,;t t s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t s,@ADA_TRACE@,$ADA_TRACE,;t t @@ -28935,7 +30269,6 @@ s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t s,@TICS_LIST@,$TICS_LIST,;t t s,@TINFO_LIST@,$TINFO_LIST,;t t s,@SHLIB_LIST@,$SHLIB_LIST,;t t -s,@NCURSES_TREE@,$NCURSES_TREE,;t t s,@FORM_NAME@,$FORM_NAME,;t t s,@MENU_NAME@,$MENU_NAME,;t t s,@PANEL_NAME@,$PANEL_NAME,;t t @@ -28980,11 +30313,11 @@ EOF 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 + 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 + sed "${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag fi - if test ! -s $tmp/subs.frag; then + if test ! -s "$tmp"/subs.frag; then ac_more_lines=false else # The purpose of the label and of the branching condition is to @@ -28992,17 +30325,17 @@ EOF # 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 + /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat "$tmp"/subs.frag) >"$tmp"/subs-$ac_sed_frag.sed # It is possible to make a multiline substitution using escaped newlines. # Ensure that we do not split the substitution between script fragments. ac_BEG=$ac_end ac_END=`expr "$ac_end" + "$ac_max_sed_lines"` - sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next - if test -s $tmp/subs.next; then - grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit - if test ! -s $tmp/subs.edit; then - grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit - if test ! -s $tmp/subs.edit; then + sed "1,${ac_BEG}d; ${ac_END}p; q" "$tmp"/subs.sed >"$tmp"/subs.next + if test -s "$tmp"/subs.next; then + grep '^s,@[^@,][^@,]*@,.*\\$' "$tmp"/subs.next >"$tmp"/subs.edit + if test ! -s "$tmp"/subs.edit; then + grep "^s,@[^@,][^@,]*@,.*,;t t$" "$tmp"/subs.next >"$tmp"/subs.edit + if test ! -s "$tmp"/subs.edit; then if test "$ac_beg" -gt 1; then ac_end=`expr "$ac_end" - 1` continue @@ -29012,9 +30345,9 @@ EOF fi if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" + 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" + 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 @@ -29022,7 +30355,7 @@ EOF fi done if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat + ac_sed_cmds="cat" fi fi # test -n "$CONFIG_FILES" @@ -29032,7 +30365,7 @@ 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 - | *:- | *:-:* ) # input from stdin - cat >$tmp/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,[^:]*:,,'` @@ -29069,7 +30402,7 @@ for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do esac done; } - ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`" + ac_dir_suffix="/`echo "$ac_dir"|sed 's,^\./,,'`" # A "../" for each directory in $ac_dir_suffix. ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'` else @@ -29097,7 +30430,7 @@ done; } esac if test x"$ac_file" != x-; then - { echo "$as_me:29100: creating $ac_file" >&5 + { echo "$as_me:30433: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} rm -f "$ac_file" fi @@ -29112,23 +30445,23 @@ echo "$as_me: creating $ac_file" >&6;} ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in - -) echo $tmp/stdin ;; + -) echo "$tmp"/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:29118: error: cannot find input file: $f" >&5 + test -f "$f" || { { echo "$as_me:30451: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } - echo $f;; + echo "$f";; *) # Relative if test -f "$f"; then # Build tree - echo $f + echo "$f" elif test -f "$srcdir/$f"; then # Source tree echo "$srcdir/$f" else # /dev/null tree - { { echo "$as_me:29131: error: cannot find input file: $f" >&5 + { { echo "$as_me:30464: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; @@ -29144,7 +30477,7 @@ cat >>"$CONFIG_STATUS" <<\EOF if test -n "$ac_seen"; then ac_used=`grep '@datarootdir@' "$ac_item"` if test -z "$ac_used"; then - { echo "$as_me:29147: WARNING: datarootdir was used implicitly but not set: + { echo "$as_me:30480: WARNING: datarootdir was used implicitly but not set: $ac_seen" >&5 echo "$as_me: WARNING: datarootdir was used implicitly but not set: $ac_seen" >&2;} @@ -29153,7 +30486,7 @@ $ac_seen" >&2;} fi ac_seen=`grep '${datarootdir}' "$ac_item"` if test -n "$ac_seen"; then - { echo "$as_me:29156: WARNING: datarootdir was used explicitly but not set: + { echo "$as_me:30489: WARNING: datarootdir was used explicitly but not set: $ac_seen" >&5 echo "$as_me: WARNING: datarootdir was used explicitly but not set: $ac_seen" >&2;} @@ -29178,38 +30511,46 @@ 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 +" $ac_file_inputs | (eval "$ac_sed_cmds") >"$tmp"/out + rm -f "$tmp"/stdin +EOF +test -n "${FGREP}" || FGREP="grep -F" +test -n "${EGREP}" || EGREP="grep -E" +cat >>"$CONFIG_STATUS" <<EOF + test -n "\${FGREP}" || FGREP="$FGREP" + test -n "\${EGREP}" || EGREP="$EGREP" +EOF +cat >>"$CONFIG_STATUS" <<\EOF if test x"$ac_file" != x-; then cp "$tmp/out" "$ac_file" for ac_name in prefix exec_prefix datarootdir do - ac_seen=`${FGREP-fgrep} -n '${'$ac_name'[:=].*}' "$ac_file"` + ac_seen=`$FGREP -n '${'$ac_name'[:=].*}' "$ac_file"` if test -n "$ac_seen"; then - ac_init=`${EGREP-egrep} '[ ]*'$ac_name'[ ]*=' "$ac_file"` + ac_init=`$EGREP '[ ]*'$ac_name'[ ]*=' "$ac_file"` if test -z "$ac_init"; then - ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'` - { echo "$as_me:29193: WARNING: Variable $ac_name is used but was not set: + ac_seen=`echo "$ac_seen" |sed -e 's,^,'"$ac_file"':,'` + { echo "$as_me:30534: WARNING: Variable $ac_name is used but was not set: $ac_seen" >&5 echo "$as_me: WARNING: Variable $ac_name is used but was not set: $ac_seen" >&2;} fi fi done - ${EGREP-egrep} -n '@[a-z_][a-z_0-9]+@' "$ac_file" >$tmp/out - ${EGREP-egrep} -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>$tmp/out - if test -s $tmp/out; then - ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out` - { echo "$as_me:29204: WARNING: Some variables may not be substituted: + $EGREP -n '@[a-z_][a-z_0-9]+@' "$ac_file" >"$tmp"/out + $EGREP -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>"$tmp"/out + if test -s "$tmp"/out; then + ac_seen=`sed -e 's,^,'"$ac_file"':,' < "$tmp"/out` + { echo "$as_me:30545: WARNING: Some variables may not be substituted: $ac_seen" >&5 echo "$as_me: WARNING: Some variables may not be substituted: $ac_seen" >&2;} fi else - cat $tmp/out + cat "$tmp"/out fi - rm -f $tmp/out + rm -f "$tmp"/out done EOF @@ -29242,7 +30583,7 @@ for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case "$ac_file" in - | *:- | *:-:* ) # input from stdin - cat >$tmp/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,[^:]*:,,'` @@ -29250,7 +30591,7 @@ for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue * ) ac_file_in=$ac_file.in ;; esac - test x"$ac_file" != x- && { echo "$as_me:29253: creating $ac_file" >&5 + test x"$ac_file" != x- && { echo "$as_me:30594: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} # First look for the input files in the build tree, otherwise in the @@ -29258,10 +30599,10 @@ echo "$as_me: creating $ac_file" >&6;} ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in - -) echo $tmp/stdin ;; + -) echo "$tmp"/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:29264: error: cannot find input file: $f" >&5 + test -f "$f" || { { echo "$as_me:30605: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo $f;; @@ -29274,14 +30615,14 @@ echo "$as_me: error: cannot find input file: $f" >&2;} echo "$srcdir/$f" else # /dev/null tree - { { echo "$as_me:29277: error: cannot find input file: $f" >&5 + { { echo "$as_me:30618: 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; } # Remove the trailing spaces. - sed 's/[ ]*$//' $ac_file_inputs >$tmp/in + sed 's/[ ]*$//' $ac_file_inputs >"$tmp"/in EOF @@ -29313,9 +30654,9 @@ echo ' cat >> conftest.edit <<CEOF /@DEFS@/r conftest.frag /@DEFS@/d CEOF -sed -f conftest.edit $tmp/in > $tmp/out -rm -f $tmp/in -mv $tmp/out $tmp/in +sed -f conftest.edit "$tmp"/in > "$tmp"/out +rm -f "$tmp"/in +mv "$tmp"/out "$tmp"/in rm -f conftest.edit conftest.frag ' >> "$CONFIG_STATUS" @@ -29324,15 +30665,15 @@ cat >>"$CONFIG_STATUS" <<\EOF # use $as_me), people would be surprised to read: # /* config.h. Generated automatically by config.status. */ if test x"$ac_file" = x-; then - echo "/* Generated automatically by configure. */" >$tmp/config.h + echo "/* Generated automatically by configure. */" >"$tmp"/config.h else - echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h + echo "/* $ac_file. Generated automatically by configure. */" >"$tmp"/config.h fi - cat $tmp/in >>$tmp/config.h - rm -f $tmp/in + cat "$tmp"/in >>"$tmp"/config.h + rm -f "$tmp"/in if test x"$ac_file" != x-; then if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then - { echo "$as_me:29335: $ac_file is unchanged" >&5 + { echo "$as_me:30676: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ @@ -29368,8 +30709,8 @@ done; } mv "$tmp/config.h" "$ac_file" fi else - cat $tmp/config.h - rm -f $tmp/config.h + cat "$tmp"/config.h + rm -f "$tmp"/config.h fi done EOF @@ -29431,11 +30772,11 @@ do SHARED_LIB= Libs_To_Make= cf_awk_program= - if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5" + if test -n "${cf_cv_abi_default}" && test "x${cf_cv_abi_default}" != "x5" then cf_awk_program="$cf_awk_program\ -/deprecated in ABI${cf_cv_abi_version}/ { next; }\ -{ sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\ +/deprecated in ABI${cf_cv_abi_default}/ { next; }\ +{ sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_default}\"); }\ " fi @@ -29719,7 +31060,7 @@ cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQ (cygdll|msysdll|mingw|msvcdll) test "x$with_shared_cxx" = xno && test -n "$verbose" && echo " overriding CXX_MODEL to SHARED" 1>&6 -echo "${as_me:-configure}:29722: testing overriding CXX_MODEL to SHARED ..." 1>&5 +echo "${as_me:-configure}:31063: testing overriding CXX_MODEL to SHARED ..." 1>&5 with_shared_cxx=yes ;; @@ -29907,6 +31248,9 @@ eval cf_libname="\$${cf_map_lib_basename}_NAME" traces=$LIB_TRACING \ MODEL=$cf_ITEM \ CXX_MODEL=$CXX_MODEL \ + LIB_SUFFIX=$LIB_SUFFIX \ + USE_LIB_SUFFIX=$USE_LIB_SUFFIX \ + make_phony="${cf_cv_make_PHONY:-no}" \ model=$cf_subdir \ prefix=$cf_prefix \ suffix=$cf_suffix \ @@ -29954,6 +31298,21 @@ eval cf_libname="\$${cf_map_lib_basename}_NAME" echo ' ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >>Makefile done +echo >> Makefile +echo '# generated by CF_LIB_RULES' >> Makefile + +if test "x$cf_cv_make_PHONY" = xyes ; then + cat >> Makefile <<-CF_EOF + + .PHONY : libs + .PHONY : lintlib + .PHONY : install.includes + .PHONY : uninstall.includes + .PHONY : install.libs + .PHONY : uninstall.libs +CF_EOF +fi + for cf_dir in $SRC_SUBDIRS do if test ! -d "$srcdir/$cf_dir" ; then @@ -29972,6 +31331,15 @@ do fi if test -f "$srcdir/$cf_dir/modules" ; then + + if test "x$cf_cv_make_PHONY" = xyes ; then + cat >> Makefile <<-CF_EOF + + .PHONY : install.$cf_dir + .PHONY : uninstall.$cf_dir +CF_EOF + fi + echo >> Makefile if test -f "$srcdir/$cf_dir/headers" ; then cat >> Makefile <<CF_EOF @@ -29979,10 +31347,9 @@ install.includes \\ uninstall.includes \\ CF_EOF fi -if test "$cf_dir" != "c++" ; then -echo 'lint \' >> Makefile -fi + cat >> Makefile <<CF_EOF +lint \\ libs \\ lintlib \\ install.libs \\ @@ -30004,6 +31371,14 @@ CF_EOF fi done +if test "x$cf_cv_make_PHONY" = xyes ; then + cat >> Makefile <<-CF_EOF + + .PHONY : install.data + .PHONY : uninstall.data +CF_EOF +fi + if test "x$cf_with_db_install" = xyes; then cat >> Makefile <<CF_EOF @@ -30020,6 +31395,15 @@ CF_EOF fi if test "x$cf_with_manpages" = xyes; then + +if test "x$cf_cv_make_PHONY" = xyes ; then + cat >> Makefile <<-CF_EOF + + .PHONY : install.man + .PHONY : uninstall.man +CF_EOF +fi + cat >> Makefile <<CF_EOF install.man \\ @@ -30033,22 +31417,10 @@ cat >> Makefile <<CF_EOF distclean :: rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h rm -f headers.sh headers.sed mk_shared_lib.sh - rm -f edit_man.* man_alias.* + rm -f edit_man.* man_alias.* *.tmp rm -rf \${DIRS_TO_MAKE} CF_EOF -# Special case: tack's manpage lives in its own directory. -if test "x$cf_with_manpages" = xyes; then -if test "x$cf_with_tack" = "xyes"; then -cat >> Makefile <<CF_EOF - -install.man \\ -uninstall.man :: - ( cd tack && \${MAKE} \${TOP_MFLAGS} \$@ ) -CF_EOF -fi -fi - rm -f headers.sed headers.sh echo creating headers.sh @@ -30145,6 +31517,13 @@ do if test -f "$srcdir/$cf_dir/modules" ; then if test "$cf_dir" != "c++" ; then + if test "x$cf_cv_make_PHONY" = xyes ; then + cat >> $cf_dir/Makefile <<-CF_EOF + + .PHONY : depend +CF_EOF + fi + cat >>$cf_dir/Makefile <<"CF_EOF" depend : ${AUTO_SRC} makedepend -- ${CPPFLAGS} -- ${C_SRC} @@ -30155,6 +31534,13 @@ CF_EOF fi done +if test "$MANPAGE_RENAMES" != no ; then + # Construct a sed-script to perform renaming within man-pages + test -n "$verbose" && echo "creating edit_man.sed" + test ! -d man && mkdir man + FGREP="${FGREP-grep -F}" $SHELL "$srcdir/man/make_sed.sh" "$MANPAGE_RENAMES" >./edit_man.sed +fi + if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then if test -z "$USE_OLD_MAKERULES" ; then $AWK -f "$srcdir/Ada95/mk-1st.awk" <"$srcdir/Ada95/src/modules" >>Ada95/src/Makefile diff --git contrib/ncurses/configure.in contrib/ncurses/configure.in index f2013a9fbbe9..2d6836cb7190 100644 --- contrib/ncurses/configure.in +++ contrib/ncurses/configure.in @@ -1,5 +1,5 @@ dnl*************************************************************************** -dnl Copyright 2018-2020,2021 Thomas E. Dickey * +dnl Copyright 2018-2023,2024 Thomas E. Dickey * dnl Copyright 1998-2017,2018 Free Software Foundation, Inc. * dnl * dnl Permission is hereby granted, free of charge, to any person obtaining a * @@ -29,7 +29,7 @@ dnl*************************************************************************** dnl dnl Author: Thomas E. Dickey 1995-on dnl -dnl $Id: configure.in,v 1.729 2021/01/09 11:20:52 tom Exp $ +dnl $Id: configure.in,v 1.779 2024/04/10 08:04:00 tom Exp $ dnl Process this file with autoconf to produce a configure script. dnl dnl For additional information, see @@ -38,7 +38,7 @@ dnl https://invisible-island.net/autoconf/my-autoconf.html dnl dnl --------------------------------------------------------------------------- AC_PREREQ(2.52.20210101) -AC_REVISION($Revision: 1.729 $) +AC_REVISION($Revision: 1.779 $) AC_INIT(ncurses/base/lib_initscr.c) AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin) @@ -61,6 +61,9 @@ CF_CFG_DEFAULTS ### Defaults for ncurses ABI CF_ABI_DEFAULTS +### override ABI version, e.g., packagers +CF_WITH_ABI_ALTERED + ### Checks for programs. AC_ARG_WITH(ada, [ --without-ada suppress check for Ada compiler, don't build demo], @@ -183,22 +186,6 @@ AC_ARG_WITH(progs, [cf_with_progs=yes]) AC_MSG_RESULT($cf_with_progs) -if test -f "$srcdir/tack/tack.h" ; then - if test "x$cross_compiling" = xyes ; then - CF_VERBOSE(ignoring tack because we are cross-compiling) - cf_with_tack=no - else - AC_MSG_CHECKING(if you want to build the tack program) - AC_ARG_WITH(tack, - [ --without-tack suppress build/install with tack program], - [cf_with_tack=$withval], - [cf_with_tack=$cf_with_progs]) - AC_MSG_RESULT($cf_with_tack) - fi -else - cf_with_tack=no -fi - AC_MSG_CHECKING(if you want to build test-programs) AC_ARG_WITH(tests, [ --without-tests suppress build/install with test-programs], @@ -215,7 +202,6 @@ AC_MSG_RESULT($with_curses_h) modules_to_build="ncurses" test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs" -test "X$cf_with_tack" != Xno && modules_to_build="$modules_to_build tack" modules_to_build="$modules_to_build panel menu form" AC_ARG_PROGRAM @@ -231,7 +217,7 @@ AC_SYS_LONG_FILE_NAMES # of package conflict. cf_config_suffix= AC_ARG_WITH(config-suffix, - [ --with-config-suffix=X suffixes ncursesXX-config file], + [ --with-config-suffix=X name ncurses*X-config file with X], [case "x$withval" in (xyes|xno) AC_MSG_WARN(expected a value for config-suffix option) @@ -247,9 +233,9 @@ CF_WITH_PKG_CONFIG_LIBDIR CF_ENABLE_PC_FILES if test -z "$MAKE_PC_FILES" then - AC_MSG_CHECKING(for suffix to add to pc-files) + AC_MSG_CHECKING(for suffix to add to pkg-config files) AC_ARG_WITH(pc-suffix, - [ --with-pc-suffix suffixes pc-files], + [[ --with-pc-suffix[=XXX] suffix pkg-config files with XXX]], [case "x$withval" in (xyes|xno) PC_MODULE_SUFFIX= @@ -280,6 +266,7 @@ fi # do this after mixed-case option (tags/TAGS is not as important as tic). AC_PROG_MAKE_SET +CF_MAKE_PHONY CF_MAKE_TAGS CF_MAKEFLAGS @@ -293,16 +280,16 @@ CF_AR_FLAGS dnl Special option for use by system-builders: the install-prefix is used to dnl adjust the location into which the actual install is done, so that an dnl archive can be built without modifying the host system's configuration. -AC_MSG_CHECKING(if you have specified an install-prefix) +AC_MSG_CHECKING(for an installation directory prefix) AC_ARG_WITH(install-prefix, - [ --with-install-prefix prefixes actual install-location ($DESTDIR)], + [ --with-install-prefix=DESTDIR use DESTDIR as installation directory prefix], [case "x$withval" in (xyes|xno) ;; (*) DESTDIR="$withval" ;; esac]) -AC_MSG_RESULT($DESTDIR) +AC_MSG_RESULT([${DESTDIR:-(none)}]) AC_SUBST(DESTDIR) ############################################################################### @@ -419,6 +406,10 @@ LIB_SUFFIX= AC_SUBST(LIB_SUFFIX) CF_PATHSEP +# headers needed for checks... +AC_CHECK_DECL(exit) +AC_HEADER_DIRENT + ############################################################################### AC_MSG_CHECKING(if you want to build a separate terminfo library) @@ -458,7 +449,7 @@ case "$DFT_LWR_MODEL" in (shared) LD_MODEL='' ;; esac AC_SUBST(LD_MODEL)dnl the type of link (e.g., -g or -pg) -AC_MSG_RESULT($LD_MODEL) +AC_MSG_RESULT([${LD_MODEL:-(none)}]) case "$DFT_LWR_MODEL" in (shared) @@ -553,7 +544,7 @@ fi ### Depending on the system, someone may use rpath to build ncurses but not # want users of the package to rely upon that feature. Give those people an # option to suppress that detail from EXTRA_LDFLAGS. -EXTRA_PKG_LDFLAGS="$EXTRA_LDFLAGS" +EXTRA_PKG_LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS" if test -n "$EXTRA_PKG_LDFLAGS" then AC_MSG_CHECKING(if you want to disable extra LDFLAGS for package-scripts) @@ -571,10 +562,10 @@ AC_SUBST(EXTRA_PKG_LDFLAGS) CF_HELP_MESSAGE(Fine-Tuning Your Configuration:) ### use option --with-extra-suffix to append suffix to headers and libraries -AC_MSG_CHECKING(if you wish to append extra suffix to header/library paths) +AC_MSG_CHECKING(for extra suffix to append to header/library paths) EXTRA_SUFFIX= AC_ARG_WITH(extra-suffix, - [ --with-extra-suffix=X append extra suffix to header/library paths], + [[ --with-extra-suffix[=X] append extra suffix X to header/library paths]], [case x$withval in (xno) ;; @@ -586,7 +577,7 @@ AC_ARG_WITH(extra-suffix, ;; esac ]) -AC_MSG_RESULT($EXTRA_SUFFIX) +AC_MSG_RESULT([${EXTRA_SUFFIX:-(none)}]) AC_SUBST(EXTRA_SUFFIX) ### use option --disable-overwrite to leave out the link to -lcurses @@ -634,12 +625,12 @@ else fi AC_SUBST(NCURSES_USE_DATABASE) -AC_MSG_CHECKING(for list of fallback descriptions) +AC_MSG_CHECKING(for list of fallback terminal descriptions) AC_ARG_WITH(fallbacks, [ --with-fallbacks=XXX specify list of fallback terminal descriptions], [with_fallback=$withval], [with_fallback=]) -AC_MSG_RESULT($with_fallback) +AC_MSG_RESULT([${with_fallback:-(none)}]) case ".$with_fallback" in (.|.no) @@ -692,11 +683,20 @@ AC_MSG_RESULT($with_xterm_new) WHICH_XTERM=$with_xterm_new AC_SUBST(WHICH_XTERM) +case $host_os in +(*linux-gnu|*cygwin|*mingw32|*msys) + want_xterm_kbs=DEL + ;; +(*) + want_xterm_kbs=BS + ;; +esac + AC_MSG_CHECKING(if xterm backspace sends BS or DEL) AC_ARG_WITH(xterm-kbs, - [ --with-xterm-kbs=XXX specify if xterm backspace sends BS or DEL], + [[ --with-xterm-kbs[=XXX] specify if xterm backspace sends BS or DEL]], [with_xterm_kbs=$withval], - [with_xterm_kbs=BS]) + [with_xterm_kbs=auto]) case x$with_xterm_kbs in (xyes|xno|xBS|xbs|x8) with_xterm_kbs=BS @@ -704,6 +704,9 @@ case x$with_xterm_kbs in (xDEL|xdel|x127) with_xterm_kbs=DEL ;; +(xauto) + with_xterm_kbs=$want_xterm_kbs + ;; (*) with_xterm_kbs=$withval ;; @@ -712,6 +715,11 @@ AC_MSG_RESULT($with_xterm_kbs) XTERM_KBS=$with_xterm_kbs AC_SUBST(XTERM_KBS) +if test "x$with_xterm_kbs" != "x$want_xterm_kbs" +then + AC_MSG_WARN([expected --with-xterm-kbs=$want_xterm_kbs for $host_os, have $with_xterm_kbs]) +fi + MAKE_TERMINFO= if test "$use_database" = no ; then TERMINFO="${datadir}/terminfo" @@ -757,7 +765,7 @@ AC_ARG_ENABLE(big-core, [AC_TRY_RUN([ #include <stdlib.h> #include <string.h> -int main() { +int main(void) { unsigned long n = 6000000L; char *s = malloc(n); if (s != 0) @@ -844,13 +852,29 @@ AC_ARG_ENABLE(home-terminfo, AC_MSG_RESULT($with_home_terminfo) test "x$with_home_terminfo" = "xyes" && AC_DEFINE(USE_HOME_TERMINFO,1,[Define to 1 if $HOME/.terminfo feature is wanted]) -AC_MSG_CHECKING(if you want to use restricted environment when running as root) +AC_MSG_CHECKING(if you want to permit root to use ncurses environment variables) AC_ARG_ENABLE(root-environ, - [ --disable-root-environ restrict environment when running as root], + [ --disable-root-environ restrict root use of ncurses environment variables], [with_root_environ=$enableval], [with_root_environ=yes]) AC_MSG_RESULT($with_root_environ) -test "x$with_root_environ" = xyes && AC_DEFINE(USE_ROOT_ENVIRON,1,[Define to 1 if environment should be restricted for root user]) +test "x$with_root_environ" = xyes && AC_DEFINE(USE_ROOT_ENVIRON,1,[Define to 1 if root/setuid application is allowed to use ncurses environment]) + +AC_MSG_CHECKING(if you want to permit setuid programs to access all files) +AC_ARG_ENABLE(root-access, + [ --disable-root-access restrict file-access when running setuid], + [with_root_access=$enableval], + [with_root_access=yes]) +AC_MSG_RESULT($with_root_access) +test "x$with_root_access" = xyes && AC_DEFINE(USE_ROOT_ACCESS,1,[Define to 1 if setuid is allowed all file-access]) + +AC_MSG_CHECKING(if you want to permit setuid use of ncurses environment variables) +AC_ARG_ENABLE(setuid-environ, + [ --disable-setuid-environ restrict setuid use of ncurses environment variables], + [with_setuid_environ=$enableval], + [with_setuid_environ=$with_root_environ]) +AC_MSG_RESULT($with_setuid_environ) +test "x$with_setuid_environ" = xyes && AC_DEFINE(USE_SETUID_ENVIRON,1,[Define to 1 if setuid/setgid application is allowed to use ncurses environment]) ### Use option --enable-symlinks to make tic use symlinks, not hard links ### to reduce storage requirements for the terminfo database. @@ -923,9 +947,9 @@ NCURSES_OK_WINT_T= AC_MSG_CHECKING(if you want wide-character code) AC_ARG_ENABLE(widec, - [ --enable-widec compile with wide-char/UTF-8 code], + [ --disable-widec compile without wide character and UTF-8 support], [with_widec=$enableval], - [with_widec=no]) + [with_widec=$cf_dft_widec]) AC_MSG_RESULT($with_widec) NCURSES_WCWIDTH_GRAPHICS=1 @@ -935,8 +959,17 @@ if test "x$with_widec" = xyes ; then if test "x$disable_lib_suffixes" = xno ; then LIB_SUFFIX="w${LIB_SUFFIX}" fi - AC_DEFINE(USE_WIDEC_SUPPORT,1,[Define to 1 to compile with wide-char/UTF-8 code]) - AC_DEFINE(NCURSES_WIDECHAR,1,[Define to 1 to compile with wide-char/UTF-8 code]) + AC_DEFINE(USE_WIDEC_SUPPORT,1,[Define to 1 to compile with wide character and UTF-8 support]) + AC_DEFINE(NCURSES_WIDECHAR,1,[Define to 1 to compile with wide character and UTF-8 support]) + case "$CPPFLAGS" in + (*_XOPEN_SOURCE=*) + ;; + (*) + AC_MSG_WARN(_XOPEN_SOURCE feature test macro appears to be predefined) + # CPPFLAGS="$CPPFLAGS -DNCURSES_WIDECHAR" + CPPFLAGS_after_XOPEN="$CPPFLAGS_after_XOPEN -DNCURSES_WIDECHAR" + ;; + esac CF_CHECK_WCHAR_H CF_CHECK_WCWIDTH_GRAPHICS @@ -944,7 +977,7 @@ if test "x$with_widec" = xyes ; then # with_overwrite=no NCURSES_CH_T=cchar_t - AC_CHECK_FUNCS(putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs) + AC_CHECK_FUNCS(putwc btowc wctob wmemchr mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs) if test "x$ac_cv_func_putwc" != xyes ; then CF_UTF8_LIB if test "$cf_cv_utf8_lib" != no ; then @@ -1010,72 +1043,66 @@ else with_tic_depends=no fi -### use option --disable-wattr-macros to suppress wattr* macros from curses.h -AC_MSG_CHECKING(if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition) +### use option --enable-wattr-macros to enable wattr* macros in curses.h +AC_MSG_CHECKING(if you want to enable wattr* macros) AC_ARG_ENABLE(wattr-macros, - [ --disable-wattr-macros suppress wattr* macros to help with ncurses5/ncurses6 transition], + [ --enable-wattr-macros enable wattr* macros], [with_wattr_macros=$enableval], - [with_wattr_macros=yes]) + [with_wattr_macros=no]) if [[ "x$with_wattr_macros" != xyes ]]; then NCURSES_WATTR_MACROS=0 - AC_MSG_RESULT(yes) + AC_MSG_RESULT(no) else NCURSES_WATTR_MACROS=1 - AC_MSG_RESULT(no) + AC_MSG_RESULT(yes) fi AC_SUBST(NCURSES_WATTR_MACROS) CF_WITH_X11_RGB ### use option --with-bool to override bool's type -AC_MSG_CHECKING(for type of bool) -AC_ARG_WITH(bool, - [ --with-bool=TYPE override fallback type of bool variable], - [NCURSES_BOOL="$withval"], - [NCURSES_BOOL=auto]) -AC_MSG_RESULT($NCURSES_BOOL) -AC_SUBST(NCURSES_BOOL) +CF_WITH_TYPE(bool, + [ --with-bool=TYPE fall back to TYPE for curses 'bool' typedef], + NCURSES_BOOL, + auto) AC_MSG_CHECKING(for alternate terminal capabilities file) AC_ARG_WITH(caps, [ --with-caps=alt compile with alternate Caps file], [TERMINFO_CAPS=Caps.$withval], [TERMINFO_CAPS=Caps]) -test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps +if test ! -f "${srcdir}/include/${TERMINFO_CAPS}" +then + AC_MSG_WARN(file not found: "${srcdir}/include/${TERMINFO_CAPS}") + TERMINFO_CAPS=Caps +fi AC_MSG_RESULT($TERMINFO_CAPS) AC_SUBST(TERMINFO_CAPS) ### use option --with-chtype to override chtype's type -AC_MSG_CHECKING(for type of chtype) -AC_ARG_WITH(chtype, +CF_WITH_TYPE(chtype, [ --with-chtype=TYPE override type of chtype], - [NCURSES_CHTYPE="$withval"], - [NCURSES_CHTYPE=$cf_dft_chtype]) -AC_MSG_RESULT($NCURSES_CHTYPE) + NCURSES_CHTYPE, + $cf_dft_chtype) ### use option --with-ospeed to override ospeed's type -AC_MSG_CHECKING(for type of ospeed) -AC_ARG_WITH(ospeed, +CF_WITH_TYPE(ospeed, [ --with-ospeed=TYPE override type of ospeed variable], - [NCURSES_OSPEED="$withval"], - [NCURSES_OSPEED=short]) -AC_MSG_RESULT($NCURSES_OSPEED) -AC_SUBST(NCURSES_OSPEED) + NCURSES_OSPEED, + short) ### use option --with-mmask-t to override mmask_t's type -AC_MSG_CHECKING(for type of mmask_t) -AC_ARG_WITH(mmask-t, +CF_WITH_TYPE(mmask-t, [ --with-mmask-t=TYPE override type of mmask_t], - [NCURSES_MMASK_T="$withval"], - [NCURSES_MMASK_T=$cf_dft_mmask_t]) -AC_MSG_RESULT($NCURSES_MMASK_T) + NCURSES_MMASK_T, + $cf_dft_mmask_t) ### use option --with-ccharw-max to override CCHARW_MAX size AC_MSG_CHECKING(for size CCHARW_MAX) AC_ARG_WITH(ccharw-max, [ --with-ccharw-max=XXX override size CCHARW_MAX], [NCURSES_CCHARW_MAX="$withval"], - [NCURSES_CCHARW_MAX=5]) + [NCURSES_CCHARW_MAX=$cf_dft_ccharw_max]) AC_MSG_RESULT($NCURSES_CCHARW_MAX) AC_SUBST(NCURSES_CCHARW_MAX) @@ -1085,23 +1112,20 @@ if test "$ac_cv_sizeof_signed_char" = 1 ; then else NCURSES_SBOOL="char" fi -AC_MSG_CHECKING(if you want to use signed Boolean array in term.h) +AC_MSG_CHECKING(whether to use signed chars for Boolean array in term.h) AC_ARG_ENABLE(signed-char, - [ --enable-signed-char compile using signed Boolean's in term.h], + [ --enable-signed-char use signed chars for Boolean array in term.h], [with_signed_char=$enableval], - [with_signed_char=no]) + [with_signed_char=$cf_dft_signed_char]) AC_MSG_RESULT($with_signed_char) test "x$with_signed_char" != xyes && NCURSES_SBOOL="char" AC_SUBST(NCURSES_SBOOL) ### use option --with-tparm-arg to override tparm's argument type -AC_MSG_CHECKING(for type of tparm args) -AC_ARG_WITH(tparm-arg, +CF_WITH_TYPE(tparm-arg, [ --with-tparm-arg=TYPE override parameter type of tparm], - [NCURSES_TPARM_ARG="$withval"], - [NCURSES_TPARM_ARG=$cf_dft_tparm_arg]) -AC_MSG_RESULT($NCURSES_TPARM_ARG) -AC_SUBST(NCURSES_TPARM_ARG) + NCURSES_TPARM_ARG, + $cf_dft_tparm_arg) ### Enable compiling-in rcs id's AC_MSG_CHECKING(if RCS identifiers should be compiled-in) @@ -1135,7 +1159,6 @@ if test "x$with_ext_funcs" = xyes ; then AC_DEFINE(HAVE_RESIZE_TERM,1,[Define to 1 to enable resize_term() function in test-programs]) AC_DEFINE(HAVE_TERM_ENTRY_H,1,[Define to 1 to enable term_entry() function in test-programs]) AC_DEFINE(HAVE_USE_DEFAULT_COLORS,1,[Define to 1 to enable use_default_colors() function in test-programs]) - AC_DEFINE(HAVE_USE_EXTENDED_NAMES,1,[Define to 1 to enable use_extended_names() function in test-programs]) AC_DEFINE(HAVE_USE_SCREEN,1,[Define to 1 to enable use_screen() function in test-programs]) AC_DEFINE(HAVE_USE_WINDOW,1,[Define to 1 to enable use_window() function in test-programs]) AC_DEFINE(HAVE_WRESIZE,1,[Define to 1 to enable wresize() function in test-programs]) @@ -1225,11 +1248,18 @@ AC_ARG_ENABLE(ext-mouse, [with_ext_mouse=$enableval], [with_ext_mouse=$cf_dft_ext_mouse]) AC_MSG_RESULT($with_ext_mouse) -NCURSES_MOUSE_VERSION=1 if test "x$with_ext_mouse" = xyes ; then - NCURSES_MOUSE_VERSION=2 CF_NCURSES_ABI_6 fi + +if test $cf_cv_abi_default -le 5 ; then + NCURSES_MOUSE_VERSION=1 +elif test $cf_cv_abi_default -le 6 ; then + NCURSES_MOUSE_VERSION=2 +else + NCURSES_MOUSE_VERSION=3 +fi + AC_SUBST(NCURSES_MOUSE_VERSION) ### use option --enable-ext-putwin to turn on extended screendumps @@ -1258,7 +1288,14 @@ AC_ARG_ENABLE(sigwinch, [with_sigwinch=$enableval], [with_sigwinch=$with_ext_funcs]) AC_MSG_RESULT($with_sigwinch) -test "x$with_sigwinch" = xyes && AC_DEFINE(USE_SIGWINCH,1,[Define to 1 to compile with SIGWINCH handler]) +if test "x$with_sigwinch" = xyes +then + AC_DEFINE(USE_SIGWINCH,1,[Define to 1 to compile with SIGWINCH handler]) + cf_cv_enable_sigwinch=1 +else + cf_cv_enable_sigwinch=0 +fi +AC_SUBST(cf_cv_enable_sigwinch) ### use option --enable-tcap-names to allow user to define new capabilities AC_MSG_CHECKING(if you want user-definable terminal capabilities like termcap) @@ -1268,7 +1305,10 @@ AC_ARG_ENABLE(tcap-names, [with_tcap_names=$with_ext_funcs]) AC_MSG_RESULT($with_tcap_names) NCURSES_XNAMES=0 -test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1 +if test "x$with_tcap_names" = xyes; then + NCURSES_XNAMES=1 + AC_DEFINE(NCURSES_XNAMES,1,[Define to 1 to compile with user-definable terminal capabilities]) +fi AC_SUBST(NCURSES_XNAMES) ############################################################################## @@ -1358,19 +1398,19 @@ if test "x$with_reentrant" = xyes ; then else cf_cv_enable_reentrant=0 cf_cv_enable_opaque="NCURSES_OPAQUE" - NCURSES_SIZE_T=short + NCURSES_SIZE_T=$cf_dft_ordinate_type fi AC_SUBST(cf_cv_enable_reentrant) AC_SUBST(cf_cv_enable_opaque) AC_SUBST(NCURSES_SIZE_T) -AC_MSG_CHECKING(if you want opaque curses-library structures) -CF_ARG_ENABLE(opaque-curses, - [ --enable-opaque-curses make curses WINDOW, etc., "opaque"], - [enable_opaque_curses=yes],[ +AC_MSG_CHECKING(whether curses library structures should be opaque) +CF_ARG_DISABLE(opaque-curses, + [ --disable-opaque-curses do not make WINDOW, etc., structures opaque], + [enable_opaque_curses=no],[ test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes - test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no + test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=$cf_dft_opaque_curses ]) AC_MSG_RESULT($enable_opaque_curses) @@ -1378,22 +1418,22 @@ test "$cf_cv_enable_reentrant" = 1 && \ test "$enable_opaque_curses" = no && \ AC_MSG_ERROR(reentrant configuration requires opaque library) -AC_MSG_CHECKING(if you want opaque form-library structures) -AC_ARG_ENABLE(opaque-form, - [ --enable-opaque-form make form-library structures "opaque"], - [enable_opaque_form=yes],[enable_opaque_form=no]) +AC_MSG_CHECKING(whether form library structures should be opaque) +CF_ARG_DISABLE(opaque-form, + [ --disable-opaque-form do not make form library structures opaque], + [enable_opaque_form=no],[enable_opaque_form=$cf_dft_opaque_curses]) AC_MSG_RESULT($enable_opaque_form) -AC_MSG_CHECKING(if you want opaque menu-library structures) -AC_ARG_ENABLE(opaque-menu, - [ --enable-opaque-menu make menu-library structures "opaque"], - [enable_opaque_menu=yes],[enable_opaque_menu=no]) +AC_MSG_CHECKING(whether menu library structures should be opaque) +CF_ARG_DISABLE(opaque-menu, + [ --disable-opaque-menu do not make menu library structures opaque], + [enable_opaque_menu=no],[enable_opaque_menu=$cf_dft_opaque_curses]) AC_MSG_RESULT($enable_opaque_menu) -AC_MSG_CHECKING(if you want opaque panel-library structures) -AC_ARG_ENABLE(opaque-panel, - [ --enable-opaque-panel make panel-library structures "opaque"], - [enable_opaque_panel=yes],[enable_opaque_panel=no]) +AC_MSG_CHECKING(whether panel library structures should be opaque) +CF_ARG_DISABLE(opaque-panel, + [ --disable-opaque-panel do not make panel library structures opaque], + [enable_opaque_panel=no],[enable_opaque_panel=$cf_dft_opaque_curses]) AC_MSG_RESULT($enable_opaque_panel) NCURSES_OPAQUE=0; test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1 @@ -1430,6 +1470,14 @@ AC_ARG_WITH(develop, [with_develop=no]) AC_MSG_RESULT($with_develop) +### use option --enable-check-size to detect screensize with CPR +AC_MSG_CHECKING(if you want to check screensize of serial terminals) +AC_ARG_ENABLE(check-size, + [ --enable-check-size compile-in code to detect screensize of serial terminals],, + [enable_check_size=$with_develop]) +AC_MSG_RESULT($enable_check_size) +test "x$enable_check_size" = xyes && AC_DEFINE(USE_CHECK_SIZE,1,[Define to 1 to compile-in code to detect screensize]) + ### use option --enable-hard-tabs to turn on use of hard-tabs optimize AC_MSG_CHECKING(if you want hard-tabs code) AC_ARG_ENABLE(hard-tabs, @@ -1616,7 +1664,7 @@ AC_SUBST(INSTALL_OPT_P) CF_ENABLE_WARNINGS(Wno-unknown-pragmas Wswitch-enum,yes) if test "x$enable_warnings" = "xyes"; then - CF_ADD_ADAFLAGS(-gnatg) + CF_ADD_ADAFLAGS(-gnatwa -gnatyg) if test "x$cf_with_cxx" = xyes ; then CF_GXX_WARNINGS(Wno-unused) fi @@ -1687,20 +1735,15 @@ CF_DISABLE_GNAT_PROJECTS ### Checks for libraries. case "$cf_cv_system_name" in (*mingw32*|*mingw64*) + # Note: WINVER may be a problem with Windows 10 if test "x$with_exp_win32" = xyes ; then - CPPFLAGS="$CPPFLAGS -DWINVER=0x0600 -DWIN32_LEAN_AND_MEAN" + CPPFLAGS="$CPPFLAGS -DWINVER=0x0600 -DWIN32_LEAN_AND_MEAN" else - CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN" + CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN" fi - # Note: WINVER may be a problem with Windows 10 + CF_CHECK_LIBSSP ;; (*) -AC_CHECK_FUNC(gettimeofday, - AC_DEFINE(HAVE_GETTIMEOFDAY,1,[Define to 1 if we have gettimeofday function]),[ - -AC_CHECK_LIB(bsd, gettimeofday, - AC_DEFINE(HAVE_GETTIMEOFDAY,1,[Define to 1 if we have gettimeofday function]) - CF_ADD_LIB(bsd))])dnl CLIX: bzero, select, gettimeofday ;; esac @@ -1708,8 +1751,6 @@ CF_MATH_LIB(MATH_LIB,pow(sin(x),x)) AC_SUBST(MATH_LIB) ### Checks for header files. -AC_STDC_HEADERS -AC_HEADER_DIRENT AC_HEADER_TIME CF_REGEX @@ -1721,13 +1762,13 @@ limits.h \ locale.h \ math.h \ poll.h \ +sys/auxv.h \ sys/ioctl.h \ sys/param.h \ sys/poll.h \ sys/select.h \ sys/time.h \ sys/times.h \ -ttyent.h \ unistd.h \ wctype.h \ ) @@ -1777,21 +1818,23 @@ CF_ERRNO CF_LINK_DATAONLY ### Checks for library functions. +CF_FUNC_GETTIME AC_CHECK_FUNCS( \ +fpathconf \ getcwd \ +getauxval \ getegid \ geteuid \ getopt \ -getttynam \ +getuid \ issetugid \ localeconv \ poll \ -putenv \ remove \ select \ setbuf \ setbuffer \ -setenv \ +setfsuid \ setvbuf \ sigaction \ sigvec \ @@ -1805,6 +1848,8 @@ tsearch \ vsnprintf \ ) +CF_FUNC_GETTTYNAM + if test "x$ac_cv_func_getopt" = xno && \ test "x$cf_with_progs$cf_with_tests" != xnono; then AC_MSG_ERROR(getopt is required for building programs) @@ -1846,6 +1891,7 @@ CF_TYPE_SIGACTION CF_SIZECHANGE CF_FUNC_MEMMOVE CF_FUNC_POLL +CF_MB_LEN_MAX CF_VA_COPY AC_FUNC_VFORK CF_FOPEN_BIN_R @@ -1899,6 +1945,7 @@ if test -n "$CXX" ; then CF_BOOL_DECL CF_BOOL_SIZE CF_ETIP_DEFINES + CF_CPP_OVERRIDE CF_CPP_PARAM_INIT CF_CPP_STATIC_CAST CF_CXX_AR_FLAGS @@ -2293,14 +2340,11 @@ AC_SUBST(TICS_LIST) AC_SUBST(TINFO_LIST) AC_SUBST(SHLIB_LIST) -# used to separate tack out of the tree -NCURSES_TREE= -AC_SUBST(NCURSES_TREE) - ### predefined stuff for the test programs AC_DEFINE(HAVE_SLK_COLOR,1,[Define to 1 if we have slk_color for test-programs]) # pkgsrc uses these +CF_HELP_MESSAGE(Library basenames for pkgsrc:) CF_WITH_LIB_BASENAME(FORM_NAME,form) CF_WITH_LIB_BASENAME(MENU_NAME,menu) CF_WITH_LIB_BASENAME(PANEL_NAME,panel) @@ -2382,7 +2426,7 @@ esac # Help to automatically enable the extended curses features when using either # the *-config or the ".pc" files by adding defines. -AC_MSG_CHECKING(for defines to add to ncurses${USE_CFG_SUFFIX}-config script) +AC_MSG_CHECKING(for defines to add to ncurses${USE_CFG_SUFFIX}${cf_config_suffix}-config script) PKG_CFLAGS= for cf_loop1 in $CPPFLAGS_after_XOPEN do @@ -2457,7 +2501,7 @@ cf_filter_syms=no if test -n "$RESULTING_SYMS" then cf_filter_syms=$cf_dft_filter_syms - CF_VERBOSE(will map symbols to ABI=$cf_cv_abi_version) + CF_VERBOSE(will map symbols to ABI=$cf_cv_abi_default) fi if test "x$WILDCARD_SYMS" = xno @@ -2488,20 +2532,20 @@ AC_SUBST(PRIVATE_LIBS) # This is used for the *-config script and *.pc data files. CF_LD_SEARCHPATH -AC_DEFINE(HAVE_CURSES_DATA_BOOLNAMES,1,[definition needed for in-tree build of tack]) - AC_OUTPUT( \ include/MKterm.h.awk \ include/curses.head:include/curses.h.in \ include/ncurses_dll.h \ include/termcap.h \ include/unctrl.h \ + man/man_db.renames \ $SUB_MAKEFILES \ Makefile,[ if test "x$cf_with_tests" != xno ; then CF_PRG_RULES(["$srcdir/test/mk-test.awk" INSTALL=no ECHO_LINK="$ECHO_LD"], test) fi CF_LIB_RULES($SRC_SUBDIRS) +CF_OUTPUT_MANPAGE_RENAMES if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then if test -z "$USE_OLD_MAKERULES" ; then @@ -2529,6 +2573,7 @@ LIB_SUFFIX="$LIB_SUFFIX" LIB_TRACING="$LIB_TRACING" LN_S="$LN_S" MAKE_TERMINFO="$MAKE_TERMINFO" +MANPAGE_RENAMES="$MANPAGE_RENAMES" MENU_NAME="$MENU_NAME" NCURSES_MAJOR="$NCURSES_MAJOR" NCURSES_MINOR="$NCURSES_MINOR" @@ -2558,12 +2603,14 @@ WITH_OVERWRITE="$with_overwrite" cf_LIST_MODELS="$cf_list_models" cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD +cf_cv_abi_default="$cf_cv_abi_default" cf_cv_abi_version="$cf_cv_abi_version" cf_cv_do_relink="$cf_cv_do_relink" cf_cv_do_reranlib="$cf_cv_do_reranlib" cf_cv_do_symlinks="$cf_cv_do_symlinks" cf_cv_enable_lp64="$cf_cv_enable_lp64" cf_cv_enable_opaque="$cf_cv_enable_opaque" +cf_cv_make_PHONY="$cf_cv_make_PHONY" cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct @@ -2581,6 +2628,7 @@ cf_with_manpages="$cf_with_manpages" cf_with_tests="$cf_with_tests" host="$host" target="$target" +verbose="$verbose" with_shared_cxx="$with_shared_cxx" ],cat)dnl diff --git contrib/ncurses/dist.mk contrib/ncurses/dist.mk index ceead1705338..18484d8ca5c9 100644 --- contrib/ncurses/dist.mk +++ contrib/ncurses/dist.mk @@ -1,5 +1,5 @@ ############################################################################## -# Copyright 2018-2020,2021 Thomas E. Dickey # +# Copyright 2018-2023,2024 Thomas E. Dickey # # Copyright 1998-2017,2018 Free Software Foundation, Inc. # # # # Permission is hereby granted, free of charge, to any person obtaining a # @@ -26,7 +26,7 @@ # use or other dealings in this Software without prior written # # authorization. # ############################################################################## -# $Id: dist.mk,v 1.1401 2021/02/20 12:06:34 tom Exp $ +# $Id: dist.mk,v 1.1610 2024/04/27 13:55:54 tom Exp $ # Makefile for creating ncurses distributions. # # This only needs to be used directly as a makefile by developers, but @@ -37,8 +37,8 @@ SHELL = /bin/sh # These define the major/minor/patch versions of ncurses. NCURSES_MAJOR = 6 -NCURSES_MINOR = 2 -NCURSES_PATCH = 20210220 +NCURSES_MINOR = 5 +NCURSES_PATCH = 20240427 # We don't append the patch to the version, since this only applies to releases VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR) @@ -63,7 +63,7 @@ GNATHTML= gnathtml # would remove some text. The man program on Redhat 6.1 appears to work with # man2html if we set the top/bottom margins to 6 (the default is 7). Newer # versions of 'man' leave no margin (and make it harder to sync with pages). -MAN2HTML= man2html -botm=0 -topm=0 -cgiurl '$$title.$$section$$subsection.html' -index +MAN2HTML= man2html -botm=0 -topm=0 -cgiurl '$$title.$$section$$subsection.html' -index -mixsecs ALL = ANNOUNCE doc/html/announce.html doc/ncurses-intro.doc doc/hackguide.doc manhtml adahtml @@ -124,19 +124,20 @@ manhtml: @echo 's/<I>/<EM>/g' >> subst.tmp @echo 's/<\/I>/<\/EM>/g' >> subst.tmp @misc/csort < subst.tmp | uniq > subst.sed - @echo '/<\/TITLE>/a\' >> subst.sed - @echo '<link rel="author" href="mailto:bug-ncurses@gnu.org">\' >> subst.sed - @echo '<meta http-equiv="Content-Type" content="text\/html; charset=iso-8859-1">' >> subst.sed + @echo 's%[_-]*_-[_-]*%_%g' >> subst.sed + @echo '/<\/TITLE>/a\\' >> subst.sed + @echo '<link rel="author" href="mailto:bug-ncurses@gnu.org">\\' >> subst.sed @rm -f subst.tmp @for f in man/*.[0-9]* ; do \ m=`basename $$f` ;\ - T=`egrep '^.TH' $$f|sed -e 's/^.TH //' -e s'/"//g' -e 's/[ ]\+$$//'` ; \ + T=`$${EGREP-grep -E} '^.TH' $$f|sed -e 's/^.TH //' -e s'/"//g' -e 's/[ ]\+$$//'` ; \ g=$${m}.html ;\ if [ -f doc/html/$$g ]; then chmod +w doc/html/$$g; fi;\ echo "Converting $$m to HTML" ;\ - echo '<!-- ' > doc/html/man/$$g ;\ - egrep '^.\\"[^#]' $$f | \ - sed -e 's/\$$/@/g' \ + echo '<!--' > doc/html/man/$$g ;\ + sed -e '/^\.[a-zA-Z]/,99999d' $$f | \ + $${EGREP-grep -E} '^.\\"[^#]' | \ + sed -e 's/\$$/@/g' \ -e 's/^.../ */' \ -e 's/</\</g' \ -e 's/>/\>/g' \ diff --git contrib/ncurses/doc/hackguide.doc contrib/ncurses/doc/hackguide.doc index 1bafad2ad10b..a464d0336597 100644 --- contrib/ncurses/doc/hackguide.doc +++ contrib/ncurses/doc/hackguide.doc @@ -1,6 +1,8 @@ A Hacker's Guide to NCURSES - Contents +A Hacker's Guide to NCURSES + +Contents * Abstract * Objective of the Package @@ -24,7 +26,7 @@ * Style Tips for Developers * Porting Hints - Abstract +Abstract This document is a hacker's tour of the ncurses library and utilities. It discusses design philosophy, implementation methods, and the @@ -32,7 +34,7 @@ reading for anyone who is interested in porting, extending or improving the package. - Objective of the Package +Objective of the Package The objective of the ncurses package is to provide a free software API for character-cell terminals and terminal emulators with the following @@ -52,7 +54,7 @@ cannot add features if it means breaking the portion of the API corresponding to historical curses versions. -Why System V Curses? + Why System V Curses? We used System V curses as a model, reverse-engineering their API, in order to fulfill the first two objectives. @@ -65,7 +67,7 @@ Why System V Curses? X/Open is explicitly and closely modeled on System V. So conformance with System V took us most of the way to base-level XSI conformance. -How to Design Extensions + How to Design Extensions The third objective (standards conformance) requires that it be easy to condition source code using ncurses so that the absence of @@ -80,7 +82,7 @@ How to Design Extensions does not define, but which is defined in the ncurses library header. You can use this to condition the calls to the mouse API calls. - Portability and Configuration +Portability and Configuration Code written for ncurses may assume an ANSI-standard C compiler and POSIX-compatible OS interface. It may also assume the presence of a @@ -101,7 +103,7 @@ How to Design Extensions specification files (configure.in and aclocal.m4) to set up a new feature macro, which you then use to condition your code. - Documentation Conventions +Documentation Conventions There are three kinds of documentation associated with this package. Each has a different preferred format: @@ -111,7 +113,7 @@ How to Design Extensions Our conventions are simple: 1. Maintain package-internal files in plain text. The expected viewer - for them more(1) or an editor window; there is no point in + for them is more(1) or an editor window; there is no point in elaborate mark-up. 2. Mark up manual pages in the man macros. These have to be viewable through traditional man(1) programs. @@ -127,7 +129,7 @@ How to Design Extensions nice-looking printed version from it. Also, of course, it make exporting things like the announcement document to WWW pretty trivial. - How to Report Bugs +How to Report Bugs The reporting address for bugs is bug-ncurses@gnu.org. This is a majordomo list; to join, write to bug-ncurses-request@gnu.org with a @@ -228,9 +230,9 @@ How to Design Extensions comments of hardscroll.c and hashmap.c; then try it out. You can also test the hardware-scrolling optimization separately with hardscroll. - A Tour of the Ncurses Library +A Tour of the Ncurses Library -Library Overview + Library Overview Most of the library is superstructure -- fairly trivial convenience interfaces to a small set of basic functions and data structures used @@ -303,9 +305,9 @@ Library Overview We will discuss these in the compiler tour. -The Engine Room + The Engine Room - Keyboard Input + Keyboard Input All ncurses input funnels through the function wgetch(), defined in lib_getch.c. This function is tricky; it has to poll for keyboard and @@ -328,7 +330,7 @@ The Engine Room value. The function timed_wait() effectively simulates a System V select. - Mouse Events + Mouse Events If the mouse interface is active, wgetch() polls for mouse events each call, before it goes to the keyboard for input. It is up to @@ -368,7 +370,7 @@ The Engine Room accepted to parse the digested mouse reports (low-level events) into a gesture (a high-level or composite event). - Output and Screen Updating + Output and Screen Updating With the single exception of character echoes during a wgetnstr() call (which simulates cooked-mode line editing in an ncurses window), the @@ -412,7 +414,7 @@ The Engine Room variable _nc_optimize_enable. See the file include/curses.h.in for mask values, near the end. - The Forms and Menu Libraries +The Forms and Menu Libraries The forms and menu libraries should work reliably in any environment you can port ncurses to. The only portability issue anywhere in them @@ -428,7 +430,7 @@ The Engine Room panels support; u386mon 2.10 and beyond use it. This version has been slightly cleaned up for ncurses. - A Tour of the Terminfo Compiler +A Tour of the Terminfo Compiler The ncurses implementation of tic is rather complex internally; it has to do a trying combination of missions. This starts with the fact @@ -443,7 +445,7 @@ The Engine Room the grammar above it is trivial, just "parse entries till you run out of file". -Translation of Non-use Capabilities + Translation of Non-use Capabilities Translation of most things besides use capabilities is pretty straightforward. The lexical analyzer's tokenizer hands each @@ -464,7 +466,7 @@ Translation of Non-use Capabilities of adding one line to the include/Caps file. We will have more to say about this in the section on Source-Form Translation. -Use Capability Resolution + Use Capability Resolution The background problem that makes tic tricky is not the capability translation itself, it is the resolution of use capabilities. Older @@ -512,7 +514,7 @@ Use Capability Resolution complain about overwriting entries newly made during the tic run, but not about overwriting ones that predate it. -Source-Form Translation + Source-Form Translation Another use of tic is to do source translation between various termcap and terminfo formats. There are more variants out there than you might @@ -536,7 +538,7 @@ Source-Form Translation for example, is where the AIX box1 capability get translated to an acsc string. - Other Utilities +Other Utilities The infocmp utility is just a wrapper around the same entry-dumping code used by tic for source translation. Perhaps the one interesting @@ -548,7 +550,7 @@ Source-Form Translation The tput and clear utilities just do an entry load followed by a tputs() of a selected capability. - Style Tips for Developers +Style Tips for Developers See the TO-DO file in the top-level directory of the source distribution for additions that would be particularly useful. @@ -575,7 +577,7 @@ Source-Form Translation Have fun! - Porting Hints +Porting Hints The following notes are intended to be a first step towards DOS and Macintosh ports of the ncurses libraries. diff --git contrib/ncurses/doc/html/NCURSES-Programming-HOWTO.html contrib/ncurses/doc/html/NCURSES-Programming-HOWTO.html deleted file mode 100644 index d3eeb95dbccc..000000000000 --- contrib/ncurses/doc/html/NCURSES-Programming-HOWTO.html +++ /dev/null @@ -1,7415 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" -"http://www.w3.org/TR/html4/strict.dtd"> - -<html> -<head> - <meta name="generator" content= - "HTML Tidy for Linux (vers 25 March 2009), see www.w3.org"> - - <title>NCURSES Programming HOWTO</title> - <meta name="GENERATOR" content= - "Modular DocBook HTML Stylesheet Version 1.79"> -</head> - -<body class="ARTICLE" bgcolor="#FFFFFF" text="#000000" link= -"#0000FF" vlink="#840084" alink="#0000FF"> - <div class="ARTICLE"> - <div class="TITLEPAGE"> - <h1 class="TITLE"><a name="AEN2" id="AEN2">NCURSES - Programming HOWTO</a></h1> - - <h3 class="AUTHOR"><a name="AEN4" id="AEN4">Pradeep - Padala</a></h3> - - <div class="AFFILIATION"> - <div class="ADDRESS"> - <p class="ADDRESS"><code class="EMAIL"><<a href= - "mailto:ppadala@gmail.com">ppadala@gmail.com</a>></code></p> - </div> - </div> - - <p class="PUBDATE">v1.9, 2005-06-20<br></p> - - <div class="REVHISTORY"> - <table width="100%" border="0" summary="revisions"> - <tr> - <th align="left" valign="top" colspan="3"><b>Revision - History</b></th> - </tr> - - <tr> - <td align="left">Revision 1.9</td> - - <td align="left">2005-06-20</td> - - <td align="left">Revised by: ppadala</td> - </tr> - - <tr> - <td align="left" colspan="3">The license has been - changed to the MIT-style license used by NCURSES. Note - that the programs are also re-licensed under this.</td> - </tr> - - <tr> - <td align="left">Revision 1.8</td> - - <td align="left">2005-06-17</td> - - <td align="left">Revised by: ppadala</td> - </tr> - - <tr> - <td align="left" colspan="3">Lots of updates. Added - references and perl examples. Changes to examples. Many - grammatical and stylistic changes to the content. - Changes to NCURSES history.</td> - </tr> - - <tr> - <td align="left">Revision 1.7.1</td> - - <td align="left">2002-06-25</td> - - <td align="left">Revised by: ppadala</td> - </tr> - - <tr> - <td align="left" colspan="3">Added a README file for - building and instructions for building from - source.</td> - </tr> - - <tr> - <td align="left">Revision 1.7</td> - - <td align="left">2002-06-25</td> - - <td align="left">Revised by: ppadala</td> - </tr> - - <tr> - <td align="left" colspan="3">Added "Other formats" - section and made a lot of fancy changes to the - programs. Inlining of programs is gone.</td> - </tr> - - <tr> - <td align="left">Revision 1.6.1</td> - - <td align="left">2002-02-24</td> - - <td align="left">Revised by: ppadala</td> - </tr> - - <tr> - <td align="left" colspan="3">Removed the old Changelog - section, cleaned the makefiles</td> - </tr> - - <tr> - <td align="left">Revision 1.6</td> - - <td align="left">2002-02-16</td> - - <td align="left">Revised by: ppadala</td> - </tr> - - <tr> - <td align="left" colspan="3">Corrected a lot of - spelling mistakes, added ACS variables section</td> - </tr> - - <tr> - <td align="left">Revision 1.5</td> - - <td align="left">2002-01-05</td> - - <td align="left">Revised by: ppadala</td> - </tr> - - <tr> - <td align="left" colspan="3">Changed structure to - present proper TOC</td> - </tr> - - <tr> - <td align="left">Revision 1.3.1</td> - - <td align="left">2001-07-26</td> - - <td align="left">Revised by: ppadala</td> - </tr> - - <tr> - <td align="left" colspan="3">Corrected maintainers - paragraph, Corrected stable release number</td> - </tr> - - <tr> - <td align="left">Revision 1.3</td> - - <td align="left">2001-07-24</td> - - <td align="left">Revised by: ppadala</td> - </tr> - - <tr> - <td align="left" colspan="3">Added copyright notices to - main document (LDP license) and programs (GPL), - Corrected printw_example.</td> - </tr> - - <tr> - <td align="left">Revision 1.2</td> - - <td align="left">2001-06-05</td> - - <td align="left">Revised by: ppadala</td> - </tr> - - <tr> - <td align="left" colspan="3">Incorporated ravi's - changes. Mainly to introduction, menu, form, justforfun - sections</td> - </tr> - - <tr> - <td align="left">Revision 1.1</td> - - <td align="left">2001-05-22</td> - - <td align="left">Revised by: ppadala</td> - </tr> - - <tr> - <td align="left" colspan="3">Added "a word about - window" section, Added scanw_example.</td> - </tr> - </table> - </div> - - <div> - <div class="ABSTRACT"> - <a name="AEN67" id="AEN67"></a> - - <p><span class="emphasis"><i class="EMPHASIS">This - document is intended to be an "All in One" guide for - programming with ncurses and its sister libraries. We - graduate from a simple "Hello World" program to more - complex form manipulation. No prior experience in ncurses - is assumed. Send comments to <a href= - "mailto:ppadala@gmail.com" target="_top">this - address</a></i></span></p> - </div> - </div> - <hr> - </div> - - <div class="TOC"> - <dl> - <dt><b>Table of Contents</b></dt> - - <dt>1. <a href="#INTRO">Introduction</a></dt> - - <dd> - <dl> - <dt>1.1. <a href="#WHATIS">What is NCURSES?</a></dt> - - <dt>1.2. <a href="#WHATCANWEDO">What we can do with - NCURSES</a></dt> - - <dt>1.3. <a href="#WHERETOGETIT">Where to get - it</a></dt> - - <dt>1.4. <a href="#PURPOSE">Purpose/Scope of the - document</a></dt> - - <dt>1.5. <a href="#ABOUTPROGRAMS">About the - Programs</a></dt> - - <dt>1.6. <a href="#OTHERFORMATS">Other Formats of the - document</a></dt> - - <dd> - <dl> - <dt>1.6.1. <a href="#LISTFORMATS">Readily available - formats from tldp.org</a></dt> - - <dt>1.6.2. <a href="#BUILDSOURCE">Building from - source</a></dt> - </dl> - </dd> - - <dt>1.7. <a href="#CREDITS">Credits</a></dt> - - <dt>1.8. <a href="#WISHLIST">Wish List</a></dt> - - <dt>1.9. <a href="#COPYRIGHT">Copyright</a></dt> - </dl> - </dd> - - <dt>2. <a href="#HELLOWORLD">Hello World !!!</a></dt> - - <dd> - <dl> - <dt>2.1. <a href="#COMPILECURSES">Compiling With the - NCURSES Library</a></dt> - - <dt>2.2. <a href="#DISSECTION">Dissection</a></dt> - - <dd> - <dl> - <dt>2.2.1. <a href="#ABOUT-INITSCR">About - initscr()</a></dt> - - <dt>2.2.2. <a href="#MYST-REFRESH">The mysterious - refresh()</a></dt> - - <dt>2.2.3. <a href="#ABOUT-ENDWIN">About - endwin()</a></dt> - </dl> - </dd> - </dl> - </dd> - - <dt>3. <a href="#GORY">The Gory Details</a></dt> - - <dt>4. <a href="#INIT">Initialization</a></dt> - - <dd> - <dl> - <dt>4.1. <a href="#ABOUTINIT">Initialization - functions</a></dt> - - <dt>4.2. <a href="#RAWCBREAK">raw() and - cbreak()</a></dt> - - <dt>4.3. <a href="#ECHONOECHO">echo() and - noecho()</a></dt> - - <dt>4.4. <a href="#KEYPAD">keypad()</a></dt> - - <dt>4.5. <a href="#HALFDELAY">halfdelay()</a></dt> - - <dt>4.6. <a href="#MISCINIT">Miscellaneous - Initialization functions</a></dt> - - <dt>4.7. <a href="#INITEX">An Example</a></dt> - </dl> - </dd> - - <dt>5. <a href="#AWORDWINDOWS">A Word about - Windows</a></dt> - - <dt>6. <a href="#PRINTW">Output functions</a></dt> - - <dd> - <dl> - <dt>6.1. <a href="#ADDCHCLASS">addch() class of - functions</a></dt> - - <dt>6.2. <a href="#AEN298">mvaddch(), waddch() and - mvwaddch()</a></dt> - - <dt>6.3. <a href="#PRINTWCLASS">printw() class of - functions</a></dt> - - <dd> - <dl> - <dt>6.3.1. <a href="#PRINTWMVPRINTW">printw() and - mvprintw</a></dt> - - <dt>6.3.2. <a href="#WPRINTWMVWPRINTW">wprintw() - and mvwprintw</a></dt> - - <dt>6.3.3. <a href="#VWPRINTW">vw_printw()</a></dt> - - <dt>6.3.4. <a href="#SIMPLEPRINTWEX">A Simple - printw example</a></dt> - </dl> - </dd> - - <dt>6.4. <a href="#ADDSTRCLASS">addstr() class of - functions</a></dt> - - <dt>6.5. <a href="#ACAUTION">A word of caution</a></dt> - </dl> - </dd> - - <dt>7. <a href="#SCANW">Input functions</a></dt> - - <dd> - <dl> - <dt>7.1. <a href="#GETCHCLASS">getch() class of - functions</a></dt> - - <dt>7.2. <a href="#SCANWCLASS">scanw() class of - functions</a></dt> - - <dd> - <dl> - <dt>7.2.1. <a href="#SCANWMVSCANW">scanw() and - mvscanw</a></dt> - - <dt>7.2.2. <a href="#WSCANWMVWSCANW">wscanw() and - mvwscanw()</a></dt> - - <dt>7.2.3. <a href="#VWSCANW">vw_scanw()</a></dt> - </dl> - </dd> - - <dt>7.3. <a href="#GETSTRCLASS">getstr() class of - functions</a></dt> - - <dt>7.4. <a href="#GETSTREX">Some examples</a></dt> - </dl> - </dd> - - <dt>8. <a href="#ATTRIB">Attributes</a></dt> - - <dd> - <dl> - <dt>8.1. <a href="#ATTRIBDETAILS">The details</a></dt> - - <dt>8.2. <a href="#ATTRONVSATTRSET">attron() vs - attrset()</a></dt> - - <dt>8.3. <a href="#ATTRGET">attr_get()</a></dt> - - <dt>8.4. <a href="#ATTRFUNCS">attr_ functions</a></dt> - - <dt>8.5. <a href="#WATTRFUNCS">wattr functions</a></dt> - - <dt>8.6. <a href="#CHGAT">chgat() functions</a></dt> - </dl> - </dd> - - <dt>9. <a href="#WINDOWS">Windows</a></dt> - - <dd> - <dl> - <dt>9.1. <a href="#WINDOWBASICS">The basics</a></dt> - - <dt>9.2. <a href="#LETBEWINDOW">Let there be a Window - !!!</a></dt> - - <dt>9.3. <a href="#BORDEREXEXPL">Explanation</a></dt> - - <dt>9.4. <a href="#OTHERSTUFF">The other stuff in the - example</a></dt> - - <dt>9.5. <a href="#OTHERBORDERFUNCS">Other Border - functions</a></dt> - </dl> - </dd> - - <dt>10. <a href="#COLOR">Colors</a></dt> - - <dd> - <dl> - <dt>10.1. <a href="#COLORBASICS">The basics</a></dt> - - <dt>10.2. <a href="#CHANGECOLORDEFS">Changing Color - Definitions</a></dt> - - <dt>10.3. <a href="#COLORCONTENT">Color - Content</a></dt> - </dl> - </dd> - - <dt>11. <a href="#KEYS">Interfacing with the key - board</a></dt> - - <dd> - <dl> - <dt>11.1. <a href="#KEYSBASICS">The Basics</a></dt> - - <dt>11.2. <a href="#SIMPLEKEYEX">A Simple Key Usage - example</a></dt> - </dl> - </dd> - - <dt>12. <a href="#MOUSE">Interfacing with the - mouse</a></dt> - - <dd> - <dl> - <dt>12.1. <a href="#MOUSEBASICS">The Basics</a></dt> - - <dt>12.2. <a href="#GETTINGEVENTS">Getting the - events</a></dt> - - <dt>12.3. <a href="#MOUSETOGETHER">Putting it all - Together</a></dt> - - <dt>12.4. <a href="#MISCMOUSEFUNCS">Miscellaneous - Functions</a></dt> - </dl> - </dd> - - <dt>13. <a href="#SCREEN">Screen Manipulation</a></dt> - - <dd> - <dl> - <dt>13.1. <a href="#GETYX">getyx() functions</a></dt> - - <dt>13.2. <a href="#SCREENDUMP">Screen Dumping</a></dt> - - <dt>13.3. <a href="#WINDOWDUMP">Window Dumping</a></dt> - </dl> - </dd> - - <dt>14. <a href="#MISC">Miscellaneous features</a></dt> - - <dd> - <dl> - <dt>14.1. <a href="#CURSSET">curs_set()</a></dt> - - <dt>14.2. <a href="#TEMPLEAVE">Temporarily Leaving - Curses mode</a></dt> - - <dt>14.3. <a href="#ACSVARS">ACS_ variables</a></dt> - </dl> - </dd> - - <dt>15. <a href="#OTHERLIB">Other libraries</a></dt> - - <dt>16. <a href="#PANELS">Panel Library</a></dt> - - <dd> - <dl> - <dt>16.1. <a href="#PANELBASICS">The Basics</a></dt> - - <dt>16.2. <a href="#COMPILEPANELS">Compiling With the - Panels Library</a></dt> - - <dt>16.3. <a href="#PANELBROWSING">Panel Window - Browsing</a></dt> - - <dt>16.4. <a href="#USERPTRUSING">Using User - Pointers</a></dt> - - <dt>16.5. <a href="#PANELMOVERESIZE">Moving and - Resizing Panels</a></dt> - - <dt>16.6. <a href="#PANELSHOWHIDE">Hiding and Showing - Panels</a></dt> - - <dt>16.7. <a href="#PANELABOVE">panel_above() and - panel_below() Functions</a></dt> - </dl> - </dd> - - <dt>17. <a href="#MENUS">Menus Library</a></dt> - - <dd> - <dl> - <dt>17.1. <a href="#MENUBASICS">The Basics</a></dt> - - <dt>17.2. <a href="#COMPILEMENUS">Compiling With the - Menu Library</a></dt> - - <dt>17.3. <a href="#MENUDRIVER">Menu Driver: The work - horse of the menu system</a></dt> - - <dt>17.4. <a href="#MENUWINDOWS">Menu Windows</a></dt> - - <dt>17.5. <a href="#SCROLLMENUS">Scrolling - Menus</a></dt> - - <dt>17.6. <a href="#MULTICOLUMN">Multi Columnar - Menus</a></dt> - - <dt>17.7. <a href="#MULTIVALUEMENUS">Multi Valued - Menus</a></dt> - - <dt>17.8. <a href="#MENUOPT">Menu Options</a></dt> - - <dt>17.9. <a href="#MENUUSERPTR">The useful User - Pointer</a></dt> - </dl> - </dd> - - <dt>18. <a href="#FORMS">Forms Library</a></dt> - - <dd> - <dl> - <dt>18.1. <a href="#FORMBASICS">The Basics</a></dt> - - <dt>18.2. <a href="#COMPILEFORMS">Compiling With the - Forms Library</a></dt> - - <dt>18.3. <a href="#PLAYFIELDS">Playing with - Fields</a></dt> - - <dd> - <dl> - <dt>18.3.1. <a href="#FETCHINFO">Fetching Size and - Location of Field</a></dt> - - <dt>18.3.2. <a href="#MOVEFIELD">Moving the - field</a></dt> - - <dt>18.3.3. <a href="#JUSTIFYFIELD">Field - Justification</a></dt> - - <dt>18.3.4. <a href="#FIELDDISPATTRIB">Field - Display Attributes</a></dt> - - <dt>18.3.5. <a href="#FIELDOPTIONBITS">Field Option - Bits</a></dt> - - <dt>18.3.6. <a href="#FIELDSTATUS">Field - Status</a></dt> - - <dt>18.3.7. <a href="#FIELDUSERPTR">Field User - Pointer</a></dt> - - <dt>18.3.8. <a href= - "#VARIABLESIZEFIELDS">Variable-Sized - Fields</a></dt> - </dl> - </dd> - - <dt>18.4. <a href="#FORMWINDOWS">Form Windows</a></dt> - - <dt>18.5. <a href="#FILEDVALIDATE">Field - Validation</a></dt> - - <dt>18.6. <a href="#FORMDRIVER">Form Driver: The work - horse of the forms system</a></dt> - - <dd> - <dl> - <dt>18.6.1. <a href="#PAGENAVREQ">Page Navigation - Requests</a></dt> - - <dt>18.6.2. <a href="#INTERFIELDNAVREQ">Inter-Field - Navigation Requests</a></dt> - - <dt>18.6.3. <a href="#INTRAFIELDNAVREQ">Intra-Field - Navigation Requests</a></dt> - - <dt>18.6.4. <a href="#SCROLLREQ">Scrolling - Requests</a></dt> - - <dt>18.6.5. <a href="#EDITREQ">Editing - Requests</a></dt> - - <dt>18.6.6. <a href="#ORDERREQ">Order - Requests</a></dt> - - <dt>18.6.7. <a href="#APPLICCOMMANDS">Application - Commands</a></dt> - </dl> - </dd> - </dl> - </dd> - - <dt>19. <a href="#TOOLS">Tools and Widget - Libraries</a></dt> - - <dd> - <dl> - <dt>19.1. <a href="#CDK">CDK (Curses Development - Kit)</a></dt> - - <dd> - <dl> - <dt>19.1.1. <a href="#WIDGETLIST">Widget - List</a></dt> - - <dt>19.1.2. <a href="#CDKATTRACT">Some Attractive - Features</a></dt> - - <dt>19.1.3. <a href= - "#CDKCONCLUSION">Conclusion</a></dt> - </dl> - </dd> - - <dt>19.2. <a href="#DIALOG">The dialog</a></dt> - - <dt>19.3. <a href="#PERLCURSES">Perl Curses Modules - CURSES::FORM and CURSES::WIDGETS</a></dt> - </dl> - </dd> - - <dt>20. <a href="#JUSTFORFUN">Just For Fun !!!</a></dt> - - <dd> - <dl> - <dt>20.1. <a href="#GAMEOFLIFE">The Game of - Life</a></dt> - - <dt>20.2. <a href="#MAGIC">Magic Square</a></dt> - - <dt>20.3. <a href="#HANOI">Towers of Hanoi</a></dt> - - <dt>20.4. <a href="#QUEENS">Queens Puzzle</a></dt> - - <dt>20.5. <a href="#SHUFFLE">Shuffle</a></dt> - - <dt>20.6. <a href="#TT">Typing Tutor</a></dt> - </dl> - </dd> - - <dt>21. <a href="#REF">References</a></dt> - </dl> - </div> - - <div class="SECT1"> - <h2 class="SECT1"><a name="INTRO" id="INTRO">1. - Introduction</a></h2> - - <p>In the olden days of teletype terminals, terminals were - away from computers and were connected to them through serial - cables. The terminals could be configured by sending a series - of bytes. All the capabilities (such as moving the cursor to - a new location, erasing part of the screen, scrolling the - screen, changing modes etc.) of terminals could be accessed - through these series of bytes. These control seeuqnces are - usually called escape sequences, because they start with an - escape(0x1B) character. Even today, with proper emulation, we - can send escape sequences to the emulator and achieve the - same effect on a terminal window.</p> - - <p>Suppose you wanted to print a line in color. Try typing - this on your console.</p> - <pre class="PROGRAMLISTING"> -echo "^[[0;31;40mIn Color" -</pre> - - <p>The first character is an escape character, which looks - like two characters ^ and [. To be able to print it, you have - to press CTRL+V and then the ESC key. All the others are - normal printable characters. You should be able to see the - string "In Color" in red. It stays that way and to revert - back to the original mode type this.</p> - <pre class="PROGRAMLISTING"> -echo "^[[0;37;40m" -</pre> - - <p>Now, what do these magic characters mean? Difficult to - comprehend? They might even be different for different - terminals. So the designers of UNIX invented a mechanism - named <tt class="LITERAL">termcap</tt>. It is a file that - lists all the capabilities of a particular terminal, along - with the escape sequences needed to achieve a particular - effect. In the later years, this was replaced by <tt class= - "LITERAL">terminfo</tt>. Without delving too much into - details, this mechanism allows application programs to query - the terminfo database and obtain the control characters to be - sent to a terminal or terminal emulator.</p> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="WHATIS" id="WHATIS">1.1. What is - NCURSES?</a></h3> - - <p>You might be wondering, what the import of all this - technical gibberish is. In the above scenario, every - application program is supposed to query the terminfo and - perform the necessary stuff (sending control characters - etc.). It soon became difficult to manage this complexity - and this gave birth to 'CURSES'. Curses is a pun on the - name "cursor optimization". The Curses library forms a - wrapper over working with raw terminal codes, and provides - highly flexible and efficient API (Application Programming - Interface). It provides functions to move the cursor, - create windows, produce colors, play with mouse etc. The - application programs need not worry about the underlying - terminal capabilities.</p> - - <p>So what is NCURSES? NCURSES is a clone of the original - System V Release 4.0 (SVr4) curses. It is a freely - distributable library, fully compatible with older version - of curses. In short, it is a library of functions that - manages an application's display on character-cell - terminals. In the remainder of the document, the terms - curses and ncurses are used interchangeably.</p> - - <p>A detailed history of NCURSES can be found in the NEWS - file from the source distribution. The current package is - maintained by <a href="mailto:dickey@his.com" target= - "_top">Thomas Dickey</a>. You can contact the maintainers - at <a href="mailto:bug-ncurses@gnu.org" target= - "_top">bug-ncurses@gnu.org</a>.</p> - </div> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="WHATCANWEDO" id= - "WHATCANWEDO">1.2. What we can do with NCURSES</a></h3> - - <p>NCURSES not only creates a wrapper over terminal - capabilities, but also gives a robust framework to create - nice looking UI (User Interface)s in text mode. It provides - functions to create windows etc. Its sister libraries - panel, menu and form provide an extension to the basic - curses library. These libraries usually come along with - curses. One can create applications that contain multiple - windows, menus, panels and forms. Windows can be managed - independently, can provide 'scrollability' and even can be - hidden.</p> - - <p>Menus provide the user with an easy command selection - option. Forms allow the creation of easy-to-use data entry - and display windows. Panels extend the capabilities of - ncurses to deal with overlapping and stacked windows.</p> - - <p>These are just some of the basic things we can do with - ncurses. As we move along, We will see all the capabilities - of these libraries.</p> - </div> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="WHERETOGETIT" id= - "WHERETOGETIT">1.3. Where to get it</a></h3> - - <p>All right, now that you know what you can do with - ncurses, you must be rearing to get started. NCURSES is - usually shipped with your installation. In case you don't - have the library or want to compile it on your own, read - on.</p> - - <p><span class="emphasis"><i class="EMPHASIS">Compiling the - package</i></span></p> - - <p>NCURSES can be obtained from <a href= - "ftp://ftp.gnu.org/pub/gnu/ncurses/ncurses.tar.gz" target= - "_top">ftp://ftp.gnu.org/pub/gnu/ncurses/ncurses.tar.gz</a> - or any of the ftp sites mentioned in <a href= - "http://www.gnu.org/order/ftp.html" target= - "_top">http://www.gnu.org/order/ftp.html</a>.</p> - - <p>Read the README and INSTALL files for details on to how - to install it. It usually involves the following - operations.</p> - <pre class="PROGRAMLISTING"> - tar zxvf ncurses<version>.tar.gz # unzip and untar the archive - cd ncurses<version> # cd to the directory - ./configure # configure the build according to your - # environment - make # make it - su root # become root - make install # install it -</pre> - - <p><span class="emphasis"><i class="EMPHASIS">Using the - RPM</i></span></p> - - <p>NCURSES RPM can be found and downloaded from <a href= - "http://rpmfind.net" target="_top">http://rpmfind.net</a> . - The RPM can be installed with the following command after - becoming root.</p> - <pre class="PROGRAMLISTING"> - rpm -i <downloaded rpm> -</pre> - </div> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="PURPOSE" id="PURPOSE">1.4. - Purpose/Scope of the document</a></h3> - - <p>This document is intended to be a "All in One" guide for - programming with ncurses and its sister libraries. We - graduate from a simple "Hello World" program to more - complex form manipulation. No prior experience in ncurses - is assumed. The writing is informal, but a lot of detail is - provided for each of the examples.</p> - </div> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="ABOUTPROGRAMS" id= - "ABOUTPROGRAMS">1.5. About the Programs</a></h3> - - <p>All the programs in the document are available in zipped - form <a href= - "http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/ncurses_programs.tar.gz" - target="_top">here</a>. Unzip and untar it. The directory - structure looks like this.</p> - <pre class="PROGRAMLISTING"> -ncurses - | - |----> JustForFun -- just for fun programs - |----> basics -- basic programs - |----> demo -- output files go into this directory after make - | | - | |----> exe -- exe files of all example programs - |----> forms -- programs related to form library - |----> menus -- programs related to menus library - |----> panels -- programs related to panels library - |----> perl -- perl equivalents of the examples (contributed - | by Anuradha Ratnaweera) - |----> Makefile -- the top level Makefile - |----> README -- the top level README file. contains instructions - |----> COPYING -- copyright notice -</pre> - - <p>The individual directories contain the following - files.</p> - <pre class="PROGRAMLISTING"> -Description of files in each directory --------------------------------------- -JustForFun - | - |----> hanoi.c -- The Towers of Hanoi Solver - |----> life.c -- The Game of Life demo - |----> magic.c -- An Odd Order Magic Square builder - |----> queens.c -- The famous N-Queens Solver - |----> shuffle.c -- A fun game, if you have time to kill - |----> tt.c -- A very trivial typing tutor - - basics - | - |----> acs_vars.c -- ACS_ variables example - |----> hello_world.c -- Simple "Hello World" Program - |----> init_func_example.c -- Initialization functions example - |----> key_code.c -- Shows the scan code of the key pressed - |----> mouse_menu.c -- A menu accessible by mouse - |----> other_border.c -- Shows usage of other border functions apa - | -- rt from box() - |----> printw_example.c -- A very simple printw() example - |----> scanw_example.c -- A very simple getstr() example - |----> simple_attr.c -- A program that can print a c file with - | -- comments in attribute - |----> simple_color.c -- A simple example demonstrating colors - |----> simple_key.c -- A menu accessible with keyboard UP, DOWN - | -- arrows - |----> temp_leave.c -- Demonstrates temporarily leaving curses mode - |----> win_border.c -- Shows Creation of windows and borders - |----> with_chgat.c -- chgat() usage example - - forms - | - |----> form_attrib.c -- Usage of field attributes - |----> form_options.c -- Usage of field options - |----> form_simple.c -- A simple form example - |----> form_win.c -- Demo of windows associated with forms - - menus - | - |----> menu_attrib.c -- Usage of menu attributes - |----> menu_item_data.c -- Usage of item_name() etc.. functions - |----> menu_multi_column.c -- Creates multi columnar menus - |----> menu_scroll.c -- Demonstrates scrolling capability of menus - |----> menu_simple.c -- A simple menu accessed by arrow keys - |----> menu_toggle.c -- Creates multi valued menus and explains - | -- REQ_TOGGLE_ITEM - |----> menu_userptr.c -- Usage of user pointer - |----> menu_win.c -- Demo of windows associated with menus - - panels - | - |----> panel_browse.c -- Panel browsing through tab. Usage of user - | -- pointer - |----> panel_hide.c -- Hiding and Un hiding of panels - |----> panel_resize.c -- Moving and resizing of panels - |----> panel_simple.c -- A simple panel example - - perl - |----> 01-10.pl -- Perl equivalents of first ten example programs -</pre> - - <p>There is a top level Makefile included in the main - directory. It builds all the files and puts the - ready-to-use exes in demo/exe directory. You can also do - selective make by going into the corresponding directory. - Each directory contains a README file explaining the - purpose of each c file in the directory.</p> - - <p>For every example, I have included path name for the - file relative to the examples directory.</p> - - <p>If you prefer browsing individual programs, point your - browser to <a href= - "http://tldp.org/HOWTO/NCURSES-Programming-HOWTO/ncurses_programs/" - target= - "_top">http://tldp.org/HOWTO/NCURSES-Programming-HOWTO/ncurses_programs/</a></p> - - <p>All the programs are released under the same license - that is used by ncurses (MIT-style). This gives you the - ability to do pretty much anything other than claiming them - as yours. Feel free to use them in your programs as - appropriate.</p> - </div> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="OTHERFORMATS" id= - "OTHERFORMATS">1.6. Other Formats of the document</a></h3> - - <p>This howto is also availabe in various other formats on - the tldp.org site. Here are the links to other formats of - this document.</p> - - <div class="SECT3"> - <hr> - - <h4 class="SECT3"><a name="LISTFORMATS" id= - "LISTFORMATS">1.6.1. Readily available formats from - tldp.org</a></h4> - - <ul> - <li> - <p><a href= - "http://www.ibiblio.org/pub/Linux/docs/HOWTO/other-formats/pdf/NCURSES-Programming-HOWTO.pdf" - target="_top">Acrobat PDF Format</a></p> - </li> - - <li> - <p><a href= - "http://www.ibiblio.org/pub/Linux/docs/HOWTO/other-formats/ps/NCURSES-Programming-HOWTO.ps.gz" - target="_top">PostScript Format</a></p> - </li> - - <li> - <p><a href= - "http://www.ibiblio.org/pub/Linux/docs/HOWTO/other-formats/html/NCURSES-Programming-HOWTO-html.tar.gz" - target="_top">In Multiple HTML pages</a></p> - </li> - - <li> - <p><a href= - "http://www.ibiblio.org/pub/Linux/docs/HOWTO/other-formats/html_single/NCURSES-Programming-HOWTO.html" - target="_top">In One big HTML format</a></p> - </li> - </ul> - </div> - - <div class="SECT3"> - <hr> - - <h4 class="SECT3"><a name="BUILDSOURCE" id= - "BUILDSOURCE">1.6.2. Building from source</a></h4> - - <p>If above links are broken or if you want to experiment - with sgml read on.</p> - <pre class="PROGRAMLISTING"> - Get both the source and the tar,gzipped programs, available at - http://cvsview.tldp.org/index.cgi/LDP/howto/docbook/ - NCURSES-HOWTO/NCURSES-Programming-HOWTO.sgml - http://cvsview.tldp.org/index.cgi/LDP/howto/docbook/ - NCURSES-HOWTO/ncurses_programs.tar.gz - - Unzip ncurses_programs.tar.gz with - tar zxvf ncurses_programs.tar.gz - - Use jade to create various formats. For example if you just want to create - the multiple html files, you would use - jade -t sgml -i html -d <path to docbook html stylesheet> - NCURSES-Programming-HOWTO.sgml - to get pdf, first create a single html file of the HOWTO with - jade -t sgml -i html -d <path to docbook html stylesheet> -V nochunks - NCURSES-Programming-HOWTO.sgml > NCURSES-ONE-BIG-FILE.html - then use htmldoc to get pdf file with - htmldoc --size universal -t pdf --firstpage p1 -f <output file name.pdf> - NCURSES-ONE-BIG-FILE.html - for ps, you would use - htmldoc --size universal -t ps --firstpage p1 -f <output file name.ps> - NCURSES-ONE-BIG-FILE.html -</pre> - - <p>See <a href= - "http://www.tldp.org/LDP/LDP-Author-Guide/" target= - "_top">LDP Author guide</a> for more details. If all else - failes, mail me at <a href="ppadala@gmail.com" target= - "_top">ppadala@gmail.com</a></p> - </div> - </div> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="CREDITS" id="CREDITS">1.7. - Credits</a></h3> - - <p>I thank <a href="mailto:sharath_1@usa.net" target= - "_top">Sharath</a> and Emre Akbas for helping me with few - sections. The introduction was initially written by - sharath. I rewrote it with few excerpts taken from his - initial work. Emre helped in writing printw and scanw - sections.</p> - - <p>Perl equivalents of the example programs are contributed - by <a href="mailto:Aratnaweera@virtusa.com" target= - "_top">Anuradha Ratnaweera</a>.</p> - - <p>Then comes <a href="mailto:parimi@ece.arizona.edu" - target="_top">Ravi Parimi</a>, my dearest friend, who has - been on this project before even one line was written. He - constantly bombarded me with suggestions and patiently - reviewed the whole text. He also checked each program on - Linux and Solaris.</p> - </div> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="WISHLIST" id="WISHLIST">1.8. - Wish List</a></h3> - - <p>This is the wish list, in the order of priority. If you - have a wish or you want to work on completing the wish, - mail <a href="mailto:ppadala@gmail.com" target= - "_top">me</a>.</p> - - <ul> - <li> - <p>Add examples to last parts of forms section.</p> - </li> - - <li> - <p>Prepare a Demo showing all the programs and allow - the user to browse through description of each program. - Let the user compile and see the program in action. A - dialog based interface is preferred.</p> - </li> - - <li> - <p>Add debug info. _tracef, _tracemouse stuff.</p> - </li> - - <li> - <p>Accessing termcap, terminfo using functions provided - by ncurses package.</p> - </li> - - <li> - <p>Working on two terminals simultaneously.</p> - </li> - - <li> - <p>Add more stuff to miscellaneous section.</p> - </li> - </ul> - </div> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="COPYRIGHT" id="COPYRIGHT">1.9. - Copyright</a></h3> - - <p>Copyright © 2001 by Pradeep Padala.</p> - - <p>Permission is hereby granted, free of charge, to any - person obtaining a copy of this software and associated - documentation files (the "Software"), to deal in the - Software without restriction, including without limitation - the rights to use, copy, modify, merge, publish, - distribute, distribute with modifications, sublicense, - and/or sell copies of the Software, and to permit persons - to whom the Software is furnished to do so, subject to the - following conditions:</p> - - <p>The above copyright notice and this permission notice - shall be included in all copies or substantial portions of - the Software.</p> - - <p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF - ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO - THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR - PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE - COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p> - - <p>Except as contained in this notice, the name(s) of the - above copyright holders shall not be used in advertising or - otherwise to promote the sale, use or other dealings in - this Software without prior written authorization.</p> - </div> - </div> - - <div class="SECT1"> - <hr> - - <h2 class="SECT1"><a name="HELLOWORLD" id="HELLOWORLD">2. - Hello World !!!</a></h2> - - <p>Welcome to the world of curses. Before we plunge into the - library and look into its various features, let's write a - simple program and say hello to the world.</p> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="COMPILECURSES" id= - "COMPILECURSES">2.1. Compiling With the NCURSES - Library</a></h3> - - <p>To use ncurses library functions, you have to include - ncurses.h in your programs. To link the program with - ncurses the flag -lncurses should be added.</p> - <pre class="PROGRAMLISTING"> - #include <ncurses.h> - . - . - . - - compile and link: gcc <program file> -lncurses -</pre> - - <div class="EXAMPLE"> - <a name="BHW" id="BHW"></a> - - <p><b>Example 1. The Hello World !!! Program</b></p> - <pre class="PROGRAMLISTING"> -<span class="INLINEMEDIAOBJECT">#include <ncurses.h> - -int main() -{ - initscr(); /* Start curses mode */ - printw("Hello World !!!"); /* Print Hello World */ - refresh(); /* Print it on to the real screen */ - getch(); /* Wait for user input */ - endwin(); /* End curses mode */ - - return 0; -}</span> -</pre> - </div> - </div> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="DISSECTION" id="DISSECTION">2.2. - Dissection</a></h3> - - <p>The above program prints "Hello World !!!" to the screen - and exits. This program shows how to initialize curses and - do screen manipulation and end curses mode. Let's dissect - it line by line.</p> - - <div class="SECT3"> - <hr> - - <h4 class="SECT3"><a name="ABOUT-INITSCR" id= - "ABOUT-INITSCR">2.2.1. About initscr()</a></h4> - - <p>The function initscr() initializes the terminal in - curses mode. In some implementations, it clears the - screen and presents a blank screen. To do any screen - manipulation using curses package this has to be called - first. This function initializes the curses system and - allocates memory for our present window (called - <tt class="LITERAL">stdscr</tt>) and some other - data-structures. Under extreme cases this function might - fail due to insufficient memory to allocate memory for - curses library's data structures.</p> - - <p>After this is done, we can do a variety of - initializations to customize our curses settings. These - details will be explained <a href="#INIT">later</a> .</p> - </div> - - <div class="SECT3"> - <hr> - - <h4 class="SECT3"><a name="MYST-REFRESH" id= - "MYST-REFRESH">2.2.2. The mysterious refresh()</a></h4> - - <p>The next line printw prints the string "Hello World - !!!" on to the screen. This function is analogous to - normal printf in all respects except that it prints the - data on a window called stdscr at the current (y,x) - co-ordinates. Since our present co-ordinates are at 0,0 - the string is printed at the left hand corner of the - window.</p> - - <p>This brings us to that mysterious refresh(). Well, - when we called printw the data is actually written to an - imaginary window, which is not updated on the screen yet. - The job of printw is to update a few flags and data - structures and write the data to a buffer corresponding - to stdscr. In order to show it on the screen, we need to - call refresh() and tell the curses system to dump the - contents on the screen.</p> - - <p>The philosophy behind all this is to allow the - programmer to do multiple updates on the imaginary screen - or windows and do a refresh once all his screen update is - done. refresh() checks the window and updates only the - portion which has been changed. This improves performance - and offers greater flexibility too. But, it is sometimes - frustrating to beginners. A common mistake committed by - beginners is to forget to call refresh() after they did - some update through printw() class of functions. I still - forget to add it sometimes :-)</p> - </div> - - <div class="SECT3"> - <hr> - - <h4 class="SECT3"><a name="ABOUT-ENDWIN" id= - "ABOUT-ENDWIN">2.2.3. About endwin()</a></h4> - - <p>And finally don't forget to end the curses mode. - Otherwise your terminal might behave strangely after the - program quits. endwin() frees the memory taken by curses - sub-system and its data structures and puts the terminal - in normal mode. This function must be called after you - are done with the curses mode.</p> - </div> - </div> - </div> - - <div class="SECT1"> - <hr> - - <h2 class="SECT1"><a name="GORY" id="GORY">3. The Gory - Details</a></h2> - - <p>Now that we have seen how to write a simple curses program - let's get into the details. There are many functions that - help customize what you see on screen and many features which - can be put to full use.</p> - - <p>Here we go...</p> - </div> - - <div class="SECT1"> - <hr> - - <h2 class="SECT1"><a name="INIT" id="INIT">4. - Initialization</a></h2> - - <p>We now know that to initialize curses system the function - initscr() has to be called. There are functions which can be - called after this initialization to customize our curses - session. We may ask the curses system to set the terminal in - raw mode or initialize color or initialize the mouse etc.. - Let's discuss some of the functions that are normally called - immediately after initscr();</p> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="ABOUTINIT" id="ABOUTINIT">4.1. - Initialization functions</a></h3> - </div> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="RAWCBREAK" id="RAWCBREAK">4.2. - raw() and cbreak()</a></h3> - - <p>Normally the terminal driver buffers the characters a - user types until a new line or carriage return is - encountered. But most programs require that the characters - be available as soon as the user types them. The above two - functions are used to disable line buffering. The - difference between these two functions is in the way - control characters like suspend (CTRL-Z), interrupt and - quit (CTRL-C) are passed to the program. In the raw() mode - these characters are directly passed to the program without - generating a signal. In the <tt class= - "LITERAL">cbreak()</tt> mode these control characters are - interpreted as any other character by the terminal driver. - I personally prefer to use raw() as I can exercise greater - control over what the user does.</p> - </div> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="ECHONOECHO" id="ECHONOECHO">4.3. - echo() and noecho()</a></h3> - - <p>These functions control the echoing of characters typed - by the user to the terminal. <tt class= - "LITERAL">noecho()</tt> switches off echoing. The reason - you might want to do this is to gain more control over - echoing or to suppress unnecessary echoing while taking - input from the user through the getch() etc. functions. - Most of the interactive programs call <tt class= - "LITERAL">noecho()</tt> at initialization and do the - echoing of characters in a controlled manner. It gives the - programmer the flexibility of echoing characters at any - place in the window without updating current (y,x) - co-ordinates.</p> - </div> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="KEYPAD" id="KEYPAD">4.4. - keypad()</a></h3> - - <p>This is my favorite initialization function. It enables - the reading of function keys like F1, F2, arrow keys etc. - Almost every interactive program enables this, as arrow - keys are a major part of any User Interface. Do <tt class= - "LITERAL">keypad(stdscr, TRUE)</tt> to enable this feature - for the regular screen (stdscr). You will learn more about - key management in later sections of this document.</p> - </div> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="HALFDELAY" id="HALFDELAY">4.5. - halfdelay()</a></h3> - - <p>This function, though not used very often, is a useful - one at times. halfdelay()is called to enable the half-delay - mode, which is similar to the cbreak() mode in that - characters typed are immediately available to program. - However, it waits for 'X' tenths of a second for input and - then returns ERR, if no input is available. 'X' is the - timeout value passed to the function halfdelay(). This - function is useful when you want to ask the user for input, - and if he doesn't respond with in certain time, we can do - some thing else. One possible example is a timeout at the - password prompt.</p> - </div> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="MISCINIT" id="MISCINIT">4.6. - Miscellaneous Initialization functions</a></h3> - - <p>There are few more functions which are called at - initialization to customize curses behavior. They are not - used as extensively as those mentioned above. Some of them - are explained where appropriate.</p> - </div> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="INITEX" id="INITEX">4.7. An - Example</a></h3> - - <p>Let's write a program which will clarify the usage of - these functions.</p> - - <div class="EXAMPLE"> - <a name="BINFU" id="BINFU"></a> - - <p><b>Example 2. Initialization Function Usage - example</b></p> - <pre class="PROGRAMLISTING"> -<span class="INLINEMEDIAOBJECT">#include <ncurses.h> - -int main() -{ int ch; - - initscr(); /* Start curses mode */ - raw(); /* Line buffering disabled */ - keypad(stdscr, TRUE); /* We get F1, F2 etc.. */ - noecho(); /* Don't echo() while we do getch */ - - printw("Type any character to see it in bold\n"); - ch = getch(); /* If raw() hadn't been called - * we have to press enter before it - * gets to the program */ - if(ch == KEY_F(1)) /* Without keypad enabled this will */ - printw("F1 Key pressed");/* not get to us either */ - /* Without noecho() some ugly escape - * charachters might have been printed - * on screen */ - else - { printw("The pressed key is "); - attron(A_BOLD); - printw("%c", ch); - attroff(A_BOLD); - } - refresh(); /* Print it on to the real screen */ - getch(); /* Wait for user input */ - endwin(); /* End curses mode */ - - return 0; -}</span> -</pre> - </div> - - <p>This program is self-explanatory. But I used functions - which aren't explained yet. The function <tt class= - "LITERAL">getch()</tt> is used to get a character from - user. It is equivalent to normal <tt class= - "LITERAL">getchar()</tt> except that we can disable the - line buffering to avoid <enter> after input. Look for - more about <tt class="LITERAL">getch()</tt>and reading keys - in the <a href="#KEYS">key management section</a> . The - functions attron and attroff are used to switch some - attributes on and off respectively. In the example I used - them to print the character in bold. These functions are - explained in detail later.</p> - </div> - </div> - - <div class="SECT1"> - <hr> - - <h2 class="SECT1"><a name="AWORDWINDOWS" id="AWORDWINDOWS">5. - A Word about Windows</a></h2> - - <p>Before we plunge into the myriad ncurses functions, let me - clear few things about windows. Windows are explained in - detail in following <a href="#WINDOWS">sections</a></p> - - <p>A Window is an imaginary screen defined by curses system. - A window does not mean a bordered window which you usually - see on Win9X platforms. When curses is initialized, it - creates a default window named <tt class= - "LITERAL">stdscr</tt> which represents your 80x25 (or the - size of window in which you are running) screen. If you are - doing simple tasks like printing few strings, reading input - etc., you can safely use this single window for all of your - purposes. You can also create windows and call functions - which explicitly work on the specified window.</p> - - <p>For example, if you call</p> - <pre class="PROGRAMLISTING"> - printw("Hi There !!!"); - refresh(); -</pre> - - <p>It prints the string on stdscr at the present cursor - position. Similarly the call to refresh(), works on stdscr - only.</p> - - <p>Say you have created <a href="#WINDOWS">windows</a> then - you have to call a function with a 'w' added to the usual - function.</p> - <pre class="PROGRAMLISTING"> - wprintw(win, "Hi There !!!"); - wrefresh(win); -</pre> - - <p>As you will see in the rest of the document, naming of - functions follow the same convention. For each function there - usually are three more functions.</p> - <pre class="PROGRAMLISTING"> - printw(string); /* Print on stdscr at present cursor position */ - mvprintw(y, x, string);/* Move to (y, x) then print string */ - wprintw(win, string); /* Print on window win at present cursor position */ - /* in the window */ - mvwprintw(win, y, x, string); /* Move to (y, x) relative to window */ - /* co-ordinates and then print */ -</pre> - - <p>Usually the w-less functions are macros which expand to - corresponding w-function with stdscr as the window - parameter.</p> - </div> - - <div class="SECT1"> - <hr> - - <h2 class="SECT1"><a name="PRINTW" id="PRINTW">6. Output - functions</a></h2> - - <p>I guess you can't wait any more to see some action. Back - to our odyssey of curses functions. Now that curses is - initialized, let's interact with world.</p> - - <p>There are three classes of functions which you can use to - do output on screen.</p> - - <ol type="1"> - <li> - <p>addch() class: Print single character with - attributes</p> - </li> - - <li> - <p>printw() class: Print formatted output similar to - printf()</p> - </li> - - <li> - <p>addstr() class: Print strings</p> - </li> - </ol> - - <p>These functions can be used interchangeably and it's a - matter of style as to which class is used. Let's see each one - in detail.</p> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="ADDCHCLASS" id="ADDCHCLASS">6.1. - addch() class of functions</a></h3> - - <p>These functions put a single character into the current - cursor location and advance the position of the cursor. You - can give the character to be printed but they usually are - used to print a character with some attributes. Attributes - are explained in detail in later <a href= - "#ATTRIB">sections</a> of the document. If a character is - associated with an attribute(bold, reverse video etc.), - when curses prints the character, it is printed in that - attribute.</p> - - <p>In order to combine a character with some attributes, - you have two options:</p> - - <ul> - <li> - <p>By OR'ing a single character with the desired - attribute macros. These attribute macros could be found - in the header file <tt class="LITERAL">ncurses.h</tt>. - For example, you want to print a character ch(of type - char) bold and underlined, you would call addch() as - below.</p> - <pre class="PROGRAMLISTING"> - addch(ch | A_BOLD | A_UNDERLINE); -</pre> - </li> - - <li> - <p>By using functions like <tt class= - "LITERAL">attrset(),attron(),attroff()</tt>. These - functions are explained in the <a href= - "#ATTRIB">Attributes</a> section. Briefly, they - manipulate the current attributes of the given window. - Once set, the character printed in the window are - associated with the attributes until it is turned - off.</p> - </li> - </ul> - - <p>Additionally, <tt class="LITERAL">curses</tt> provides - some special characters for character-based graphics. You - can draw tables, horizontal or vertical lines, etc. You can - find all avaliable characters in the header file <tt class= - "LITERAL">ncurses.h</tt>. Try looking for macros beginning - with <tt class="LITERAL">ACS_</tt> in this file.</p> - </div> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="AEN298" id="AEN298">6.2. - mvaddch(), waddch() and mvwaddch()</a></h3> - - <p><tt class="LITERAL">mvaddch()</tt> is used to move the - cursor to a given point, and then print. Thus, the - calls:</p> - <pre class="PROGRAMLISTING"> - move(row,col); /* moves the cursor to row<span class= -"emphasis"><i class= -"EMPHASIS">th</i></span> row and col<span class="emphasis"><i class="EMPHASIS">th</i></span> column */ - addch(ch); -</pre>can be replaced by - <pre class="PROGRAMLISTING"> - mvaddch(row,col,ch); -</pre> - - <p><tt class="LITERAL">waddch()</tt> is similar to - <tt class="LITERAL">addch()</tt>, except that it adds a - character into the given window. (Note that <tt class= - "LITERAL">addch()</tt> adds a character into the window - <tt class="LITERAL">stdscr</tt>.)</p> - - <p>In a similar fashion <tt class="LITERAL">mvwaddch()</tt> - function is used to add a character into the given window - at the given coordinates.</p> - - <p>Now, we are familiar with the basic output function - <tt class="LITERAL">addch()</tt>. But, if we want to print - a string, it would be very annoying to print it character - by character. Fortunately, <tt class="LITERAL">ncurses</tt> - provides <tt class="LITERAL">printf</tt><span class= - "emphasis"><i class="EMPHASIS">-like</i></span> or - <tt class="LITERAL">puts</tt><span class= - "emphasis"><i class="EMPHASIS">-like</i></span> - functions.</p> - </div> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="PRINTWCLASS" id= - "PRINTWCLASS">6.3. printw() class of functions</a></h3> - - <p>These functions are similar to <tt class= - "LITERAL">printf()</tt> with the added capability of - printing at any position on the screen.</p> - - <div class="SECT3"> - <hr> - - <h4 class="SECT3"><a name="PRINTWMVPRINTW" id= - "PRINTWMVPRINTW">6.3.1. printw() and mvprintw</a></h4> - - <p>These two functions work much like <tt class= - "LITERAL">printf()</tt>. <tt class= - "LITERAL">mvprintw()</tt> can be used to move the cursor - to a position and then print. If you want to move the - cursor first and then print using <tt class= - "LITERAL">printw()</tt> function, use <tt class= - "LITERAL">move()</tt> first and then use <tt class= - "LITERAL">printw()</tt> though I see no point why one - should avoid using <tt class="LITERAL">mvprintw()</tt>, - you have the flexibility to manipulate.</p> - </div> - - <div class="SECT3"> - <hr> - - <h4 class="SECT3"><a name="WPRINTWMVWPRINTW" id= - "WPRINTWMVWPRINTW">6.3.2. wprintw() and - mvwprintw</a></h4> - - <p>These two functions are similar to above two except - that they print in the corresponding window given as - argument.</p> - </div> - - <div class="SECT3"> - <hr> - - <h4 class="SECT3"><a name="VWPRINTW" id="VWPRINTW">6.3.3. - vw_printw()</a></h4> - - <p>This function is similar to <tt class= - "LITERAL">vprintf()</tt>. This can be used when variable - number of arguments are to be printed.</p> - </div> - - <div class="SECT3"> - <hr> - - <h4 class="SECT3"><a name="SIMPLEPRINTWEX" id= - "SIMPLEPRINTWEX">6.3.4. A Simple printw example</a></h4> - - <div class="EXAMPLE"> - <a name="BPREX" id="BPREX"></a> - - <p><b>Example 3. A Simple printw example</b></p> - <pre class="PROGRAMLISTING"> -<span class= -"INLINEMEDIAOBJECT">#include <ncurses.h> /* ncurses.h includes stdio.h */ -#include <string.h> - -int main() -{ - char mesg[]="Just a string"; /* message to be appeared on the screen */ - int row,col; /* to store the number of rows and * - * the number of colums of the screen */ - initscr(); /* start the curses mode */ - getmaxyx(stdscr,row,col); /* get the number of rows and columns */ - mvprintw(row/2,(col-strlen(mesg))/2,"%s",mesg); - /* print the message at the center of the screen */ - mvprintw(row-2,0,"This screen has %d rows and %d columns\n",row,col); - printw("Try resizing your window(if possible) and then run this program again"); - refresh(); - getch(); - endwin(); - - return 0; -}</span> -</pre> - </div> - - <p>Above program demonstrates how easy it is to use - <tt class="LITERAL">printw</tt>. You just feed the - coordinates and the message to be appeared on the screen, - then it does what you want.</p> - - <p>The above program introduces us to a new function - <tt class="LITERAL">getmaxyx()</tt>, a macro defined in - <tt class="LITERAL">ncurses.h</tt>. It gives the number - of columns and the number of rows in a given window. - <tt class="LITERAL">getmaxyx()</tt> does this by updating - the variables given to it. Since <tt class= - "LITERAL">getmaxyx()</tt> is not a function we don't pass - pointers to it, we just give two integer variables.</p> - </div> - </div> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="ADDSTRCLASS" id= - "ADDSTRCLASS">6.4. addstr() class of functions</a></h3> - - <p><tt class="LITERAL">addstr()</tt> is used to put a - character string into a given window. This function is - similar to calling <tt class="LITERAL">addch()</tt> once - for each character in a given string. This is true for all - output functions. There are other functions from this - family such as <tt class= - "LITERAL">mvaddstr(),mvwaddstr()</tt> and <tt class= - "LITERAL">waddstr()</tt>, which obey the naming convention - of curses.(e.g. mvaddstr() is similar to the respective - calls move() and then addstr().) Another function of this - family is addnstr(), which takes an integer parameter(say - n) additionally. This function puts at most n characters - into the screen. If n is negative, then the entire string - will be added.</p> - </div> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="ACAUTION" id="ACAUTION">6.5. A - word of caution</a></h3> - - <p>All these functions take y co-ordinate first and then x - in their arguments. A common mistake by beginners is to - pass x,y in that order. If you are doing too many - manipulations of (y,x) co-ordinates, think of dividing the - screen into windows and manipulate each one separately. - Windows are explained in the <a href="#WINDOWS">windows</a> - section.</p> - </div> - </div> - - <div class="SECT1"> - <hr> - - <h2 class="SECT1"><a name="SCANW" id="SCANW">7. Input - functions</a></h2> - - <p>Well, printing without taking input, is boring. Let's see - functions which allow us to get input from user. These - functions also can be divided into three categories.</p> - - <ol type="1"> - <li> - <p>getch() class: Get a character</p> - </li> - - <li> - <p>scanw() class: Get formatted input</p> - </li> - - <li> - <p>getstr() class: Get strings</p> - </li> - </ol> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="GETCHCLASS" id="GETCHCLASS">7.1. - getch() class of functions</a></h3> - - <p>These functions read a single character from the - terminal. But there are several subtle facts to consider. - For example if you don't use the function cbreak(), curses - will not read your input characters contiguously but will - begin read them only after a new line or an EOF is - encountered. In order to avoid this, the cbreak() function - must used so that characters are immediately available to - your program. Another widely used function is noecho(). As - the name suggests, when this function is set (used), the - characters that are keyed in by the user will not show up - on the screen. The two functions cbreak() and noecho() are - typical examples of key management. Functions of this genre - are explained in the <a href="#KEYS">key management - section</a> .</p> - </div> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="SCANWCLASS" id="SCANWCLASS">7.2. - scanw() class of functions</a></h3> - - <p>These functions are similar to <tt class= - "LITERAL">scanf()</tt> with the added capability of getting - the input from any location on the screen.</p> - - <div class="SECT3"> - <hr> - - <h4 class="SECT3"><a name="SCANWMVSCANW" id= - "SCANWMVSCANW">7.2.1. scanw() and mvscanw</a></h4> - - <p>The usage of these functions is similar to that of - <tt class="LITERAL">sscanf()</tt>, where the line to be - scanned is provided by <tt class="LITERAL">wgetstr()</tt> - function. That is, these functions call to <tt class= - "LITERAL">wgetstr()</tt> function(explained below) and - uses the resulting line for a scan.</p> - </div> - - <div class="SECT3"> - <hr> - - <h4 class="SECT3"><a name="WSCANWMVWSCANW" id= - "WSCANWMVWSCANW">7.2.2. wscanw() and mvwscanw()</a></h4> - - <p>These are similar to above two functions except that - they read from a window, which is supplied as one of the - arguments to these functions.</p> - </div> - - <div class="SECT3"> - <hr> - - <h4 class="SECT3"><a name="VWSCANW" id="VWSCANW">7.2.3. - vw_scanw()</a></h4> - - <p>This function is similar to <tt class= - "LITERAL">vscanf()</tt>. This can be used when a variable - number of arguments are to be scanned.</p> - </div> - </div> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="GETSTRCLASS" id= - "GETSTRCLASS">7.3. getstr() class of functions</a></h3> - - <p>These functions are used to get strings from the - terminal. In essence, this function performs the same task - as would be achieved by a series of calls to <tt class= - "LITERAL">getch()</tt> until a newline, carriage return, or - end-of-file is received. The resulting string of characters - are pointed to by <tt class="LITERAL">str</tt>, which is a - character pointer provided by the user.</p> - </div> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="GETSTREX" id="GETSTREX">7.4. - Some examples</a></h3> - - <div class="EXAMPLE"> - <a name="BSCEX" id="BSCEX"></a> - - <p><b>Example 4. A Simple scanw example</b></p> - <pre class="PROGRAMLISTING"> -<span class= -"INLINEMEDIAOBJECT">#include <ncurses.h> /* ncurses.h includes stdio.h */ -#include <string.h> - -int main() -{ - char mesg[]="Enter a string: "; /* message to be appeared on the screen */ - char str[80]; - int row,col; /* to store the number of rows and * - * the number of colums of the screen */ - initscr(); /* start the curses mode */ - getmaxyx(stdscr,row,col); /* get the number of rows and columns */ - mvprintw(row/2,(col-strlen(mesg))/2,"%s",mesg); - /* print the message at the center of the screen */ - getstr(str); - mvprintw(LINES - 2, 0, "You Entered: %s", str); - getch(); - endwin(); - - return 0; -}</span> -</pre> - </div> - </div> - </div> - - <div class="SECT1"> - <hr> - - <h2 class="SECT1"><a name="ATTRIB" id="ATTRIB">8. - Attributes</a></h2> - - <p>We have seen an example of how attributes can be used to - print characters with some special effects. Attributes, when - set prudently, can present information in an easy, - understandable manner. The following program takes a C file - as input and prints the file with comments in bold. Scan - through the code.</p> - - <div class="EXAMPLE"> - <a name="BSIAT" id="BSIAT"></a> - - <p><b>Example 5. A Simple Attributes example</b></p> - <pre class="PROGRAMLISTING"> -<span class= -"INLINEMEDIAOBJECT">/* pager functionality by Joseph Spainhour" <spainhou@bellsouth.net> */ -#include <ncurses.h> -#include <stdlib.h> - -int main(int argc, char *argv[]) -{ - int ch, prev, row, col; - prev = EOF; - FILE *fp; - int y, x; - - if(argc != 2) - { - printf("Usage: %s <a c file name>\n", argv[0]); - exit(1); - } - fp = fopen(argv[1], "r"); - if(fp == NULL) - { - perror("Cannot open input file"); - exit(1); - } - initscr(); /* Start curses mode */ - getmaxyx(stdscr, row, col); /* find the boundaries of the screeen */ - while((ch = fgetc(fp)) != EOF) /* read the file till we reach the end */ - { - getyx(stdscr, y, x); /* get the current curser position */ - if(y == (row - 1)) /* are we are at the end of the screen */ - { - printw("<-Press Any Key->"); /* tell the user to press a key */ - getch(); - clear(); /* clear the screen */ - move(0, 0); /* start at the beginning of the screen */ - } - if(prev == '/' && ch == '*') /* If it is / and * then only - * switch bold on */ - { - attron(A_BOLD); /* cut bold on */ - getyx(stdscr, y, x); /* get the current curser position */ - move(y, x - 1); /* back up one space */ - printw("%c%c", '/', ch); /* The actual printing is done here */ - } - else - printw("%c", ch); - refresh(); - if(prev == '*' && ch == '/') - attroff(A_BOLD); /* Switch it off once we got * - * and then / */ - prev = ch; - } - endwin(); /* End curses mode */ - fclose(fp); - return 0; -}</span> -</pre> - </div> - - <p>Don't worry about all those initialization and other crap. - Concentrate on the while loop. It reads each character in the - file and searches for the pattern /*. Once it spots the - pattern, it switches the BOLD attribute on with <tt class= - "LITERAL">attron()</tt> . When we get the pattern */ it is - switched off by <tt class="LITERAL">attroff()</tt> .</p> - - <p>The above program also introduces us to two useful - functions <tt class="LITERAL">getyx()</tt> and <tt class= - "LITERAL">move()</tt>. The first function gets the - co-ordinates of the present cursor into the variables y, x. - Since getyx() is a macro we don't have to pass pointers to - variables. The function <tt class="LITERAL">move()</tt> moves - the cursor to the co-ordinates given to it.</p> - - <p>The above program is really a simple one which doesn't do - much. On these lines one could write a more useful program - which reads a C file, parses it and prints it in different - colors. One could even extend it to other languages as - well.</p> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="ATTRIBDETAILS" id= - "ATTRIBDETAILS">8.1. The details</a></h3> - - <p>Let's get into more details of attributes. The functions - <tt class="LITERAL">attron(), attroff(), attrset()</tt> , - and their sister functions <tt class= - "LITERAL">attr_get()</tt> etc.. can be used to switch - attributes on/off , get attributes and produce a colorful - display.</p> - - <p>The functions attron and attroff take a bit-mask of - attributes and switch them on or off, respectively. The - following video attributes, which are defined in - <curses.h> can be passed to these functions.</p> - <pre class="PROGRAMLISTING"> - - A_NORMAL Normal display (no highlight) - A_STANDOUT Best highlighting mode of the terminal. - A_UNDERLINE Underlining - A_REVERSE Reverse video - A_BLINK Blinking - A_DIM Half bright - A_BOLD Extra bright or bold - A_PROTECT Protected mode - A_INVIS Invisible or blank mode - A_ALTCHARSET Alternate character set - A_CHARTEXT Bit-mask to extract a character - COLOR_PAIR(n) Color-pair number n - -</pre> - - <p>The last one is the most colorful one :-) Colors are - explained in the <a href="#color" target="_top">next - sections</a>.</p> - - <p>We can OR(|) any number of above attributes to get a - combined effect. If you wanted reverse video with blinking - characters you can use</p> - <pre class="PROGRAMLISTING"> - attron(A_REVERSE | A_BLINK); -</pre> - </div> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="ATTRONVSATTRSET" id= - "ATTRONVSATTRSET">8.2. attron() vs attrset()</a></h3> - - <p>Then what is the difference between attron() and - attrset()? attrset sets the attributes of window whereas - attron just switches on the attribute given to it. So - attrset() fully overrides whatever attributes the window - previously had and sets it to the new attribute(s). - Similarly attroff() just switches off the attribute(s) - given to it as an argument. This gives us the flexibility - of managing attributes easily.But if you use them - carelessly you may loose track of what attributes the - window has and garble the display. This is especially true - while managing menus with colors and highlighting. So - decide on a consistent policy and stick to it. You can - always use <tt class="LITERAL">standend()</tt> which is - equivalent to <tt class="LITERAL">attrset(A_NORMAL)</tt> - which turns off all attributes and brings you to normal - mode.</p> - </div> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="ATTRGET" id="ATTRGET">8.3. - attr_get()</a></h3> - - <p>The function attr_get() gets the current attributes and - color pair of the window. Though we might not use this as - often as the above functions, this is useful in scanning - areas of screen. Say we wanted to do some complex update on - screen and we are not sure what attribute each character is - associated with. Then this function can be used with either - attrset or attron to produce the desired effect.</p> - </div> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="ATTRFUNCS" id="ATTRFUNCS">8.4. - attr_ functions</a></h3> - - <p>There are series of functions like attr_set(), attr_on - etc.. These are similar to above functions except that they - take parameters of type <tt class= - "LITERAL">attr_t</tt>.</p> - </div> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="WATTRFUNCS" id="WATTRFUNCS">8.5. - wattr functions</a></h3> - - <p>For each of the above functions we have a corresponding - function with 'w' which operates on a particular window. - The above functions operate on stdscr.</p> - </div> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="CHGAT" id="CHGAT">8.6. chgat() - functions</a></h3> - - <p>The function chgat() is listed in the end of the man - page curs_attr. It actually is a useful one. This function - can be used to set attributes for a group of characters - without moving. I mean it !!! without moving the cursor :-) - It changes the attributes of a given number of characters - starting at the current cursor location.</p> - - <p>We can give -1 as the character count to update till end - of line. If you want to change attributes of characters - from current position to end of line, just use this.</p> - <pre class="PROGRAMLISTING"> - chgat(-1, A_REVERSE, 0, NULL); -</pre> - - <p>This function is useful when changing attributes for - characters that are already on the screen. Move to the - character from which you want to change and change the - attribute.</p> - - <p>Other functions wchgat(), mvchgat(), wchgat() behave - similarly except that the w functions operate on the - particular window. The mv functions first move the cursor - then perform the work given to them. Actually chgat is a - macro which is replaced by a wchgat() with stdscr as the - window. Most of the "w-less" functions are macros.</p> - - <div class="EXAMPLE"> - <a name="BWICH" id="BWICH"></a> - - <p><b>Example 6. Chgat() Usage example</b></p> - <pre class="PROGRAMLISTING"> -<span class="INLINEMEDIAOBJECT">#include <ncurses.h> - -int main(int argc, char *argv[]) -{ initscr(); /* Start curses mode */ - start_color(); /* Start color functionality */ - - init_pair(1, COLOR_CYAN, COLOR_BLACK); - printw("A Big string which i didn't care to type fully "); - mvchgat(0, 0, -1, A_BLINK, 1, NULL); - /* - * First two parameters specify the position at which to start - * Third parameter number of characters to update. -1 means till - * end of line - * Forth parameter is the normal attribute you wanted to give - * to the charcter - * Fifth is the color index. It is the index given during init_pair() - * use 0 if you didn't want color - * Sixth one is always NULL - */ - refresh(); - getch(); - endwin(); /* End curses mode */ - return 0; -}</span> -</pre> - </div> - - <p>This example also introduces us to the color world of - curses. Colors will be explained in detail later. Use 0 for - no color.</p> - </div> - </div> - - <div class="SECT1"> - <hr> - - <h2 class="SECT1"><a name="WINDOWS" id="WINDOWS">9. - Windows</a></h2> - - <p>Windows form the most important concept in curses. You - have seen the standard window stdscr above where all the - functions implicitly operated on this window. Now to make - design even a simplest GUI, you need to resort to windows. - The main reason you may want to use windows is to manipulate - parts of the screen separately, for better efficiency, by - updating only the windows that need to be changed and for a - better design. I would say the last reason is the most - important in going for windows. You should always strive for - a better and easy-to-manage design in your programs. If you - are writing big, complex GUIs this is of pivotal importance - before you start doing anything.</p> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="WINDOWBASICS" id= - "WINDOWBASICS">9.1. The basics</a></h3> - - <p>A Window can be created by calling the function - <tt class="LITERAL">newwin()</tt>. It doesn't create any - thing on the screen actually. It allocates memory for a - structure to manipulate the window and updates the - structure with data regarding the window like it's size, - beginy, beginx etc.. Hence in curses, a window is just an - abstraction of an imaginary window, which can be - manipulated independent of other parts of screen. The - function newwin() returns a pointer to structure WINDOW, - which can be passed to window related functions like - wprintw() etc.. Finally the window can be destroyed with - delwin(). It will deallocate the memory associated with the - window structure.</p> - </div> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="LETBEWINDOW" id= - "LETBEWINDOW">9.2. Let there be a Window !!!</a></h3> - - <p>What fun is it, if a window is created and we can't see - it. So the fun part begins by displaying the window. The - function <tt class="LITERAL">box()</tt> can be used to draw - a border around the window. Let's explore these functions - in more detail in this example.</p> - - <div class="EXAMPLE"> - <a name="BWIBO" id="BWIBO"></a> - - <p><b>Example 7. Window Border example</b></p> - <pre class="PROGRAMLISTING"> -<span class="INLINEMEDIAOBJECT">#include <ncurses.h> - - -WINDOW *create_newwin(int height, int width, int starty, int startx); -void destroy_win(WINDOW *local_win); - -int main(int argc, char *argv[]) -{ WINDOW *my_win; - int startx, starty, width, height; - int ch; - - initscr(); /* Start curses mode */ - cbreak(); /* Line buffering disabled, Pass on - * everty thing to me */ - keypad(stdscr, TRUE); /* I need that nifty F1 */ - - height = 3; - width = 10; - starty = (LINES - height) / 2; /* Calculating for a center placement */ - startx = (COLS - width) / 2; /* of the window */ - printw("Press F1 to exit"); - refresh(); - my_win = create_newwin(height, width, starty, startx); - - while((ch = getch()) != KEY_F(1)) - { switch(ch) - { case KEY_LEFT: - destroy_win(my_win); - my_win = create_newwin(height, width, starty,--startx); - break; - case KEY_RIGHT: - destroy_win(my_win); - my_win = create_newwin(height, width, starty,++startx); - break; - case KEY_UP: - destroy_win(my_win); - my_win = create_newwin(height, width, --starty,startx); - break; - case KEY_DOWN: - destroy_win(my_win); - my_win = create_newwin(height, width, ++starty,startx); - break; - } - } - - endwin(); /* End curses mode */ - return 0; -} - -WINDOW *create_newwin(int height, int width, int starty, int startx) -{ WINDOW *local_win; - - local_win = newwin(height, width, starty, startx); - box(local_win, 0 , 0); /* 0, 0 gives default characters - * for the vertical and horizontal - * lines */ - wrefresh(local_win); /* Show that box */ - - return local_win; -} - -void destroy_win(WINDOW *local_win) -{ - /* box(local_win, ' ', ' '); : This won't produce the desired - * result of erasing the window. It will leave it's four corners - * and so an ugly remnant of window. - */ - wborder(local_win, ' ', ' ', ' ',' ',' ',' ',' ',' '); - /* The parameters taken are - * 1. win: the window on which to operate - * 2. ls: character to be used for the left side of the window - * 3. rs: character to be used for the right side of the window - * 4. ts: character to be used for the top side of the window - * 5. bs: character to be used for the bottom side of the window - * 6. tl: character to be used for the top left corner of the window - * 7. tr: character to be used for the top right corner of the window - * 8. bl: character to be used for the bottom left corner of the window - * 9. br: character to be used for the bottom right corner of the window - */ - wrefresh(local_win); - delwin(local_win); -}</span> -</pre> - </div> - </div> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="BORDEREXEXPL" id= - "BORDEREXEXPL">9.3. Explanation</a></h3> - - <p>Don't scream. I know it's a big example. But I have to - explain some important things here :-). This program - creates a rectangular window that can be moved with left, - right, up, down arrow keys. It repeatedly creates and - destroys windows as user press a key. Don't go beyond the - screen limits. Checking for those limits is left as an - exercise for the reader. Let's dissect it by line by - line.</p> - - <p>The <tt class="LITERAL">create_newwin()</tt> function - creates a window with <tt class="LITERAL">newwin()</tt> and - displays a border around it with box. The function - <tt class="LITERAL">destroy_win()</tt> first erases the - window from screen by painting a border with ' ' character - and then calling <tt class="LITERAL">delwin()</tt> to - deallocate memory related to it. Depending on the key the - user presses, starty or startx is changed and a new window - is created.</p> - - <p>In the destroy_win, as you can see, I used wborder - instead of box. The reason is written in the comments (You - missed it. I know. Read the code :-)). wborder draws a - border around the window with the characters given to it as - the 4 corner points and the 4 lines. To put it clearly, if - you have called wborder as below:</p> - <pre class="PROGRAMLISTING"> - wborder(win, '|', '|', '-', '-', '+', '+', '+', '+'); -</pre> - - <p>it produces some thing like</p> - <pre class="PROGRAMLISTING"> - +------------+ - | | - | | - | | - | | - | | - | | - +------------+ -</pre> - </div> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="OTHERSTUFF" id="OTHERSTUFF">9.4. - The other stuff in the example</a></h3> - - <p>You can also see in the above examples, that I have used - the variables COLS, LINES which are initialized to the - screen sizes after initscr(). They can be useful in finding - screen dimensions and finding the center co-ordinate of the - screen as above. The function <tt class= - "LITERAL">getch()</tt> as usual gets the key from keyboard - and according to the key it does the corresponding work. - This type of switch- case is very common in any GUI based - programs.</p> - </div> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="OTHERBORDERFUNCS" id= - "OTHERBORDERFUNCS">9.5. Other Border functions</a></h3> - - <p>Above program is grossly inefficient in that with each - press of a key, a window is destroyed and another is - created. So let's write a more efficient program which uses - other border related functions.</p> - - <p>The following program uses <tt class= - "LITERAL">mvhline()</tt> and <tt class= - "LITERAL">mvvline()</tt> to achieve similar effect. These - two functions are simple. They create a horizontal or - vertical line of the specified length at the specified - position.</p> - - <div class="EXAMPLE"> - <a name="BOTBO" id="BOTBO"></a> - - <p><b>Example 8. More border functions</b></p> - <pre class="PROGRAMLISTING"> -<span class="INLINEMEDIAOBJECT">#include <ncurses.h> - -typedef struct _win_border_struct { - chtype ls, rs, ts, bs, - tl, tr, bl, br; -}WIN_BORDER; - -typedef struct _WIN_struct { - - int startx, starty; - int height, width; - WIN_BORDER border; -}WIN; - -void init_win_params(WIN *p_win); -void print_win_params(WIN *p_win); -void create_box(WIN *win, bool flag); - -int main(int argc, char *argv[]) -{ WIN win; - int ch; - - initscr(); /* Start curses mode */ - start_color(); /* Start the color functionality */ - cbreak(); /* Line buffering disabled, Pass on - * everty thing to me */ - keypad(stdscr, TRUE); /* I need that nifty F1 */ - noecho(); - init_pair(1, COLOR_CYAN, COLOR_BLACK); - - /* Initialize the window parameters */ - init_win_params(&win); - print_win_params(&win); - - attron(COLOR_PAIR(1)); - printw("Press F1 to exit"); - refresh(); - attroff(COLOR_PAIR(1)); - - create_box(&win, TRUE); - while((ch = getch()) != KEY_F(1)) - { switch(ch) - { case KEY_LEFT: - create_box(&win, FALSE); - --win.startx; - create_box(&win, TRUE); - break; - case KEY_RIGHT: - create_box(&win, FALSE); - ++win.startx; - create_box(&win, TRUE); - break; - case KEY_UP: - create_box(&win, FALSE); - --win.starty; - create_box(&win, TRUE); - break; - case KEY_DOWN: - create_box(&win, FALSE); - ++win.starty; - create_box(&win, TRUE); - break; - } - } - endwin(); /* End curses mode */ - return 0; -} -void init_win_params(WIN *p_win) -{ - p_win->height = 3; - p_win->width = 10; - p_win->starty = (LINES - p_win->height)/2; - p_win->startx = (COLS - p_win->width)/2; - - p_win->border.ls = '|'; - p_win->border.rs = '|'; - p_win->border.ts = '-'; - p_win->border.bs = '-'; - p_win->border.tl = '+'; - p_win->border.tr = '+'; - p_win->border.bl = '+'; - p_win->border.br = '+'; - -} -void print_win_params(WIN *p_win) -{ -#ifdef _DEBUG - mvprintw(25, 0, "%d %d %d %d", p_win->startx, p_win->starty, - p_win->width, p_win->height); - refresh(); -#endif -} -void create_box(WIN *p_win, bool flag) -{ int i, j; - int x, y, w, h; - - x = p_win->startx; - y = p_win->starty; - w = p_win->width; - h = p_win->height; - - if(flag == TRUE) - { mvaddch(y, x, p_win->border.tl); - mvaddch(y, x + w, p_win->border.tr); - mvaddch(y + h, x, p_win->border.bl); - mvaddch(y + h, x + w, p_win->border.br); - mvhline(y, x + 1, p_win->border.ts, w - 1); - mvhline(y + h, x + 1, p_win->border.bs, w - 1); - mvvline(y + 1, x, p_win->border.ls, h - 1); - mvvline(y + 1, x + w, p_win->border.rs, h - 1); - - } - else - for(j = y; j <= y + h; ++j) - for(i = x; i <= x + w; ++i) - mvaddch(j, i, ' '); - - refresh(); - -}</span> -</pre> - </div> - </div> - </div> - - <div class="SECT1"> - <hr> - - <h2 class="SECT1"><a name="COLOR" id="COLOR">10. - Colors</a></h2> - - <div class="SECT2"> - <h3 class="SECT2"><a name="COLORBASICS" id= - "COLORBASICS">10.1. The basics</a></h3> - - <p>Life seems dull with no colors. Curses has a nice - mechanism to handle colors. Let's get into the thick of the - things with a small program.</p> - - <div class="EXAMPLE"> - <a name="BSICO" id="BSICO"></a> - - <p><b>Example 9. A Simple Color example</b></p> - <pre class="PROGRAMLISTING"> -<span class="INLINEMEDIAOBJECT">#include <ncurses.h> - -void print_in_middle(WINDOW *win, int starty, int startx, int width, char *string); -int main(int argc, char *argv[]) -{ initscr(); /* Start curses mode */ - if(has_colors() == FALSE) - { endwin(); - printf("Your terminal does not support color\n"); - exit(1); - } - start_color(); /* Start color */ - init_pair(1, COLOR_RED, COLOR_BLACK); - - attron(COLOR_PAIR(1)); - print_in_middle(stdscr, LINES / 2, 0, 0, "Viola !!! In color ..."); - attroff(COLOR_PAIR(1)); - getch(); - endwin(); -} -void print_in_middle(WINDOW *win, int starty, int startx, int width, char *string) -{ int length, x, y; - float temp; - - if(win == NULL) - win = stdscr; - getyx(win, y, x); - if(startx != 0) - x = startx; - if(starty != 0) - y = starty; - if(width == 0) - width = 80; - - length = strlen(string); - temp = (width - length)/ 2; - x = startx + (int)temp; - mvwprintw(win, y, x, "%s", string); - refresh(); -} -</span> -</pre> - </div> - - <p>As you can see, to start using color, you should first - call the function <tt class="LITERAL">start_color()</tt>. - After that, you can use color capabilities of your - terminals using various functions. To find out whether a - terminal has color capabilities or not, you can use - <tt class="LITERAL">has_colors()</tt> function, which - returns FALSE if the terminal does not support color.</p> - - <p>Curses initializes all the colors supported by terminal - when start_color() is called. These can be accessed by the - define constants like <tt class="LITERAL">COLOR_BLACK</tt> - etc. Now to actually start using colors, you have to define - pairs. Colors are always used in pairs. That means you have - to use the function <tt class="LITERAL">init_pair()</tt> to - define the foreground and background for the pair number - you give. After that that pair number can be used as a - normal attribute with <tt class= - "LITERAL">COLOR_PAIR()</tt>function. This may seem to be - cumbersome at first. But this elegant solution allows us to - manage color pairs very easily. To appreciate it, you have - to look into the the source code of "dialog", a utility for - displaying dialog boxes from shell scripts. The developers - have defined foreground and background combinations for all - the colors they might need and initialized at the - beginning. This makes it very easy to set attributes just - by accessing a pair which we already have defined as a - constant.</p> - - <p>The following colors are defined in <tt class= - "LITERAL">curses.h</tt>. You can use these as parameters - for various color functions.</p> - <pre class="PROGRAMLISTING"> - COLOR_BLACK 0 - COLOR_RED 1 - COLOR_GREEN 2 - COLOR_YELLOW 3 - COLOR_BLUE 4 - COLOR_MAGENTA 5 - COLOR_CYAN 6 - COLOR_WHITE 7 -</pre> - </div> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="CHANGECOLORDEFS" id= - "CHANGECOLORDEFS">10.2. Changing Color Definitions</a></h3> - - <p>The function <tt class="LITERAL">init_color()</tt>can be - used to change the rgb values for the colors defined by - curses initially. Say you wanted to lighten the intensity - of red color by a minuscule. Then you can use this function - as</p> - <pre class="PROGRAMLISTING"> - init_color(COLOR_RED, 700, 0, 0); - /* param 1 : color name - * param 2, 3, 4 : rgb content min = 0, max = 1000 */ -</pre> - - <p>If your terminal cannot change the color definitions, - the function returns ERR. The function <tt class= - "LITERAL">can_change_color()</tt> can be used to find out - whether the terminal has the capability of changing color - content or not. The rgb content is scaled from 0 to 1000. - Initially RED color is defined with content 1000(r), 0(g), - 0(b).</p> - </div> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="COLORCONTENT" id= - "COLORCONTENT">10.3. Color Content</a></h3> - - <p>The functions <tt class="LITERAL">color_content()</tt> - and <tt class="LITERAL">pair_content()</tt> can be used to - find the color content and foreground, background - combination for the pair.</p> - </div> - </div> - - <div class="SECT1"> - <hr> - - <h2 class="SECT1"><a name="KEYS" id="KEYS">11. Interfacing - with the key board</a></h2> - - <div class="SECT2"> - <h3 class="SECT2"><a name="KEYSBASICS" id= - "KEYSBASICS">11.1. The Basics</a></h3> - - <p>No GUI is complete without a strong user interface and - to interact with the user, a curses program should be - sensitive to key presses or the mouse actions done by the - user. Let's deal with the keys first.</p> - - <p>As you have seen in almost all of the above examples, - it's very easy to get key input from the user. A simple way - of getting key presses is to use <tt class= - "LITERAL">getch()</tt> function. The cbreak mode should be - enabled to read keys when you are interested in reading - individual key hits rather than complete lines of text - (which usually end with a carriage return). keypad should - be enabled to get the Functions keys, arrow keys etc. See - the initialization section for details.</p> - - <p><tt class="LITERAL">getch()</tt> returns an integer - corresponding to the key pressed. If it is a normal - character, the integer value will be equivalent to the - character. Otherwise it returns a number which can be - matched with the constants defined in <tt class= - "LITERAL">curses.h</tt>. For example if the user presses - F1, the integer returned is 265. This can be checked using - the macro KEY_F() defined in curses.h. This makes reading - keys portable and easy to manage.</p> - - <p>For example, if you call getch() like this</p> - <pre class="PROGRAMLISTING"> - int ch; - - ch = getch(); -</pre> - - <p>getch() will wait for the user to press a key, (unless - you specified a timeout) and when user presses a key, the - corresponding integer is returned. Then you can check the - value returned with the constants defined in curses.h to - match against the keys you want.</p> - - <p>The following code piece will do that job.</p> - <pre class="PROGRAMLISTING"> - if(ch == KEY_LEFT) - printw("Left arrow is pressed\n"); -</pre> - - <p>Let's write a small program which creates a menu which - can be navigated by up and down arrows.</p> - </div> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="SIMPLEKEYEX" id= - "SIMPLEKEYEX">11.2. A Simple Key Usage example</a></h3> - - <div class="EXAMPLE"> - <a name="BSIKE" id="BSIKE"></a> - - <p><b>Example 10. A Simple Key Usage example</b></p> - <pre class="PROGRAMLISTING"> -<span class="INLINEMEDIAOBJECT">#include <stdio.h> -#include <ncurses.h> - -#define WIDTH 30 -#define HEIGHT 10 - -int startx = 0; -int starty = 0; - -char *choices[] = { - "Choice 1", - "Choice 2", - "Choice 3", - "Choice 4", - "Exit", - }; -int n_choices = sizeof(choices) / sizeof(char *); -void print_menu(WINDOW *menu_win, int highlight); - -int main() -{ WINDOW *menu_win; - int highlight = 1; - int choice = 0; - int c; - - initscr(); - clear(); - noecho(); - cbreak(); /* Line buffering disabled. pass on everything */ - startx = (80 - WIDTH) / 2; - starty = (24 - HEIGHT) / 2; - - menu_win = newwin(HEIGHT, WIDTH, starty, startx); - keypad(menu_win, TRUE); - mvprintw(0, 0, "Use arrow keys to go up and down, Press enter to select a choice"); - refresh(); - print_menu(menu_win, highlight); - while(1) - { c = wgetch(menu_win); - switch(c) - { case KEY_UP: - if(highlight == 1) - highlight = n_choices; - else - --highlight; - break; - case KEY_DOWN: - if(highlight == n_choices) - highlight = 1; - else - ++highlight; - break; - case 10: - choice = highlight; - break; - default: - mvprintw(24, 0, "Charcter pressed is = %3d Hopefully it can be printed as '%c'", c, c); - refresh(); - break; - } - print_menu(menu_win, highlight); - if(choice != 0) /* User did a choice come out of the infinite loop */ - break; - } - mvprintw(23, 0, "You chose choice %d with choice string %s\n", choice, choices[choice - 1]); - clrtoeol(); - refresh(); - endwin(); - return 0; -} - - -void print_menu(WINDOW *menu_win, int highlight) -{ - int x, y, i; - - x = 2; - y = 2; - box(menu_win, 0, 0); - for(i = 0; i < n_choices; ++i) - { if(highlight == i + 1) /* High light the present choice */ - { wattron(menu_win, A_REVERSE); - mvwprintw(menu_win, y, x, "%s", choices[i]); - wattroff(menu_win, A_REVERSE); - } - else - mvwprintw(menu_win, y, x, "%s", choices[i]); - ++y; - } - wrefresh(menu_win); -} -</span> -</pre> - </div> - </div> - </div> - - <div class="SECT1"> - <hr> - - <h2 class="SECT1"><a name="MOUSE" id="MOUSE">12. Interfacing - with the mouse</a></h2> - - <p>Now that you have seen how to get keys, lets do the same - thing from mouse. Usually each UI allows the user to interact - with both keyboard and mouse.</p> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="MOUSEBASICS" id= - "MOUSEBASICS">12.1. The Basics</a></h3> - - <p>Before you do any thing else, the events you want to - receive have to be enabled with <tt class= - "LITERAL">mousemask()</tt>.</p> - <pre class="PROGRAMLISTING"> - mousemask( mmask_t newmask, /* The events you want to listen to */ - mmask_t *oldmask) /* The old events mask */ -</pre> - - <p>The first parameter to above function is a bit mask of - events you would like to listen. By default, all the events - are turned off. The bit mask <tt class= - "LITERAL">ALL_MOUSE_EVENTS</tt> can be used to get all the - events.</p> - - <p>The following are all the event masks:</p> - <pre class="PROGRAMLISTING"> - Name Description - --------------------------------------------------------------------- - BUTTON1_PRESSED mouse button 1 down - BUTTON1_RELEASED mouse button 1 up - BUTTON1_CLICKED mouse button 1 clicked - BUTTON1_DOUBLE_CLICKED mouse button 1 double clicked - BUTTON1_TRIPLE_CLICKED mouse button 1 triple clicked - BUTTON2_PRESSED mouse button 2 down - BUTTON2_RELEASED mouse button 2 up - BUTTON2_CLICKED mouse button 2 clicked - BUTTON2_DOUBLE_CLICKED mouse button 2 double clicked - BUTTON2_TRIPLE_CLICKED mouse button 2 triple clicked - BUTTON3_PRESSED mouse button 3 down - BUTTON3_RELEASED mouse button 3 up - BUTTON3_CLICKED mouse button 3 clicked - BUTTON3_DOUBLE_CLICKED mouse button 3 double clicked - BUTTON3_TRIPLE_CLICKED mouse button 3 triple clicked - BUTTON4_PRESSED mouse button 4 down - BUTTON4_RELEASED mouse button 4 up - BUTTON4_CLICKED mouse button 4 clicked - BUTTON4_DOUBLE_CLICKED mouse button 4 double clicked - BUTTON4_TRIPLE_CLICKED mouse button 4 triple clicked - BUTTON_SHIFT shift was down during button state change - BUTTON_CTRL control was down during button state change - BUTTON_ALT alt was down during button state change - ALL_MOUSE_EVENTS report all button state changes - REPORT_MOUSE_POSITION report mouse movement -</pre> - </div> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="GETTINGEVENTS" id= - "GETTINGEVENTS">12.2. Getting the events</a></h3> - - <p>Once a class of mouse events have been enabled, getch() - class of functions return KEY_MOUSE every time some mouse - event happens. Then the mouse event can be retrieved with - <tt class="LITERAL">getmouse()</tt>.</p> - - <p>The code approximately looks like this:</p> - <pre class="PROGRAMLISTING"> - MEVENT event; - - ch = getch(); - if(ch == KEY_MOUSE) - if(getmouse(&event) == OK) - . /* Do some thing with the event */ - . - . -</pre> - - <p>getmouse() returns the event into the pointer given to - it. It's a structure which contains</p> - <pre class="PROGRAMLISTING"> - typedef struct - { - short id; /* ID to distinguish multiple devices */ - int x, y, z; /* event coordinates */ - mmask_t bstate; /* button state bits */ - } -</pre> - - <p>The <tt class="LITERAL">bstate</tt> is the main variable - we are interested in. It tells the button state of the - mouse.</p> - - <p>Then with a code snippet like the following, we can find - out what happened.</p> - <pre class="PROGRAMLISTING"> - if(event.bstate & BUTTON1_PRESSED) - printw("Left Button Pressed"); -</pre> - </div> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="MOUSETOGETHER" id= - "MOUSETOGETHER">12.3. Putting it all Together</a></h3> - - <p>That's pretty much interfacing with mouse. Let's create - the same menu and enable mouse interaction. To make things - simpler, key handling is removed.</p> - - <div class="EXAMPLE"> - <a name="BMOME" id="BMOME"></a> - - <p><b>Example 11. Access the menu with mouse !!!</b></p> - <pre class="PROGRAMLISTING"> -<span class="INLINEMEDIAOBJECT">#include <ncurses.h> - -#define WIDTH 30 -#define HEIGHT 10 - -int startx = 0; -int starty = 0; - -char *choices[] = { "Choice 1", - "Choice 2", - "Choice 3", - "Choice 4", - "Exit", - }; - -int n_choices = sizeof(choices) / sizeof(char *); - -void print_menu(WINDOW *menu_win, int highlight); -void report_choice(int mouse_x, int mouse_y, int *p_choice); - -int main() -{ int c, choice = 0; - WINDOW *menu_win; - MEVENT event; - - /* Initialize curses */ - initscr(); - clear(); - noecho(); - cbreak(); //Line buffering disabled. pass on everything - - /* Try to put the window in the middle of screen */ - startx = (80 - WIDTH) / 2; - starty = (24 - HEIGHT) / 2; - - attron(A_REVERSE); - mvprintw(23, 1, "Click on Exit to quit (Works best in a virtual console)"); - refresh(); - attroff(A_REVERSE); - - /* Print the menu for the first time */ - menu_win = newwin(HEIGHT, WIDTH, starty, startx); - print_menu(menu_win, 1); - /* Get all the mouse events */ - mousemask(ALL_MOUSE_EVENTS, NULL); - - while(1) - { c = wgetch(menu_win); - switch(c) - { case KEY_MOUSE: - if(getmouse(&event) == OK) - { /* When the user clicks left mouse button */ - if(event.bstate & BUTTON1_PRESSED) - { report_choice(event.x + 1, event.y + 1, &choice); - if(choice == -1) //Exit chosen - goto end; - mvprintw(22, 1, "Choice made is : %d String Chosen is \"%10s\"", choice, choices[choice - 1]); - refresh(); - } - } - print_menu(menu_win, choice); - break; - } - } -end: - endwin(); - return 0; -} - - -void print_menu(WINDOW *menu_win, int highlight) -{ - int x, y, i; - - x = 2; - y = 2; - box(menu_win, 0, 0); - for(i = 0; i < n_choices; ++i) - { if(highlight == i + 1) - { wattron(menu_win, A_REVERSE); - mvwprintw(menu_win, y, x, "%s", choices[i]); - wattroff(menu_win, A_REVERSE); - } - else - mvwprintw(menu_win, y, x, "%s", choices[i]); - ++y; - } - wrefresh(menu_win); -} - -/* Report the choice according to mouse position */ -void report_choice(int mouse_x, int mouse_y, int *p_choice) -{ int i,j, choice; - - i = startx + 2; - j = starty + 3; - - for(choice = 0; choice < n_choices; ++choice) - if(mouse_y == j + choice && mouse_x >= i && mouse_x <= i + strlen(choices[choice])) - { if(choice == n_choices - 1) - *p_choice = -1; - else - *p_choice = choice + 1; - break; - } -}</span> -</pre> - </div> - </div> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="MISCMOUSEFUNCS" id= - "MISCMOUSEFUNCS">12.4. Miscellaneous Functions</a></h3> - - <p>The functions mouse_trafo() and wmouse_trafo() can be - used to convert to mouse co-ordinates to screen relative - co-ordinates. See curs_mouse(3X) man page for details.</p> - - <p>The mouseinterval function sets the maximum time (in - thousands of a second) that can elapse between press and - release events in order for them to be recognized as a - click. This function returns the previous interval value. - The default is one fifth of a second.</p> - </div> - </div> - - <div class="SECT1"> - <hr> - - <h2 class="SECT1"><a name="SCREEN" id="SCREEN">13. Screen - Manipulation</a></h2> - - <p>In this section, we will look into some functions, which - allow us to manage the screen efficiently and to write some - fancy programs. This is especially important in writing - games.</p> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="GETYX" id="GETYX">13.1. getyx() - functions</a></h3> - - <p>The function <tt class="LITERAL">getyx()</tt> can be - used to find out the present cursor co-ordinates. It will - fill the values of x and y co-ordinates in the arguments - given to it. Since getyx() is a macro you don't have to - pass the address of the variables. It can be called as</p> - <pre class="PROGRAMLISTING"> - getyx(win, y, x); - /* win: window pointer - * y, x: y, x co-ordinates will be put into this variables - */ -</pre> - - <p>The function getparyx() gets the beginning co-ordinates - of the sub window relative to the main window. This is some - times useful to update a sub window. When designing fancy - stuff like writing multiple menus, it becomes difficult to - store the menu positions, their first option co-ordinates - etc. A simple solution to this problem, is to create menus - in sub windows and later find the starting co-ordinates of - the menus by using getparyx().</p> - - <p>The functions getbegyx() and getmaxyx() store current - window's beginning and maximum co-ordinates. These - functions are useful in the same way as above in managing - the windows and sub windows effectively.</p> - </div> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="SCREENDUMP" id= - "SCREENDUMP">13.2. Screen Dumping</a></h3> - - <p>While writing games, some times it becomes necessary to - store the state of the screen and restore it back to the - same state. The function scr_dump() can be used to dump the - screen contents to a file given as an argument. Later it - can be restored by scr_restore function. These two simple - functions can be used effectively to maintain a fast moving - game with changing scenarios.</p> - </div> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="WINDOWDUMP" id= - "WINDOWDUMP">13.3. Window Dumping</a></h3> - - <p>To store and restore windows, the functions <tt class= - "LITERAL">putwin()</tt> and <tt class= - "LITERAL">getwin()</tt> can be used. <tt class= - "LITERAL">putwin()</tt> puts the present window state into - a file, which can be later restored by <tt class= - "LITERAL">getwin()</tt>.</p> - - <p>The function <tt class="LITERAL">copywin()</tt> can be - used to copy a window completely onto another window. It - takes the source and destination windows as parameters and - according to the rectangle specified, it copies the - rectangular region from source to destination window. It's - last parameter specifies whether to overwrite or just - overlay the contents on to the destination window. If this - argument is true, then the copying is non-destructive.</p> - </div> - </div> - - <div class="SECT1"> - <hr> - - <h2 class="SECT1"><a name="MISC" id="MISC">14. Miscellaneous - features</a></h2> - - <p>Now you know enough features to write a good curses - program, with all bells and whistles. There are some - miscellaneous functions which are useful in various cases. - Let's go headlong into some of those.</p> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="CURSSET" id="CURSSET">14.1. - curs_set()</a></h3> - - <p>This function can be used to make the cursor invisible. - The parameter to this function should be</p> - <pre class="PROGRAMLISTING"> - 0 : invisible or - 1 : normal or - 2 : very visible. -</pre> - </div> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="TEMPLEAVE" id="TEMPLEAVE">14.2. - Temporarily Leaving Curses mode</a></h3> - - <p>Some times you may want to get back to cooked mode - (normal line buffering mode) temporarily. In such a case - you will first need to save the tty modes with a call to - <tt class="LITERAL">def_prog_mode()</tt> and then call - <tt class="LITERAL">endwin()</tt> to end the curses mode. - This will leave you in the original tty mode. To get back - to curses once you are done, call <tt class= - "LITERAL">reset_prog_mode()</tt> . This function returns - the tty to the state stored by <tt class= - "LITERAL">def_prog_mode()</tt>. Then do refresh(), and you - are back to the curses mode. Here is an example showing the - sequence of things to be done.</p> - - <div class="EXAMPLE"> - <a name="BTELE" id="BTELE"></a> - - <p><b>Example 12. Temporarily Leaving Curses Mode</b></p> - <pre class="PROGRAMLISTING"> -<span class="INLINEMEDIAOBJECT">#include <ncurses.h> - -int main() -{ - initscr(); /* Start curses mode */ - printw("Hello World !!!\n"); /* Print Hello World */ - refresh(); /* Print it on to the real screen */ - def_prog_mode(); /* Save the tty modes */ - endwin(); /* End curses mode temporarily */ - system("/bin/sh"); /* Do whatever you like in cooked mode */ - reset_prog_mode(); /* Return to the previous tty mode*/ - /* stored by def_prog_mode() */ - refresh(); /* Do refresh() to restore the */ - /* Screen contents */ - printw("Another String\n"); /* Back to curses use the full */ - refresh(); /* capabilities of curses */ - endwin(); /* End curses mode */ - - return 0; -}</span> -</pre> - </div> - </div> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="ACSVARS" id="ACSVARS">14.3. ACS_ - variables</a></h3> - - <p>If you have ever programmed in DOS, you know about those - nifty characters in extended character set. They are - printable only on some terminals. NCURSES functions like - <tt class="LITERAL">box()</tt> use these characters. All - these variables start with ACS meaning alternative - character set. You might have noticed me using these - characters in some of the programs above. Here's an example - showing all the characters.</p> - - <div class="EXAMPLE"> - <a name="BACSVARS" id="BACSVARS"></a> - - <p><b>Example 13. ACS Variables Example</b></p> - <pre class="PROGRAMLISTING"> -<span class="INLINEMEDIAOBJECT">#include <ncurses.h> - -int main() -{ - initscr(); - - printw("Upper left corner "); addch(ACS_ULCORNER); printw("\n"); - printw("Lower left corner "); addch(ACS_LLCORNER); printw("\n"); - printw("Lower right corner "); addch(ACS_LRCORNER); printw("\n"); - printw("Tee pointing right "); addch(ACS_LTEE); printw("\n"); - printw("Tee pointing left "); addch(ACS_RTEE); printw("\n"); - printw("Tee pointing up "); addch(ACS_BTEE); printw("\n"); - printw("Tee pointing down "); addch(ACS_TTEE); printw("\n"); - printw("Horizontal line "); addch(ACS_HLINE); printw("\n"); - printw("Vertical line "); addch(ACS_VLINE); printw("\n"); - printw("Large Plus or cross over "); addch(ACS_PLUS); printw("\n"); - printw("Scan Line 1 "); addch(ACS_S1); printw("\n"); - printw("Scan Line 3 "); addch(ACS_S3); printw("\n"); - printw("Scan Line 7 "); addch(ACS_S7); printw("\n"); - printw("Scan Line 9 "); addch(ACS_S9); printw("\n"); - printw("Diamond "); addch(ACS_DIAMOND); printw("\n"); - printw("Checker board (stipple) "); addch(ACS_CKBOARD); printw("\n"); - printw("Degree Symbol "); addch(ACS_DEGREE); printw("\n"); - printw("Plus/Minus Symbol "); addch(ACS_PLMINUS); printw("\n"); - printw("Bullet "); addch(ACS_BULLET); printw("\n"); - printw("Arrow Pointing Left "); addch(ACS_LARROW); printw("\n"); - printw("Arrow Pointing Right "); addch(ACS_RARROW); printw("\n"); - printw("Arrow Pointing Down "); addch(ACS_DARROW); printw("\n"); - printw("Arrow Pointing Up "); addch(ACS_UARROW); printw("\n"); - printw("Board of squares "); addch(ACS_BOARD); printw("\n"); - printw("Lantern Symbol "); addch(ACS_LANTERN); printw("\n"); - printw("Solid Square Block "); addch(ACS_BLOCK); printw("\n"); - printw("Less/Equal sign "); addch(ACS_LEQUAL); printw("\n"); - printw("Greater/Equal sign "); addch(ACS_GEQUAL); printw("\n"); - printw("Pi "); addch(ACS_PI); printw("\n"); - printw("Not equal "); addch(ACS_NEQUAL); printw("\n"); - printw("UK pound sign "); addch(ACS_STERLING); printw("\n"); - - refresh(); - getch(); - endwin(); - - return 0; -}</span> -</pre> - </div> - </div> - </div> - - <div class="SECT1"> - <hr> - - <h2 class="SECT1"><a name="OTHERLIB" id="OTHERLIB">15. Other - libraries</a></h2> - - <p>Apart from the curses library, there are few text mode - libraries, which provide more functionality and a lot of - features. The following sections explain three standard - libraries which are usually distributed along with - curses.</p> - </div> - - <div class="SECT1"> - <hr> - - <h2 class="SECT1"><a name="PANELS" id="PANELS">16. Panel - Library</a></h2> - - <p>Now that you are proficient in curses, you wanted to do - some thing big. You created a lot of overlapping windows to - give a professional windows-type look. Unfortunately, it soon - becomes difficult to manage these. The multiple refreshes, - updates plunge you into a nightmare. The overlapping windows - create blotches, whenever you forget to refresh the windows - in the proper order.</p> - - <p>Don't despair. There's an elegant solution provided in - panels library. In the words of developers of ncurses</p> - - <p><span class="emphasis"><i class="EMPHASIS">When your - interface design is such that windows may dive deeper into - the visibility stack or pop to the top at runtime, the - resulting book-keeping can be tedious and difficult to get - right. Hence the panels library.</i></span></p> - - <p>If you have lot of overlapping windows, then panels - library is the way to go. It obviates the need of doing - series of wnoutrefresh(), doupdate() and relieves the burden - of doing it correctly(bottom up). The library maintains - information about the order of windows, their overlapping and - update the screen properly. So why wait? Let's take a close - peek into panels.</p> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="PANELBASICS" id= - "PANELBASICS">16.1. The Basics</a></h3> - - <p>Panel object is a window that is implicitly treated as - part of a deck including all other panel objects. The deck - is treated as a stack with the top panel being completely - visible and the other panels may or may not be obscured - according to their positions. So the basic idea is to - create a stack of overlapping panels and use panels library - to display them correctly. There is a function similar to - refresh() which, when called , displays panels in the - correct order. Functions are provided to hide or show - panels, move panels, change its size etc.. The overlapping - problem is managed by the panels library during all the - calls to these functions.</p> - - <p>The general flow of a panel program goes like this:</p> - - <ol type="1"> - <li> - <p>Create the windows (with newwin()) to be attached to - the panels.</p> - </li> - - <li> - <p>Create panels with the chosen visibility order. - Stack them up according to the desired visibility. The - function new_panel() is used to created panels.</p> - </li> - - <li> - <p>Call update_panels() to write the panels to the - virtual screen in correct visibility order. Do a - doupdate() to show it on the screen.</p> - </li> - - <li> - <p>Mainpulate the panels with show_panel(), - hide_panel(), move_panel() etc. Make use of helper - functions like panel_hidden() and panel_window(). Make - use of user pointer to store custom data for a panel. - Use the functions set_panel_userptr() and - panel_userptr() to set and get the user pointer for a - panel.</p> - </li> - - <li> - <p>When you are done with the panel use del_panel() to - delete the panel.</p> - </li> - </ol> - - <p>Let's make the concepts clear, with some programs. The - following is a simple program which creates 3 overlapping - panels and shows them on the screen.</p> - </div> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="COMPILEPANELS" id= - "COMPILEPANELS">16.2. Compiling With the Panels - Library</a></h3> - - <p>To use panels library functions, you have to include - panel.h and to link the program with panels library the - flag -lpanel should be added along with -lncurses in that - order.</p> - <pre class="PROGRAMLISTING"> - #include <panel.h> - . - . - . - - compile and link: gcc <program file> -lpanel -lncurses -</pre> - - <div class="EXAMPLE"> - <a name="PPASI" id="PPASI"></a> - - <p><b>Example 14. Panel basics</b></p> - <pre class="PROGRAMLISTING"> -<span class="INLINEMEDIAOBJECT">#include <panel.h> - -int main() -{ WINDOW *my_wins[3]; - PANEL *my_panels[3]; - int lines = 10, cols = 40, y = 2, x = 4, i; - - initscr(); - cbreak(); - noecho(); - - /* Create windows for the panels */ - my_wins[0] = newwin(lines, cols, y, x); - my_wins[1] = newwin(lines, cols, y + 1, x + 5); - my_wins[2] = newwin(lines, cols, y + 2, x + 10); - - /* - * Create borders around the windows so that you can see the effect - * of panels - */ - for(i = 0; i < 3; ++i) - box(my_wins[i], 0, 0); - - /* Attach a panel to each window */ /* Order is bottom up */ - my_panels[0] = new_panel(my_wins[0]); /* Push 0, order: stdscr-0 */ - my_panels[1] = new_panel(my_wins[1]); /* Push 1, order: stdscr-0-1 */ - my_panels[2] = new_panel(my_wins[2]); /* Push 2, order: stdscr-0-1-2 */ - - /* Update the stacking order. 2nd panel will be on top */ - update_panels(); - - /* Show it on the screen */ - doupdate(); - - getch(); - endwin(); -} -</span> -</pre> - </div> - - <p>As you can see, above program follows a simple flow as - explained. The windows are created with newwin() and then - they are attached to panels with new_panel(). As we attach - one panel after another, the stack of panels gets updated. - To put them on screen update_panels() and doupdate() are - called.</p> - </div> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="PANELBROWSING" id= - "PANELBROWSING">16.3. Panel Window Browsing</a></h3> - - <p>A slightly complicated example is given below. This - program creates 3 windows which can be cycled through using - tab. Have a look at the code.</p> - - <div class="EXAMPLE"> - <a name="PPABR" id="PPABR"></a> - - <p><b>Example 15. Panel Window Browsing Example</b></p> - <pre class="PROGRAMLISTING"> -<span class="INLINEMEDIAOBJECT">#include <panel.h> - -#define NLINES 10 -#define NCOLS 40 - -void init_wins(WINDOW **wins, int n); -void win_show(WINDOW *win, char *label, int label_color); -void print_in_middle(WINDOW *win, int starty, int startx, int width, char *string, chtype color); - -int main() -{ WINDOW *my_wins[3]; - PANEL *my_panels[3]; - PANEL *top; - int ch; - - /* Initialize curses */ - initscr(); - start_color(); - cbreak(); - noecho(); - keypad(stdscr, TRUE); - - /* Initialize all the colors */ - init_pair(1, COLOR_RED, COLOR_BLACK); - init_pair(2, COLOR_GREEN, COLOR_BLACK); - init_pair(3, COLOR_BLUE, COLOR_BLACK); - init_pair(4, COLOR_CYAN, COLOR_BLACK); - - init_wins(my_wins, 3); - - /* Attach a panel to each window */ /* Order is bottom up */ - my_panels[0] = new_panel(my_wins[0]); /* Push 0, order: stdscr-0 */ - my_panels[1] = new_panel(my_wins[1]); /* Push 1, order: stdscr-0-1 */ - my_panels[2] = new_panel(my_wins[2]); /* Push 2, order: stdscr-0-1-2 */ - - /* Set up the user pointers to the next panel */ - set_panel_userptr(my_panels[0], my_panels[1]); - set_panel_userptr(my_panels[1], my_panels[2]); - set_panel_userptr(my_panels[2], my_panels[0]); - - /* Update the stacking order. 2nd panel will be on top */ - update_panels(); - - /* Show it on the screen */ - attron(COLOR_PAIR(4)); - mvprintw(LINES - 2, 0, "Use tab to browse through the windows (F1 to Exit)"); - attroff(COLOR_PAIR(4)); - doupdate(); - - top = my_panels[2]; - while((ch = getch()) != KEY_F(1)) - { switch(ch) - { case 9: - top = (PANEL *)panel_userptr(top); - top_panel(top); - break; - } - update_panels(); - doupdate(); - } - endwin(); - return 0; -} - -/* Put all the windows */ -void init_wins(WINDOW **wins, int n) -{ int x, y, i; - char label[80]; - - y = 2; - x = 10; - for(i = 0; i < n; ++i) - { wins[i] = newwin(NLINES, NCOLS, y, x); - sprintf(label, "Window Number %d", i + 1); - win_show(wins[i], label, i + 1); - y += 3; - x += 7; - } -} - -/* Show the window with a border and a label */ -void win_show(WINDOW *win, char *label, int label_color) -{ int startx, starty, height, width; - - getbegyx(win, starty, startx); - getmaxyx(win, height, width); - - box(win, 0, 0); - mvwaddch(win, 2, 0, ACS_LTEE); - mvwhline(win, 2, 1, ACS_HLINE, width - 2); - mvwaddch(win, 2, width - 1, ACS_RTEE); - - print_in_middle(win, 1, 0, width, label, COLOR_PAIR(label_color)); -} - -void print_in_middle(WINDOW *win, int starty, int startx, int width, char *string, chtype color) -{ int length, x, y; - float temp; - - if(win == NULL) - win = stdscr; - getyx(win, y, x); - if(startx != 0) - x = startx; - if(starty != 0) - y = starty; - if(width == 0) - width = 80; - - length = strlen(string); - temp = (width - length)/ 2; - x = startx + (int)temp; - wattron(win, color); - mvwprintw(win, y, x, "%s", string); - wattroff(win, color); - refresh(); -}</span> -</pre> - </div> - </div> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="USERPTRUSING" id= - "USERPTRUSING">16.4. Using User Pointers</a></h3> - - <p>In the above example I used user pointers to find out - the next window in the cycle. We can attach custom - information to the panel by specifying a user pointer, - which can point to any information you want to store. In - this case I stored the pointer to the next panel in the - cycle. User pointer for a panel can be set with the - function <tt class="LITERAL">set_panel_userptr()</tt>. It - can be accessed using the function <tt class= - "LITERAL">panel_userptr()</tt> which will return the user - pointer for the panel given as argument. After finding the - next panel in the cycle It's brought to the top by the - function top_panel(). This function brings the panel given - as argument to the top of the panel stack.</p> - </div> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="PANELMOVERESIZE" id= - "PANELMOVERESIZE">16.5. Moving and Resizing Panels</a></h3> - - <p>The function <tt class="LITERAL">move_panel()</tt> can - be used to move a panel to the desired location. It does - not change the position of the panel in the stack. Make - sure that you use move_panel() instead mvwin() on the - window associated with the panel.</p> - - <p>Resizing a panel is slightly complex. There is no - straight forward function just to resize the window - associated with a panel. A solution to resize a panel is to - create a new window with the desired sizes, change the - window associated with the panel using replace_panel(). - Don't forget to delete the old window. The window - associated with a panel can be found by using the function - panel_window().</p> - - <p>The following program shows these concepts, in - supposedly simple program. You can cycle through the window - with <TAB> as usual. To resize or move the active - panel press 'r' for resize 'm' for moving. Then use arrow - keys to resize or move it to the desired way and press - enter to end your resizing or moving. This example makes - use of user data to get the required data to do the - operations.</p> - - <div class="EXAMPLE"> - <a name="PPARE" id="PPARE"></a> - - <p><b>Example 16. Panel Moving and Resizing - example</b></p> - <pre class="PROGRAMLISTING"> -<span class="INLINEMEDIAOBJECT">#include <panel.h> - -typedef struct _PANEL_DATA { - int x, y, w, h; - char label[80]; - int label_color; - PANEL *next; -}PANEL_DATA; - -#define NLINES 10 -#define NCOLS 40 - -void init_wins(WINDOW **wins, int n); -void win_show(WINDOW *win, char *label, int label_color); -void print_in_middle(WINDOW *win, int starty, int startx, int width, char *string, chtype color); -void set_user_ptrs(PANEL **panels, int n); - -int main() -{ WINDOW *my_wins[3]; - PANEL *my_panels[3]; - PANEL_DATA *top; - PANEL *stack_top; - WINDOW *temp_win, *old_win; - int ch; - int newx, newy, neww, newh; - int size = FALSE, move = FALSE; - - /* Initialize curses */ - initscr(); - start_color(); - cbreak(); - noecho(); - keypad(stdscr, TRUE); - - /* Initialize all the colors */ - init_pair(1, COLOR_RED, COLOR_BLACK); - init_pair(2, COLOR_GREEN, COLOR_BLACK); - init_pair(3, COLOR_BLUE, COLOR_BLACK); - init_pair(4, COLOR_CYAN, COLOR_BLACK); - - init_wins(my_wins, 3); - - /* Attach a panel to each window */ /* Order is bottom up */ - my_panels[0] = new_panel(my_wins[0]); /* Push 0, order: stdscr-0 */ - my_panels[1] = new_panel(my_wins[1]); /* Push 1, order: stdscr-0-1 */ - my_panels[2] = new_panel(my_wins[2]); /* Push 2, order: stdscr-0-1-2 */ - - set_user_ptrs(my_panels, 3); - /* Update the stacking order. 2nd panel will be on top */ - update_panels(); - - /* Show it on the screen */ - attron(COLOR_PAIR(4)); - mvprintw(LINES - 3, 0, "Use 'm' for moving, 'r' for resizing"); - mvprintw(LINES - 2, 0, "Use tab to browse through the windows (F1 to Exit)"); - attroff(COLOR_PAIR(4)); - doupdate(); - - stack_top = my_panels[2]; - top = (PANEL_DATA *)panel_userptr(stack_top); - newx = top->x; - newy = top->y; - neww = top->w; - newh = top->h; - while((ch = getch()) != KEY_F(1)) - { switch(ch) - { case 9: /* Tab */ - top = (PANEL_DATA *)panel_userptr(stack_top); - top_panel(top->next); - stack_top = top->next; - top = (PANEL_DATA *)panel_userptr(stack_top); - newx = top->x; - newy = top->y; - neww = top->w; - newh = top->h; - break; - case 'r': /* Re-Size*/ - size = TRUE; - attron(COLOR_PAIR(4)); - mvprintw(LINES - 4, 0, "Entered Resizing :Use Arrow Keys to resize and press <ENTER> to end resizing"); - refresh(); - attroff(COLOR_PAIR(4)); - break; - case 'm': /* Move */ - attron(COLOR_PAIR(4)); - mvprintw(LINES - 4, 0, "Entered Moving: Use Arrow Keys to Move and press <ENTER> to end moving"); - refresh(); - attroff(COLOR_PAIR(4)); - move = TRUE; - break; - case KEY_LEFT: - if(size == TRUE) - { --newx; - ++neww; - } - if(move == TRUE) - --newx; - break; - case KEY_RIGHT: - if(size == TRUE) - { ++newx; - --neww; - } - if(move == TRUE) - ++newx; - break; - case KEY_UP: - if(size == TRUE) - { --newy; - ++newh; - } - if(move == TRUE) - --newy; - break; - case KEY_DOWN: - if(size == TRUE) - { ++newy; - --newh; - } - if(move == TRUE) - ++newy; - break; - case 10: /* Enter */ - move(LINES - 4, 0); - clrtoeol(); - refresh(); - if(size == TRUE) - { old_win = panel_window(stack_top); - temp_win = newwin(newh, neww, newy, newx); - replace_panel(stack_top, temp_win); - win_show(temp_win, top->label, top->label_color); - delwin(old_win); - size = FALSE; - } - if(move == TRUE) - { move_panel(stack_top, newy, newx); - move = FALSE; - } - break; - - } - attron(COLOR_PAIR(4)); - mvprintw(LINES - 3, 0, "Use 'm' for moving, 'r' for resizing"); - mvprintw(LINES - 2, 0, "Use tab to browse through the windows (F1 to Exit)"); - attroff(COLOR_PAIR(4)); - refresh(); - update_panels(); - doupdate(); - } - endwin(); - return 0; -} - -/* Put all the windows */ -void init_wins(WINDOW **wins, int n) -{ int x, y, i; - char label[80]; - - y = 2; - x = 10; - for(i = 0; i < n; ++i) - { wins[i] = newwin(NLINES, NCOLS, y, x); - sprintf(label, "Window Number %d", i + 1); - win_show(wins[i], label, i + 1); - y += 3; - x += 7; - } -} - -/* Set the PANEL_DATA structures for individual panels */ -void set_user_ptrs(PANEL **panels, int n) -{ PANEL_DATA *ptrs; - WINDOW *win; - int x, y, w, h, i; - char temp[80]; - - ptrs = (PANEL_DATA *)calloc(n, sizeof(PANEL_DATA)); - - for(i = 0;i < n; ++i) - { win = panel_window(panels[i]); - getbegyx(win, y, x); - getmaxyx(win, h, w); - ptrs[i].x = x; - ptrs[i].y = y; - ptrs[i].w = w; - ptrs[i].h = h; - sprintf(temp, "Window Number %d", i + 1); - strcpy(ptrs[i].label, temp); - ptrs[i].label_color = i + 1; - if(i + 1 == n) - ptrs[i].next = panels[0]; - else - ptrs[i].next = panels[i + 1]; - set_panel_userptr(panels[i], &ptrs[i]); - } -} - -/* Show the window with a border and a label */ -void win_show(WINDOW *win, char *label, int label_color) -{ int startx, starty, height, width; - - getbegyx(win, starty, startx); - getmaxyx(win, height, width); - - box(win, 0, 0); - mvwaddch(win, 2, 0, ACS_LTEE); - mvwhline(win, 2, 1, ACS_HLINE, width - 2); - mvwaddch(win, 2, width - 1, ACS_RTEE); - - print_in_middle(win, 1, 0, width, label, COLOR_PAIR(label_color)); -} - -void print_in_middle(WINDOW *win, int starty, int startx, int width, char *string, chtype color) -{ int length, x, y; - float temp; - - if(win == NULL) - win = stdscr; - getyx(win, y, x); - if(startx != 0) - x = startx; - if(starty != 0) - y = starty; - if(width == 0) - width = 80; - - length = strlen(string); - temp = (width - length)/ 2; - x = startx + (int)temp; - wattron(win, color); - mvwprintw(win, y, x, "%s", string); - wattroff(win, color); - refresh(); -}</span> -</pre> - </div> - - <p>Concentrate on the main while loop. Once it finds out - the type of key pressed, it takes appropriate action. If - 'r' is pressed resizing mode is started. After this the new - sizes are updated as the user presses the arrow keys. When - the user presses <ENTER> present selection ends and - panel is resized by using the concept explained. While in - resizing mode the program doesn't show how the window is - getting resized. It's left as an exercise to the reader to - print a dotted border while it gets resized to a new - position.</p> - - <p>When the user presses 'm' the move mode starts. This is - a bit simpler than resizing. As the arrow keys are pressed - the new position is updated and pressing of <ENTER> - causes the panel to be moved by calling the function - move_panel().</p> - - <p>In this program the user data which is represented as - PANEL_DATA, plays very important role in finding the - associated information with a panel. As written in the - comments, the PANEL_DATA stores the panel sizes, label, - label color and a pointer to the next panel in the - cycle.</p> - </div> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="PANELSHOWHIDE" id= - "PANELSHOWHIDE">16.6. Hiding and Showing Panels</a></h3> - - <p>A Panel can be hidden by using the function - hide_panel(). This function merely removes it form the - stack of panels, thus hiding it on the screen once you do - update_panels() and doupdate(). It doesn't destroy the - PANEL structure associated with the hidden panel. It can be - shown again by using the show_panel() function.</p> - - <p>The following program shows the hiding of panels. Press - 'a' or 'b' or 'c' to show or hide first, second and third - windows respectively. It uses a user data with a small - variable hide, which keeps track of whether the window is - hidden or not. For some reason the function <tt class= - "LITERAL">panel_hidden()</tt> which tells whether a panel - is hidden or not is not working. A bug report was also - presented by Michael Andres <a href= - "http://www.geocrawler.com/archives/3/344/1999/9/0/2643549/" - target="_top">here</a></p> - - <div class="EXAMPLE"> - <a name="PPAHI" id="PPAHI"></a> - - <p><b>Example 17. Panel Hiding and Showing - example</b></p> - <pre class="PROGRAMLISTING"> -<span class="INLINEMEDIAOBJECT">#include <panel.h> - -typedef struct _PANEL_DATA { - int hide; /* TRUE if panel is hidden */ -}PANEL_DATA; - -#define NLINES 10 -#define NCOLS 40 - -void init_wins(WINDOW **wins, int n); -void win_show(WINDOW *win, char *label, int label_color); -void print_in_middle(WINDOW *win, int starty, int startx, int width, char *string, chtype color); - -int main() -{ WINDOW *my_wins[3]; - PANEL *my_panels[3]; - PANEL_DATA panel_datas[3]; - PANEL_DATA *temp; - int ch; - - /* Initialize curses */ - initscr(); - start_color(); - cbreak(); - noecho(); - keypad(stdscr, TRUE); - - /* Initialize all the colors */ - init_pair(1, COLOR_RED, COLOR_BLACK); - init_pair(2, COLOR_GREEN, COLOR_BLACK); - init_pair(3, COLOR_BLUE, COLOR_BLACK); - init_pair(4, COLOR_CYAN, COLOR_BLACK); - - init_wins(my_wins, 3); - - /* Attach a panel to each window */ /* Order is bottom up */ - my_panels[0] = new_panel(my_wins[0]); /* Push 0, order: stdscr-0 */ - my_panels[1] = new_panel(my_wins[1]); /* Push 1, order: stdscr-0-1 */ - my_panels[2] = new_panel(my_wins[2]); /* Push 2, order: stdscr-0-1-2 */ - - /* Initialize panel datas saying that nothing is hidden */ - panel_datas[0].hide = FALSE; - panel_datas[1].hide = FALSE; - panel_datas[2].hide = FALSE; - - set_panel_userptr(my_panels[0], &panel_datas[0]); - set_panel_userptr(my_panels[1], &panel_datas[1]); - set_panel_userptr(my_panels[2], &panel_datas[2]); - - /* Update the stacking order. 2nd panel will be on top */ - update_panels(); - - /* Show it on the screen */ - attron(COLOR_PAIR(4)); - mvprintw(LINES - 3, 0, "Show or Hide a window with 'a'(first window) 'b'(Second Window) 'c'(Third Window)"); - mvprintw(LINES - 2, 0, "F1 to Exit"); - - attroff(COLOR_PAIR(4)); - doupdate(); - - while((ch = getch()) != KEY_F(1)) - { switch(ch) - { case 'a': - temp = (PANEL_DATA *)panel_userptr(my_panels[0]); - if(temp->hide == FALSE) - { hide_panel(my_panels[0]); - temp->hide = TRUE; - } - else - { show_panel(my_panels[0]); - temp->hide = FALSE; - } - break; - case 'b': - temp = (PANEL_DATA *)panel_userptr(my_panels[1]); - if(temp->hide == FALSE) - { hide_panel(my_panels[1]); - temp->hide = TRUE; - } - else - { show_panel(my_panels[1]); - temp->hide = FALSE; - } - break; - case 'c': - temp = (PANEL_DATA *)panel_userptr(my_panels[2]); - if(temp->hide == FALSE) - { hide_panel(my_panels[2]); - temp->hide = TRUE; - } - else - { show_panel(my_panels[2]); - temp->hide = FALSE; - } - break; - } - update_panels(); - doupdate(); - } - endwin(); - return 0; -} - -/* Put all the windows */ -void init_wins(WINDOW **wins, int n) -{ int x, y, i; - char label[80]; - - y = 2; - x = 10; - for(i = 0; i < n; ++i) - { wins[i] = newwin(NLINES, NCOLS, y, x); - sprintf(label, "Window Number %d", i + 1); - win_show(wins[i], label, i + 1); - y += 3; - x += 7; - } -} - -/* Show the window with a border and a label */ -void win_show(WINDOW *win, char *label, int label_color) -{ int startx, starty, height, width; - - getbegyx(win, starty, startx); - getmaxyx(win, height, width); - - box(win, 0, 0); - mvwaddch(win, 2, 0, ACS_LTEE); - mvwhline(win, 2, 1, ACS_HLINE, width - 2); - mvwaddch(win, 2, width - 1, ACS_RTEE); - - print_in_middle(win, 1, 0, width, label, COLOR_PAIR(label_color)); -} - -void print_in_middle(WINDOW *win, int starty, int startx, int width, char *string, chtype color) -{ int length, x, y; - float temp; - - if(win == NULL) - win = stdscr; - getyx(win, y, x); - if(startx != 0) - x = startx; - if(starty != 0) - y = starty; - if(width == 0) - width = 80; - - length = strlen(string); - temp = (width - length)/ 2; - x = startx + (int)temp; - wattron(win, color); - mvwprintw(win, y, x, "%s", string); - wattroff(win, color); - refresh(); -}</span> -</pre> - </div> - </div> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="PANELABOVE" id= - "PANELABOVE">16.7. panel_above() and panel_below() - Functions</a></h3> - - <p>The functions <tt class="LITERAL">panel_above()</tt> and - <tt class="LITERAL">panel_below()</tt> can be used to find - out the panel above and below a panel. If the argument to - these functions is NULL, then they return a pointer to - bottom panel and top panel respectively.</p> - </div> - </div> - - <div class="SECT1"> - <hr> - - <h2 class="SECT1"><a name="MENUS" id="MENUS">17. Menus - Library</a></h2> - - <p>The menus library provides a nice extension to basic - curses, through which you can create menus. It provides a set - of functions to create menus. But they have to be customized - to give a nicer look, with colors etc. Let's get into the - details.</p> - - <p>A menu is a screen display that assists the user to choose - some subset of a given set of items. To put it simple, a menu - is a collection of items from which one or more items can be - chosen. Some readers might not be aware of multiple item - selection capability. Menu library provides functionality to - write menus from which the user can chose more than one item - as the preferred choice. This is dealt with in a later - section. Now it is time for some rudiments.</p> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="MENUBASICS" id= - "MENUBASICS">17.1. The Basics</a></h3> - - <p>To create menus, you first create items, and then post - the menu to the display. After that, all the processing of - user responses is done in an elegant function menu_driver() - which is the work horse of any menu program.</p> - - <p>The general flow of control of a menu program looks like - this.</p> - - <ol type="1"> - <li> - <p>Initialize curses</p> - </li> - - <li> - <p>Create items using new_item(). You can specify a - name and description for the items.</p> - </li> - - <li> - <p>Create the menu with new_menu() by specifying the - items to be attached with.</p> - </li> - - <li> - <p>Post the menu with menu_post() and refresh the - screen.</p> - </li> - - <li> - <p>Process the user requests with a loop and do - necessary updates to menu with menu_driver.</p> - </li> - - <li> - <p>Unpost the menu with menu_unpost()</p> - </li> - - <li> - <p>Free the memory allocated to menu by free_menu()</p> - </li> - - <li> - <p>Free the memory allocated to the items with - free_item()</p> - </li> - - <li> - <p>End curses</p> - </li> - </ol> - - <p>Let's see a program which prints a simple menu and - updates the current selection with up, down arrows.</p> - </div> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="COMPILEMENUS" id= - "COMPILEMENUS">17.2. Compiling With the Menu - Library</a></h3> - - <p>To use menu library functions, you have to include - menu.h and to link the program with menu library the flag - -lmenu should be added along with -lncurses in that - order.</p> - <pre class="PROGRAMLISTING"> - #include <menu.h> - . - . - . - - compile and link: gcc <program file> -lmenu -lncurses -</pre> - - <div class="EXAMPLE"> - <a name="MMESI" id="MMESI"></a> - - <p><b>Example 18. Menu Basics</b></p> - <pre class="PROGRAMLISTING"> -<span class="INLINEMEDIAOBJECT">#include <curses.h> -#include <menu.h> - -#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) -#define CTRLD 4 - -char *choices[] = { - "Choice 1", - "Choice 2", - "Choice 3", - "Choice 4", - "Exit", - }; - -int main() -{ ITEM **my_items; - int c; - MENU *my_menu; - int n_choices, i; - ITEM *cur_item; - - - initscr(); - cbreak(); - noecho(); - keypad(stdscr, TRUE); - - n_choices = ARRAY_SIZE(choices); - my_items = (ITEM **)calloc(n_choices + 1, sizeof(ITEM *)); - - for(i = 0; i < n_choices; ++i) - my_items[i] = new_item(choices[i], choices[i]); - my_items[n_choices] = (ITEM *)NULL; - - my_menu = new_menu((ITEM **)my_items); - mvprintw(LINES - 2, 0, "F1 to Exit"); - post_menu(my_menu); - refresh(); - - while((c = getch()) != KEY_F(1)) - { switch(c) - { case KEY_DOWN: - menu_driver(my_menu, REQ_DOWN_ITEM); - break; - case KEY_UP: - menu_driver(my_menu, REQ_UP_ITEM); - break; - } - } - - free_item(my_items[0]); - free_item(my_items[1]); - free_menu(my_menu); - endwin(); -} - </span> -</pre> - </div> - - <p>This program demonstrates the basic concepts involved in - creating a menu using menus library. First we create the - items using new_item() and then attach them to the menu - with new_menu() function. After posting the menu and - refreshing the screen, the main processing loop starts. It - reads user input and takes corresponding action. The - function menu_driver() is the main work horse of the menu - system. The second parameter to this function tells what's - to be done with the menu. According to the parameter, - menu_driver() does the corresponding task. The value can be - either a menu navigational request, an ascii character, or - a KEY_MOUSE special key associated with a mouse event.</p> - - <p>The menu_driver accepts following navigational - requests.</p> - <pre class="PROGRAMLISTING"> - REQ_LEFT_ITEM Move left to an item. - REQ_RIGHT_ITEM Move right to an item. - REQ_UP_ITEM Move up to an item. - REQ_DOWN_ITEM Move down to an item. - REQ_SCR_ULINE Scroll up a line. - REQ_SCR_DLINE Scroll down a line. - REQ_SCR_DPAGE Scroll down a page. - REQ_SCR_UPAGE Scroll up a page. - REQ_FIRST_ITEM Move to the first item. - REQ_LAST_ITEM Move to the last item. - REQ_NEXT_ITEM Move to the next item. - REQ_PREV_ITEM Move to the previous item. - REQ_TOGGLE_ITEM Select/deselect an item. - REQ_CLEAR_PATTERN Clear the menu pattern buffer. - REQ_BACK_PATTERN Delete the previous character from the pattern buffer. - REQ_NEXT_MATCH Move to the next item matching the pattern match. - REQ_PREV_MATCH Move to the previous item matching the pattern match. -</pre> - - <p>Don't get overwhelmed by the number of options. We will - see them slowly one after another. The options of interest - in this example are REQ_UP_ITEM and REQ_DOWN_ITEM. These - two options when passed to menu_driver, menu driver updates - the current item to one item up or down respectively.</p> - </div> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="MENUDRIVER" id= - "MENUDRIVER">17.3. Menu Driver: The work horse of the menu - system</a></h3> - - <p>As you have seen in the above example, menu_driver plays - an important role in updating the menu. It is very - important to understand various options it takes and what - they do. As explained above, the second parameter to - menu_driver() can be either a navigational request, a - printable character or a KEY_MOUSE key. Let's dissect the - different navigational requests.</p> - - <ul> - <li> - <p><span class="emphasis"><i class= - "EMPHASIS">REQ_LEFT_ITEM and - REQ_RIGHT_ITEM</i></span></p> - - <p>A Menu can be displayed with multiple columns for - more than one item. This can be done by using the - <tt class="LITERAL">menu_format()</tt>function. When a - multi columnar menu is displayed these requests cause - the menu driver to move the current selection to left - or right.</p> - </li> - - <li> - <p><span class="emphasis"><i class= - "EMPHASIS">REQ_UP_ITEM and REQ_DOWN_ITEM</i></span></p> - - <p>These two options you have seen in the above - example. These options when given, makes the - menu_driver to move the current selection to an item up - or down.</p> - </li> - - <li> - <p><span class="emphasis"><i class="EMPHASIS">REQ_SCR_* - options</i></span></p> - - <p>The four options REQ_SCR_ULINE, REQ_SCR_DLINE, - REQ_SCR_DPAGE, REQ_SCR_UPAGE are related to scrolling. - If all the items in the menu cannot be displayed in the - menu sub window, then the menu is scrollable. These - requests can be given to the menu_driver to do the - scrolling either one line up, down or one page down or - up respectively.</p> - </li> - - <li> - <p><span class="emphasis"><i class= - "EMPHASIS">REQ_FIRST_ITEM, REQ_LAST_ITEM, REQ_NEXT_ITEM - and REQ_PREV_ITEM</i></span></p> - - <p>These requests are self explanatory.</p> - </li> - - <li> - <p><span class="emphasis"><i class= - "EMPHASIS">REQ_TOGGLE_ITEM</i></span></p> - - <p>This request when given, toggles the present - selection. This option is to be used only in a multi - valued menu. So to use this request the option - O_ONEVALUE must be off. This option can be made off or - on with set_menu_opts().</p> - </li> - - <li> - <p><span class="emphasis"><i class="EMPHASIS">Pattern - Requests</i></span></p> - - <p>Every menu has an associated pattern buffer, which - is used to find the nearest match to the ascii - characters entered by the user. Whenever ascii - characters are given to menu_driver, it puts in to the - pattern buffer. It also tries to find the nearest match - to the pattern in the items list and moves current - selection to that item. The request REQ_CLEAR_PATTERN - clears the pattern buffer. The request REQ_BACK_PATTERN - deletes the previous character in the pattern buffer. - In case the pattern matches more than one item then the - matched items can be cycled through REQ_NEXT_MATCH and - REQ_PREV_MATCH which move the current selection to the - next and previous matches respectively.</p> - </li> - - <li> - <p><span class="emphasis"><i class="EMPHASIS">Mouse - Requests</i></span></p> - - <p>In case of KEY_MOUSE requests, according to the - mouse position an action is taken accordingly. The - action to be taken is explained in the man page as,</p> - <pre class="PROGRAMLISTING"> -<span class="emphasis"><i class= -"EMPHASIS"> If the second argument is the KEY_MOUSE special key, the - associated mouse event is translated into one of the above - pre-defined requests. Currently only clicks in the user - window (e.g. inside the menu display area or the decora­ - tion window) are handled. If you click above the display - region of the menu, a REQ_SCR_ULINE is generated, if you - doubleclick a REQ_SCR_UPAGE is generated and if you - tripleclick a REQ_FIRST_ITEM is generated. If you click - below the display region of the menu, a REQ_SCR_DLINE is - generated, if you doubleclick a REQ_SCR_DPAGE is generated - and if you tripleclick a REQ_LAST_ITEM is generated. If - you click at an item inside the display area of the menu, - the menu cursor is positioned to that item.</i></span> -</pre> - </li> - </ul> - - <p>Each of the above requests will be explained in the - following lines with several examples whenever - appropriate.</p> - </div> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="MENUWINDOWS" id= - "MENUWINDOWS">17.4. Menu Windows</a></h3> - - <p>Every menu created is associated with a window and a sub - window. The menu window displays any title or border - associated with the menu. The menu sub window displays the - menu items currently available for selection. But we didn't - specify any window or sub window in the simple example. - When a window is not specified, stdscr is taken as the main - window, and then menu system calculates the sub window size - required for the display of items. Then items are displayed - in the calculated sub window. So let's play with these - windows and display a menu with a border and a title.</p> - - <div class="EXAMPLE"> - <a name="MMEWI" id="MMEWI"></a> - - <p><b>Example 19. Menu Windows Usage example</b></p> - <pre class="PROGRAMLISTING"> -<span class="INLINEMEDIAOBJECT">#include <menu.h> - -#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) -#define CTRLD 4 - -char *choices[] = { - "Choice 1", - "Choice 2", - "Choice 3", - "Choice 4", - "Exit", - (char *)NULL, - }; -void print_in_middle(WINDOW *win, int starty, int startx, int width, char *string, chtype color); - -int main() -{ ITEM **my_items; - int c; - MENU *my_menu; - WINDOW *my_menu_win; - int n_choices, i; - - /* Initialize curses */ - initscr(); - start_color(); - cbreak(); - noecho(); - keypad(stdscr, TRUE); - init_pair(1, COLOR_RED, COLOR_BLACK); - - /* Create items */ - n_choices = ARRAY_SIZE(choices); - my_items = (ITEM **)calloc(n_choices, sizeof(ITEM *)); - for(i = 0; i < n_choices; ++i) - my_items[i] = new_item(choices[i], choices[i]); - - /* Crate menu */ - my_menu = new_menu((ITEM **)my_items); - - /* Create the window to be associated with the menu */ - my_menu_win = newwin(10, 40, 4, 4); - keypad(my_menu_win, TRUE); - - /* Set main window and sub window */ - set_menu_win(my_menu, my_menu_win); - set_menu_sub(my_menu, derwin(my_menu_win, 6, 38, 3, 1)); - - /* Set menu mark to the string " * " */ - set_menu_mark(my_menu, " * "); - - /* Print a border around the main window and print a title */ - box(my_menu_win, 0, 0); - print_in_middle(my_menu_win, 1, 0, 40, "My Menu", COLOR_PAIR(1)); - mvwaddch(my_menu_win, 2, 0, ACS_LTEE); - mvwhline(my_menu_win, 2, 1, ACS_HLINE, 38); - mvwaddch(my_menu_win, 2, 39, ACS_RTEE); - mvprintw(LINES - 2, 0, "F1 to exit"); - refresh(); - - /* Post the menu */ - post_menu(my_menu); - wrefresh(my_menu_win); - - while((c = wgetch(my_menu_win)) != KEY_F(1)) - { switch(c) - { case KEY_DOWN: - menu_driver(my_menu, REQ_DOWN_ITEM); - break; - case KEY_UP: - menu_driver(my_menu, REQ_UP_ITEM); - break; - } - wrefresh(my_menu_win); - } - - /* Unpost and free all the memory taken up */ - unpost_menu(my_menu); - free_menu(my_menu); - for(i = 0; i < n_choices; ++i) - free_item(my_items[i]); - endwin(); -} - -void print_in_middle(WINDOW *win, int starty, int startx, int width, char *string, chtype color) -{ int length, x, y; - float temp; - - if(win == NULL) - win = stdscr; - getyx(win, y, x); - if(startx != 0) - x = startx; - if(starty != 0) - y = starty; - if(width == 0) - width = 80; - - length = strlen(string); - temp = (width - length)/ 2; - x = startx + (int)temp; - wattron(win, color); - mvwprintw(win, y, x, "%s", string); - wattroff(win, color); - refresh(); -}</span> -</pre> - </div> - - <p>This example creates a menu with a title, border, a - fancy line separating title and the items. As you can see, - in order to attach a window to a menu the function - set_menu_win() has to be used. Then we attach the sub - window also. This displays the items in the sub window. You - can also set the mark string which gets displayed to the - left of the selected item with set_menu_mark().</p> - </div> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="SCROLLMENUS" id= - "SCROLLMENUS">17.5. Scrolling Menus</a></h3> - - <p>If the sub window given for a window is not big enough - to show all the items, then the menu will be scrollable. - When you are on the last item in the present list, if you - send REQ_DOWN_ITEM, it gets translated into REQ_SCR_DLINE - and the menu scrolls by one item. You can manually give - REQ_SCR_ operations to do scrolling. Let's see how it can - be done.</p> - - <div class="EXAMPLE"> - <a name="MMESC" id="MMESC"></a> - - <p><b>Example 20. Scrolling Menus example</b></p> - <pre class="PROGRAMLISTING"> -<span class="INLINEMEDIAOBJECT">#include <curses.h> -#include <menu.h> - -#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) -#define CTRLD 4 - -char *choices[] = { - "Choice 1", - "Choice 2", - "Choice 3", - "Choice 4", - "Choice 5", - "Choice 6", - "Choice 7", - "Choice 8", - "Choice 9", - "Choice 10", - "Exit", - (char *)NULL, - }; -void print_in_middle(WINDOW *win, int starty, int startx, int width, char *string, chtype color); - -int main() -{ ITEM **my_items; - int c; - MENU *my_menu; - WINDOW *my_menu_win; - int n_choices, i; - - /* Initialize curses */ - initscr(); - start_color(); - cbreak(); - noecho(); - keypad(stdscr, TRUE); - init_pair(1, COLOR_RED, COLOR_BLACK); - init_pair(2, COLOR_CYAN, COLOR_BLACK); - - /* Create items */ - n_choices = ARRAY_SIZE(choices); - my_items = (ITEM **)calloc(n_choices, sizeof(ITEM *)); - for(i = 0; i < n_choices; ++i) - my_items[i] = new_item(choices[i], choices[i]); - - /* Crate menu */ - my_menu = new_menu((ITEM **)my_items); - - /* Create the window to be associated with the menu */ - my_menu_win = newwin(10, 40, 4, 4); - keypad(my_menu_win, TRUE); - - /* Set main window and sub window */ - set_menu_win(my_menu, my_menu_win); - set_menu_sub(my_menu, derwin(my_menu_win, 6, 38, 3, 1)); - set_menu_format(my_menu, 5, 1); - - /* Set menu mark to the string " * " */ - set_menu_mark(my_menu, " * "); - - /* Print a border around the main window and print a title */ - box(my_menu_win, 0, 0); - print_in_middle(my_menu_win, 1, 0, 40, "My Menu", COLOR_PAIR(1)); - mvwaddch(my_menu_win, 2, 0, ACS_LTEE); - mvwhline(my_menu_win, 2, 1, ACS_HLINE, 38); - mvwaddch(my_menu_win, 2, 39, ACS_RTEE); - - /* Post the menu */ - post_menu(my_menu); - wrefresh(my_menu_win); - - attron(COLOR_PAIR(2)); - mvprintw(LINES - 2, 0, "Use PageUp and PageDown to scoll down or up a page of items"); - mvprintw(LINES - 1, 0, "Arrow Keys to navigate (F1 to Exit)"); - attroff(COLOR_PAIR(2)); - refresh(); - - while((c = wgetch(my_menu_win)) != KEY_F(1)) - { switch(c) - { case KEY_DOWN: - menu_driver(my_menu, REQ_DOWN_ITEM); - break; - case KEY_UP: - menu_driver(my_menu, REQ_UP_ITEM); - break; - case KEY_NPAGE: - menu_driver(my_menu, REQ_SCR_DPAGE); - break; - case KEY_PPAGE: - menu_driver(my_menu, REQ_SCR_UPAGE); - break; - } - wrefresh(my_menu_win); - } - - /* Unpost and free all the memory taken up */ - unpost_menu(my_menu); - free_menu(my_menu); - for(i = 0; i < n_choices; ++i) - free_item(my_items[i]); - endwin(); -} - -void print_in_middle(WINDOW *win, int starty, int startx, int width, char *string, chtype color) -{ int length, x, y; - float temp; - - if(win == NULL) - win = stdscr; - getyx(win, y, x); - if(startx != 0) - x = startx; - if(starty != 0) - y = starty; - if(width == 0) - width = 80; - - length = strlen(string); - temp = (width - length)/ 2; - x = startx + (int)temp; - wattron(win, color); - mvwprintw(win, y, x, "%s", string); - wattroff(win, color); - refresh(); -}</span> -</pre> - </div> - - <p>This program is self-explanatory. In this example the - number of choices has been increased to ten, which is - larger than our sub window size which can hold 6 items. - This message has to be explicitly conveyed to the menu - system with the function set_menu_format(). In here we - specify the number of rows and columns we want to be - displayed for a single page. We can specify any number of - items to be shown, in the rows variables, if it is less - than the height of the sub window. If the key pressed by - the user is a PAGE UP or PAGE DOWN, the menu is scrolled a - page due to the requests (REQ_SCR_DPAGE and REQ_SCR_UPAGE) - given to menu_driver().</p> - </div> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="MULTICOLUMN" id= - "MULTICOLUMN">17.6. Multi Columnar Menus</a></h3> - - <p>In the above example you have seen how to use the - function set_menu_format(). I didn't mention what the cols - variable (third parameter) does. Well, If your sub window - is wide enough, you can opt to display more than one item - per row. This can be specified in the cols variable. To - make things simpler, the following example doesn't show - descriptions for the items.</p> - - <div class="EXAMPLE"> - <a name="MMEMUCO" id="MMEMUCO"></a> - - <p><b>Example 21. Milt Columnar Menus Example</b></p> - <pre class="PROGRAMLISTING"> -<span class="INLINEMEDIAOBJECT">#include <curses.h> -#include <menu.h> - -#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) -#define CTRLD 4 - -char *choices[] = { - "Choice 1", "Choice 2", "Choice 3", "Choice 4", "Choice 5", - "Choice 6", "Choice 7", "Choice 8", "Choice 9", "Choice 10", - "Choice 11", "Choice 12", "Choice 13", "Choice 14", "Choice 15", - "Choice 16", "Choice 17", "Choice 18", "Choice 19", "Choice 20", - "Exit", - (char *)NULL, - }; - -int main() -{ ITEM **my_items; - int c; - MENU *my_menu; - WINDOW *my_menu_win; - int n_choices, i; - - /* Initialize curses */ - initscr(); - start_color(); - cbreak(); - noecho(); - keypad(stdscr, TRUE); - init_pair(1, COLOR_RED, COLOR_BLACK); - init_pair(2, COLOR_CYAN, COLOR_BLACK); - - /* Create items */ - n_choices = ARRAY_SIZE(choices); - my_items = (ITEM **)calloc(n_choices, sizeof(ITEM *)); - for(i = 0; i < n_choices; ++i) - my_items[i] = new_item(choices[i], choices[i]); - - /* Crate menu */ - my_menu = new_menu((ITEM **)my_items); - - /* Set menu option not to show the description */ - menu_opts_off(my_menu, O_SHOWDESC); - - /* Create the window to be associated with the menu */ - my_menu_win = newwin(10, 70, 4, 4); - keypad(my_menu_win, TRUE); - - /* Set main window and sub window */ - set_menu_win(my_menu, my_menu_win); - set_menu_sub(my_menu, derwin(my_menu_win, 6, 68, 3, 1)); - set_menu_format(my_menu, 5, 3); - set_menu_mark(my_menu, " * "); - - /* Print a border around the main window and print a title */ - box(my_menu_win, 0, 0); - - attron(COLOR_PAIR(2)); - mvprintw(LINES - 3, 0, "Use PageUp and PageDown to scroll"); - mvprintw(LINES - 2, 0, "Use Arrow Keys to navigate (F1 to Exit)"); - attroff(COLOR_PAIR(2)); - refresh(); - - /* Post the menu */ - post_menu(my_menu); - wrefresh(my_menu_win); - - while((c = wgetch(my_menu_win)) != KEY_F(1)) - { switch(c) - { case KEY_DOWN: - menu_driver(my_menu, REQ_DOWN_ITEM); - break; - case KEY_UP: - menu_driver(my_menu, REQ_UP_ITEM); - break; - case KEY_LEFT: - menu_driver(my_menu, REQ_LEFT_ITEM); - break; - case KEY_RIGHT: - menu_driver(my_menu, REQ_RIGHT_ITEM); - break; - case KEY_NPAGE: - menu_driver(my_menu, REQ_SCR_DPAGE); - break; - case KEY_PPAGE: - menu_driver(my_menu, REQ_SCR_UPAGE); - break; - } - wrefresh(my_menu_win); - } - - /* Unpost and free all the memory taken up */ - unpost_menu(my_menu); - free_menu(my_menu); - for(i = 0; i < n_choices; ++i) - free_item(my_items[i]); - endwin(); -}</span> -</pre> - </div> - - <p>Watch the function call to set_menu_format(). It - specifies the number of columns to be 3, thus displaying 3 - items per row. We have also switched off the showing - descriptions with the function menu_opts_off(). There are - couple of functions set_menu_opts(), menu_opts_on() and - menu_opts() which can be used to manipulate menu options. - The following menu options can be specified.</p> - <pre class="PROGRAMLISTING"> - O_ONEVALUE - Only one item can be selected for this menu. - - O_SHOWDESC - Display the item descriptions when the menu is - posted. - - O_ROWMAJOR - Display the menu in row-major order. - - O_IGNORECASE - Ignore the case when pattern-matching. - - O_SHOWMATCH - Move the cursor to within the item name while pat­ - tern-matching. - - O_NONCYCLIC - Don't wrap around next-item and previous-item, - requests to the other end of the menu. -</pre> - - <p>All options are on by default. You can switch specific - attributes on or off with menu_opts_on() and - menu_opts_off() functions. You can also use set_menu_opts() - to directly specify the options. The argument to this - function should be a OR ed value of some of those above - constants. The function menu_opts() can be used to find out - a menu's present options.</p> - </div> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="MULTIVALUEMENUS" id= - "MULTIVALUEMENUS">17.7. Multi Valued Menus</a></h3> - - <p>You might be wondering what if you switch off the option - O_ONEVALUE. Then the menu becomes multi-valued. That means - you can select more than one item. This brings us to the - request REQ_TOGGLE_ITEM. Let's see it in action.</p> - - <div class="EXAMPLE"> - <a name="MMETO" id="MMETO"></a> - - <p><b>Example 22. Multi Valued Menus example</b></p> - <pre class="PROGRAMLISTING"> -<span class="INLINEMEDIAOBJECT">#include <curses.h> -#include <menu.h> - -#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) -#define CTRLD 4 - -char *choices[] = { - "Choice 1", - "Choice 2", - "Choice 3", - "Choice 4", - "Choice 5", - "Choice 6", - "Choice 7", - "Exit", - }; - -int main() -{ ITEM **my_items; - int c; - MENU *my_menu; - int n_choices, i; - ITEM *cur_item; - - /* Initialize curses */ - initscr(); - cbreak(); - noecho(); - keypad(stdscr, TRUE); - - /* Initialize items */ - n_choices = ARRAY_SIZE(choices); - my_items = (ITEM **)calloc(n_choices + 1, sizeof(ITEM *)); - for(i = 0; i < n_choices; ++i) - my_items[i] = new_item(choices[i], choices[i]); - my_items[n_choices] = (ITEM *)NULL; - - my_menu = new_menu((ITEM **)my_items); - - /* Make the menu multi valued */ - menu_opts_off(my_menu, O_ONEVALUE); - - mvprintw(LINES - 3, 0, "Use <SPACE> to select or unselect an item."); - mvprintw(LINES - 2, 0, "<ENTER> to see presently selected items(F1 to Exit)"); - post_menu(my_menu); - refresh(); - - while((c = getch()) != KEY_F(1)) - { switch(c) - { case KEY_DOWN: - menu_driver(my_menu, REQ_DOWN_ITEM); - break; - case KEY_UP: - menu_driver(my_menu, REQ_UP_ITEM); - break; - case ' ': - menu_driver(my_menu, REQ_TOGGLE_ITEM); - break; - case 10: /* Enter */ - { char temp[200]; - ITEM **items; - - items = menu_items(my_menu); - temp[0] = '\0'; - for(i = 0; i < item_count(my_menu); ++i) - if(item_value(items[i]) == TRUE) - { strcat(temp, item_name(items[i])); - strcat(temp, " "); - } - move(20, 0); - clrtoeol(); - mvprintw(20, 0, temp); - refresh(); - } - break; - } - } - - free_item(my_items[0]); - free_item(my_items[1]); - free_menu(my_menu); - endwin(); -} - </span> -</pre> - </div> - - <p>Whew, A lot of new functions. Let's take them one after - another. Firstly, the REQ_TOGGLE_ITEM. In a multi-valued - menu, the user should be allowed to select or un select - more than one item. The request REQ_TOGGLE_ITEM toggles the - present selection. In this case when space is pressed - REQ_TOGGLE_ITEM request is sent to menu_driver to achieve - the result.</p> - - <p>Now when the user presses <ENTER> we show the - items he presently selected. First we find out the items - associated with the menu using the function menu_items(). - Then we loop through the items to find out if the item is - selected or not. The function item_value() returns TRUE if - an item is selected. The function item_count() returns the - number of items in the menu. The item name can be found - with item_name(). You can also find the description - associated with an item using item_description().</p> - </div> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="MENUOPT" id="MENUOPT">17.8. Menu - Options</a></h3> - - <p>Well, by this time you must be itching for some - difference in your menu, with lots of functionality. I - know. You want Colors !!!. You want to create nice menus - similar to those text mode <a href= - "http://www.jersey.net/~debinjoe/games/" target="_top">dos - games</a>. The functions set_menu_fore() and - set_menu_back() can be used to change the attribute of the - selected item and unselected item. The names are - misleading. They don't change menu's foreground or - background which would have been useless.</p> - - <p>The function set_menu_grey() can be used to set the - display attribute for the non-selectable items in the menu. - This brings us to the interesting option for an item the - one and only O_SELECTABLE. We can turn it off by the - function item_opts_off() and after that that item is not - selectable. It's like a grayed item in those fancy windows - menus. Let's put these concepts in practice with this - example</p> - - <div class="EXAMPLE"> - <a name="MMEAT" id="MMEAT"></a> - - <p><b>Example 23. Menu Options example</b></p> - <pre class="PROGRAMLISTING"> -<span class="INLINEMEDIAOBJECT">#include <menu.h> - -#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) -#define CTRLD 4 - -char *choices[] = { - "Choice 1", - "Choice 2", - "Choice 3", - "Choice 4", - "Choice 5", - "Choice 6", - "Choice 7", - "Exit", - }; - -int main() -{ ITEM **my_items; - int c; - MENU *my_menu; - int n_choices, i; - ITEM *cur_item; - - /* Initialize curses */ - initscr(); - start_color(); - cbreak(); - noecho(); - keypad(stdscr, TRUE); - init_pair(1, COLOR_RED, COLOR_BLACK); - init_pair(2, COLOR_GREEN, COLOR_BLACK); - init_pair(3, COLOR_MAGENTA, COLOR_BLACK); - - /* Initialize items */ - n_choices = ARRAY_SIZE(choices); - my_items = (ITEM **)calloc(n_choices + 1, sizeof(ITEM *)); - for(i = 0; i < n_choices; ++i) - my_items[i] = new_item(choices[i], choices[i]); - my_items[n_choices] = (ITEM *)NULL; - item_opts_off(my_items[3], O_SELECTABLE); - item_opts_off(my_items[6], O_SELECTABLE); - - /* Create menu */ - my_menu = new_menu((ITEM **)my_items); - - /* Set fore ground and back ground of the menu */ - set_menu_fore(my_menu, COLOR_PAIR(1) | A_REVERSE); - set_menu_back(my_menu, COLOR_PAIR(2)); - set_menu_grey(my_menu, COLOR_PAIR(3)); - - /* Post the menu */ - mvprintw(LINES - 3, 0, "Press <ENTER> to see the option selected"); - mvprintw(LINES - 2, 0, "Up and Down arrow keys to naviage (F1 to Exit)"); - post_menu(my_menu); - refresh(); - - while((c = getch()) != KEY_F(1)) - { switch(c) - { case KEY_DOWN: - menu_driver(my_menu, REQ_DOWN_ITEM); - break; - case KEY_UP: - menu_driver(my_menu, REQ_UP_ITEM); - break; - case 10: /* Enter */ - move(20, 0); - clrtoeol(); - mvprintw(20, 0, "Item selected is : %s", - item_name(current_item(my_menu))); - pos_menu_cursor(my_menu); - break; - } - } - unpost_menu(my_menu); - for(i = 0; i < n_choices; ++i) - free_item(my_items[i]); - free_menu(my_menu); - endwin(); -} - </span> -</pre> - </div> - </div> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="MENUUSERPTR" id= - "MENUUSERPTR">17.9. The useful User Pointer</a></h3> - - <p>We can associate a user pointer with each item in the - menu. It works the same way as user pointer in panels. It's - not touched by menu system. You can store any thing you - like in that. I usually use it to store the function to be - executed when the menu option is chosen (It's selected and - may be the user pressed <ENTER>);</p> - - <div class="EXAMPLE"> - <a name="MMEUS" id="MMEUS"></a> - - <p><b>Example 24. Menu User Pointer Usage</b></p> - <pre class="PROGRAMLISTING"> -<span class="INLINEMEDIAOBJECT">#include <curses.h> -#include <menu.h> - -#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) -#define CTRLD 4 - -char *choices[] = { - "Choice 1", - "Choice 2", - "Choice 3", - "Choice 4", - "Choice 5", - "Choice 6", - "Choice 7", - "Exit", - }; -void func(char *name); - -int main() -{ ITEM **my_items; - int c; - MENU *my_menu; - int n_choices, i; - ITEM *cur_item; - - /* Initialize curses */ - initscr(); - start_color(); - cbreak(); - noecho(); - keypad(stdscr, TRUE); - init_pair(1, COLOR_RED, COLOR_BLACK); - init_pair(2, COLOR_GREEN, COLOR_BLACK); - init_pair(3, COLOR_MAGENTA, COLOR_BLACK); - - /* Initialize items */ - n_choices = ARRAY_SIZE(choices); - my_items = (ITEM **)calloc(n_choices + 1, sizeof(ITEM *)); - for(i = 0; i < n_choices; ++i) - { my_items[i] = new_item(choices[i], choices[i]); - /* Set the user pointer */ - set_item_userptr(my_items[i], func); - } - my_items[n_choices] = (ITEM *)NULL; - - /* Create menu */ - my_menu = new_menu((ITEM **)my_items); - - /* Post the menu */ - mvprintw(LINES - 3, 0, "Press <ENTER> to see the option selected"); - mvprintw(LINES - 2, 0, "Up and Down arrow keys to naviage (F1 to Exit)"); - post_menu(my_menu); - refresh(); - - while((c = getch()) != KEY_F(1)) - { switch(c) - { case KEY_DOWN: - menu_driver(my_menu, REQ_DOWN_ITEM); - break; - case KEY_UP: - menu_driver(my_menu, REQ_UP_ITEM); - break; - case 10: /* Enter */ - { ITEM *cur; - void (*p)(char *); - - cur = current_item(my_menu); - p = item_userptr(cur); - p((char *)item_name(cur)); - pos_menu_cursor(my_menu); - break; - } - break; - } - } - unpost_menu(my_menu); - for(i = 0; i < n_choices; ++i) - free_item(my_items[i]); - free_menu(my_menu); - endwin(); -} - -void func(char *name) -{ move(20, 0); - clrtoeol(); - mvprintw(20, 0, "Item selected is : %s", name); -} </span> -</pre> - </div> - </div> - </div> - - <div class="SECT1"> - <hr> - - <h2 class="SECT1"><a name="FORMS" id="FORMS">18. Forms - Library</a></h2> - - <p>Well. If you have seen those forms on web pages which take - input from users and do various kinds of things, you might be - wondering how would any one create such forms in text mode - display. It's quite difficult to write those nifty forms in - plain ncurses. Forms library tries to provide a basic frame - work to build and maintain forms with ease. It has lot of - features(functions) which manage validation, dynamic - expansion of fields etc.. Let's see it in full flow.</p> - - <p>A form is a collection of fields; each field can be either - a label(static text) or a data-entry location. The forms also - library provides functions to divide forms into multiple - pages.</p> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="FORMBASICS" id= - "FORMBASICS">18.1. The Basics</a></h3> - - <p>Forms are created in much the same way as menus. First - the fields related to the form are created with - new_field(). You can set options for the fields, so that - they can be displayed with some fancy attributes, validated - before the field looses focus etc.. Then the fields are - attached to form. After this, the form can be posted to - display and is ready to receive inputs. On the similar - lines to menu_driver(), the form is manipulated with - form_driver(). We can send requests to form_driver to move - focus to a certain field, move cursor to end of the field - etc.. After the user enters values in the fields and - validation done, form can be unposted and memory allocated - can be freed.</p> - - <p>The general flow of control of a forms program looks - like this.</p> - - <ol type="1"> - <li> - <p>Initialize curses</p> - </li> - - <li> - <p>Create fields using new_field(). You can specify the - height and width of the field, and its position on the - form.</p> - </li> - - <li> - <p>Create the forms with new_form() by specifying the - fields to be attached with.</p> - </li> - - <li> - <p>Post the form with form_post() and refresh the - screen.</p> - </li> - - <li> - <p>Process the user requests with a loop and do - necessary updates to form with form_driver.</p> - </li> - - <li> - <p>Unpost the menu with form_unpost()</p> - </li> - - <li> - <p>Free the memory allocated to menu by free_form()</p> - </li> - - <li> - <p>Free the memory allocated to the items with - free_field()</p> - </li> - - <li> - <p>End curses</p> - </li> - </ol> - - <p>As you can see, working with forms library is much - similar to handling menu library. The following examples - will explore various aspects of form processing. Let's - start the journey with a simple example. first.</p> - </div> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="COMPILEFORMS" id= - "COMPILEFORMS">18.2. Compiling With the Forms - Library</a></h3> - - <p>To use forms library functions, you have to include - form.h and to link the program with forms library the flag - -lform should be added along with -lncurses in that - order.</p> - <pre class="PROGRAMLISTING"> - #include <form.h> - . - . - . - - compile and link: gcc <program file> -lform -lncurses -</pre> - - <div class="EXAMPLE"> - <a name="FFOSI" id="FFOSI"></a> - - <p><b>Example 25. Forms Basics</b></p> - <pre class="PROGRAMLISTING"> -<span class="INLINEMEDIAOBJECT">#include <form.h> - -int main() -{ FIELD *field[3]; - FORM *my_form; - int ch; - - /* Initialize curses */ - initscr(); - cbreak(); - noecho(); - keypad(stdscr, TRUE); - - /* Initialize the fields */ - field[0] = new_field(1, 10, 4, 18, 0, 0); - field[1] = new_field(1, 10, 6, 18, 0, 0); - field[2] = NULL; - - /* Set field options */ - set_field_back(field[0], A_UNDERLINE); /* Print a line for the option */ - field_opts_off(field[0], O_AUTOSKIP); /* Don't go to next field when this */ - /* Field is filled up */ - set_field_back(field[1], A_UNDERLINE); - field_opts_off(field[1], O_AUTOSKIP); - - /* Create the form and post it */ - my_form = new_form(field); - post_form(my_form); - refresh(); - - mvprintw(4, 10, "Value 1:"); - mvprintw(6, 10, "Value 2:"); - refresh(); - - /* Loop through to get user requests */ - while((ch = getch()) != KEY_F(1)) - { switch(ch) - { case KEY_DOWN: - /* Go to next field */ - form_driver(my_form, REQ_NEXT_FIELD); - /* Go to the end of the present buffer */ - /* Leaves nicely at the last character */ - form_driver(my_form, REQ_END_LINE); - break; - case KEY_UP: - /* Go to previous field */ - form_driver(my_form, REQ_PREV_FIELD); - form_driver(my_form, REQ_END_LINE); - break; - default: - /* If this is a normal character, it gets */ - /* Printed */ - form_driver(my_form, ch); - break; - } - } - - /* Un post form and free the memory */ - unpost_form(my_form); - free_form(my_form); - free_field(field[0]); - free_field(field[1]); - - endwin(); - return 0; -}</span> -</pre> - </div> - - <p>Above example is pretty straight forward. It creates two - fields with <tt class="LITERAL">new_field()</tt>. - new_field() takes height, width, starty, startx, number of - offscreen rows and number of additional working buffers. - The fifth argument number of offscreen rows specifies how - much of the field to be shown. If it is zero, the entire - field is always displayed otherwise the form will be - scrollable when the user accesses not displayed parts of - the field. The forms library allocates one buffer per field - to store the data user enters. Using the last parameter to - new_field() we can specify it to allocate some additional - buffers. These can be used for any purpose you like.</p> - - <p>After creating the fields, back ground attribute of both - of them is set to an underscore with set_field_back(). The - AUTOSKIP option is turned off using field_opts_off(). If - this option is turned on, focus will move to the next field - in the form once the active field is filled up - completely.</p> - - <p>After attaching the fields to the form, it is posted. - Here on, user inputs are processed in the while loop, by - making corresponding requests to form_driver. The details - of all the requests to the form_driver() are explained - later.</p> - </div> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="PLAYFIELDS" id= - "PLAYFIELDS">18.3. Playing with Fields</a></h3> - - <p>Each form field is associated with a lot of attributes. - They can be manipulated to get the required effect and to - have fun !!!. So why wait?</p> - - <div class="SECT3"> - <hr> - - <h4 class="SECT3"><a name="FETCHINFO" id= - "FETCHINFO">18.3.1. Fetching Size and Location of - Field</a></h4> - - <p>The parameters we have given at the time of creation - of a field can be retrieved with field_info(). It returns - height, width, starty, startx, number of offscreen rows, - and number of additional buffers into the parameters - given to it. It is a sort of inverse of new_field().</p> - <pre class="PROGRAMLISTING"> -int field_info( FIELD *field, /* field from which to fetch */ - int *height, *int width, /* field size */ - int *top, int *left, /* upper left corner */ - int *offscreen, /* number of offscreen rows */ - int *nbuf); /* number of working buffers */ -</pre> - </div> - - <div class="SECT3"> - <hr> - - <h4 class="SECT3"><a name="MOVEFIELD" id= - "MOVEFIELD">18.3.2. Moving the field</a></h4> - - <p>The location of the field can be moved to a different - position with move_field().</p> - <pre class="PROGRAMLISTING"> -int move_field( FIELD *field, /* field to alter */ - int top, int left); /* new upper-left corner */ -</pre> - - <p>As usual, the changed position can be queried with - field_infor().</p> - </div> - - <div class="SECT3"> - <hr> - - <h4 class="SECT3"><a name="JUSTIFYFIELD" id= - "JUSTIFYFIELD">18.3.3. Field Justification</a></h4> - - <p>The justification to be done for the field can be - fixed using the function set_field_just().</p> - <pre class="PROGRAMLISTING"> - int set_field_just(FIELD *field, /* field to alter */ - int justmode); /* mode to set */ - int field_just(FIELD *field); /* fetch justify mode of field */ -</pre> - - <p>The justification mode valued accepted and returned by - these functions are NO_JUSTIFICATION, JUSTIFY_RIGHT, - JUSTIFY_LEFT, or JUSTIFY_CENTER.</p> - </div> - - <div class="SECT3"> - <hr> - - <h4 class="SECT3"><a name="FIELDDISPATTRIB" id= - "FIELDDISPATTRIB">18.3.4. Field Display - Attributes</a></h4> - - <p>As you have seen, in the above example, display - attribute for the fields can be set with set_field_fore() - and setfield_back(). These functions set foreground and - background attribute of the fields. You can also specify - a pad character which will be filled in the unfilled - portion of the field. The pad character is set with a - call to set_field_pad(). Default pad value is a space. - The functions field_fore(), field_back, field_pad() can - be used to query the present foreground, background - attributes and pad character for the field. The following - list gives the usage of functions.</p> - <pre class="PROGRAMLISTING"> - int set_field_fore(FIELD *field, /* field to alter */ - chtype attr); /* attribute to set */ - -chtype field_fore(FIELD *field); /* field to query */ - /* returns foreground attribute */ - -int set_field_back(FIELD *field, /* field to alter */ - chtype attr); /* attribute to set */ - -chtype field_back(FIELD *field); /* field to query */ - /* returns background attribute */ - -int set_field_pad(FIELD *field, /* field to alter */ - int pad); /* pad character to set */ - -chtype field_pad(FIELD *field); /* field to query */ - /* returns present pad character */ -</pre> - - <p>Though above functions seem quite simple, using colors - with set_field_fore() may be frustrating in the - beginning. Let me first explain about foreground and - background attributes of a field. The foreground - attribute is associated with the character. That means a - character in the field is printed with the attribute you - have set with set_field_fore(). Background attribute is - the attribute used to fill background of field, whether - any character is there or not. So what about colors? - Since colors are always defined in pairs, what is the - right way to display colored fields? Here's an example - clarifying color attributes.</p> - - <div class="EXAMPLE"> - <a name="FFOAT" id="FFOAT"></a> - - <p><b>Example 26. Form Attributes example</b></p> - <pre class="PROGRAMLISTING"> -<span class="INLINEMEDIAOBJECT">#include <form.h> - -int main() -{ FIELD *field[3]; - FORM *my_form; - int ch; - - /* Initialize curses */ - initscr(); - start_color(); - cbreak(); - noecho(); - keypad(stdscr, TRUE); - - /* Initialize few color pairs */ - init_pair(1, COLOR_WHITE, COLOR_BLUE); - init_pair(2, COLOR_WHITE, COLOR_BLUE); - - /* Initialize the fields */ - field[0] = new_field(1, 10, 4, 18, 0, 0); - field[1] = new_field(1, 10, 6, 18, 0, 0); - field[2] = NULL; - - /* Set field options */ - set_field_fore(field[0], COLOR_PAIR(1));/* Put the field with blue background */ - set_field_back(field[0], COLOR_PAIR(2));/* and white foreground (characters */ - /* are printed in white */ - field_opts_off(field[0], O_AUTOSKIP); /* Don't go to next field when this */ - /* Field is filled up */ - set_field_back(field[1], A_UNDERLINE); - field_opts_off(field[1], O_AUTOSKIP); - - /* Create the form and post it */ - my_form = new_form(field); - post_form(my_form); - refresh(); - - set_current_field(my_form, field[0]); /* Set focus to the colored field */ - mvprintw(4, 10, "Value 1:"); - mvprintw(6, 10, "Value 2:"); - mvprintw(LINES - 2, 0, "Use UP, DOWN arrow keys to switch between fields"); - refresh(); - - /* Loop through to get user requests */ - while((ch = getch()) != KEY_F(1)) - { switch(ch) - { case KEY_DOWN: - /* Go to next field */ - form_driver(my_form, REQ_NEXT_FIELD); - /* Go to the end of the present buffer */ - /* Leaves nicely at the last character */ - form_driver(my_form, REQ_END_LINE); - break; - case KEY_UP: - /* Go to previous field */ - form_driver(my_form, REQ_PREV_FIELD); - form_driver(my_form, REQ_END_LINE); - break; - default: - /* If this is a normal character, it gets */ - /* Printed */ - form_driver(my_form, ch); - break; - } - } - - /* Un post form and free the memory */ - unpost_form(my_form); - free_form(my_form); - free_field(field[0]); - free_field(field[1]); - - endwin(); - return 0; -}</span> -</pre> - </div> - - <p>Play with the color pairs and try to understand the - foreground and background attributes. In my programs - using color attributes, I usually set only the background - with set_field_back(). Curses simply doesn't allow - defining individual color attributes.</p> - </div> - - <div class="SECT3"> - <hr> - - <h4 class="SECT3"><a name="FIELDOPTIONBITS" id= - "FIELDOPTIONBITS">18.3.5. Field Option Bits</a></h4> - - <p>There is also a large collection of field option bits - you can set to control various aspects of forms - processing. You can manipulate them with these - functions:</p> - <pre class="PROGRAMLISTING"> -int set_field_opts(FIELD *field, /* field to alter */ - int attr); /* attribute to set */ - -int field_opts_on(FIELD *field, /* field to alter */ - int attr); /* attributes to turn on */ - -int field_opts_off(FIELD *field, /* field to alter */ - int attr); /* attributes to turn off */ - -int field_opts(FIELD *field); /* field to query */ -</pre> - - <p>The function set_field_opts() can be used to directly - set attributes of a field or you can choose to switch a - few attributes on and off with field_opts_on() and - field_opts_off() selectively. Anytime you can query the - attributes of a field with field_opts(). The following is - the list of available options. By default, all options - are on.</p> - - <div class="VARIABLELIST"> - <dl> - <dt>O_VISIBLE</dt> - - <dd> - <p>Controls whether the field is visible on the - screen. Can be used during form processing to hide - or pop up fields depending on the value of parent - fields.</p> - </dd> - - <dt>O_ACTIVE</dt> - - <dd> - <p>Controls whether the field is active during - forms processing (i.e. visited by form navigation - keys). Can be used to make labels or derived fields - with buffer values alterable by the forms - application, not the user.</p> - </dd> - - <dt>O_PUBLIC</dt> - - <dd> - <p>Controls whether data is displayed during field - entry. If this option is turned off on a field, the - library will accept and edit data in that field, - but it will not be displayed and the visible field - cursor will not move. You can turn off the O_PUBLIC - bit to define password fields.</p> - </dd> - - <dt>O_EDIT</dt> - - <dd> - <p>Controls whether the field's data can be - modified. When this option is off, all editing - requests except <tt class= - "LITERAL">REQ_PREV_CHOICE</tt> and <tt class= - "LITERAL">REQ_NEXT_CHOICE</tt>will fail. Such - read-only fields may be useful for help - messages.</p> - </dd> - - <dt>O_WRAP</dt> - - <dd> - <p>Controls word-wrapping in multi-line fields. - Normally, when any character of a (blank-separated) - word reaches the end of the current line, the - entire word is wrapped to the next line (assuming - there is one). When this option is off, the word - will be split across the line break.</p> - </dd> - - <dt>O_BLANK</dt> - - <dd> - <p>Controls field blanking. When this option is on, - entering a character at the first field position - erases the entire field (except for the - just-entered character).</p> - </dd> - - <dt>O_AUTOSKIP</dt> - - <dd> - <p>Controls automatic skip to next field when this - one fills. Normally, when the forms user tries to - type more data into a field than will fit, the - editing location jumps to next field. When this - option is off, the user's cursor will hang at the - end of the field. This option is ignored in dynamic - fields that have not reached their size limit.</p> - </dd> - - <dt>O_NULLOK</dt> - - <dd> - <p>Controls whether validation is applied to blank - fields. Normally, it is not; the user can leave a - field blank without invoking the usual validation - check on exit. If this option is off on a field, - exit from it will invoke a validation check.</p> - </dd> - - <dt>O_PASSOK</dt> - - <dd> - <p>Controls whether validation occurs on every - exit, or only after the field is modified. Normally - the latter is true. Setting O_PASSOK may be useful - if your field's validation function may change - during forms processing.</p> - </dd> - - <dt>O_STATIC</dt> - - <dd> - <p>Controls whether the field is fixed to its - initial dimensions. If you turn this off, the field - becomes dynamic and will stretch to fit entered - data.</p> - </dd> - </dl> - </div> - - <p>A field's options cannot be changed while the field is - currently selected. However, options may be changed on - posted fields that are not current.</p> - - <p>The option values are bit-masks and can be composed - with logical-or in the obvious way. You have seen the - usage of switching off O_AUTOSKIP option. The following - example clarifies usage of some more options. Other - options are explained where appropriate.</p> - - <div class="EXAMPLE"> - <a name="FFOOP" id="FFOOP"></a> - - <p><b>Example 27. Field Options Usage example</b></p> - <pre class="PROGRAMLISTING"> -<span class="INLINEMEDIAOBJECT">#include <form.h> - -#define STARTX 15 -#define STARTY 4 -#define WIDTH 25 - -#define N_FIELDS 3 - -int main() -{ FIELD *field[N_FIELDS]; - FORM *my_form; - int ch, i; - - /* Initialize curses */ - initscr(); - cbreak(); - noecho(); - keypad(stdscr, TRUE); - - /* Initialize the fields */ - for(i = 0; i < N_FIELDS - 1; ++i) - field[i] = new_field(1, WIDTH, STARTY + i * 2, STARTX, 0, 0); - field[N_FIELDS - 1] = NULL; - - /* Set field options */ - set_field_back(field[1], A_UNDERLINE); /* Print a line for the option */ - - field_opts_off(field[0], O_ACTIVE); /* This field is a static label */ - field_opts_off(field[1], O_PUBLIC); /* This filed is like a password field*/ - field_opts_off(field[1], O_AUTOSKIP); /* To avoid entering the same field */ - /* after last character is entered */ - - /* Create the form and post it */ - my_form = new_form(field); - post_form(my_form); - refresh(); - - set_field_just(field[0], JUSTIFY_CENTER); /* Center Justification */ - set_field_buffer(field[0], 0, "This is a static Field"); - /* Initialize the field */ - mvprintw(STARTY, STARTX - 10, "Field 1:"); - mvprintw(STARTY + 2, STARTX - 10, "Field 2:"); - refresh(); - - /* Loop through to get user requests */ - while((ch = getch()) != KEY_F(1)) - { switch(ch) - { case KEY_DOWN: - /* Go to next field */ - form_driver(my_form, REQ_NEXT_FIELD); - /* Go to the end of the present buffer */ - /* Leaves nicely at the last character */ - form_driver(my_form, REQ_END_LINE); - break; - case KEY_UP: - /* Go to previous field */ - form_driver(my_form, REQ_PREV_FIELD); - form_driver(my_form, REQ_END_LINE); - break; - default: - /* If this is a normal character, it gets */ - /* Printed */ - form_driver(my_form, ch); - break; - } - } - - /* Un post form and free the memory */ - unpost_form(my_form); - free_form(my_form); - free_field(field[0]); - free_field(field[1]); - - endwin(); - return 0; -}</span> -</pre> - </div> - - <p>This example, though useless, shows the usage of - options. If used properly, they can present information - very effectively in a form. The second field being not - O_PUBLIC, does not show the characters you are - typing.</p> - </div> - - <div class="SECT3"> - <hr> - - <h4 class="SECT3"><a name="FIELDSTATUS" id= - "FIELDSTATUS">18.3.6. Field Status</a></h4> - - <p>The field status specifies whether the field has got - edited or not. It is initially set to FALSE and when user - enters something and the data buffer gets modified it - becomes TRUE. So a field's status can be queried to find - out whether it has been modified or not. The following - functions can assist in those operations.</p> - <pre class="PROGRAMLISTING"> -int set_field_status(FIELD *field, /* field to alter */ - int status); /* status to set */ - -int field_status(FIELD *field); /* fetch status of field */ -</pre> - - <p>It's better to check the field's status only after - after leaving the field, as data buffer might not have - been updated yet as the validation is still due. To - guarantee that right status is returned, call - field_status() either (1) in the field's exit validation - check routine, (2) from the field's or form's - initialization or termination hooks, or (3) just after a - REQ_VALIDATION request has been processed by the forms - driver</p> - </div> - - <div class="SECT3"> - <hr> - - <h4 class="SECT3"><a name="FIELDUSERPTR" id= - "FIELDUSERPTR">18.3.7. Field User Pointer</a></h4> - - <p>Every field structure contains one pointer that can be - used by the user for various purposes. It is not touched - by forms library and can be used for any purpose by the - user. The following functions set and fetch user - pointer.</p> - <pre class="PROGRAMLISTING"> -int set_field_userptr(FIELD *field, - char *userptr); /* the user pointer you wish to associate */ - /* with the field */ - -char *field_userptr(FIELD *field); /* fetch user pointer of the field */ -</pre> - </div> - - <div class="SECT3"> - <hr> - - <h4 class="SECT3"><a name="VARIABLESIZEFIELDS" id= - "VARIABLESIZEFIELDS">18.3.8. Variable-Sized - Fields</a></h4> - - <p>If you want a dynamically changing field with variable - width, this is the feature you want to put to full use. - This will allow the user to enter more data than the - original size of the field and let the field grow. - According to the field orientation it will scroll - horizontally or vertically to incorporate the new - data.</p> - - <p>To make a field dynamically growable, the option - O_STATIC should be turned off. This can be done with - a</p> - <pre class="PROGRAMLISTING"> - field_opts_off(field_pointer, O_STATIC); -</pre> - - <p>But it's usually not advisable to allow a field to - grow infinitely. You can set a maximum limit to the - growth of the field with</p> - <pre class="PROGRAMLISTING"> -int set_max_field(FIELD *field, /* Field on which to operate */ - int max_growth); /* maximum growth allowed for the field */ -</pre> - - <p>The field info for a dynamically growable field can be - retrieved by</p> - <pre class="PROGRAMLISTING"> -int dynamic_field_info( FIELD *field, /* Field on which to operate */ - int *prows, /* number of rows will be filled in this */ - int *pcols, /* number of columns will be filled in this*/ - int *pmax) /* maximum allowable growth will be filled */ - /* in this */ -</pre>Though field_info work as usual, it is advisable to use this -function to get the proper attributes of a dynamically growable -field. - - <p>Recall the library routine new_field; a new field - created with height set to one will be defined to be a - one line field. A new field created with height greater - than one will be defined to be a multi line field.</p> - - <p>A one line field with O_STATIC turned off (dynamically - growable field) will contain a single fixed row, but the - number of columns can increase if the user enters more - data than the initial field will hold. The number of - columns displayed will remain fixed and the additional - data will scroll horizontally.</p> - - <p>A multi line field with O_STATIC turned off - (dynamically growable field) will contain a fixed number - of columns, but the number of rows can increase if the - user enters more data than the initial field will hold. - The number of rows displayed will remain fixed and the - additional data will scroll vertically.</p> - - <p>The above two paragraphs pretty much describe a - dynamically growable field's behavior. The way other - parts of forms library behaves is described below:</p> - - <ol type="1"> - <li> - <p>The field option O_AUTOSKIP will be ignored if the - option O_STATIC is off and there is no maximum growth - specified for the field. Currently, O_AUTOSKIP - generates an automatic REQ_NEXT_FIELD form driver - request when the user types in the last character - position of a field. On a growable field with no - maximum growth specified, there is no last character - position. If a maximum growth is specified, the - O_AUTOSKIP option will work as normal if the field - has grown to its maximum size.</p> - </li> - - <li> - <p>The field justification will be ignored if the - option O_STATIC is off. Currently, set_field_just can - be used to JUSTIFY_LEFT, JUSTIFY_RIGHT, - JUSTIFY_CENTER the contents of a one line field. A - growable one line field will, by definition, grow and - scroll horizontally and may contain more data than - can be justified. The return from field_just will be - unchanged.</p> - </li> - - <li> - <p>The overloaded form driver request REQ_NEW_LINE - will operate the same way regardless of the - O_NL_OVERLOAD form option if the field option - O_STATIC is off and there is no maximum growth - specified for the field. Currently, if the form - option O_NL_OVERLOAD is on, REQ_NEW_LINE implicitly - generates a REQ_NEXT_FIELD if called from the last - line of a field. If a field can grow without bound, - there is no last line, so REQ_NEW_LINE will never - implicitly generate a REQ_NEXT_FIELD. If a maximum - growth limit is specified and the O_NL_OVERLOAD form - option is on, REQ_NEW_LINE will only implicitly - generate REQ_NEXT_FIELD if the field has grown to its - maximum size and the user is on the last line.</p> - </li> - - <li> - <p>The library call dup_field will work as usual; it - will duplicate the field, including the current - buffer size and contents of the field being - duplicated. Any specified maximum growth will also be - duplicated.</p> - </li> - - <li> - <p>The library call link_field will work as usual; it - will duplicate all field attributes and share buffers - with the field being linked. If the O_STATIC field - option is subsequently changed by a field sharing - buffers, how the system reacts to an attempt to enter - more data into the field than the buffer will - currently hold will depend on the setting of the - option in the current field.</p> - </li> - - <li> - <p>The library call field_info will work as usual; - the variable nrow will contain the value of the - original call to new_field. The user should use - dynamic_field_info, described above, to query the - current size of the buffer.</p> - </li> - </ol> - - <p>Some of the above points make sense only after - explaining form driver. We will be looking into that in - next few sections.</p> - </div> - </div> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="FORMWINDOWS" id= - "FORMWINDOWS">18.4. Form Windows</a></h3> - - <p>The form windows concept is pretty much similar to menu - windows. Every form is associated with a main window and a - sub window. The form main window displays any title or - border associated or whatever the user wishes. Then the sub - window contains all the fields and displays them according - to their position. This gives the flexibility of - manipulating fancy form displaying very easily.</p> - - <p>Since this is pretty much similar to menu windows, I am - providing an example with out much explanation. The - functions are similar and they work the same way.</p> - - <div class="EXAMPLE"> - <a name="FFOWI" id="FFOWI"></a> - - <p><b>Example 28. Form Windows Example</b></p> - <pre class="PROGRAMLISTING"> -<span class="INLINEMEDIAOBJECT">#include <form.h> - -void print_in_middle(WINDOW *win, int starty, int startx, int width, char *string, chtype color); - -int main() -{ - FIELD *field[3]; - FORM *my_form; - WINDOW *my_form_win; - int ch, rows, cols; - - /* Initialize curses */ - initscr(); - start_color(); - cbreak(); - noecho(); - keypad(stdscr, TRUE); - - /* Initialize few color pairs */ - init_pair(1, COLOR_RED, COLOR_BLACK); - - /* Initialize the fields */ - field[0] = new_field(1, 10, 6, 1, 0, 0); - field[1] = new_field(1, 10, 8, 1, 0, 0); - field[2] = NULL; - - /* Set field options */ - set_field_back(field[0], A_UNDERLINE); - field_opts_off(field[0], O_AUTOSKIP); /* Don't go to next field when this */ - /* Field is filled up */ - set_field_back(field[1], A_UNDERLINE); - field_opts_off(field[1], O_AUTOSKIP); - - /* Create the form and post it */ - my_form = new_form(field); - - /* Calculate the area required for the form */ - scale_form(my_form, &rows, &cols); - - /* Create the window to be associated with the form */ - my_form_win = newwin(rows + 4, cols + 4, 4, 4); - keypad(my_form_win, TRUE); - - /* Set main window and sub window */ - set_form_win(my_form, my_form_win); - set_form_sub(my_form, derwin(my_form_win, rows, cols, 2, 2)); - - /* Print a border around the main window and print a title */ - box(my_form_win, 0, 0); - print_in_middle(my_form_win, 1, 0, cols + 4, "My Form", COLOR_PAIR(1)); - - post_form(my_form); - wrefresh(my_form_win); - - mvprintw(LINES - 2, 0, "Use UP, DOWN arrow keys to switch between fields"); - refresh(); - - /* Loop through to get user requests */ - while((ch = wgetch(my_form_win)) != KEY_F(1)) - { switch(ch) - { case KEY_DOWN: - /* Go to next field */ - form_driver(my_form, REQ_NEXT_FIELD); - /* Go to the end of the present buffer */ - /* Leaves nicely at the last character */ - form_driver(my_form, REQ_END_LINE); - break; - case KEY_UP: - /* Go to previous field */ - form_driver(my_form, REQ_PREV_FIELD); - form_driver(my_form, REQ_END_LINE); - break; - default: - /* If this is a normal character, it gets */ - /* Printed */ - form_driver(my_form, ch); - break; - } - } - - /* Un post form and free the memory */ - unpost_form(my_form); - free_form(my_form); - free_field(field[0]); - free_field(field[1]); - - endwin(); - return 0; -} - -void print_in_middle(WINDOW *win, int starty, int startx, int width, char *string, chtype color) -{ int length, x, y; - float temp; - - if(win == NULL) - win = stdscr; - getyx(win, y, x); - if(startx != 0) - x = startx; - if(starty != 0) - y = starty; - if(width == 0) - width = 80; - - length = strlen(string); - temp = (width - length)/ 2; - x = startx + (int)temp; - wattron(win, color); - mvwprintw(win, y, x, "%s", string); - wattroff(win, color); - refresh(); -}</span> -</pre> - </div> - </div> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="FILEDVALIDATE" id= - "FILEDVALIDATE">18.5. Field Validation</a></h3> - - <p>By default, a field will accept any data input by the - user. It is possible to attach validation to the field. - Then any attempt by the user to leave the field, while it - contains data that doesn't match the validation type will - fail. Some validation types also have a character-validity - check for each time a character is entered in the - field.</p> - - <p>Validation can be attached to a field with the following - function.</p> - <pre class="PROGRAMLISTING"> -int set_field_type(FIELD *field, /* field to alter */ - FIELDTYPE *ftype, /* type to associate */ - ...); /* additional arguments*/ -</pre>Once set, the validation type for a field can be queried with - <pre class="PROGRAMLISTING"> -FIELDTYPE *field_type(FIELD *field); /* field to query */ -</pre> - - <p>The form driver validates the data in a field only when - data is entered by the end-user. Validation does not occur - when</p> - - <ul> - <li> - <p>the application program changes the field value by - calling set_field_buffer.</p> - </li> - - <li> - <p>linked field values are changed indirectly -- by - changing the field to which they are linked</p> - </li> - </ul> - - <p>The following are the pre-defined validation types. You - can also specify custom validation, though it's a bit - tricky and cumbersome.</p> - - <h1 class="BRIDGEHEAD"><a name="AEN1069" id= - "AEN1069"></a>TYPE_ALPHA</h1> - - <p>This field type accepts alphabetic data; no blanks, no - digits, no special characters (this is checked at - character-entry time). It is set up with:</p> - <pre class="PROGRAMLISTING"> -int set_field_type(FIELD *field, /* field to alter */ - TYPE_ALPHA, /* type to associate */ - int width); /* minimum width of field */ -</pre> - - <p>The width argument sets a minimum width of data. The - user has to enter at-least width number of characters - before he can leave the field. Typically you'll want to set - this to the field width; if it's greater than the field - width, the validation check will always fail. A minimum - width of zero makes field completion optional.</p> - - <h1 class="BRIDGEHEAD"><a name="AEN1073" id= - "AEN1073"></a>TYPE_ALNUM</h1> - - <p>This field type accepts alphabetic data and digits; no - blanks, no special characters (this is checked at - character-entry time). It is set up with:</p> - <pre class="PROGRAMLISTING"> -int set_field_type(FIELD *field, /* field to alter */ - TYPE_ALNUM, /* type to associate */ - int width); /* minimum width of field */ -</pre> - - <p>The width argument sets a minimum width of data. As with - TYPE_ALPHA, typically you'll want to set this to the field - width; if it's greater than the field width, the validation - check will always fail. A minimum width of zero makes field - completion optional.</p> - - <h1 class="BRIDGEHEAD"><a name="AEN1077" id= - "AEN1077"></a>TYPE_ENUM</h1> - - <p>This type allows you to restrict a field's values to be - among a specified set of string values (for example, the - two-letter postal codes for U.S. states). It is set up - with:</p> - <pre class="PROGRAMLISTING"> -int set_field_type(FIELD *field, /* field to alter */ - TYPE_ENUM, /* type to associate */ - char **valuelist; /* list of possible values */ - int checkcase; /* case-sensitive? */ - int checkunique); /* must specify uniquely? */ -</pre> - - <p>The valuelist parameter must point at a NULL-terminated - list of valid strings. The checkcase argument, if true, - makes comparison with the string case-sensitive.</p> - - <p>When the user exits a TYPE_ENUM field, the validation - procedure tries to complete the data in the buffer to a - valid entry. If a complete choice string has been entered, - it is of course valid. But it is also possible to enter a - prefix of a valid string and have it completed for you.</p> - - <p>By default, if you enter such a prefix and it matches - more than one value in the string list, the prefix will be - completed to the first matching value. But the checkunique - argument, if true, requires prefix matches to be unique in - order to be valid.</p> - - <p>The REQ_NEXT_CHOICE and REQ_PREV_CHOICE input requests - can be particularly useful with these fields.</p> - - <h1 class="BRIDGEHEAD"><a name="AEN1084" id= - "AEN1084"></a>TYPE_INTEGER</h1> - - <p>This field type accepts an integer. It is set up as - follows:</p> - <pre class="PROGRAMLISTING"> -int set_field_type(FIELD *field, /* field to alter */ - TYPE_INTEGER, /* type to associate */ - int padding, /* # places to zero-pad to */ - int vmin, int vmax); /* valid range */ -</pre> - - <p>Valid characters consist of an optional leading minus - and digits. The range check is performed on exit. If the - range maximum is less than or equal to the minimum, the - range is ignored.</p> - - <p>If the value passes its range check, it is padded with - as many leading zero digits as necessary to meet the - padding argument.</p> - - <p>A TYPE_INTEGER value buffer can conveniently be - interpreted with the C library function atoi(3).</p> - - <h1 class="BRIDGEHEAD"><a name="AEN1090" id= - "AEN1090"></a>TYPE_NUMERIC</h1> - - <p>This field type accepts a decimal number. It is set up - as follows:</p> - <pre class="PROGRAMLISTING"> -int set_field_type(FIELD *field, /* field to alter */ - TYPE_NUMERIC, /* type to associate */ - int padding, /* # places of precision */ - int vmin, int vmax); /* valid range */ -</pre> - - <p>Valid characters consist of an optional leading minus - and digits. possibly including a decimal point. The range - check is performed on exit. If the range maximum is less - than or equal to the minimum, the range is ignored.</p> - - <p>If the value passes its range check, it is padded with - as many trailing zero digits as necessary to meet the - padding argument.</p> - - <p>A TYPE_NUMERIC value buffer can conveniently be - interpreted with the C library function atof(3).</p> - - <h1 class="BRIDGEHEAD"><a name="AEN1096" id= - "AEN1096"></a>TYPE_REGEXP</h1> - - <p>This field type accepts data matching a regular - expression. It is set up as follows:</p> - <pre class="PROGRAMLISTING"> -int set_field_type(FIELD *field, /* field to alter */ - TYPE_REGEXP, /* type to associate */ - char *regexp); /* expression to match */ -</pre> - - <p>The syntax for regular expressions is that of - regcomp(3). The check for regular-expression match is - performed on exit.</p> - </div> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="FORMDRIVER" id= - "FORMDRIVER">18.6. Form Driver: The work horse of the forms - system</a></h3> - - <p>As in the menu system, form_driver() plays a very - important role in forms system. All types of requests to - forms system should be funneled through form_driver().</p> - <pre class="PROGRAMLISTING"> -int form_driver(FORM *form, /* form on which to operate */ - int request) /* form request code */ -</pre> - - <p>As you have seen some of the examples above, you have to - be in a loop looking for user input and then decide whether - it's a field data or a form request. The form requests are - then passed to form_driver() to do the work.</p> - - <p>The requests roughly can be divided into following - categories. Different requests and their usage is explained - below:</p> - - <div class="SECT3"> - <hr> - - <h4 class="SECT3"><a name="PAGENAVREQ" id= - "PAGENAVREQ">18.6.1. Page Navigation Requests</a></h4> - - <p>These requests cause page-level moves through the - form, triggering display of a new form screen. A form can - be made of multiple pages. If you have a big form with - lot of fields and logical sections, then you can divide - the form into pages. The function set_new_page() to set a - new page at the field specified.</p> - <pre class="PROGRAMLISTING"> -int set_new_page(FIELD *field,/* Field at which page break to be set or unset */ - bool new_page_flag); /* should be TRUE to put a break */ -</pre> - - <p>The following requests allow you to move to different - pages</p> - - <ul> - <li> - <p><span class="emphasis"><i class= - "EMPHASIS">REQ_NEXT_PAGE</i></span> Move to the next - form page.</p> - </li> - - <li> - <p><span class="emphasis"><i class= - "EMPHASIS">REQ_PREV_PAGE</i></span> Move to the - previous form page.</p> - </li> - - <li> - <p><span class="emphasis"><i class= - "EMPHASIS">REQ_FIRST_PAGE</i></span> Move to the - first form page.</p> - </li> - - <li> - <p><span class="emphasis"><i class= - "EMPHASIS">REQ_LAST_PAGE</i></span> Move to the last - form page.</p> - </li> - </ul> - - <p>These requests treat the list as cyclic; that is, - REQ_NEXT_PAGE from the last page goes to the first, and - REQ_PREV_PAGE from the first page goes to the last.</p> - </div> - - <div class="SECT3"> - <hr> - - <h4 class="SECT3"><a name="INTERFIELDNAVREQ" id= - "INTERFIELDNAVREQ">18.6.2. Inter-Field Navigation - Requests</a></h4> - - <p>These requests handle navigation between fields on the - same page.</p> - - <ul> - <li> - <p><span class="emphasis"><i class= - "EMPHASIS">REQ_NEXT_FIELD</i></span> Move to next - field.</p> - </li> - - <li> - <p><span class="emphasis"><i class= - "EMPHASIS">REQ_PREV_FIELD</i></span> Move to previous - field.</p> - </li> - - <li> - <p><span class="emphasis"><i class= - "EMPHASIS">REQ_FIRST_FIELD</i></span> Move to the - first field.</p> - </li> - - <li> - <p><span class="emphasis"><i class= - "EMPHASIS">REQ_LAST_FIELD</i></span> Move to the last - field.</p> - </li> - - <li> - <p><span class="emphasis"><i class= - "EMPHASIS">REQ_SNEXT_FIELD</i></span> Move to sorted - next field.</p> - </li> - - <li> - <p><span class="emphasis"><i class= - "EMPHASIS">REQ_SPREV_FIELD</i></span> Move to sorted - previous field.</p> - </li> - - <li> - <p><span class="emphasis"><i class= - "EMPHASIS">REQ_SFIRST_FIELD</i></span> Move to the - sorted first field.</p> - </li> - - <li> - <p><span class="emphasis"><i class= - "EMPHASIS">REQ_SLAST_FIELD</i></span> Move to the - sorted last field.</p> - </li> - - <li> - <p><span class="emphasis"><i class= - "EMPHASIS">REQ_LEFT_FIELD</i></span> Move left to - field.</p> - </li> - - <li> - <p><span class="emphasis"><i class= - "EMPHASIS">REQ_RIGHT_FIELD</i></span> Move right to - field.</p> - </li> - - <li> - <p><span class="emphasis"><i class= - "EMPHASIS">REQ_UP_FIELD</i></span> Move up to - field.</p> - </li> - - <li> - <p><span class="emphasis"><i class= - "EMPHASIS">REQ_DOWN_FIELD</i></span> Move down to - field.</p> - </li> - </ul> - - <p>These requests treat the list of fields on a page as - cyclic; that is, REQ_NEXT_FIELD from the last field goes - to the first, and REQ_PREV_FIELD from the first field - goes to the last. The order of the fields for these (and - the REQ_FIRST_FIELD and REQ_LAST_FIELD requests) is - simply the order of the field pointers in the form array - (as set up by new_form() or set_form_fields()</p> - - <p>It is also possible to traverse the fields as if they - had been sorted in screen-position order, so the sequence - goes left-to-right and top-to-bottom. To do this, use the - second group of four sorted-movement requests.</p> - - <p>Finally, it is possible to move between fields using - visual directions up, down, right, and left. To - accomplish this, use the third group of four requests. - Note, however, that the position of a form for purposes - of these requests is its upper-left corner.</p> - - <p>For example, suppose you have a multi-line field B, - and two single-line fields A and C on the same line with - B, with A to the left of B and C to the right of B. A - REQ_MOVE_RIGHT from A will go to B only if A, B, and C - all share the same first line; otherwise it will skip - over B to C.</p> - </div> - - <div class="SECT3"> - <hr> - - <h4 class="SECT3"><a name="INTRAFIELDNAVREQ" id= - "INTRAFIELDNAVREQ">18.6.3. Intra-Field Navigation - Requests</a></h4> - - <p>These requests drive movement of the edit cursor - within the currently selected field.</p> - - <ul> - <li> - <p><span class="emphasis"><i class= - "EMPHASIS">REQ_NEXT_CHAR</i></span> Move to next - character.</p> - </li> - - <li> - <p><span class="emphasis"><i class= - "EMPHASIS">REQ_PREV_CHAR</i></span> Move to previous - character.</p> - </li> - - <li> - <p><span class="emphasis"><i class= - "EMPHASIS">REQ_NEXT_LINE</i></span> Move to next - line.</p> - </li> - - <li> - <p><span class="emphasis"><i class= - "EMPHASIS">REQ_PREV_LINE</i></span> Move to previous - line.</p> - </li> - - <li> - <p><span class="emphasis"><i class= - "EMPHASIS">REQ_NEXT_WORD</i></span> Move to next - word.</p> - </li> - - <li> - <p><span class="emphasis"><i class= - "EMPHASIS">REQ_PREV_WORD</i></span> Move to previous - word.</p> - </li> - - <li> - <p><span class="emphasis"><i class= - "EMPHASIS">REQ_BEG_FIELD</i></span> Move to beginning - of field.</p> - </li> - - <li> - <p><span class="emphasis"><i class= - "EMPHASIS">REQ_END_FIELD</i></span> Move to end of - field.</p> - </li> - - <li> - <p><span class="emphasis"><i class= - "EMPHASIS">REQ_BEG_LINE</i></span> Move to beginning - of line.</p> - </li> - - <li> - <p><span class="emphasis"><i class= - "EMPHASIS">REQ_END_LINE</i></span> Move to end of - line.</p> - </li> - - <li> - <p><span class="emphasis"><i class= - "EMPHASIS">REQ_LEFT_CHAR</i></span> Move left in - field.</p> - </li> - - <li> - <p><span class="emphasis"><i class= - "EMPHASIS">REQ_RIGHT_CHAR</i></span> Move right in - field.</p> - </li> - - <li> - <p><span class="emphasis"><i class= - "EMPHASIS">REQ_UP_CHAR</i></span> Move up in - field.</p> - </li> - - <li> - <p><span class="emphasis"><i class= - "EMPHASIS">REQ_DOWN_CHAR</i></span> Move down in - field.</p> - </li> - </ul> - - <p>Each word is separated from the previous and next - characters by whitespace. The commands to move to - beginning and end of line or field look for the first or - last non-pad character in their ranges.</p> - </div> - - <div class="SECT3"> - <hr> - - <h4 class="SECT3"><a name="SCROLLREQ" id= - "SCROLLREQ">18.6.4. Scrolling Requests</a></h4> - - <p>Fields that are dynamic and have grown and fields - explicitly created with offscreen rows are scrollable. - One-line fields scroll horizontally; multi-line fields - scroll vertically. Most scrolling is triggered by editing - and intra-field movement (the library scrolls the field - to keep the cursor visible). It is possible to explicitly - request scrolling with the following requests:</p> - - <ul> - <li> - <p><span class="emphasis"><i class= - "EMPHASIS">REQ_SCR_FLINE</i></span> Scroll vertically - forward a line.</p> - </li> - - <li> - <p><span class="emphasis"><i class= - "EMPHASIS">REQ_SCR_BLINE</i></span> Scroll vertically - backward a line.</p> - </li> - - <li> - <p><span class="emphasis"><i class= - "EMPHASIS">REQ_SCR_FPAGE</i></span> Scroll vertically - forward a page.</p> - </li> - - <li> - <p><span class="emphasis"><i class= - "EMPHASIS">REQ_SCR_BPAGE</i></span> Scroll vertically - backward a page.</p> - </li> - - <li> - <p><span class="emphasis"><i class= - "EMPHASIS">REQ_SCR_FHPAGE</i></span> Scroll - vertically forward half a page.</p> - </li> - - <li> - <p><span class="emphasis"><i class= - "EMPHASIS">REQ_SCR_BHPAGE</i></span> Scroll - vertically backward half a page.</p> - </li> - - <li> - <p><span class="emphasis"><i class= - "EMPHASIS">REQ_SCR_FCHAR</i></span> Scroll - horizontally forward a character.</p> - </li> - - <li> - <p><span class="emphasis"><i class= - "EMPHASIS">REQ_SCR_BCHAR</i></span> Scroll - horizontally backward a character.</p> - </li> - - <li> - <p><span class="emphasis"><i class= - "EMPHASIS">REQ_SCR_HFLINE</i></span> Scroll - horizontally one field width forward.</p> - </li> - - <li> - <p><span class="emphasis"><i class= - "EMPHASIS">REQ_SCR_HBLINE</i></span> Scroll - horizontally one field width backward.</p> - </li> - - <li> - <p><span class="emphasis"><i class= - "EMPHASIS">REQ_SCR_HFHALF</i></span> Scroll - horizontally one half field width forward.</p> - </li> - - <li> - <p><span class="emphasis"><i class= - "EMPHASIS">REQ_SCR_HBHALF</i></span> Scroll - horizontally one half field width backward.</p> - </li> - </ul> - - <p>For scrolling purposes, a page of a field is the - height of its visible part.</p> - </div> - - <div class="SECT3"> - <hr> - - <h4 class="SECT3"><a name="EDITREQ" id="EDITREQ">18.6.5. - Editing Requests</a></h4> - - <p>When you pass the forms driver an ASCII character, it - is treated as a request to add the character to the - field's data buffer. Whether this is an insertion or a - replacement depends on the field's edit mode (insertion - is the default.</p> - - <p>The following requests support editing the field and - changing the edit mode:</p> - - <ul> - <li> - <p><span class="emphasis"><i class= - "EMPHASIS">REQ_INS_MODE</i></span> Set insertion - mode.</p> - </li> - - <li> - <p><span class="emphasis"><i class= - "EMPHASIS">REQ_OVL_MODE</i></span> Set overlay - mode.</p> - </li> - - <li> - <p><span class="emphasis"><i class= - "EMPHASIS">REQ_NEW_LINE</i></span> New line request - (see below for explanation).</p> - </li> - - <li> - <p><span class="emphasis"><i class= - "EMPHASIS">REQ_INS_CHAR</i></span> Insert space at - character location.</p> - </li> - - <li> - <p><span class="emphasis"><i class= - "EMPHASIS">REQ_INS_LINE</i></span> Insert blank line - at character location.</p> - </li> - - <li> - <p><span class="emphasis"><i class= - "EMPHASIS">REQ_DEL_CHAR</i></span> Delete character - at cursor.</p> - </li> - - <li> - <p><span class="emphasis"><i class= - "EMPHASIS">REQ_DEL_PREV</i></span> Delete previous - word at cursor.</p> - </li> - - <li> - <p><span class="emphasis"><i class= - "EMPHASIS">REQ_DEL_LINE</i></span> Delete line at - cursor.</p> - </li> - - <li> - <p><span class="emphasis"><i class= - "EMPHASIS">REQ_DEL_WORD</i></span> Delete word at - cursor.</p> - </li> - - <li> - <p><span class="emphasis"><i class= - "EMPHASIS">REQ_CLR_EOL</i></span> Clear to end of - line.</p> - </li> - - <li> - <p><span class="emphasis"><i class= - "EMPHASIS">REQ_CLR_EOF</i></span> Clear to end of - field.</p> - </li> - - <li> - <p><span class="emphasis"><i class= - "EMPHASIS">REQ_CLR_FIELD</i></span> Clear entire - field.</p> - </li> - </ul> - - <p>The behavior of the REQ_NEW_LINE and REQ_DEL_PREV - requests is complicated and partly controlled by a pair - of forms options. The special cases are triggered when - the cursor is at the beginning of a field, or on the last - line of the field.</p> - - <p>First, we consider REQ_NEW_LINE:</p> - - <p>The normal behavior of REQ_NEW_LINE in insert mode is - to break the current line at the position of the edit - cursor, inserting the portion of the current line after - the cursor as a new line following the current and moving - the cursor to the beginning of that new line (you may - think of this as inserting a newline in the field - buffer).</p> - - <p>The normal behavior of REQ_NEW_LINE in overlay mode is - to clear the current line from the position of the edit - cursor to end of line. The cursor is then moved to the - beginning of the next line.</p> - - <p>However, REQ_NEW_LINE at the beginning of a field, or - on the last line of a field, instead does a - REQ_NEXT_FIELD. O_NL_OVERLOAD option is off, this special - action is disabled.</p> - - <p>Now, let us consider REQ_DEL_PREV:</p> - - <p>The normal behavior of REQ_DEL_PREV is to delete the - previous character. If insert mode is on, and the cursor - is at the start of a line, and the text on that line will - fit on the previous one, it instead appends the contents - of the current line to the previous one and deletes the - current line (you may think of this as deleting a newline - from the field buffer).</p> - - <p>However, REQ_DEL_PREV at the beginning of a field is - instead treated as a REQ_PREV_FIELD.</p> - - <p>If the O_BS_OVERLOAD option is off, this special - action is disabled and the forms driver just returns - E_REQUEST_DENIED.</p> - </div> - - <div class="SECT3"> - <hr> - - <h4 class="SECT3"><a name="ORDERREQ" id= - "ORDERREQ">18.6.6. Order Requests</a></h4> - - <p>If the type of your field is ordered, and has - associated functions for getting the next and previous - values of the type from a given value, there are requests - that can fetch that value into the field buffer:</p> - - <ul> - <li> - <p><span class="emphasis"><i class= - "EMPHASIS">REQ_NEXT_CHOICE</i></span> Place the - successor value of the current value in the - buffer.</p> - </li> - - <li> - <p><span class="emphasis"><i class= - "EMPHASIS">REQ_PREV_CHOICE</i></span> Place the - predecessor value of the current value in the - buffer.</p> - </li> - </ul> - - <p>Of the built-in field types, only TYPE_ENUM has - built-in successor and predecessor functions. When you - define a field type of your own (see Custom Validation - Types), you can associate our own ordering functions.</p> - </div> - - <div class="SECT3"> - <hr> - - <h4 class="SECT3"><a name="APPLICCOMMANDS" id= - "APPLICCOMMANDS">18.6.7. Application Commands</a></h4> - - <p>Form requests are represented as integers above the - curses value greater than KEY_MAX and less than or equal - to the constant MAX_COMMAND. A value within this range - gets ignored by form_driver(). So this can be used for - any purpose by the application. It can be treated as an - application specific action and take corresponding - action.</p> - </div> - </div> - </div> - - <div class="SECT1"> - <hr> - - <h2 class="SECT1"><a name="TOOLS" id="TOOLS">19. Tools and - Widget Libraries</a></h2> - - <p>Now that you have seen the capabilities of ncurses and its - sister libraries, you are rolling your sleeves up and gearing - for a project that heavily manipulates screen. But wait.. It - can be pretty difficult to write and maintain complex GUI - widgets in plain ncurses or even with the additional - libraries. There are some ready-to-use tools and widget - libraries that can be used instead of writing your own - widgets. You can use some of them, get ideas from the code, - or even extend them.</p> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="CDK" id="CDK">19.1. CDK (Curses - Development Kit)</a></h3> - - <p>In the author's words</p> - - <p><span class="emphasis"><i class="EMPHASIS">CDK stands - for 'Curses Development Kit' and it currently contains 21 - ready to use widgets which facilitate the speedy - development of full screen curses programs.</i></span></p> - - <p>The kit provides some useful widgets, which can be used - in your programs directly. It's pretty well written and the - documentation is very good. The examples in the examples - directory can be a good place to start for beginners. The - CDK can be downloaded from <a href= - "https://invisible-island.net/cdk/" target= - "_top">https://invisible-island.net/cdk/</a> . Follow the - instructions in README file to install it.</p> - - <div class="SECT3"> - <hr> - - <h4 class="SECT3"><a name="WIDGETLIST" id= - "WIDGETLIST">19.1.1. Widget List</a></h4> - - <p>The following is the list of widgets provided with cdk - and their description.</p> - <pre class="PROGRAMLISTING"> -Widget Type Quick Description -=========================================================================== -Alphalist Allows a user to select from a list of words, with - the ability to narrow the search list by typing in a - few characters of the desired word. -Buttonbox This creates a multiple button widget. -Calendar Creates a little simple calendar widget. -Dialog Prompts the user with a message, and the user - can pick an answer from the buttons provided. -Entry Allows the user to enter various types of information. -File Selector A file selector built from Cdk base widgets. This - example shows how to create more complicated widgets - using the Cdk widget library. -Graph Draws a graph. -Histogram Draws a histogram. -Item List Creates a pop up field which allows the user to select - one of several choices in a small field. Very useful - for things like days of the week or month names. -Label Displays messages in a pop up box, or the label can be - considered part of the screen. -Marquee Displays a message in a scrolling marquee. -Matrix Creates a complex matrix with lots of options. -Menu Creates a pull-down menu interface. -Multiple Line Entry A multiple line entry field. Very useful - for long fields. (like a description - field) -Radio List Creates a radio button list. -Scale Creates a numeric scale. Used for allowing a user to - pick a numeric value and restrict them to a range of - values. -Scrolling List Creates a scrolling list/menu list. -Scrolling Window Creates a scrolling log file viewer. Can add - information into the window while its running. - A good widget for displaying the progress of - something. (akin to a console window) -Selection List Creates a multiple option selection list. -Slider Akin to the scale widget, this widget provides a - visual slide bar to represent the numeric value. -Template Creates a entry field with character sensitive - positions. Used for pre-formatted fields like - dates and phone numbers. -Viewer This is a file/information viewer. Very useful - when you need to display loads of information. -=========================================================================== -</pre> - - <p>A few of the widgets are modified by Thomas Dickey in - recent versions.</p> - </div> - - <div class="SECT3"> - <hr> - - <h4 class="SECT3"><a name="CDKATTRACT" id= - "CDKATTRACT">19.1.2. Some Attractive Features</a></h4> - - <p>Apart from making our life easier with readily usable - widgets, cdk solves one frustrating problem with printing - multi colored strings, justified strings elegantly. - Special formatting tags can be embedded in the strings - which are passed to CDK functions. For Example</p> - - <p>If the string</p> - <pre class="PROGRAMLISTING"> -"</B/1>This line should have a yellow foreground and a blue -background.<!1>" -</pre> - - <p>given as a parameter to newCDKLabel(), it prints the - line with yellow foreground and blue background. There - are other tags available for justifying string, embedding - special drawing characters etc.. Please refer to the man - page cdk_display(3X) for details. The man page explains - the usage with nice examples.</p> - </div> - - <div class="SECT3"> - <hr> - - <h4 class="SECT3"><a name="CDKCONCLUSION" id= - "CDKCONCLUSION">19.1.3. Conclusion</a></h4> - - <p>All in all, CDK is a well-written package of widgets, - which if used properly can form a strong frame work for - developing complex GUI.</p> - </div> - </div> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="DIALOG" id="DIALOG">19.2. The - dialog</a></h3> - - <p>Long long ago, in September 1994, when few people knew - linux, Jeff Tranter wrote an <a href= - "http://www2.linuxjournal.com/lj-issues/issue5/2807.html" - target="_top">article</a> on dialog in Linux Journal. He - starts the article with these words..</p> - - <p><span class="emphasis"><i class="EMPHASIS">Linux is - based on the Unix operating system, but also features a - number of unique and useful kernel features and application - programs that often go beyond what is available under Unix. - One little-known gem is "dialog", a utility for creating - professional-looking dialog boxes from within shell - scripts. This article presents a tutorial introduction to - the dialog utility, and shows examples of how and where it - can be used</i></span></p> - - <p>As he explains, dialog is a real gem in making - professional-looking dialog boxes with ease. It creates a - variety of dialog boxes, menus, check lists etc.. It is - usually installed by default. If not, you can download it - from <a href="https://invisible-island.net/dialog/" target= - "_top">Thomas Dickey</a>'s site.</p> - - <p>The above-mentioned article gives a very good overview - of its uses and capabilites. The man page has more details. - It can be used in variety of situations. One good example - is building of linux kernel in text mode. Linux kernel uses - a modified version of dialog tailored for its needs.</p> - - <p>dialog was initially designed to be used with shell - scripts. If you want to use its functionality in a c - program, then you can use libdialog. The documentation - regarding this is sparse. Definitive reference is the - dialog.h header file which comes with the library. You may - need to hack here and there to get the required output. The - source is easily customizable. I have used it on a number - of occasions by modifying the code.</p> - </div> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="PERLCURSES" id= - "PERLCURSES">19.3. Perl Curses Modules CURSES::FORM and - CURSES::WIDGETS</a></h3> - - <p>The perl module Curses, Curses::Form and Curses::Widgets - give access to curses from perl. If you have curses and - basic perl is installed, you can get these modules from - <a href="http://www.cpan.org/modules/01modules.index.html" - target="_top">CPAN All Modules page</a>. Get the three - zipped modules in the Curses category. Once installed you - can use these modules from perl scripts like any other - module. For more information on perl modules see perlmod - man page. The above modules come with good documentation - and they have some demo scripts to test the functionality. - Though the widgets provided are very rudimentary, these - modules provide good access to curses library from - perl.</p> - - <p>Some of my code examples are converted to perl by - Anuradha Ratnaweera and they are available in the - <tt class="LITERAL">perl</tt> directory.</p> - - <p>For more information see man pages Curses(3) , - Curses::Form(3) and Curses::Widgets(3). These pages are - installed only when the above modules are acquired and - installed.</p> - </div> - </div> - - <div class="SECT1"> - <hr> - - <h2 class="SECT1"><a name="JUSTFORFUN" id="JUSTFORFUN">20. - Just For Fun !!!</a></h2> - - <p>This section contains few programs written by me just for - fun. They don't signify a better programming practice or the - best way of using ncurses. They are provided here so as to - allow beginners to get ideas and add more programs to this - section. If you have written a couple of nice, simple - programs in curses and want them to included here, contact - <a href="mailto:ppadala@gmail.com" target="_top">me</a>.</p> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="GAMEOFLIFE" id= - "GAMEOFLIFE">20.1. The Game of Life</a></h3> - - <p>Game of life is a wonder of math. In <a href= - "http://www.math.com/students/wonders/life/life.html" - target="_top">Paul Callahan</a>'s words</p> - <pre class="PROGRAMLISTING"> -<span class="emphasis"><i class= -"EMPHASIS">The Game of Life (or simply Life) is not a game in the conventional sense. There -are no players, and no winning or losing. Once the "pieces" are placed in the -starting position, the rules determine everything that happens later. -Nevertheless, Life is full of surprises! In most cases, it is impossible to look -at a starting position (or pattern) and see what will happen in the future. The -only way to find out is to follow the rules of the game.</i></span> -</pre> - - <p>This program starts with a simple inverted U pattern and - shows how wonderful life works. There is a lot of room for - improvement in the program. You can let the user enter - pattern of his choice or even take input from a file. You - can also change rules and play with a lot of variations. - Search on <a href="http://www.google.com" target= - "_top">google</a> for interesting information on game of - life.</p> - - <p><span class="emphasis"><i class="EMPHASIS">File Path: - JustForFun/life.c</i></span></p> - </div> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="MAGIC" id="MAGIC">20.2. Magic - Square</a></h3> - - <p>Magic Square, another wonder of math, is very simple to - understand but very difficult to make. In a magic square - sum of the numbers in each row, each column is equal. Even - diagnol sum can be equal. There are many variations which - have special properties.</p> - - <p>This program creates a simple magic square of odd - order.</p> - - <p><span class="emphasis"><i class="EMPHASIS">File Path: - JustForFun/magic.c</i></span></p> - </div> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="HANOI" id="HANOI">20.3. Towers - of Hanoi</a></h3> - - <p>The famous towers of hanoi solver. The aim of the game - is to move the disks on the first peg to last peg, using - middle peg as a temporary stay. The catch is not to place a - larger disk over a small disk at any time.</p> - - <p><span class="emphasis"><i class="EMPHASIS">File Path: - JustForFun/hanoi.c</i></span></p> - </div> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="QUEENS" id="QUEENS">20.4. Queens - Puzzle</a></h3> - - <p>The objective of the famous N-Queen puzzle is to put N - queens on a N X N chess board without attacking each - other.</p> - - <p>This program solves it with a simple backtracking - technique.</p> - - <p><span class="emphasis"><i class="EMPHASIS">File Path: - JustForFun/queens.c</i></span></p> - </div> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="SHUFFLE" id="SHUFFLE">20.5. - Shuffle</a></h3> - - <p>A fun game, if you have time to kill.</p> - - <p><span class="emphasis"><i class="EMPHASIS">File Path: - JustForFun/shuffle.c</i></span></p> - </div> - - <div class="SECT2"> - <hr> - - <h3 class="SECT2"><a name="TT" id="TT">20.6. Typing - Tutor</a></h3> - - <p>A simple typing tutor, I created more out of need than - for ease of use. If you know how to put your fingers - correctly on the keyboard, but lack practice, this can be - helpful.</p> - - <p><span class="emphasis"><i class="EMPHASIS">File Path: - JustForFun/tt.c</i></span></p> - </div> - </div> - - <div class="SECT1"> - <hr> - - <h2 class="SECT1"><a name="REF" id="REF">21. - References</a></h2> - - <ul> - <li> - <p>NCURSES man pages</p> - </li> - - <li> - <p>NCURSES FAQ at <a href= - "https://invisible-island.net/ncurses/ncurses.faq.html" - target= - "_top">https://invisible-island.net/ncurses/ncurses.faq.html</a></p> - </li> - - <li> - <p>Writing programs with NCURSES by Eric Raymond and Zeyd - M. Ben-Halim at <a href= - "https://invisible-island.net/ncurses/ncurses-intro.html" - target= - "_top">https://invisible-island.net/ncurses/ncurses-intro.html</a> - - somewhat obsolete. I was inspired by this document and - the structure of this HOWTO follows from the original - document</p> - </li> - </ul> - </div> - </div> -</body> -</html> diff --git contrib/ncurses/doc/html/announce.html contrib/ncurses/doc/html/announce.html deleted file mode 100644 index 699372019b83..000000000000 --- contrib/ncurses/doc/html/announce.html +++ /dev/null @@ -1,2220 +0,0 @@ -<!-- - $Id: announce.html,v 1.64 2020/10/19 08:18:48 tom Exp $ - **************************************************************************** - * Copyright 2018-2019,2020 Thomas E. Dickey * - * * - * Permission is hereby granted, free of charge, to any person obtaining a * - * copy of this software and associated documentation files (the * - * "Software"), to deal in the Software without restriction, including * - * without limitation the rights to use, copy, modify, merge, publish, * - * distribute, distribute with modifications, sublicense, and/or sell * - * copies of the Software, and to permit persons to whom the Software is * - * furnished to do so, subject to the following conditions: * - * * - * The above copyright notice and this permission notice shall be included * - * in all copies or substantial portions of the Software. * - * * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * - * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * - * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * * - * Except as contained in this notice, the name(s) of the above copyright * - * holders shall not be used in advertising or otherwise to promote the * - * sale, use or other dealings in this Software without prior written * - * authorization. * - **************************************************************************** ---> -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> - -<html> -<head> - <meta name="generator" content= - "HTML Tidy for HTML5 for Linux version 5.2.0"> - - <title>Announcing ncurses 6.2</title> - <link rel="author" href="mailto:bug-ncurses@gnu.org"> - <meta http-equiv="Content-Type" content= - "text/html; charset=us-ascii"> - <style type="text/css"> - p,li { max-width:700px; } - dd { max-width:630px; } - *.main-name { - font-style: italic; - font-variant: small-caps; - } - *.part-name { - font-family: "Andale Mono", "Monotype.com", monospace; - font-size: 12pt; - font-weight: bold; - } - *.demo-name { - font-family: "Andale Mono", "Monotype.com", monospace; - font-size: 10pt; - } - </style> -</head> - -<body> - <h1 class="no-header">Announcing ncurses 6.2</h1> - - <h2><a name="h2-overview" id="h2-overview">Overview</a></h2> - - <p>The <span class="main-name">ncurses</span> (new curses) - library is a free software emulation of curses in System V - Release 4.0 (SVr4), and more. It uses terminfo format, supports - pads and color and multiple highlights and forms characters and - function-key mapping, and has all the other SVr4-curses - enhancements over BSD curses. SVr4 curses became the basis of - X/Open Curses.</p> - - <p>In mid-June 1995, the maintainer of 4.4BSD curses declared - that he considered 4.4BSD curses obsolete, and encouraged the - keepers of <span class="main-name">unix</span> releases such as - BSD/OS, FreeBSD and NetBSD to switch over to <span class= - "main-name">ncurses</span>.</p> - - <p>Since 1995, <span class="main-name">ncurses</span> has been - ported to many systems:</p> - - <ul> - <li>It is used in almost every system based on the Linux kernel - (aside from some embedded applications).</li> - - <li>It is used as the system curses library on OpenBSD, FreeBSD - and MacOS.</li> - - <li>It is used in environments such as Cygwin and MinGW. The - first of these was EMX on OS/2 Warp.</li> - - <li>It is used (though usually not as the <em>system</em> - curses) on all of the vendor <span class= - "main-name">unix</span> systems, e.g., AIX, HP-UX, IRIX64, SCO, - Solaris, Tru64.</li> - - <li>It should work readily on any ANSI/POSIX-conforming - <span class="main-name">unix</span>.</li> - </ul> - - <p>The distribution includes the library and support utilities, - including</p> - - <ul> - <li><a href= - "https://invisible-island.net/ncurses/man/captoinfo.1m.html"><span class="part-name"> - captoinfo</span></a>, a termcap conversion tool</li> - - <li><a href= - "https://invisible-island.net/ncurses/man/clear.1.html"><span class="part-name"> - clear</span></a>, utility for clearing the screen</li> - - <li><a href= - "https://invisible-island.net/ncurses/man/infocmp.1m.html"><span class="part-name"> - infocmp</span></a>, the terminfo decompiler</li> - - <li><a href= - "https://invisible-island.net/ncurses/man/tabs.1.html"><span class="part-name"> - tabs</span></a>, set tabs on a terminal</li> - - <li><a href= - "https://invisible-island.net/ncurses/man/tic.1m.html"><span class="part-name"> - tic</span></a>, the terminfo compiler</li> - - <li><a href= - "https://invisible-island.net/ncurses/man/toe.1m.html"><span class="part-name"> - toe</span></a>, list (table of) terminfo entries</li> - - <li><a href= - "https://invisible-island.net/ncurses/man/tput.1.html"><span class="part-name"> - tput</span></a>, utility for retrieving terminal capabilities - in shell scripts</li> - - <li><a href= - "https://invisible-island.net/ncurses/man/tset.1.html"><span class="part-name"> - tset</span></a>, to initialize the terminal</li> - </ul> - - <p>Full manual pages are provided for the library and tools.</p> - - <p>The <span class="main-name">ncurses</span> distribution is - available at <span class="main-name">ncurses</span>' <a href= - "https://invisible-island.net/ncurses/">homepage</a>:</p> - - <blockquote> - <p><a href= - "ftp://ftp.invisible-island.net/ncurses/">ftp://ftp.invisible-island.net/ncurses/</a> - or<br> - <a href= - "https://invisible-mirror.net/archives/ncurses/">https://invisible-mirror.net/archives/ncurses/</a> .</p> - </blockquote> - - <p>It is also available via anonymous FTP at the GNU distribution - site</p> - - <blockquote> - <p><a href= - "ftp://ftp.gnu.org/gnu/ncurses/">ftp://ftp.gnu.org/gnu/ncurses/</a> .</p> - </blockquote> - - <h2><a name="h2-release-notes" id="h2-release-notes">Release - Notes</a></h2> - - <p>These notes are for <span class="main-name">ncurses</span> - 6.2, released <strong>February 12, 2020</strong>.</p> - - <p>This release is designed to be source-compatible with - <span class="main-name">ncurses</span> 5.0 through 6.1; providing - extensions to the application binary interface (ABI). Although - the source can still be configured to support the <span class= - "main-name">ncurses</span> 5 ABI, the reason for the release is - to reflect improvements to the <span class= - "main-name">ncurses</span> 6 ABI and the supporting utility - programs.</p> - - <p>There are, of course, numerous other improvements, listed in - this announcement.</p> - - <p>The most <a href="#h3-bug-fixes">important - bug-fixes/improvements</a> dealt with user-defined capabilities - in terminal descriptions. The release notes also mention some - other bug-fixes, but are focused on new features and improvements - to existing features since <span class="main-name">ncurses</span> - 6.1 release.</p> - - <h3><a name="h3-library" id="h3-library">Library improvements</a></h3> - - <h4><a name="h4-new-library" id="h4-new-library">New features</a></h4> - - <p>There are several new features:</p> - - <ul> - <li> - <p><a href= - "https://invisible-island.net/ncurses/man/form_field_opts.3x.html"> - O_EDGE_INSERT_STAY</a> tells the form library to optionally - delay cursor movement on a field edge/boundary</p> - </li> - - <li> - <p><a href= - "https://invisible-island.net/ncurses/man/form_field_opts.3x.html"> - O_INPUT_FIELD</a> extension to form library allows a dynamic - field to shrink if the new limit is smaller than the current - field size.</p> - </li> - - <li> - <p>added <a href= - "https://invisible-island.net/ncurses/man/curs_memleaks.3x.html"> - exit_curses</a> and <a href= - "https://invisible-island.net/ncurses/man/curs_memleaks.3x.html"> - exit_terminfo</a> to replace internal symbols for - leak-checking.</p> - </li> - - <li> - <p>added <a href= - "https://invisible-island.net/ncurses/man/curs_trace.3x.html#h3-Functions"> - curses_trace</a>, to replace trace().</p> - </li> - </ul> - - <p>Additionally, to improve performance other changes (and - extensions) are provided in this release:</p> - - <ul> - <li> - <p>mouse decoding now handles shift/control/alt logic when - decoding xterm's 1006 mode</p> - </li> - - <li> - <p>ncurses now defines a limit for <a href= - "https://invisible-island.net/ncurses/man/curs_getstr.3x.html"> - wgetnstr</a>, <a href= - "https://invisible-island.net/ncurses/man/curs_get_wstr.3x.html"> - wgetn_wstr</a> when length is negative or “too - large”.</p> - </li> - - <li>reordered loop-limit checks in <a href= - "https://invisible-island.net/ncurses/man/curs_insstr.3x.html">winsnstr</a> - in case the string has no terminating null and only the number - of characters is used.</li> - - <li> - <p>there is now no buffer-size limit when reading the - <a href="https://invisible-island.net/ncurses/man/ncurses.3x.html#h3-TERMCAP"> - <tt>$TERMCAP</tt></a> variable.</p> - </li> - - <li> - <p>the <a href= - "https://invisible-island.net/ncurses/man/ncurses.3x.html#h3-TERMCAP"> - <tt>$TERMCAP</tt></a> variable may be interpreted as a - fallback to a terminfo entry</p> - </li> - - <li> - <p><a href= - "https://invisible-island.net/ncurses/man/curs_terminfo.3x.html#h3-Output-Functions"> - <tt>mvcur</tt></a> now decides whether to use hard-tabs, - using <strong><tt>xt</tt></strong>, - <strong><tt>tbc</tt></strong> and - <strong><tt>hts</tt></strong> as clues.</p> - </li> - - <li> - <p>extended colors are improved by modifying an internal call - to <a href= - "https://invisible-island.net/ncurses/man/curs_terminfo.3x.html#h3-Output-Functions"> - <tt>vid_puts</tt></a> to pass extended color pairs e.g., from - <tt>tty_update.c</tt> and <tt>lib_mvcur.c</tt></p> - </li> - - <li> - <p id="getenv-fixes">the initialization functions now avoid - relying upon persistent data for the result from <a href= - "#getenv-check"><tt>getenv</tt></a></p> - </li> - - <li> - <p>scrolling is improved:</p> - - <ul> - <li>a limit check in <tt>newline_forces_scroll</tt> handles - the case where the row is inside scroll-margins, but not at - the end.</li> - - <li> - <p>improved loop limits in <tt>_nc_scroll_window</tt> - handle a case where the scrolled data is a pad which is - taller than the window.</p> - </li> - </ul> - </li> - </ul> - - <h4><a name="h4-fixes-library" id="h4-fixes-library">Other - improvements</a></h4> - - <p>These are revised features:</p> - - <ul> - <li> - <p>used “<tt>const</tt>” in some prototypes - rather than <tt>NCURSES_CONST</tt> where X/Open Curses was - updated to do this, e.g., <tt>wscanw</tt>, <tt>newterm</tt>, - the terminfo interface. Also use “<tt>const</tt>” - for consistency in the termcap interface, which was withdrawn - by X/Open Curses in Issue 5 (2007). As of Issue 7, X/Open - Curses still lacks “<tt>const</tt>” for certain - return values, e.g., <a href= - "https://invisible-island.net/ncurses/man/curs_util.3x.html#h3-keyname_key_name"> - keyname</a>.</p> - </li> - - <li> - <p>modified <a href= - "https://invisible-island.net/ncurses/man/curs_bkgd.3x.html#h3-bkgd"> - <tt>wbkgd</tt></a> and <a href= - "https://invisible-island.net/ncurses/man/curs_bkgrnd.3x.html#h3-bkgrnd"> - <tt>wbkgrnd</tt></a> to improve compatibility with SVr4 - curses, changing the way the window rendition is updated when - the background character is modified</p> - </li> - - <li> - <p>improved terminfo write/read by modifying the fourth item - of the extended header to denote the number of valid strings - in the extended string table (see <a href= - "https://invisible-island.net/ncurses/man/term.5.html#h3-EXTENDED-STORAGE-FORMAT"> - term(5)</a>).</p> - </li> - - <li> - <p>modified the initialization checks for mouse so that the - <a href= - "/ncurses/terminfo.src.html#tic-xterm_sm_1006"><tt>xterm+sm+1006</tt></a> - block will work with terminal descriptions not mentioning - <em>xterm</em>.</p> - </li> - </ul> - - <p>These were done to limit or ultimately deprecate features:</p> - - <ul> - <li> - <p>deprecated <a href= - "https://invisible-island.net/ncurses/NEWS.html#t970831">safe-sprintf</a>, - since the <tt>vsnprintf</tt> function, which does what was - needed, was standardized long ago.</p> - </li> - - <li> - <p>marked <a href= - "https://invisible-island.net/ncurses/man/curs_printw.3x.html#h2-PORTABILITY"> - <tt>vwprintw</tt></a> and <tt>vwscanw</tt> as deprecated; - recommend using <a href= - "https://invisible-island.net/ncurses/man/curs_printw.3x.html"> - <tt>vw_printw</tt></a> and <tt>vw_scanw</tt>, - respectively.</p> - </li> - - <li> - <p>added deprecation warnings for internal functions called - by older versions of <a href= - "https://invisible-island.net/ncurses/tack.html">tack</a>.</p> - </li> - - <li> - <p>removed unused <tt>_nc_import_termtype2</tt> function.</p> - </li> - </ul> - - <p>These are improvements to existing features:</p> - - <ul> - <li> - <p>check parameter of <a href= - "https://invisible-island.net/ncurses/man/curs_threads.3x.html"> - set_escdelay</a>, return ERR if negative.</p> - </li> - - <li> - <p>check parameter of <a href= - "https://invisible-island.net/ncurses/man/curs_threads.3x.html"> - set_tabsize</a>, return ERR if not greater than zero</p> - </li> - - <li> - <p>correct a status-check in _nc_read_tic_entry() so that if - reading a hex/b64 <a href= - "https://invisible-island.net/ncurses/man/ncurses.3x.html#h3-TERMINFO"> - <tt>$TERMINFO</tt></a>, and the <a href= - "https://invisible-island.net/ncurses/man/ncurses.3x.html#h3-TERM"> - <tt>$TERM</tt></a> does not match, fall-through to the - compiled-in search list.</p> - </li> - - <li> - <p>amend check for <a href= - "https://invisible-island.net/ncurses/man/terminfo.5.html#h3-Predefined-Capabilities"> - <tt>repeat_char</tt></a> to handle a case where setlocale() - was called after <a href= - "https://invisible-island.net/ncurses/man/curs_initscr.3x.html"> - <tt>initscr</tt></a></p> - </li> - - <li> - <p>move macro for <a href= - "https://invisible-island.net/ncurses/man/curs_touch.3x.html"> - <tt>is_linetouched</tt></a> inside - <strong><tt>NCURSES_NOMACROS</tt></strong> - <em><tt>ifndef</tt></em>.</p> - </li> - - <li> - <p>use <tt>_nc_copy_termtype2</tt> rather than direct - assignment in <a href= - "https://invisible-island.net/ncurses/man/curs_terminfo.3x.html#h3-Initialization"> - setupterm</a>, in case it is called repeatedly using fallback - terminfo descriptions</p> - </li> - - <li> - <p>improve workaround for Solaris wcwidth versus line-drawing - characters</p> - </li> - - <li> - <p>add checks in <a href= - "https://invisible-island.net/ncurses/man/resizeterm.3x.html"> - <tt>repair_subwindows</tt></a> to keep the current position - and scroll-margins inside the resized subwindow.</p> - </li> - - <li> - <p>correct a buffer-limit in <tt>write_entry.c</tt> for - systems that use caseless filenames.</p> - </li> - - <li> - <p>improved build-time utility <em>report_offsets</em>:</p> - - <ul> - <li> - <p>add categories, e.g., "w" for wide-character, "t" for - threads to make the report more readable. Reorganized the - structures reported to make the categories more - apparent.</p> - </li> - - <li> - <p>add <tt>NCURSES_GLOBALS</tt> and - <tt>NCURSES_PRESCREEN</tt> to report to show how similar - the different <em>libtinfo</em> configurations are.</p> - </li> - </ul> - </li> - - <li> - <p>modified some header files to ensure that those include - necessary files except for the previously-documented - cases</p> - </li> - - <li> - <p>added some traces in initialization to show whether a - fallback entry is used.</p> - </li> - - <li> - <p>made minor optimization to reduce calls to - _nc_reserve_pairs</p> - </li> - </ul> - - <p>These are corrections to existing features:</p> - - <ul> - <li> - <p>fix a special case in <tt>PutAttrChar</tt> where a cell is - marked as alternate-character set, but the terminal does not - actually support the given graphic character. This would - happen in an older terminal such as <em>vt52</em>, which - lacks most line-drawing capability.</p> - </li> - - <li> - <p>corrected flag for "seq" method of db 1.8.5 interface, - needed by toe on some of the BSDs.</p> - </li> - - <li> - <p>modify comparison in make_hash.c to correct a special case - in collision handling for Caps-hpux11</p> - </li> - - <li> - <p>add extended_slk_color{,_sp} symbols to the appropriate - package/*.{map,sym} files</p> - </li> - - <li> - <p>modify lib_setup to avoid calling pthread_self() without - first verifying that the address is valid, i.e., for weak - symbols</p> - </li> - - <li> - <p>add a couple of broken-linker symbols to the list of - versioned symbols to help with link-time optimization versus - weak symbols.</p> - </li> - </ul> - - <h3><a name="h3-programs" id="h3-programs">Program - improvements</a></h3> - - <p id="h4-utilities">Several improvements were made to the - utility programs:</p> - - <dl> - <dt><span class="part-name">clear</span> - </dt> - - <dd> - <ul> - <li>improved logic for clearing with the <em>E3</em> - extension, in case the terminal scrolls content onto its - saved-lines before actually clearing the display, by - clearing the saved-lines after clearing the display</li> - </ul> - </dd> - - <dt><span class="part-name">infocmp</span> - </dt> - - <dd> - <ul> - <li>omit filtering of “<tt>OTxx</tt>” names - which are used for obsolete capabilities, when the output - is sorted by long-names. This change helps when making a - table of the short/long capability names.</li> - </ul> - </dd> - - <dt><span class="part-name">tic</span> - </dt> - - <dd> - <ul> - <li>added check for consistent alternate character set - capabilities.</li> - - <li>added check for paired <tt>indn</tt>/<tt>rin</tt>.</li> - - <li>added check for terminals with <tt>parm_dch</tt> vs - <tt>parm_ich</tt>.</li> - - <li>added check for the case where - <tt>setf</tt>/<tt>setb</tt> are given using different - strings, but provide identical results to - <tt>setaf</tt>/<tt>setab</tt>.</li> - - <li>corrected check for <tt>ich1</tt>.</li> - - <li>changed a too-large terminal entry from a fatal error - to a warning.</li> - </ul> - </dd> - - <dt><span class="part-name">toe</span> - </dt> - - <dd> - <ul> - <li>ignores any hex/b64 <tt>$TERMINFO</tt> value in the - list of terminfo databases.</li> - </ul> - </dd> - - <dt><span class="part-name">tset</span> - </dt> - - <dd> - <ul> - <li>replace check in <span class="part-name">reset</span> - command for obsolete “<tt>pt</tt>” capability - using <tt>tbc</tt> and <tt>hts</tt> capabilities as - clues</li> - - <li>modify <span class="part-name">reset</span> to allow - for tabstops at intervals other than 8.</li> - - <li>change <span class="part-name">reset</span>'s behavior - for margins to simply clear soft-margins if possible, - rather than clearing and then setting them according to the - terminal's width.</li> - </ul> - </dd> - - <dt><span class="part-name">tput</span> - </dt> - - <dd> - <ul> - <li>add “<tt>x</tt>” to <tt>getopt</tt> string - so that “<tt>tput -x clear</tt>” - works.</li> - </ul> - </dd> - </dl> - - <p>Several changes were made to the generated ncurses*config - scripts and the analogous “<tt>.pc</tt>” files to - reduce differences between the configurations they report:</p> - - <ul> - <li> - <p>modified the ncurse*-config and pc-files to more closely - match for the <tt>-I</tt> and <tt>-l</tt> options.</p> - </li> - - <li> - <p>filtered out linker-specs from the <tt>--libs</tt> - report.</p> - </li> - - <li> - <p>amended the ncurses*-config and pc-files to take into - account the rpath hack which differed between those - files.</p> - </li> - - <li> - <p>modified generated ncurses*config and ncurses.pc, - ncursesw.pc, etc., to list helper libraries such as gpm for - static linking.</p> - </li> - </ul> - - <h4><a name="h4-examples" id="h4-examples">Examples</a></h4> - - <p>Along with the library and utilities, improvements were made - to the <a href= - "https://invisible-island.net/ncurses/ncurses-examples.html">ncurses-examples</a>. - Most of this activity aimed at improving the test-packages. A few - changes are more generally useful, e.g., for the main ncurses - test-program, and for analyzing traces using the - <em>tracemunch</em> script:</p> - - <ul> - <li> - <p>improve recovery from error when reading command-character - in <tt>test/ncurses.c</tt>, showing the relevant error - message and not exiting on EINTR.</p> - </li> - - <li> - <p>improve <em>tracemunch</em>, by keeping track of - <tt>TERMINAL*</tt> values, and if tracing was first turned on - after initialization, attempt to show distinct screen, window - and terminal names anyway.</p> - </li> - - <li> - <p>modify <em>tracemunch</em> to accept filename parameters - in addition to use as a pipe/filter.</p> - </li> - - <li> - <p>update <em>tracemunch</em> to work with <em>perl - 5.26.2</em>, which changed the rules for escaping regular - expressions.</p> - </li> - - <li> - <p>add some checks in <em>tracemunch</em> for undefined - variables.</p> - </li> - - <li> - <p>modify <tt>TurnOn</tt>/<tt>TurnOff</tt> macros (in - lib_vidattr.c and lib_vid_attr.c) to avoid expansion of - “<tt>CUR</tt>” in trace.</p> - </li> - </ul> - - <p>There are other new demo/test programs and reusable - examples:</p> - - <dl> - <dt><span class="part-name">color_content</span> - </dt> - - <dd>Demonstrate the <tt>color_content</tt> and - <tt>extended_color_content</tt> functions.</dd> - - <dt><span class="part-name">demo_tabs</span> - </dt> - - <dd>A simple demo of tabs in curses.</dd> - - <dt><span class="part-name">dump_window</span> - </dt> - - <dd>A portable curses screen-dump, used to compare ncurses - screen contents with Solaris.</dd> - - <dt><span class="part-name">pair_content</span> - </dt> - - <dd>Demonstrate the <tt>pair_content</tt> and - <tt>extended_pair_content</tt> functions.</dd> - - <dt><span class="part-name">report_hashing</span> - </dt> - - <dd>Check hash-tables used for terminfo and termcap names.</dd> - - <dt><span class="part-name">parse_rgb</span> - </dt> - - <dd>Sample implementation of the ncurses RGB extension from - <a href= - "https://invisible-island.net/ncurses/man/user_caps.5.html">user_caps.5</a>, - used in <em>picsmap</em> and <em>savescreen</em> programs.</dd> - </dl> - - <p>A variety of improvements were made to existing programs, both - new features as well as options added to make the set of programs - more consistent.</p> - - <ul> - <li> - <p>add “<tt>-l</tt>” option to test/background, - to dump screen contents in a form that lets different curses - implementations be compared.</p> - </li> - - <li> - <p>add “<tt>@</tt>” command to test/ncurses - F-test, to allow rapid jump to different character pages.</p> - </li> - - <li> - <p>added enum, regex examples to test/demo_forms</p> - </li> - - <li> - <p>amend Scaled256() macro in test/picsmap.c to cover the - full range 0..1000</p> - </li> - - <li> - <p>corrected pathname used in Ada95 sample programs for - <tt>explain.txt</tt>, to work with test-packages, and used an - awk script to split the resulting pathname when it would be - too long for a single line.</p> - </li> - - <li> - <p>ignore interrupted system-call in test/ncurses's - command-line, e.g., if the terminal were resized.</p> - </li> - - <li> - <p>improved ifdef's for <tt>TABSIZE</tt> variable, to help - with AIX/HPUX ports.</p> - </li> - </ul> - - <h3><a name="h3-database" id="h3-database">Terminal database</a></h3> - - <p>There are several new terminal descriptions:</p> - - <blockquote style="word-break:keep-all"> - <p><tt>alacritty</tt>, <tt>domterm</tt>, <tt>kitty</tt>, - <tt>mintty</tt>, <tt>mintty-direct</tt>, <tt>ms-terminal</tt>, - <tt>n7900</tt>, <tt>nsterm-build309</tt>, - <tt>nsterm-direct</tt>, <tt>screen5</tt>, <tt>ti703</tt>, - <tt>ti707</tt>, <tt>ti703-w</tt>, <tt>ti707-w</tt> - <tt>vscode</tt>, <tt>vscode-direct</tt>, <tt>xterm-mono</tt>, - <tt>xterm.js</tt></p> - </blockquote> - - <p>There are many changes to existing terminal descriptions. Some - were updates to several descriptions:</p> - - <ul> - <li>use <a href= - "/ncurses/terminfo.src.html#tic-ansi_rep"><tt>ansi+rep</tt></a> - in a dozen places</li> - - <li>add rs1 to konsole, mlterm</li> - - <li>improve several flash capabilities with trailing mandatory - delays</li> - - <li>drop <tt>ich1</tt> from <tt>rxvt-basic</tt>, <tt>Eterm</tt> - and <tt>mlterm</tt> to improve compatibility with old - non-curses programs</li> - - <li>add/use <a href= - "/ncurses/terminfo.src.html#tic-xterm_keypad"><tt>xterm+keypad</tt></a> - in <tt>xterm-new</tt></li> - - <li>use <a href= - "/ncurses/terminfo.src.html#tic-xterm_sl-twm"><tt>xterm+sl-twm</tt></a> - for consistency, nine places</li> - - <li>improve <em>xm</em> example in <a href= - "/ncurses/terminfo.src.html#tic-xterm_x11mouse">xterm+x11mouse</a> - and <a href= - "/ncurses/terminfo.src.html#tic-xterm_sm_1006">xterm+sm_1006</a>.</li> - </ul> - - <p>while others affected specific descriptions. These were - retested, to take into account changes by their developers:</p> - - <blockquote> - <p><tt>terminator</tt>, <tt>st</tt></p> - </blockquote> - - <p>while these are specific fixes based on reviewing - documentation, user reports, or warnings from <span class= - "part-name">tic</span>:</p> - - <dl> - <dt><a href= - "/ncurses/terminfo.src.html#tic-adds200">adds200</a>:</dt> - - <dd> - <ul> - <li>fix typo</li> - </ul> - </dd> - - <dt><a href= - "/ncurses/terminfo.src.html#tic-gnome-256color">gnome-256color</a> - </dt> - - <dd> - <ul> - <li>base entry on "gnome", not "vte", for consistency</li> - </ul> - </dd> - - <dt><a href= - "/ncurses/terminfo.src.html#tic-interix">interix</a> - </dt> - - <dd> - <ul> - <li>trim unnecessary setf/setb</li> - </ul> - </dd> - - <dt><a href= - "/ncurses/terminfo.src.html#tic-linux-16color">linux-16color</a> - </dt> - - <dd> - <ul> - <li>accommodate <a href= - "https://lists.gnu.org/archive/html/bug-ncurses/2019-10/msg00061.html"> - Linux console driver</a> incompatibility introduced in - early 2018</li> - </ul> - </dd> - - <dt><a href= - "/ncurses/terminfo.src.html#tic-nsterm-256color">nsterm-256color</a>:</dt> - - <dd> - <ul> - <li>add nsterm-build309 to replace nsterm-256color, - assigning the latter as an alias of nsterm, to make mouse - work with nsterm-256color</li> - </ul> - </dd> - - <dt><a href= - "/ncurses/terminfo.src.html#tic-regent40">regent40</a>:</dt> - - <dd> - <ul> - <li>renumber function-keys to match manual</li> - </ul> - </dd> - - <dt><a href= - "/ncurses/terminfo.src.html#tic-regent60">regent60</a>:</dt> - - <dd> - <ul> - <li>add cd (clr_eos)</li> - - <li>corrected acsc</li> - - <li>add shifted function-keys</li> - </ul> - </dd> - - <dt><a href= - "/ncurses/terminfo.src.html#tic-tvi950">tvi950</a>:</dt> - - <dd> - <ul> - <li>added function-key definitions to agree with Televideo - 950 manual</li> - - <li>corrected acsc</li> - - <li>remove bogus kf0</li> - - <li>add bel</li> - </ul> - </dd> - - <dt><a href= - "/ncurses/terminfo.src.html#tic-tvi955">tvi955</a>:</dt> - - <dd> - <ul> - <li>fix typo</li> - </ul> - </dd> - - <dt><a href= - "/ncurses/terminfo.src.html#tic-vi200">vi200</a>:</dt> - - <dd> - <ul> - <li>add acsc string, including right/down-arrow</li> - </ul> - </dd> - - <dt><a href= - "/ncurses/terminfo.src.html#tic-wy50">wy50</a>:</dt> - - <dd> - <ul> - <li>corrected acsc</li> - </ul> - </dd> - - <dt><a href="/ncurses/terminfo.src.html#tic-wy50">wy50</a> and - <a href="/ncurses/terminfo.src.html#tic-wy60">wy60</a>:</dt> - - <dd> - <ul> - <li>add shifted function-keys as kF1 to kF16</li> - </ul> - </dd> - - <dt><a href= - "/ncurses/terminfo.src.html#tic-xterm_x11hilite">xterm+x11hilite</a>:</dt> - - <dd> - <ul> - <li>eliminate unused <em>p5</em> parameter.</li> - </ul> - </dd> - </dl> - - <p>A few entries use extensions (user-defined terminal - capabilities):</p> - - <ul> - <li>use <a href= - "/ncurses/terminfo.src.html#tic-xterm_sm_1006"><tt>xterm+sm+1006</tt></a> - (aka “SGR 1006 mouse”) for konsole-base and - putty</li> - - <li>add <em><tt>Smol/Rmol</tt></em> user-defined capability to - <tt>tmux</tt> and <tt>vte-2018</tt></li> - - <li>add <em><tt>Smulx</tt></em> user-defined capability to - <tt>tmux</tt>, <tt>vte-2018</tt></li> - </ul> - - <h3><a name="h3-documentation" id= - "h3-documentation">Documentation</a></h3> - - <p>As usual, this release</p> - - <ul> - <li> - <p>improves documentation by describing new features,</p> - </li> - - <li> - <p>attempts to improve the description of features which - users have found confusing</p> - </li> - - <li> - <p>fills in overlooked descriptions of features which were - described in the <a href= - "https://invisible-island.net/ncurses/NEWS.html">NEWS</a> - file but treated sketchily in manual pages.</p> - </li> - </ul> - - <p>In addition to providing background information to explain - these features and show how they evolved, there are corrections, - clarifications, etc.:</p> - - <ul> - <li> - <p>Corrections:</p> - - <ul> - <li>correct error-returns listed in manual pages for a few - form functions</li> - - <li>corrected prototypes in several manpages using script - to extract those in compilable form.</li> - - <li>fix typo in <a href= - "https://invisible-island.net/ncurses/man/term.5.html#h3-EXTENDED-NUMBER-FORMAT"> - term.5</a>, improve explanation of format</li> - </ul> - </li> - - <li> - <p>Clarify in manual pages that <a href= - "https://invisible-island.net/ncurses/man/curs_printw.3x.html#h2-PORTABILITY"> - vwprintw</a> and <a href= - "https://invisible-island.net/ncurses/man/curs_scanw.3x.html#h2-PORTABILITY"> - vwscanw</a> are obsolete.<br> - They have not been part of X/Open Curses since 2007.</p> - </li> - - <li> - <p>New/improved history and portability sections:</p> - - <ul> - <li><a href= - "https://invisible-island.net/ncurses/man/curs_addch.3x.html#h3-ACS-Symbols"> - curs_addch.3x</a> gives some background for ACS - symbols.</li> - - <li><a href= - "https://invisible-island.net/ncurses/man/curs_getcchar.3x.html#h2-PORTABILITY"> - curs_getcchar.3x</a> explains a difference between ncurses - and X/Open Curses.</li> - - <li><a href= - "https://invisible-island.net/ncurses/man/curs_getstr.3x.html#h2-PORTABILITY"> - curs_getstr.3x</a> gives historical/portability background - for the length parameter of <tt>wgetnstr</tt>.</li> - - <li><a href= - "https://invisible-island.net/ncurses/man/curs_slk.3x.html"> - curs_slk.3x</a> lists a few differences between SVr4 curses - and X/Open Curses for soft-keys.</li> - - <li><a href= - "https://invisible-island.net/ncurses/man/curs_terminfo.3x.html"> - curs_terminfo.3x</a> explains that the initial - implementation of terminfo in SVr2 was mostly replaced by - other developers in SVr3.</li> - - <li><a href= - "https://invisible-island.net/ncurses/man/infocmp.1m.html">infocmp.1</a> - explains that the initial version of terminfo had no tool - for decompiling descriptions. That came later, with SVr3, - with a different developer.</li> - - <li><a href= - "https://invisible-island.net/ncurses/man/tabs.1.html">tabs.1</a> - tells more than you wanted to know about the tool.</li> - - <li><a href= - "https://invisible-island.net/ncurses/man/tic.1m.html">tic.1</a> - explains that the initial version of terminfo had a - rudimentary tool (based on termcap) for compiling entries. - The tool used with Unix was developed by others for - SVr3.</li> - - <li><a href= - "https://invisible-island.net/ncurses/man/toe.1m.html">toe.1</a> - explains the origin of this tool.</li> - </ul> - </li> - - <li> - <p>Improvements for <a href= - "https://invisible-island.net/ncurses/man/user_caps.5.html">user_caps.5</a>:</p> - - <ul> - <li>mention <tt>meml</tt>, <tt>memu</tt> and - <tt>box1</tt></li> - - <li>expanded description of <tt>XM</tt></li> - - <li>add a clarification regarding the <tt>RGB</tt> - capability.</li> - - <li>mention user_caps.5 in the tic and infocmp manual - pages.</li> - </ul> - </li> - - <li> - <p>Other improvements:</p> - - <ul> - <li><a href= - "https://invisible-island.net/ncurses/man/curs_add_wch.3x.html#h3-Line-Graphics"> - curs_add_wch.3x</a> adds note about Unicode terminology for - the line-drawing characters.</li> - - <li><a href= - "https://invisible-island.net/ncurses/man/curs_color.3x.html#h2-RETURN-VALUE"> - curs_color.3x</a> improves discussion of error returns and - extensions.</li> - - <li><a href= - "https://invisible-island.net/ncurses/man/curs_mouse.3x.html"> - curs_mouse.3x</a> explains how the <tt>kmous</tt> and - <tt>XM</tt> capabilities are used for xterm-mouse - input.</li> - - <li><a href= - "https://invisible-island.net/ncurses/man/curs_refresh.3x.html#h3-wnoutrefresh_doupdate"> - curs_refresh.3x</a> improves documentation regarding the - virtual and physical screens.</li> - - <li><a href= - "https://invisible-island.net/ncurses/man/curs_util.3x.html"> - curs_util.3x</a> mentions a difference between SVr4 and - X/Open Curses for <tt>unctrl.h</tt></li> - - <li><a href= - "https://invisible-island.net/ncurses/man/curs_variables.3x.html#h2-PORTABILITY"> - curs_variables.3x</a> improves description of the - <em>init_tabs</em> capability and <tt>TABSIZE</tt> - variable.</li> - - <li><a href= - "https://invisible-island.net/ncurses/man/ncurses.3x.html#h2-ALTERNATE-CONFIGURATIONS"> - ncurses.3x</a> improves documentation regarding - feature-test macros in curses.h</li> - - <li><a href= - "https://invisible-island.net/ncurses/man/resizeterm.3x.html#h3-resize_term"> - resizeterm.3x</a> about top-level windows which touch the - screen's borders.</li> - - <li><a href= - "https://invisible-island.net/ncurses/man/tput.1.html#h3-Terminal-Size"> - tput.1</a> clarifies how <em>tput</em> determines the - terminal size.</li> - </ul> - </li> - </ul> - - <p>There are no new manual pages (all of the manual page updates - are to existing pages).</p> - - <p>Some of the improvements are more subtle, relating to the way - the information is presented. For instance, the generated - terminfo.5 file uses a different table layout, allowing it to use - space on wide terminals more effectively.</p> - - <h3><a name="h3-bug-fixes" id="h3-bug-fixes">Interesting - bug-fixes</a></h3> - - <p>While there were many bugs fixed during development of ncurses - 6.2, only a few (the reason for this release) were both important - and interesting. Most of the bug-fixes were for local issues - which did not affect compatibility across releases. Since those - are detailed in the NEWS file no elaboration is needed here.</p> - - <p>The interesting bugs were in tic/infocmp's handling of - user-defined capabilities. These were not recent bugs. Initially - it was a simple problem:</p> - - <ul> - <li>The user-defined capabilities can be any type (boolean, - number or string), but once given a type all uses of the name - must conform to that type—unless some special support for - a particular multi-typed name is built into ncurses.</li> - - <li> - <p>One of simpleterm's contributors copied some definitions - for using <em>tmux</em>'s user-defined capabilities in - <a href= - "https://git.suckless.org/st/commit/06f8cf8ca87a81db15816658c40b2afcd1ad5332.html"> - late in 2016</a>.</p> - - <blockquote> - <pre class="demo-name"> -diff --git a/st.info b/st.info -@@ -185,7 +185,10 @@ st| simpleterm, - tsl=\E]0;, - xenl, - vpa=\E[%i%p1%dd, -- -+# Tmux unofficial extensions, see TERMINFO EXTENSIONS in tmux(1) -+ Se, -+ Ss, -+ Tc, - - st-256color| simpleterm with 256 colors, - use=st, -</pre> - </blockquote> - </li> - - <li> - <p>Later, in (referring to a version from <a href= - "https://git.suckless.org/st/commit/c0882f2ed1d7a2dd0fa2efa52157e6fc6fde3652.html"> - mid-2017</a>), a user asked to have it updated in - ncurses.</p> - </li> - - <li> - <p>However, it had an error from the change in late 2016. The - terminal description made what <em>tmux</em> expected to be - <strong>string</strong> actually a - <strong>boolean</strong>.</p> - - <p>Over the years, there were problems with each of - simpleterm's terminal descriptions. I repaired those, and - usually dealt with the problem.</p> - </li> - - <li> - <p>The difference in this case was that when compiling the - terminal database, <em>tic</em> may have in memory the - definitions for more than one terminal description (so that - it can resolve “<tt>use=</tt>” clauses). Seeing - two different types for the same name, in certain situations - it would incorrectly merge the symbol tables for the two - terminal descriptions.</p> - </li> - - <li> - <p>On simpleterm's side, their bug was finally fixed in - <a href= - "https://git.suckless.org/st/commit/83866428de031300eab03fbb116bcf7d2b1d4f60.html"> - late 2019</a>, three years after the bug was created.</p> - </li> - </ul> - - <p>For ncurses, the elapsed time to fix this bug was less than - three years. Someone reported a problem with the terminal - description a few weeks after releasing ncurses 6.1 (in <a href= - "https://github.com/tmux/tmux/issues/1264">tmux #1264</a>), and - the terminal description was updated that week (ncurses patch - <a href= - "https://invisible-island.net/ncurses/NEWS.html#t20180224">20180224</a>):</p> - - <blockquote> - <pre class="demo-name"> -20180224 - + modify _nc_resolve_uses2() to detect incompatible types when merging - a "use=" clause of extended capabilities. The problem was seen in a - defective terminfo integrated from simpleterm sources in 20171111, - compounded by repair in 20180121. - + correct Ss/Ms interchange in st-0.7 entry (tmux #1264) -TD -</pre> - </blockquote> - - <p>The larger part of that change added a check to prevent a - simple merge of terminal descriptions where the same user-defined - name was used with different types. But it raised some - questions:</p> - - <ul> - <li> - <p>Was there a reliable way to manage terminal descriptions - which used the same extended name in different ways?</p> - </li> - - <li> - <p>Should ncurses provide a registry of well-known extended - names, with their types?</p> - </li> - </ul> - - <p>Since the correction to <a href= - "https://invisible-island.net/ncurses/ncurses.html#download_database"> - <tt>terminfo.src</tt></a> could have been readily adopted by - packagers, there was nothing more to be done from ncurses' - standpoint on that part. But improving ncurses to prevent issues - like that is the reason for making a release.</p> - - <p>Nothing more (constructive) was mentioned with regard to - simpleterm. But a few problems were found in the handling of - user-defined capabilities:</p> - - <ul> - <li> - <p>Forward-references to user-defined capabilities in a - “<tt>use=</tt>” clause did not allocate new data - for each use. In <em>tic</em>, successive compilation of - terminal entries could add user-defined capabilities to the - wrong terminal entry.</p> - - <p>This was not noticed before, since xterm's terminal - descriptions were the main users of the feature, and almost - all of the uses of the building-blocks which contained - user-defined capabilities were backward-references.</p> - </li> - - <li> - <p>There is one (documented) case where ncurses 6.1 supports - a user-defined capability that could be any type (i.e., - “RGB”). The check added in February 2018 to guard - against mismatches did not handle all of the combinations - needed.</p> - </li> - </ul> - - <p>Both of these issues dated from the original implementation of - user-defined capabilities. Fixing them does not change the - terminal database, but a older <em>tic</em> without the fixes - will not be able to handle terminfo sources which rely upon those - fixes. Starting in June 2019, the download link for the terminfo - source file was capped at that date. The development sources have - an up-to-date copy of the file, for people with a legitimate need - for it.</p> - - <p>The “<tt>-c</tt>” (check) option of <em>tic</em> - is not very useful if it cannot offer advice on parameters needed - for user-defined capabilities. The various <em>Caps</em> files - were reorganized to reduce redundancy, and in the common portion - (<a href= - "https://github.com/ThomasDickey/ncurses-snapshots/blob/master/include/Caps-ncurses">Caps-ncurses</a>), - a registry of user-defined capabilities is provided for use by - <em>tic</em>. While users can still define their own custom - capabilities, <em>tic</em> will not offer any advice when their - parameters do not match.</p> - - <p>In ncurses 6.2, <em>tic</em> makes a special check to allow - any type for <em>RGB</em>, but its being able to do this relies - upon fixes made in the ncurses library in mid-2019.</p> - - <h3><a name="h3-config-config" id= - "h3-config-config">Configuration changes</a></h3> - - <h4><a name="h4-config-major" id="h4-config-major">Major - changes</a></h4> - - <p>There are no major changes. Several new options were added to - ease integration of packages with systems using different - versions of <em>GNAT</em> and <em>ncurses</em>. Also, - improvements were made to configure checks.</p> - - <h4><a name="h4-config-options" id= - "h4-config-options">Configuration options</a></h4> - - <p>There are a few new/modified configure options:</p> - - <dl> - <dt><tt>--with-config-suffix</tt> - </dt> - - <dd> - <p>helps work around a filename conflict with Debian packages - versus test-packages.</p> - </dd> - - <dt><tt>--with-ada-libname</tt> - </dt> - - <dd> - <p>allows one to rename the “AdaCurses” library - (at least one packager prefers a lowercase name).</p> - </dd> - - <dt><tt>--with-fallbacks</tt> - </dt> - - <dd> - <p>now ensures there is a value, and adds the fallback - information to top-level Makefile summary.</p> - </dd> - - <dt><tt>--with-pcre2</tt> - </dt> - - <dd> - <p>check for pcre-posix library to help with MinGW port.</p> - </dd> - - <dt><tt>--with-tic-path</tt> and<br></dt> - - <dt><tt>--with-infocmp-path</tt> - </dt> - - <dd> - <p>help work around problems building fallback source using - pre-6.0 tic/infocmp.</p> - </dd> - - <dt><tt>--with-versioned-syms</tt> - </dt> - - <dd> - <p>option value can now be a relative pathname.</p> - </dd> - </dl> - - <h3><a name="h3-portability" id="h3-portability">Portability</a></h3> - - <p>Many of the portability changes are implemented via the - configure script:</p> - - <ul> - <li> - <p>ignore <a href= - "/ncurses/man/ncurses.3x.html#h3-TERMINFO"><tt>$TERMINFO</tt></a> - as a default value in configure script if it came from the - <tt>infocmp</tt> <strong><tt>-Q</tt></strong> option.</p> - </li> - - <li> - <p>distinguish gcc from icc and clang when the - <tt>--enable-warnings</tt> option is not used, to avoid - unnecessary warnings about unrecognized inline options</p> - </li> - - <li> - <p>consistently prepend new libraries as they are found - during configuration, rather than relying upon the linker to - resolve order dependencies of libraries.</p> - </li> - - <li> - <p>modified configure scripts to reduce relinking/ranlib - during library install :</p> - - <ul> - <li>use “<tt>install -p</tt>” when available, - to avoid need for ranlib of static libraries.</li> - - <li>scripts which use - “<tt>--disable-relink</tt>;” add a 1-second - sleep to work around tools which use whole-second - timestamps, e.g., in <tt>utime</tt> rather than the actual - file system resolution.</li> - </ul> - </li> - - <li> - <p id="getenv-check">add configure check for <a href= - "#getenv-fixes"><tt>getenv</tt></a> to work around - implementation shown in Emscripten which overwrites the - previous return value on each call.</p> - - <p>Use that to optionally suppress <tt>START_TRACE</tt> - macro, whose call to <tt>getenv</tt> may not work - properly</p> - </li> - - <li> - <p>change target configure level for <tt>_XOPEN_SOURCE</tt> - to 600 to address use of <tt>vsscanf</tt> and - <tt>setenv</tt>.</p> - </li> - - <li> - <p>reduce use of <tt>_GNU_SOURCE</tt> for current glibc where - <tt>_DEFAULT_SOURCE</tt> combines with - <tt>_XOPEN_SOURCE</tt></p> - - <p>Allow for Cygwin's newlib when checking for the - _DEFAULT_SOURCE symbol.</p> - - <p>MidnightBSD is now checked for the - <tt>_XOPEN_SOURCE</tt>-related definitions.</p> - </li> - - <li> - <p>If the check for <tt>va_copy</tt> or <tt>__va_copy</tt> - fails,</p> - - <ul> - <li>configure now tries copying the pointers for - <tt>va_list</tt>, or as an array.</li> - - <li>alternatively, it checks for - <tt>__builtin_va_copy</tt>(), which could be used with AIX - <tt>xlc</tt> in <em>c89</em> mode.</li> - </ul> - </li> - - <li> - <p>several changes to support a port to Ultrix 3.1:</p> - - <ul> - <li>check if "b" binary feature of fopen works</li> - - <li>check for missing feature of locale.h</li> - - <li>add fallback for strstr() in test-programs</li> - - <li>add fallback for STDOUT_FILENO in test-programs</li> - </ul> - </li> - - <li> - <p>The <em>test/configure</em> script (used for <a href= - "/ncurses/ncurses-examples.html"><em>ncurses-examples</em></a>) - is improved:</p> - - <ul> - <li>work around non-ncurses termcap.h file, e.g., in - Slackware.</li> - - <li>check for <a href= - "/ncurses/man/curs_variables.3x.html#h3-TABSIZE"><tt>TABSIZE</tt></a> - variable.</li> - - <li>checks for the X11/Intrinsic.h header, accommodate - recent MacOS changes which largely emptied - <tt>/usr/include</tt>.</li> - </ul> - </li> - </ul> - - <p>Here are some of the other portability fixes:</p> - - <ul> - <li> - <p>added dummy "check" rule in top-level and test-Makefile to - simplify building test-packages for ArchLinux.</p> - </li> - - <li> - <p>dropped library-dependency on psapi for MinGW port, since - win_driver.c defines <tt>PSAPI_VERSION</tt> to 2, making it - use <tt>GetProcessImageFileName</tt> from kernel32.dll</p> - </li> - - <li> - <p>made build-fixes for configuration using --program-suffix - with Ada95, noticed with MacOS but applicable to other - platforms without libpanelw, etc.</p> - </li> - - <li> - <p>modified ncurses/Makefile.in to fix a case where - Debian/testing changes to the ld --as-needed configuration - broke ncurses-examples test packages.</p> - </li> - - <li> - <p>used <tt>_WIN32</tt>/<tt>_WIN64</tt> in preference to - <tt>__MINGW32__</tt>/<tt>__MINGW64__</tt> symbols to simplify - building with Microsoft Visual C++, since the former are - defined in both compiler configurations.</p> - </li> - </ul> - - <hr> - - <h2><a name="h2-features" id="h2-features">Features of - <span class="main-name">ncurses</span></a></h2> - - <p>The <span class="main-name">ncurses</span> package is fully - upward-compatible with SVr4 (System V Release 4) curses:</p> - - <ul> - <li> - <p>All of the SVr4 calls have been implemented (and are - documented).</p> - </li> - - <li> - <p><span class="main-name">ncurses</span> supports all of the - for SVr4 curses features including keyboard mapping, color, - forms-drawing with ACS characters, and automatic recognition - of keypad and function keys.</p> - </li> - - <li> - <p><span class="main-name">ncurses</span> provides these SVr4 - add-on libraries (not part of X/Open Curses):</p> - - <ul> - <li> - <p>the panels library, supporting a stack of windows with - backing store.</p> - </li> - - <li> - <p>the menus library, supporting a uniform but flexible - interface for menu programming.</p> - </li> - - <li> - <p>the form library, supporting data collection through - on-screen forms.</p> - </li> - </ul> - </li> - - <li> - <p><span class="main-name">ncurses</span>'s terminal database - is fully compatible with that used by SVr4 curses.</p> - - <ul> - <li> - <p><span class="main-name">ncurses</span> supports - user-defined capabilities which it can see, but which are - hidden from SVr4 curses applications using the - <em>same</em> terminal database.</p> - </li> - - <li> - <p>It can be optionally configured to match the format - used in related systems such as AIX and Tru64.</p> - </li> - - <li> - <p>Alternatively, <span class="main-name">ncurses</span> - can be configured to use hashed databases rather than the - directory of files used by SVr4 curses.</p> - </li> - </ul> - </li> - - <li> - <p>The <span class="main-name">ncurses</span> utilities have - options to allow you to filter terminfo entries for use with - less capable <em>curses</em>/<em>terminfo</em> versions such - as the HP/UX and AIX ports.</p> - </li> - </ul> - - <p>The <span class="main-name">ncurses</span> package also has - many useful extensions over SVr4:</p> - - <ul> - <li> - <p>The API is 8-bit clean and base-level conformant with the - X/OPEN curses specification, XSI curses (that is, it - implements all BASE level features, and most EXTENDED - features). It includes many function calls not supported - under SVr4 curses (but portability of all calls is documented - so you can use the SVr4 subset only).</p> - </li> - - <li> - <p>Unlike SVr3 curses, <span class="main-name">ncurses</span> - can write to the rightmost-bottommost corner of the screen if - your terminal has an insert-character capability.</p> - </li> - - <li> - <p>Ada95 and C++ bindings.</p> - </li> - - <li> - <p>Support for mouse event reporting with X Window xterm and - FreeBSD and OS/2 console windows.</p> - </li> - - <li> - <p>Extended mouse support via Alessandro Rubini's gpm - package.</p> - </li> - - <li> - <p>The function <code>wresize</code> allows you to resize - windows, preserving their data.</p> - </li> - - <li> - <p>The function <code>use_default_colors</code> allows you to - use the terminal's default colors for the default color pair, - achieving the effect of transparent colors.</p> - </li> - - <li> - <p>The functions <code>keyok</code> and - <code>define_key</code> allow you to better control the use - of function keys, e.g., disabling the <span class= - "main-name">ncurses</span> KEY_MOUSE, or by defining more - than one control sequence to map to a given key code.</p> - </li> - - <li> - <p>Support for 256-color terminals, such as modern xterm.</p> - </li> - - <li> - <p>Support for 16-color terminals, such as <em>aixterm</em> - and <em>modern xterm</em>.</p> - </li> - - <li> - <p>Better cursor-movement optimization. The package now - features a cursor-local-movement computation more efficient - than either BSD's or System V's.</p> - </li> - - <li> - <p>Super hardware scrolling support. The screen-update code - incorporates a novel, simple, and cheap algorithm that - enables it to make optimal use of hardware scrolling, - line-insertion, and line-deletion for screen-line movements. - This algorithm is more powerful than the 4.4BSD curses - <code>quickch</code> routine.</p> - </li> - - <li> - <p>Real support for terminals with the magic-cookie glitch. - The screen-update code will refrain from drawing a highlight - if the magic- cookie unattributed spaces required just before - the beginning and after the end would step on a non-space - character. It will automatically shift highlight boundaries - when doing so would make it possible to draw the highlight - without changing the visual appearance of the screen.</p> - </li> - - <li> - <p>It is possible to generate the library with a list of - pre-loaded fallback entries linked to it so that it can serve - those terminal types even when no terminfo tree or termcap - file is accessible (this may be useful for support of - screen-oriented programs that must run in single-user - mode).</p> - </li> - - <li> - <p>The <a href= - "https://invisible-island.net/ncurses/man/tic.1m.html"><span class="part-name"> - tic</span></a>/<a href= - "https://invisible-island.net/ncurses/man/captoinfo.1m.html">captoinfo</a> - utility provided with <span class="main-name">ncurses</span> - has the ability to translate many termcaps from the XENIX, - IBM and AT&T extension sets.</p> - </li> - - <li> - <p>A BSD-like <a href= - "https://invisible-island.net/ncurses/man/tset.1.html"><span class="part-name"> - tset</span></a> utility is provided.</p> - </li> - - <li> - <p>The <span class="main-name">ncurses</span> library and - utilities will automatically read terminfo entries from - $HOME/.terminfo if it exists, and compile to that directory - if it exists and the user has no write access to the system - directory. This feature makes it easier for users to have - personal terminfo entries without giving up access to the - system terminfo directory.</p> - </li> - - <li> - <p>You may specify a path of directories to search for - compiled descriptions with the environment variable - TERMINFO_DIRS (this generalizes the feature provided by - TERMINFO under stock System V.)</p> - </li> - - <li> - <p>In terminfo source files, use capabilities may refer not - just to other entries in the same source file (as in System - V) but also to compiled entries in either the system terminfo - directory or the user's $HOME/.terminfo directory.</p> - </li> - - <li> - <p>The table-of-entries utility <a href= - "https://invisible-island.net/ncurses/man/toe.1m.html"><span class="part-name"> - toe</span></a> makes it easy for users to see exactly what - terminal types are available on the system.</p> - </li> - - <li> - <p>The library meets the XSI requirement that every macro - entry point have a corresponding function which may be linked - (and will be prototype-checked) if the macro definition is - disabled with <code>#undef</code>.</p> - </li> - - <li> - <p>Extensive documentation is provided (see the <em><a href= - "https://invisible-island.net/ncurses/ncurses.faq.html#additional_reading"> - Additional Reading</a></em> section of the <em><a href= - "https://invisible-island.net/ncurses/ncurses.faq.html"><span class="main-name"> - ncurses</span> FAQ</a></em> for online documentation).</p> - </li> - </ul> - - <h2><a name="h2-who-uses" id="h2-who-uses">Applications using - <span class="main-name">ncurses</span></a></h2> - - <p>The <span class="main-name">ncurses</span> distribution - includes a selection of test programs (including a few games). - These are available separately as <a href= - "https://invisible-island.net/ncurses/ncurses-examples.html">ncurses-examples</a></p> - - <p>The ncurses library has been tested with a wide variety of - applications including:</p> - - <blockquote> - <dl> - <dt><span class="part-name">aptitude</span> - </dt> - - <dd> - <p>FrontEnd to Apt, the debian package manager</p> - - <p><a href= - "https://wiki.debian.org/Aptitude">https://wiki.debian.org/Aptitude</a></p> - </dd> - - <dt><span class="part-name">cdk</span> - </dt> - - <dd> - <p>Curses Development Kit</p> - - <p><a href= - "https://invisible-island.net/cdk/">https://invisible-island.net/cdk/</a><br> - - </p> - </dd> - - <dt><span class="part-name">ded</span> - </dt> - - <dd> - <p>directory-editor</p> - - <p><a href= - "https://invisible-island.net/ded/">https://invisible-island.net/ded/</a></p> - </dd> - - <dt><span class="part-name">dialog</span> - </dt> - - <dd> - <p>the underlying application used in Slackware's setup, - and the basis for similar install/configure applications on - many systems.</p> - - <p><a href= - "https://invisible-island.net/dialog/">https://invisible-island.net/dialog/</a></p> - </dd> - - <dt><span class="part-name">lynx</span> - </dt> - - <dd> - <p>the text WWW browser</p> - - <p><a href= - "https://lynx.invisible-island.net/">https://lynx.invisible-island.net/</a></p> - </dd> - - <dt><span class="part-name">mutt</span> - </dt> - - <dd> - <p>mail utility</p> - - <p><a href="http://www.mutt.org/">http://www.mutt.org/</a></p> - </dd> - - <dt><span class="part-name">ncftp</span> - </dt> - - <dd> - <p>file-transfer utility</p> - - <p><a href= - "https://www.ncftp.com/">https://www.ncftp.com/</a></p> - </dd> - - <dt><span class="part-name">nvi</span> - </dt> - - <dd> - <p>New vi uses ncurses.</p> - - <p><a href= - "https://sites.google.com/a/bostic.com/keithbostic/vi">https://sites.google.com/a/bostic.com/keithbostic/vi</a><br> - - </p> - </dd> - - <dt><span class="part-name">ranger</span> - </dt> - - <dd> - <p>A console file manager with VI key bindings in - <em>Python</em>.</p> - - <p><a href= - "https://ranger.github.io/">https://ranger.github.io/</a></p> - </dd> - - <dt><span class="part-name">tin</span> - </dt> - - <dd> - <p>newsreader, supporting color, MIME</p> - - <p><a href="http://www.tin.org/">http://www.tin.org/</a></p> - </dd> - - <dt><span class="part-name">vifm</span> - </dt> - - <dd> - <p>File manager with vi like keybindings</p> - - <p><a href="https://vifm.info/">https://vifm.info/</a></p> - </dd> - </dl> - </blockquote> - - <p>as well as some that use <span class= - "main-name">ncurses</span> for the terminfo support alone:</p> - - <blockquote> - <dl> - <dt><span class="part-name">minicom</span> - </dt> - - <dd> - <p>terminal emulator for serial modem connections</p> - - <p><a href= - "https://alioth.debian.org/projects/minicom/">https://alioth.debian.org/projects/minicom/</a></p> - </dd> - - <dt><span class="part-name">mosh</span> - </dt> - - <dd> - <p>a replacement for <code>ssh</code>.</p> - - <p><a href= - "https://mosh.mit.edu/">https://mosh.mit.edu/</a></p> - </dd> - - <dt><span class="part-name">tack</span> - </dt> - - <dd> - <p>terminfo action checker</p> - - <p><a href= - "https://invisible-island.net/ncurses/tack.html">https://invisible-island.net/ncurses/tack.html</a></p> - </dd> - - <dt><span class="part-name">tmux</span> - </dt> - - <dd> - <p>terminal multiplexor</p> - - <p><a href= - "https://github.com/tmux/tmux/wiki">https://github.com/tmux/tmux/wiki</a></p> - </dd> - - <dt><span class="part-name">vile</span> - </dt> - - <dd> - <p><em>vi-like-emacs</em> may be built to use the terminfo, - termcap or curses interfaces.</p> - - <p><a href= - "https://invisible-island.net/vile/">https://invisible-island.net/vile/</a></p> - </dd> - </dl> - </blockquote> - - <p>and finally, those which use only the termcap interface:</p> - - <blockquote> - <dl> - <dt><span class="part-name">emacs</span> - </dt> - - <dd> - <p>text editor</p> - - <p><a href= - "https://www.gnu.org/software/emacs/">https://www.gnu.org/software/emacs/</a></p> - </dd> - - <dt><span class="part-name">less</span> - </dt> - - <dd> - <p>The most commonly used <em>pager</em> (a program that - displays text files).</p> - - <p><a href= - "http://www.greenwoodsoftware.com/less/">http://www.greenwoodsoftware.com/less/</a></p> - </dd> - - <dt><span class="part-name">screen</span> - </dt> - - <dd> - <p>terminal multiplexor</p> - - <p><a href= - "https://www.gnu.org/software/screen/">https://www.gnu.org/software/screen/</a></p> - </dd> - - <dt><span class="part-name">vim</span> - </dt> - - <dd> - <p>text editor</p> - - <p><a href="https://www.vim.org/">https://www.vim.org/</a></p> - </dd> - </dl> - </blockquote> - - <h2><a name="h2-development" id="h2-development">Development - activities</a></h2> - - <p>Zeyd Ben-Halim started <span class="main-name">ncurses</span> - from a previous package pcurses, written by Pavel Curtis. Eric S. - Raymond continued development. Jürgen Pfeifer wrote most of - the form and menu libraries.</p> - - <p>Ongoing development work is done by <a href= - "mailto:dickey@invisible-island.net">Thomas E. Dickey</a>. Thomas - E. Dickey has acted as the maintainer for the Free Software - Foundation, which holds a <a href= - "https://invisible-island.net/ncurses/ncurses-license.html">copyright - on ncurses</a> for releases 4.2 through 6.1. Following the - release of ncurses 6.1, effective as of release 6.2, copyright - for ncurses reverted to Thomas E. Dickey (see the <a href= - "https://invisible-island.net/ncurses/ncurses.faq.html#relicensed"> - ncurses FAQ</a> for additional information).</p> - - <p>Contact the current maintainers at</p> - - <blockquote> - <a href="mailto:bug-ncurses@gnu.org">bug-ncurses@gnu.org</a> - </blockquote> - - <p>To join the ncurses mailing list, please write email to</p> - - <blockquote> - <a href= - "mailto:bug-ncurses-request@gnu.org">bug-ncurses-request@gnu.org</a> - </blockquote> - containing the line: - - <blockquote> - <p><code>subscribe</code> - <em><name>@<host.domain></em></p> - </blockquote> - - <p>This list is open to anyone interested in helping with the - development and testing of this package.</p> - - <p>Beta versions of <span class="main-name">ncurses</span> are - made available at</p> - - <blockquote> - <p><a href= - "ftp://ftp.invisible-island.net/ncurses/current/">ftp://ftp.invisible-island.net/ncurses/current/</a> - and<br> - <a href= - "https://invisible-mirror.net/archives/ncurses/current/">https://invisible-mirror.net/archives/ncurses/current/</a> .</p> - </blockquote> - - <p>Patches to the current release are made available at</p> - - <blockquote> - <p><a href= - "ftp://ftp.invisible-island.net/ncurses/6.1/">ftp://ftp.invisible-island.net/ncurses/6.1/</a> - and<br> - <a href= - "https://invisible-mirror.net/archives/ncurses/6.1/">https://invisible-mirror.net/archives/ncurses/6.1/</a> .</p> - </blockquote> - - <p>There is an archive of the mailing list here:</p> - - <blockquote> - <p><a href= - "http://lists.gnu.org/archive/html/bug-ncurses">http://lists.gnu.org/archive/html/bug-ncurses</a> - (also <a href= - "https://lists.gnu.org/archive/html/bug-ncurses">https</a>)</p> - </blockquote> - - <h2><a name="h2-this-stuff" id="h2-this-stuff">Related - resources</a></h2> - - <p>The release notes make scattered references to these pages, - which may be interesting by themselves:</p> - - <ul> - <li><a href= - "https://invisible-island.net/ncurses/ncurses-license.html"><span class="main-name"> - ncurses</span> licensing</a></li> - - <li><a href= - "https://invisible-island.net/ncurses/ncurses-mapsyms.html">Symbol - versioning in <span class="main-name">ncurses</span></a></li> - - <li><a href= - "https://invisible-island.net/ncurses/ncurses-slang.html">Comments - on <span class="main-name">ncurses</span> versus <span class= - "main-name">slang</span> (S-Lang)</a></li> - - <li><a href= - "https://invisible-island.net/ncurses/tack.html">tack – - terminfo action checker</a></li> - - <li><a href= - "https://invisible-island.net/ncurses/tctest.html">tctest - – termcap library checker</a></li> - - <li><a href= - "https://invisible-island.net/ncurses/ncurses.html#download_database"> - Terminal Database</a></li> - </ul> - - <h2><a name="h2-other-stuff" id="h2-other-stuff">Other - resources</a></h2> - - <p>The distribution provides a newer version of the - terminfo-format terminal description file once maintained by - <a href="http://www.catb.org/~esr/terminfo/">Eric - Raymond</a> . Unlike the older version, the termcap and - terminfo data are provided in the same file, which also provides - several user-definable extensions beyond the X/Open - specification.</p> - - <p>You can find lots of information on terminal-related topics - not covered in the terminfo file at <a href= - "http://web.archive.org/web/*/http://www.cs.utk.edu/~shuford/terminal"> - Richard Shuford's archive</a> . The collection of computer - manuals at <a href= - "http://www.bitsavers.org/pdf/">bitsavers.org</a> has also been - useful.</p> - - <div class="nav"> - <ul> - <li><a href="#h2-overview">Overview</a></li> - - <li> - <a href="#h2-release-notes">Release Notes</a> - - <ul> - <li> - <a href="#h3-library">Library improvements</a> - - <ul> - <li><a href="#h4-new-library">New features</a></li> - - <li><a href="#h4-fixes-library">Other - improvements</a></li> - </ul> - </li> - - <li> - <a href="#h3-programs">Program improvements</a> - - <ul> - <li><a href="#h4-utilities">Utilities</a></li> - - <li><a href="#h4-examples">Examples</a></li> - </ul> - </li> - - <li><a href="#h3-database">Terminal database</a></li> - - <li><a href="#h3-documentation">Documentation</a></li> - - <li><a href="#h3-bug-fixes">Interesting bug-fixes</a></li> - - <li> - <a href="#h3-config-config">Configuration changes</a> - - <ul> - <li><a href="#h4-config-major">Major changes</a></li> - - <li><a href="#h4-config-options">Configuration - options</a></li> - </ul> - </li> - - <li><a href="#h3-portability">Portability</a></li> - </ul> - </li> - - <li><a href="#h2-features">Features of <span class= - "main-name">ncurses</span></a></li> - - <li><a href="#h2-who-uses">Applications using <span class= - "main-name">ncurses</span></a></li> - - <li><a href="#h2-development">Development activities</a></li> - - <li><a href="#h2-this-stuff">Related resources</a></li> - - <li><a href="#h2-other-stuff">Other resources</a></li> - </ul> - </div> -</body> -</html> diff --git contrib/ncurses/doc/html/hackguide.html contrib/ncurses/doc/html/hackguide.html index 71312a565f4c..2b9445538dc8 100644 --- contrib/ncurses/doc/html/hackguide.html +++ contrib/ncurses/doc/html/hackguide.html @@ -1,7 +1,7 @@ <!-- - $Id: hackguide.html,v 1.33 2020/02/02 23:34:34 tom Exp $ + $Id: hackguide.html,v 1.36 2022/11/26 19:31:56 tom Exp $ **************************************************************************** - * Copyright 2019,2020 Thomas E. Dickey * + * Copyright 2019-2020,2022 Thomas E. Dickey * * Copyright 2000-2013,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -30,12 +30,10 @@ **************************************************************************** --> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> - <html> <head> <meta name="generator" content= - "HTML Tidy for HTML5 for Linux version 5.2.0"> - + "HTML Tidy for HTML5 for Linux version 5.6.0"> <title>A Hacker's Guide to Ncurses Internals</title> <link rel="author" href="mailto:bugs-ncurses@gnu.org"> <meta http-equiv="Content-Type" content= @@ -45,70 +43,70 @@ the ncurses-intro.html document, expected to be in the same directory with this one. --> </head> - <body> - <h1>A Hacker's Guide to NCURSES</h1> + <h1 class="no-header">A Hacker's Guide to NCURSES</h1> - <h1>Contents</h1> + <h2>A Hacker's Guide to NCURSES</h2> - <ul> - <li><a href="#abstract">Abstract</a></li> + <div class="nav"> + <h2>Contents</h2> - <li> - <a href="#objective">Objective of the Package</a> + <ul> + <li><a href="#abstract">Abstract</a></li> - <ul> - <li><a href="#whysvr4">Why System V Curses?</a></li> + <li> + <a href="#objective">Objective of the Package</a> + <ul> + <li><a href="#whysvr4">Why System V Curses?</a></li> - <li><a href="#extensions">How to Design Extensions</a></li> - </ul> - </li> - - <li><a href="#portability">Portability and Configuration</a></li> + <li><a href="#extensions">How to Design Extensions</a></li> + </ul> + </li> - <li><a href="#documentation">Documentation Conventions</a></li> + <li><a href="#portability">Portability and Configuration</a></li> - <li><a href="#bugtrack">How to Report Bugs</a></li> - - <li> - <a href="#ncurslib">A Tour of the Ncurses Library</a> + <li><a href="#documentation">Documentation Conventions</a></li> - <ul> - <li><a href="#loverview">Library Overview</a></li> + <li><a href="#bugtrack">How to Report Bugs</a></li> - <li><a href="#engine">The Engine Room</a></li> + <li> + <a href="#ncurslib">A Tour of the Ncurses Library</a> + <ul> + <li><a href="#loverview">Library Overview</a></li> - <li><a href="#input">Keyboard Input</a></li> + <li><a href="#engine">The Engine Room</a></li> - <li><a href="#mouse">Mouse Events</a></li> + <li><a href="#input">Keyboard Input</a></li> - <li><a href="#output">Output and Screen Updating</a></li> - </ul> - </li> + <li><a href="#mouse">Mouse Events</a></li> - <li><a href="#fmnote">The Forms and Menu Libraries</a></li> + <li><a href="#output">Output and Screen Updating</a></li> + </ul> + </li> - <li> - <a href="#tic">A Tour of the Terminfo Compiler</a> + <li><a href="#fmnote">The Forms and Menu Libraries</a></li> - <ul> - <li><a href="#nonuse">Translation of - Non-<strong>use</strong> Capabilities</a></li> + <li> + <a href="#tic">A Tour of the Terminfo Compiler</a> + <ul> + <li><a href="#nonuse">Translation of + Non-<strong>use</strong> Capabilities</a></li> - <li><a href="#uses">Use Capability Resolution</a></li> + <li><a href="#uses">Use Capability Resolution</a></li> - <li><a href="#translation">Source-Form Translation</a></li> - </ul> - </li> + <li><a href="#translation">Source-Form Translation</a></li> + </ul> + </li> - <li><a href="#utils">Other Utilities</a></li> + <li><a href="#utils">Other Utilities</a></li> - <li><a href="#style">Style Tips for Developers</a></li> + <li><a href="#style">Style Tips for Developers</a></li> - <li><a href="#port">Porting Hints</a></li> - </ul> + <li><a href="#port">Porting Hints</a></li> + </ul> + </div> - <h1><a name="abstract" id="abstract">Abstract</a></h1> + <h2><a name="abstract" id="abstract">Abstract</a></h2> <p>This document is a hacker's tour of the <strong>ncurses</strong> library and utilities. It discusses @@ -117,8 +115,8 @@ this one. anyone who is interested in porting, extending or improving the package.</p> - <h1><a name="objective" id="objective">Objective of the - Package</a></h1> + <h2><a name="objective" id="objective">Objective of the + Package</a></h2> <p>The objective of the <strong>ncurses</strong> package is to provide a free software API for character-cell terminals and @@ -144,7 +142,7 @@ this one. — we cannot add features if it means breaking the portion of the API corresponding to historical curses versions.</p> - <h2><a name="whysvr4" id="whysvr4">Why System V Curses?</a></h2> + <h3><a name="whysvr4" id="whysvr4">Why System V Curses?</a></h3> <p>We used System V curses as a model, reverse-engineering their API, in order to fulfill the first two objectives.</p> @@ -158,8 +156,8 @@ this one. So conformance with System V took us most of the way to base-level XSI conformance.</p> - <h2><a name="extensions" id="extensions">How to Design - Extensions</a></h2> + <h3><a name="extensions" id="extensions">How to Design + Extensions</a></h3> <p>The third objective (standards conformance) requires that it be easy to condition source code using <strong>ncurses</strong> @@ -177,8 +175,8 @@ this one. library header. You can use this to condition the calls to the mouse API calls.</p> - <h1><a name="portability" id="portability">Portability and - Configuration</a></h1> + <h2><a name="portability" id="portability">Portability and + Configuration</a></h2> <p>Code written for <strong>ncurses</strong> may assume an ANSI-standard C compiler and POSIX-compatible OS interface. It @@ -208,8 +206,8 @@ this one. (configure.in and aclocal.m4) to set up a new feature macro, which you then use to condition your code.</p> - <h1><a name="documentation" id="documentation">Documentation - Conventions</a></h1> + <h2><a name="documentation" id="documentation">Documentation + Conventions</a></h2> <p>There are three kinds of documentation associated with this package. Each has a different preferred format:</p> @@ -226,7 +224,7 @@ this one. <ol> <li><strong>Maintain package-internal files in plain - text.</strong> The expected viewer for them <em>more(1)</em> or + text.</strong> The expected viewer for them is <em>more(1)</em> or an editor window; there is no point in elaborate mark-up.</li> <li><strong>Mark up manual pages in the man macros.</strong> @@ -249,7 +247,7 @@ this one. course, it make exporting things like the announcement document to WWW pretty trivial.</p> - <h1><a name="bugtrack" id="bugtrack">How to Report Bugs</a></h1> + <h2><a name="bugtrack" id="bugtrack">How to Report Bugs</a></h2> <p>The <a name="bugreport" id="bugreport">reporting address for bugs</a> is <a href= @@ -258,10 +256,9 @@ this one. <code>bug-ncurses-request@gnu.org</code> with a message containing the line:</p> - <pre> + <pre class="code-block"> subscribe <name>@<host.domain> </pre> - <p>The <code>ncurses</code> code is maintained by a small group of volunteers. While we try our best to fix bugs promptly, we simply do not have a lot of hours to spend on elementary @@ -276,8 +273,7 @@ this one. tail end and have to wait a while.</p> <ol> - <li>Develop a recipe to reproduce the bug. - + <li><p>Develop a recipe to reproduce the bug. <p>Bugs we can reproduce are likely to be fixed very quickly, often within days. The most effective single thing you can do to get a quick fix is develop a way we can duplicate the bad @@ -287,8 +283,7 @@ this one. with the distribution.)</p> </li> - <li>Try to reproduce the bug on a different terminal type. - + <li><p>Try to reproduce the bug on a different terminal type. <p>In our experience, most of the behaviors people report as library bugs are actually due to subtle problems in terminal descriptions. This is especially likely to be true if you are @@ -309,8 +304,7 @@ this one. triggered or masked by these.</p> </li> - <li>Generate and examine a trace file for the broken behavior. - + <li><p>Generate and examine a trace file for the broken behavior. <p>Recompile your program with the debugging versions of the libraries. Insert a <code>trace()</code> call with the argument set to <code>TRACE_UPDATE</code>. (See <a href= @@ -341,8 +335,7 @@ this one. screen-update logic quite exactly.</p> </li> - <li>Report details and symptoms, not just interpretations. - + <li><p>Report details and symptoms, not just interpretations. <p>If you do the preceding two steps, it is very likely that you will discover the nature of the problem yourself and be able to send us a fix. This will create happy feelings all @@ -397,10 +390,10 @@ this one. out. You can also test the hardware-scrolling optimization separately with <code>hardscroll</code>.</p> - <h1><a name="ncurslib" id="ncurslib">A Tour of the Ncurses - Library</a></h1> + <h2><a name="ncurslib" id="ncurslib">A Tour of the Ncurses + Library</a></h2> - <h2><a name="loverview" id="loverview">Library Overview</a></h2> + <h3><a name="loverview" id="loverview">Library Overview</a></h3> <p>Most of the library is superstructure — fairly trivial convenience interfaces to a small set of basic functions and data @@ -495,9 +488,9 @@ this one. <p>We will discuss these in the compiler tour.</p> - <h2><a name="engine" id="engine">The Engine Room</a></h2> + <h3><a name="engine" id="engine">The Engine Room</a></h3> - <h3><a name="input" id="input">Keyboard Input</a></h3> + <h4><a name="input" id="input">Keyboard Input</a></h4> <p>All <code>ncurses</code> input funnels through the function <code>wgetch()</code>, defined in <code>lib_getch.c</code>. This @@ -523,7 +516,7 @@ this one. The function <code>timed_wait()</code> effectively simulates a System V select.</p> - <h3><a name="mouse" id="mouse">Mouse Events</a></h3> + <h4><a name="mouse" id="mouse">Mouse Events</a></h4> <p>If the mouse interface is active, <code>wgetch()</code> polls for mouse events each call, before it goes to the keyboard for @@ -568,7 +561,7 @@ this one. reports (low-level events) into a gesture (a high-level or composite event).</p> - <h3><a name="output" id="output">Output and Screen Updating</a></h3> + <h4><a name="output" id="output">Output and Screen Updating</a></h4> <p>With the single exception of character echoes during a <code>wgetnstr()</code> call (which simulates cooked-mode line @@ -630,7 +623,7 @@ this one. <code>include/curses.h.in</code> for mask values, near the end.</p> - <h1><a name="fmnote" id="fmnote">The Forms and Menu Libraries</a></h1> + <h2><a name="fmnote" id="fmnote">The Forms and Menu Libraries</a></h2> <p>The forms and menu libraries should work reliably in any environment you can port ncurses to. The only portability issue @@ -647,7 +640,7 @@ this one. This version has been slightly cleaned up for <code>ncurses</code>.</p> - <h1><a name="tic" id="tic">A Tour of the Terminfo Compiler</a></h1> + <h2><a name="tic" id="tic">A Tour of the Terminfo Compiler</a></h2> <p>The <strong>ncurses</strong> implementation of <strong>tic</strong> is rather complex internally; it has to do a @@ -664,8 +657,8 @@ this one. values; the grammar above it is trivial, just "parse entries till you run out of file".</p> - <h2><a name="nonuse" id="nonuse">Translation of - Non-<strong>use</strong> Capabilities</a></h2> + <h3><a name="nonuse" id="nonuse">Translation of + Non-<strong>use</strong> Capabilities</a></h3> <p>Translation of most things besides <strong>use</strong> capabilities is pretty straightforward. The lexical analyzer's @@ -689,7 +682,7 @@ this one. file. We will have more to say about this in the section on <a href="#translation">Source-Form Translation</a>.</p> - <h2><a name="uses" id="uses">Use Capability Resolution</a></h2> + <h3><a name="uses" id="uses">Use Capability Resolution</a></h3> <p>The background problem that makes <strong>tic</strong> tricky is not the capability translation itself, it is the resolution of @@ -744,8 +737,8 @@ this one. overwriting entries newly made during the <strong>tic</strong> run, but not about overwriting ones that predate it.</p> - <h2><a name="translation" id="translation">Source-Form - Translation</a></h2> + <h3><a name="translation" id="translation">Source-Form + Translation</a></h3> <p>Another use of <strong>tic</strong> is to do source translation between various termcap and terminfo formats. There @@ -773,7 +766,7 @@ this one. where the AIX <strong>box1</strong> capability get translated to an <strong>acsc</strong> string.</p> - <h1><a name="utils" id="utils">Other Utilities</a></h1> + <h2><a name="utils" id="utils">Other Utilities</a></h2> <p>The <strong>infocmp</strong> utility is just a wrapper around the same entry-dumping code used by <strong>tic</strong> for @@ -787,7 +780,7 @@ this one. just do an entry load followed by a <code>tputs()</code> of a selected capability.</p> - <h1><a name="style" id="style">Style Tips for Developers</a></h1> + <h2><a name="style" id="style">Style Tips for Developers</a></h2> <p>See the TO-DO file in the top-level directory of the source distribution for additions that would be particularly useful.</p> @@ -816,7 +809,7 @@ this one. <p>Have fun!</p> - <h1><a name="port" id="port">Porting Hints</a></h1> + <h2><a name="port" id="port">Porting Hints</a></h2> <p>The following notes are intended to be a first step towards DOS and Macintosh ports of the ncurses libraries.</p> diff --git contrib/ncurses/doc/html/ncurses-intro.html contrib/ncurses/doc/html/ncurses-intro.html index ebf2e2e03dda..194850246fa6 100644 --- contrib/ncurses/doc/html/ncurses-intro.html +++ contrib/ncurses/doc/html/ncurses-intro.html @@ -1,7 +1,7 @@ <!-- - $Id: ncurses-intro.html,v 1.54 2020/02/02 23:34:34 tom Exp $ + $Id: ncurses-intro.html,v 1.57 2022/11/26 19:33:46 tom Exp $ **************************************************************************** - * Copyright 2019,2020 Thomas E. Dickey * + * Copyright 2019-2020,2022 Thomas E. Dickey * * Copyright 2000-2013,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -30,288 +30,279 @@ **************************************************************************** --> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> - <html> <head> <meta name="generator" content= - "HTML Tidy for HTML5 for Linux version 5.2.0"> - + "HTML Tidy for HTML5 for Linux version 5.6.0"> <title>Writing Programs with NCURSES</title> <link rel="author" href="mailto:bugs-ncurses@gnu.org"> <meta http-equiv="Content-Type" content= "text/html; charset=us-ascii"> </head> - <body> - <h1>Writing Programs with NCURSES</h1> + <h1 class="no-header">Writing Programs with NCURSES</h1> + + <h2>Writing Programs with NCURSES</h2> <blockquote> by Eric S. Raymond and Zeyd M. Ben-Halim<br> updates since release 1.9.9e by Thomas Dickey </blockquote> - <h1>Contents</h1> - - <ul> - <li> - <a href="#introduction">Introduction</a> - - <ul> - <li><a href="#history">A Brief History of Curses</a></li> - - <li><a href="#scope">Scope of This Document</a></li> - - <li><a href="#terminology">Terminology</a></li> - </ul> - </li> - - <li> - <a href="#curses">The Curses Library</a> - - <ul> - <li> - <a href="#overview">An Overview of Curses</a> - - <ul> - <li><a href="#compiling">Compiling Programs using - Curses</a></li> - - <li><a href="#updating">Updating the Screen</a></li> - - <li><a href="#stdscr">Standard Windows and Function - Naming Conventions</a></li> - - <li><a href="#variables">Variables</a></li> - </ul> - </li> - - <li> - <a href="#using">Using the Library</a> - - <ul> - <li><a href="#starting">Starting up</a></li> + <div class="nav"> + <h2>Contents</h2> - <li><a href="#output">Output</a></li> + <ul> + <li> + <a href="#introduction">Introduction</a> + <ul> + <li><a href="#history">A Brief History of Curses</a></li> - <li><a href="#input">Input</a></li> + <li><a href="#scope">Scope of This Document</a></li> - <li><a href="#formschars">Using Forms Characters</a></li> + <li><a href="#terminology">Terminology</a></li> + </ul> + </li> - <li><a href="#attributes">Character Attributes and - Color</a></li> + <li> + <a href="#curses">The Curses Library</a> + <ul> + <li> + <a href="#overview">An Overview of Curses</a> + <ul> + <li><a href="#compiling">Compiling Programs using + Curses</a></li> - <li><a href="#mouse">Mouse Interfacing</a></li> + <li><a href="#updating">Updating the Screen</a></li> - <li><a href="#finishing">Finishing Up</a></li> - </ul> - </li> + <li><a href="#stdscr">Standard Windows and Function + Naming Conventions</a></li> - <li> - <a href="#functions">Function Descriptions</a> + <li><a href="#variables">Variables</a></li> + </ul> + </li> - <ul> - <li><a href="#init">Initialization and Wrapup</a></li> + <li> + <a href="#using">Using the Library</a> + <ul> + <li><a href="#starting">Starting up</a></li> - <li><a href="#flush">Causing Output to the Terminal</a></li> + <li><a href="#output">Output</a></li> - <li><a href="#lowlevel">Low-Level Capability Access</a></li> + <li><a href="#input">Input</a></li> - <li><a href="#debugging">Debugging</a></li> - </ul> - </li> + <li><a href="#formschars">Using Forms Characters</a></li> - <li> - <a href="#hints">Hints, Tips, and Tricks</a> + <li><a href="#attributes">Character Attributes and + Color</a></li> - <ul> - <li><a href="#caution">Some Notes of Caution</a></li> + <li><a href="#mouse">Mouse Interfacing</a></li> - <li><a href="#leaving">Temporarily Leaving ncurses - Mode</a></li> + <li><a href="#finishing">Finishing Up</a></li> + </ul> + </li> - <li><a href="#xterm">Using <code>ncurses</code> under - <code>xterm</code></a></li> + <li> + <a href="#functions">Function Descriptions</a> + <ul> + <li><a href="#init">Initialization and Wrapup</a></li> - <li><a href="#screens">Handling Multiple Terminal - Screens</a></li> + <li><a href="#flush">Causing Output to the + Terminal</a></li> - <li><a href="#testing">Testing for Terminal - Capabilities</a></li> + <li><a href="#lowlevel">Low-Level Capability + Access</a></li> - <li><a href="#tuning">Tuning for Speed</a></li> + <li><a href="#debugging">Debugging</a></li> + </ul> + </li> - <li><a href="#special">Special Features of - <code>ncurses</code></a></li> - </ul> - </li> + <li> + <a href="#hints">Hints, Tips, and Tricks</a> + <ul> + <li><a href="#caution">Some Notes of Caution</a></li> - <li> - <a href="#compat">Compatibility with Older Versions</a> + <li><a href="#leaving">Temporarily Leaving ncurses + Mode</a></li> - <ul> - <li><a href="#refbug">Refresh of Overlapping - Windows</a></li> + <li><a href="#xterm">Using <code>ncurses</code> under + <code>xterm</code></a></li> - <li><a href="#backbug">Background Erase</a></li> - </ul> - </li> + <li><a href="#screens">Handling Multiple Terminal + Screens</a></li> - <li><a href="#xsifuncs">XSI Curses Conformance</a></li> - </ul> - </li> + <li><a href="#testing">Testing for Terminal + Capabilities</a></li> - <li> - <a href="#panels">The Panels Library</a> + <li><a href="#tuning">Tuning for Speed</a></li> - <ul> - <li><a href="#pcompile">Compiling With the Panels - Library</a></li> + <li><a href="#special">Special Features of + <code>ncurses</code></a></li> + </ul> + </li> - <li><a href="#poverview">Overview of Panels</a></li> + <li> + <a href="#compat">Compatibility with Older Versions</a> + <ul> + <li><a href="#refbug">Refresh of Overlapping + Windows</a></li> - <li><a href="#pstdscr">Panels, Input, and the Standard - Screen</a></li> + <li><a href="#backbug">Background Erase</a></li> + </ul> + </li> - <li><a href="#hiding">Hiding Panels</a></li> + <li><a href="#xsifuncs">XSI Curses Conformance</a></li> + </ul> + </li> - <li><a href="#pmisc">Miscellaneous Other Facilities</a></li> - </ul> - </li> + <li> + <a href="#panels">The Panels Library</a> + <ul> + <li><a href="#pcompile">Compiling With the Panels + Library</a></li> - <li> - <a href="#menu">The Menu Library</a> + <li><a href="#poverview">Overview of Panels</a></li> - <ul> - <li><a href="#mcompile">Compiling with the menu Library</a></li> + <li><a href="#pstdscr">Panels, Input, and the Standard + Screen</a></li> - <li><a href="#moverview">Overview of Menus</a></li> + <li><a href="#hiding">Hiding Panels</a></li> - <li><a href="#mselect">Selecting items</a></li> + <li><a href="#pmisc">Miscellaneous Other Facilities</a></li> + </ul> + </li> - <li><a href="#mdisplay">Menu Display</a></li> + <li> + <a href="#menu">The Menu Library</a> + <ul> + <li><a href="#mcompile">Compiling with the menu + Library</a></li> - <li><a href="#mwindows">Menu Windows</a></li> + <li><a href="#moverview">Overview of Menus</a></li> - <li><a href="#minput">Processing Menu Input</a></li> + <li><a href="#mselect">Selecting items</a></li> - <li><a href="#mmisc">Miscellaneous Other Features</a></li> - </ul> - </li> + <li><a href="#mdisplay">Menu Display</a></li> - <li> - <a href="#form">The Forms Library</a> + <li><a href="#mwindows">Menu Windows</a></li> - <ul> - <li><a href="#fcompile">Compiling with the forms - Library</a></li> + <li><a href="#minput">Processing Menu Input</a></li> - <li><a href="#foverview">Overview of Forms</a></li> + <li><a href="#mmisc">Miscellaneous Other Features</a></li> + </ul> + </li> - <li><a href="#fcreate">Creating and Freeing Fields and - Forms</a></li> + <li> + <a href="#form">The Forms Library</a> + <ul> + <li><a href="#fcompile">Compiling with the forms + Library</a></li> - <li> - <a href="#fattributes">Fetching and Changing Field - Attributes</a> + <li><a href="#foverview">Overview of Forms</a></li> - <ul> - <li><a href="#fsizes">Fetching Size and Location - Data</a></li> + <li><a href="#fcreate">Creating and Freeing Fields and + Forms</a></li> - <li><a href="#flocation">Changing the Field - Location</a></li> + <li> + <a href="#fattributes">Fetching and Changing Field + Attributes</a> + <ul> + <li><a href="#fsizes">Fetching Size and Location + Data</a></li> - <li><a href="#fjust">The Justification Attribute</a></li> + <li><a href="#flocation">Changing the Field + Location</a></li> - <li><a href="#fdispatts">Field Display Attributes</a></li> + <li><a href="#fjust">The Justification Attribute</a></li> - <li><a href="#foptions">Field Option Bits</a></li> + <li><a href="#fdispatts">Field Display Attributes</a></li> - <li><a href="#fstatus">Field Status</a></li> + <li><a href="#foptions">Field Option Bits</a></li> - <li><a href="#fuser">Field User Pointer</a></li> - </ul> - </li> + <li><a href="#fstatus">Field Status</a></li> - <li><a href="#fdynamic">Variable-Sized Fields</a></li> + <li><a href="#fuser">Field User Pointer</a></li> + </ul> + </li> - <li> - <a href="#fvalidation">Field Validation</a> + <li><a href="#fdynamic">Variable-Sized Fields</a></li> - <ul> - <li><a href="#ftype_alpha">TYPE_ALPHA</a></li> + <li> + <a href="#fvalidation">Field Validation</a> + <ul> + <li><a href="#ftype_alpha">TYPE_ALPHA</a></li> - <li><a href="#ftype_alnum">TYPE_ALNUM</a></li> + <li><a href="#ftype_alnum">TYPE_ALNUM</a></li> - <li><a href="#ftype_enum">TYPE_ENUM</a></li> + <li><a href="#ftype_enum">TYPE_ENUM</a></li> - <li><a href="#ftype_integer">TYPE_INTEGER</a></li> + <li><a href="#ftype_integer">TYPE_INTEGER</a></li> - <li><a href="#ftype_numeric">TYPE_NUMERIC</a></li> + <li><a href="#ftype_numeric">TYPE_NUMERIC</a></li> - <li><a href="#ftype_regexp">TYPE_REGEXP</a></li> - </ul> - </li> + <li><a href="#ftype_regexp">TYPE_REGEXP</a></li> + </ul> + </li> - <li><a href="#fbuffer">Direct Field Buffer Manipulation</a></li> + <li><a href="#fbuffer">Direct Field Buffer + Manipulation</a></li> - <li><a href="#formattrs">Attributes of Forms</a></li> + <li><a href="#formattrs">Attributes of Forms</a></li> - <li><a href="#fdisplay">Control of Form Display</a></li> + <li><a href="#fdisplay">Control of Form Display</a></li> - <li> - <a href="#fdriver">Input Processing in the Forms - Driver</a> + <li> + <a href="#fdriver">Input Processing in the Forms + Driver</a> + <ul> + <li><a href="#fpage">Page Navigation Requests</a></li> - <ul> - <li><a href="#fpage">Page Navigation Requests</a></li> + <li><a href="#ffield">Inter-Field Navigation + Requests</a></li> - <li><a href="#ffield">Inter-Field Navigation - Requests</a></li> + <li><a href="#fifield">Intra-Field Navigation + Requests</a></li> - <li><a href="#fifield">Intra-Field Navigation - Requests</a></li> + <li><a href="#fscroll">Scrolling Requests</a></li> - <li><a href="#fscroll">Scrolling Requests</a></li> + <li><a href="#fedit">Field Editing Requests</a></li> - <li><a href="#fedit">Field Editing Requests</a></li> + <li><a href="#forder">Order Requests</a></li> - <li><a href="#forder">Order Requests</a></li> + <li><a href="#fappcmds">Application Commands</a></li> + </ul> + </li> - <li><a href="#fappcmds">Application Commands</a></li> - </ul> - </li> + <li><a href="#fhooks">Field Change Hooks</a></li> - <li><a href="#fhooks">Field Change Hooks</a></li> + <li><a href="#ffocus">Field Change Commands</a></li> - <li><a href="#ffocus">Field Change Commands</a></li> + <li><a href="#frmoptions">Form Options</a></li> - <li><a href="#frmoptions">Form Options</a></li> + <li> + <a href="#fcustom">Custom Validation Types</a> + <ul> + <li><a href="#flinktypes">Union Types</a></li> - <li> - <a href="#fcustom">Custom Validation Types</a> + <li><a href="#fnewtypes">New Field Types</a></li> - <ul> - <li><a href="#flinktypes">Union Types</a></li> + <li><a href="#fcheckargs">Validation Function + Arguments</a></li> - <li><a href="#fnewtypes">New Field Types</a></li> + <li><a href="#fcustorder">Order Functions For Custom + Types</a></li> - <li><a href="#fcheckargs">Validation Function - Arguments</a></li> - - <li><a href="#fcustorder">Order Functions For Custom - Types</a></li> - - <li><a href="#fcustprobs">Avoiding Problems</a></li> - </ul> - </li> - </ul> - </li> - </ul> + <li><a href="#fcustprobs">Avoiding Problems</a></li> + </ul> + </li> + </ul> + </li> + </ul> + </div> <hr> - <h1><a name="introduction" id="introduction">Introduction</a></h1> + <h2><a name="introduction" id="introduction">Introduction</a></h2> <p>This document is an introduction to programming with <code>curses</code>. It is not an exhaustive reference for the @@ -349,7 +340,7 @@ <code>curses</code> will typically be a great deal simpler and less expensive than one using an X toolkit.</p> - <h2><a name="history" id="history">A Brief History of Curses</a></h2> + <h3><a name="history" id="history">A Brief History of Curses</a></h3> <p>Historically, the first ancestor of <code>curses</code> was the routines written to provide screen-handling for the @@ -387,7 +378,7 @@ to use more facilities and offer more capabilities, going far beyond BSD curses in power and flexibility.</p> - <h2><a name="scope" id="scope">Scope of This Document</a></h2> + <h3><a name="scope" id="scope">Scope of This Document</a></h3> <p>This document describes <code>ncurses</code>, a free implementation of the System V <code>curses</code> API with some @@ -448,7 +439,7 @@ libraries, also cloned from System V, which support easy construction and sequences of menus and fill-in forms.</p> - <h2><a name="terminology" id="terminology">Terminology</a></h2> + <h3><a name="terminology" id="terminology">Terminology</a></h3> <p>In this document, the following terminology is used with reasonable consistency:</p> @@ -476,21 +467,20 @@ screen.</dd> </dl> - <h1><a name="curses" id="curses">The Curses Library</a></h1> + <h2><a name="curses" id="curses">The Curses Library</a></h2> - <h2><a name="overview" id="overview">An Overview of Curses</a></h2> + <h3><a name="overview" id="overview">An Overview of Curses</a></h3> - <h3><a name="compiling" id="compiling">Compiling Programs using - Curses</a></h3> + <h4><a name="compiling" id="compiling">Compiling Programs using + Curses</a></h4> <p>In order to use the library, it is necessary to have certain types and variables defined. Therefore, the programmer must have a line:</p> - <pre> + <pre class="code-block"> #include <curses.h> </pre> - <p>at the top of the program source. The screen package uses the Standard I/O library, so <code><curses.h></code> includes <code><stdio.h></code>. <code><curses.h></code> also @@ -502,7 +492,7 @@ your LDFLAGS or on the command line. There is no need for any other libraries.</p> - <h3><a name="updating" id="updating">Updating the Screen</a></h3> + <h4><a name="updating" id="updating">Updating the Screen</a></h4> <p>In order to update the screen optimally, it is necessary for the routines to know what the screen currently looks like and @@ -533,8 +523,8 @@ like this,” and let the package implementation determine the most efficient way to repaint the screen.</p> - <h3><a name="stdscr" id="stdscr">Standard Windows and Function - Naming Conventions</a></h3> + <h4><a name="stdscr" id="stdscr">Standard Windows and Function + Naming Conventions</a></h4> <p>As hinted above, the routines can use several windows, but two are automatically given: <code>curscr</code>, which knows what @@ -563,46 +553,41 @@ “mv” and the desired (y, x) coordinates prepended to the arguments to the function. For example, the calls</p> - <pre> + <pre class="code-block"> move(y, x); addch(ch); </pre> - <p>can be replaced by</p> - <pre> + <pre class="code-block"> mvaddch(y, x, ch); </pre> - <p>and</p> - <pre> + <pre class="code-block"> wmove(win, y, x); waddch(win, ch); </pre> - <p>can be replaced by</p> - <pre> + <pre class="code-block"> mvwaddch(win, y, x, ch); </pre> - <p>Note that the window description pointer (win) comes before the added (y, x) coordinates. If a function requires a window pointer, it is always the first parameter passed.</p> - <h3><a name="variables" id="variables">Variables</a></h3> + <h4><a name="variables" id="variables">Variables</a></h4> <p>The <code>curses</code> library sets some variables describing the terminal capabilities.</p> - <pre> + <pre class="code-block"> type name description ------------------------------------------------------------------ int LINES number of lines on the terminal int COLS number of columns on the terminal </pre> - <p>The <code>curses.h</code> also introduces some <code>#define</code> constants and types of general usefulness:</p> @@ -635,7 +620,7 @@ <dd>error flag returned by routines when things go right.</dd> </dl> - <h2><a name="using" id="using">Using the Library</a></h2> + <h3><a name="using" id="using">Using the Library</a></h3> <p>Now we describe how to actually use the screen package. In it, we assume all updating, reading, etc. is applied to @@ -645,7 +630,7 @@ <p>Here is a sample program to motivate the discussion:</p> - <pre> + <pre class="code-block"> #include <stdlib.h> #include <curses.h> #include <signal.h> @@ -707,8 +692,7 @@ static void finish(int sig) exit(0); } </pre> - - <h3><a name="starting" id="starting">Starting up</a></h3> + <h4><a name="starting" id="starting">Starting up</a></h4> <p>In order to use the screen package, the routines must know about terminal characteristics, and the space for @@ -740,7 +724,7 @@ static void finish(int sig) allow you to get rid of old windows. All the options described above can be applied to any window.</p> - <h3><a name="output" id="output">Output</a></h3> + <h4><a name="output" id="output">Output</a></h4> <p>Now that we have set things up, we will want to actually update the terminal. The basic functions used to change what will @@ -775,7 +759,7 @@ static void finish(int sig) implementing a command which would redraw the screen in case it get messed up.</p> - <h3><a name="input" id="input">Input</a></h3> + <h4><a name="input" id="input">Input</a></h4> <p>The complementary function to <code>addch()</code> is <code>getch()</code> which, if echo is set, will call @@ -804,8 +788,8 @@ static void finish(int sig) <code>#define</code> values is determined by <code>key_</code> capabilities in the terminal's terminfo entry.</p> - <h3><a name="formschars" id="formschars">Using Forms - Characters</a></h3> + <h4><a name="formschars" id="formschars">Using Forms + Characters</a></h4> <p>The <code>addch()</code> function (and some others, including <code>box()</code> and <code>border()</code>) can accept some @@ -820,8 +804,8 @@ static void finish(int sig) <code>curses.h</code> will map them to a recognizable (though ugly) set of ASCII defaults.</p> - <h3><a name="attributes" id="attributes">Character Attributes and - Color</a></h3> + <h4><a name="attributes" id="attributes">Character Attributes and + Color</a></h4> <p>The <code>ncurses</code> package supports screen highlights including standout, reverse-video, underline, and blink. It also @@ -859,7 +843,7 @@ static void finish(int sig) that <code>COLOR_PAIR(N)</code>, for constant N, is itself a compile-time constant and can be used in initializers.</p> - <h3><a name="mouse" id="mouse">Mouse Interfacing</a></h3> + <h4><a name="mouse" id="mouse">Mouse Interfacing</a></h4> <p>The <code>ncurses</code> library also provides a mouse interface.</p> @@ -947,7 +931,7 @@ static void finish(int sig) <p>See the manual page <code>curs_mouse(3X)</code> for full details of the mouse-interface functions.</p> - <h3><a name="finishing" id="finishing">Finishing Up</a></h3> + <h4><a name="finishing" id="finishing">Finishing Up</a></h4> <p>In order to clean up after the <code>ncurses</code> routines, the routine <code>endwin()</code> is provided. It restores tty @@ -956,13 +940,13 @@ static void finish(int sig) anytime after the call to initscr, <code>endwin()</code> should be called before exiting.</p> - <h2><a name="functions" id="functions">Function Descriptions</a></h2> + <h3><a name="functions" id="functions">Function Descriptions</a></h3> <p>We describe the detailed behavior of some important curses functions here, as a supplement to the manual page descriptions.</p> - <h3><a name="init" id="init">Initialization and Wrapup</a></h3> + <h4><a name="init" id="init">Initialization and Wrapup</a></h4> <dl> <dt><code>initscr()</code> @@ -1025,7 +1009,7 @@ static void finish(int sig) reference.</dd> </dl> - <h3><a name="flush" id="flush">Causing Output to the Terminal</a></h3> + <h4><a name="flush" id="flush">Causing Output to the Terminal</a></h4> <dl> <dt><code>refresh()</code> and <code>wrefresh(win)</code></dt> @@ -1064,8 +1048,8 @@ static void finish(int sig) each update).</dd> </dl> - <h3><a name="lowlevel" id="lowlevel">Low-Level Capability - Access</a></h3> + <h4><a name="lowlevel" id="lowlevel">Low-Level Capability + Access</a></h4> <dl> <dt><code>setupterm(term, filenum, errret)</code> @@ -1082,7 +1066,6 @@ static void finish(int sig) indication is returned. The values returned can be 1 (all is well), 0 (no such terminal), or -1 (some problem locating the terminfo database). - <p>The value of <code>term</code> can be given as NULL, which will cause the value of <code>TERM</code> in the environment to be used. The <code>errret</code> pointer can also be given @@ -1107,7 +1090,7 @@ static void finish(int sig) </dd> </dl> - <h3><a name="debugging" id="debugging">Debugging</a></h3> + <h4><a name="debugging" id="debugging">Debugging</a></h4> <blockquote> <strong>NOTE:</strong> These functions are not part of the @@ -1149,14 +1132,14 @@ static void finish(int sig) be distinguished by the fact that they are named in capital letters.</p> - <h2><a name="hints" id="hints">Hints, Tips, and Tricks</a></h2> + <h3><a name="hints" id="hints">Hints, Tips, and Tricks</a></h3> <p>The <code>ncurses</code> manual pages are a complete reference for this library. In the remainder of this document, we discuss various useful methods that may not be obvious from the manual page descriptions.</p> - <h3><a name="caution" id="caution">Some Notes of Caution</a></h3> + <h4><a name="caution" id="caution">Some Notes of Caution</a></h4> <p>If you find yourself thinking you need to use <code>noraw()</code> or <code>nocbreak()</code>, think again and @@ -1196,8 +1179,8 @@ static void finish(int sig) with window resizes, in which case several screens could be open with different sizes.</p> - <h3><a name="leaving" id="leaving">Temporarily Leaving NCURSES - Mode</a></h3> + <h4><a name="leaving" id="leaving">Temporarily Leaving NCURSES + Mode</a></h4> <p>Sometimes you will want to write a program that spends most of its time in screen mode, but occasionally returns to ordinary @@ -1220,7 +1203,7 @@ static void finish(int sig) <p>Here is some sample code for shellout:</p> - <pre> + <pre class="code-block"> addstr("Shelling out..."); def_prog_mode(); /* save current tty modes */ endwin(); /* restore original tty modes */ @@ -1228,8 +1211,7 @@ static void finish(int sig) addstr("returned.\n"); /* prepare return message */ refresh(); /* restore save modes, repaint screen */ </pre> - - <h3><a name="xterm" id="xterm">Using NCURSES under XTERM</a></h3> + <h4><a name="xterm" id="xterm">Using NCURSES under XTERM</a></h4> <p>A resize operation in X sends <code>SIGWINCH</code> to the application running under xterm. The easiest way to handle @@ -1258,8 +1240,8 @@ static void finish(int sig) special-purpose code to handle <code>KEY_RESIZE</code> yourself.</p> - <h3><a name="screens" id="screens">Handling Multiple Terminal - Screens</a></h3> + <h4><a name="screens" id="screens">Handling Multiple Terminal + Screens</a></h4> <p>The <code>initscr()</code> function actually calls a function named <code>newterm()</code> to do most of its work. If you are @@ -1274,8 +1256,8 @@ static void finish(int sig) <code>def_shell_mode</code> and <code>def_prog_mode</code> on each tty yourself.</p> - <h3><a name="testing" id="testing">Testing for Terminal - Capabilities</a></h3> + <h4><a name="testing" id="testing">Testing for Terminal + Capabilities</a></h4> <p>Sometimes you may want to write programs that test for the presence of various capabilities before deciding whether to go @@ -1292,7 +1274,7 @@ static void finish(int sig) include the <code>term.h</code> file and test the value of the macro <code>cursor_address</code>.</p> - <h3><a name="tuning" id="tuning">Tuning for Speed</a></h3> + <h4><a name="tuning" id="tuning">Tuning for Speed</a></h4> <p>Use the <code>addchstr()</code> family of functions for fast screen-painting of text when you know the text does not contain @@ -1300,8 +1282,8 @@ static void finish(int sig) on your screens. Do not use the <code>immedok()</code> option!</p> - <h3><a name="special" id="special">Special Features of - NCURSES</a></h3> + <h4><a name="special" id="special">Special Features of + NCURSES</a></h4> <p>The <code>wresize()</code> function allows you to resize a window in place. The associated <code>resizeterm()</code> @@ -1325,16 +1307,16 @@ static void finish(int sig) only 8 colors, about a quarter (including XFree86 xterm) support 16 colors.</p> - <h2><a name="compat" id="compat">Compatibility with Older - Versions</a></h2> + <h3><a name="compat" id="compat">Compatibility with Older + Versions</a></h3> <p>Despite our best efforts, there are some differences between <code>ncurses</code> and the (undocumented!) behavior of older curses implementations. These arise from ambiguities or omissions in the documentation of the API.</p> - <h3><a name="refbug" id="refbug">Refresh of Overlapping - Windows</a></h3> + <h4><a name="refbug" id="refbug">Refresh of Overlapping + Windows</a></h4> <p>If you define two windows A and B that overlap, and then alternately scribble on and refresh them, the changes made to the @@ -1392,7 +1374,7 @@ static void finish(int sig) <code>doupdate()</code> and there will be a <em>single</em> burst of physical I/O that will do all your updates.</p> - <h3><a name="backbug" id="backbug">Background Erase</a></h3> + <h4><a name="backbug" id="backbug">Background Erase</a></h4> <p>If you have been using a very old versions of <code>ncurses</code> (1.8.7 or older) you may be surprised by the @@ -1409,7 +1391,7 @@ static void finish(int sig) <p>This change in behavior conforms <code>ncurses</code> to System V Release 4 and the XSI Curses standard.</p> - <h2><a name="xsifuncs" id="xsifuncs">XSI Curses Conformance</a></h2> + <h3><a name="xsifuncs" id="xsifuncs">XSI Curses Conformance</a></h3> <p>The <code>ncurses</code> library is intended to be base-level conformant with the XSI Curses standard from X/Open. Many @@ -1426,7 +1408,7 @@ static void finish(int sig) be linked (and will be prototype-checked) if the macro definition is disabled with <code>#undef</code>.</p> - <h1><a name="panels" id="panels">The Panels Library</a></h1> + <h2><a name="panels" id="panels">The Panels Library</a></h2> <p>The <code>ncurses</code> library by itself provides good support for screen displays in which the windows are tiled @@ -1446,16 +1428,15 @@ static void finish(int sig) System V. The version documented here is the <code>panel</code> code distributed with <code>ncurses</code>.</p> - <h2><a name="pcompile" id="pcompile">Compiling With the Panels - Library</a></h2> + <h3><a name="pcompile" id="pcompile">Compiling With the Panels + Library</a></h3> <p>Your panels-using modules must import the panels library declarations with</p> - <pre> + <pre class="code-block"> #include <panel.h> </pre> - <p>and must be linked explicitly with the panels library using an <code>-lpanel</code> argument. Note that they must also link the <code>ncurses</code> library with <code>-lncurses</code>. Many @@ -1463,7 +1444,7 @@ static void finish(int sig) still good practice to put <code>-lpanel</code> first and <code>-lncurses</code> second.</p> - <h2><a name="poverview" id="poverview">Overview of Panels</a></h2> + <h3><a name="poverview" id="poverview">Overview of Panels</a></h3> <p>A panel object is a window that is implicitly treated as part of a <dfn>deck</dfn> including all other panel objects. The deck @@ -1514,8 +1495,8 @@ static void finish(int sig) you will generate a lot of unnecessary refresh activity and screen flicker.</p> - <h2><a name="pstdscr" id="pstdscr">Panels, Input, and the - Standard Screen</a></h2> + <h3><a name="pstdscr" id="pstdscr">Panels, Input, and the + Standard Screen</a></h3> <p>You should not mix <code>wnoutrefresh()</code> or <code>wrefresh()</code> operations with panels code; this will @@ -1536,7 +1517,7 @@ static void finish(int sig) <p>There is presently no way to display changes to one obscured panel without repainting all panels.</p> - <h2><a name="hiding" id="hiding">Hiding Panels</a></h2> + <h3><a name="hiding" id="hiding">Hiding Panels</a></h3> <p>It is possible to remove a panel from the deck temporarily; use <code>hide_panel</code> for this. Use @@ -1548,7 +1529,7 @@ static void finish(int sig) cannot do <code>top_panel()</code> or <code>bottom_panel</code> on a hidden panel(). Other panels operations are applicable.</p> - <h2><a name="pmisc" id="pmisc">Miscellaneous Other Facilities</a></h2> + <h3><a name="pmisc" id="pmisc">Miscellaneous Other Facilities</a></h3> <p>It is possible to navigate the deck using the functions <code>panel_above()</code> and <code>panel_below</code>. Handed a @@ -1561,7 +1542,7 @@ static void finish(int sig) page documentation of <code>set_panel_userptr()</code> and <code>panel_userptr</code> for details.</p> - <h1><a name="menu" id="menu">The Menu Library</a></h1> + <h2><a name="menu" id="menu">The Menu Library</a></h2> <p>A menu is a screen display that assists the user to choose some subset of a given set of items. The <code>menu</code> @@ -1572,16 +1553,15 @@ static void finish(int sig) System V. The version documented here is the <code>menu</code> code distributed with <code>ncurses</code>.</p> - <h2><a name="mcompile" id="mcompile">Compiling With the menu - Library</a></h2> + <h3><a name="mcompile" id="mcompile">Compiling With the menu + Library</a></h3> <p>Your menu-using modules must import the menu library declarations with</p> - <pre> + <pre class="code-block"> #include <menu.h> </pre> - <p>and must be linked explicitly with the menus library using an <code>-lmenu</code> argument. Note that they must also link the <code>ncurses</code> library with <code>-lncurses</code>. Many @@ -1589,7 +1569,7 @@ static void finish(int sig) still good practice to put <code>-lmenu</code> first and <code>-lncurses</code> second.</p> - <h2><a name="moverview" id="moverview">Overview of Menus</a></h2> + <h3><a name="moverview" id="moverview">Overview of Menus</a></h3> <p>The menus created by this library consist of collections of <dfn>items</dfn> including a name string part and a description @@ -1633,7 +1613,7 @@ static void finish(int sig) <li>Terminate <code>curses</code>.</li> </ol> - <h2><a name="mselect" id="mselect">Selecting items</a></h2> + <h3><a name="mselect" id="mselect">Selecting items</a></h3> <p>Menus may be multi-valued or (the default) single-valued (see the manual page <code>menu_opts(3x)</code> to see how to change @@ -1654,7 +1634,7 @@ static void finish(int sig) so far defined for menus, but it is good practice to code as though other option bits might be on.</p> - <h2><a name="mdisplay" id="mdisplay">Menu Display</a></h2> + <h3><a name="mdisplay" id="mdisplay">Menu Display</a></h3> <p>The menu library calculates a minimum display size for your window, based on the following variables:</p> @@ -1710,7 +1690,7 @@ static void finish(int sig) which the library allows you to change (see the <code>menu_attribs(3x)</code> manual page.</p> - <h2><a name="mwindows" id="mwindows">Menu Windows</a></h2> + <h3><a name="mwindows" id="mwindows">Menu Windows</a></h3> <p>Each menu has, as mentioned previously, a pair of associated windows. Both these windows are painted when the menu is posted @@ -1732,7 +1712,7 @@ static void finish(int sig) the screen. To do that, call <code>wrefresh()</code> or some equivalent.</p> - <h2><a name="minput" id="minput">Processing Menu Input</a></h2> + <h3><a name="minput" id="minput">Processing Menu Input</a></h3> <p>The main loop of your menu-processing code should call <code>menu_driver()</code> repeatedly. The first argument of this @@ -1784,7 +1764,7 @@ static void finish(int sig) commands. The <code>menu_driver()</code> code ignores them and returns <code>E_UNKNOWN_COMMAND</code>.</p> - <h2><a name="mmisc" id="mmisc">Miscellaneous Other Features</a></h2> + <h3><a name="mmisc" id="mmisc">Miscellaneous Other Features</a></h3> <p>Various menu options can affect the processing and visual appearance and input processing of menus. See <code>menu_opts(3x) @@ -1807,7 +1787,7 @@ static void finish(int sig) <code>mitem_userptr(3x)</code> and <code>menu_userptr(3x)</code>.</p> - <h1><a name="form" id="form">The Forms Library</a></h1> + <h2><a name="form" id="form">The Forms Library</a></h2> <p>The <code>form</code> library is a curses extension that supports easy programming of on-screen forms for data entry and @@ -1817,16 +1797,15 @@ static void finish(int sig) System V. The version documented here is the <code>form</code> code distributed with <code>ncurses</code>.</p> - <h2><a name="fcompile" id="fcompile">Compiling With the form - Library</a></h2> + <h3><a name="fcompile" id="fcompile">Compiling With the form + Library</a></h3> <p>Your form-using modules must import the form library declarations with</p> - <pre> + <pre class="code-block"> #include <form.h> </pre> - <p>and must be linked explicitly with the forms library using an <code>-lform</code> argument. Note that they must also link the <code>ncurses</code> library with <code>-lncurses</code>. Many @@ -1834,7 +1813,7 @@ static void finish(int sig) still good practice to put <code>-lform</code> first and <code>-lncurses</code> second.</p> - <h2><a name="foverview" id="foverview">Overview of Forms</a></h2> + <h3><a name="foverview" id="foverview">Overview of Forms</a></h3> <p>A form is a collection of fields; each field may be either a label (explanatory text) or a data-entry location. Long forms may @@ -1903,19 +1882,18 @@ static void finish(int sig) Besides menu-like navigation operations, the menu driver loop has to support field editing and data validation.</p> - <h2><a name="fcreate" id="fcreate">Creating and Freeing Fields - and Forms</a></h2> + <h3><a name="fcreate" id="fcreate">Creating and Freeing Fields + and Forms</a></h3> <p>The basic function for creating fields is <code>new_field()</code>:</p> - <pre> + <pre class="code-block"> FIELD *new_field(int height, int width, /* new field size */ int top, int left, /* upper left corner */ int offscreen, /* number of offscreen rows */ int nbuf); /* number of working buffers */ </pre> - <p>Menu items always occupy a single row, but forms fields may have multiple rows. So <code>new_field()</code> requires you to specify a width and height (the first two arguments, which mist @@ -1943,21 +1921,19 @@ FIELD *new_field(int height, int width, /* new field size */ buffers to allocate for the field; your application can use them for its own purposes.</p> - <pre> + <pre class="code-block"> FIELD *dup_field(FIELD *field, /* field to copy */ int top, int left); /* location of new copy */ </pre> - <p>The function <code>dup_field()</code> duplicates an existing field at a new location. Size and buffering information are copied; some attribute flags and status bits are not (see the <code>form_field_new(3X)</code> for details).</p> - <pre> + <pre class="code-block"> FIELD *link_field(FIELD *field, /* field to copy */ int top, int left); /* location of new copy */ </pre> - <p>The function <code>link_field()</code> also duplicates an existing field at a new location. The difference from <code>dup_field()</code> is that it arranges for the new field's @@ -1978,10 +1954,9 @@ FIELD *link_field(FIELD *field, /* field to copy */ <p>To connect fields to a form, use</p> - <pre> + <pre class="code-block"> FORM *new_form(FIELD **fields); </pre> - <p>This function expects to see a NULL-terminated array of field pointers. Said fields are connected to a newly-allocated form object; its address is returned (or else NULL if the allocation @@ -1999,8 +1974,8 @@ FORM *new_form(FIELD **fields); form, but not vice-versa; thus, you will generally free your form objects first.</p> - <h2><a name="fattributes" id="fattributes">Fetching and Changing - Field Attributes</a></h2> + <h3><a name="fattributes" id="fattributes">Fetching and Changing + Field Attributes</a></h3> <p>Each form field has a number of location and size attributes associated with it. There are other field attributes used to @@ -2016,56 +1991,53 @@ FORM *new_form(FIELD **fields); to it persist as defaults until your forms application terminates.</p> - <h3><a name="fsizes" id="fsizes">Fetching Size and Location - Data</a></h3> + <h4><a name="fsizes" id="fsizes">Fetching Size and Location + Data</a></h4> <p>You can retrieve field sizes and locations through:</p> - <pre> + <pre class="code-block"> int field_info(FIELD *field, /* field from which to fetch */ int *height, *int width, /* field size */ int *top, int *left, /* upper left corner */ int *offscreen, /* number of offscreen rows */ int *nbuf); /* number of working buffers */ </pre> - <p>This function is a sort of inverse of <code>new_field()</code>; instead of setting size and location attributes of a new field, it fetches them from an existing one.</p> - <h3><a name="flocation" id="flocation">Changing the Field - Location</a></h3> + <h4><a name="flocation" id="flocation">Changing the Field + Location</a></h4> <p>It is possible to move a field's location on the screen:</p> - <pre> + <pre class="code-block"> int move_field(FIELD *field, /* field to alter */ int top, int left); /* new upper-left corner */ </pre> - <p>You can, of course. query the current location through <code>field_info()</code>.</p> - <h3><a name="fjust" id="fjust">The Justification Attribute</a></h3> + <h4><a name="fjust" id="fjust">The Justification Attribute</a></h4> <p>One-line fields may be unjustified, justified right, justified left, or centered. Here is how you manipulate this attribute:</p> - <pre> + <pre class="code-block"> int set_field_just(FIELD *field, /* field to alter */ int justmode); /* mode to set */ int field_just(FIELD *field); /* fetch mode of field */ </pre> - <p>The mode values accepted and returned by this functions are preprocessor macros <code>NO_JUSTIFICATION</code>, <code>JUSTIFY_RIGHT</code>, <code>JUSTIFY_LEFT</code>, or <code>JUSTIFY_CENTER</code>.</p> - <h3><a name="fdispatts" id="fdispatts">Field Display - Attributes</a></h3> + <h4><a name="fdispatts" id="fdispatts">Field Display + Attributes</a></h4> <p>For each field, you can set a foreground attribute for entered characters, a background attribute for the entire field, and a @@ -2076,7 +2048,7 @@ int field_just(FIELD *field); /* fetch mode of field */ appearance of the field on the screen, without affecting in any way the data in the field buffer.</p> - <pre> + <pre class="code-block"> int set_field_fore(FIELD *field, /* field to alter */ chtype attr); /* attribute to set */ @@ -2097,20 +2069,19 @@ int set_new_page(FIELD *field, /* field to alter */ chtype new_page(FIELD *field); /* field to query */ </pre> - <p>The attributes set and returned by the first four functions are normal <code>curses(3x)</code> display attribute values (<code>A_STANDOUT</code>, <code>A_BOLD</code>, <code>A_REVERSE</code> etc). The page bit of a field controls whether it is displayed at the start of a new form screen.</p> - <h3><a name="foptions" id="foptions">Field Option Bits</a></h3> + <h4><a name="foptions" id="foptions">Field Option Bits</a></h4> <p>There is also a large collection of field option bits you can set to control various aspects of forms processing. You can manipulate them with these functions:</p> - <pre> + <pre class="code-block"> int set_field_opts(FIELD *field, /* field to alter */ int attr); /* attribute to set */ @@ -2122,7 +2093,6 @@ int field_opts_off(FIELD *field, /* field to alter */ int field_opts(FIELD *field); /* field to query */ </pre> - <p>By default, all options are on. Here are the available option bits:</p> @@ -2209,19 +2179,18 @@ int field_opts(FIELD *field); /* field to query */ <p>The option values are bit-masks and can be composed with logical-or in the obvious way.</p> - <h2><a name="fstatus" id="fstatus">Field Status</a></h2> + <h3><a name="fstatus" id="fstatus">Field Status</a></h3> <p>Every field has a status flag, which is set to FALSE when the field is created and TRUE when the value in field buffer 0 changes. This flag can be queried and set directly:</p> - <pre> + <pre class="code-block"> int set_field_status(FIELD *field, /* field to alter */ int status); /* mode to set */ int field_status(FIELD *field); /* fetch mode of field */ </pre> - <p>Setting this flag under program control can be useful if you use the same form repeatedly, looking for modified fields each time.</p> @@ -2238,14 +2207,14 @@ int field_status(FIELD *field); /* fetch mode of field */ just after a <code>REQ_VALIDATION</code> request has been processed by the forms driver.</p> - <h2><a name="fuser" id="fuser">Field User Pointer</a></h2> + <h3><a name="fuser" id="fuser">Field User Pointer</a></h3> <p>Each field structure contains one character pointer slot that is not used by the forms library. It is intended to be used by applications to store private per-field data. You can manipulate it with:</p> - <pre> + <pre class="code-block"> int set_field_userptr(FIELD *field, /* field to alter */ char *userptr); /* mode to set */ @@ -2253,13 +2222,12 @@ char *field_userptr(FIELD *field); /* fetch mode of field */ </pre>(Properly, this user pointer field ought to have <code>(void *)</code> type. The <code>(char *)</code> type is retained for System V compatibility.) - <p>It is valid to set the user pointer of the default field (with a <code>set_field_userptr()</code> call passed a NULL field pointer.) When a new field is created, the default-field user pointer is copied to initialize the new field's user pointer.</p> - <h2><a name="fdynamic" id="fdynamic">Variable-Sized Fields</a></h2> + <h3><a name="fdynamic" id="fdynamic">Variable-Sized Fields</a></h3> <p>Normally, a field is fixed at the size specified for it at creation time. If, however, you turn off its O_STATIC bit, it @@ -2279,11 +2247,10 @@ System V compatibility.) But it is possible to set an upper limit on the size of a dynamic field. You do it with this function:</p> - <pre> + <pre class="code-block"> int set_max_field(FIELD *field, /* field to alter (may not be NULL) */ int max_size); /* upper limit on field size */ </pre> - <p>If the field is one-line, <code>max_size</code> is taken to be a column size limit; if it is multi-line, it is taken to be a line size limit. To disable any limit, use an argument of zero. @@ -2314,7 +2281,7 @@ int set_max_field(FIELD *field, /* field to alter (may not be NULL) */ size.</li> </ul> - <h2><a name="fvalidation" id="fvalidation">Field Validation</a></h2> + <h3><a name="fvalidation" id="fvalidation">Field Validation</a></h3> <p>By default, a field will accept any data that will fit in its input buffer. However, it is possible to attach a validation type @@ -2332,14 +2299,13 @@ int set_max_field(FIELD *field, /* field to alter (may not be NULL) */ define custom ones of your own. You can examine and change field validation attributes with the following functions:</p> - <pre> + <pre class="code-block"> int set_field_type(FIELD *field, /* field to alter */ FIELDTYPE *ftype, /* type to associate */ ...); /* additional arguments*/ FIELDTYPE *field_type(FIELD *field); /* field to query */ </pre> - <p>The validation type of a field is considered an attribute of the field. As with other field attributes, Also, doing <code>set_field_type()</code> with a <code>NULL</code> field @@ -2348,56 +2314,53 @@ FIELDTYPE *field_type(FIELD *field); /* field to query */ <p>Here are the pre-defined validation types:</p> - <h3><a name="ftype_alpha" id="ftype_alpha">TYPE_ALPHA</a></h3> + <h4><a name="ftype_alpha" id="ftype_alpha">TYPE_ALPHA</a></h4> <p>This field type accepts alphabetic data; no blanks, no digits, no special characters (this is checked at character-entry time). It is set up with:</p> - <pre> + <pre class="code-block"> int set_field_type(FIELD *field, /* field to alter */ TYPE_ALPHA, /* type to associate */ int width); /* maximum width of field */ </pre> - <p>The <code>width</code> argument sets a minimum width of data. Typically you will want to set this to the field width; if it is greater than the field width, the validation check will always fail. A minimum width of zero makes field completion optional.</p> - <h3><a name="ftype_alnum" id="ftype_alnum">TYPE_ALNUM</a></h3> + <h4><a name="ftype_alnum" id="ftype_alnum">TYPE_ALNUM</a></h4> <p>This field type accepts alphabetic data and digits; no blanks, no special characters (this is checked at character-entry time). It is set up with:</p> - <pre> + <pre class="code-block"> int set_field_type(FIELD *field, /* field to alter */ TYPE_ALNUM, /* type to associate */ int width); /* maximum width of field */ </pre> - <p>The <code>width</code> argument sets a minimum width of data. As with TYPE_ALPHA, typically you will want to set this to the field width; if it is greater than the field width, the validation check will always fail. A minimum width of zero makes field completion optional.</p> - <h3><a name="ftype_enum" id="ftype_enum">TYPE_ENUM</a></h3> + <h4><a name="ftype_enum" id="ftype_enum">TYPE_ENUM</a></h4> <p>This type allows you to restrict a field's values to be among a specified set of string values (for example, the two-letter postal codes for U.S. states). It is set up with:</p> - <pre> + <pre class="code-block"> int set_field_type(FIELD *field, /* field to alter */ TYPE_ENUM, /* type to associate */ char **valuelist; /* list of possible values */ int checkcase; /* case-sensitive? */ int checkunique); /* must specify uniquely? */ </pre> - <p>The <code>valuelist</code> parameter must point at a NULL-terminated list of valid strings. The <code>checkcase</code> argument, if true, makes comparison with the string @@ -2419,18 +2382,17 @@ int set_field_type(FIELD *field, /* field to alter */ <code>REQ_PREV_CHOICE</code> input requests can be particularly useful with these fields.</p> - <h3><a name="ftype_integer" id="ftype_integer">TYPE_INTEGER</a></h3> + <h4><a name="ftype_integer" id="ftype_integer">TYPE_INTEGER</a></h4> <p>This field type accepts an integer. It is set up as follows:</p> - <pre> + <pre class="code-block"> int set_field_type(FIELD *field, /* field to alter */ TYPE_INTEGER, /* type to associate */ int padding, /* # places to zero-pad to */ int vmin, int vmax); /* valid range */ </pre> - <p>Valid characters consist of an optional leading minus and digits. The range check is performed on exit. If the range maximum is less than or equal to the minimum, the range is @@ -2443,18 +2405,17 @@ int set_field_type(FIELD *field, /* field to alter */ <p>A <code>TYPE_INTEGER</code> value buffer can conveniently be interpreted with the C library function <code>atoi(3)</code>.</p> - <h3><a name="ftype_numeric" id="ftype_numeric">TYPE_NUMERIC</a></h3> + <h4><a name="ftype_numeric" id="ftype_numeric">TYPE_NUMERIC</a></h4> <p>This field type accepts a decimal number. It is set up as follows:</p> - <pre> + <pre class="code-block"> int set_field_type(FIELD *field, /* field to alter */ TYPE_NUMERIC, /* type to associate */ int padding, /* # places of precision */ double vmin, double vmax); /* valid range */ </pre> - <p>Valid characters consist of an optional leading minus and digits. possibly including a decimal point. If your system supports locale's, the decimal point character used must be the @@ -2469,44 +2430,41 @@ int set_field_type(FIELD *field, /* field to alter */ <p>A <code>TYPE_NUMERIC</code> value buffer can conveniently be interpreted with the C library function <code>atof(3)</code>.</p> - <h3><a name="ftype_regexp" id="ftype_regexp">TYPE_REGEXP</a></h3> + <h4><a name="ftype_regexp" id="ftype_regexp">TYPE_REGEXP</a></h4> <p>This field type accepts data matching a regular expression. It is set up as follows:</p> - <pre> + <pre class="code-block"> int set_field_type(FIELD *field, /* field to alter */ TYPE_REGEXP, /* type to associate */ char *regexp); /* expression to match */ </pre> - <p>The syntax for regular expressions is that of <code>regcomp(3)</code>. The check for regular-expression match is performed on exit.</p> - <h2><a name="fbuffer" id="fbuffer">Direct Field Buffer - Manipulation</a></h2> + <h3><a name="fbuffer" id="fbuffer">Direct Field Buffer + Manipulation</a></h3> <p>The chief attribute of a field is its buffer contents. When a form has been completed, your application usually needs to know the state of each field buffer. You can find this out with:</p> - <pre> + <pre class="code-block"> char *field_buffer(FIELD *field, /* field to query */ int bufindex); /* number of buffer to query */ </pre> - <p>Normally, the state of the zero-numbered buffer for each field is set by the user's editing actions on that field. It is sometimes useful to be able to set the value of the zero-numbered (or some other) buffer from your application:</p> - <pre> + <pre class="code-block"> int set_field_buffer(FIELD *field, /* field to alter */ int bufindex, /* number of buffer to alter */ char *value); /* string value to set */ </pre> - <p>If the field is not large enough and cannot be resized to a sufficiently large size to contain the specified value, the value will be truncated to fit.</p> @@ -2525,7 +2483,7 @@ int set_field_buffer(FIELD *field, /* field to alter */ <code>REQ_VALIDATION</code> request has been processed by the forms driver.</p> - <h2><a name="formattrs" id="formattrs">Attributes of Forms</a></h2> + <h3><a name="formattrs" id="formattrs">Attributes of Forms</a></h3> <p>As with field attributes, form attributes inherit a default from a system default form structure. These defaults can be @@ -2535,7 +2493,7 @@ int set_field_buffer(FIELD *field, /* field to alter */ <p>The principal attribute of a form is its field list. You can query and change this list with:</p> - <pre> + <pre class="code-block"> int set_form_fields(FORM *form, /* form to alter */ FIELD **fields); /* fields to connect */ @@ -2543,7 +2501,6 @@ char *form_fields(FORM *form); /* fetch fields of form */ int field_count(FORM *form); /* count connect fields */ </pre> - <p>The second argument of <code>set_form_fields()</code> may be a NULL-terminated field pointer array like the one required by <code>new_form()</code>. In that case, the old fields of the form @@ -2557,7 +2514,7 @@ int field_count(FORM *form); /* count connect fields */ number of fields connected to a given from. It returns -1 if the form-pointer argument is NULL.</p> - <h2><a name="fdisplay" id="fdisplay">Control of Form Display</a></h2> + <h3><a name="fdisplay" id="fdisplay">Control of Form Display</a></h3> <p>In the overview section, you saw that to display a form you normally start by defining its size (and fields), posting it, and @@ -2589,17 +2546,16 @@ int field_count(FORM *form); /* count connect fields */ need to know the size of the form's bounding rectangle. You can get this information with:</p> - <pre> + <pre class="code-block"> int scale_form(FORM *form, /* form to query */ int *rows, /* form rows */ int *cols); /* form cols */ </pre> - <p>The form dimensions are passed back in the locations pointed to by the arguments. Once you have this information, you can use it to declare of windows, then use one of these functions:</p> - <pre> + <pre class="code-block"> int set_form_win(FORM *form, /* form to alter */ WINDOW *win); /* frame window to connect */ @@ -2610,7 +2566,6 @@ int set_form_sub(FORM *form, /* form to alter */ WINDOW *form_sub(FORM *form); /* fetch form subwindow of form */ </pre> - <p>Note that curses operations, including <code>refresh()</code>, on the form, should be done on the frame window, not the form subwindow.</p> @@ -2619,12 +2574,11 @@ WINDOW *form_sub(FORM *form); /* fetch form subwindow of form */ scrollable field is actually displayed within the menu subwindow. Use these functions:</p> - <pre> + <pre class="code-block"> int data_ahead(FORM *form); /* form to be queried */ int data_behind(FORM *form); /* form to be queried */ </pre> - <p>The function <code>data_ahead()</code> returns TRUE if (a) the current field is one-line and has undisplayed data off to the right, (b) the current field is multi-line and there is data @@ -2637,27 +2591,25 @@ int data_behind(FORM *form); /* form to be queried */ <p>Finally, there is a function to restore the form window's cursor to the value expected by the forms driver:</p> - <pre> + <pre class="code-block"> int pos_form_cursor(FORM *) /* form to be queried */ </pre> - <p>If your application changes the form window cursor, call this function before handing control back to the forms driver in order to re-synchronize it.</p> - <h2><a name="fdriver" id="fdriver">Input Processing in the Forms - Driver</a></h2> + <h3><a name="fdriver" id="fdriver">Input Processing in the Forms + Driver</a></h3> <p>The function <code>form_driver()</code> handles virtualized input requests for form navigation, editing, and validation requests, just as <code>menu_driver</code> does for menus (see the section on <a href="#minput">menu input handling</a>).</p> - <pre> + <pre class="code-block"> int form_driver(FORM *form, /* form to pass input to */ int request); /* form request code */ </pre> - <p>Your input virtualization function needs to take input and then convert it to either an alphanumeric character (which is treated as data to be entered in the currently-selected field), @@ -2668,7 +2620,7 @@ int form_driver(FORM *form, /* form to pass input to */ check that the input taken by the driver matched what was expected.</p> - <h3><a name="fpage" id="fpage">Page Navigation Requests</a></h3> + <h4><a name="fpage" id="fpage">Page Navigation Requests</a></h4> <p>These requests cause page-level moves through the form, triggering display of a new form screen.</p> @@ -2700,8 +2652,8 @@ int form_driver(FORM *form, /* form to pass input to */ and <code>REQ_PREV_PAGE</code> from the first page goes to the last.</p> - <h3><a name="ffield" id="ffield">Inter-Field Navigation - Requests</a></h3> + <h4><a name="ffield" id="ffield">Inter-Field Navigation + Requests</a></h4> <p>These requests handle navigation between fields on the same page.</p> @@ -2794,8 +2746,8 @@ int form_driver(FORM *form, /* form to pass input to */ from A will go to B only if A, B, and C <em>all</em> share the same first line; otherwise it will skip over B to C.</p> - <h3><a name="fifield" id="fifield">Intra-Field Navigation - Requests</a></h3> + <h4><a name="fifield" id="fifield">Intra-Field Navigation + Requests</a></h4> <p>These requests drive movement of the edit cursor within the currently selected field.</p> @@ -2877,7 +2829,7 @@ int form_driver(FORM *form, /* form to pass input to */ end of line or field look for the first or last non-pad character in their ranges.</p> - <h3><a name="fscroll" id="fscroll">Scrolling Requests</a></h3> + <h4><a name="fscroll" id="fscroll">Scrolling Requests</a></h4> <p>Fields that are dynamic and have grown and fields explicitly created with offscreen rows are scrollable. One-line fields @@ -2952,7 +2904,7 @@ int form_driver(FORM *form, /* form to pass input to */ <p>For scrolling purposes, a <em>page</em> of a field is the height of its visible part.</p> - <h3><a name="fedit" id="fedit">Editing Requests</a></h3> + <h4><a name="fedit" id="fedit">Editing Requests</a></h4> <p>When you pass the forms driver an ASCII character, it is treated as a request to add the character to the field's data @@ -3068,7 +3020,7 @@ int form_driver(FORM *form, /* form to pass input to */ <p>See <a href="#frmoptions">Form Options</a> for discussion of how to set and clear the overload options.</p> - <h3><a name="forder" id="forder">Order Requests</a></h3> + <h4><a name="forder" id="forder">Order Requests</a></h4> <p>If the type of your field is ordered, and has associated functions for getting the next and previous values of the type @@ -3094,7 +3046,7 @@ int form_driver(FORM *form, /* form to pass input to */ field type of your own (see <a href="#fcustom">Custom Validation Types</a>), you can associate our own ordering functions.</p> - <h3><a name="fappcmds" id="fappcmds">Application Commands</a></h3> + <h4><a name="fappcmds" id="fappcmds">Application Commands</a></h4> <p>Form requests are represented as integers above the <code>curses</code> value greater than <code>KEY_MAX</code> and @@ -3102,13 +3054,13 @@ int form_driver(FORM *form, /* form to pass input to */ your input-virtualization routine returns a value above <code>MAX_COMMAND</code>, the forms driver will ignore it.</p> - <h2><a name="fhooks" id="fhooks">Field Change Hooks</a></h2> + <h3><a name="fhooks" id="fhooks">Field Change Hooks</a></h3> <p>It is possible to set function hooks to be executed whenever the current field or form changes. Here are the functions that support this:</p> - <pre> + <pre class="code-block"> typedef void (*HOOK)(); /* pointer to function returning void */ int set_form_init(FORM *form, /* form to alter */ @@ -3131,7 +3083,6 @@ int set_field_term(FORM *form, /* form to alter */ HOOK field_term(FORM *form); /* form to query */ </pre> - <p>These functions allow you to either set or query four different hooks. In each of the set functions, the second argument should be the address of a hook function. These @@ -3182,7 +3133,7 @@ HOOK field_term(FORM *form); /* form to query */ <p>You can disable any of these hooks by (re)setting them to NULL, the default value.</p> - <h2><a href="#ffocus">Field Change Commands</a></h2> + <h3><a href="#ffocus">Field Change Commands</a></h3> <p>Normally, navigation through the form will be driven by the user's input requests. But sometimes it is useful to be able to @@ -3190,7 +3141,7 @@ HOOK field_term(FORM *form); /* form to query */ application, or ask which field it currently is in. The following functions help you accomplish this:</p> - <pre> + <pre class="code-block"> int set_current_field(FORM *form, /* form to alter */ FIELD *field); /* field to shift to */ @@ -3199,7 +3150,6 @@ FIELD *current_field(FORM *form); /* form to query */ int field_index(FORM *form, /* form to query */ FIELD *field); /* field to get index of */ </pre> - <p>The function <code>field_index()</code> returns the index of the given field in the given form's field array (the array passed to <code>new_form()</code> or @@ -3211,22 +3161,21 @@ int field_index(FORM *form, /* form to query */ <p>It is also possible to move around by pages.</p> - <pre> + <pre class="code-block"> int set_form_page(FORM *form, /* form to alter */ int page); /* page to go to (0-origin) */ int form_page(FORM *form); /* return form's current page */ </pre> - <p>The initial page of a newly-created form is 0. The function <code>set_form_fields()</code> resets this.</p> - <h2><a name="frmoptions" id="frmoptions">Form Options</a></h2> + <h3><a name="frmoptions" id="frmoptions">Form Options</a></h3> <p>Like fields, forms may have control option bits. They can be changed or queried with these functions:</p> - <pre> + <pre class="code-block"> int set_form_opts(FORM *form, /* form to alter */ int attr); /* attribute to set */ @@ -3238,7 +3187,6 @@ int form_opts_off(FORM *form, /* form to alter */ int form_opts(FORM *form); /* form to query */ </pre> - <p>By default, all options are on. Here are the available option bits:</p> @@ -3261,7 +3209,7 @@ int form_opts(FORM *form); /* form to query */ <p>The option values are bit-masks and can be composed with logical-or in the obvious way.</p> - <h2><a name="fcustom" id="fcustom">Custom Validation Types</a></h2> + <h3><a name="fcustom" id="fcustom">Custom Validation Types</a></h3> <p>The <code>form</code> library gives you the capability to define custom validation types of your own. Further, the optional @@ -3271,16 +3219,15 @@ int form_opts(FORM *form); /* form to query */ the handling of the additional arguments within custom validation functions.</p> - <h3><a name="flinktypes" id="flinktypes">Union Types</a></h3> + <h4><a name="flinktypes" id="flinktypes">Union Types</a></h4> <p>The simplest way to create a custom data type is to compose it from two preexisting ones:</p> - <pre> + <pre class="code-block"> FIELD *link_fieldtype(FIELDTYPE *type1, FIELDTYPE *type2); </pre> - <p>This function creates a field type that will accept any of the values legal for either of its argument field types (which may be either predefined or programmer-defined). If a @@ -3292,7 +3239,7 @@ FIELD *link_fieldtype(FIELDTYPE *type1, function for the first type, then for the second, to figure what type the buffer contents should be treated as.</p> - <h3><a name="fnewtypes" id="fnewtypes">New Field Types</a></h3> + <h4><a name="fnewtypes" id="fnewtypes">New Field Types</a></h4> <p>To create a field type from scratch, you need to specify one or both of the following things:</p> @@ -3307,7 +3254,7 @@ FIELD *link_fieldtype(FIELDTYPE *type1, <p>Here is how you do that:</p> - <pre> + <pre class="code-block"> typedef int (*HOOK)(); /* pointer to function returning int */ FIELDTYPE *new_fieldtype(HOOK f_validate, /* field validator */ @@ -3315,7 +3262,6 @@ FIELDTYPE *new_fieldtype(HOOK f_validate, /* field validator */ int free_fieldtype(FIELDTYPE *ftype); /* type to free */ </pre> - <p>At least one of the arguments of <code>new_fieldtype()</code> must be non-NULL. The forms driver will automatically call the new type's validation functions at appropriate points in @@ -3334,8 +3280,8 @@ int free_fieldtype(FIELDTYPE *ftype); /* type to free */ argument. It too should return TRUE if the character is valid, FALSE otherwise.</p> - <h3><a name="fcheckargs" id="fcheckargs">Validation Function - Arguments</a></h3> + <h4><a name="fcheckargs" id="fcheckargs">Validation Function + Arguments</a></h4> <p>Your field- and character- validation functions will be passed a second argument as well. This second argument is the address of @@ -3353,7 +3299,7 @@ int free_fieldtype(FIELDTYPE *ftype); /* type to free */ <p>Here is how you make the association:</p> - <pre> + <pre class="code-block"> typedef char *(*PTRHOOK)(); /* pointer to function returning (char *) */ typedef void (*VOIDHOOK)(); /* pointer to function returning void */ @@ -3362,7 +3308,6 @@ int set_fieldtype_arg(FIELDTYPE *type, /* type to alter */ PTRHOOK copy_str, /* make copy of structure */ VOIDHOOK free_str); /* free structure storage */ </pre> - <p>Here is how the storage-management hooks are used:</p> <dl> @@ -3398,8 +3343,8 @@ int set_fieldtype_arg(FIELDTYPE *type, /* type to alter */ this happens. Thus, your validation functions should never see a NULL file pointer and need not check specially for it.</p> - <h3><a name="fcustorder" id="fcustorder">Order Functions For - Custom Types</a></h3> + <h4><a name="fcustorder" id="fcustorder">Order Functions For + Custom Types</a></h4> <p>Some custom field types are simply ordered in the same well-defined way that <code>TYPE_ENUM</code> is. For such types, @@ -3407,14 +3352,13 @@ int set_fieldtype_arg(FIELDTYPE *type, /* type to alter */ support the <code>REQ_NEXT_CHOICE</code> and <code>REQ_PREV_CHOICE</code> requests. Here is how:</p> - <pre> + <pre class="code-block"> typedef int (*INTHOOK)(); /* pointer to function returning int */ int set_fieldtype_arg(FIELDTYPE *type, /* type to alter */ INTHOOK succ, /* get successor value */ INTHOOK pred); /* get predecessor value */ </pre> - <p>The successor and predecessor arguments will each be passed two arguments; a field pointer, and a pile pointer (as for the validation functions). They are expected to use the function @@ -3424,7 +3368,7 @@ int set_fieldtype_arg(FIELDTYPE *type, /* type to alter */ (a legal next or previous value was set) or FALSE to indicate failure.</p> - <h3><a name="fcustprobs" id="fcustprobs">Avoiding Problems</a></h3> + <h4><a name="fcustprobs" id="fcustprobs">Avoiding Problems</a></h4> <p>The interface for defining custom types is complicated and tricky. Rather than attempting to create a custom type entirely diff --git contrib/ncurses/doc/ncurses-intro.doc contrib/ncurses/doc/ncurses-intro.doc index 4e752ed0fc54..a20ee1a1d271 100644 --- contrib/ncurses/doc/ncurses-intro.doc +++ contrib/ncurses/doc/ncurses-intro.doc @@ -1,9 +1,11 @@ Writing Programs with NCURSES +Writing Programs with NCURSES + by Eric S. Raymond and Zeyd M. Ben-Halim updates since release 1.9.9e by Thomas Dickey - Contents +Contents * Introduction + A Brief History of Curses @@ -96,7 +98,7 @@ o Avoiding Problems _________________________________________________________________ - Introduction +Introduction This document is an introduction to programming with curses. It is not an exhaustive reference for the curses Application Programming @@ -129,7 +131,7 @@ will typically be a great deal simpler and less expensive than one using an X toolkit. -A Brief History of Curses + A Brief History of Curses Historically, the first ancestor of curses was the routines written to provide screen-handling for the vi editor; these used the termcap @@ -163,7 +165,7 @@ A Brief History of Curses releases, curses evolved to use more facilities and offer more capabilities, going far beyond BSD curses in power and flexibility. -Scope of This Document + Scope of This Document This document describes ncurses, a free implementation of the System V curses API with some clearly marked extensions. It includes the @@ -206,7 +208,7 @@ Scope of This Document extension libraries, also cloned from System V, which support easy construction and sequences of menus and fill-in forms. -Terminology + Terminology In this document, the following terminology is used with reasonable consistency: @@ -227,11 +229,11 @@ Terminology The package's idea of what the terminal display currently looks like, i.e., what the user sees now. This is a special screen. - The Curses Library +The Curses Library -An Overview of Curses + An Overview of Curses - Compiling Programs using Curses + Compiling Programs using Curses In order to use the library, it is necessary to have certain types and variables defined. Therefore, the programmer must have a line: @@ -245,7 +247,7 @@ An Overview of Curses your LDFLAGS or on the command line. There is no need for any other libraries. - Updating the Screen + Updating the Screen In order to update the screen optimally, it is necessary for the routines to know what the screen currently looks like and what the @@ -273,7 +275,7 @@ An Overview of Curses package implementation determine the most efficient way to repaint the screen. - Standard Windows and Function Naming Conventions + Standard Windows and Function Naming Conventions As hinted above, the routines can use several windows, but two are automatically given: curscr, which knows what the terminal looks like, @@ -313,7 +315,7 @@ An Overview of Curses (y, x) coordinates. If a function requires a window pointer, it is always the first parameter passed. - Variables + Variables The curses library sets some variables describing the terminal capabilities. @@ -340,7 +342,7 @@ An Overview of Curses OK error flag returned by routines when things go right. -Using the Library + Using the Library Now we describe how to actually use the screen package. In it, we assume all updating, reading, etc. is applied to stdscr. These @@ -409,7 +411,7 @@ static void finish(int sig) exit(0); } - Starting up + Starting up In order to use the screen package, the routines must know about terminal characteristics, and the space for curscr and stdscr must be @@ -435,7 +437,7 @@ static void finish(int sig) of old windows. All the options described above can be applied to any window. - Output + Output Now that we have set things up, we will want to actually update the terminal. The basic functions used to change what will go on a window @@ -464,7 +466,7 @@ static void finish(int sig) implementing a command which would redraw the screen in case it get messed up. - Input + Input The complementary function to addch() is getch() which, if echo is set, will call addch() to echo the character. Since the screen package @@ -488,7 +490,7 @@ static void finish(int sig) curses.h The mapping from sequences to #define values is determined by key_ capabilities in the terminal's terminfo entry. - Using Forms Characters + Using Forms Characters The addch() function (and some others, including box() and border()) can accept some pseudo-character arguments which are specially defined @@ -500,7 +502,7 @@ static void finish(int sig) the terminal does not have such characters, curses.h will map them to a recognizable (though ugly) set of ASCII defaults. - Character Attributes and Color + Character Attributes and Color The ncurses package supports screen highlights including standout, reverse-video, underline, and blink. It also supports color, which is @@ -531,7 +533,7 @@ static void finish(int sig) combination. Note that COLOR_PAIR(N), for constant N, is itself a compile-time constant and can be used in initializers. - Mouse Interfacing + Mouse Interfacing The ncurses library also provides a mouse interface. @@ -603,7 +605,7 @@ static void finish(int sig) See the manual page curs_mouse(3X) for full details of the mouse-interface functions. - Finishing Up + Finishing Up In order to clean up after the ncurses routines, the routine endwin() is provided. It restores tty modes to what they were when initscr() @@ -611,12 +613,12 @@ static void finish(int sig) Thus, anytime after the call to initscr, endwin() should be called before exiting. -Function Descriptions + Function Descriptions We describe the detailed behavior of some important curses functions here, as a supplement to the manual page descriptions. - Initialization and Wrapup + Initialization and Wrapup initscr() The first function called should almost always be initscr(). @@ -660,7 +662,7 @@ Function Descriptions The inverse of newterm(); deallocates the data structures associated with a given SCREEN reference. - Causing Output to the Terminal + Causing Output to the Terminal refresh() and wrefresh(win) These functions must be called to actually get any output on @@ -689,7 +691,7 @@ Function Descriptions with fewer total characters transmitted (this also avoids a visually annoying flicker at each update). - Low-Level Capability Access + Low-Level Capability Access setupterm(term, filenum, errret) This routine is called to initialize a terminal's description, @@ -719,7 +721,7 @@ Function Descriptions array ttytype[]. Subsequent calls to setupterm() will overwrite this array, so you will have to save it yourself if need be. - Debugging + Debugging NOTE: These functions are not part of the standard curses API! @@ -747,13 +749,13 @@ Function Descriptions single-line pseudo-operations. These pseudo-ops can be distinguished by the fact that they are named in capital letters. -Hints, Tips, and Tricks + Hints, Tips, and Tricks The ncurses manual pages are a complete reference for this library. In the remainder of this document, we discuss various useful methods that may not be obvious from the manual page descriptions. - Some Notes of Caution + Some Notes of Caution If you find yourself thinking you need to use noraw() or nocbreak(), think again and move carefully. It is probably better design to use @@ -787,7 +789,7 @@ Hints, Tips, and Tricks in an environment with window resizes, in which case several screens could be open with different sizes. - Temporarily Leaving NCURSES Mode + Temporarily Leaving NCURSES Mode Sometimes you will want to write a program that spends most of its time in screen mode, but occasionally returns to ordinary "cooked" @@ -812,7 +814,7 @@ Hints, Tips, and Tricks addstr("returned.\n"); /* prepare return message */ refresh(); /* restore save modes, repaint screen */ - Using NCURSES under XTERM + Using NCURSES under XTERM A resize operation in X sends SIGWINCH to the application running under xterm. The easiest way to handle SIGWINCH is to do an endwin, @@ -835,7 +837,7 @@ Hints, Tips, and Tricks it cannot know how you want the screen re-painted. You will usually have to write special-purpose code to handle KEY_RESIZE yourself. - Handling Multiple Terminal Screens + Handling Multiple Terminal Screens The initscr() function actually calls a function named newterm() to do most of its work. If you are writing a program that opens multiple @@ -847,7 +849,7 @@ Hints, Tips, and Tricks with the set_term call. Note that you will also have to call def_shell_mode and def_prog_mode on each tty yourself. - Testing for Terminal Capabilities + Testing for Terminal Capabilities Sometimes you may want to write programs that test for the presence of various capabilities before deciding whether to go into ncurses mode. @@ -861,14 +863,14 @@ Hints, Tips, and Tricks can include the term.h file and test the value of the macro cursor_address. - Tuning for Speed + Tuning for Speed Use the addchstr() family of functions for fast screen-painting of text when you know the text does not contain any control characters. Try to make attribute changes infrequent on your screens. Do not use the immedok() option! - Special Features of NCURSES + Special Features of NCURSES The wresize() function allows you to resize a window in place. The associated resizeterm() function simplifies the construction of @@ -888,14 +890,14 @@ Hints, Tips, and Tricks 8. While most terminals which provide color allow only 8 colors, about a quarter (including XFree86 xterm) support 16 colors. -Compatibility with Older Versions + Compatibility with Older Versions Despite our best efforts, there are some differences between ncurses and the (undocumented!) behavior of older curses implementations. These arise from ambiguities or omissions in the documentation of the API. - Refresh of Overlapping Windows + Refresh of Overlapping Windows If you define two windows A and B that overlap, and then alternately scribble on and refresh them, the changes made to the overlapping @@ -947,7 +949,7 @@ Compatibility with Older Versions you have defined. Then you can do one doupdate() and there will be a single burst of physical I/O that will do all your updates. - Background Erase + Background Erase If you have been using a very old versions of ncurses (1.8.7 or older) you may be surprised by the behavior of the erase functions. In older @@ -962,7 +964,7 @@ Compatibility with Older Versions This change in behavior conforms ncurses to System V Release 4 and the XSI Curses standard. -XSI Curses Conformance + XSI Curses Conformance The ncurses library is intended to be base-level conformant with the XSI Curses standard from X/Open. Many extended-level features (in @@ -976,7 +978,7 @@ XSI Curses Conformance have a corresponding function which may be linked (and will be prototype-checked) if the macro definition is disabled with #undef. - The Panels Library +The Panels Library The ncurses library by itself provides good support for screen displays in which the windows are tiled (non-overlapping). In the more @@ -993,7 +995,7 @@ XSI Curses Conformance The panel library first appeared in AT&T System V. The version documented here is the panel code distributed with ncurses. -Compiling With the Panels Library + Compiling With the Panels Library Your panels-using modules must import the panels library declarations with @@ -1004,7 +1006,7 @@ Compiling With the Panels Library -lncurses. Many linkers are two-pass and will accept either order, but it is still good practice to put -lpanel first and -lncurses second. -Overview of Panels + Overview of Panels A panel object is a window that is implicitly treated as part of a deck including all other panel objects. The deck has an implicit @@ -1047,7 +1049,7 @@ Overview of Panels write, you will generate a lot of unnecessary refresh activity and screen flicker. -Panels, Input, and the Standard Screen + Panels, Input, and the Standard Screen You should not mix wnoutrefresh() or wrefresh() operations with panels code; this will work only if the argument window is either in the top @@ -1065,7 +1067,7 @@ Panels, Input, and the Standard Screen There is presently no way to display changes to one obscured panel without repainting all panels. -Hiding Panels + Hiding Panels It is possible to remove a panel from the deck temporarily; use hide_panel for this. Use show_panel() to render it visible again. The @@ -1076,7 +1078,7 @@ Hiding Panels or bottom_panel on a hidden panel(). Other panels operations are applicable. -Miscellaneous Other Facilities + Miscellaneous Other Facilities It is possible to navigate the deck using the functions panel_above() and panel_below. Handed a panel pointer, they return the panel above @@ -1087,7 +1089,7 @@ Miscellaneous Other Facilities code, to which you can attach application data. See the man page documentation of set_panel_userptr() and panel_userptr for details. - The Menu Library +The Menu Library A menu is a screen display that assists the user to choose some subset of a given set of items. The menu library is a curses extension that @@ -1097,7 +1099,7 @@ Miscellaneous Other Facilities The menu library first appeared in AT&T System V. The version documented here is the menu code distributed with ncurses. -Compiling With the menu Library + Compiling With the menu Library Your menu-using modules must import the menu library declarations with #include <menu.h> @@ -1107,7 +1109,7 @@ Compiling With the menu Library -lncurses. Many linkers are two-pass and will accept either order, but it is still good practice to put -lmenu first and -lncurses second. -Overview of Menus + Overview of Menus The menus created by this library consist of collections of items including a name string part and a description string part. To make @@ -1137,7 +1139,7 @@ Overview of Menus 9. Free the items using free_item(). 10. Terminate curses. -Selecting items + Selecting items Menus may be multi-valued or (the default) single-valued (see the manual page menu_opts(3x) to see how to change the default). Both @@ -1154,7 +1156,7 @@ Selecting items option so far defined for menus, but it is good practice to code as though other option bits might be on. -Menu Display + Menu Display The menu library calculates a minimum display size for your window, based on the following variables: @@ -1197,7 +1199,7 @@ Menu Display have reasonable defaults which the library allows you to change (see the menu_attribs(3x) manual page. -Menu Windows + Menu Windows Each menu has, as mentioned previously, a pair of associated windows. Both these windows are painted when the menu is posted and erased when @@ -1217,7 +1219,7 @@ Menu Windows these actually modifies the screen. To do that, call wrefresh() or some equivalent. -Processing Menu Input + Processing Menu Input The main loop of your menu-processing code should call menu_driver() repeatedly. The first argument of this routine is a menu pointer; the @@ -1261,7 +1263,7 @@ Processing Menu Input considered application-specific commands. The menu_driver() code ignores them and returns E_UNKNOWN_COMMAND. -Miscellaneous Other Features + Miscellaneous Other Features Various menu options can affect the processing and visual appearance and input processing of menus. See menu_opts(3x) for details. @@ -1280,7 +1282,7 @@ Miscellaneous Other Features Each item, and each menu, has an associated user pointer on which you can hang application data. See mitem_userptr(3x) and menu_userptr(3x). - The Forms Library +The Forms Library The form library is a curses extension that supports easy programming of on-screen forms for data entry and program control. @@ -1288,7 +1290,7 @@ Miscellaneous Other Features The form library first appeared in AT&T System V. The version documented here is the form code distributed with ncurses. -Compiling With the form Library + Compiling With the form Library Your form-using modules must import the form library declarations with #include <form.h> @@ -1298,7 +1300,7 @@ Compiling With the form Library -lncurses. Many linkers are two-pass and will accept either order, but it is still good practice to put -lform first and -lncurses second. -Overview of Forms + Overview of Forms A form is a collection of fields; each field may be either a label (explanatory text) or a data-entry location. Long forms may be @@ -1347,7 +1349,7 @@ Overview of Forms operations, the menu driver loop has to support field editing and data validation. -Creating and Freeing Fields and Forms + Creating and Freeing Fields and Forms The basic function for creating fields is new_field(): FIELD *new_field(int height, int width, /* new field size */ @@ -1423,7 +1425,7 @@ FORM *new_form(FIELD **fields); to a form, but not vice-versa; thus, you will generally free your form objects first. -Fetching and Changing Field Attributes + Fetching and Changing Field Attributes Each form field has a number of location and size attributes associated with it. There are other field attributes used to control @@ -1438,7 +1440,7 @@ Fetching and Changing Field Attributes to mean this field. Changes to it persist as defaults until your forms application terminates. - Fetching Size and Location Data + Fetching Size and Location Data You can retrieve field sizes and locations through: int field_info(FIELD *field, /* field from which to fetch */ @@ -1451,7 +1453,7 @@ int field_info(FIELD *field, /* field from which to fetch */ size and location attributes of a new field, it fetches them from an existing one. - Changing the Field Location + Changing the Field Location It is possible to move a field's location on the screen: int move_field(FIELD *field, /* field to alter */ @@ -1459,7 +1461,7 @@ int move_field(FIELD *field, /* field to alter */ You can, of course. query the current location through field_info(). - The Justification Attribute + The Justification Attribute One-line fields may be unjustified, justified right, justified left, or centered. Here is how you manipulate this attribute: @@ -1472,7 +1474,7 @@ int field_just(FIELD *field); /* fetch mode of field */ preprocessor macros NO_JUSTIFICATION, JUSTIFY_RIGHT, JUSTIFY_LEFT, or JUSTIFY_CENTER. - Field Display Attributes + Field Display Attributes For each field, you can set a foreground attribute for entered characters, a background attribute for the entire field, and a pad @@ -1507,7 +1509,7 @@ chtype new_page(FIELD *field); /* field to query */ etc). The page bit of a field controls whether it is displayed at the start of a new form screen. - Field Option Bits + Field Option Bits There is also a large collection of field option bits you can set to control various aspects of forms processing. You can manipulate them @@ -1593,7 +1595,7 @@ int field_opts(FIELD *field); /* field to query */ The option values are bit-masks and can be composed with logical-or in the obvious way. -Field Status + Field Status Every field has a status flag, which is set to FALSE when the field is created and TRUE when the value in field buffer 0 changes. This flag @@ -1616,7 +1618,7 @@ int field_status(FIELD *field); /* fetch mode of field */ initialization or termination hooks, or (3) just after a REQ_VALIDATION request has been processed by the forms driver. -Field User Pointer + Field User Pointer Each field structure contains one character pointer slot that is not used by the forms library. It is intended to be used by applications @@ -1634,7 +1636,7 @@ char *field_userptr(FIELD *field); /* fetch mode of field */ field is created, the default-field user pointer is copied to initialize the new field's user pointer. -Variable-Sized Fields + Variable-Sized Fields Normally, a field is fixed at the size specified for it at creation time. If, however, you turn off its O_STATIC bit, it becomes dynamic @@ -1673,7 +1675,7 @@ int set_max_field(FIELD *field, /* field to alter (may not be NULL) */ the field; use dynamic_field_info() to get the actual dynamic size. -Field Validation + Field Validation By default, a field will accept any data that will fit in its input buffer. However, it is possible to attach a validation type to a @@ -1703,7 +1705,7 @@ FIELDTYPE *field_type(FIELD *field); /* field to query */ Here are the pre-defined validation types: - TYPE_ALPHA + TYPE_ALPHA This field type accepts alphabetic data; no blanks, no digits, no special characters (this is checked at character-entry time). It is @@ -1717,7 +1719,7 @@ int set_field_type(FIELD *field, /* field to alter */ width, the validation check will always fail. A minimum width of zero makes field completion optional. - TYPE_ALNUM + TYPE_ALNUM This field type accepts alphabetic data and digits; no blanks, no special characters (this is checked at character-entry time). It is @@ -1731,7 +1733,7 @@ int set_field_type(FIELD *field, /* field to alter */ greater than the field width, the validation check will always fail. A minimum width of zero makes field completion optional. - TYPE_ENUM + TYPE_ENUM This type allows you to restrict a field's values to be among a specified set of string values (for example, the two-letter postal @@ -1760,7 +1762,7 @@ int set_field_type(FIELD *field, /* field to alter */ The REQ_NEXT_CHOICE and REQ_PREV_CHOICE input requests can be particularly useful with these fields. - TYPE_INTEGER + TYPE_INTEGER This field type accepts an integer. It is set up as follows: int set_field_type(FIELD *field, /* field to alter */ @@ -1778,7 +1780,7 @@ int set_field_type(FIELD *field, /* field to alter */ A TYPE_INTEGER value buffer can conveniently be interpreted with the C library function atoi(3). - TYPE_NUMERIC + TYPE_NUMERIC This field type accepts a decimal number. It is set up as follows: int set_field_type(FIELD *field, /* field to alter */ @@ -1798,7 +1800,7 @@ int set_field_type(FIELD *field, /* field to alter */ A TYPE_NUMERIC value buffer can conveniently be interpreted with the C library function atof(3). - TYPE_REGEXP + TYPE_REGEXP This field type accepts data matching a regular expression. It is set up as follows: @@ -1809,7 +1811,7 @@ int set_field_type(FIELD *field, /* field to alter */ The syntax for regular expressions is that of regcomp(3). The check for regular-expression match is performed on exit. -Direct Field Buffer Manipulation + Direct Field Buffer Manipulation The chief attribute of a field is its buffer contents. When a form has been completed, your application usually needs to know the state of @@ -1840,7 +1842,7 @@ int set_field_buffer(FIELD *field, /* field to alter */ or form's initialization or termination hooks, or (3) just after a REQ_VALIDATION request has been processed by the forms driver. -Attributes of Forms + Attributes of Forms As with field attributes, form attributes inherit a default from a system default form structure. These defaults can be queried or set by @@ -1868,7 +1870,7 @@ int field_count(FORM *form); /* count connect fields */ connected to a given from. It returns -1 if the form-pointer argument is NULL. -Control of Form Display + Control of Form Display In the overview section, you saw that to display a form you normally start by defining its size (and fields), posting it, and refreshing @@ -1938,7 +1940,7 @@ int pos_form_cursor(FORM *) /* form to be queried */ before handing control back to the forms driver in order to re-synchronize it. -Input Processing in the Forms Driver + Input Processing in the Forms Driver The function form_driver() handles virtualized input requests for form navigation, editing, and validation requests, just as menu_driver does @@ -1955,7 +1957,7 @@ int form_driver(FORM *form, /* form to pass input to */ field-termination functions) with which your application code can check that the input taken by the driver matched what was expected. - Page Navigation Requests + Page Navigation Requests These requests cause page-level moves through the form, triggering display of a new form screen. @@ -1976,7 +1978,7 @@ int form_driver(FORM *form, /* form to pass input to */ the last page goes to the first, and REQ_PREV_PAGE from the first page goes to the last. - Inter-Field Navigation Requests + Inter-Field Navigation Requests These requests handle navigation between fields on the same page. @@ -2039,7 +2041,7 @@ int form_driver(FORM *form, /* form to pass input to */ only if A, B, and C all share the same first line; otherwise it will skip over B to C. - Intra-Field Navigation Requests + Intra-Field Navigation Requests These requests drive movement of the edit cursor within the currently selected field. @@ -2090,7 +2092,7 @@ int form_driver(FORM *form, /* form to pass input to */ whitespace. The commands to move to beginning and end of line or field look for the first or last non-pad character in their ranges. - Scrolling Requests + Scrolling Requests Fields that are dynamic and have grown and fields explicitly created with offscreen rows are scrollable. One-line fields scroll @@ -2138,7 +2140,7 @@ int form_driver(FORM *form, /* form to pass input to */ For scrolling purposes, a page of a field is the height of its visible part. - Editing Requests + Editing Requests When you pass the forms driver an ASCII character, it is treated as a request to add the character to the field's data buffer. Whether this @@ -2223,7 +2225,7 @@ int form_driver(FORM *form, /* form to pass input to */ See Form Options for discussion of how to set and clear the overload options. - Order Requests + Order Requests If the type of your field is ordered, and has associated functions for getting the next and previous values of the type from a given value, @@ -2240,14 +2242,14 @@ int form_driver(FORM *form, /* form to pass input to */ Custom Validation Types), you can associate our own ordering functions. - Application Commands + Application Commands Form requests are represented as integers above the curses value greater than KEY_MAX and less than or equal to the constant MAX_COMMAND. If your input-virtualization routine returns a value above MAX_COMMAND, the forms driver will ignore it. -Field Change Hooks + Field Change Hooks It is possible to set function hooks to be executed whenever the current field or form changes. Here are the functions that support @@ -2309,7 +2311,7 @@ HOOK field_term(FORM *form); /* form to query */ You can disable any of these hooks by (re)setting them to NULL, the default value. -Field Change Commands + Field Change Commands Normally, navigation through the form will be driven by the user's input requests. But sometimes it is useful to be able to move the @@ -2340,7 +2342,7 @@ int form_page(FORM *form); /* return form's current page */ The initial page of a newly-created form is 0. The function set_form_fields() resets this. -Form Options + Form Options Like fields, forms may have control option bits. They can be changed or queried with these functions: @@ -2371,7 +2373,7 @@ int form_opts(FORM *form); /* form to query */ The option values are bit-masks and can be composed with logical-or in the obvious way. -Custom Validation Types + Custom Validation Types The form library gives you the capability to define custom validation types of your own. Further, the optional additional arguments of @@ -2380,7 +2382,7 @@ Custom Validation Types with the handling of the additional arguments within custom validation functions. - Union Types + Union Types The simplest way to create a custom data type is to compose it from two preexisting ones: @@ -2397,7 +2399,7 @@ FIELD *link_fieldtype(FIELDTYPE *type1, first type, then for the second, to figure what type the buffer contents should be treated as. - New Field Types + New Field Types To create a field type from scratch, you need to specify one or both of the following things: @@ -2430,7 +2432,7 @@ int free_fieldtype(FIELDTYPE *ftype); /* type to free */ argument. It too should return TRUE if the character is valid, FALSE otherwise. - Validation Function Arguments + Validation Function Arguments Your field- and character- validation functions will be passed a second argument as well. This second argument is the address of a @@ -2479,7 +2481,7 @@ int set_fieldtype_arg(FIELDTYPE *type, /* type to alter */ functions should never see a NULL file pointer and need not check specially for it. - Order Functions For Custom Types + Order Functions For Custom Types Some custom field types are simply ordered in the same well-defined way that TYPE_ENUM is. For such types, it is possible to define @@ -2499,7 +2501,7 @@ int set_fieldtype_arg(FIELDTYPE *type, /* type to alter */ success (a legal next or previous value was set) or FALSE to indicate failure. - Avoiding Problems + Avoiding Problems The interface for defining custom types is complicated and tricky. Rather than attempting to create a custom type entirely from scratch, diff --git contrib/ncurses/form/Makefile.in contrib/ncurses/form/Makefile.in index 3d713469fe0c..a950a3e8ae14 100644 --- contrib/ncurses/form/Makefile.in +++ contrib/ncurses/form/Makefile.in @@ -1,4 +1,4 @@ -# $Id: Makefile.in,v 1.71 2021/01/23 20:42:08 tom Exp $ +# $Id: Makefile.in,v 1.72 2021/07/03 15:45:33 tom Exp $ ############################################################################## # Copyright 2020,2021 Thomas E. Dickey # # Copyright 1998-2015,2018 Free Software Foundation, Inc. # @@ -134,6 +134,19 @@ AUTO_SRC = \ ../include/form.h ################################################################################ + +@MAKE_PHONY@.PHONY : all +@MAKE_PHONY@.PHONY : clean +@MAKE_PHONY@.PHONY : distclean +@MAKE_PHONY@.PHONY : install +@MAKE_PHONY@.PHONY : install.libs +@MAKE_PHONY@.PHONY : libs +@MAKE_PHONY@.PHONY : mostlyclean +@MAKE_PHONY@.PHONY : realclean +@MAKE_PHONY@.PHONY : sources +@MAKE_PHONY@.PHONY : uninstall +@MAKE_PHONY@.PHONY : uninstall.libs + all \ libs \ install :: $(AUTO_SRC) $(LIBRARIES) diff --git contrib/ncurses/form/READ.ME contrib/ncurses/form/READ.ME index 0cefd57d1965..7c6ad972e576 100644 --- contrib/ncurses/form/READ.ME +++ contrib/ncurses/form/READ.ME @@ -1,5 +1,5 @@ ------------------------------------------------------------------------------- --- Copyright 2020 Thomas E. Dickey -- +-- Copyright 2020,2021 Thomas E. Dickey -- -- Copyright 1998-2003,2006 Free Software Foundation, Inc. -- -- -- -- Permission is hereby granted, free of charge, to any person obtaining a -- @@ -26,18 +26,18 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------- --- $Id: READ.ME,v 0.8 2020/02/02 23:34:34 tom Exp $ +-- $Id: READ.ME,v 0.9 2021/06/17 21:20:30 tom Exp $ ------------------------------------------------------------------------------- This is a clone of the form library that is available with typical System V curses implementations (ETI). It is modelled after the documentation that comes for this library with -a 386 based SVR4 implementation (ESIX). +a 386 based SVR4 implementation (ESIX). The development environment was and is an ELF based Linux system. -For things that still need doing, see the TO-DO file in the top-level +For things that still need doing, see the TO-DO file in the top-level directory. Juergen Pfeifer diff --git contrib/ncurses/form/fld_def.c contrib/ncurses/form/fld_def.c index de664eb5f803..51bdc6485800 100644 --- contrib/ncurses/form/fld_def.c +++ contrib/ncurses/form/fld_def.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2021 Thomas E. Dickey * * Copyright 1998-2012,2014 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -33,7 +33,7 @@ #include "form.priv.h" -MODULE_ID("$Id: fld_def.c,v 1.43 2020/05/24 01:40:20 anonymous.maarten Exp $") +MODULE_ID("$Id: fld_def.c,v 1.44 2021/03/27 23:49:53 tom Exp $") /* this can't be readonly */ static FIELD default_field = @@ -86,14 +86,13 @@ FORM_EXPORT(TypeArgument *) _nc_Make_Argument(const FIELDTYPE *typ, va_list *ap, int *err) { TypeArgument *res = (TypeArgument *)0; - TypeArgument *p; if (typ != 0 && (typ->status & _HAS_ARGS) != 0) { assert(err != 0 && ap != (va_list *)0); if ((typ->status & _LINKED_TYPE) != 0) { - p = typeMalloc(TypeArgument, 1); + TypeArgument *p = typeMalloc(TypeArgument, 1); if (p != 0) { @@ -134,14 +133,13 @@ FORM_EXPORT(TypeArgument *) _nc_Copy_Argument(const FIELDTYPE *typ, const TypeArgument *argp, int *err) { TypeArgument *res = (TypeArgument *)0; - TypeArgument *p; if (typ != 0 && (typ->status & _HAS_ARGS) != 0) { assert(err != 0 && argp != 0); if ((typ->status & _LINKED_TYPE) != 0) { - p = typeMalloc(TypeArgument, 1); + TypeArgument *p = typeMalloc(TypeArgument, 1); if (p != 0) { diff --git contrib/ncurses/form/fld_ftchoice.c contrib/ncurses/form/fld_ftchoice.c index 265f94f869c3..dfaca149c087 100644 --- contrib/ncurses/form/fld_ftchoice.c +++ contrib/ncurses/form/fld_ftchoice.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018,2020 Thomas E. Dickey * + * Copyright 2018-2020,2021 Thomas E. Dickey * * Copyright 1998-2012,2016 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -33,10 +33,10 @@ #include "form.priv.h" -MODULE_ID("$Id: fld_ftchoice.c,v 1.17 2020/05/24 01:40:20 anonymous.maarten Exp $") +MODULE_ID("$Id: fld_ftchoice.c,v 1.18 2021/06/17 21:26:02 tom Exp $") /*--------------------------------------------------------------------------- -| Facility : libnform +| Facility : libnform | Function : int set_fieldtype_choice( | FIELDTYPE *typ, | bool (* const next_choice)(FIELD *,const void *), diff --git contrib/ncurses/form/fld_ftlink.c contrib/ncurses/form/fld_ftlink.c index 3d8af84de999..ed16920078bb 100644 --- contrib/ncurses/form/fld_ftlink.c +++ contrib/ncurses/form/fld_ftlink.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2021 Thomas E. Dickey * * Copyright 1998-2010,2012 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -33,17 +33,17 @@ #include "form.priv.h" -MODULE_ID("$Id: fld_ftlink.c,v 1.17 2020/05/24 01:40:20 anonymous.maarten Exp $") +MODULE_ID("$Id: fld_ftlink.c,v 1.18 2021/06/17 21:20:30 tom Exp $") /*--------------------------------------------------------------------------- -| Facility : libnform +| Facility : libnform | Function : FIELDTYPE *link_fieldtype( | FIELDTYPE *type1, | FIELDTYPE *type2) -| +| | Description : Create a new fieldtype built from the two given types. | They are connected by an logical 'OR'. -| If an error occurs, errno is set to +| If an error occurs, errno is set to | E_BAD_ARGUMENT - invalid arguments | E_SYSTEM_ERROR - system error (no memory) | diff --git contrib/ncurses/form/fld_info.c contrib/ncurses/form/fld_info.c index 188a31563ef2..bc8399dca743 100644 --- contrib/ncurses/form/fld_info.c +++ contrib/ncurses/form/fld_info.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2021 Thomas E. Dickey * * Copyright 1998-2004,2010 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -33,15 +33,15 @@ #include "form.priv.h" -MODULE_ID("$Id: fld_info.c,v 1.15 2020/12/12 01:05:42 tom Exp $") +MODULE_ID("$Id: fld_info.c,v 1.16 2021/06/17 21:20:30 tom Exp $") /*--------------------------------------------------------------------------- -| Facility : libnform +| Facility : libnform | Function : int field_info(const FIELD *field, | int *rows, int *cols, | int *frow, int *fcol, | int *nrow, int *nbuf) -| +| | Description : Retrieve information about the field's creation parameters. | | Return Values : E_OK - success @@ -78,11 +78,11 @@ field_info(const FIELD *field, } /*--------------------------------------------------------------------------- -| Facility : libnform +| Facility : libnform | Function : int dynamic_field_info(const FIELD *field, | int *drows, int *dcols, | int *maxgrow) -| +| | Description : Retrieve information about a dynamic field's current | dynamic parameters. | diff --git contrib/ncurses/form/fld_just.c contrib/ncurses/form/fld_just.c index 050e66f5d311..62253bcf77b6 100644 --- contrib/ncurses/form/fld_just.c +++ contrib/ncurses/form/fld_just.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2021 Thomas E. Dickey * * Copyright 1998-2010,2012 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -33,12 +33,12 @@ #include "form.priv.h" -MODULE_ID("$Id: fld_just.c,v 1.16 2020/12/11 23:16:37 tom Exp $") +MODULE_ID("$Id: fld_just.c,v 1.17 2021/06/17 21:20:30 tom Exp $") /*--------------------------------------------------------------------------- -| Facility : libnform +| Facility : libnform | Function : int set_field_just(FIELD *field, int just) -| +| | Description : Set the field's type of justification. | | Return Values : E_OK - success @@ -70,9 +70,9 @@ set_field_just(FIELD *field, int just) } /*--------------------------------------------------------------------------- -| Facility : libnform +| Facility : libnform | Function : int field_just( const FIELD *field ) -| +| | Description : Retrieve the field's type of justification | | Return Values : The justification type. diff --git contrib/ncurses/form/fld_link.c contrib/ncurses/form/fld_link.c index dda6c97ee6d1..c0604584179f 100644 --- contrib/ncurses/form/fld_link.c +++ contrib/ncurses/form/fld_link.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2021 Thomas E. Dickey * * Copyright 1998-2010,2012 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -33,17 +33,17 @@ #include "form.priv.h" -MODULE_ID("$Id: fld_link.c,v 1.16 2020/12/11 23:20:32 tom Exp $") +MODULE_ID("$Id: fld_link.c,v 1.17 2021/06/17 21:20:30 tom Exp $") /*--------------------------------------------------------------------------- -| Facility : libnform -| Function : FIELD *link_field(FIELD *field, int frow, int fcol) -| +| Facility : libnform +| Function : FIELD *link_field(FIELD *field, int frow, int fcol) +| | Description : Duplicates the field at the specified position. The | new field shares its buffers with the original one, | the attributes are independent. | If an error occurs, errno is set to -| +| | E_BAD_ARGUMENT - invalid argument | E_SYSTEM_ERROR - system error | diff --git contrib/ncurses/form/fld_max.c contrib/ncurses/form/fld_max.c index bfeadf9b7fa8..325541a373b5 100644 --- contrib/ncurses/form/fld_max.c +++ contrib/ncurses/form/fld_max.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2019,2020 Thomas E. Dickey * + * Copyright 2019-2020,2021 Thomas E. Dickey * * Copyright 1998-2012,2013 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -33,12 +33,12 @@ #include "form.priv.h" -MODULE_ID("$Id: fld_max.c,v 1.17 2020/05/24 01:40:20 anonymous.maarten Exp $") +MODULE_ID("$Id: fld_max.c,v 1.18 2021/06/17 21:26:02 tom Exp $") /*--------------------------------------------------------------------------- -| Facility : libnform +| Facility : libnform | Function : int set_max_field(FIELD *field, int maxgrow) -| +| | Description : Set the maximum growth for a dynamic field. If maxgrow=0 | the field may grow to any possible size. | diff --git contrib/ncurses/form/fld_move.c contrib/ncurses/form/fld_move.c index c4b8313639d5..0d9ac4aebc9c 100644 --- contrib/ncurses/form/fld_move.c +++ contrib/ncurses/form/fld_move.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2021 Thomas E. Dickey * * Copyright 1998-2010,2012 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -33,12 +33,12 @@ #include "form.priv.h" -MODULE_ID("$Id: fld_move.c,v 1.15 2020/12/11 23:48:05 tom Exp $") +MODULE_ID("$Id: fld_move.c,v 1.16 2021/06/17 21:20:30 tom Exp $") /*--------------------------------------------------------------------------- -| Facility : libnform +| Facility : libnform | Function : int move_field(FIELD *field,int frow, int fcol) -| +| | Description : Moves the disconnected field to the new location in | the form's subwindow. | diff --git contrib/ncurses/form/fld_opts.c contrib/ncurses/form/fld_opts.c index a0bbbf41cc5d..ab4d55943a07 100644 --- contrib/ncurses/form/fld_opts.c +++ contrib/ncurses/form/fld_opts.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2021 Thomas E. Dickey * * Copyright 1998-2004,2010 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -33,16 +33,16 @@ #include "form.priv.h" -MODULE_ID("$Id: fld_opts.c,v 1.15 2020/12/11 22:05:24 tom Exp $") +MODULE_ID("$Id: fld_opts.c,v 1.16 2021/06/17 21:20:30 tom Exp $") /*---------------------------------------------------------------------------- Field-Options manipulation routines --------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------- -| Facility : libnform +| Facility : libnform | Function : int set_field_opts(FIELD *field, Field_Options opts) -| +| | Description : Turns on the named options for this field and turns | off all the remaining options. | @@ -65,9 +65,9 @@ set_field_opts(FIELD *field, Field_Options opts) } /*--------------------------------------------------------------------------- -| Facility : libnform +| Facility : libnform | Function : Field_Options field_opts(const FIELD *field) -| +| | Description : Retrieve the field's options. | | Return Values : The options. @@ -81,10 +81,10 @@ field_opts(const FIELD *field) } /*--------------------------------------------------------------------------- -| Facility : libnform +| Facility : libnform | Function : int field_opts_on(FIELD *field, Field_Options opts) -| -| Description : Turns on the named options for this field and all the +| +| Description : Turns on the named options for this field and all the | remaining options are unchanged. | | Return Values : E_OK - success @@ -109,10 +109,10 @@ field_opts_on(FIELD *field, Field_Options opts) } /*--------------------------------------------------------------------------- -| Facility : libnform +| Facility : libnform | Function : int field_opts_off(FIELD *field, Field_Options opts) -| -| Description : Turns off the named options for this field and all the +| +| Description : Turns off the named options for this field and all the | remaining options are unchanged. | | Return Values : E_OK - success diff --git contrib/ncurses/form/fld_pad.c contrib/ncurses/form/fld_pad.c index 962958f501b6..fdd803fee07e 100644 --- contrib/ncurses/form/fld_pad.c +++ contrib/ncurses/form/fld_pad.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2021 Thomas E. Dickey * * Copyright 1998-2004,2010 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -33,12 +33,12 @@ #include "form.priv.h" -MODULE_ID("$Id: fld_pad.c,v 1.13 2020/12/11 22:05:24 tom Exp $") +MODULE_ID("$Id: fld_pad.c,v 1.14 2021/06/17 21:20:30 tom Exp $") /*--------------------------------------------------------------------------- -| Facility : libnform +| Facility : libnform | Function : int set_field_pad(FIELD *field, int ch) -| +| | Description : Set the pad character used to fill the field. This must | be a printable character. | @@ -68,9 +68,9 @@ set_field_pad(FIELD *field, int ch) } /*--------------------------------------------------------------------------- -| Facility : libnform +| Facility : libnform | Function : int field_pad(const FIELD *field) -| +| | Description : Retrieve the field's pad character. | | Return Values : The pad character. diff --git contrib/ncurses/form/fld_page.c contrib/ncurses/form/fld_page.c index 9029768ce2ba..6972d310396d 100644 --- contrib/ncurses/form/fld_page.c +++ contrib/ncurses/form/fld_page.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2021 Thomas E. Dickey * * Copyright 1998-2010,2012 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -33,13 +33,13 @@ #include "form.priv.h" -MODULE_ID("$Id: fld_page.c,v 1.15 2020/12/11 23:15:26 tom Exp $") +MODULE_ID("$Id: fld_page.c,v 1.16 2021/06/17 21:20:30 tom Exp $") /*--------------------------------------------------------------------------- -| Facility : libnform +| Facility : libnform | Function : int set_new_page(FIELD *field, bool new_page_flag) -| -| Description : Marks the field as the beginning of a new page of +| +| Description : Marks the field as the beginning of a new page of | the form. | | Return Values : E_OK - success @@ -63,9 +63,9 @@ set_new_page(FIELD *field, bool new_page_flag) } /*--------------------------------------------------------------------------- -| Facility : libnform +| Facility : libnform | Function : bool new_page(const FIELD *field) -| +| | Description : Retrieve the information whether or not the field starts | a new page on the form. | diff --git contrib/ncurses/form/fld_stat.c contrib/ncurses/form/fld_stat.c index 7b504bf449fe..62d782edd89d 100644 --- contrib/ncurses/form/fld_stat.c +++ contrib/ncurses/form/fld_stat.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2021 Thomas E. Dickey * * Copyright 1998-2010,2012 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -33,12 +33,12 @@ #include "form.priv.h" -MODULE_ID("$Id: fld_stat.c,v 1.17 2020/12/11 22:05:24 tom Exp $") +MODULE_ID("$Id: fld_stat.c,v 1.18 2021/06/17 21:20:30 tom Exp $") /*--------------------------------------------------------------------------- -| Facility : libnform +| Facility : libnform | Function : int set_field_status(FIELD *field, bool status) -| +| | Description : Set or clear the 'changed' indication flag for that | field's primary buffer. | @@ -60,11 +60,11 @@ set_field_status(FIELD *field, bool status) } /*--------------------------------------------------------------------------- -| Facility : libnform +| Facility : libnform | Function : bool field_status(const FIELD *field) -| +| | Description : Retrieve the value of the 'changed' indication flag -| for that field's primary buffer. +| for that field's primary buffer. | | Return Values : TRUE - buffer has been changed | FALSE - buffer has not been changed diff --git contrib/ncurses/form/fld_type.c contrib/ncurses/form/fld_type.c index 12c92cf6e268..c557e053c00c 100644 --- contrib/ncurses/form/fld_type.c +++ contrib/ncurses/form/fld_type.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2021 Thomas E. Dickey * * Copyright 1998-2004,2010 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -33,12 +33,12 @@ #include "form.priv.h" -MODULE_ID("$Id: fld_type.c,v 1.19 2020/12/11 23:20:37 tom Exp $") +MODULE_ID("$Id: fld_type.c,v 1.20 2021/06/17 21:20:30 tom Exp $") /*--------------------------------------------------------------------------- -| Facility : libnform +| Facility : libnform | Function : int set_field_type(FIELD *field, FIELDTYPE *type,...) -| +| | Description : Associate the specified fieldtype with the field. | Certain field types take additional arguments. Look | at the spec of the field types ! @@ -81,9 +81,9 @@ set_field_type(FIELD *field, FIELDTYPE *type, ...) } /*--------------------------------------------------------------------------- -| Facility : libnform +| Facility : libnform | Function : FIELDTYPE *field_type(const FIELD *field) -| +| | Description : Retrieve the associated fieldtype for this field. | | Return Values : Pointer to fieldtype of NULL if none is defined. diff --git contrib/ncurses/form/fld_user.c contrib/ncurses/form/fld_user.c index 2f51fa67e3dc..1b13e626506b 100644 --- contrib/ncurses/form/fld_user.c +++ contrib/ncurses/form/fld_user.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2021 Thomas E. Dickey * * Copyright 1998-2004,2010 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -33,12 +33,12 @@ #include "form.priv.h" -MODULE_ID("$Id: fld_user.c,v 1.19 2020/12/12 01:05:34 tom Exp $") +MODULE_ID("$Id: fld_user.c,v 1.20 2021/06/17 21:20:30 tom Exp $") /*--------------------------------------------------------------------------- -| Facility : libnform +| Facility : libnform | Function : int set_field_userptr(FIELD *field, void *usrptr) -| +| | Description : Set the pointer that is reserved in any field to store | application relevant information. | @@ -54,9 +54,9 @@ set_field_userptr(FIELD *field, void *usrptr) } /*--------------------------------------------------------------------------- -| Facility : libnform +| Facility : libnform | Function : void *field_userptr(const FIELD *field) -| +| | Description : Return the pointer that is reserved in any field to | store application relevant information. | diff --git contrib/ncurses/form/form.h contrib/ncurses/form/form.h index 59a97a3d0691..3b62e3901b8e 100644 --- contrib/ncurses/form/form.h +++ contrib/ncurses/form/form.h @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2019,2020 Thomas E. Dickey * + * Copyright 2018-2019-2020,2021 Thomas E. Dickey * * Copyright 1998-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -31,7 +31,7 @@ * Author: Juergen Pfeifer, 1995,1997 * ****************************************************************************/ -/* $Id: form.h,v 0.31 2020/07/04 20:38:43 tom Exp $ */ +/* $Id: form.h,v 0.32 2021/06/17 21:26:02 tom Exp $ */ #ifndef FORM_H #define FORM_H @@ -116,7 +116,7 @@ typedef struct fieldnode /* * The wide-character configuration requires extra information. Because * there are existing applications that manipulate the members of FIELD - * directly, we cannot make the struct opaque, except by changing the ABI. + * directly, we cannot make the struct opaque, except by changing the ABI. * Offsets of members up to this point are the same in the narrow- and * wide-character configuration. But note that the type of buf depends on * the configuration, and is made opaque for that reason. diff --git contrib/ncurses/form/form.priv.h contrib/ncurses/form/form.priv.h index 048d9f84592e..ad5af63ad807 100644 --- contrib/ncurses/form/form.priv.h +++ contrib/ncurses/form/form.priv.h @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2019,2020 Thomas E. Dickey * + * Copyright 2018-2021,2024 Thomas E. Dickey * * Copyright 1998-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -31,7 +31,7 @@ * Author: Juergen Pfeifer, 1995,1997 * ****************************************************************************/ -/* $Id: form.priv.h,v 0.47 2020/12/11 23:20:11 tom Exp $ */ +/* $Id: form.priv.h,v 0.49 2024/02/24 12:17:31 tom Exp $ */ #ifndef FORM_PRIV_H #define FORM_PRIV_H 1 @@ -47,10 +47,6 @@ #include <wctype.h> #endif -#ifndef MB_LEN_MAX -#define MB_LEN_MAX 8 /* should be >= MB_CUR_MAX, but that may be a function */ -#endif - #define FIELD_CELL NCURSES_CH_T #define NCURSES_FIELD_INTERNALS char** expanded; WINDOW *working; @@ -202,12 +198,12 @@ extern FORM_EXPORT(FIELDTYPE *) _nc_TYPE_REGEXP(void); extern FORM_EXPORT(FIELDTYPE *) _nc_TYPE_IPV4(void); extern FORM_EXPORT(FIELDTYPE *) -_nc_generic_fieldtype(bool (*const field_check) (FORM*, - FIELD *, +_nc_generic_fieldtype(bool (*const field_check) (FORM*, + FIELD *, const void *), - bool (*const char_check) (int, - FORM*, - FIELD*, + bool (*const char_check) (int, + FORM*, + FIELD*, const void *), bool (*const next)(FORM*,FIELD*,const void*), bool (*const prev)(FORM*,FIELD*,const void*), diff --git contrib/ncurses/form/frm_cursor.c contrib/ncurses/form/frm_cursor.c index daa6c5b7775a..a54b4837a7de 100644 --- contrib/ncurses/form/frm_cursor.c +++ contrib/ncurses/form/frm_cursor.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2021 Thomas E. Dickey * * Copyright 1998-2004,2010 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -33,12 +33,12 @@ #include "form.priv.h" -MODULE_ID("$Id: frm_cursor.c,v 1.12 2020/05/24 01:40:20 anonymous.maarten Exp $") +MODULE_ID("$Id: frm_cursor.c,v 1.13 2021/06/17 21:20:30 tom Exp $") /*--------------------------------------------------------------------------- -| Facility : libnform +| Facility : libnform | Function : int pos_form_cursor(FORM * form) -| +| | Description : Moves the form window cursor to the location required | by the form driver to resume form processing. This may | be needed after the application calls a curses library diff --git contrib/ncurses/form/frm_data.c contrib/ncurses/form/frm_data.c index 0856afb845e2..940c32db99c6 100644 --- contrib/ncurses/form/frm_data.c +++ contrib/ncurses/form/frm_data.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2021 Thomas E. Dickey * * Copyright 1998-2010,2013 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -33,12 +33,12 @@ #include "form.priv.h" -MODULE_ID("$Id: frm_data.c,v 1.19 2020/12/11 23:20:37 tom Exp $") +MODULE_ID("$Id: frm_data.c,v 1.21 2021/06/17 21:11:08 tom Exp $") /*--------------------------------------------------------------------------- -| Facility : libnform +| Facility : libnform | Function : bool data_behind(const FORM *form) -| +| | Description : Check for off-screen data behind. This is nearly trivial | because the beginning of a field is fixed. | @@ -70,12 +70,12 @@ data_behind(const FORM *form) } /*--------------------------------------------------------------------------- -| Facility : libnform +| Facility : libnform | Function : static char * Only_Padding( | WINDOW *w, | int len, | int pad) -| +| | Description : Test if 'length' cells starting at the current position | contain a padding character. | @@ -123,11 +123,11 @@ Only_Padding(WINDOW *w, int len, int pad) } /*--------------------------------------------------------------------------- -| Facility : libnform +| Facility : libnform | Function : bool data_ahead(const FORM *form) -| +| | Description : Check for off-screen data ahead. This is more difficult -| because a dynamic field has a variable end. +| because a dynamic field has a variable end. | | Return Values : TRUE - there are off-screen data ahead | FALSE - there are no off-screen data ahead @@ -150,12 +150,11 @@ data_ahead(const FORM *form) if (Single_Line_Field(field)) { - int check_len; - pos = form->begincol + field->cols; while (pos < field->dcols) { - check_len = field->dcols - pos; + int check_len = field->dcols - pos; + if (check_len >= field->cols) check_len = field->cols; cursor_moved = TRUE; diff --git contrib/ncurses/form/frm_def.c contrib/ncurses/form/frm_def.c index 89ae4ec39c54..a9f21f28a944 100644 --- contrib/ncurses/form/frm_def.c +++ contrib/ncurses/form/frm_def.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2021 Thomas E. Dickey * * Copyright 1998-2010,2012 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -33,7 +33,7 @@ #include "form.priv.h" -MODULE_ID("$Id: frm_def.c,v 1.29 2020/12/11 23:47:16 tom Exp $") +MODULE_ID("$Id: frm_def.c,v 1.30 2021/03/27 23:49:58 tom Exp $") /* this can't be readonly */ static FORM default_form = @@ -158,7 +158,6 @@ Connect_Fields(FORM *form, FIELD **fields) { int field_cnt, j; int page_nr; - int maximum_row_in_field, maximum_col_in_field; _PAGE *pg; T((T_CALLED("Connect_Fields(%p,%p)"), (void *)form, (void *)fields)); @@ -199,6 +198,9 @@ Connect_Fields(FORM *form, FIELD **fields) size of the form */ for (j = 0; j < field_cnt; j++) { + int maximum_row_in_field; + int maximum_col_in_field; + if (j == 0) pg->pmin = (short)j; else diff --git contrib/ncurses/form/frm_driver.c contrib/ncurses/form/frm_driver.c index ad82643ed2f7..75656d69ea2a 100644 --- contrib/ncurses/form/frm_driver.c +++ contrib/ncurses/form/frm_driver.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2019,2020 Thomas E. Dickey * + * Copyright 2018-2020,2021 Thomas E. Dickey * * Copyright 1998-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -33,7 +33,7 @@ #include "form.priv.h" -MODULE_ID("$Id: frm_driver.c,v 1.133 2020/12/12 00:36:42 tom Exp $") +MODULE_ID("$Id: frm_driver.c,v 1.135 2021/09/01 23:34:01 tom Exp $") /*---------------------------------------------------------------------------- This is the core module of the form library. It contains the majority @@ -217,10 +217,10 @@ static FIELD_CELL myZEROS; static void check_pos(FORM *form, int lineno) { - int y, x; - if (form && form->w) { + int y, x; + getyx(form->w, y, x); if (y != form->currow || x != form->curcol) { @@ -265,10 +265,11 @@ static int wide_winsnstr(WINDOW *w, const cchar_t *s, int n) { int code = ERR; - int y, x; while (n-- > 0) { + int y, x; + getyx(w, y, x); if ((code = wins_wch(w, s++)) != OK) break; @@ -511,7 +512,6 @@ Buffer_To_Window(const FIELD *field, WINDOW *win) { int width, height; int y, x; - int len; int row; FIELD_CELL *pBuffer; @@ -525,6 +525,8 @@ Buffer_To_Window(const FIELD *field, WINDOW *win) row < height; row++, pBuffer += width) { + int len; + if ((len = (int)(After_End_Of_Data(pBuffer, width) - pBuffer)) > 0) { wmove(win, row, 0); @@ -706,8 +708,6 @@ Field_Grown(FIELD *field, int amount) * realloc(). */ int i, j; - FIELD_CELL *old_bp; - FIELD_CELL *new_bp; result = TRUE; /* allow sharing of recovery on failure */ @@ -715,8 +715,9 @@ Field_Grown(FIELD *field, int amount) field->buf = newbuf; for (i = 0; i <= field->nbuf; i++) { - new_bp = Address_Of_Nth_Buffer(field, i); - old_bp = oldbuf + i * (1 + old_buflen); + FIELD_CELL *new_bp = Address_Of_Nth_Buffer(field, i); + FIELD_CELL *old_bp = oldbuf + i * (1 + old_buflen); + for (j = 0; j < old_buflen; ++j) new_bp[j] = old_bp[j]; while (j < new_buflen) @@ -917,11 +918,12 @@ _nc_Refresh_Current_Field(FORM *form) else { /* A multi-line, i.e. vertical scrolling field */ - int row_after_bottom, first_modified_row, first_unmodified_row; + int first_modified_row, first_unmodified_row; if (field->drows > field->rows) { - row_after_bottom = form->toprow + field->rows; + int row_after_bottom = form->toprow + field->rows; + if (form->currow < form->toprow) { form->toprow = form->currow; @@ -1005,7 +1007,6 @@ Perform_Justification(FIELD *field, WINDOW *win) { FIELD_CELL *bp; int len; - int col = 0; bp = (Field_Has_Option(field, O_NO_LEFT_STRIP) ? field->buf @@ -1014,6 +1015,8 @@ Perform_Justification(FIELD *field, WINDOW *win) if (len > 0) { + int col = 0; + assert(win && (field->drows == 1)); if (field->cols - len >= 0) @@ -1240,7 +1243,6 @@ Synchronize_Linked_Fields(FIELD *field) { FIELD *linked_field; int res = E_OK; - int syncres; if (!field) return (E_BAD_ARGUMENT); @@ -1252,6 +1254,8 @@ Synchronize_Linked_Fields(FIELD *field) (linked_field != field) && (linked_field != 0); linked_field = linked_field->link) { + int syncres; + if (((syncres = Synchronize_Field(linked_field)) != E_OK) && (res == E_OK)) res = syncres; @@ -1276,7 +1280,6 @@ _nc_Synchronize_Attributes(FIELD *field) { FORM *form; int res = E_OK; - WINDOW *formwin; T((T_CALLED("_nc_Synchronize_Attributes(%p)"), (void *)field)); @@ -1303,7 +1306,8 @@ _nc_Synchronize_Attributes(FIELD *field) } else { - formwin = Get_Form_Window(form); + WINDOW *formwin = Get_Form_Window(form); + copywin(form->w, formwin, 0, 0, field->frow, field->fcol, @@ -2422,7 +2426,6 @@ Insert_String(FORM *form, int row, FIELD_CELL *txt, int len) int datalen = (int)(After_End_Of_Data(bp, field->dcols) - bp); int freelen = field->dcols - datalen; int requiredlen = len + 1; - FIELD_CELL *split; int result = E_REQUEST_DENIED; if (freelen >= requiredlen) @@ -2431,7 +2434,7 @@ Insert_String(FORM *form, int row, FIELD_CELL *txt, int len) myINSNSTR(form->w, txt, len); wmove(form->w, row, len); myINSNSTR(form->w, &myBLANK, 1); - return E_OK; + result = E_OK; } else { @@ -2447,6 +2450,8 @@ Insert_String(FORM *form, int row, FIELD_CELL *txt, int len) if (row < (field->drows - 1)) { + FIELD_CELL *split; + split = After_Last_Whitespace_Character(bp, (int)(Get_Start_Of_Data(bp @@ -2470,8 +2475,8 @@ Insert_String(FORM *form, int row, FIELD_CELL *txt, int len) return E_OK; } } - return (result); } + return (result); } /*--------------------------------------------------------------------------- @@ -3551,7 +3556,7 @@ Upper_Neighbor_Field(FIELD *field) | Function : static FIELD *Down_Neighbor_Field(FIELD * field) | | Description : Because of the row-major nature of sorting the fields, -| it's more difficult to define what the down neighbor +| it is more difficult to define what the down neighbor | field really means. We define that it must be on a | 'next' line (cyclic order!) and is the leftmost | field laying on the right side of the given field. If @@ -4474,14 +4479,13 @@ form_driver(FORM *form, int c) } else if (wenclose(sub, event.y, event.x)) { /* Inside the area we try to find the hit item */ - int i; - ry = event.y; rx = event.x; if (wmouse_trafo(sub, &ry, &rx, FALSE)) { int min_field = form->page[form->curpage].pmin; int max_field = form->page[form->curpage].pmax; + int i; for (i = min_field; i <= max_field; ++i) { @@ -4676,14 +4680,13 @@ form_driver_w(FORM *form, int type, wchar_t c) } else if (wenclose(sub, event.y, event.x)) { /* Inside the area we try to find the hit item */ - int i; - ry = event.y; rx = event.x; if (wmouse_trafo(sub, &ry, &rx, FALSE)) { int min_field = form->page[form->curpage].pmin; int max_field = form->page[form->curpage].pmax; + int i; for (i = min_field; i <= max_field; ++i) { diff --git contrib/ncurses/form/frm_opts.c contrib/ncurses/form/frm_opts.c index cab044598042..62e2bebdc431 100644 --- contrib/ncurses/form/frm_opts.c +++ contrib/ncurses/form/frm_opts.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2021 Thomas E. Dickey * * Copyright 1998-2012,2013 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -33,12 +33,12 @@ #include "form.priv.h" -MODULE_ID("$Id: frm_opts.c,v 1.20 2020/12/12 00:37:00 tom Exp $") +MODULE_ID("$Id: frm_opts.c,v 1.21 2021/06/17 21:20:30 tom Exp $") /*--------------------------------------------------------------------------- -| Facility : libnform +| Facility : libnform | Function : int set_form_opts(FORM *form, Form_Options opts) -| +| | Description : Turns on the named options and turns off all the | remaining options for that form. | @@ -61,9 +61,9 @@ set_form_opts(FORM *form, Form_Options opts) } /*--------------------------------------------------------------------------- -| Facility : libnform +| Facility : libnform | Function : Form_Options form_opts(const FORM *) -| +| | Description : Retrieves the current form options. | | Return Values : The option flags. @@ -76,13 +76,13 @@ form_opts(const FORM *form) } /*--------------------------------------------------------------------------- -| Facility : libnform +| Facility : libnform | Function : int form_opts_on(FORM *form, Form_Options opts) -| -| Description : Turns on the named options; no other options are +| +| Description : Turns on the named options; no other options are | changed. | -| Return Values : E_OK - success +| Return Values : E_OK - success | E_BAD_ARGUMENT - invalid options +--------------------------------------------------------------------------*/ FORM_EXPORT(int) @@ -101,13 +101,13 @@ form_opts_on(FORM *form, Form_Options opts) } /*--------------------------------------------------------------------------- -| Facility : libnform +| Facility : libnform | Function : int form_opts_off(FORM *form, Form_Options opts) -| -| Description : Turns off the named options; no other options are +| +| Description : Turns off the named options; no other options are | changed. | -| Return Values : E_OK - success +| Return Values : E_OK - success | E_BAD_ARGUMENT - invalid options +--------------------------------------------------------------------------*/ FORM_EXPORT(int) diff --git contrib/ncurses/form/frm_page.c contrib/ncurses/form/frm_page.c index a4030a2b5f62..ee8dd3837f6b 100644 --- contrib/ncurses/form/frm_page.c +++ contrib/ncurses/form/frm_page.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2021 Thomas E. Dickey * * Copyright 1998-2010,2012 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -33,12 +33,12 @@ #include "form.priv.h" -MODULE_ID("$Id: frm_page.c,v 1.14 2020/05/24 01:40:20 anonymous.maarten Exp $") +MODULE_ID("$Id: frm_page.c,v 1.15 2021/06/17 21:20:30 tom Exp $") /*--------------------------------------------------------------------------- -| Facility : libnform +| Facility : libnform | Function : int set_form_page(FORM * form,int page) -| +| | Description : Set the page number of the form. | | Return Values : E_OK - success @@ -88,9 +88,9 @@ set_form_page(FORM *form, int page) } /*--------------------------------------------------------------------------- -| Facility : libnform +| Facility : libnform | Function : int form_page(const FORM * form) -| +| | Description : Return the current page of the form. | | Return Values : >= 0 : current page number diff --git contrib/ncurses/form/frm_req_name.c contrib/ncurses/form/frm_req_name.c index 27d4696619f4..8b76a8e4f542 100644 --- contrib/ncurses/form/frm_req_name.c +++ contrib/ncurses/form/frm_req_name.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2021 Thomas E. Dickey * * Copyright 1998-2012,2015 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -38,7 +38,7 @@ #include "form.priv.h" -MODULE_ID("$Id: frm_req_name.c,v 1.21 2020/05/24 01:40:20 anonymous.maarten Exp $") +MODULE_ID("$Id: frm_req_name.c,v 1.23 2021/06/17 21:11:08 tom Exp $") #define DATA(s) { s } @@ -112,9 +112,9 @@ static const char request_names[MAX_FORM_COMMAND - MIN_FORM_COMMAND + 1][13] = #define A_SIZE (sizeof(request_names)/sizeof(request_names[0])) /*--------------------------------------------------------------------------- -| Facility : libnform +| Facility : libnform | Function : const char * form_request_name (int request); -| +| | Description : Get the external name of a form request. | | Return Values : Pointer to name - on success @@ -135,9 +135,9 @@ form_request_name(int request) } /*--------------------------------------------------------------------------- -| Facility : libnform +| Facility : libnform | Function : int form_request_by_name (const char *str); -| +| | Description : Search for a request with this name. | | Return Values : Request Id - on success @@ -150,12 +150,13 @@ form_request_by_name(const char *str) to run sequentially through it. */ size_t i = 0; - char buf[16]; /* longest name is 10 chars */ T((T_CALLED("form_request_by_name(%s)"), _nc_visbuf(str))); if (str != 0 && (i = strlen(str)) != 0) { + char buf[16]; /* longest name is 10 chars */ + if (i > sizeof(buf) - 2) i = sizeof(buf) - 2; memcpy(buf, str, i); diff --git contrib/ncurses/form/frm_scale.c contrib/ncurses/form/frm_scale.c index 833f74eb97e8..d53798e1bcee 100644 --- contrib/ncurses/form/frm_scale.c +++ contrib/ncurses/form/frm_scale.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2021 Thomas E. Dickey * * Copyright 1998-2004,2010 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -33,12 +33,12 @@ #include "form.priv.h" -MODULE_ID("$Id: frm_scale.c,v 1.12 2020/05/24 01:40:20 anonymous.maarten Exp $") +MODULE_ID("$Id: frm_scale.c,v 1.13 2021/06/17 21:20:30 tom Exp $") /*--------------------------------------------------------------------------- -| Facility : libnform +| Facility : libnform | Function : int scale_form( const FORM *form, int *rows, int *cols ) -| +| | Description : Retrieve size of form | | Return Values : E_OK - no error diff --git contrib/ncurses/form/frm_sub.c contrib/ncurses/form/frm_sub.c index f718ea4679a6..8f1de099cdf6 100644 --- contrib/ncurses/form/frm_sub.c +++ contrib/ncurses/form/frm_sub.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2021 Thomas E. Dickey * * Copyright 1998-2009,2010 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -33,13 +33,13 @@ #include "form.priv.h" -MODULE_ID("$Id: frm_sub.c,v 1.14 2020/05/24 01:40:20 anonymous.maarten Exp $") +MODULE_ID("$Id: frm_sub.c,v 1.15 2021/06/17 21:20:30 tom Exp $") /*--------------------------------------------------------------------------- -| Facility : libnform +| Facility : libnform | Function : int set_form_sub(FORM *form, WINDOW *win) -| -| Description : Set the subwindow of the form to win. +| +| Description : Set the subwindow of the form to win. | | Return Values : E_OK - success | E_POSTED - form is posted @@ -66,9 +66,9 @@ set_form_sub(FORM *form, WINDOW *win) } /*--------------------------------------------------------------------------- -| Facility : libnform +| Facility : libnform | Function : WINDOW *form_sub(const FORM *) -| +| | Description : Retrieve the window of the form. | | Return Values : The pointer to the Subwindow. diff --git contrib/ncurses/form/frm_user.c contrib/ncurses/form/frm_user.c index e4f86bb6ead0..a4a2249780ad 100644 --- contrib/ncurses/form/frm_user.c +++ contrib/ncurses/form/frm_user.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2021 Thomas E. Dickey * * Copyright 1998-2004,2010 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -33,12 +33,12 @@ #include "form.priv.h" -MODULE_ID("$Id: frm_user.c,v 1.18 2020/12/12 01:05:20 tom Exp $") +MODULE_ID("$Id: frm_user.c,v 1.19 2021/06/17 21:20:30 tom Exp $") /*--------------------------------------------------------------------------- -| Facility : libnform +| Facility : libnform | Function : int set_form_userptr(FORM *form, void *usrptr) -| +| | Description : Set the pointer that is reserved in any form to store | application relevant information. | @@ -54,9 +54,9 @@ set_form_userptr(FORM *form, void *usrptr) } /*--------------------------------------------------------------------------- -| Facility : libnform +| Facility : libnform | Function : void *form_userptr(const FORM *form) -| +| | Description : Return the pointer that is reserved in any form to | store application relevant information. | diff --git contrib/ncurses/form/frm_win.c contrib/ncurses/form/frm_win.c index 5f3bc3c658f7..eeea27d37366 100644 --- contrib/ncurses/form/frm_win.c +++ contrib/ncurses/form/frm_win.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2021 Thomas E. Dickey * * Copyright 1998-2009,2010 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -33,13 +33,13 @@ #include "form.priv.h" -MODULE_ID("$Id: frm_win.c,v 1.18 2020/05/24 01:40:20 anonymous.maarten Exp $") +MODULE_ID("$Id: frm_win.c,v 1.19 2021/06/17 21:20:30 tom Exp $") /*--------------------------------------------------------------------------- -| Facility : libnform +| Facility : libnform | Function : int set_form_win(FORM *form,WINDOW *win) -| -| Description : Set the window of the form to win. +| +| Description : Set the window of the form to win. | | Return Values : E_OK - success | E_POSTED - form is posted @@ -66,9 +66,9 @@ set_form_win(FORM *form, WINDOW *win) } /*--------------------------------------------------------------------------- -| Facility : libnform +| Facility : libnform | Function : WINDOW *form_win(const FORM *) -| +| | Description : Retrieve the window of the form. | | Return Values : The pointer to the Window or stdscr if there is none. diff --git contrib/ncurses/form/fty_enum.c contrib/ncurses/form/fty_enum.c index 62242b56b42f..16ffae11036f 100644 --- contrib/ncurses/form/fty_enum.c +++ contrib/ncurses/form/fty_enum.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2021 Thomas E. Dickey * * Copyright 1998-2009,2010 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -35,7 +35,7 @@ #include "form.priv.h" -MODULE_ID("$Id: fty_enum.c,v 1.31 2020/12/12 01:15:37 tom Exp $") +MODULE_ID("$Id: fty_enum.c,v 1.33 2021/06/17 21:11:08 tom Exp $") typedef struct { @@ -55,9 +55,9 @@ typedef struct enumParams; /*--------------------------------------------------------------------------- -| Facility : libnform +| Facility : libnform | Function : static void *Generic_Enum_Type(void * arg) -| +| | Description : Allocate structure for enumeration type argument. | | Return Values : Pointer to argument structure or NULL on error @@ -77,7 +77,6 @@ Generic_Enum_Type(void *arg) int cnt = 0; char **kp = (char **)0; char **kwds = (char **)0; - char **kptarget; int ccase, cunique; T((T_CREATE("enumARG %p"), (void *)argp)); @@ -96,6 +95,8 @@ Generic_Enum_Type(void *arg) if (cnt > 0) { + char **kptarget; + /* We copy the keywords, because we can't rely on the fact that the caller doesn't relocate or free the memory used for the keywords (maybe he has GC) @@ -118,9 +119,9 @@ Generic_Enum_Type(void *arg) } /*--------------------------------------------------------------------------- -| Facility : libnform +| Facility : libnform | Function : static void *Make_Enum_Type( va_list * ap ) -| +| | Description : Allocate structure for enumeration type argument. | | Return Values : Pointer to argument structure or NULL on error @@ -138,10 +139,10 @@ Make_Enum_Type(va_list *ap) } /*--------------------------------------------------------------------------- -| Facility : libnform +| Facility : libnform | Function : static void *Copy_Enum_Type( const void * argp ) -| -| Description : Copy structure for enumeration type argument. +| +| Description : Copy structure for enumeration type argument. | | Return Values : Pointer to argument structure or NULL on error. +--------------------------------------------------------------------------*/ @@ -182,9 +183,9 @@ Copy_Enum_Type(const void *argp) } /*--------------------------------------------------------------------------- -| Facility : libnform +| Facility : libnform | Function : static void Free_Enum_Type( void * argp ) -| +| | Description : Free structure for enumeration type argument. | | Return Values : - @@ -219,11 +220,11 @@ Free_Enum_Type(void *argp) #define EXACT 2 /*--------------------------------------------------------------------------- -| Facility : libnform -| Function : static int Compare(const unsigned char * s, +| Facility : libnform +| Function : static int Compare(const unsigned char * s, | const unsigned char * buf, | bool ccase ) -| +| | Description : Check whether or not the text in 'buf' matches the | text in 's', at least partial. | @@ -274,11 +275,11 @@ Compare(const unsigned char *s, const unsigned char *buf, } /*--------------------------------------------------------------------------- -| Facility : libnform +| Facility : libnform | Function : static bool Check_Enum_Field( | FIELD * field, | const void * argp) -| +| | Description : Validate buffer content to be a valid enumeration value | | Return Values : TRUE - field is valid @@ -292,10 +293,11 @@ Check_Enum_Field(FIELD *field, const void *argp) bool unique = ((const enumARG *)argp)->checkunique; unsigned char *bp = (unsigned char *)field_buffer(field, 0); char *s, *t, *p; - int res; while (kwds && (s = (*kwds++))) { + int res; + if ((res = Compare((unsigned char *)s, bp, ccase)) != NOMATCH) { p = t = s; /* t is at least a partial match */ @@ -331,10 +333,10 @@ static const char *dummy[] = {(char *)0}; /*--------------------------------------------------------------------------- -| Facility : libnform +| Facility : libnform | Function : static bool Next_Enum(FIELD * field, | const void * argp) -| +| | Description : Check for the next enumeration value | | Return Values : TRUE - next value found and loaded @@ -368,11 +370,11 @@ Next_Enum(FIELD *field, const void *argp) } /*--------------------------------------------------------------------------- -| Facility : libnform +| Facility : libnform | Function : static bool Previous_Enum( | FIELD * field, | const void * argp) -| +| | Description : Check for the previous enumeration value | | Return Values : TRUE - previous value found and loaded diff --git contrib/ncurses/form/fty_generic.c contrib/ncurses/form/fty_generic.c index 3672d658cb31..301c80a1f07a 100644 --- contrib/ncurses/form/fty_generic.c +++ contrib/ncurses/form/fty_generic.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018,2020 Thomas E. Dickey * + * Copyright 2018-2020,2021 Thomas E. Dickey * * Copyright 2008-2012,2016 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -35,7 +35,7 @@ #include "form.priv.h" -MODULE_ID("$Id: fty_generic.c,v 1.14 2020/12/12 17:27:44 tom Exp $") +MODULE_ID("$Id: fty_generic.c,v 1.15 2021/03/27 23:49:53 tom Exp $") /* * This is not a full implementation of a field type, but adds some @@ -282,7 +282,7 @@ _nc_form_cursor(const FORM *form, int *pRow, int *pCol) int code = E_SYSTEM_ERROR; WINDOW *res = (WINDOW *)0; - if (!(form == 0 || pRow == 0 || pCol == 0)) + if (form != 0 && pRow != 0 && pCol != 0) { *pRow = form->currow; *pCol = form->curcol; diff --git contrib/ncurses/form/fty_int.c contrib/ncurses/form/fty_int.c index d06ab8b6f389..c7e3135c882b 100644 --- contrib/ncurses/form/fty_int.c +++ contrib/ncurses/form/fty_int.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2021 Thomas E. Dickey * * Copyright 1998-2010,2012 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -35,7 +35,7 @@ #include "form.priv.h" -MODULE_ID("$Id: fty_int.c,v 1.31 2020/12/12 01:15:37 tom Exp $") +MODULE_ID("$Id: fty_int.c,v 1.33 2021/06/17 21:11:08 tom Exp $") #if USE_WIDEC_SUPPORT #define isDigit(c) (iswdigit((wint_t)(c)) || isdigit(UChar(c))) @@ -62,9 +62,9 @@ typedef struct integerPARM; /*--------------------------------------------------------------------------- -| Facility : libnform +| Facility : libnform | Function : static void *Generic_This_Type( void * arg ) -| +| | Description : Allocate structure for integer type argument. | | Return Values : Pointer to argument structure or NULL on error @@ -89,9 +89,9 @@ Generic_This_Type(void *arg) } /*--------------------------------------------------------------------------- -| Facility : libnform +| Facility : libnform | Function : static void *Make_This_Type( va_list * ap ) -| +| | Description : Allocate structure for integer type argument. | | Return Values : Pointer to argument structure or NULL on error @@ -109,10 +109,10 @@ Make_This_Type(va_list *ap) } /*--------------------------------------------------------------------------- -| Facility : libnform ########## TRUNCATED ###########